Archive: MakeNSIS Wrapper for Windows


MakeNSIS Wrapper for Windows
Since I hate looking at the DOS box so much, and its a pain to copy the output without redirecting it, I wrote a simple wrapper for makensis that will run in a Window. I've attached the source and executables. The wrapper works well when you use it with the extensions (you just need to update them to makensisw.exe and makensis-bz2w.exe).

The only part of the nsis source I changed was moving the NSIS-VERSION string into version.c so I could retrieve the nsis version. The wrapper is in source/makensisw. The makefile is for mingw so you'll have to write your own for v c++.

To install, extract the zip file you your nsis directory. To install/upgrade the extensions, run makensis on the installext.nsi file and run the installer.


Here's an updated version that does not need to be compiled for each makensis (makensis.exe, makensis-bz2.exe, etc). You will need to compile and install installext.nsi to setup the correct extensions since the format has changed.

Now you say:
makensisw.exe makensis.exe [options] [script.nsi | - [...]]

Where makensis.exe (or makensis-bz2.exe) is in the same directory as makensisw.exe.

Rob


Sorry here is the zip:


Nice application.

Very useful!

Thank you! :up:


Hi,

I was hoping to use it for a different purpose (I suppose the source is there)...

I was hoping I would be able to execute any command and that there would be a find option.

I would like to be able to execute commands like:

dir

That failed so I tried:

%comspec% /c dir

That also failed because it added "c:\tmp\" to the start of the command making it invalid (C:\tmp\C:\WINNT\system32\cmd.exe /c dir).

A switch or simply looking for slashes in the first part would solve this...
Since I started a wish list I might as well also add that being able to size the window would be nice as would a "wrap" option (no horizontal scrolling).

Anyway just an idea, I'll check the utility again in future and have a look at the source when and if I find the time if I need to.
Bye
Dennis


I've added the ability to save the output. I had never thought of a search, but I guess that's possible, although I don't see the need.

I can add a word wrap option if anyone needs it.

It was designed only for makensis, if you want to execute any command then you will need to change the source.

If you want the updated source, just send me an email.


curious
just out of curiosity what is so wrong with using a dos window for the 10 or less seconds it takes to compile an installer? and is it so wrong that it prompted the building of this wrapper? i am just curious because i dont see a practical purpose.


I don't generally mind, except sometimes I want to capture the output. And I could pipe the output to a file, but I don't really feel like doing that every time I get an error in the script.


I forgot to say, that I wrote this to use as the windows extension. When you are compiling from a DOS box, you don't need a windows version, but when you right click a file and choose compile then I think that the windows version is more usefull.


I've updated the wrapper again. I added a menu option to recompile the script as well as fixed a few small bugs. Send me an email if you want the source/executable.

Robert


Originally posted by rainwater
I've updated the wrapper again. I added a menu option to recompile the script as well as fixed a few small bugs. Send me an email if you want the source/executable.
Robert
Yes please, however I don't have your email address and your profile won't allow emails to be sent to you...

Bye
Dennis

rrainwater@yahoo.com


ok for my first look the wrapper is quite ok so

i wanted to import it into my vc++
but it dont works.
can u change the sources so that it will
work in vc++ ?

i tried it and had to remade the recources
and deactivate some stuff
but it still produes a lot of errors maybe
bec. in your ide are some more sources and headers
that my vc++ dont know ...


Originally posted by crish
ok for my first look the wrapper is quite ok so

i wanted to import it into my vc++
but it dont works.
can u change the sources so that it will
work in vc++ ?
I'm using mingw so its possible vc throws some errors. I don't have VC installed on this machine (cause I never use it anymore), but I will install it later tonight and have a look. It shouldn't be difficult to fix because the code is all pure win32.

Also make sure you get the latest version here.

Robert