diff options
Diffstat (limited to 'qmake/generators/win32/winmakefile.cpp')
-rw-r--r-- | qmake/generators/win32/winmakefile.cpp | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/qmake/generators/win32/winmakefile.cpp b/qmake/generators/win32/winmakefile.cpp index 81bc16a3c6..b6bcdbf366 100644 --- a/qmake/generators/win32/winmakefile.cpp +++ b/qmake/generators/win32/winmakefile.cpp @@ -368,7 +368,8 @@ void Win32MakefileGenerator::processRcFileVar() if (Option::qmake_mode == Option::QMAKE_GENERATE_NOTHING) return; - if (((!project->values("VERSION").isEmpty() || !project->values("RC_ICONS").isEmpty()) + const QString manifestFile = getManifestFileForRcFile(); + if (((!project->values("VERSION").isEmpty() || !project->values("RC_ICONS").isEmpty() || !manifestFile.isEmpty()) && project->values("RC_FILE").isEmpty() && project->values("RES_FILE").isEmpty() && !project->isActiveConfig("no_generated_target_info") @@ -412,7 +413,7 @@ void Win32MakefileGenerator::processRcFileVar() ts << "# if defined(UNDER_CE)\n"; ts << "# include <winbase.h>\n"; ts << "# else\n"; - ts << "# include <winver.h>\n"; + ts << "# include <windows.h>\n"; ts << "# endif\n"; ts << endl; if (!rcIcons.isEmpty()) { @@ -420,6 +421,14 @@ void Win32MakefileGenerator::processRcFileVar() ts << QString("IDI_ICON%1\tICON\tDISCARDABLE\t%2").arg(i + 1).arg(cQuoted(rcIcons[i])) << endl; ts << endl; } + if (!manifestFile.isEmpty()) { + QString manifestResourceId; + if (project->first("TEMPLATE") == "lib") + manifestResourceId = QStringLiteral("ISOLATIONAWARE_MANIFEST_RESOURCE_ID"); + else + manifestResourceId = QStringLiteral("CREATEPROCESS_MANIFEST_RESOURCE_ID"); + ts << manifestResourceId << " RT_MANIFEST \"" << manifestFile << "\"\n"; + } ts << "VS_VERSION_INFO VERSIONINFO\n"; ts << "\tFILEVERSION " << QString(versionString).replace(".", ",") << endl; ts << "\tPRODUCTVERSION " << QString(versionString).replace(".", ",") << endl; @@ -894,4 +903,9 @@ QString Win32MakefileGenerator::cQuoted(const QString &str) return ret; } +QString Win32MakefileGenerator::getManifestFileForRcFile() const +{ + return QString(); +} + QT_END_NAMESPACE |