From 1616f6056c80780136d0b9c8d830f7f678a0f1ee Mon Sep 17 00:00:00 2001 From: "MINI\\jairo" Date: Thu, 19 Jun 2025 07:08:49 -0500 Subject: [PATCH 01/10] Fix fetch submodule recursively for libtiff --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 3a3372a..820caab 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -27,7 +27,7 @@ jobs: steps: - uses: actions/checkout@v4 with: - submodules: true + submodules: recursive - name: Build (Linux ARM) if: contains(matrix.platform.container, 'arm') From 318c2d8527d0f78792b74dc31afe2f98bc1a3b51 Mon Sep 17 00:00:00 2001 From: "MINI\\jairo" Date: Thu, 19 Jun 2025 07:18:20 -0500 Subject: [PATCH 02/10] Fix path for copying DLLs of SDL3_ttf --- .idea/.idea.SDL3-CS/.idea/AndroidProjectSystem.xml | 6 ++++++ External/build.sh | 14 +++++++++----- 2 files changed, 15 insertions(+), 5 deletions(-) create mode 100644 .idea/.idea.SDL3-CS/.idea/AndroidProjectSystem.xml diff --git a/.idea/.idea.SDL3-CS/.idea/AndroidProjectSystem.xml b/.idea/.idea.SDL3-CS/.idea/AndroidProjectSystem.xml new file mode 100644 index 0000000..e82600c --- /dev/null +++ b/.idea/.idea.SDL3-CS/.idea/AndroidProjectSystem.xml @@ -0,0 +1,6 @@ + + + + + \ No newline at end of file diff --git a/External/build.sh b/External/build.sh index 3fd6a8b..38b35d7 100755 --- a/External/build.sh +++ b/External/build.sh @@ -10,7 +10,11 @@ if [[ -z $NAME || -z $RUNNER_OS || -z $FLAGS ]]; then exit 1 fi -SUDO=$(which sudo || exit 0) +if [[ $RUNNER_OS == 'Windows' ]]; then + SUDO="" +else + SUDO=$(which sudo || exit 0) +fi export DEBIAN_FRONTEND=noninteractive @@ -121,18 +125,18 @@ fi # Build SDL_ttf pushd SDL_ttf git reset --hard HEAD -cmake -B build $FLAGS -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DSDL_SHARED_ENABLED_BY_DEFAULT=ON -DSDL_STATIC_ENABLED_BY_DEFAULT=ON -DCMAKE_PREFIX_PATH="../SDL/install_output/cmake/" +cmake -B build $FLAGS -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DSDL_SHARED_ENABLED_BY_DEFAULT=ON -DSDL_STATIC_ENABLED_BY_DEFAULT=ON -DCMAKE_PREFIX_PATH="../SDL/install_output/cmake/" -DCMAKE_POLICY_VERSION_MINIMUM=3.5 cmake --build build/ --config Release $SUDO cmake --install build/ --prefix install_output --config Release popd # Move build lib into correct folders if [[ $RUNNER_OS == 'Windows' ]]; then - cp SDL3_ttf/install_output/bin/SDL3_ttf.dll ../native/$NAME/SDL3_ttf.dll + cp SDL_ttf/install_output/bin/SDL3_ttf.dll ../native/$NAME/SDL3_ttf.dll elif [[ $RUNNER_OS == 'Linux' ]]; then - cp SDL3_ttf/install_output/lib/libSDL3_ttf.so ../native/$NAME/libSDL3_ttf.so + cp SDL_ttf/install_output/lib/libSDL3_ttf.so ../native/$NAME/libSDL3_ttf.so elif [[ $RUNNER_OS == 'macOS' ]]; then - cp SDL3_ttf/install_output/lib/libSDL3_ttf.dylib ../native/$NAME/libSDL3_ttf.dylib + cp SDL_ttf/install_output/lib/libSDL3_ttf.dylib ../native/$NAME/libSDL3_ttf.dylib fi popd From 49da8cf519fa2723b862ec0a08482de5296ebf8b Mon Sep 17 00:00:00 2001 From: "MINI\\jairo" Date: Thu, 19 Jun 2025 07:18:45 -0500 Subject: [PATCH 03/10] Fix path for copying DLLs of SDL3_ttf --- .idea/.idea.SDL3-CS/.idea/AndroidProjectSystem.xml | 6 ------ 1 file changed, 6 deletions(-) delete mode 100644 .idea/.idea.SDL3-CS/.idea/AndroidProjectSystem.xml diff --git a/.idea/.idea.SDL3-CS/.idea/AndroidProjectSystem.xml b/.idea/.idea.SDL3-CS/.idea/AndroidProjectSystem.xml deleted file mode 100644 index e82600c..0000000 --- a/.idea/.idea.SDL3-CS/.idea/AndroidProjectSystem.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - \ No newline at end of file From f5dcc15710f6e1e75a48aba6bf786af3dafc9174 Mon Sep 17 00:00:00 2001 From: "MINI\\jairo" Date: Thu, 19 Jun 2025 07:29:52 -0500 Subject: [PATCH 04/10] Fix path for CMAKE_PREFIX_PATH in different archs --- External/build.sh | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/External/build.sh b/External/build.sh index 38b35d7..d8b1332 100755 --- a/External/build.sh +++ b/External/build.sh @@ -98,12 +98,21 @@ elif [[ $RUNNER_OS == 'macOS' ]]; then cp SDL/install_output/lib/libSDL3.dylib ../native/$NAME/libSDL3.dylib fi +# Use the correct CMAKE_PREFIX_PATH for SDL_image and SDL_ttf, probably due differences in Cmake versions +if [[ $RUNNER_OS == 'Windows' ]]; then + CMAKE_PREFIX_PATH="../SDL/install_output/cmake/" +elif [[ $RUNNER_OS == 'Linux' ]]; then + CMAKE_PREFIX_PATH="../SDL/install_output/cmake/SDL3/" +elif [[ $RUNNER_OS == 'macOS' ]]; then + CMAKE_PREFIX_PATH="../SDL/install_output/cmake/SDL3/" +fi + # Build SDL_image pushd SDL_image git reset --hard HEAD # -DSDLIMAGE_AVIF=OFF is used because windows requires special setup to build avif support (nasm) # TODO: Add support for avif on windows (VisualC script uses dynamic imports) -cmake -B build $FLAGS -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DSDL_SHARED_ENABLED_BY_DEFAULT=ON -DSDL_STATIC_ENABLED_BY_DEFAULT=ON -DCMAKE_PREFIX_PATH="../SDL/install_output/cmake/" -DSDLIMAGE_AVIF=OFF +cmake -B build $FLAGS -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DSDL_SHARED_ENABLED_BY_DEFAULT=ON -DSDL_STATIC_ENABLED_BY_DEFAULT=ON -DCMAKE_PREFIX_PATH=$CMAKE_PREFIX_PATH -DSDLIMAGE_AVIF=OFF cmake --build build/ --config Release $SUDO cmake --install build/ --prefix install_output --config Release popd From 5b535590d514bd88847b1d769349314c1b3cd911 Mon Sep 17 00:00:00 2001 From: "MINI\\jairo" Date: Thu, 19 Jun 2025 07:37:52 -0500 Subject: [PATCH 05/10] Fix path for CMAKE_PREFIX_PATH in different archs --- External/build.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/External/build.sh b/External/build.sh index d8b1332..18c2295 100755 --- a/External/build.sh +++ b/External/build.sh @@ -102,9 +102,9 @@ fi if [[ $RUNNER_OS == 'Windows' ]]; then CMAKE_PREFIX_PATH="../SDL/install_output/cmake/" elif [[ $RUNNER_OS == 'Linux' ]]; then - CMAKE_PREFIX_PATH="../SDL/install_output/cmake/SDL3/" + CMAKE_PREFIX_PATH="../SDL/install_output/lib/cmake/SDL3/" elif [[ $RUNNER_OS == 'macOS' ]]; then - CMAKE_PREFIX_PATH="../SDL/install_output/cmake/SDL3/" + CMAKE_PREFIX_PATH="../SDL/install_output/lib/cmake/SDL3/" fi # Build SDL_image From 06fdeb01b3ec6ec5e74bfdacc402a75ff13cdee4 Mon Sep 17 00:00:00 2001 From: "MINI\\jairo" Date: Thu, 19 Jun 2025 07:42:09 -0500 Subject: [PATCH 06/10] Fix path for CMAKE_PREFIX_PATH in different archs --- External/build.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/External/build.sh b/External/build.sh index 18c2295..ed4f76a 100755 --- a/External/build.sh +++ b/External/build.sh @@ -102,9 +102,9 @@ fi if [[ $RUNNER_OS == 'Windows' ]]; then CMAKE_PREFIX_PATH="../SDL/install_output/cmake/" elif [[ $RUNNER_OS == 'Linux' ]]; then - CMAKE_PREFIX_PATH="../SDL/install_output/lib/cmake/SDL3/" + CMAKE_PREFIX_PATH="../SDL/install_output/lib/cmake/" elif [[ $RUNNER_OS == 'macOS' ]]; then - CMAKE_PREFIX_PATH="../SDL/install_output/lib/cmake/SDL3/" + CMAKE_PREFIX_PATH="../SDL/install_output/lib/cmake/" fi # Build SDL_image From b8f0998d8c329af8f85e5521efb8bea8f1bd50d0 Mon Sep 17 00:00:00 2001 From: "MINI\\jairo" Date: Thu, 19 Jun 2025 07:46:22 -0500 Subject: [PATCH 07/10] Fix path for CMAKE_PREFIX_PATH in different archs --- External/build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/External/build.sh b/External/build.sh index ed4f76a..9ba6979 100755 --- a/External/build.sh +++ b/External/build.sh @@ -134,7 +134,7 @@ fi # Build SDL_ttf pushd SDL_ttf git reset --hard HEAD -cmake -B build $FLAGS -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DSDL_SHARED_ENABLED_BY_DEFAULT=ON -DSDL_STATIC_ENABLED_BY_DEFAULT=ON -DCMAKE_PREFIX_PATH="../SDL/install_output/cmake/" -DCMAKE_POLICY_VERSION_MINIMUM=3.5 +cmake -B build $FLAGS -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DSDL_SHARED_ENABLED_BY_DEFAULT=ON -DSDL_STATIC_ENABLED_BY_DEFAULT=ON -DCMAKE_PREFIX_PATH=$CMAKE_PREFIX_PATH -DCMAKE_POLICY_VERSION_MINIMUM=3.5 cmake --build build/ --config Release $SUDO cmake --install build/ --prefix install_output --config Release popd From 3471b340070fd6793a3e087f7779b2fda7b88499 Mon Sep 17 00:00:00 2001 From: "MINI\\jairo" Date: Thu, 19 Jun 2025 08:15:50 -0500 Subject: [PATCH 08/10] Fix dubious ownership in repository when running in container --- .github/workflows/build.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 820caab..fbaee01 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -43,6 +43,9 @@ jobs: -e BUILD_TYPE=${{ env.BUILD_TYPE }} run: | cd /workspace + git config --global --add safe.directory /workspace/External/SDL + git config --global --add safe.directory /workspace/External/SDL_image + git config --global --add safe.directory /workspace/External/SDL_ttf ./External/build.sh - name: Build From 477bd7da13ef1c805f320809911d5a403f4941bb Mon Sep 17 00:00:00 2001 From: "MINI\\jairo" Date: Thu, 19 Jun 2025 08:27:07 -0500 Subject: [PATCH 09/10] Fix dubious ownership in repository when running in container --- .github/workflows/build.yml | 3 --- External/build.sh | 4 ++++ 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index fbaee01..820caab 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -43,9 +43,6 @@ jobs: -e BUILD_TYPE=${{ env.BUILD_TYPE }} run: | cd /workspace - git config --global --add safe.directory /workspace/External/SDL - git config --global --add safe.directory /workspace/External/SDL_image - git config --global --add safe.directory /workspace/External/SDL_ttf ./External/build.sh - name: Build diff --git a/External/build.sh b/External/build.sh index 9ba6979..8fea3bc 100755 --- a/External/build.sh +++ b/External/build.sh @@ -73,6 +73,10 @@ if [[ $RUNNER_OS == 'Linux' ]]; then libpulse-dev$TARGET_APT_ARCH \ libpipewire-0.3-dev$TARGET_APT_ARCH \ libdecor-0-dev$TARGET_APT_ARCH + + git config --global --add safe.directory /workspace/External/SDL + git config --global --add safe.directory /workspace/External/SDL_image + git config --global --add safe.directory /workspace/External/SDL_ttf fi # Build SDL From 63df878decfa97388a694582ceff28ea59fcaebe Mon Sep 17 00:00:00 2001 From: "MINI\\jairo" Date: Thu, 19 Jun 2025 09:30:43 -0500 Subject: [PATCH 10/10] Fix build for macos intel --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 820caab..1380057 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -21,7 +21,7 @@ jobs: - { name: linux-x86, os: ubuntu-22.04, flags: -GNinja -DCMAKE_C_FLAGS=-m32 -DCMAKE_CXX_FLAGS=-m32", target_apt_arch: ":i386" } - { name: linux-arm64, os: ubuntu-22.04-arm, flags: -GNinja, target_apt_arch: ":arm64", container: "arm64v8/ubuntu:22.04" } - { name: linux-arm, os: ubuntu-22.04-arm, flags: -GNinja, target_apt_arch: ":armhf", container: "arm32v7/ubuntu:22.04" } - - { name: osx-x64, os: macos-latest, flags: -DCMAKE_OSX_ARCHITECTURES=x86_64 -DCMAKE_OSX_DEPLOYMENT_TARGET=10.14 } + - { name: osx-x64, os: macos-13, flags: -DCMAKE_OSX_ARCHITECTURES=x86_64 -DCMAKE_OSX_DEPLOYMENT_TARGET=10.14 } # NOTE: macOS 11.0 is the first released supported by Apple Silicon. - { name: osx-arm64, os: macos-latest, flags: -DCMAKE_OSX_ARCHITECTURES=arm64 -DCMAKE_OSX_DEPLOYMENT_TARGET=11.0 } steps: