Skip to content

Commit

Permalink
Add libpdfium.a to output for wasm and update nuspec
Browse files Browse the repository at this point in the history
  • Loading branch information
sungaila authored and bblanchon committed Aug 30, 2023
1 parent 330aaa7 commit 8d9cea2
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 1 deletion.
17 changes: 16 additions & 1 deletion nuget/bblanchon.PDFium.WebAssembly.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,30 @@
<description>This package contains pre-compiled binaries of the PDFium library, an open-source library for PDF manipulation and rendering.</description>
<releaseNotes>$releaseNotes$</releaseNotes>
<copyright>Copyright © Benoit Blanchon 2017-2022</copyright>
<tags>PDFium PDF binaries library native Chromium</tags>
<tags>PDFium PDF binaries library native Chromium wasm webassembly</tags>
<repository type="git" url="https://github.com/bblanchon/pdfium-binaries.git" branch="$branch$" commit="$commit$" />
<icon>icon.png</icon>
<iconUrl>https://raw.githubusercontent.com/bblanchon/pdfium-binaries/master/nuget/bblanchon.PDFium.WebAssembly.png</iconUrl>

<dependencies>
<group targetFramework="netstandard1.0" />
</dependencies>
</metadata>

<files>
<file src="bblanchon.PDFium.WebAssembly.png" target="icon.png" />

<!-- placeholder file because this package contains native binaries only -->
<!-- https://docs.microsoft.com/en-us/nuget/reference/errors-and-warnings/nu5127 -->
<file src="_._" target="lib/netstandard1.0/_._" />

<!-- WebAssembly-specific dependencies aren't referenced automatically and must be referenced manually as NativeFileReferences. -->
<!-- Package authors can choose to add the native references by including a .props file in the package with the references. -->
<!-- https://learn.microsoft.com/en-us/aspnet/core/blazor/webassembly-native-dependencies#package-native-dependencies-in-a-nuget-package -->
<file src="pdfium-wasm/lib/libpdfium.a" target="build/netstandard1.0/libpdfium.a" />
<file src="bblanchon.PDFium.WebAssembly.props" target="build/netstandard1.0/bblanchon.PDFium.WebAssembly.props" />
<file src="bblanchon.PDFium.WebAssembly.props" target="buildTransitive/netstandard1.0/bblanchon.PDFium.WebAssembly.props" />

<!-- the native PDFium binaries -->
<!-- see list of available runtime identifiers -->
<!-- https://docs.microsoft.com/en-us/dotnet/core/rid-catalog -->
Expand Down
6 changes: 6 additions & 0 deletions nuget/bblanchon.PDFium.WebAssembly.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<NativeFileReference Include="$(MSBuildThisFileDirectory)..\..\build\netstandard1.0\libpdfium.a" />
</ItemGroup>
</Project>
1 change: 1 addition & 0 deletions steps/07-stage.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ case "$OS" in
mv "$BUILD/pdfium.html" "$STAGING_LIB"
mv "$BUILD/pdfium.js" "$STAGING_LIB"
mv "$BUILD/pdfium.wasm" "$STAGING_LIB"
mv "$BUILD/obj/libpdfium.a" "$STAGING_LIB"
rm -rf "$STAGING/include/cpp"
rm "$STAGING/PDFiumConfig.cmake"
;;
Expand Down

0 comments on commit 8d9cea2

Please sign in to comment.