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.

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