Results 1 to 7 of 7

Thread: Third Party tool for deploy Qt Application on Mac?

  1. #1
    Join Date
    Dec 2006
    Posts
    211
    Thanks
    27
    Qt products
    Qt4
    Platforms
    MacOS X Windows

    Question Third Party tool for deploy Qt Application on Mac?

    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.

  2. #2
    Join Date
    May 2006
    Posts
    788
    Thanks
    49
    Thanked 48 Times in 46 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Third Party tool for deploy Qt Application on Mac?

    Quote Originally Posted by vishal.chauhan View Post
    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

  3. #3
    Join Date
    Mar 2006
    Location
    Mountain View, California
    Posts
    489
    Thanks
    3
    Thanked 74 Times in 54 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Third Party tool for deploy Qt Application on Mac?

    I have a script here on the wiki that may help: http://wiki.qtcentre.org/index.php?t...loyment_Script

  4. The following 3 users say thank you to Brandybuck for this useful post:

    innerhippy (25th January 2009), patrik08 (10th May 2007), vishal.chauhan (8th May 2007)

  5. #4
    Join Date
    May 2006
    Posts
    788
    Thanks
    49
    Thanked 48 Times in 46 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Third Party tool for deploy Qt Application on Mac?

    Quote Originally Posted by Brandybuck View Post
    I have a script here on the wiki that may help: http://wiki.qtcentre.org/index.php?t...loyment_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

    Qt Code:
    1. # on main.cpp
    2. #if defined Q_WS_MAC
    3. path.append(QApplication::applicationDirPath());
    4. QDir dir(QApplication::applicationDirPath());
    5. dir.cdUp();
    6. path.append(dir.absolutePath());
    7. dir.cd("plugins");
    8. path.append(dir.absolutePath());
    9. dir.cdUp();
    10. path.append(dir.absolutePath());
    11. QApplication::setLibraryPaths(path);
    12. QDir::setCurrent(dir.absolutePath()); /* here down -> Frameworks */
    13. #endif
    To copy to clipboard, switch view to plain text mode 

  6. #5
    Join Date
    Mar 2006
    Location
    Mountain View, California
    Posts
    489
    Thanks
    3
    Thanked 74 Times in 54 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Third Party tool for deploy Qt Application on Mac?

    Quote Originally Posted by patrik08 View Post
    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.

  7. #6
    Join Date
    Jan 2009
    Location
    Italy
    Posts
    10
    Qt products
    Qt4
    Platforms
    MacOS X Windows

    Default Re: Third Party tool for deploy Qt Application on Mac?

    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

  8. #7
    Join Date
    Feb 2009
    Location
    ŁÃ³dź, Poland
    Posts
    20
    Thanked 6 Times in 6 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Third Party tool for deploy Qt Application on Mac?

    Hi,

    Quote Originally Posted by patrik08 View Post
    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.:
    Qt Code:
    1. QTPLUGIN += qjpeg qgif
    To copy to clipboard, switch view to plain text mode 
    and load them in main.cpp:
    Qt Code:
    1. Q_IMPORT_PLUGIN(qjpeg)
    2. Q_IMPORT_PLUGIN(qgif)
    3.  
    4. int main( int argc, char **argv )
    5. {
    6. QApplication app( argc, argv );
    7. ...
    To copy to clipboard, switch view to plain text mode 

    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.

Similar Threads

  1. dll + application
    By fpujol in forum Qt Programming
    Replies: 11
    Last Post: 15th April 2007, 18:37
  2. Replies: 3
    Last Post: 8th December 2006, 18:51

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.