mirror of
https://github.com/SFML/CSFML.git
synced 2026-10-27 13:36:12 +01:00
Merge branch '2.6.x' into feature/backmerge
This commit is contained in:
commit
315c207797
17 files changed
+1198
-358
No files matched your search
@@ -4,7 +4,7 @@
|
||||
<TargetFramework>netstandard2.0</TargetFramework>
|
||||
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
|
||||
|
||||
<Version>2.6.0</Version>
|
||||
<Version>3.0.0</Version>
|
||||
<Authors>Laurent Gomila</Authors>
|
||||
<PackageTags>sfml csfml</PackageTags>
|
||||
<Copyright>Copyright © Laurent Gomila</Copyright>
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="16.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<CSFMLIgnoreAnyCPU>true</CSFMLIgnoreAnyCPU>
|
||||
<!-- Silence warning about the fedora-x64 libraries -->
|
||||
<NoWarn>NETSDK1206</NoWarn>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
@@ -5,9 +5,10 @@ set -e
|
||||
|
||||
if [[ -z "$1" ]]; then
|
||||
echo 'No Runtime Identifier specified, running all known RIDs'
|
||||
./build.docker.sh "alpine-x64"
|
||||
./build.docker.sh "debian-x64"
|
||||
./build.docker.sh "fedora-x64"
|
||||
./build.docker.sh "linux-x64"
|
||||
./build.docker.sh "linux-musl-x64"
|
||||
./build.docker.sh "linux-arm"
|
||||
./build.docker.sh "linux-arm64"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
@@ -30,6 +31,26 @@ case "$RID" in
|
||||
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'
|
||||
;;
|
||||
|
||||
*)
|
||||
echo "Unknown Runtime Identifier $RID"
|
||||
exit 1
|
||||
|
||||
@@ -42,8 +42,8 @@ echo "Please note that all SFML dependencies must be installed and available to
|
||||
|
||||
RID="$1"
|
||||
|
||||
SFMLBranch="2.6.1" # The branch or tag of the SFML repository to be cloned
|
||||
CSFMLDir="$(realpath "$(git rev-parse --show-toplevel)")" # The directory of the source code of CSFML
|
||||
SFMLBranch="master" # The branch or tag of the SFML repository to be cloned
|
||||
CSFMLDir="$(realpath ../../)" # 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"
|
||||
@@ -93,6 +93,7 @@ cmake -E env LDFLAGS="-z origin" \
|
||||
"-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=$SFMLLibDir" \
|
||||
'-DCMAKE_BUILD_WITH_INSTALL_RPATH=1' \
|
||||
'-DCMAKE_INSTALL_RPATH=$ORIGIN' \
|
||||
'-DSFML_BUILD_NETWORK=0' \
|
||||
"$SFMLDir"
|
||||
|
||||
cmake --build . --config Release
|
||||
@@ -118,6 +119,7 @@ cmake -E env LDFLAGS="-z origin" \
|
||||
"-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=$CSFMLLibDir" \
|
||||
'-DCMAKE_BUILD_WITH_INSTALL_RPATH=1' \
|
||||
'-DCMAKE_INSTALL_RPATH=$ORIGIN' \
|
||||
'-DCSFML_BUILD_NETWORK=0' \
|
||||
"$CSFMLDir"
|
||||
cmake --build . --config Release
|
||||
|
||||
@@ -125,6 +127,9 @@ cmake --build . --config Release
|
||||
# STEP 5: Copy result to the NuGet folders #
|
||||
# ======================================== #
|
||||
|
||||
SFMLMajorMinor="3.0"
|
||||
CSFMLMajorMinor="3.0"
|
||||
|
||||
# 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
|
||||
@@ -135,14 +140,15 @@ copymodule()
|
||||
|
||||
mkdir -p "$OutDir"
|
||||
|
||||
# Note the wildcard at the end of the first argument
|
||||
# We are copying every versioned file here, not just the .so
|
||||
# (libsfml-audio.so, libsfml-audio.so.2, libsfml-audio.so.2.6, etc)
|
||||
# This is needed because of the way linux searches for libraries based
|
||||
# one their SONAME
|
||||
cp "$SFMLLibDir/libsfml-$MODULE.so"* "$OutDir"
|
||||
|
||||
# SFML.Net only searches for the name with common pre- and suffixes
|
||||
# As such we need to ship e.g. libcsfml-graphics.so
|
||||
# But the CSFML libs will look for the major.minor version
|
||||
# As such we also need to ship e.g. libcsfml-graphics.so.2.6
|
||||
# Unfortunately NuGet package don't support symlinks: https://github.com/NuGet/Home/issues/10734
|
||||
# For SFML, we can just ship one version that CSFML will be looking for
|
||||
cp "$SFMLLibDir/libsfml-$MODULE.so.$SFMLMajorMinor" "$OutDir"
|
||||
cp "$CSFMLLibDir/libcsfml-$MODULE.so" "$OutDir"
|
||||
cp "$CSFMLLibDir/libcsfml-$MODULE.so.$CSFMLMajorMinor" "$OutDir"
|
||||
}
|
||||
|
||||
copymodule audio
|
||||
|
||||
+16
-18
@@ -46,7 +46,7 @@ echo "Please note that all SFML dependencies must be installed and available to
|
||||
|
||||
RID="$1"
|
||||
|
||||
SFMLBranch="2.6.1" # The branch or tag of the SFML repository to be cloned
|
||||
SFMLBranch="master" # 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
|
||||
@@ -113,6 +113,7 @@ cmake -E env \
|
||||
-D "CMAKE_INSTALL_PREFIX=$SFMLLibDir" \
|
||||
-D "SFML_DEPENDENCIES_INSTALL_PREFIX=$SFMLLibDir" \
|
||||
-D "SFML_MISC_INSTALL_PREFIX=$SFMLLibDir" \
|
||||
-D "SFML_BUILD_NETWORK=0" \
|
||||
"$SFMLDir"
|
||||
|
||||
cmake --build . --config Release --target install
|
||||
@@ -141,6 +142,7 @@ cmake -E env \
|
||||
-D 'CMAKE_INSTALL_RPATH=@loader_path' \
|
||||
-D "CMAKE_INSTALL_PREFIX=$CSFMLLibDir" \
|
||||
-D "INSTALL_MISC_DIR=$CSFMLLibDir" \
|
||||
-D "CSFML_BUILD_NETWORK=0" \
|
||||
"$CSFMLDir"
|
||||
cmake --build . --config Release --target install
|
||||
|
||||
@@ -148,8 +150,8 @@ cmake --build . --config Release --target install
|
||||
# STEP 5: Fix RPATH references #
|
||||
# ============================ #
|
||||
|
||||
SFMLMajorMinor="2.6"
|
||||
SFMLMajorMinorPatch="$SFMLMajorMinor.1"
|
||||
SFMLMajorMinor="3.0"
|
||||
SFMLMajorMinorPatch="$SFMLMajorMinor.0"
|
||||
|
||||
# SFML's framework dependencies will always reference @rpath/../Frameworks/<depedency>
|
||||
# Which is not where we place the frameworks and where SFML should look for them
|
||||
@@ -178,7 +180,7 @@ fixrpath graphics "@rpath/../Frameworks/freetype.framework/Versions/A/freetype"
|
||||
# STEP 6: Copy result to the NuGet folders #
|
||||
# ======================================== #
|
||||
|
||||
CSFMLMajorMinor="2.6"
|
||||
CSFMLMajorMinor="3.0"
|
||||
CSFMLMajorMinorPatch="$CSFMLMajorMinor.0"
|
||||
|
||||
# Copies one SFML and CSFML module into the NuGet package
|
||||
@@ -191,19 +193,15 @@ copymodule()
|
||||
|
||||
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.6.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"
|
||||
# SFML.Net only searches for the name with common pre- and suffixes
|
||||
# As such we need to ship e.g. libcsfml-graphics.dylib
|
||||
# But the CSFML libs will look for the major.minor version
|
||||
# As such we also need to ship e.g. libcsfml-graphics.2.6.dylib
|
||||
# Unfortunately NuGet package don't support symlinks: https://github.com/NuGet/Home/issues/10734
|
||||
# For SFML, we can just ship one version that CSFML will be looking for
|
||||
cp "$SFMLLibDir/libsfml-$MODULE.$SFMLMajorMinor.dylib" "$OutDir"
|
||||
cp "$CSFMLLibDir/libcsfml-$MODULE.dylib" "$OutDir"
|
||||
cp "$CSFMLLibDir/libcsfml-$MODULE.$CSFMLMajorMinor.dylib" "$OutDir"
|
||||
}
|
||||
|
||||
copymodule audio
|
||||
@@ -211,7 +209,7 @@ copymodule graphics
|
||||
copymodule system
|
||||
copymodule window
|
||||
|
||||
cp -R "$SFMLLibDir/"*.framework "$OutDir"
|
||||
cp -R "$SFMLLibDir/lib/"*.framework "$OutDir"
|
||||
|
||||
popd # Pop CSFML
|
||||
popd # Pop $RID
|
||||
|
||||
@@ -35,7 +35,7 @@ Write-Output "Building $RID"
|
||||
Write-Output "Using $Generator as the cmake generator"
|
||||
Write-Output "Using architecture $Architecture"
|
||||
|
||||
$SFMLBranch = "2.6.1" # The branch or tag of the SFML repository to be cloned
|
||||
$SFMLBranch = "master" # The branch or tag of the SFML repository to be cloned
|
||||
$CSFMLDir = (Get-Item (git rev-parse --show-toplevel)).FullName # The directory of the source code of CSFML
|
||||
|
||||
$OutDir = "./CSFML/runtimes/$RID/native" # The directory of all CSFML modules, used to copy the final dlls
|
||||
@@ -48,7 +48,7 @@ Ensures that the last command run was a success, checking its exit code.
|
||||
#>
|
||||
function Ensure-Success() {
|
||||
if ($LastExitCode -ne 0) {
|
||||
exit
|
||||
exit -1
|
||||
}
|
||||
}
|
||||
|
||||
@@ -119,6 +119,7 @@ cmake `
|
||||
'-DCMAKE_BUILD_TYPE=Release' `
|
||||
'-DCMAKE_SYSTEM_VERSION=8.1' `
|
||||
'-DSFML_USE_STATIC_STD_LIBS=1' `
|
||||
'-DSFML_BUILD_NETWORK=0' `
|
||||
"-G$Generator" `
|
||||
"-A$Architecture" `
|
||||
$SFMLDir
|
||||
@@ -158,6 +159,7 @@ cmake `
|
||||
`
|
||||
"-DBUILD_SHARED_LIBS=1" `
|
||||
'-DCMAKE_BUILD_TYPE=Release' `
|
||||
'-DCSFML_BUILD_NETWORK=0' `
|
||||
`
|
||||
"-G$generator" `
|
||||
"-A$Architecture" `
|
||||
@@ -179,10 +181,10 @@ Write-Output "Copying CSFML modules"
|
||||
Copies a specific CSFML module into its proper NuGet project
|
||||
|
||||
.DESCRIPTION
|
||||
This function locates a file named csfml-(module)-2.dll inside of the
|
||||
This function locates a file named csfml-(module)-3.dll inside of the
|
||||
folder specified by $CSFMLLibDir and copies it to $OutDir/csfml-(module).dll.
|
||||
|
||||
Notice how it removes the "-2" at the end, to make the name compatible with other platforms.
|
||||
Notice how it removes the "-3" at the end, to make the name compatible with other platforms.
|
||||
|
||||
.PARAMETER module
|
||||
The case-insensitive name of the module to copy.
|
||||
@@ -191,7 +193,7 @@ function Copy-Module($module) {
|
||||
Write-Output "Copying CSFML $module"
|
||||
|
||||
New-Item -ItemType Directory $OutDir -ErrorAction Ignore > $null
|
||||
Copy-Item "$CSFMLLibDir/csfml-$module-2.dll" "$OutDir/csfml-$module.dll" -Force > $null
|
||||
Copy-Item "$CSFMLLibDir/csfml-$module-3.dll" "$OutDir/csfml-$module.dll" -Force > $null
|
||||
}
|
||||
|
||||
Copy-Module 'audio'
|
||||
|
||||
Reference in new issue
Block a user