Skip to content
Snippets Groups Projects
Commit d01403a3 authored by Alessandro Portale's avatar Alessandro Portale
Browse files

Fixed the data deployment on OSX

Switchen from QMAKE_BUNDLE_DATA to QMAKE_EXTRA_TARGETS, like we
already do on Windows and Linux.
QMAKE_BUNDLE_DATA does not seem to create make targets. We need
to copy-if-changed the files into the resources folder on each run.

Also pushed the Resources/ folder one level deeper, into Contents/.
parent bab51019
No related branches found
No related tags found
No related merge requests found
......@@ -67,13 +67,17 @@ symbian {
target.path = /opt/bin
INSTALLS += target
} else:macx {
for(deploymentfolder, DEPLOYMENTFOLDERS) {
item = item$${deploymentfolder}
itemsources = $${item}.files
$$itemsources = $$eval($${deploymentfolder}.source)
itempath = $${item}.path
$$itempath = Resources/$$eval($${deploymentfolder}.target)
QMAKE_BUNDLE_DATA += $$item
!isEqual(PWD,$$OUT_PWD) {
copyCommand = @echo Copying application data...
for(deploymentfolder, DEPLOYMENTFOLDERS) {
target = $$OUT_PWD/$${TARGET}.app/Contents/Resources/$$eval($${deploymentfolder}.target)
copyCommand += && $(MKDIR) $$target
copyCommand += && $(COPY_DIR) $$PWD/$$eval($${deploymentfolder}.source) $$target
}
copydeploymentfolders.commands = $$copyCommand
first.depends = $(first) copydeploymentfolders
QMAKE_EXTRA_TARGETS += first copydeploymentfolders
message($$copyCommand)
}
} else { #linux
!isEqual(PWD,$$OUT_PWD) {
......
......@@ -26,7 +26,7 @@ QmlApplicationView::QmlApplicationView(const QString &mainQmlFile, QWidget *pare
{
#ifdef Q_OS_MAC
m_d->mainQmlFile = QCoreApplication::applicationDirPath()
+ QLatin1String("/../../Resources/") + mainQmlFile;
+ QLatin1String("/../Resources/") + mainQmlFile;
#else
m_d->mainQmlFile = mainQmlFile;
#endif
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment