mirror of
https://github.com/godotengine/godot-build-scripts.git
synced 2026-01-04 02:09:44 +03:00
Cf. https://github.com/godotengine/build-containers/pull/84 - Linux builds are now done on Fedora using a custom Godot SDK instead of relying on an old Ubuntu version for portability. Removes need for various workarounds. - macOS Mono builds now include support for Apple Silicon / arm64, both architectures are concatenated in universal binaries. This new config is compatible with the `3.x` branch for Godot 3.4. It might or might not work as is for `master` / Godot 4.0. Porting it will be the next step.
84 lines
2.7 KiB
Bash
Executable File
84 lines
2.7 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 mono_static=yes"
|
|
export MONO_PREFIX_X86_64="/root/mono-installs/desktop-windows-x86_64-release"
|
|
export MONO_PREFIX_X86="/root/mono-installs/desktop-windows-x86-release"
|
|
export TERM=xterm
|
|
|
|
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 Windows..."
|
|
|
|
$SCONS platform=windows bits=64 $OPTIONS tools=yes target=release_debug
|
|
mkdir -p /root/out/x64/tools
|
|
cp -rvp bin/* /root/out/x64/tools
|
|
rm -rf bin
|
|
|
|
$SCONS platform=windows bits=64 $OPTIONS tools=no target=release_debug
|
|
$SCONS platform=windows bits=64 $OPTIONS tools=no target=release
|
|
mkdir -p /root/out/x64/templates
|
|
cp -rvp bin/* /root/out/x64/templates
|
|
rm -rf bin
|
|
|
|
$SCONS platform=windows bits=32 $OPTIONS tools=yes target=release_debug
|
|
mkdir -p /root/out/x86/tools
|
|
cp -rvp bin/* /root/out/x86/tools
|
|
rm -rf bin
|
|
|
|
$SCONS platform=windows bits=32 $OPTIONS tools=no target=release_debug
|
|
$SCONS platform=windows bits=32 $OPTIONS tools=no target=release
|
|
mkdir -p /root/out/x86/templates
|
|
cp -rvp bin/* /root/out/x86/templates
|
|
rm -rf bin
|
|
fi
|
|
|
|
# Mono
|
|
|
|
if [ "${MONO}" == "1" ]; then
|
|
echo "Starting Mono build for Windows..."
|
|
|
|
cp /root/mono-glue/*.cpp modules/mono/glue/
|
|
cp -r /root/mono-glue/GodotSharp/GodotSharp/Generated modules/mono/glue/GodotSharp/GodotSharp/
|
|
cp -r /root/mono-glue/GodotSharp/GodotSharpEditor/Generated modules/mono/glue/GodotSharp/GodotSharpEditor/
|
|
|
|
export OPTIONS_MONO_PREFIX="${OPTIONS} ${OPTIONS_MONO} mono_prefix=${MONO_PREFIX_X86_64}"
|
|
|
|
$SCONS platform=windows bits=64 $OPTIONS_MONO_PREFIX tools=yes target=release_debug copy_mono_root=yes
|
|
mkdir -p /root/out/x64/tools-mono
|
|
cp -rvp bin/* /root/out/x64/tools-mono
|
|
rm -rf bin
|
|
|
|
$SCONS platform=windows bits=64 $OPTIONS_MONO_PREFIX tools=no target=release_debug
|
|
$SCONS platform=windows bits=64 $OPTIONS_MONO_PREFIX tools=no target=release
|
|
mkdir -p /root/out/x64/templates-mono
|
|
cp -rvp bin/* /root/out/x64/templates-mono
|
|
rm -rf bin
|
|
|
|
export OPTIONS_MONO_PREFIX="${OPTIONS} ${OPTIONS_MONO} mono_prefix=${MONO_PREFIX_X86}"
|
|
|
|
$SCONS platform=windows bits=32 $OPTIONS_MONO_PREFIX tools=yes target=release_debug copy_mono_root=yes
|
|
mkdir -p /root/out/x86/tools-mono
|
|
cp -rvp bin/* /root/out/x86/tools-mono
|
|
rm -rf bin
|
|
|
|
$SCONS platform=windows bits=32 $OPTIONS_MONO_PREFIX tools=no target=release_debug
|
|
$SCONS platform=windows bits=32 $OPTIONS_MONO_PREFIX tools=no target=release
|
|
mkdir -p /root/out/x86/templates-mono
|
|
cp -rvp bin/* /root/out/x86/templates-mono
|
|
rm -rf bin
|
|
fi
|
|
|
|
echo "Windows build successful"
|