Backwards compatibilty - sections that use SectionIn RO and no other SectionIn should be in all installation types
git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@3200 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
parent
56c10a54da
commit
893a6970f8
1 changed files with 12 additions and 0 deletions
|
@ -2109,11 +2109,23 @@ void CEXEBuild::PreperInstTypes()
|
||||||
if (!(cur_header->flags & CH_FLAGS_NO_CUSTOM))
|
if (!(cur_header->flags & CH_FLAGS_NO_CUSTOM))
|
||||||
cur_header->install_types[NSIS_MAX_INST_TYPES] = DefineInnerLangString(NLF_COMP_CUSTOM);
|
cur_header->install_types[NSIS_MAX_INST_TYPES] = DefineInnerLangString(NLF_COMP_CUSTOM);
|
||||||
|
|
||||||
|
// set insttype list for RO sections that didn't use SectionIn
|
||||||
|
int i = cur_header->blocks[NB_SECTIONS].num;
|
||||||
|
section *sections = (section *) cur_sections->get();
|
||||||
|
|
||||||
|
while (i--)
|
||||||
|
{
|
||||||
|
if (sections[i].flags & SF_RO && !sections[i].install_types)
|
||||||
|
sections[i].install_types = ~0;
|
||||||
|
}
|
||||||
|
|
||||||
|
// set selection to first insttype
|
||||||
if (cur_header->install_types[0])
|
if (cur_header->install_types[0])
|
||||||
{
|
{
|
||||||
int i = cur_header->blocks[NB_SECTIONS].num;
|
int i = cur_header->blocks[NB_SECTIONS].num;
|
||||||
section *sections = (section *) cur_sections->get();
|
section *sections = (section *) cur_sections->get();
|
||||||
|
|
||||||
|
// if /o was used abort since the user did his manual choice
|
||||||
while (i--)
|
while (i--)
|
||||||
if ((sections[i].flags & SF_SELECTED) == 0)
|
if ((sections[i].flags & SF_SELECTED) == 0)
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue