Archive: Logfile and NSIS_CONFIG_LOG


Logfile and NSIS_CONFIG_LOG
Hi

i try to log to a logfile during the installation with "LogSet on". When i try to compile the nsi file, the compiler refuses to compile because NSIS_CONFIG_LOG is not set. How do i set this flag?

I tried !define NSIS_CONFIG_LOG and i tried compiling with /DNSIS_CONFIG_LOG but after that the compiler still complains about that its not set.

JWB


This is a flag that should be turned on in the source of NSIS. Recompile the source and then you can use the commands LogSet and LogText. These options are not installed by default since not so many people use them and they increase the size of the exehead when turned on.

-Hendri.


:eek:
is there a place to download a binary where the flag is set?


Not that I'm aware of. If you really can't do it yourself I could build you a version with that flag set, I'll need to know which version of NSIS you would want a build of. (PM me if you want me to do this for you, save polluting this thread).


In case anyone else wants it the build I made for JWB of NSIS 1.98 makensis.exe with NSIS_CONFIG_LOG enabled is on the downloads page of my site.


Thanks :)

I tried it out. It does not give the compiler error it used to give. But it doesn't log during install either! :(

How come? I turned on logging and used LogText, but not even a trace of a logfile.


When I've used it in the past (only once mind) it created a log file in the directory that the installer installed into. It did give me some trouble though, it didn't create the file sometimes and I don't know why. However at the time I was changing so much so fast in my installer that I was probably just doing something stupid 'cause it definitely worked at least once.

One caveat - I used 2.0a0 when I tried the logging, I've no idea if maybe some problem with it was fixed since 1.98 - anyone who knows more care to venture an opinion?


Hi,
To make it simple, can anyone tell me how to Recompile the source so that I can use the commands LogSet and LogText.
Thanks.


You need Microsoft Visual Studio 6, preferably with the service packs installed. It *might* work with VC7 but I wouldn't bet on it. Alternatively you can ask nicely and someone else could do it for you :)


Thanks for your respond. I figured it would not really be worth the effort to do the re-compilation. I have managed to get around it using message boxes around my code. :)