forked from qt-creator/qt-creator
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:
@@ -27,7 +27,11 @@ class QtQuick1ApplicationViewerPrivate
|
|||||||
|
|
||||||
QString QtQuick1ApplicationViewerPrivate::adjustPath(const QString &path)
|
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))
|
if (!QDir::isAbsolutePath(path))
|
||||||
return QString::fromLatin1("%1/../Resources/%2")
|
return QString::fromLatin1("%1/../Resources/%2")
|
||||||
.arg(QCoreApplication::applicationDirPath(), path);
|
.arg(QCoreApplication::applicationDirPath(), path);
|
||||||
|
|||||||
@@ -22,7 +22,11 @@ class QtQuick2ApplicationViewerPrivate
|
|||||||
|
|
||||||
QString QtQuick2ApplicationViewerPrivate::adjustPath(const QString &path)
|
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))
|
if (!QDir::isAbsolutePath(path))
|
||||||
return QString::fromLatin1("%1/../Resources/%2")
|
return QString::fromLatin1("%1/../Resources/%2")
|
||||||
.arg(QCoreApplication::applicationDirPath(), path);
|
.arg(QCoreApplication::applicationDirPath(), path);
|
||||||
|
|||||||
@@ -89,6 +89,28 @@ android-no-sdk {
|
|||||||
export(copydeploymentfolders.commands)
|
export(copydeploymentfolders.commands)
|
||||||
QMAKE_EXTRA_TARGETS += first copydeploymentfolders
|
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 {
|
} else:unix {
|
||||||
maemo5 {
|
maemo5 {
|
||||||
desktopfile.files = $${TARGET}.desktop
|
desktopfile.files = $${TARGET}.desktop
|
||||||
|
|||||||
Reference in New Issue
Block a user