Archive: Problem with directoryShow function: a bug?


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

Doesn't happen to me.
Both Pre and Show funct. shows "C:\Test" when I ran the above script.


Happens to me. I'm using NSIS 2.06

-Stu


Me too NSIS 2.06!
But does *NOT* happens to me...

Hmm! Which OS? Mine is Win98SE.


I have tested it under WinXP Pro, Win2000 and Win98SE Oses. The problem happens under WinXP Pro and Win2000.


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.


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.


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.


Thanks, it sounds good.