Author SHA1 Message Date
Lukas Dürrenberger 2537d27991 Build SFML dynamically for the windows release packages 2024-06-05 20:27:59 +02:00
8 changed files with 16 additions and 67 deletions

No files matched your search

+2 -2
View File
@@ -23,7 +23,7 @@ jobs:
- { name: Windows Clang, os: windows-2022, flags: -GNinja -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ } - { name: Windows Clang, os: windows-2022, flags: -GNinja -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ }
- { name: Linux GCC, os: ubuntu-22.04, flags: -GNinja } - { 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: Linux Clang, os: ubuntu-22.04, flags: -GNinja -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ }
- { name: MacOS, os: macos-13, flags: -GNinja } - { name: MacOS, os: macos-12, flags: -GNinja }
type: type:
- { name: Debug } - { name: Debug }
- { name: Release } - { name: Release }
@@ -42,7 +42,7 @@ jobs:
uses: actions/checkout@v4 uses: actions/checkout@v4
with: with:
repository: SFML/SFML repository: SFML/SFML
ref: 2.6.2 ref: 2.6.1
path: SFML path: SFML
- name: Configure SFML CMake - name: Configure SFML CMake
+1 -4
View File
@@ -1,10 +1,7 @@
name: NuGet Release name: NuGet Release
on: on:
push: push: {}
branches:
- master
- 2.6.x
workflow_dispatch: {} workflow_dispatch: {}
concurrency: concurrency:
+7 -10
View File
@@ -1,12 +1,7 @@
name: Release Builds name: Release Builds
on: on:
push: push: {}
branches:
- master
- 2.6.x
tags:
- "**"
workflow_dispatch: {} workflow_dispatch: {}
concurrency: concurrency:
@@ -51,12 +46,12 @@ jobs:
- name: Build SFML - name: Build SFML
run: | run: |
cmake -S SFML -B SFML-build -A Win32 -G "Visual Studio 17 2022" -DBUILD_SHARED_LIBS=FALSE -DSFML_USE_STATIC_STD_LIBS=TRUE -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=${{ github.workspace }}/SFML-install -DCMAKE_VERBOSE_MAKEFILE=ON cmake -S SFML -B SFML-build -A Win32 -G "Visual Studio 17 2022" -DBUILD_SHARED_LIBS=TRUE -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=${{ github.workspace }}/SFML-install -DCMAKE_VERBOSE_MAKEFILE=ON
cmake --build SFML-build --config Release --target install cmake --build SFML-build --config Release --target install
- name: Build CSFML - name: Build CSFML
run: | run: |
cmake -S CSFML -B CSFML-build -A Win32 -G "Visual Studio 17 2022" -DBUILD_SHARED_LIBS=TRUE -DSTATIC_STD_LIBS=TRUE -DCSFML_LINK_SFML_STATICALLY=TRUE -DCMAKE_BUILD_TYPE=Release -DSFML_DIR=${{ github.workspace }}/SFML-install/lib/cmake/SFML -DCMAKE_INSTALL_PREFIX=${{ github.workspace }}/CSFML-install -DCMAKE_VERBOSE_MAKEFILE=ON cmake -S CSFML -B CSFML-build -A Win32 -G "Visual Studio 17 2022" -DBUILD_SHARED_LIBS=TRUE -DCSFML_LINK_SFML_STATICALLY=FALSE -DCMAKE_BUILD_TYPE=Release -DSFML_DIR=${{ github.workspace }}/SFML-install/lib/cmake/SFML -DCMAKE_INSTALL_PREFIX=${{ github.workspace }}/CSFML-install -DCMAKE_VERBOSE_MAKEFILE=ON
cmake --build CSFML-build --config Release --target install cmake --build CSFML-build --config Release --target install
- name: Add MinGW to PATH - name: Add MinGW to PATH
@@ -93,6 +88,7 @@ jobs:
Pop-Location Pop-Location
New-Item -ItemType "directory" -PATH "install" New-Item -ItemType "directory" -PATH "install"
Move-Item -Path "SFML-install\bin\*" -Destination "install\CSFML"
Move-Item -Path "CSFML-install\*" -Destination "install\CSFML" Move-Item -Path "CSFML-install\*" -Destination "install\CSFML"
- name: Upload Artifact - name: Upload Artifact
@@ -138,12 +134,12 @@ jobs:
- name: Build SFML - name: Build SFML
run: | run: |
cmake -S SFML -B SFML-build -A x64 -G "Visual Studio 17 2022" -DBUILD_SHARED_LIBS=FALSE -DSFML_USE_STATIC_STD_LIBS=TRUE -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=${{ github.workspace }}/SFML-install -DCMAKE_VERBOSE_MAKEFILE=ON cmake -S SFML -B SFML-build -A x64 -G "Visual Studio 17 2022" -DBUILD_SHARED_LIBS=TRUE -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=${{ github.workspace }}/SFML-install -DCMAKE_VERBOSE_MAKEFILE=ON
cmake --build SFML-build --config Release --target install cmake --build SFML-build --config Release --target install
- name: Build CSFML - name: Build CSFML
run: | run: |
cmake -S CSFML -B CSFML-build -A x64 -G "Visual Studio 17 2022" -DBUILD_SHARED_LIBS=TRUE -DSTATIC_STD_LIBS=TRUE -DCSFML_LINK_SFML_STATICALLY=TRUE -DCMAKE_BUILD_TYPE=Release -DSFML_DIR=${{ github.workspace }}/SFML-install/lib/cmake/SFML -DCMAKE_INSTALL_PREFIX=${{ github.workspace }}/CSFML-install -DCMAKE_VERBOSE_MAKEFILE=ON cmake -S CSFML -B CSFML-build -A x64 -G "Visual Studio 17 2022" -DBUILD_SHARED_LIBS=TRUE -DCSFML_LINK_SFML_STATICALLY=FALSE -DCMAKE_BUILD_TYPE=Release -DSFML_DIR=${{ github.workspace }}/SFML-install/lib/cmake/SFML -DCMAKE_INSTALL_PREFIX=${{ github.workspace }}/CSFML-install -DCMAKE_VERBOSE_MAKEFILE=ON
cmake --build CSFML-build --config Release --target install cmake --build CSFML-build --config Release --target install
- name: Add MinGW to PATH - name: Add MinGW to PATH
@@ -180,6 +176,7 @@ jobs:
Pop-Location Pop-Location
New-Item -ItemType "directory" -PATH "install" New-Item -ItemType "directory" -PATH "install"
Move-Item -Path "SFML-install\bin\*" -Destination "install\CSFML"
Move-Item -Path "CSFML-install\*" -Destination "install\CSFML" Move-Item -Path "CSFML-install\*" -Destination "install\CSFML"
- name: Upload Artifact - name: Upload Artifact
+1 -1
View File
@@ -48,7 +48,7 @@ add_custom_target(doc ALL
install(DIRECTORY ${DOXYGEN_OUTPUT_DIR}/html install(DIRECTORY ${DOXYGEN_OUTPUT_DIR}/html
DESTINATION ${INSTALL_MISC_DIR}/doc DESTINATION ${INSTALL_MISC_DIR}/doc
COMPONENT doc) COMPONENT doc)
if(DOXYGEN_GENERATE_HTMLHELP) if(DOXYGEN_HHC_PROGRAM)
install(FILES ${DOXYGEN_OUTPUT_DIR}/CSFML.chm install(FILES ${DOXYGEN_OUTPUT_DIR}/CSFML.chm
DESTINATION ${INSTALL_MISC_DIR}/doc DESTINATION ${INSTALL_MISC_DIR}/doc
COMPONENT doc) COMPONENT doc)
-32
View File
@@ -129,37 +129,5 @@ CSFML_AUDIO_API sfBool sfSoundBufferRecorder_setDevice(sfSoundBufferRecorder* so
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
CSFML_AUDIO_API const char* sfSoundBufferRecorder_getDevice(sfSoundBufferRecorder* soundBufferRecorder); CSFML_AUDIO_API const char* sfSoundBufferRecorder_getDevice(sfSoundBufferRecorder* soundBufferRecorder);
////////////////////////////////////////////////////////////
/// \brief Set the channel count of the audio capture device
///
/// This method allows you to specify the number of channels
/// used for recording. Currently only 16-bit mono and
/// 16-bit stereo are supported.
///
/// \param soundBufferRecorder Sound buffer recorder object
/// \param channelCount Number of channels. Currently only
/// mono (1) and stereo (2) are supported.
///
/// \see sfSoundBufferRecorder_getChannelCount
///
////////////////////////////////////////////////////////////
CSFML_AUDIO_API void sfSoundBufferRecorder_setChannelCount(sfSoundBufferRecorder* soundBufferRecorder,
unsigned int channelCount);
////////////////////////////////////////////////////////////
/// \brief Get the number of channels used by this recorder
///
/// Currently only mono and stereo are supported, so the
/// value is either 1 (for mono) or 2 (for stereo).
///
/// \param soundBufferRecorder Sound buffer recorder object
///
/// \return Number of channels
///
/// \see sfSoundBufferRecorder_setChannelCount
///
////////////////////////////////////////////////////////////
CSFML_AUDIO_API unsigned int sfSoundBufferRecorder_getChannelCount(const sfSoundBufferRecorder* soundBufferRecorder);
#endif // SFML_SOUNDBUFFERRECORDER_H #endif // SFML_SOUNDBUFFERRECORDER_H
-14
View File
@@ -90,17 +90,3 @@ const char* sfSoundBufferRecorder_getDevice(sfSoundBufferRecorder* soundBufferRe
return soundBufferRecorder->DeviceName.c_str(); return soundBufferRecorder->DeviceName.c_str();
} }
////////////////////////////////////////////////////////////
void sfSoundBufferRecorder_setChannelCount(sfSoundBufferRecorder* soundBufferRecorder, unsigned int channelCount)
{
CSFML_CALL(soundBufferRecorder, setChannelCount(channelCount));
}
////////////////////////////////////////////////////////////
unsigned int sfSoundBufferRecorder_getChannelCount(const sfSoundBufferRecorder* soundBufferRecorder)
{
CSFML_CALL_RETURN(soundBufferRecorder, getChannelCount(), 0);
}
+1 -1
View File
@@ -168,7 +168,7 @@ fixrpath()
} }
fixrpath audio "@rpath/../Frameworks/OpenAL.framework/Versions/A/OpenAL" "@rpath/OpenAL.framework/Versions/A/OpenAL" 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/vorbisenc" 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/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/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/ogg.framework/Versions/A/ogg" "@rpath/ogg.framework/Versions/A/ogg"
+4 -3
View File
@@ -115,10 +115,10 @@ New-Push SFML
$SFMLBuiltDir = Get-Location # The directory where SFML was built to. Used later to direct cmake when building CSFML $SFMLBuiltDir = Get-Location # The directory where SFML was built to. Used later to direct cmake when building CSFML
cmake ` cmake `
'-DBUILD_SHARED_LIBS=0' ` '-DBUILD_SHARED_LIBS=1' `
'-DCMAKE_BUILD_TYPE=Release' ` '-DCMAKE_BUILD_TYPE=Release' `
'-DCMAKE_SYSTEM_VERSION=8.1' ` '-DCMAKE_SYSTEM_VERSION=8.1' `
'-DSFML_USE_STATIC_STD_LIBS=1' ` '-DSFML_USE_STATIC_STD_LIBS=0' `
'-DSFML_BUILD_NETWORK=0' ` '-DSFML_BUILD_NETWORK=0' `
"-G$Generator" ` "-G$Generator" `
"-A$Architecture" ` "-A$Architecture" `
@@ -142,7 +142,7 @@ $CSFMLLibDir = (Get-Item lib).FullName; # The directory where the final CSFML dl
cmake ` cmake `
"-DSFML_DIR=$SFMLBuiltDir" ` "-DSFML_DIR=$SFMLBuiltDir" `
'-DCSFML_LINK_SFML_STATICALLY=1' ` '-DCSFML_LINK_SFML_STATICALLY=0' `
"-DCMAKE_LIBRARY_PATH=$SFMLExtLibs" ` "-DCMAKE_LIBRARY_PATH=$SFMLExtLibs" `
` `
"-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=$CSFMLLibDir" ` "-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=$CSFMLLibDir" `
@@ -193,6 +193,7 @@ function Copy-Module($module) {
Write-Output "Copying CSFML $module" Write-Output "Copying CSFML $module"
New-Item -ItemType Directory $OutDir -ErrorAction Ignore > $null New-Item -ItemType Directory $OutDir -ErrorAction Ignore > $null
Copy-Item "$SFMLBuiltDir/bin/sfml-$module-2.dll" "$OutDir" -Force > $null
Copy-Item "$CSFMLLibDir/csfml-$module-2.dll" "$OutDir/csfml-$module.dll" -Force > $null Copy-Item "$CSFMLLibDir/csfml-$module-2.dll" "$OutDir/csfml-$module.dll" -Force > $null
} }