[Clam-devel] Designer plugins on macosx bundles

David García Garzón dgarcia at iua.upf.edu
Fri Jan 26 07:56:07 PST 2007

Hi, all.

We want to distribute standalone macosx[1] binaries in a bundle containing 
Qt 4 Designer and another with our own application, the Prototyper. Both use a 
designer plugin with our custom audio widgets. More details on the project 
and on why we need that, at the end, i'll try to get to the core.
[1] http://clam.iua.upf.edu/download/mac/cvssnapshots/

Following the documentation[2], we got the 'Prototyper' bundle to use the 
plugin. Just by placing it on the Contents/plugins directory (not 
Contents/plugins/designer/ which surprised me, coming from Linux and Windows 
Qt development) and adding the code:
    QDir dir(QApplication::applicationDirPath()+"/../plugins");
    loader.addPluginPath( dir.absolutePath() );
We also moved all the recursive dependencies and rewrited library references 
using this generic script [2]. The resulting bundle works really nicely.

[1] http://doc.trolltech.com/4.2/deployment-mac.html

So here is the problem we need help for:
We also need to distribute a different bundle for Qt Designer, with the 
plugin, so that users can design their own interfaces to be loaded by the 
former app. But we don't want to modify the designer official source and thus 
the previous cited code can not be inserted. So, we should rely on other 
plugin location mechanisms.

We tried different mechanism without no success at all:
- Just placing it on Designer.app/Contents/plugins (and doing the library name 
reallocation as we did for Prototyper)
- Placing it on Designer.app/Contents/plugins/designer
- According to [1], we tried both locations using a qt.conf file on 
Designer.app/Contents/Resources/ containing
 This would be even not needed believing what [2] says: by default it already 
should looks for plugins at Contents/plugins but of course this is not 
- Defining the env var QT_PLUGIN_PATH pointing to the 
Designer.app/Content/plugins with absolute path, relative to the shell 
location, to the Content and relative to the binary.
- Renaming de designer binary to avoid collision and move the plugins to 

The combinatorial is so high that we could have miss some mix of conditions. 
To avoid variables related to the plugin building we used the arthur plugin 
instead ours and got the same sad results.

So, we are stuck and if anyone in the list could give us some hint it would be 
very wellcome.


PS: Our project is a visual development environment for audio applications, 
which is part of the CLAM framework [1]. The idea be able to design the 
processing core with a patching tool, then build the interface with Qt 
Designer using custom audio widgets and run the whole thing without writing a 
single line of code[2]. We have this working on Linux and Windows and now we 
are porting that to MacOSX, a platform we are not very proficient.

[1] http://clam.iua.upf.edu
[2] http://iua-share.upf.edu/wikis/clam/index.php/Network_Editor_tutorial

David García Garzón
(Work) dgarcia at iua dot upf anotherdot es
(Home) vokimon at telefonica adot net

More information about the clam-devel mailing list