MCPcopy Create free account
hub / github.com/Redot-Engine/redot-engine / _add_data

Method _add_data

platform/windows/export/export_plugin.cpp:508–541  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

506}
507
508Error 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
543Error EditorExportPlatformWindows::_code_sign(const Ref<EditorExportPreset> &p_preset, const String &p_path) {
544 List<String> args;

Callers

nothing calls this directly

Calls 8

TTRFunction · 0.85
vformatFunction · 0.85
globalize_pathMethod · 0.80
path_joinMethod · 0.80
StringClass · 0.50
getMethod · 0.45
is_emptyMethod · 0.45
get_temp_dirMethod · 0.45

Tested by

no test coverage detected