Last active
May 31, 2018 17:55
-
-
Save Ertain/3b22ebc12f6f9032255241d768030f1a to your computer and use it in GitHub Desktop.
Builds the Godot Engine with Mono bindings on Linux
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
if [ ! $(which scons) ]; then | |
echo "Please install scons." | |
exit 2 | |
fi | |
if [ ! $(which msbuild) ]; then | |
echo "Please install msbuild." | |
exit 3 | |
fi | |
function clean_sources { | |
echo "Now cleaning sources and deleting compiled files..." | |
scons --clean p=x11 tools=yes module_mono_enabled=yes mono_glue=no > /dev/null 2>&1 | |
scons --clean p=x11 target=release_debug tools=yes module_mono_enabled=yes > /dev/null 2>&1 | |
scons --clean p=x11 target=debug tools=no module_mono_enabled=yes > /dev/null 2>&1 | |
echo "All built files deleted." | |
exit 0 | |
} | |
if [ "$1" == "clean" ]; then | |
clean_sources | |
fi | |
echo "Now building the basics..." | |
scons p=x11 tools=yes module_mono_enabled=yes mono_glue=no > build_error-basics.log 2>&1 | |
echo "Basics built." | |
if [ -f bin/godot.x11.tools.64.mono ]; then | |
echo "Now generating Mono glue..." | |
bin/godot.x11.tools.64.mono --no-window --generate-mono-glue modules/mono/glue 2>> build_error-mono_glue.log > /dev/null 2>&1 | |
echo "Mono glue generated." | |
else | |
echo "File not found: bin/godot.x11.tools.64.mono" | |
exit 1 | |
fi | |
# Build the binaries normally | |
echo "Now building binaries..." | |
scons p=x11 target=release_debug tools=yes module_mono_enabled=yes > build_error-editor.log 2>&1 | |
echo "Editor binary built." | |
echo "Now building export templates..." | |
echo "Debug template..." | |
scons p=x11 target=release_debug tools=no module_mono_enabled=yes > build_debug_templates-error.log 2>&1 | |
echo "Debug template built." | |
echo "Release template..." | |
scons p=x11 target=release tools=no module_mono_enabled=yes > build_release_template-error.log 2>&1 | |
echo "Release template built." | |
echo "All targets built." | |
exit 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment