From bb7c06d32a134584826608d1c236a36878e36199 Mon Sep 17 00:00:00 2001 From: paradust7 <102263465+paradust7@users.noreply.github.com> Date: Sun, 10 Dec 2023 05:47:49 -0800 Subject: [PATCH 1/3] Initialize X11 thread safety --- source/Irrlicht/CIrrDeviceLinux.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/source/Irrlicht/CIrrDeviceLinux.cpp b/source/Irrlicht/CIrrDeviceLinux.cpp index 3a7b7da..3e4dcb8 100644 --- a/source/Irrlicht/CIrrDeviceLinux.cpp +++ b/source/Irrlicht/CIrrDeviceLinux.cpp @@ -147,6 +147,11 @@ CIrrDeviceLinux::CIrrDeviceLinux(const SIrrlichtCreationParameters& param) // create keymap createKeyMap(); + // initialize X11 thread safety + // libX11 1.8+ has this on by default + // without it, multi-threaded GL drivers may crash + XInitThreads(); + // create window if (CreationParams.DriverType != video::EDT_NULL) { From 16a99c2079eb15e0bbd35426ea8b8a203ed52190 Mon Sep 17 00:00:00 2001 From: sfan5 Date: Wed, 13 Dec 2023 12:05:32 +0100 Subject: [PATCH 2/3] Add a file to gitignore --- .gitignore | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 646e446..8bced59 100644 --- a/.gitignore +++ b/.gitignore @@ -5,6 +5,7 @@ install_manifest.txt IrrlichtMtConfig.cmake IrrlichtMtConfigVersion.cmake IrrlichtMtTargets.cmake +CTestTestfile.cmake Makefile libs/* *.so* @@ -21,4 +22,4 @@ scripts/glext.h *visualstudio/ # vscode cmake plugin -build/* \ No newline at end of file +build/* From 9b52d6fb0db1e491b1d2787ef33c5c74aebb3558 Mon Sep 17 00:00:00 2001 From: sfan5 Date: Wed, 13 Dec 2023 12:05:49 +0100 Subject: [PATCH 3/3] Hash-check windows CI dependencies --- .github/workflows/build.yml | 3 +-- scripts/ci-build-mingw.sh | 29 ++++++++++++++++------------- scripts/ci-get-mingw.sh | 12 ++++++++++++ scripts/sha256sums.txt | 10 ++++++++++ 4 files changed, 39 insertions(+), 15 deletions(-) create mode 100755 scripts/ci-get-mingw.sh create mode 100644 scripts/sha256sums.txt diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index fe853d9..8c4c60a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -157,8 +157,7 @@ jobs: - name: Install compiler run: | sudo apt-get update && sudo apt-get install cmake -qyy - wget http://minetest.kitsunemimi.pw/mingw-w64-${{matrix.config.arch}}_11.2.0_ubuntu20.04.tar.xz -O mingw.tar.xz - sudo tar -xaf mingw.tar.xz -C /usr + ./scripts/ci-get-mingw.sh ${{matrix.config.arch}} - name: Build run: | diff --git a/scripts/ci-build-mingw.sh b/scripts/ci-build-mingw.sh index b3b898e..736969f 100755 --- a/scripts/ci-build-mingw.sh +++ b/scripts/ci-build-mingw.sh @@ -1,7 +1,7 @@ #!/bin/bash -e +topdir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" [[ -z "$CC" || -z "$CXX" ]] && exit 255 - variant=win32 [[ "$(basename "$CXX")" == "x86_64-"* ]] && variant=win64 with_sdl=0 @@ -14,21 +14,24 @@ libpng_version=1.6.39 sdl2_version=2.28.1 zlib_version=1.2.13 +download () { + local url=$1 + local filename=${url##*/} + local foldername=${filename%%[.-]*} + + [ -d "./$foldername" ] && return 0 + [ -e "$filename" ] || wget "$url" -O "$filename" + sha256sum -w -c <(grep -F "$filename" "$topdir/sha256sums.txt") + unzip -o "$filename" -d "$foldername" +} + mkdir -p libs pushd libs libs=$PWD -[ -e libjpeg.zip ] || \ - wget "http://minetest.kitsunemimi.pw/libjpeg-$libjpeg_version-$variant.zip" -O libjpeg.zip -[ -e libpng.zip ] || \ - wget "http://minetest.kitsunemimi.pw/libpng-$libpng_version-$variant.zip" -O libpng.zip -[[ $with_sdl -eq 0 || -e sdl2.zip ]] || \ - wget "http://minetest.kitsunemimi.pw/sdl2-$sdl2_version-$variant.zip" -O sdl2.zip -[ -e zlib.zip ] || \ - wget "http://minetest.kitsunemimi.pw/zlib-$zlib_version-$variant.zip" -O zlib.zip -[ -d libjpeg ] || unzip -o libjpeg.zip -d libjpeg -[ -d libpng ] || unzip -o libpng.zip -d libpng -[[ $with_sdl -eq 0 || -d sdl2 ]] || unzip -o sdl2.zip -d sdl2 -[ -d zlib ] || unzip -o zlib.zip -d zlib +download "http://minetest.kitsunemimi.pw/libjpeg-$libjpeg_version-$variant.zip" +download "http://minetest.kitsunemimi.pw/libpng-$libpng_version-$variant.zip" +[ $with_sdl -eq 1 ] && download "http://minetest.kitsunemimi.pw/sdl2-$sdl2_version-$variant.zip" +download "http://minetest.kitsunemimi.pw/zlib-$zlib_version-$variant.zip" popd tmp=( diff --git a/scripts/ci-get-mingw.sh b/scripts/ci-get-mingw.sh new file mode 100755 index 0000000..c06670c --- /dev/null +++ b/scripts/ci-get-mingw.sh @@ -0,0 +1,12 @@ +#!/bin/bash +set -e +topdir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" +[ -z "$1" ] && exit 255 + +ver=11.2.0 +os=ubuntu20.04 +name="mingw-w64-${1}_${ver}_${os}.tar.xz" +wget "http://minetest.kitsunemimi.pw/$name" -O "$name" +sha256sum -w -c <(grep -F "$name" "$topdir/sha256sums.txt") +sudo tar -xaf "$name" -C /usr +rm -f "$name" diff --git a/scripts/sha256sums.txt b/scripts/sha256sums.txt new file mode 100644 index 0000000..4606d55 --- /dev/null +++ b/scripts/sha256sums.txt @@ -0,0 +1,10 @@ +934ef7f3897cebcbf39eed2fcb0be084c1ff1af4352ebc1f19cfb4a60020b1c7 libjpeg-2.1.5.1-win32.zip +2b3054ddfd66c2b3f97ac65fb2b80be05649eeab98a822b952cbe388038d4aa1 libjpeg-2.1.5.1-win64.zip +9d8d97c1af52d88d6fc44902375fb42225f0ee5cbf2199997d278579770f8850 libpng-1.6.39-win32.zip +a4209e4de00f1674ba4cedf2ddf23881d429f6d2b5f9a4a26945c7cfbf12c384 libpng-1.6.39-win64.zip +704817351dc54a5a4bb3b35db9316f4ff1b073b231b5f8dbbc3b4ff2f3e30fbe mingw-w64-i686_11.2.0_ubuntu20.04.tar.xz +d85ec9a7debe470ebeaa002af0a2843b83d40405d2a45fcc586c19f179362aab mingw-w64-x86_64_11.2.0_ubuntu20.04.tar.xz +192a14f42de64d65bbd3ba320330a51e8e05aa67afc4e300690cc9fc8b2d11b3 sdl2-2.28.1-win32.zip +247d5ab923449fea042a8c47318a77e75ef3c056283049ad550935dae29fc26b sdl2-2.28.1-win64.zip +e9bab0a6fe07bcf6c5a8ff171dd63983e67f3aefd9b8f38e88bf20a3dc44678f zlib-1.2.13-win32.zip +9f3d4fd89958081917d2fdcaab1bbc947e3fb070d8b39a48d9cf11269dd52c24 zlib-1.2.13-win64.zip