Winamp & Shoutcast Forums

Winamp & Shoutcast Forums (http://forums.winamp.com/index.php)
-   NSIS Discussion (http://forums.winamp.com/forumdisplay.php?f=65)
-   -   Modern UI, Directory page (http://forums.winamp.com/showthread.php?t=283237)

Lymc 15th December 2007 15:03

Modern UI, Directory page
 
I have used NSIS for 3 years, and lately came up with a new product that needs installing, but with different options than my old one. It should, by default, install in My Documents. So, I found the proper incantation to bring that about:

Call GetMyDocs
!insertmacro MUI_INNERDIALOG_TEXT 1019 $0

in the ShowDirectory function, which converts My Documents into a path and then displays it in the edit box. My problem is that the Install button doesn't enable when I do that; in fact, it doesn't enable even if I Browse and manually select, or type in, the Path, which is, on my machine, E:\ .

I understand I'm using an old version of NSIS and an old version of Modern UI, but they've worked and I'm reluctant to go through a relearn to get back what I already have. If anyone has an easy fix, I'd be grateful.

kichik 15th December 2007 15:09

Root directories are not supported as installation directories by default for the sake of the user. To allow root directories, use AllowRootDirInstall.

BTW, it'd be easier to just set $INSTDIR in .onInit instead of using page callbacks. This way, it'd also work in silent mode.
code:
Function .onInit
StrCpy $INSTDIR $DOCUMENTS
FunctionEnd



BTW #2, there is nothing to relearn when upgrading. Backward compatibility is very important to me and I do my best to keep old scripts working as expected on new versions..

Lymc 15th December 2007 15:43

Thank you, Kichik, for the help; the script is now working like a champ, as I fully expected it would when I had the clue. And thanks for the compatibility; I'll look into upgrading both packages here soon.

Great support!


All times are GMT. The time now is 06:00.

Copyright © 1999 - 2010 Nullsoft. All Rights Reserved.