Archive: With Eclipse+MUI, do main and post have special significance?


With Eclipse+MUI, do main and post have special significance?
I'm trying to help convert a freeware project installer that currently uses InstallShield.

I'm starting with a script that was generated by the EclipsePlugIn that utilizes the ModernUI. This was then modified by a nsis newbie and then I have been trying to get it to work (and I am certainly no expert). There is a fair amount of :winamp: "magic" :winamp: that is over my head. I'd prefer not to get "up to speed" with the EclipsePlugIn, so thought I would be lazy and ask the ever-helpful nsis experts.

Several of the sections have -Main and -post. Do these have special significance with Eclipse and/or the MUI? With "standard" nsis, I've done a little with pre-function, show-function, and leave-function callbacks, and thought "main" and "post" might be related to this.

The script also set a registry string for "Main" which may or may not be coincidental.


Section -Main SEC0000
; .... some statements
WriteRegStr HKLM "${REGKEY}\Components" Main 1
SectionEnd

Section /o un.Main UNSEC0000
; .... some statements
DeleteRegValue HKLM "${BCS_REGKEY}\Components" Main
SectionEnd

Section -post SEC0001
SectionEnd

No real significance in the names.
The "Main" section is the default section generated by the EclipseNSIS wizard. It is set to be hidden by default (which is why it has the "-" prefix). You can change its name to anything you wish in the wizard Installer Contents page and make it visible if you wish.
The "post" section is generated behind the scenes by EclipseNSIS wizard. It is used to perform any essential & required post-installation tasks. Again, it is hidden which is why it has the "-" prefix.
The reason the registry strings are set is so that the uninstaller knows that it should uninstall anything that was installed in that section.
A registry string is set for every section which appears in the Installer Contents page.
That way the user can choose whichever section(s) she/he wishes to install and the uninstaller knows what it has to uninstall.
The wizard is targeted at the novice NSIS developer- as a convenient way to quickly create a working NSIS installer. More accomplished users can then tweak and tune the resulting script as much as they wish.

BTW, the ${BCS_REGKEY} in your Section un.Main doesn't look right to me. Unless it is defined to be the same as ${REGKEY} you are going to wind up with residual entries in the registry after uninstallation.

If you can provide more details of the exact problems you are facing with the script, I am sure you will get plenty of help in this forum.


BTW, the ${BCS_REGKEY} in your Section un.Main doesn't look right to me. Unless it is defined to be the same as ${REGKEY} you are going to wind up with residual entries in the registry after uninstallation.
Good catch ... carelessness on my part writing the post. It is not still that way in the actual script.

The reason the registry strings are set is so that the uninstaller knows that it should uninstall anything that was installed in that section.
My impression is that the wizard generates these statements for uninstalling, but further modifications can cause this to get "out of sync" ... or does the EclipsePlugin keep track of this?

Nope, it does not keep track of it.
Once the script is created you are on your own. :)