Skip to content
⌘ NSIS Forum Archive

NSIS Dialog Designer

156 posts

n0On3#
ok, don't worry, if you have other things to do, just leave this and I will manage. 🙂 thanks for the project 🙂
nicorac#
Version 0.9.11 released

After a long silence a new update to NSISDialogDesigner is finally available.

The most important added feature is the support to DU (Dialog Units) when generating NSIS scripts. In fact DU is now the default choice; you can revert to pixels through Tools | Options dialog.
Definition files (*.nsddef) files were not affected by the change, XML will always contain pixel units.

Originally Posted by sethradio View Post
You should add file/directory select features to it.
Here you are...🙂

v.0.9.11 - 2012-02-11
  • NEW: NSIS scripts (*.nsdinc files) controls position and size values can now be selected between DU (Dialog units, the new default mode) and Pixels.
    The default coordinate system mode can be set into Options dialog.
  • NEW: Added 2 new controls: DirRequest and FileRequest.

NSISDialogDesigner is available here: http://coolsoft.altervista.org/nsisdialogdesigner
Afrow UK#
Just something to consider but it can be desirable to mix dialog units and pixels when creating controls. For example, you may want an image placement which has its size in pixels but its position in dialog units. Similarly you may want a label to the right of the image which has the same height in pixels. Also how about percentages?

Stu
nicorac#
When I was planning the implementation of multiple coordinate systems I was looking for a case where an user could need mixed coordinates... and your example is what I missed.

I'd leave pixels inside XML, just because .NET works in pixels only and I don't want to mixup things and reinvent the wheel.

Now, how could I let users specify the coordinate system to use?
I'd like to give them the maximum flexibility, i.e. X in pixels, Y and height in % and width in DU, for each control.

This is my idea: a CoordinateSystem property in each control, with 4 sub-properties X, Y, Width, Height.
Accepted values for each sub-prop are: DU, Pixels, Percentage, Inherit (default).
"Inherit" means "Will use the containing Dialog settings".
This way the dialog is the new repository of the default coordinate system setting; and it is preserved when shared between two developers with different Tools | Options | Coordinate system settings.

What about it?
thpang#
Will there be the ability to import current .NSH files that are dialogs and then use the design to manipulate them?
Anders#
Originally Posted by nicorac View Post
Definition files (*.nsddef) files were not affected by the change, XML will always contain pixel units.
Is this a good idea? You can go from dialog units to pixels but not back (At least not on a different system config since it depends on the font)
nicorac#
Originally Posted by thpang View Post
Will there be the ability to import current .NSH files that are dialogs and then use the design to manipulate them?
This requires parsing NSIS script code and interpreting control creation.. not so easy and prone to errors, because you can create a button in (at least) 10 different ways; just think about a FOR-NEXT cycle to create 10 identical buttons...
I'm going to complete INI file import; INI file dialog definition is well structured.
nicorac#
Originally Posted by Anders View Post
Is this a good idea? You can go from dialog units to pixels but not back (At least not on a different system config since it depends on the font)
.NET is pixel based, so changing this behaviour requires a lot of work.
The only case I see this useful is a development team where developers have different DPI settings (and they share the same .nsddef files).
nicorac#
Version 0.9.12 released

Version 0.9.12 released

NEW: Added "Percentage" to the available NSIS coordinate systems.
NEW: Selection of NSIS coordinate system is now possible at control level, and for each component (X, Y, Width, Height). So now is possible to have different coordinate systems for different controls. Controls coordinate system default value is "Inherit"; this means that by default each control is rendered using the same coordinate system as the containing dialog.
nicorac#
Version 0.9.13 released

v.0.9.13 - 2012-03-09
FIX: Wrong code generated for MaxLength property of TextBox control (thanks to fabpolli for bug report).
nicorac#
Version 0.9.14 released

Added new "Checked" property to RadioButton control.
I also added the possibility to create more than one group of RadioButtons (remember that only one RadioButton can be checked inside a group).

RadioButtons are grouped by their container; default container is the dialog.
If you need more than one group you can add RadioButtons to a GroupBox (if you need border and title around the group) or a Panel (title and border-less).
Please note that Panel has no corresponding NSIS control, so no NSIS script is generated for it.

NOTE: please check TabOrder of RadioButton controls, because it must be correctly set (WS_GROUP style is applied to the first RadioButton of each group).
nicorac#
Version 0.9.15 released

v.0.9.15 - 2012-04-13
FIX: NullReference exception thrown when adding an HLine or VLine control.
Romuald35#
Help for a little job: launch exe files by a quick menu

Hello,

I'm sorry for this question, but, it's very late and I've passed a long time (few hours ...) on the forum, website, etc ... to find solution

My need is basic. 🧟

I need to create a launcher program to instal other program who already exist.

There will be 3 pictures (Logo for program1, program2, ...), 3 buttons (launch setup1.exe, setupe2.exe ... ).

I don't understand what I need to write in .nsi 🤨

Could you give me an example ?

Thanks a lot 🙂

Romuald
nicorac#
This seems a little OT.
NSISDialogDesigner could only help you to draw and place buttons on the dialog.
After that, the code behind these buttons is all about you...

Take a look here on how to start an embedded EXE: http://forums.winamp.com/showthread.php?t=315997
nicorac#
Version 0.9.16 released

v.0.9.16 - 2012-04-20
FIX: SelectedItem property of ListBox, ComboBox and DropList controls now accepts any value (like $abc).
nicorac#
New version 1.1 released

New version 1.1 released:
  • NEW: Improved support for DialogIDs other than the default one (1018). User can now select 1044 (Welcome & Finish pages) and designer will change dialog size accordingly.
  • NEW: Added RichText control support. It does not support RTF text loading, it must be customized by the user (see here: http://forums.winamp.com/showthread.php?t=288129).

PS: sorry, I missed to announce the release of version 1.0.
Detailed version history could be found here:


NSISDialogDesigner can be downloaded here:
nicorac#
New version 1.1.1 released

v.1.1.1 - 2012-10-01
  • FIX: Fixed generated script for FileRequest control (wrong test on returned string).

NSISDialogDesigner can be downloaded here:
TheConultant#
Missing tutorial

Hello @all.
I'm missing a tutorial from beginners to experts, or an integrated CHM help file.
I'm using Eclispe with the nsis plugin to develop installer.
Now I'm having the problem to marry the nsis dialog designer page varibles with my NSIS scripts.
The target is simple. A simple dialog page with 3 text fields an one password field ('Computername', 'Servername', 'Loginname' and 'Password') shall be written into an ini file.
For test reasons it is welcome to display the input in a message box. Ho do I using the dialog desinger pages in my main nsis scripts?

Are there known nsis dialog desinger tutorials available, or mabye can anybody help me? 🙄

Best regards
Martin
MSG#
There's an excellent tutorial in the nsDialogs readme: http://nsis.sourceforge.net/Docs/nsDialogs/Readme.html

You can use the NSIS Dialog Designer for generating the layout-specific code, then use that in your nsDialogs page functions. (Note: When using nsDialogs, make sure you use MUI2, not MUI.)
nicorac#
Version 1.1.2 released

v.1.1.2 - 2013-01-11

New version is available here:
shadowpoa#
Little problem with CoordinateSystem

Hi,

I noticed that when inserting a DirRequest control two controls are created, like the text below, so far so good.

  ; === DirRequest1_Txt (type: Text) ===
  ${NSD_CreateText} 26u 69u 110u 11u ""
  Pop $hCtl_JANELA_DirRequest1_Txt
  
  ; === DirRequest1_Btn (type: Button) ===
  ${NSD_CreateButton} 138u 68u 20u 14u "..."
  Pop $hCtl_JANELA_DirRequest1_Btn 
But, when changing CoordinateSystem, it changes at left panel (Attachment) but not on the script itself.

I solved with changing the dialog's CoordinateSystem to PPPP with inherit at the control, but think not the best choice, could you take a look on this behavior?

Many thanks!
nicorac#
New version released

Originally Posted by shadowpoa View Post
could you take a look on this behavior?
I just released an updated version that fixes the bug you reported, both on DirRequest and on FileRequest controls.
v.1.1.3 - 2013-12-16
FIX: Fixed generated script for DirRequest and FileRequest controls, not respecting CoordinateSystem.
Latest version can be found here: http://coolsoft.altervista.org/nsisdialogdesigner

Thanks for your feedback.
Claudio
shadowpoa#
Control Positioning problem

Hi, me again...

Just for start, I´d like to say that this is the best editor for NSDialogs available.

So lets to the problem.

I´ve playing with some dialogs, and have noticed that after set size to 1044 and placed some controls, hitting test compiling and then the compiled dialog pops, they're different!!

So, I done some testing, and saw that this behavior occurs when using DLU to size and place controls (default) .

I got some time reading... and found this link...
http://blogs.msdn.com/b/oldnewthing/.../17/74811.aspx

and this:


So, I adapted the sample code from here http://nsis.sourceforge.net/Get_text_dimensions to convert pixels units to dlu and voilá, the size and positions are equal.

Hope you can fix it, if more tests needed please ask.
nicorac#
Thanks for your feedback

Originally Posted by shadowpoa View Post
...after set size to 1044 and placed some controls, hitting test compiling and then the compiled dialog pops, they're different
It turned out that the bug exists for all dialog sizes.
Since 1044 is bigger than the others, the bad behavior is much more evident here.

Thanks to your feedback (and the samples you provided) I found 2 bugs:
  1. DialogUnits were calculated using bad coefficients, because I was using the wrong font as reference.
  2. DialogUnits (and also Percentage) were emitted as integers (no decimals) to NSIS generated script; this adds another error to the one already present due to point 1)

Both the errors will be fixed into version 1.2.0, available in a few minutes (stay tuned 😉).

I also added a new feature: a new "All" subproperty into CoordinateSystem controls property, that allows user to change X,Y,Width,Height subproperties together in a shot.

Thanks again for your detailed feedback.

Cheers
nicorac#
New version 1.2.0 released

Originally Posted by shadowpoa View Post
...after set size to 1044 and placed some controls, hitting test compiling and then the compiled dialog pops, they're different
I just released an updated version that fixes the bug you reported and adds some new features:

v.1.2.0 - 2014-07-11
  • NEW: CoordinateSystem conversions are now done with higher precision.
    (thanks to shadowpoa for feedback: http://forums.winamp.com/showpost.php?p=3001224)
  • NEW: Control sizes are now written with up to 2 decimals in NSIS generated script.
  • NEW: Added a new "All" subproperty to controls CoordinateSystem property;
    it can be used to change X,Y,Width,Height subproperties all together.
  • FIX: Wrong vertical CoordinateSystem conversion "Pixel --> DialogUnits".

Latest version can be found here: http://coolsoft.altervista.org/nsisdialogdesigner

Thanks for your feedback.
Claudio
nicorac#
Originally Posted by shadowpoa View Post
Wow! this was fast... testing here...
billion thanks 😁
Your feedback was really detailed, making it easier to find and fix...