Archive: A new modern user interface


A new modern user interface
Finally, it's ready :D I made a new modern user interface for NSIS, like the wizards of recent Windows versions.

Click here for a screenshot!

To use this new UI, grab the lastest version of NSIS 2 pre-alpha 7 from CVS. You can find more information and an example script in the "Examples\Modern UI" directory.

If you find any bugs, language errors or whatever, please tell me so I can fix 'em before the release of alpha 7 :)


what a great UI :) ... really good one :D ;) :up: :up:


Wow!


Sexy!


In a related story, InstallShield reported a 90% drop in revenue for Q4 2002 after all their users migrated to NSIS :D


If you don't feel like messing with the CVS here is the compiled example.


Very good work, but i have one small complain : the text above and the icon isn't transparent, so if i use a different colored theme in Windows (i'm on XP), you'll see the white colored rectangle and the square (where the top right icon is) - clearly visible, could you make it transparent?


I think i've fixed it, here it is attached.


looks very nice :)

has Justin stopped working on NSIS?


wow! very very good!!!


Thanks :D

mlbl, I'll have a look at the problem :)


Originally posted by liquidmotion
has Justin stopped working on NSIS?
Justin is no where to be found =/

I also noticed that the words on the bottom (the brandingtext) are not dynamically sized along with the caption. Is there a workaround to it?What i'm trying to say is that, in place of the word "Nullsoft...", say if i put a short word like "My Setup", it'll show up fine but there's lots of extra blank spaces after the word "My Setup". This is merely cosmetic, but it would greatly improve the UI if it can be fixed.

Also i hope maybe the next release can include a built in start menu folder selection, not one that requires a customdialog to work :)


Originally posted by mlbl
I also noticed that the words on the bottom (the brandingtext) are not dynamically sized along with the caption. Is there a workaround to it?What i'm trying to say is that, in place of the word "Nullsoft...", say if i put a short word like "My Setup", it'll show up fine but there's lots of extra blank spaces after the word "My Setup". This is merely cosmetic, but it would greatly improve the UI if it can be fixed.

Also i hope maybe the next release can include a built in start menu folder selection, not one that requires a customdialog to work :)
You're right about the brandingtext sizing, i'll see wheather there is anything I can do about it. I cannot find your first problem (with the colors), can you reply to my PM?

A start menu selection can only be made using InstallOptions, maybe I'll design a dialog for it.

I think i'll give you two screenshots of the difference between the original one and the new one (that i fixed).

The Original:
http://www.planetannihilation.com/taucp/yours.jpg

The Fixed One:

http://www.planetannihilation.com/taucp/mine.jpg

As you said earlier the only way to have a start menu folder selection is by using installoptions, maybe you could at least simplify the process (of adding the start menu folder selection). I was unable to properly integrate it with this new modern UI, i ran into problems with the text on top "the words like Choose...." and so on...one such example is if you move to the next section (selecting a start menu folder), then move back (selecting the location / install path), then the text on top would be wrongly displayed...stuff like that.


Originally posted by mlbl
I think i'll give you two screenshots of the difference between the original one and the new one (that i fixed).

The Original:
http://www.planetannihilation.com/taucp/yours.jpg

The Fixed One:

http://www.planetannihilation.com/taucp/mine.jpg

As you said earlier the only way to have a start menu folder selection is by using installoptions, maybe you could at least simplify the process (of adding the start menu folder selection). I was unable to properly integrate it with this new modern UI, i ran into problems with the text on top "the words like Choose...." and so on...one such example is if you move to the next section (selecting a start menu folder), then move back (selecting the location / install path), then the text on top would be wrongly displayed...stuff like that.
I haven't got this problem with any XP theme. What XP theme are you using?

I'll make an example of using InstallOptions with this Modern UI soon.

I'm using a custom one from ThemeXP.org called Pusan2Blue. I think it's the color scheme for the background that affects it. The fix was very simple, i just changed the flag to SS_LEFT instead of SS_WHITERECT for the dialog (the bigger rectangle outside of the two smaller ones in the dialog)


I've made (ok i just merely moved the stuff around) an alternate modern UI. Since the original brandingtext isn't dynamic, so here's the "old-but-modern" style.

Here's a screenshot :

http://www.planetannihilation.com/taucp/alternate.jpg


I will release a new version soon.

* Auto sizing branding text (kickik will make a code change)
* Fixed background color issue with some custom XP themes
* Example script for InstallOptions
* Example script: Instructions for the user on the Description frame
* more?


I've made (ok i just merely moved the stuff around) an alternate
Errm the downloaded exe fails the CRC check, and also the /NCRC flag it suggests you try does nothing???

Originally posted by Sunjammer

Errm the downloaded exe fails the CRC check, and also the /NCRC flag it suggests you try does nothing???
Ok after some checking i made a big mistake - i modified the example.exe from modern_ui.zip itself ! (how stupid of me)...i didn't realise it was an installer and NOT the UI itself (although it did have the UI in it)...i'll make a fixed copy rightaway

Ok i just fixed it, this time it should work fine.


Is this UI available only under XP or older versions (e.g. Win2000) will display it as well?


Originally posted by Zaraza
Is this UI available only under XP or older versions (e.g. Win2000) will display it as well?
It should work fine on all versions of Windows OS.

The new version of my UI will be released tomorrow, it will also include a Multilanguage + InstallOptions + Modern UI example script :)


Where is "Space available: xxx"?


Originally posted by LsMoNKi
Where is "Space available: xxx"?
What do you mean? It's just on the Folder Select dialog (have a look at the screenshot in the first post).

Sorry I thought it's in Options tab, :(


Originally posted by mlbl
Ok i just fixed it, this time it should work fine.
It you want to modify the UI, it's better to modify Contrib\UIs\modern.exe instead of creating an installer which contains the dialogs.

Originally posted by kichik


Justin is no where to be found =/
missing in action eh? :(

Originally posted by Joost Verburg

It you want to modify the UI, it's better to modify Contrib\UIs\modern.exe instead of creating an installer which contains the dialogs.
Well the installer does include a modified version of the modern.exe, just that it includes an installer like the one in modern_ui.zip.

Added /TRIM(LEFT|RIGHT|CENTER) for BrandingText. Get it from the CVS.

There are some multi language handling changes, so don't be surprised if your script breaks. Have a look at the docs, they are pretty updated.


What does the Brandingimage /Trim do?Because after placing it in my script, it didn't change anything.


It trims down the version string control to the size of the string specified.


Originally posted by kichik
It trims down the version string control to the size of the string specified.
I tried putting this in my script :

BrandingText /TRIM(LEFT) "Testing 123"

and used the modern.exe as the UI, and nothing noticable changed. Did i miss something?

Yea, the () aren't supposed to be there... It should be /TRIMLEFT not /TRIM(LEFT). I will make the compiler check it.


Originally posted by kichik
Yea, the () aren't supposed to be there... It should be /TRIMLEFT not /TRIM(LEFT). I will make the compiler check it.
no wonder :)

It seems that the trimming doesn't "trim" that well, it leaves a small amount of gap (can be considered quite big), here's an image :

http://www.planetannihilation.com/taucp/prob.jpg

Maybe if the space is one character away isn't that bad, but this looks more like 2-3 characters away

It does. Open it up with Resource Hacker and see for yourself. The problem with your installer is that the line only reaches that far.


wow, this is great!


Totally Confused
Ok.
I'm totally confused. I have pre-alpha 7 and the UI zip files... I'm not getting any content in the UI to create NSIS packages. Yes, I'm a noob, but I'm not totally inept... Did read the facts and have been using Blue Slate...

What am I mnissing?:confused:


Archive: A new modern user interface


All you need to do is right-click on a script and choose "Compile NSI". If you don't have this context menu entry install an older NSIS first (alpha 6 for example), and then put the pre-alpha 7 files on top of it.


Ahh.
Ok. This is a UI for NSIS, not a front end to create scripts. I gotcha.

Sorry folks.

I'm script stupid. Are there any good FrontEnds for NSIS?


These guys are building one: http://forums.winamp.com/showthread....threadid=96398

In the mean while you can try some front-ends here: http://www.clantpa.co.uk/nsis/wiki/


Originally posted by kichik
It does. Open it up with Resource Hacker and see for yourself. The problem with your installer is that the line only reaches that far.
Not true, i have moved and enlarged the line - here's the stats :

left 5, top 192, width 324, height 1

I've tested it with the example.nsi from the CVS as well and the same thing happens.

Originally posted by mlbl


Not true, i have moved and enlarged the line - here's the stats :

left 5, top 192, width 324, height 1

I've tested it with the example.nsi from the CVS as well and the same thing happens.
This issue has been fixed in CVS (will be in alpha 7).

New version!

Alpha 7 includes a new version of my UI.

A new macro system, full multilanguage support, fixed all known bugs, new examples, modern2.exe with a larger component select treeview, auto sizing BrandingText & more!


I've just downloaded and installed alpha 7 and now my nsi files won't compile.

I get this error when compiling the test.nsi installed in the installoptions directory. Also i get the same error in my custom nsi scripts. I've had to uninstall.

Usage: CallInstDLL dll_path_on_target.dll [/NOUNLOAD] function
Error in script "C:\Program Files\NSIS\Contrib\InstallOptions\test.nsi" on line 127 -- aborting creation process

Maybe this is something i'm not doing. Sorry if it is.


Originally posted by Sailo
I've just downloaded and installed alpha 7 and now my nsi files won't compile.

I get this error when compiling the test.nsi installed in the installoptions directory. Also i get the same error in my custom nsi scripts. I've had to uninstall.

Usage: CallInstDLL dll_path_on_target.dll [/NOUNLOAD] function
Error in script "C:\Program Files\NSIS\Contrib\InstallOptions\test.nsi" on line 127 -- aborting creation process

Maybe this is something i'm not doing. Sorry if it is.
InstallOptions has been moved from the Bin to the Plugins directory, you should change the filename.

[edit]There is also a bug in CallInstDLL (see kickik's post)[/edit]

Fixed in the CVS. I will soon rerelease alpha 7. Thanks for the heads up, please use SourceForge for bug posts next time.


Small update

The finish header for the uninstaller can also be set using the MUI_FINISHHEADER macro.

Update your scripts, because MUI_FINISHHEADER requires an additional parameter.


Your UI doesn't support Banner Images, huh?


Originally posted by Tolwyn
Your UI doesn't support Banner Images, huh?
You can edit the modern.exe UI using a Resource Editor to add or remove images, icon or other elements.

Another update

Removed the titlebar from the Verifying installer & Unpacking data dialog :)

Available in the new alpha 7 release or on CVS.


wow that looks awesome. will be used this UI with other versions of the one and only NSIS? :p


What other versions? If you are referring to 1.x then the answer is no.


Originally posted by trace
wow that looks awesome. will be used this UI with other versions of the one and only NSIS? :p
The new UI is optional, so you don't need a special version of NSIS to use it. :) It will remain in all later NSIS 2 versions.

The new UI is optional, so you don't need a special version of NSIS to use it. It will remain in all later NSIS 2 versions.
this was the thing i wanted to know. i know my english is bat so you probably misunderstood. thanx.

Looks a bit odd
For some reason, the rectangle along the top of my installer is showing empty, but I can't figure out what I'm doing wrong. I'm using modern2.exe from the alpha7 download at SF btw. The screenshot should show the prob I'm having


Re: Looks a bit odd

Originally posted by prodangle
For some reason, the rectangle along the top of my installer is showing empty, but I can't figure out what I'm doing wrong. I'm using modern2.exe from the alpha7 download at SF btw. The screenshot should show the prob I'm having
You need to include some macros in your script to get it to work.

Have a look at the Examples\Modern UI directory.

Re: Re: Looks a bit odd

Originally posted by Joost Verburg

You need to include some macros in your script to get it to work...
DOH!!

Thanks a lot :)

Just thought I'd say I got it going. The installer looks loverly, my boss is gonna love this :)

cheers (and why the feck am I working on a Sunday - oh well)


The icon in alpha7 from SF doesn't seem to have a 16 colour version, maybe your already aware, just thought I'd point it out though. Looks a bit shoddy on 95 :)


Originally posted by prodangle
The icon in alpha7 from SF doesn't seem to have a 16 colour version, maybe your already aware, just thought I'd point it out though. Looks a bit shoddy on 95 :)
It's impossible to make a 16-color icon in this style. I'll add the classic 16-color icons for systems with 16-color icons. :)

Done. Grab the new icons from CVS :D


Update - version 1.17

1.17 - Semtember 10th, 2002
Win9x font weight bug fixed (font of title in white rect)

1.16 - Semtember 6th, 2002
Change text 'Scroll down' on license page to 'Press Page Down', because the RichEdit control has focus by default now

1.15 - Semtember 4th, 2002
Multilanguage example: changed LangDialog to LangDLL::LangDialog (using the DLL name is now required)

1.14 - Semtember 3th, 2002
Small grammar fix (thanks eccles)
UI files updated by Justin for better RichEdit usage

1.13 - Semtember 2th, 2002
Added 16 color icons

1.12 - August 30th, 2002
Verifying installer & Unpacking data dialog has no titlebar anymore


Finally! Version 1.20 is here!

This new version has Install Options integration! It's now very easy to use Install Options in your Modern UI scripts by using the new macro's. Have a look at Examples\Modern UI\InstallOptions.nsi. :)

The macro systems also contains some other changes & fixes (see the changelog in Readme.html), you will need to make some small changes in your scripts to use the new header file.

You also need the latest NSIS 2 CVS version to use Modern UI 1.20.

If you have no cvs access you can download a snapshot with installer of all NSIS files at http://nsis.sourceforge.net/nsis-snapshot-sep22.exe