Uninstaller data offset is saved as EW_WRITEUNINSTALLER's parameters. A step forward to multiple uninstallers and smaller exehead.
git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@3192 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
parent
75299797fd
commit
0ef7fcd98b
4 changed files with 22 additions and 14 deletions
|
@ -2754,8 +2754,24 @@ int CEXEBuild::uninstall_generate()
|
|||
if (icon_offset == 0)
|
||||
return PS_ERROR;
|
||||
|
||||
build_header.uninstdata_offset=build_datablock.getlen();
|
||||
build_header.uninsticon_size=unicondata_size;
|
||||
entry *ent = (entry *) build_entries.get();
|
||||
if (!ent)
|
||||
return PS_ERROR;
|
||||
int ents = build_header.blocks[NB_ENTRIES].num;
|
||||
int uns = uninstaller_writes_used;
|
||||
int uninstdata_offset = build_datablock.getlen();
|
||||
while (ents--)
|
||||
{
|
||||
if (ent->which == EW_WRITEUNINSTALLER)
|
||||
{
|
||||
ent->offsets[1] = uninstdata_offset;
|
||||
ent->offsets[2] = unicondata_size;
|
||||
uns--;
|
||||
if (!uns)
|
||||
break;
|
||||
}
|
||||
ent++;
|
||||
}
|
||||
|
||||
if (add_db_data((char *)m_unicon_data,unicondata_size) < 0)
|
||||
return PS_ERROR;
|
||||
|
@ -2920,7 +2936,7 @@ int CEXEBuild::uninstall_generate()
|
|||
uninstall_size_full=fh.length_of_all_following_data+unicondata_size;
|
||||
|
||||
// compressed size
|
||||
uninstall_size=build_datablock.getlen()-build_header.uninstdata_offset;
|
||||
uninstall_size=build_datablock.getlen()-uninstdata_offset;
|
||||
|
||||
SCRIPT_MSG("Done!\n");
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue