Browse Source

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

tags/2021-05-28
jules 13 years ago
parent
commit
fd919e577c
3 changed files with 18 additions and 29 deletions
  1. +13
    -28
      extras/Introjucer/Source/Project/jucer_Project.cpp
  2. +2
    -1
      extras/Introjucer/Source/Project/jucer_Project.h
  3. +3
    -0
      extras/Introjucer/Source/Project/jucer_ProjectInformationComponent.cpp

+ 13
- 28
extras/Introjucer/Source/Project/jucer_Project.cpp 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


+ 2
- 1
extras/Introjucer/Source/Project/jucer_Project.h 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();


+ 3
- 0
extras/Introjucer/Source/Project/jucer_ProjectInformationComponent.cpp 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);


Loading…
Cancel
Save