Skip to content

Commit

Permalink
Bump .NET SDK to 9, add 32-bit support (#10)
Browse files Browse the repository at this point in the history
Bumps .NET SDK from 8 to 9 (except for macOS)
Adds x86 support for Windows
Adds ARM (32-bit) support for Linux and Android
  • Loading branch information
CasualPokePlayer authored Nov 22, 2024
1 parent 830a54c commit 6a60e75
Show file tree
Hide file tree
Showing 16 changed files with 174 additions and 57 deletions.
7 changes: 4 additions & 3 deletions .ci/android.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@ export PATH=$ANDROID_HOME/cmake/3.22.1/bin:$PATH
cd ../externals/android
./build_all.sh

# Install dotnet8 sdk
# Install dotnet9 sdk
wget https://dot.net/v1/dotnet-install.sh -O $HOME/dotnet-install.sh
chmod +x $HOME/dotnet-install.sh
$HOME/dotnet-install.sh --channel 8.0
$HOME/dotnet-install.sh --channel 9.0
export PATH=$HOME/.dotnet:$PATH

# Set path to find NDK's clang (needed to workaround .NET bug)
Expand All @@ -43,9 +43,10 @@ export PATH=$ANDROID_NDK_ROOT/toolchains/llvm/prebuilt/linux-x86_64/bin:$PATH
cd ../..
dotnet publish -r linux-bionic-arm64 -p:DisableUnsupportedError=true -p:PublishAotUsingRuntimePack=true
dotnet publish -r linux-bionic-x64 -p:DisableUnsupportedError=true -p:PublishAotUsingRuntimePack=true
dotnet publish -r linux-bionic-arm -p:DisableUnsupportedError=true -p:PublishAotUsingRuntimePack=true

# Gradle won't understand if libraries being missing means the build should fail, so check against failure here
if [ ! -f output/linux-bionic-arm64/publish/libGSE.so ] || [ ! -f output/linux-bionic-x64/publish/libGSE.so ]; then
if [ ! -f output/linux-bionic-arm64/publish/libGSE.so ] || [ ! -f output/linux-bionic-x64/publish/libGSE.so ] || [ ! -f output/linux-bionic-arm/publish/libGSE.so ]; then
echo "dotnet publish failed, aborting"
exit 1
fi
Expand Down
53 changes: 41 additions & 12 deletions .ci/linux.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/bin/sh

# This script expects to be running on Debian 11 under root
# (Except for 32-bit ARM, which must be built on Ubuntu 22.04)

# Install some base tools
apt-get install -y wget lsb-release software-properties-common gpg ninja-build pkg-config
Expand All @@ -10,15 +11,17 @@ wget https://apt.llvm.org/llvm.sh -O $HOME/llvm.sh
chmod +x $HOME/llvm.sh
$HOME/llvm.sh 18

# Enable backports packages
echo "deb http://deb.debian.org/debian bullseye-backports main" | tee /etc/apt/sources.list.d/backports.list
apt-get update
if [ $TARGET_RID != "linux-arm" ]; then
# Enable backports packages
echo "deb http://deb.debian.org/debian bullseye-backports main" | tee /etc/apt/sources.list.d/backports.list
apt-get update

# Normally cmake from standard bulleye packages is enough
# However, a bug seems to have been recently introduced in this package causing build failures for linux-x64
# The bug has cmake checks for x86_64-pc-linux-gnu paths instead of x86_64-linux-gnu paths
# bullseye-backports has a newer cmake version which has this bug fixed
apt-get install -y cmake/bullseye-backports
# Normally cmake from standard bulleye packages is enough
# However, a bug seems to have been recently introduced in this package causing build failures for linux-x64
# The bug has cmake checks for x86_64-pc-linux-gnu paths instead of x86_64-linux-gnu paths
# bullseye-backports has a newer cmake version which has this bug fixed
apt-get install -y cmake/bullseye-backports
fi

if [ $TARGET_RID = "linux-x64" ]; then
# Nothing special needed here
Expand All @@ -37,7 +40,7 @@ elif [ $TARGET_RID = "linux-arm64" ]; then
# Install aarch64 cross compiling setup
apt-get install -y gcc-aarch64-linux-gnu g++-aarch64-linux-gnu dpkg-dev
# Setup pkg-config for cross compiling
ln -s /usr/bin/aarch64-linux-gnu-pkg-config /usr/share/pkg-config-crosswrapper
ln -s /usr/share/pkg-config-crosswrapper /usr/bin/aarch64-linux-gnu-pkg-config
chmod +x /usr/bin/aarch64-linux-gnu-pkg-config
export PKG_CONFIG=aarch64-linux-gnu-pkg-config
# cmake cross compiler flags
Expand All @@ -55,8 +58,34 @@ elif [ $TARGET_RID = "linux-arm64" ]; then
apt-get install -y libdecor-0-dev:arm64/bullseye-backports libpipewire-0.3-dev:arm64/bullseye-backports
# Install .NET AOT dependencies
apt-get install -y zlib1g-dev:arm64
elif [ $TARGET_RID = "linux-arm" ]; then
# Install cmake (done here as we aren't using bullseye backports)
apt-get install -y cmake
# Install arm cross compiling setup
apt-get install -y gcc-arm-linux-gnueabihf g++-arm-linux-gnueabihf dpkg-dev
# Setup pkg-config for cross compiling
ln -s /usr/share/pkg-config-crosswrapper /usr/bin/arm-linux-gnueabihf-pkg-config
chmod +x /usr/bin/arm-linux-gnueabihf-pkg-config
export PKG_CONFIG=arm-linux-gnueabihf-pkg-config
# cmake cross compiler flags
export EXTRA_CMAKE_ARGS="-DCMAKE_SYSTEM_NAME=Linux -DCMAKE_SYSTEM_PROCESSOR=arm -DCMAKE_C_FLAGS=--target=arm-linux-gnueabihf -DCMAKE_CXX_FLAGS=--target=arm-linux-gnueabihf"
# Enable ARM packages
echo "deb [arch=armhf] http://ports.ubuntu.com/ubuntu-ports/ jammy main universe" | tee /etc/apt/sources.list.d/armhf.list
echo "deb [arch=armhf] http://ports.ubuntu.com/ubuntu-ports/ jammy-updates main universe" | tee -a /etc/apt/sources.list.d/armhf.list
echo "deb [arch=armhf] http://ports.ubuntu.com/ubuntu-ports/ jammy-security main universe" | tee -a /etc/apt/sources.list.d/armhf.list
sed -i -e 's/deb http/deb [arch=amd64] http/g' /etc/apt/sources.list
dpkg --add-architecture armhf
apt-get update
# Install SDL2 dependencies
apt-get install -y libasound2-dev:armhf libpulse-dev:armhf libaudio-dev:armhf libjack-jackd2-dev:armhf libsamplerate0-dev:armhf \
libx11-dev:armhf libxext-dev:armhf libxrandr-dev:armhf libxcursor-dev:armhf libxfixes-dev:armhf libxi-dev:armhf \
libxss-dev:armhf libwayland-dev:armhf libxkbcommon-dev:armhf libdrm-dev:armhf libgbm-dev:armhf libgl1-mesa-dev:armhf \
libgles2-mesa-dev:armhf libegl1-mesa-dev:armhf libdbus-1-dev:armhf libibus-1.0-dev:armhf \
fcitx-libs-dev:armhf libudev-dev:armhf libusb-1.0-0-dev:armhf libdecor-0-dev:armhf libpipewire-0.3-dev:armhf
# Install .NET AOT dependencies
apt-get install -y zlib1g-dev:armhf
else
echo "TARGET_RID must be linux-x64 or linux-arm64 (got $TARGET_RID)"
echo "TARGET_RID must be linux-x64 or linux-arm64 or linux-arm (got $TARGET_RID)"
exit 1
fi

Expand All @@ -80,10 +109,10 @@ CMakeNinjaBuild gambatte
CMakeNinjaBuild mgba
CMakeNinjaBuild export_helper

# Install dotnet8 sdk
# Install dotnet9 sdk
wget https://dot.net/v1/dotnet-install.sh -O $HOME/dotnet-install.sh
chmod +x $HOME/dotnet-install.sh
$HOME/dotnet-install.sh --channel 8.0
$HOME/dotnet-install.sh --channel 9.0
export PATH=$HOME/.dotnet:$PATH

# Build GSE
Expand Down
2 changes: 2 additions & 0 deletions .ci/windows.bat
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ if "%TARGET_RID%" == "win-x64" (
SET EXTRA_CMAKE_ARGS=
) else if "%TARGET_RID%" == "win-arm64" (
SET EXTRA_CMAKE_ARGS=-DCMAKE_SYSTEM_NAME=Windows -DCMAKE_SYSTEM_PROCESSOR=ARM64 -DCMAKE_C_FLAGS=--target=arm64-pc-windows-msvc -DCMAKE_CXX_FLAGS=--target=arm64-pc-windows-msvc
) else if "%TARGET_RID%" == "win-x86" (
SET EXTRA_CMAKE_ARGS=-DCMAKE_SYSTEM_NAME=Windows -DCMAKE_SYSTEM_PROCESSOR=X86 -DCMAKE_C_FLAGS=--target=i686-pc-windows-msvc -DCMAKE_CXX_FLAGS=--target=i686-pc-windows-msvc
) else (
echo "Invalid TARGET_RID (got %TARGET_RID%)"
EXIT /b 1
Expand Down
12 changes: 12 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,12 @@ jobs:
build_script: .\windows.bat
rid: win-arm64
msvc_arch: x64_arm64
- name: windows-x86
runner: windows-latest
shell: cmd
build_script: .\windows.bat
rid: win-x86
msvc_arch: x64_x86
- name: macos-universal
runner: macos-14
shell: sh
Expand All @@ -42,6 +48,12 @@ jobs:
shell: sh
build_script: ./linux.sh
rid: linux-arm64
- name: linux-arm
runner: ubuntu-latest
container: ubuntu:22.04
shell: sh
build_script: ./linux.sh
rid: linux-arm
- name: android
runner: ubuntu-latest
container: debian:11
Expand Down
6 changes: 3 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,16 @@ git submodule update --init --recursive
Building GSE requires installing C/C++ and C# build tools.
- Windows
- All neccessary build tools can be installed with [VS Community 2022](https://visualstudio.microsoft.com/vs/community) (or any other Visual Studio edition) with the "Desktop development with C++" and ".NET desktop development" workloads.
- It should be possible to manually install the [Windows SDK](https://developer.microsoft.com/en-us/windows/downloads/windows-sdk/), [clang](https://releases.llvm.org/download.html), [CMake](https://cmake.org/download/), [ninja](https://github.com/ninja-build/ninja/releases), and the [dotnet8 SDK](https://dotnet.microsoft.com/en-us/download/dotnet/8.0) in order to build GSE, but this is not recommended.
- It should be possible to manually install the [Windows SDK](https://developer.microsoft.com/en-us/windows/downloads/windows-sdk/), [clang](https://releases.llvm.org/download.html), [CMake](https://cmake.org/download/), [ninja](https://github.com/ninja-build/ninja/releases), and the [dotnet9 SDK](https://dotnet.microsoft.com/en-us/download/dotnet/9.0) in order to build GSE, but this is not recommended.
- macOS
- An XCode install covers C/C++ compilers and will install the macOS SDK.
- CMake and ninja should be installed (`brew install cmake ninja`).
- The [dotnet8 SDK](https://dotnet.microsoft.com/en-us/download/dotnet/8.0) should be installed.
- The [dotnet8 SDK](https://dotnet.microsoft.com/en-us/download/dotnet/8.0) (not dotnet9!) should be installed.
- The macOS dotnet workload must also be installed (`dotnet workload install macos`).
- Linux
- Install gcc/g++ or clang/clang++ with your package manager (syntax varies, should be easy to look up).
- ninja should be installed (should be provided by package manager, typically as `ninja-build`).
- The [dotnet8 SDK](https://dotnet.microsoft.com/en-us/download/dotnet/8.0) is typically provided in package managers, and could be manually installed.
- The [dotnet9 SDK](https://dotnet.microsoft.com/en-us/download/dotnet/9.0) is typically provided in package managers, and could be manually installed.

Helper scripts are included in externals/ which will build all C/C++ libraries (build_all_dev.bat for Windows, build_all_dev.sh for macOS/Linux). If you want to do something custom, standard CMake build commands should work.

Expand Down
52 changes: 52 additions & 0 deletions GSE.sln
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ Global
Release|x64 = Release|x64
Debug|ARM64 = Debug|ARM64
Release|ARM64 = Release|ARM64
Debug|x86 = Debug|x86
Release|x86 = Release|x86
Debug|ARM = Debug|ARM
Release|ARM = Release|ARM
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{F38AAF32-C1FB-41EC-9BCB-F9035F5790AB}.Debug|x64.ActiveCfg = Debug|x64
Expand Down Expand Up @@ -71,6 +75,54 @@ Global
{1C593A7D-00A9-46B3-8C6D-A06761900ED4}.Debug|ARM64.Build.0 = Debug|ARM64
{1C593A7D-00A9-46B3-8C6D-A06761900ED4}.Release|ARM64.ActiveCfg = Release|ARM64
{1C593A7D-00A9-46B3-8C6D-A06761900ED4}.Release|ARM64.Build.0 = Release|ARM64
{F38AAF32-C1FB-41EC-9BCB-F9035F5790AB}.Debug|x86.ActiveCfg = Debug|x86
{F38AAF32-C1FB-41EC-9BCB-F9035F5790AB}.Debug|x86.Build.0 = Debug|x86
{F38AAF32-C1FB-41EC-9BCB-F9035F5790AB}.Release|x86.ActiveCfg = Release|x86
{F38AAF32-C1FB-41EC-9BCB-F9035F5790AB}.Release|x86.Build.0 = Release|x86
{ADE207AB-07A1-47EF-BD96-8534C161E599}.Debug|x86.ActiveCfg = Debug|x86
{ADE207AB-07A1-47EF-BD96-8534C161E599}.Debug|x86.Build.0 = Debug|x86
{ADE207AB-07A1-47EF-BD96-8534C161E599}.Release|x86.ActiveCfg = Release|x86
{ADE207AB-07A1-47EF-BD96-8534C161E599}.Release|x86.Build.0 = Release|x86
{70BD9712-6B40-47FF-BF07-D5F3245A5124}.Debug|x86.ActiveCfg = Debug|x86
{70BD9712-6B40-47FF-BF07-D5F3245A5124}.Debug|x86.Build.0 = Debug|x86
{70BD9712-6B40-47FF-BF07-D5F3245A5124}.Release|x86.ActiveCfg = Release|x86
{70BD9712-6B40-47FF-BF07-D5F3245A5124}.Release|x86.Build.0 = Release|x86
{9177BB41-28A5-4EF6-8102-BDF10D8E14FE}.Debug|x86.ActiveCfg = Debug|x86
{9177BB41-28A5-4EF6-8102-BDF10D8E14FE}.Debug|x86.Build.0 = Debug|x86
{9177BB41-28A5-4EF6-8102-BDF10D8E14FE}.Release|x86.ActiveCfg = Release|x86
{9177BB41-28A5-4EF6-8102-BDF10D8E14FE}.Release|x86.Build.0 = Release|x86
{189655D0-E283-401F-9A12-4B2482F60D63}.Debug|x86.ActiveCfg = Debug|x86
{189655D0-E283-401F-9A12-4B2482F60D63}.Debug|x86.Build.0 = Debug|x86
{189655D0-E283-401F-9A12-4B2482F60D63}.Release|x86.ActiveCfg = Release|x86
{189655D0-E283-401F-9A12-4B2482F60D63}.Release|x86.Build.0 = Release|x86
{1C593A7D-00A9-46B3-8C6D-A06761900ED4}.Debug|x86.ActiveCfg = Debug|x86
{1C593A7D-00A9-46B3-8C6D-A06761900ED4}.Debug|x86.Build.0 = Debug|x86
{1C593A7D-00A9-46B3-8C6D-A06761900ED4}.Release|x86.ActiveCfg = Release|x86
{1C593A7D-00A9-46B3-8C6D-A06761900ED4}.Release|x86.Build.0 = Release|x86
{F38AAF32-C1FB-41EC-9BCB-F9035F5790AB}.Debug|ARM.ActiveCfg = Debug|ARM
{F38AAF32-C1FB-41EC-9BCB-F9035F5790AB}.Debug|ARM.Build.0 = Debug|ARM
{F38AAF32-C1FB-41EC-9BCB-F9035F5790AB}.Release|ARM.ActiveCfg = Release|ARM
{F38AAF32-C1FB-41EC-9BCB-F9035F5790AB}.Release|ARM.Build.0 = Release|ARM
{ADE207AB-07A1-47EF-BD96-8534C161E599}.Debug|ARM.ActiveCfg = Debug|ARM
{ADE207AB-07A1-47EF-BD96-8534C161E599}.Debug|ARM.Build.0 = Debug|ARM
{ADE207AB-07A1-47EF-BD96-8534C161E599}.Release|ARM.ActiveCfg = Release|ARM
{ADE207AB-07A1-47EF-BD96-8534C161E599}.Release|ARM.Build.0 = Release|ARM
{70BD9712-6B40-47FF-BF07-D5F3245A5124}.Debug|ARM.ActiveCfg = Debug|ARM
{70BD9712-6B40-47FF-BF07-D5F3245A5124}.Debug|ARM.Build.0 = Debug|ARM
{70BD9712-6B40-47FF-BF07-D5F3245A5124}.Release|ARM.ActiveCfg = Release|ARM
{70BD9712-6B40-47FF-BF07-D5F3245A5124}.Release|ARM.Build.0 = Release|ARM
{9177BB41-28A5-4EF6-8102-BDF10D8E14FE}.Debug|ARM.ActiveCfg = Debug|ARM
{9177BB41-28A5-4EF6-8102-BDF10D8E14FE}.Debug|ARM.Build.0 = Debug|ARM
{9177BB41-28A5-4EF6-8102-BDF10D8E14FE}.Release|ARM.ActiveCfg = Release|ARM
{9177BB41-28A5-4EF6-8102-BDF10D8E14FE}.Release|ARM.Build.0 = Release|ARM
{189655D0-E283-401F-9A12-4B2482F60D63}.Debug|ARM.ActiveCfg = Debug|ARM
{189655D0-E283-401F-9A12-4B2482F60D63}.Debug|ARM.Build.0 = Debug|ARM
{189655D0-E283-401F-9A12-4B2482F60D63}.Release|ARM.ActiveCfg = Release|ARM
{189655D0-E283-401F-9A12-4B2482F60D63}.Release|ARM.Build.0 = Release|ARM
{1C593A7D-00A9-46B3-8C6D-A06761900ED4}.Debug|ARM.ActiveCfg = Debug|ARM
{1C593A7D-00A9-46B3-8C6D-A06761900ED4}.Debug|ARM.Build.0 = Debug|ARM
{1C593A7D-00A9-46B3-8C6D-A06761900ED4}.Release|ARM.ActiveCfg = Release|ARM
{1C593A7D-00A9-46B3-8C6D-A06761900ED4}.Release|ARM.Build.0 = Release|ARM
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down
2 changes: 2 additions & 0 deletions GSE/GSE.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@
<PropertyGroup Condition="'$(GSE_ANDROID)' == 'true'">
<NDK_SYSROOT_TRIPLE Condition="$(GSE_ARM64) == 'true'">aarch64-linux-android</NDK_SYSROOT_TRIPLE>
<NDK_SYSROOT_TRIPLE Condition="$(GSE_X64) == 'true'">x86_64-linux-android</NDK_SYSROOT_TRIPLE>
<NDK_SYSROOT_TRIPLE Condition="$(GSE_ARM) == 'true'">arm-linux-androideabi</NDK_SYSROOT_TRIPLE>
</PropertyGroup>
<ItemGroup Condition="'$(GSE_ANDROID)' == 'true'">
<Content Include="$(SysRoot)/usr/lib/$(NDK_SYSROOT_TRIPLE)/libc++_shared.so">
Expand All @@ -135,6 +136,7 @@
<PropertyGroup>
<GSE_ANDROID_PROJECT_LIB_DIR Condition="$(GSE_ARM64) == 'true'">$(ProjectDir)../android/app/src/main/libs/arm64-v8a</GSE_ANDROID_PROJECT_LIB_DIR>
<GSE_ANDROID_PROJECT_LIB_DIR Condition="$(GSE_X64) == 'true'">$(ProjectDir)../android/app/src/main/libs/x86_64</GSE_ANDROID_PROJECT_LIB_DIR>
<GSE_ANDROID_PROJECT_LIB_DIR Condition="$(GSE_ARM) == 'true'">$(ProjectDir)../android/app/src/main/libs/armeabi-v7a</GSE_ANDROID_PROJECT_LIB_DIR>
</PropertyGroup>
<ItemGroup>
<GSE_PUBLISH_OUTPUT Include="$(PublishDir)**" />
Expand Down
27 changes: 24 additions & 3 deletions GSECommon.props
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
<Project>
<PropertyGroup>
<!-- We want to use .NET 9 in general due to added platform supported (x86 on Windows, ARM on Linux/Android) -->
<!-- However, we still use .NET 8 on macOS, due to the effective minimum version being bumped from 10.15 to 12 -->
<!-- However, to do this, we need to define .NET 8 as the default, so restore on macOS doesn't try to use .NET 9 -->
<!-- Since restore will not end up hitting the GSE_OSX condition, it will just use the TargetFramework specified here -->
<TargetFramework>net8.0</TargetFramework>
<!-- Don't use C# 13, as we're still using .NET 8.0 on macOS -->
<LangVersion>12.0</LangVersion>
<Platforms>x64;ARM64</Platforms>
<RuntimeIdentifiers Condition="'$(RuntimeIdentifier)' == ''">win-x64;win-arm64;osx-x64;osx-arm64;linux-x64;linux-arm64;linux-bionic-x64;linux-bionic-arm64</RuntimeIdentifiers>
<Platforms>x64;ARM64;x86;ARM</Platforms>
<RuntimeIdentifiers Condition="'$(RuntimeIdentifier)' == ''">win-x64;win-arm64;win-x86;osx-x64;osx-arm64;linux-x64;linux-arm64;linux-arm;linux-bionic-x64;linux-bionic-arm64;linux-bionic-arm</RuntimeIdentifiers>
<AnalysisLevel>8</AnalysisLevel>
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
<Features>strict</Features>
Expand Down Expand Up @@ -42,15 +47,24 @@
<!-- Try to use RID to identify the target architecture -->
<GSE_X64>$(RuntimeIdentifier.ToLowerInvariant().EndsWith('-x64'))</GSE_X64>
<GSE_ARM64>$(RuntimeIdentifier.ToLowerInvariant().EndsWith('-arm64'))</GSE_ARM64>
<GSE_X86>$(RuntimeIdentifier.ToLowerInvariant().EndsWith('-x86'))</GSE_X86>
<GSE_ARM>$(RuntimeIdentifier.ToLowerInvariant().EndsWith('-arm'))</GSE_ARM>
<!-- Use the selected platform otherwise -->
<GSE_X64 Condition="'$(RuntimeIdentifier)' == '' And '$(Platform)' == 'x64'">true</GSE_X64>
<GSE_ARM64 Condition="'$(RuntimeIdentifier)' == '' And '$(Platform)' == 'ARM64'">true</GSE_ARM64>
<GSE_X86 Condition="'$(RuntimeIdentifier)' == '' And '$(Platform)' == 'x86'">true</GSE_X86>
<GSE_ARM Condition="'$(RuntimeIdentifier)' == '' And '$(Platform)' == 'ARM'">true</GSE_ARM>
</PropertyGroup>
<PropertyGroup Condition="'$(GSE_X64)' == 'true' Or '$(GSE_ARM64)' == 'true'">
<PlatformTarget Condition="'$(GSE_X64)' == 'true'">x64</PlatformTarget>
<PlatformTarget Condition="'$(GSE_ARM64)' == 'true'">ARM64</PlatformTarget>
<DefineConstants>$(DefineConstants);GSE_64BIT</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition="'$(GSE_X86)' == 'true' Or '$(GSE_ARM)' == 'true'">
<PlatformTarget Condition="'$(GSE_X86)' == 'true'">x86</PlatformTarget>
<PlatformTarget Condition="'$(GSE_ARM)' == 'true'">ARM</PlatformTarget>
<DefineConstants>$(DefineConstants);GSE_32BIT</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition="'$(GSE_PUBLISH)' == 'true'">
<DebugSymbols>False</DebugSymbols>
<DebugType>None</DebugType>
Expand All @@ -62,8 +76,9 @@
<GSE_LIB_EXT Condition="'$(GSE_PUBLISH)' != 'true'">.dll</GSE_LIB_EXT>
<GSE_RID Condition="'$(GSE_X64)' == 'true'">win-x64</GSE_RID>
<GSE_RID Condition="'$(GSE_ARM64)' == 'true'">win-arm64</GSE_RID>
<GSE_RID Condition="'$(GSE_X86)' == 'true'">win-x86</GSE_RID>
<!-- We support as far back as Windows 7 SP1 -->
<TargetFramework>net8.0-windows</TargetFramework>
<TargetFramework>net9.0-windows</TargetFramework>
<SupportedOSPlatformVersion>6.1.7601</SupportedOSPlatformVersion>
<DefineConstants>$(DefineConstants);GSE_WINDOWS</DefineConstants>
</PropertyGroup>
Expand All @@ -73,6 +88,8 @@
<GSE_LIB_EXT Condition="'$(GSE_PUBLISH)' != 'true'">.dylib</GSE_LIB_EXT>
<GSE_RID Condition="'$(GSE_X64)' == 'true'">osx-x64</GSE_RID>
<GSE_RID Condition="'$(GSE_ARM64)' == 'true'">osx-arm64</GSE_RID>
<!-- We hold back on .NET 9 for macOS, as it bumps the minimum macOS version from 10.15 to 12 -->
<TargetFramework>net8.0</TargetFramework>
<DefineConstants>$(DefineConstants);GSE_OSX</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition="'$(GSE_LINUX)' == 'true'">
Expand All @@ -81,6 +98,8 @@
<GSE_LIB_EXT Condition="'$(GSE_PUBLISH)' != 'true'">.so</GSE_LIB_EXT>
<GSE_RID Condition="'$(GSE_X64)' == 'true'">linux-x64</GSE_RID>
<GSE_RID Condition="'$(GSE_ARM64)' == 'true'">linux-arm64</GSE_RID>
<GSE_RID Condition="'$(GSE_ARM)' == 'true'">linux-arm</GSE_RID>
<TargetFramework>net9.0</TargetFramework>
<DefineConstants>$(DefineConstants);GSE_LINUX</DefineConstants>
</PropertyGroup>
<!-- We must be publishing for Android -->
Expand All @@ -89,6 +108,8 @@
<GSE_LIB_EXT>.so</GSE_LIB_EXT>
<GSE_RID Condition="'$(GSE_X64)' == 'true'">linux-bionic-x64</GSE_RID>
<GSE_RID Condition="'$(GSE_ARM64)' == 'true'">linux-bionic-arm64</GSE_RID>
<GSE_RID Condition="'$(GSE_ARM)' == 'true'">linux-bionic-arm</GSE_RID>
<TargetFramework>net9.0</TargetFramework>
<DefineConstants>$(DefineConstants);GSE_ANDROID</DefineConstants>
</PropertyGroup>
<!-- https://github.com/dotnet/runtime/issues/92272 -->
Expand Down
Loading

0 comments on commit 6a60e75

Please sign in to comment.