Adquirindo o código fonte

Baixando o código-fonte do Godot

Antes de entrar no sistema de compilação SCons e compilar o Godot, você precisa antes baixar o código-fonte do Godot.

O código-fonte está disponível no GitHub e apesar de você poder baixar manualmente através do site, em geral é melhor baixar através do sistema de controle de versão git.

If you are compiling in order to make contributions or pull requests, you should follow the instructions from the Pull Request workflow.

If you don't know much about git yet, there are a great number of tutorials available on various websites.

No geral, você precisa instalar o git e/ou um dos vários clientes GUI.

Depois, para obter a versão de desenvolvimento mais recente do código-fonte do Godot (o ramo master, instável), você pode usar git clone.

Se você estiver usando o cliente de linha de comando git, isso é feito digitando o seguinte em um terminal:

git clone https://github.com/godotengine/godot.git
# You can add the --depth 1 argument to omit the commit history (shallow clone).
# A shallow clone is faster, but not all Git operations (like blame) will work.

Para qualquer versão estável, visite a página de lançamentos e clique no link para a versão que deseja. Você pode então baixar e extrair a fonte do link de download na página.

With git, you can also clone a stable release by specifying its branch or tag after the --branch (or just -b) argument:

# Clone the continuously maintained stable branch (`4.5` as of writing).
git clone https://github.com/godotengine/godot.git -b 4.5

# Clone the `4.5-stable` tag. This is a fixed revision that will never change.
git clone https://github.com/godotengine/godot.git -b 4.5-stable

# After cloning, optionally go to a specific commit.
# This can be used to access the source code at a specific point in time,
# e.g. for development snapshots, betas and release candidates.
cd godot
git checkout f4af8201bac157b9d47e336203d3e8a8ef729de2

The maintenance branches are used to release further patches on each minor version.

You can get the source code for each release and pre-release in .tar.xz format from godotengine/godot-builds on GitHub. This lacks version control information but has a slightly smaller download size.

Depois de baixar o código-fonte do Godot, você pode continuar a compilar o Godot.