Skip to content

Commit 7f84012

Browse files
committed
Move to .NET 8, remove .NET 6 Android/iOS as it's not possible to build them
1 parent 3fa2de1 commit 7f84012

File tree

21 files changed

+86
-69
lines changed

21 files changed

+86
-69
lines changed

build/csharp_typemap.json

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -114,8 +114,8 @@
114114
"GgpStreamDescriptor": "nint",
115115
"VkFlags": "uint",
116116
"unsignedchar": "byte",
117-
"IDirectFB*": "nint",
118-
"IDirectFBSurface*": "nint",
117+
"IDirectFB*": "nint",
118+
"IDirectFBSurface*": "nint",
119119
"VASurfaceID*": "nint",
120120
"EGLint": "int",
121121
"khronos_utime_nanoseconds_t": "ulong",
@@ -136,8 +136,8 @@
136136
"HMONITOR__*": "nint",
137137
"HDC__**": "nint*",
138138
"HMONITOR__**": "nint*",
139-
"HBITMAP__*": "nint*",
140-
"HENHMETAFILE__*": "nint*",
139+
"HBITMAP__*": "nint*",
140+
"HENHMETAFILE__*": "nint*",
141141
"_LUID": "Luid",
142142
"_LARGE_INTEGER": "long",
143143
"_ULARGE_INTEGER": "ulong",
@@ -149,17 +149,18 @@
149149
"tagPALETTEENTRY": "Silk.NET.Maths.Vector4D<byte>",
150150
"_SECURITY_ATTRIBUTES": "Silk.NET.Core.Native.SecurityAttributes",
151151
"INT_PTR": "nint",
152-
"POINTER_32": "int",
152+
"POINTER_32": "int",
153153
"POINTER_64": "long",
154-
"POINTER_SIGNED": "nint",
154+
"POINTER_SIGNED": "nint",
155155
"POINTER_UNSIGNED": "nuint",
156-
"SIZE_T": "nuint",
156+
"SIZE_T": "nuint",
157157
"ULONG_PTR": "nuint",
158-
"ULONGLONG": "ulong",
158+
"ULONGLONG": "ulong",
159159
"LONG_PTR": "nint",
160160
"_screen_window": "void",
161161
"_screen_context": "void",
162162
"cl_properties": "ulong",
163-
"IStream": "Silk.NET.Core.Win32Extras.IStream",
164-
"FILETIME": "Silk.NET.Core.Win32Extras.Filetime"
165-
}
163+
"IStream": "Silk.NET.Core.Win32Extras.IStream",
164+
"FILETIME": "Silk.NET.Core.Win32Extras.Filetime",
165+
"SC_HANDLE__*": "Silk.NET.Core.Native.ScHandle"
166+
}

build/props/common.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
<!-- Core properties -->
1010
<PropertyGroup>
1111
<PackageLicenseExpression>MIT</PackageLicenseExpression>
12-
<LangVersion>10</LangVersion>
12+
<LangVersion>preview</LangVersion>
1313
<Authors>.NET Foundation and Contributors</Authors>
1414
<PackageReleaseNotes>
1515
Silk.NET Mobile Update
Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,31 @@
11
<Project Sdk="Microsoft.NET.Sdk">
2-
<PropertyGroup>
3-
<TargetFramework>net6.0-android</TargetFramework>
4-
<SupportedOSPlatformVersion>21</SupportedOSPlatformVersion>
5-
<OutputType>Exe</OutputType>
6-
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
7-
</PropertyGroup>
8-
<ItemGroup>
9-
<None Remove="shader.frag" />
10-
<None Remove="shader.vert" />
11-
<None Remove="silk.png" />
12-
</ItemGroup>
13-
<ItemGroup>
14-
<AndroidAsset Include="shader.frag">
15-
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
16-
</AndroidAsset>
17-
<AndroidAsset Include="shader.vert">
18-
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
19-
</AndroidAsset>
20-
<AndroidAsset Include="silk.png">
21-
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
22-
</AndroidAsset>
23-
</ItemGroup>
24-
<ItemGroup>
25-
<PackageReference Include="SixLabors.ImageSharp" Version="2.1.6" />
26-
</ItemGroup>
27-
<ItemGroup>
28-
<ProjectReference Include="..\..\..\..\src\OpenGL\Silk.NET.OpenGL\Silk.NET.OpenGL.csproj" />
29-
<ProjectReference Include="..\..\..\..\src\Windowing\Silk.NET.Windowing\Silk.NET.Windowing.csproj" />
30-
</ItemGroup>
31-
</Project>
2+
<PropertyGroup>
3+
<TargetFramework>net8.0-android</TargetFramework>
4+
<SupportedOSPlatformVersion>21</SupportedOSPlatformVersion>
5+
<OutputType>Exe</OutputType>
6+
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
7+
</PropertyGroup>
8+
<ItemGroup>
9+
<None Remove="shader.frag" />
10+
<None Remove="shader.vert" />
11+
<None Remove="silk.png" />
12+
</ItemGroup>
13+
<ItemGroup>
14+
<AndroidAsset Include="shader.frag">
15+
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
16+
</AndroidAsset>
17+
<AndroidAsset Include="shader.vert">
18+
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
19+
</AndroidAsset>
20+
<AndroidAsset Include="silk.png">
21+
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
22+
</AndroidAsset>
23+
</ItemGroup>
24+
<ItemGroup>
25+
<PackageReference Include="SixLabors.ImageSharp" Version="2.1.6" />
26+
</ItemGroup>
27+
<ItemGroup>
28+
<ProjectReference Include="..\..\..\..\src\OpenGL\Silk.NET.OpenGL\Silk.NET.OpenGL.csproj" />
29+
<ProjectReference Include="..\..\..\..\src\Windowing\Silk.NET.Windowing\Silk.NET.Windowing.csproj" />
30+
</ItemGroup>
31+
</Project>

examples/CSharp/OpenGL Demos/AndroidInputDemo/AndroidInputDemo.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
3-
<TargetFramework>net6.0-android</TargetFramework>
3+
<TargetFramework>net8.0-android</TargetFramework>
44
<SupportedOSPlatformVersion>21</SupportedOSPlatformVersion>
55
<OutputType>Exe</OutputType>
66
<RuntimeIdentifiers>android-arm64;android-x86;android-arm;android-x64</RuntimeIdentifiers>

global.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"sdk": {
3-
"version": "7.0.102",
3+
"version": "8.0.100",
44
"rollForward": "major"
55
}
66
}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
// Licensed to the .NET Foundation under one or more agreements.
2+
// The .NET Foundation licenses this file to you under the MIT license.
3+
4+
namespace Silk.NET.Core.Native
5+
{
6+
public struct ScHandle
7+
{
8+
public unsafe void* Handle;
9+
}
10+
}

src/Input/Silk.NET.Input/Silk.NET.Input.csproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFrameworks>netstandard2.0;netstandard2.1;netcoreapp3.1;net5.0;net6.0;net6.0-android;net6.0-ios;net6.0-maccatalyst</TargetFrameworks>
4+
<TargetFrameworks>netstandard2.0;netstandard2.1;netcoreapp3.1;net5.0;net6.0;net8.0-android;net8.0-ios;net8.0-maccatalyst</TargetFrameworks>
55
<SilkMetapackage>true</SilkMetapackage>
66
</PropertyGroup>
77

88
<ItemGroup>
99
<ProjectReference Include="..\Silk.NET.Input.Common\Silk.NET.Input.Common.csproj" />
1010
</ItemGroup>
1111

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

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

src/Lab/Experiments/TriangleNET6/TriangleNET6.csproj

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@
22

33
<PropertyGroup>
44
<OutputType>Exe</OutputType>
5-
<TargetFrameworks>net6.0;net6.0-android</TargetFrameworks>
6-
<TargetFrameworks Condition="!$([MSBuild]::IsOsPlatform('Linux'))">$(TargetFrameworks);net6.0-ios</TargetFrameworks>
5+
<TargetFrameworks>net6.0;net8.0-android</TargetFrameworks>
6+
<TargetFrameworks Condition="!$([MSBuild]::IsOsPlatform('Linux'))">$(TargetFrameworks);net8.0-ios</TargetFrameworks>
77
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
88
<LangVersion>preview</LangVersion>
99
<RuntimeIdentifiers Condition="'$(RuntimeIdentifiers)' == '' And '$(TargetFramework)' == 'net6.0'">$(NETCoreSdkRuntimeIdentifier)</RuntimeIdentifiers>
10-
<RuntimeIdentifiers Condition="'$(RuntimeIdentifiers)' == '' And '$(TargetFramework)' == 'net6.0-android'">android-arm64;android-x86;android-arm;android-x64</RuntimeIdentifiers>
11-
<TrimMode Condition="'$(TargetFramework)' != 'net6.0-android'">full</TrimMode>
12-
<LinkMode Condition="'$(TargetFramework)' != 'net6.0-android'">Full</LinkMode>
13-
<PublishTrimmed Condition="'$(TargetFramework)' != 'net6.0-android'">true</PublishTrimmed>
10+
<RuntimeIdentifiers Condition="'$(RuntimeIdentifiers)' == '' And '$(TargetFramework)' == 'net8.0-android'">android-arm64;android-x86;android-arm;android-x64</RuntimeIdentifiers>
11+
<TrimMode Condition="'$(TargetFramework)' != 'net8.0-android'">full</TrimMode>
12+
<LinkMode Condition="'$(TargetFramework)' != 'net8.0-android'">Full</LinkMode>
13+
<PublishTrimmed Condition="'$(TargetFramework)' != 'net8.0-android'">true</PublishTrimmed>
1414
</PropertyGroup>
1515

1616
<ItemGroup>
@@ -26,7 +26,7 @@
2626
</ItemGroup>
2727

2828
<!-- Android -->
29-
<ItemGroup Condition="'$(TargetFramework)' != 'net6.0-android'">
29+
<ItemGroup Condition="'$(TargetFramework)' != 'net8.0-android'">
3030
<Compile Remove="\MainActivity.cs" />
3131
</ItemGroup>
3232

src/Maths/Silk.NET.Maths/PublicAPI/net6.0-android/PublicAPI.Shipped.txt renamed to src/Maths/Silk.NET.Maths/PublicAPI/net8.0-android/PublicAPI.Shipped.txt

File renamed without changes.

src/Maths/Silk.NET.Maths/PublicAPI/net6.0-android/PublicAPI.Unshipped.txt renamed to src/Maths/Silk.NET.Maths/PublicAPI/net8.0-android/PublicAPI.Unshipped.txt

File renamed without changes.

0 commit comments

Comments
 (0)