#Exporting via the CLI doesn't seem to fill in the export template

4 messages · Page 1 of 1 (latest)

tardy ingot
#

TL;DR: Exporting my game via CLI produces output files but they seem to be templates that aren't filled in. Export via UI works fine but isn't an option since I'm aiming to automate web deployment.

Hi, I'm making a online web game and decided to do the frontend in godot rather than some JS framework. The project is run on a cloud server and as such I'd like to automate the deployment process which includes exporting the project via the CLI.

This is the point where I ran into issues. When exporting for the web template via the UI all is fine and well but when using the CLI it seems like the export template doesn't get filled in as the html file contains a lot of $GODOT_... variables.

The command i'm using is the following (run from the the web project root, nog godot project root)
godot --headless --path "./frontend/" --export-debug "Web" ../frontend-export/game
My project layout is as follows (additional explanations in brackets):```filetree
. (where i'm running the export command from)
├── backend (backend server, not relevant for exporting)
├── frontend (godot project)
│ ├── export_presets.cfg
│ ├── project.godot
│ └── (the rest of the project files)
└── frontend-export (where i want the export to end up)

In case it's relevant:
- OS: linux.
- Godot version: `4.2.1.stable.arch_linux`
- `export_presets.cfg` included in next message.
#

export_presets.cfg: ```
[preset.0]

name="Web"
platform="Web"
runnable=true
dedicated_server=false
custom_features=""
export_filter="all_resources"
include_filter=""
exclude_filter=""
export_path="../frontend-export/game.html"
encryption_include_filters=""
encryption_exclude_filters=""
encrypt_pck=false
encrypt_directory=false

[preset.0.options]

custom_template/debug=""
custom_template/release=""
variant/extensions_support=false
vram_texture_compression/for_desktop=true
vram_texture_compression/for_mobile=false
html/export_icon=true
html/custom_html_shell=""
html/head_include=""
html/canvas_resize_policy=2
html/focus_canvas_on_start=true
html/experimental_virtual_keyboard=false
progressive_web_app/enabled=false
progressive_web_app/offline_page=""
progressive_web_app/display=1
progressive_web_app/orientation=0
progressive_web_app/icon_144x144=""
progressive_web_app/icon_180x180=""
progressive_web_app/icon_512x512=""
progressive_web_app/background_color=Color(0, 0, 0, 1)

lime haven
#

Export the project using the given preset and matching release template. The preset name should match one defined in export_presets.cfg. <path> should be absolute or relative to the project directory, and include the filename for the binary (e.g. 'builds/game.exe'). The target directory should exist.

#

I think you might be missing the .html in the command line