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:
kichik 2003-11-24 13:11:35 +00:00
parent 75299797fd
commit 0ef7fcd98b
4 changed files with 22 additions and 14 deletions

View file

@ -1436,10 +1436,9 @@ static int NSISCALL ExecuteEntry(entry *entry_)
ReadSelfFile((char*)filebuf,filehdrsize);
{
unsigned char* seeker;
unsigned char* unicon_data = seeker = (unsigned char*)my_GlobalAlloc(g_header->uninsticon_size);
unsigned char* unicon_data = seeker = (unsigned char*)my_GlobalAlloc(parm2);
if (unicon_data) {
GetCompressedDataFromDataBlockToMemory(g_header->uninstdata_offset,
unicon_data,g_header->uninsticon_size);
GetCompressedDataFromDataBlockToMemory(parm1,unicon_data,parm2);
while (*seeker) {
struct icondata {
DWORD dwSize;

View file

@ -159,7 +159,7 @@ enum
#endif
#ifdef NSIS_CONFIG_UNINSTALL_SUPPORT
EW_WRITEUNINSTALLER, // WriteUninstaller: 1 [name]
EW_WRITEUNINSTALLER, // WriteUninstaller: 3 [name, offset, icon_size]
#endif
#ifdef NSIS_CONFIG_LOG
@ -304,11 +304,6 @@ typedef struct
int install_directory_ptr; // default install dir.
int install_directory_auto_append; // auto append part
#ifdef NSIS_CONFIG_UNINSTALL_SUPPORT
int uninstdata_offset; // -1 if no uninst data.
int uninsticon_size;
#endif
} header;
// used for section->flags