1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-11 23:54:18 +00:00

Introjucer: added a warning if you have a plugin project but don't enable the juce_audio_plugin_client module.

This commit is contained in:
jules 2012-06-07 21:41:11 +01:00
parent 5e39e9944a
commit fd919e577c
3 changed files with 18 additions and 29 deletions

View file

@ -201,6 +201,12 @@ void Project::addDefaultModules (bool shouldCopyFilesLocally)
}
}
bool Project::isAudioPluginModuleMissing() const
{
return getProjectType().isAudioPlugin()
&& ! isModuleEnabled ("juce_audio_plugin_client");
}
//==============================================================================
static void registerRecentFile (const File& file)
{
@ -254,17 +260,10 @@ Result Project::saveResourcesOnly (const File& file)
}
//==============================================================================
File Project::lastDocumentOpened;
static File lastDocumentOpened;
File Project::getLastDocumentOpened()
{
return lastDocumentOpened;
}
void Project::setLastDocumentOpened (const File& file)
{
lastDocumentOpened = file;
}
File Project::getLastDocumentOpened() { return lastDocumentOpened; }
void Project::setLastDocumentOpened (const File& file) { lastDocumentOpened = file; }
//==============================================================================
void Project::valueTreePropertyChanged (ValueTree& tree, const Identifier& property)
@ -275,24 +274,10 @@ void Project::valueTreePropertyChanged (ValueTree& tree, const Identifier& prope
changed();
}
void Project::valueTreeChildAdded (ValueTree& parentTree, ValueTree& childWhichHasBeenAdded)
{
changed();
}
void Project::valueTreeChildRemoved (ValueTree& parentTree, ValueTree& childWhichHasBeenRemoved)
{
changed();
}
void Project::valueTreeChildOrderChanged (ValueTree& parentTree)
{
changed();
}
void Project::valueTreeParentChanged (ValueTree& tree)
{
}
void Project::valueTreeChildAdded (ValueTree&, ValueTree&) { changed(); }
void Project::valueTreeChildRemoved (ValueTree&, ValueTree&) { changed(); }
void Project::valueTreeChildOrderChanged (ValueTree&) { changed(); }
void Project::valueTreeParentChanged (ValueTree&) {}
//==============================================================================
File Project::resolveFilename (String filename) const

View file

@ -242,7 +242,9 @@ public:
void removeModule (const String& moduleID);
int getNumModules() const;
String getModuleID (int index) const;
void addDefaultModules (bool shouldCopyFilesLocally);
bool isAudioPluginModuleMissing() const;
void createRequiredModules (const ModuleList& availableModules, OwnedArray<LibraryModule>& modules) const;
@ -265,7 +267,6 @@ public:
private:
friend class Item;
ValueTree projectRoot;
static File lastDocumentOpened;
DrawableImage mainProjectIcon;
void updateProjectSettings();

View file

@ -430,6 +430,9 @@ public:
"This may create problems if some modules expect to share the same parent folder, so you may "
"want to make sure that they are all either copied or not.";
if (project.isAudioPluginModuleMissing())
newName = "Warning! Your project is an audio plugin, but you haven't enabled the 'juce_audio_plugin_client' module!";
if (newName != getName())
{
setName (newName);