Details
-
Suggestion
-
Resolution: Invalid
-
P2: Important
-
Qt Creator 3.0.0-rc1
-
None
-
Mac XCode
Description
The qtquick2applicationviewer.pri generated by QtCreator contains various code for deploying QMLs (and other) files to the application created.
For what concerns the iOS bundle creation, the deploy command consist of:
copyCommand += mkdir -p \"$$target\"
copyCommand += && cp -r \"$$source\" \"$$target\"
This has two disadvantages (from my point of view):
1) 'cp -r' copy everything including the hiddens files. This means that in the case (very often) the files to be copied are in a directory managed by subversion or git, then all hidden data used by file revisioning systems are copied into the bundle. Not a big deal, but better to avoid.
2) if you prefer to use Xcode instead of QtCreator, then in the Xcode project there will be no way to see the list of the deployed files. This means, that you cannot access to the QML sources for editing from the Xcode project.
I don't know what can be the best alternative solution, but following there is my approach since Qt 5.1:
DEPLOY_TO_BUNDLE =
for(deploymentfolder, DEPLOYMENTFOLDERS) {
DEPLOY_TO_BUNDLE.files += $$PWD/$$eval($${deploymentfolder}.source)
}
QMAKE_BUNDLE_DATA += DEPLOY_TO_BUNDLE
Using the QMAKE_BUNDLE_DATA will solve both problems mentioned above. In fact, the hiddens files are not copied, and in the Xcode project appear a group called "Bundle Resources" containing the list of all files included into the bundle.
Attachments
Issue Links
- relates to
-
QTCREATORBUG-11412 Make sure deployment to device works for new QtQuick templates
-
- Closed
-