- NSIS Discussion
- Modified MakeNSIS GUI for defining symbols
Archive: Modified MakeNSIS GUI for defining symbols
iceman_k
7th April 2003 21:27 UTC
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
kichik
8th April 2003 10:18 UTC
I would like to see it. Can you please attach it here with the source?
iceman_k
8th April 2003 12:35 UTC
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
kichik
8th April 2003 20:32 UTC
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.
iceman_k
8th April 2003 21:25 UTC
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
iceman_k
8th April 2003 21:47 UTC
Kichik- I was able to reproduce your error and have fixed it.
Please use the attached zip file instead.
---
Cheers,
Iceman_K
viper0179
14th April 2003 15:11 UTC
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.
iceman_k
14th April 2003 15:39 UTC
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.
kichik
15th April 2003 12:06 UTC
I'll have a final look at the code soon and it will probably go into CVS if I find no problems.
kichik
8th May 2003 17:41 UTC
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
8th May 2003 18:08 UTC
iceman_k should be fine.
Joost Verburg
8th May 2003 20:12 UTC
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?
iceman_k
9th May 2003 02:25 UTC
Sure. Is there a formal set of requirements available?
Also, I will need edit/commit access to CVS.
Joost Verburg
9th May 2003 09:08 UTC
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.
iceman_k
9th May 2003 15:35 UTC
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?
iceman_k
14th May 2003 05:20 UTC
So do you want me to help out or not?
kichik
14th May 2003 11:28 UTC
I have sent you a PM about a week ago but you haven't replied yet.