Archive: Need Script Examples


Need Script Examples
Ok. Couple of things...

1. Is there a way to "alias" a file list and then use that list for the uninstaller so you don't have to type the file(s) you want to affect twice?

2. Is there a way to create a "setup" and then split "data" files to span CDs/floppies/etc. For Internet Downloads and stuff? Like WinRar's and Winzip's split feature?

3. I'm still a little lost on how to change the branding image on multiple pages for the install/uninstall.

4. Need a little help on creating installation options. E.g.

Install this
Install this AND that
Install this and that but NOT this

I'm having a tough time today interpreting some example scripts.


1) Just !define it, and then you can use it where ever you want in the script.

Example:
!define NAME blabla
Section asd
MessageBox MB_OK "You are about to install ${NAME}"
SectionEnd
...
Section uninstall
MessageBox MB_OK "You are about to uninstall ${NAME}"
SectionEnd

2) Not currently.

3) Every time you get .onNextPage or .onPrevPage you need to use SetBrandingImage to change to current image according to the page you are currently in. That is unless you want to show just one image. If one image is the case, just set it once from .onNextPage.

4) Installation types are specified using the InstType command. You can specify up to 8 installation types, unlessed you have recompiled NSIS with other settings. To specify which section is in which installation type use SectionIn. Have a look at makensis.nsi, it is a good example for this.


Getting Further...
Ok. This is starting to make sense, but I think I'm still confused on Instype.

I have 3 options.

Slideshow with Pictures
Slideshow Only
Pictures only

Obviously, the logic isn't important right now, but I have 3 options. None are RO. The sectionin command is used in the example, so I have 1 2 3 but I'm still not sure I'm doing it right.

I don't get any choices when I run the compiled EXE. It just prompts for the installation directory with no installation chioces.

:( Sorry... I must be missing something simple.


You must set the "ComponentText" to show the options tab.

example:
ComponentText "Select your components"


Thank you.
I'm glad it was "something simple."
Thanks. I just missed that step!

Now I understand what the SectionIn does too.

Thanks for all the help, everyone.
It's all starting to click for me.

Not bad for someone that just downloaded this a couple of days ago! ;)