Skip to content
⌘ NSIS Forum Archive

two page instfiles and two section

8 posts

sgarza#

two page instfiles and two section

I'm very sorry but i can't do a structure like this:

ask directory installation
copyfile there
1 section where i launch other PROGRAM.A installation
2 section where i launch other one PROGRAM.B installation
ask a directory where user installed the program.A
copy other file in this second directory

i try with structure like:

page components
Page directory
Page instfiles FILESA
1 section PROGRAM.A installation
1 section PROGRAM.B installation
Page directory
Page instfiles FILESB

but with this structure the PROGRAM.A and PROGRAM.B installation run two times!! how i must change the structure???
sgarza#
i think too , but i thouhght that is more "clean" to have only one exe,and that it's very strange nsis can't doa structure like the one i want...
Afrow UK#
Ok, I had a go and this one works. The code, however, is very long. You must have at least one section read-only (using SectionIn RO).

It's hard to explain how it works, but I've put quite a few comments in there which should help you.
Basically, it divides the 4 sections in two (for the two apps), including the sections sizes.

If you add more sections, you need to change the Group 'range' defines (under all sections)

-Stu
Afrow UK#edited
I realised that I didn't have to get/set section sizes after I moved the code to before the directory pages.
I've also changed it to use Modern UI

Edit Moved to:


-Stu