From 03e1e4138ccf6b73c73b2fed6db0e740af43ef76 Mon Sep 17 00:00:00 2001 From: Joerg Bornemann Date: Tue, 11 Dec 2012 11:31:41 +0100 Subject: [PATCH] qmake: fix manifest embedding for DLLs Manifests must be embedded into DLLs with the resource id 2, not 1. This fixes a regression introduced in commit c9406bcf. Task-number: QTBUG-28524 Change-Id: I93b1dfe4614d0535f47fd881b8688a23e83e845f Reviewed-by: Oswald Buddenhagen Reviewed-by: Ismo Haataja Reviewed-by: Joerg Bornemann --- qmake/generators/win32/msvc_nmake.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/qmake/generators/win32/msvc_nmake.cpp b/qmake/generators/win32/msvc_nmake.cpp index 3fed7b4b7b..6a1d6d1fa3 100644 --- a/qmake/generators/win32/msvc_nmake.cpp +++ b/qmake/generators/win32/msvc_nmake.cpp @@ -441,7 +441,9 @@ void NmakeMakefileGenerator::writeBuildRulesPart(QTextStream &t) // directly embed the manifest in the executable after linking t << "\n\t"; writeLinkCommand(t, extraLFlags); - t << "\n\t" << "mt.exe /nologo /manifest " << manifest << " /outputresource:$(DESTDIR_TARGET);1"; + const QString resourceId = (templateName == "app") ? "1" : "2"; + t << "\n\t" << "mt.exe /nologo /manifest " << manifest + << " /outputresource:$(DESTDIR_TARGET);" << resourceId; } } else { t << "\n\t";