From 4863750c0016f53470bd4fb4da50e22cd8e9fd85 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Mon, 25 Sep 2023 15:32:14 +0200 Subject: [PATCH] Download static ANGLE libs to link them in Windows and macOS builds --- build-macos/build.sh | 2 +- build-windows/build.sh | 2 +- build.sh | 16 ++++++++++++++-- 3 files changed, 16 insertions(+), 4 deletions(-) diff --git a/build-macos/build.sh b/build-macos/build.sh index afd6313..eb71b18 100755 --- a/build-macos/build.sh +++ b/build-macos/build.sh @@ -5,7 +5,7 @@ set -e # Config export SCONS="scons -j${NUM_CORES} verbose=yes warnings=no progress=no" -export OPTIONS="osxcross_sdk=darwin22 production=yes use_volk=no vulkan_sdk_path=/root/vulkansdk" +export OPTIONS="osxcross_sdk=darwin22 production=yes use_volk=no vulkan_sdk_path=/root/vulkansdk angle_libs=/root/angle" export OPTIONS_MONO="module_mono_enabled=yes" export STRIP="x86_64-apple-darwin22-strip -u -r" export TERM=xterm diff --git a/build-windows/build.sh b/build-windows/build.sh index 6a16937..06bd6b6 100755 --- a/build-windows/build.sh +++ b/build-windows/build.sh @@ -5,7 +5,7 @@ set -e # Config export SCONS="scons -j${NUM_CORES} verbose=yes warnings=no progress=no" -export OPTIONS="production=yes" +export OPTIONS="production=yes angle_libs=/root/angle" export OPTIONS_MONO="module_mono_enabled=yes" export TERM=xterm diff --git a/build.sh b/build.sh index 65b7ffc..1453b71 100755 --- a/build.sh +++ b/build.sh @@ -136,6 +136,18 @@ if [ ! -d "deps/vulkansdk-macos" ]; then echo "Missing Vulkan SDK for macOS, we're going to run into issues!" fi +# Windows and macOS need ANGLE +if [ ! -d "deps/angle" ]; then + echo "Missing ANGLE libraries, downloading them." + mkdir -p deps/angle + pushd deps/angle + curl -L -o windows.zip https://github.com/godotengine/godot-angle-static/releases/download/chromium%2F6029/Windows.6029-1.MinGW_11.x86_64.x86_32.zip + curl -L -o macos.zip https://github.com/godotengine/godot-angle-static/releases/download/chromium%2F6029/macOS.6029.Xcode_15.arm64.x86_64.zip + unzip windows.zip && rm -f windows.zip + unzip macos.zip && rm -f macos.zip + popd +fi + # Keystore for Android editor signing # Optional - the config.sh will be copied but if it's not filled in, # it will do an unsigned build. @@ -187,7 +199,7 @@ mkdir -p ${basedir}/mono-glue ${podman_run} -v ${basedir}/build-mono-glue:/root/build localhost/godot-linux:${img_version} bash build/build.sh 2>&1 | tee ${basedir}/out/logs/mono-glue mkdir -p ${basedir}/out/windows -${podman_run} -v ${basedir}/build-windows:/root/build -v ${basedir}/out/windows:/root/out localhost/godot-windows:${img_version} bash build/build.sh 2>&1 | tee ${basedir}/out/logs/windows +${podman_run} -v ${basedir}/build-windows:/root/build -v ${basedir}/out/windows:/root/out -v ${basedir}/deps/angle:/root/angle localhost/godot-windows:${img_version} bash build/build.sh 2>&1 | tee ${basedir}/out/logs/windows mkdir -p ${basedir}/out/linux ${podman_run} -v ${basedir}/build-linux:/root/build -v ${basedir}/out/linux:/root/out localhost/godot-linux:${img_version} bash build/build.sh 2>&1 | tee ${basedir}/out/logs/linux @@ -196,7 +208,7 @@ mkdir -p ${basedir}/out/web ${podman_run} -v ${basedir}/build-web:/root/build -v ${basedir}/out/web:/root/out localhost/godot-web:${img_version} bash build/build.sh 2>&1 | tee ${basedir}/out/logs/web mkdir -p ${basedir}/out/macos -${podman_run} -v ${basedir}/build-macos:/root/build -v ${basedir}/out/macos:/root/out -v ${basedir}/deps/vulkansdk-macos:/root/vulkansdk localhost/godot-osx:${img_version} bash build/build.sh 2>&1 | tee ${basedir}/out/logs/macos +${podman_run} -v ${basedir}/build-macos:/root/build -v ${basedir}/out/macos:/root/out -v ${basedir}/deps/vulkansdk-macos:/root/vulkansdk -v ${basedir}/deps/angle:/root/angle localhost/godot-osx:${img_version} bash build/build.sh 2>&1 | tee ${basedir}/out/logs/macos mkdir -p ${basedir}/out/android ${podman_run} -v ${basedir}/build-android:/root/build -v ${basedir}/out/android:/root/out -v ${basedir}/deps/keystore:/root/keystore localhost/godot-android:${img_version} bash build/build.sh 2>&1 | tee ${basedir}/out/logs/android