nadigo
17th February 2011 16:58 UTC
how can i show different install pages based on varibile
Hi,
I an trying to build a dynamic install process.
The aim is that based on run time data such as GEO data that is sent to a variable in the script, returning from a server during run time using NSISdl::download_quiet) I will show different install pages,
seems like I cant pass the variable from run time to compile time, as the page sequence build is done out side of functions or sections, and there I have only access to definitions but not variables.
is there a way to do so ?
Nadav
demiller9
17th February 2011 17:35 UTC
There are several approaches you could use. I hope you realize that all of the install pages that you plan to show under any conditions will all be compiled into the installer.
You can skip pages that you don't want to show by calling Abort in the pre-function for the page.
You can also skip pages by sending a windows message to the dialog that selects the page you want to go to when Next is clicked.
You could start a separate installer to handle components that are not directly installed by the main installer. The separate installer might be downloaded from your server when you see that it is needed for a particular install. This is a way that avoids putting every possible installation page into one single installer (which I said in the first paragraph you would have to do). It is possible to hide the main installer while the component installer runs.
Text on pages can be modified; the headers and body text can be based upon variables and also can be changed (using nsDialogs) at run time to display controls and labels according to your needs and your variables' contents.
jiake
18th February 2011 03:58 UTC
%NSISDIR%\Example\makensis.nsi is a typical example