mordekai
17th January 2008 23:15 UTC
modular Sections for NSIS? (newbie)
first off, let me apologize in advance if this is blatantly obvious and i just failed to find it.
I have been researching NSIS (and WiX) for the past two days, and i am heavily leaning toward NSIS.
I can't seem to find documentation on modularizing an installer.
That is:
if i have 6 components that need to be installed over several different pieces of software, I would like to be able to break apart (into different files) each of the components and their installation steps, and then include these components in the software NSIS script.
ie.
Components (in different files): A,B,C,D,E,F
Software_1 includes: A,B,D
Software_2 includes: D,E,F
etc..
Can i do this with NSIS?
thank you for your support
-chris
demiller9
18th January 2008 02:04 UTC
NSIS sections are similar to InstallShield components. You can break your project up into sections or groups of sections, and let the user select them or put logic into your installer and enable/disable sections based upon dependencies you define.
Read the manual ( here and here ) to learn about the Section commands.
Don
mordekai
18th January 2008 17:16 UTC
thanks for your reply demiller9.
I understand that the user can select multiple components during the install if each of these components is described in its own Section. What I want to do, is have my main script include sections from other files.
It looks like i can define a Section in an nsh file... and include that in an nsi file. The Section is then selectable as a component. Is this an acceptable practice? Or is there some other method i should use to include an "installable component" in to my main product installer?
regards
-chris
demiller9
19th January 2008 00:17 UTC
Yes, you can do it with nsh header files. As for being an 'acceptable practice', I suppose that is up to you or your company. I don't see a problem with it.
If the installation of those components is complicated, then creating reusable headers is probably a good thing, as it puts the code into a single location instead of duplicating it for each installer that will be using it.
Don
mordekai
21st January 2008 23:32 UTC
alrighty. thanks again for your help.