Last active
October 4, 2023 17:12
-
-
Save nndda/cd80c941857a36afd5dae8c6514ef707 to your computer and use it in GitHub Desktop.
A single shell script to get and install all the requirements for compiling Godot, for Windows, Linux, Android, and Web.
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
godot_tag="4.1.1-stable" # Godot 4 only | |
android_cmdline_dl="url" # get from https://developer.android.com/studio at "Command line tools only" | |
sudo apt update && sudo apt-get upgrade && \ | |
python -m pip install scons &&\ | |
sudo apt install \ | |
pkg-config \ | |
build-essential \ | |
zip \ | |
unzip \ | |
scons \ | |
mingw-w64 \ | |
libx11-dev \ | |
libxcursor-dev \ | |
libxinerama-dev \ | |
libgl1-mesa-dev \ | |
libglu-dev \ | |
libasound2-dev \ | |
libpulse-dev \ | |
libudev-dev \ | |
libxi-dev \ | |
libxrandr-dev \ | |
android-sdk \ | |
openjdk-11-jdk | |
sudo update-alternatives --config x86_64-w64-mingw32-gcc | |
sudo update-alternatives --config x86_64-w64-mingw32-g++ | |
sudo update-alternatives --config i686-w64-mingw32-gcc | |
sudo update-alternatives --config i686-w64-mingw32-g++ | |
echo "bin/" | cat >> .gitignore &&\ | |
echo "godot/" | cat > .gitignore &&\ | |
echo "cmdline-tools/" | cat >> .gitignore &&\ | |
echo "lib/" | cat >> .gitignore &&\ | |
echo "emsdk/" | cat >> .gitignore &&\ | |
echo "cmdline-tools.zip" | cat >> .gitignore | |
# Android | |
# curl $android_cmdline_dl \ | |
# --output cmdline-tools.zip &&\ | |
# unzip cmdline-tools.zip -d ./ | |
# cmdline-tools/bin/sdkmanager --sdk_root=lib/android-sdk --licenses &&\ | |
# cmdline-tools/bin/sdkmanager --sdk_root=lib/android-sdk\ | |
# "platform-tools"\ | |
# "build-tools;30.0.3"\ | |
# "platforms;android-29"\ | |
# "cmdline-tools;latest"\ | |
# "cmake;3.10.2.4988404" &&\ | |
# export ANDROID_SDK_ROOT=lib/android-sdk | |
# Web | |
git clone https://github.com/emscripten-core/emsdk.git && cd emsdk/ &&\ | |
./emsdk install latest &&\ | |
./emsdk activate latest &&\ | |
source ./emsdk_env.sh &&\ | |
cd .. | |
# Getting Godot source code | |
git clone https://github.com/godotengine/godot.git -b $godot_tag && mkdir bin/ && cd godot | |
scons platform=list | |
# Make the script executable: | |
# chmod +x ./gd_compile_req.sh |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment