Archive: Modified MakeNSIS GUI for defining symbols


Modified MakeNSIS GUI for defining symbols
I have modified the MakeNSIS GUI to include a simple GUI for defining symbols in the script.
This would simulate /D command line arguments in the command line executable.
I needed this because my script needed to get the product version and files location dynamically, rather than hardcoding it in the script.
If this is something that would be useful to anyone else, I can post it to the forum. Maybe it can be even considered for the main build.
---
Cheers,
Iceman_K


I would like to see it. Can you please attach it here with the source?


Here it is. Like I said, it is quite a simple GUI. No doubt it can be refined and more features can be added to it. For the time being it does what I need, so I'm happy with it.
To access the GUI, type ctrl+D after loading a script or use the Tools->Define Symbols menu item.
Use the ">" button to add a symbol and the "<" button to edit/remove a symbol.
The symbols list gets cleared everytime you load a script.
---
Cheers,
Iceman_K


I tried and got an error saying C:\Program can't be found when I tried to compile with this MakeNSISw after I have added defines. I'll have a deeper look tomorrow.


Interesting. I have tried this on 3 different PC's, running Win2K as well as XP without problems.
You may want to recompile before running it.
---
Cheers,
Iceman_K


Kichik- I was able to reproduce your error and have fixed it.
Please use the attached zip file instead.
---
Cheers,
Iceman_K


I did the same thing as you did Iceman, but rather than change the MakeNSIS gui, I needed something a bit more complex. I code using Visual Basic and they have the project's major, minor, and revision values in the project file. I just made a small program to read that value and send it to the installer for me. I just need to supply which project I'm trying to compile and which NSI file to use. I've attached it. I've got the program to show the output from the makensis.exe file when its compiling the script, but it doesn't always work consistently.

I also added this to my NSI file:


!ifndef MUI_VERSION
!define MUI_VERSION "Test"
!endif


So this way I know which compiled file is my release version. I've attached the program if anyone else wants to use it feel free.

What you have done will work once you have your script working and ready to go. In fact, I have a similar script in my release build process. The modification I have made is for when you are developing and testing your script using the MakeNSIS GUI.
At that point there is no way to pass any kind of defined symbols to the script other than by hardcoding them in the script.
Alternately, you can use a 3rd part GUI like HM NISEdit.


I'll have a final look at the code soon and it will probably go into CVS if I find no problems.


Thanks, added in latest CVS version. I wanted to do something about the repeated allocation of memory such as saving the number of bytes used ahead but just didn't get to it. You have also forgot to add your name to the readme. Which [nick]name should I put in?


iceman_k should be fine.


It looks very nice iceman_k :D

One comment: 'Define symbols' should be enabled in the menu when you start makensisw (and no script is loaded). Can you change that?

We are also looking for someone who wants to add some other new featues to MakeNSISW (to make it more user friendly :) ), such as a toolbar with icons and an easy way to change the compression method (like your define stuff). Do you want to help us with that?


Sure. Is there a formal set of requirements available?
Also, I will need edit/commit access to CVS.


The things we would really like to see are:

* A toolbar with icons (open, recompile, test, compression method)
* A way to switch compression method in the GUI (so it adds a SetCompressor command, like the defines)

Other nice things are:

* Automatic test for the best compression method (get the compression ratio from the compiler output)
* An option to launch the NSIS Menu

And of course new idea's are welcome.

If you want to help us with these things, you will get access to modify the MakeNSISW files.


1. Toolbar with icons - OK
2. Switching compression methods - OK. However, if the script specifies a compression method, it will take precedence.
3. NSIS Menu launching - OK
4. Testing different compression types- maybe in the next iteration?


So do you want me to help out or not?


I have sent you a PM about a week ago but you haven't replied yet.