diff --git a/SDL3-CS.Android.slnf b/SDL3-CS.Android.slnf index 87feeeb..4c6d303 100644 --- a/SDL3-CS.Android.slnf +++ b/SDL3-CS.Android.slnf @@ -2,12 +2,13 @@ "solution": { "path": "SDL3-CS.sln", "projects": [ - "SDL3-CS\\SDL3-CS.csproj", - "SDL3_ttf-CS\\SDL3_ttf-CS.csproj", - "SDL3_image-CS\\SDL3_image-CS.csproj", "SDL3-CS.SourceGeneration\\SDL3-CS.SourceGeneration.csproj", + "SDL3-CS.Tests.Android\\SDL3-CS.Tests.Android.csproj", "SDL3-CS.Tests\\SDL3-CS.Tests.csproj", - "SDL3-CS.Tests.Android\\SDL3-CS.Tests.Android.csproj" + "SDL3-CS\\SDL3-CS.csproj", + "SDL3_image-CS\\SDL3_image-CS.csproj", + "SDL3_mixer-CS\\SDL3_mixer-CS.csproj", + "SDL3_ttf-CS\\SDL3_ttf-CS.csproj" ] } -} +} \ No newline at end of file diff --git a/SDL3-CS.Desktop.slnf b/SDL3-CS.Desktop.slnf index 70fda20..d33a587 100644 --- a/SDL3-CS.Desktop.slnf +++ b/SDL3-CS.Desktop.slnf @@ -2,12 +2,13 @@ "solution": { "path": "SDL3-CS.sln", "projects": [ - "SDL3-CS\\SDL3-CS.csproj", - "SDL3_ttf-CS\\SDL3_ttf-CS.csproj", - "SDL3_image-CS\\SDL3_image-CS.csproj", "SDL3-CS.SourceGeneration\\SDL3-CS.SourceGeneration.csproj", + "SDL3-CS.Tests.Desktop\\SDL3-CS.Tests.Desktop.csproj", "SDL3-CS.Tests\\SDL3-CS.Tests.csproj", - "SDL3-CS.Tests.Desktop\\SDL3-CS.Tests.Desktop.csproj" + "SDL3-CS\\SDL3-CS.csproj", + "SDL3_image-CS\\SDL3_image-CS.csproj", + "SDL3_mixer-CS\\SDL3_mixer-CS.csproj", + "SDL3_ttf-CS\\SDL3_ttf-CS.csproj" ] } -} +} \ No newline at end of file diff --git a/SDL3-CS.Tests.Android/SDL3-CS.Tests.Android.csproj b/SDL3-CS.Tests.Android/SDL3-CS.Tests.Android.csproj index dc98933..2b792f0 100644 --- a/SDL3-CS.Tests.Android/SDL3-CS.Tests.Android.csproj +++ b/SDL3-CS.Tests.Android/SDL3-CS.Tests.Android.csproj @@ -21,52 +21,16 @@ - + armeabi-v7a - + arm64-v8a - + x86 - - x86_64 - - - armeabi-v7a - - - arm64-v8a - - - x86 - - - x86_64 - - - armeabi-v7a - - - arm64-v8a - - - x86 - - - x86_64 - - - armeabi-v7a - - - arm64-v8a - - - x86 - - + x86_64 diff --git a/SDL3-CS.Tests.Desktop/SDL3-CS.Tests.Desktop.csproj b/SDL3-CS.Tests.Desktop/SDL3-CS.Tests.Desktop.csproj index 481a9d4..4729db5 100644 --- a/SDL3-CS.Tests.Desktop/SDL3-CS.Tests.Desktop.csproj +++ b/SDL3-CS.Tests.Desktop/SDL3-CS.Tests.Desktop.csproj @@ -17,21 +17,12 @@ - $([System.Runtime.InteropServices.RuntimeInformation]::OSArchitecture) - - - $(RuntimeIdentifier)\SDL3.dll - $(RuntimeIdentifier)\libSDL3.so - $(RuntimeIdentifier)\libSDL3.dylib - - - win-$(SDLArch.ToLower())\SDL3.dll - linux-$(SDLArch.ToLower())\libSDL3.so - osx-$(SDLArch.ToLower())\libSDL3.dylib + $(NETCoreSdkRuntimeIdentifier) + $(RuntimeIdentifier) - + PreserveNewest diff --git a/SDL3-CS.Tests.iOS/Main.cs b/SDL3-CS.Tests.iOS/Main.cs index a1a8eb1..cf18b8a 100644 --- a/SDL3-CS.Tests.iOS/Main.cs +++ b/SDL3-CS.Tests.iOS/Main.cs @@ -7,6 +7,9 @@ public class Program public static unsafe void Main(string[] args) { NativeLibrary.SetDllImportResolver(typeof(SDL3).Assembly, (_, assembly, path) => NativeLibrary.Load("@rpath/SDL3.framework/SDL3", assembly, path)); + NativeLibrary.SetDllImportResolver(typeof(SDL3_image).Assembly, (_, assembly, path) => NativeLibrary.Load("@rpath/SDL3_image.framework/SDL3_image", assembly, path)); + NativeLibrary.SetDllImportResolver(typeof(SDL3_ttf).Assembly, (_, assembly, path) => NativeLibrary.Load("@rpath/SDL3_ttf.framework/SDL3_ttf", assembly, path)); + NativeLibrary.SetDllImportResolver(typeof(SDL3_mixer).Assembly, (_, assembly, path) => NativeLibrary.Load("@rpath/SDL3_mixer.framework/SDL3_mixer", assembly, path)); SDL3.SDL_RunApp(0, null, &main, IntPtr.Zero); } diff --git a/SDL3-CS.Tests.iOS/SDL3-CS.Tests.iOS.csproj b/SDL3-CS.Tests.iOS/SDL3-CS.Tests.iOS.csproj index 9c23c76..78b0ba0 100644 --- a/SDL3-CS.Tests.iOS/SDL3-CS.Tests.iOS.csproj +++ b/SDL3-CS.Tests.iOS/SDL3-CS.Tests.iOS.csproj @@ -21,6 +21,9 @@ + + + diff --git a/SDL3-CS.iOS.slnf b/SDL3-CS.iOS.slnf index 73da442..4e9f609 100644 --- a/SDL3-CS.iOS.slnf +++ b/SDL3-CS.iOS.slnf @@ -2,12 +2,13 @@ "solution": { "path": "SDL3-CS.sln", "projects": [ - "SDL3-CS\\SDL3-CS.csproj", - "SDL3_ttf-CS\\SDL3_ttf-CS.csproj", - "SDL3_image-CS\\SDL3_image-CS.csproj", "SDL3-CS.SourceGeneration\\SDL3-CS.SourceGeneration.csproj", + "SDL3-CS.Tests.iOS\\SDL3-CS.Tests.iOS.csproj", "SDL3-CS.Tests\\SDL3-CS.Tests.csproj", - "SDL3-CS.Tests.iOS\\SDL3-CS.Tests.iOS.csproj" + "SDL3-CS\\SDL3-CS.csproj", + "SDL3_image-CS\\SDL3_image-CS.csproj", + "SDL3_mixer-CS\\SDL3_mixer-CS.csproj", + "SDL3_ttf-CS\\SDL3_ttf-CS.csproj" ] } -} +} \ No newline at end of file diff --git a/SDL3-CS/JetBrainsAnnotations.cs b/SDL3-CS/JetBrainsAnnotations.cs new file mode 100644 index 0000000..72d6be2 --- /dev/null +++ b/SDL3-CS/JetBrainsAnnotations.cs @@ -0,0 +1,29 @@ +// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. +// See the LICENCE file in the repository root for full licence text. + +using System; + +// https://github.com/JetBrains/JetBrains.Annotations/blob/988289d09aad925b22a5321c075a735cb9597e59/src/Annotations.cs +namespace JetBrains.Annotations +{ + [AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Constructor | AttributeTargets.Method | AttributeTargets.Parameter)] + internal sealed class MustDisposeResourceAttribute : Attribute + { + public MustDisposeResourceAttribute() + { + Value = true; + } + + public MustDisposeResourceAttribute(bool value) + { + Value = value; + } + + /// + /// When set to false, disposing of the resource is not obligatory. + /// The main use-case for explicit [MustDisposeResource(false)] annotation + /// is to loosen the annotation for inheritors. + /// + public bool Value { get; } + } +} diff --git a/SDL3-CS/SDL3-CS.csproj b/SDL3-CS/SDL3-CS.csproj index 3fa7652..cae31a2 100644 --- a/SDL3-CS/SDL3-CS.csproj +++ b/SDL3-CS/SDL3-CS.csproj @@ -32,10 +32,6 @@ - - all - - all