l_d_allan
13th January 2006 12:52 UTC
compiling nsis from within textpad?
I've used TextPad 4.7x for quite a while and am generally satisfied with it.
I'd like to compile nsis scripts from within textpad, and would appreciate finding out the approprate parameters for setting it up .... especially the "Regular Expression to Match Output" to be able to double-click on errors and go directly to that line.
iceman_k
13th January 2006 14:03 UTC
You really don't need any special parameters (unless you want to increase verbosity).
Just run MakeNSIS.exe with the file name as a parameter.
One problem I have noticed with MakeNSIS error/warning messages is that they don't always provide line numbers.
However, this is what I am using for EclipseNSIS errors:
Error in script "(.+)" on line (\d+).*
The first matching group gives the filename and the second gives the line number.
However, MakeNSIS very often issues error messages without line numbers or file names.
Also- if the script has set verbosity to 0, no output will be printed to stdout, so errors will not be detected.
In such cases, the only way to detect errors is to use the undocumented /NOTIFYHWND option with MakeNSIS. However that will only work if there is a window whose wndproc is capable of processing MakeNSIS messages- opens a whole new can of worms if you plan to use TextPad.
(Are you sure you wouldn't rather use HM NIS Edit or EclipseNSIS instead? :) )
l_d_allan
13th January 2006 15:09 UTC
Thanks for the pointers .... "one of these days" when I'm caught up with everything and it isn't a "hair on fire" day ... I'll definitely learn Eclipse <g>
I've attached a screen-shop of the preferences I'm using, but they are:
Command: [NsisInstallDir]\makensis.exe
Parameters: /PAUSE /X"SetCompressor zlib" $File
Initial Folder: $FileDir
[ ] Prompt for parameters
[ ] Run minimized
[x] Save all documents first
[ ] Capture output
[x] Close Dos window on exit
[ ] Sound alert when completed (n/a unless Capture output chosen)
The Regular expression that more or less works for me is:
^Error in script "\(.+\)" on line \([0-9]+\)
but I decided to not capture the output and just look at the DosWindow that makensis generates. I used the /PAUSE command line argument so this window doesn't disappear when makensis finishes.
Also, I specified the /X"SetCompressor zlib" since that seems quite a bit faster while I'm working on the script .... I usually specify lzma but it is slower.
Any suggestions or improvements to the above appreciated ... it is trial and error and seems to work, but there is probably a better way.
Also ... anyone updated the TextPad syntax file? .... the latest on the TextPad website is 1.98 from 2002.
iceman_k
13th January 2006 15:50 UTC
/X"SetCompressor /FINAL zlib" would be better, otherwise you might get an error if the script also sets a compressor.
Otherwise I suppose your settings look ok.
The syntax file is ancient and needs some serious updating.
Go for it. :)
Brummelchen
3rd May 2006 19:03 UTC
improved syntax highlighting for textpad you can grab here
http://forums.winamp.com/showthread....postid=1923539