- added GetErrorLevel and SetErrorLevl

- fixed some inconsistencies in the error levels the installer/uninstaller set


git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@3668 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
kichik 2004-09-25 10:49:08 +00:00
parent f4089b9d60
commit e82748702c
8 changed files with 45 additions and 14 deletions

View file

@ -4280,6 +4280,19 @@ int CEXEBuild::doCommand(int which_token, LineParser &line)
ent.offsets[1]=add_intstring(1);
SCRIPT_MSG("SetErrors\n");
return add_entry(&ent);
case TOK_SETERRORLEVEL:
ent.which=EW_SETFLAG;
ent.offsets[0]=FLAG_OFFSET(errlvl);
ent.offsets[1]=add_string(line.gettoken_str(1));
SCRIPT_MSG("SetErrorLevel: %s\n",line.gettoken_str(1));
return add_entry(&ent);
case TOK_GETERRORLEVEL:
ent.which=EW_GETFLAG;
ent.offsets[0]=GetUserVarIndex(line, 1);
ent.offsets[1]=FLAG_OFFSET(errlvl);
if (line.gettoken_str(1)[0] && ent.offsets[0]<0) PRINTHELP()
SCRIPT_MSG("GetErrorLevel: %s\n",line.gettoken_str(1));
return add_entry(&ent);
#ifdef NSIS_SUPPORT_STROPTS
case TOK_STRLEN:
ent.which=EW_STRLEN;