[SOLVED] macdeployqt problem
-
Hi everyone!
I have problem with macdeployqt tool. I'm calling this tool from terminal:
/Volumes/Documents/Applications/Qt/Qt5.5.0/5.5/clang_64/bin/macdeployqt <ApplicationName>.app -qmldir=<full_path_to_qml_dir>/qml -always-overwrite -codesign="3rd Party Mac Developer Application: <TeamName>" -verbose=3
Result of this command in console looks good no errors (full log you can find here).
Log looks correct but when I trying to load application I don't see window (transparent). In console I see this messages:Andrews-MacBook-Pro:~ andrewshapovalov$ /Volumes/Documents/NestleanClient.app/Contents/MacOS/NestleanClient ; exit; QQmlApplicationEngine failed to load component qrc:/qml/main.qml:1 module "QtQuick" is not installed qrc:/qml/main.qml:2 module "QtQuick.Controls" is not installed qrc:/qml/main.qml:3 module "QtQuick.Window" is not installed qrc:/qml/main.qml:4 module "QtQuick.Dialogs" is not installed qrc:/qml/main.qml:5 module "com.consultica.nestlean" is not installed qrc:/qml/main.qml:6 module "com.shav.uicomponents" is not installed qrc:/qml/main.qml:1 module "QtQuick" is not installed qrc:/qml/main.qml:2 module "QtQuick.Controls" is not installed qrc:/qml/main.qml:3 module "QtQuick.Window" is not installed qrc:/qml/main.qml:4 module "QtQuick.Dialogs" is not installed qrc:/qml/main.qml:5 module "com.consultica.nestlean" is not installed qrc:/qml/main.qml:6 module "com.shav.uicomponents" is not installed qrc:/qml/main.qml:1 module "QtQuick" is not installed qrc:/qml/main.qml:2 module "QtQuick.Controls" is not installed qrc:/qml/main.qml:3 module "QtQuick.Window" is not installed qrc:/qml/main.qml:4 module "QtQuick.Dialogs" is not installed qrc:/qml/main.qml:5 module "com.consultica.nestlean" is not installed qrc:/qml/main.qml:6 module "com.shav.uicomponents" is not installed qrc:/qml/main.qml:1 module "QtQuick" is not installed qrc:/qml/main.qml:2 module "QtQuick.Controls" is not installed qrc:/qml/main.qml:3 module "QtQuick.Window" is not installed qrc:/qml/main.qml:4 module "QtQuick.Dialogs" is not installed qrc:/qml/main.qml:5 module "com.consultica.nestlean" is not installed qrc:/qml/main.qml:6 module "com.shav.uicomponents" is not installed qrc:/qml/main.qml:1 module "QtQuick" is not installed qrc:/qml/main.qml:2 module "QtQuick.Controls" is not installed qrc:/qml/main.qml:3 module "QtQuick.Window" is not installed qrc:/qml/main.qml:4 module "QtQuick.Dialogs" is not installed qrc:/qml/main.qml:5 module "com.consultica.nestlean" is not installed qrc:/qml/main.qml:6 module "com.shav.uicomponents" is not installed qrc:/qml/main.qml:1 module "QtQuick" is not installed qrc:/qml/main.qml:2 module "QtQuick.Controls" is not installed qrc:/qml/main.qml:3 module "QtQuick.Window" is not installed qrc:/qml/main.qml:4 module "QtQuick.Dialogs" is not installed qrc:/qml/main.qml:5 module "com.consultica.nestlean" is not installed qrc:/qml/main.qml:6 module "com.shav.uicomponents" is not installed
If I check bundle of application to find QML plugins and I can't do this. In folder Resources I don't see any qml folder. What I can do to fix this problem?
-
I had similar problem and found out that you need to start macdeployqt from its directory, so the command would be like this:
./macdeployqt <path_to_application>/.app -qmldir=<full_path_to_qml_dir>/qml -always-overwrite -codesign="3rd Party Mac Developer Application: <TeamName>" -verbose=3
-
Thanks for the replay but this doesn't work form me. In my log I found this lines:
Log: Deploying QML imports Log: Application QML file search path(s) is ("/Volumes/Documents/MyWork/PROJECTS/QtProjects/GIT/Nestlean/qt/NestleanSDK/NestleanProject/NestleanClient/qml") ERROR: qmlimportscanner not found at "/Volumes/Documents/bin/qmlimportscanner" ERROR: Rebuild qtdeclarative/tools/qmlimportscanner
I can't understand why macdeployqt trying search qmlimportscanner in /Volumes/Documents/bin/qmlimportscanner because Qt installed to another folder and this tool in Qt folder exists. If I create this folder and try again I receive another errors:
Log: Deploying QML imports Log: Application QML file search path(s) is ("/Volumes/Documents/MyWork/PROJECTS/QtProjects/GIT/Nestlean/qt/NestleanSDK/NestleanProject/Nestlean/qml") Log: Deploying QML import "QtQuick" Log: Skip import: name or path is empty Log: Log: Deploying QML import "QtQuick.Controls" Log: Skip import: name or path is empty Log: Log: Deploying QML import "QtQuick.Controls.Styles" Log: Skip import: name or path is empty Log: Log: Deploying QML import "com.consultica.nestlean" Log: Skip import: name or path is empty Log: Log: Deploying QML import "QtGraphicalEffects" Log: Skip import: name or path is empty Log: Log: Deploying QML import "QtQuick.Controls.Styles" Log: Skip import: name or path is empty Log: Log: Deploying QML import "QtQuick.Dialogs" Log: Skip import: name or path is empty Log: Log: Deploying QML import "../../js/NestleanUtility.js" Log: Skip non-module import Log: Log: Deploying QML import "com.shav.uicomponents" Log: Skip import: name or path is empty Log: Log: Deploying QML import "../../js" Log: Skip non-module import Log: Log: Deploying QML import "../../js/QChartJsTypes.js" Log: Skip non-module import Log: Log: Deploying QML import "../Components" Log: Skip non-module import Log: Log: Deploying QML import "QtQuick.Window" Log: Skip import: name or path is empty Log: Log: Deploying QML import "../js" Log: Skip non-module import Log: Log: Deploying QML import "../js/NestleanUtility.js" Log: Skip non-module import Log: Log: Deploying QML import "Crashes" Log: Skip non-module import Log: Log: Deploying QML import "Feedback" Log: Skip non-module import Log: Log: Deploying QML import "User" Log: Skip non-module import Log: Log: Deploying QML import "Company" Log: Skip non-module import Log: Log: Deploying QML import "Statistics" Log: Skip non-module import Log: Log: Deploying QML import "User" Log: Skip non-module import Log: Log: Deploying QML import "Company" Log: Skip non-module import Log: Log: Deploying QML import "QtQuick.Extras" Log: Skip import: name or path is empty Log: Log: Deploying QML import "TestCoverage" Log: Skip non-module import Log: Log: Deploying QML import "QtQuick.Window" Log: Skip import: name or path is empty Log: Log: Deploying QML import "Statistics" Log: Skip non-module import Log: Log: Deploying QML import "Feedback" Log: Skip non-module import Log: Log: Deploying QML import "User" Log: Skip non-module import Log: Log: Deploying QML import "Company" Log: Skip non-module import Log: Log: Deploying QML import "QtQuick" Log: Skip import: name or path is empty Log: Log: Deploying QML import "../Components" Log: Skip non-module import Log: Log: Deploying QML import "../../js/moment-with-locales.min.js" Log: Skip non-module import Log:
What I can do with this?
-
Now I remember macdeployqt with qml worked for me only when I used, I think your app(QtAppMacDeploy). But I had to start QtAppMacDeploy app from the directory where macdeployqt is installed.
- So start the terminal, change directory to <QtDIR>/5.5/clan_64/bin/ (or similar)
- Now start QtAppMacDeploy app (in my case ../../../../QtAppMacDeploy.app/Contents/MacOS/QtAppMacDeploy)
- Set the paths in program
Hope it helps
PS. Just tested it with my application and it worked. Had a problem with standard macdeploqt(app was starting but not qml files found)
-
If someone need to implement deploy mode inside QtCreator you could try this:
macdeployqt <full_path_to_app_bundle>.app -qmldir=<full_path_to_qml_files_folder> -always-overwrite -verbose=2
in QtCreator it looks like:
As you can see you need run macdeployqt from Qt bin folder. This is important! If you try to call it from other folders it will not work.
P.S. Also if you need to use codesign fro you application you could use this command:
macdeployqt <full_path_to_app_bundle>.app -qmldir=<full_path_to_qml_files_folder> -always-overwrite -verbose=2 -codesign="3rd Party Mac Developer Application: <Team Name>"
-
Ok one more thing!
Another update for iOS deploy. I found a way how to prepare ipa file from QtCreator.
For do this you need Xcode and provision profile which will be used for install application on device.In QtCreator you must create a two custom command:
xcodebuild -scheme <schame_name> PROVISIONING_PROFILE="<provision_profile_unique_id>" clean archive -archivePath <archive_name> xcodebuild -exportArchive -exportFormat ipa -archivePath "<archive_name>.xcarchive" -exportPath "<application_name>.ipa" -exportProvisioningProfile "provision name"
Where <provision_profile_unique_id> you can find from Xcode. To do this open Xcode -> Preferences -> Accounts. Select your developer program account form the list and double click to it. Select from provision profiles section the name of profile which you want to use. Click right mouse button on it and select "Show in Finder". You must see Finder with selection provision profile. Copy this unique hash.
provision name This is name of provision which you select from list in Xcode settings. (In my case if I using id it's don't work only provision name).
Thats it!
P.S. screenshots:
-
Note that there is a Jira bug for this new behaviour (a regression from previous releases) of macdeployqt - https://bugreports.qt.io/browse/QTBUG-46404 - and it's listed to be fixed in 5.5.1.
-
@shav
Yes this seemed to solve my problem too, but only to the next roadblock.
The log seems to show the deployment of the modules,Log:
Log: Deploying QML imports
Log: Application QML file search path(s) is ("/Users/guymcnally2/UncutDev/Qt/build-celebrifyNewSolution-iphonesimulator_clang_Qt_5_5_1_for_iOS-Debug/../celebrify/qml")
Log: Deploying QML import "QtQuick"
Log:
Log: Deploying QML import "QtQuick.Controls"
Log:
Log: Deploying QML import "QtQuick.Window"
Log:
Log: Deploying QML import "QtQuick"
Log:
Log: Deploying QML import "QtQuick.Controls"
Log:
Log: Deploying QML import "QtQuick.Window"
Log:
Log: Deploying QML import "QtQuick"
Log:
Log: Deploying QML import "QtQuick.Controls"
Log:
Log: Deploying QML import "QtQuick.Controls.Styles"
Log:
Log: Deploying QML import "QtQuick.Controls.Private"
Log:
Log: Deploying QML import "QtQuick.Layouts"
Log:
Log: Deploying QML import "com.uncutvideo.qmlcomponents"
Log: Skip import: name or path is empty
Log:
Log: Deploying QML import "QtQuick.Dialogs"
Log:
Log: Deploying QML import "Qt.labs.folderlistmodel"
Log:
Log: Deploying QML import "Qt.labs.settings"
Log:
Log: Deploying QML import "QtQuick.Dialogs.Private"
Log:
Log: Deploying QML import "QtQuick"
Log:
Log: Deploying QML import "QtQuick.Layouts"
Log:
Log: Deploying QML import "QtQuick.Controls.Styles"
.......
Log: Deploying QML import "QtQuick.PrivateWidgets"
Log:
21:02:51: The process "/Applications/Qt/Qt5.5.1/5.5/clang_64/bin/macdeployqt" exited normally.
21:02:51: Elapsed time: 00:03.but when the application launches, I get the output,
qrc:/qml/MainPanelLandscape.qml:3:1: module "QtQuick.Window" is not installed
qrc:/qml/MainPanelLandscape.qml:4:1: module "QtQuick.Controls.Styles" is not installed
qrc:/qml/MainPanelLandscape.qml:5:1: module "QtQuick.Controls.Private" is not installed
qrc:/qml/MainPanelLandscape.qml:6:1: module "QtQuick.Layouts" is not installed
qrc:/qml/MainPanelLandscape.qml:1:1: module "QtQuick" is not installed
qrc:/qml/MainPanelLandscape.qml:2:1: module "QtQuick.Controls" is not installedso the end result is the same.
Any suggestions what to try next?