Added ManifestMaxVersionTested

git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@7096 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
anders_k 2019-06-06 00:42:08 +00:00
parent 68547d1e63
commit fb6945ec36
9 changed files with 50 additions and 11 deletions

View file

@ -2383,8 +2383,8 @@ int CEXEBuild::SetManifest()
{
try {
init_res_editor();
// This should stay ANSI
string manifest = manifest::generate((manifest::flags)manifest_flags, manifest_comctl, manifest_exec_level, manifest_dpiaware, manifest_dpiawareness.c_str(), manifest_sosl);
manifest::SPECIFICATION spec = { (manifest::flags) manifest_flags, manifest_dpiaware, manifest_dpiawareness.c_str(), manifest_sosl, manifest_maxversiontested.c_str() };
string manifest = manifest::generate(manifest_comctl, manifest_exec_level, spec);
if (manifest == "")
return PS_OK;
@ -2394,7 +2394,7 @@ int CEXEBuild::SetManifest()
// return PS_OK; // Allow user to completely override the manifest with PEAddResource
// Saved directly as binary into the exe.
res_editor->UpdateResource(MAKEINTRESOURCE(24), 1, NSIS_DEFAULT_LANG, (LPBYTE) manifest.c_str(), (DWORD)manifest.length());
res_editor->UpdateResource(MAKEINTRESOURCE(24), 1, NSIS_DEFAULT_LANG, (LPBYTE) const_cast<char*>(manifest.c_str()), (DWORD) manifest.length());
}
catch (exception& err) {
ERROR_MSG(_T("Error setting manifest: %") NPRIs _T("\n"), CtoTStrParam(err.what()));