Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build SDL2 for Android in CI and productise iOS support #2211

Open
wants to merge 51 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
d19d489
Update sdl2.yml
Perksey Jun 3, 2024
88775da
Add aar to staging for CI
Perksey Jun 3, 2024
52b093d
--native flag
Perksey Jun 3, 2024
26c20d1
Install workload
Perksey Jun 6, 2024
94aac2e
Retry
Perksey Jun 6, 2024
cc3fcce
Install android workload in NUKE instead
Perksey Jun 6, 2024
54d003c
Remove extra prereq
Perksey Jun 6, 2024
14181e6
Update android action
Perksey Jun 6, 2024
3b7e709
Update sdl2.yml
Perksey Jun 6, 2024
477b930
Update sdl2.yml
Perksey Jun 6, 2024
327c0e5
Env var help
Perksey Jun 6, 2024
9697da7
Install android workload somewhere else
Perksey Jun 6, 2024
3cf502c
Update sdl2.yml
Perksey Jun 6, 2024
349dd5d
Command line oddities
Perksey Jun 6, 2024
0869e5c
It appears this was no place for intelligence
Perksey Jun 6, 2024
b8b6d8d
ANDROID_HOME isn't being respected?
Perksey Jun 6, 2024
609c8c1
Override ANDROID_HOME? idk
Perksey Jun 6, 2024
7ca6b5e
Fix
Perksey Jun 6, 2024
f02e2c7
Fix the attribute problem
Perksey Jun 6, 2024
d41e79f
Update paths for workflow
Perksey Jun 6, 2024
61f442f
Contd attr fix
Perksey Jun 6, 2024
7ed038c
Use older JDK, and turns out it was our runner causing issues
Perksey Jun 6, 2024
7edaf4a
Install JDK 21 AND 11
Perksey Jun 6, 2024
548fd51
Fix glaring issue with Path.PathSeparator
Perksey Jun 6, 2024
a2ef5ff
Atempt to fix override logic
Perksey Jun 6, 2024
bb2346d
I really don't know anymore
Perksey Jun 6, 2024
0394a77
More respect env var changes
Perksey Jun 6, 2024
fba20e1
Fix parameter being misused
Perksey Jun 6, 2024
bf206b6
Fix a silly mistake
Perksey Jun 6, 2024
e8b1d7e
Fix a silly mistake 2
Perksey Jun 6, 2024
db59a45
Update Core.cs
Perksey Jun 10, 2024
5eed019
Don't force include *everything*
Perksey Jun 11, 2024
c88f278
Fix build error
Perksey Jul 8, 2024
9e0c3c2
Declare public API in CI
Perksey Oct 22, 2024
62eb7e8
Merge branch 'main' into hotfix/build-sdl-aar-in-ci
Perksey Oct 22, 2024
fd17810
Declare APIs in CI using dotnet format for Windowing.Sdl
Perksey Oct 22, 2024
2703f78
Install .NET 7
Perksey Oct 22, 2024
2e26068
Install workloads
Perksey Oct 22, 2024
8a394d6
Install even more workloads
Perksey Oct 22, 2024
885f483
Update SilkDroid.cs
Perksey Oct 22, 2024
18fc908
Attempt
Perksey Oct 22, 2024
09ab567
Ugh I give up
Perksey Oct 22, 2024
648c07b
May have figured it out?
Perksey Oct 22, 2024
da81a05
Update SDL2 binaries (#2223)
silkdotnet Oct 22, 2024
eaaf8d4
Push PRs to experimental feed
Perksey Oct 23, 2024
6282413
Stop pulling in GLFW on Android
Perksey Oct 24, 2024
2cba1aa
Add buildTransitive as well as build
Perksey Oct 24, 2024
20a8c7c
Productise iOS support
Perksey Oct 24, 2024
2d2cee2
Stop duplicating build into buildTransitive, use csproj instead
Perksey Oct 24, 2024
72e8634
Fix build
Perksey Oct 25, 2024
dffbe4e
Upversion native binary package
Perksey Oct 25, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 "9011267+dotnet-bot@users.noreply.github.com"
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/setup-java@v2.3.0
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/setup-java@v2.3.0
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'">
Beyley marked this conversation as resolved.
Show resolved Hide resolved
<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
25 changes: 4 additions & 21 deletions src/Lab/Experiments/TriangleNET6/Program.cs
Original file line number Diff line number Diff line change
@@ -1,23 +1,6 @@
#if !__IOS__ && !__ANDROID__
#if !__ANDROID__
#if __IOS__
Silk.NET.Input.Sdl.SdlInput.RegisterPlatform();
#endif
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)
{
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
15 changes: 14 additions & 1 deletion src/Lab/Experiments/TriangleNET6/TriangleNET6.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,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
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.
2 changes: 2 additions & 0 deletions src/Windowing/Silk.NET.Windowing.Sdl/Android/Metadata.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,6 @@
path="/api/package[@name='org.libsdl.app']/class[@name='SDLControllerManager']/field[@name='mHapticHandler']"/>
<remove-node
path="/api/package[@name='org.libsdl.app']/class[@name='SDLControllerManager']/field[@name='mJoystickHandler']"/>
<remove-node
path="/api/package[@name='org.libsdl.app']/class[@name='SDLActivity']/field[@name='mTextEdit']"/>
</metadata>
Binary file modified src/Windowing/Silk.NET.Windowing.Sdl/Android/app-release.aar
Binary file not shown.
Loading
Loading