From 02402887562f55b822fd29a64437da3d1252fd5b Mon Sep 17 00:00:00 2001 From: Oliver Wolff Date: Mon, 7 Sep 2015 09:25:20 +0200 Subject: windeployqt: Do not patch Qt5Core on WinRT/Windows Phone Patching the file causes the "Date modified" to be changed. When trying to deploy a package using Visual Studio, MSVC does not like the date/time difference between the file from the package and Qt's bin directory and thus refuses to deploy the package. As WinRT/Windows phone packages are sandboxed and have to be self- contained, patching Qt5Core is not that important on these platforms and can be omitted. Task-number: QTBUG-48236 Change-Id: I03404976efa0f343341b5d13708ebb864a3b8179 Reviewed-by: Andrew Knight Reviewed-by: Friedemann Kleint (cherry picked from commit 4a1cdd0acbef69257c3d604ca51a5868fb2f761c) Reviewed-by: Oswald Buddenhagen --- src/windeployqt/main.cpp | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/src/windeployqt/main.cpp b/src/windeployqt/main.cpp index 5eb0cbc49..f1a53b0d7 100644 --- a/src/windeployqt/main.cpp +++ b/src/windeployqt/main.cpp @@ -272,6 +272,11 @@ struct Options { ListOption list; DebugDetection debugDetection; bool debugMatchAll; + + inline bool isWinRtOrWinPhone() const { + return (platform == WinPhoneArm || platform == WinPhoneIntel + || platform == WinRtArm || platform == WinRtIntel); + } }; // Return binary from folder @@ -1220,8 +1225,7 @@ static DeployResult deploy(const Options &options, libEglFullPath += QLatin1String(windowsSharedLibrarySuffix); deployedQtLibraries.append(libEglFullPath); // Find the system D3d Compiler matching the D3D library. - if (options.systemD3dCompiler && options.platform != WinPhoneArm && options.platform != WinPhoneIntel - && options.platform != WinRtArm && options.platform != WinRtIntel) { + if (options.systemD3dCompiler && !options.isWinRtOrWinPhone()) { const QString d3dCompiler = findD3dCompiler(options.platform, qtBinDir, wordSize); if (d3dCompiler.isEmpty()) { std::wcerr << "Warning: Cannot find any version of the d3dcompiler DLL.\n"; @@ -1249,11 +1253,13 @@ static DeployResult deploy(const Options &options, return result; } - const QString qt5CoreName = QFileInfo(libraryPath(libraryLocation, "Qt5Core", qtLibInfix, - options.platform, isDebug)).fileName(); + if (!options.isWinRtOrWinPhone()) { + const QString qt5CoreName = QFileInfo(libraryPath(libraryLocation, "Qt5Core", qtLibInfix, + options.platform, isDebug)).fileName(); - if (!patchQtCore(targetPath + QLatin1Char('/') + qt5CoreName, errorMessage)) - return result; + if (!patchQtCore(targetPath + QLatin1Char('/') + qt5CoreName, errorMessage)) + return result; + } } // optLibraries // Update plugins -- cgit v1.2.3