| 1106 | } |
| 1107 | |
| 1108 | Error EditorExportPlatform::export_project_files(const Ref<EditorExportPreset> &p_preset, bool p_debug, EditorExportSaveFunction p_save_func, EditorExportRemoveFunction p_remove_func, void *p_udata, EditorExportSaveSharedObject p_so_func) { |
| 1109 | //figure out paths of files that will be exported |
| 1110 | HashSet<String> paths; |
| 1111 | Vector<String> path_remaps; |
| 1112 | |
| 1113 | if (p_preset->get_export_filter() == EditorExportPreset::EXPORT_ALL_RESOURCES) { |
| 1114 | //find stuff |
| 1115 | _export_find_resources(EditorFileSystem::get_singleton()->get_filesystem(), paths); |
| 1116 | } else if (p_preset->get_export_filter() == EditorExportPreset::EXCLUDE_SELECTED_RESOURCES) { |
| 1117 | _export_find_resources(EditorFileSystem::get_singleton()->get_filesystem(), paths); |
| 1118 | Vector<String> files = p_preset->get_files_to_export(); |
| 1119 | for (int i = 0; i < files.size(); i++) { |
| 1120 | paths.erase(files[i]); |
| 1121 | } |
| 1122 | } else if (p_preset->get_export_filter() == EditorExportPreset::EXPORT_CUSTOMIZED) { |
| 1123 | _export_find_customized_resources(p_preset, EditorFileSystem::get_singleton()->get_filesystem(), p_preset->get_file_export_mode("res://"), paths); |
| 1124 | } else { |
| 1125 | bool scenes_only = p_preset->get_export_filter() == EditorExportPreset::EXPORT_SELECTED_SCENES; |
| 1126 | |
| 1127 | Vector<String> files = p_preset->get_files_to_export(); |
| 1128 | for (int i = 0; i < files.size(); i++) { |
| 1129 | if (scenes_only && ResourceLoader::get_resource_type(files[i]) != "PackedScene") { |
| 1130 | continue; |
| 1131 | } |
| 1132 | |
| 1133 | _export_find_dependencies(files[i], paths); |
| 1134 | } |
| 1135 | |
| 1136 | // Add autoload resources and their dependencies |
| 1137 | List<PropertyInfo> props; |
| 1138 | ProjectSettings::get_singleton()->get_property_list(&props); |
| 1139 | |
| 1140 | for (const PropertyInfo &pi : props) { |
| 1141 | if (!pi.name.begins_with("autoload/")) { |
| 1142 | continue; |
| 1143 | } |
| 1144 | |
| 1145 | String autoload_path = get_project_setting(p_preset, pi.name); |
| 1146 | |
| 1147 | if (autoload_path.begins_with("*")) { |
| 1148 | autoload_path = autoload_path.substr(1); |
| 1149 | } |
| 1150 | |
| 1151 | _export_find_dependencies(autoload_path, paths); |
| 1152 | } |
| 1153 | } |
| 1154 | |
| 1155 | //add native icons to non-resource include list |
| 1156 | _edit_filter_list(paths, String("*.icns"), false); |
| 1157 | _edit_filter_list(paths, String("*.ico"), false); |
| 1158 | |
| 1159 | _edit_filter_list(paths, p_preset->get_include_filter(), false); |
| 1160 | _edit_filter_list(paths, p_preset->get_exclude_filter(), true); |
| 1161 | |
| 1162 | // Ignore import files, since these are automatically added to the jar later with the resources |
| 1163 | _edit_filter_list(paths, String("*.import"), true); |
| 1164 | |
| 1165 | // Get encryption filters. |
nothing calls this directly
no test coverage detected