diff --git a/.gitignore b/.gitignore index 5a9a38a3..54695741 100644 --- a/.gitignore +++ b/.gitignore @@ -33,8 +33,13 @@ # Build folders build/ +cmake-build-*/ # Cache/IDE folders .cache/ .vscode/ .idea/ +.vs/ + +# System files +.DS_Store \ No newline at end of file diff --git a/CMakeLists.txt b/CMakeLists.txt index a797fd96..44e611e0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -13,7 +13,7 @@ endmacro() csfml_set_option(CMAKE_BUILD_TYPE Release STRING "Choose the type of build (Debug or Release)") # project name -project(CSFML VERSION 2.5.1) +project(CSFML VERSION 2.5.2) # include the configuration file include(${PROJECT_SOURCE_DIR}/cmake/Config.cmake) diff --git a/include/SFML/Config.h b/include/SFML/Config.h index 1d20608a..04261f42 100644 --- a/include/SFML/Config.h +++ b/include/SFML/Config.h @@ -31,7 +31,7 @@ //////////////////////////////////////////////////////////// #define CSFML_VERSION_MAJOR 2 #define CSFML_VERSION_MINOR 5 -#define CSFML_VERSION_PATCH 1 +#define CSFML_VERSION_PATCH 2 //////////////////////////////////////////////////////////// diff --git a/tools/nuget/CSFML/CSFML.csproj b/tools/nuget/CSFML/CSFML.csproj index ee8e9be1..ec8ce036 100644 --- a/tools/nuget/CSFML/CSFML.csproj +++ b/tools/nuget/CSFML/CSFML.csproj @@ -1,13 +1,10 @@ - + - netstandard1.0 + netstandard2.0 true - - true - - 2.5.1 + 2.5.2 Laurent Gomila sfml csfml Copyright © Laurent Gomila @@ -22,10 +19,7 @@ - - - - + diff --git a/tools/nuget/CSFML/build/netframework/CSFML.props b/tools/nuget/CSFML/build/netframework/CSFML.props index e68c9d4d..a0d3340d 100644 --- a/tools/nuget/CSFML/build/netframework/CSFML.props +++ b/tools/nuget/CSFML/build/netframework/CSFML.props @@ -1,5 +1,5 @@ - + false diff --git a/tools/nuget/CSFML/build/netframework/CSFML.targets b/tools/nuget/CSFML/build/netframework/CSFML.targets index 28f26a40..58e8b130 100644 --- a/tools/nuget/CSFML/build/netframework/CSFML.targets +++ b/tools/nuget/CSFML/build/netframework/CSFML.targets @@ -1,5 +1,5 @@ - + diff --git a/tools/nuget/README.md b/tools/nuget/README.md index 783e4cfd..8e8a5b0c 100644 --- a/tools/nuget/README.md +++ b/tools/nuget/README.md @@ -19,17 +19,22 @@ All build scripts follow the same routine: This generic script doesn't install any of its dependencies. As such, you must have cmake and make installed, as well as all [SFML Dependencies](https://www.sfml-dev.org/tutorials/2.5/compile-with-cmake.php#installing-dependencies) available to cmake. * `build.macos.sh` - * A [Bash](https://www.gnu.org/software/bash/) script to build libraries for macOS. The [Runtime Identifier](https://docs.microsoft.com/en-us/dotnet/core/rid-catalog#macos-rids) of the macOS distribution must be specified as parameter to the script. + * A [Bash](https://www.gnu.org/software/bash/) script to build libraries for macOS. The [Runtime Identifier](https://docs.microsoft.com/en-us/dotnet/core/rid-catalog#macos-rids) of the macOS distribution must be specified as parameter to the script. Latest macOS SDKs can be downloaded [here](https://github.com/phracker/MacOSX-SDKs/releases). Currently supported RIDs are: - * osx.10.15-x64 - * osx.11.0-x64 - * osx.11.0-arm64 (requires SFML 2.6) + * `osx-x64` (uses macOS SDK 10.12) + * `osx.11.0-x64` + * `osx.11.0-arm64` (requires SFML 2.6) * `build.docker.sh`, `build.docker.ps1` * A script to build the native libraries for a Linux distribution in a Docker container. If no RID is specified as a parameter, all supported RIDs will be built. Currently, the supported RIDs are: - * `alpine-x64` + * `linux-x64` (uses Ubuntu) + * `linux-musl-x64` (uses Apline) + * `linux-arm` (uses Arm32v7 Ubuntu) + * `linux-arm64` (uses Arm64v8 Ubuntu ) + * `alpine-x64` * `debian-x64` (compatible with derivatives such as Ubuntu and Linux Mint) - * `fedora-x64` + * `ubuntu-x64` + * `fedora-x64` * `pushnuget.ps1`, `pushnuget.sh` * A script to automatically build and push the NuGet package to nuget.org. Make sure that all the native libraries are in `CSFML/runtimes/` before running this. diff --git a/tools/nuget/build.docker.ps1 b/tools/nuget/build.docker.ps1 index d216506e..403fe411 100644 --- a/tools/nuget/build.docker.ps1 +++ b/tools/nuget/build.docker.ps1 @@ -6,10 +6,11 @@ Param( $ErrorActionPreference = "Stop" if (-not $RID ) { - Write-Output "No RID specified, building all known RIDs" - ./build.docker.ps1 "alpine-x64" - ./build.docker.ps1 "debian-x64" - ./build.docker.ps1 "fedora-x64" + Write-Output "No RID specified, building all common RIDs" + ./build.docker.ps1 "linux-x64" + ./build.docker.ps1 "linux-musl-x64" + ./build.docker.ps1 "linux-arm" + ./build.docker.ps1 "linux-arm64" exit } @@ -18,15 +19,35 @@ $Shell = $null switch ($RID) { 'alpine-x64' { - $Image = 'alpine' + $Image = 'alpine:3.7' $Shell = '/bin/sh' } 'debian-x64' { - $Image = 'debian' + $Image = 'debian:bullseye' + $Shell = '/bin/bash' + } + 'ubuntu-x64' { + $Image = 'ubuntu:22.04' $Shell = '/bin/bash' } 'fedora-x64' { - $Image = 'fedora' + $Image = 'fedora:37' + $Shell = '/bin/bash' + } + 'linux-x64' { + $Image = 'ubuntu:22.04' + $Shell = '/bin/bash' + } + 'linux-musl-x64' { + $Image = 'alpine:3.15' + $Shell = '/bin/sh' + } + 'linux-arm' { + $Image = 'arm32v7/ubuntu:22.04' + $Shell = '/bin/bash' + } + 'linux-arm64' { + $Image = 'arm64v8/ubuntu:22.04' $Shell = '/bin/bash' } Default { diff --git a/tools/nuget/build.macos.sh b/tools/nuget/build.macos.sh old mode 100644 new mode 100755 index 2be82bf5..2c7f77fd --- a/tools/nuget/build.macos.sh +++ b/tools/nuget/build.macos.sh @@ -1,183 +1,230 @@ -#!/bin/bash - -# Automatically exit on error -set -e - -# ========================= # -# PRELUDE: A note on rpaths # -# ========================= # - -# Unlike Windows, macOS doesn't search the current directory by default when searching for shared libraries (.dylib) -# It only searches the system default directories (usually /lib and /usr/lib) and the paths in LD_LIBRARY_PATH - -# The .NET Runtime will find the CSFML library in its NuGet packages just fine, but that library will then request -# the OS for libsfml-(module).dylib, and the .NET Runtime will have no say in how that SFML library is found. - -# Without SFML installed globally on the system, this will fail, causing the loading of CSFML to fail, causing the -# .NET Runtime to think the CSFML library doesn't exist or is invalid. - -# And so, we need to set the rpath of the CSFML library. -# The rpath is a special value embedded straight into a library that specifies to the OS a list of folders where -# other libraries that it references may be found. -# $ORIGIN, a kind-of environment variable, can be used in rpath to point to the folder where the library currently is. -# To let the OS know that we intend to use $ORIGIN, we need to add the ORIGIN flag to our ELF with the -z origin -# gcc linker option - -# Since CSFML and SFML will always be deployed on the same folder by NuGet, we just need to add an rpath to CSFML -# that points to $ORIGIN, causing the OS to search the current folder for SFML, without interference from .NET - -# We also add the same rpath to SFML itself for future-proofing, in case we ever decide to ship some Linux SFML -# dependencies on the Native package. - -# You may need to `brew install coreutils` first for grealpath -# See supported RID at https://docs.microsoft.com/en-us/dotnet/core/rid-catalog - -# =================================================== # -# STEP 1: Setup all variables needed during the build # -# =================================================== # - -if [[ -z "$1" ]]; then - echo "Please specify the platform Runtime Identifier as an argument to this script" - exit 1 -fi - -echo "Please note that all SFML dependencies must be installed and available to cmake. SFML does not ship with its linux dependencies." - -RID="$1" - -SFMLBranch="2.5.x" # The branch or tag of the SFML repository to be cloned -CSFMLDir="$(grealpath "$(git rev-parse --show-toplevel)")" # The directory of the source code of CSFML - -OutDir="./CSFML/runtimes/$RID/native" # The base directory of all CSFML modules, used to copy the final libraries -mkdir -p "$OutDir" -OutDir="$(grealpath "$OutDir")" - -echo "Building $RID" - -mkdir -p "Build" -pushd "Build" - -# ================== # -# STEP 2: Clone SFML # -# ================== # - -if [[ ! -d "SFML/.git" ]]; then - echo "Cloning SFML" - rm -rf "SFML" - git clone --branch "$SFMLBranch" --depth 1 "https://github.com/SFML/SFML.git" "SFML" -fi - -SFMLDir="$(grealpath SFML)" - -# ================== # -# STEP 3: Build SFML # -# ================== # - -rm -rf "$RID" -mkdir -p "$RID" -pushd "$RID" - -echo "Building SFML" -mkdir -p SFML -pushd SFML - -SFMLBuiltDir="$(grealpath .)" # The directory where SFML was built to. Used later to direct cmake when building CSFML - -mkdir -p lib -# The directory that contains the final SFML libraries -# Since linux libraries don't support static linking from a shared library, this is used to copy the -# SFML shared libraries together with the CSFML shared libraries into SFML.Net -SFMLLibDir="$(grealpath lib)" - -if [ $RID == "osx.10.15-x64" ]; then - ARCHITECTURE="x86_64" - TARGET="10.15" - SYSROOT="/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/" -elif [ $RID == "osx.11.0-x64" ]; then - ARCHITECTURE="x86_64" - TARGET="11.0" - SYSROOT="/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/" -elif [ $RID == "osx.11.0-arm64" ]; then - ARCHITECTURE="arm64" - TARGET="11.0" - SYSROOT="/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/" - - echo "Note: arm64 is only supported with SFML 2.6" -else - echo "Unsupported RID provided. Use 'osx.10.15-x64', 'osx.11.0-x64' or 'osx.11.0-arm64'" - exit 1 -fi - -cmake -E env \ - cmake -G "Unix Makefiles" \ - -D 'BUILD_SHARED_LIBS=ON' \ - -D 'CMAKE_BUILD_TYPE=Release' \ - -D "CMAKE_OSX_ARCHITECTURES=$ARCHITECTURE" \ - -D "CMAKE_OSX_DEPLOYMENT_TARGET=$TARGET" \ - -D "CMAKE_OSX_SYSROOT=$SYSROOT" \ - -D "CMAKE_LIBRARY_OUTPUT_DIRECTORY=$SFMLLibDir" \ - -D 'CMAKE_BUILD_WITH_INSTALL_RPATH=ON' \ - -D 'CMAKE_INSTALL_RPATH=@executable_path' \ - "$SFMLDir" - -cmake --build . --config Release - -popd # Pop SFML - -# =================== # -# STEP 4: Build CSFML # -# =================== # - -echo "Building CSFML using SFML at $SFMLBuiltDir" -mkdir -p CSFML -pushd CSFML - -mkdir -p lib -CSFMLLibDir="$(realpath lib)" # The directory that contains the final CSFML libraries. Used to copy the result into SFML.Net - -cmake -E env \ - cmake -G "Unix Makefiles" \ - -D "SFML_DIR=$SFMLBuiltDir" \ - -D 'BUILD_SHARED_LIBS=ON' \ - -D 'CMAKE_BUILD_TYPE=Release' \ - -D "CMAKE_OSX_ARCHITECTURES=$ARCHITECTURE" \ - -D "CMAKE_OSX_DEPLOYMENT_TARGET=$TARGET" \ - -D "CMAKE_OSX_SYSROOT=$SYSROOT" \ - -D "CMAKE_LIBRARY_OUTPUT_DIRECTORY=$CSFMLLibDir" \ - -D 'CMAKE_BUILD_WITH_INSTALL_RPATH=ON' \ - -D 'CMAKE_INSTALL_RPATH=@executable_path' \ - "$CSFMLDir" -cmake --build . --config Release - -# ======================================== # -# STEP 5: Copy result to the NuGet folders # -# ======================================== # - -# Copies one SFML and CSFML module into the NuGet package -# The module name must be passed to this function as an argument, in lowercase -# This function then copies $SFMLLibDir/libsfml-(module).so and -# $CSFMLLibDir/libcsfml-(module).so into $OutDir -copymodule() -{ - MODULE="$1" - - mkdir -p "$OutDir" - - # Note the wildcard at the end of the first argument - # We are copying every versioned file here, not just the .dylib - # (libsfml-audio.dylib, libsfml-audio.2.dylib, libsfml-audio.2.5.dylib, etc) - # This is needed because of the way macOS searches for libraries based - # one their SONAME - cp "$SFMLLibDir/libsfml-$MODULE."* "$OutDir" - - cp "$CSFMLLibDir/libcsfml-$MODULE."* "$OutDir" -} - -copymodule audio -copymodule graphics -copymodule system -copymodule window - -popd # Pop CSFML -popd # Pop $RID -popd # Pop Build +#!/bin/bash + +# Automatically exit on error +set -e +set -x + +# ========================= # +# PRELUDE: A note on rpaths # +# ========================= # + +# Unlike Windows, macOS doesn't search the current directory by default when searching for shared libraries (.dylib) +# It only searches the system default directories (usually /lib and /usr/lib) and the paths in LD_LIBRARY_PATH + +# The .NET Runtime will find the CSFML library in its NuGet packages just fine, but that library will then request +# the OS for libsfml-(module).dylib, and the .NET Runtime will have no say in how that SFML library is found. + +# Without SFML installed globally on the system, this will fail, causing the loading of CSFML to fail, causing the +# .NET Runtime to think the CSFML library doesn't exist or is invalid. + +# And so, we need to set the rpath of the CSFML library. +# The rpath is a special value embedded straight into a library that specifies to the OS a list of folders where +# other libraries that it references may be found. +# $ORIGIN, a kind-of environment variable, can be used in rpath to point to the folder where the library currently is. +# To let the OS know that we intend to use $ORIGIN, we need to add the ORIGIN flag to our ELF with the -z origin +# gcc linker option + +# Since CSFML and SFML will always be deployed on the same folder by NuGet, we just need to add an rpath to CSFML +# that points to $ORIGIN, causing the OS to search the current folder for SFML, without interference from .NET + +# We also add the same rpath to SFML itself for future-proofing, in case we ever decide to ship some Linux SFML +# dependencies on the Native package. + +# You may need to `brew install coreutils` first for grealpath +# See supported RID at https://docs.microsoft.com/en-us/dotnet/core/rid-catalog + +# =================================================== # +# STEP 1: Setup all variables needed during the build # +# =================================================== # + +if [[ -z "$1" ]]; then + echo "Please specify the platform Runtime Identifier as an argument to this script" + exit 1 +fi + +echo "Please note that all SFML dependencies must be installed and available to cmake. SFML does not ship with its linux dependencies." + +RID="$1" + +SFMLBranch="2.5.x" # The branch or tag of the SFML repository to be cloned +CSFMLDir="$(grealpath "$(git rev-parse --show-toplevel)")" # The directory of the source code of CSFML + +OutDir="./CSFML/runtimes/$RID/native" # The base directory of all CSFML modules, used to copy the final libraries +mkdir -p "$OutDir" +OutDir="$(grealpath "$OutDir")" + +echo "Building $RID" + +mkdir -p "Build" +pushd "Build" + +# ================== # +# STEP 2: Clone SFML # +# ================== # + +if [[ ! -d "SFML/.git" ]]; then + echo "Cloning SFML" + rm -rf "SFML" + git clone --branch "$SFMLBranch" --depth 1 "https://github.com/SFML/SFML.git" "SFML" +fi + +SFMLDir="$(grealpath SFML)" + +# ================== # +# STEP 3: Build SFML # +# ================== # + +rm -rf "$RID" +mkdir -p "$RID" +pushd "$RID" + +echo "Building SFML" +mkdir -p SFML +pushd SFML + +SFMLBuiltDir="$(grealpath .)" # The directory where SFML was built to. Used later to direct cmake when building CSFML + +mkdir -p lib +# The directory that contains the final SFML libraries +# Since linux libraries don't support static linking from a shared library, this is used to copy the +# SFML shared libraries together with the CSFML shared libraries into SFML.Net +SFMLLibDir="$(grealpath lib)" + +if [ $RID == "osx-x64" ]; then + ARCHITECTURE="x86_64" + TARGET="10.12" + SYSROOT="/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/" +elif [ $RID == "osx.11.0-x64" ]; then + ARCHITECTURE="x86_64" + TARGET="11.0" + SYSROOT="/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.0.sdk/" +elif [ $RID == "osx.11.0-arm64" ]; then + ARCHITECTURE="arm64" + TARGET="11.0" + SYSROOT="/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.0.sdk/" + + echo "Note: arm64 is only supported with SFML 2.6" +else + echo "Unsupported RID provided. Use 'osx.10.15-x64', 'osx.11.0-x64' or 'osx.11.0-arm64'" + exit 1 +fi + +cmake -E env \ + cmake -G "Unix Makefiles" \ + -D 'BUILD_SHARED_LIBS=ON' \ + -D 'SFML_BUILD_FRAMEWORKS=OFF' \ + -D 'CMAKE_BUILD_TYPE=Release' \ + -D "CMAKE_OSX_ARCHITECTURES=$ARCHITECTURE" \ + -D "CMAKE_OSX_DEPLOYMENT_TARGET=$TARGET" \ + -D "CMAKE_OSX_SYSROOT=$SYSROOT" \ + -D "CMAKE_LIBRARY_OUTPUT_DIRECTORY=$SFMLLibDir" \ + -D 'CMAKE_BUILD_WITH_INSTALL_RPATH=ON' \ + -D 'CMAKE_INSTALL_RPATH=@loader_path' \ + -D "CMAKE_INSTALL_PREFIX=$SFMLLibDir" \ + -D "SFML_DEPENDENCIES_INSTALL_PREFIX=$SFMLLibDir" \ + -D "SFML_MISC_INSTALL_PREFIX=$SFMLLibDir" \ + "$SFMLDir" + +cmake --build . --config Release --target install + +popd # Pop SFML + +# =================== # +# STEP 4: Build CSFML # +# =================== # + +echo "Building CSFML using SFML at $SFMLBuiltDir" +mkdir -p CSFML +pushd CSFML + +mkdir -p lib +CSFMLLibDir="$(realpath lib)" # The directory that contains the final CSFML libraries. Used to copy the result into SFML.Net + +cmake -E env \ + cmake -G "Unix Makefiles" \ + -D "SFML_DIR=$SFMLBuiltDir" \ + -D 'BUILD_SHARED_LIBS=ON' \ + -D 'CMAKE_BUILD_TYPE=Release' \ + -D "CMAKE_OSX_ARCHITECTURES=$ARCHITECTURE" \ + -D "CMAKE_OSX_DEPLOYMENT_TARGET=$TARGET" \ + -D "CMAKE_OSX_SYSROOT=$SYSROOT" \ + -D "CMAKE_LIBRARY_OUTPUT_DIRECTORY=$CSFMLLibDir" \ + -D 'CMAKE_BUILD_WITH_INSTALL_RPATH=ON' \ + -D 'CMAKE_INSTALL_RPATH=@loader_path' \ + -D "CMAKE_INSTALL_PREFIX=$CSFMLLibDir" \ + -D "INSTALL_MISC_DIR=$CSFMLLibDir" \ + "$CSFMLDir" +cmake --build . --config Release --target install + +# ============================ # +# STEP 5: Fix RPATH references # +# ============================ # + +SFMLMajorMinor="2.5" +SFMLMajorMinorPatch="$SFMLMajorMinor.1" + +# SFML's framework dependencies will always reference @rpath/../Frameworks/ +# Which is not where we place the frameworks and where SFML should look for them +# This this fixes the dependency with install_name_tool +fixrpath() +{ + MODULE="$1" + OLD="$2" + NEW="$3" + + install_name_tool -change $OLD $NEW "$SFMLLibDir/libsfml-$MODULE.dylib" + install_name_tool -change $OLD $NEW "$SFMLLibDir/libsfml-$MODULE.$SFMLMajorMinor.dylib" + install_name_tool -change $OLD $NEW "$SFMLLibDir/libsfml-$MODULE.$SFMLMajorMinorPatch.dylib" +} + +fixrpath audio "@rpath/../Frameworks/OpenAL.framework/Versions/A/OpenAL" "@rpath/OpenAL.framework/Versions/A/OpenAL" +fixrpath audio "@rpath/../Frameworks/vorbisenc.framework/Versions/A/vorbisenc" "@rpath/vorbisenc.framework/Versions/A/vorbisen" +fixrpath audio "@rpath/../Frameworks/vorbisfile.framework/Versions/A/vorbisfile" "@rpath/vorbisfile.framework/Versions/A/vorbisfile" +fixrpath audio "@rpath/../Frameworks/vorbis.framework/Versions/A/vorbis" "@rpath/vorbis.framework/Versions/A/vorbis" +fixrpath audio "@rpath/../Frameworks/ogg.framework/Versions/A/ogg" "@rpath/ogg.framework/Versions/A/ogg" +fixrpath audio "@rpath/../Frameworks/FLAC.framework/Versions/A/FLAC" "@rpath/FLAC.framework/Versions/A/FLAC" + +fixrpath graphics "@rpath/../Frameworks/freetype.framework/Versions/A/freetype" "@rpath/freetype.framework/Versions/A/freetype" + +# ======================================== # +# STEP 6: Copy result to the NuGet folders # +# ======================================== # + +CSFMLMajorMinor="2.5" +CSFMLMajorMinorPatch="$CSFMLMajorMinor.2" + +# Copies one SFML and CSFML module into the NuGet package +# The module name must be passed to this function as an argument, in lowercase +# This function then copies $SFMLLibDir/libsfml-(module).so and +# $CSFMLLibDir/libcsfml-(module).so into $OutDir +copymodule() +{ + MODULE="$1" + + mkdir -p "$OutDir" + + # Note the wildcard at the end of the first argument + # We are copying every versioned file here, not just the .dylib + # (libsfml-audio.dylib, libsfml-audio.2.dylib, libsfml-audio.2.5.dylib, etc) + # This is needed because of the way macOS searches for libraries based + # one their SONAME + cp "$SFMLLibDir/libsfml-$MODULE."* "$OutDir" + + cp "$CSFMLLibDir/libcsfml-$MODULE."* "$OutDir" + + # Fix naming for expected filename + mv "$OutDir/libcsfml-$MODULE.dylib" "$OutDir/libcsfml-$MODULE" + mv "$OutDir/libcsfml-$MODULE.$CSFMLMajorMinor.dylib" "$OutDir/libcsfml-$MODULE.$CSFMLMajorMinor" + mv "$OutDir/libcsfml-$MODULE.$CSFMLMajorMinorPatch.dylib" "$OutDir/libcsfml-$MODULE.$CSFMLMajorMinorPatch" +} + +copymodule audio +copymodule graphics +copymodule system +copymodule window + +cp -R "$SFMLLibDir/"*.framework "$OutDir" + +popd # Pop CSFML +popd # Pop $RID +popd # Pop Build diff --git a/tools/nuget/docker.alpine-x64.sh b/tools/nuget/docker.alpine-x64.sh index a120b300..7d7d5d4b 100755 --- a/tools/nuget/docker.alpine-x64.sh +++ b/tools/nuget/docker.alpine-x64.sh @@ -10,6 +10,7 @@ apk add \ freetype-dev \ libx11-dev \ libxrandr-dev \ + libxcursor-dev \ eudev-dev \ mesa-dev \ flac-dev \ diff --git a/tools/nuget/docker.debian-x64.sh b/tools/nuget/docker.debian-x64.sh index 95ddcbf1..76eef842 100755 --- a/tools/nuget/docker.debian-x64.sh +++ b/tools/nuget/docker.debian-x64.sh @@ -10,15 +10,12 @@ apt-get install -y \ libfreetype6-dev \ xorg-dev \ libxrandr-dev \ + libxcursor-dev \ libudev-dev \ libgl1-mesa-dev \ libflac-dev \ libogg-dev \ libvorbis-dev \ - libvorbisenc2 \ - libvorbisfile3 \ - libopenal-dev \ - libpthread-stubs0-dev \ cmake \ g++ diff --git a/tools/nuget/docker.fedora-x64.sh b/tools/nuget/docker.fedora-x64.sh index e72af3c7..cac48d52 100755 --- a/tools/nuget/docker.fedora-x64.sh +++ b/tools/nuget/docker.fedora-x64.sh @@ -8,6 +8,7 @@ dnf install -y \ freetype-devel \ xorg-x11-server-devel \ libXrandr-devel \ + libXcursor-devel \ systemd-devel \ mesa-libEGL-devel \ flac-devel \ diff --git a/tools/nuget/docker.linux-arm.sh b/tools/nuget/docker.linux-arm.sh new file mode 100644 index 00000000..e76d5c73 --- /dev/null +++ b/tools/nuget/docker.linux-arm.sh @@ -0,0 +1,23 @@ +#!/bin/bash + +# Automatically exit on error +set -e + +apt-get update + +apt-get install -y \ + git \ + libfreetype6-dev \ + xorg-dev \ + libxrandr-dev \ + libxcursor-dev \ + libudev-dev \ + libgl1-mesa-dev \ + libflac-dev \ + libogg-dev \ + libvorbis-dev \ + libopenal-dev \ + cmake \ + g++ + +./build.linux.sh linux-arm diff --git a/tools/nuget/docker.linux-arm64.sh b/tools/nuget/docker.linux-arm64.sh new file mode 100644 index 00000000..59d5c317 --- /dev/null +++ b/tools/nuget/docker.linux-arm64.sh @@ -0,0 +1,23 @@ +#!/bin/bash + +# Automatically exit on error +set -e + +apt-get update + +apt-get install -y \ + git \ + libfreetype6-dev \ + xorg-dev \ + libxrandr-dev \ + libxcursor-dev \ + libudev-dev \ + libgl1-mesa-dev \ + libflac-dev \ + libogg-dev \ + libvorbis-dev \ + libopenal-dev \ + cmake \ + g++ + +./build.linux.sh linux-arm64 diff --git a/tools/nuget/docker.linux-musl-x64.sh b/tools/nuget/docker.linux-musl-x64.sh new file mode 100644 index 00000000..6dbfb1ae --- /dev/null +++ b/tools/nuget/docker.linux-musl-x64.sh @@ -0,0 +1,25 @@ +#!/bin/sh +# Alpine Linux doesn't come with bash by default, so we need to bootstrap everything with sh + +# Automatically exit on error +set -e + +apk add \ + bash \ + git \ + freetype-dev \ + libx11-dev \ + libxrandr-dev \ + libxcursor-dev \ + eudev-dev \ + mesa-dev \ + flac-dev \ + libogg-dev \ + libvorbis-dev \ + openal-soft-dev \ + libpthread-stubs \ + cmake \ + make \ + g++ + +./build.linux.sh linux-musl-x64 diff --git a/tools/nuget/docker.linux-x64.sh b/tools/nuget/docker.linux-x64.sh new file mode 100644 index 00000000..c27a2513 --- /dev/null +++ b/tools/nuget/docker.linux-x64.sh @@ -0,0 +1,23 @@ +#!/bin/bash + +# Automatically exit on error +set -e + +apt-get update + +apt-get install -y \ + git \ + libfreetype6-dev \ + xorg-dev \ + libxrandr-dev \ + libxcursor-dev \ + libudev-dev \ + libgl1-mesa-dev \ + libflac-dev \ + libogg-dev \ + libvorbis-dev \ + libopenal-dev \ + cmake \ + g++ + +./build.linux.sh linux-x64 diff --git a/tools/nuget/docker.ubuntu-x64.sh b/tools/nuget/docker.ubuntu-x64.sh new file mode 100644 index 00000000..dc4e4c46 --- /dev/null +++ b/tools/nuget/docker.ubuntu-x64.sh @@ -0,0 +1,23 @@ +#!/bin/bash + +# Automatically exit on error +set -e + +apt-get update + +apt-get install -y \ + git \ + libfreetype6-dev \ + xorg-dev \ + libxrandr-dev \ + libxcursor-dev \ + libudev-dev \ + libgl1-mesa-dev \ + libflac-dev \ + libogg-dev \ + libvorbis-dev \ + libopenal-dev \ + cmake \ + g++ + +./build.linux.sh ubuntu-x64 diff --git a/tools/nuget/pushnuget.ps1 b/tools/nuget/pushnuget.ps1 index ce674cc3..e06706be 100644 --- a/tools/nuget/pushnuget.ps1 +++ b/tools/nuget/pushnuget.ps1 @@ -3,7 +3,7 @@ Param( [string]$APIKey ) -dotnet build -c Release +dotnet pack -c Release if ($LASTEXITCODE -ne 0) { Write-Error "Build failed" exit 1