Macdeployqt dmg disabled build versions in Qt
-
-
My bad, I've mixed OpenStreetMap with another one. The osm plugin should be deployed.
-
Did you try to start your application from the command line after running
macdeployqt
? There might be information printed on the command line. -
@SGaist I tried this but it didn't work. This is what the folder to the project in Qt Creator looks like
And this is the folder produced by Qt Creator when deploying
Before running macdeployqt running my app from the terminal with: open -a RTKCar works just fine. Then I call macdeployqt from my root folder like this:
pathToMacdeployqt/macdeployqt pathToDeployedFolder/RTKCar.app -dmg -qmldir=PathToProjectFolder
After this I can run it from the terminal but the map won't show, same goes for opening it with the mouse or from the dmg.When running the macdeployqt command, I get the following output:
File exists, skip copy: "/Users/user/build-RTKCar-Desktop_Qt_5_9_2_clang_64bit-Profile/RTKCar.app/Contents/PlugIns/quick/libqtquick2plugin.dylib"
File exists, skip copy: "/Users/user/build-RTKCar-Desktop_Qt_5_9_2_clang_64bit-Profile/RTKCar.app/Contents/PlugIns/quick/libdeclarative_location.dylib"
File exists, skip copy: "/Users/user/build-RTKCar-Desktop_Qt_5_9_2_clang_64bit-Profile/RTKCar.app/Contents/PlugIns/quick/libdeclarative_positioning.dylib"
File exists, skip copy: "/Users/user/build-RTKCar-Desktop_Qt_5_9_2_clang_64bit-Profile/RTKCar.app/Contents/PlugIns/quick/libwindowplugin.dylib"
File exists, skip copy: "/Users/user/build-RTKCar-Desktop_Qt_5_9_2_clang_64bit-Profile/RTKCar.app/Contents/PlugIns/quick/libqquicklayoutsplugin.dylib"
File exists, skip copy: "/Users/user/build-RTKCar-Desktop_Qt_5_9_2_clang_64bit-Profile/RTKCar.app/Contents/PlugIns/quick/libqtquickcontrols2plugin.dylib"
File exists, skip copy: "/Users/user/build-RTKCar-Desktop_Qt_5_9_2_clang_64bit-Profile/RTKCar.app/Contents/PlugIns/quick/libqtquickcontrols2materialstyleplugin.dylib"
File exists, skip copy: "/Users/user/build-RTKCar-Desktop_Qt_5_9_2_clang_64bit-Profile/RTKCar.app/Contents/PlugIns/quick/libqtquickcontrols2universalstyleplugin.dylib"
File exists, skip copy: "/Users/user/build-RTKCar-Desktop_Qt_5_9_2_clang_64bit-Profile/RTKCar.app/Contents/PlugIns/quick/libdialogplugin.dylib"
File exists, skip copy: "/Users/user/build-RTKCar-Desktop_Qt_5_9_2_clang_64bit-Profile/RTKCar.app/Contents/PlugIns/quick/libdialogsprivateplugin.dylib"
File exists, skip copy: "/Users/user/build-RTKCar-Desktop_Qt_5_9_2_clang_64bit-Profile/RTKCar.app/Contents/PlugIns/quick/libqtquicktemplates2plugin.dylib"
File exists, skip copy: "/Users/user/build-RTKCar-Desktop_Qt_5_9_2_clang_64bit-Profile/RTKCar.app/Contents/PlugIns/quick/libqmlfolderlistmodelplugin.dylib"
File exists, skip copy: "/Users/user/build-RTKCar-Desktop_Qt_5_9_2_clang_64bit-Profile/RTKCar.app/Contents/PlugIns/quick/libqmlsettingsplugin.dylib"
File exists, skip copy: "/Users/user/build-RTKCar-Desktop_Qt_5_9_2_clang_64bit-Profile/RTKCar.app/Contents/PlugIns/quick/libqtquickcontrolsplugin.dylib"
File exists, skip copy: "/Users/user/build-RTKCar-Desktop_Qt_5_9_2_clang_64bit-Profile/RTKCar.app/Contents/PlugIns/quick/libqtquickextrasflatplugin.dylib"
File exists, skip copy: "/Users/user/build-RTKCar-Desktop_Qt_5_9_2_clang_64bit-Profile/RTKCar.app/Contents/PlugIns/quick/libwidgetsplugin.dylib"
File exists, skip copy: "/Users/user/build-RTKCar-Desktop_Qt_5_9_2_clang_64bit-Profile/RTKCar.app/Contents/PlugIns/quick/libqtquickextrasplugin.dylib"
File exists, skip copy: "/Users/user/build-RTKCar-Desktop_Qt_5_9_2_clang_64bit-Profile/RTKCar.app/Contents/PlugIns/quick/libqtgraphicaleffectsplugin.dylib"
File exists, skip copy: "/Users/user/build-RTKCar-Desktop_Qt_5_9_2_clang_64bit-Profile/RTKCar.app/Contents/PlugIns/quick/libqtgraphicaleffectsprivate.dylib"
File exists, skip copy: "/Users/user/build-RTKCar-Desktop_Qt_5_9_2_clang_64bit-Profile/RTKCar.app/Contents/PlugIns/quick/libqtquickcontrols2materialstyleplugin.dylib"
File exists, skip copy: "/Users/user/build-RTKCar-Desktop_Qt_5_9_2_clang_64bit-Profile/RTKCar.app/Contents/PlugIns/quick/libqtquickcontrols2materialstyleplugin.dylib"
File exists, skip copy: "/Users/user/build-RTKCar-Desktop_Qt_5_9_2_clang_64bit-Profile/RTKCar.app/Contents/PlugIns/quick/libqtquickcontrols2universalstyleplugin.dylib"
File exists, skip copy: "/Users/user/build-RTKCar-Desktop_Qt_5_9_2_clang_64bit-Profile/RTKCar.app/Contents/PlugIns/quick/libqtquickcontrols2universalstyleplugin.dylib"
File exists, skip copy: "/Users/user/build-RTKCar-Desktop_Qt_5_9_2_clang_64bit-Profile/RTKCar.app/Contents/PlugIns/quick/libmodelsplugin.dylib" -
I didn't expect it to work but to give more clues about what is going wrong. You don't have any message printing on the console ?
By the way, you should consider updating Qt. 5.9.3 and 5.10 have been released.
-
Not any QML error ?
-
That's what I was suspecting: missing plugins.
The quick and easy way would be to build your own version of macdeployqt with this patch applied.
-
If everything goes well, clone the qttools repository and and build macdeployqt from the latest 5.10 branch.
Otherwise, you will have to apply two patches since there was a cleanup done in between.
-
@SGaist How do I build macdeployqt after cloning it? Tried to open the macdeployqt.pro file in Qt Creator and just build through there, but I got the error code:
ld: can't open output file for writing '/bin/macdeployqt.ld_z0wFts', errno=1 for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation) make[1]: *** [/bin/macdeployqt] Error 1 make: *** [sub-macdeployqt-make_first] Error 2 15:19:17: The process "/usr/bin/make" exited with code 2. Error while building/deploying project macdeployqt (kit: Desktop Qt 5.9.2 clang 64bit) When executing step "Make"
Or can I do it somehow using the terminal?
-
/bin
? That strange.I do it from the command line in an out of source folder:
mkdir build_macdeployqt pushd build_macdeployqt /path/to/qmake /path/to/Qt/qttools/src/macdeployqt/ make make install
-
@SGaist when I do
/path/to/qmake /path/to/Qt/qttools/src/macdeployqt/
I get :
Qt5.10.0/5.10.0/clang_64/mkspecs/features/mac/sdk.prf:26: Cannot write cache file /Users/.qmake.stash: Permission denied
,
Tried it together with sudo, it worked:Info: creating stash file /Users/.qmake.stash
But when doingmake
I get:
ld: can't open output file for writing '/bin/macdeployqt.ld_jnQbB4', errno=1 for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation) make[1]: *** [/bin/macdeployqt] Error 1 make: *** [sub-macdeployqt-make_first] Error 2
-
Are you using a self-compiled Qt ?
-
Ok, I was using my own build of Qt.
Configure the complete qttools module then you can just build macdeployqt.
mkdir build_qttools pushd build_qttools /path/to/qmake /path/to/Qt/qttools/ -r make -C src/macdeployqt cp bin/macdeploqt /path/to/macdeployqt
[edit: added missing option. SGaist]
-
@SGaist
build_qttools user$ make -C src/macdeployqt
gives me:
make: *** src/macdeployqt: No such file or directory. Stop.
and
build_qttools user$ make -C pathTo/qttools/src/macdeployqt make: *** No targets specified and no makefile found. Stop.
-
There was an option missing. You have to do a recursive configuration. Sorry. I've updated the sample.