Archive: I'm out of brainpower. Help me with this?


I'm out of brainpower. Help me with this?
Hey everyone, first off, my apologies. I've looked through the manuals, and to be honest, my mind is boggled. I've previously written a few nice install scripts and used a few different plugins etc.

Basically, I need help on how to implement the following idea.

I have a program that needs updating. In the older version (1.0) there is 1 dll file need updating. In the new version (2.0) there is also 1 dll file, with the same name, that needs updating.
So, I have 2 dll files, that I want to update. They are the same, but the dll from V1 cannot be installed to any V2 installation. So first of all, after the licence pages etc, I need the user to have two options, either 1.0 or 2.0. (Perhaps in radio buttons??)

Ok, so after that, the DLL needs to be configured for certain options. I have three different options for the DLL (depending on internal values the program will operate differently.) and I was thinking next, a page with three dropdown menus, where the user can select a value for each option. Then continue to the install pages etc etc. Is this possible?

Many, many, many thanks if you can solve my problem. BTW I am using MUI.nsh, and the latest (and greatest) version of NSIS.

EDIT: The reason for this is that the number of options I am going to be included is massive, using installoptions would get VERY messy. So instead of the default InstallOptions page, I'd like the page with three dropdown menus (obviously, two different versions of that page depending on what version the user had (v1 or v2) )


From the FAQ:

Use InstallOptions plug-in to create custom dialogs during the installation process. For an examples, see the 'Examples\InstallOptions' folder. For documentation, see the 'Docs\InstallOptions' folder.

AHH.

Please help me. I've run into some very sticky problems, which I now can't get my head around.

Here is my original script.

[edit]script attached below[/edit]

Now, instead of the Components page, I would like to make
the INI with the three pulldown menus. Based on the user
selections in the three menus, different files will be
chosen. I have read the documentations, but I must say I'm
still finding it quite difficult to understand :( Please
help! How would I change my script to go about this.

Ok, here's what I understand so far. I need to create a
custom page, inbetween the licence and directory pages
(instead of the components page?) Do this by way of a .ini
file. If anyone could help with that one too, I'd be very
grateful. I need to combine the user inputs of those three
different fields, and by those inputs choose the 1 file
that the user needs. (User choose a time limit of 15 mins,
a speed of 30 knots and a turn speed of 15 knots, and then
the script knows to choose the DLL with that settings in it.)
As far as that is concerned, I am confused as to how to relate these user input values, to the installsection values?
I'm sorry that I've kinda flipped off the deepend :) Any help
at all is appreciated as I don't think I can really
accomplish what I'm trying to on my own.


There are some utilities than can help you to create custom dialog (Form designer, and HMNIS io_editor). Use

Page custom PageCreate PageLeave

Use PageCreate function to prepare and display custom dialog (don't forget extract ini-file before):

!insertmacro MUI_INSTALLOPTIONS_DISPLAY "dialog.ini"

Use PageLeave function to check which values user was selected. For this use MUI_INSTALLOPTIONS_READ macro (read your ini file).
For example in your custom dialog there are only 3 droplists ("Field 1", "Field 2" and "Field 3"). Following code store in $R1 user selected value for seond droplist:

!insertmacro MUI_INSTALLOPTIONS_READ $R1 "dialog.ini" "Field 2" "State"

Depending this selection you can choose which setion you need to install.

Please attach large scripts. I've attached your script to this post.


Thankyou, and sorry for inserting a large script.

I'll go and try your suggestions, seems a lot clearer now though :)