diff options
author | Hugo Locurcio <hugo.locurcio@hugo.pro> | 2023-07-17 09:53:45 +0200 |
---|---|---|
committer | Hugo Locurcio <hugo.locurcio@hugo.pro> | 2023-08-04 10:29:33 +0200 |
commit | ad4480bf2e6c0ff0c4694c7ce8f302376d84be69 (patch) | |
tree | 864440acdb66cf3a605210f11d75b65af3df2895 /platform/ios/export/export_plugin.cpp | |
parent | eb4301b941fa211de204e37bd4d701f7e490a945 (diff) | |
download | redot-engine-ad4480bf2e6c0ff0c4694c7ce8f302376d84be69.tar.gz |
Add a "version" project setting and use it in new export presets
This makes it easy to retrieve the project version at runtime
for display purposes, while simplifying the export preset configuration.
You can now leave the version empty unless you need to override it on a per-preset
basis.
Since export presets save the values of default values to the `export_presets.cfg`
file, this change only affects export presets created after this commit was merged.
Diffstat (limited to 'platform/ios/export/export_plugin.cpp')
-rw-r--r-- | platform/ios/export/export_plugin.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/platform/ios/export/export_plugin.cpp b/platform/ios/export/export_plugin.cpp index 544bfb71e0..3d63b7bb55 100644 --- a/platform/ios/export/export_plugin.cpp +++ b/platform/ios/export/export_plugin.cpp @@ -177,7 +177,7 @@ void EditorExportPlatformIOS::get_export_options(List<ExportOption> *r_options) r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "application/bundle_identifier", PROPERTY_HINT_PLACEHOLDER_TEXT, "com.example.game"), "", false, true)); r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "application/signature"), "")); r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "application/short_version"), "1.0")); - r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "application/version"), "1.0")); + r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "application/version", PROPERTY_HINT_PLACEHOLDER_TEXT, "Leave empty to use project version"), "")); r_options->push_back(ExportOption(PropertyInfo(Variant::INT, "application/icon_interpolation", PROPERTY_HINT_ENUM, "Nearest neighbor,Bilinear,Cubic,Trilinear,Lanczos"), 4)); r_options->push_back(ExportOption(PropertyInfo(Variant::INT, "application/launch_screens_interpolation", PROPERTY_HINT_ENUM, "Nearest neighbor,Bilinear,Cubic,Trilinear,Lanczos"), 4)); @@ -284,7 +284,7 @@ void EditorExportPlatformIOS::_fix_config_file(const Ref<EditorExportPreset> &p_ } else if (lines[i].find("$short_version") != -1) { strnew += lines[i].replace("$short_version", p_preset->get("application/short_version")) + "\n"; } else if (lines[i].find("$version") != -1) { - strnew += lines[i].replace("$version", p_preset->get("application/version")) + "\n"; + strnew += lines[i].replace("$version", p_preset->get_version("application/version")) + "\n"; } else if (lines[i].find("$signature") != -1) { strnew += lines[i].replace("$signature", p_preset->get("application/signature")) + "\n"; } else if (lines[i].find("$team_id") != -1) { |