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.

720 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. << newLine
  301. << " In accordance with the terms of the JUCE 5 End-Use License Agreement, the" << newLine
  302. << " JUCE Code in SECTION A cannot be removed, changed or otherwise rendered" << newLine
  303. << " ineffective unless you have a JUCE Indie or Pro license, or are using JUCE" << newLine
  304. << " under the GPL v3 license." << newLine
  305. << newLine
  306. << " End User License Agreement: www.juce.com/juce-5-licence" << newLine
  307. << " ==============================================================================" << newLine
  308. << "*/" << newLine
  309. << newLine
  310. << "// BEGIN SECTION A" << newLine
  311. << newLine
  312. << "#define JUCE_DISPLAY_SPLASH_SCREEN " << (project.shouldDisplaySplashScreen().getValue() ? "1" : "0") << newLine
  313. << "#define JUCE_REPORT_APP_USAGE " << (project.shouldReportAppUsage().getValue() ? "1" : "0") << newLine
  314. << newLine
  315. << "// END SECTION A" << newLine
  316. << newLine
  317. << "#define JUCE_USE_DARK_SPLASH_SCREEN " << (project.splashScreenColour().toString() == "Dark" ? "1" : "0") << newLine;
  318. out << newLine
  319. << "//==============================================================================" << newLine;
  320. const int longestName = findLongestModuleName (modules);
  321. for (int k = 0; k < modules.size(); ++k)
  322. {
  323. LibraryModule* const m = modules.getUnchecked(k);
  324. out << "#define JUCE_MODULE_AVAILABLE_" << m->getID()
  325. << String::repeatedString (" ", longestName + 5 - m->getID().length()) << " 1" << newLine;
  326. }
  327. out << newLine;
  328. {
  329. int isStandaloneApplication = 1;
  330. const ProjectType& type = project.getProjectType();
  331. if (type.isAudioPlugin() || type.isDynamicLibrary())
  332. isStandaloneApplication = 0;
  333. // Fabian TODO
  334. out << "//==============================================================================" << newLine
  335. << "#ifndef JUCE_STANDALONE_APPLICATION" << newLine
  336. << " #if defined(JucePlugin_Name) && defined(JucePlugin_Build_Standalone)" << newLine
  337. << " #define JUCE_STANDALONE_APPLICATION JucePlugin_Build_Standalone" << newLine
  338. << " #else" << newLine
  339. << " #define JUCE_STANDALONE_APPLICATION " << isStandaloneApplication << newLine
  340. << " #endif" << newLine
  341. << "#endif" << newLine
  342. << newLine
  343. << "#define JUCE_GLOBAL_MODULE_SETTINGS_INCLUDED 1" << newLine;
  344. }
  345. for (int j = 0; j < modules.size(); ++j)
  346. {
  347. LibraryModule* const m = modules.getUnchecked(j);
  348. OwnedArray<Project::ConfigFlag> flags;
  349. m->getConfigFlags (project, flags);
  350. if (flags.size() > 0)
  351. {
  352. out << newLine
  353. << "//==============================================================================" << newLine
  354. << "// " << m->getID() << " flags:" << newLine;
  355. for (int i = 0; i < flags.size(); ++i)
  356. {
  357. flags.getUnchecked(i)->value.referTo (project.getConfigFlag (flags.getUnchecked(i)->symbol));
  358. const Project::ConfigFlag* const f = flags[i];
  359. const String value (project.getConfigFlag (f->symbol).toString());
  360. out << newLine
  361. << "#ifndef " << f->symbol << newLine;
  362. if (value == Project::configFlagEnabled)
  363. out << " #define " << f->symbol << " 1";
  364. else if (value == Project::configFlagDisabled)
  365. out << " #define " << f->symbol << " 0";
  366. else if (f->defaultValue.isEmpty())
  367. out << " //#define " << f->symbol;
  368. else
  369. out << " #define " << f->symbol << " " << f->defaultValue;
  370. out << newLine
  371. << "#endif" << newLine;
  372. }
  373. }
  374. }
  375. if (extraAppConfigContent.isNotEmpty())
  376. out << newLine << extraAppConfigContent.trimEnd() << newLine;
  377. }
  378. void writeAppConfigFile (const OwnedArray<LibraryModule>& modules, const String& userContent)
  379. {
  380. appConfigFile = getAppConfigFile();
  381. MemoryOutputStream mem;
  382. writeAppConfig (mem, modules, userContent);
  383. saveGeneratedFile (project.getAppConfigFilename(), mem);
  384. }
  385. void writeAppHeader (MemoryOutputStream& out, const OwnedArray<LibraryModule>& modules)
  386. {
  387. writeAutoGenWarningComment (out);
  388. out << " This is the header file that your files should include in order to get all the" << newLine
  389. << " JUCE library headers. You should avoid including the JUCE headers directly in" << newLine
  390. << " your own source files, because that wouldn't pick up the correct configuration" << newLine
  391. << " options for your app." << newLine
  392. << newLine
  393. << "*/" << newLine << newLine;
  394. out << "#pragma once" << newLine << newLine;
  395. if (appConfigFile.exists())
  396. out << CodeHelpers::createIncludeStatement (project.getAppConfigFilename()) << newLine;
  397. if (modules.size() > 0)
  398. {
  399. out << newLine;
  400. for (int i = 0; i < modules.size(); ++i)
  401. modules.getUnchecked(i)->writeIncludes (*this, out);
  402. out << newLine;
  403. }
  404. if (hasBinaryData && project.shouldIncludeBinaryInAppConfig().getValue())
  405. out << CodeHelpers::createIncludeStatement (project.getBinaryDataHeaderFile(), appConfigFile) << newLine;
  406. out << newLine
  407. << "#if ! DONT_SET_USING_JUCE_NAMESPACE" << newLine
  408. << " // If your code uses a lot of JUCE classes, then this will obviously save you" << newLine
  409. << " // a lot of typing, but can be disabled by setting DONT_SET_USING_JUCE_NAMESPACE." << newLine
  410. << " using namespace juce;" << newLine
  411. << "#endif" << newLine
  412. << newLine
  413. << "#if ! JUCE_DONT_DECLARE_PROJECTINFO" << newLine
  414. << "namespace ProjectInfo" << newLine
  415. << "{" << newLine
  416. << " const char* const projectName = " << CppTokeniserFunctions::addEscapeChars (project.getTitle()).quoted() << ";" << newLine
  417. << " const char* const versionString = " << CppTokeniserFunctions::addEscapeChars (project.getVersionString()).quoted() << ";" << newLine
  418. << " const int versionNumber = " << project.getVersionAsHex() << ";" << newLine
  419. << "}" << newLine
  420. << "#endif" << newLine;
  421. }
  422. void writeAppHeader (const OwnedArray<LibraryModule>& modules)
  423. {
  424. MemoryOutputStream mem;
  425. writeAppHeader (mem, modules);
  426. saveGeneratedFile (project.getJuceSourceHFilename(), mem);
  427. }
  428. void writeModuleCppWrappers (const OwnedArray<LibraryModule>& modules)
  429. {
  430. for (auto* module : modules)
  431. {
  432. for (auto& cu : module->getAllCompileUnits())
  433. {
  434. MemoryOutputStream mem;
  435. writeAutoGenWarningComment (mem);
  436. mem << "*/" << newLine
  437. << newLine
  438. << "#include " << project.getAppConfigFilename().quoted() << newLine
  439. << "#include <";
  440. if (cu.file.getFileExtension() != ".r") // .r files are included without the path
  441. mem << module->getID() << "/";
  442. mem << cu.file.getFileName() << ">" << newLine;
  443. replaceFileIfDifferent (generatedCodeFolder.getChildFile (cu.getFilenameForProxyFile()), mem);
  444. }
  445. }
  446. }
  447. void writeBinaryDataFiles()
  448. {
  449. const File binaryDataH (project.getBinaryDataHeaderFile());
  450. ResourceFile resourceFile (project);
  451. if (resourceFile.getNumFiles() > 0)
  452. {
  453. auto dataNamespace = project.binaryDataNamespace().toString().trim();
  454. if (dataNamespace.isEmpty())
  455. dataNamespace = "BinaryData";
  456. resourceFile.setClassName (dataNamespace);
  457. Array<File> binaryDataFiles;
  458. int maxSize = project.getMaxBinaryFileSize().getValue();
  459. if (maxSize <= 0)
  460. maxSize = 10 * 1024 * 1024;
  461. Result r (resourceFile.write (binaryDataFiles, maxSize));
  462. if (r.wasOk())
  463. {
  464. hasBinaryData = true;
  465. for (int i = 0; i < binaryDataFiles.size(); ++i)
  466. {
  467. const File& f = binaryDataFiles.getReference(i);
  468. filesCreated.add (f);
  469. generatedFilesGroup.addFileRetainingSortOrder (f, ! f.hasFileExtension (".h"));
  470. }
  471. }
  472. else
  473. {
  474. addError (r.getErrorMessage());
  475. }
  476. }
  477. else
  478. {
  479. for (int i = 20; --i >= 0;)
  480. project.getBinaryDataCppFile (i).deleteFile();
  481. binaryDataH.deleteFile();
  482. }
  483. }
  484. void writeReadmeFile()
  485. {
  486. MemoryOutputStream out;
  487. out << newLine
  488. << " Important Note!!" << newLine
  489. << " ================" << newLine
  490. << newLine
  491. << "The purpose of this folder is to contain files that are auto-generated by the Projucer," << newLine
  492. << "and ALL files in this folder will be mercilessly DELETED and completely re-written whenever" << newLine
  493. << "the Projucer saves your project." << newLine
  494. << newLine
  495. << "Therefore, it's a bad idea to make any manual changes to the files in here, or to" << newLine
  496. << "put any of your own files in here if you don't want to lose them. (Of course you may choose" << newLine
  497. << "to add the folder's contents to your version-control system so that you can re-merge your own" << newLine
  498. << "modifications after the Projucer has saved its changes)." << newLine;
  499. replaceFileIfDifferent (generatedCodeFolder.getChildFile ("ReadMe.txt"), out);
  500. }
  501. void addError (const String& message)
  502. {
  503. const ScopedLock sl (errorLock);
  504. errors.add (message);
  505. }
  506. void writePluginCharacteristicsFile();
  507. void writeProjects (const OwnedArray<LibraryModule>& modules)
  508. {
  509. ThreadPool threadPool;
  510. // keep a copy of the basic generated files group, as each exporter may modify it.
  511. const ValueTree originalGeneratedGroup (generatedFilesGroup.state.createCopy());
  512. try
  513. {
  514. for (Project::ExporterIterator exporter (project); exporter.next();)
  515. {
  516. if (exporter->getTargetFolder().createDirectory())
  517. {
  518. exporter->copyMainGroupFromProject();
  519. exporter->settings = exporter->settings.createCopy();
  520. exporter->addToExtraSearchPaths (RelativePath ("JuceLibraryCode", RelativePath::projectFolder));
  521. generatedFilesGroup.state = originalGeneratedGroup.createCopy();
  522. exporter->addSettingsForProjectType (project.getProjectType());
  523. for (auto& module: modules)
  524. module->addSettingsForModuleToExporter (*exporter, *this);
  525. if (project.getProjectType().isAudioPlugin())
  526. writePluginCharacteristicsFile();
  527. generatedFilesGroup.sortAlphabetically (true, true);
  528. exporter->getAllGroups().add (generatedFilesGroup);
  529. threadPool.addJob (new ExporterJob (*this, exporter.exporter.release(), modules), true);
  530. }
  531. else
  532. {
  533. addError ("Can't create folder: " + exporter->getTargetFolder().getFullPathName());
  534. }
  535. }
  536. }
  537. catch (ProjectExporter::SaveError& saveError)
  538. {
  539. addError (saveError.message);
  540. }
  541. while (threadPool.getNumJobs() > 0)
  542. Thread::sleep (10);
  543. }
  544. class ExporterJob : public ThreadPoolJob
  545. {
  546. public:
  547. ExporterJob (ProjectSaver& ps, ProjectExporter* pe,
  548. const OwnedArray<LibraryModule>& moduleList)
  549. : ThreadPoolJob ("export"),
  550. owner (ps), exporter (pe), modules (moduleList)
  551. {
  552. }
  553. JobStatus runJob() override
  554. {
  555. try
  556. {
  557. exporter->create (modules);
  558. std::cout << "Finished saving: " << exporter->getName() << std::endl;
  559. }
  560. catch (ProjectExporter::SaveError& error)
  561. {
  562. owner.addError (error.message);
  563. }
  564. return jobHasFinished;
  565. }
  566. private:
  567. ProjectSaver& owner;
  568. ScopedPointer<ProjectExporter> exporter;
  569. const OwnedArray<LibraryModule>& modules;
  570. JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (ExporterJob)
  571. };
  572. JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (ProjectSaver)
  573. };