summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMaurice Kalinowski <maurice.kalinowski@theqtcompany.com>2015-03-27 15:56:37 +0100
committerMaurice Kalinowski <maurice.kalinowski@theqtcompany.com>2015-04-09 11:06:50 +0000
commit50bf54c62767e1d99f7349b01c21380e9c05fb95 (patch)
treee260cc7e69bc3688a30dae9081ac25be887943d6
parenta11ffc7bc6dd3013a4d6986020232d461b4ee250 (diff)
WinPhone: Re-invoke windeployqt in the MSIL directory
Visual Studio copies all files to be deployed into the MSIL directory and then invokes MDILXapCompile on it, which checks for managed code and translates it into native code. The problem is that all entries of the package will be copied into the MSIL directly, losing the subdirectory structure (for instance for plugins). Hence we recreate the directory structure manually by invoking windeployqt a second time. Task-number: QTBUG-41753 Change-Id: I3d99cbc531bbe883f87b45de37ba71d93472c042 Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
-rw-r--r--qmake/generators/win32/msvc_vcproj.cpp26
1 files changed, 23 insertions, 3 deletions
diff --git a/qmake/generators/win32/msvc_vcproj.cpp b/qmake/generators/win32/msvc_vcproj.cpp
index 9dbeeb38b5..2a5d6a9906 100644
--- a/qmake/generators/win32/msvc_vcproj.cpp
+++ b/qmake/generators/win32/msvc_vcproj.cpp
@@ -1418,9 +1418,29 @@ void VcprojGenerator::initWinDeployQtTool()
conf.windeployqt.ExcludedFromBuild = true;
if (project->isActiveConfig("windeployqt")) {
conf.windeployqt.Record = QStringLiteral("$(TargetName).windeployqt.$(Platform).$(Configuration)");
- conf.windeployqt.CommandLine =
- MakefileGenerator::shellQuote(QDir::toNativeSeparators(project->first("QMAKE_WINDEPLOYQT").toQString()))
- + QLatin1Char(' ') + project->values("WINDEPLOYQT_OPTIONS").join(QLatin1Char(' '))
+ const QString commandLine = MakefileGenerator::shellQuote(QDir::toNativeSeparators(project->first("QMAKE_WINDEPLOYQT").toQString()))
+ + QLatin1Char(' ') + project->values("WINDEPLOYQT_OPTIONS").join(QLatin1Char(' '));
+
+ // Visual Studio copies all files to be deployed into the MSIL directory
+ // and then invokes MDILXapCompile on it, which checks for managed code and
+ // translates it into native code. The problem is that all entries of the
+ // package will be copied into the MSIL directly, losing the subdirectory
+ // structure (for instance for plugins). However, the MDILXapCompile call
+ // itself contains the original subdirectories as parameters and hence the
+ // call fails.
+ // Neither there is a way to disable this behavior for Windows Phone, nor
+ // to influence the parameters. Hence the only way to get a release build
+ // done is to recreate the directory structure manually by invoking
+ // windeployqt a second time, so that the MDILXapCompile call succeeds and
+ // deployment continues.
+ if (conf.WinPhone && conf.Name == QStringLiteral("Release|ARM")) {
+ conf.windeployqt.CommandLine = commandLine
+ + QStringLiteral(" -list relative -dir \"$(MSBuildProjectDirectory)\\")
+ + var("OBJECTS_DIR")
+ + QStringLiteral("MSIL\" \"$(OutDir)\\$(TargetName).exe\" ")
+ + QLatin1String(" && ");
+ }
+ conf.windeployqt.CommandLine += commandLine
+ QStringLiteral(" -list relative -dir \"$(MSBuildProjectDirectory)\" \"$(OutDir)\\$(TargetName).exe\" > ")
+ MakefileGenerator::shellQuote(conf.windeployqt.Record);
conf.windeployqt.config = &vcProject.Configuration;