templates: fix deployment for ios

Task-number: QTCREATORBUG-10683
Change-Id: I1a7d721430b4a5bd15422d161f58a4247da79e08
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@digia.com>
This commit is contained in:
Fawzi Mohamed
2013-11-11 16:32:35 +01:00
parent c02d014d69
commit 82cc00bfcd
3 changed files with 32 additions and 2 deletions

View File

@@ -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);

View File

@@ -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);

View File

@@ -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