Old 25th September 2006, 13:41   #1
airria
Junior Member
 
Join Date: Sep 2006
Posts: 2
Problems with handling the "NEXT" button on Directory page

Hello!

(first post, so I'm a newbie at this)

Anyway, I'm creating an installer, that will "upgrade" a software avaiable on a cd-rom to a folder. Simply, it copies all files that are usable from the earlier version from a cd-rom, and then extract the new files from the installer itself.

This all works great, but of course, I need to use two directory pages, one for source, and one for destination.

I have written an "verify" function, that works, and allows users to choose "valid" folders. I'm using "onVerifyInstDir" and ti works, for example the "ok" button in the browse folder dialog is disabled / enabled as it should be.

The problem however appears, when I use cd-rom as source. If I do not set "MUI_DIRECTORYPAGE_VERIFYONLEAVE" to false (I'm using modern ui), the "next" button will always be disabled when a cd-rom station is chosen. (no matter what I set with enablewindow, it goes back to disabled).

And, the other way around, If I set verifyonleave, even if I disable the button, it will go back to enabled once I press "cancel" in the "browse folder" window.

So, is there a way to completly "override" the basic functionality that is enabling/disabling the next button?

Thanks for a great forum and a great software!
airria is offline   Reply With Quote
Old 26th September 2006, 13:34   #2
n0On3
Senior Member
 
n0On3's Avatar
 
Join Date: Jan 2001
Location: Barcelona
Posts: 314
Send a message via ICQ to n0On3
Re: Problems with handling the "NEXT" button on Directory page

Quote:
Originally posted by airria
I'm creating an installer, that will "upgrade" a software avaiable on a cd-rom to a folder. Simply, it copies all files that are usable from the earlier version from a cd-rom, and then extract the new files from the installer itself.
I don't know the answer to your problem, but I pressume the installer is also on the CD-ROM, am I right? couldn't you guess the source folder and only ask for destination?

Are you really, really sure that you can't make the installer look for the source files automatically?
n0On3 is offline   Reply With Quote
Old 26th September 2006, 13:51   #3
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
It won't let you use the CD drive, because a CD is read only.
Use InstallOptions to create your own Directory page by using the DirRequest control.

-Stu
Afrow UK is offline   Reply With Quote
Old 26th September 2006, 14:34   #4
airria
Junior Member
 
Join Date: Sep 2006
Posts: 2
Re: Re: Problems with handling the "NEXT" button on Directory page

Quote:
Originally posted by n0On3
I don't know the answer to your problem, but I pressume the installer is also on the CD-ROM, am I right? couldn't you guess the source folder and only ask for destination?

Are you really, really sure that you can't make the installer look for the source files automatically?
No. The installer is not on the CD-ROM. It's not possible to guess the source folder, as it can be anywhere (cd-rom or any folder).

I can make it search for the source files, but running locate to search through an harddrive takes a lot of time.


Quote:
Originally posted by Afrow UK
It won't let you use the CD drive, because a CD is read only.
Use InstallOptions to create your own Directory page by using the DirRequest control.
Yes, but it does allow me to use the cd-drive if I set:
MUI_DIRECTORYPAGE_VERIFYONLEAVE to false. But then it automatically enables the button as soon as I disable it.

InstallOptions is of course a possibility, but it requires lot of code just to resize the browse button. (saw some example in one of your posts, I think)


Anyway, currently I added the function that verifies the folder on _LEAVE for the page. If the folder is not ok, it gives an error messagebox and runs Abort.

So, this solved my problem, but not in the way I wanted.

Thanks for both suggestions!
airria 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