diff --git a/.gitignore b/.gitignore index 99333856f14..c9e8bac07ad 100644 --- a/.gitignore +++ b/.gitignore @@ -217,7 +217,7 @@ xcuserdata/ *.xcscmblueprint *.xccheckout *.xcodeproj/* -!misc/misc/dist/ios_xcode/godot_ios.xcodeproj/project.pbxproj +!misc/misc/dist/apple_embedded_xcode/godot.xcodeproj/project.pbxproj # Zed .zed/ diff --git a/editor/export/editor_export_platform_apple_embedded.cpp b/editor/export/editor_export_platform_apple_embedded.cpp index 35ec6244513..4699d7a35ed 100644 --- a/editor/export/editor_export_platform_apple_embedded.cpp +++ b/editor/export/editor_export_platform_apple_embedded.cpp @@ -369,449 +369,392 @@ void EditorExportPlatformAppleEmbedded::get_export_options(List *r } } -void EditorExportPlatformAppleEmbedded::_fix_config_file(const Ref &p_preset, Vector &pfile, const AppleEmbeddedConfigData &p_config, bool p_debug) { - String dbg_sign_id = p_preset->get("application/code_sign_identity_debug").operator String().is_empty() ? "Apple Development" : p_preset->get("application/code_sign_identity_debug"); - String rel_sign_id = p_preset->get("application/code_sign_identity_release").operator String().is_empty() ? "Apple Distribution" : p_preset->get("application/code_sign_identity_release"); - bool dbg_manual = !p_preset->get_or_env("application/provisioning_profile_uuid_debug", ENV_APPLE_PLATFORM_PROFILE_UUID_DEBUG).operator String().is_empty() || (dbg_sign_id != "Apple Development" && dbg_sign_id != "Apple Distribution"); - bool rel_manual = !p_preset->get_or_env("application/provisioning_profile_uuid_release", ENV_APPLE_PLATFORM_PROFILE_UUID_RELEASE).operator String().is_empty() || (rel_sign_id != "Apple Development" && rel_sign_id != "Apple Distribution"); +void EditorExportPlatformAppleEmbedded::_fix_config_file(const Ref &p_preset, Vector &p_file, const AppleEmbeddedConfigData &p_config, bool p_debug) { + CodeSigningDetails code_signing(p_preset); - String provisioning_profile_specifier_dbg = p_preset->get_or_env("application/provisioning_profile_specifier_debug", ENV_APPLE_PLATFORM_PROFILE_SPECIFIER_DEBUG).operator String(); - bool valid_dbg_specifier = !provisioning_profile_specifier_dbg.is_empty(); - dbg_manual |= valid_dbg_specifier; - - String provisioning_profile_specifier_rel = p_preset->get_or_env("application/provisioning_profile_specifier_release", ENV_APPLE_PLATFORM_PROFILE_SPECIFIER_RELEASE).operator String(); - bool valid_rel_specifier = !provisioning_profile_specifier_rel.is_empty(); - rel_manual |= valid_rel_specifier; - - String str = String::utf8((const char *)pfile.ptr(), pfile.size()); + String str = String::utf8((const char *)p_file.ptr(), p_file.size()); String strnew; Vector lines = str.split("\n"); - for (int i = 0; i < lines.size(); i++) { - if (lines[i].contains("$binary")) { - strnew += lines[i].replace("$binary", p_config.binary_name) + "\n"; - } else if (lines[i].contains("$modules_buildfile")) { - strnew += lines[i].replace("$modules_buildfile", p_config.modules_buildfile) + "\n"; - } else if (lines[i].contains("$modules_fileref")) { - strnew += lines[i].replace("$modules_fileref", p_config.modules_fileref) + "\n"; - } else if (lines[i].contains("$modules_buildphase")) { - strnew += lines[i].replace("$modules_buildphase", p_config.modules_buildphase) + "\n"; - } else if (lines[i].contains("$modules_buildgrp")) { - strnew += lines[i].replace("$modules_buildgrp", p_config.modules_buildgrp) + "\n"; - } else if (lines[i].contains("$name")) { - strnew += lines[i].replace("$name", p_config.pkg_name) + "\n"; - } else if (lines[i].contains("$bundle_identifier")) { - strnew += lines[i].replace("$bundle_identifier", p_preset->get("application/bundle_identifier")) + "\n"; - } else if (lines[i].contains("$short_version")) { - strnew += lines[i].replace("$short_version", p_preset->get_version("application/short_version")) + "\n"; - } else if (lines[i].contains("$version")) { - strnew += lines[i].replace("$version", p_preset->get_version("application/version")) + "\n"; - } else if (lines[i].contains("$min_version")) { - strnew += lines[i].replace("$min_version", - p_preset->get("application/min_" + get_platform_name() + "_version")) + - "\n"; - } else if (lines[i].contains("$signature")) { - strnew += lines[i].replace("$signature", p_preset->get("application/signature")) + "\n"; - } else if (lines[i].contains("$team_id")) { - strnew += lines[i].replace("$team_id", p_preset->get("application/app_store_team_id")) + "\n"; - } else if (lines[i].contains("$default_build_config")) { - strnew += lines[i].replace("$default_build_config", p_debug ? "Debug" : "Release") + "\n"; - } else if (lines[i].contains("$export_method")) { - int export_method = p_preset->get(p_debug ? "application/export_method_debug" : "application/export_method_release"); - strnew += lines[i].replace("$export_method", export_method_string[export_method]) + "\n"; - } else if (lines[i].contains("$provisioning_profile_specifier_debug")) { - strnew += lines[i].replace("$provisioning_profile_specifier_debug", provisioning_profile_specifier_dbg) + "\n"; - } else if (lines[i].contains("$provisioning_profile_specifier_release")) { - strnew += lines[i].replace("$provisioning_profile_specifier_release", provisioning_profile_specifier_rel) + "\n"; - } else if (lines[i].contains("$provisioning_profile_specifier")) { - String specifier = p_debug ? provisioning_profile_specifier_dbg : provisioning_profile_specifier_rel; - strnew += lines[i].replace("$provisioning_profile_specifier", specifier) + "\n"; - } else if (lines[i].contains("$provisioning_profile_uuid_release")) { - strnew += lines[i].replace("$provisioning_profile_uuid_release", p_preset->get_or_env("application/provisioning_profile_uuid_release", ENV_APPLE_PLATFORM_PROFILE_UUID_RELEASE)) + "\n"; - } else if (lines[i].contains("$provisioning_profile_uuid_debug")) { - strnew += lines[i].replace("$provisioning_profile_uuid_debug", p_preset->get_or_env("application/provisioning_profile_uuid_debug", ENV_APPLE_PLATFORM_PROFILE_UUID_DEBUG)) + "\n"; - } else if (lines[i].contains("$code_sign_style_debug")) { - if (dbg_manual) { - strnew += lines[i].replace("$code_sign_style_debug", "Manual") + "\n"; - } else { - strnew += lines[i].replace("$code_sign_style_debug", "Automatic") + "\n"; - } - } else if (lines[i].contains("$code_sign_style_release")) { - if (rel_manual) { - strnew += lines[i].replace("$code_sign_style_release", "Manual") + "\n"; - } else { - strnew += lines[i].replace("$code_sign_style_release", "Automatic") + "\n"; - } - } else if (lines[i].contains("$provisioning_profile_uuid")) { - String uuid = p_debug ? p_preset->get_or_env("application/provisioning_profile_uuid_debug", ENV_APPLE_PLATFORM_PROFILE_UUID_DEBUG) : p_preset->get_or_env("application/provisioning_profile_uuid_release", ENV_APPLE_PLATFORM_PROFILE_UUID_RELEASE); - if (uuid.is_empty()) { - Variant variant = p_debug ? provisioning_profile_specifier_dbg : provisioning_profile_specifier_rel; - bool valid = p_debug ? valid_dbg_specifier : valid_rel_specifier; - uuid = valid ? variant : ""; - } - strnew += lines[i].replace("$provisioning_profile_uuid", uuid) + "\n"; - } else if (lines[i].contains("$code_sign_identity_debug")) { - strnew += lines[i].replace("$code_sign_identity_debug", dbg_sign_id) + "\n"; - } else if (lines[i].contains("$code_sign_identity_release")) { - strnew += lines[i].replace("$code_sign_identity_release", rel_sign_id) + "\n"; - } else if (lines[i].contains("$additional_plist_content")) { - strnew += lines[i].replace("$additional_plist_content", p_config.plist_content) + "\n"; - } else if (lines[i].contains("$godot_archs")) { - strnew += lines[i].replace("$godot_archs", p_config.architectures) + "\n"; - } else if (lines[i].contains("$linker_flags")) { - strnew += lines[i].replace("$linker_flags", p_config.linker_flags) + "\n"; - } else if (lines[i].contains("$targeted_device_family")) { - String xcode_value; - switch ((int)p_preset->get("application/targeted_device_family")) { - case 0: // iPhone - xcode_value = "1"; - break; - case 1: // iPad - xcode_value = "2"; - break; - case 2: // iPhone & iPad - xcode_value = "1,2"; - break; - } - strnew += lines[i].replace("$targeted_device_family", xcode_value) + "\n"; - } else if (lines[i].contains("$cpp_code")) { - strnew += lines[i].replace("$cpp_code", p_config.cpp_code) + "\n"; - } else if (lines[i].contains("$docs_in_place")) { - strnew += lines[i].replace("$docs_in_place", ((bool)p_preset->get("user_data/accessible_from_files_app")) ? "" : "") + "\n"; - } else if (lines[i].contains("$docs_sharing")) { - strnew += lines[i].replace("$docs_sharing", ((bool)p_preset->get("user_data/accessible_from_itunes_sharing")) ? "" : "") + "\n"; - } else if (lines[i].contains("$entitlements_full")) { - String entitlements; - if ((String)p_preset->get("entitlements/push_notifications") != "Disabled") { - entitlements += "aps-environment\n" + p_preset->get("entitlements/push_notifications").operator String().to_lower() + "" + "\n"; - } - if ((bool)p_preset->get("entitlements/game_center")) { - entitlements += "com.apple.developer.game-center\n\n"; - } - if ((bool)p_preset->get("entitlements/increased_memory_limit")) { - entitlements += "com.apple.developer.kernel.increased-memory-limit\n\n"; - } - entitlements += p_preset->get("entitlements/additional").operator String() + "\n"; + for (const String &line : lines) { + strnew += _process_config_file_line(p_preset, line, p_config, p_debug, code_signing); + } - strnew += lines[i].replace("$entitlements_full", entitlements); - } else if (lines[i].contains("$required_device_capabilities")) { - String capabilities; + // Write (size - 1) to avoid outputting the null terminator. + CharString cs = strnew.utf8(); + p_file.resize(cs.size() - 1); + uint8_t *p_file_ptrw = p_file.ptrw(); + for (int i = 0; i < cs.size() - 1; i++) { + p_file_ptrw[i] = cs[i]; + } +} - // I've removed armv7 as we can run on 64bit only devices - // Note that capabilities listed here are requirements for the app to be installed. - // They don't enable anything. - Vector capabilities_list = p_config.capabilities; +String EditorExportPlatformAppleEmbedded::_process_config_file_line(const Ref &p_preset, const String &p_line, const AppleEmbeddedConfigData &p_config, bool p_debug, const CodeSigningDetails &p_code_signing) { + String strnew; + if (p_line.contains("$binary")) { + strnew += p_line.replace("$binary", p_config.binary_name) + "\n"; + } else if (p_line.contains("$modules_buildfile")) { + strnew += p_line.replace("$modules_buildfile", p_config.modules_buildfile) + "\n"; + } else if (p_line.contains("$modules_fileref")) { + strnew += p_line.replace("$modules_fileref", p_config.modules_fileref) + "\n"; + } else if (p_line.contains("$modules_buildphase")) { + strnew += p_line.replace("$modules_buildphase", p_config.modules_buildphase) + "\n"; + } else if (p_line.contains("$modules_buildgrp")) { + strnew += p_line.replace("$modules_buildgrp", p_config.modules_buildgrp) + "\n"; + } else if (p_line.contains("$name")) { + strnew += p_line.replace("$name", p_config.pkg_name) + "\n"; + } else if (p_line.contains("$bundle_identifier")) { + strnew += p_line.replace("$bundle_identifier", p_preset->get("application/bundle_identifier")) + "\n"; + } else if (p_line.contains("$short_version")) { + strnew += p_line.replace("$short_version", p_preset->get_version("application/short_version")) + "\n"; + } else if (p_line.contains("$version")) { + strnew += p_line.replace("$version", p_preset->get_version("application/version")) + "\n"; + } else if (p_line.contains("$signature")) { + strnew += p_line.replace("$signature", p_preset->get("application/signature")) + "\n"; + } else if (p_line.contains("$team_id")) { + strnew += p_line.replace("$team_id", p_preset->get("application/app_store_team_id")) + "\n"; + } else if (p_line.contains("$default_build_config")) { + strnew += p_line.replace("$default_build_config", p_debug ? "Debug" : "Release") + "\n"; + } else if (p_line.contains("$export_method")) { + int export_method = p_preset->get(p_debug ? "application/export_method_debug" : "application/export_method_release"); + strnew += p_line.replace("$export_method", export_method_string[export_method]) + "\n"; + } else if (p_line.contains("$provisioning_profile_specifier_debug")) { + strnew += p_line.replace("$provisioning_profile_specifier_debug", p_code_signing.debug_provisioning_profile_specifier) + "\n"; + } else if (p_line.contains("$provisioning_profile_specifier_release")) { + strnew += p_line.replace("$provisioning_profile_specifier_release", p_code_signing.release_provisioning_profile_specifier) + "\n"; + } else if (p_line.contains("$provisioning_profile_specifier")) { + String specifier = p_debug ? p_code_signing.debug_provisioning_profile_specifier : p_code_signing.release_provisioning_profile_specifier; + strnew += p_line.replace("$provisioning_profile_specifier", specifier) + "\n"; + } else if (p_line.contains("$provisioning_profile_uuid_release")) { + strnew += p_line.replace("$provisioning_profile_uuid_release", p_code_signing.release_provisioning_profile_uuid) + "\n"; + } else if (p_line.contains("$provisioning_profile_uuid_debug")) { + strnew += p_line.replace("$provisioning_profile_uuid_debug", p_code_signing.debug_provisioning_profile_uuid) + "\n"; + } else if (p_line.contains("$code_sign_style_debug")) { + if (p_code_signing.debug_manual_signing) { + strnew += p_line.replace("$code_sign_style_debug", "Manual") + "\n"; + } else { + strnew += p_line.replace("$code_sign_style_debug", "Automatic") + "\n"; + } + } else if (p_line.contains("$code_sign_style_release")) { + if (p_code_signing.release_manual_signing) { + strnew += p_line.replace("$code_sign_style_release", "Manual") + "\n"; + } else { + strnew += p_line.replace("$code_sign_style_release", "Automatic") + "\n"; + } + } else if (p_line.contains("$provisioning_profile_uuid")) { + String uuid = p_debug ? p_code_signing.debug_provisioning_profile_uuid : p_code_signing.release_provisioning_profile_uuid; + if (uuid.is_empty()) { + uuid = p_debug ? p_code_signing.debug_provisioning_profile_specifier : p_code_signing.release_provisioning_profile_specifier; + } + strnew += p_line.replace("$provisioning_profile_uuid", uuid) + "\n"; + } else if (p_line.contains("$code_sign_identity_debug")) { + strnew += p_line.replace("$code_sign_identity_debug", p_code_signing.debug_signing_identity) + "\n"; + } else if (p_line.contains("$code_sign_identity_release")) { + strnew += p_line.replace("$code_sign_identity_release", p_code_signing.release_signing_identity) + "\n"; + } else if (p_line.contains("$additional_plist_content")) { + strnew += p_line.replace("$additional_plist_content", p_config.plist_content) + "\n"; + } else if (p_line.contains("$godot_archs")) { + strnew += p_line.replace("$godot_archs", p_config.architectures) + "\n"; + } else if (p_line.contains("$linker_flags")) { + strnew += p_line.replace("$linker_flags", p_config.linker_flags) + "\n"; + } else if (p_line.contains("$targeted_device_family")) { + String xcode_value; + switch ((int)p_preset->get("application/targeted_device_family")) { + case 0: // iPhone + xcode_value = "1"; + break; + case 1: // iPad + xcode_value = "2"; + break; + case 2: // iPhone & iPad + xcode_value = "1,2"; + break; + } + strnew += p_line.replace("$targeted_device_family", xcode_value) + "\n"; + } else if (p_line.contains("$cpp_code")) { + strnew += p_line.replace("$cpp_code", p_config.cpp_code) + "\n"; + } else if (p_line.contains("$docs_in_place")) { + strnew += p_line.replace("$docs_in_place", ((bool)p_preset->get("user_data/accessible_from_files_app")) ? "" : "") + "\n"; + } else if (p_line.contains("$docs_sharing")) { + strnew += p_line.replace("$docs_sharing", ((bool)p_preset->get("user_data/accessible_from_itunes_sharing")) ? "" : "") + "\n"; + } else if (p_line.contains("$entitlements_full")) { + String entitlements; + if ((String)p_preset->get("entitlements/push_notifications") != "Disabled") { + entitlements += "aps-environment\n" + p_preset->get("entitlements/push_notifications").operator String().to_lower() + "" + "\n"; + } + if ((bool)p_preset->get("entitlements/game_center")) { + entitlements += "com.apple.developer.game-center\n\n"; + } + if ((bool)p_preset->get("entitlements/increased_memory_limit")) { + entitlements += "com.apple.developer.kernel.increased-memory-limit\n\n"; + } + entitlements += p_preset->get("entitlements/additional").operator String() + "\n"; - if ((bool)p_preset->get("capabilities/access_wifi") && !capabilities_list.has("wifi")) { - capabilities_list.push_back("wifi"); - } - if ((bool)p_preset->get("capabilities/performance_gaming_tier") && !capabilities_list.has("iphone-performance-gaming-tier")) { - capabilities_list.push_back("iphone-performance-gaming-tier"); - } - if ((bool)p_preset->get("capabilities/performance_a12") && !capabilities_list.has("iphone-ipad-minimum-performance-a12")) { - capabilities_list.push_back("iphone-ipad-minimum-performance-a12"); - } - for (int idx = 0; idx < capabilities_list.size(); idx++) { - capabilities += "" + capabilities_list[idx] + "\n"; - } - for (const String &cap : p_preset->get("capabilities/additional").operator PackedStringArray()) { - capabilities += "" + cap + "\n"; - } + strnew += p_line.replace("$entitlements_full", entitlements); + } else if (p_line.contains("$required_device_capabilities")) { + String capabilities; - strnew += lines[i].replace("$required_device_capabilities", capabilities); - } else if (lines[i].contains("$interface_orientations")) { - String orientations; - const DisplayServer::ScreenOrientation screen_orientation = - DisplayServer::ScreenOrientation(int(get_project_setting(p_preset, "display/window/handheld/orientation"))); + // I've removed armv7 as we can run on 64bit only devices + // Note that capabilities listed here are requirements for the app to be installed. + // They don't enable anything. + Vector capabilities_list = p_config.capabilities; - switch (screen_orientation) { - case DisplayServer::SCREEN_LANDSCAPE: - orientations += "UIInterfaceOrientationLandscapeLeft\n"; - break; - case DisplayServer::SCREEN_PORTRAIT: - orientations += "UIInterfaceOrientationPortrait\n"; - break; - case DisplayServer::SCREEN_REVERSE_LANDSCAPE: - orientations += "UIInterfaceOrientationLandscapeRight\n"; - break; - case DisplayServer::SCREEN_REVERSE_PORTRAIT: - orientations += "UIInterfaceOrientationPortraitUpsideDown\n"; - break; - case DisplayServer::SCREEN_SENSOR_LANDSCAPE: - // Allow both landscape orientations depending on sensor direction. - orientations += "UIInterfaceOrientationLandscapeLeft\n"; - orientations += "UIInterfaceOrientationLandscapeRight\n"; - break; - case DisplayServer::SCREEN_SENSOR_PORTRAIT: - // Allow both portrait orientations depending on sensor direction. - orientations += "UIInterfaceOrientationPortrait\n"; - orientations += "UIInterfaceOrientationPortraitUpsideDown\n"; - break; - case DisplayServer::SCREEN_SENSOR: - // Allow all screen orientations depending on sensor direction. - orientations += "UIInterfaceOrientationLandscapeLeft\n"; - orientations += "UIInterfaceOrientationLandscapeRight\n"; - orientations += "UIInterfaceOrientationPortrait\n"; - orientations += "UIInterfaceOrientationPortraitUpsideDown\n"; - break; - } + if ((bool)p_preset->get("capabilities/access_wifi") && !capabilities_list.has("wifi")) { + capabilities_list.push_back("wifi"); + } + if ((bool)p_preset->get("capabilities/performance_gaming_tier") && !capabilities_list.has("iphone-performance-gaming-tier")) { + capabilities_list.push_back("iphone-performance-gaming-tier"); + } + if ((bool)p_preset->get("capabilities/performance_a12") && !capabilities_list.has("iphone-ipad-minimum-performance-a12")) { + capabilities_list.push_back("iphone-ipad-minimum-performance-a12"); + } + for (const String &capability : capabilities_list) { + capabilities += "" + capability + "\n"; + } + for (const String &cap : p_preset->get("capabilities/additional").operator PackedStringArray()) { + capabilities += "" + cap + "\n"; + } - strnew += lines[i].replace("$interface_orientations", orientations); - } else if (lines[i].contains("$ipad_interface_orientations")) { - String orientations; - const DisplayServer::ScreenOrientation screen_orientation = - DisplayServer::ScreenOrientation(int(get_project_setting(p_preset, "display/window/handheld/orientation"))); + strnew += p_line.replace("$required_device_capabilities", capabilities); + } else if (p_line.contains("$interface_orientations")) { + String orientations; + const DisplayServer::ScreenOrientation screen_orientation = + DisplayServer::ScreenOrientation(int(get_project_setting(p_preset, "display/window/handheld/orientation"))); - switch (screen_orientation) { - case DisplayServer::SCREEN_LANDSCAPE: - orientations += "UIInterfaceOrientationLandscapeRight\n"; - break; - case DisplayServer::SCREEN_PORTRAIT: - orientations += "UIInterfaceOrientationPortrait\n"; - break; - case DisplayServer::SCREEN_REVERSE_LANDSCAPE: - orientations += "UIInterfaceOrientationLandscapeLeft\n"; - break; - case DisplayServer::SCREEN_REVERSE_PORTRAIT: - orientations += "UIInterfaceOrientationPortraitUpsideDown\n"; - break; - case DisplayServer::SCREEN_SENSOR_LANDSCAPE: - // Allow both landscape orientations depending on sensor direction. - orientations += "UIInterfaceOrientationLandscapeLeft\n"; - orientations += "UIInterfaceOrientationLandscapeRight\n"; - break; - case DisplayServer::SCREEN_SENSOR_PORTRAIT: - // Allow both portrait orientations depending on sensor direction. - orientations += "UIInterfaceOrientationPortrait\n"; - orientations += "UIInterfaceOrientationPortraitUpsideDown\n"; - break; - case DisplayServer::SCREEN_SENSOR: - // Allow all screen orientations depending on sensor direction. - orientations += "UIInterfaceOrientationLandscapeLeft\n"; - orientations += "UIInterfaceOrientationLandscapeRight\n"; - orientations += "UIInterfaceOrientationPortrait\n"; - orientations += "UIInterfaceOrientationPortraitUpsideDown\n"; - break; - } + switch (screen_orientation) { + case DisplayServer::SCREEN_LANDSCAPE: + orientations += "UIInterfaceOrientationLandscapeLeft\n"; + break; + case DisplayServer::SCREEN_PORTRAIT: + orientations += "UIInterfaceOrientationPortrait\n"; + break; + case DisplayServer::SCREEN_REVERSE_LANDSCAPE: + orientations += "UIInterfaceOrientationLandscapeRight\n"; + break; + case DisplayServer::SCREEN_REVERSE_PORTRAIT: + orientations += "UIInterfaceOrientationPortraitUpsideDown\n"; + break; + case DisplayServer::SCREEN_SENSOR_LANDSCAPE: + // Allow both landscape orientations depending on sensor direction. + orientations += "UIInterfaceOrientationLandscapeLeft\n"; + orientations += "UIInterfaceOrientationLandscapeRight\n"; + break; + case DisplayServer::SCREEN_SENSOR_PORTRAIT: + // Allow both portrait orientations depending on sensor direction. + orientations += "UIInterfaceOrientationPortrait\n"; + orientations += "UIInterfaceOrientationPortraitUpsideDown\n"; + break; + case DisplayServer::SCREEN_SENSOR: + // Allow all screen orientations depending on sensor direction. + orientations += "UIInterfaceOrientationLandscapeLeft\n"; + orientations += "UIInterfaceOrientationLandscapeRight\n"; + orientations += "UIInterfaceOrientationPortrait\n"; + orientations += "UIInterfaceOrientationPortraitUpsideDown\n"; + break; + } - strnew += lines[i].replace("$ipad_interface_orientations", orientations); - } else if (lines[i].contains("$camera_usage_description")) { - String description = p_preset->get("privacy/camera_usage_description"); - strnew += lines[i].replace("$camera_usage_description", description) + "\n"; - } else if (lines[i].contains("$microphone_usage_description")) { - String description = p_preset->get("privacy/microphone_usage_description"); - strnew += lines[i].replace("$microphone_usage_description", description) + "\n"; - } else if (lines[i].contains("$photolibrary_usage_description")) { - String description = p_preset->get("privacy/photolibrary_usage_description"); - strnew += lines[i].replace("$photolibrary_usage_description", description) + "\n"; - } else if (lines[i].contains("$plist_launch_screen_name")) { - String value = "UILaunchStoryboardName\nLaunch Screen"; - strnew += lines[i].replace("$plist_launch_screen_name", value) + "\n"; - } else if (lines[i].contains("$pbx_launch_screen_file_reference")) { - String value = "90DD2D9D24B36E8000717FE1 = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = \"Launch Screen.storyboard\"; sourceTree = \"\"; };"; - strnew += lines[i].replace("$pbx_launch_screen_file_reference", value) + "\n"; - } else if (lines[i].contains("$pbx_launch_screen_copy_files")) { - String value = "90DD2D9D24B36E8000717FE1 /* Launch Screen.storyboard */,"; - strnew += lines[i].replace("$pbx_launch_screen_copy_files", value) + "\n"; - } else if (lines[i].contains("$pbx_launch_screen_build_phase")) { - String value = "90DD2D9E24B36E8000717FE1 /* Launch Screen.storyboard in Resources */,"; - strnew += lines[i].replace("$pbx_launch_screen_build_phase", value) + "\n"; - } else if (lines[i].contains("$pbx_launch_screen_build_reference")) { - String value = "90DD2D9E24B36E8000717FE1 /* Launch Screen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 90DD2D9D24B36E8000717FE1 /* Launch Screen.storyboard */; };"; - strnew += lines[i].replace("$pbx_launch_screen_build_reference", value) + "\n"; -#ifndef DISABLE_DEPRECATED - } else if (lines[i].contains("$pbx_launch_image_usage_setting")) { - strnew += lines[i].replace("$pbx_launch_image_usage_setting", "") + "\n"; -#endif - } else if (lines[i].contains("$launch_screen_image_mode")) { - int image_scale_mode = p_preset->get("storyboard/image_scale_mode"); - String value; + strnew += p_line.replace("$interface_orientations", orientations); + } else if (p_line.contains("$ipad_interface_orientations")) { + String orientations; + const DisplayServer::ScreenOrientation screen_orientation = + DisplayServer::ScreenOrientation(int(get_project_setting(p_preset, "display/window/handheld/orientation"))); - switch (image_scale_mode) { - case 0: { - String logo_path = get_project_setting(p_preset, "application/boot_splash/image"); - bool is_on = get_project_setting(p_preset, "application/boot_splash/fullsize"); - // If custom logo is not specified, Godot does not scale default one, so we should do the same. - value = (is_on && logo_path.length() > 0) ? "scaleAspectFit" : "center"; - } break; - default: { - value = storyboard_image_scale_mode[image_scale_mode - 1]; + switch (screen_orientation) { + case DisplayServer::SCREEN_LANDSCAPE: + orientations += "UIInterfaceOrientationLandscapeRight\n"; + break; + case DisplayServer::SCREEN_PORTRAIT: + orientations += "UIInterfaceOrientationPortrait\n"; + break; + case DisplayServer::SCREEN_REVERSE_LANDSCAPE: + orientations += "UIInterfaceOrientationLandscapeLeft\n"; + break; + case DisplayServer::SCREEN_REVERSE_PORTRAIT: + orientations += "UIInterfaceOrientationPortraitUpsideDown\n"; + break; + case DisplayServer::SCREEN_SENSOR_LANDSCAPE: + // Allow both landscape orientations depending on sensor direction. + orientations += "UIInterfaceOrientationLandscapeLeft\n"; + orientations += "UIInterfaceOrientationLandscapeRight\n"; + break; + case DisplayServer::SCREEN_SENSOR_PORTRAIT: + // Allow both portrait orientations depending on sensor direction. + orientations += "UIInterfaceOrientationPortrait\n"; + orientations += "UIInterfaceOrientationPortraitUpsideDown\n"; + break; + case DisplayServer::SCREEN_SENSOR: + // Allow all screen orientations depending on sensor direction. + orientations += "UIInterfaceOrientationLandscapeLeft\n"; + orientations += "UIInterfaceOrientationLandscapeRight\n"; + orientations += "UIInterfaceOrientationPortrait\n"; + orientations += "UIInterfaceOrientationPortraitUpsideDown\n"; + break; + } + + strnew += p_line.replace("$ipad_interface_orientations", orientations); + } else if (p_line.contains("$camera_usage_description")) { + String description = p_preset->get("privacy/camera_usage_description"); + strnew += p_line.replace("$camera_usage_description", description) + "\n"; + } else if (p_line.contains("$microphone_usage_description")) { + String description = p_preset->get("privacy/microphone_usage_description"); + strnew += p_line.replace("$microphone_usage_description", description) + "\n"; + } else if (p_line.contains("$photolibrary_usage_description")) { + String description = p_preset->get("privacy/photolibrary_usage_description"); + strnew += p_line.replace("$photolibrary_usage_description", description) + "\n"; + } else if (p_line.contains("$pbx_locale_file_reference")) { + String locale_files; + Vector translations = get_project_setting(p_preset, "internationalization/locale/translations"); + if (translations.size() > 0) { + HashSet languages; + for (const String &E : translations) { + Ref tr = ResourceLoader::load(E); + if (tr.is_valid() && tr->get_locale() != "en") { + languages.insert(tr->get_locale()); } } - strnew += lines[i].replace("$launch_screen_image_mode", value) + "\n"; - } else if (lines[i].contains("$launch_screen_background_color")) { - bool use_custom = p_preset->get("storyboard/use_custom_bg_color"); - Color color = use_custom ? p_preset->get("storyboard/custom_bg_color") : get_project_setting(p_preset, "application/boot_splash/bg_color"); - const String value_format = "red=\"$red\" green=\"$green\" blue=\"$blue\" alpha=\"$alpha\""; - - Dictionary value_dictionary; - value_dictionary["red"] = color.r; - value_dictionary["green"] = color.g; - value_dictionary["blue"] = color.b; - value_dictionary["alpha"] = color.a; - String value = value_format.format(value_dictionary, "$_"); - - strnew += lines[i].replace("$launch_screen_background_color", value) + "\n"; - } else if (lines[i].contains("$pbx_locale_file_reference")) { - String locale_files; - Vector translations = get_project_setting(p_preset, "internationalization/locale/translations"); - if (translations.size() > 0) { - HashSet languages; - for (const String &E : translations) { - Ref tr = ResourceLoader::load(E); - if (tr.is_valid() && tr->get_locale() != "en") { - languages.insert(tr->get_locale()); - } - } - - int index = 0; - for (const String &lang : languages) { - locale_files += "D0BCFE4518AEBDA2004A" + itos(index).pad_zeros(4) + " /* " + lang + " */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = " + lang + "; path = " + lang + ".lproj/InfoPlist.strings; sourceTree = \"\"; };\n"; - index++; + int index = 0; + for (const String &lang : languages) { + locale_files += "D0BCFE4518AEBDA2004A" + itos(index).pad_zeros(4) + " /* " + lang + " */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = " + lang + "; path = " + lang + ".lproj/InfoPlist.strings; sourceTree = \"\"; };\n"; + index++; + } + } + strnew += p_line.replace("$pbx_locale_file_reference", locale_files); + } else if (p_line.contains("$pbx_locale_build_reference")) { + String locale_files; + Vector translations = get_project_setting(p_preset, "internationalization/locale/translations"); + if (translations.size() > 0) { + HashSet languages; + for (const String &E : translations) { + Ref tr = ResourceLoader::load(E); + if (tr.is_valid() && tr->get_locale() != "en") { + languages.insert(tr->get_locale()); } } - strnew += lines[i].replace("$pbx_locale_file_reference", locale_files); - } else if (lines[i].contains("$pbx_locale_build_reference")) { - String locale_files; - Vector translations = get_project_setting(p_preset, "internationalization/locale/translations"); - if (translations.size() > 0) { - HashSet languages; - for (const String &E : translations) { - Ref tr = ResourceLoader::load(E); - if (tr.is_valid() && tr->get_locale() != "en") { - languages.insert(tr->get_locale()); - } - } - int index = 0; - for (const String &lang : languages) { - locale_files += "D0BCFE4518AEBDA2004A" + itos(index).pad_zeros(4) + " /* " + lang + " */,\n"; - index++; - } + int index = 0; + for (const String &lang : languages) { + locale_files += "D0BCFE4518AEBDA2004A" + itos(index).pad_zeros(4) + " /* " + lang + " */,\n"; + index++; } - strnew += lines[i].replace("$pbx_locale_build_reference", locale_files); - } else if (lines[i].contains("$swift_runtime_migration")) { - String value = !p_config.use_swift_runtime ? "" : "LastSwiftMigration = 1250;"; - strnew += lines[i].replace("$swift_runtime_migration", value) + "\n"; - } else if (lines[i].contains("$swift_runtime_build_settings")) { - String value = !p_config.use_swift_runtime ? "" : R"( - CLANG_ENABLE_MODULES = YES; - SWIFT_OBJC_BRIDGING_HEADER = "$binary/dummy.h"; - SWIFT_VERSION = 5.0; - )"; - value = value.replace("$binary", p_config.binary_name); - strnew += lines[i].replace("$swift_runtime_build_settings", value) + "\n"; - } else if (lines[i].contains("$swift_runtime_fileref")) { - String value = !p_config.use_swift_runtime ? "" : R"( - 90B4C2AA2680BC560039117A /* dummy.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "dummy.h"; sourceTree = ""; }; - 90B4C2B52680C7E90039117A /* dummy.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "dummy.swift"; sourceTree = ""; }; - )"; - strnew += lines[i].replace("$swift_runtime_fileref", value) + "\n"; - } else if (lines[i].contains("$swift_runtime_binary_files")) { - String value = !p_config.use_swift_runtime ? "" : R"( - 90B4C2AA2680BC560039117A /* dummy.h */, - 90B4C2B52680C7E90039117A /* dummy.swift */, - )"; - strnew += lines[i].replace("$swift_runtime_binary_files", value) + "\n"; - } else if (lines[i].contains("$swift_runtime_buildfile")) { - String value = !p_config.use_swift_runtime ? "" : "90B4C2B62680C7E90039117A /* dummy.swift in Sources */ = {isa = PBXBuildFile; fileRef = 90B4C2B52680C7E90039117A /* dummy.swift */; };"; - strnew += lines[i].replace("$swift_runtime_buildfile", value) + "\n"; - } else if (lines[i].contains("$swift_runtime_build_phase")) { - String value = !p_config.use_swift_runtime ? "" : "90B4C2B62680C7E90039117A /* dummy.swift */,"; - strnew += lines[i].replace("$swift_runtime_build_phase", value) + "\n"; - } else if (lines[i].contains("$priv_collection")) { - bool section_opened = false; - for (uint64_t j = 0; j < std::size(data_collect_type_info); ++j) { - bool data_collected = p_preset->get(vformat("privacy/collected_data/%s/collected", data_collect_type_info[j].prop_name)); - bool linked = p_preset->get(vformat("privacy/collected_data/%s/linked_to_user", data_collect_type_info[j].prop_name)); - bool tracking = p_preset->get(vformat("privacy/collected_data/%s/used_for_tracking", data_collect_type_info[j].prop_name)); - int purposes = p_preset->get(vformat("privacy/collected_data/%s/collection_purposes", data_collect_type_info[j].prop_name)); - if (data_collected) { - if (!section_opened) { - section_opened = true; - strnew += "\tNSPrivacyCollectedDataTypes\n"; - strnew += "\t\n"; - } - strnew += "\t\t\n"; - strnew += "\t\t\tNSPrivacyCollectedDataType\n"; - strnew += vformat("\t\t\t%s\n", data_collect_type_info[j].type_name); - strnew += "\t\t\t\tNSPrivacyCollectedDataTypeLinked\n"; - if (linked) { - strnew += "\t\t\t\t\n"; - } else { - strnew += "\t\t\t\t\n"; - } - strnew += "\t\t\t\tNSPrivacyCollectedDataTypeTracking\n"; - if (tracking) { - strnew += "\t\t\t\t\n"; - } else { - strnew += "\t\t\t\t\n"; - } - if (purposes != 0) { - strnew += "\t\t\t\tNSPrivacyCollectedDataTypePurposes\n"; - strnew += "\t\t\t\t\n"; - for (uint64_t k = 0; k < std::size(data_collect_purpose_info); ++k) { - if (purposes & (1 << k)) { - strnew += vformat("\t\t\t\t\t%s\n", data_collect_purpose_info[k].type_name); - } + } + strnew += p_line.replace("$pbx_locale_build_reference", locale_files); + } else if (p_line.contains("$swift_runtime_migration")) { + String value = !p_config.use_swift_runtime ? "" : "LastSwiftMigration = 1250;"; + strnew += p_line.replace("$swift_runtime_migration", value) + "\n"; + } else if (p_line.contains("$swift_runtime_build_settings")) { + String value = !p_config.use_swift_runtime ? "" : R"( + CLANG_ENABLE_MODULES = YES; + SWIFT_OBJC_BRIDGING_HEADER = "$binary/dummy.h"; + SWIFT_VERSION = 5.0; + )"; + value = value.replace("$binary", p_config.binary_name); + strnew += p_line.replace("$swift_runtime_build_settings", value) + "\n"; + } else if (p_line.contains("$swift_runtime_fileref")) { + String value = !p_config.use_swift_runtime ? "" : R"( + 90B4C2AA2680BC560039117A /* dummy.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "dummy.h"; sourceTree = ""; }; + 90B4C2B52680C7E90039117A /* dummy.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "dummy.swift"; sourceTree = ""; }; + )"; + strnew += p_line.replace("$swift_runtime_fileref", value) + "\n"; + } else if (p_line.contains("$swift_runtime_binary_files")) { + String value = !p_config.use_swift_runtime ? "" : R"( + 90B4C2AA2680BC560039117A /* dummy.h */, + 90B4C2B52680C7E90039117A /* dummy.swift */, + )"; + strnew += p_line.replace("$swift_runtime_binary_files", value) + "\n"; + } else if (p_line.contains("$swift_runtime_buildfile")) { + String value = !p_config.use_swift_runtime ? "" : "90B4C2B62680C7E90039117A /* dummy.swift in Sources */ = {isa = PBXBuildFile; fileRef = 90B4C2B52680C7E90039117A /* dummy.swift */; };"; + strnew += p_line.replace("$swift_runtime_buildfile", value) + "\n"; + } else if (p_line.contains("$swift_runtime_build_phase")) { + String value = !p_config.use_swift_runtime ? "" : "90B4C2B62680C7E90039117A /* dummy.swift */,"; + strnew += p_line.replace("$swift_runtime_build_phase", value) + "\n"; + } else if (p_line.contains("$priv_collection")) { + bool section_opened = false; + for (uint64_t j = 0; j < std::size(data_collect_type_info); ++j) { + bool data_collected = p_preset->get(vformat("privacy/collected_data/%s/collected", data_collect_type_info[j].prop_name)); + bool linked = p_preset->get(vformat("privacy/collected_data/%s/linked_to_user", data_collect_type_info[j].prop_name)); + bool tracking = p_preset->get(vformat("privacy/collected_data/%s/used_for_tracking", data_collect_type_info[j].prop_name)); + int purposes = p_preset->get(vformat("privacy/collected_data/%s/collection_purposes", data_collect_type_info[j].prop_name)); + if (data_collected) { + if (!section_opened) { + section_opened = true; + strnew += "\tNSPrivacyCollectedDataTypes\n"; + strnew += "\t\n"; + } + strnew += "\t\t\n"; + strnew += "\t\t\tNSPrivacyCollectedDataType\n"; + strnew += vformat("\t\t\t%s\n", data_collect_type_info[j].type_name); + strnew += "\t\t\t\tNSPrivacyCollectedDataTypeLinked\n"; + if (linked) { + strnew += "\t\t\t\t\n"; + } else { + strnew += "\t\t\t\t\n"; + } + strnew += "\t\t\t\tNSPrivacyCollectedDataTypeTracking\n"; + if (tracking) { + strnew += "\t\t\t\t\n"; + } else { + strnew += "\t\t\t\t\n"; + } + if (purposes != 0) { + strnew += "\t\t\t\tNSPrivacyCollectedDataTypePurposes\n"; + strnew += "\t\t\t\t\n"; + for (uint64_t k = 0; k < std::size(data_collect_purpose_info); ++k) { + if (purposes & (1 << k)) { + strnew += vformat("\t\t\t\t\t%s\n", data_collect_purpose_info[k].type_name); } - strnew += "\t\t\t\t\n"; } - strnew += "\t\t\t\n"; + strnew += "\t\t\t\t\n"; } + strnew += "\t\t\t\n"; } - if (section_opened) { - strnew += "\t\n"; - } - } else if (lines[i].contains("$priv_tracking")) { - bool tracking = p_preset->get("privacy/tracking_enabled"); - strnew += "\tNSPrivacyTracking\n"; - if (tracking) { - strnew += "\t\n"; - } else { - strnew += "\t\n"; - } - Vector tracking_domains = p_preset->get("privacy/tracking_domains"); - if (!tracking_domains.is_empty()) { - strnew += "\tNSPrivacyTrackingDomains\n"; - strnew += "\t\n"; - for (const String &E : tracking_domains) { - strnew += "\t\t" + E + "\n"; - } - strnew += "\t\n"; - } - } else if (lines[i].contains("$priv_api_types")) { + } + if (section_opened) { + strnew += "\t\n"; + } + } else if (p_line.contains("$priv_tracking")) { + bool tracking = p_preset->get("privacy/tracking_enabled"); + strnew += "\tNSPrivacyTracking\n"; + if (tracking) { + strnew += "\t\n"; + } else { + strnew += "\t\n"; + } + Vector tracking_domains = p_preset->get("privacy/tracking_domains"); + if (!tracking_domains.is_empty()) { + strnew += "\tNSPrivacyTrackingDomains\n"; strnew += "\t\n"; - for (uint64_t j = 0; j < std::size(api_info); ++j) { - int api_access = p_preset->get(vformat("privacy/%s_access_reasons", api_info[j].prop_name)); - if (api_access != 0) { - strnew += "\t\t\n"; - strnew += "\t\t\tNSPrivacyAccessedAPITypeReasons\n"; - strnew += "\t\t\t\n"; - for (int k = 0; k < api_info[j].prop_flag_value.size(); k++) { - if (api_access & (1 << k)) { - strnew += vformat("\t\t\t\t%s\n", api_info[j].prop_flag_value[k]); - } - } - strnew += "\t\t\t\n"; - strnew += "\t\t\tNSPrivacyAccessedAPIType\n"; - strnew += vformat("\t\t\t%s\n", api_info[j].type_name); - strnew += "\t\t\n"; - } + for (const String &E : tracking_domains) { + strnew += "\t\t" + E + "\n"; } strnew += "\t\n"; - } else { - strnew += lines[i] + "\n"; } - } + } else if (p_line.contains("$priv_api_types")) { + strnew += "\t\n"; + for (uint64_t j = 0; j < std::size(api_info); ++j) { + int api_access = p_preset->get(vformat("privacy/%s_access_reasons", api_info[j].prop_name)); + if (api_access != 0) { + strnew += "\t\t\n"; + strnew += "\t\t\tNSPrivacyAccessedAPITypeReasons\n"; + strnew += "\t\t\t\n"; + for (int k = 0; k < api_info[j].prop_flag_value.size(); k++) { + if (api_access & (1 << k)) { + strnew += vformat("\t\t\t\t%s\n", api_info[j].prop_flag_value[k]); + } + } + strnew += "\t\t\t\n"; + strnew += "\t\t\tNSPrivacyAccessedAPIType\n"; + strnew += vformat("\t\t\t%s\n", api_info[j].type_name); + strnew += "\t\t\n"; + } + } + strnew += "\t\n"; + } else if (p_line.contains("$sdkroot")) { + strnew += p_line.replace("$sdkroot", get_sdk_name()) + "\n"; - // !BAS! I'm assuming the 9 in the original code was a typo. I've added -1 or else it seems to also be adding our terminating zero... - // should apply the same fix in our macOS export. - CharString cs = strnew.utf8(); - pfile.resize(cs.size() - 1); - for (int i = 0; i < cs.size() - 1; i++) { - pfile.write[i] = cs[i]; + } else { + strnew += p_line + "\n"; } + return strnew; } String EditorExportPlatformAppleEmbedded::_get_additional_plist_content() { @@ -1852,17 +1795,16 @@ Error EditorExportPlatformAppleEmbedded::_export_project_helper(const Ref files_to_parse; - files_to_parse.insert(godot_platform + "/godot_" + get_platform_name() + "-Info.plist"); + const String project_file = "godot_apple_embedded.xcodeproj/project.pbxproj"; files_to_parse.insert(project_file); - files_to_parse.insert(godot_platform + "/export_options.plist"); - files_to_parse.insert(godot_platform + "/dummy.cpp"); - files_to_parse.insert(godot_platform + ".xcodeproj/project.xcworkspace/contents.xcworkspacedata"); - files_to_parse.insert(godot_platform + ".xcodeproj/xcshareddata/xcschemes/godot_" + get_platform_name() + ".xcscheme"); - files_to_parse.insert(godot_platform + "/godot_" + get_platform_name() + ".entitlements"); - files_to_parse.insert(godot_platform + "/Launch Screen.storyboard"); + files_to_parse.insert("godot_apple_embedded.xcodeproj/project.xcworkspace/contents.xcworkspacedata"); + files_to_parse.insert("godot_apple_embedded.xcodeproj/xcshareddata/xcschemes/godot_apple_embedded.xcscheme"); + files_to_parse.insert("godot_apple_embedded/godot_apple_embedded-Info.plist"); + files_to_parse.insert("godot_apple_embedded/godot_apple_embedded.entitlements"); + files_to_parse.insert("godot_apple_embedded/export_options.plist"); + files_to_parse.insert("godot_apple_embedded/dummy.cpp"); + files_to_parse.insert("godot_apple_embedded/Launch Screen.storyboard"); files_to_parse.insert("PrivacyInfo.xcprivacy"); AppleEmbeddedConfigData config_data = { @@ -1958,7 +1900,7 @@ Error EditorExportPlatformAppleEmbedded::_export_project_helper(const Ref 0) { - file = file.replace("godot_" + get_platform_name(), binary_name); + file = file.replace("godot_apple_embedded", binary_name); print_line("ADDING: " + file + " size: " + itos(data.size())); diff --git a/editor/export/editor_export_platform_apple_embedded.h b/editor/export/editor_export_platform_apple_embedded.h index faea163e107..912ebf31aa2 100644 --- a/editor/export/editor_export_platform_apple_embedded.h +++ b/editor/export/editor_export_platform_apple_embedded.h @@ -107,21 +107,6 @@ private: static Error _walk_dir_recursive(Ref &p_da, FileHandler p_handler, void *p_userdata); static Error _codesign(String p_file, void *p_userdata); - struct AppleEmbeddedConfigData { - String pkg_name; - String binary_name; - String plist_content; - String architectures; - String linker_flags; - String cpp_code; - String modules_buildfile; - String modules_fileref; - String modules_buildphase; - String modules_buildgrp; - Vector capabilities; - bool use_swift_runtime; - }; - struct ExportArchitecture { String name; bool is_default = false; @@ -143,6 +128,62 @@ private: String _get_additional_plist_content(); String _get_linker_flags(); String _get_cpp_code(); + +protected: + struct AppleEmbeddedConfigData { + String pkg_name; + String binary_name; + String plist_content; + String architectures; + String linker_flags; + String cpp_code; + String modules_buildfile; + String modules_fileref; + String modules_buildphase; + String modules_buildgrp; + Vector capabilities; + bool use_swift_runtime; + }; + + struct CodeSigningDetails { + String debug_signing_identity; + String release_signing_identity; + String debug_provisioning_profile_uuid; + String release_provisioning_profile_uuid; + String debug_provisioning_profile_specifier; + String release_provisioning_profile_specifier; + bool debug_manual_signing = false; + bool release_manual_signing = false; + + CodeSigningDetails(const Ref &p_preset) { + debug_signing_identity = p_preset->get("application/code_sign_identity_debug").operator String().is_empty() ? "Apple Development" : p_preset->get("application/code_sign_identity_debug"); + release_signing_identity = p_preset->get("application/code_sign_identity_release").operator String().is_empty() ? "Apple Distribution" : p_preset->get("application/code_sign_identity_release"); + + debug_provisioning_profile_uuid = p_preset->get_or_env("application/provisioning_profile_uuid_debug", ENV_APPLE_PLATFORM_PROFILE_UUID_DEBUG).operator String(); + release_provisioning_profile_uuid = p_preset->get_or_env("application/provisioning_profile_uuid_release", ENV_APPLE_PLATFORM_PROFILE_UUID_DEBUG).operator String(); + + debug_manual_signing = !debug_provisioning_profile_uuid.is_empty() || (debug_signing_identity != "Apple Development" && debug_signing_identity != "Apple Distribution"); + release_manual_signing = !release_provisioning_profile_uuid.is_empty() || (release_signing_identity != "Apple Development" && release_signing_identity != "Apple Distribution"); + + debug_provisioning_profile_specifier = p_preset->get_or_env("application/provisioning_profile_specifier_debug", ENV_APPLE_PLATFORM_PROFILE_SPECIFIER_DEBUG).operator String(); + debug_manual_signing |= !debug_provisioning_profile_specifier.is_empty(); + + release_provisioning_profile_specifier = p_preset->get_or_env("application/provisioning_profile_specifier_release", ENV_APPLE_PLATFORM_PROFILE_SPECIFIER_RELEASE).operator String(); + release_manual_signing |= !release_provisioning_profile_specifier.is_empty(); + } + }; + + struct IconInfo { + const char *preset_key; + const char *idiom; + const char *export_name; + const char *actual_size_side; + const char *scale; + const char *unscaled_size; + bool force_opaque; + }; + +private: void _fix_config_file(const Ref &p_preset, Vector &pfile, const AppleEmbeddedConfigData &p_config, bool p_debug); Vector _get_supported_architectures() const; @@ -162,15 +203,7 @@ private: bool is_package_name_valid(const String &p_package, String *r_error = nullptr) const; protected: - struct IconInfo { - const char *preset_key; - const char *idiom; - const char *export_name; - const char *actual_size_side; - const char *scale; - const char *unscaled_size; - bool force_opaque; - }; + virtual String _process_config_file_line(const Ref &p_preset, const String &p_line, const AppleEmbeddedConfigData &p_config, bool p_debug, const CodeSigningDetails &p_code_signing); void _blend_and_rotate(Ref &p_dst, Ref &p_src, bool p_rot); diff --git a/misc/dist/ios_xcode/PrivacyInfo.xcprivacy b/misc/dist/apple_embedded_xcode/PrivacyInfo.xcprivacy similarity index 100% rename from misc/dist/ios_xcode/PrivacyInfo.xcprivacy rename to misc/dist/apple_embedded_xcode/PrivacyInfo.xcprivacy diff --git a/misc/dist/ios_xcode/data.pck b/misc/dist/apple_embedded_xcode/data.pck similarity index 100% rename from misc/dist/ios_xcode/data.pck rename to misc/dist/apple_embedded_xcode/data.pck diff --git a/misc/dist/visionos_xcode/godot_visionos.xcodeproj/project.pbxproj b/misc/dist/apple_embedded_xcode/godot_apple_embedded.xcodeproj/project.pbxproj similarity index 95% rename from misc/dist/visionos_xcode/godot_visionos.xcodeproj/project.pbxproj rename to misc/dist/apple_embedded_xcode/godot_apple_embedded.xcodeproj/project.pbxproj index 272c4024e0a..6af6b2452f6 100644 --- a/misc/dist/visionos_xcode/godot_visionos.xcodeproj/project.pbxproj +++ b/misc/dist/apple_embedded_xcode/godot_apple_embedded.xcodeproj/project.pbxproj @@ -13,9 +13,11 @@ $swift_runtime_buildfile 1FF8DBB11FBA9DE1009DE660 /* dummy.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1FF8DBB01FBA9DE1009DE660 /* dummy.cpp */; }; D07CD44E1C5D589C00B7FB28 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = D07CD44D1C5D589C00B7FB28 /* Images.xcassets */; }; + $moltenvk_buildfile D0BCFE4618AEBDA2004A7AAE /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = D0BCFE4418AEBDA2004A7AAE /* InfoPlist.strings */; }; D0BCFE7818AEBFEB004A7AAE /* $binary.pck in Resources */ = {isa = PBXBuildFile; fileRef = D0BCFE7718AEBFEB004A7AAE /* $binary.pck */; }; F965960D2BC2C3A800579C7E /* PrivacyInfo.xcprivacy in Resources */ = {isa = PBXBuildFile; fileRef = F965960C2BC2C3A800579C7E /* PrivacyInfo.xcprivacy */; }; + $pbx_launch_screen_build_reference /* End PBXBuildFile section */ /* Begin PBXCopyFilesBuildPhase section */ @@ -39,6 +41,7 @@ $swift_runtime_fileref 1FF4C1881F584E6300A41E41 /* $binary.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = "$binary.entitlements"; sourceTree = ""; }; 1FF8DBB01FBA9DE1009DE660 /* dummy.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = dummy.cpp; sourceTree = ""; }; + $moltenvk_fileref D07CD44D1C5D589C00B7FB28 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; }; D0BCFE3418AEBDA2004A7AAE /* $binary.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "$binary.app"; sourceTree = BUILT_PRODUCTS_DIR; }; D0BCFE4318AEBDA2004A7AAE /* $binary-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "$binary-Info.plist"; sourceTree = ""; }; @@ -46,6 +49,7 @@ $pbx_locale_file_reference D0BCFE7718AEBFEB004A7AAE /* $binary.pck */ = {isa = PBXFileReference; lastKnownFileType = file; path = "$binary.pck"; sourceTree = ""; }; F965960C2BC2C3A800579C7E /* PrivacyInfo.xcprivacy */ = {isa = PBXFileReference; lastKnownFileType = text.xml; path = PrivacyInfo.xcprivacy; sourceTree = ""; }; + $pbx_launch_screen_file_reference /* End PBXFileReference section */ $additional_pbx_files @@ -55,6 +59,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( + $moltenvk_buildphase DEADBEEF2F582BE20003B888 /* $binary.xcframework */, $modules_buildphase $additional_pbx_frameworks_build @@ -88,6 +93,7 @@ D0BCFE3618AEBDA2004A7AAE /* Frameworks */ = { isa = PBXGroup; children = ( + $moltenvk_buildgrp DEADBEEF1F582BE20003B888 /* $binary.xcframework */, $modules_buildgrp $additional_pbx_frameworks_refs @@ -98,6 +104,7 @@ D0BCFE4118AEBDA2004A7AAE /* $binary */ = { isa = PBXGroup; children = ( + $pbx_launch_screen_copy_files 1FF4C1881F584E6300A41E41 /* $binary.entitlements */, D07CD44D1C5D589C00B7FB28 /* Images.xcassets */, D0BCFE4218AEBDA2004A7AAE /* Supporting Files */, @@ -180,6 +187,7 @@ files = ( D07CD44E1C5D589C00B7FB28 /* Images.xcassets in Resources */, D0BCFE7818AEBFEB004A7AAE /* $binary.pck in Resources */, + $pbx_launch_screen_build_phase D0BCFE4618AEBDA2004A7AAE /* InfoPlist.strings in Resources */, F965960D2BC2C3A800579C7E /* PrivacyInfo.xcprivacy in Resources */, $additional_pbx_resources_build @@ -231,7 +239,6 @@ CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; CODE_SIGN_IDENTITY = "$code_sign_identity_debug"; - "CODE_SIGN_IDENTITY[sdk=xros*]" = "$code_sign_identity_debug"; COPY_PHASE_STRIP = NO; ENABLE_BITCODE = NO; "FRAMEWORK_SEARCH_PATHS[arch=*]" = ( @@ -250,13 +257,13 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - XROS_DEPLOYMENT_TARGET = $min_version; + $os_deployment_target "LD_CLASSIC_1500" = "-ld_classic"; "LD_CLASSIC_1501" = "-ld_classic"; "LD_CLASSIC_1510" = "-ld_classic"; OTHER_LDFLAGS = "$(LD_CLASSIC_$(XCODE_VERSION_ACTUAL)) $linker_flags"; - SDKROOT = xros; - TARGETED_DEVICE_FAMILY = 7; + SDKROOT = $sdkroot; + TARGETED_DEVICE_FAMILY = "$targeted_device_family"; }; name = Debug; }; @@ -278,7 +285,6 @@ CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; CODE_SIGN_IDENTITY = "$code_sign_identity_release"; - "CODE_SIGN_IDENTITY[sdk=xros*]" = "$code_sign_identity_release"; COPY_PHASE_STRIP = YES; ENABLE_BITCODE = NO; "FRAMEWORK_SEARCH_PATHS[arch=*]" = ( @@ -292,13 +298,13 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - XROS_DEPLOYMENT_TARGET = $min_version; + $os_deployment_target "LD_CLASSIC_1500" = "-ld_classic"; "LD_CLASSIC_1501" = "-ld_classic"; "LD_CLASSIC_1510" = "-ld_classic"; OTHER_LDFLAGS = "$(LD_CLASSIC_$(XCODE_VERSION_ACTUAL)) $linker_flags"; - SDKROOT = xros; - TARGETED_DEVICE_FAMILY = 7; + SDKROOT = $sdkroot; + TARGETED_DEVICE_FAMILY = "$targeted_device_family"; VALIDATE_PRODUCT = YES; }; name = Release; @@ -310,12 +316,11 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CODE_SIGN_ENTITLEMENTS = "$binary/$binary.entitlements"; CODE_SIGN_IDENTITY = "$code_sign_identity_debug"; - "CODE_SIGN_IDENTITY[sdk=xros*]" = "$code_sign_identity_debug"; CODE_SIGN_STYLE = "$code_sign_style_debug"; CONFIGURATION_BUILD_DIR = "$(BUILD_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)"; DEVELOPMENT_TEAM = $team_id; INFOPLIST_FILE = "$binary/$binary-Info.plist"; - XROS_DEPLOYMENT_TARGET = $min_version; + $os_deployment_target LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", @@ -332,8 +337,8 @@ CURRENT_PROJECT_VERSION = $version; PROVISIONING_PROFILE = "$provisioning_profile_uuid_debug"; PROVISIONING_PROFILE_SPECIFIER = "$provisioning_profile_specifier_debug"; - TARGETED_DEVICE_FAMILY = 7; - VALID_ARCHS = "arm64 x86_64"; + TARGETED_DEVICE_FAMILY = "$targeted_device_family"; + VALID_ARCHS = "$valid_archs"; WRAPPER_EXTENSION = app; $swift_runtime_build_settings }; @@ -346,12 +351,11 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CODE_SIGN_ENTITLEMENTS = "$binary/$binary.entitlements"; CODE_SIGN_IDENTITY = "$code_sign_identity_release"; - "CODE_SIGN_IDENTITY[sdk=xros*]" = "$code_sign_identity_release"; CODE_SIGN_STYLE = "$code_sign_style_release"; CONFIGURATION_BUILD_DIR = "$(BUILD_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)"; DEVELOPMENT_TEAM = $team_id; INFOPLIST_FILE = "$binary/$binary-Info.plist"; - XROS_DEPLOYMENT_TARGET = $min_version; + $os_deployment_target LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", @@ -368,8 +372,8 @@ CURRENT_PROJECT_VERSION = $version; PROVISIONING_PROFILE = "$provisioning_profile_uuid_release"; PROVISIONING_PROFILE_SPECIFIER = "$provisioning_profile_specifier_release"; - TARGETED_DEVICE_FAMILY = 7; - VALID_ARCHS = "arm64"; + TARGETED_DEVICE_FAMILY = "$targeted_device_family"; + VALID_ARCHS = "$valid_archs"; WRAPPER_EXTENSION = app; $swift_runtime_build_settings }; diff --git a/misc/dist/ios_xcode/godot_ios.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/misc/dist/apple_embedded_xcode/godot_apple_embedded.xcodeproj/project.xcworkspace/contents.xcworkspacedata similarity index 100% rename from misc/dist/ios_xcode/godot_ios.xcodeproj/project.xcworkspace/contents.xcworkspacedata rename to misc/dist/apple_embedded_xcode/godot_apple_embedded.xcodeproj/project.xcworkspace/contents.xcworkspacedata diff --git a/misc/dist/ios_xcode/godot_ios.xcodeproj/xcshareddata/xcschemes/godot_ios.xcscheme b/misc/dist/apple_embedded_xcode/godot_apple_embedded.xcodeproj/xcshareddata/xcschemes/godot_apple_embedded.xcscheme similarity index 100% rename from misc/dist/ios_xcode/godot_ios.xcodeproj/xcshareddata/xcschemes/godot_ios.xcscheme rename to misc/dist/apple_embedded_xcode/godot_apple_embedded.xcodeproj/xcshareddata/xcschemes/godot_apple_embedded.xcscheme diff --git a/misc/dist/ios_xcode/godot_ios/Images.xcassets/SplashImage.imageset/Contents.json b/misc/dist/apple_embedded_xcode/godot_apple_embedded/Images.xcassets/SplashImage.imageset/Contents.json similarity index 100% rename from misc/dist/ios_xcode/godot_ios/Images.xcassets/SplashImage.imageset/Contents.json rename to misc/dist/apple_embedded_xcode/godot_apple_embedded/Images.xcassets/SplashImage.imageset/Contents.json diff --git a/misc/dist/ios_xcode/godot_ios/Images.xcassets/SplashImage.imageset/splash@2x.png b/misc/dist/apple_embedded_xcode/godot_apple_embedded/Images.xcassets/SplashImage.imageset/splash@2x.png similarity index 100% rename from misc/dist/ios_xcode/godot_ios/Images.xcassets/SplashImage.imageset/splash@2x.png rename to misc/dist/apple_embedded_xcode/godot_apple_embedded/Images.xcassets/SplashImage.imageset/splash@2x.png diff --git a/misc/dist/ios_xcode/godot_ios/Images.xcassets/SplashImage.imageset/splash@3x.png b/misc/dist/apple_embedded_xcode/godot_apple_embedded/Images.xcassets/SplashImage.imageset/splash@3x.png similarity index 100% rename from misc/dist/ios_xcode/godot_ios/Images.xcassets/SplashImage.imageset/splash@3x.png rename to misc/dist/apple_embedded_xcode/godot_apple_embedded/Images.xcassets/SplashImage.imageset/splash@3x.png diff --git a/misc/dist/ios_xcode/godot_ios/Launch Screen.storyboard b/misc/dist/apple_embedded_xcode/godot_apple_embedded/Launch Screen.storyboard similarity index 100% rename from misc/dist/ios_xcode/godot_ios/Launch Screen.storyboard rename to misc/dist/apple_embedded_xcode/godot_apple_embedded/Launch Screen.storyboard diff --git a/misc/dist/ios_xcode/godot_ios/dummy.cpp b/misc/dist/apple_embedded_xcode/godot_apple_embedded/dummy.cpp similarity index 100% rename from misc/dist/ios_xcode/godot_ios/dummy.cpp rename to misc/dist/apple_embedded_xcode/godot_apple_embedded/dummy.cpp diff --git a/misc/dist/ios_xcode/godot_ios/dummy.h b/misc/dist/apple_embedded_xcode/godot_apple_embedded/dummy.h similarity index 100% rename from misc/dist/ios_xcode/godot_ios/dummy.h rename to misc/dist/apple_embedded_xcode/godot_apple_embedded/dummy.h diff --git a/misc/dist/ios_xcode/godot_ios/dummy.swift b/misc/dist/apple_embedded_xcode/godot_apple_embedded/dummy.swift similarity index 100% rename from misc/dist/ios_xcode/godot_ios/dummy.swift rename to misc/dist/apple_embedded_xcode/godot_apple_embedded/dummy.swift diff --git a/misc/dist/ios_xcode/godot_ios/dylibs/empty b/misc/dist/apple_embedded_xcode/godot_apple_embedded/dylibs/empty similarity index 100% rename from misc/dist/ios_xcode/godot_ios/dylibs/empty rename to misc/dist/apple_embedded_xcode/godot_apple_embedded/dylibs/empty diff --git a/misc/dist/ios_xcode/godot_ios/en.lproj/InfoPlist.strings b/misc/dist/apple_embedded_xcode/godot_apple_embedded/en.lproj/InfoPlist.strings similarity index 100% rename from misc/dist/ios_xcode/godot_ios/en.lproj/InfoPlist.strings rename to misc/dist/apple_embedded_xcode/godot_apple_embedded/en.lproj/InfoPlist.strings diff --git a/misc/dist/ios_xcode/godot_ios/export_options.plist b/misc/dist/apple_embedded_xcode/godot_apple_embedded/export_options.plist similarity index 100% rename from misc/dist/ios_xcode/godot_ios/export_options.plist rename to misc/dist/apple_embedded_xcode/godot_apple_embedded/export_options.plist diff --git a/misc/dist/ios_xcode/godot_ios/godot_ios-Info.plist b/misc/dist/apple_embedded_xcode/godot_apple_embedded/godot_apple_embedded-Info.plist similarity index 100% rename from misc/dist/ios_xcode/godot_ios/godot_ios-Info.plist rename to misc/dist/apple_embedded_xcode/godot_apple_embedded/godot_apple_embedded-Info.plist diff --git a/misc/dist/ios_xcode/godot_ios/godot_ios.entitlements b/misc/dist/apple_embedded_xcode/godot_apple_embedded/godot_apple_embedded.entitlements similarity index 100% rename from misc/dist/ios_xcode/godot_ios/godot_ios.entitlements rename to misc/dist/apple_embedded_xcode/godot_apple_embedded/godot_apple_embedded.entitlements diff --git a/misc/dist/ios_xcode/libgodot.ios.debug.xcframework/Info.plist b/misc/dist/apple_embedded_xcode/libgodot.ios.debug.xcframework/Info.plist similarity index 100% rename from misc/dist/ios_xcode/libgodot.ios.debug.xcframework/Info.plist rename to misc/dist/apple_embedded_xcode/libgodot.ios.debug.xcframework/Info.plist diff --git a/misc/dist/ios_xcode/libgodot.ios.debug.xcframework/ios-arm64/empty b/misc/dist/apple_embedded_xcode/libgodot.ios.debug.xcframework/ios-arm64/empty similarity index 100% rename from misc/dist/ios_xcode/libgodot.ios.debug.xcframework/ios-arm64/empty rename to misc/dist/apple_embedded_xcode/libgodot.ios.debug.xcframework/ios-arm64/empty diff --git a/misc/dist/ios_xcode/libgodot.ios.debug.xcframework/ios-arm64_x86_64-simulator/empty b/misc/dist/apple_embedded_xcode/libgodot.ios.debug.xcframework/ios-arm64_x86_64-simulator/empty similarity index 100% rename from misc/dist/ios_xcode/libgodot.ios.debug.xcframework/ios-arm64_x86_64-simulator/empty rename to misc/dist/apple_embedded_xcode/libgodot.ios.debug.xcframework/ios-arm64_x86_64-simulator/empty diff --git a/misc/dist/ios_xcode/libgodot.ios.release.xcframework/Info.plist b/misc/dist/apple_embedded_xcode/libgodot.ios.release.xcframework/Info.plist similarity index 100% rename from misc/dist/ios_xcode/libgodot.ios.release.xcframework/Info.plist rename to misc/dist/apple_embedded_xcode/libgodot.ios.release.xcframework/Info.plist diff --git a/misc/dist/ios_xcode/libgodot.ios.release.xcframework/ios-arm64/empty b/misc/dist/apple_embedded_xcode/libgodot.ios.release.xcframework/ios-arm64/empty similarity index 100% rename from misc/dist/ios_xcode/libgodot.ios.release.xcframework/ios-arm64/empty rename to misc/dist/apple_embedded_xcode/libgodot.ios.release.xcframework/ios-arm64/empty diff --git a/misc/dist/ios_xcode/libgodot.ios.release.xcframework/ios-arm64_x86_64-simulator/empty b/misc/dist/apple_embedded_xcode/libgodot.ios.release.xcframework/ios-arm64_x86_64-simulator/empty similarity index 100% rename from misc/dist/ios_xcode/libgodot.ios.release.xcframework/ios-arm64_x86_64-simulator/empty rename to misc/dist/apple_embedded_xcode/libgodot.ios.release.xcframework/ios-arm64_x86_64-simulator/empty diff --git a/misc/dist/visionos_xcode/libgodot.visionos.debug.xcframework/Info.plist b/misc/dist/apple_embedded_xcode/libgodot.visionos.debug.xcframework/Info.plist similarity index 100% rename from misc/dist/visionos_xcode/libgodot.visionos.debug.xcframework/Info.plist rename to misc/dist/apple_embedded_xcode/libgodot.visionos.debug.xcframework/Info.plist diff --git a/misc/dist/visionos_xcode/godot_visionos/dylibs/empty b/misc/dist/apple_embedded_xcode/libgodot.visionos.debug.xcframework/xros-arm64-simulator/empty similarity index 100% rename from misc/dist/visionos_xcode/godot_visionos/dylibs/empty rename to misc/dist/apple_embedded_xcode/libgodot.visionos.debug.xcframework/xros-arm64-simulator/empty diff --git a/misc/dist/visionos_xcode/libgodot.visionos.debug.xcframework/xros-arm64-simulator/empty b/misc/dist/apple_embedded_xcode/libgodot.visionos.debug.xcframework/xros-arm64/empty similarity index 100% rename from misc/dist/visionos_xcode/libgodot.visionos.debug.xcframework/xros-arm64-simulator/empty rename to misc/dist/apple_embedded_xcode/libgodot.visionos.debug.xcframework/xros-arm64/empty diff --git a/misc/dist/visionos_xcode/libgodot.visionos.release.xcframework/Info.plist b/misc/dist/apple_embedded_xcode/libgodot.visionos.release.xcframework/Info.plist similarity index 100% rename from misc/dist/visionos_xcode/libgodot.visionos.release.xcframework/Info.plist rename to misc/dist/apple_embedded_xcode/libgodot.visionos.release.xcframework/Info.plist diff --git a/misc/dist/visionos_xcode/libgodot.visionos.debug.xcframework/xros-arm64/empty b/misc/dist/apple_embedded_xcode/libgodot.visionos.release.xcframework/xros-arm64-simulator/empty similarity index 100% rename from misc/dist/visionos_xcode/libgodot.visionos.debug.xcframework/xros-arm64/empty rename to misc/dist/apple_embedded_xcode/libgodot.visionos.release.xcframework/xros-arm64-simulator/empty diff --git a/misc/dist/visionos_xcode/libgodot.visionos.release.xcframework/xros-arm64-simulator/empty b/misc/dist/apple_embedded_xcode/libgodot.visionos.release.xcframework/xros-arm64/empty similarity index 100% rename from misc/dist/visionos_xcode/libgodot.visionos.release.xcframework/xros-arm64-simulator/empty rename to misc/dist/apple_embedded_xcode/libgodot.visionos.release.xcframework/xros-arm64/empty diff --git a/misc/dist/ios_xcode/godot_ios.xcodeproj/project.pbxproj b/misc/dist/ios_xcode/godot_ios.xcodeproj/project.pbxproj deleted file mode 100644 index 1975bde1852..00000000000 --- a/misc/dist/ios_xcode/godot_ios.xcodeproj/project.pbxproj +++ /dev/null @@ -1,410 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 46; - objects = { - -/* Begin PBXBuildFile section */ - 1F1575721F582BE20003B888 /* dylibs in Resources */ = {isa = PBXBuildFile; fileRef = 1F1575711F582BE20003B888 /* dylibs */; }; - DEADBEEF2F582BE20003B888 /* $binary.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = DEADBEEF1F582BE20003B888 /* $binary.xcframework */; }; - $modules_buildfile - $swift_runtime_buildfile - 1FF8DBB11FBA9DE1009DE660 /* dummy.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1FF8DBB01FBA9DE1009DE660 /* dummy.cpp */; }; - D07CD44E1C5D589C00B7FB28 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = D07CD44D1C5D589C00B7FB28 /* Images.xcassets */; }; - 9039D3BE24C093AC0020482C /* MoltenVK.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9039D3BD24C093AC0020482C /* MoltenVK.xcframework */; }; - D0BCFE4618AEBDA2004A7AAE /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = D0BCFE4418AEBDA2004A7AAE /* InfoPlist.strings */; }; - D0BCFE7818AEBFEB004A7AAE /* $binary.pck in Resources */ = {isa = PBXBuildFile; fileRef = D0BCFE7718AEBFEB004A7AAE /* $binary.pck */; }; - F965960D2BC2C3A800579C7E /* PrivacyInfo.xcprivacy in Resources */ = {isa = PBXBuildFile; fileRef = F965960C2BC2C3A800579C7E /* PrivacyInfo.xcprivacy */; }; - $pbx_launch_screen_build_reference -/* End PBXBuildFile section */ - -/* Begin PBXCopyFilesBuildPhase section */ - 90A13CD024AA68E500E8464F /* Embed Frameworks */ = { - isa = PBXCopyFilesBuildPhase; - buildActionMask = 2147483647; - dstPath = ""; - dstSubfolderSpec = 10; - files = ( - $pbx_embeded_frameworks - ); - name = "Embed Frameworks"; - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXCopyFilesBuildPhase section */ - -/* Begin PBXFileReference section */ - 1F1575711F582BE20003B888 /* dylibs */ = {isa = PBXFileReference; lastKnownFileType = folder; name = dylibs; path = "$binary/dylibs"; sourceTree = ""; }; - DEADBEEF1F582BE20003B888 /* $binary.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = godot; path = "$binary.xcframework"; sourceTree = ""; }; - $modules_fileref - $swift_runtime_fileref - 1FF4C1881F584E6300A41E41 /* $binary.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = "$binary.entitlements"; sourceTree = ""; }; - 1FF8DBB01FBA9DE1009DE660 /* dummy.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = dummy.cpp; sourceTree = ""; }; - 9039D3BD24C093AC0020482C /* MoltenVK.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = MoltenVK; path = MoltenVK.xcframework; sourceTree = ""; }; - D07CD44D1C5D589C00B7FB28 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; }; - D0BCFE3418AEBDA2004A7AAE /* $binary.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "$binary.app"; sourceTree = BUILT_PRODUCTS_DIR; }; - D0BCFE4318AEBDA2004A7AAE /* $binary-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "$binary-Info.plist"; sourceTree = ""; }; - D0BCFE4518AEBDA2004A7AAE /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; - $pbx_locale_file_reference - D0BCFE7718AEBFEB004A7AAE /* $binary.pck */ = {isa = PBXFileReference; lastKnownFileType = file; path = "$binary.pck"; sourceTree = ""; }; - F965960C2BC2C3A800579C7E /* PrivacyInfo.xcprivacy */ = {isa = PBXFileReference; lastKnownFileType = text.xml; path = PrivacyInfo.xcprivacy; sourceTree = ""; }; - $pbx_launch_screen_file_reference -/* End PBXFileReference section */ - - $additional_pbx_files - -/* Begin PBXFrameworksBuildPhase section */ - D0BCFE3118AEBDA2004A7AAE /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 9039D3BE24C093AC0020482C /* MoltenVK.xcframework in Frameworks */, - DEADBEEF2F582BE20003B888 /* $binary.xcframework */, - $modules_buildphase - $additional_pbx_frameworks_build - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - D0BCFE2B18AEBDA2004A7AAE = { - isa = PBXGroup; - children = ( - 1F1575711F582BE20003B888 /* dylibs */, - D0BCFE7718AEBFEB004A7AAE /* $binary.pck */, - D0BCFE4118AEBDA2004A7AAE /* $binary */, - D0BCFE3618AEBDA2004A7AAE /* Frameworks */, - D0BCFE3518AEBDA2004A7AAE /* Products */, - F965960C2BC2C3A800579C7E /* PrivacyInfo.xcprivacy */, - $additional_pbx_resources_refs - ); - sourceTree = ""; - }; - D0BCFE3518AEBDA2004A7AAE /* Products */ = { - isa = PBXGroup; - children = ( - D0BCFE3418AEBDA2004A7AAE /* $binary.app */, - ); - name = Products; - sourceTree = ""; - }; - D0BCFE3618AEBDA2004A7AAE /* Frameworks */ = { - isa = PBXGroup; - children = ( - 9039D3BD24C093AC0020482C /* MoltenVK.xcframework */, - DEADBEEF1F582BE20003B888 /* $binary.xcframework */, - $modules_buildgrp - $additional_pbx_frameworks_refs - ); - name = Frameworks; - sourceTree = ""; - }; - D0BCFE4118AEBDA2004A7AAE /* $binary */ = { - isa = PBXGroup; - children = ( - $pbx_launch_screen_copy_files - 1FF4C1881F584E6300A41E41 /* $binary.entitlements */, - D07CD44D1C5D589C00B7FB28 /* Images.xcassets */, - D0BCFE4218AEBDA2004A7AAE /* Supporting Files */, - 1FF8DBB01FBA9DE1009DE660 /* dummy.cpp */, - $swift_runtime_binary_files - ); - path = "$binary"; - sourceTree = ""; - }; - D0BCFE4218AEBDA2004A7AAE /* Supporting Files */ = { - isa = PBXGroup; - children = ( - D0BCFE4318AEBDA2004A7AAE /* $binary-Info.plist */, - D0BCFE4418AEBDA2004A7AAE /* InfoPlist.strings */, - ); - name = "Supporting Files"; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - D0BCFE3318AEBDA2004A7AAE /* $binary */ = { - isa = PBXNativeTarget; - buildConfigurationList = D0BCFE7118AEBDA3004A7AAE /* Build configuration list for PBXNativeTarget "$binary" */; - buildPhases = ( - D0BCFE3018AEBDA2004A7AAE /* Sources */, - D0BCFE3118AEBDA2004A7AAE /* Frameworks */, - D0BCFE3218AEBDA2004A7AAE /* Resources */, - 90A13CD024AA68E500E8464F /* Embed Frameworks */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = "$binary"; - productName = "$name"; - productReference = D0BCFE3418AEBDA2004A7AAE /* $binary.app */; - productType = "com.apple.product-type.application"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - D0BCFE2C18AEBDA2004A7AAE /* Project object */ = { - isa = PBXProject; - attributes = { - LastUpgradeCheck = 0500; - ORGANIZATIONNAME = GodotEngine; - TargetAttributes = { - D0BCFE3318AEBDA2004A7AAE = { - DevelopmentTeam = $team_id; - $swift_runtime_migration - ProvisioningStyle = Automatic; - SystemCapabilities = { - }; - }; - }; - }; - buildConfigurationList = D0BCFE2F18AEBDA2004A7AAE /* Build configuration list for PBXProject "$binary" */; - compatibilityVersion = "Xcode 3.2"; - developmentRegion = en; - hasScannedForEncodings = 0; - knownRegions = ( - en, - Base, - ); - mainGroup = D0BCFE2B18AEBDA2004A7AAE; - productRefGroup = D0BCFE3518AEBDA2004A7AAE /* Products */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - D0BCFE3318AEBDA2004A7AAE /* $binary */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXResourcesBuildPhase section */ - D0BCFE3218AEBDA2004A7AAE /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - D07CD44E1C5D589C00B7FB28 /* Images.xcassets in Resources */, - D0BCFE7818AEBFEB004A7AAE /* $binary.pck in Resources */, - $pbx_launch_screen_build_phase - D0BCFE4618AEBDA2004A7AAE /* InfoPlist.strings in Resources */, - F965960D2BC2C3A800579C7E /* PrivacyInfo.xcprivacy in Resources */, - $additional_pbx_resources_build - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - D0BCFE3018AEBDA2004A7AAE /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 1FF8DBB11FBA9DE1009DE660 /* dummy.cpp in Sources */, - $swift_runtime_build_phase - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXVariantGroup section */ - D0BCFE4418AEBDA2004A7AAE /* InfoPlist.strings */ = { - isa = PBXVariantGroup; - children = ( - D0BCFE4518AEBDA2004A7AAE /* en */, - $pbx_locale_build_reference - ); - name = InfoPlist.strings; - sourceTree = ""; - }; -/* End PBXVariantGroup section */ - -/* Begin XCBuildConfiguration section */ - D0BCFE6F18AEBDA3004A7AAE /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - ARCHS = "$godot_archs"; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - CODE_SIGN_IDENTITY = "$code_sign_identity_debug"; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "$code_sign_identity_debug"; - COPY_PHASE_STRIP = NO; - ENABLE_BITCODE = NO; - "FRAMEWORK_SEARCH_PATHS[arch=*]" = ( - "$(PROJECT_DIR)/**", - ); - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_DYNAMIC_NO_PIC = NO; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "$(inherited)", - ); - GCC_SYMBOLS_PRIVATE_EXTERN = NO; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = $min_version; - "LD_CLASSIC_1500" = "-ld_classic"; - "LD_CLASSIC_1501" = "-ld_classic"; - "LD_CLASSIC_1510" = "-ld_classic"; - OTHER_LDFLAGS = "$(LD_CLASSIC_$(XCODE_VERSION_ACTUAL)) $linker_flags"; - SDKROOT = iphoneos; - TARGETED_DEVICE_FAMILY = "$targeted_device_family"; - }; - name = Debug; - }; - D0BCFE7018AEBDA3004A7AAE /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - ARCHS = "$godot_archs"; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - CODE_SIGN_IDENTITY = "$code_sign_identity_release"; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "$code_sign_identity_release"; - COPY_PHASE_STRIP = YES; - ENABLE_BITCODE = NO; - "FRAMEWORK_SEARCH_PATHS[arch=*]" = ( - "$(PROJECT_DIR)/**", - ); - ENABLE_NS_ASSERTIONS = NO; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = $min_version; - "LD_CLASSIC_1500" = "-ld_classic"; - "LD_CLASSIC_1501" = "-ld_classic"; - "LD_CLASSIC_1510" = "-ld_classic"; - OTHER_LDFLAGS = "$(LD_CLASSIC_$(XCODE_VERSION_ACTUAL)) $linker_flags"; - SDKROOT = iphoneos; - TARGETED_DEVICE_FAMILY = "$targeted_device_family"; - VALIDATE_PRODUCT = YES; - }; - name = Release; - }; - D0BCFE7218AEBDA3004A7AAE /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ARCHS = "$godot_archs"; - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CODE_SIGN_ENTITLEMENTS = "$binary/$binary.entitlements"; - CODE_SIGN_IDENTITY = "$code_sign_identity_debug"; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "$code_sign_identity_debug"; - CODE_SIGN_STYLE = "$code_sign_style_debug"; - CONFIGURATION_BUILD_DIR = "$(BUILD_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)"; - DEVELOPMENT_TEAM = $team_id; - INFOPLIST_FILE = "$binary/$binary-Info.plist"; - IPHONEOS_DEPLOYMENT_TARGET = $min_version; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - ); - LIBRARY_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/**", - ); - PRODUCT_BUNDLE_IDENTIFIER = $bundle_identifier; - INFOPLIST_KEY_CFBundleDisplayName = "$name"; - PRODUCT_NAME = "$binary"; - EXECUTABLE_NAME = "$binary"; - MARKETING_VERSION = $short_version; - CURRENT_PROJECT_VERSION = $version; - PROVISIONING_PROFILE = "$provisioning_profile_uuid_debug"; - PROVISIONING_PROFILE_SPECIFIER = "$provisioning_profile_specifier_debug"; - TARGETED_DEVICE_FAMILY = "$targeted_device_family"; - VALID_ARCHS = "arm64 x86_64"; - WRAPPER_EXTENSION = app; - $swift_runtime_build_settings - }; - name = Debug; - }; - D0BCFE7318AEBDA3004A7AAE /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ARCHS = "$godot_archs"; - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CODE_SIGN_ENTITLEMENTS = "$binary/$binary.entitlements"; - CODE_SIGN_IDENTITY = "$code_sign_identity_release"; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "$code_sign_identity_release"; - CODE_SIGN_STYLE = "$code_sign_style_release"; - CONFIGURATION_BUILD_DIR = "$(BUILD_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)"; - DEVELOPMENT_TEAM = $team_id; - INFOPLIST_FILE = "$binary/$binary-Info.plist"; - IPHONEOS_DEPLOYMENT_TARGET = $min_version; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - ); - LIBRARY_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/**", - ); - PRODUCT_BUNDLE_IDENTIFIER = $bundle_identifier; - INFOPLIST_KEY_CFBundleDisplayName = "$name"; - PRODUCT_NAME = "$binary"; - EXECUTABLE_NAME = "$binary"; - MARKETING_VERSION = $short_version; - CURRENT_PROJECT_VERSION = $version; - PROVISIONING_PROFILE = "$provisioning_profile_uuid_release"; - PROVISIONING_PROFILE_SPECIFIER = "$provisioning_profile_specifier_release"; - TARGETED_DEVICE_FAMILY = "$targeted_device_family"; - VALID_ARCHS = "arm64 x86_64"; - WRAPPER_EXTENSION = app; - $swift_runtime_build_settings - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - D0BCFE2F18AEBDA2004A7AAE /* Build configuration list for PBXProject "$binary" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - D0BCFE6F18AEBDA3004A7AAE /* Debug */, - D0BCFE7018AEBDA3004A7AAE /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Debug; - }; - D0BCFE7118AEBDA3004A7AAE /* Build configuration list for PBXNativeTarget "$binary" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - D0BCFE7218AEBDA3004A7AAE /* Debug */, - D0BCFE7318AEBDA3004A7AAE /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Debug; - }; -/* End XCConfigurationList section */ - }; - rootObject = D0BCFE2C18AEBDA2004A7AAE /* Project object */; -} diff --git a/misc/dist/visionos_xcode/PrivacyInfo.xcprivacy b/misc/dist/visionos_xcode/PrivacyInfo.xcprivacy deleted file mode 100644 index bc4a893d587..00000000000 --- a/misc/dist/visionos_xcode/PrivacyInfo.xcprivacy +++ /dev/null @@ -1,10 +0,0 @@ - - - - - NSPrivacyAccessedAPITypes - $priv_api_types - $priv_tracking - $priv_collection - - diff --git a/misc/dist/visionos_xcode/data.pck b/misc/dist/visionos_xcode/data.pck deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/misc/dist/visionos_xcode/godot_visionos.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/misc/dist/visionos_xcode/godot_visionos.xcodeproj/project.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index c9c19829f4a..00000000000 --- a/misc/dist/visionos_xcode/godot_visionos.xcodeproj/project.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/misc/dist/visionos_xcode/godot_visionos.xcodeproj/xcshareddata/xcschemes/godot_visionos.xcscheme b/misc/dist/visionos_xcode/godot_visionos.xcodeproj/xcshareddata/xcschemes/godot_visionos.xcscheme deleted file mode 100644 index d61a53d5c2c..00000000000 --- a/misc/dist/visionos_xcode/godot_visionos.xcodeproj/xcshareddata/xcschemes/godot_visionos.xcscheme +++ /dev/null @@ -1,93 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/misc/dist/visionos_xcode/godot_visionos/Images.xcassets/SplashImage.imageset/Contents.json b/misc/dist/visionos_xcode/godot_visionos/Images.xcassets/SplashImage.imageset/Contents.json deleted file mode 100644 index 1e63e78edac..00000000000 --- a/misc/dist/visionos_xcode/godot_visionos/Images.xcassets/SplashImage.imageset/Contents.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "images" : [ - { - "idiom" : "universal", - "scale" : "1x" - }, - { - "filename" : "splash@2x.png", - "idiom" : "universal", - "scale" : "2x" - }, - { - "filename" : "splash@3x.png", - "idiom" : "universal", - "scale" : "3x" - } - ], - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/misc/dist/visionos_xcode/godot_visionos/Images.xcassets/SplashImage.imageset/splash@2x.png b/misc/dist/visionos_xcode/godot_visionos/Images.xcassets/SplashImage.imageset/splash@2x.png deleted file mode 100644 index 3a0469319b1..00000000000 Binary files a/misc/dist/visionos_xcode/godot_visionos/Images.xcassets/SplashImage.imageset/splash@2x.png and /dev/null differ diff --git a/misc/dist/visionos_xcode/godot_visionos/Images.xcassets/SplashImage.imageset/splash@3x.png b/misc/dist/visionos_xcode/godot_visionos/Images.xcassets/SplashImage.imageset/splash@3x.png deleted file mode 100644 index 3a0469319b1..00000000000 Binary files a/misc/dist/visionos_xcode/godot_visionos/Images.xcassets/SplashImage.imageset/splash@3x.png and /dev/null differ diff --git a/misc/dist/visionos_xcode/godot_visionos/dummy.cpp b/misc/dist/visionos_xcode/godot_visionos/dummy.cpp deleted file mode 100644 index f36e09c68a9..00000000000 --- a/misc/dist/visionos_xcode/godot_visionos/dummy.cpp +++ /dev/null @@ -1,31 +0,0 @@ -/**************************************************************************/ -/* dummy.cpp */ -/**************************************************************************/ -/* This file is part of: */ -/* GODOT ENGINE */ -/* https://godotengine.org */ -/**************************************************************************/ -/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */ -/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */ -/* */ -/* Permission is hereby granted, free of charge, to any person obtaining */ -/* a copy of this software and associated documentation files (the */ -/* "Software"), to deal in the Software without restriction, including */ -/* without limitation the rights to use, copy, modify, merge, publish, */ -/* distribute, sublicense, and/or sell copies of the Software, and to */ -/* permit persons to whom the Software is furnished to do so, subject to */ -/* the following conditions: */ -/* */ -/* The above copyright notice and this permission notice shall be */ -/* included in all copies or substantial portions of the Software. */ -/* */ -/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */ -/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */ -/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. */ -/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */ -/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */ -/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */ -/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -/**************************************************************************/ - -$cpp_code diff --git a/misc/dist/visionos_xcode/godot_visionos/dummy.h b/misc/dist/visionos_xcode/godot_visionos/dummy.h deleted file mode 100644 index a29be476456..00000000000 --- a/misc/dist/visionos_xcode/godot_visionos/dummy.h +++ /dev/null @@ -1,33 +0,0 @@ -/**************************************************************************/ -/* dummy.h */ -/**************************************************************************/ -/* This file is part of: */ -/* GODOT ENGINE */ -/* https://godotengine.org */ -/**************************************************************************/ -/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */ -/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */ -/* */ -/* Permission is hereby granted, free of charge, to any person obtaining */ -/* a copy of this software and associated documentation files (the */ -/* "Software"), to deal in the Software without restriction, including */ -/* without limitation the rights to use, copy, modify, merge, publish, */ -/* distribute, sublicense, and/or sell copies of the Software, and to */ -/* permit persons to whom the Software is furnished to do so, subject to */ -/* the following conditions: */ -/* */ -/* The above copyright notice and this permission notice shall be */ -/* included in all copies or substantial portions of the Software. */ -/* */ -/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */ -/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */ -/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. */ -/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */ -/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */ -/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */ -/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -/**************************************************************************/ - -#pragma once - -// #import diff --git a/misc/dist/visionos_xcode/godot_visionos/dummy.swift b/misc/dist/visionos_xcode/godot_visionos/dummy.swift deleted file mode 100644 index 495b5c9a870..00000000000 --- a/misc/dist/visionos_xcode/godot_visionos/dummy.swift +++ /dev/null @@ -1,31 +0,0 @@ -/**************************************************************************/ -/* dummy.swift */ -/**************************************************************************/ -/* This file is part of: */ -/* GODOT ENGINE */ -/* https://godotengine.org */ -/**************************************************************************/ -/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */ -/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */ -/* */ -/* Permission is hereby granted, free of charge, to any person obtaining */ -/* a copy of this software and associated documentation files (the */ -/* "Software"), to deal in the Software without restriction, including */ -/* without limitation the rights to use, copy, modify, merge, publish, */ -/* distribute, sublicense, and/or sell copies of the Software, and to */ -/* permit persons to whom the Software is furnished to do so, subject to */ -/* the following conditions: */ -/* */ -/* The above copyright notice and this permission notice shall be */ -/* included in all copies or substantial portions of the Software. */ -/* */ -/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */ -/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */ -/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. */ -/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */ -/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */ -/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */ -/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -/**************************************************************************/ - -import Foundation diff --git a/misc/dist/visionos_xcode/godot_visionos/en.lproj/InfoPlist.strings b/misc/dist/visionos_xcode/godot_visionos/en.lproj/InfoPlist.strings deleted file mode 100644 index b92732c79e0..00000000000 --- a/misc/dist/visionos_xcode/godot_visionos/en.lproj/InfoPlist.strings +++ /dev/null @@ -1 +0,0 @@ -/* Localized versions of Info.plist keys */ diff --git a/misc/dist/visionos_xcode/godot_visionos/export_options.plist b/misc/dist/visionos_xcode/godot_visionos/export_options.plist deleted file mode 100644 index 71073d9a075..00000000000 --- a/misc/dist/visionos_xcode/godot_visionos/export_options.plist +++ /dev/null @@ -1,20 +0,0 @@ - - - - - method - $export_method - - teamID - $team_id - - provisioningProfiles - - $bundle_identifier - $provisioning_profile_uuid - - - compileBitcode - - - diff --git a/misc/dist/visionos_xcode/godot_visionos/godot_visionos-Info.plist b/misc/dist/visionos_xcode/godot_visionos/godot_visionos-Info.plist deleted file mode 100644 index 3d2ae6b52b9..00000000000 --- a/misc/dist/visionos_xcode/godot_visionos/godot_visionos-Info.plist +++ /dev/null @@ -1,63 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleDisplayName - $(INFOPLIST_KEY_CFBundleDisplayName) - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIcons - - CFBundleIcons~ipad - - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - APPL - CFBundleShortVersionString - $(MARKETING_VERSION) - CFBundleSignature - $signature - CFBundleVersion - $(CURRENT_PROJECT_VERSION) - ITSAppUsesNonExemptEncryption - - LSRequiresIPhoneOS - - LSSupportsOpeningDocumentsInPlace - $docs_in_place - UIFileSharingEnabled - $docs_sharing - UIRequiredDeviceCapabilities - - $required_device_capabilities - - NSCameraUsageDescription - $camera_usage_description - NSPhotoLibraryUsageDescription - $photolibrary_usage_description - NSMicrophoneUsageDescription - $microphone_usage_description - UIRequiresFullScreen - - UIStatusBarHidden - - UISupportedInterfaceOrientations - - $interface_orientations - - UISupportedInterfaceOrientations~ipad - - $ipad_interface_orientations - - $additional_plist_content - $plist_launch_screen_name - CADisableMinimumFrameDurationOnPhone - - diff --git a/misc/dist/visionos_xcode/godot_visionos/godot_visionos.entitlements b/misc/dist/visionos_xcode/godot_visionos/godot_visionos.entitlements deleted file mode 100644 index 6a9e1af546e..00000000000 --- a/misc/dist/visionos_xcode/godot_visionos/godot_visionos.entitlements +++ /dev/null @@ -1,7 +0,0 @@ - - - - -$entitlements_full - - diff --git a/misc/dist/visionos_xcode/libgodot.visionos.release.xcframework/xros-arm64/empty b/misc/dist/visionos_xcode/libgodot.visionos.release.xcframework/xros-arm64/empty deleted file mode 100644 index bd3e8943336..00000000000 --- a/misc/dist/visionos_xcode/libgodot.visionos.release.xcframework/xros-arm64/empty +++ /dev/null @@ -1 +0,0 @@ -Dummy file to make dylibs folder exported diff --git a/platform/ios/README.md b/platform/ios/README.md index cca6561afd7..db9400427aa 100644 --- a/platform/ios/README.md +++ b/platform/ios/README.md @@ -7,7 +7,7 @@ This platform derives from the Apple embedded abstract platform ([`drivers/apple This platform uses shared Apple code ([`drivers/apple`](/drivers/apple)). -See also [`misc/dist/ios_xcode`](/misc/dist/ios_xcode) folder for the Xcode +See also [`misc/dist/apple_embedded_xcode`](/misc/dist/apple_embedded_xcode) folder for the Xcode project template used for packaging the iOS export templates. ## Documentation diff --git a/platform/ios/export/export_plugin.cpp b/platform/ios/export/export_plugin.cpp index 1f40fe27dd7..58f49aea8b0 100644 --- a/platform/ios/export/export_plugin.cpp +++ b/platform/ios/export/export_plugin.cpp @@ -355,3 +355,105 @@ Error EditorExportPlatformIOS::_export_icons(const Ref &p_pr return OK; } + +String EditorExportPlatformIOS::_process_config_file_line(const Ref &p_preset, const String &p_line, const AppleEmbeddedConfigData &p_config, bool p_debug, const CodeSigningDetails &p_code_signing) { + // Do iOS specific processing first, and call super implementation if there are no matches + + String strnew; + + // Supported Destinations + if (p_line.contains("$targeted_device_family")) { + String xcode_value; + switch ((int)p_preset->get("application/targeted_device_family")) { + case 0: // iPhone + xcode_value = "1"; + break; + case 1: // iPad + xcode_value = "2"; + break; + case 2: // iPhone & iPad + xcode_value = "1,2"; + break; + } + strnew += p_line.replace("$targeted_device_family", xcode_value) + "\n"; + + // MoltenVK Framework + } else if (p_line.contains("$moltenvk_buildfile")) { + String value = "9039D3BE24C093AC0020482C /* MoltenVK.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9039D3BD24C093AC0020482C /* MoltenVK.xcframework */; };"; + strnew += p_line.replace("$moltenvk_buildfile", value) + "\n"; + } else if (p_line.contains("$moltenvk_fileref")) { + String value = "9039D3BD24C093AC0020482C /* MoltenVK.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = MoltenVK; path = MoltenVK.xcframework; sourceTree = \"\"; };"; + strnew += p_line.replace("$moltenvk_fileref", value) + "\n"; + } else if (p_line.contains("$moltenvk_buildphase")) { + String value = "9039D3BE24C093AC0020482C /* MoltenVK.xcframework in Frameworks */,"; + strnew += p_line.replace("$moltenvk_buildphase", value) + "\n"; + } else if (p_line.contains("$moltenvk_buildgrp")) { + String value = "9039D3BD24C093AC0020482C /* MoltenVK.xcframework */,"; + strnew += p_line.replace("$moltenvk_buildgrp", value) + "\n"; + + // Launch Storyboard + } else if (p_line.contains("$plist_launch_screen_name")) { + String value = "UILaunchStoryboardName\nLaunch Screen"; + strnew += p_line.replace("$plist_launch_screen_name", value) + "\n"; + } else if (p_line.contains("$pbx_launch_screen_file_reference")) { + String value = "90DD2D9D24B36E8000717FE1 = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = \"Launch Screen.storyboard\"; sourceTree = \"\"; };"; + strnew += p_line.replace("$pbx_launch_screen_file_reference", value) + "\n"; + } else if (p_line.contains("$pbx_launch_screen_copy_files")) { + String value = "90DD2D9D24B36E8000717FE1 /* Launch Screen.storyboard */,"; + strnew += p_line.replace("$pbx_launch_screen_copy_files", value) + "\n"; + } else if (p_line.contains("$pbx_launch_screen_build_phase")) { + String value = "90DD2D9E24B36E8000717FE1 /* Launch Screen.storyboard in Resources */,"; + strnew += p_line.replace("$pbx_launch_screen_build_phase", value) + "\n"; + } else if (p_line.contains("$pbx_launch_screen_build_reference")) { + String value = "90DD2D9E24B36E8000717FE1 /* Launch Screen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 90DD2D9D24B36E8000717FE1 /* Launch Screen.storyboard */; };"; + strnew += p_line.replace("$pbx_launch_screen_build_reference", value) + "\n"; + + // Launch Storyboard customization + } else if (p_line.contains("$launch_screen_image_mode")) { + int image_scale_mode = p_preset->get("storyboard/image_scale_mode"); + String value; + + switch (image_scale_mode) { + case 0: { + String logo_path = get_project_setting(p_preset, "application/boot_splash/image"); + bool is_on = get_project_setting(p_preset, "application/boot_splash/fullsize"); + // If custom logo is not specified, Godot does not scale default one, so we should do the same. + value = (is_on && logo_path.length() > 0) ? "scaleAspectFit" : "center"; + } break; + default: { + value = storyboard_image_scale_mode[image_scale_mode - 1]; + } + } + + strnew += p_line.replace("$launch_screen_image_mode", value) + "\n"; + } else if (p_line.contains("$launch_screen_background_color")) { + bool use_custom = p_preset->get("storyboard/use_custom_bg_color"); + Color color = use_custom ? p_preset->get("storyboard/custom_bg_color") : get_project_setting(p_preset, "application/boot_splash/bg_color"); + const String value_format = "red=\"$red\" green=\"$green\" blue=\"$blue\" alpha=\"$alpha\""; + + Dictionary value_dictionary; + value_dictionary["red"] = color.r; + value_dictionary["green"] = color.g; + value_dictionary["blue"] = color.b; + value_dictionary["alpha"] = color.a; + String value = value_format.format(value_dictionary, "$_"); + + strnew += p_line.replace("$launch_screen_background_color", value) + "\n"; + + // OS Deployment Target + } else if (p_line.contains("$os_deployment_target")) { + String min_version = p_preset->get("application/min_" + get_platform_name() + "_version"); + String value = "IPHONEOS_DEPLOYMENT_TARGET = " + min_version + ";"; + strnew += p_line.replace("$os_deployment_target", value) + "\n"; + + // Valid Archs + } else if (p_line.contains("$valid_archs")) { + strnew += p_line.replace("$valid_archs", "arm64 x86_64") + "\n"; + + // Apple Embedded common + } else { + strnew += EditorExportPlatformAppleEmbedded::_process_config_file_line(p_preset, p_line, p_config, p_debug, p_code_signing); + } + + return strnew; +} diff --git a/platform/ios/export/export_plugin.h b/platform/ios/export/export_plugin.h index f7892df3ec5..7a352de584d 100644 --- a/platform/ios/export/export_plugin.h +++ b/platform/ios/export/export_plugin.h @@ -52,6 +52,8 @@ class EditorExportPlatformIOS : public EditorExportPlatformAppleEmbedded { virtual Error _export_icons(const Ref &p_preset, const String &p_iconset_dir) override; virtual HashMap get_custom_project_settings(const Ref &p_preset) const override; + virtual String _process_config_file_line(const Ref &p_preset, const String &p_line, const AppleEmbeddedConfigData &p_config, bool p_debug, const CodeSigningDetails &p_code_signing) override; + public: virtual String get_name() const override { return "iOS"; } virtual String get_os_name() const override { return "iOS"; } diff --git a/platform/visionos/README.md b/platform/visionos/README.md index 6bd8f257d71..21977ef0b48 100644 --- a/platform/visionos/README.md +++ b/platform/visionos/README.md @@ -7,7 +7,7 @@ This platform derives from the Apple Embedded abstract platform ([`drivers/apple This platform uses shared Apple code ([`drivers/apple`](drivers/apple)). -See also [`misc/dist/ios_xcode`](/misc/dist/ios_xcode) folder for the Xcode +See also [`misc/dist/apple_embedded_xcode`](/misc/dist/apple_embedded_xcode) folder for the Xcode project template used for packaging the iOS export templates. ## Documentation diff --git a/platform/visionos/export/export_plugin.cpp b/platform/visionos/export/export_plugin.cpp index 5f188a3fdb7..d0e8aa5b462 100644 --- a/platform/visionos/export/export_plugin.cpp +++ b/platform/visionos/export/export_plugin.cpp @@ -54,3 +54,51 @@ void EditorExportPlatformVisionOS::get_export_options(List *r_opti Vector EditorExportPlatformVisionOS::get_icon_infos() const { return Vector(); } + +String EditorExportPlatformVisionOS::_process_config_file_line(const Ref &p_preset, const String &p_line, const AppleEmbeddedConfigData &p_config, bool p_debug, const CodeSigningDetails &p_code_signing) { + // Do visionOS specific processing first, and call super implementation if there are no matches + + String strnew; + + // Supported Destinations + if (p_line.contains("$targeted_device_family")) { + strnew += p_line.replace("$targeted_device_family", "7") + "\n"; + + // MoltenVK Framework not used on visionOS + } else if (p_line.contains("$moltenvk_buildfile")) { + strnew += p_line.replace("$moltenvk_buildfile", "") + "\n"; + } else if (p_line.contains("$moltenvk_fileref")) { + strnew += p_line.replace("$moltenvk_fileref", "") + "\n"; + } else if (p_line.contains("$moltenvk_buildphase")) { + strnew += p_line.replace("$moltenvk_buildphase", "") + "\n"; + } else if (p_line.contains("$moltenvk_buildgrp")) { + strnew += p_line.replace("$moltenvk_buildgrp", "") + "\n"; + + // Launch Storyboard + } else if (p_line.contains("$plist_launch_screen_name")) { + strnew += p_line.replace("$plist_launch_screen_name", "") + "\n"; + } else if (p_line.contains("$pbx_launch_screen_file_reference")) { + strnew += p_line.replace("$pbx_launch_screen_file_reference", "") + "\n"; + } else if (p_line.contains("$pbx_launch_screen_copy_files")) { + strnew += p_line.replace("$pbx_launch_screen_copy_files", "") + "\n"; + } else if (p_line.contains("$pbx_launch_screen_build_phase")) { + strnew += p_line.replace("$pbx_launch_screen_build_phase", "") + "\n"; + } else if (p_line.contains("$pbx_launch_screen_build_reference")) { + strnew += p_line.replace("$pbx_launch_screen_build_reference", "") + "\n"; + + // OS Deployment Target + } else if (p_line.contains("$os_deployment_target")) { + String min_version = p_preset->get("application/min_" + get_platform_name() + "_version"); + String value = "XROS_DEPLOYMENT_TARGET = " + min_version + ";"; + strnew += p_line.replace("$os_deployment_target", value) + "\n"; + + // Valid Archs + } else if (p_line.contains("$valid_archs")) { + strnew += p_line.replace("$valid_archs", "arm64") + "\n"; + + // Apple Embedded common + } else { + strnew += EditorExportPlatformAppleEmbedded::_process_config_file_line(p_preset, p_line, p_config, p_debug, p_code_signing); + } + return strnew; +} diff --git a/platform/visionos/export/export_plugin.h b/platform/visionos/export/export_plugin.h index 39e95af4e49..861a65beeef 100644 --- a/platform/visionos/export/export_plugin.h +++ b/platform/visionos/export/export_plugin.h @@ -47,6 +47,8 @@ class EditorExportPlatformVisionOS : public EditorExportPlatformAppleEmbedded { virtual void get_export_options(List *r_options) const override; + virtual String _process_config_file_line(const Ref &p_preset, const String &p_line, const AppleEmbeddedConfigData &p_config, bool p_debug, const CodeSigningDetails &p_code_signing) override; + public: virtual String get_name() const override { return "visionOS"; } virtual String get_os_name() const override { return "visionOS"; } diff --git a/platform_methods.py b/platform_methods.py index 6a50fb6dc16..5d5f4b60bfa 100644 --- a/platform_methods.py +++ b/platform_methods.py @@ -199,7 +199,7 @@ def generate_bundle_apple_embedded(platform, framework_dir, framework_dir_sim, u dbg_target_bin_sim = lipo(bin_dir + "/" + dbg_prefix, ".simulator" + extra_suffix + ".a") # Assemble Xcode project bundle. app_dir = env.Dir("#bin/" + platform + "_xcode").abspath - templ = env.Dir("#misc/dist/" + platform + "_xcode").abspath + templ = env.Dir("#misc/dist/apple_embedded_xcode").abspath if os.path.exists(app_dir): shutil.rmtree(app_dir) shutil.copytree(templ, app_dir) @@ -226,6 +226,14 @@ def generate_bundle_apple_embedded(platform, framework_dir, framework_dir_sim, u app_dir + "/libgodot." + platform + ".debug.xcframework/" + framework_dir_sim + "/libgodot.a", ) + # Remove other platform xcframeworks + for entry in os.listdir(app_dir): + if entry.startswith("libgodot.") and entry.endswith(".xcframework"): + parts = entry.split(".") + if len(parts) >= 3 and parts[1] != platform: + full_path = os.path.join(app_dir, entry) + shutil.rmtree(full_path) + if use_mkv: mvk_path = detect_mvk(env, "ios-arm64") if mvk_path != "":