Skip to content

Commit 3824954

Browse files
authored
Merge pull request #221 from Ghabry/sdl3
Add SDL3
2 parents 3050ed0 + 10cdb00 commit 3824954

17 files changed

Lines changed: 55 additions & 7 deletions

.github/workflows/stable-compilation.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ jobs:
6464
- name: Build and Install
6565
run: |
6666
cd linux-static
67+
sed -i 's/SDL3_ARGS/SDL3_ARGS -DSDL_UNIX_CONSOLE_BUILD=ON/g' ./2_build_toolchain.sh
6768
./2_build_toolchain.sh
6869
6970
- name: Cleanup

android/1_download_library.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,10 @@ download_and_extract $ICUDATA_URL
166166
rm -rf $SDL2_DIR
167167
download_and_extract $SDL2_URL
168168

169+
# SDL3
170+
rm -rf $SDL3_DIR
171+
download_and_extract $SDL3_URL
172+
169173
# liblcf
170174
rm -rf liblcf
171175
download_liblcf

android/2_build_toolchain.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ if [ ! -f .patches-applied ]; then
4141
fi
4242

4343
# Install SDL2
44+
# FIXME: Remove this when SDL3 migration is done
4445
function install_lib_sdl {
4546
# $1: platform (armeabi-v7a aarch64 x86 x86_x64)
4647

emscripten/1_download_library.sh

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@ else
4343
touch .emscripten
4444

4545
# Download and install the latest SDK tools and set up the compiler configuration to point to it.
46-
./emsdk install 3.1.74
47-
./emsdk activate 3.1.74
46+
./emsdk install 5.0.5
47+
./emsdk activate 5.0.5
4848

4949
# Set the current Emscripten path
5050
source ./emsdk_env.sh
@@ -146,6 +146,10 @@ download_and_extract $ICUDATA_URL
146146
rm -rf $SDL2_DIR
147147
download_and_extract $SDL2_URL
148148

149+
# SDL3
150+
rm -rf $SDL3_DIR
151+
download_and_extract $SDL3_URL
152+
149153
# liblcf
150154
rm -rf liblcf
151155
download_liblcf

emscripten/2_build_toolchain.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,8 @@ install_lib $SDL2_DIR $SDL2_ARGS --disable-assembly --disable-threads --disable-
129129
rm -f config.cache
130130
unset TARGET_HOST
131131

132+
install_lib_cmake $SDL3_DIR $SDL3_ARGS
133+
132134
install_lib_icu_cross
133135
icu_force_data_install
134136

ios/1_download_library.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,10 @@ msg " [3] Downloading platform libraries"
104104
rm -rf $SDL2_DIR
105105
download_and_extract $SDL2_URL
106106

107+
# SDL3
108+
rm -rf $SDL3_DIR
109+
download_and_extract $SDL3_URL
110+
107111
# liblcf
108112
rm -rf liblcf
109113
download_liblcf

ios/2_build_toolchain.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ function build() {
9090
icu_force_data_install
9191
install_lib_liblcf
9292
install_lib_cmake $SDL2_DIR $SDL2_ARGS
93+
install_lib_cmake $SDL3_DIR $SDL3_ARGS
9394
}
9495

9596
export MAKEFLAGS="-j${nproc:-2}"

linux-static/1_download_library.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,10 @@ download_and_extract $ICUDATA_URL
102102
rm -rf $SDL2_DIR
103103
download_and_extract $SDL2_URL
104104

105+
# SDL3
106+
rm -rf $SDL3_DIR
107+
download_and_extract $SDL3_URL
108+
105109
# freeimage (only needed for lmu2png tool!)
106110
rm -rf $FREEIMAGE_DIR
107111
download_and_extract $FREEIMAGE_URL

linux-static/2_build_toolchain.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,3 +68,9 @@ install_lib $ICU_DIR/source $ICU_ARGS
6868
install_lib_liblcf
6969
install_lib $SDL2_DIR $SDL2_ARGS PULSEAUDIO_CFLAGS=-Ixxxdir PULSEAUDIO_LIBS=-lxxxlib
7070
install_lib_cmake $FREEIMAGE_DIR $FREEIMAGE_ARGS
71+
72+
# Ensure that SDL3 finds the system libraries
73+
# They are loaded dynamically and don't add hard dependencies
74+
unset PKG_CONFIG_PATH
75+
unset PKG_CONFIG_LIBDIR
76+
install_lib_cmake $SDL3_DIR $SDL3_ARGS -DSDL_X11_XSCRNSAVER=OFF -DSDL_X11_XTEST=OFF

macos/1_download_library.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,10 @@ msg " [3] Downloading platform libraries"
104104
rm -rf $SDL2_DIR
105105
download_and_extract $SDL2_URL
106106

107+
# SDL3
108+
rm -rf $SDL3_DIR
109+
download_and_extract $SDL3_URL
110+
107111
# freeimage (only needed for lmu2png tool!)
108112
rm -rf $FREEIMAGE_DIR
109113
download_and_extract $FREEIMAGE_URL

0 commit comments

Comments
 (0)