Commit f62e1fb3 authored by Oliver Wolff's avatar Oliver Wolff

Fixed font deployment for winphone 8.0

Change-Id: I8d7a2debfec3bbd06780458a29f11031dd9b862c
Reviewed-by: default avatarAndrew Knight <andrew.knight@digia.com>
parent 385a65de
......@@ -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");
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment