Default license color now fits the user system

Now reports the right number of required sections


git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@718 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
kichik 2002-08-22 21:06:07 +00:00
parent 3d50047162
commit 458f6f6c22

View file

@ -1105,11 +1105,6 @@ int CEXEBuild::write_output(void)
return 1;
}
#ifdef NSIS_CONFIG_LICENSEPAGE
if (build_header.license_bg<0)
build_header.license_bg=GetSysColor(COLOR_BTNFACE);
#endif
#ifdef NSIS_CONFIG_UNINSTALL_SUPPORT
if (ubuild_entries.getlen())
{
@ -1398,25 +1393,15 @@ int CEXEBuild::write_output(void)
int ns=build_sections.getlen()/sizeof(section);
section *s=(section*)build_sections.get();
int x;
int req=1;
int div=0;
int divptr=build_strlist.find("-",2);
int req=0;
for (x = 1; x < ns; x ++)
{
if (s[x].name_ptr == divptr) div++;
if (s[x].name_ptr == -1) req++;
if (s[x].name_ptr == -1 || s[x].default_state & DFS_RO) req++;
}
INFO_MSG("Install: %d section%s",ns,ns==1?"":"s");
if (req||div)
if (req)
{
INFO_MSG(" (");
if (req)
{
INFO_MSG("%d required",req);
if (div) INFO_MSG(", ");
}
if (div) INFO_MSG("%d divider%s",div,div==1?"":"s");
INFO_MSG(")");
INFO_MSG(" (%d required)",req);
}
INFO_MSG(".\n");
}