diff options
author | Maurice Kalinowski <maurice.kalinowski@qt.io> | 2016-07-19 13:33:16 +0200 |
---|---|---|
committer | Maurice Kalinowski <maurice.kalinowski@qt.io> | 2016-07-20 14:22:27 +0000 |
commit | c24403b1dbe8d1b7bc27e2d1e11fd5cddd4ae1b9 (patch) | |
tree | caaad3306054382f410839d0658d7d3a4c648b6c | |
parent | 20faf717c87f3095bfa3be3781f97744b75935e2 (diff) |
winrt: arm: copy ucrtbased.dll in debug mode
For Windows 10 / MSVC2015 winrtrunner fails to run an app in debug mode
on an arm device as symbols were not found (neither in the system or c-
runtime dependency). Those symbols are inside ucrtbased.dll. Visual
Studio 2015 silently adds this library to the package resulting in a
different content compared to windeployqt.
Hence, copy ucrtbased.dll manually from windeployqt as well, which will
later on be packaged by winrtrunner.
Task-number: QTBUG-52969
Change-Id: If43a814b800d0756d111557a042aa23a22d7589f
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
-rw-r--r-- | src/windeployqt/main.cpp | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/src/windeployqt/main.cpp b/src/windeployqt/main.cpp index d11454717..9b8262805 100644 --- a/src/windeployqt/main.cpp +++ b/src/windeployqt/main.cpp @@ -1350,6 +1350,33 @@ static DeployResult deploy(const Options &options, } } // Windows + // We need to copy ucrtbased.dll on WinRT as this library is not part of + // the c runtime package. VS 2015 does the same when deploying to a device + // or creating an appx. + if (isDebug && options.platform == WinRtArm + && qmakeVariables.value(QStringLiteral("QMAKE_XSPEC")).endsWith(QLatin1String("msvc2015"))) { + const QString extensionPath = QString::fromLocal8Bit(qgetenv("ExtensionSdkDir")); + const QString ucrtVersion = QString::fromLocal8Bit(qgetenv("UCRTVersion")); + if (extensionPath.isEmpty() || ucrtVersion.isEmpty()) { + std::wcerr << "Warning: Cannot find ucrtbased.dll as either " + << "ExtensionSdkDir or UCRTVersion is not set in " + << "your environment.\n"; + } else { + const QString ucrtbasedLib = extensionPath + + QStringLiteral("/Microsoft.UniversalCRT.Debug/") + + ucrtVersion + + QStringLiteral("/Redist/Debug/arm/ucrtbased.dll"); + const QFileInfo ucrtPath(ucrtbasedLib); + if (ucrtPath.exists() && ucrtPath.isFile()) { + deployedQtLibraries.append(ucrtPath.absoluteFilePath()); + } else { + std::wcerr << "Warning: Cannot find ucrtbased.dll at " + << QDir::toNativeSeparators(ucrtbasedLib) + << " or it is not a file.\n"; + } + } + } + // Update libraries if (options.libraries) { const QString targetPath = options.libraryDirectory.isEmpty() ? |