size optimization
git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@5111 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
parent
fa5602f290
commit
f44be03eeb
2 changed files with 27 additions and 16 deletions
|
@ -59,7 +59,14 @@ HRESULT g_hres;
|
||||||
|
|
||||||
static int NSISCALL ExecuteEntry(entry *entry_);
|
static int NSISCALL ExecuteEntry(entry *entry_);
|
||||||
|
|
||||||
#define resolveaddr(v) ((v<0) ? myatoi(g_usrvars[-(v+1)]) : v)
|
int NSISCALL resolveaddr(int v)
|
||||||
|
{
|
||||||
|
if (v < 0)
|
||||||
|
{
|
||||||
|
return myatoi(g_usrvars[-(v+1)]);
|
||||||
|
}
|
||||||
|
return v;
|
||||||
|
}
|
||||||
|
|
||||||
int NSISCALL ExecuteCodeSegment(int pos, HWND hwndProgress)
|
int NSISCALL ExecuteCodeSegment(int pos, HWND hwndProgress)
|
||||||
{
|
{
|
||||||
|
@ -257,19 +264,23 @@ static int NSISCALL ExecuteEntry(entry *entry_)
|
||||||
return ExecuteCodeSegment(v,NULL);
|
return ExecuteCodeSegment(v,NULL);
|
||||||
}
|
}
|
||||||
case EW_UPDATETEXT:
|
case EW_UPDATETEXT:
|
||||||
if (parm1) {
|
{
|
||||||
static int old_st_updateflag=6;
|
static int old_st_updateflag=6;
|
||||||
if (parm1&8) ui_st_updateflag=old_st_updateflag;
|
if (parm2)
|
||||||
else {
|
{
|
||||||
old_st_updateflag=ui_st_updateflag;
|
ui_st_updateflag=old_st_updateflag;
|
||||||
ui_st_updateflag=parm1;
|
}
|
||||||
}
|
else if (parm1)
|
||||||
|
{
|
||||||
|
old_st_updateflag=ui_st_updateflag;
|
||||||
|
ui_st_updateflag=parm1;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
log_printf2("detailprint: %s",GetStringFromParm(0x00));
|
log_printf2("detailprint: %s",GetStringFromParm(0x00));
|
||||||
update_status_text(parm0,0);
|
update_status_text(parm0,0);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case EW_SLEEP:
|
case EW_SLEEP:
|
||||||
{
|
{
|
||||||
|
@ -923,8 +934,7 @@ static int NSISCALL ExecuteEntry(entry *entry_)
|
||||||
char *highout=var0;
|
char *highout=var0;
|
||||||
char *lowout=var1;
|
char *lowout=var1;
|
||||||
DWORD s1;
|
DWORD s1;
|
||||||
DWORD t[4]; // our two members are the 3rd and 4th..
|
VS_FIXEDFILEINFO *pvsf1;
|
||||||
VS_FIXEDFILEINFO *pvsf1=(VS_FIXEDFILEINFO*)t;
|
|
||||||
DWORD d;
|
DWORD d;
|
||||||
char *buf1=GetStringFromParm(-0x12);
|
char *buf1=GetStringFromParm(-0x12);
|
||||||
s1=GetFileVersionInfoSize(buf1,&d);
|
s1=GetFileVersionInfoSize(buf1,&d);
|
||||||
|
@ -1277,12 +1287,12 @@ static int NSISCALL ExecuteEntry(entry *entry_)
|
||||||
{
|
{
|
||||||
if (t==REG_DWORD)
|
if (t==REG_DWORD)
|
||||||
{
|
{
|
||||||
if (!parm4) exec_error++;
|
exec_error += !parm4;
|
||||||
myitoa(p,*((DWORD*)p));
|
myitoa(p,*((DWORD*)p));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (parm4) exec_error++;
|
exec_error += parm4;
|
||||||
p[l]=0;
|
p[l]=0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -4540,7 +4540,7 @@ int CEXEBuild::doCommand(int which_token, LineParser &line)
|
||||||
if (ent.offsets[1] < 0) PRINTHELP();
|
if (ent.offsets[1] < 0) PRINTHELP();
|
||||||
switch (ent.offsets[1]) {
|
switch (ent.offsets[1]) {
|
||||||
case 0:
|
case 0:
|
||||||
ent.offsets[1]=8;
|
ent.offsets[2]=1;
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
case 2:
|
case 2:
|
||||||
|
@ -5794,8 +5794,8 @@ int CEXEBuild::doCommand(int which_token, LineParser &line)
|
||||||
// SetDetailsPrint lastused
|
// SetDetailsPrint lastused
|
||||||
ent.which=EW_UPDATETEXT;
|
ent.which=EW_UPDATETEXT;
|
||||||
ent.offsets[0]=0;
|
ent.offsets[0]=0;
|
||||||
ent.offsets[1]=8; // lastused
|
ent.offsets[1]=0;
|
||||||
ent.offsets[2]=0;
|
ent.offsets[2]=1; // lastused
|
||||||
ret=add_entry(&ent);
|
ret=add_entry(&ent);
|
||||||
if (ret != PS_OK) {
|
if (ret != PS_OK) {
|
||||||
return ret;
|
return ret;
|
||||||
|
@ -5866,7 +5866,8 @@ int CEXEBuild::doCommand(int which_token, LineParser &line)
|
||||||
// SetDetailsPrint lastused
|
// SetDetailsPrint lastused
|
||||||
ent.which=EW_UPDATETEXT;
|
ent.which=EW_UPDATETEXT;
|
||||||
ent.offsets[0]=0;
|
ent.offsets[0]=0;
|
||||||
ent.offsets[1]=8; // lastused
|
ent.offsets[1]=0;
|
||||||
|
ent.offsets[2]=1; // lastused
|
||||||
ret=add_entry(&ent);
|
ret=add_entry(&ent);
|
||||||
if (ret != PS_OK) return ret;
|
if (ret != PS_OK) return ret;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue