@@ -292,45 +292,44 @@ namespace juce::build_tools
292292 plistKey.addTextElement (" AudioComponents" );
293293
294294 XmlElement plistEntry (" array" );
295- auto * dict = plistEntry.createNewChildElement (" dict" );
296295
297- auto truncatedCode = pluginManufacturerCode. substring ( 0 , 4 ) ;
298- auto pluginSubType = pluginCode. substring ( 0 , 4 ) ;
296+ const std::vector<juce::String> auTypes { " aumu " , " aumf " } ;
297+ const std::vector<juce::String> subTypes { " 2kXa " , " 2kXL " } ;
299298
300- if (truncatedCode. toLowerCase () == truncatedCode )
299+ for ( int i = 0 ; i < auTypes. size (); i++ )
301300 {
302- throw SaveError (" AudioUnit plugin code identifiers invalid!\n\n "
303- " You have used only lower case letters in your AU plugin manufacturer identifier. "
304- " You must have at least one uppercase letter in your AU plugin manufacturer "
305- " identifier code." );
306- }
301+ const auto auType = auTypes[i];
302+ const auto subType = subTypes[i];
307303
308- addPlistDictionaryKey (*dict, " name" , pluginManufacturer + " : " + pluginName);
309- addPlistDictionaryKey (*dict, " description" , pluginDescription);
310- addPlistDictionaryKey (*dict, " factoryFunction" , pluginAUExportPrefix + " Factory" );
311- addPlistDictionaryKey (*dict, " manufacturer" , truncatedCode);
312- addPlistDictionaryKey (*dict, " type" , auMainType.removeCharacters (" '" ));
313- addPlistDictionaryKey (*dict, " subtype" , pluginSubType);
314- addPlistDictionaryKey (*dict, " version" , getAUVersionAsHexInteger (*this ));
304+ auto * dict = plistEntry.createNewChildElement (" dict" );
315305
316- if (isAuSandboxSafe)
317- {
318- addPlistDictionaryKey (*dict, " sandboxSafe" , true );
319- }
320- else if (! suppressResourceUsage)
321- {
322- dict->createNewChildElement (" key" )->addTextElement (" resourceUsage" );
323- auto * resourceUsageDict = dict->createNewChildElement (" dict" );
306+ addPlistDictionaryKey (*dict, " name" , " Izmar: VMPC2000XL AUv2" );
307+ addPlistDictionaryKey (*dict, " description" , pluginDescription);
308+ addPlistDictionaryKey (*dict, " factoryFunction" , pluginAUExportPrefix + " Factory" );
309+ addPlistDictionaryKey (*dict, " manufacturer" , " Izmr" );
310+ addPlistDictionaryKey (*dict, " type" , auType);
311+ addPlistDictionaryKey (*dict, " subtype" , subType);
312+ addPlistDictionaryKey (*dict, " version" , getAUVersionAsHexInteger (*this ));
324313
325- addPlistDictionaryKey (*resourceUsageDict, " network.client" , true );
326- addPlistDictionaryKey (*resourceUsageDict, " temporary-exception.files.all.read-write" , true );
327- }
314+ if (isAuSandboxSafe)
315+ {
316+ addPlistDictionaryKey (*dict, " sandboxSafe" , true );
317+ }
318+ else if (! suppressResourceUsage)
319+ {
320+ dict->createNewChildElement (" key" )->addTextElement (" resourceUsage" );
321+ auto * resourceUsageDict = dict->createNewChildElement (" dict" );
328322
329- if (isPluginARAEffect)
330- {
331- dict->createNewChildElement (" key" )->addTextElement (" tags" );
332- auto * tagsArray = dict->createNewChildElement (" array" );
333- tagsArray->createNewChildElement (" string" )->addTextElement (" ARA" );
323+ addPlistDictionaryKey (*resourceUsageDict, " network.client" , true );
324+ addPlistDictionaryKey (*resourceUsageDict, " temporary-exception.files.all.read-write" , true );
325+ }
326+
327+ if (isPluginARAEffect)
328+ {
329+ dict->createNewChildElement (" key" )->addTextElement (" tags" );
330+ auto * tagsArray = dict->createNewChildElement (" array" );
331+ tagsArray->createNewChildElement (" string" )->addTextElement (" ARA" );
332+ }
334333 }
335334
336335 return { plistKey, plistEntry };
@@ -347,29 +346,36 @@ namespace juce::build_tools
347346 addPlistDictionaryKey (plistEntry, " NSExtensionPointIdentifier" , " com.apple.AudioUnit-UI" );
348347 plistEntry.createNewChildElement (" key" )->addTextElement (" NSExtensionAttributes" );
349348
349+ const std::vector<juce::String> auTypes { " aumu" , " aumf" };
350+ const std::vector<juce::String> subTypes { " 2kXa" , " 2kXL" };
350351 auto * dict = plistEntry.createNewChildElement (" dict" );
352+
351353 dict->createNewChildElement (" key" )->addTextElement (" AudioComponents" );
352354 auto * componentArray = dict->createNewChildElement (" array" );
353355
354- auto * componentDict = componentArray->createNewChildElement (" dict" );
355356
356- addPlistDictionaryKey (*componentDict, " name" , pluginManufacturer + " : " + pluginName);
357- addPlistDictionaryKey (*componentDict, " description" , pluginDescription);
358- addPlistDictionaryKey (*componentDict, " factoryFunction" , pluginAUExportPrefix + " FactoryAUv3" );
359- addPlistDictionaryKey (*componentDict, " manufacturer" , pluginManufacturerCode.substring (0 , 4 ));
360- addPlistDictionaryKey (*componentDict, " type" , auMainType.removeCharacters (" '" ));
361- addPlistDictionaryKey (*componentDict, " subtype" , pluginCode.substring (0 , 4 ));
362- addPlistDictionaryKey (*componentDict, " version" , getAUVersionAsHexInteger (*this ));
363- addPlistDictionaryKey (*componentDict, " sandboxSafe" , true );
357+ for (int i = 0 ; i < auTypes.size (); i++)
358+ {
359+ const auto auType = auTypes[i];
360+ const auto subType = subTypes[i];
361+
362+ auto * componentDict = componentArray->createNewChildElement (" dict" );
364363
365- componentDict->createNewChildElement (" key" )->addTextElement (" tags" );
366- auto * tagsArray = componentDict->createNewChildElement (" array" );
364+ addPlistDictionaryKey (*componentDict, " name" , " Izmar: VMPC2000XL AUv3" );
365+ addPlistDictionaryKey (*componentDict, " description" , pluginDescription);
366+ addPlistDictionaryKey (*componentDict, " factoryFunction" , pluginAUExportPrefix + " FactoryAUv3" );
367+ addPlistDictionaryKey (*componentDict, " manufacturer" , " Izmr" );
368+ addPlistDictionaryKey (*componentDict, " type" , auType);
369+ addPlistDictionaryKey (*componentDict, " subtype" , subType);
370+ addPlistDictionaryKey (*componentDict, " version" , getAUVersionAsHexInteger (*this ));
371+ addPlistDictionaryKey (*componentDict, " sandboxSafe" , true );
367372
368- tagsArray ->createNewChildElement (" string " )
369- -> addTextElement (isPluginSynth ? " Synth " : " Effects " );
373+ componentDict ->createNewChildElement (" key " )-> addTextElement ( " tags " );
374+ auto * tagsArray = componentDict-> createNewChildElement ( " array " );
370375
371- if (auMainType.removeCharacters (" '" ) == " aumi" )
372- tagsArray->createNewChildElement (" string" )->addTextElement (" MIDI" );
376+ tagsArray->createNewChildElement (" string" )
377+ ->addTextElement (" Sampler" );
378+ }
373379
374380 return { plistKey, plistEntry };
375381 }
0 commit comments