Skip to content

Commit

Permalink
Build SDL2 for Android in CI and productise iOS support (#2211)
Browse files Browse the repository at this point in the history
* Update sdl2.yml

* Add aar to staging for CI

* --native flag

* Install workload

* Retry

* Install android workload in NUKE instead

* Remove extra prereq

* Update android action

* Update sdl2.yml

* Update sdl2.yml

* Env var help

* Install android workload somewhere else

* Update sdl2.yml

* Command line oddities

* It appears this was no place for intelligence

* ANDROID_HOME isn't being respected?

* Override ANDROID_HOME? idk

* Fix

* Fix the attribute problem

* Update paths for workflow

* Contd attr fix

* Use older JDK, and turns out it was our runner causing issues

* Install JDK 21 AND 11

* Fix glaring issue with Path.PathSeparator

* Atempt to fix override logic

* I really don't know anymore

* More respect env var changes

* Fix parameter being misused

* Fix a silly mistake

* Fix a silly mistake 2

* Update Core.cs

* Don't force include *everything*

* Fix build error

* Declare public API in CI

If this is incorrect, a human is expected to notice.

* Declare APIs in CI using dotnet format for Windowing.Sdl

* Install .NET 7

* Install workloads

* Install even more workloads

* Update SilkDroid.cs

* Attempt

* Ugh I give up

* May have figured it out?

* Update SDL2 binaries (#2223)

* New binaries for SDL2 on Darwin 23.5.0 Darwin Kernel Version 23.5.0: Wed May  1 20:12:39 PDT 2024; root:xnu-10063.121.3~5/RELEASE_ARM64_VMAPPLE

* New binaries for SDL2 on Microsoft Windows 10.0.20348

* New binaries for SDL2 on Darwin 23.6.0 Darwin Kernel Version 23.6.0: Wed Jul 31 20:50:13 PDT 2024; root:xnu-10063.141.1.700.5~1/RELEASE_ARM64_VMAPPLE

* New binaries for SDL2 on Microsoft Windows 10.0.20348

* New binaries for SDL2 on Darwin 23.6.0 Darwin Kernel Version 23.6.0: Wed Jul 31 20:50:13 PDT 2024; root:xnu-10063.141.1.700.5~1/RELEASE_ARM64_VMAPPLE

* New binaries for SDL2 on Microsoft Windows 10.0.20348

* New binaries for SDL2 on Microsoft Windows 10.0.20348

* New binaries for SDL2 on Darwin 23.6.0 Darwin Kernel Version 23.6.0: Wed Jul 31 20:50:13 PDT 2024; root:xnu-10063.141.1.700.5~1/RELEASE_ARM64_VMAPPLE

* New binaries for SDL2 on Darwin 23.6.0 Darwin Kernel Version 23.6.0: Wed Jul 31 20:50:13 PDT 2024; root:xnu-10063.141.1.700.5~1/RELEASE_ARM64_VMAPPLE

* New binaries for SDL2 on Microsoft Windows 10.0.20348

* New binaries for SDL2 on Darwin 23.6.0 Darwin Kernel Version 23.6.0: Wed Jul 31 20:50:13 PDT 2024; root:xnu-10063.141.1.700.5~1/RELEASE_ARM64_VMAPPLE

* New binaries for SDL2 on Microsoft Windows 10.0.20348

* New binaries for SDL2 on Darwin 23.6.0 Darwin Kernel Version 23.6.0: Wed Jul 31 20:50:13 PDT 2024; root:xnu-10063.141.1.700.5~1/RELEASE_ARM64_VMAPPLE

* New binaries for SDL2 on Microsoft Windows 10.0.20348

* New binaries for SDL2 on Darwin 23.6.0 Darwin Kernel Version 23.6.0: Wed Jul 31 20:50:13 PDT 2024; root:xnu-10063.141.1.700.5~1/RELEASE_ARM64_VMAPPLE

* New binaries for SDL2 on Microsoft Windows 10.0.20348

* New binaries for SDL2 on Darwin 23.6.0 Darwin Kernel Version 23.6.0: Wed Jul 31 20:50:13 PDT 2024; root:xnu-10063.141.1.700.5~1/RELEASE_ARM64_VMAPPLE

* New binaries for SDL2 on Microsoft Windows 10.0.20348

---------

Co-authored-by: The Silk.NET Automaton <[email protected]>
Co-authored-by: Dylan Perks <[email protected]>

* Push PRs to experimental feed

with a different version string

* Stop pulling in GLFW on Android

* Add buildTransitive as well as build

* Productise iOS support

* Stop duplicating build into buildTransitive, use csproj instead

* Fix build

* Upversion native binary package

* Attempt to stop linking away Microsoft.iOS.dll

* Fix build

* Fix MonoPInvokeCallback usage

* Fix NewsstandKit problem

* Revert to last working build and build back up from there

* Undo SilkMobile changes as doing things properly is breaking in 2.X

---------

Co-authored-by: silkdotnet <[email protected]>
Co-authored-by: The Silk.NET Automaton <[email protected]>
  • Loading branch information
3 people authored Oct 29, 2024
1 parent a9c75a6 commit dd103f5
Show file tree
Hide file tree
Showing 37 changed files with 520 additions and 132 deletions.
8 changes: 3 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,14 +59,12 @@ jobs:
run: ./build.sh ValidateSolution
- name: Pack (CI)
if: ${{ github.repository != 'dotnet/Silk.NET' || !startsWith(github.ref, 'refs/tags/') }}
# TODO build native mixins such as BuildLibSilkDroid
# Use a release NUKE so it doesn't interfere with the debug build
run: dotnet run --project build/nuke/Silk.NET.NUKE.csproj -c Release -- Pack --configuration Debug --msbuild-properties VersionSuffix=build${{ github.run_number }}.0 ContinuousIntegrationBuild=true
run: dotnet run --project build/nuke/Silk.NET.NUKE.csproj -c Release -- Pack --configuration Debug --msbuild-properties VersionSuffix=${{ github.event_name != 'pull_request' && format('build{0}.0', github.run_number) || format('pr{0}.{1}', github.event.number, github.run_number) }} ContinuousIntegrationBuild=true
env:
ANDROID_HOME: /Users/runner/Library/Android/sdk
- name: Pack (CD)
if: ${{ github.repository == 'dotnet/Silk.NET' && startsWith(github.ref, 'refs/tags/') }}
# TODO build native mixins such as BuildLibSilkDroid
run: ./build.sh Pack --configuration Release --msbuild-properties ContinuousIntegrationBuild=true
- name: Upload Unsigned Artifacts to Actions
uses: actions/upload-artifact@v4
Expand All @@ -76,10 +74,10 @@ jobs:
if-no-files-found: warn
retention-days: 1
- name: Push to Experimental Feed
if: ${{ github.repository == 'dotnet/Silk.NET' && github.event_name != 'pull_request' }}
if: ${{ github.repository == 'dotnet/Silk.NET' }}
run: ./build.sh PushToNuGet --skip Clean Restore Compile Pack --nuget-feed https://dotnet.github.io/Silk.NET/nuget/experimental/index.json --nuget-username ${{ secrets.EXP_NUGET_USERNAME }} --nuget-password ${{ secrets.EXP_NUGET_PASSWORD }} --nuget-api-key ${{ secrets.EXP_NUGET_PASSWORD }}
- name: Push to GitHub Packages
if: ${{ github.repository == 'dotnet/Silk.NET' && github.event_name != 'pull_request' }}
if: ${{ github.repository == 'dotnet/Silk.NET' }}
run: ./build.sh PushToNuGet --skip Clean Restore Compile Pack --nuget-feed https://nuget.pkg.github.com/dotnet/index.json --nuget-api-key ${{ secrets.GITHUB_TOKEN }}
PushRelease:
name: Push Release to NuGet
Expand Down
66 changes: 54 additions & 12 deletions .github/workflows/sdl2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ on:
- "build/cmake/*"
- build/nuke/Native/Core.cs
- build/nuke/Native/SDL2.cs
- build/nuke/Native/SilkDroid.cs
- build/nuke/Build.Support.cs
- .github/workflows/sdl2.yml
jobs:
Build:
Expand All @@ -21,15 +23,12 @@ jobs:
- os: ubuntu-22.04
name: Linux
nuke_invoke: ./build.sh
- os: windows-2022
- os: windows-latest # runner is not setup for android yet
name: Windows
nuke_invoke: ./build.cmd
extras: |
pwsh build\Install-WindowsSDK.ps1
nuke_invoke: ./build.cmd BuildLibSilkDroid
- os: macos-14
name: Darwin
nuke_invoke: ./build.sh
extras: ""
name: ${{ matrix.env.name }} Build
runs-on: ${{ matrix.env.os }}
steps:
Expand All @@ -42,12 +41,52 @@ jobs:
git -c submodule.third_party/git-hooks.update=none submodule update --init --recursive build/submodules/SDL
git config --local user.email "[email protected]"
git config --local user.name "The Silk.NET Automaton"
- name: Extra prerequisites
- name: Setup .NET Core
uses: actions/setup-dotnet@v3
if: runner.os == 'Windows'
with:
dotnet-version: |
6.0.201
7.0.*
8.0.*
env:
DOTNET_INSTALL_DIR: ~/.dotnet
- name: Setup PowerShell Core
continue-on-error: true
if: runner.os == 'Windows'
run: dotnet tool install --global PowerShell
- name: Setup Java JDK 21
uses: actions/[email protected]
if: runner.os == 'Windows'
with:
java-version: 21
distribution: "temurin"
- name: Set PATH
if: runner.os == 'Windows'
id: set_path
run: |
echo running extras
${{ matrix.env.extras }}
echo "cur_path=$env:PATH\n" >> $env:GITHUB_OUTPUT
- name: Setup Android Environment
uses: android-actions/setup-android@v3
if: runner.os == 'Windows'
env:
PATH: "${{ env.DOTNET_ROOT }};${{ env.DOTNET_ROOT }}\\tools;${{ steps.set_path.outputs.cur_path }}"
- name: Install Android Platforms
if: runner.os == 'Windows'
run: |
sdkmanager --install "build-tools;30.0.2"
sdkmanager --install "platform-tools"
sdkmanager --install "platforms;android-31"
sdkmanager --install "platforms;android-33"
sdkmanager --install "platforms;android-34"
sdkmanager --install "ndk-bundle"
sdkmanager --install "ndk;21.4.7075529"
- name: Setup Java JDK 11
uses: actions/[email protected]
if: runner.os == 'Windows'
with:
java-version: 11
distribution: "temurin"
# Install CMake
- uses: lukka/get-cmake@latest
if: runner.os != 'Linux'
Expand Down Expand Up @@ -110,10 +149,13 @@ jobs:
env:
PUSHABLE_GITHUB_TOKEN: ${{ secrets.PUSHABLE_GITHUB_TOKEN }}

- name: Install Workloads
if: runner.os == 'Windows'
run: dotnet workload install android ios maccatalyst

- name: Build SDL2
if: runner.os != 'Linux'
run: ${{ matrix.env.nuke_invoke }} SDL2
run: ${{ matrix.env.nuke_invoke }} SDL2 ${{ runner.os == 'Windows' && format('{0} {1}', '--native true --android-home-value', env.ANDROID_HOME) || '' }}
env:
PUSHABLE_GITHUB_TOKEN: ${{ secrets.PUSHABLE_GITHUB_TOKEN }}


14 changes: 13 additions & 1 deletion build/nuke/Build.Support.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ partial class Build
/// - Microsoft VSCode https://nuke.build/vscode
public static int Main() => Execute<Build>(x => x.Compile);

[Parameter("Outputs build warnings instead of keeping the MSBuild logging quiet with just errors.")]
[Nuke.Common.Parameter("Outputs build warnings instead of keeping the MSBuild logging quiet with just errors.")]
bool Warnings;

static int IndexOfOrThrow(string x, char y)
Expand Down Expand Up @@ -126,6 +126,18 @@ Dictionary<string, object> ProcessedMsbuildProperties
{
// probably hasn't existed yet, don't care.
}
try
{
if (Native)
{
DotNet("workload install android");
}
}
catch
{
// oh well. maybe it's already installed?
}

GenerateSolution();
}
);
Expand Down
5 changes: 3 additions & 2 deletions build/nuke/Native/Core.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
partial class Build {
[Nuke.Common.Parameter("Build native code")] readonly bool Native;

[CanBeNull] string AndroidHomeValue;
[Nuke.Common.Parameter("Android home. Will be determined from dotnet if not provided.")] [CanBeNull] string AndroidHomeValue;

static string JobsArg => string.IsNullOrWhiteSpace(GitHubActions.Instance?.Job)
? $" -j{Jobs}"
Expand Down Expand Up @@ -66,7 +66,8 @@ public void PrUpdatedNativeBinary(string name)

Git("fetch --all", RootDirectory);
Git("pull");
Git($"add -f src/Native/*/runtimes/*/native/*", RootDirectory);
Git("add -f src/Native/*/runtimes/*/native/*", RootDirectory);
Git("add **/*.aar **/*.java **/PublicAPI.Unshipped.txt", RootDirectory);
var newBranch = $"ci/{curBranch}/{name.ToLower().Replace(' ', '_')}_bins";
var curCommit = GitCurrentCommit(RootDirectory);
var commitCmd = InheritedShell
Expand Down
15 changes: 14 additions & 1 deletion build/nuke/Native/SilkDroid.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,12 @@ string AndroidHome
return AndroidHomeValue;
}

if ((Environment.GetEnvironmentVariable("ANDROID_HOME") ?? Environment.GetEnvironmentVariable("ANDROID_SDK_ROOT")) is {} sdk)
{
AndroidHomeValue = sdk;
return sdk;
}

var utils = RootDirectory / "build" / "utilities";
DotNet($"build \"{utils / "android_probe.proj"}\" /t:GetAndroidJar");
AndroidHomeValue = (AbsolutePath) File.ReadAllText(utils / "android.jar.gen.txt") / ".." / ".." / "..";
Expand Down Expand Up @@ -80,14 +86,15 @@ string AndroidHome

var envVars = CreateEnvVarDictionary();
envVars["ANDROID_HOME"] = AndroidHome;
envVars["ANDROID_SDK_ROOT"] = AndroidHome;

foreach (var ndk in Directory.GetDirectories((AbsolutePath) AndroidHome / "ndk")
.OrderByDescending(x => Version.Parse(Path.GetFileName(x))))
{
envVars["ANDROID_NDK_HOME"] = ndk;
}

using var process = StartShell($".{Path.PathSeparator}gradlew build", silkDroid, envVars);
using var process = StartShell($".{Path.DirectorySeparatorChar}gradlew build", silkDroid, envVars);
process.AssertZeroExitCode();
var ret = process.Output;
CopyFile
Expand All @@ -96,6 +103,12 @@ string AndroidHome
SourceDirectory / "Windowing" / "Silk.NET.Windowing.Sdl" / "Android" / "app-release.aar",
FileExistsPolicy.Overwrite
);

// Not expecting this to succeed, but we need to do this so we generate the bindings to go in the public API.
InheritedShell($"dotnet build \"{SourceDirectory / "Windowing" / "Silk.NET.Windowing.Sdl" / "Silk.NET.Windowing.Sdl.csproj"}\"").AssertWaitForExit();

// Update the public API.
InheritedShell(string.Format(FormatDeclCmd, SourceDirectory / "Windowing" / "Silk.NET.Windowing.Sdl" / "Silk.NET.Windowing.Sdl.csproj")).AssertZeroExitCode();
return ret;
}
)
Expand Down
1 change: 1 addition & 0 deletions build/props/bindings.props
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
<WriteLinesToFile File="@(SilkGeneratedTargetFile)" Lines="@(SilkGeneratedTargetLine)" Overwrite="true" Encoding="UTF-8" Condition="'@(SilkPInvokeOverride)' != ''" />
<ItemGroup Condition="'@(SilkPInvokeOverride)' != ''">
<TfmSpecificPackageFile Include="@(SilkGeneratedTargetFile)" Link="build/$(_SilkNuGetShortFolderName)/$(PackageId).targets" Pack="true" PackagePath="build/$(_SilkNuGetShortFolderName)/$(PackageId).targets" />
<TfmSpecificPackageFile Include="@(SilkGeneratedTargetFile)" Link="buildTransitive/$(_SilkNuGetShortFolderName)/$(PackageId).targets" Pack="true" PackagePath="buildTransitive/$(_SilkNuGetShortFolderName)/$(PackageId).targets" />
</ItemGroup>
</Target>
<Target Name="SilkGenerateILLinkSubs" Condition="$(TargetFramework.Contains('net6')) or $(TargetFramework.Contains('net7')) or $(TargetFramework.Contains('net8'))">
Expand Down
17 changes: 14 additions & 3 deletions src/Input/Silk.NET.Input/Silk.NET.Input.csproj
Original file line number Diff line number Diff line change
@@ -1,14 +1,25 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>netstandard2.0;netstandard2.1;netcoreapp3.1;net5.0</TargetFrameworks>
<TargetFrameworks>netstandard2.0;netstandard2.1;netcoreapp3.1;net5.0;net6.0;net6.0-android;net6.0-ios;net6.0-maccatalyst</TargetFrameworks>
<SilkMetapackage>true</SilkMetapackage>
</PropertyGroup>

<ItemGroup>
<ProjectReference Include="..\Silk.NET.Input.Common\Silk.NET.Input.Common.csproj" />
<ProjectReference Include="..\Silk.NET.Input.Glfw\Silk.NET.Input.Glfw.csproj" />
<ProjectReference Include="..\Silk.NET.Input.Sdl\Silk.NET.Input.Sdl.csproj" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' != 'net6.0-android' And '$(TargetFramework)' != 'net6.0-ios' And '$(TargetFramework)' != 'net6.0-maccatalyst' And '$(TargetFramework)' != 'net6.0'">
<ProjectReference Include="..\Silk.NET.Input.Glfw\Silk.NET.Input.Glfw.csproj" />
<ProjectReference Include="..\Silk.NET.Input.Sdl\Silk.NET.Input.Sdl.csproj" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'net6.0-android' Or '$(TargetFramework)' == 'net6.0-ios' Or '$(TargetFramework)' == 'net6.0-maccatalyst'">
<ProjectReference Include="..\Silk.NET.Input.Sdl\Silk.NET.Input.Sdl.csproj" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'net6.0'">
<ProjectReference Include="..\Silk.NET.Input.Glfw\Silk.NET.Input.Glfw.csproj" />
</ItemGroup>

<Import Project="..\..\..\build\props\common.props" />
Expand Down
1 change: 0 additions & 1 deletion src/Lab/Experiments/InputTest/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
using System.Drawing;
using System.Linq;
using System.Numerics;
using Silk.NET.GLFW;
using Silk.NET.Input;
using Silk.NET.Windowing;
using MouseButton = Silk.NET.Input.MouseButton;
Expand Down
1 change: 0 additions & 1 deletion src/Lab/Experiments/Triangle/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
using Silk.NET.Maths;
using Silk.NET.OpenGL;
using Silk.NET.Windowing;
using SdlProvider = Silk.NET.SDL.SdlProvider;
using Shader = SampleBase.Shader;

namespace Triangle
Expand Down
15 changes: 3 additions & 12 deletions src/Lab/Experiments/TriangleNET6/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,13 @@
Triangle.Program.Run();
#elif __IOS__
using Silk.NET.Windowing;
using Silk.NET.Windowing.Sdl;
using Silk.NET.Windowing.Sdl.iOS;
using Silk.NET.Input.Sdl;
using Silk.NET.SDL;
using System;
using Triangle;

static void Run(string[] args)
SdlInput.RegisterPlatform();
SilkMobile.RunApp(args, _ =>
{
Triangle.Program.API = new GraphicsAPI(ContextAPI.OpenGLES, ContextProfile.Core, ContextFlags.Default, new APIVersion(3, 0));
Triangle.Program.Run();
}

SdlInput.RegisterPlatform();
Console.WriteLine("Hello, world!");
SilkMobile.RunApp(args, Run);
Console.WriteLine("Goodbye, world!");
SdlProvider.SDL.Value.ThrowError();
});
#endif
19 changes: 17 additions & 2 deletions src/Lab/Experiments/TriangleNET6/TriangleNET6.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@
<LangVersion>preview</LangVersion>
<RuntimeIdentifiers Condition="'$(RuntimeIdentifiers)' == '' And '$(TargetFramework)' == 'net6.0'">$(NETCoreSdkRuntimeIdentifier)</RuntimeIdentifiers>
<RuntimeIdentifiers Condition="'$(RuntimeIdentifiers)' == '' And '$(TargetFramework)' == 'net6.0-android'">android-arm64;android-x86;android-arm;android-x64</RuntimeIdentifiers>
<TrimMode>full</TrimMode>
<TrimMode Condition="'$(TargetFramework)' != 'net6.0-android'">full</TrimMode>
<LinkMode Condition="'$(TargetFramework)' != 'net6.0-android'">Full</LinkMode>
<PublishTrimmed Condition="'$(TargetFramework)' != 'net6.0-android'">true</PublishTrimmed>
</PropertyGroup>

<ItemGroup>
Expand Down Expand Up @@ -38,13 +40,26 @@
<_Silk_NativePackages_SDL_StaticPath Condition="'$(RuntimeIdentifier)' == 'tvos-arm64'">$(MSBuildThisFileDirectory)..\..\..\Native\Silk.NET.SDL.Native\runtimes\tvos\native\libSDL2.a</_Silk_NativePackages_SDL_StaticPath>
</PropertyGroup>
<ItemGroup>
<!-- Copied from Ultz.Native.SDL.targets -->
<NativeReference Include="$(_Silk_NativePackages_SDL_StaticPath)" Condition="'$(_Silk_NativePackages_SDL_StaticPath)' != ''">
<Kind>Static</Kind>
<Forceload>True</Forceload>
<IsCxx>True</IsCxx>
<SmartLink>False</SmartLink>
<LinkerFlags>-framework AudioToolbox -framework AVFoundation -framework CoreAudio -framework CoreBluetooth -framework CoreFoundation -framework CoreGraphics -framework CoreHaptics -framework CoreMotion -framework CoreVideo -framework GameController -framework IOKit -framework Metal -framework OpenGLES -framework QuartzCore -framework UIKit</LinkerFlags>
<LinkerFlags>-framework AudioToolbox -framework AVFoundation -framework CoreAudio -framework CoreBluetooth -framework CoreFoundation -framework CoreGraphics -framework CoreHaptics -framework CoreMotion -framework CoreVideo -framework GameController -framework IOKit -framework Metal -framework OpenGLES -framework QuartzCore -framework UIKit -framework AVFAudio -framework Foundation</LinkerFlags>
</NativeReference>
</ItemGroup>
<!-- Copied from generated targets file -->
<PropertyGroup>
<_Silk_NET_SDL_ExternalPInvokes>@(SilkExternalPInvoke)</_Silk_NET_SDL_ExternalPInvokes>
<_Silk_NET_SDL_InternalPInvokes>@(SilkInternalPInvoke)</_Silk_NET_SDL_InternalPInvokes>
<_Silk_NET_SDL_Opts>@(RuntimeHostConfigurationOption)</_Silk_NET_SDL_Opts>
</PropertyGroup>
<ItemGroup>
<RuntimeHostConfigurationOption Condition="(!$([System.String]::Copy('$(_Silk_NET_SDL_ExternalPInvokes)').Contains('Silk.NET.SDL.Sdl')) and !$([System.String]::Copy('$(_Silk_NET_SDL_Opts)').Contains('SILK_NET_SDL_SDL_ENABLE_PINVOKE_OVERRIDE_1'))) and (('$(SilkEnableStaticLinking)' == 'true') or $([System.String]::Copy('$(_Silk_NET_SDL_InternalPInvokes)').ToLower().Contains('Silk.NET.SDL.Sdl')) or $(TargetFramework.Contains('android')))" Include="SILK_NET_SDL_SDL_ENABLE_PINVOKE_OVERRIDE_1" Value="true" Trim="true" />
<RuntimeHostConfigurationOption Condition="(!$([System.String]::Copy('$(_Silk_NET_SDL_ExternalPInvokes)').Contains('Silk.NET.SDL.Sdl')) and !$([System.String]::Copy('$(_Silk_NET_SDL_Opts)').Contains('SILK_NET_SDL_SDL_ENABLE_PINVOKE_OVERRIDE_0'))) and (('$(SilkEnableStaticLinking)' == 'true') or $([System.String]::Copy('$(_Silk_NET_SDL_InternalPInvokes)').ToLower().Contains('Silk.NET.SDL.Sdl')) or $(TargetFramework.Contains('ios')) or $(TargetFramework.Contains('mac')) or $(TargetFramework.Contains('tvos')))" Include="SILK_NET_SDL_SDL_ENABLE_PINVOKE_OVERRIDE_0" Value="true" Trim="true" />
<RuntimeHostConfigurationOption Condition="(!$([System.String]::Copy('$(_Silk_NET_SDL_Opts)').Contains('SILK_NET_SDL_SDL_ENABLE_PINVOKE_OVERRIDE_1'))) and (!(('$(SilkEnableStaticLinking)' == 'true') or $([System.String]::Copy('$(_Silk_NET_SDL_InternalPInvokes)').ToLower().Contains('Silk.NET.SDL.Sdl')) or $(TargetFramework.Contains('android'))))" Include="SILK_NET_SDL_SDL_ENABLE_PINVOKE_OVERRIDE_1" Value="false" Trim="true" />
<RuntimeHostConfigurationOption Condition="(!$([System.String]::Copy('$(_Silk_NET_SDL_Opts)').Contains('SILK_NET_SDL_SDL_ENABLE_PINVOKE_OVERRIDE_0'))) and (!(('$(SilkEnableStaticLinking)' == 'true') or $([System.String]::Copy('$(_Silk_NET_SDL_InternalPInvokes)').ToLower().Contains('Silk.NET.SDL.Sdl')) or $(TargetFramework.Contains('ios')) or $(TargetFramework.Contains('mac')) or $(TargetFramework.Contains('tvos'))))" Include="SILK_NET_SDL_SDL_ENABLE_PINVOKE_OVERRIDE_0" Value="false" Trim="true" />
</ItemGroup>
</Target>
</Project>
1 change: 1 addition & 0 deletions src/Native/Directory.Build.targets
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<Project>
<ItemGroup>
<Content Include="build/**" PackagePath="build/%(RecursiveDir)%(Filename)%(Extension)" />
<Content Include="build/**" PackagePath="buildTransitive/%(RecursiveDir)%(Filename)%(Extension)" />
<Content Include="runtimes/**" PackagePath="runtimes/%(RecursiveDir)%(Filename)%(Extension)" />
<Content Include="$(MSBuildThisFileDirectory)_._" PackagePath="lib/net461" />
<Content Include="$(MSBuildThisFileDirectory)_._" PackagePath="lib/netstandard2.0" />
Expand Down
2 changes: 1 addition & 1 deletion src/Native/Silk.NET.SDL.Native/Silk.NET.SDL.Native.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<PropertyGroup>
<TargetFrameworks>netstandard2.0;net4.6.1</TargetFrameworks>
<PackageId>Ultz.Native.SDL</PackageId> <!-- TODO change this in 3.0 -->
<PackageVersion>2.30.1</PackageVersion>
<PackageVersion>2.30.1.1</PackageVersion>
<Authors>.NET Foundation and Contributors</Authors>
<PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance>
<PackageLicenseExpression>Zlib</PackageLicenseExpression>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<Forceload>True</Forceload>
<IsCxx>True</IsCxx>
<SmartLink>False</SmartLink>
<LinkerFlags>-framework AudioToolbox -framework AVFoundation -framework CoreAudio -framework CoreBluetooth -framework CoreFoundation -framework CoreGraphics -framework CoreHaptics -framework CoreMotion -framework CoreVideo -framework GameController -framework IOKit -framework Metal -framework OpenGLES -framework QuartzCore -framework UIKit</LinkerFlags>
<LinkerFlags>-framework AudioToolbox -framework AVFoundation -framework CoreAudio -framework CoreBluetooth -framework CoreFoundation -framework CoreGraphics -framework CoreHaptics -framework CoreMotion -framework CoreVideo -framework GameController -framework IOKit -framework Metal -framework OpenGLES -framework QuartzCore -framework UIKit -framework Foundation</LinkerFlags>
</NativeReference>
</ItemGroup>
</Project>
Binary file modified src/Native/Silk.NET.SDL.Native/runtimes/ios/native/libSDL2.a
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified src/Native/Silk.NET.SDL.Native/runtimes/tvos/native/libSDL2.a
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified src/Native/Silk.NET.SDL.Native/runtimes/win-x86/native/SDL2.dll
Binary file not shown.
Loading

0 comments on commit dd103f5

Please sign in to comment.