Merge branch '2.6.x' into feature/backmerge

This commit is contained in:
Lukas Dürrenberger committed 2024-05-18 23:40:59 +02:00
commit 315c207797
17 files changed
+1198 -358

No files matched your search

+252
View File
@@ -0,0 +1,252 @@
name: NuGet Release
on:
push:
branches:
- master
- 2.6.x
workflow_dispatch: {}
concurrency:
group: nuget-${{github.ref}}
cancel-in-progress: true
env:
DOTNET_CLI_TELEMETRY_OPTOUT: 1
jobs:
windows:
name: Windows VS2022
runs-on: windows-2022
steps:
- name: Checkout CSFML
uses: actions/checkout@v4
with:
path: CSFML
- name: Build x86
shell: pwsh
run: |
cd CSFML/tools/nuget
./build.win.ps1 "win-x86"
- name: Build x64
shell: pwsh
run: |
cd CSFML/tools/nuget
./build.win.ps1 "win-x64"
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: CSFML-win-x86-x64
path: CSFML/tools/nuget/CSFML/runtimes
linux-x64:
name: Linux x64
runs-on: ubuntu-22.04
container:
image: ubuntu:22.04
steps:
- name: Checkout CSFML
uses: actions/checkout@v4
with:
path: CSFML
- name: Build
shell: bash
run: |
cd ./CSFML/tools/nuget
chmod +x ./docker.linux-x64.sh
./docker.linux-x64.sh
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: CSFML-linux-x64
path: CSFML/tools/nuget/CSFML/runtimes
linux-arm:
name: Linux ARM
runs-on: ubuntu-22.04
steps:
- name: Checkout CSFML
uses: actions/checkout@v4
with:
path: CSFML
- name: Build in an ARM container
uses: uraimo/run-on-arch-action@v2.7.2
with:
arch: armv7
distro: ubuntu22.04
githubToken: ${{ github.token }}
dockerRunArgs: |
--volume "${PWD}/CSFML:/CSFML"
install: |
apt-get update -y
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++
run: |
cd /CSFML/tools/nuget
chmod +x ./build.linux.sh
./build.linux.sh linux-arm
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: CSFML-linux-arm
path: CSFML/tools/nuget/CSFML/runtimes
linux-arm64:
name: Linux ARM64
runs-on: ubuntu-22.04
steps:
- name: Checkout CSFML
uses: actions/checkout@v4
with:
path: CSFML
- name: Build in an ARM64 container
uses: uraimo/run-on-arch-action@v2.7.2
with:
arch: aarch64
distro: ubuntu22.04
githubToken: ${{ github.token }}
dockerRunArgs: |
--volume "${PWD}/CSFML:/CSFML"
install: |
apt-get update -y
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++
run: |
cd /CSFML/tools/nuget
chmod +x ./build.linux.sh
./build.linux.sh linux-arm64
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: CSFML-linux-arm64
path: CSFML/tools/nuget/CSFML/runtimes
linux-musl-x64:
name: Linux MUSL x64
runs-on: ubuntu-22.04
container:
image: alpine:3.15
steps:
- name: Checkout CSFML
uses: actions/checkout@v4
with:
path: CSFML
- name: Build
shell: sh
run: |
cd ./CSFML/tools/nuget
chmod +x ./docker.linux-musl-x64.sh
./docker.linux-musl-x64.sh
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: CSFML-linux-musl-x64
path: CSFML/tools/nuget/CSFML/runtimes
fedora-x64:
name: Fedora x64
runs-on: ubuntu-22.04
container:
image: fedora:37
steps:
- name: Checkout CSFML
uses: actions/checkout@v4
with:
path: CSFML
- name: Build
shell: bash
run: |
cd ./CSFML/tools/nuget
chmod +x ./docker.fedora-x64.sh
./docker.fedora-x64.sh
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: CSFML-fedora-x64
path: CSFML/tools/nuget/CSFML/runtimes
macos:
name: macOS
runs-on: macos-14
steps:
- name: Checkout CSFML
uses: actions/checkout@v4
with:
path: CSFML
- name: Install necessary tooling
run: brew install coreutils
- name: Build x64
run: |
cd CSFML/tools/nuget
./build.macos.sh "osx-x64"
- name: Build ARM64
run: |
cd CSFML/tools/nuget
./build.macos.sh "osx-arm64"
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: CSFML-macOS-x64-arm64
path: CSFML/tools/nuget/CSFML/runtimes
package:
name: Package Builds
runs-on: ubuntu-22.04
needs:
- windows
- linux-x64
- linux-arm
- linux-arm64
- linux-musl-x64
- fedora-x64
- macos
steps:
- name: Checkout CSFML
uses: actions/checkout@v4
with:
path: CSFML
- name: Download Artifacts
uses: actions/download-artifact@v4
with:
path: CSFML/tools/nuget/CSFML/runtimes
merge-multiple: true
- name: Setup .NET 8 SDK
id: setup-dotnet
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x
- name: Enforce SDK Version
run: dotnet new globaljson --sdk-version ${{ steps.setup-dotnet.outputs.dotnet-version }} --force
- name: Verify SDK Installation
run: dotnet --info
- name: Build NuGet Package
run: |
cd CSFML/tools/nuget
dotnet build --configuration Release --verbosity detailed
- name: Upload NuGet Package
uses: actions/upload-artifact@v4
with:
name: CSFML-NuGet-Package
path: CSFML/tools/nuget/CSFML/bin/Release/*.nupkg
+6
View File
@@ -23,6 +23,12 @@ include(GNUInstallDirs)
# include the configuration file
include(${PROJECT_SOURCE_DIR}/cmake/Config.cmake)
# add options to select which modules to build
csfml_set_option(CSFML_BUILD_WINDOW TRUE BOOL "TRUE to build CSFML's Window module. This setting is ignored, if the graphics module is built.")
csfml_set_option(CSFML_BUILD_GRAPHICS TRUE BOOL "TRUE to build CSFML's Graphics module.")
csfml_set_option(CSFML_BUILD_AUDIO TRUE BOOL "TRUE to build CSFML's Audio module.")
csfml_set_option(CSFML_BUILD_NETWORK TRUE BOOL "TRUE to build CSFML's Network module.")
# add an option for choosing the build type (shared or static)
csfml_set_option(BUILD_SHARED_LIBS TRUE BOOL "TRUE to build CSFML as shared libraries, FALSE to build it as static libraries")
+8 -1
View File
@@ -14,7 +14,12 @@ if(SFML_OS_WINDOWS)
PATHS "C:/Program Files/HTML Help Workshop" "C:/Program Files (x86)/HTML Help Workshop"
DOC "HTML Help Compiler program")
if(DOXYGEN_HHC_PROGRAM)
set(DOXYGEN_GENERATE_HTMLHELP YES)
if(DOXYGEN_VERSION VERSION_LESS "1.10.0")
set(DOXYGEN_GENERATE_HTMLHELP YES)
else()
message("Due to conflicts with the HTML output settings in Doxygen ${DOXYGEN_VERSION}, the HTML Help generation will be disabled")
set(DOXYGEN_GENERATE_HTMLHELP NO)
endif()
else()
set(DOXYGEN_GENERATE_HTMLHELP NO)
endif()
@@ -26,9 +31,11 @@ endif()
# configure the source Doxyfile by copying it and replacing all @variables@
set(DOXYGEN_CONFIGURED_INPUT ${DOXYGEN_OUTPUT_DIR}/doxyfile)
configure_file(${DOXYGEN_INPUT_DIR}/doc/doxyfile.in ${DOXYGEN_CONFIGURED_INPUT} @ONLY)
configure_file(${DOXYGEN_INPUT_DIR}/doc/header.html.in ${DOXYGEN_OUTPUT_DIR}/header.html @ONLY)
# copy the files needed by the documentation
configure_file(${DOXYGEN_INPUT_DIR}/doc/doxygen.css ${DOXYGEN_OUTPUT_DIR}/html/doxygen.css COPYONLY)
configure_file(${DOXYGEN_INPUT_DIR}/doc/searchOverrides.css ${DOXYGEN_OUTPUT_DIR}/html/searchOverrides.css COPYONLY)
# target setup
add_custom_target(doc ALL
+698 -293
View File
File diff suppressed because it is too large. Load diff
+53 -4
View File
@@ -147,12 +147,53 @@ div.fragment {
font-family: Consolas, "Liberation Mono", Courier, monospace;
font-size: 10pt;
position: relative;
padding: 0.5em 1em;
background-color: #f5f5f5;
border: 1px solid #bbb;
border-radius(5px);
}
.clipboard {
width: 24px;
height: 24px;
right: 5px;
top: 5px;
opacity: 0;
position: absolute;
display: inline;
overflow: auto;
fill: black;
justify-content: center;
align-items: center;
cursor: pointer;
}
.clipboard.success {
border: 1px solid black;
border-radius: 4px;
}
.fragment:hover .clipboard, .clipboard.success {
opacity: .28;
}
.clipboard:hover, .clipboard.success {
opacity: 1 !important;
}
.clipboard:active:not([class~=success]) svg {
transform: scale(.91);
}
.clipboard.success svg {
fill: #2EC82E;
}
.clipboard.success {
border-color: #2EC82E;
}
div.line {
min-height: 13px;
text-wrap: unrestricted;
@@ -1062,18 +1103,26 @@ tr.heading h2 {
display: table;
}
.tablist {
width: 100%;
}
.tablist li {
float: left;
display: table-cell;
list-style: none;
}
#navrow1 .tablist li:last-child {
float: right;
}
#navrow1 {
border-top: 1px solid #999;
margin-top: 2em;
}
#navrow1 .tablist a, #navrow2 .tablist a, #navrow3 .tablist a, #navrow4 .tablist a {
#navrow1 .tablist a:not(#MSearchClose), #navrow2 .tablist a, #navrow3 .tablist a, #navrow4 .tablist a {
display: block;
margin: 8px 0;
padding: 0 8px;
@@ -1246,7 +1295,7 @@ div.contents ul li {
width: 24px;
height: 18px;
margin-bottom: 4px;
background-image:url('ftv2folderopen.png');
background-image:url('folderopen.svg');
background-position: 0px -4px;
background-repeat: repeat-y;
vertical-align:top;
@@ -1257,7 +1306,7 @@ div.contents ul li {
width: 24px;
height: 18px;
margin-bottom: 4px;
background-image:url('ftv2folderclosed.png');
background-image:url('folderclosed.svg');
background-position: 0px -4px;
background-repeat: repeat-y;
vertical-align:top;
@@ -1268,7 +1317,7 @@ div.contents ul li {
width: 24px;
height: 18px;
margin-bottom: 4px;
background-image:url('ftv2doc.png');
background-image:url('doc.svg');
background-position: 0px -4px;
background-repeat: repeat-y;
vertical-align:top;
+3 -2
View File
@@ -1,8 +1,9 @@
</div>
<div id="footer-container">
<div id="footer">
Copyright © Laurent Gomila &nbsp;::&nbsp;
Documentation generated by <a href="http://www.doxygen.org/" title="doxygen website">doxygen</a> &nbsp;::&nbsp;
CSFML is licensed under the terms and conditions of the <a href="https://www.sfml-dev.org/license.php">zlib/png license</a>.<br />
Copyright &copy; Laurent Gomila &nbsp;::&nbsp;
Documentation generated by <a href="https://www.doxygen.nl/" title="doxygen website">doxygen</a> &nbsp;::&nbsp;
</div>
</div>
</body>
-15
View File
@@ -1,15 +0,0 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>CSFML - C binding of the Simple and Fast Multimedia Library</title>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
<!--<link rel='stylesheet' type='text/css' href="http://fonts.googleapis.com/css?family=Ubuntu:400,700,400italic"/>-->
<link rel="stylesheet" type="text/css" href="doxygen.css" title="default" media="screen,print" />
</head>
<body>
<div id="banner-container">
<div id="banner">
<span id="sfml">CSFML</span>
</div>
</div>
<div id="content">
+29
View File
@@ -0,0 +1,29 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>CSFML - C binding of the Simple and Fast Multimedia Library</title>
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
<!--<link rel='stylesheet' type='text/css' href="http://fonts.googleapis.com/css?family=Ubuntu:400,700,400italic"/>-->
<link rel="stylesheet" type="text/css" href="doxygen.css" title="default" media="screen,print" />
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<script type="text/javascript" src="clipboard.js"></script>
<script type="text/javascript" src="cookie.js"></script>
<link rel="stylesheet" type="text/css" href="search/search.css" />
<link rel="stylesheet" type="text/css" href="searchOverrides.css" />
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(document).ready(function() { init_search(); });
/* @license-end */
</script>
</head>
<body>
<div id="banner-container">
<div id="banner">
<span id="sfml">CSFML @PROJECT_VERSION@</span>
</div>
</div>
<div id="content">
<div>
+2 -2
View File
@@ -3,9 +3,9 @@
///
/// \section welcome Welcome
/// Welcome to the official SFML documentation for C. Here you will find a detailed
/// view of all the SFML <a href="./globals_func.htm">functions</a>.<br/>
/// view of all the SFML <a href="./globals_func.html">functions</a>.<br/>
/// If you are looking for tutorials, you can visit the official website
/// at <a href="http://www.sfml-dev.org/">www.sfml-dev.org</a>.
/// at <a href="https://www.sfml-dev.org/">www.sfml-dev.org</a>.
///
/// \section example Short example
/// Here is a short example, to show you how simple it is to use SFML in C :
+45
View File
@@ -0,0 +1,45 @@
/* Override search/search.css rules to adjust seach box placement */
#MSearchBox {
position: relative;
display: block;
border-radius: 0;
box-shadow: none;
border-width: 1px;
border-color: #BBB;
border-style: solid;
}
.right #MSearchClose {
margin: 0;
right: auto;
}
#MSearchResultsWindow {
background-color: #EAF5DB;
border-color: #999;
}
#MSearchResults > .SRPage {
background-color: #EAF5DB;
}
a.SRSymbol {
color: rgb(70, 100, 30);
}
a.SRSymbol:hover {
text-decoration: underline;
}
a.SRScope {
color: rgb(70, 100, 30);
}
a.SRScope:hover {
text-decoration: underline;
}
#MSearchSelectWindow {
background-color: #EAF5DB;
}
#MSearchSelectWindow > a.SelectItem {
color: #333;
text-decoration: none;
}
#MSearchSelectWindow > a.SelectItem:hover {
color: white;
background-color: #8CC841;
text-decoration: none;
}
+31 -5
View File
@@ -21,14 +21,40 @@ if(CSFML_LINK_SFML_STATICALLY)
set(SFML_STATIC_LIBRARIES TRUE)
add_definitions(-DSFML_STATIC)
endif()
find_package(SFML 3.0.0 COMPONENTS Network Graphics Audio REQUIRED)
set(SFML_MODULES "System")
if(CSFML_BUILD_AUDIO)
list(PREPEND SFML_MODULES "Audio")
endif()
if(CSFML_BUILD_GRAPHICS)
list(PREPEND SFML_MODULES "Graphics")
endif()
if(CSFML_BUILD_WINDOW)
list(PREPEND SFML_MODULES "Window")
endif()
if(CSFML_BUILD_NETWORK)
list(PREPEND SFML_MODULES "Network")
endif()
find_package(SFML 3.0.0 COMPONENTS ${SFML_MODULES} REQUIRED)
# add the modules subdirectories
add_subdirectory(System)
add_subdirectory(Window)
add_subdirectory(Network)
add_subdirectory(Graphics)
add_subdirectory(Audio)
if(CSFML_BUILD_WINDOW OR CSFML_BUILD_GRAPHICS)
add_subdirectory(Window)
endif()
if(CSFML_BUILD_NETWORK)
add_subdirectory(Network)
endif()
if(CSFML_BUILD_GRAPHICS)
add_subdirectory(Graphics)
endif()
if(CSFML_BUILD_AUDIO)
add_subdirectory(Audio)
endif()
if(SFML_OS_WINDOWS)
add_subdirectory(Main)
endif()
+1 -1
View File
@@ -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>
+24 -3
View File
@@ -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
+15 -9
View File
@@ -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
View File
@@ -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
+7 -5
View File
@@ -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'