Archive: Custom forms


Custom forms
When a form is build by eg NSIS form designer how is it included in a NSIS installer?

I read about "Page custom" but I do not see in what way to save the form code and use it.

Can someone point me to a simple example for a noob?


you can go to the wiki page of nsis site.;)


There are lots of InstallOptions examples under Examples\InstallOptions and Examples\Modern UI\InstallOptions.nsi

-Stu


Re: Custom forms

Originally posted by marcp
When a form is build by eg NSIS form designer how is it included in a NSIS installer?
A disadvantage of NSIS form designer is that it cannot directly edit an InstallOptions .INI file. Instead, you are supposed to copy the text from the NSIS FD declaration page, paste it into a text file and then save the text file as a .INI file.
If you modify the .INI file by hand, there is no way to get the changes back into NSIS FD. You will have to make the changes manually.

IMHO, HM NIS Edit and EclipseNSIS have better editors for InstallOptions files.
Disclaimer: I am the developer of EclipseNSIS, so it is possible that I am biased. :)

Thank you all for your reply. Indeed the HM NIS Edit program is easier to use :-)


Originally posted by marcp
Indeed the HM NIS Edit program is easier to use :-)
Ya,I agree with you.

Ehum sorry of being such a nob, but I cannot seem to find any good documentation on adding and working with custom forms in NSIS. I looked in the Wiki, but I just cannot seem to find tutorials to get me started...any links where I could find this.

I got to the point of creating forms with the NSIS Form Designer and the HM NSIS Edit...but for help on the actual loading of the forms etc....Im loost ! :(

Very green NSIS user...
Thank you in advance !!


Page Custom MyCustomPage MyCustomLeave

Function MyCustomPage
ReserveFile "InstallOptionsFile.ini"
!insertmacro MUI_INSTALLOPTIONS_EXTRACT "InstallOptionsFile.ini"
!insertmacro MUI_INSTALLOPTIONS_DISPLAY "InstallOptionsFile.ini"
FunctionEnd

Function MyCustomLeave
# Form validation here.
# Call Abort to go back to the page.
FunctionEnd


Simple as that :)
ReserveFile is there as an extra for large installers so that "InstallOptionsFile.ini" will be placed at the top of the compressed files block and will therefore be extracted quicker.

Stu

Cool thanks..

You think I can add this to the wiki ?
http://nsis.sourceforge.net/Main_Page

I will start working on this and try to write up a small nob guide in the wiki and see what happens !
.....
Humm after looking I did find one tutorial, but it could use some brusing up. Using HM NIS Edit to create custom pages, plus it's in word format :igor:

Thank you for the support.


Uhmm whats up with the web links ? Do they need to be approved ?


Yeh it's a new forum 'feature' to stop newly registered members posting spam.

I'll put up a Wiki page.

Edit:
http://nsis.sourceforge.net/Adding_c...nstaller_pages

Stu