hooklee
25th May 2005 12:24 UTC
Problem with directoryShow function: a bug?
With the following codes, $INSTDIR is empty in directoryShow function, while it is "C:\Test" in directoryPre function. Is it a bug?
Name "Test"
OutFile "Test.exe"
InstallDir "C:\Test"
PageEx directory
PageCallbacks directoryPre directoryShow
PageExEnd
Page components
Page instfiles
Function directoryPre
MessageBox MB_OK "directoryPre: $INSTDIR"
FunctionEnd
Function directoryShow
MessageBox MB_OK "directoryShow: $INSTDIR"
FunctionEnd
Section
SectionEnd
playwin2
26th May 2005 22:27 UTC
Doesn't happen to me.
Both Pre and Show funct. shows "C:\Test" when I ran the above script.
Afrow UK
26th May 2005 23:18 UTC
Happens to me. I'm using NSIS 2.06
-Stu
playwin2
27th May 2005 00:35 UTC
Me too NSIS 2.06!
But does *NOT* happens to me...
Hmm! Which OS? Mine is Win98SE.
hooklee
27th May 2005 02:17 UTC
I have tested it under WinXP Pro, Win2000 and Win98SE Oses. The problem happens under WinXP Pro and Win2000.
kichik
27th May 2005 13:54 UTC
Messing with $INSTDIR is not exactly the intention of the show function, but this is still a valid problem. Open a bug report on the SourceForge project page for it, I don't have time to fix it now.
hooklee
27th May 2005 14:34 UTC
I have submitted a bug report: ID 1209843.
Kichik, this function may be useful when the user want to disable/hide some controls by checking $INSTDIR. In my installer, I have two directory pages, one of which is a folder for copying some files if they do not exist there.
kichik
13th January 2006 19:57 UTC
I've finally taken the time to look into it and found the problem. The bug was fixed and the fix will be present in version 2.13 which should be released next weekend.
hooklee
13th January 2006 20:10 UTC
Thanks, it sounds good.