wacaveman
17th December 2006 14:09 UTC
NSIS log file feature request
Ok, I will apologize up front for not reading every detail of the documentation, and searching every forum for an answer, but I have been beating my head flat trying to understand what is going wrong in my scripts.
Firstly, I am trying to launch a silent install of apache, firefox and perl within my install, and sadly, things have not been going well, since I can't figure out how to launch a system call with multiple parameters, which will wait before continuing. I know I need to do more research to figure this one out, but this is not my main gripe.
I decided to really figure out what is going on, I should invoke some logging so that I might have some glimmer of hope to debug some of my problems. I find the DumpLog function on the "UsefulScripts" page, which causes a compile error on GetTempFileName, which I work around by hard-coding, then promptly gives me an "error" messagebox on execution. Then I start digging and find I need to modify the source to turn debugging on. Argh.
At any rate, if I am incorrect in my assumption, please show me how to get some simple install debug file so I can figure out what I am doing wrong. If it is not as simple as that, please add this as a feature request. I should be able to flip a switch and pass in a filename somewhere (or have a default filename) to get debug info out of the execution of the install.
Thanks for the help, and kudos for having a great InstallShield replacement!
Afrow UK
17th December 2006 15:53 UTC
The DumpLog function simply dumps the log window output to a text file. It is not the same as installer logging, which you need to special build to use:
http://nsis.sf.net/Special_Builds
-Stu
wacaveman
17th December 2006 17:08 UTC
Thanks, stu. I am unfortunately unable to build NSIS, so my debugging is limited to lots of MessageBox calls. I started re-writing my install using batch files because I can't figure out what is going on. I am hoping to merge these back into NSIS, but the way it looks, I am not so sure.
Thanks so much for the help!
Red Wine
18th December 2006 09:09 UTC
Ok, I will apologize up front for not reading every detail of the documentation...
I'm afraid you're not reading at all :-)
The provided by Stu above link, explains that you don't have to build NSIS, all you need is scroll down and download the
Advanced logging build.
Though I don't think this is the solution to your problem, give it a try after you read
4.9.12 Install Logging Instructions.
I guess you'd start getting out of the difficulties you're facing now, by reading and examining
Basic Instructions and especially ExecWait and how this deals with errors. Furthermore, there is the included nsexec plugin that deals with errors too and it is very useful when you run console applications.
wacaveman
19th December 2006 12:20 UTC
Thanks -- those links were invaluable. I wish I had them a week ago. The big stumbling block I has was not only the strangeness of the language (parameter passing and the like), but finding what works by trial and error was frustrating -- ExecShell seemed to work right out of the box, and ExecWait seemed to be pretty picky about the format.
The worst, was trying to get any debug out. I saw your other posting, so I will try and implement that next, although I have everything working (for the most part) now.
I thought I would forward my experiences for improvement purposes.
Thanks again,
-Kevin