Old 23rd April 2002, 16:29   #1
Nideco
Junior Member
 
Join Date: Apr 2002
Location: Spain
Posts: 8
Question Several dialogs with Install Options

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.
Nideco is offline   Reply With Quote
Old 23rd April 2002, 17:21   #2
Smile2Me
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]
Attached Files
File Type: zip regcode.zip (1.8 KB, 273 views)
  Reply With Quote
Old 24th April 2002, 08:27   #3
Nideco
Junior Member
 
Join Date: Apr 2002
Location: Spain
Posts: 8
Unhappy

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.
Nideco is offline   Reply With Quote
Old 24th April 2002, 09:04   #4
Smile2Me
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.
  Reply With Quote
Old 24th April 2002, 09:25   #5
Nideco
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.
Nideco is offline   Reply With Quote
Old 24th April 2002, 11:29   #6
Smile2Me
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.
Attached Files
File Type: zip multini.zip (8.1 KB, 265 views)
  Reply With Quote
Old 24th April 2002, 14:22   #7
Nideco
Junior Member
 
Join Date: Apr 2002
Location: Spain
Posts: 8
Thanks smile2me, it works!! it's really cool!
Nideco is offline   Reply With Quote
Old 24th April 2002, 21:29   #8
eccles
NSIS Dev
 
eccles's Avatar
 
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
Attached Files
File Type: zip multini2.zip (8.8 KB, 257 views)
eccles is offline   Reply With Quote
Old 25th April 2002, 09:43   #9
Smile2Me
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.
  Reply With Quote
Old 25th April 2002, 21:27   #10
eccles
NSIS Dev
 
eccles's Avatar
 
Join Date: Sep 2001
Location: Leicester, UK
Posts: 193
Quote:
Originally posted by Smile2Me
I knew my source was messy, but I got it to work and was happy with that Thx for clearing the source up!
Heh! I've got nothing against your code 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
eccles is offline   Reply With Quote
Old 28th April 2002, 08:35   #11
Smile2Me
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:
Now... how can we make it even more efficient/configurable/etc...
This modification is a little contribution to achieving this goal, but the major achievement was that of Dave with his multini2.
[/Edit]

Have fun, greetz,
-Hendri.
Attached Files
File Type: zip multini3.zip (8.4 KB, 225 views)

Last edited by Smile2Me; 28th April 2002 at 13:02.
  Reply With Quote
Old 28th April 2002, 22:02   #12
eccles
NSIS Dev
 
eccles's Avatar
 
Join Date: Sep 2001
Location: Leicester, UK
Posts: 193
Hi Hendri

Aha, I like it

Currently working on multini4... (although a bug with the new !insertmacro has just held me back)...

[edit]
(this bug)
[/edit]

--
Dave.
eccles is offline   Reply With Quote
Old 15th May 2002, 20:50   #13
eccles
NSIS Dev
 
eccles's Avatar
 
Join Date: Sep 2001
Location: Leicester, UK
Posts: 193
Quote:
Originally posted by eccles
Currently working on multini4...
Mmm, I got a little sidetracked

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.
eccles is offline   Reply With Quote
Old 16th May 2002, 05:29   #14
Smile2Me
Guest
 
Posts: n/a
Dave,

I'm certainly interested in nice NSIS scripts! Try to complete your idea!

Good luck,
-Hendri.
  Reply With Quote
Old 16th May 2002, 07:18   #15
eccles
NSIS Dev
 
eccles's Avatar
 
Join Date: Sep 2001
Location: Leicester, UK
Posts: 193
Ok, will do...
eccles is offline   Reply With Quote
Old 6th June 2002, 23:16   #16
eccles
NSIS Dev
 
eccles's Avatar
 
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.
Attached Files
File Type: zip multini4.zip (9.6 KB, 265 views)
eccles is offline   Reply With Quote
Old 7th June 2002, 06:52   #17
Smile2Me
Guest
 
Posts: n/a
Good work Dave!

-Hendri.
  Reply With Quote
Old 11th June 2002, 07:47   #18
Smile2Me
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.
Attached Files
File Type: zip regcodenew.zip (9.9 KB, 237 views)
  Reply With Quote
Old 5th November 2007, 09:39   #19
martijntijn
Junior Member
 
Join Date: Nov 2007
Posts: 23
When i use the multiini4 and compile the nsi, i get the following two warnings:
code:

install function ".onNextPage" not referenced - zeroing code (7-10) out

install function ".onPrevPage" not referenced - zeroing code (10-13) out



And i don`t see the two options pages...
martijntijn is offline   Reply With Quote
Old 5th November 2007, 09:45   #20
martijntijn
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...
martijntijn is offline   Reply With Quote
Old 5th November 2007, 09:53   #21
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
.onUserAbort is used by Modern UI.
Use !define MUI_CUSTOMFUNCTION_ABORT MyOnUserAbort

Stu
Afrow UK is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump