Fix CLI export when export_path is in preset.

Export presets contains the export_path option, to specify the default
export location, but the CLI export option disregarded that, and always
required and export path to be specified.
After this commit, if the export path is not specified in the command,
the one in the preset will be used, erroring only if it's not present or
invalid.

(cherry picked from commit 032a1c5dc3)
This commit is contained in:
Fabio Alessandrelli 2020-11-17 18:02:41 +01:00 committed by Rémi Verschelde
parent 755ee76871
commit f32c878ef7
No known key found for this signature in database
GPG key ID: C3336907360768E1
2 changed files with 10 additions and 15 deletions

View file

@ -1613,14 +1613,6 @@ bool Main::start() {
return false;
}
if (_export_preset != "") {
if (positional_arg == "") {
String err = "Command line includes export parameter option, but no destination path was given.\n";
err += "Please specify the binary's file path to export to. Aborting export.";
ERR_PRINT(err);
return false;
}
}
#endif
if (script == "" && game_path == "" && String(GLOBAL_DEF("application/run/main_scene", "")) != "") {