From 800a68837fd0b2eec7ee68ec12088ef6ae5759e6 Mon Sep 17 00:00:00 2001 From: bruvzg <7645683+bruvzg@users.noreply.github.com> Date: Wed, 4 May 2022 12:57:21 +0300 Subject: Fix export plugins after embedded PCK loading changes. --- platform/windows/export/export_plugin.cpp | 17 ++++++++++------- platform/windows/export/export_plugin.h | 1 + 2 files changed, 11 insertions(+), 7 deletions(-) (limited to 'platform/windows/export') diff --git a/platform/windows/export/export_plugin.cpp b/platform/windows/export/export_plugin.cpp index b4d8ce64b2..7627a3cba3 100644 --- a/platform/windows/export/export_plugin.cpp +++ b/platform/windows/export/export_plugin.cpp @@ -53,21 +53,24 @@ Error EditorExportPlatformWindows::_export_debug_script(const Ref &p_preset, bool p_debug, const String &p_path, int p_flags) { + if (p_preset->get("application/modify_resources")) { + return _rcedit_add_data(p_preset, p_path); + } else { + return OK; + } +} + Error EditorExportPlatformWindows::export_project(const Ref &p_preset, bool p_debug, const String &p_path, int p_flags) { String pck_path = p_path; if (p_preset->get("binary_format/embed_pck")) { pck_path = p_path.get_basename() + ".tmp"; } - Error err = EditorExportPlatformPC::prepare_template(p_preset, p_debug, pck_path, p_flags); - if (p_preset->get("application/modify_resources") && err == OK) { - err = _rcedit_add_data(p_preset, pck_path); - } - if (err == OK) { - err = EditorExportPlatformPC::export_project_data(p_preset, p_debug, pck_path, p_flags); - } + Error err = EditorExportPlatformPC::export_project(p_preset, p_debug, pck_path, p_flags); if (p_preset->get("codesign/enable") && err == OK) { err = _code_sign(p_preset, pck_path); } + if (p_preset->get("binary_format/embed_pck") && err == OK) { Ref tmp_dir = DirAccess::create_for_path(p_path.get_base_dir()); err = tmp_dir->rename(pck_path, p_path); diff --git a/platform/windows/export/export_plugin.h b/platform/windows/export/export_plugin.h index c33c7f1f63..b48ee7c985 100644 --- a/platform/windows/export/export_plugin.h +++ b/platform/windows/export/export_plugin.h @@ -44,6 +44,7 @@ class EditorExportPlatformWindows : public EditorExportPlatformPC { public: virtual Error export_project(const Ref &p_preset, bool p_debug, const String &p_path, int p_flags = 0) override; + virtual Error modify_template(const Ref &p_preset, bool p_debug, const String &p_path, int p_flags) override; virtual Error sign_shared_object(const Ref &p_preset, bool p_debug, const String &p_path) override; virtual List get_binary_extensions(const Ref &p_preset) const override; virtual void get_export_options(List *r_options) override; -- cgit v1.2.3