HOW TO SETUP THE
NSIS INSTALLER'S COMPONENTS MENU
Hey bonk, here's how it's done.
1- You need to specify that you're going to have a components 'page'. Pages are set with some default values which you are probably currently using. You can override this and have your own custom pages come up.
So somewhere at the beginning of the installer script, before the first "Section" is defined.. before the license part, if any, also.
;--------------------------------
;Page license
Page components
Page directory
Page instfiles
UninstPage uninstConfirm
UninstPage instfiles
;--------------------------------
Good. That will enforce a components page to come up. Read up 'Pages' in the docs if you want custom pages for yourself.
2- You may need to have some 'predefined' groups for checkboxes. In my case, I had only 1 predefined group. The other, 'custom', was added automatically. This came right after the Pages definition for me..
;COMPONENTS --------------------------------
InstType "EAW Campaigns for OP"
; InstType /NOCUSTOM
; InstType /COMPONENTSONLYONCUSTOM
;------------------------------
This will make a default setting be available. "Custom" will be the other setting. You can have as many such 'predefined groups' as you like. I think you may need just 1. Please note the commented out options I am not using.
3- next, the trick. Have separate "Sections" for each component you want to install. NAME THEM.
ie:
Section "Base SFC:EAW Story Campaigns for OP"
(...)
SectionEnd
Section "EAW Sulu Bonus Missions"
(...)
SectionEnd
Each section will generate an entry within the components menu with the name given to the section.
4- Components on by default.
Within each section you want the component to be 'on' be default, do this:
Section "Base SFC:EAW Story Campaigns for OP"
SectionIn 1 RO
The "1" number defined here means the first InstType you defined way above. For that InstType, this thing's checked on. The "RO" means Read-Only. Unable to remove that check. Check the docs on "SectionIn" if you have other questions.
Result: the above example should give you a components page where the default InstType is given. The first component should be 'on' and can't be changed. The second component did not have a defined "SectionIn" setting, so is not 'on' by default.
-- Luc