- NSIS Discussion
- NSIS Dialog Designer
Archive: NSIS Dialog Designer
nicorac
19th April 2011 07:35 UTC
NSIS Dialog Designer
Hello everyone,
after a lot of manually-designed custom dialogs I realized that we need a tool to make this task easier. This tool should be a graphical dialog designer, like the one in Visual Studio.
Here we are, NSIS Dialog Designer is almost ready, and I'd like to hear some feedback from you.
It allows an easier NSIS dialogs design with a modern dockable interface.
http://coolsoft.altervista.org/image...signer/ss1.png
It works like this: custom dialog definition is stored into an XML definition file (*.nsddef), which is the file NSIS Dialog Designer manage.
When you save the dialog, NSIS Dialog Designer creates another file (*.nsdinc). This file is a NSIS script containing all the commands needed to create the dialog and all of its controls, including support variables.
For each control you can define name, position and size. You could also link your script functions to control events.
NSIS Dialog Designer is available here: http://coolsoft.altervista.org/
I'd like to hear your feedback...
Afrow UK
19th April 2011 09:59 UTC
That is very nice! I've stickied the thread. Be cool if you could make a Wiki page for it too.
Stu
MSG
19th April 2011 21:05 UTC
Very nice indeed. Could someone port this to a standalone application, please? >__>
Pawel
19th April 2011 21:12 UTC
Yes, indeed. The tool looks very interesting.
I would like to see there a log field, where user can see in real time compilation progress and eventual errors.
Also, I hope you add more properties for controls (like for example font colour, font type etc).
Keep up good work!
-Pawel
nicorac
19th April 2011 21:17 UTC
Originally posted by MSG
Very nice indeed. Could someone port this to a standalone application, please? >__>
What you mean with "standalone"?
NSIS Dialog Designer is already a standalone app, less than 1Mb installed.
Maybe the screenshot is confusing... making you think the IDE has a lot of components.
Actually you only have a toolbox with controls, a property grid and one or more "documents" with your custom dialogs.
nicorac
19th April 2011 21:25 UTC
Originally posted by Pawel
I hope you add more properties for controls (like for example font colour, font type etc)
Sure, designer code is modular so adding properties is quite easy.
I referred to
this page to add actual properties, and there I can't find a way to set colors.
Is there some macros to do it?
Can you please provide a sample script snippet to set font and color?
nicorac
19th April 2011 21:29 UTC
Originally posted by Pawel
I would like to see there a log field, where user can see in real time compilation progress
I'm going to add a (readonly) preview panel where NSIS experienced users can see the generated NSIS script in realtime.
I thought to split the designer tab vertically: the top part will contain the graphical designer and the bottom will have the generated script.
What about it?
Pawel
19th April 2011 21:52 UTC
Originally posted by nicorac
Can you please provide a sample script snippet to set font and color?
For example:
; Some text control
${NSD_CreateLabel} 120u 8u 203u 30u "Text to display"
; Set variable for control
Pop $My_Control_Variable
; Set example styles
${NSD_AddStyle} $My_Control_Variable ${WS_VISIBLE}|${WS_CHILD}|${WS_CLIPSIBLINGS}|${SS_CENTER}
; Create font (
http://msdn.microsoft.com/en-us/libr...(v=vs.85).aspx)
CreateFont $My_Control_Variable_Font "TAHOMA" "12" "700"
SendMessage $My_Control_Variable ${WM_SETFONT} $My_Control_Variable_Font 0
; Set colours for control (Hwnd, font colour, background colour)
SetCtlColors $My_Control_Variable "0x000000" "Transparent"
-Pawel
Pawel
19th April 2011 21:58 UTC
Yeah, that is a good idea...
I would like to see GUI designer in main part of window and a source code generated in real time in bottom part of window.
Is it possible user can also edit it in real time (I know that would need a lot work...)?
About compilation preview.. Yeah, that in my opinion should be read only and maybe optional. I like to see what is happening...
-Pawel
nicorac
19th April 2011 23:19 UTC
Version 0.9.1 was released:
- New dockable content with realtime NSIS generated script preview
Script preview is readonly; its purpose is to allow advanced users to understand what's being generated.
jiake
20th April 2011 04:42 UTC
1. Most users prefer using dialog unit to pixel, so I think the software should use dialog unit, or you may add an option for user.
2. It will be better if it supports multi-language.
MSG
20th April 2011 06:02 UTC
Originally posted by nicorac
What you mean with "standalone"?
NSIS Dialog Designer is already a standalone app, less than 1Mb installed.
I meant something that doesn't require .NET (or other frameworks, like Java). I don't install these things on my systems. Still I'd really like to be able to use this tool, nsDialogs page design takes a lot of time to do manually. :-(
T.Slappy
20th April 2011 07:26 UTC
Editor looks fantastic!!!
The very first look gave me these ideas:
- add some grid (dotted grid) to main area for better navigation like other IDEs have (+ possibility to turn it on/off) or some kind of ruler
- give some option to choose pixels/units
- name your tool NSIS nsDialogs Editor to be clear that these pages will not work with those deprecated ini files
- add Name into Properties window, all IDEs use the same principe (I suppose you generate name of variable/control as some creepy _fdfjdfjsdh_Label1 which looks terrible)
I am downloading and starting to play with it, great work!
Edit:
I started creating my own form:
- add possibility to generate method name automatically by doubleclick based on controls' name (with Name above)
Example: I have button called Button1
When I double-click in Properties pane into onClick field I expect that method Button1_Click will be generated automatically like Delphi IDE and also appropriate block in script:
Button1_Click
>; Add your code here
FunctionEnd
>
For multiple forms there could be some identifier added:
Form1_Button1_Click or Form1_Edit1_Change etc.
If I want to name my method manually the I need to write it into box (like now)...
nicorac
20th April 2011 07:47 UTC
Thank you all for thanks and feedbacks!
Originally posted by jiake
1. Most users prefer using dialog unit to pixel
Added to TODO list
Originally posted by jiake
2. It will be better if it supports multi-language.
What you mean with multi-language? NSIS Dialog Designer interface or the generated dialogs? If the latter, well, I think you can put variables into control text value, but I'm not so experienced in multilanguage setup scripts...
Can you please provide a code snippet for a multi-language control?
Originally posted by MSG
I meant something that doesn't require .NET (or other frameworks, like Java)
You're right, I thought the same till WinXP.
But Vista and 7 comes with .NET integrated, so for these users there's no requirements at all ;). .NET software development is really fast and safe, (I'm an old time C++ dev)
Originally posted by T.Slappy
add some grid (dotted grid) to main area for better navigation like other IDEs have (+ possibility to turn it on/off) or some kind of ruler
Added to TODO list
Originally posted by T.Slappy
name your tool NSIS nsDialogs Editor to be clear that these pages will not work with those deprecated ini files
"Dialog" is a generic word that includes nsDialogs :D
I'm thinking about import support for old INI file styles...
Originally posted by T.Slappy
add Name into Properties window
Name is already there, I'm investigating why it does not appear :hang:
Afrow UK
20th April 2011 07:53 UTC
Originally posted by MSG
I meant something that doesn't require .NET (or other frameworks, like Java). I don't install these things on my systems. Still I'd really like to be able to use this tool, nsDialogs page design takes a lot of time to do manually. :-(
.NET/Java makes programming tools like this much faster. Why would you not install them? Lack of disk space :)? To port this to native C/C++ would be a lot of work and is probably why a tool such as this has not been written already. I know if I had the choice I would go with .NET every time.
Stu
MSG
20th April 2011 08:03 UTC
Originally posted by Afrow UK
Why would you not install them? Lack of disk space :)?
JAVA because it's a system hog. .NET I'm not sure anymore, but iirc the boot time increased (that was a long time ago though). But either way I prefer to keep my system clean.
Originally posted by nicorac
You're right, I thought the same till WinXP.
But Vista and 7 comes with .NET integrated, so for these users there's no requirements at all ;). .NET software development is really fast and safe, (I'm an old time C++ dev)
I'm sure it's a lot easier to code in .NET, otherwise people wouldn't be using it so much. But I use Win Server 2k3, not XP. And don't forget old laptops or whatever that run XP out of necessity. So there's probably a lot of users who'd have to install .NET to use this tool. Not saying you made a bad choice, just that I wish you had made a different one. :-)
Afrow UK
20th April 2011 08:35 UTC
Java is far from a system hog. Perhaps you are thinking back to Windows 95 or something when it was in its early days. I would say .NET is much more of a system hog. My .NET apps generally use a lot of memory even for a couple of lines of code. My NSIS assembler uses around 5000K of memory which is tiny considering the size of its code base.
Java can also often be faster than C/C++ because in Java you can't play around with memory pointers. This allows the compiler to do some very sophisticated optimisations which are just not possible in a language like C. Anyway I'm not going to argue with you but I'll just say it's your loss lol :).
Stu
nicorac
20th April 2011 08:51 UTC
Version 0.9.2 was released:
- missing property "Name" is now shown (Dialog does not have it because name is the same as its definition filename)
Highcoder
20th April 2011 08:53 UTC
Sure coding in .NET is much easier. But i don´t like these dependencies with frameworks, runtimes etc.
You always have to ensure that they are installed (properly) on target system. And the first startup of a little .NET application with just a dialog an a few buttons feels like eternity.
That´s why i like NSIS installers. They only need themselves. One exe, that´s it.
So I´ve discovered Delpi for me. Easy to learn, fast, GUI designer like MS Visual but no dependencies to runtimes exept you want it.
Cheers
@nicorac: Nice work, I like it a lot. Thumbs up!
jiake
20th April 2011 10:27 UTC
I mean that I hope your program has a multi-language interface. In a NSIS QQ group, there are many NSIS newbies, they hardly understand English. Although my English is not good, but it is not difficult for me to use an English software.
nicorac
20th April 2011 13:46 UTC
Originally posted by jiake
I mean that I hope your program has a multi-language interface
Multilanguage support in .NET is bundled, so quite easy... if you have translators :D
Added to TODO list.
Let's get out of the beta stage, then I'll publish strings to translate.
nicorac
20th April 2011 14:06 UTC
Originally posted by T.Slappy
- add possibility to generate method name automatically by doubleclick based on controls' name (with Name above)
When I double-click in Properties pane into onClick field I expect that method Button1_Click will be generated automatically like Delphi IDE and also appropriate block in script:
What you ask is not so difficult to achieve, but:
- I must generate function Button1_Click inside *.nsdinc file;
- this file is meant to be managed only by NSIS Dialog Designer, and it only WRITES it;
That said you'll be forced to edit Button1_Click function content through NSIS Dialog Designer only, because each time you save the dialog, *.nsdinc file is overwritten.
I think is better to keep things splitted: *.nsdinc contains only dialog creation related script, optionally calling functions defined into your own (main) script.
What about a function to copy a skeleton function into clipboard?
nicorac
20th April 2011 16:06 UTC
Version 0.9.3 released
NEW: Added new properties ForeColor and BackColor
(not working for: Button, ComboBox, DropList, GroupBox, HLine, VLine, ProgressBar)
NEW: Added new property Font
NEW: Designer now can show a grid (see Tools | Options menu)
BUG: Editor does not save dialogs when exiting with close button.
BUG: Script preview not updated when a new control is added
nicorac
22nd April 2011 09:41 UTC
Created a Wiki page here: http://nsis.sourceforge.net/NSIS_Dialog_Designer
xbarns
3rd May 2011 17:07 UTC
I love it, fantastic work!
nicorac
4th May 2011 07:40 UTC
You're welcome.
Stay tuned, right now I'm working on old format INI file import.
franz.reitner
19th May 2011 15:31 UTC
Nice tool!
nicorac
29th May 2011 00:04 UTC
Version 0.9.4 released
v.0.9.4 - 29-May-2011
Fixed permission issues on UAC enabled systems.
T.Slappy
30th May 2011 07:26 UTC
Originally posted by nicorac
You're welcome.
Stay tuned, right now I'm working on old format INI file import.
I am sorry about this but is it really necessary?
There are a lot of troubles with those ini files and I suppose they should be removed from new NSIS release (I heard about it here on forum)...
MSG
30th May 2011 14:54 UTC
Originally posted by T.Slappy
and I suppose they should be removed from new NSIS release (I heard about it here on forum)...
Noone said that InstallOptions support will be removed for NSIS Unicode. Some people merely said that they personally think it should be. That most certainly doesn't mean that it will happen.
nicorac
30th May 2011 17:31 UTC
Originally posted by T.Slappy
I am sorry about this but is it really necessary?
Well, I'm going to support INI file
import only, won't write or edit them for sure.
Well, suppose you've got an old setup with just 3 or 4 custom INI formatted custom dialogs... if you're forced to redesign them by scratch you'll stay with the old format forever.
If you could easily import them and save into new format (with some manual fixing), the transition to the new dialog format should be easier.
Afrow UK
30th May 2011 17:56 UTC
Import is an excellent idea :).
Stu
deedsmedia
31st May 2011 11:37 UTC
Really great work! Thank you very much for this!
But I do have a small suggestion:
- Can you make the size of the Dialog editable?
I am not using the dialog id 1018, my dialog is bigger (it is dialog id 1044 with a size of about 497x314 pixel) because I need more space and I cannot resize the dialog to the size I need. Would be great if you could add a property width and height for the dialog component, so everybody can adjust the size.
nicorac
1st June 2011 07:42 UTC
Originally posted by deedsmedia
- Can you make the size of the Dialog editable?
Added to my to-do list.
I was planning to extract all available dialog IDs and put them in a list, but I think your suggestion to make dialog size setting free is better. And I'll add a DialogID field too...
I'll try to put this change together with the pixel/dialog units feature.
Jovet
15th June 2011 17:33 UTC
I'm usually skeptical of tools like this, but this is pretty slick. I'm impressed. Thanks for the hard work!
The only bug I've found is when editing the properties of a control, such as its display text. If I press Del to delete some characters from the field, it deletes the control from the form!
nicorac
16th June 2011 00:01 UTC
Honestly I haven't tried DEL inside the Property Grid.
I also suppose other special keys could cause issues, like CTRL+C and so on.
I'll give it a look ASAP.
nicorac
16th June 2011 11:19 UTC
Version 0.9.5 released
v.0.9.5 - 16-Jun-2011
BUG: Fixed key management preventing DEL key to be used inside PropertyGrid (thanks to Jovet for bug report)
NEW: Edit menu items now are enabled according to active content (designer, property, toolbox, ...)
NEW: DialogID and Size now are public properties (deedsmedia request)
(can be reset to default values by right-clicking on PropertyGrid item)
nicorac
28th June 2011 11:39 UTC
Version 0.9.6 released
v.0.9.6 - 2011-06-28
NEW: Added new property SetupType to dialog, allowing the generated script to be used in Install and Uninstall scripts.
NEW: Debugger code to debug Uninstaller dialogs.
FIX: Cleaned up the debug scripts.
NSIS Dialog Designer is available here: http://coolsoft.altervista.org/nsisdialogdesigner
LOVENSIS
2nd August 2011 13:54 UTC
Please add DirRequest as an option.
ElArZ
3rd August 2011 10:49 UTC
Great tool. Really helps, thx a lot.
But when you create a new file, the new name doesn't get reflected in this part of the script (It's always Form1):
; show the dialog
!if "${FUNCTION_PREFIX}" == ""
Page custom ${FUNCTION_PREFIX}fnc_Form1_Show
!else
UninstPage custom ${FUNCTION_PREFIX}fnc_Form1_Show
!endif