PDA

View Full Version : Third Party tool for deploy Qt Application on Mac?



vishal.chauhan
4th May 2007, 09:45
Hi All,

I m working on qt 4.2.2 on Mac.
I have an application developed in qt and I want to deploy this on a Mac system which doesnot have Qt Installed.
I have tried the method by static linking but then I donot have the Image Support then I tried by using Bundle of application but nothing goes my way.

Now I want to ask Is there any third party tool available that takes the needed library at the time of creating bundle and the install the neeed lib to there respective position.


If any body knows then plzzz help me out.

Thanks.

patrik08
5th May 2007, 12:19
Hi All,

I m working on qt 4.2.2 on Mac.
I have an application developed in qt and I want to deploy this on a Mac system which doesnot have Qt Installed.
I have tried the method by static linking but then I donot have the Image Support then I tried by using Bundle of application but nothing goes my way.

Now I want to ask Is there any third party tool available that takes the needed library at the time of creating bundle and the install the neeed lib to there respective position.


If any body knows then plzzz help me out.

Thanks.


Image support gif tif jpg run only on not -static...

have a look on....

http://qtforum.de/forum/viewtopic.php?t=4123

Brandybuck
5th May 2007, 20:42
I have a script here on the wiki that may help: http://wiki.qtcentre.org/index.php?title=Mac_OSX_Deployment_Script

patrik08
10th May 2007, 08:58
I have a script here on the wiki that may help: http://wiki.qtcentre.org/index.php?title=Mac_OSX_Deployment_Script


Super!.. and how paste plugin qt-tif from 4.3 beta in to bundle?

install_name_tool can not activate plugin inside the bundle why?

I append on main all path ... && supported image format dont have tif.... only png :mad:



# on main.cpp
#if defined Q_WS_MAC
QStringList path;
path.append(QApplication::applicationDirPath());
QDir dir(QApplication::applicationDirPath());
dir.cdUp();
path.append(dir.absolutePath());
dir.cd("plugins");
path.append(dir.absolutePath());
dir.cdUp();
path.append(dir.absolutePath());
QApplication::setLibraryPaths(path);
QDir::setCurrent(dir.absolutePath()); /* here down -> Frameworks */
#endif

Brandybuck
12th May 2007, 20:40
install_name_tool can not activate plugin inside the bundle why?

I don't know. I don't use plugins much, and so I haven't run into this problem yet. I'll need to update my script for plugins one of these days.

giandrea77
10th February 2009, 17:22
Hi

great script, but I've a question. After script executin why i can't start the process from my dev machine? It works correctly on some other Mac.

thanks,
Andrea

ayoy
10th February 2009, 18:03
Hi,


Image support gif tif jpg run only on not -static...


Well, it's not 100% true. You can get support for images by compiling required plugins when building a statically linked Qt. This can be done by e.g.:

./configure -static -qt-gif -qt-libtiff -qt-libpng -qt-libmng -qt-libjpeg

Then, you have to manually specify the plugins you want to use in the project file, e.g.:

QTPLUGIN += qjpeg qgif
and load them in main.cpp:


Q_IMPORT_PLUGIN(qjpeg)
Q_IMPORT_PLUGIN(qgif)

int main( int argc, char **argv )
{
QApplication app( argc, argv );
...


Not very convenient, but works for me. Creates a universal binary that can be used across "dev" and "non-dev" Macs. The plugins have to be disabled when building with shared Qt, so I typically create a small patch file, and use it to amend the code for deployment builds.