Added PEAddResource and PERemoveResource

git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@7079 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
anders_k 2019-02-10 20:45:40 +00:00
parent 797e745de5
commit 978ac79a5d
17 changed files with 561 additions and 103 deletions

View file

@ -2389,6 +2389,10 @@ int CEXEBuild::SetManifest()
if (manifest == "")
return PS_OK;
// TODO: Ideally we should allow this but we must be sure that the manifest is custom and not a manifest from the stub
//if (res_editor->ResourceExists(MAKEINTRESOURCE(24), 1, CResourceEditor::ANYLANGID))
// 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());
}
@ -2616,7 +2620,7 @@ int CEXEBuild::write_output(void)
}
// Set icon
set_icon(res_editor, IDI_ICON2, installer_icon, uninstaller_icon);
set_main_icon(res_editor, IDI_ICON2, installer_icon, uninstaller_icon);
// Save all changes to the exe header
close_res_editor();