From 6dbcfbf6e577609bd3ba2f663edd390798ee11e1 Mon Sep 17 00:00:00 2001 From: ed Date: Tue, 17 Apr 2018 09:07:50 +0100 Subject: [PATCH] Projucer: Write AppConfig.h file once and ensure that it is only rewritten if it has actually changed --- .../Source/ProjectSaving/jucer_ProjectSaver.h | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/extras/Projucer/Source/ProjectSaving/jucer_ProjectSaver.h b/extras/Projucer/Source/ProjectSaving/jucer_ProjectSaver.h index 306ad322d7..2d028fc65f 100644 --- a/extras/Projucer/Source/ProjectSaving/jucer_ProjectSaver.h +++ b/extras/Projucer/Source/ProjectSaving/jucer_ProjectSaver.h @@ -93,17 +93,15 @@ public: auto projectRootHash = project.getProjectRoot().toXmlString().hashCode(); + if (project.getProjectType().isAudioPlugin()) + writePluginCharacteristicsFile(); + writeAppConfigFile (modules, appConfigUserContent); writeBinaryDataFiles(); writeAppHeader (modules); writeModuleCppWrappers (modules); writeProjects (modules, specifiedExporterToSave, ! showProgressBox); - if (project.getProjectType().isAudioPlugin()) - writePluginCharacteristicsFile(); - - writeAppConfigFile (modules, appConfigUserContent); // (this is repeated in case the projects added anything to it) - // if the project root has changed after writing the other files then re-save it if (project.getProjectRoot().toXmlString().hashCode() != projectRootHash) { @@ -151,17 +149,14 @@ public: if (errors.size() == 0) { + if (project.getProjectType().isAudioPlugin()) + writePluginCharacteristicsFile(); + writeAppConfigFile (modules, loadUserContentFromAppConfig()); writeBinaryDataFiles(); writeAppHeader (modules); writeModuleCppWrappers (modules); - if (project.getProjectType().isAudioPlugin()) - { - writePluginCharacteristicsFile(); - writeAppConfigFile (modules, loadUserContentFromAppConfig()); - } - return Result::ok(); }