[macOS] Use per-architecture min. OS version for export.
This commit is contained in:
parent
4b8946102b
commit
3034d32429
|
@ -49,12 +49,17 @@ $usage_descriptions
|
|||
<string>NSApplication</string>
|
||||
<key>LSApplicationCategoryType</key>
|
||||
<string>public.app-category.$app_category</string>
|
||||
<key>LSMinimumSystemVersion</key>
|
||||
<string>$min_version</string>
|
||||
<key>LSArchitecturePriority</key>
|
||||
<array>
|
||||
<string>arm64</string>
|
||||
<string>x86_64</string>
|
||||
</array>
|
||||
<key>LSMinimumSystemVersionByArchitecture</key>
|
||||
<dict>
|
||||
<key>arm64</key>
|
||||
<string>$min_version_arm64</string>
|
||||
<key>x86_64</key>
|
||||
<string>$min_version</string>
|
||||
<string>$min_version_x86_64</string>
|
||||
</dict>
|
||||
<key>NSHighResolutionCapable</key>
|
||||
$highres
|
||||
|
|
|
@ -38,8 +38,11 @@
|
|||
<member name="application/icon_interpolation" type="int" setter="" getter="">
|
||||
Interpolation method used to resize application icon.
|
||||
</member>
|
||||
<member name="application/min_macos_version" type="String" setter="" getter="">
|
||||
Minimum version of macOS required for this application to run in the [code]major.minor.patch[/code] or [code]major.minor[/code] format, can only contain numeric characters ([code]0-9[/code]) and periods ([code].[/code]).
|
||||
<member name="application/min_macos_version_arm64" type="String" setter="" getter="">
|
||||
Minimum version of macOS required for this application to run on Apple Silicon Macs, in the [code]major.minor.patch[/code] or [code]major.minor[/code] format, can only contain numeric characters ([code]0-9[/code]) and periods ([code].[/code]).
|
||||
</member>
|
||||
<member name="application/min_macos_version_x86_64" type="String" setter="" getter="">
|
||||
Minimum version of macOS required for this application to run on Intel Macs, in the [code]major.minor.patch[/code] or [code]major.minor[/code] format, can only contain numeric characters ([code]0-9[/code]) and periods ([code].[/code]).
|
||||
</member>
|
||||
<member name="application/short_version" type="String" setter="" getter="">
|
||||
Application version visible to the user, can only contain numeric characters ([code]0-9[/code]) and periods ([code].[/code]). Falls back to [member ProjectSettings.application/config/version] if left empty.
|
||||
|
|
|
@ -451,7 +451,8 @@ void EditorExportPlatformMacOS::get_export_options(List<ExportOption> *r_options
|
|||
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::STRING, "application/copyright"), ""));
|
||||
r_options->push_back(ExportOption(PropertyInfo(Variant::DICTIONARY, "application/copyright_localized", PROPERTY_HINT_LOCALIZABLE_STRING), Dictionary()));
|
||||
r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "application/min_macos_version"), "10.12"));
|
||||
r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "application/min_macos_version_x86_64"), "10.12"));
|
||||
r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "application/min_macos_version_arm64"), "11.00"));
|
||||
r_options->push_back(ExportOption(PropertyInfo(Variant::INT, "application/export_angle", PROPERTY_HINT_ENUM, "Auto,Yes,No"), 0, true));
|
||||
r_options->push_back(ExportOption(PropertyInfo(Variant::BOOL, "display/high_res"), true));
|
||||
|
||||
|
@ -823,8 +824,12 @@ void EditorExportPlatformMacOS::_fix_plist(const Ref<EditorExportPreset> &p_pres
|
|||
strnew += lines[i].replace("$app_category", cat.to_lower()) + "\n";
|
||||
} else if (lines[i].contains("$copyright")) {
|
||||
strnew += lines[i].replace("$copyright", p_preset->get("application/copyright")) + "\n";
|
||||
} else if (lines[i].contains("$min_version_arm64")) {
|
||||
strnew += lines[i].replace("$min_version_arm64", p_preset->get("application/min_macos_version_arm64")) + "\n";
|
||||
} else if (lines[i].contains("$min_version_x86_64")) {
|
||||
strnew += lines[i].replace("$min_version_x86_64", p_preset->get("application/min_macos_version_x86_64")) + "\n";
|
||||
} else if (lines[i].contains("$min_version")) {
|
||||
strnew += lines[i].replace("$min_version", p_preset->get("application/min_macos_version")) + "\n";
|
||||
strnew += lines[i].replace("$min_version", p_preset->get("application/min_macos_version_x86_64")) + "\n"; // Old template, use x86-64 version for both.
|
||||
} else if (lines[i].contains("$highres")) {
|
||||
strnew += lines[i].replace("$highres", p_preset->get("display/high_res") ? "\t<true/>" : "\t<false/>") + "\n";
|
||||
} else if (lines[i].contains("$additional_plist_content")) {
|
||||
|
|
Loading…
Reference in New Issue