forked from qt-creator/qt-creator
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/.
This commit is contained in:
@@ -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
|
|||||||
{
|
{
|
||||||
#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
|
||||||
|
|||||||
Reference in New Issue
Block a user