Skip to content
⌘ NSIS Forum Archive

Using logging without dirtext

6 posts

Mark_Ive#

Using logging without dirtext

Hi All,
I cannot get install.log to be output unless i have a dirtext command in my nsi. does anyone know a way around this ?
ps im using v1.98
kichik#
Search the forum and find:
Are you a developer who uses NSIS to distribute your application? Are you a Winamp plug-in developer who wants to use NSIS to distribute your plug-in? Have suggestions for other people like you? This is the place.
Mark_Ive#
Name "Test"
OutFile "test.exe"
BrandingText "Test build"
ShowInstDetails show
AllowRootDirInstall true

;Findout what version we are
Section "default"
strcpy $INSTDIR "c:\"
setoutpath $INSTDIR
LogSet On
setoutpath $INSTDIR
setoutpath "c:\"
file "c:\winzip.log"
SectionEnd

i have tried all combinations of logset and $instdir but i cant work it out
Thank you for your time really appreciated
kichik#
OK, I have looked a little in NSIS source and here is the deal:
build_g_logfile, which generates the name for the logfile is only called in two conditions:
1) SilentInstall silentlog
2) The user has not unchecked the box telling the installer to log output (which appears in the directory selection dialog if you hold shift while it shows up). This checkbox is enabled by default, but if the directory selection dialog is not there the box isn't there too...

I guess LogSet was meant just to disable logging of some parts of the installation process rather than starting the whole logging process.

I have absolutely no idea what using SetOutPath worked for the other guy =/

It does sounds logical for build_g_logfile to be called from LogSet, if not already called.

Comments anyone? Should I make this change in my next version?