mirror of
https://github.com/godotengine/godot-build-scripts.git
synced 2026-01-04 02:09:44 +03:00
Follow-up to https://github.com/godotengine/godot/pull/65094. Also reverts LTO change from #62, we found that while it's much slower to link, full LTO still produces smaller binaries and that's quite important for the Web platform.
58 lines
1.4 KiB
Bash
Executable File
58 lines
1.4 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
set -e
|
|
|
|
# Config
|
|
|
|
export SCONS="scons -j${NUM_CORES} verbose=yes warnings=no progress=no"
|
|
export OPTIONS="production=yes"
|
|
export OPTIONS_MONO="module_mono_enabled=yes use_lto=no"
|
|
export TERM=xterm
|
|
|
|
source /root/emsdk/emsdk_env.sh
|
|
|
|
rm -rf godot
|
|
mkdir godot
|
|
cd godot
|
|
tar xf /root/godot.tar.gz --strip-components=1
|
|
|
|
# Classical
|
|
|
|
if [ "${CLASSICAL}" == "1" ]; then
|
|
echo "Starting classical build for Web..."
|
|
|
|
$SCONS platform=web ${OPTIONS} target=release_debug tools=no
|
|
$SCONS platform=web ${OPTIONS} target=release tools=no
|
|
|
|
$SCONS platform=web ${OPTIONS} target=release_debug tools=no dlink_enabled=yes
|
|
$SCONS platform=web ${OPTIONS} target=release tools=no dlink_enabled=yes
|
|
|
|
mkdir -p /root/out/templates
|
|
cp -rvp bin/*.zip /root/out/templates
|
|
rm -f bin/*.zip
|
|
|
|
$SCONS platform=web ${OPTIONS} target=release_debug tools=yes use_closure_compiler=yes
|
|
|
|
mkdir -p /root/out/tools
|
|
cp -rvp bin/*.zip /root/out/tools
|
|
rm -f bin/*.zip
|
|
fi
|
|
|
|
# Mono
|
|
|
|
if [ "${MONO}" == "1" ]; then
|
|
echo "Starting Mono build for Web..."
|
|
|
|
cp /root/mono-glue/*.cpp modules/mono/glue/
|
|
cp -r /root/mono-glue/GodotSharp/GodotSharp/Generated modules/mono/glue/GodotSharp/GodotSharp/
|
|
|
|
$SCONS platform=web ${OPTIONS} ${OPTIONS_MONO} target=release_debug tools=no
|
|
$SCONS platform=web ${OPTIONS} ${OPTIONS_MONO} target=release tools=no
|
|
|
|
mkdir -p /root/out/templates-mono
|
|
cp -rvp bin/*.zip /root/out/templates-mono
|
|
rm -f bin/*.zip
|
|
fi
|
|
|
|
echo "Web build successful"
|