Old 19th April 2011, 06:35   #1
nicorac
NSIS Dialog Designer Author
 
Join Date: Apr 2011
Posts: 69
Lightbulb 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.



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...
nicorac is offline   Reply With Quote
Old 19th April 2011, 08:59   #2
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,433
That is very nice! I've stickied the thread. Be cool if you could make a Wiki page for it too.

Stu
Afrow UK is offline   Reply With Quote
Old 19th April 2011, 20:05   #3
MSG
Major Dude
 
Join Date: Oct 2006
Posts: 1,892
Very nice indeed. Could someone port this to a standalone application, please? >__>
MSG is offline   Reply With Quote
Old 19th April 2011, 20:12   #4
Pawel
Moderator
 
Pawel's Avatar
 
Join Date: Aug 2004
Location: Poland
Posts: 498
Send a message via ICQ to Pawel
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
Pawel is offline   Reply With Quote
Old 19th April 2011, 20:17   #5
nicorac
NSIS Dialog Designer Author
 
Join Date: Apr 2011
Posts: 69
Quote:
Originally Posted by MSG View Post
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 is offline   Reply With Quote
Old 19th April 2011, 20:25   #6
nicorac
NSIS Dialog Designer Author
 
Join Date: Apr 2011
Posts: 69
Thumbs up

Quote:
Originally Posted by Pawel View Post
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 is offline   Reply With Quote
Old 19th April 2011, 20:29   #7
nicorac
NSIS Dialog Designer Author
 
Join Date: Apr 2011
Posts: 69
Quote:
Originally Posted by Pawel View Post
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?
nicorac is offline   Reply With Quote
Old 19th April 2011, 20:52   #8
Pawel
Moderator
 
Pawel's Avatar
 
Join Date: Aug 2004
Location: Poland
Posts: 498
Send a message via ICQ to Pawel
Quote:
Originally Posted by nicorac View Post
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 is offline   Reply With Quote
Old 19th April 2011, 20:58   #9
Pawel
Moderator
 
Pawel's Avatar
 
Join Date: Aug 2004
Location: Poland
Posts: 498
Send a message via ICQ to Pawel
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
Pawel is offline   Reply With Quote
Old 19th April 2011, 22:19   #10
nicorac
NSIS Dialog Designer Author
 
Join Date: Apr 2011
Posts: 69
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.
nicorac is offline   Reply With Quote
Old 20th April 2011, 03:42   #11
jiake
Senior Member
 
jiake's Avatar
 
Join Date: Oct 2007
Location: Xi'an, China
Posts: 206
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.

Born in: Xi'an, China
Live in: Shanghai, China
Name: 賈可(zh-Hant, trad.), 贾可(zh-Hans, simp.), Jia Ke (Pinyin).
Email: jiake@vip.qq.com
QQ: 137729898
jiake is offline   Reply With Quote
Old 20th April 2011, 05:02   #12
MSG
Major Dude
 
Join Date: Oct 2006
Posts: 1,892
Quote:
Originally Posted by nicorac View Post
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. :-(
MSG is offline   Reply With Quote
Old 20th April 2011, 06:26   #13
T.Slappy
Major Dude
 
T.Slappy's Avatar
 
Join Date: Jan 2006
Location: Slovakia
Posts: 506
Send a message via ICQ to T.Slappy
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:
PHP Code:
Function 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)...

Cool looking skinned Graphical Installers: www.graphical-installer.com
I offer NSIS scripting, C/C++/C#/Delphi programming: www.unsignedsw.com
Develop NSIS projects in Visual Studio 2005-2017: www.visual-installer.com
or RAD Studio 2009, 2010, XE-10.2 Tokyo: www.rad-installer.com
T.Slappy is offline   Reply With Quote
Old 20th April 2011, 06:47   #14
nicorac
NSIS Dialog Designer Author
 
Join Date: Apr 2011
Posts: 69
Thank you all for thanks and feedbacks!

Quote:
Originally Posted by jiake View Post
1. Most users prefer using dialog unit to pixel
Added to TODO list

Quote:
Originally Posted by jiake View Post
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?

Quote:
Originally Posted by MSG View Post
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)

Quote:
Originally Posted by T.Slappy View Post
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

Quote:
Originally Posted by T.Slappy View Post
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
I'm thinking about import support for old INI file styles...

Quote:
Originally Posted by T.Slappy View Post
add Name into Properties window
Name is already there, I'm investigating why it does not appear
nicorac is offline   Reply With Quote
Old 20th April 2011, 06:53   #15
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,433
Quote:
Originally Posted by MSG View Post
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
Afrow UK is offline   Reply With Quote
Old 20th April 2011, 07:03   #16
MSG
Major Dude
 
Join Date: Oct 2006
Posts: 1,892
Quote:
Originally Posted by Afrow UK View Post
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.

Quote:
Originally Posted by nicorac View Post
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. :-)
MSG is offline   Reply With Quote
Old 20th April 2011, 07:35   #17
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,433
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
Afrow UK is offline   Reply With Quote
Old 20th April 2011, 07:51   #18
nicorac
NSIS Dialog Designer Author
 
Join Date: Apr 2011
Posts: 69
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)
nicorac is offline   Reply With Quote
Old 20th April 2011, 07:53   #19
Highcoder
Member
 
Join Date: Jan 2011
Posts: 69
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!
Highcoder is offline   Reply With Quote
Old 20th April 2011, 09:27   #20
jiake
Senior Member
 
jiake's Avatar
 
Join Date: Oct 2007
Location: Xi'an, China
Posts: 206
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.

Born in: Xi'an, China
Live in: Shanghai, China
Name: 賈可(zh-Hant, trad.), 贾可(zh-Hans, simp.), Jia Ke (Pinyin).
Email: jiake@vip.qq.com
QQ: 137729898
jiake is offline   Reply With Quote
Old 20th April 2011, 12:46   #21
nicorac
NSIS Dialog Designer Author
 
Join Date: Apr 2011
Posts: 69
Quote:
Originally Posted by jiake View Post
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

Added to TODO list.
Let's get out of the beta stage, then I'll publish strings to translate.
nicorac is offline   Reply With Quote
Old 20th April 2011, 13:06   #22
nicorac
NSIS Dialog Designer Author
 
Join Date: Apr 2011
Posts: 69
Quote:
Originally Posted by T.Slappy View Post
- 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 is offline   Reply With Quote
Old 20th April 2011, 15:06   #23
nicorac
NSIS Dialog Designer Author
 
Join Date: Apr 2011
Posts: 69
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 is offline   Reply With Quote
Old 22nd April 2011, 08:41   #24
nicorac
NSIS Dialog Designer Author
 
Join Date: Apr 2011
Posts: 69
Created a Wiki page here: http://nsis.sourceforge.net/NSIS_Dialog_Designer
nicorac is offline   Reply With Quote
Old 3rd May 2011, 16:07   #25
xbarns
Senior Member
 
xbarns's Avatar
 
Join Date: Aug 2007
Location: Frankfurt, Germany
Posts: 185
I love it, fantastic work!
xbarns is offline   Reply With Quote
Old 4th May 2011, 06:40   #26
nicorac
NSIS Dialog Designer Author
 
Join Date: Apr 2011
Posts: 69
You're welcome.
Stay tuned, right now I'm working on old format INI file import.
nicorac is offline   Reply With Quote
Old 19th May 2011, 14:31   #27
franz.reitner
Junior Member
 
Join Date: Feb 2010
Posts: 14
Nice tool!
franz.reitner is offline   Reply With Quote
Old 28th May 2011, 23:04   #28
nicorac
NSIS Dialog Designer Author
 
Join Date: Apr 2011
Posts: 69
Version 0.9.4 released

v.0.9.4 - 29-May-2011
Fixed permission issues on UAC enabled systems.
nicorac is offline   Reply With Quote
Old 30th May 2011, 06:26   #29
T.Slappy
Major Dude
 
T.Slappy's Avatar
 
Join Date: Jan 2006
Location: Slovakia
Posts: 506
Send a message via ICQ to T.Slappy
Quote:
Originally Posted by nicorac View Post
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)...

Cool looking skinned Graphical Installers: www.graphical-installer.com
I offer NSIS scripting, C/C++/C#/Delphi programming: www.unsignedsw.com
Develop NSIS projects in Visual Studio 2005-2017: www.visual-installer.com
or RAD Studio 2009, 2010, XE-10.2 Tokyo: www.rad-installer.com
T.Slappy is offline   Reply With Quote
Old 30th May 2011, 13:54   #30
MSG
Major Dude
 
Join Date: Oct 2006
Posts: 1,892
Quote:
Originally Posted by T.Slappy View Post
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.
MSG is offline   Reply With Quote
Old 30th May 2011, 16:31   #31
nicorac
NSIS Dialog Designer Author
 
Join Date: Apr 2011
Posts: 69
Quote:
Originally Posted by T.Slappy View Post
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.
nicorac is offline   Reply With Quote
Old 30th May 2011, 16:56   #32
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,433
Import is an excellent idea .

Stu
Afrow UK is offline   Reply With Quote
Old 31st May 2011, 10:37   #33
deedsmedia
Junior Member
 
Join Date: May 2011
Posts: 1
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.
deedsmedia is offline   Reply With Quote
Old 1st June 2011, 06:42   #34
nicorac
NSIS Dialog Designer Author
 
Join Date: Apr 2011
Posts: 69
Quote:
Originally Posted by deedsmedia View Post
- 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.
nicorac is offline   Reply With Quote
Old 15th June 2011, 16:33   #35
Jovet
Junior Member
 
Join Date: Jun 2011
Posts: 1
Thumbs up

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!
Jovet is offline   Reply With Quote
Old 15th June 2011, 23:01   #36
nicorac
NSIS Dialog Designer Author
 
Join Date: Apr 2011
Posts: 69
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 is offline   Reply With Quote
Old 16th June 2011, 10:19   #37
nicorac
NSIS Dialog Designer Author
 
Join Date: Apr 2011
Posts: 69
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 is offline   Reply With Quote
Old 28th June 2011, 10:39   #38
nicorac
NSIS Dialog Designer Author
 
Join Date: Apr 2011
Posts: 69
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
nicorac is offline   Reply With Quote
Old 2nd August 2011, 12:54   #39
LOVENSIS
Junior Member
 
Join Date: Aug 2011
Posts: 10
Please add DirRequest as an option.
LOVENSIS is offline   Reply With Quote
Old 3rd August 2011, 09:49   #40
ElArZ
Junior Member
 
Join Date: Jul 2008
Posts: 8
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):
code:
; show the dialog
!if "${FUNCTION_PREFIX}" == ""
Page custom ${FUNCTION_PREFIX}fnc_Form1_Show
!else
UninstPage custom ${FUNCTION_PREFIX}fnc_Form1_Show
!endif

ElArZ is offline   Reply With Quote
Reply
Go Back   Winamp & SHOUTcast Forums > Developer Center > NSIS Discussion

Tags
designer, ide, nsdialogs

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump