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 { ...@@ -67,13 +67,17 @@ symbian {
target.path = /opt/bin target.path = /opt/bin
INSTALLS += target INSTALLS += target
} else:macx { } else:macx {
for(deploymentfolder, DEPLOYMENTFOLDERS) { !isEqual(PWD,$$OUT_PWD) {
item = item$${deploymentfolder} copyCommand = @echo Copying application data...
itemsources = $${item}.files for(deploymentfolder, DEPLOYMENTFOLDERS) {
$$itemsources = $$eval($${deploymentfolder}.source) target = $$OUT_PWD/$${TARGET}.app/Contents/Resources/$$eval($${deploymentfolder}.target)
itempath = $${item}.path copyCommand += && $(MKDIR) $$target
$$itempath = Resources/$$eval($${deploymentfolder}.target) copyCommand += && $(COPY_DIR) $$PWD/$$eval($${deploymentfolder}.source) $$target
QMAKE_BUNDLE_DATA += $$item }
copydeploymentfolders.commands = $$copyCommand
first.depends = $(first) copydeploymentfolders
QMAKE_EXTRA_TARGETS += first copydeploymentfolders
message($$copyCommand)
} }
} else { #linux } else { #linux
!isEqual(PWD,$$OUT_PWD) { !isEqual(PWD,$$OUT_PWD) {
......
...@@ -26,7 +26,7 @@ QmlApplicationView::QmlApplicationView(const QString &mainQmlFile, QWidget *pare ...@@ -26,7 +26,7 @@ QmlApplicationView::QmlApplicationView(const QString &mainQmlFile, QWidget *pare
{ {
#ifdef Q_OS_MAC #ifdef Q_OS_MAC
m_d->mainQmlFile = QCoreApplication::applicationDirPath() m_d->mainQmlFile = QCoreApplication::applicationDirPath()
+ QLatin1String("/../../Resources/") + mainQmlFile; + QLatin1String("/../Resources/") + mainQmlFile;
#else #else
m_d->mainQmlFile = mainQmlFile; m_d->mainQmlFile = mainQmlFile;
#endif #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