-
-
Notifications
You must be signed in to change notification settings - Fork 21.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CLI export fails #16949
Comments
Confirmed. The error happens when the target file already exists. Here's what I tried :
Exporting only works when
It's not a bug per se, it's a lack of documentation. |
The error occurs even when no target file exists. And the target file never gets generated from command line. So it is a valid bug. I confirmed with 3.0.2 stable release: godot --export "Linux/X11" /tmp
ERROR: copy: Condition 'err ' is true. returned: err
At: core/os/dir_access.cpp:305 I also confirmed that it exports fine from GUI editor menu. |
You're right, I can't export at all using CLI with the latest master. It works with Godot 3.0 and 3.1 though. |
I tested with both Godot 3.0 and 3.0.2 they both fail. I haven't tested master, and I don't see 3.1 being released yet. I guess I'll try master if you meant it was fixed in latest master. I uncommented the printf statement and it shows that it's trying to copy the templates/linux_x11_64_debug to the output directory. They both exist and have proper permissions. |
Ok, that was it. The output path is not supposed be a directory, but a filename. I guess the documentation wasn't updated after all. Not a bug. It's working if I provide an output filename. |
I mixed up the versions, my bad. I meant 3.0.1. I can export using CLI in 3.0.1 (I just did again), but not using master, with the exact same project and the exact same command. |
Thank you for the solution. |
Hello, I have this exact problem, and I specified a filename, not a directory as argument Check #17977 (I closed it as it is related to this bug report).
One difference is that I use the server version, not the GUI version which works fine (even for exporting). |
@lstep when you say that the GUI version works fine, you mean exporting from the interface right? As I wrote in #17977 I don't think this is related to the server version, as I can reproduce the error not using the server version. |
I confirm, using the command line options from the "normal" version of Godot also fails:
And just to be sure, there is no
So the only way to export is to go through the GUI interface to export. |
It's |
@akien-mga actually "Linux/X11" is now the name when you add a new Linux export preset. But other than that, it is also possible to rename it now, so it could be anything. |
Ah thanks for the clarification :) |
Still reproduceable at b4c6509 |
Tested in 3.0.6
^ This works as long as the destination path exists.
|
I get a different error here (Linux DirAccess), if the destination folder is missing. 3.0.6:
master:
If it's present, 3.0.6 works fine, and master still fails with this "Failed to open <nothing>". |
BTW I'm surprised it even works, the preset name should come right after |
On 3.0.6 I'm not able to get it to working, even with the strange order of args you provide above
Yields the error:
Because it tries to load This export preset works fine locally on Windows both with GUI and CLI export. |
As I mentioned in #16949 (comment), the preset name should come right after
|
That does not work either:
|
Seems like you have to give the binary name you want:
|
This is a HTML5 export, so the result should be 5 files. So if giving the binary name similar to the GUI export, where one would give the name "index" and the all the files would be index.js, index.pck etc, then this command would make sense:
But it still does not work. |
For HTML5 export, the file name extension is `.html`.
…On 2018-08-26 17:34, Karl wrote:
This is a HTML5 export, so the result should be 5 files. So if giving
the binary name similar to the GUI export, where one would give the
name "index" and the all the files would be index.js, index.pck etc,
then this command would make sense:
|
I confirm I'm getting Error 12 with headless 3.0.6 when exporting Mac OS version and Error 7 when exporting Window version. |
Ok, I resolved this. |
@akien-mga, @hpvb what should we do with this? |
I'll rework the mess that is our command line interface eventually. |
I'm getting the exact same error, and error code as @karl-run
when attempting to HTML5 export via the headless linux binary on an ubuntu 18.04 server. I also created the template path as described by @hedin-hiervard: godotengine/godot-docs#1247 with no difference at all. Any suggestions? |
I was able to export from my continuous delivery server. (gocd) Hope this can help someone else. - buildStage:
jobs:
buildJob:
resources:
- linux
- mingw5
artifacts:
- build:
source: "export_windows"
- build:
source: "export_osx"
- build:
source: "export_linux"
- build:
source: "export_linux_server"
tasks:
- fetch:
artifact_origin: gocd
source: "godot_server.x11.opt.tools.64.llvm"
destination: ""
is_file: yes
pipeline: godot-groups
stage: defaultStage
job: serverJob
- fetch:
artifact_origin: gocd
source: "godot.templates.tpz"
destination: ""
is_file: yes
pipeline: godot-groups
stage: templateZipStage
job: defaultJob
- exec:
arguments:
- "-c"
- "mkdir -p groups"
command: "/bin/bash"
- exec:
arguments:
- "-c"
- "chmod +x ../b/repo && HOME=`pwd` ../b/repo init -u https://example.com/example/example.git -m build.xml"
command: "/bin/bash"
working_directory: "groups"
- exec:
arguments:
- "-c"
- "chmod +x ../b/repo && HOME=`pwd` ../b/repo sync --force-sync"
command: "/bin/bash"
working_directory: "groups"
- exec:
arguments:
- "-c"
- "git lfs fetch"
command: "/bin/bash"
working_directory: "groups"
- exec:
arguments:
- "-c"
- "mkdir -p .local/share/godot/ .config .cache"
command: "/bin/bash"
working_directory: "groups"
- exec:
arguments:
- "-c"
- "unzip godot.templates.tpz"
command: "/bin/bash"
- exec:
arguments:
- "-c"
- "rm -rf .local/share/godot/templates/"
command: "/bin/bash"
- exec:
arguments:
- "-c"
- "mkdir -p .local/share/godot/templates/`cat templates/version.txt`"
command: "/bin/bash"
- exec:
arguments:
- "-c"
- "mkdir -p .local/share/godot/templates/`cat templates/version.txt`"
command: "/bin/bash"
- exec:
arguments:
- "-c"
- "cp templates/* .local/share/godot/templates/`cat templates/version.txt`"
command: "/bin/bash"
- exec:
arguments:
- "-c"
- "cp templates/* .local/share/godot/templates/`cat templates/version.txt`"
command: "/bin/bash"
- exec:
arguments:
- "-c"
- "rm -rf templates"
command: "/bin/bash"
- exec:
arguments:
- "-c"
- "rm -rf export_windows"
command: "/bin/bash"
- exec:
arguments:
- "-c"
- "mkdir -p export_windows"
command: "/bin/bash"
# ./godot_server.x11.opt.tools.64.llvm --version and version.txt must be corresponding
- exec:
arguments:
- "-c"
- chmod +x godot_server.x11.opt.tools.64.llvm && HOME=`pwd` ./godot_server.x11.opt.tools.64.llvm --export "Windows Desktop" --path groups ../export_windows/groups.exe || true
command: "/bin/bash"
- exec:
arguments:
- "-c"
- "rm -rf export_osx"
command: "/bin/bash"
- exec:
arguments:
- "-c"
- "mkdir -p export_osx"
command: "/bin/bash"
- exec:
arguments:
- "-c"
- chmod +x godot_server.x11.opt.tools.64.llvm && HOME=`pwd` ./godot_server.x11.opt.tools.64.llvm --export "Mac OSX" --path groups ../export_osx/groups.zip || true
command: "/bin/bash"
- exec:
arguments:
- "-c"
- "rm -rf export_linux_server"
command: "/bin/bash"
- exec:
arguments:
- "-c"
- "mkdir -p export_linux_server"
command: "/bin/bash"
- exec:
arguments:
- "-c"
- chmod +x godot_server.x11.opt.tools.64.llvm && HOME=`pwd` ./godot_server.x11.opt.tools.64.llvm --export "Linux/X11 Server" --path groups ../export_linux_server/groups.x86_64 || true
command: "/bin/bash"
- exec:
arguments:
- "-c"
- "rm -rf export_linux"
command: "/bin/bash"
- exec:
arguments:
- "-c"
- "mkdir -p export_linux"
command: "/bin/bash"
- exec:
arguments:
- "-c"
- chmod +x godot_server.x11.opt.tools.64.llvm && HOME=`pwd` ./godot_server.x11.opt.tools.64.llvm --export "Linux/X11" --path groups ../export_linux/groups.x86_64 || true
command: "/bin/bash" Edit: typos. |
I'm trying to export a blank Godot project on Gentoo Linux (with xdg-user-dirs installed). The headless build acts as if the However, it fails to create the cache dir (get_cache_path() returns './godot/cache' but it isn't created) and if I manually create that one, it get this:
The failed "Failed to open" message is supposed to be followed by a path, I believe. |
Thanks @fire, finally got the headless linux binary cli export to work. The bit that finally did it for me was the fact that ~/.local/share/godot/templates/{version} has to match the version.txt in the export template's version.txt.
After that the export worked on the project like a charm. |
Further info: Godot 3.0.6-stable Trying to export using a self contained version of Godot causes:
EDIT: |
Hello there. As it so happens I'm also trying to set up a CI and had this not found export template error. When we first build the game via the godot GUI editor it creates for us a file called So CLI works only after you manually create this file (in the proper format of course) or after you first export for the presets you want to use. And sure, have those version/ |
You can commit |
That's a good point. So what's the option here then? I mean where do you store the android pass so that godot reads it and sets up the settings? If you can't use |
I'm barely scratching the surface of the changes needed to make the --export command line interface easy to use, but this should already improve things somewhat. - Streamline `can_export()` templates check in all platforms, checking first for the presence of official templates, then of any defined custom template, and reporting on the absence of any. Shouldn't change the actual return value much which is still true if either release or debug is usable - we might want to change that eventually and better validate against the requested target. - Fix discrepancy between platforms using `custom_package/debug` and `custom_template/debug` (resp. `release`). All now use `custom_template`, which will break compatibility for `export_presets.cfg` with earlier projects (but is easy to fix). - Use `can_export()` when attempting a command line export and report the same errors that would be shown in the editor. - Improve error reporting after a failed export attempt, handling missing template and invalid path more gracefully. - Cleanup of unused stuff in EditorNode around the export workflow. - Improve --export documentation in --help a bit. Fixes godotengine#16949 (at least many of the misunderstandings listed there). Fixes godotengine#18470.
Godot version:
Godot 3.0 stable
OS/device including version:
Linux Mint 18.3 Sylvia 64-bit
Issue description:
Trying to export via command line throws following error:
Steps to reproduce:
Just create a bare minimum project, I used one just with a single node in a scene, nothing else.
Try to export via command line.
The text was updated successfully, but these errors were encountered: