| 2258 | } |
| 2259 | |
| 2260 | String ImportExporterReport::get_report_string() { |
| 2261 | String report; |
| 2262 | report += get_totals_string(); |
| 2263 | report += "-------------\n" + String("\n"); |
| 2264 | if (!opt_lossy) { |
| 2265 | auto lossy_imports = _get_lossy_imports(); |
| 2266 | report += "\nThe following files were not converted from a lossy import." + String("\n"); |
| 2267 | report += get_failed_section_string(lossy_imports); |
| 2268 | } |
| 2269 | if (failed_plugin_cfg_create.size() > 0) { |
| 2270 | report += "------\n"; |
| 2271 | report += "\nThe following plugins failed to have their plugin.cfg regenerated:" + String("\n"); |
| 2272 | for (int i = 0; i < failed_plugin_cfg_create.size(); i++) { |
| 2273 | report += failed_plugin_cfg_create[i] + String("\n"); |
| 2274 | } |
| 2275 | } |
| 2276 | |
| 2277 | if (failed_gdnative_copy.size() > 0) { |
| 2278 | report += "------\n"; |
| 2279 | report += "\nThe following native plugins failed to have their libraries copied:" + String("\n"); |
| 2280 | for (int i = 0; i < failed_gdnative_copy.size(); i++) { |
| 2281 | report += failed_gdnative_copy[i] + String("\n"); |
| 2282 | } |
| 2283 | } |
| 2284 | // we skip this for version 2 because we have to rewrite the metadata for nearly all the converted resources |
| 2285 | // if (rewrote_metadata.size() > 0 && ver->get_major() != 2) { |
| 2286 | // report += "------\n"; |
| 2287 | // report += "\nThe following files had their import data rewritten:" + String("\n"); |
| 2288 | // report += get_to_string(rewrote_metadata); |
| 2289 | // } |
| 2290 | auto failed_rewrite_md = _get_failed_rewrite_md(); |
| 2291 | if (failed_rewrite_md.size() > 0) { |
| 2292 | report += "------\n"; |
| 2293 | report += "\nThe following files were converted and saved to a non-original path, but did not have their import data rewritten." + String("\n"); |
| 2294 | report += "These files will not be re-imported when loading the project." + String("\n"); |
| 2295 | report += get_to_string(failed_rewrite_md); |
| 2296 | } |
| 2297 | if (not_converted.size() > 0) { |
| 2298 | report += "------\n"; |
| 2299 | report += "\nThe following files were not converted because support has not been implemented yet:" + String("\n"); |
| 2300 | for (auto &info : not_converted) { |
| 2301 | String unsupported_format_type = info->get_unsupported_format_type(); |
| 2302 | if (unsupported_format_type.is_empty()) { |
| 2303 | unsupported_format_type = info->get_path().get_extension(); |
| 2304 | } |
| 2305 | report += info->get_path() + " ( importer: " + info->get_import_info()->get_importer() + ", type: " + info->get_import_info()->get_type() + ", format: " + unsupported_format_type + ") to " + info->get_new_source_path().get_file() + String("\n"); |
| 2306 | } |
| 2307 | } |
| 2308 | if (failed.size() > 0) { |
| 2309 | String failed_report = "------\n"; |
| 2310 | failed_report += "\nFailed conversions:" + String("\n"); |
| 2311 | int count = 0; |
| 2312 | for (auto &fail : failed) { |
| 2313 | if (fail->get_exporter() == GDExtensionExporter::EXPORTER_NAME) { |
| 2314 | continue; |
| 2315 | } |
| 2316 | count++; |
| 2317 | failed_report += vformat("* %s\n", fail->get_source_path()); |
no test coverage detected