Author SHA1 Message Date
Lukas Dürrenberger 08b22ee975 Remove fedora-x64 as NuGet target, as linux-x64 is preferred now 2025-08-29 16:10:50 +02:00
Lukas Dürrenberger 36ae53cde7 Run NuGet CI builds for any tag 2025-08-29 16:10:50 +02:00
Lukas Dürrenberger b23b723d83 Use our own dependencies for SFML in the CSFML NuGet 2025-08-29 13:32:23 +02:00
Lukas Dürrenberger 44974fe4e9 Update action to run under ARM 2025-08-29 13:32:23 +02:00
Lukas Dürrenberger 0abdaf8a0c Ignore enum class clang-tidy rule 2025-08-29 13:32:23 +02:00
Lukas Dürrenberger 46b72141d1 Add support for Windows ARM64 architecture 2025-08-29 13:32:23 +02:00
Lukas Dürrenberger 973c742602 Update WinLibs MinGW version 2025-08-29 13:32:23 +02:00
Lukas Dürrenberger 1428c23b6a Update SFML version used in CI scripts 2025-08-29 13:32:23 +02:00
Lukas Dürrenberger c5cfb7f878 Update to windows-2025 images 2025-08-29 13:32:23 +02:00
Lukas Dürrenberger 8ca866fbc7 Fix formatting of CI files 2025-08-29 13:32:23 +02:00
Chris Thrasher 5f25bee831 Improve readability of CI commands 2025-06-09 14:03:18 +02:00
Chris Thrasher eba1735c84 Add tests for sfImage 2025-06-08 22:38:53 -06:00
Shane Whitmire 8f44a6f424 Implement resize for Texture 2025-06-08 22:03:49 -06:00
Lukas Dürrenberger e39a0b1ab8 Add missing setMinimumSize and setMaximumSize window methods 2025-06-01 12:12:53 -06:00
Chris Thrasher aa236c2207 Remove VS2019 CI jobs 2025-06-01 12:12:43 -06:00
Chris Thrasher 17039984c5 Test with oldest possible CMake version 2025-06-01 11:20:59 -06:00
James Cowgill f1e6cccb56 Avoid doing a real name resolution in sfIpAddress_fromString test
On some PCs, resolving `invalid address` will perform a real name
resolution using the network. This is slows down the test and risks
the test failing if the resolution succeeds.

Use `localhost` instead which shold return a known value, and add an
invalid ip address test for good measure.
2025-02-16 10:23:08 -07:00
Lukas Dürrenberger 82884b379f Add ReadMe to the NuGet package project 2025-01-23 21:29:32 +00:00
Lukas Dürrenberger 2ca3a852cf Build shared libraries on Windows 2025-01-22 12:57:05 +00:00
Lukas Dürrenberger 06dd3bc9b8 Update release builds for SFML 3 2025-01-22 12:57:05 +00:00
Lukas Dürrenberger 862ab6a449 Remove extlibs references that are no longer needed 2025-01-15 07:31:55 +00:00
Lukas Dürrenberger 9329dd8b60 Update GitHub Actions 2025-01-15 07:31:55 +00:00
Lukas Dürrenberger c9bcd69cb7 Merge branch '2.6.x' into master 2025-01-14 14:44:13 +00:00
Lukas Dürrenberger a7b113ac5b Merge branch '2.6.x' into master 2025-01-08 15:16:46 +01:00
Lukas Dürrenberger 72c1979aed Correct macOS rpath reference for vorbisenc 2025-01-08 14:04:00 +00:00
Lukas Dürrenberger 4f75550692 Update macOS image version for CI 2025-01-08 14:04:00 +00:00
Chris Thrasher fb9fb941b4 Add missing sfSoundBufferRecorder functions inherited from sf::SoundRecorder
Backport of 34febc214f
2024-09-03 16:49:38 -06:00
Biswapriyo Nath 58b6342d1b CMake: Fix installing HTML Help with newer Doxygen version
HTML Help generation was disabled for doxygen version greater
than 1.10.0 in df75efa78d commit.
2024-08-26 09:10:13 -06:00
Lukas Dürrenberger e153a8a4ce Update CSFML version to 2.6.1 2024-05-19 23:14:45 +02:00
Lukas Dürrenberger 17f42be80c Update copyright year to 2024 2024-05-19 23:14:45 +02:00
Lukas Dürrenberger 586fb28b9d Create release packages automatically 2024-05-19 22:51:57 +02:00
29 changed files with 877 additions and 321 deletions

No files matched your search

+1
View File
@@ -23,6 +23,7 @@ Checks: >
-cppcoreguidelines-pro-type-const-cast,
-cppcoreguidelines-pro-type-reinterpret-cast,
-cppcoreguidelines-special-member-functions,
-cppcoreguidelines-use-enum-class,
-modernize-avoid-c-arrays,
-modernize-macro-to-enum,
-modernize-redundant-void-arg,
+21 -9
View File
@@ -7,7 +7,7 @@ concurrency:
cancel-in-progress: true
env:
SFML_VERSION: 3.0.0
SFML_VERSION: 3.0.1
defaults:
run:
@@ -22,12 +22,10 @@ jobs:
fail-fast: false
matrix:
platform:
- { name: Windows VS2019 x86, os: windows-2019, flags: -AWin32 }
- { name: Windows VS2019 x64, os: windows-2019, flags: -Ax64 }
- { name: Windows VS2022 x86, os: windows-2022, flags: -AWin32 }
- { name: Windows VS2022 x64, os: windows-2022, flags: -Ax64 }
- { name: Windows ClangCL, os: windows-2022, flags: -T ClangCL }
- { name: Windows Clang, os: windows-2022, flags: -GNinja -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ }
- { name: Windows VS2022 x86, os: windows-2025, flags: -AWin32 }
- { name: Windows VS2022 x64, os: windows-2025, flags: -Ax64 }
- { name: Windows ClangCL, os: windows-2025, flags: -T ClangCL }
- { name: Windows Clang, os: windows-2025, flags: -GNinja -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ }
- { name: Linux GCC, os: ubuntu-22.04, flags: -GNinja }
- { name: Linux Clang, os: ubuntu-22.04, flags: -GNinja -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ }
- { name: MacOS, os: macos-14, flags: -GNinja }
@@ -42,6 +40,7 @@ jobs:
- name: Get CMake and Ninja
uses: lukka/get-cmake@latest
with:
cmakeVersion: ${{ runner.os == 'Windows' && '3.25' || '3.22' }}
ninjaVersion: latest
- name: Install Linux Dependencies
@@ -56,7 +55,12 @@ jobs:
path: SFML
- name: Configure SFML CMake
run: cmake -S SFML -B SFML/build -DCMAKE_INSTALL_PREFIX=SFML/install ${{matrix.platform.flags}} ${{matrix.config.flags}} -DCMAKE_BUILD_TYPE=${{matrix.type.name}}
run: |
cmake -S SFML -B SFML/build \
-DCMAKE_BUILD_TYPE=${{matrix.type.name}} \
-DCMAKE_INSTALL_PREFIX=SFML/install \
${{matrix.platform.flags}} \
${{matrix.config.flags}}
- name: Build SFML
run: cmake --build SFML/build --config ${{matrix.type.name}} --target install
@@ -67,7 +71,15 @@ jobs:
path: CSFML
- name: Configure CSFML CMake
run: cmake --preset dev -S CSFML -B CSFML/build -DCMAKE_INSTALL_PREFIX=CSFML/install -DSFML_ROOT=SFML/install -DCMAKE_VERBOSE_MAKEFILE=ON ${{matrix.platform.flags}} ${{matrix.config.flags}} ${{matrix.config.csfml_flags}} -DCMAKE_BUILD_TYPE=${{matrix.type.name}}
run: |
cmake --preset dev -S CSFML -B CSFML/build \
-DCMAKE_BUILD_TYPE=${{matrix.type.name}} \
-DCMAKE_INSTALL_PREFIX=CSFML/install \
-DSFML_ROOT=SFML/install \
-DCMAKE_VERBOSE_MAKEFILE=ON \
${{matrix.platform.flags}} \
${{matrix.config.flags}} \
${{matrix.config.csfml_flags}}
- name: Build CSFML
run: cmake --build CSFML/build --config ${{matrix.type.name}} --target install
+197 -215
View File
@@ -1,252 +1,234 @@
name: NuGet Release
on:
push:
branches:
- master
- 2.6.x
workflow_dispatch: {}
push:
branches:
- master
- 2.6.x
tags:
- "**"
workflow_dispatch: {}
concurrency:
group: nuget-${{github.ref}}
cancel-in-progress: true
group: nuget-${{github.ref}}
cancel-in-progress: true
env:
DOTNET_CLI_TELEMETRY_OPTOUT: 1
DOTNET_CLI_TELEMETRY_OPTOUT: 1
jobs:
windows:
name: Windows VS2022
runs-on: windows-2022
windows:
name: Windows VS2022
runs-on: windows-2025
steps:
- name: Checkout CSFML
uses: actions/checkout@v4
with:
path: CSFML
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 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: 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
- name: Build ARM64
shell: pwsh
run: |
cd CSFML/tools/nuget
./build.win.ps1 "win-arm64"
linux-x64:
name: Linux x64
runs-on: ubuntu-22.04
container:
image: ubuntu:22.04
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: CSFML-win-x86-x64-arm64
path: CSFML/tools/nuget/CSFML/runtimes
steps:
- name: Checkout CSFML
uses: actions/checkout@v4
with:
path: CSFML
linux-x64:
name: Linux x64
runs-on: ubuntu-22.04
container:
image: ubuntu:22.04
- name: Build
shell: bash
run: |
cd ./CSFML/tools/nuget
chmod +x ./docker.linux-x64.sh
./docker.linux-x64.sh
steps:
- name: Checkout CSFML
uses: actions/checkout@v4
with:
path: CSFML
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: CSFML-linux-x64
path: CSFML/tools/nuget/CSFML/runtimes
- name: Build
shell: bash
run: |
cd ./CSFML/tools/nuget
chmod +x ./docker.linux-x64.sh
./docker.linux-x64.sh
linux-arm:
name: Linux ARM
runs-on: ubuntu-22.04
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: CSFML-linux-x64
path: CSFML/tools/nuget/CSFML/runtimes
steps:
- name: Checkout CSFML
uses: actions/checkout@v4
with:
path: CSFML
linux-arm:
name: Linux ARM
runs-on: ubuntu-22.04
- 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 libxi-dev libudev-dev libgl1-mesa-dev libflac-dev libogg-dev libvorbis-dev cmake g++
run: |
cd /CSFML/tools/nuget
chmod +x ./build.linux.sh
./build.linux.sh linux-arm
steps:
- name: Checkout CSFML
uses: actions/checkout@v4
with:
path: CSFML
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: CSFML-linux-arm
path: CSFML/tools/nuget/CSFML/runtimes
- name: Build in an ARM container
uses: uraimo/run-on-arch-action@v3.0.1
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 libxi-dev libudev-dev libgl1-mesa-dev libflac-dev libogg-dev libvorbis-dev cmake g++
run: |
cd /CSFML/tools/nuget
chmod +x ./build.linux.sh
./build.linux.sh linux-arm
linux-arm64:
name: Linux ARM64
runs-on: ubuntu-22.04
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: CSFML-linux-arm
path: CSFML/tools/nuget/CSFML/runtimes
steps:
- name: Checkout CSFML
uses: actions/checkout@v4
with:
path: CSFML
linux-arm64:
name: Linux ARM64
runs-on: ubuntu-22.04
- 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 cmake g++
run: |
cd /CSFML/tools/nuget
chmod +x ./build.linux.sh
./build.linux.sh linux-arm64
steps:
- name: Checkout CSFML
uses: actions/checkout@v4
with:
path: CSFML
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: CSFML-linux-arm64
path: CSFML/tools/nuget/CSFML/runtimes
- name: Build in an ARM64 container
uses: uraimo/run-on-arch-action@v3.0.1
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 cmake g++
run: |
cd /CSFML/tools/nuget
chmod +x ./build.linux.sh
./build.linux.sh linux-arm64
linux-musl-x64:
name: Linux MUSL x64
runs-on: ubuntu-22.04
container:
image: alpine:3.20.3
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: CSFML-linux-arm64
path: CSFML/tools/nuget/CSFML/runtimes
steps:
- name: Checkout CSFML
uses: actions/checkout@v4
with:
path: CSFML
linux-musl-x64:
name: Linux MUSL x64
runs-on: ubuntu-22.04
container:
image: alpine:3.20.7
- name: Build
shell: sh
run: |
cd ./CSFML/tools/nuget
chmod +x ./docker.linux-musl-x64.sh
./docker.linux-musl-x64.sh
steps:
- name: Checkout CSFML
uses: actions/checkout@v4
with:
path: CSFML
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: CSFML-linux-musl-x64
path: CSFML/tools/nuget/CSFML/runtimes
- name: Build
shell: sh
run: |
cd ./CSFML/tools/nuget
chmod +x ./docker.linux-musl-x64.sh
./docker.linux-musl-x64.sh
fedora-x64:
name: Fedora x64
runs-on: ubuntu-22.04
container:
image: fedora:37
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: CSFML-linux-musl-x64
path: CSFML/tools/nuget/CSFML/runtimes
steps:
- name: Checkout CSFML
uses: actions/checkout@v4
with:
path: CSFML
macos:
name: macOS
runs-on: macos-14
- name: Build
shell: bash
run: |
cd ./CSFML/tools/nuget
chmod +x ./docker.fedora-x64.sh
./docker.fedora-x64.sh
steps:
- name: Checkout CSFML
uses: actions/checkout@v4
with:
path: CSFML
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: CSFML-fedora-x64
path: CSFML/tools/nuget/CSFML/runtimes
- name: Install necessary tooling
run: brew install coreutils
macos:
name: macOS
runs-on: macos-14
- name: Build x64
run: |
cd CSFML/tools/nuget
./build.macos.sh "osx-x64"
steps:
- name: Checkout CSFML
uses: actions/checkout@v4
with:
path: CSFML
- name: Build ARM64
run: |
cd CSFML/tools/nuget
./build.macos.sh "osx-arm64"
- name: Install necessary tooling
run: brew install coreutils
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: CSFML-macOS-x64-arm64
path: CSFML/tools/nuget/CSFML/runtimes
- 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
package:
name: Package Builds
runs-on: ubuntu-24.04
needs:
- windows
- linux-x64
- linux-arm
- linux-arm64
- linux-musl-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
+356
View File
@@ -0,0 +1,356 @@
name: Release Builds
on:
push:
branches:
- master
- 2.6.x
tags:
- "**"
workflow_dispatch: {}
concurrency:
group: release-${{github.ref}}
cancel-in-progress: true
env:
SFML_VERSION: 3.0.1
jobs:
windows-x86:
name: Windows x86
runs-on: windows-2025
steps:
- name: Cache MinGW x86
id: mingw-x86-cache
uses: actions/cache@v4
with:
path: ${{ github.workspace }}/mingw32
key: 15.2.0posix-13.0.0-ucrt-r1-x86
- name: Install MinGW x86
if: steps.mingw-x86-cache.outputs.cache-hit != 'true'
uses: bwoodsend/setup-winlibs-action@v1
id: winlibs-32
with:
tag: 15.2.0posix-13.0.0-ucrt-r1
with_clang: false
architecture: 32
destination: ${{ github.workspace }}
add_to_path: false
- name: Checkout SFML
uses: actions/checkout@v4
with:
repository: SFML/SFML
ref: ${{ env.SFML_VERSION }}
path: SFML
- name: Checkout CSFML
uses: actions/checkout@v4
with:
path: CSFML
- name: Build SFML
run: |
cmake -S SFML -B SFML-build -A Win32 -G "Visual Studio 17 2022" -DBUILD_SHARED_LIBS=ON -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=${{ github.workspace }}/SFML-install -DCMAKE_VERBOSE_MAKEFILE=ON
cmake --build SFML-build --config Release --target install
- name: Build CSFML
run: |
cmake -S CSFML -B CSFML-build -A Win32 -G "Visual Studio 17 2022" -DBUILD_SHARED_LIBS=ON -DCSFML_LINK_SFML_STATICALLY=OFF -DCMAKE_BUILD_TYPE=Release -DSFML_ROOT=${{ github.workspace }}/SFML-install -DCMAKE_INSTALL_PREFIX=${{ github.workspace }}/CSFML-install -DCMAKE_VERBOSE_MAKEFILE=ON
cmake --build CSFML-build --config Release --target install
- name: Add MinGW to PATH
shell: bash
run: echo "${{ github.workspace }}\mingw32\bin" >> $GITHUB_PATH
- name: Generate Import Libs for MinGW
shell: pwsh
run: |
New-Item -ItemType "directory" -PATH "CSFML-install\lib\gcc"
New-Item -ItemType "directory" -PATH "CSFML-install\lib\msvc"
Move-Item -Path "CSFML-install\lib\*.lib" -Destination "CSFML-install\lib\msvc"
Push-Location CSFML-install\lib\gcc
& gendef.exe "..\..\bin\csfml-graphics-3.dll"
& dlltool.exe -d "csfml-graphics-3.def" -D "..\..\bin\csfml-graphics-3.dll" -l "libcsfml-graphics.a"
Remove-Item -Path "csfml-graphics-3.def"
& gendef.exe "..\..\bin\csfml-window-3.dll"
& dlltool.exe -d "csfml-window-3.def" -D "..\..\bin\csfml-window-3.dll" -l "libcsfml-window.a"
Remove-Item -Path "csfml-window-3.def"
& gendef.exe "..\..\bin\csfml-audio-3.dll"
& dlltool.exe -d "csfml-audio-3.def" -D "..\..\bin\csfml-audio-3.dll" -l "libcsfml-audio.a"
Remove-Item -Path "csfml-audio-3.def"
& gendef.exe "..\..\bin\csfml-network-3.dll"
& dlltool.exe -d "csfml-network-3.def" -D "..\..\bin\csfml-network-3.dll" -l "libcsfml-network.a"
Remove-Item -Path "csfml-network-3.def"
& gendef.exe "..\..\bin\csfml-system-3.dll"
& dlltool.exe -d "csfml-system-3.def" -D "..\..\bin\csfml-system-3.dll" -l "libcsfml-system.a"
Remove-Item -Path "csfml-system-3.def"
Pop-Location
New-Item -ItemType "directory" -PATH "install\CSFML"
Move-Item -Path "CSFML-install\*" -Destination "install\CSFML"
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: CSFML-windows-32-bit
path: install/CSFML
windows-x64:
name: Windows x64
runs-on: windows-2025
steps:
- name: Cache MinGW x64
id: mingw-x64-cache
uses: actions/cache@v4
with:
path: ${{ github.workspace }}/mingw64
key: 15.2.0posix-13.0.0-ucrt-r1-x64
- name: Install MinGW x64
if: steps.mingw-x64-cache.outputs.cache-hit != 'true'
uses: bwoodsend/setup-winlibs-action@v1
id: winlibs-64
with:
tag: 15.2.0posix-13.0.0-ucrt-r1
with_clang: false
architecture: 64
destination: ${{ github.workspace }}
add_to_path: false
- name: Checkout SFML
uses: actions/checkout@v4
with:
repository: SFML/SFML
ref: ${{ env.SFML_VERSION }}
path: SFML
- name: Checkout CSFML
uses: actions/checkout@v4
with:
path: CSFML
- name: Build SFML
run: |
cmake -S SFML -B SFML-build -A x64 -G "Visual Studio 17 2022" -DBUILD_SHARED_LIBS=ON -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=${{ github.workspace }}/SFML-install -DCMAKE_VERBOSE_MAKEFILE=ON
cmake --build SFML-build --config Release --target install
- name: Build CSFML
run: |
cmake -S CSFML -B CSFML-build -A x64 -G "Visual Studio 17 2022" -DBUILD_SHARED_LIBS=ON -DCSFML_LINK_SFML_STATICALLY=OFF -DCMAKE_BUILD_TYPE=Release -DSFML_ROOT=${{ github.workspace }}/SFML-install -DCMAKE_INSTALL_PREFIX=${{ github.workspace }}/CSFML-install -DCMAKE_VERBOSE_MAKEFILE=ON
cmake --build CSFML-build --config Release --target install
- name: Add MinGW to PATH
shell: bash
run: echo "${{ github.workspace }}\mingw64\bin" >> $GITHUB_PATH
- name: Generate Import Libs for MinGW
shell: pwsh
run: |
New-Item -ItemType "directory" -PATH "CSFML-install\lib\gcc"
New-Item -ItemType "directory" -PATH "CSFML-install\lib\msvc"
Move-Item -Path "CSFML-install\lib\*.lib" -Destination "CSFML-install\lib\msvc"
Push-Location CSFML-install\lib\gcc
& gendef.exe "..\..\bin\csfml-graphics-3.dll"
& dlltool.exe -d "csfml-graphics-3.def" -D "..\..\bin\csfml-graphics-3.dll" -l "libcsfml-graphics.a"
Remove-Item -Path "csfml-graphics-3.def"
& gendef.exe "..\..\bin\csfml-window-3.dll"
& dlltool.exe -d "csfml-window-3.def" -D "..\..\bin\csfml-window-3.dll" -l "libcsfml-window.a"
Remove-Item -Path "csfml-window-3.def"
& gendef.exe "..\..\bin\csfml-audio-3.dll"
& dlltool.exe -d "csfml-audio-3.def" -D "..\..\bin\csfml-audio-3.dll" -l "libcsfml-audio.a"
Remove-Item -Path "csfml-audio-3.def"
& gendef.exe "..\..\bin\csfml-network-3.dll"
& dlltool.exe -d "csfml-network-3.def" -D "..\..\bin\csfml-network-3.dll" -l "libcsfml-network.a"
Remove-Item -Path "csfml-network-3.def"
& gendef.exe "..\..\bin\csfml-system-3.dll"
& dlltool.exe -d "csfml-system-3.def" -D "..\..\bin\csfml-system-3.dll" -l "libcsfml-system.a"
Remove-Item -Path "csfml-system-3.def"
Pop-Location
New-Item -ItemType "directory" -PATH "install\CSFML"
Move-Item -Path "CSFML-install\*" -Destination "install\CSFML"
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: CSFML-windows-64-bit
path: install/CSFML
windows-arm64:
name: Windows ARM64
runs-on: windows-2025
steps:
- name: Checkout SFML
uses: actions/checkout@v4
with:
repository: SFML/SFML
ref: ${{ env.SFML_VERSION }}
path: SFML
- name: Checkout CSFML
uses: actions/checkout@v4
with:
path: CSFML
- name: Build SFML
run: |
cmake -S SFML -B SFML-build -A ARM64 -G "Visual Studio 17 2022" -DBUILD_SHARED_LIBS=ON -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=${{ github.workspace }}/SFML-install -DCMAKE_VERBOSE_MAKEFILE=ON
cmake --build SFML-build --config Release --target install
- name: Build CSFML
run: |
cmake -S CSFML -B CSFML-build -A ARM64 -G "Visual Studio 17 2022" -DBUILD_SHARED_LIBS=ON -DCSFML_LINK_SFML_STATICALLY=OFF -DCMAKE_BUILD_TYPE=Release -DSFML_ROOT=${{ github.workspace }}/SFML-install -DCMAKE_INSTALL_PREFIX=${{ github.workspace }}/CSFML-install -DCMAKE_VERBOSE_MAKEFILE=ON
cmake --build CSFML-build --config Release --target install
- name: Move Files
shell: pwsh
run: |
New-Item -ItemType "directory" -PATH "install\CSFML"
Move-Item -Path "CSFML-install\*" -Destination "install\CSFML"
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: CSFML-windows-arm64
path: install/CSFML
macos-x64:
name: macOS x64
runs-on: macos-13
steps:
- name: Checkout SFML
uses: actions/checkout@v4
with:
repository: SFML/SFML
ref: ${{ env.SFML_VERSION }}
path: SFML
- name: Checkout CSFML
uses: actions/checkout@v4
with:
path: CSFML
- name: Build SFML
run: |
cmake -S SFML -B SFML-build -G "Unix Makefiles" \
-DCMAKE_C_COMPILER="/usr/bin/clang" \
-DCMAKE_CXX_COMPILER="/usr/bin/clang++" \
-DCMAKE_C_FLAGS="-stdlib=libc++" \
-DCMAKE_CXX_FLAGS="-stdlib=libc++" \
-DBUILD_SHARED_LIBS=ON \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=${{ github.workspace }}/SFML-install \
-DCMAKE_OSX_ARCHITECTURES=x86_64 \
-DCMAKE_OSX_DEPLOYMENT_TARGET=10.15 \
-DSFML_BUILD_FRAMEWORKS=OFF \
-DCMAKE_VERBOSE_MAKEFILE=ON
cmake --build SFML-build --config Release --target install
- name: Build CSFML
run: |
cmake -S CSFML -B CSFML-build -G "Unix Makefiles" \
-DCMAKE_C_COMPILER="/usr/bin/clang" \
-DCMAKE_CXX_COMPILER="/usr/bin/clang++" \
-DCMAKE_C_FLAGS="-stdlib=libc++" \
-DCMAKE_CXX_FLAGS="-stdlib=libc++" \
-DBUILD_SHARED_LIBS=ON \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=${{ github.workspace }}/CSFML-install \
-DCMAKE_OSX_ARCHITECTURES=x86_64 \
-DCMAKE_OSX_DEPLOYMENT_TARGET=10.15 \
-DSFML_ROOT=${{ github.workspace }}/SFML-install \
-DCMAKE_VERBOSE_MAKEFILE=ON
cmake --build CSFML-build --config Release --target install
- name: Create Archive
run: |
mkdir CSFML-macOS-clang-64-bit
cp -R CSFML-install/include CSFML-macOS-clang-64-bit
cp -R CSFML-install/lib CSFML-macOS-clang-64-bit
cp CSFML-install/share/CSFML/* CSFML-macOS-clang-64-bit
tar -zcvf CSFML-macOS-clang-64-bit.tar.gz CSFML-macOS-clang-64-bit
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: CSFML-macOS-clang-64-bit
path: CSFML-macOS-clang-64-bit.tar.gz
macos-arm64:
name: macOS ARM64
runs-on: macos-14
steps:
- name: Checkout SFML
uses: actions/checkout@v4
with:
repository: SFML/SFML
ref: ${{ env.SFML_VERSION }}
path: SFML
- name: Checkout CSFML
uses: actions/checkout@v4
with:
path: CSFML
- name: Build SFML
run: |
cmake -S SFML -B SFML-build -G "Unix Makefiles" \
-DCMAKE_C_COMPILER="/usr/bin/clang" \
-DCMAKE_CXX_COMPILER="/usr/bin/clang++" \
-DCMAKE_C_FLAGS="-stdlib=libc++" \
-DCMAKE_CXX_FLAGS="-stdlib=libc++" \
-DBUILD_SHARED_LIBS=ON \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=${{ github.workspace }}/SFML-install \
-DCMAKE_OSX_ARCHITECTURES=arm64 \
-DCMAKE_OSX_DEPLOYMENT_TARGET=11.0 \
-DSFML_BUILD_FRAMEWORKS=OFF \
-DCMAKE_VERBOSE_MAKEFILE=ON
cmake --build SFML-build --config Release --target install
- name: Build CSFML
run: |
cmake -S CSFML -B CSFML-build -G "Unix Makefiles" \
-DCMAKE_C_COMPILER="/usr/bin/clang" \
-DCMAKE_CXX_COMPILER="/usr/bin/clang++" \
-DCMAKE_C_FLAGS="-stdlib=libc++" \
-DCMAKE_CXX_FLAGS="-stdlib=libc++" \
-DBUILD_SHARED_LIBS=ON \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=${{ github.workspace }}/CSFML-install \
-DCMAKE_OSX_ARCHITECTURES=arm64 \
-DCMAKE_OSX_DEPLOYMENT_TARGET=11.0 \
-DSFML_ROOT=${{ github.workspace }}/SFML-install \
-DCMAKE_VERBOSE_MAKEFILE=ON
cmake --build CSFML-build --config Release --target install
- name: Create Archive
run: |
mkdir CSFML-macOS-clang-arm64
cp -R CSFML-install/include CSFML-macOS-clang-arm64
cp -R CSFML-install/lib CSFML-macOS-clang-arm64
cp CSFML-install/share/CSFML/* CSFML-macOS-clang-arm64
tar -zcvf CSFML-macOS-clang-arm64.tar.gz CSFML-macOS-clang-arm64
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: CSFML-macOS-clang-arm64
path: CSFML-macOS-clang-arm64.tar.gz
+2 -2
View File
@@ -38,8 +38,8 @@ add_custom_target(doc ALL
install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/html
DESTINATION ${INSTALL_MISC_DIR}/doc
COMPONENT doc)
if(DOXYGEN_HHC_PROGRAM)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/CSFML.chm
if(DOXYGEN_GENERATE_HTMLHELP)
install(FILES ${DOXYGEN_OUTPUT_DIR}/CSFML.chm
DESTINATION ${INSTALL_MISC_DIR}/doc
COMPONENT doc)
endif()
+22
View File
@@ -216,6 +216,28 @@ CSFML_GRAPHICS_API bool sfRenderWindow_isSrgb(const sfRenderWindow* renderWindow
////////////////////////////////////////////////////////////
CSFML_GRAPHICS_API void sfRenderWindow_setSize(sfRenderWindow* renderWindow, sfVector2u size);
////////////////////////////////////////////////////////////
/// \brief Set the minimum window rendering region size
///
/// Pass a `NULL` vector to unset the minimum size
///
/// \param renderWindow Render window object
/// \param minimumSize New minimum size, in pixels
///
////////////////////////////////////////////////////////////
CSFML_GRAPHICS_API void sfRenderWindow_setMinimumSize(sfRenderWindow* renderWindow, const sfVector2u* minimumSize);
////////////////////////////////////////////////////////////
/// \brief Set the maximum window rendering region size
///
/// Pass a `NULL` vector to unset the maximum size
///
/// \param renderWindow Render window object
/// \param maximumSize New maximum size, in pixels
///
////////////////////////////////////////////////////////////
CSFML_GRAPHICS_API void sfRenderWindow_setMaximumSize(sfRenderWindow* renderWindow, const sfVector2u* maximumSize);
////////////////////////////////////////////////////////////
/// \brief Change the title of a render window
///
+14
View File
@@ -178,6 +178,20 @@ CSFML_GRAPHICS_API sfTexture* sfTexture_copy(const sfTexture* texture);
////////////////////////////////////////////////////////////
CSFML_GRAPHICS_API void sfTexture_destroy(const sfTexture* texture);
////////////////////////////////////////////////////////////
/// \brief Resize the texture
///
/// If this function fails, the texture is left unchanged.
///
/// \param texture Texture to resize
/// \param size Width and height of the texture
/// \param sRgb `true` to enable sRGB conversion, `false` to disable it
///
/// \return `true` if resizing was successful, `false` if it failed
///
////////////////////////////////////////////////////////////
CSFML_GRAPHICS_API bool sfTexture_resize(sfTexture* texture, sfVector2u size, bool sRgb);
////////////////////////////////////////////////////////////
/// \brief Return the size of the texture
///
+22
View File
@@ -280,6 +280,28 @@ CSFML_WINDOW_API sfVector2u sfWindow_getSize(const sfWindow* window);
////////////////////////////////////////////////////////////
CSFML_WINDOW_API void sfWindow_setSize(sfWindow* window, sfVector2u size);
////////////////////////////////////////////////////////////
/// \brief Set the minimum window rendering region size
///
/// Pass a `NULL` vector to unset the minimum size
///
/// \param window Window object
/// \param minimumSize New minimum size, in pixels
///
////////////////////////////////////////////////////////////
CSFML_WINDOW_API void sfWindow_setMinimumSize(sfWindow* window, const sfVector2u* minimumSize);
////////////////////////////////////////////////////////////
/// \brief Set the maximum window rendering region size
///
/// Pass a `NULL` vector to unset the maximum size
///
/// \param window Window object
/// \param maximumSize New maximum size, in pixels
///
////////////////////////////////////////////////////////////
CSFML_WINDOW_API void sfWindow_setMaximumSize(sfWindow* window, const sfVector2u* maximumSize);
////////////////////////////////////////////////////////////
/// \brief Change the title of a window
///
+22
View File
@@ -236,6 +236,28 @@ CSFML_WINDOW_API sfVector2u sfWindowBase_getSize(const sfWindowBase* windowBase)
////////////////////////////////////////////////////////////
CSFML_WINDOW_API void sfWindowBase_setSize(sfWindowBase* windowBase, sfVector2u size);
////////////////////////////////////////////////////////////
/// \brief Set the minimum window rendering region size
///
/// Pass a `NULL` vector to unset the minimum size
///
/// \param windowBase Window object
/// \param minimumSize New minimum size, in pixels
///
////////////////////////////////////////////////////////////
CSFML_WINDOW_API void sfWindowBase_setMinimumSize(sfWindowBase* windowBase, const sfVector2u* minimumSize);
////////////////////////////////////////////////////////////
/// \brief Set the maximum window rendering region size
///
/// Pass a `NULL` vector to unset the maximum size
///
/// \param windowBase Window object
/// \param maximumSize New maximum size, in pixels
///
////////////////////////////////////////////////////////////
CSFML_WINDOW_API void sfWindowBase_setMaximumSize(sfWindowBase* windowBase, const sfVector2u* maximumSize);
////////////////////////////////////////////////////////////
/// \brief Change the title of a window
///
+1
View File
@@ -18,6 +18,7 @@ Development is focused on the next major version in the `master` branch. No more
- Lukas Dürrenberger (eXpl0it3r@sfml-dev.org)
- Chris Thrasher (thrasher@sfml-dev.org)
- Zachariah Brown (contact@zbrown.net)
- And many other members of the SFML community
## Download
+32
View File
@@ -198,6 +198,38 @@ void sfRenderWindow_setSize(sfRenderWindow* renderWindow, sfVector2u size)
}
////////////////////////////////////////////////////////////
void sfRenderWindow_setMinimumSize(sfRenderWindow* renderWindow, const sfVector2u* minimumSize)
{
assert(renderWindow);
if (minimumSize == nullptr)
{
renderWindow->setMinimumSize(std::nullopt);
}
else
{
renderWindow->setMinimumSize(convertVector2(*minimumSize));
}
}
////////////////////////////////////////////////////////////
void sfRenderWindow_setMaximumSize(sfRenderWindow* renderWindow, const sfVector2u* maximumSize)
{
assert(renderWindow);
if (maximumSize == nullptr)
{
renderWindow->setMaximumSize(std::nullopt);
}
else
{
renderWindow->setMaximumSize(convertVector2(*maximumSize));
}
}
////////////////////////////////////////////////////////////
void sfRenderWindow_setTitle(sfRenderWindow* renderWindow, const char* title)
{
+9
View File
@@ -170,6 +170,15 @@ void sfTexture_destroy(const sfTexture* texture)
}
////////////////////////////////////////////////////////////
bool sfTexture_resize(sfTexture* texture, sfVector2u size, bool sRgb)
{
assert(texture);
assert(texture->This);
return texture->This->resize(convertVector2(size), sRgb);
}
////////////////////////////////////////////////////////////
sfVector2u sfTexture_getSize(const sfTexture* texture)
{
+32
View File
@@ -159,6 +159,38 @@ void sfWindow_setSize(sfWindow* window, sfVector2u size)
}
////////////////////////////////////////////////////////////
void sfWindow_setMinimumSize(sfWindow* window, const sfVector2u* minimumSize)
{
assert(window);
if (minimumSize == nullptr)
{
window->setMinimumSize(std::nullopt);
}
else
{
window->setMinimumSize(convertVector2(*minimumSize));
}
}
////////////////////////////////////////////////////////////
void sfWindow_setMaximumSize(sfWindow* window, const sfVector2u* maximumSize)
{
assert(window);
if (maximumSize == nullptr)
{
window->setMaximumSize(std::nullopt);
}
else
{
window->setMaximumSize(convertVector2(*maximumSize));
}
}
////////////////////////////////////////////////////////////
void sfWindow_setTitle(sfWindow* window, const char* title)
{
+34
View File
@@ -34,6 +34,8 @@
#include <SFML/Window/VideoMode.hpp>
#include <optional>
////////////////////////////////////////////////////////////
sfWindowBase* sfWindowBase_create(sfVideoMode mode, const char* title, uint32_t style, sfWindowState state)
@@ -141,6 +143,38 @@ void sfWindowBase_setSize(sfWindowBase* windowBase, sfVector2u size)
}
////////////////////////////////////////////////////////////
void sfWindowBase_setMinimumSize(sfWindowBase* windowBase, const sfVector2u* minimumSize)
{
assert(windowBase);
if (minimumSize == nullptr)
{
windowBase->setMinimumSize(std::nullopt);
}
else
{
windowBase->setMinimumSize(convertVector2(*minimumSize));
}
}
////////////////////////////////////////////////////////////
void sfWindowBase_setMaximumSize(sfWindowBase* windowBase, const sfVector2u* maximumSize)
{
assert(windowBase);
if (maximumSize == nullptr)
{
windowBase->setMaximumSize(std::nullopt);
}
else
{
windowBase->setMaximumSize(convertVector2(*maximumSize));
}
}
////////////////////////////////////////////////////////////
void sfWindowBase_setTitle(sfWindowBase* windowBase, const char* title)
{
+2 -1
View File
@@ -48,6 +48,7 @@ add_executable(test-csfml-graphics
Graphics/BlendMode.test.cpp
Graphics/Color.test.cpp
Graphics/CoordinateType.test.cpp
Graphics/Image.test.cpp
Graphics/PrimitiveType.test.cpp
Graphics/Rect.test.cpp
Graphics/RenderStates.test.cpp
@@ -59,7 +60,7 @@ add_executable(test-csfml-graphics
)
target_link_libraries(test-csfml-graphics PRIVATE csfml-graphics Catch2::Catch2WithMain SFML::Graphics)
set_target_warnings(test-csfml-graphics)
catch_discover_tests(test-csfml-graphics)
catch_discover_tests(test-csfml-graphics WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
add_executable(test-csfml-network
Network/Ftp.test.cpp
+56
View File
@@ -0,0 +1,56 @@
#include <CSFML/Graphics/Image.h>
#include <catch2/catch_test_macros.hpp>
#include <catch2/generators/catch_generators.hpp>
TEST_CASE("[Graphics] sfImage")
{
SECTION("sfImage_create")
{
const sfImage* image = sfImage_create({100, 100});
REQUIRE(image);
const auto size = sfImage_getSize(image);
CHECK(size.x == 100);
CHECK(size.y == 100);
const auto pixel = sfImage_getPixel(image, {50, 50});
CHECK(pixel.r == sfBlack.r);
CHECK(pixel.g == sfBlack.g);
CHECK(pixel.b == sfBlack.b);
CHECK(pixel.a == sfBlack.a);
CHECK(sfImage_getPixelsPtr(image));
sfImage_destroy(image);
}
SECTION("sfImage_createFromColor")
{
const sfImage* image = sfImage_createFromColor({100, 100}, sfMagenta);
REQUIRE(image);
const auto size = sfImage_getSize(image);
CHECK(size.x == 100);
CHECK(size.y == 100);
const auto pixel = sfImage_getPixel(image, {50, 50});
CHECK(pixel.r == sfMagenta.r);
CHECK(pixel.g == sfMagenta.g);
CHECK(pixel.b == sfMagenta.b);
CHECK(pixel.a == sfMagenta.a);
CHECK(sfImage_getPixelsPtr(image));
sfImage_destroy(image);
}
SECTION("sfImage_createFromFile")
{
const auto filename = std::string("Graphics/sfml-logo-big.") + GENERATE("bmp", "gif", "jpg", "png", "psd");
INFO("Filename: " << filename);
const sfImage* image = sfImage_createFromFile(filename.c_str());
REQUIRE(image);
const auto size = sfImage_getSize(image);
CHECK(size.x == 1001);
CHECK(size.y == 304);
const auto pixel = sfImage_getPixel(image, {0, 0});
CHECK(pixel.r == sfWhite.r);
CHECK(pixel.g == sfWhite.g);
CHECK(pixel.b == sfWhite.b);
CHECK(sfImage_getPixelsPtr(image));
sfImage_destroy(image);
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 892 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 35 KiB

Binary file not shown.
+2 -1
View File
@@ -22,7 +22,8 @@ TEST_CASE("[Network] sfIpAddress")
SECTION("sfIpAddress_fromString")
{
CHECK(sfIpAddress_toInteger(sfIpAddress_fromString("")) == 0);
CHECK(sfIpAddress_toInteger(sfIpAddress_fromString("invalid address")) == 0);
CHECK(sfIpAddress_toInteger(sfIpAddress_fromString("256.256.256.256")) == 0);
CHECK(sfIpAddress_toInteger(sfIpAddress_fromString("localhost")) == 0x7F000001);
CHECK(sfIpAddress_toInteger(sfIpAddress_fromString("192.168.0.1")) == 0xC0A80001);
CHECK(sfIpAddress_toInteger(sfIpAddress_fromString("8.8.8.8")) == 0x08080808);
}
-43
View File
@@ -26,47 +26,4 @@ TEST_CASE("[Window] sfKeyboard")
STATIC_CHECK(sfScanD == static_cast<int>(sf::Keyboard::Scan::D));
STATIC_CHECK(sfScancodeCount == sf::Keyboard::ScancodeCount);
}
SECTION("sfKeyboard_isKeyPressed")
{
CHECK(!sfKeyboard_isKeyPressed(sfKeyW));
CHECK(!sfKeyboard_isKeyPressed(sfKeyA));
CHECK(!sfKeyboard_isKeyPressed(sfKeyS));
CHECK(!sfKeyboard_isKeyPressed(sfKeyD));
}
SECTION("sfKeyboard_isScancodePressed")
{
CHECK(!sfKeyboard_isScancodePressed(sfScanW));
CHECK(!sfKeyboard_isScancodePressed(sfScanA));
CHECK(!sfKeyboard_isScancodePressed(sfScanS));
CHECK(!sfKeyboard_isScancodePressed(sfScanD));
}
SECTION("sfKeyboard_localize")
{
CHECK(sfKeyboard_localize(sfScanSpace) == sfKeySpace);
}
SECTION("sfKeyboard_delocalize")
{
CHECK(sfKeyboard_delocalize(sfKeySpace) == sfScanSpace);
}
SECTION("sfKeyboard_getDescription")
{
using namespace std::string_literals;
CHECK(sfKeyboard_getDescription(sfScanF1) == "F1"s);
CHECK(sfKeyboard_getDescription(sfScanF2) == "F2"s);
CHECK(sfKeyboard_getDescription(sfScanF3) == "F3"s);
CHECK(sfKeyboard_getDescription(sfScanF4) == "F4"s);
CHECK(sfKeyboard_getDescription(sfScanF5) == "F5"s);
CHECK(sfKeyboard_getDescription(sfScanF6) == "F6"s);
CHECK(sfKeyboard_getDescription(sfScanF7) == "F7"s);
CHECK(sfKeyboard_getDescription(sfScanF8) == "F8"s);
CHECK(sfKeyboard_getDescription(sfScanF9) == "F9"s);
CHECK(sfKeyboard_getDescription(sfScanF10) == "F10"s);
CHECK(sfKeyboard_getDescription(sfScanF11) == "F11"s);
CHECK(sfKeyboard_getDescription(sfScanF12) == "F12"s);
}
}
+2 -2
View File
@@ -1,7 +1,7 @@
#!/bin/sh
VERSION="2.6.1"
VERSION_C="2.6.0"
VERSION="3.0.0"
VERSION_C="3.0.0"
# BUILD_CSFML=FALSE
BUILD_CSFML=TRUE
BUILD_SFML=FALSE
+3 -1
View File
@@ -4,7 +4,7 @@
<TargetFramework>netstandard2.0</TargetFramework>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<Version>3.0.0</Version>
<Version>3.0.0-rc.2</Version>
<Authors>Laurent Gomila</Authors>
<PackageTags>sfml csfml</PackageTags>
<Copyright>Copyright © Laurent Gomila</Copyright>
@@ -13,6 +13,7 @@
<PackageProjectUrl>https://www.sfml-dev.org/</PackageProjectUrl>
<PackageIconUrl>https://www.sfml-dev.org/images/sfml-icon.png</PackageIconUrl>
<PackageIcon>sfml-icon.png</PackageIcon>
<PackageReadmeFile>readme.md</PackageReadmeFile>
<PublishRepositoryUrl>true</PublishRepositoryUrl>
<IncludeBuildOutput>false</IncludeBuildOutput>
@@ -31,6 +32,7 @@
<None Pack="True" Include="runtimes/**" PackagePath="runtimes" />
<None Pack="True" Include="build/**" PackagePath="build" />
<None Pack="True" Include="sfml-icon.png" PackagePath="/" />
<None Pack="True" Include="readme.md" PackagePath="/" />
</ItemGroup>
</Project>
+33
View File
@@ -0,0 +1,33 @@
# CSFML - Simple and Fast Multimedia Library for C
SFML is a simple, fast, cross-platform and object-oriented multimedia API.
It provides access to windowing, graphics, audio and network.
It is originally written in C++, and this project is its official binding for the C language.
This NuGet package is designed to provide the required native CSFML libraries for SFML.Net.
## Authors
- Laurent Gomila (laurent@sfml-dev.org)
- Lukas Dürrenberger (eXpl0it3r@sfml-dev.org)
- Chris Thrasher (thrasher@sfml-dev.org)
- Zachariah Brown (contact@zbrown.net)
- And many other members of the SFML community
## Learn
There is no tutorial for CSFML, but since it's a binding you can use the C++ resources:
* The [official tutorials](https://www.sfml-dev.org/tutorials/)
* The [online API documentation](https://www.sfml-dev.org/documentation/)
* The [community wiki](https://github.com/SFML/SFML/wiki/)
* The [community forum](https://en.sfml-dev.org/forums/) (or [French](https://fr.sfml-dev.org/forums/))
Of course, you can also find the CSFML API documentation in the SDK.
## Contribute
SFML and CSFML are open-source projects, and they need your help to go on growing and improving.
Don't hesitate to post suggestions or bug reports on [the forum](https://en.sfml-dev.org/forums/), or post new bugs/features requests on the [issue tracker](https://github.com/SFML/CSFML/issues/).
You can even fork the project on GitHub, maintain your own version and send us pull requests periodically to merge your work.
+2 -1
View File
@@ -42,7 +42,7 @@ echo "Please note that all SFML dependencies must be installed and available to
RID="$1"
SFMLBranch="master" # The branch or tag of the SFML repository to be cloned
SFMLBranch="3.0.1" # 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
@@ -94,6 +94,7 @@ cmake -E env LDFLAGS="-z origin" \
"-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=$SFMLLibDir" \
'-DCMAKE_BUILD_WITH_INSTALL_RPATH=ON' \
'-DCMAKE_INSTALL_RPATH=$ORIGIN' \
'-DSFML_USE_SYSTEM_DEPS=OFF' \
'-DSFML_BUILD_NETWORK=OFF' \
"$SFMLDir"
+4 -33
View File
@@ -46,7 +46,7 @@ echo "Please note that all SFML dependencies must be installed and available to
RID="$1"
SFMLBranch="master" # The branch or tag of the SFML repository to be cloned
SFMLBranch="3.0.1" # 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
@@ -146,39 +146,12 @@ cmake -E env \
"$CSFMLDir"
cmake --build . --config Release --target install
# ============================ #
# STEP 5: Fix RPATH references #
# ============================ #
# ======================================== #
# STEP 5: Copy result to the NuGet folders #
# ======================================== #
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
# 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/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="3.0"
CSFMLMajorMinorPatch="$CSFMLMajorMinor.0"
@@ -208,8 +181,6 @@ copymodule graphics
copymodule system
copymodule window
cp -R "$SFMLLibDir/lib/"*.framework "$OutDir"
popd # Pop CSFML
popd # Pop $RID
popd # Pop Build
+8 -13
View File
@@ -18,6 +18,7 @@ if (-not $RID) {
$Generator = 'Visual Studio 17 2022'
# See also: https://learn.microsoft.com/en-us/dotnet/core/rid-catalog#known-rids
switch ($RID) {
'win-x86' {
$Architecture = 'Win32'
@@ -25,6 +26,9 @@ switch ($RID) {
'win-x64' {
$Architecture = 'x64'
}
'win-arm64' {
$Architecture = 'ARM64'
}
Default {
Write-Error "Unknown RID '$RID'"
exit
@@ -35,7 +39,7 @@ Write-Output "Building $RID"
Write-Output "Using $Generator as the cmake generator"
Write-Output "Using architecture $Architecture"
$SFMLBranch = "master" # The branch or tag of the SFML repository to be cloned
$SFMLBranch = "3.0.1" # 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
@@ -83,17 +87,9 @@ Push-Location "SFML"
$SFMLDir = (Get-Item .).FullName
switch ($RID) {
'win-x86' {
$SFMLExtLibs = (Get-Item ./extlibs/libs-msvc-universal/x86).FullName
}
'win-x64' {
$SFMLExtLibs = (Get-Item ./extlibs/libs-msvc-universal/x64).FullName
}
Default {
Write-Error "Unknown RID '$RID'"
exit
}
IF ($RID -ne 'win-x86' -and $RID -ne 'win-x64' -and $RID -ne 'win-arm64') {
Write-Error "Unknown RID '$RID'"
exit
}
Pop-Location # Pop SFML
@@ -142,7 +138,6 @@ $CSFMLLibDir = (Get-Item lib).FullName; # The directory where the final CSFML dl
cmake `
"-DSFML_ROOT=$SFMLInstallDir" `
'-DCSFML_LINK_SFML_STATICALLY=OFF' `
"-DCMAKE_LIBRARY_PATH=$SFMLExtLibs" `
`
"-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=$CSFMLLibDir" `
"-DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE=$CSFMLLibDir" `