[3.x] Fix export plugins after embedded PCK loading changes.
This commit is contained in:
parent
40cec55963
commit
0be7de6e11
3 changed files with 16 additions and 11 deletions
|
@ -1626,6 +1626,9 @@ Error EditorExportPlatformPC::export_project(const Ref<EditorExportPreset> &p_pr
|
||||||
ExportNotifier notifier(*this, p_preset, p_debug, p_path, p_flags);
|
ExportNotifier notifier(*this, p_preset, p_debug, p_path, p_flags);
|
||||||
|
|
||||||
Error err = prepare_template(p_preset, p_debug, p_path, p_flags);
|
Error err = prepare_template(p_preset, p_debug, p_path, p_flags);
|
||||||
|
if (err == OK) {
|
||||||
|
err = modify_template(p_preset, p_debug, p_path, p_flags);
|
||||||
|
}
|
||||||
if (err == OK) {
|
if (err == OK) {
|
||||||
err = export_project_data(p_preset, p_debug, p_path, p_flags);
|
err = export_project_data(p_preset, p_debug, p_path, p_flags);
|
||||||
}
|
}
|
||||||
|
|
|
@ -434,8 +434,9 @@ public:
|
||||||
virtual Error export_project(const Ref<EditorExportPreset> &p_preset, bool p_debug, const String &p_path, int p_flags = 0);
|
virtual Error export_project(const Ref<EditorExportPreset> &p_preset, bool p_debug, const String &p_path, int p_flags = 0);
|
||||||
virtual Error sign_shared_object(const Ref<EditorExportPreset> &p_preset, bool p_debug, const String &p_path);
|
virtual Error sign_shared_object(const Ref<EditorExportPreset> &p_preset, bool p_debug, const String &p_path);
|
||||||
|
|
||||||
Error prepare_template(const Ref<EditorExportPreset> &p_preset, bool p_debug, const String &p_path, int p_flags);
|
virtual Error prepare_template(const Ref<EditorExportPreset> &p_preset, bool p_debug, const String &p_path, int p_flags);
|
||||||
Error export_project_data(const Ref<EditorExportPreset> &p_preset, bool p_debug, const String &p_path, int p_flags);
|
virtual Error modify_template(const Ref<EditorExportPreset> &p_preset, bool p_debug, const String &p_path, int p_flags) { return OK; }
|
||||||
|
virtual Error export_project_data(const Ref<EditorExportPreset> &p_preset, bool p_debug, const String &p_path, int p_flags);
|
||||||
|
|
||||||
void set_extension(const String &p_extension, const String &p_feature_key = "default");
|
void set_extension(const String &p_extension, const String &p_feature_key = "default");
|
||||||
void set_name(const String &p_name);
|
void set_name(const String &p_name);
|
||||||
|
|
|
@ -46,6 +46,7 @@ class EditorExportPlatformWindows : public EditorExportPlatformPC {
|
||||||
public:
|
public:
|
||||||
virtual Error export_project(const Ref<EditorExportPreset> &p_preset, bool p_debug, const String &p_path, int p_flags = 0);
|
virtual Error export_project(const Ref<EditorExportPreset> &p_preset, bool p_debug, const String &p_path, int p_flags = 0);
|
||||||
virtual Error sign_shared_object(const Ref<EditorExportPreset> &p_preset, bool p_debug, const String &p_path);
|
virtual Error sign_shared_object(const Ref<EditorExportPreset> &p_preset, bool p_debug, const String &p_path);
|
||||||
|
virtual Error modify_template(const Ref<EditorExportPreset> &p_preset, bool p_debug, const String &p_path, int p_flags);
|
||||||
virtual void get_export_options(List<ExportOption> *r_options);
|
virtual void get_export_options(List<ExportOption> *r_options);
|
||||||
virtual bool get_option_visibility(const String &p_option, const Map<StringName, Variant> &p_options) const;
|
virtual bool get_option_visibility(const String &p_option, const Map<StringName, Variant> &p_options) const;
|
||||||
virtual bool can_export(const Ref<EditorExportPreset> &p_preset, String &r_error, bool &r_missing_templates) const;
|
virtual bool can_export(const Ref<EditorExportPreset> &p_preset, String &r_error, bool &r_missing_templates) const;
|
||||||
|
@ -59,21 +60,21 @@ Error EditorExportPlatformWindows::sign_shared_object(const Ref<EditorExportPres
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Error EditorExportPlatformWindows::modify_template(const Ref<EditorExportPreset> &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<EditorExportPreset> &p_preset, bool p_debug, const String &p_path, int p_flags) {
|
Error EditorExportPlatformWindows::export_project(const Ref<EditorExportPreset> &p_preset, bool p_debug, const String &p_path, int p_flags) {
|
||||||
String pck_path = p_path;
|
String pck_path = p_path;
|
||||||
if (p_preset->get("binary_format/embed_pck")) {
|
if (p_preset->get("binary_format/embed_pck")) {
|
||||||
pck_path = p_path.get_basename() + ".tmp";
|
pck_path = p_path.get_basename() + ".tmp";
|
||||||
}
|
}
|
||||||
|
|
||||||
Error err = EditorExportPlatformPC::prepare_template(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("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);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (p_preset->get("codesign/enable") && err == OK) {
|
if (p_preset->get("codesign/enable") && err == OK) {
|
||||||
err = _code_sign(p_preset, pck_path);
|
err = _code_sign(p_preset, pck_path);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue