Skip to content

Commit

Permalink
Add win arm64 target on nuget package
Browse files Browse the repository at this point in the history
  • Loading branch information
lilith committed Aug 22, 2024
1 parent e112c76 commit 4a87b35
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 3 deletions.
17 changes: 17 additions & 0 deletions ci/pack_nuget/imageflow_arm64.targets
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="utf-8" ?>
<Project ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Condition="'$(Platform)' == 'AnyCPU'">
<Content Include="$(MSBuildThisFileDirectory)..\..\runtimes\:rid:\native\*">
<Link>arm64\%(Filename)%(Extension)</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<Visible>False</Visible>
</Content>
</ItemGroup>
<ItemGroup Condition="'$(Platform)' == 'ARM64'">
<Content Include="$(MSBuildThisFileDirectory)..\..\runtimes\:rid:\native\*">
<Link>%(Filename)%(Extension)</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<Visible>False</Visible>
</Content>
</ItemGroup>
</Project>
11 changes: 8 additions & 3 deletions ci/pack_nuget/pack.sh
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ mkdir -p "$STAGING_DIR" || true
if [[ "${NUGET_RUNTIME}" == *'win'* ]]; then
LIB_NAME=imageflow.dll
TOOL_NAME=imageflow_tool.exe
elif [[ "${NUGET_RUNTIME}" == *'osx'* ]]; then
elif [[ "${NUGET_RUNTIME}" == *'osx'* ]]; then
LIB_NAME=libimageflow.dylib
TOOL_NAME=imageflow_tool
else
Expand All @@ -75,19 +75,24 @@ mkdir -p "$STAGING_DIR" || true


if [[ "${NUGET_RUNTIME}" == *'win'* ]]; then

if [[ "${NUGET_RUNTIME}" == *'x64'* ]]; then
# add props
mkdir -p build/net45
mkdir -p buildTransitive/net45
cat ../../imageflow_x64.targets | sed -e "s/:rid:/$NUGET_RUNTIME/g" > "$PROPS_PATH"
cat ../../imageflow_x64.targets | sed -e "s/:rid:/$NUGET_RUNTIME/g" > "$PROPS_PATH_2"
elif [[ "${NUGET_RUNTIME}" == *'x86'* ]]; then
elif [[ "${NUGET_RUNTIME}" == *'x86'* ]]; then
# add props
mkdir -p build/net45
mkdir -p buildTransitive/net45
cat ../../imageflow_x86.targets | sed -e "s/:rid:/$NUGET_RUNTIME/g" > "$PROPS_PATH"
cat ../../imageflow_x86.targets | sed -e "s/:rid:/$NUGET_RUNTIME/g" > "$PROPS_PATH_2"
elif [[ "${NUGET_RUNTIME}" == *'arm64'* ]]; then
# add props
mkdir -p build/net45
mkdir -p buildTransitive/net45
cat ../../imageflow_arm64.targets | sed -e "s/:rid:/$NUGET_RUNTIME/g" > "$PROPS_PATH"
cat ../../imageflow_arm64.targets | sed -e "s/:rid:/$NUGET_RUNTIME/g" > "$PROPS_PATH_2"
fi
fi

Expand Down

0 comments on commit 4a87b35

Please sign in to comment.