From 893a6970f8bccf1e5aa156bd2650f28e4f2e8cd9 Mon Sep 17 00:00:00 2001 From: kichik Date: Mon, 24 Nov 2003 19:36:15 +0000 Subject: [PATCH] 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 --- Source/build.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/Source/build.cpp b/Source/build.cpp index 048dce5b..48f87d87 100644 --- a/Source/build.cpp +++ b/Source/build.cpp @@ -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;