예제 #1
0
void EnabledModuleList::addModuleInteractive (const String& moduleID)
{
    ModuleList list;
    list.scanAllKnownFolders (project);

    if (const ModuleDescription* info = list.getModuleWithID (moduleID))
        addModule (info->manifestFile, areMostModulesCopiedLocally());
    else
        addModuleFromUserSelectedFile();
}
예제 #2
0
void EnabledModuleList::addModuleInteractive (const String& moduleID)
{
    ModuleList list;

    list.scanGlobalJuceModulePath();
    if (auto* info = list.getModuleWithID (moduleID))
    {
        addModule (info->moduleFolder, areMostModulesCopiedLocally(), areMostModulesUsingGlobalPath());
        return;
    }

    list.scanGlobalUserModulePath();
    if (auto* info = list.getModuleWithID (moduleID))
    {
        addModule (info->moduleFolder, areMostModulesCopiedLocally(), areMostModulesUsingGlobalPath());
        return;
    }

    list.scanProjectExporterModulePaths (project);
    if (auto* info = list.getModuleWithID (moduleID))
        addModule (info->moduleFolder, areMostModulesCopiedLocally(), false);
    else
        addModuleFromUserSelectedFile();
}
예제 #3
0
void EnabledModuleList::addModuleOfferingToCopy (const File& f)
{
    ModuleDescription m (f);

    if (! m.isValid())
    {
        AlertWindow::showMessageBoxAsync (AlertWindow::InfoIcon,
                                          "Add Module", "This wasn't a valid module folder!");
        return;
    }

    if (isModuleEnabled (m.getID()))
    {
        AlertWindow::showMessageBoxAsync (AlertWindow::InfoIcon,
                                          "Add Module", "The project already contains this module!");
        return;
    }

    addModule (m.moduleFolder, areMostModulesCopiedLocally());
}