Update Android export filename to match the export format
Co-Authored-By: David Snopek <191561+dsnopek@users.noreply.github.com>
This commit is contained in:
parent
a797a2f5f7
commit
f4d28f655e
2 changed files with 12 additions and 4 deletions
|
|
@ -1425,8 +1425,12 @@ void ProjectExportDialog::_export_project() {
|
|||
export_project->add_filter("*." + extension, vformat(TTR("%s Export"), platform->get_name()));
|
||||
}
|
||||
|
||||
if (!current->get_export_path().is_empty()) {
|
||||
export_project->set_current_path(current->get_export_path());
|
||||
String path = current->get_export_path();
|
||||
if (!path.is_empty()) {
|
||||
if (extension_list.find(path.get_extension()) == nullptr && extension_list.size() >= 1) {
|
||||
path = path.get_basename() + "." + extension_list.front()->get();
|
||||
}
|
||||
export_project->set_current_path(path);
|
||||
} else {
|
||||
if (extension_list.size() >= 1) {
|
||||
export_project->set_current_file(default_filename + "." + extension_list.front()->get());
|
||||
|
|
|
|||
|
|
@ -3116,8 +3116,12 @@ bool EditorExportPlatformAndroid::has_valid_project_configuration(const Ref<Edit
|
|||
|
||||
List<String> EditorExportPlatformAndroid::get_binary_extensions(const Ref<EditorExportPreset> &p_preset) const {
|
||||
List<String> list;
|
||||
list.push_back("apk");
|
||||
list.push_back("aab");
|
||||
int export_format = int(p_preset->get("gradle_build/export_format"));
|
||||
if (export_format == EXPORT_FORMAT_AAB) {
|
||||
list.push_back("aab");
|
||||
} else {
|
||||
list.push_back("apk");
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue