Archive: NSIS workbench - bugs and suggestions


NSIS workbench - bugs and suggestions
I've downloaded NSIS workbench 1.00 rel 6
and here are the problems I've encountered:

1) In my system (Win98), program tries to run "runnsis.bat"
as an executable. This would happen if you try to open
runnsis.bat with CreateProcess or WinExec etc ..., rather
than ShellExec, but i don't beleive that such a bug wasn't
discovered earlier. What I did was to write simple exe file
that launches somename.bat file and rename it to runnsis.bat :)
It worked :D , but I don't think this is the best solution ...
BTW, The source of this program is attached.

2) Another problem appeared after that. When you first run program
(in its directory by default), build works fine. However, if
jou open some file/image/etc... and thus change directory to
another one, build fails. I guess, this problem wouldn't happen
if the directory of NSIS would be in the PATH, but I personally
don't like such solution ...

And, of course, my wishlist :

1) There's no info how to find this program on i-net in About box.

2) Keyword completion, which would consist of at least functions in
the list would be great, i think. In Delphi, You have one if
You press Ctrl-Space.

3) Ability to launch external programs with parameters like %p, %f,
etc. would be great, especially in such compiler-oriented
applications.

4) Default syntax highlighting could recognize more keywords. I've
made one that recognizes many keywords of NSIS, ask me personally
to email them, if You wish.


Alex

The control is using ShellExecuteEx to execute RUNNSIS.BAT, it needs to wait for the process to complete before continuing. I've had a quick play with other methods but didn't get them to work (perhaps not trying hard enough!), the long file names were being chopped in the batch file e.g. param 1: c:\program param 2: file\nsis\makensis.exe, even if the parameters were placed in "'s

If it's a problem on Win98, I assume it's also a problem on Win95 and ME so perhaps everyone else is running NT, Win2K or XP???

Fixed the problem here where selecting an icon or bitmap was changing the current folder and therefore breaking the build.

Ctrl-Space is used for property/method completion not keywords as far as I know, unless I've that turned off in my IDE. In FNSIS you can setup code templates that you activate with Ctrl-J or <name> Ctrl-J, it also does option completion when you type ".", for example $. will display a pick list of the directories, SetCompress. lists Auto, Force and Off

Not sure what external programs you'd want to launch, you've got the editor, you can build the script and in the next release build & run the script.

I've added all the keywords, directives etc to the syntax highlighter, I used Dave Laundon's very hand script to automatically generate them saved a lot of typing (see release 4 thread for a copy).

Marc


Well, maybe the word "keyword" is not what I actually meant, but
In delphi you could start typing some function (ex.: ShellExecuteEx,
assuming you have "uses ShellApi"), and Ctrl-Space did the job.
That's what kind of completion i meant. Code templates are wonderful,
but they should serve another purpose, I beleive.

And about option completion: that rocks, i liked it the very
moment i used it !!! Pity that I didn't read readme from the start :)

What about external programs - well, it may be Code Beautifier,
SpellChecker, PaintBrush, PPWIZARD or whatever I may need. After all,
I may want to launch setup not just after build, etc ... It would be
nice if I could pass edited file name (or some of its parts) as a
parameter, or string under cusrsor. Workbench could also ask for
saving before starting that utility (as an option, of course), and
check if file was changed outside the program and ask for reload.

One more suggestion: your program could (ask for) register itself
as a default nsi file editor.

And one more bug:

I have such line in my nsi script:

'OutFile "c:\Program Files\Borland\Delphi4\Installs\TC-manager\tcmsetup.exe"'

when I use build and run option, I get error:

"Failed to obtain setup.exe from the script"

Best regards,

Alex J.


I've uploaded a fix to the build and run problem, I was assuming that the setup.exe was being created in the script's folder, so was prefixing the OutFile with the script path, now I'm only doing this if OutFile doesn't contain a path.

Marc


OI! Stop it!
NSIS Workbench keeps getting better and better ;)

But new versions overwrite my syntax highlighting setup :(

--
Dave Laundon.


Sorry!

In-case any one else has set-up a custom syntax scheme or code templates, backup NSIS.* before installing then overwrite the installed ones.


Heh! 's alright. I have backups :)

I suppose if you changed the config files to not overwrite at all then people wouldn't benfit from additions to code templates, etc. Mmmmmm.

Dave.


If I'd thought a bit more carefully I'd have backed them up in the install script, which I've now done and uploaded. Your current code templates are backed up to NSIS.~PL and your syntax schemes to NSIS.~CH

Marc


Originally posted by mkeeley
I've uploaded a fix to the build and run problem, I was assuming that the setup.exe was being created in the script's folder, so was prefixing the OutFile with the script path, now I'm only doing this if OutFile doesn't contain a path.

Marc
Not good too. This'll fail on such line:

OutFile ".\SomePath\mysetup.exe"

or such :

OutFile "..\[ more "..\" here ]..\SomePath\mysetup.exe"

You need one more check: if file name begins with "." (dot),
add nsi script path before it, otherwise - not.

Best regards,

Alex