Forums

OverviewV-Play 2 Support (Qt 5) › macdeployqt

Tagged: 

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #13634

    Per

    Hi –

    I unsuccessfully tried to create a trivial Vplay Mac app and move this app to a mac without Qt installed. Can you help?

    In Qt Creator I created a trivial Vplay 2.8.4 app called EmptyApp using with the wizard generated Empty Application.

    I add a Vplay license, and specify “publish” in the config.json file.

    This app runs fine on the development mac 10.9 with Qt 5.6 installed.

    In the generated build-EmptyApp-Desktop_Qt_5_6_0_clang_64bit-Release/ I ran macdeployqt

    $ /Applications/Qt/5.6/clang_64/bin/macdeployqt EmptyApp.app -dmg
    WARNING: Plugin "libqsqlodbc.dylib" uses private API and is not Mac App store compliant.
    WARNING: Plugin "libqsqlpsql.dylib" uses private API and is not Mac App store compliant.
    ERROR: no file at "/opt/local/lib/mysql55/mysql/libmysqlclient.18.dylib"
    ERROR: no file at "/usr/local/lib/libpq.5.dylib"
    

    This looks like a hard-coded macdeployqt issue since I have no directory /opt, and no libpg in /usr/local/lib. Inspecting the app with otool shows that it DOES contain mysql.

    Opening the dmg and running the app results in a crash.

    Do you have a workaround to distribute mac apps? Thanks!

     

    $ otool -L EmptyApp.app/Contents/MacOS/EmptyApp 
    EmptyApp.app/Contents/MacOS/EmptyApp:
    	@rpath/Qt3DQuick.framework/Versions/5/Qt3DQuick (compatibility version 5.6.0, current version 5.6.0)
    	@rpath/QtQuick.framework/Versions/5/QtQuick (compatibility version 5.6.0, current version 5.6.0)
    	@rpath/QtWidgets.framework/Versions/5/QtWidgets (compatibility version 5.6.0, current version 5.6.0)
    	@rpath/QtMultimedia.framework/Versions/5/QtMultimedia (compatibility version 5.6.0, current version 5.6.0)
    	@rpath/Qt3DInput.framework/Versions/5/Qt3DInput (compatibility version 5.6.0, current version 5.6.0)
    	@rpath/Qt3DRender.framework/Versions/5/Qt3DRender (compatibility version 5.6.0, current version 5.6.0)
    	@rpath/Qt3DCore.framework/Versions/5/Qt3DCore (compatibility version 5.6.0, current version 5.6.0)
    	@rpath/QtGui.framework/Versions/5/QtGui (compatibility version 5.6.0, current version 5.6.0)
    	@rpath/QtCore.framework/Versions/5/QtCore (compatibility version 5.6.0, current version 5.6.0)
    	/System/Library/Frameworks/OpenGL.framework/Versions/A/OpenGL (compatibility version 1.0.0, current version 1.0.0)
    	/System/Library/Frameworks/AGL.framework/Versions/A/AGL (compatibility version 1.0.0, current version 1.0.0)
    	@rpath/QtQml.framework/Versions/5/QtQml (compatibility version 5.6.0, current version 5.6.0)
    	@rpath/QtWebSockets.framework/Versions/5/QtWebSockets (compatibility version 5.6.0, current version 5.6.0)
    	@rpath/QtNetwork.framework/Versions/5/QtNetwork (compatibility version 5.6.0, current version 5.6.0)
    	@rpath/QtSql.framework/Versions/5/QtSql (compatibility version 5.6.0, current version 5.6.0)
    	@rpath/QtConcurrent.framework/Versions/5/QtConcurrent (compatibility version 5.6.0, current version 5.6.0)
    	/usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 120.0.0)
    	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1213.0.0)

     

    #13635

    Lorenz

    Hi Per,

    indeed, the macdeplyoqt tool is a bit buggy.

    What we do is the following:

    1. cd to <V-Play-Install-Root>/clang_64/bin (macdeployqt working dir needs to be its installation dir)
    2. Run macdeployqt with absolute paths like
      ./macdeployqt <ABSOLUTE_PATH_TO_YOUR_APP>/yourApp.app -qmldir=<ABSOLUTE_PATH_TO_YOUR_QML_FOLDER>/

    Additionally, you might have to copy all the imports of Qt stuff you use to your main .qml file, otherwise macdeployqt doesn’t find the imports sometimes.

    That way, it usually works for us.

    Does that work for you?

    Cheers,

    Lorenz

    #13644

    Per

    Hi Lorenz

    To fix the missing files that macdeployqt looks for, I installed mysql and then made symbolic links to the missing files.

    brew install mysql
    sudo mkdir /opt/local/lib/mysql55/mysql
    cd /opt/local/lib/mysql55/mysql
    sudo ln -s /usr/local/Cellar/mysql/5.6.25/lib/libmysqlclient.18.dylib .
    cd /usr/local/lib
    sudo ln -s /usr/lib/libpq.5.dylib .
    cd /Applications/Qt/5.6/clang_64/bin
    ./macdeployqt ~/Documents/QtStuff/build-EmptyApp-Desktop_Qt_5_6_0_clang_64bit_Release/EmptyApp.app/ -qmldir=~/Documents/QtStuff/EmptyApp/qml -dmg

    I run macdeployqt as you suggested, and with the symbolic links there are no errors reported. However running the executable in the resulting dmg immediately results in a crash.

    So how do I deploy a multi-platform Vplay app on Mac? It would be VERY helpful if you demonstrated this with a trivial Vplay wizard generated app.

     

    #13670

    Lorenz

    Hi Per,

    Can you start your app via the command line and post the output here?

    As requested, here is an empty V-Play app which i ran macdeployqt on with the following commands:

     

    VPlays-Mac-Mini-180:bin Lorenz$ ./macdeployqt /Users/Lorenz/build-EmptyVPProjectMacDeployQt-Desktop_Qt_5_6_0_clang_64bit2-Release/EmptyVPProjectMacDeployQt.app/ -qmldir=/Users/Lorenz/EmptyVPProjectMacDeployQt/qml
    WARNING: Plugin "libqsqlodbc.dylib" uses private API and is not Mac App store compliant.
    WARNING: Plugin "libqsqlpsql.dylib" uses private API and is not Mac App store compliant.
    ERROR: no file at "/opt/local/lib/mysql55/mysql/libmysqlclient.18.dylib"
    ERROR: no file at "/usr/local/lib/libpq.5.dylib"

     

    You can download the app here and have a look at the included frameworks. You can also try copying the frameworks folder to your own app.

    edit: indeed, myql is missing here as well, but not required by the app.

    Best,

    Lorenz

    • This reply was modified 2 years, 1 month ago by  Lorenz.
Viewing 4 posts - 1 through 4 (of 4 total)

RSS feed for this thread

You must be logged in to reply to this topic.

Voted #1 for:

  • Easiest to learn
  • Most time saving
  • Best support

Develop Cross-Platform Apps and Games 50% Faster!

  • Voted the best supported, most time-saving and easiest to learn cross-platform development tool
  • Based on the Qt framework, with native performance and appearance on all platforms including iOS and Android
  • Offers a variety of plugins to monetize, analyze and engage users
FREE!
create apps
create games
cross platform
native performance
3rd party services
game network
multiplayer
level editor
easiest to learn
biggest time saving
best support