mirror of
https://github.com/godotengine/godot-build-scripts.git
synced 2026-01-04 02:09:44 +03:00
See https://github.com/godotengine/build-containers/pull/79. Also fixup our CC and CXX overrides which were not doing what was expected. The i386 builds did use GCC 9 too due to manual creation of symlinks in the build container. See https://godotforums.org/discussion/comment/48209/#Comment_48209
69 lines
2.0 KiB
Bash
Executable File
69 lines
2.0 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 TERM=xterm
|
|
|
|
# For i386 we're still using an old GCC 5 version from Ubuntu 16.04 as
|
|
# upgrading the compiler seems to introduce weird issues.
|
|
# Since that GCC version is fairly old, let's avoid LTO which wasn't so
|
|
# mature at the time.
|
|
if [ "$(getconf LONG_BIT)" == "32" ]; then
|
|
export OPTIONS="$OPTIONS use_lto=no"
|
|
fi
|
|
|
|
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 Linux..."
|
|
|
|
$SCONS platform=x11 $OPTIONS tools=yes target=release_debug
|
|
mkdir -p /root/out/tools
|
|
cp -rvp bin/* /root/out/tools
|
|
rm -rf bin
|
|
|
|
$SCONS platform=x11 $OPTIONS tools=no target=release_debug
|
|
$SCONS platform=x11 $OPTIONS tools=no target=release
|
|
mkdir -p /root/out/templates
|
|
cp -rvp bin/* /root/out/templates
|
|
rm -rf bin
|
|
fi
|
|
|
|
# Mono
|
|
|
|
if [ "${MONO}" == "1" ]; then
|
|
echo "Starting Mono build for Linux..."
|
|
|
|
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 PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/lib/pkgconfig/
|
|
|
|
# Workaround for MSBuild segfault on Ubuntu containers, we build the CIL on Fedora and copy here.
|
|
mkdir -p bin
|
|
cp -r /root/mono-glue/cil/GodotSharp bin/
|
|
|
|
$SCONS platform=x11 $OPTIONS $OPTIONS_MONO tools=yes target=release_debug copy_mono_root=yes build_cil=no
|
|
mkdir -p /root/out/tools-mono
|
|
cp -rvp bin/* /root/out/tools-mono
|
|
rm -rf bin
|
|
|
|
$SCONS platform=x11 $OPTIONS $OPTIONS_MONO tools=no target=release_debug
|
|
$SCONS platform=x11 $OPTIONS $OPTIONS_MONO tools=no target=release
|
|
mkdir -p /root/out/templates-mono
|
|
cp -rvp bin/* /root/out/templates-mono
|
|
rm -rf bin
|
|
fi
|
|
|
|
echo "Linux build successful"
|