mirror of
https://github.com/godotengine/godot-build-scripts.git
synced 2026-01-05 06:11:49 +03:00
Backport of #89 and #90, in sync with https://github.com/godotengine/build-containers/pull/135. In the 3.x branch, the situation with `arch` and `bits` is very brittle, so we only add the explicit `arch` argument for the arm32/arm64 builds. x86_32 still relies on `bits=32`. This would all be worth refactoring upstream like we did for 4.0, but it's a major undertaking and breaking change, which I'd prefer to avoid in 3.6. For Linux builds, we move the `strip` calls to the link stage, as this needs to be done with the arch-appropriate `strip` binary, so it's easier done there. In `master`, we now let the compiler strip automatically during the build if no debug symbols are requested, but this change wasn't backported to 3.x.
32 lines
725 B
Bash
Executable File
32 lines
725 B
Bash
Executable File
#!/bin/bash
|
|
|
|
set -e
|
|
|
|
# Config
|
|
|
|
export SCONS="scons -j${NUM_CORES} verbose=yes warnings=no progress=no"
|
|
export OPTIONS="debug_symbols=no use_static_cpp=no"
|
|
export TERM=xterm
|
|
export DISPLAY=:0
|
|
|
|
rm -rf godot
|
|
mkdir godot
|
|
cd godot
|
|
tar xf ../godot.tar.gz --strip-components=1
|
|
|
|
# Mono
|
|
|
|
if [ "${MONO}" == "1" ]; then
|
|
echo "Building and generating Mono glue..."
|
|
|
|
mono --version
|
|
export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/lib/pkgconfig/
|
|
|
|
${SCONS} platform=x11 ${OPTIONS} target=release_debug tools=yes module_mono_enabled=yes mono_glue=no
|
|
|
|
rm -rf /root/mono-glue/*
|
|
xvfb-run bin/godot.x11.opt.tools.64.mono --audio-driver Dummy --generate-mono-glue /root/mono-glue || /bin/true
|
|
fi
|
|
|
|
echo "Mono glue generated successfully"
|