Drag'n dropping plugins in plugin host

When draggin a plugin file onto the plugin host, something goes wrong in the scanning process, such that the manufacturer is not correctly displayed in the list of known plugins… it shoes some other info instead, usually a rather cryptic string.

Any plugin, or just particular ones? AU or VST? Mac or PC?

The majority of plugins, it seems… among them the JUCE demo plugin, which is listed among “Other”. AU and VST on Mac for sure, PC I’d have to check again… no access to a Windows PC before tomorrow evening, sorry!

Working well under Windows. Sorry, I’ve only just now gotten around to test it…

I’ve played with this a bit more, and here’s what I’d like to propose: currently, in juce_AudioUnitPluginFormat.mm starting from line 196, we have

CFTypeRef manuString = CFBundleGetValueForInfoDictionaryKey (bundleRef, CFSTR("CFBundleGetInfoString"));

                if (manuString != 0 && CFGetTypeID (manuString) == CFStringGetTypeID())
                    manufacturer = String::fromCFString ((CFStringRef) manuString);

Now the info string is, as my experience shows, more often than not either empty or filled with something like “Copyright 2010…”. To get the manufacturer name, a better (albeit not perfect) solution would be to look at the bundle identifier, which is usually com.manufacturer.pluginname , and extract the manufacturer with

CFStringRef manuString = CFBundleGetIdentifier(bundleRef);
                manufacturer = String::fromCFString(manuString).fromFirstOccurrenceOf(".", false, false);
                manufacturer = manufacturer.upToFirstOccurrenceOf(".", false, false);

What do you think?

EDIT: actually I’d like to add another safety net on line 220:

if (ComponentRecord* comp = FindNextComponent (0, &desc))
                                getAUDetails (comp, name, manufacturer);

This fills in the correct manufacturer AND also the correct plugin name, which is not always identical to the bundle name.

Seems like a sensible idea, thanks, will have a think about that.