diff --git a/share/qtcreator/templates/qtquick/qtquick_1_1/qtquick1applicationviewer/qtquick1applicationviewer.cpp b/share/qtcreator/templates/qtquick/qtquick_1_1/qtquick1applicationviewer/qtquick1applicationviewer.cpp index d487e109f9c..0b7ffe85da1 100644 --- a/share/qtcreator/templates/qtquick/qtquick_1_1/qtquick1applicationviewer/qtquick1applicationviewer.cpp +++ b/share/qtcreator/templates/qtquick/qtquick_1_1/qtquick1applicationviewer/qtquick1applicationviewer.cpp @@ -27,7 +27,11 @@ class QtQuick1ApplicationViewerPrivate QString QtQuick1ApplicationViewerPrivate::adjustPath(const QString &path) { -#ifdef Q_OS_MAC +#if defined(Q_OS_IOS) + if (!QDir::isAbsolutePath(path)) + return QString::fromLatin1("%1/%2") + .arg(QCoreApplication::applicationDirPath(), path); +#elif defined(Q_OS_MAC) if (!QDir::isAbsolutePath(path)) return QString::fromLatin1("%1/../Resources/%2") .arg(QCoreApplication::applicationDirPath(), path); diff --git a/share/qtcreator/templates/qtquick/qtquick_2_0/qtquick2applicationviewer/qtquick2applicationviewer.cpp b/share/qtcreator/templates/qtquick/qtquick_2_0/qtquick2applicationviewer/qtquick2applicationviewer.cpp index 127a25e6c41..2a62ca97b67 100644 --- a/share/qtcreator/templates/qtquick/qtquick_2_0/qtquick2applicationviewer/qtquick2applicationviewer.cpp +++ b/share/qtcreator/templates/qtquick/qtquick_2_0/qtquick2applicationviewer/qtquick2applicationviewer.cpp @@ -22,7 +22,11 @@ class QtQuick2ApplicationViewerPrivate QString QtQuick2ApplicationViewerPrivate::adjustPath(const QString &path) { -#if defined(Q_OS_MAC) +#if defined(Q_OS_IOS) + if (!QDir::isAbsolutePath(path)) + return QString::fromLatin1("%1/%2") + .arg(QCoreApplication::applicationDirPath(), path); +#elif defined(Q_OS_MAC) if (!QDir::isAbsolutePath(path)) return QString::fromLatin1("%1/../Resources/%2") .arg(QCoreApplication::applicationDirPath(), path); diff --git a/share/qtcreator/templates/shared/deployment.pri b/share/qtcreator/templates/shared/deployment.pri index 21ee643ae26..63dc0f39239 100644 --- a/share/qtcreator/templates/shared/deployment.pri +++ b/share/qtcreator/templates/shared/deployment.pri @@ -89,6 +89,28 @@ android-no-sdk { export(copydeploymentfolders.commands) QMAKE_EXTRA_TARGETS += first copydeploymentfolders } +} ios { + copyCommand = + for(deploymentfolder, DEPLOYMENTFOLDERS) { + source = $$MAINPROFILEPWD/$$eval($${deploymentfolder}.source) + source = $$replace(source, \\\\, /) + target = $CODESIGNING_FOLDER_PATH/$$eval($${deploymentfolder}.target) + target = $$replace(target, \\\\, /) + sourcePathSegments = $$split(source, /) + targetFullPath = $$target/$$last(sourcePathSegments) + targetFullPath ~= s,/\\.?/,/, + !isEqual(source,$$targetFullPath) { + !isEmpty(copyCommand):copyCommand += && + copyCommand += mkdir -p \"$$target\" + copyCommand += && cp -r \"$$source\" \"$$target\" + } + } + !isEmpty(copyCommand) { + copyCommand = echo Copying application data... && $$copyCommand + !isEmpty(QMAKE_POST_LINK): QMAKE_POST_LINK += ";" + QMAKE_POST_LINK += "$$copyCommand" + export(QMAKE_POST_LINK) + } } else:unix { maemo5 { desktopfile.files = $${TARGET}.desktop