-
-
Save Sharaf5/07d24f55cc303cf3f1a5b0f71cd0295c to your computer and use it in GitHub Desktop.
Compile Godot for GNU/Linux 64-bit easily
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/sh -x | |
# This script compiles Godot for GNU/Linux in 64-bit. | |
# Place this script at the root of your Godot Git clone. | |
# CC0 1.0 Universal | |
# Build 64-bit Godot for GNU/Linux desktop, in debug and release mode | |
scons p=x11 -j$(nproc) verbose=no tools=yes target=release_debug openssl=builtin | |
scons p=x11 -j$(nproc) verbose=no tools=no target=release_debug openssl=builtin | |
scons p=x11 -j$(nproc) verbose=no tools=no target=release openssl=builtin | |
# Build 64-bit Godot for GNU/Linux server, in debug and release mode | |
scons p=server -j$(nproc) verbose=no tools=no target=release_debug openssl=builtin | |
scons p=server -j$(nproc) verbose=no tools=no target=release openssl=builtin | |
# Strip binaries of their debug symbols | |
cd bin/ | |
strip *.64 | |
# Compress editor and server binaries using .tar.xz | |
tar cfJ godot.x11.opt.tools.64.tar.xz godot.x11.opt.tools.64 | |
tar cfJ godot_server.server.opt.64.tar.xz godot_server.server.opt.64 | |
tar cfJ godot_server.server.opt.debug.64.tar.xz godot_server.server.opt.debug.64 | |
# Copy binaries to Godot's export templates folder, and rename editor binaries | |
cp godot.x11.opt.tools.64.tar.xz $HOME/.godot/editor/godot-linux.x86_64.tar.xz | |
cp godot.x11.opt.debug.64 $HOME/.godot/templates/linux_x11_64_debug | |
cp godot.x11.opt.64 $HOME/.godot/templates/linux_x11_64_release | |
# Do the same for server binaries | |
cp godot_server.server.opt.64.tar.xz $HOME/.godot/editor/godot-linux-server.x86_64.tar.xz | |
cp godot_server.server.opt.debug.64.tar.xz $HOME/.godot/editor/godot-linux-server-debug.x86_64.tar.xz |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment