summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoerg Bornemann <joerg.bornemann@digia.com>2012-12-18 11:26:09 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2012-12-18 19:30:06 +0100
commitcdff53cda858fbf9e4e9b909805132f5033b5165 (patch)
tree7fcee82b59550f6dc2018eb9aba310ab53601241
parentdc2bfb6f8977732e1cd5ed9faac5a32870e2967a (diff)
fix DLL manifest resource ids for debug builds
The resource id must be 2 for DLLs. This was broken for the "debug with incremental linking" case. Task-number: QTBUG-28682 Task-number: QTBUG-28683 Change-Id: Id8c48a1dec30e341de949213c63c1c9b73956dac Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
-rw-r--r--qmake/generators/win32/msvc_nmake.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/qmake/generators/win32/msvc_nmake.cpp b/qmake/generators/win32/msvc_nmake.cpp
index 6a1d6d1fa3..d899c707d4 100644
--- a/qmake/generators/win32/msvc_nmake.cpp
+++ b/qmake/generators/win32/msvc_nmake.cpp
@@ -409,6 +409,7 @@ void NmakeMakefileGenerator::writeBuildRulesPart(QTextStream &t)
manifest = escapeFilePath(fileFixify(manifest));
}
+ const QString resourceId = (templateName == "app") ? "1" : "2";
const bool incrementalLinking = project->values("QMAKE_LFLAGS").toQStringList().filter(QRegExp("(/|-)INCREMENTAL:NO")).isEmpty();
if (incrementalLinking) {
// Link a resource that contains the manifest without modifying the exe/dll after linking.
@@ -418,7 +419,8 @@ void NmakeMakefileGenerator::writeBuildRulesPart(QTextStream &t)
QString manifest_bak = escapeFilePath(target + "_manifest.bak");
project->values("QMAKE_CLEAN") << manifest_rc << manifest_res;
- t << "\n\techo 1 /* CREATEPROCESS_MANIFEST_RESOURCE_ID */ 24 /* RT_MANIFEST */ "
+ t << "\n\techo " << resourceId
+ << " /* CREATEPROCESS_MANIFEST_RESOURCE_ID */ 24 /* RT_MANIFEST */ "
<< cQuoted(unescapeFilePath(manifest)) << ">" << manifest_rc;
if (generateManifest) {
@@ -441,7 +443,6 @@ void NmakeMakefileGenerator::writeBuildRulesPart(QTextStream &t)
// directly embed the manifest in the executable after linking
t << "\n\t";
writeLinkCommand(t, extraLFlags);
- const QString resourceId = (templateName == "app") ? "1" : "2";
t << "\n\t" << "mt.exe /nologo /manifest " << manifest
<< " /outputresource:$(DESTDIR_TARGET);" << resourceId;
}