Skip to content

Commit ab332aa

Browse files
committed
update SDL3 to libsdl-org/SDL@038a380 (3.3 development)
1 parent 8830ab0 commit ab332aa

File tree

537 files changed

+49884
-23286
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

537 files changed

+49884
-23286
lines changed
Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
name: 'Setup Nonka N-Gage SDK'
2+
description: 'Download and setup Nokia N-Gage SDK'
3+
inputs:
4+
path:
5+
description: 'Installation path'
6+
default: 'default'
7+
runs:
8+
using: 'composite'
9+
steps:
10+
- uses: actions/setup-python@v5
11+
with:
12+
python-version: '3.x'
13+
- name: 'Verify platform'
14+
id: calc
15+
shell: sh
16+
run: |
17+
case "${{ runner.os }}-${{ runner.arch }}" in
18+
"Windows-X86" | "Windows-X64")
19+
echo "ok!"
20+
echo "cache-key=ngage-sdk-windows" >> ${GITHUB_OUTPUT}
21+
default_install_path="C:/ngagesdk"
22+
;;
23+
*)
24+
echo "Unsupported ${{ runner.os }}-${{ runner.arch }}"
25+
exit 1;
26+
;;
27+
esac
28+
install_path="${{ inputs.path }}"
29+
if [ "x$install_path" = "xdefault" ]; then
30+
install_path="$default_install_path"
31+
fi
32+
echo "install-path=$install_path" >> ${GITHUB_OUTPUT}
33+
34+
toolchain_repo="https://github.com/ngagesdk/ngage-toolchain"
35+
toolchain_branch="main"
36+
echo "toolchain-repo=${toolchain_repo}" >> ${GITHUB_OUTPUT}
37+
echo "toolchain-branch=${toolchain_branch}" >> ${GITHUB_OUTPUT}
38+
39+
sdk_repo="https://github.com/ngagesdk/sdk"
40+
sdk_branch="main"
41+
echo "sdk-repo=${sdk_repo}" >> ${GITHUB_OUTPUT}
42+
echo "sdk-branch=${sdk_branch}" >> ${GITHUB_OUTPUT}
43+
44+
tools_repo="https://github.com/ngagesdk/tools"
45+
tools_branch="main"
46+
echo "tools-repo=${tools_repo}" >> ${GITHUB_OUTPUT}
47+
echo "tools-branch=${tools_branch}" >> ${GITHUB_OUTPUT}
48+
49+
extras_repo="https://github.com/ngagesdk/extras"
50+
extras_branch="main"
51+
echo "extras-repo=${extras_repo}" >> ${GITHUB_OUTPUT}
52+
echo "extras-branch=${extras_branch}" >> ${GITHUB_OUTPUT}
53+
# - name: 'Restore cached ${{ steps.calc.outputs.archive }}'
54+
# id: cache-restore
55+
# uses: actions/cache/restore@v4
56+
# with:
57+
# path: '${{ runner.temp }}'
58+
# key: ${{ steps.calc.outputs.cache-key }}
59+
- name: 'Download N-Gage SDK'
60+
# if: ${{ !steps.cache-restore.outputs.cache-hit || steps.cache-restore.outputs.cache-hit == 'false' }}
61+
shell: pwsh
62+
run: |
63+
64+
Invoke-WebRequest "${{ steps.calc.outputs.toolchain-repo }}/archive/refs/heads/${{ steps.calc.outputs.toolchain-branch }}.zip" -OutFile "${{ runner.temp }}/ngage-toolchain.zip"
65+
Invoke-WebRequest "${{ steps.calc.outputs.sdk-repo }}/archive/refs/heads/${{ steps.calc.outputs.sdk-branch }}.zip" -OutFile "${{ runner.temp }}/sdk.zip"
66+
Invoke-WebRequest "${{ steps.calc.outputs.tools-repo }}/archive/refs/heads/${{ steps.calc.outputs.tools-branch }}.zip" -OutFile "${{ runner.temp }}/tools.zip"
67+
Invoke-WebRequest "${{ steps.calc.outputs.extras-repo }}/archive/refs/heads/${{ steps.calc.outputs.extras-branch }}.zip" -OutFile "${{ runner.temp }}/extras.zip"
68+
69+
# - name: 'Cache ${{ steps.calc.outputs.archive }}'
70+
# if: ${{ !steps.cache-restore.outputs.cache-hit || steps.cache-restore.outputs.cache-hit == 'false' }}
71+
# uses: actions/cache/save@v4
72+
# with:
73+
# path: |
74+
# ${{ runner.temp }}/apps.zip
75+
# ${{ runner.temp }}/sdk.zip
76+
# ${{ runner.temp }}/tools.zip
77+
# key: ${{ steps.calc.outputs.cache-key }}
78+
- name: 'Extract N-Gage SDK'
79+
shell: pwsh
80+
run: |
81+
New-Item -ItemType Directory -Path "${{ steps.calc.outputs.install-path }}" -Force
82+
83+
New-Item -ItemType Directory -Path "${{ runner.temp }}/ngage-toolchain-temp" -Force
84+
7z "-o${{ runner.temp }}/ngage-toolchain-temp" x "${{ runner.temp }}/ngage-toolchain.zip"
85+
Move-Item -Path "${{ runner.temp }}/ngage-toolchain-temp/ngage-toolchain-${{ steps.calc.outputs.toolchain-branch }}/*" -Destination "${{ steps.calc.outputs.install-path }}"
86+
87+
7z "-o${{ steps.calc.outputs.install-path }}/sdk" x "${{ runner.temp }}/sdk.zip"
88+
Move-Item -Path "${{ steps.calc.outputs.install-path }}/sdk/sdk-${{ steps.calc.outputs.sdk-branch }}" -Destination "${{ steps.calc.outputs.install-path }}/sdk/sdk"
89+
90+
7z "-o${{ steps.calc.outputs.install-path }}/sdk" x "${{ runner.temp }}/tools.zip"
91+
Move-Item -Path "${{ steps.calc.outputs.install-path }}/sdk/tools-${{ steps.calc.outputs.tools-branch }}" -Destination "${{ steps.calc.outputs.install-path }}/sdk/tools"
92+
93+
7z "-o${{ steps.calc.outputs.install-path }}/sdk" x "${{ runner.temp }}/extras.zip"
94+
Move-Item -Path "${{ steps.calc.outputs.install-path }}/sdk/extras-${{ steps.calc.outputs.extras-branch }}" -Destination "${{ steps.calc.outputs.install-path }}/sdk/extras"
95+
- name: 'Set output variables'
96+
id: final
97+
shell: sh
98+
run: |
99+
echo "${{ steps.calc.outputs.install-path }}/sdk/sdk/6.1/Shared/EPOC32/gcc/bin" >> $GITHUB_PATH
100+
echo "${{ steps.calc.outputs.install-path }}/sdk/sdk/6.1/Shared/EPOC32/ngagesdk/bin" >> $GITHUB_PATH
101+
echo "NGAGESDK=${{ steps.calc.outputs.install-path }}" >> $GITHUB_ENV
102+
echo "CMAKE_TOOLCHAIN_FILE=${{ steps.calc.outputs.install-path }}/cmake/ngage-toolchain.cmake" >> $GITHUB_ENV

libs/SDL3/.github/workflows/create-test-plan.py

Lines changed: 23 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ class SdlPlatform(Enum):
5454
Riscos = "riscos"
5555
FreeBSD = "freebsd"
5656
NetBSD = "netbsd"
57+
NGage = "ngage"
5758

5859

5960
class Msys2Platform(Enum):
@@ -113,7 +114,8 @@ class JobSpec:
113114
"msvc-gdk-x64": JobSpec(name="GDK (MSVC, x64)", os=JobOs.WindowsLatest, platform=SdlPlatform.Msvc, artifact="SDL-VC-GDK", msvc_arch=MsvcArch.X64, msvc_project="VisualC-GDK/SDL.sln", gdk=True, no_cmake=True, ),
114115
"ubuntu-22.04": JobSpec(name="Ubuntu 22.04", os=JobOs.Ubuntu22_04, platform=SdlPlatform.Linux, artifact="SDL-ubuntu22.04", ),
115116
"ubuntu-24.04-arm64": JobSpec(name="Ubuntu 24.04 (ARM64)", os=JobOs.Ubuntu24_04_arm, platform=SdlPlatform.Linux, artifact="SDL-ubuntu24.04-arm64", ),
116-
"steamrt-sniper": JobSpec(name="Steam Linux Runtime (Sniper)", os=JobOs.UbuntuLatest, platform=SdlPlatform.Linux, artifact="SDL-slrsniper", container="registry.gitlab.steamos.cloud/steamrt/sniper/sdk:beta", ),
117+
"steamrt3": JobSpec(name="Steam Linux Runtime 3.0 (x86_64)", os=JobOs.UbuntuLatest, platform=SdlPlatform.Linux, artifact="SDL-steamrt3", container="registry.gitlab.steamos.cloud/steamrt/sniper/sdk:latest", ),
118+
"steamrt3-arm64": JobSpec(name="Steam Linux Runtime 3.0 (arm64)", os=JobOs.Ubuntu24_04_arm, platform=SdlPlatform.Linux, artifact="SDL-steamrt3-arm64", container="registry.gitlab.steamos.cloud/steamrt/sniper/sdk/arm64:latest", ),
117119
"ubuntu-intel-icx": JobSpec(name="Ubuntu 22.04 (Intel oneAPI)", os=JobOs.Ubuntu22_04, platform=SdlPlatform.Linux, artifact="SDL-ubuntu22.04-oneapi", intel=IntelCompiler.Icx, ),
118120
"ubuntu-intel-icc": JobSpec(name="Ubuntu 22.04 (Intel Compiler)", os=JobOs.Ubuntu22_04, platform=SdlPlatform.Linux, artifact="SDL-ubuntu22.04-icc", intel=IntelCompiler.Icc, ),
119121
"macos-framework-x64": JobSpec(name="MacOS (Framework) (x64)", os=JobOs.Macos13, platform=SdlPlatform.MacOS, artifact="SDL-macos-framework", apple_framework=True, apple_archs={AppleArch.Aarch64, AppleArch.X86_64, }, xcode=True, ),
@@ -138,11 +140,12 @@ class JobSpec:
138140
"riscos": JobSpec(name="RISC OS", os=JobOs.UbuntuLatest, platform=SdlPlatform.Riscos, artifact="SDL-riscos", container="riscosdotinfo/riscos-gccsdk-4.7:latest", ),
139141
"netbsd": JobSpec(name="NetBSD", os=JobOs.UbuntuLatest, platform=SdlPlatform.NetBSD, artifact="SDL-netbsd-x64", ),
140142
"freebsd": JobSpec(name="FreeBSD", os=JobOs.UbuntuLatest, platform=SdlPlatform.FreeBSD, artifact="SDL-freebsd-x64", ),
143+
"ngage": JobSpec(name="N-Gage", os=JobOs.WindowsLatest, platform=SdlPlatform.NGage, artifact="SDL-ngage", ),
141144
}
142145

143146

144147
class StaticLibType(Enum):
145-
MSVC = "SDL3-static.lib"
148+
STATIC_LIB = "SDL3-static.lib"
146149
A = "libSDL3.a"
147150

148151

@@ -222,6 +225,7 @@ class JobDetails:
222225
check_sources: bool = False
223226
setup_python: bool = False
224227
pypi_packages: list[str] = dataclasses.field(default_factory=list)
228+
setup_gage_sdk_path: str = ""
225229

226230
def to_workflow(self, enable_artifacts: bool) -> dict[str, str|bool]:
227231
data = {
@@ -289,6 +293,7 @@ def to_workflow(self, enable_artifacts: bool) -> dict[str, str|bool]:
289293
"check-sources": self.check_sources,
290294
"setup-python": self.setup_python,
291295
"pypi-packages": my_shlex_join(self.pypi_packages),
296+
"setup-ngage-sdk-path": self.setup_gage_sdk_path,
292297
}
293298
return {k: v for k, v in data.items() if v != ""}
294299

@@ -364,7 +369,7 @@ def spec_to_job(spec: JobSpec, key: str, trackmem_symbol_names: bool) -> JobDeta
364369
job.msvc_project_flags.append("-p:TreatWarningsAsError=true")
365370
job.test_pkg_config = False
366371
job.shared_lib = SharedLibType.WIN32
367-
job.static_lib = StaticLibType.MSVC
372+
job.static_lib = StaticLibType.STATIC_LIB
368373
job.cmake_arguments.extend((
369374
"-DCMAKE_MSVC_DEBUG_INFORMATION_FORMAT=ProgramDatabase",
370375
"-DCMAKE_EXE_LINKER_FLAGS=-DEBUG",
@@ -381,9 +386,11 @@ def spec_to_job(spec: JobSpec, key: str, trackmem_symbol_names: bool) -> JobDeta
381386
match spec.msvc_arch:
382387
case MsvcArch.X86:
383388
job.cflags.append("/clang:-m32")
389+
job.cxxflags.append("/clang:-m32")
384390
job.ldflags.append("/MACHINE:X86")
385391
case MsvcArch.X64:
386392
job.cflags.append("/clang:-m64")
393+
job.cxxflags.append("/clang:-m64")
387394
job.ldflags.append("/MACHINE:X64")
388395
case _:
389396
raise ValueError(f"Unsupported clang-cl architecture (arch={spec.msvc_arch})")
@@ -737,6 +744,19 @@ def spec_to_job(spec: JobSpec, key: str, trackmem_symbol_names: bool) -> JobDeta
737744
job.cpactions_arch = "x86-64"
738745
job.cpactions_setup_cmd = "export PATH=\"/usr/pkg/sbin:/usr/pkg/bin:/sbin:$PATH\"; export PKG_CONFIG_PATH=\"/usr/pkg/lib/pkgconfig\";export PKG_PATH=\"https://cdn.netBSD.org/pub/pkgsrc/packages/NetBSD/$(uname -p)/$(uname -r|cut -f \"1 2\" -d.)/All/\";echo \"PKG_PATH=$PKG_PATH\";echo \"uname -a -> \"$(uname -a)\"\";sudo -E sysctl -w security.pax.aslr.enabled=0;sudo -E sysctl -w security.pax.aslr.global=0;sudo -E pkgin clean;sudo -E pkgin update"
739746
job.cpactions_install_cmd = "sudo -E pkgin -y install cmake dbus pkgconf ninja-build pulseaudio libxkbcommon wayland wayland-protocols libinotify libusb1"
747+
case SdlPlatform.NGage:
748+
build_parallel = False
749+
job.cmake_build_type = "Release"
750+
job.setup_ninja = True
751+
job.static_lib = StaticLibType.STATIC_LIB
752+
job.shared_lib = None
753+
job.clang_tidy = False
754+
job.werror = False # FIXME: enable SDL_WERROR
755+
job.shared = False
756+
job.run_tests = False
757+
job.setup_gage_sdk_path = "C:/ngagesdk"
758+
job.cmake_toolchain_file = "C:/ngagesdk/cmake/ngage-toolchain.cmake"
759+
job.test_pkg_config = False
740760
case _:
741761
raise ValueError(f"Unsupported platform={spec.platform}")
742762

libs/SDL3/.github/workflows/generic.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,11 @@ jobs:
9393
with:
9494
arch: ${{ matrix.platform.msvc-vcvars-arch }}
9595
sdk: ${{ matrix.platform.msvc-vcvars-sdk }}
96+
- name: 'Set up Nokia N-Gage SDK'
97+
uses: ./.github/actions/setup-ngage-sdk
98+
if: ${{ matrix.platform.setup-ngage-sdk-path != '' }}
99+
with:
100+
path: '${{ matrix.platform.setup-ngage-sdk-path }}'
96101
- name: 'Set up Windows GDK Desktop'
97102
uses: ./.github/actions/setup-gdk-desktop
98103
if: ${{ matrix.platform.setup-gdk-folder != '' }}

libs/SDL3/.github/workflows/release.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -532,6 +532,7 @@ jobs:
532532
with:
533533
sparse-checkout: 'build-scripts/build-release.py'
534534
- name: 'Setup Android NDK'
535+
id: setup-ndk
535536
uses: nttld/setup-ndk@v1
536537
with:
537538
local-cache: true
@@ -561,6 +562,8 @@ jobs:
561562
run: |
562563
python build-scripts/build-release.py \
563564
--actions android \
565+
--android-api 23 \
566+
--android-ndk-home "${{ steps.setup-ndk.outputs.ndk-path }}" \
564567
--commit ${{ inputs.commit }} \
565568
--root "${{ steps.tar.outputs.path }}" \
566569
--github \

libs/SDL3/.wikiheaders-options

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ versionfname = include/SDL3/SDL_version.h
99
versionmajorregex = \A\#define\s+SDL_MAJOR_VERSION\s+(\d+)\Z
1010
versionminorregex = \A\#define\s+SDL_MINOR_VERSION\s+(\d+)\Z
1111
versionmicroregex = \A\#define\s+SDL_MICRO_VERSION\s+(\d+)\Z
12+
apipropertyregex = \A\s*\#\s*define\s+SDL_PROP_
1213
selectheaderregex = \ASDL.*?\.h\Z
1314
projecturl = https://libsdl.org/
1415
wikiurl = https://wiki.libsdl.org
@@ -25,7 +26,7 @@ manpagesymbolfilterregex = \A[US]int\d+\Z
2526
headercategoryeval = s/\ASDL_test_?.*?\.h\Z//; s/\ASDL_?(.*?)\.h\Z/$1/; ucfirst();
2627

2728
quickrefenabled = 1
28-
quickrefcategoryorder = Init,Hints,Error,Version,Properties,Log,Video,Events,Keyboard,Mouse,Touch,Gamepad,Joystick,Haptic,Audio,Time,Timer,Render,SharedObject,Thread,Mutex,Atomic,Filesystem,IOStream,AsyncIO,Storage,Pixels,Surface,Blendmode,Rect,Camera,Clipboard,Dialog,GPU,Messagebox,Vulkan,Metal,Platform,Power,Sensor,Process,Bits,Endian,Assert,CPUInfo,Intrinsics,Locale,System,Misc,GUID,Main,Stdinc
29+
quickrefcategoryorder = Init,Hints,Error,Version,Properties,Log,Video,Events,Keyboard,Mouse,Touch,Gamepad,Joystick,Haptic,Audio,Time,Timer,Render,SharedObject,Thread,Mutex,Atomic,Filesystem,IOStream,AsyncIO,Storage,Pixels,Surface,Blendmode,Rect,Camera,Clipboard,Dialog,Tray,Messagebox,GPU,Vulkan,Metal,Platform,Power,Sensor,Process,Bits,Endian,Assert,CPUInfo,Intrinsics,Locale,System,Misc,GUID,Main,Stdinc
2930
quickreftitle = SDL3 API Quick Reference
3031
quickrefurl = https://libsdl.org/
3132
quickrefdesc = The latest version of this document can be found at https://wiki.libsdl.org/SDL3/QuickReference

libs/SDL3/Android.mk

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ LOCAL_SRC_FILES := \
4242
$(wildcard $(LOCAL_PATH)/src/haptic/*.c) \
4343
$(wildcard $(LOCAL_PATH)/src/haptic/android/*.c) \
4444
$(wildcard $(LOCAL_PATH)/src/haptic/dummy/*.c) \
45+
$(wildcard $(LOCAL_PATH)/src/haptic/hidapi/*.c) \
4546
$(wildcard $(LOCAL_PATH)/src/hidapi/*.c) \
4647
$(wildcard $(LOCAL_PATH)/src/hidapi/android/*.cpp) \
4748
$(wildcard $(LOCAL_PATH)/src/joystick/*.c) \

0 commit comments

Comments
 (0)