The JUCE cross-platform C++ framework, with DISTRHO/KXStudio specific changes
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

719 lines
26KB

  1. /*
  2. ==============================================================================
  3. This file is part of the JUCE library.
  4. Copyright (c) 2017 - ROLI Ltd.
  5. JUCE is an open source library subject to commercial or open-source
  6. licensing.
  7. By using JUCE, you agree to the terms of both the JUCE 5 End-User License
  8. Agreement and JUCE 5 Privacy Policy (both updated and effective as of the
  9. 27th April 2017).
  10. End User License Agreement: www.juce.com/juce-5-licence
  11. Privacy Policy: www.juce.com/juce-5-privacy-policy
  12. Or: You may also use this code under the terms of the GPL v3 (see
  13. www.gnu.org/licenses).
  14. JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER
  15. EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE
  16. DISCLAIMED.
  17. ==============================================================================
  18. */
  19. #pragma once
  20. #include "jucer_ResourceFile.h"
  21. #include "../Project/jucer_Module.h"
  22. #include "jucer_ProjectExporter.h"
  23. //==============================================================================
  24. class ProjectSaver
  25. {
  26. public:
  27. ProjectSaver (Project& p, const File& file)
  28. : project (p),
  29. projectFile (file),
  30. generatedCodeFolder (project.getGeneratedCodeFolder()),
  31. generatedFilesGroup (Project::Item::createGroup (project, getJuceCodeGroupName(), "__generatedcode__", true)),
  32. hasBinaryData (false)
  33. {
  34. generatedFilesGroup.setID (getGeneratedGroupID());
  35. }
  36. struct SaveThread : public ThreadWithProgressWindow
  37. {
  38. public:
  39. SaveThread (ProjectSaver& ps)
  40. : ThreadWithProgressWindow ("Saving...", true, false),
  41. saver (ps), result (Result::ok())
  42. {}
  43. void run() override
  44. {
  45. setProgress (-1);
  46. result = saver.save (false);
  47. }
  48. ProjectSaver& saver;
  49. Result result;
  50. JUCE_DECLARE_NON_COPYABLE (SaveThread)
  51. };
  52. Result save (bool showProgressBox)
  53. {
  54. if (showProgressBox)
  55. {
  56. SaveThread thread (*this);
  57. thread.runThread();
  58. return thread.result;
  59. }
  60. const String appConfigUserContent (loadUserContentFromAppConfig());
  61. const File oldFile (project.getFile());
  62. project.setFile (projectFile);
  63. writeMainProjectFile();
  64. OwnedArray<LibraryModule> modules;
  65. project.getModules().createRequiredModules (modules);
  66. checkModuleValidity (modules);
  67. if (errors.size() == 0) writeAppConfigFile (modules, appConfigUserContent);
  68. if (errors.size() == 0) writeBinaryDataFiles();
  69. if (errors.size() == 0) writeAppHeader (modules);
  70. if (errors.size() == 0) writeModuleCppWrappers (modules);
  71. if (errors.size() == 0) writeProjects (modules);
  72. if (errors.size() == 0) writeAppConfigFile (modules, appConfigUserContent); // (this is repeated in case the projects added anything to it)
  73. if (errors.size() == 0 && generatedCodeFolder.exists())
  74. writeReadmeFile();
  75. if (generatedCodeFolder.exists())
  76. deleteUnwantedFilesIn (generatedCodeFolder);
  77. if (errors.size() > 0)
  78. {
  79. project.setFile (oldFile);
  80. return Result::fail (errors[0]);
  81. }
  82. project.updateModificationTime();
  83. return Result::ok();
  84. }
  85. Result saveResourcesOnly()
  86. {
  87. writeBinaryDataFiles();
  88. if (errors.size() > 0)
  89. return Result::fail (errors[0]);
  90. return Result::ok();
  91. }
  92. Project::Item saveGeneratedFile (const String& filePath, const MemoryOutputStream& newData)
  93. {
  94. if (! generatedCodeFolder.createDirectory())
  95. {
  96. addError ("Couldn't create folder: " + generatedCodeFolder.getFullPathName());
  97. return Project::Item (project, ValueTree(), false);
  98. }
  99. const File file (generatedCodeFolder.getChildFile (filePath));
  100. if (replaceFileIfDifferent (file, newData))
  101. return addFileToGeneratedGroup (file);
  102. return Project::Item (project, ValueTree(), true);
  103. }
  104. Project::Item addFileToGeneratedGroup (const File& file)
  105. {
  106. Project::Item item (generatedFilesGroup.findItemForFile (file));
  107. if (item.isValid())
  108. return item;
  109. generatedFilesGroup.addFileAtIndex (file, -1, true);
  110. return generatedFilesGroup.findItemForFile (file);
  111. }
  112. void setExtraAppConfigFileContent (const String& content)
  113. {
  114. extraAppConfigContent = content;
  115. }
  116. static void writeAutoGenWarningComment (OutputStream& out)
  117. {
  118. out << "/*" << newLine << newLine
  119. << " IMPORTANT! This file is auto-generated each time you save your" << newLine
  120. << " project - if you alter its contents, your changes may be overwritten!" << newLine
  121. << newLine;
  122. }
  123. static const char* getGeneratedGroupID() noexcept { return "__jucelibfiles"; }
  124. Project::Item& getGeneratedCodeGroup() { return generatedFilesGroup; }
  125. static String getJuceCodeGroupName() { return "Juce Library Code"; }
  126. File getGeneratedCodeFolder() const { return generatedCodeFolder; }
  127. bool replaceFileIfDifferent (const File& f, const MemoryOutputStream& newData)
  128. {
  129. filesCreated.add (f);
  130. if (! FileHelpers::overwriteFileWithNewDataIfDifferent (f, newData))
  131. {
  132. addError ("Can't write to file: " + f.getFullPathName());
  133. return false;
  134. }
  135. return true;
  136. }
  137. static bool shouldFolderBeIgnoredWhenCopying (const File& f)
  138. {
  139. return f.getFileName() == ".git" || f.getFileName() == ".svn" || f.getFileName() == ".cvs";
  140. }
  141. bool copyFolder (const File& source, const File& dest)
  142. {
  143. if (source.isDirectory() && dest.createDirectory())
  144. {
  145. Array<File> subFiles;
  146. source.findChildFiles (subFiles, File::findFiles, false);
  147. for (int i = 0; i < subFiles.size(); ++i)
  148. {
  149. const File f (subFiles.getReference(i));
  150. const File target (dest.getChildFile (f.getFileName()));
  151. filesCreated.add (target);
  152. if (! f.copyFileTo (target))
  153. return false;
  154. }
  155. Array<File> subFolders;
  156. source.findChildFiles (subFolders, File::findDirectories, false);
  157. for (int i = 0; i < subFolders.size(); ++i)
  158. {
  159. const File f (subFolders.getReference(i));
  160. if (! shouldFolderBeIgnoredWhenCopying (f))
  161. if (! copyFolder (f, dest.getChildFile (f.getFileName())))
  162. return false;
  163. }
  164. return true;
  165. }
  166. return false;
  167. }
  168. Project& project;
  169. SortedSet<File> filesCreated;
  170. private:
  171. const File projectFile, generatedCodeFolder;
  172. Project::Item generatedFilesGroup;
  173. String extraAppConfigContent;
  174. StringArray errors;
  175. CriticalSection errorLock;
  176. File appConfigFile;
  177. bool hasBinaryData;
  178. // Recursively clears out any files in a folder that we didn't create, but avoids
  179. // any folders containing hidden files that might be used by version-control systems.
  180. bool deleteUnwantedFilesIn (const File& parent)
  181. {
  182. bool folderIsNowEmpty = true;
  183. DirectoryIterator i (parent, false, "*", File::findFilesAndDirectories);
  184. Array<File> filesToDelete;
  185. bool isFolder;
  186. while (i.next (&isFolder, nullptr, nullptr, nullptr, nullptr, nullptr))
  187. {
  188. const File f (i.getFile());
  189. if (filesCreated.contains (f) || shouldFileBeKept (f.getFileName()))
  190. {
  191. folderIsNowEmpty = false;
  192. }
  193. else if (isFolder)
  194. {
  195. if (deleteUnwantedFilesIn (f))
  196. filesToDelete.add (f);
  197. else
  198. folderIsNowEmpty = false;
  199. }
  200. else
  201. {
  202. filesToDelete.add (f);
  203. }
  204. }
  205. for (int j = filesToDelete.size(); --j >= 0;)
  206. filesToDelete.getReference(j).deleteRecursively();
  207. return folderIsNowEmpty;
  208. }
  209. static bool shouldFileBeKept (const String& filename)
  210. {
  211. static const char* filesToKeep[] = { ".svn", ".cvs", "CMakeLists.txt" };
  212. for (int i = 0; i < numElementsInArray (filesToKeep); ++i)
  213. if (filename == filesToKeep[i])
  214. return true;
  215. return false;
  216. }
  217. void writeMainProjectFile()
  218. {
  219. ScopedPointer<XmlElement> xml (project.getProjectRoot().createXml());
  220. jassert (xml != nullptr);
  221. if (xml != nullptr)
  222. {
  223. MemoryOutputStream mo;
  224. xml->writeToStream (mo, String());
  225. replaceFileIfDifferent (projectFile, mo);
  226. }
  227. }
  228. static int findLongestModuleName (const OwnedArray<LibraryModule>& modules)
  229. {
  230. int longest = 0;
  231. for (int i = modules.size(); --i >= 0;)
  232. longest = jmax (longest, modules.getUnchecked(i)->getID().length());
  233. return longest;
  234. }
  235. File getAppConfigFile() const { return generatedCodeFolder.getChildFile (project.getAppConfigFilename()); }
  236. String loadUserContentFromAppConfig() const
  237. {
  238. StringArray lines, userContent;
  239. lines.addLines (getAppConfigFile().loadFileAsString());
  240. bool foundCodeSection = false;
  241. for (int i = 0; i < lines.size(); ++i)
  242. {
  243. if (lines[i].contains ("[BEGIN_USER_CODE_SECTION]"))
  244. {
  245. for (int j = i + 1; j < lines.size() && ! lines[j].contains ("[END_USER_CODE_SECTION]"); ++j)
  246. userContent.add (lines[j]);
  247. foundCodeSection = true;
  248. break;
  249. }
  250. }
  251. if (! foundCodeSection)
  252. {
  253. userContent.add (String());
  254. userContent.add ("// (You can add your own code in this section, and the Projucer will not overwrite it)");
  255. userContent.add (String());
  256. }
  257. return userContent.joinIntoString (newLine) + newLine;
  258. }
  259. void checkModuleValidity (OwnedArray<LibraryModule>& modules)
  260. {
  261. for (LibraryModule** moduleIter = modules.begin(); moduleIter != modules.end(); ++moduleIter)
  262. {
  263. if (const LibraryModule* const module = *moduleIter)
  264. {
  265. if (! module->isValid())
  266. {
  267. addError ("At least one of your JUCE module paths is invalid!\n"
  268. "Please go to Config -> Modules and ensure each path points to the correct JUCE modules folder.");
  269. return;
  270. }
  271. }
  272. else
  273. {
  274. // this should never happen!
  275. jassertfalse;
  276. }
  277. }
  278. }
  279. void writeAppConfig (MemoryOutputStream& out, const OwnedArray<LibraryModule>& modules, const String& userContent)
  280. {
  281. writeAutoGenWarningComment (out);
  282. out << " There's a section below where you can add your own custom code safely, and the" << newLine
  283. << " Projucer will preserve the contents of that block, but the best way to change" << newLine
  284. << " any of these definitions is by using the Projucer's project settings." << newLine
  285. << newLine
  286. << " Any commented-out settings will assume their default values." << newLine
  287. << newLine
  288. << "*/" << newLine
  289. << newLine;
  290. out << "#pragma once" << newLine
  291. << newLine
  292. << "//==============================================================================" << newLine
  293. << "// [BEGIN_USER_CODE_SECTION]" << newLine
  294. << userContent
  295. << "// [END_USER_CODE_SECTION]" << newLine;
  296. out << newLine
  297. << "/*" << newLine
  298. << " ==============================================================================" << newLine
  299. << newLine
  300. << " In accordance with the terms of the JUCE 5 End-Use License Agreement, the" << newLine
  301. << " JUCE Code in SECTION A cannot be removed, changed or otherwise rendered" << newLine
  302. << " ineffective unless you have a JUCE Indie or Pro license, or are using JUCE" << newLine
  303. << " under the GPL v3 license." << newLine
  304. << newLine
  305. << " End User License Agreement: www.juce.com/juce-5-licence" << newLine
  306. << " ==============================================================================" << newLine
  307. << "*/" << newLine
  308. << newLine
  309. << "// BEGIN SECTION A" << newLine
  310. << newLine
  311. << "#define JUCE_DISPLAY_SPLASH_SCREEN " << (project.shouldDisplaySplashScreen().getValue() ? "1" : "0") << newLine
  312. << "#define JUCE_REPORT_APP_USAGE " << (project.shouldReportAppUsage().getValue() ? "1" : "0") << newLine
  313. << newLine
  314. << "// END SECTION A" << newLine
  315. << newLine
  316. << "#define JUCE_USE_DARK_SPLASH_SCREEN " << (project.splashScreenColour().toString() == "Dark" ? "1" : "0") << newLine;
  317. out << newLine
  318. << "//==============================================================================" << newLine;
  319. const int longestName = findLongestModuleName (modules);
  320. for (int k = 0; k < modules.size(); ++k)
  321. {
  322. LibraryModule* const m = modules.getUnchecked(k);
  323. out << "#define JUCE_MODULE_AVAILABLE_" << m->getID()
  324. << String::repeatedString (" ", longestName + 5 - m->getID().length()) << " 1" << newLine;
  325. }
  326. out << newLine;
  327. {
  328. int isStandaloneApplication = 1;
  329. const ProjectType& type = project.getProjectType();
  330. if (type.isAudioPlugin() || type.isDynamicLibrary())
  331. isStandaloneApplication = 0;
  332. // Fabian TODO
  333. out << "//==============================================================================" << newLine
  334. << "#ifndef JUCE_STANDALONE_APPLICATION" << newLine
  335. << " #if defined(JucePlugin_Name) && defined(JucePlugin_Build_Standalone)" << newLine
  336. << " #define JUCE_STANDALONE_APPLICATION JucePlugin_Build_Standalone" << newLine
  337. << " #else" << newLine
  338. << " #define JUCE_STANDALONE_APPLICATION " << isStandaloneApplication << newLine
  339. << " #endif" << newLine
  340. << "#endif" << newLine
  341. << newLine
  342. << "#define JUCE_GLOBAL_MODULE_SETTINGS_INCLUDED 1" << newLine;
  343. }
  344. for (int j = 0; j < modules.size(); ++j)
  345. {
  346. LibraryModule* const m = modules.getUnchecked(j);
  347. OwnedArray<Project::ConfigFlag> flags;
  348. m->getConfigFlags (project, flags);
  349. if (flags.size() > 0)
  350. {
  351. out << newLine
  352. << "//==============================================================================" << newLine
  353. << "// " << m->getID() << " flags:" << newLine;
  354. for (int i = 0; i < flags.size(); ++i)
  355. {
  356. flags.getUnchecked(i)->value.referTo (project.getConfigFlag (flags.getUnchecked(i)->symbol));
  357. const Project::ConfigFlag* const f = flags[i];
  358. const String value (project.getConfigFlag (f->symbol).toString());
  359. out << newLine
  360. << "#ifndef " << f->symbol << newLine;
  361. if (value == Project::configFlagEnabled)
  362. out << " #define " << f->symbol << " 1";
  363. else if (value == Project::configFlagDisabled)
  364. out << " #define " << f->symbol << " 0";
  365. else if (f->defaultValue.isEmpty())
  366. out << " //#define " << f->symbol;
  367. else
  368. out << " #define " << f->symbol << " " << f->defaultValue;
  369. out << newLine
  370. << "#endif" << newLine;
  371. }
  372. }
  373. }
  374. if (extraAppConfigContent.isNotEmpty())
  375. out << newLine << extraAppConfigContent.trimEnd() << newLine;
  376. }
  377. void writeAppConfigFile (const OwnedArray<LibraryModule>& modules, const String& userContent)
  378. {
  379. appConfigFile = getAppConfigFile();
  380. MemoryOutputStream mem;
  381. writeAppConfig (mem, modules, userContent);
  382. saveGeneratedFile (project.getAppConfigFilename(), mem);
  383. }
  384. void writeAppHeader (MemoryOutputStream& out, const OwnedArray<LibraryModule>& modules)
  385. {
  386. writeAutoGenWarningComment (out);
  387. out << " This is the header file that your files should include in order to get all the" << newLine
  388. << " JUCE library headers. You should avoid including the JUCE headers directly in" << newLine
  389. << " your own source files, because that wouldn't pick up the correct configuration" << newLine
  390. << " options for your app." << newLine
  391. << newLine
  392. << "*/" << newLine << newLine;
  393. out << "#pragma once" << newLine << newLine;
  394. if (appConfigFile.exists())
  395. out << CodeHelpers::createIncludeStatement (project.getAppConfigFilename()) << newLine;
  396. if (modules.size() > 0)
  397. {
  398. out << newLine;
  399. for (int i = 0; i < modules.size(); ++i)
  400. modules.getUnchecked(i)->writeIncludes (*this, out);
  401. out << newLine;
  402. }
  403. if (hasBinaryData && project.shouldIncludeBinaryInAppConfig().getValue())
  404. out << CodeHelpers::createIncludeStatement (project.getBinaryDataHeaderFile(), appConfigFile) << newLine;
  405. out << newLine
  406. << "#if ! DONT_SET_USING_JUCE_NAMESPACE" << newLine
  407. << " // If your code uses a lot of JUCE classes, then this will obviously save you" << newLine
  408. << " // a lot of typing, but can be disabled by setting DONT_SET_USING_JUCE_NAMESPACE." << newLine
  409. << " using namespace juce;" << newLine
  410. << "#endif" << newLine
  411. << newLine
  412. << "#if ! JUCE_DONT_DECLARE_PROJECTINFO" << newLine
  413. << "namespace ProjectInfo" << newLine
  414. << "{" << newLine
  415. << " const char* const projectName = " << CppTokeniserFunctions::addEscapeChars (project.getTitle()).quoted() << ";" << newLine
  416. << " const char* const versionString = " << CppTokeniserFunctions::addEscapeChars (project.getVersionString()).quoted() << ";" << newLine
  417. << " const int versionNumber = " << project.getVersionAsHex() << ";" << newLine
  418. << "}" << newLine
  419. << "#endif" << newLine;
  420. }
  421. void writeAppHeader (const OwnedArray<LibraryModule>& modules)
  422. {
  423. MemoryOutputStream mem;
  424. writeAppHeader (mem, modules);
  425. saveGeneratedFile (project.getJuceSourceHFilename(), mem);
  426. }
  427. void writeModuleCppWrappers (const OwnedArray<LibraryModule>& modules)
  428. {
  429. for (auto* module : modules)
  430. {
  431. for (auto& cu : module->getAllCompileUnits())
  432. {
  433. MemoryOutputStream mem;
  434. writeAutoGenWarningComment (mem);
  435. mem << "*/" << newLine
  436. << newLine
  437. << "#include " << project.getAppConfigFilename().quoted() << newLine
  438. << "#include <";
  439. if (cu.file.getFileExtension() != ".r") // .r files are included without the path
  440. mem << module->getID() << "/";
  441. mem << cu.file.getFileName() << ">" << newLine;
  442. replaceFileIfDifferent (generatedCodeFolder.getChildFile (cu.getFilenameForProxyFile()), mem);
  443. }
  444. }
  445. }
  446. void writeBinaryDataFiles()
  447. {
  448. const File binaryDataH (project.getBinaryDataHeaderFile());
  449. ResourceFile resourceFile (project);
  450. if (resourceFile.getNumFiles() > 0)
  451. {
  452. auto dataNamespace = project.binaryDataNamespace().toString().trim();
  453. if (dataNamespace.isEmpty())
  454. dataNamespace = "BinaryData";
  455. resourceFile.setClassName (dataNamespace);
  456. Array<File> binaryDataFiles;
  457. int maxSize = project.getMaxBinaryFileSize().getValue();
  458. if (maxSize <= 0)
  459. maxSize = 10 * 1024 * 1024;
  460. Result r (resourceFile.write (binaryDataFiles, maxSize));
  461. if (r.wasOk())
  462. {
  463. hasBinaryData = true;
  464. for (int i = 0; i < binaryDataFiles.size(); ++i)
  465. {
  466. const File& f = binaryDataFiles.getReference(i);
  467. filesCreated.add (f);
  468. generatedFilesGroup.addFileRetainingSortOrder (f, ! f.hasFileExtension (".h"));
  469. }
  470. }
  471. else
  472. {
  473. addError (r.getErrorMessage());
  474. }
  475. }
  476. else
  477. {
  478. for (int i = 20; --i >= 0;)
  479. project.getBinaryDataCppFile (i).deleteFile();
  480. binaryDataH.deleteFile();
  481. }
  482. }
  483. void writeReadmeFile()
  484. {
  485. MemoryOutputStream out;
  486. out << newLine
  487. << " Important Note!!" << newLine
  488. << " ================" << newLine
  489. << newLine
  490. << "The purpose of this folder is to contain files that are auto-generated by the Projucer," << newLine
  491. << "and ALL files in this folder will be mercilessly DELETED and completely re-written whenever" << newLine
  492. << "the Projucer saves your project." << newLine
  493. << newLine
  494. << "Therefore, it's a bad idea to make any manual changes to the files in here, or to" << newLine
  495. << "put any of your own files in here if you don't want to lose them. (Of course you may choose" << newLine
  496. << "to add the folder's contents to your version-control system so that you can re-merge your own" << newLine
  497. << "modifications after the Projucer has saved its changes)." << newLine;
  498. replaceFileIfDifferent (generatedCodeFolder.getChildFile ("ReadMe.txt"), out);
  499. }
  500. void addError (const String& message)
  501. {
  502. const ScopedLock sl (errorLock);
  503. errors.add (message);
  504. }
  505. void writePluginCharacteristicsFile();
  506. void writeProjects (const OwnedArray<LibraryModule>& modules)
  507. {
  508. ThreadPool threadPool;
  509. // keep a copy of the basic generated files group, as each exporter may modify it.
  510. const ValueTree originalGeneratedGroup (generatedFilesGroup.state.createCopy());
  511. try
  512. {
  513. for (Project::ExporterIterator exporter (project); exporter.next();)
  514. {
  515. if (exporter->getTargetFolder().createDirectory())
  516. {
  517. exporter->copyMainGroupFromProject();
  518. exporter->settings = exporter->settings.createCopy();
  519. exporter->addToExtraSearchPaths (RelativePath ("JuceLibraryCode", RelativePath::projectFolder));
  520. generatedFilesGroup.state = originalGeneratedGroup.createCopy();
  521. exporter->addSettingsForProjectType (project.getProjectType());
  522. for (auto& module: modules)
  523. module->addSettingsForModuleToExporter (*exporter, *this);
  524. if (project.getProjectType().isAudioPlugin())
  525. writePluginCharacteristicsFile();
  526. generatedFilesGroup.sortAlphabetically (true, true);
  527. exporter->getAllGroups().add (generatedFilesGroup);
  528. threadPool.addJob (new ExporterJob (*this, exporter.exporter.release(), modules), true);
  529. }
  530. else
  531. {
  532. addError ("Can't create folder: " + exporter->getTargetFolder().getFullPathName());
  533. }
  534. }
  535. }
  536. catch (ProjectExporter::SaveError& saveError)
  537. {
  538. addError (saveError.message);
  539. }
  540. while (threadPool.getNumJobs() > 0)
  541. Thread::sleep (10);
  542. }
  543. class ExporterJob : public ThreadPoolJob
  544. {
  545. public:
  546. ExporterJob (ProjectSaver& ps, ProjectExporter* pe,
  547. const OwnedArray<LibraryModule>& moduleList)
  548. : ThreadPoolJob ("export"),
  549. owner (ps), exporter (pe), modules (moduleList)
  550. {
  551. }
  552. JobStatus runJob() override
  553. {
  554. try
  555. {
  556. exporter->create (modules);
  557. std::cout << "Finished saving: " << exporter->getName() << std::endl;
  558. }
  559. catch (ProjectExporter::SaveError& error)
  560. {
  561. owner.addError (error.message);
  562. }
  563. return jobHasFinished;
  564. }
  565. private:
  566. ProjectSaver& owner;
  567. ScopedPointer<ProjectExporter> exporter;
  568. const OwnedArray<LibraryModule>& modules;
  569. JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (ExporterJob)
  570. };
  571. JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (ProjectSaver)
  572. };