mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-19 01:04:20 +00:00
Introjucer saving optimisations.
This commit is contained in:
parent
e7ca7963f0
commit
d3bcbeef9c
10 changed files with 69 additions and 57 deletions
|
|
@ -716,19 +716,7 @@ bool Project::Item::addFile (const File& file, int insertIndex, const bool shoul
|
|||
else if (file.existsAsFile())
|
||||
{
|
||||
if (! getProject().getMainGroup().findItemForFile (file).isValid())
|
||||
{
|
||||
Item item (getProject(), ValueTree (Tags::file));
|
||||
item.initialiseNodeValues();
|
||||
item.getName() = file.getFileName();
|
||||
item.getShouldCompileValue() = shouldCompile && file.hasFileExtension ("cpp;mm;c;m;cc;cxx;r");
|
||||
item.getShouldAddToResourceValue() = getProject().shouldBeAddedToBinaryResourcesByDefault (file);
|
||||
|
||||
if (canContain (item))
|
||||
{
|
||||
item.setFile (file);
|
||||
addChild (item, insertIndex);
|
||||
}
|
||||
}
|
||||
addFileUnchecked (file, insertIndex, shouldCompile);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -738,6 +726,21 @@ bool Project::Item::addFile (const File& file, int insertIndex, const bool shoul
|
|||
return true;
|
||||
}
|
||||
|
||||
void Project::Item::addFileUnchecked (const File& file, int insertIndex, const bool shouldCompile)
|
||||
{
|
||||
Item item (getProject(), ValueTree (Tags::file));
|
||||
item.initialiseNodeValues();
|
||||
item.getName() = file.getFileName();
|
||||
item.getShouldCompileValue() = shouldCompile && file.hasFileExtension ("cpp;mm;c;m;cc;cxx;r");
|
||||
item.getShouldAddToResourceValue() = getProject().shouldBeAddedToBinaryResourcesByDefault (file);
|
||||
|
||||
if (canContain (item))
|
||||
{
|
||||
item.setFile (file);
|
||||
addChild (item, insertIndex);
|
||||
}
|
||||
}
|
||||
|
||||
bool Project::Item::addRelativeFile (const RelativePath& file, int insertIndex, bool shouldCompile)
|
||||
{
|
||||
Item item (getProject(), ValueTree (Tags::file));
|
||||
|
|
@ -858,6 +861,14 @@ void Project::removeModule (const String& moduleID)
|
|||
modules.removeChild (i, getUndoManagerFor (modules));
|
||||
}
|
||||
|
||||
|
||||
void Project::createRequiredModules (const ModuleList& availableModules, OwnedArray<LibraryModule>& modules) const
|
||||
{
|
||||
for (int i = 0; i < availableModules.modules.size(); ++i)
|
||||
if (isModuleEnabled (availableModules.modules.getUnchecked(i)->uid))
|
||||
modules.add (availableModules.modules.getUnchecked(i)->create());
|
||||
}
|
||||
|
||||
//==============================================================================
|
||||
ValueTree Project::getConfigurations() const
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue