#1787648: ${__SECTION__} is correctly defined in hidden section
git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@6107 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
parent
1421a3e315
commit
ab8f90f99e
2 changed files with 10 additions and 14 deletions
|
@ -1187,10 +1187,9 @@ int CEXEBuild::add_section(const TCHAR *secname, const TCHAR *defname, int expan
|
|||
|
||||
TCHAR *name = (TCHAR*)secname;
|
||||
|
||||
// Is it a hidden section?
|
||||
if (secname[0] == _T('-'))
|
||||
if (name[0] == _T('\x1F')) // SectionGroup/SectionGroupEnd
|
||||
{
|
||||
if (secname[1])
|
||||
if (name[1])
|
||||
{
|
||||
new_section.flags |= SF_SECGRP;
|
||||
name++;
|
||||
|
@ -1199,6 +1198,10 @@ int CEXEBuild::add_section(const TCHAR *secname, const TCHAR *defname, int expan
|
|||
new_section.flags |= SF_SECGRPEND;
|
||||
}
|
||||
|
||||
int hidden = (name[0] == _T('-'));
|
||||
if (hidden)
|
||||
name++;
|
||||
|
||||
if (name[0] == _T('!'))
|
||||
{
|
||||
name++;
|
||||
|
@ -1236,8 +1239,8 @@ int CEXEBuild::add_section(const TCHAR *secname, const TCHAR *defname, int expan
|
|||
|
||||
new_section.code = cur_entries->getlen() / sizeof(entry);
|
||||
|
||||
new_section.install_types = *name ? 0 : ~0;
|
||||
new_section.name_ptr = add_string(name);
|
||||
new_section.install_types = (!hidden && *name) ? 0 : ~0;
|
||||
new_section.name_ptr = hidden ? 0 : add_string(name);
|
||||
memset(&new_section.name,0,sizeof(new_section.name));
|
||||
|
||||
cur_sections->add(&new_section, sizeof(section));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue