applied patch #1372048 - added /NONFATAL switch to !include statement
git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@4437 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
parent
90a7765cd6
commit
b1be974447
4 changed files with 38 additions and 6 deletions
|
@ -2745,7 +2745,20 @@ int CEXEBuild::doCommand(int which_token, LineParser &line)
|
|||
return PS_OK;
|
||||
case TOK_P_INCLUDE:
|
||||
{
|
||||
bool required = true;
|
||||
|
||||
char *f = line.gettoken_str(1);
|
||||
|
||||
if(!stricmp(f,"/nonfatal")) {
|
||||
if (line.getnumtokens()!=3)
|
||||
PRINTHELP();
|
||||
|
||||
f = line.gettoken_str(2);
|
||||
required = false;
|
||||
} else if (line.getnumtokens()!=2) {
|
||||
PRINTHELP();
|
||||
}
|
||||
|
||||
#ifdef _WIN32
|
||||
char *fc = f;
|
||||
#else
|
||||
|
@ -2820,8 +2833,12 @@ int CEXEBuild::doCommand(int which_token, LineParser &line)
|
|||
// nothing found
|
||||
if (!included)
|
||||
{
|
||||
ERROR_MSG("!include: could not find: \"%s\"\n",f);
|
||||
return PS_ERROR;
|
||||
if(required) {
|
||||
ERROR_MSG("!include: could not find: \"%s\"\n",f);
|
||||
return PS_ERROR;
|
||||
} else {
|
||||
warning_fl("!include: could not find: \"%s\"",f);
|
||||
}
|
||||
}
|
||||
}
|
||||
return PS_OK;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue