mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
Projucer: Removed old jucerVersion property from .jucer file root and added jucerFormatVersion property for indicating changes to .jucer file format not tied to JUCE version
This commit is contained in:
parent
af968f5d78
commit
91d9679f0b
6 changed files with 31 additions and 24 deletions
|
|
@ -30,6 +30,8 @@
|
|||
static constexpr const char* generatedGroupID = "__jucelibfiles";
|
||||
static constexpr const char* generatedGroupUID = "__generatedcode__";
|
||||
|
||||
constexpr int jucerFormatVersion = 1;
|
||||
|
||||
//==============================================================================
|
||||
ProjectSaver::ProjectSaver (Project& p)
|
||||
: project (p),
|
||||
|
|
@ -294,7 +296,7 @@ Result ProjectSaver::saveProject (ProjectExporter* specifiedExporterToSave)
|
|||
writeProjects (modules, specifiedExporterToSave);
|
||||
runPostExportScript();
|
||||
|
||||
project.writeProjectFile();
|
||||
writeProjectFile();
|
||||
|
||||
if (generatedCodeFolder.exists())
|
||||
{
|
||||
|
|
@ -332,6 +334,25 @@ void ProjectSaver::writePluginDefines (MemoryOutputStream& out) const
|
|||
<< pluginDefines << newLine;
|
||||
}
|
||||
|
||||
void ProjectSaver::writeProjectFile()
|
||||
{
|
||||
auto root = project.getProjectRoot();
|
||||
|
||||
root.removeProperty ("jucerVersion", nullptr);
|
||||
root.setProperty (Ids::jucerFormatVersion, jucerFormatVersion, nullptr);
|
||||
|
||||
project.updateCachedFileState();
|
||||
|
||||
auto newSerialisedXml = project.serialiseProjectXml (root.createXml());
|
||||
jassert (newSerialisedXml.isNotEmpty());
|
||||
|
||||
if (newSerialisedXml != project.getCachedFileStateContent())
|
||||
{
|
||||
project.getFile().replaceWithText (newSerialisedXml);
|
||||
project.updateCachedFileState();
|
||||
}
|
||||
}
|
||||
|
||||
void ProjectSaver::writeAppConfig (MemoryOutputStream& out, const OwnedArray<LibraryModule>& modules, const String& userContent)
|
||||
{
|
||||
if (! project.shouldUseAppConfig())
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue