Skip to content

Commit

Permalink
LicenseBkColor in the uninstaller (bug #1314)
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@7442 212acab6-be3b-0410-9dea-997c60f758d6
  • Loading branch information
sredna committed Oct 16, 2024
1 parent eea3211 commit d13fbec
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 9 deletions.
2 changes: 2 additions & 0 deletions Docs/src/history.but
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ Workgroups party? The end of 16-bit?

\b Support setting source file decoding charset with magic comment (\W{http://sf.net/p/nsis/patches/292}{patch #292})

\b Fixed LicenseBkColor for uninstaller (\W{http://sf.net/p/nsis/bugs/1314}{bug #1314})

\b Handle CHARSET command line parameter in MakeNSISW (\W{http://sf.net/p/nsis/patches/315}{patch #315})

\b Make System/Resource.dll reproducible (\W{http://sf.net/p/nsis/patches/312}{patch #312})
Expand Down
19 changes: 10 additions & 9 deletions Source/script.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1573,25 +1573,26 @@ int CEXEBuild::doCommand(int which_token, LineParser &line)
return PS_OK;
case TOK_LICENSEBKCOLOR:
{
const TCHAR *cmdname = _T("LicenseBkColor");
TCHAR *p = line.gettoken_str(1);
if (!_tcsicmp(p,_T("/windows")))
const TCHAR *cmdname = _T("LicenseBkColor"), *paramname;
TCHAR *p = line.gettoken_str(1), *p2;
if (!_tcsicmp(p,paramname = _T("/windows")) || !_tcsicmp(p,_T("/window")))
{
build_header.license_bg=-COLOR_WINDOW;
SCRIPT_MSG(_T("%") NPRIs _T(": /windows\n"),cmdname);
SCRIPT_MSG(_T("%") NPRIs _T(": %") NPRIs _T("\n"),cmdname,paramname);
}
else if (!_tcsicmp(p,_T("/grey")) || !_tcsicmp(p,_T("/gray")))
else if (!_tcsicmp(p,paramname = _T("/grey")) || !_tcsicmp(p,_T("/gray")))
{
build_header.license_bg=-COLOR_BTNFACE;
SCRIPT_MSG(_T("%") NPRIs _T(": /grey\n"),cmdname);
build_header.license_bg=-COLOR_BTNFACE; /* Note: This might not actually be gray */
SCRIPT_MSG(_T("%") NPRIs _T(": %") NPRIs _T("\n"),cmdname,paramname);
}
else
{
const int v=_tcstoul(p,&p,16);
const int v=_tcstoul(p,&p2,16);
if (p2 == p) return PS_ERROR;
build_header.license_bg=((v&0xff)<<16)|(v&0xff00)|((v&0xff0000)>>16);
build_uninst.license_bg=build_header.license_bg;
SCRIPT_MSG(_T("%") NPRIs _T(": %06X\n"),cmdname,v);
}
build_uninst.license_bg=build_header.license_bg;
}
return PS_OK;
#else
Expand Down

0 comments on commit d13fbec

Please sign in to comment.