master #2

Merged
BRNSystems merged 3 commits from Mirrorlandia_minetest/irrlicht:master into master 2023-12-13 19:59:10 +01:00
6 changed files with 46 additions and 16 deletions

@ -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: |

3
.gitignore vendored

@ -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/*
build/*

@ -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=(

12
scripts/ci-get-mingw.sh Executable file

@ -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"

10
scripts/sha256sums.txt Normal file

@ -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

@ -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)
{