Update the visibility for the custom templates for all platforms

Hide the custom template options behind the `Advanced Options` toggle
This commit is contained in:
Fredia Huya-Kouadio
2024-06-24 06:45:31 -07:00
parent 2b7ea6223b
commit 2d3f6963b2
7 changed files with 46 additions and 5 deletions

View File

@ -1979,7 +1979,7 @@ bool EditorExportPlatformAndroid::get_export_option_visibility(const EditorExpor
}
if (p_option == "custom_template/debug" || p_option == "custom_template/release") {
// The APK templates are ignored if Gradle build is enabled.
return !bool(p_preset->get("gradle_build/use_gradle_build"));
return advanced_options_enabled && !bool(p_preset->get("gradle_build/use_gradle_build"));
}
// Hide .NET embedding option (always enabled).

View File

@ -254,7 +254,15 @@ bool EditorExportPlatformIOS::get_export_option_visibility(const EditorExportPre
}
bool advanced_options_enabled = p_preset->are_advanced_options_enabled();
if (p_option.begins_with("privacy") || p_option == "application/generate_simulator_library_if_missing" || (p_option.begins_with("icons/") && !p_option.begins_with("icons/icon") && !p_option.begins_with("icons/app_store"))) {
if (p_option.begins_with("privacy") ||
p_option == "application/generate_simulator_library_if_missing" ||
(p_option.begins_with("icons/") && !p_option.begins_with("icons/icon") && !p_option.begins_with("icons/app_store")) ||
p_option == "custom_template/debug" ||
p_option == "custom_template/release" ||
p_option == "application/additional_plist_content" ||
p_option == "application/delete_old_export_files_unconditionally" ||
p_option == "application/icon_interpolation" ||
p_option == "application/signature") {
return advanced_options_enabled;
}

View File

@ -171,7 +171,9 @@ bool EditorExportPlatformLinuxBSD::get_export_option_visibility(const EditorExpo
if (!ssh && p_option != "ssh_remote_deploy/enabled" && p_option.begins_with("ssh_remote_deploy/")) {
return false;
}
if (p_option == "dotnet/embed_build_outputs") {
if (p_option == "dotnet/embed_build_outputs" ||
p_option == "custom_template/debug" ||
p_option == "custom_template/release") {
return advanced_options_enabled;
}
return true;

View File

@ -332,7 +332,21 @@ bool EditorExportPlatformMacOS::get_export_option_visibility(const EditorExportP
}
bool advanced_options_enabled = p_preset->are_advanced_options_enabled();
if (p_option.begins_with("privacy") || p_option == "codesign/entitlements/additional") {
if (p_option.begins_with("privacy") ||
p_option == "codesign/entitlements/additional" ||
p_option == "custom_template/debug" ||
p_option == "custom_template/release" ||
p_option == "application/additional_plist_content" ||
p_option == "application/export_angle" ||
p_option == "application/icon_interpolation" ||
p_option == "application/signature" ||
p_option == "display/high_res" ||
p_option == "xcode/platform_build" ||
p_option == "xcode/sdk_build" ||
p_option == "xcode/sdk_name" ||
p_option == "xcode/sdk_version" ||
p_option == "xcode/xcode_build" ||
p_option == "xcode/xcode_version") {
return advanced_options_enabled;
}
}

View File

@ -372,6 +372,16 @@ void EditorExportPlatformWeb::get_export_options(List<ExportOption> *r_options)
r_options->push_back(ExportOption(PropertyInfo(Variant::COLOR, "progressive_web_app/background_color", PROPERTY_HINT_COLOR_NO_ALPHA), Color()));
}
bool EditorExportPlatformWeb::get_export_option_visibility(const EditorExportPreset *p_preset, const String &p_option) const {
bool advanced_options_enabled = p_preset->are_advanced_options_enabled();
if (p_option == "custom_template/debug" ||
p_option == "custom_template/release") {
return advanced_options_enabled;
}
return true;
}
String EditorExportPlatformWeb::get_name() const {
return "Web";
}

View File

@ -112,6 +112,7 @@ public:
virtual void get_preset_features(const Ref<EditorExportPreset> &p_preset, List<String> *r_features) const override;
virtual void get_export_options(List<ExportOption> *r_options) const override;
virtual bool get_export_option_visibility(const EditorExportPreset *p_preset, const String &p_option) const override;
virtual String get_name() const override;
virtual String get_os_name() const override;

View File

@ -398,7 +398,13 @@ bool EditorExportPlatformWindows::get_export_option_visibility(const EditorExpor
return false;
}
if (p_option == "dotnet/embed_build_outputs") {
if (p_option == "dotnet/embed_build_outputs" ||
p_option == "custom_template/debug" ||
p_option == "custom_template/release" ||
p_option == "application/d3d12_agility_sdk_multiarch" ||
p_option == "application/export_angle" ||
p_option == "application/export_d3d12" ||
p_option == "application/icon_interpolation") {
return advanced_options_enabled;
}
return true;