|
|
#1 |
|
Junior Member
Join Date: Apr 2002
Location: Spain
Posts: 8
|
I'm trying to put in my installer 2 or more dialogs with Install Options DLL. I've tried everything to integrate them with my nsi but I can´t. Has anybody done something like this? In the Install Options documentation there is an example that works ok, but only with one dialog. I need an example with more than 1 dialog.
Thanks. |
|
|
|
|
|
#2 |
|
Guest
Posts: n/a
|
Hi Nideco,
take a look here: http://forums.winamp.com/showthread....hlight=RegCode It creates two pages in the installer: one where a user can insert his/her name and code, and one with the result of checking this code. Good luck, greetz, -Hendri. [Edit] Actually, some typos where in the file at the link above. Fixed now. See the attachment. -Hendri. [/Edit] |
|
|
|
#3 |
|
Junior Member
Join Date: Apr 2002
Location: Spain
Posts: 8
|
Thank u for the code, Smile2me but it's not exactly what I'm looking for. The problem is that in 'regcode' when you are in the second dialog you disable the back button. I want to go backward and forward whenever I want. And I also want to call different .ini (to configure the dialogs), if it's possible.
|
|
|
|
|
|
#4 |
|
Guest
Posts: n/a
|
The disabling of the back-button can be adapted, look at the source for this. It's not necessary to disable the back button. It's necessary in the context of the RegCode but not required.
For the ini thing. You can call as many different ini's as you like. I just made some general function "RunRegged" to call the same ini twice because I modify the ini. It's also possible to use other ini's. What is important for you to know when using InstOpts for inserting pages is the construction in .onNextPage and in .OnPrevPage where the new pages are contructed. This is done using a counter for the page numbers (here $R9). When the page number is what you like it to be, insert a page. Summary, the things you want to do are all possible! Good luck, -Hendri. |
|
|
|
#5 |
|
Junior Member
Join Date: Apr 2002
Location: Spain
Posts: 8
|
I think the solution it's not so easy. The problem is that when you are in the dialog made with InstOpt you can't trigger the functions .OnPrevPage and .OnNextPage, so you have to capture $0 from the dialogs and simulate this events. Thus you can't call the InsOpt dialogs always from .OnPrevPage or .OnNextPage and this makes the code quite difficult.
|
|
|
|
|
|
#6 |
|
Guest
Posts: n/a
|
Hi Nicedo,
here is the source of two examples: the first displays two ini's that are not straight after each other; the second displays two ini's straight after each other. It is indeed not straightforward, but still possible... Good luck, let me know if this helps you out, greetz, -Hendri. |
|
|
|
#7 |
|
Junior Member
Join Date: Apr 2002
Location: Spain
Posts: 8
|
Thanks smile2me, it works!! it's really cool!
|
|
|
|
|
|
#8 |
|
NSIS Dev
Join Date: Sep 2001
Location: Leicester, UK
Posts: 193
|
I struggled with multiple Install Options pages recently too, so I had a go at making the process a little easier to handle.
Here's Hendri's two examples again using this possible method - note the differences between setup1.nsi and setup2.nsi (just 1 line changed, other than comments)! Hope someone finds this useful... -- Dave |
|
|
|
|
|
#9 |
|
Guest
Posts: n/a
|
Nice work Dave!
I knew my source was messy, but I got it to work and was happy with that Thx for clearing the source up!Greetz, -Hendri. |
|
|
|
#10 | |
|
NSIS Dev
Join Date: Sep 2001
Location: Leicester, UK
Posts: 193
|
Quote:
I just thought there must be a way to generalise the process a little!Now... how can we make it even more efficient/configurable/etc... -- Dave |
|
|
|
|
|
|
#11 | |
|
Guest
Posts: n/a
|
Well, here's a little modification of Dave's code. I changed the check for CustomPage. Now it's not necessary anymore to edit the script (add labels and checks for CustomPageD/E/F/...) if you want to add new pages. Just edit the definition of ${PAGES} and the code will do the rest.
[Edit] Quote:
[/Edit] Have fun, greetz, -Hendri. Last edited by Smile2Me; 28th April 2002 at 13:02. |
|
|
|
|
#13 | |
|
NSIS Dev
Join Date: Sep 2001
Location: Leicester, UK
Posts: 193
|
Quote:
Any interest in me completing this? I started trying to turn it into a macro and more configurable (but hopefully not bringing in too much complexity again...) -- Dave. |
|
|
|
|
|
|
#14 |
|
Guest
Posts: n/a
|
Dave,
I'm certainly interested in nice NSIS scripts! Try to complete your idea! Good luck, -Hendri. |
|
|
|
#15 |
|
NSIS Dev
Join Date: Sep 2001
Location: Leicester, UK
Posts: 193
|
Ok, will do...
|
|
|
|
|
|
#16 |
|
NSIS Dev
Join Date: Sep 2001
Location: Leicester, UK
Posts: 193
|
Ok, I can't put this off any longer. You'll just have to have this the way it is
Now included is CustomPages.nsh which defines a macro for encapsulating all the page number tracking, plus more. Multini4.nsi uses this. I had ideas for other examples using the macro, but they'll have to wait Have fun! Dave. |
|
|
|
|
|
#17 |
|
Guest
Posts: n/a
|
Good work Dave!
-Hendri. |
|
|
|
#18 |
|
Guest
Posts: n/a
|
Using MultIni4 I redesigned RegCode for easy implementation. The script only needs an adjustment of the PAGES string if you have other components or if you want the pages to be displayed at another location in the installer.
And of course your custom RegCode checker should be inserted, but that is easy, see the script. Currently the script has a tempentry to test the cases Valid/Invalid regcode. Delete this entry to make it a fully working script. Have fun, -Hendri. |
|
|
|
#19 |
|
Junior Member
Join Date: Nov 2007
Posts: 23
|
When i use the multiini4 and compile the nsi, i get the following two warnings:
code: And i don`t see the two options pages... |
|
|
|
|
|
#20 |
|
Junior Member
Join Date: Nov 2007
Posts: 23
|
[code]
Function: ".onUserAbort" Error: Function named ".onUserAbort" already exists. [\code] What does it mean? This is functions exist only once in my nsi... |
|
|
|
|
|
#21 |
|
Moderator
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
|
.onUserAbort is used by Modern UI.
Use !define MUI_CUSTOMFUNCTION_ABORT MyOnUserAbort Stu |
|
|
|
![]() |
|
|||||||
| Thread Tools | Search this Thread |
| Display Modes | |
|
|