diff --git a/platform/windows/export/export.cpp b/platform/windows/export/export.cpp index 9bc601bcd1c..7f840d305e5 100644 --- a/platform/windows/export/export.cpp +++ b/platform/windows/export/export.cpp @@ -311,7 +311,7 @@ Error EditorExportPlatformWindows::_code_sign(const Ref &p_p args.push_back(p_path); #ifndef WINDOWS_ENABLED args.push_back("-out"); - args.push_back(p_path); + args.push_back(p_path + "_signed"); #endif String str; @@ -327,6 +327,16 @@ Error EditorExportPlatformWindows::_code_sign(const Ref &p_p return FAILED; } +#ifndef WINDOWS_ENABLED + DirAccessRef tmp_dir = DirAccess::create_for_path(p_path.get_base_dir()); + + err = tmp_dir->remove(p_path); + ERR_FAIL_COND_V(err != OK, err); + + err = tmp_dir->rename(p_path + "_signed", p_path); + ERR_FAIL_COND_V(err != OK, err); +#endif + return OK; }