Results 1 to 3 of 3

Thread: QT4: Deploying QT Assistant inside Mac OS X bundle

  1. #1
    Join Date
    Feb 2013
    Posts
    5
    Qt products
    Qt4
    Platforms
    MacOS X Windows

    Question QT4: Deploying QT Assistant inside Mac OS X bundle

    Hello!

    My application is using QT Assistant as a help viewer on Mac OS X. I am considering deploying QT Assistant with my application.
    I want my App Bundle to be self-contained as much as possible.

    I have reviewed the following options and none is good:

    1) Install QT Assistant as a separate application in /Developer/Application/Qt/ or whatever.
    Downsides:
    - My own App Bundle is not self-contained
    - I do not want an extra unexpected application to be installed to the user computer
    - I have either to install QT globally or duplicate QT libs both for my app and the Assistant.

    2) Install QT Assistant inside Contents/Applications subdirectory of my App Bundle (I have seen some OS X apps from Apple do this)
    Downsides:
    - Have to duplicate QT Libraries to both my Frameworks subdirectory as well as Frameworks subdirectory of QT Assistant.

    3) Put just QT Assistant executable to my Contents/MacOS/ subdirectory of my bundle
    Downsides:
    - QT Assistant is launched with the same icon as my own application

    What is standard or recommended way to deploy QT Assistant with QT-based software?

  2. #2
    Join Date
    Feb 2013
    Posts
    5
    Qt products
    Qt4
    Platforms
    MacOS X Windows

    Default Re: QT4: Deploying QT Assistant inside Mac OS X bundle

    Sorry for annoying, but I still did not find a suitable solution for this question. Does anyone deploy QT Assistant on Mac??

  3. #3
    Join Date
    Feb 2013
    Posts
    5
    Qt products
    Qt4
    Platforms
    MacOS X Windows

    Default Re: QT4: Deploying QT Assistant inside Mac OS X bundle

    In case someone will face this problem also - I chose the third variant.

    Howto:

    1) Copy Assistant (I use stripped no-webkit version) to some directory.
    2) !! Copy Qt/plugins/sqldrivers/libqsqlite.dylib inside Assistant bundle
    3) macdeployqt Assistant.
    4) Copy MacOS, PlugIns and Frameworks directory from the Assistant bundle to your app bundle.
    5) macdeployqt your application.
    6) !! Make sure you have qt.conf in your app bundle directory (I have to copy it myself since I use -no-plugins for macdeployqt). Otherwise your app just crashes.

    qt.conf:
    [Paths]
    Plugins = PlugIns

    Here is the QMake pro-file code:

    RESOURCE_FILES.files = Resources/Mac/qt.conf
    RESOURCE_FILES.path = Contents/Resources/
    QMAKE_BUNDLE_DATA += RESOURCE_FILES

    QMAKE_POST_LINK += rm -r ./../Assistant/Assistant.app;
    QMAKE_POST_LINK += mkdir -p ./../Assistant/Assistant.app;
    QMAKE_POST_LINK += cp -R ../Assistant_nokit/Assistant.app ./../Assistant/;
    # sqlite driver is necessary for assistant
    QMAKE_POST_LINK += mkdir -p ./../Assistant/Assistant.app/Contents/PlugIns/sqldrivers;
    QMAKE_POST_LINK += cp /Developer/Applications/Qt/plugins/sqldrivers/libqsqlite.dylib ./../Assistant/Assistant.app/Contents/PlugIns/sqldrivers;

    QMAKE_POST_LINK += macdeployqt ./../Assistant/Assistant.app;

    QMAKE_POST_LINK += cp ./../Assistant/Assistant.app/Contents/MacOS/Assistant ./YourApp.app/Contents/MacOS/;
    QMAKE_POST_LINK += cp -R ./../Assistant/Assistant.app/Contents/Frameworks ./YourApp.app/Contents/Frameworks;
    QMAKE_POST_LINK += cp -R ./../Assistant/Assistant.app/Contents/PlugIns ./YourApp.app/Contents/PlugIns;

    QMAKE_POST_LINK += macdeployqt YourApp.app -dmg -no-plugins;

    Voilà !

Similar Threads

  1. Bundle SDL Framework in Bundle
    By chriskon149 in forum Installation and Deployment
    Replies: 3
    Last Post: 27th June 2012, 06:11
  2. OSX QSettings IniFormat SystemScope saving inside the bundle
    By JoZCaVaLLo in forum Qt Programming
    Replies: 1
    Last Post: 27th April 2012, 10:21
  3. Deploying Qt Assistant on Windows
    By ich_bins in forum Installation and Deployment
    Replies: 0
    Last Post: 10th March 2011, 10:42
  4. deploying assistant
    By GrahamLabdon in forum Newbie
    Replies: 0
    Last Post: 5th January 2011, 14:30
  5. Replies: 1
    Last Post: 15th April 2010, 19:05

Tags for this Thread

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.