Archive: bugreport and feature request for directory-page selection dialog


bugreport and feature request for directory-page selection dialog
found a bug, i'll try to describe:
if i browse for a folder, e.g. "C:\Program Files\xyz", the folder is valid, and i select it, in the field stands "C:\Program Files\xyz\xyz", and this directory is saved in $INSTDIR.
i'm using the MUI and have defined "MUI_DIRECTORYPAGE_VERIFYONLEAVE".
this is my verify-function:

Function .onVerifyInstDir
IfFileExists "$INSTDIR\xyz.exe" done 0
Abort
done:
FunctionEnd

plz fix that as fast as u can.

and i'd like to have a setting for the selection-dialog, to disable the "create new folder"-button.
if u can include this, i'd be very happy.

thx.

I don't get it... What's the problem? Do you have a problem with your application name being appended on the selected directory in the browse dialog? Read the documentation about InstallDir, add a backslash at the end of the default directory.

Why are you using both .onVerifyInstDir and MUI_DIRECTORYPAGE_VERIFYONLEAVE? If MUI_DIRECTORYPAGE_VERIFYONLEAVE is used, .onVerifyInstDir has no effect.


Your post made me look again at the code and I found a problem there after all. Since RC1 it always appended the application name even if the selected folder name was identical to the application name.

I don't know if that's what you meant or not, but thanks anyway.


hmm, ok, but how do i use MUI_DIRECTORYPAGE_VERIFYONLEAVE?
is this the right syntax:
!define MUI_DIRECTORYPAGE_VERIFYONLEAVE "MyVerifyFunction"
?

and what's about this:

and i'd like to have a setting for the selection-dialog, to disable the "create new folder"-button.
is that possible?

hmm, the directory-selection is still not working correctly:

My default directory looks like that:
"$PROGRAMFILES\EA GAMES\Battlefield 1942"
now, this is shown correctly at first at the directorypage.
then, i search for another path. because no other directory on my system contains the "bf1942.exe", the default-directory is just, what i've to select.
ok, i select it (D:\Programme\EA GAMES\Battlefield 1942) and press "OK".
now, at the directory-page there stands:
"D:\Programme\EA GAMES\Battlefield 1942\Battlefield 1942"
but this directory doesn't exist on my system!!!
that's just what i ment with the bug.
and it's still in the latest cvs.

edit:
if i select "D:\Programme\EA GAMES", the directory is shown as "D:\Programme\EA GAMES\Battlefield 1942".
seems as the directory-page always enhances the path with "Battlefield 1942".
then, that's the bug.


You shouldn't define any value for MUI_DIRECTORYPAGE_VERIFYONLEAVE, you just define it without any value. When using it, use GetInstDirError in the leave function as instructed in the MUI readme.

You can't remove the new folder button.

There is no compiled version in CVS with the fix yet. You should recompile the latest CVS source code.


.onVerifyInstDir still works with defined MUI_DIRECTORYPAGE_VERIFYONLEAVE.


If MUI_DIRECTORYPAGE_VERIFYONLEAVE is used, .onVerifyInstDir has no effect.

but i tested it, and it HAS effect.
i'm sorry.


It is called, but it doesn't disable the next button (on the directory page). Hence, it has no effect.


yes, it doesn't disable the next-button, but it disables the ok-button in the selection-dialog, if "abort" is called in this function. that is what the mui-function doesn't do.
my function looks like that:
Function .onVerifyInstDir
IfFileExists "$INSTDIR\bf1942.exe" +2 0
Abort
FunctionEnd
it has the effect that if u select any directory, that doesn't contain "bf1942.exe", the ok-button is disabled.
it HAS effect :)

edit: i'm in irc now, for further discussing.