Results 1 to 5 of 5

Thread: Qt 5.1 and Mac: Bug making macdeployqt not working properly

  1. #1

    Default Qt 5.1 and Mac: Bug making macdeployqt not working properly

    Hi,

    I have a problem since the version 5.1rc2 of Qt for Mac OS X. (5.1 is also affected, not the 5.1rc1)
    When I build my app and do a "otool -L" on the binary file to see the paths of the shared libraries, I get: (it's just a sample, I removed some of them for clarity)
    /System/Library/Frameworks/AppKit.framework/Versions/C/AppKit (compatibility version 45.0.0, current version 1187.37.0)
    /Users/chris/Qt5.1.0//5.1.0/clang_64/lib/QtWebKitWidgets.framework/Versions/5/QtWebKitWidgets (compatibility version 5.1.0, current version 5.1.0)
    /Users/chris/Qt5.1.0//5.1.0/clang_64/lib/QtQuick.framework/Versions/5/QtQuick (compatibility version 5.1.0, current version 5.1.0)
    /Users/chris/Qt5.1.0//5.1.0/clang_64/lib/QtQml.framework/Versions/5/QtQml (compatibility version 5.1.0, current version 5.1.0)
    /Users/chris/Qt5.1.0//5.1.0/clang_64/lib/QtNetwork.framework/Versions/5/QtNetwork (compatibility version 5.1.0, current version 5.1.0)
    /Users/chris/Qt5.1.0//5.1.0/clang_64/lib/QtCore.framework/Versions/5/QtCore (compatibility version 5.1.0, current version 5.1.0)
    /Users/chris/Qt5.1.0//5.1.0/clang_64/lib/QtGui.framework/Versions/5/QtGui (compatibility version 5.1.0, current version 5.1.0)
    As you can see there is a double slash in the path of the Qt libraries.
    When I use macdeployqt to deploy my app, those paths aren't changed to local frameworks (@executable_path/../Frameworks/...), because of this...
    I have to do it manually with the install_name_tool, and it's really annoying.

    What can I do to fix this? (I've tried re-installing Qt, cleaning, runing qmake again and rebuilding without change)

  2. #2
    Join Date
    Jul 2013
    Posts
    1
    Qt products
    Qt5
    Platforms
    MacOS X Unix/X11 Windows Android

    Default Re: Qt 5.1 and Mac: Bug making macdeployqt not working properly

    I wrote this little script to fix the paths... https://gist.github.com/lasconic/5965542

  3. #3
    Join Date
    Jan 2011
    Posts
    127
    Thanks
    42
    Thanked 4 Times in 4 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Qt 5.1 and Mac: Bug making macdeployqt not working properly

    Thanks, Iasconic, may you explain how should we use it?
    Besides, is it possible for us to use macdeploy to deploy other 3rd parties libs?
    I always combine openCV and Qt together

    ps : deploy 3rd party libs on mac is a nightmare for me, have no idea why they make things
    become so complicated?

  4. #4

    Default Re: Qt 5.1 and Mac: Bug making macdeployqt not working properly

    Quote Originally Posted by lasconic View Post
    I wrote this little script to fix the paths... https://gist.github.com/lasconic/5965542
    Thanks, I'll try that when I come back from holidays.
    But I already tried "install_name_tool -change" and it broked my binary because of Qxt dependencies.

  5. #5
    Join Date
    Jan 2011
    Posts
    127
    Thanks
    42
    Thanked 4 Times in 4 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Qt 5.1 and Mac: Bug making macdeployqt not working properly

    Found the answer from stack overflow
    http://stackoverflow.com/questions/1...rking-properly
    thanks to JimmyTaker

    You just need to replace YOURBINARY with e.g. myapp.app/Contents/MacOS/myapp

    And QTDIR=$1 with QTDIR=/Users/MyName/Qt5.1.0/5.1.0/clang_64

    Save the file in the same dir as myapp.app

    And run it with

    sh thankslasconic.sh

    then you can run

    macdeployqt myapp.app

    and it should work. For me it did. That is why I am posting it here.

    Added after 4 minutes:


    But this solution don't work for me, the error messages

    QQmlApplicationEngine failed to load component
    qrc:/qml/colorCorrection/mainDesktop.qml:4 module “QtQuick.Layouts” is not installed
    qrc:/qml/colorCorrection/mainDesktop.qml:2 module “QtQuick.Controls” is not installed
    qrc:/qml/colorCorrection/mainDesktop.qml:1 module “QtQuick” is not installed
    qrc:/qml/colorCorrection/mainDesktop.qml:3 module “QtQuick.Dialogs” is not installed
    qrc:/qml/colorCorrection/mainDesktop.qml:4 module “QtQuick.Layouts” is not installed
    qrc:/qml/colorCorrection/mainDesktop.qml:2 module “QtQuick.Controls” is not installed
    qrc:/qml/colorCorrection/mainDesktop.qml:1 module “QtQuick” is not installed
    qrc:/qml/colorCorrection/mainDesktop.qml:3 module “QtQuick.Dialogs” is not installed
    qrc:/qml/colorCorrection/mainDesktop.qml:4 module “QtQuick.Layouts” is not installed
    qrc:/qml/colorCorrection/mainDesktop.qml:2 module “QtQuick.Controls” is not installed
    qrc:/qml/colorCorrection/mainDesktop.qml:1 module “QtQuick” is not installed
    qrc:/qml/colorCorrection/mainDesktop.qml:3 module “QtQuick.Dialogs” is not installed
    qrc:/qml/colorCorrection/mainDesktop.qml:4 module “QtQuick.Layouts” is not installed
    qrc:/qml/colorCorrection/mainDesktop.qml:2 module “QtQuick.Controls” is not installed
    qrc:/qml/colorCorrection/mainDesktop.qml:1 module “QtQuick” is not installed
    qrc:/qml/colorCorrection/mainDesktop.qml:3 module “QtQuick.Dialogs” is not installed
    Last edited by stereoMatching; 12th July 2013 at 17:44.

Similar Threads

  1. Qt::WindowStaysOnTopHint not working properly
    By swarnika in forum Qt Programming
    Replies: 10
    Last Post: 13th April 2013, 07:33
  2. Replies: 1
    Last Post: 7th December 2011, 00:49
  3. mapToGlobal/mapFromGlobal isn't working properly
    By janderson.daz in forum Qt Programming
    Replies: 7
    Last Post: 13th April 2011, 22:03
  4. memcpy not working properly
    By sattu in forum Qt Programming
    Replies: 3
    Last Post: 26th October 2010, 23:33
  5. ScrollZoomer not working properly..
    By Raghaw in forum Qwt
    Replies: 1
    Last Post: 30th October 2009, 06: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.