Skip to content
⌘ NSIS Forum Archive

NSIS Dialog Designer

156 posts

nicorac#
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.
deedsmedia#
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#
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.
Jovet#
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#
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#
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#
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
ElArZ#
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
nicorac#
Version 0.9.7 released

v.0.9.7 - 2011-09-11
NEW: Added support for Unicode into generated .nsdinc scripts (needs an Unicode version of NSIS).
NEW: New (self explaining) control properties: Visible and Enabled.
NEW: Dialog name (and so the corresponding NSIS variable) can now be set independently from its .nsddef filename. It could be set through the new "Name" dialog property.
FIX: Generated test script (the one compiled with F5) now checks user custom scripts to avoid redefining an already defined function. (thanks to Benjamin Richardson for reporting bug)
FIX: Fixed broken uninstall test script.
FIX: Some properties appear in bold into Property Grid, even if their value is the default one. This caused the generate script to be longer than required.
FIX: Custom script editor now accepts TAB key.
FIX: Script preview is cleared when closing the last dialog editor.
FIX: Fixed focus management issues that prevents DEL key to work into PropertyGrid.

NSISDialogDesigner is available here: http://coolsoft.altervista.org/nsisdialogdesigner
nicorac#
Version 0.9.8 released

v.0.9.8 - 2011-09-12
AEL21#
I am trying to create an installer that basically has all custom components, so I would be getting rid of the Next, Back, Cancel buttons, etc... How would I recreate them using your designer, so, I know how to create the buttons, but what is the command to Cancel, Next, Back? I have tried searching around, but I can't figure it out.
MSG#
The Next Back Cancel buttons aren't part of the inner dialog, they're part of the outer user interface. If you want to create an installer without those buttons, you'll have to design and program your own user interface.
nicorac#
That's right.
As MSG said, NSIS Dialog Designer target is the user part of the dialog, the one below the top bitmap and above the command buttons.
AEL21#
I was just experimenting with that actually! So, when I get rid of everything so that it is just the 'innner interface', is there anything special I have to map for the Cancel, Back, Next buttons? i.e. Abort command wouldn't just work, I have to do something extra inside the actual code.
MSG#
Why wouldn't abort work? Would you prefer Quit?

As for jumping to other pages, there's relgotopage.
AEL21#
I don't know! I tried putting Abort in the OnClick box (in the NSIS Dialog Designer), but nothing happened when clicked. Is there a better way of doing it that would actually work?
AEL21#
Well, I am trying something else now, I edited the gui with Resource Hacker and just made the main content cover the whole window, behind the navigation buttons, so far it works pretty well, except that the buttons aren't shown until a person hovers over them....
MSG#
Ah yes, I remember, that's a nasty shortcoming in nsDialogs. See here:
Are you a developer who uses NSIS to distribute your application? Are you a Winamp plug-in developer who wants to use NSIS to distribute your plug-in? Have suggestions for other people like you? This is the place.


Unfortunately this hasn't been fixed yet. nsDialogs cannot quit the installer.
LostKatana#
Because of I'm really new this may be a dump ask,
but I felt a litte bit hopeless as I want to thell a button what he has to do.
May there is a help in the Dialog Designer with examples or a help which creates
a nothing doing action...
nicorac#
Version 0.9.9 released

v.0.9.9 - 2011-11-21
  • NEW: Added new "check updates" features: it periodically checks for new releases on CoolSoft website.
  • NEW: Script preview editor now preserves selection and cursor position after script changes and when switching between multiple opened dialogs.
  • NEW: TabIndex property can now be used to customize focus path through controls.
  • NEW: Added context menu to dialog designer, it shows Edit menu items.
  • NEW: Dialog .nsddef files are now created with UTF-8 encoding.
  • NEW: .nsddef and .nsdinc files now include NSISDialogDesigner version into header comments.
  • NEW: Duplicate font definitions are merged, generating only a single variable.
  • NEW: .nsddef files can now be opened by drag&drop from Windows Explorer.
  • NEW: IDE layout can now be reset through View menu item "Reset layout".
  • FIX: Property are now stored into .nsddef only if value is different from default.
  • FIX: Fixed issue on copy/paste controls (duplicate control name).
  • FIX: User custom scripts won't be generated during debug, avoiding compile error due to missing functions.

NSISDialogDesigner is available here: http://coolsoft.altervista.org/nsisdialogdesigner
nicorac#
Version 0.9.10 released

v.0.9.10 - 2011-11-23
  • FIX: Fixed bug that prevents opening forms where SetupType property is different from default value (Install).
  • FIX: IDE layout was not saved correctly and lost between version upgrades.
    Please reset layout (View | Reset layout), customize it then restart IDE to save correctly.

NSISDialogDesigner is available here: http://coolsoft.altervista.org/nsisdialogdesigner
nicorac#
Request for comments

Hey guys, I need your thoughts on how alternate coordinate systems (units, percentage) should be implemented into NSISDialogDesigner.

Suppose we place a button on an empty dialog and consider only its location (the same ideas applies to size).
Button location can be changed in 3 ways:
  1. dragging the control with mouse (property grid Location property updates accordingly)
  2. changing X and Y values of Location property (button moves accordingly)
  3. using cursor keys (the button moves by 10 pixels each key press and again property grid Location property updates accordingly)

Now the doubts that stopped me from completing this feature.
I'm going to have an IDE where each property coordinate system can be unrelated to others.
I mean a control could have its X in pixels, Y in DU, Width and Height in percentage. NSIS supports definitions like this.
.NET (that's what I used to write NSDD) doesn't, it understands pixels only (and it has its own way to manage different DPIs, but always in pixels).

So I customized Location and Size properties, allowing user to enter strings and not only numbers (like NSIS):
  • 120 means "pixels"
  • 3u means "units"
  • 12% means... "12%"

User entered value (string) is written to NSIS script, while corresponding pixel value is written to .nsddef file.

So far so good, now what if the user drag/resizes the control using the mouse?
Actually I convert pixels-->"user selected unit" and store this one into property, but this leads to not-integer values, like 1.4523213. To have "human" values the user must enter them manually, and I should cut out decimals to avoid loops.

The first solution that comes to my mind is: coordinates that aren't pixel will be locked.
I mean, if I set W=4u, then control width will not be changeable by mouse but only inserting a value into property grid.

I'd like to hear your thoughts...
demiller9#
I think it would be 'unfriendly' to lock out the mouse or cursor keys. I think that if a person changes the width (or other properties) you could save those properties in pixels. That's what they are looking at, and they thought it looked OK, so I think they should accept pixels.
MSG#
Maybe I'm not understanding the problem correctly ,but can't you just calculate the nearest units equivalent of the new pixel position, and save that? This will cause the control to be resized once more after the mouse button is released, but this is normal for snap-to-grid designing.

Other idea is to just revert to pixels each time a mouse-resize is used.

Or maybe do all of the above and make a setting for the end user to choose the desired behavior.
n0On3#
Originally Posted by nicorac View Post
You're welcome.
Stay tuned, right now I'm working on old format INI file import.
just to let you know that there's someone waiting for this 🙂
nicorac#
Originally Posted by n0On3 View Post
just to let you know that there's someone waiting for this 🙂
You're right, the project isn't dead 😉.
Right now I'm fighting with pixel/dialog units/percentage coordinates, and it took more than expected.

After that I'll start working on INI import and I suppose it should be a long task too.