| 506 | } |
| 507 | |
| 508 | Error EditorExportPlatformWindows::_add_data(const Ref<EditorExportPreset> &p_preset, const String &p_path, bool p_console_icon) { |
| 509 | String icon_path; |
| 510 | if (p_preset->get("application/icon") != "") { |
| 511 | icon_path = p_preset->get("application/icon"); |
| 512 | } else if (get_project_setting(p_preset, "application/config/windows_native_icon") != "") { |
| 513 | icon_path = get_project_setting(p_preset, "application/config/windows_native_icon"); |
| 514 | } else { |
| 515 | icon_path = get_project_setting(p_preset, "application/config/icon"); |
| 516 | } |
| 517 | icon_path = ProjectSettings::get_singleton()->globalize_path(icon_path); |
| 518 | |
| 519 | if (p_console_icon) { |
| 520 | String console_icon_path = ProjectSettings::get_singleton()->globalize_path(p_preset->get("application/console_wrapper_icon")); |
| 521 | if (!console_icon_path.is_empty() && FileAccess::exists(console_icon_path)) { |
| 522 | icon_path = console_icon_path; |
| 523 | } |
| 524 | } |
| 525 | |
| 526 | String tmp_icon_path = EditorPaths::get_singleton()->get_temp_dir().path_join("_tmp.ico"); |
| 527 | if (!icon_path.is_empty()) { |
| 528 | if (_process_icon(p_preset, icon_path, tmp_icon_path) != OK) { |
| 529 | add_message(EXPORT_MESSAGE_WARNING, TTR("Resources Modification"), vformat(TTR("Invalid icon file \"%s\"."), icon_path)); |
| 530 | icon_path = String(); |
| 531 | } |
| 532 | } |
| 533 | |
| 534 | TemplateModifier::modify(p_preset, p_path, tmp_icon_path); |
| 535 | |
| 536 | if (FileAccess::exists(tmp_icon_path)) { |
| 537 | DirAccess::remove_file_or_error(tmp_icon_path); |
| 538 | } |
| 539 | |
| 540 | return OK; |
| 541 | } |
| 542 | |
| 543 | Error EditorExportPlatformWindows::_code_sign(const Ref<EditorExportPreset> &p_preset, const String &p_path) { |
| 544 | List<String> args; |
nothing calls this directly
no test coverage detected