Skip to content

Commit

Permalink
Merge pull request #78641 from phil-hudson/feat/ios_skip_ipa_export
Browse files Browse the repository at this point in the history
iOS: Add `export_project_only` flag
  • Loading branch information
YuriSizov authored Jul 17, 2023
2 parents f880892 + 076ef3b commit cb7730c
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 3 deletions.
3 changes: 3 additions & 0 deletions platform/ios/doc_classes/EditorExportPlatformIOS.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@
<member name="application/export_method_release" type="int" setter="" getter="">
Application distribution target (release export).
</member>
<member name="application/export_project_only" type="bool" setter="" getter="">
If [code]true[/code], exports iOS project files without building an XCArchive or [code].ipa[/code] file. If [code]false[/code], exports iOS project files and builds an XCArchive and [code].ipa[/code] file at the same time. When combining Godot with Fastlane or other build pipelines, you may want to set this to [code]true[/code].
</member>
<member name="application/icon_interpolation" type="int" setter="" getter="">
Interpolation method used to resize application icon.
</member>
Expand Down
10 changes: 9 additions & 1 deletion platform/ios/export/export_plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,8 @@ void EditorExportPlatformIOS::get_export_options(List<ExportOption> *r_options)
r_options->push_back(ExportOption(PropertyInfo(Variant::INT, "application/icon_interpolation", PROPERTY_HINT_ENUM, "Nearest neighbor,Bilinear,Cubic,Trilinear,Lanczos"), 4));
r_options->push_back(ExportOption(PropertyInfo(Variant::INT, "application/launch_screens_interpolation", PROPERTY_HINT_ENUM, "Nearest neighbor,Bilinear,Cubic,Trilinear,Lanczos"), 4));

r_options->push_back(ExportOption(PropertyInfo(Variant::BOOL, "application/export_project_only"), false));

Vector<PluginConfigIOS> found_plugins = get_plugins();
for (int i = 0; i < found_plugins.size(); i++) {
r_options->push_back(ExportOption(PropertyInfo(Variant::BOOL, vformat("%s/%s", PNAME("plugins"), found_plugins[i].name)), false));
Expand Down Expand Up @@ -1489,7 +1491,9 @@ Error EditorExportPlatformIOS::_export_project_helper(const Ref<EditorExportPres
String dest_dir = p_path.get_base_dir() + "/";
String binary_name = p_path.get_file().get_basename();

EditorProgress ep("export", "Exporting for iOS", 5, true);
bool export_project_only = p_preset->get("application/export_project_only");

EditorProgress ep("export", export_project_only ? TTR("Exporting for iOS (Project Files Only)") : TTR("Exporting for iOS"), export_project_only ? 2 : 5, true);

String team_id = p_preset->get("application/app_store_team_id");
ERR_FAIL_COND_V_MSG(team_id.length() == 0, ERR_CANT_OPEN, "App Store Team ID not specified - cannot configure the project.");
Expand Down Expand Up @@ -1851,6 +1855,10 @@ Error EditorExportPlatformIOS::_export_project_helper(const Ref<EditorExportPres
}
}

if (export_project_only) {
return OK;
}

if (ep.step("Making .xcarchive", 3)) {
return ERR_SKIP;
}
Expand Down
2 changes: 1 addition & 1 deletion platform/macos/export/export_plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1361,7 +1361,7 @@ Error EditorExportPlatformMacOS::export_project(const Ref<EditorExportPreset> &p

String src_pkg_name;

EditorProgress ep("export", "Exporting for macOS", 3, true);
EditorProgress ep("export", TTR("Exporting for macOS"), 3, true);

if (p_debug) {
src_pkg_name = p_preset->get("custom_template/debug");
Expand Down
2 changes: 1 addition & 1 deletion platform/uwp/export/export_plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ Error EditorExportPlatformUWP::export_project(const Ref<EditorExportPreset> &p_p

String src_appx;

EditorProgress ep("export", "Exporting for UWP", 7, true);
EditorProgress ep("export", TTR("Exporting for UWP"), 7, true);

if (p_debug) {
src_appx = p_preset->get("custom_template/debug");
Expand Down

0 comments on commit cb7730c

Please sign in to comment.