Winamp & Shoutcast Forums

Winamp & Shoutcast Forums (http://forums.winamp.com/index.php)
-   NSIS Discussion (http://forums.winamp.com/forumdisplay.php?f=65)
-   -   Insisting on a specific subdirectory (http://forums.winamp.com/showthread.php?t=179718)

bramm 12th May 2004 10:01

Insisting on a specific subdirectory
 
I want to allow the user to select the directory where to install Vim, but insist that it ends in "vim".

I have a .onVerifyInstDir function for this. This works fine to disable the "install" button until the path typed in the text field ends in "vim".

The undesired side effect is that the dialog of the "browse" button also uses the function, thus disallowing the user to select a directory until he creates a "vim" directory there. Users don't understand this.

I would like to allow the browse dialog to select any directory, and automatically add "vim" to the path when necessary. Is this possible?

A related problem is that this does not always work:
InstallDir "$PROGRAMFILES\Vim"
On Windows 98 I get "c:\Vim" instead of c:\Program Files\Vim".

Joost Verburg 12th May 2004 10:42

$PROGRAMFILES should always work, maybe you have changed this folder on your system.

You should check for "vim" in the leave function of the directory page.

bramm 12th May 2004 11:02

You are right, $PROGRAMFILES is not the problem. I'm using a program to find a previously installed Vim, it defaulted to c:\vim. That overruled the default from NSIS.

Using a leave function on the directory page works. I tried adding "vim" automatically there, but the resulting path does not appear in the text entry field. Assigning a value to $INSTDIR in the leave function apparently doesn't work. Is there a trick?

Joost Verburg 12th May 2004 11:47

If you want to append it automatically, send a WM_SETTEXT message to the text box after changing $INSTDIR.


All times are GMT. The time now is 04:36.

Copyright © 1999 - 2010 Nullsoft. All Rights Reserved.