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:
kichik 2003-11-24 19:36:15 +00:00
parent 56c10a54da
commit 893a6970f8

View file

@ -2109,11 +2109,23 @@ void CEXEBuild::PreperInstTypes()
if (!(cur_header->flags & CH_FLAGS_NO_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])
{
int i = cur_header->blocks[NB_SECTIONS].num;
section *sections = (section *) cur_sections->get();
// if /o was used abort since the user did his manual choice
while (i--)
if ((sections[i].flags & SF_SELECTED) == 0)
return;