Work in progress
The content of this page was not yet updated for Godot4.5 and may beoutdated. If you know how to improve this page or you can confirm that it's up to date, feel free toopen a pull request.
Exporting projects
Why export?
Originally, Godot did not have any means to export projects. Thedevelopers would compile the proper binaries and build the packages foreach platform manually.
When more developers (and even non-programmers) started using it, andwhen our company started taking more projects at the same time, itbecame evident that this was a bottleneck.
On PC
Distributing a game project on PC with Godot is rather easy. Dropthe Godot binary in the same directory as theproject.godot file,then compress the project directory and you are done.
It sounds simple, but there are probably a few reasons why the developermay not want to do this. The first one is that it may not be desirableto distribute loads of files. Some developers may not like curious userspeeking at how the game was made, others may find it inelegant, and so on.Another reason is that the developer might prefer a specially-compiledbinary, which is smaller in size, more optimized and does not includetools like the editor and debugger.
Finally, Godot has a simple but efficient system forcreating DLCs as extra package files.
On mobile
The same scenario on mobile platforms is a little worse.To distribute a project on those devices, a binary for each ofthose platforms is built, then added to a native project togetherwith the game data.
This can be troublesome because it means that the developer must befamiliarized with the SDK of each platform before even being able toexport. While learning each SDK is always encouraged, it can befrustrating to be forced to do it at an undesired time.
There is also another problem with this approach: different devicesprefer some data in different formats to run. The main example of thisis texture compression. All PC hardware uses S3TC (BC) compression andthat has been standardized for more than a decade, but mobile devicesuse different formats for texture compression, such as ETC1 and ETC2.
Export menu
After many attempts at different export workflows, the current one hasproven to work the best. At the time of this writing, not all platforms aresupported yet, but the supported platforms continue to grow.
To open the export menu, click theExport button:

The export menu will open. However, it will be completely empty.This is because we need to add an export preset.

To create an export preset, click theAdd… button at the topof the export menu. This will open a drop-down list of platformsto choose from for an export preset.

The default options are often enough to export, so tweaking them isusually not necessary. However, many platforms require additionaltools (SDKs) to be installed to be able to export. Additionally, Godotneeds export templates installed to create packages. The export menuwill complain when something is missing and will not allow the user toexport for that platform until they resolve it:

At that time, the user is expected to come back to the documentation and followinstructions on how to properly set up that platform.
The buttons at the bottom of the menu allow you to export the project in a fewdifferent ways:
Export All: Export the project as a playable build (Godot executable and project data)for all the presets defined. All presets must have anExport Path defined for thisto work.
Export Project: Export the project as a playable build(Godot executable and project data) for the selected preset.
Export PCK/ZIP: Export the project resources as a PCK or ZIP package.This is not a playable build, it only exports the project data without a Godot executable.
Export templates
Apart from setting up the platform, the export templates must beinstalled to be able to export projects. They can be obtained as aTPZ file (which is a renamed ZIP archive) from thedownload page of the website.
Once downloaded, they can be installed using theInstall Export Templatesoption in the editor:

Resource options
When exporting, Godot makes a list of all the files to export and thencreates the package. There are 3 different modes for exporting:
Export all resources in the project
Export selected scenes (and dependencies)
Export selected resources (and dependencies)

Export all resources in the project will export every resource in theproject.Export selected scenes andExport selected resources givesyou a list of the scenes or resources in the project, and you have toselect every scene or resource you want to export.

Export all resources in the project except resources checked below doesexactly what it says, everything will be exported except for what you selectin the list.
Export as dedicated server will remove all visuals from a project and replacethem with a placeholder. This includes Cubemap, CubemapArray, Material, Mesh,Texture2D, Texture2DArray, Texture3D. You can also go into the list of files andspecify specific visual resources that you do wish to keep.
Note
Files and folders whose name begin with a period will never be included inthe exported project. This is done to prevent version control folders like.git from being included in the exported PCK file.
Below the list of resources are two filters that can be setup. The first allowsnon-resource files such as.txt,.json and.csv to be exported withthe project. The second filter can be used to exclude every file of a certaintype without manually deselecting every one. For example,.png files.
Configuration files
The export configuration is stored in two files that can both be found in the projectdirectory:
export_presets.cfg: This file contains the vast majority of the exportconfiguration and can be safely committed to version control. There is nothingin here that you would normally have to keep secret..godot/export_credentials.cfg: This file contains export options that areconsidered confidential, like passwords and encryption keys. It should generallynot be committed to version control or shared with others unless you knowexactly what you are doing.
Since the credentials file is usually kept out of version control systems, someexport options will be missing if you clone the project to a new machine. The easiestway to deal with this is to copy the file manually from the old location to the new one.
Exporting from the command line
In production, it is useful to automate builds, and Godot supports thiswith the--export-release and--export-debug command line parameters.Exporting from the command line still requires an export preset to definethe export parameters. A basic invocation of the command would be:
godot--export-release"Windows Desktop"some_name.exeThis will export tosome_name.exe, assuming there is a presetcalled "Windows Desktop" and the template can be found. (The export preset namemust be written within quotes if it contains spaces or special characters.)The output path isrelative to the project path orabsolute;it does not respect the directory the command was invoked from.
The output file extension should match the one used by the Godot export process:
Windows:
.exemacOS:
.appor.zip(or.dmgwhen exportingfrom macOS)Linux: Any extension (including none).
.x86_64is typically used for 64-bit x86 binaries.HTML5:
.zipAndroid:
.apkiOS:
.zip
You can also configure it to exportonly the PCK or ZIP file, allowinga single exported main pack file to be used with multiple Godot executables.When doing so, the export preset name must still be specified on the command line:
godot--export-pack"Windows Desktop"some_name.pckIt is often useful to combine the--export-release flag with the--pathflag, so that you do not need tocd to the project folder before runningthe command:
godot--path/path/to/project--export-release"Windows Desktop"some_name.exeSee also
SeeCommand line tutorial for more information about using Godotfrom the command line.
PCK versus ZIP pack file formats
Each format has its upsides and downsides. PCK is the default and recommendedformat for most use cases, but you may want to use a ZIP archive insteaddepending on your needs.
PCK format:
Uncompressed format. Larger file size, but faster to read/write.
Not readable and writable using tools normally present on the user'soperating system, even though there arethird-party toolsto extract and create PCK files.
ZIP format:
Compressed format. Smaller file size, but slower to read/write.
Readable and writable using tools normally present on the user's operating system.This can be useful to make modding easier (see alsoExporting packs, patches, and mods).
Warning
Due to aknown bug,when using a ZIP file as a pack file, the exported binary will not try to useit automatically. Therefore, you have to create alauncher script thatthe player can double-click or run from a terminal to launch the project:
:: launch.bat (Windows)@echo offmy_project.exe --main-pack my_project.zip# launch.sh (Linux)./my_project.x86_64 --main-pack my_project.zip
Save the launcher script and place it in the same folder as the exported binary.On Linux, make sure to give executable permissions to the launcher script usingthe commandchmod+xlaunch.sh.