All Projects → hiulit → cross-compile-godot-raspberry-pi

hiulit / cross-compile-godot-raspberry-pi

Licence: MIT License
A script to easily cross-compile Godot binaries for the Raspberry Pi from Linux x86_64 and an extra script to easily transfer the compiled Godot binaries to the Raspberry Pi using rsync

Programming Languages

shell
77523 projects

Projects that are alternatives of or similar to cross-compile-godot-raspberry-pi

System Tar And Restore
Backup and Restore your system using tar or Transfer it with rsync
Stars: ✭ 170 (+1316.67%)
Mutual labels:  transfer, rsync
FOMOSv2-CL
FOMOS stands for: Free, Open source, Mobile, Operating, System.
Stars: ✭ 24 (+100%)
Mutual labels:  x86-64
stylizeapp
A flask website for style transfer
Stars: ✭ 34 (+183.33%)
Mutual labels:  transfer
godot-unirest
Unirest in GDScript: Simplified, lightweight HTTP client library.
Stars: ✭ 32 (+166.67%)
Mutual labels:  godot-engine
FEX
A fast usermode x86 and x86-64 emulator for Arm64
Stars: ✭ 650 (+5316.67%)
Mutual labels:  x86-64
aseprite-to-godot-variables
A Lua script to create arrays of colors and indexes of those colors from an Aseprite sprite to be used in Godot.
Stars: ✭ 19 (+58.33%)
Mutual labels:  godot-engine
utero
The Operating System (for x86_64) written in Crystal as much as possible
Stars: ✭ 55 (+358.33%)
Mutual labels:  x86-64
PostgreSQLClient
PostgreSQL connector for Godot Engine in GDScript.
Stars: ✭ 28 (+133.33%)
Mutual labels:  godot-engine
godot-skills
A generic, compositional skill system for Godot Engine that uses scenes to design abilities and their effects.
Stars: ✭ 25 (+108.33%)
Mutual labels:  godot-engine
interp
Interpreter experiment. Testing dispatch methods: Switching, Direct/Indirect Threaded Code, Tail-Calls and Inlining
Stars: ✭ 32 (+166.67%)
Mutual labels:  x86-64
Project-Uranium-Godot
A work in progress re-implementation of the game Pokemon Uranium in the Godot Engine.
Stars: ✭ 140 (+1066.67%)
Mutual labels:  godot-engine
MySQL Module
MySQL connector to Godot Engine.
Stars: ✭ 30 (+150%)
Mutual labels:  godot-engine
crsync
A library and CLI tool of Client-side rsync over HTTP via curl, implemented by pure C.
Stars: ✭ 21 (+75%)
Mutual labels:  rsync
novusk
A kernel written in Rust
Stars: ✭ 61 (+408.33%)
Mutual labels:  x86-64
godot-gameshell
Godot export templates and instructions for the GameShell portable game console and other single-board computers
Stars: ✭ 34 (+183.33%)
Mutual labels:  godot-engine
SixtyFourBits
x64 Assembly Demo Framework
Stars: ✭ 21 (+75%)
Mutual labels:  x86-64
docker-unms
All-in-one docker image for Ubiquiti UISP (formerly UNMS). Supports x86_64 and ARM (Raspberry Pi).
Stars: ✭ 153 (+1175%)
Mutual labels:  x86-64
cult
CPU Ultimate Latency Test.
Stars: ✭ 67 (+458.33%)
Mutual labels:  x86-64
fmod-gdnative
FMOD Studio integration and bindings for the Godot game engine
Stars: ✭ 102 (+750%)
Mutual labels:  godot-engine
Godot-DialogGraphPlugin
A simple Godot plugin for dialog graph creation.
Stars: ✭ 58 (+383.33%)
Mutual labels:  godot-engine

Cross-compile Godot binaries for the Raspberry Pi

GitHub release (latest by date) GitHub license

A script to easily cross-compile Godot binaries for the Raspberry Pi from Linux x86_64 and an extra script to easily transfer the compiled Godot binaries to the Raspberry Pi using rsync.

Cross-compile Godot binaries for the Raspberry Pi

Table of contents

Requirements:

Dependencies

  • curl
  • git
  • jq
  • tar
  • wget
  • zip

Limitations

The toolchain this script uses has a few limitations at the moment:

  • Only supports cross-compilation for 32 bit binaries and Raspberry Pi verions 3 and 4.
  • Can't compile Godot 2.x because it requires gcc < 6 and the toolchain only has gcc 10.2.

🤖 Pre-compiled binaries

There's a good chance that if you came to this repository you want to compile your own Godot binaries. But if you just want to get pre-compiled binaries, I have another repository with unofficial Godot binaries for the Raspberry Pi.

🛠️ Setup

Install the scripts

git clone https://github.com/hiulit/cross-compile-godot-raspberry-pi.git
cd cross-compile-godot-raspberry-pi
sudo chmod +x cross-compile-godot-raspberry-pi.sh
sudo chmod +x transfer-files-raspberry-pi.sh

Update the scripts

cd cross-compile-godot-raspberry-pi
git pull

🚀 Usage

./cross-compile-godot-raspberry-pi.sh [OPTIONS]

If no options are passed, you will be prompted with a usage example:

USAGE: ./cross-compile-godot-raspberry-pi.sh [OPTIONS]

Use './cross-compile-godot-raspberry-pi.sh --help' to see all the options.

Log files are stored in logs/.

📖 Options

  • --help: Prints the help message.
  • --version: Prints the script version.
  • --get-tags: Prints the Godot tags from GitHub available to compile.
  • --get-jobs: Prints the number of available jobs/CPUs.
  • --download [file] [path]: Downloads the Godot source files or the Godot toolchain.
    • File: godot-source-files or godot-toolchain.
    • Path (optional): Path to the directory where the files will be stored.
    • Default path: Same folder as this script.
  • --source-dir [path]: Sets the Godot source files directory.
    • Default: ./godot.
  • --toolchain-dir [path]: Sets the Godot toolchain directory.
    • Default: ./arm-godot-linux-gnueabihf_sdk-buildroot.
  • --binaries-dir [path]: Sets the Godot compiled binaries directory.
    • Default: ./compiled-binaries.
  • --godot-versions [version/s]: Sets the Godot version/s to compile.
    • Version/s: Use --get-tags to see the available versions.
  • --godot-commits [commit/s]: Sets the Godot commit/s to compile.
    • Commit/s: SHA-1 hash/es.
  • --rpi-versions [version/s]: Sets the Raspberry Pi version/s to compile.
    • Version/s: 3 4.
  • --binaries [binary type/s]: Sets the different types of Godot binaries to compile.
    • Binary type/s: editor export-template headless server.
  • --scons-jobs [number|string]: Sets the jobs (CPUs) to use in SCons.
    • Number: 1-∞.
    • String: all (use all the available CPUs).
    • Default: 1.
  • --use-lto: Enables using Link Time Optimization (LTO) when compiling.
  • --pack: Packs all the binaries of the same Godot version and the same Raspberry Pi version.
  • --auto: Starts compiling taking the settings in the config file.

💁 Examples

  • Compile:
    • The Godot editor (version 3.2.3-stable).
    • For the Raspberry Pi 4.
    • Using 4 CPU cores.
./cross-compile-godot-raspberry-pi.sh --godot-versions "3.2.3-stable" --rpi-versions "4" --binaries "editor" --scons-jobs "4"
  • Compile:
    • The Godot editor (version 3.2.3-stable) and the 4f891b706027dc800f6949bec413f448defdd20d commit (which is 3.2.4 RC 3).
    • For the Raspberry Pi 4.
    • Using 4 CPU cores.
./cross-compile-godot-raspberry-pi.sh --godot-versions "3.2.3-stable" --godot-commits "4f891b706027dc800f6949bec413f448defdd20d" --rpi-versions "4" --binaries "editor" --scons-jobs "4"
  • Compile:
    • The Godot editor (version 3.2.3-stable).
    • For the Raspberry Pi 3 and 4.
    • Using 8 CPU cores.
    • With LTO enabled.
./cross-compile-godot-raspberry-pi.sh --godot-versions "3.2.3-stable" --rpi-versions "3 4" --binaries "editor" --scons-jobs "4" --use-lto
  • Compile:
    • The Godot editor and the export templates (versions 3.1.2-stable and 3.2.3-stable).
    • For the Raspberry Pi 3 and 4.
    • Using all the available CPU cores.
    • With LTO enabled.
./cross-compile-godot-raspberry-pi.sh --godot-versions "3.1.2-stable 3.2.3-stable" --rpi-versions "3 4" --binaries "editor export-template" --scons-jobs "all" --use-lto
  • Compile:
    • The Godot editor and the export templates (versions 3.1.2-stable and 3.2.3-stable).
    • For the Raspberry Pi 3 and 4.
    • Using all the available CPU cores.
    • With LTO enabled.
    • Where the Godot source files are located in /path/to/the/godot/source/files.
./cross-compile-godot-raspberry-pi.sh --source-dir "/path/to/the/godot/source/files" --godot-versions "3.1.2-stable 3.2.3-stable" --rpi-versions "3 4" --binaries "editor export-template" --scons-jobs "all" --use-lto

📋 Config file

You can edit this file directly, instead of passing all the options mentioned above, and then run:

./cross-compile-godot-raspberry-pi.sh --auto
# Settings for "cross-compile-godot-raspberry-pi.sh".

# Godot source files directory.
# Default: "./godot".
godot_source_files_dir = ""

# Godot toolchain directory.
# Default: "./arm-godot-linux-gnueabihf_sdk-buildroot".
godot_toolchain_dir = ""

# Godot compiled binaries directory.
# Default: "./compiled-binaries".
godot_compiled_binaries_dir = ""

# Godot version/s to compile (separated by blank spaces).
# Use "--get-tags" to see the available versions.
# Version/s must end with the suffix "-stable", except for "master".
godot_versions = ""

# Godot commit/s to compile (separated by blank spaces).
# Commit/s: SHA-1 hash/es.
godot_commits = ""

# Raspberry Pi version/s to compile (separated by blank spaces).
# Version/s: "3 4".
raspberry_pi_versions = ""

# Types of Godot binaries to compile (separated by blank spaces).
# Binary type/s: "editor export-template headless server".
binaries = ""

# Jobs (CPUs) to use in SCons.
# Number: "1-∞".
# String: "all" (use all the available CPUs).
# Default: "1".
scons_jobs = ""

# Use Link Time Optimization (LTO) when compiling.
# Option: "yes".
use_lto = ""

# Pack all the binaries of the same Godot version and the same Raspberry Pi version.
# Option: "yes".
pack = ""

Transfer files to the Raspberry Pi

Requirements:

Dependencies

  • rsync

🚀 Usage

./transfer-files-raspberry-pi.sh [OPTIONS]

If no options are passed, you will be prompted with a usage example:

USAGE: ./transfer-files-raspberry-pi.sh [OPTIONS]

Use './transfer-files-raspberry-pi.sh --help' to see all the options.

Log files are stored in logs/.

📖 Options

  • --help: Prints the help message.
  • --version: Prints the script version.
  • --binaries-dir [path]: Sets the Godot compiled binaries directory.
    • Default: ./compiled-binaries.
  • --remote-dir [path]: Sets the Raspberry Pi directory where the files will be transfered.
    • Default: ~/godot-binaries/ (note the trailing slash!).
  • --remote-username [username]: Sets the username of the Raspberry Pi.
  • --remote-ip [IP]: Sets the IP of the Raspberry Pi.
  • --godot-versions [version/s]: Sets the Godot version/s to compile.
    • Version/s must end with the suffix -stable, except for master..
  • --godot-commits [commit/s]: Sets the Godot commit/s to compile.
    • Commit/s: SHA-1 hash/es.
  • --rpi-versions [version/s]: Sets the Raspberry Pi version/s to compile.
    • Version/s: 3 4.
  • --binaries [binary type/s]: Sets the different types of Godot binaries to compile.
    • Binary type/s: editor export-template headless server.
  • --auto: Starts transferring taking the settings in the config file.

💁 Examples

  • Transfer:
    • The Godot editor (version 3.2.3-stable).
    • For the Raspberry Pi 4.
    • To the Raspberry Pi with the username pi and the IP 192.168.1.100.
./transfer-files-raspberry-pi.sh --remote-username "pi" --remote-ip "192.168.1.100" --godot-versions "3.2.3-stable" --rpi-versions "4" --binaries "editor"
  • Transfer:
    • The Godot editor (version 3.2.3-stable).
    • For the Raspberry Pi 4.
    • To the Raspberry Pi with the username pi and the IP 192.168.1.100.
    • And store the files in /path/to/the/folder/ (note the trailing slash!).
./transfer-files-raspberry-pi.sh --remote-username "pi" --remote-ip "192.168.1.100" --godot-versions "3.2.3-stable" --rpi-versions "4" --binaries "editor" --remote-dir "/path/to/the/folder/"

📋 Config file

You can edit this file directly, instead of passing all the options mentioned above, and then run:

./transfer-files-raspberry-pi.sh --auto
# Settings for "transfer-files-raspberry-pi.sh".

# Godot compiled binaries directory.
# Default: "./compiled-binaries".
godot_compiled_binaries_dir = ""

# Raspberry Pi directory where the files will be transfered.
# Default: "~/godot-binaries/" (note the trailing slash!).
remote_dir = ""

# Username of the Raspberry Pi
remote_username = ""

# IP of the Raspberry Pi
remote_ip = ""

# Godot version/s to be transfered (separated by blank spaces).
# Version/s must end with the suffix "-stable", except for "master".
godot_versions = ""

# Godot commit/s to transfer (separated by blank spaces).
# Commit/s: SHA-1 hash/es.
godot_commits = ""

# Raspberry Pi version/s to transfer (separated by blank spaces).
# Version/s: "3 4".
raspberry_pi_versions = ""

# Types of Godot binaries to transfer (separated by blank spaces).
# Binary type/s: "editor export-template headless server".
binaries = ""

# Transfer a pack of all the binaries of the same Godot version and the same Raspberry Pi version
# instead of transferring each binary separately.
# Only use it if you previously used the "--pack" option when compiling the binaries.
# Option: "yes".
pack = "yes"

🗒️ Changelog

See CHANGELOG.

👤 Author

hiulit

🤝 Contributing

Feel free to:

🙌 Supporting this project

If you love this project or find it helpful, please consider supporting it through any size donations to help make it better ❤️.

Become a patron

Suppor me on Ko-Fi

Buy me a coffee

Donate Paypal

If you can't, consider sharing it with the world...

... or giving it a star ⭐️.

👏 Credits

Thanks to:

📝 Licenses

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].