LicenseBkColor now supports /windows (default = white) and /grey (default = grey)

git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@2570 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
kichik 2003-05-25 17:51:20 +00:00
parent 3c29d31593
commit 0568d17ef7
3 changed files with 21 additions and 4 deletions

View file

@ -1206,9 +1206,22 @@ int CEXEBuild::doCommand(int which_token, LineParser &line, FILE *fp, const char
case TOK_LICENSEBKCOLOR:
{
char *p = line.gettoken_str(1);
int v=strtoul(p,&p,16);
build_header.license_bg=((v&0xff)<<16)|(v&0xff00)|((v&0xff0000)>>16);
SCRIPT_MSG("LicenseBkColor: %06X\n",v);
if (!strcmpi(p,"/windows"))
{
build_header.license_bg=-COLOR_WINDOW;
SCRIPT_MSG("LicenseBkColor: /windows\n");
}
else if (!strcmpi(p,"/grey") || !strcmpi(p,"/gray"))
{
build_header.license_bg=-COLOR_BTNFACE;
SCRIPT_MSG("LicenseBkColor: /grey\n");
}
else
{
int v=strtoul(p,&p,16);
build_header.license_bg=((v&0xff)<<16)|(v&0xff00)|((v&0xff0000)>>16);
SCRIPT_MSG("LicenseBkColor: %06X\n",v);
}
}
return make_sure_not_in_secorfunc(line.gettoken_str(0));
#else//!NSIS_CONFIG_LICENSEPAGE