|
@@ -46,7 +46,7 @@
|
|
|
void ExportTemplateManager::_update_template_status() {
|
|
|
// Fetch installed templates from the file system.
|
|
|
Ref<DirAccess> da = DirAccess::create(DirAccess::ACCESS_FILESYSTEM);
|
|
|
- const String &templates_dir = EditorSettings::get_singleton()->get_templates_dir();
|
|
|
+ const String &templates_dir = EditorSettings::get_singleton()->get_export_templates_dir();
|
|
|
|
|
|
Error err = da->change_dir(templates_dir);
|
|
|
ERR_FAIL_COND_MSG(err != OK, "Could not access templates directory at '" + templates_dir + "'.");
|
|
@@ -439,7 +439,7 @@ bool ExportTemplateManager::_install_file_selected(const String &p_file, bool p_
|
|
|
}
|
|
|
|
|
|
Ref<DirAccess> d = DirAccess::create(DirAccess::ACCESS_FILESYSTEM);
|
|
|
- String template_path = EditorSettings::get_singleton()->get_templates_dir().plus_file(version);
|
|
|
+ String template_path = EditorSettings::get_singleton()->get_export_templates_dir().plus_file(version);
|
|
|
Error err = d->make_dir_recursive(template_path);
|
|
|
if (err != OK) {
|
|
|
EditorNode::get_singleton()->show_warning(TTR("Error creating path for extracting templates:") + "\n" + template_path);
|
|
@@ -538,7 +538,7 @@ void ExportTemplateManager::_uninstall_template(const String &p_version) {
|
|
|
|
|
|
void ExportTemplateManager::_uninstall_template_confirmed() {
|
|
|
Ref<DirAccess> da = DirAccess::create(DirAccess::ACCESS_FILESYSTEM);
|
|
|
- const String &templates_dir = EditorSettings::get_singleton()->get_templates_dir();
|
|
|
+ const String &templates_dir = EditorSettings::get_singleton()->get_export_templates_dir();
|
|
|
|
|
|
Error err = da->change_dir(templates_dir);
|
|
|
ERR_FAIL_COND_MSG(err != OK, "Could not access templates directory at '" + templates_dir + "'.");
|
|
@@ -616,7 +616,7 @@ void ExportTemplateManager::_installed_table_button_cbk(Object *p_item, int p_co
|
|
|
}
|
|
|
|
|
|
void ExportTemplateManager::_open_template_folder(const String &p_version) {
|
|
|
- const String &templates_dir = EditorSettings::get_singleton()->get_templates_dir();
|
|
|
+ const String &templates_dir = EditorSettings::get_singleton()->get_export_templates_dir();
|
|
|
OS::get_singleton()->shell_open("file://" + templates_dir.plus_file(p_version));
|
|
|
}
|
|
|
|
|
@@ -640,12 +640,12 @@ void ExportTemplateManager::_hide_dialog() {
|
|
|
}
|
|
|
|
|
|
bool ExportTemplateManager::can_install_android_template() {
|
|
|
- const String templates_dir = EditorSettings::get_singleton()->get_templates_dir().plus_file(VERSION_FULL_CONFIG);
|
|
|
+ const String templates_dir = EditorSettings::get_singleton()->get_export_templates_dir().plus_file(VERSION_FULL_CONFIG);
|
|
|
return FileAccess::exists(templates_dir.plus_file("android_source.zip"));
|
|
|
}
|
|
|
|
|
|
Error ExportTemplateManager::install_android_template() {
|
|
|
- const String &templates_path = EditorSettings::get_singleton()->get_templates_dir().plus_file(VERSION_FULL_CONFIG);
|
|
|
+ const String &templates_path = EditorSettings::get_singleton()->get_export_templates_dir().plus_file(VERSION_FULL_CONFIG);
|
|
|
const String &source_zip = templates_path.plus_file("android_source.zip");
|
|
|
ERR_FAIL_COND_V(!FileAccess::exists(source_zip), ERR_CANT_OPEN);
|
|
|
return install_android_template_from_file(source_zip);
|