- Clone the repo using
git clone https://github.com/decentraland/godot-explorer
- If you're in Windows we suggest to clone the repo in a very short path like
C:/gexplorer
due https://developercommunity.visualstudio.com/t/clexe-compiler-driver-cannot-handle-long-file-path/975889
-
Install rust
-
Download and install third party libraries
- Linux (apt-get based):
- Install alsa and udev:
sudo apt-get update; sudo apt-get install --no-install-recommends libasound2-dev libudev-dev
- Install ffmpeg deps:
sudo apt install -y --no-install-recommends clang curl pkg-config libavcodec-dev libavformat-dev libavutil-dev libavfilter-dev libavdevice-dev
- Install Livekit deps:
sudo apt update -y; sudo apt install -y libssl-dev libx11-dev libgl1-mesa-dev libxext-dev
- Install alsa and udev:
- MacOS:
brew install ffmpeg@6 pkg-config
- Windows:
- download and unzip
https://www.gyan.dev/ffmpeg/builds/ffmpeg-release-full-shared.7z
- set
FFMPEG_DIR
=root folder where ffmpeg has been unzipped
- add
ffmpeg\bin
to yourPATH
- set
LIBCLANG_PATH
=path to LLVM\x64\bin
(this is packaged with visual studio, or can be downloaded separately)
- download and unzip
- the
.github/workflows/ci.yml
file can be useful to guide you
- Linux (apt-get based):
-
Run
cargo run -- install --platforms linux
in the repo root folder (change linux to your target platform).
- Ensure you are in the root folder first
- You can run
cargo run -- run
to build the Rust library and execute the client.
- With adding
-r
it builds the library in release mode. Note: the Godot executable is an editor, so it's arelease_debug
build, see the Target section here for more information. - With adding
-e
it also builds the library, but the project edition is executed instead of the client.
Execute the following commands for building Godot:
# Run Docker
docker run -v {godot-explorer-repo-path}:/app/ -it quay.io/decentraland/dcl-godot-android-builder:99091016236094cb776bd9cb1298602e56b8cdab
# Compile for Android
cd lib
./android-build.sh # arm64
./android-build.sh x86_64 # android x86_64 if needed
cd ../../ # return
# Compile for Linux
cargo run -- install --platforms android
cargo run -- run --only-build
cd ../../ # return
# Generate .APK
## Download Android Template, only one time needed
cd godot/
git clone https://github.com/decentraland/godot-explorer-android-template.git android # Only one time
cd ../
## Build Android and Export APK for arm64
./build-android-apk.sh
More details on CONTRIBUTING.md
This repo is set up to be opened with Visual Studio Code. In the section Run and Debug
in the Activity bar, you can find the configuration for your platform.
- Ensure you are in the root folder first
- Run
cargo run -- coverage --dev
. It'll create acoverage
folder with the index.html with the all information. In order to run these commands, you need to have llvm-tools and grcov installed. You can install them withrustup component add llvm-tools-preview
andcargo install grcov
.
See lib/builds.md