* update to SDL 3.2.0

* remove SDL wrap

* fix darwin and windows CI

* update build box, correct msys sdl3 dependency

* port leftovers from renderer backend to SDL3

* remove SDL main dep
the main implementation is now included in a header

* main.c: use SDL_main.h

This needs to be included to work.

* ci: use vcpkg and pkgconf to support SDL3 on MSVC

* ci: use 7z to create zip

* renwindow: create texture and surface suitable for the display

* system: remove trailing whitespace

* renderer: fix trailing whitespace

* system: fix checking the wrong argument

* system: port rmdir and stat to SDL3 API

* system: remove unneeded API level check

* system: fix wrong parameter index

* system: make set_window_hit_test and set_window_bordered accept a window

* docs/system: update docs

* system: restore some comments

* docs/system: add missing documentation for system.text_input

* system: use SDL_setenv_unsafe

* system: add back comment for setenv

* system,renderer: remove unnecessary SDL_ClearError calls

---------

Co-authored-by: takase1121 <20792268+takase1121@users.noreply.github.com>
(cherry picked from commit 2716f14b6903f055f6bdf010a7e4a3d040cf059d)
This commit is contained in:
takase1121
2025-05-18 22:55:30 +08:00
parent 16d81d0b9c
commit bb05cf3e4d
15 changed files with 338 additions and 446 deletions
+41 -12
View File
@@ -19,7 +19,8 @@ jobs:
matrix:
config:
- { name: "GCC", cc: gcc, cxx: g++ }
- { name: "clang", cc: clang, cxx: clang++ }
# disable this until we have clang in the build box
# - { name: "clang", cc: clang, cxx: clang++ }
env:
CC: ${{ matrix.config.cc }}
CXX: ${{ matrix.config.cxx }}
@@ -35,21 +36,30 @@ jobs:
- name: Checkout code
uses: actions/checkout@v4
# disabled because this will break our own Python install
- name: Python Setup
if: false
uses: actions/setup-python@v5
with:
python-version: "3.11"
# disabled because the container has up-to-date packages
- name: Update Packages
if: false
run: sudo apt-get update
# disabled as the dependencies are already installed
- name: Install Dependencies
if: false
run: bash scripts/install-dependencies.sh --debug
- name: Build
run: |
bash --version
bash scripts/build.sh --debug --forcefallback --portable
uses: docker://ghcr.io/lite-xl/lite-xl-build-box-manylinux:v4
with:
entrypoint: /entrypoint.sh
args: |
bash --version
bash scripts/build.sh --debug --forcefallback --portable
- name: Package
if: ${{ matrix.config.cc == 'gcc' }}
@@ -101,7 +111,7 @@ jobs:
# installing md5sha1sum will eliminate a warning with arm64 and libusb
- name: Install Dependencies
run: |
brew install bash md5sha1sum
brew install bash md5sha1sum sdl3
pip install meson ninja dmgbuild
- name: Build
@@ -192,11 +202,14 @@ jobs:
base-devel
git
zip
mingw-w64-${{ matrix.config.arch }}-gcc
mingw-w64-${{ matrix.config.arch }}-meson
mingw-w64-${{ matrix.config.arch }}-ninja
mingw-w64-${{ matrix.config.arch }}-ca-certificates
mingw-w64-${{ matrix.config.arch }}-ntldd
patch
pacboy: >-
gcc:p
meson:p
ca-certificates:p
ninja:p
pkg-config:p
sdl3:p
- name: Set Environment Variables
run: |
@@ -251,7 +264,23 @@ jobs:
python-version: "3.11"
- name: Install meson and ninja
run: pip install meson ninja
run: pip install --no-cache-dir meson ninja
- name: Export GitHub Actions cache environment variables
uses: actions/github-script@v7
with:
script: |
core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || '');
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '');
- name: Install SDL
env: { VCPKG_BINARY_SOURCES: "clear;x-gha,readwrite" }
run: vcpkg install sdl3:x64-windows-static pkgconf:x64-windows-release
- name: Add environment variables
run: |
echo "PKG_CONFIG_PATH=C:\vcpkg\installed\x64-windows-static\lib\pkgconfig" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
echo "PKG_CONFIG=C:\vcpkg\installed\x64-windows-release\tools\pkgconf\pkgconf.exe" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
- name: Set up environment variables
run: |
@@ -276,7 +305,7 @@ jobs:
- name: Package
run: |
Remove-Item -Recurse -Force -Path "lite-xl/lib","lite-xl/include"
Compress-Archive -Path lite-xl -DestinationPath "$env:INSTALL_NAME.zip"
7z a -mx=9 "$env:INSTALL_NAME.zip" lite-xl
- name: Upload Artifacts
uses: actions/upload-artifact@v4
+12 -9
View File
@@ -92,7 +92,7 @@ jobs:
sudo apt-get install -y ccache
- name: Build Portable
uses: docker://ghcr.io/lite-xl/lite-xl-build-box-manylinux:v3
uses: docker://ghcr.io/lite-xl/lite-xl-build-box-manylinux:v4
with:
entrypoint: /entrypoint.sh
args: |
@@ -100,7 +100,7 @@ jobs:
bash scripts/build.sh --debug --forcefallback --portable --release --lto
- name: Package Portables
uses: docker://ghcr.io/lite-xl/lite-xl-build-box-manylinux:v3
uses: docker://ghcr.io/lite-xl/lite-xl-build-box-manylinux:v4
with:
entrypoint: /entrypoint.sh
args: |
@@ -108,7 +108,7 @@ jobs:
bash scripts/package.sh --version ${INSTALL_REF} --debug --addons --binary --release
- name: Build AppImages
uses: docker://ghcr.io/lite-xl/lite-xl-build-box-manylinux:v3
uses: docker://ghcr.io/lite-xl/lite-xl-build-box-manylinux:v4
with:
entrypoint: /entrypoint.sh
args: |
@@ -164,7 +164,7 @@ jobs:
- name: Install Dependencies
run: |
brew install bash md5sha1sum
brew install bash md5sha1sum sdl3
pip install meson ninja dmgbuild
- name: Build
@@ -269,11 +269,14 @@ jobs:
git
zip
unzip
mingw-w64-${{ matrix.config.arch }}-gcc
mingw-w64-${{ matrix.config.arch }}-meson
mingw-w64-${{ matrix.config.arch }}-ninja
mingw-w64-${{ matrix.config.arch }}-ca-certificates
mingw-w64-${{ matrix.config.arch }}-ntldd
patch
pacboy: >-
gcc:p
meson:p
ca-certificates:p
ninja:p
pkg-config:p
sdl3:p
- name: Set Environment Variables
run: |