@@ -1077,14 +1077,15 @@ Error EditorExportPlatformIOS::_copy_asset(const String &p_out_dir, const String
1077
1077
return ERR_FILE_NOT_FOUND;
1078
1078
}
1079
1079
1080
- String base_dir = p_asset.get_base_dir ().replace (" res://" , " " );
1080
+ String base_dir = p_asset.get_base_dir ().replace (" res://" , " " ).replace (" .godot/mono/temp/bin/" , " " );
1081
+ String asset = p_asset.ends_with (" /" ) ? p_asset.left (p_asset.length () - 1 ) : p_asset;
1081
1082
String destination_dir;
1082
1083
String destination;
1083
1084
String asset_path;
1084
1085
1085
1086
bool create_framework = false ;
1086
1087
1087
- if (p_is_framework && p_asset .ends_with (" .dylib" )) {
1088
+ if (p_is_framework && asset .ends_with (" .dylib" )) {
1088
1089
// For iOS we need to turn .dylib into .framework
1089
1090
// to be able to send application to AppStore
1090
1091
asset_path = String (" dylibs" ).path_join (base_dir);
@@ -1103,7 +1104,7 @@ Error EditorExportPlatformIOS::_copy_asset(const String &p_out_dir, const String
1103
1104
destination_dir = p_out_dir.path_join (asset_path);
1104
1105
destination = destination_dir.path_join (file_name);
1105
1106
create_framework = true ;
1106
- } else if (p_is_framework && (p_asset .ends_with (" .framework" ) || p_asset .ends_with (" .xcframework" ))) {
1107
+ } else if (p_is_framework && (asset .ends_with (" .framework" ) || asset .ends_with (" .xcframework" ))) {
1107
1108
asset_path = String (" dylibs" ).path_join (base_dir);
1108
1109
1109
1110
String file_name;
@@ -1147,6 +1148,9 @@ Error EditorExportPlatformIOS::_copy_asset(const String &p_out_dir, const String
1147
1148
if (err) {
1148
1149
return err;
1149
1150
}
1151
+ if (asset_path.ends_with (" /" )) {
1152
+ asset_path = asset_path.left (asset_path.length () - 1 );
1153
+ }
1150
1154
IOSExportAsset exported_asset = { binary_name.path_join (asset_path), p_is_framework, p_should_embed };
1151
1155
r_exported_assets.push_back (exported_asset);
1152
1156
@@ -1213,13 +1217,16 @@ Error EditorExportPlatformIOS::_copy_asset(const String &p_out_dir, const String
1213
1217
Error EditorExportPlatformIOS::_export_additional_assets (const String &p_out_dir, const Vector<String> &p_assets, bool p_is_framework, bool p_should_embed, Vector<IOSExportAsset> &r_exported_assets) {
1214
1218
for (int f_idx = 0 ; f_idx < p_assets.size (); ++f_idx) {
1215
1219
String asset = p_assets[f_idx];
1216
- if (!asset.begins_with (" res://" )) {
1220
+ if (asset.begins_with (" res://" )) {
1221
+ Error err = _copy_asset (p_out_dir, asset, nullptr , p_is_framework, p_should_embed, r_exported_assets);
1222
+ ERR_FAIL_COND_V (err, err);
1223
+ } else if (ProjectSettings::get_singleton ()->localize_path (asset).begins_with (" res://" )) {
1224
+ Error err = _copy_asset (p_out_dir, ProjectSettings::get_singleton ()->localize_path (asset), nullptr , p_is_framework, p_should_embed, r_exported_assets);
1225
+ ERR_FAIL_COND_V (err, err);
1226
+ } else {
1217
1227
// either SDK-builtin or already a part of the export template
1218
1228
IOSExportAsset exported_asset = { asset, p_is_framework, p_should_embed };
1219
1229
r_exported_assets.push_back (exported_asset);
1220
- } else {
1221
- Error err = _copy_asset (p_out_dir, asset, nullptr , p_is_framework, p_should_embed, r_exported_assets);
1222
- ERR_FAIL_COND_V (err, err);
1223
1230
}
1224
1231
}
1225
1232
0 commit comments