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.

717 lines
25KB

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