Trolltech Home | Qt-interest Home | Recent Threads | All Threads | Author | Date
All threads index page 1

Qt-interest Archive, February 2007
Standalone Qt Designer binary for MacOSX and Plugin problems


Message 1 in thread

Hello, list.

We need to distribute an standalone Qt Designer binary for MacOSX. We have a 
compiled version of qt-mac-opensource-src-4.2.2.tar.gz with default options. 
We just copied the bundle, moved all the dependants libraries to the 
Contents/Frameworks inside the bundle and fixed the libraries references and 
id's using this script [1].

The bundle works properly in a clean (no Qt installed) Mac box. The problem is 
to distribute also the designer plugins such arthur's or our own ones. We 
don't know how to place the plugins in the bundle without modifying the 
designer source code.

Some documentation[2] says that the proper place is the Contents/Plugins 
folder (without the 'designer' subfolder) so Mac users could add and remove 
plugins from their file manager. We did that with our own programs and it 
worked but by calling QApp::addLibraryPath and we don't want to modify 
designer's source.

Some alternatives [3], such as setting a relative path in QT_PLUGIN_PATH or 
adding a qt.conf to Contents/Resources, didn't work but we are not sure where 
they should point to. According to [4], the default value for qt.conf plugins 
should already point to Contents/plugins

Any ideas?

David.

[1] 
http://iua-share.upf.edu/svn/clam/trunk/CLAM/scons/sconstools/addDependentLibsToBundle.py
[2] http://doc.trolltech.com/4.2/deployment-mac.html
[3] http://doc.trolltech.com/4.2/plugins-howto.html
[4] http://doc.trolltech.com/4.2/qt-conf.html

--
 [ signature omitted ] 

Message 2 in thread

Sorry, I can't say I've ever tried that. I'd be interested to hear
about the results. What are you doing with your designer plugins?

On 2/1/07, David García Garzón <dgarcia@xxxxxxxxxxx> wrote:
> Hello, list.
>
> We need to distribute an standalone Qt Designer binary for MacOSX. We have a
> compiled version of qt-mac-opensource-src-4.2.2.tar.gz with default options.
> We just copied the bundle, moved all the dependants libraries to the
> Contents/Frameworks inside the bundle and fixed the libraries references and
> id's using this script [1].
>
> The bundle works properly in a clean (no Qt installed) Mac box. The problem is
> to distribute also the designer plugins such arthur's or our own ones. We
> don't know how to place the plugins in the bundle without modifying the
> designer source code.
>
> Some documentation[2] says that the proper place is the Contents/Plugins
> folder (without the 'designer' subfolder) so Mac users could add and remove
> plugins from their file manager. We did that with our own programs and it
> worked but by calling QApp::addLibraryPath and we don't want to modify
> designer's source.
>
> Some alternatives [3], such as setting a relative path in QT_PLUGIN_PATH or
> adding a qt.conf to Contents/Resources, didn't work but we are not sure where
> they should point to. According to [4], the default value for qt.conf plugins
> should already point to Contents/plugins
>
> Any ideas?
>
> David.
>
> [1]
> http://iua-share.upf.edu/svn/clam/trunk/CLAM/scons/sconstools/addDependentLibsToBundle.py
> [2] http://doc.trolltech.com/4.2/deployment-mac.html
> [3] http://doc.trolltech.com/4.2/plugins-howto.html
> [4] http://doc.trolltech.com/4.2/qt-conf.html
>
> --
> To unsubscribe - send a mail to qt-interest-request@xxxxxxxxxxxxx with "unsubscribe" in the subject or the body.
> List archive and information: http://lists.trolltech.com/qt-interest/
>
>


-- 
 [ signature omitted ] 

Message 3 in thread

Well, we tried three different locations:
- Contents/MacOS/designer (renaming the binary to QtDesigner)
- Contents/plugins
- Contents/plugins/designer
and rewriting the dependent library locations also on the plugin dylib file as 
we do with the binary. Doing just this is not enough. The second option, at 
least, shows the plugins on the bundle filemanager properties and it fully 
works with our own program by adding:
       QUiLoader loader;
       QDir dir(QApplication::applicationDirPath());
        loader.addPluginPath( QString(dir.absolutePath())+"/../plugins" );
on the application (it could be also done with QCoreApp::addLibraryPath).

So in order to make them visible without modifying the designer we tried to 
define QTDIR to the Contents/plugins path in several ways (relative to the 
MacOS folder, to the Contents folder, absolute path...). None worked.

And at last we tried to add a qt.conf file to Contents/Resources defining
plugins=plugins, althought documentations says that it will look for 
$Prefix/$Plugins and by default the Prefix in a bundle is set to the Contents 
folder and Plugins is 'plugins'.

I also wonder why the 'designer' folder needed on linux and windows is not 
needed in MacOS.


On Friday 02 February 2007 12:55:49 Patrick Stinson wrote:
> Sorry, I can't say I've ever tried that. I'd be interested to hear
> about the results. What are you doing with your designer plugins?
>
> On 2/1/07, David García Garzón <dgarcia@xxxxxxxxxxx> wrote:
> > Hello, list.
> >
> > We need to distribute an standalone Qt Designer binary for MacOSX. We
> > have a compiled version of qt-mac-opensource-src-4.2.2.tar.gz with
> > default options. We just copied the bundle, moved all the dependants
> > libraries to the Contents/Frameworks inside the bundle and fixed the
> > libraries references and id's using this script [1].
> >
> > The bundle works properly in a clean (no Qt installed) Mac box. The
> > problem is to distribute also the designer plugins such arthur's or our
> > own ones. We don't know how to place the plugins in the bundle without
> > modifying the designer source code.
> >
> > Some documentation[2] says that the proper place is the Contents/Plugins
> > folder (without the 'designer' subfolder) so Mac users could add and
> > remove plugins from their file manager. We did that with our own programs
> > and it worked but by calling QApp::addLibraryPath and we don't want to
> > modify designer's source.
> >
> > Some alternatives [3], such as setting a relative path in QT_PLUGIN_PATH
> > or adding a qt.conf to Contents/Resources, didn't work but we are not
> > sure where they should point to. According to [4], the default value for
> > qt.conf plugins should already point to Contents/plugins
> >
> > Any ideas?
> >
> > David.
> >
> > [1]
> > http://iua-share.upf.edu/svn/clam/trunk/CLAM/scons/sconstools/addDependen
> >tLibsToBundle.py [2] http://doc.trolltech.com/4.2/deployment-mac.html
> > [3] http://doc.trolltech.com/4.2/plugins-howto.html
> > [4] http://doc.trolltech.com/4.2/qt-conf.html
> >
> > --
> > To unsubscribe - send a mail to qt-interest-request@xxxxxxxxxxxxx with
> > "unsubscribe" in the subject or the body. List archive and information:
> > http://lists.trolltech.com/qt-interest/


--
 [ signature omitted ] 

Message 4 in thread

Hi, patrick. I solved the 'designer' folder mistery. But plugins are still not 
working.

In reply to your question and according to this documentation:
http://doc.trolltech.com/4.2/plugins-howto.html
And if i'am not missing something, It looks for plugins in:
	Application's binary location
	Any directory in environment var QT_PLUGIN_PATH
	QLibraryInfo::PluginsPath
		which defaults to $QTDIR/plugins (QTDIR on qt compilation time)
		and in bundled apps to Contents/plugins (if i'm not wrong)
		but can be changed with qt.conf
	Any directory you add with
		QCoreApplication::setLibraryPaths
For all those directories it looks for the 'designer' subfolder.

But for the paths added with QUiLoader::addPluginPath It just includes the 
directory as is without the designer subfolder. So, because we used such a 
function on our application, it worked well without the designer subfolder. 
And of course, any other mechanism (QT_PLUGIN_PATH, qt.conf...) which are the 
ones we can use with Designer bundle need a designer subfolder.

On Monday i will get access again to a Mac box so i will try again placing 
them on the designer folder. Anyway, we tried that before and it didn't work. 
We suspected that was a path relocation problem but we coudn't confirm that 
point.

Now we have a gun: QT_DEBUG_PLUGINS ;-) I hope i can post here on monday a 
successfull end to this issue.

David.

On Friday 02 February 2007 22:39:15 Patrick Stinson wrote:
> Have you seen any documentation or source code that says that designer
> will look anywhere other than the qt install directory's plugin
> folder? I haven't, but I haven't looked either.
>
> which "designer folder are you talking about? the one in ./plugins? It
> *is* required on OS X.
>
> On 2/2/07, David García Garzón <dgarcia@xxxxxxxxxxx> wrote:
> > Well, we tried three different locations:
> > - Contents/MacOS/designer (renaming the binary to QtDesigner)
> > - Contents/plugins
> > - Contents/plugins/designer
> > and rewriting the dependent library locations also on the plugin dylib
> > file as we do with the binary. Doing just this is not enough. The second
> > option, at least, shows the plugins on the bundle filemanager properties
> > and it fully works with our own program by adding:
> >        QUiLoader loader;
> >        QDir dir(QApplication::applicationDirPath());
> >         loader.addPluginPath( QString(dir.absolutePath())+"/../plugins"
> > ); on the application (it could be also done with
> > QCoreApp::addLibraryPath).
> >
> > So in order to make them visible without modifying the designer we tried
> > to define QTDIR to the Contents/plugins path in several ways (relative to
> > the MacOS folder, to the Contents folder, absolute path...). None worked.
> >
> > And at last we tried to add a qt.conf file to Contents/Resources defining
> > plugins=plugins, althought documentations says that it will look for
> > $Prefix/$Plugins and by default the Prefix in a bundle is set to the
> > Contents folder and Plugins is 'plugins'.
> >
> > I also wonder why the 'designer' folder needed on linux and windows is
> > not needed in MacOS.
> >
> > On Friday 02 February 2007 12:55:49 Patrick Stinson wrote:
> > > Sorry, I can't say I've ever tried that. I'd be interested to hear
> > > about the results. What are you doing with your designer plugins?
> > >
> > > On 2/1/07, David García Garzón <dgarcia@xxxxxxxxxxx> wrote:
> > > > Hello, list.
> > > >
> > > > We need to distribute an standalone Qt Designer binary for MacOSX. We
> > > > have a compiled version of qt-mac-opensource-src-4.2.2.tar.gz with
> > > > default options. We just copied the bundle, moved all the dependants
> > > > libraries to the Contents/Frameworks inside the bundle and fixed the
> > > > libraries references and id's using this script [1].
> > > >
> > > > The bundle works properly in a clean (no Qt installed) Mac box. The
> > > > problem is to distribute also the designer plugins such arthur's or
> > > > our own ones. We don't know how to place the plugins in the bundle
> > > > without modifying the designer source code.
> > > >
> > > > Some documentation[2] says that the proper place is the
> > > > Contents/Plugins folder (without the 'designer' subfolder) so Mac
> > > > users could add and remove plugins from their file manager. We did
> > > > that with our own programs and it worked but by calling
> > > > QApp::addLibraryPath and we don't want to modify designer's source.
> > > >
> > > > Some alternatives [3], such as setting a relative path in
> > > > QT_PLUGIN_PATH or adding a qt.conf to Contents/Resources, didn't work
> > > > but we are not sure where they should point to. According to [4], the
> > > > default value for qt.conf plugins should already point to
> > > > Contents/plugins
> > > >
> > > > Any ideas?
> > > >
> > > > David.
> > > >
> > > > [1]
> > > > http://iua-share.upf.edu/svn/clam/trunk/CLAM/scons/sconstools/addDepe
> > > >nden tLibsToBundle.py [2]
> > > > http://doc.trolltech.com/4.2/deployment-mac.html [3]
> > > > http://doc.trolltech.com/4.2/plugins-howto.html
> > > > [4] http://doc.trolltech.com/4.2/qt-conf.html
> > > >
> > > > --
> > > > To unsubscribe - send a mail to qt-interest-request@xxxxxxxxxxxxx
> > > > with "unsubscribe" in the subject or the body. List archive and
> > > > information: http://lists.trolltech.com/qt-interest/


--
 [ signature omitted ] 

Message 5 in thread

On 2/3/07, David García Garzón <dgarcia@xxxxxxxxxxx> wrote:
> Hi, patrick. I solved the 'designer' folder mistery. But plugins are still not
> working.
>
> In reply to your question and according to this documentation:
> http://doc.trolltech.com/4.2/plugins-howto.html
> And if i'am not missing something, It looks for plugins in:
>         Application's binary location
>         Any directory in environment var QT_PLUGIN_PATH
>         QLibraryInfo::PluginsPath
>                 which defaults to $QTDIR/plugins (QTDIR on qt compilation time)
>                 and in bundled apps to Contents/plugins (if i'm not wrong)
>                 but can be changed with qt.conf
>         Any directory you add with
>                 QCoreApplication::setLibraryPaths
> For all those directories it looks for the 'designer' subfolder.
>
> But for the paths added with QUiLoader::addPluginPath It just includes the
> directory as is without the designer subfolder. So, because we used such a
> function on our application, it worked well without the designer subfolder.
> And of course, any other mechanism (QT_PLUGIN_PATH, qt.conf...) which are the
> ones we can use with Designer bundle need a designer subfolder.
>
> On Monday i will get access again to a Mac box so i will try again placing
> them on the designer folder. Anyway, we tried that before and it didn't work.
> We suspected that was a path relocation problem but we coudn't confirm that
> point.
>
> Now we have a gun: QT_DEBUG_PLUGINS ;-) I hope i can post here on monday a
> successfull end to this issue.
>
> David.
>
> On Friday 02 February 2007 22:39:15 Patrick Stinson wrote:
> > Have you seen any documentation or source code that says that designer
> > will look anywhere other than the qt install directory's plugin
> > folder? I haven't, but I haven't looked either.
> >
> > which "designer folder are you talking about? the one in ./plugins? It
> > *is* required on OS X.
> >
> > On 2/2/07, David García Garzón <dgarcia@xxxxxxxxxxx> wrote:
> > > Well, we tried three different locations:
> > > - Contents/MacOS/designer (renaming the binary to QtDesigner)
> > > - Contents/plugins
> > > - Contents/plugins/designer
> > > and rewriting the dependent library locations also on the plugin dylib
> > > file as we do with the binary. Doing just this is not enough. The second
> > > option, at least, shows the plugins on the bundle filemanager properties
> > > and it fully works with our own program by adding:
> > >        QUiLoader loader;
> > >        QDir dir(QApplication::applicationDirPath());
> > >         loader.addPluginPath( QString(dir.absolutePath())+"/../plugins"
> > > ); on the application (it could be also done with
> > > QCoreApp::addLibraryPath).
> > >
> > > So in order to make them visible without modifying the designer we tried
> > > to define QTDIR to the Contents/plugins path in several ways (relative to
> > > the MacOS folder, to the Contents folder, absolute path...). None worked.
> > >
> > > And at last we tried to add a qt.conf file to Contents/Resources defining
> > > plugins=plugins, althought documentations says that it will look for
> > > $Prefix/$Plugins and by default the Prefix in a bundle is set to the
> > > Contents folder and Plugins is 'plugins'.
> > >
> > > I also wonder why the 'designer' folder needed on linux and windows is
> > > not needed in MacOS.
> > >
> > > On Friday 02 February 2007 12:55:49 Patrick Stinson wrote:
> > > > Sorry, I can't say I've ever tried that. I'd be interested to hear
> > > > about the results. What are you doing with your designer plugins?
> > > >
> > > > On 2/1/07, David García Garzón <dgarcia@xxxxxxxxxxx> wrote:
> > > > > Hello, list.
> > > > >
> > > > > We need to distribute an standalone Qt Designer binary for MacOSX. We
> > > > > have a compiled version of qt-mac-opensource-src-4.2.2.tar.gz with
> > > > > default options. We just copied the bundle, moved all the dependants
> > > > > libraries to the Contents/Frameworks inside the bundle and fixed the
> > > > > libraries references and id's using this script [1].
> > > > >
> > > > > The bundle works properly in a clean (no Qt installed) Mac box. The
> > > > > problem is to distribute also the designer plugins such arthur's or
> > > > > our own ones. We don't know how to place the plugins in the bundle
> > > > > without modifying the designer source code.
> > > > >
> > > > > Some documentation[2] says that the proper place is the
> > > > > Contents/Plugins folder (without the 'designer' subfolder) so Mac
> > > > > users could add and remove plugins from their file manager. We did
> > > > > that with our own programs and it worked but by calling
> > > > > QApp::addLibraryPath and we don't want to modify designer's source.
> > > > >
> > > > > Some alternatives [3], such as setting a relative path in
> > > > > QT_PLUGIN_PATH or adding a qt.conf to Contents/Resources, didn't work
> > > > > but we are not sure where they should point to. According to [4], the
> > > > > default value for qt.conf plugins should already point to
> > > > > Contents/plugins
> > > > >

Guns don't kill people, people kill people! ...I guess...

> > > > > Any ideas?
> > > > >
> > > > > David.
> > > > >
> > > > > [1]
> > > > > http://iua-share.upf.edu/svn/clam/trunk/CLAM/scons/sconstools/addDepe
> > > > >nden tLibsToBundle.py [2]
> > > > > http://doc.trolltech.com/4.2/deployment-mac.html [3]
> > > > > http://doc.trolltech.com/4.2/plugins-howto.html
> > > > > [4] http://doc.trolltech.com/4.2/qt-conf.html
> > > > >
> > > > > --
> > > > > To unsubscribe - send a mail to qt-interest-request@xxxxxxxxxxxxx
> > > > > with "unsubscribe" in the subject or the body. List archive and
> > > > > information: http://lists.trolltech.com/qt-interest/
>
>
>


-- 
 [ signature omitted ]