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.

1059 lines
48KB

  1. /*
  2. ==============================================================================
  3. This file is part of the JUCE library - "Jules' Utility Class Extensions"
  4. Copyright 2004-10 by Raw Material Software Ltd.
  5. ------------------------------------------------------------------------------
  6. JUCE can be redistributed and/or modified under the terms of the GNU General
  7. Public License (Version 2), as published by the Free Software Foundation.
  8. A copy of the license is included in the JUCE distribution, or can be found
  9. online at www.gnu.org/licenses.
  10. JUCE is distributed in the hope that it will be useful, but WITHOUT ANY
  11. WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
  12. A PARTICULAR PURPOSE. See the GNU General Public License for more details.
  13. ------------------------------------------------------------------------------
  14. To release a closed-source product which uses JUCE, commercial licenses are
  15. available: visit www.rawmaterialsoftware.com/juce for more information.
  16. ==============================================================================
  17. */
  18. #ifndef __JUCER_PROJECTEXPORT_XCODE_JUCEHEADER__
  19. #define __JUCER_PROJECTEXPORT_XCODE_JUCEHEADER__
  20. #include "jucer_ProjectExporter.h"
  21. //==============================================================================
  22. class XCodeProjectExporter : public ProjectExporter
  23. {
  24. public:
  25. //==============================================================================
  26. static const char* getNameMac() { return "XCode (MacOSX)"; }
  27. static const char* getNameiPhone() { return "XCode (iPhone)"; }
  28. static const char* getValueTreeTypeName (bool iPhone) { return iPhone ? "XCODE_IPHONE" : "XCODE_MAC"; }
  29. //==============================================================================
  30. XCodeProjectExporter (Project& project_, const ValueTree& settings_, const bool iPhone_)
  31. : ProjectExporter (project_, settings_),
  32. iPhone (iPhone_)
  33. {
  34. name = iPhone ? getNameiPhone() : getNameMac();
  35. projectIDSalt = hashCode64 (project.getProjectUID());
  36. if (getTargetLocation().toString().isEmpty())
  37. getTargetLocation() = getDefaultBuildsRootFolder() + (iPhone ? "iPhone" : "MacOSX");
  38. if (getVSTFolder().toString().isEmpty())
  39. getVSTFolder() = "~/SDKs/vstsdk2.4";
  40. if (getRTASFolder().toString().isEmpty())
  41. getRTASFolder() = "~/SDKs/PT_80_SDK";
  42. }
  43. ~XCodeProjectExporter()
  44. {
  45. }
  46. static XCodeProjectExporter* createForSettings (Project& project, const ValueTree& settings)
  47. {
  48. if (settings.hasType (getValueTreeTypeName (false)))
  49. return new XCodeProjectExporter (project, settings, false);
  50. else if (settings.hasType (getValueTreeTypeName (true)))
  51. return new XCodeProjectExporter (project, settings, true);
  52. return 0;
  53. }
  54. //==============================================================================
  55. bool isDefaultFormatForCurrentOS()
  56. {
  57. #if JUCE_MAC
  58. return ! iPhone;
  59. #else
  60. return false;
  61. #endif
  62. }
  63. bool isPossibleForCurrentProject() { return project.isGUIApplication() || ! iPhone; }
  64. bool usesMMFiles() const { return true; }
  65. void createPropertyEditors (Array <PropertyComponent*>& props)
  66. {
  67. ProjectExporter::createPropertyEditors (props);
  68. props.add (new TextPropertyComponent (getSetting ("objCExtraSuffix"), "Objective-C class name suffix", 64, false));
  69. props.getLast()->setTooltip ("Because objective-C linkage is done by string-matching, you can get horrible linkage mix-ups when different modules containing the "
  70. "same class-names are loaded simultaneously. This setting lets you provide a unique string that will be used in naming the obj-C classes in your executable to avoid this.");
  71. if (project.isGUIApplication() && ! iPhone)
  72. {
  73. props.add (new TextPropertyComponent (getSetting ("documentExtensions"), "Document file extensions", 128, false));
  74. props.getLast()->setTooltip ("A comma-separated list of file extensions for documents that your app can open.");
  75. }
  76. }
  77. void launchProject()
  78. {
  79. getProjectBundle().startAsProcess();
  80. }
  81. //==============================================================================
  82. const String create()
  83. {
  84. infoPlistFile = getTargetFolder().getChildFile ("Info.plist");
  85. File projectBundle (getProjectBundle());
  86. if (! projectBundle.createDirectory())
  87. return "Can't write to the target directory";
  88. createObjects();
  89. File projectFile (projectBundle.getChildFile ("project.pbxproj"));
  90. {
  91. MemoryOutputStream mo;
  92. writeProjectFile (mo);
  93. if (! FileHelpers::overwriteFileWithNewDataIfDifferent (projectFile, mo))
  94. return "Can't write to file: " + projectFile.getFullPathName();
  95. }
  96. if (! writeInfoPlistFile())
  97. return "Can't write the Info.plist file";
  98. return String::empty;
  99. }
  100. private:
  101. OwnedArray<ValueTree> pbxBuildFiles, pbxFileReferences, groups, misc, projectConfigs, targetConfigs;
  102. StringArray buildPhaseIDs, resourceIDs, sourceIDs, frameworkIDs;
  103. StringArray frameworkFileIDs, rezFileIDs, resourceFileRefs;
  104. File infoPlistFile;
  105. int64 projectIDSalt;
  106. const bool iPhone;
  107. static const String sanitisePath (const String& path)
  108. {
  109. if (path.startsWithChar ('~'))
  110. return "$(HOME)" + path.substring (1);
  111. return path;
  112. }
  113. const File getProjectBundle() const { return getTargetFolder().getChildFile (project.getProjectFilenameRoot()).withFileExtension (".xcodeproj"); }
  114. const RelativePath getJuceLibFile() const { return getJucePathFromTargetFolder().getChildFile ("bin/libjucedebug.a"); }
  115. bool hasPList() const { return ! (project.isLibrary() || project.isCommandLineApp()); }
  116. const String getAudioPluginBundleExtension() const { return "component"; }
  117. //==============================================================================
  118. void createObjects()
  119. {
  120. if (! project.isLibrary())
  121. addFrameworks();
  122. const String productName (project.getConfiguration (0).getTargetBinaryName().toString());
  123. if (project.isGUIApplication())
  124. addBuildProduct ("wrapper.application", productName + ".app");
  125. else if (project.isCommandLineApp())
  126. addBuildProduct ("compiled.mach-o.executable", productName);
  127. else if (project.isLibrary())
  128. addBuildProduct ("archive.ar", getLibbedFilename (productName));
  129. else if (project.isAudioPlugin())
  130. addBuildProduct ("wrapper.cfbundle", productName + "." + getAudioPluginBundleExtension());
  131. else if (project.isBrowserPlugin())
  132. addBuildProduct ("wrapper.cfbundle", productName + ".plugin");
  133. else
  134. jassert (productName.isEmpty());
  135. if (hasPList())
  136. {
  137. RelativePath plistPath (infoPlistFile, getTargetFolder(), RelativePath::buildTargetFolder);
  138. addFileReference (plistPath);
  139. resourceFileRefs.add (createID (plistPath));
  140. }
  141. addProjectItem (project.getMainGroup());
  142. for (int i = 0; i < project.getNumConfigurations(); ++i)
  143. {
  144. Project::BuildConfiguration config (project.getConfiguration (i));
  145. addProjectConfig (config.getName().getValue(), getProjectSettings (config));
  146. addTargetConfig (config.getName().getValue(), getTargetSettings (config));
  147. }
  148. addConfigList (projectConfigs, createID ("__projList"));
  149. addConfigList (targetConfigs, createID ("__configList"));
  150. if (! project.isLibrary())
  151. addBuildPhase ("PBXResourcesBuildPhase", resourceIDs);
  152. if (rezFileIDs.size() > 0)
  153. addBuildPhase ("PBXRezBuildPhase", rezFileIDs);
  154. addBuildPhase ("PBXSourcesBuildPhase", sourceIDs);
  155. if (! project.isLibrary())
  156. addBuildPhase ("PBXFrameworksBuildPhase", frameworkIDs);
  157. if (project.isAudioPlugin())
  158. addPluginShellScriptPhase();
  159. addTargetObject();
  160. addProjectObject();
  161. }
  162. bool writeInfoPlistFile()
  163. {
  164. if (! hasPList())
  165. return true;
  166. XmlElement plist ("plist");
  167. XmlElement* dict = plist.createNewChildElement ("dict");
  168. addPlistDictionaryKey (dict, "CFBundleExecutable", "${EXECUTABLE_NAME}");
  169. addPlistDictionaryKey (dict, "CFBundleIconFile", "");
  170. addPlistDictionaryKey (dict, "CFBundleIdentifier", project.getBundleIdentifier().toString());
  171. addPlistDictionaryKey (dict, "CFBundleName", project.getProjectName().toString());
  172. if (project.isAudioPlugin())
  173. {
  174. addPlistDictionaryKey (dict, "CFBundlePackageType", "TDMw");
  175. addPlistDictionaryKey (dict, "CFBundleSignature", "PTul");
  176. }
  177. else
  178. {
  179. addPlistDictionaryKey (dict, "CFBundlePackageType", "APPL");
  180. addPlistDictionaryKey (dict, "CFBundleSignature", "????");
  181. }
  182. addPlistDictionaryKey (dict, "CFBundleShortVersionString", project.getVersion().toString());
  183. addPlistDictionaryKey (dict, "CFBundleVersion", project.getVersion().toString());
  184. StringArray documentExtensions;
  185. documentExtensions.addTokens (getSetting ("documentExtensions").toString(), ",", String::empty);
  186. documentExtensions.trim();
  187. documentExtensions.removeEmptyStrings (true);
  188. if (documentExtensions.size() > 0)
  189. {
  190. dict->createNewChildElement ("key")->addTextElement ("CFBundleDocumentTypes");
  191. XmlElement* dict2 = dict->createNewChildElement ("array")->createNewChildElement ("dict");
  192. for (int i = 0; i < documentExtensions.size(); ++i)
  193. {
  194. String ex (documentExtensions[i]);
  195. if (ex.startsWithChar ('.'))
  196. ex = ex.substring (1);
  197. dict2->createNewChildElement ("key")->addTextElement ("CFBundleTypeExtensions");
  198. dict2->createNewChildElement ("array")->createNewChildElement ("string")->addTextElement (ex);
  199. addPlistDictionaryKey (dict2, "CFBundleTypeName", ex);
  200. addPlistDictionaryKey (dict2, "CFBundleTypeRole", "Editor");
  201. addPlistDictionaryKey (dict2, "NSPersistentStoreTypeKey", "XML");
  202. }
  203. }
  204. MemoryOutputStream mo;
  205. plist.writeToStream (mo, "<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">");
  206. return FileHelpers::overwriteFileWithNewDataIfDifferent (infoPlistFile, mo);
  207. }
  208. const StringArray getHeaderSearchPaths (const Project::BuildConfiguration& config)
  209. {
  210. StringArray searchPaths (config.getHeaderSearchPaths());
  211. if (project.shouldAddVSTFolderToPath() && getVSTFolder().toString().isNotEmpty())
  212. searchPaths.add (RelativePath (getVSTFolder().toString(), RelativePath::projectFolder)
  213. .rebased (project.getFile().getParentDirectory(), getTargetFolder(), RelativePath::buildTargetFolder)
  214. .toUnixStyle());
  215. if (project.isAudioPlugin())
  216. {
  217. if (isAU())
  218. {
  219. searchPaths.add ("$(DEVELOPER_DIR)/Extras/CoreAudio/PublicUtility");
  220. searchPaths.add ("$(DEVELOPER_DIR)/Extras/CoreAudio/AudioUnits/AUPublic/Utility");
  221. }
  222. if (isRTAS())
  223. {
  224. searchPaths.add ("/Developer/Headers/FlatCarbon");
  225. static const char* rtasIncludePaths[] = { "AlturaPorts/TDMPlugIns/PlugInLibrary/Controls",
  226. "AlturaPorts/TDMPlugIns/PlugInLibrary/CoreClasses",
  227. "AlturaPorts/TDMPlugIns/PlugInLibrary/DSPClasses",
  228. "AlturaPorts/TDMPlugIns/PlugInLibrary/EffectClasses",
  229. "AlturaPorts/TDMPlugIns/PlugInLibrary/MacBuild",
  230. "AlturaPorts/TDMPlugIns/PlugInLibrary/Meters",
  231. "AlturaPorts/TDMPlugIns/PlugInLibrary/ProcessClasses",
  232. "AlturaPorts/TDMPlugIns/PlugInLibrary/ProcessClasses/Interfaces",
  233. "AlturaPorts/TDMPlugIns/PlugInLibrary/RTASP_Adapt",
  234. "AlturaPorts/TDMPlugIns/PlugInLibrary/Utilities",
  235. "AlturaPorts/TDMPlugIns/PlugInLibrary/ViewClasses",
  236. "AlturaPorts/TDMPlugIns/DSPManager/**",
  237. "AlturaPorts/TDMPlugIns/SupplementalPlugInLib/Encryption",
  238. "AlturaPorts/TDMPlugIns/SupplementalPlugInLib/GraphicsExtensions",
  239. "AlturaPorts/TDMPlugIns/common",
  240. "AlturaPorts/TDMPlugIns/common/PI_LibInterface",
  241. "AlturaPorts/TDMPlugIns/PACEProtection/**",
  242. "AlturaPorts/TDMPlugIns/SignalProcessing/**",
  243. "AlturaPorts/OMS/Headers",
  244. "AlturaPorts/Fic/Interfaces/**",
  245. "AlturaPorts/Fic/Source/SignalNets",
  246. "AlturaPorts/DSIPublicInterface/PublicHeaders",
  247. "DAEWin/Include",
  248. "AlturaPorts/DigiPublic/Interfaces",
  249. "AlturaPorts/DigiPublic",
  250. "AlturaPorts/NewFileLibs/DOA",
  251. "AlturaPorts/NewFileLibs/Cmn",
  252. "xplat/AVX/avx2/avx2sdk/inc",
  253. "xplat/AVX/avx2/avx2sdk/utils" };
  254. RelativePath sdkFolder (getRTASFolder().toString(), RelativePath::projectFolder);
  255. sdkFolder = sdkFolder.rebased (project.getFile().getParentDirectory(), getTargetFolder(), RelativePath::buildTargetFolder);
  256. for (int i = 0; i < numElementsInArray (rtasIncludePaths); ++i)
  257. searchPaths.add (sdkFolder.getChildFile (rtasIncludePaths[i]).toUnixStyle());
  258. }
  259. }
  260. return searchPaths;
  261. }
  262. void getLinkerFlagsForStaticLibrary (const RelativePath& library, StringArray& flags, StringArray& librarySearchPaths)
  263. {
  264. jassert (library.getFileNameWithoutExtension().substring (0, 3) == "lib");
  265. flags.add ("-l" + library.getFileNameWithoutExtension().substring (3));
  266. String searchPath (library.toUnixStyle().upToLastOccurrenceOf ("/", false, false));
  267. if (! library.isAbsolute())
  268. searchPath = "$(SRCROOT)/" + searchPath;
  269. librarySearchPaths.add (sanitisePath (searchPath));
  270. }
  271. void getLinkerFlags (const Project::BuildConfiguration& config, StringArray& flags, StringArray& librarySearchPaths)
  272. {
  273. if (project.isAudioPlugin())
  274. {
  275. flags.add ("-bundle");
  276. if (isRTAS() && getRTASFolder().toString().isNotEmpty())
  277. {
  278. getLinkerFlagsForStaticLibrary (RelativePath (getRTASFolder().toString(), RelativePath::buildTargetFolder)
  279. .getChildFile (config.isDebug().getValue() ? "MacBag/Libs/Debug/libPluginLibrary.a"
  280. : "MacBag/Libs/Release/libPluginLibrary.a"),
  281. flags, librarySearchPaths);
  282. }
  283. }
  284. if (project.getJuceLinkageMode() == Project::useLinkedJuce)
  285. getLinkerFlagsForStaticLibrary (getJuceLibFile(), flags, librarySearchPaths);
  286. flags.add (getExtraLinkerFlags().toString());
  287. flags.removeEmptyStrings (true);
  288. }
  289. const StringArray getProjectSettings (const Project::BuildConfiguration& config)
  290. {
  291. StringArray s;
  292. s.add ("ALWAYS_SEARCH_USER_PATHS = NO");
  293. s.add ("GCC_C_LANGUAGE_STANDARD = c99");
  294. s.add ("GCC_WARN_ABOUT_RETURN_TYPE = YES");
  295. s.add ("GCC_WARN_CHECK_SWITCH_STATEMENTS = YES");
  296. s.add ("GCC_WARN_UNUSED_VARIABLE = YES");
  297. s.add ("GCC_WARN_MISSING_PARENTHESES = YES");
  298. s.add ("GCC_WARN_NON_VIRTUAL_DESTRUCTOR = YES");
  299. s.add ("GCC_WARN_TYPECHECK_CALLS_TO_PRINTF = YES");
  300. s.add ("GCC_MODEL_TUNING = G5");
  301. s.add ("GCC_INLINES_ARE_PRIVATE_EXTERN = YES");
  302. s.add ("ZERO_LINK = NO");
  303. s.add ("DEBUG_INFORMATION_FORMAT = \"dwarf-with-dsym\"");
  304. s.add ("PRODUCT_NAME = \"" + config.getTargetBinaryName().toString() + "\"");
  305. return s;
  306. }
  307. const StringArray getTargetSettings (const Project::BuildConfiguration& config)
  308. {
  309. StringArray s;
  310. s.add ("ARCHS = \"$(ARCHS_STANDARD_32_BIT)\"");
  311. s.add ("PREBINDING = NO");
  312. s.add ("HEADER_SEARCH_PATHS = \"" + getHeaderSearchPaths (config).joinIntoString (" ") + " $(inherited)\"");
  313. s.add ("GCC_OPTIMIZATION_LEVEL = " + config.getGCCOptimisationFlag());
  314. s.add ("INFOPLIST_FILE = " + infoPlistFile.getFileName());
  315. if (getExtraCompilerFlags().toString().isNotEmpty())
  316. s.add ("OTHER_CPLUSPLUSFLAGS = " + getExtraCompilerFlags().toString());
  317. if (project.isGUIApplication())
  318. {
  319. s.add ("INSTALL_PATH = \"$(HOME)/Applications\"");
  320. }
  321. else if (project.isAudioPlugin())
  322. {
  323. s.add ("LIBRARY_STYLE = Bundle");
  324. s.add ("INSTALL_PATH = \"$(HOME)/Library/Audio/Plug-Ins/Components/\"");
  325. s.add ("WRAPPER_EXTENSION = " + getAudioPluginBundleExtension());
  326. s.add ("GENERATE_PKGINFO_FILE = YES");
  327. s.add ("OTHER_REZFLAGS = \"-d ppc_$ppc -d i386_$i386 -d ppc64_$ppc64 -d x86_64_$x86_64"
  328. " -I /System/Library/Frameworks/CoreServices.framework/Frameworks/CarbonCore.framework/Versions/A/Headers"
  329. " -I \\\"$(DEVELOPER_DIR)/Extras/CoreAudio/AudioUnits/AUPublic/AUBase\\\"\"");
  330. }
  331. else if (project.isBrowserPlugin())
  332. {
  333. s.add ("LIBRARY_STYLE = Bundle");
  334. s.add ("INSTALL_PATH = \"/Library/Internet Plug-Ins/\"");
  335. }
  336. else if (project.isLibrary())
  337. {
  338. if (config.getTargetBinaryRelativePath().toString().isNotEmpty())
  339. {
  340. RelativePath binaryPath (config.getTargetBinaryRelativePath().toString(), RelativePath::projectFolder);
  341. binaryPath = binaryPath.rebased (project.getFile().getParentDirectory(), getTargetFolder(), RelativePath::buildTargetFolder);
  342. s.add ("DSTROOT = " + sanitisePath (binaryPath.toUnixStyle()));
  343. s.add ("SYMROOT = " + sanitisePath (binaryPath.toUnixStyle()));
  344. }
  345. s.add ("CONFIGURATION_BUILD_DIR = \"$(BUILD_DIR)\"");
  346. s.add ("DEPLOYMENT_LOCATION = YES");
  347. }
  348. else if (project.isCommandLineApp())
  349. {
  350. }
  351. else
  352. {
  353. jassertfalse;
  354. }
  355. if (iPhone)
  356. {
  357. s.add ("SDKROOT = iphonesimulator3.0");
  358. }
  359. else
  360. {
  361. const String sdk (config.getMacSDKVersion().toString());
  362. const String sdkCompat (config.getMacCompatibilityVersion().toString());
  363. if (sdk == Project::BuildConfiguration::osxVersion10_4)
  364. {
  365. s.add ("SDKROOT = macosx10.4");
  366. s.add ("GCC_VERSION = 4.0");
  367. }
  368. else if (sdk == Project::BuildConfiguration::osxVersion10_5)
  369. {
  370. s.add ("SDKROOT = macosx10.5");
  371. }
  372. else if (sdk == Project::BuildConfiguration::osxVersion10_6)
  373. {
  374. s.add ("SDKROOT = macosx10.6");
  375. }
  376. if (sdkCompat == Project::BuildConfiguration::osxVersion10_4)
  377. s.add ("MACOSX_DEPLOYMENT_TARGET = 10.4");
  378. else if (sdkCompat == Project::BuildConfiguration::osxVersion10_5)
  379. s.add ("MACOSX_DEPLOYMENT_TARGET = 10.5");
  380. else if (sdkCompat == Project::BuildConfiguration::osxVersion10_6)
  381. s.add ("MACOSX_DEPLOYMENT_TARGET = 10.6");
  382. s.add ("MACOSX_DEPLOYMENT_TARGET_ppc = 10.4");
  383. }
  384. {
  385. StringArray linkerFlags, librarySearchPaths;
  386. getLinkerFlags (config, linkerFlags, librarySearchPaths);
  387. if (linkerFlags.size() > 0)
  388. s.add ("OTHER_LDFLAGS = \"" + linkerFlags.joinIntoString (" ") + "\"");
  389. if (librarySearchPaths.size() > 0)
  390. {
  391. String libPaths ("LIBRARY_SEARCH_PATHS = (\"$(inherited)\"");
  392. for (int i = 0; i < librarySearchPaths.size(); ++i)
  393. libPaths += ", \"\\\"" + librarySearchPaths[i] + "\\\"\"";
  394. s.add (libPaths + ")");
  395. }
  396. }
  397. StringArray defines;
  398. defines.add (getExporterIdentifierMacro() + "=1");
  399. if (config.isDebug().getValue())
  400. {
  401. defines.add ("_DEBUG=1");
  402. defines.add ("DEBUG=1 ");
  403. s.add ("ONLY_ACTIVE_ARCH = YES");
  404. s.add ("COPY_PHASE_STRIP = NO");
  405. s.add ("GCC_DYNAMIC_NO_PIC = NO");
  406. s.add ("GCC_ENABLE_FIX_AND_CONTINUE = YES");
  407. }
  408. else
  409. {
  410. defines.add ("_NDEBUG=1");
  411. defines.add ("NDEBUG=1 ");
  412. s.add ("GCC_GENERATE_DEBUGGING_SYMBOLS = NO");
  413. s.add ("GCC_SYMBOLS_PRIVATE_EXTERN = YES");
  414. }
  415. {
  416. const String objCSuffix (getSetting ("objCExtraSuffix").toString().trim());
  417. if (objCSuffix.isNotEmpty())
  418. defines.add ("JUCE_ObjCExtraSuffix=" + objCSuffix);
  419. }
  420. {
  421. defines.addArray (config.parsePreprocessorDefs());
  422. defines.addArray (parsePreprocessorDefs());
  423. for (int i = defines.size(); --i >= 0;)
  424. defines.set (i, defines[i].quoted());
  425. s.add ("GCC_PREPROCESSOR_DEFINITIONS = (" + indentList (defines, ",") + ")");
  426. }
  427. return s;
  428. }
  429. void addFrameworks()
  430. {
  431. StringArray s;
  432. if (iPhone)
  433. {
  434. s.addTokens ("UIKit Foundation CoreGraphics AudioToolbox QuartzCore OpenGLES", false);
  435. }
  436. else
  437. {
  438. s.addTokens ("Cocoa Carbon IOKit CoreAudio CoreMIDI WebKit DiscRecording OpenGL QuartzCore QTKit QuickTime", false);
  439. if (isAU())
  440. s.addTokens ("AudioUnit CoreAudioKit AudioToolbox", false);
  441. else if (project.getJuceConfigFlag ("JUCE_PLUGINHOST_AU").toString() == Project::configFlagEnabled)
  442. s.addTokens ("AudioUnit CoreAudioKit", false);
  443. }
  444. for (int i = 0; i < s.size(); ++i)
  445. addFramework (s[i]);
  446. }
  447. //==============================================================================
  448. void writeProjectFile (OutputStream& output)
  449. {
  450. output << "// !$*UTF8*$!\n{\n"
  451. "\tarchiveVersion = 1;\n"
  452. "\tclasses = {\n\t};\n"
  453. "\tobjectVersion = 44;\n"
  454. "\tobjects = {\n\n";
  455. Array <ValueTree*> objects;
  456. objects.addArray (pbxBuildFiles);
  457. objects.addArray (pbxFileReferences);
  458. objects.addArray (groups);
  459. objects.addArray (targetConfigs);
  460. objects.addArray (projectConfigs);
  461. objects.addArray (misc);
  462. for (int i = 0; i < objects.size(); ++i)
  463. {
  464. ValueTree& o = *objects.getUnchecked(i);
  465. output << "\t\t" << static_cast <const juce_wchar*> (o.getType()) << " = { ";
  466. for (int j = 0; j < o.getNumProperties(); ++j)
  467. {
  468. const Identifier propertyName (o.getPropertyName(j));
  469. String val (o.getProperty (propertyName).toString());
  470. if (val.isEmpty() || (val.containsAnyOf (" \t;<>()=,-\r\n")
  471. && ! (val.trimStart().startsWithChar ('(')
  472. || val.trimStart().startsWithChar ('{'))))
  473. val = val.quoted();
  474. output << propertyName.toString() << " = " << val << "; ";
  475. }
  476. output << "};\n";
  477. }
  478. output << "\t};\n\trootObject = " << createID ("__root") << ";\n}\n";
  479. }
  480. static void addPlistDictionaryKey (XmlElement* xml, const String& key, const String& value)
  481. {
  482. xml->createNewChildElement ("key")->addTextElement (key);
  483. xml->createNewChildElement ("string")->addTextElement (value);
  484. }
  485. const String addBuildFile (const RelativePath& path, const String& fileRefID, bool addToSourceBuildPhase, bool inhibitWarnings)
  486. {
  487. String fileID (createID (path.toUnixStyle() + "buildref"));
  488. if (addToSourceBuildPhase)
  489. sourceIDs.add (fileID);
  490. ValueTree* v = new ValueTree (fileID);
  491. v->setProperty ("isa", "PBXBuildFile", 0);
  492. v->setProperty ("fileRef", fileRefID, 0);
  493. if (inhibitWarnings)
  494. v->setProperty ("settings", "{COMPILER_FLAGS = \"-w\"; }", 0);
  495. pbxBuildFiles.add (v);
  496. return fileID;
  497. }
  498. const String addBuildFile (const RelativePath& path, bool addToSourceBuildPhase, bool inhibitWarnings)
  499. {
  500. return addBuildFile (path, createID (path), addToSourceBuildPhase, inhibitWarnings);
  501. }
  502. void addFileReference (const RelativePath& path, const String& sourceTree, const String& lastKnownFileType, const String& fileRefID)
  503. {
  504. ValueTree* v = new ValueTree (fileRefID);
  505. v->setProperty ("isa", "PBXFileReference", 0);
  506. v->setProperty ("lastKnownFileType", lastKnownFileType, 0);
  507. v->setProperty (Ids::name, path.getFileName(), 0);
  508. v->setProperty ("path", sanitisePath (path.toUnixStyle()), 0);
  509. v->setProperty ("sourceTree", sourceTree, 0);
  510. pbxFileReferences.add (v);
  511. }
  512. const String addFileReference (const RelativePath& path)
  513. {
  514. const String fileRefID (createID (path));
  515. jassert (path.isAbsolute() || path.getRoot() == RelativePath::buildTargetFolder);
  516. addFileReference (path, path.isAbsolute() ? "<absolute>" : "SOURCE_ROOT",
  517. getFileType (path), fileRefID);
  518. return fileRefID;
  519. }
  520. static const String getFileType (const RelativePath& file)
  521. {
  522. if (file.hasFileExtension (".cpp")) return "sourcecode.cpp.cpp";
  523. else if (file.hasFileExtension (".mm")) return "sourcecode.cpp.objcpp";
  524. else if (file.hasFileExtension (".m")) return "sourcecode.c.objc";
  525. else if (file.hasFileExtension (".h;.hpp")) return "sourcecode.c.h";
  526. else if (file.hasFileExtension (".framework")) return "wrapper.framework";
  527. else if (file.hasFileExtension (".jpeg;.jpg")) return "image.jpeg";
  528. else if (file.hasFileExtension ("png;gif")) return "image" + file.getFileExtension();
  529. else if (file.hasFileExtension ("html;htm")) return "text.html";
  530. else if (file.hasFileExtension ("txt;rtf")) return "text" + file.getFileExtension();
  531. else if (file.hasFileExtension ("plist")) return "text.plist.xml";
  532. else if (file.hasFileExtension ("app")) return "wrapper.application";
  533. else if (file.hasFileExtension ("component;vst;plugin")) return "wrapper.cfbundle";
  534. else if (file.hasFileExtension ("xcodeproj")) return "wrapper.pb-project";
  535. else if (file.hasFileExtension ("a")) return "archive.ar";
  536. return "file" + file.getFileExtension();
  537. }
  538. const String addFile (const RelativePath& path, bool shouldBeCompiled, bool inhibitWarnings)
  539. {
  540. if (shouldBeCompiled)
  541. addBuildFile (path, true, inhibitWarnings);
  542. else if (path.hasFileExtension (".r"))
  543. rezFileIDs.add (addBuildFile (path, false, inhibitWarnings));
  544. return addFileReference (path);
  545. }
  546. const String addProjectItem (const Project::Item& projectItem)
  547. {
  548. if (projectItem.isGroup())
  549. {
  550. StringArray childIDs;
  551. for (int i = 0; i < projectItem.getNumChildren(); ++i)
  552. {
  553. const String childID (addProjectItem (projectItem.getChild(i)));
  554. if (childID.isNotEmpty())
  555. childIDs.add (childID);
  556. }
  557. return addGroup (projectItem, childIDs);
  558. }
  559. else
  560. {
  561. if (projectItem.shouldBeAddedToTargetProject())
  562. {
  563. const RelativePath path (projectItem.getFile(), getTargetFolder(), RelativePath::buildTargetFolder);
  564. return addFile (path, projectItem.shouldBeCompiled(), false);
  565. }
  566. }
  567. return String::empty;
  568. }
  569. void addFramework (const String& frameworkName)
  570. {
  571. const RelativePath path ("System/Library/Frameworks/" + frameworkName + ".framework", RelativePath::unknown);
  572. const String fileRefID (createID (path));
  573. addFileReference (path, "SDKROOT", getFileType (path), fileRefID);
  574. frameworkIDs.add (addBuildFile (path, fileRefID, false, false));
  575. frameworkFileIDs.add (fileRefID);
  576. }
  577. void addGroup (const String& groupID, const String& groupName, const StringArray& childIDs)
  578. {
  579. ValueTree* v = new ValueTree (groupID);
  580. v->setProperty ("isa", "PBXGroup", 0);
  581. v->setProperty ("children", "(" + indentList (childIDs, ",") + " )", 0);
  582. v->setProperty (Ids::name, groupName, 0);
  583. v->setProperty ("sourceTree", "<group>", 0);
  584. groups.add (v);
  585. }
  586. const String createGroup (const Array<RelativePath>& files, const String& groupName, const String& groupIDName, bool inhibitWarnings)
  587. {
  588. StringArray fileIDs;
  589. for (int i = 0; i < files.size(); ++i)
  590. {
  591. addFile (files.getReference(i), shouldFileBeCompiledByDefault (files.getReference(i)), inhibitWarnings);
  592. fileIDs.add (createID (files.getReference(i)));
  593. }
  594. const String groupID (createID (groupIDName));
  595. addGroup (groupID, groupName, fileIDs);
  596. return groupID;
  597. }
  598. const String addGroup (const Project::Item& item, StringArray& childIDs)
  599. {
  600. String groupName (item.getName().toString());
  601. if (item.isMainGroup())
  602. {
  603. groupName = "Source";
  604. // Add 'Juce Library Code' group
  605. if (juceWrapperFiles.size() > 0)
  606. childIDs.add (createGroup (juceWrapperFiles, project.getJuceCodeGroupName(), "__jucelibfiles", false));
  607. if (isVST())
  608. childIDs.add (createGroup (getVSTFilesRequired(), "Juce VST Wrapper", "__jucevstfiles", false));
  609. if (isAU())
  610. childIDs.add (createAUWrappersGroup());
  611. if (isRTAS())
  612. childIDs.add (createGroup (getRTASFilesRequired(), "Juce RTAS Wrapper", "__jucertasfiles", true));
  613. { // Add 'resources' group
  614. String resourcesGroupID (createID ("__resources"));
  615. addGroup (resourcesGroupID, "Resources", resourceFileRefs);
  616. childIDs.add (resourcesGroupID);
  617. }
  618. { // Add 'frameworks' group
  619. String frameworksGroupID (createID ("__frameworks"));
  620. addGroup (frameworksGroupID, "Frameworks", frameworkFileIDs);
  621. childIDs.add (frameworksGroupID);
  622. }
  623. { // Add 'products' group
  624. String productsGroupID (createID ("__products"));
  625. StringArray products;
  626. products.add (createID ("__productFileID"));
  627. addGroup (productsGroupID, "Products", products);
  628. childIDs.add (productsGroupID);
  629. }
  630. }
  631. String groupID (getIDForGroup (item));
  632. addGroup (groupID, groupName, childIDs);
  633. return groupID;
  634. }
  635. void addBuildProduct (const String& fileType, const String& binaryName)
  636. {
  637. ValueTree* v = new ValueTree (createID ("__productFileID"));
  638. v->setProperty ("isa", "PBXFileReference", 0);
  639. v->setProperty ("explicitFileType", fileType, 0);
  640. v->setProperty ("includeInIndex", (int) 0, 0);
  641. v->setProperty ("path", sanitisePath (binaryName), 0);
  642. v->setProperty ("sourceTree", "BUILT_PRODUCTS_DIR", 0);
  643. pbxFileReferences.add (v);
  644. }
  645. void addTargetConfig (const String& configName, const StringArray& buildSettings)
  646. {
  647. ValueTree* v = new ValueTree (createID ("targetconfigid_" + configName));
  648. v->setProperty ("isa", "XCBuildConfiguration", 0);
  649. v->setProperty ("buildSettings", "{" + indentList (buildSettings, ";") + " }", 0);
  650. v->setProperty (Ids::name, configName, 0);
  651. targetConfigs.add (v);
  652. }
  653. void addProjectConfig (const String& configName, const StringArray& buildSettings)
  654. {
  655. ValueTree* v = new ValueTree (createID ("projectconfigid_" + configName));
  656. v->setProperty ("isa", "XCBuildConfiguration", 0);
  657. v->setProperty ("buildSettings", "{" + indentList (buildSettings, ";") + " }", 0);
  658. v->setProperty (Ids::name, configName, 0);
  659. projectConfigs.add (v);
  660. }
  661. void addConfigList (const OwnedArray <ValueTree>& configsToUse, const String& listID)
  662. {
  663. StringArray configIDs;
  664. for (int i = 0; i < configsToUse.size(); ++i)
  665. configIDs.add (configsToUse[i]->getType().toString());
  666. ValueTree* v = new ValueTree (listID);
  667. v->setProperty ("isa", "XCConfigurationList", 0);
  668. v->setProperty ("buildConfigurations", "(" + indentList (configIDs, ",") + " )", 0);
  669. v->setProperty ("defaultConfigurationIsVisible", (int) 0, 0);
  670. if (configsToUse[0] != 0)
  671. v->setProperty ("defaultConfigurationName", configsToUse[0]->getProperty (Ids::name), 0);
  672. misc.add (v);
  673. }
  674. ValueTree* addBuildPhase (const String& phaseType, const StringArray& fileIds)
  675. {
  676. String phaseId (createID (phaseType + "resbuildphase"));
  677. buildPhaseIDs.add (phaseId);
  678. ValueTree* v = new ValueTree (phaseId);
  679. v->setProperty ("isa", phaseType, 0);
  680. v->setProperty ("buildActionMask", "2147483647", 0);
  681. v->setProperty ("files", "(" + indentList (fileIds, ",") + " )", 0);
  682. v->setProperty ("runOnlyForDeploymentPostprocessing", (int) 0, 0);
  683. misc.add (v);
  684. return v;
  685. }
  686. void addTargetObject()
  687. {
  688. ValueTree* v = new ValueTree (createID ("__target"));
  689. v->setProperty ("isa", "PBXNativeTarget", 0);
  690. v->setProperty ("buildConfigurationList", createID ("__configList"), 0);
  691. v->setProperty ("buildPhases", "(" + indentList (buildPhaseIDs, ",") + " )", 0);
  692. v->setProperty ("buildRules", "( )", 0);
  693. v->setProperty ("dependencies", "( )", 0);
  694. v->setProperty (Ids::name, project.getDocumentTitle(), 0);
  695. v->setProperty ("productName", project.getDocumentTitle(), 0);
  696. v->setProperty ("productReference", createID ("__productFileID"), 0);
  697. if (project.isGUIApplication())
  698. {
  699. v->setProperty ("productInstallPath", "$(HOME)/Applications", 0);
  700. v->setProperty ("productType", "com.apple.product-type.application", 0);
  701. }
  702. else if (project.isCommandLineApp())
  703. {
  704. v->setProperty ("productInstallPath", "/usr/bin", 0);
  705. v->setProperty ("productType", "com.apple.product-type.tool", 0);
  706. }
  707. else if (project.isAudioPlugin() || project.isBrowserPlugin())
  708. {
  709. v->setProperty ("productInstallPath", "$(HOME)/Library/Audio/Plug-Ins/Components/", 0);
  710. v->setProperty ("productType", "com.apple.product-type.bundle", 0);
  711. }
  712. else if (project.isLibrary())
  713. {
  714. v->setProperty ("productType", "com.apple.product-type.library.static", 0);
  715. }
  716. else
  717. jassertfalse; //xxx
  718. misc.add (v);
  719. }
  720. void addProjectObject()
  721. {
  722. ValueTree* v = new ValueTree (createID ("__root"));
  723. v->setProperty ("isa", "PBXProject", 0);
  724. v->setProperty ("buildConfigurationList", createID ("__projList"), 0);
  725. v->setProperty ("compatibilityVersion", "Xcode 3.0", 0);
  726. v->setProperty ("hasScannedForEncodings", (int) 0, 0);
  727. v->setProperty ("mainGroup", getIDForGroup (project.getMainGroup()), 0);
  728. v->setProperty ("projectDirPath", "\"\"", 0);
  729. v->setProperty ("projectRoot", "\"\"", 0);
  730. v->setProperty ("targets", "( " + createID ("__target") + " )", 0);
  731. misc.add (v);
  732. }
  733. void addPluginShellScriptPhase()
  734. {
  735. ValueTree* v = addBuildPhase ("PBXShellScriptBuildPhase", StringArray());
  736. v->setProperty (Ids::name, "Copy to the different plugin folders", 0);
  737. v->setProperty ("shellPath", "/bin/sh", 0);
  738. v->setProperty ("shellScript", String::fromUTF8 (BinaryData::AudioPluginXCodeScript_txt, BinaryData::AudioPluginXCodeScript_txtSize)
  739. .replace ("\\", "\\\\")
  740. .replace ("\"", "\\\"")
  741. .replace ("\r\n", "\\n")
  742. .replace ("\n", "\\n"), 0);
  743. }
  744. //==============================================================================
  745. static const String indentList (const StringArray& list, const String& separator)
  746. {
  747. if (list.size() == 0)
  748. return " ";
  749. return "\n\t\t\t\t" + list.joinIntoString (separator + "\n\t\t\t\t")
  750. + (separator == ";" ? separator : String::empty);
  751. }
  752. const String createID (const RelativePath& path) const
  753. {
  754. return createID (path.toUnixStyle());
  755. }
  756. const String createID (const String& rootString) const
  757. {
  758. static const char digits[] = "0123456789ABCDEF";
  759. char n[24];
  760. Random ran (projectIDSalt + hashCode64 (rootString));
  761. for (int i = 0; i < numElementsInArray (n); ++i)
  762. n[i] = digits [ran.nextInt (16)];
  763. return String (n, numElementsInArray (n));
  764. }
  765. const String getIDForGroup (const Project::Item& item) const
  766. {
  767. return createID (item.getID());
  768. }
  769. bool shouldFileBeCompiledByDefault (const RelativePath& file) const
  770. {
  771. return file.hasFileExtension ("cpp;mm;c;m");
  772. }
  773. //==============================================================================
  774. const Array<RelativePath> getRTASFilesRequired() const
  775. {
  776. Array<RelativePath> s;
  777. if (isRTAS())
  778. {
  779. const char* files[] = { "extras/audio plugins/wrapper/RTAS/juce_RTAS_DigiCode1.cpp",
  780. "extras/audio plugins/wrapper/RTAS/juce_RTAS_DigiCode2.cpp",
  781. "extras/audio plugins/wrapper/RTAS/juce_RTAS_DigiCode3.cpp",
  782. "extras/audio plugins/wrapper/RTAS/juce_RTAS_DigiCode_Header.h",
  783. "extras/audio plugins/wrapper/RTAS/juce_RTAS_MacResources.r",
  784. "extras/audio plugins/wrapper/RTAS/juce_RTAS_MacUtilities.mm",
  785. "extras/audio plugins/wrapper/RTAS/juce_RTAS_Wrapper.cpp" };
  786. for (int i = 0; i < numElementsInArray (files); ++i)
  787. s.add (getJucePathFromTargetFolder().getChildFile (files[i]));
  788. }
  789. return s;
  790. }
  791. const String createAUWrappersGroup()
  792. {
  793. Array<RelativePath> auWrappers;
  794. const char* files[] = { "extras/audio plugins/wrapper/AU/juce_AU_Resources.r",
  795. "extras/audio plugins/wrapper/AU/juce_AU_Wrapper.mm" };
  796. int i;
  797. for (i = 0; i < numElementsInArray (files); ++i)
  798. auWrappers.add (getJucePathFromTargetFolder().getChildFile (files[i]));
  799. const char* appleAUFiles[] = { "Extras/CoreAudio/PublicUtility/CADebugMacros.h",
  800. "Extras/CoreAudio/PublicUtility/CAAUParameter.cpp",
  801. "Extras/CoreAudio/PublicUtility/CAAUParameter.h",
  802. "Extras/CoreAudio/PublicUtility/CAAudioChannelLayout.cpp",
  803. "Extras/CoreAudio/PublicUtility/CAAudioChannelLayout.h",
  804. "Extras/CoreAudio/PublicUtility/CAMutex.cpp",
  805. "Extras/CoreAudio/PublicUtility/CAMutex.h",
  806. "Extras/CoreAudio/PublicUtility/CAStreamBasicDescription.cpp",
  807. "Extras/CoreAudio/PublicUtility/CAStreamBasicDescription.h",
  808. "Extras/CoreAudio/PublicUtility/CAVectorUnitTypes.h",
  809. "Extras/CoreAudio/PublicUtility/CAVectorUnit.cpp",
  810. "Extras/CoreAudio/PublicUtility/CAVectorUnit.h",
  811. "Extras/CoreAudio/AudioUnits/AUPublic/AUViewBase/AUViewLocalizedStringKeys.h",
  812. "Extras/CoreAudio/AudioUnits/AUPublic/AUCarbonViewBase/AUCarbonViewDispatch.cpp",
  813. "Extras/CoreAudio/AudioUnits/AUPublic/AUCarbonViewBase/AUCarbonViewControl.cpp",
  814. "Extras/CoreAudio/AudioUnits/AUPublic/AUCarbonViewBase/AUCarbonViewControl.h",
  815. "Extras/CoreAudio/AudioUnits/AUPublic/AUCarbonViewBase/CarbonEventHandler.cpp",
  816. "Extras/CoreAudio/AudioUnits/AUPublic/AUCarbonViewBase/CarbonEventHandler.h",
  817. "Extras/CoreAudio/AudioUnits/AUPublic/AUCarbonViewBase/AUCarbonViewBase.cpp",
  818. "Extras/CoreAudio/AudioUnits/AUPublic/AUCarbonViewBase/AUCarbonViewBase.h",
  819. "Extras/CoreAudio/AudioUnits/AUPublic/AUBase/AUBase.cpp",
  820. "Extras/CoreAudio/AudioUnits/AUPublic/AUBase/AUBase.h",
  821. "Extras/CoreAudio/AudioUnits/AUPublic/AUBase/AUDispatch.cpp",
  822. "Extras/CoreAudio/AudioUnits/AUPublic/AUBase/AUDispatch.h",
  823. "Extras/CoreAudio/AudioUnits/AUPublic/AUBase/AUInputElement.cpp",
  824. "Extras/CoreAudio/AudioUnits/AUPublic/AUBase/AUInputElement.h",
  825. "Extras/CoreAudio/AudioUnits/AUPublic/AUBase/AUOutputElement.cpp",
  826. "Extras/CoreAudio/AudioUnits/AUPublic/AUBase/AUOutputElement.h",
  827. "Extras/CoreAudio/AudioUnits/AUPublic/AUBase/AUResources.r",
  828. "Extras/CoreAudio/AudioUnits/AUPublic/AUBase/AUScopeElement.cpp",
  829. "Extras/CoreAudio/AudioUnits/AUPublic/AUBase/AUScopeElement.h",
  830. "Extras/CoreAudio/AudioUnits/AUPublic/AUBase/ComponentBase.cpp",
  831. "Extras/CoreAudio/AudioUnits/AUPublic/AUBase/ComponentBase.h",
  832. "Extras/CoreAudio/AudioUnits/AUPublic/OtherBases/AUMIDIBase.cpp",
  833. "Extras/CoreAudio/AudioUnits/AUPublic/OtherBases/AUMIDIBase.h",
  834. "Extras/CoreAudio/AudioUnits/AUPublic/OtherBases/AUMIDIEffectBase.cpp",
  835. "Extras/CoreAudio/AudioUnits/AUPublic/OtherBases/AUMIDIEffectBase.h",
  836. "Extras/CoreAudio/AudioUnits/AUPublic/OtherBases/AUOutputBase.cpp",
  837. "Extras/CoreAudio/AudioUnits/AUPublic/OtherBases/AUOutputBase.h",
  838. "Extras/CoreAudio/AudioUnits/AUPublic/OtherBases/MusicDeviceBase.cpp",
  839. "Extras/CoreAudio/AudioUnits/AUPublic/OtherBases/MusicDeviceBase.h",
  840. "Extras/CoreAudio/AudioUnits/AUPublic/OtherBases/AUEffectBase.cpp",
  841. "Extras/CoreAudio/AudioUnits/AUPublic/OtherBases/AUEffectBase.h",
  842. "Extras/CoreAudio/AudioUnits/AUPublic/Utility/AUBuffer.cpp",
  843. "Extras/CoreAudio/AudioUnits/AUPublic/Utility/AUBuffer.h",
  844. "Extras/CoreAudio/AudioUnits/AUPublic/Utility/AUDebugDispatcher.cpp",
  845. "Extras/CoreAudio/AudioUnits/AUPublic/Utility/AUDebugDispatcher.h",
  846. "Extras/CoreAudio/AudioUnits/AUPublic/Utility/AUInputFormatConverter.h",
  847. "Extras/CoreAudio/AudioUnits/AUPublic/Utility/AUSilentTimeout.h",
  848. "Extras/CoreAudio/AudioUnits/AUPublic/Utility/AUTimestampGenerator.h" };
  849. StringArray fileIDs, appleFileIDs;
  850. for (i = 0; i < auWrappers.size(); ++i)
  851. {
  852. addFile (auWrappers.getReference(i), shouldFileBeCompiledByDefault (auWrappers.getReference(i)), false);
  853. fileIDs.add (createID (auWrappers.getReference(i)));
  854. }
  855. for (i = 0; i < numElementsInArray (appleAUFiles); ++i)
  856. {
  857. RelativePath file (appleAUFiles[i], RelativePath::unknown);
  858. const String fileRefID (createID (file));
  859. addFileReference (file, "DEVELOPER_DIR", getFileType (file), fileRefID);
  860. if (shouldFileBeCompiledByDefault (file))
  861. addBuildFile (file, fileRefID, true, true);
  862. appleFileIDs.add (fileRefID);
  863. }
  864. const String appleGroupID (createID ("__juceappleaufiles"));
  865. addGroup (appleGroupID, "Apple AU Files", appleFileIDs);
  866. fileIDs.add (appleGroupID);
  867. const String groupID (createID ("__juceaufiles"));
  868. addGroup (groupID, "Juce AU Wrapper", fileIDs);
  869. return groupID;
  870. }
  871. };
  872. #endif // __JUCER_PROJECTEXPORT_XCODE_JUCEHEADER__