Merge pull request #85819 from Malcolmnixon/export-android-build-template

Add option to install android build template for export
This commit is contained in:
Yuri Sizov 2023-12-08 16:58:54 +01:00
commit 9dce1a45a0
3 changed files with 12 additions and 3 deletions

View file

@ -974,6 +974,9 @@ void EditorNode::_fs_changed() {
} else { // Normal project export.
String config_error;
bool missing_templates;
if (export_defer.android_build_template) {
export_template_manager->install_android_template();
}
if (!platform->can_export(export_preset, config_error, missing_templates, export_defer.debug)) {
ERR_PRINT(vformat("Cannot export project with preset \"%s\" due to configuration errors:\n%s", preset_name, config_error));
err = missing_templates ? ERR_FILE_NOT_FOUND : ERR_UNCONFIGURED;
@ -4676,11 +4679,12 @@ void EditorNode::_begin_first_scan() {
requested_first_scan = true;
}
Error EditorNode::export_preset(const String &p_preset, const String &p_path, bool p_debug, bool p_pack_only) {
Error EditorNode::export_preset(const String &p_preset, const String &p_path, bool p_debug, bool p_pack_only, bool p_android_build_template) {
export_defer.preset = p_preset;
export_defer.path = p_path;
export_defer.debug = p_debug;
export_defer.pack_only = p_pack_only;
export_defer.android_build_template = p_android_build_template;
cmdline_export_mode = true;
return OK;
}