summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOliver Wolff <oliver.wolff@digia.com>2014-09-02 11:33:46 +0200
committerOliver Wolff <oliver.wolff@digia.com>2014-09-05 13:41:23 +0200
commitf62e1fb36f7170bd132a5ede2c29fa64d1ea0dc5 (patch)
treed3aeddaeb7c78e43177c66dfa765c576c4389db2
parent385a65dee4fb40c050e233c13a560aad7814d421 (diff)
downloadqt-creator-f62e1fb36f7170bd132a5ede2c29fa64d1ea0dc5.tar.gz
Fixed font deployment for winphone 8.0
Change-Id: I8d7a2debfec3bbd06780458a29f11031dd9b862c Reviewed-by: Andrew Knight <andrew.knight@digia.com>
-rw-r--r--src/plugins/winrt/winrtpackagedeploymentstep.cpp22
1 files changed, 19 insertions, 3 deletions
diff --git a/src/plugins/winrt/winrtpackagedeploymentstep.cpp b/src/plugins/winrt/winrtpackagedeploymentstep.cpp
index a76f519332..b73d86274b 100644
--- a/src/plugins/winrt/winrtpackagedeploymentstep.cpp
+++ b/src/plugins/winrt/winrtpackagedeploymentstep.cpp
@@ -184,10 +184,26 @@ bool WinRtPackageDeploymentStep::processSucceeded(int exitCode, QProcess::ExitSt
relativeRemotePath = QDir(baseDir).relativeFilePath(pair.second);
if (QDir(relativeRemotePath).isAbsolute() || relativeRemotePath.startsWith(QLatin1String(".."))) {
- // for 3.3?
- // raiseWarning(tr("File %1 is outside of the executable's directory. These files cannot be installed.").arg(relativeRemotePath));
- continue;
+ // special case for winphone 8.0 font deployment
+ const QtSupport::BaseQtVersion *qt = QtSupport::QtKitInformation::qtVersion(target()->kit());
+ if (!qt)
+ return false;
+ if (qt->mkspec().toString().contains(QLatin1String("msvc2012"))) {
+ const QString fileName = relativeRemotePath.mid(relativeRemotePath.lastIndexOf(QLatin1Char('/')) + 1);
+ if (QFile::exists(m_targetDirPath + QLatin1String("fonts/") + fileName)) {
+ relativeRemotePath = QLatin1String("fonts/") + fileName;
+ } else {
+ // for 3.3?
+ // raiseWarning(tr("File %1 is outside of the executable's directory. These files cannot be installed.").arg(relativeRemotePath));
+ continue;
+ }
+ } else {
+ // for 3.3?
+ // raiseWarning(tr("File %1 is outside of the executable's directory. These files cannot be installed.").arg(relativeRemotePath));
+ continue;
+ }
}
+
m_mappingFileContent += QLatin1Char('"') + QDir::toNativeSeparators(pair.first)
+ QLatin1String("\" \"") + QDir::toNativeSeparators(relativeRemotePath)
+ QLatin1String("\"\n");