Skip to content

Commit

Permalink
Window and linux build configued?
Browse files Browse the repository at this point in the history
  • Loading branch information
NogginBops committed Apr 14, 2023
1 parent 7194637 commit d70a850
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 10 deletions.
9 changes: 7 additions & 2 deletions make_nuget.ps1
@@ -1,7 +1,12 @@
param([String]$projectDir, [int]$verBuild)

$ErrorActionPreference = "Stop"
[String]$SDL_VERSION="2.26.5"
[int]$SDL_MAJOR_VERSION=2
[int]$SDL_MINOR_VERSION=26
[int]$SDL_PATCH_VERSION=5
[String]$SDL_VERSION="$($SDL_MAJOR_VERSION).$($SDL_MINOR_VERSION).$($SDL_PATCH_VERSION)"

[String]$SDL_SO_POSTFIX="0.$($SDL_MINOR_VERSION * 100).$($SDL_PATCH_VERSION)"

# The built .so file will end in .so.3.3 for a version like 3.3.7, to get the correct file we need to pass "3.3" to the .csproj
# [String]$GLFW_SHORT_VERSION = $GLFW_VERSION.Substring(0, $GLFW_VERSION.LastIndexOf("."))
Expand Down Expand Up @@ -34,4 +39,4 @@ return;

$nuspec = [System.IO.Path]::Combine($projectDir, ".\sdl-redist.csproj")

dotnet pack $nuspec -c Release -p:VERSION="$version" -p:GLFW_VERSION="$GLFW_VERSION" -p:GLFW_SHORT_VERSION="$GLFW_SHORT_VERSION" -o ./artifacts
dotnet pack $nuspec -c Release -p:VERSION="$version" -p:SDL_VERSION="$SDL_VERSION" -p:SDL_SO_POSTFIX="$SDL_SO_POSTFIX" -o ./artifacts
21 changes: 13 additions & 8 deletions sdl-redist.csproj
Expand Up @@ -4,7 +4,8 @@
<NoBuild>true</NoBuild>
<IncludeBuildOutput>false</IncludeBuildOutput>
<IncludeSymbols>false</IncludeSymbols>
<RuntimeIdentifiers>win-x86;win-x64;osx-x64;osx-arm64;linux-x64</RuntimeIdentifiers>
<!-- FIXME: macos <RuntimeIdentifiers>win-x86;win-x64;osx-x64;osx-arm64;linux-x64</RuntimeIdentifiers>-->
<RuntimeIdentifiers>win-x86;win-x64;linux-x64</RuntimeIdentifiers>
<GeneratePackageOnBuild>false</GeneratePackageOnBuild>
<PackageVersion>$(VERSION)</PackageVersion>

Expand All @@ -17,37 +18,41 @@
<Description>SDL redistributables for OpenTK.</Description>
<PackageIcon>opentk.png</PackageIcon>
</PropertyGroup>

<ItemGroup>
<Content Include="tmp/glfw-$(GLFW_VERSION).bin.WIN64/lib-vc2019/*.dll">
<Content Include="tmp/win32-x64/*.dll">
<PackagePath>runtimes/win-x64/native/</PackagePath>
<Pack>true</Pack>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="tmp/glfw-$(GLFW_VERSION).bin.WIN32/lib-vc2019/*.dll">
<Content Include="tmp/win32-x86/*.dll">
<PackagePath>runtimes/win-x86/native/</PackagePath>
<Pack>true</Pack>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="tmp/glfw-$(GLFW_VERSION).bin.MACOS/lib-x86_64/*.dylib">
<!-- FIXME: Add macos binaries
<Content Include="tmp/macos/*.dylib">
<PackagePath>runtimes/osx-x64/native/</PackagePath>
<Pack>true</Pack>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="tmp/glfw-$(GLFW_VERSION).bin.MACOS/lib-arm64/*.dylib">
<Content Include="tmp/glfw-$(SDL_VERSION).bin.MACOS/lib-arm64/*.dylib">
<PackagePath>runtimes/osx-arm64/native/</PackagePath>
<Pack>true</Pack>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="tmp/src/build/src/*.so.$(GLFW_SHORT_VERSION)">
-->
<Content Include="tmp/src/build/*.so.$(SDL_SO_POSTFIX)">
<PackagePath>runtimes/linux-x64/native/</PackagePath>
<Pack>true</Pack>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>

<Content Include="tmp/glfw-$(GLFW_VERSION).bin.WIN32/LICENSE.md">
<PackagePath>COPYING.md</PackagePath>
<Content Include="tmp/src/LICENSE.txt">
<PackagePath>LICENSE.txt</PackagePath>
<Pack>true</Pack>
</Content>

<None Include="tmp/opentk.png" Pack="true" PackagePath="/"/>

<!-- We need to add this file to get rid of the NU5128 warning.
Expand Down

0 comments on commit d70a850

Please sign in to comment.