[SOLVED] Problem with macdeployqt on Qt 5.4 RC



  • Today I've updated my Qt to Qt 5.4 RC and found the problem with macdeployqt tool. When I use this tool my application doesn't load and in console I see this error:
    @
    QQmlApplicationEngine failed to load component
    qrc:///qml/main.qml:1 module "QtQuick" plugin "qtquick2plugin" not found
    @

    I've checked the application bundle and found the problem. The problem is incorrect symlink to QML plugins libs from Resources/qml folder. Now I try to create a bash script to fix paths.

    Also I have a two more question about new version of macdeployqt tool.

    1. After call macdeployqt tool I can see errors with libz.1.dylib:
      @
      21:21:32: Starting: "/Volumes/Documents/Applications/Qt/Qt5.4.0/5.4/clang_64/bin/macdeployqt" QtForumReader/QtForumReader.app -qmldir=/Volumes/Documents/MyWork/PROJECTS/QtProjects/GIT/QtForumReader/Desktop/1.x/build-QtForumProject-Desktop_Qt_5_4_clang_64bit-Release/../QtForumProject/QtForumReader/qml '-codesign=3rd Party Mac Developer Application: <Team_ID>'
      ERROR: no file at "/opt/local/lib/libz.1.dylib"
      ERROR: no file at "/opt/local/lib/libz.1.dylib"
      ERROR: no file at "/opt/local/lib/libz.1.dylib"
      ERROR: no file at "/opt/local/lib/libz.1.dylib"
      ERROR: no file at "/opt/local/lib/libxslt.1.dylib"
      ERROR: no file at "/opt/local/lib/libz.1.dylib"
      ERROR: no file at "/opt/local/lib/libsqlite3.0.dylib"
      ERROR: "error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/otool: can't open file: QtForumReader/QtForumReader.app/Contents/Frameworks/libz.1.dylib (No such file or directory)
      "
      ERROR: Codesign signing error:
      ERROR: "Warning: usage of --preserve-metadata with option "resource-rules" (deprecated in Mac OS X >= 10.10)!
      QtForumReader/QtForumReader.app/Contents/Frameworks/libz.1.dylib: No such file or directory
      "
      ERROR: "error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/otool: can't open file: QtForumReader/QtForumReader.app/Contents/Frameworks/libsqlite3.0.dylib (No such file or directory)
      "
      ERROR: Codesign signing error:
      ERROR: "Warning: usage of --preserve-metadata with option "resource-rules" (deprecated in Mac OS X >= 10.10)!
      QtForumReader/QtForumReader.app/Contents/Frameworks/libsqlite3.0.dylib: No such file or directory
      "
      ERROR: "error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/otool: can't open file: QtForumReader/QtForumReader.app/Contents/Frameworks/libxslt.1.dylib (No such file or directory)
      "
      ERROR: Codesign signing error:
      ERROR: "Warning: usage of --preserve-metadata with option "resource-rules" (deprecated in Mac OS X >= 10.10)!
      QtForumReader/QtForumReader.app/Contents/Frameworks/libxslt.1.dylib: No such file or directory
      @

    2. In new version of macdeployqt exist argument with name "codesing". How I must use this argument? When I use codesign for application I should set path to *.entitlements. This file needs to set permissions for app. How I must set path to this file? Or tool will find it automaticaly if I've copied *.entitlements file to folder of my project?

    Thanks for any help!



  • Thanks, I asked a question today about the plugin not loading. I've created a bug for the invalid symlink:

    https://bugreports.qt-project.org/browse/QTBUG-42954

    As for part 2 of your question, I'm manually calling codesign as a custom build step, as I've found that I cannot specify entitlements to macdeployqt, and I've also noticed that the icon and Info.plist aren't copied to the application bundle. Both of those files are needed before you can do codesign.



  • Hi, I'm having the same error "module "QtQuick" plugin "qtquick2plugin" not found" and can't make your script work in my case.
    The pasted script contains bad "" characters. Could you please add a link to a raw text version?

    Thanks for your help.



  • Hi, che1404

    There are link to my "script":http://dshav.com/apps/script.sh.



  • Hey shav, that worked.
    Thanks!


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.