Skip to content

Commit

Permalink
Fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
Perksey committed Oct 25, 2024
1 parent 2d2cee2 commit 72e8634
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 24 deletions.
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>
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
#nullable enable
static Silk.NET.Windowing.Sdl.iOS.SilkMobile.IsRunning.get -> bool
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
#nullable enable
static Silk.NET.Windowing.Sdl.iOS.SilkMobile.IsRunning.get -> bool

0 comments on commit 72e8634

Please sign in to comment.