Skip to content
⌘ NSIS Forum Archive

Ultra-Modern UI

269 posts

legcsabi#
testing beta2

Thanks for the reply, now it is working properly. UMUI beta2 has a lot of cool features, but I also noticed a serious problem: speed. I was playing with the preset examples provided with UMUI. Testing on a Pentium Dual Core computer having 3GB memory(!) it took me around 10-15 seconds to display the serialnumber page. The frame of the page gets loaded before the setup gets frozen. If you turn everything off in Function serial_function, it won't get frozen at all. Whenever turning a LABELEDSERIAL on (with its define), it takes longer and longer to load the page. Other pages - like the maintenance - also take a bit of time to load.
Something seems to me to be broken in the example with Update page. i built the example, installed it, tried to install it again, and there was no Update page displayed. The registry keys were created properly. It should resemble Maintenance page example, which is working properly.
SuperPat#
For update page:
Compile and install
edit the update.nsi example and change the UMUI_VERBUILD define (or you can also wait tomorrow)
Recompile and relaunch the installer
the update page appear!

For the execution time, I do not have any means to accelerate it.
legcsabi#
interesting. I changed it to the following (taken from the maintenance example):

!define UMUI_VERSION "1.00 beta 2"
!define /date UMUI_VERBUILD "1.00_%Y-%m-%d"
!define UMUI_VERSION_REGISTRY_VALUENAME "Version"
!define UMUI_VERBUILD_REGISTRY_VALUENAME "VerBuild"
!define UMUI_UNINSTALLPATH_REGISTRY_VALUENAME "uninstallpath"
!define UMUI_INSTALLERFULLPATH_REGISTRY_VALUENAME "installpath"
!define UMUI_UNINSTALL_FULLPATH "$INSTDIR\Uninstall.exe"

but nothing changed
fboner#
More background woes, variation on theme

Originally posted by SuperPat

If you want your page will be automatically skinned you have to use the INSTALLOPTIONS_DISPLAY or INSTALLOPTIONS_DISPLAY_RETURN macros.
The init dialog doesn't do this because if you set your own color into your pre function thes will be erase by the INSTALLOPTIONS_SHOW, INSTALLOPTIONS_SHOW_RETURN macros.
Salut SuperPat,

My custom pages are working fine with the INIT/SHOW approach.

I have one 'standard' page, which I launch with a PRE function. As a result the page, actually the components page, background is 'old style' grey. Here is the code snippet:

; Welcome page
!insertmacro MUI_PAGE_WELCOME

; Components page
;!insertmacro MUI_PAGE_COMPONENTS <- not used
Page components oninst.CheckInstalledJRE "" ""
...
If I ignore the Java check and use the stock !insertmacro MUI_PAGE_COMPONENTS everything is fine. I can't seem to find a way to do it when I launch the page in this manner:

Page components preMacro "" ""

Is there some way to fix this?

Merci!!!
SuperPat#
fboner:
you need to use INSTALLOPTIONS_DISPLAY or INSTALLOPTIONS_DISPLAY_RETURN instead of INIT/SHOW

and the page will be skinned automatically.


legcsabi: I don't understand your problem
fboner#edited
Originally posted by SuperPat
fboner:
you need to use INSTALLOPTIONS_DISPLAY or INSTALLOPTIONS_DISPLAY_RETURN instead of INIT/SHOW

and the page will be skinned automatically.
That would be true if I were using a 'custom' page with a corresponding .INI file. But I am not. I am using the Components page as defined by the UMUI, but calling it in a different manner than with INSERT_MACRO_XXX.

I rewrote the java function and now include it in my on.init, however, it would have been cleaner the other way around, espeically to be able to re-run the function automatically if the user backs up to the components section from a later page.

Thanks for your response...and thanks for the documentation...you rock!

F.

PS just a thought on the flickering scroll bar during the INSTFILES phase...perhaps you could resize the scroll button fewer times, and therefore redraw the scroll bar fewer times?? My app installs over a thousand files...so the flickering is quite intense.
SuperPat#
New build version 2008-02-09

- Based on NSIS 2.35
* set default language file for MUI without changing the user setting (LANGFILE_DEFAULT and UMUI_LANGFILE_DEFAULT defines)
- Fixed Bugs for the FileDiskRequest Page
- Add a FileDiskRequest example
- Fixed Bug with the (UN)UNIQUEIMAGE defines option. (From now, the PageBG example works fine)

Download
legcsabi#
bug

Hi!

Thx for the new release, meanwhile I got the Update example working as well.
I found a serious bug in UMUI_PAGE_MULTILANGUAGE. Compared to MUI, function .onInit gets called twice if you use this page. First before the page gets displayed and secondly if the selected language of the combobox was changed. This misbehaviour can have a side-effect, for example my script was detecting in .onInit if it was already running, and if yes, it aborted itself. Since .onInit gets called twice, it aborted itself whenever I changed the setup language to other than the default...
SuperPat#edited
In fact, when you choose an other language, the installer is reloaded:

You can bypass your ckecking by adding this code in your .onInit function:

Function .onInit

!insertmacro UMUI_MULTILANG_GET

!insertmacro UMUI_IF_INSTALLFLAG_ISNOT ${UMUI_LANGISSET}

; Check if installer is already lauched only the first time

!insertmacro UMUI_ENDIF_INSTALLFLAG

; Eventualy other code

FunctionEnd


PS: I have forgotten yesterday to add in the changelog:
- All Install Flags are prfixed by UMUI_
legcsabi#
InformationPage

Hi again

Thx for the solution for .onInit, it works. I noticed that the new InformationPage cannot use licenselangstrings (or langstrings) instead of file names like license page. Do you know a solution to make it multilingual (to display a separate information file for each language)?
SuperPat#
You can use LangString too:

  LangString FILE ${LANG_ENGLISH} "English.txt"
LangString FILE ${LANG_FRENCH} "French.txt"
!insertmacro UMUI_PAGE_INFORMATION "${FILE}"
SuperPat#
New build version 2008-02-24

- Added Ungarian Translation (By Tom Evin)
- Fixed Transparency bug in InstallOptions custom pages (See the InstallOptions.nsi example)
- Added missing DIRECTORY page in the NSIS + UMUI package

Download
SuperPat#
Simply define
MUI_PAGE_HEADER_TEXT and/or MUI_UNSET MUI_PAGE_HEADER_SUBTEXT
before inserting the finishpage macro
legcsabi#
Re: Information page

probably I'm a bit too new to nsis, but I cannot find out how to use Langstrings with Information page file names.

I get this compiler error:
File: "$(FILE)" -> no files found.
Usage: File [/nonfatal] [/a] ([/r] [/x filespec [...]] filespec [...] |
/oname=outfile one_file_only)
Error in macro UMUI_FUNCTION_INFORMATIONPAGE on macroline 24
Error in macro UMUI_PAGE_INFORMATION on macroline 19
Error in script "C:\Program Files\NSIS\Examples\UltraModernUI\Information.nsi" on line 44 -- aborting creation process

I tried both "$(FILE)", "${FILE}", "$FILE". Could you post a full working example?

Thx
SuperPat#
Indeed, we can't use LangString for include File, and of course, with the information page.

I will post a working example later
SuperPat#
New build version 2008-03-05

- Improved: the Information.nsi example show an information file according to the selected language

Download
legcsabi#
Thanks, the new Information page works properly!

Now I wish you could somehow solve the slowness of SerialNumber page. After a bit of googling I found this page: http://forums.winamp.com/showthread.php?postid=2051082 which indicates that using ReserveFile can improve performance.

I was playing a bit with WriteINIStr, this function is called relatively frequently (7 times in UMUI_SERIALNUMBERPAGE_ADD_LABEL for instance). It only adds a value for an entry to a section in an INI file if it does not contain it, otherwise it rewrites the entry. This means that it has to scan through the whole file..
SuperPat#
New build version 2008-03-24

- Fixed: the "\" are replaced by "\\" in the confirm page because it showed a square in the place of a "\n", "\t"...

Download
SuperPat#
UMUI was not designed to work with nsDialog.

Nevertheless, You always can use nsDialg in your own custom page, bug you need to manually skin it.
xbarns#
Ok i changed to using InstallOptions, i just like the UMUI better.

One question though i have Label that i want to color Red, when i go and use

!insertmacro INSTALLOPTIONS_INITDIALOG "Dialog_RetrieveLicence.ini"
 Pop $0
ReadINIStr $R1 "$PLUGINSDIR\Dialog_RetrieveLicence.ini" "Field 1" "HWND"
;SetCtlColors  $R1 "0xFF0000" "transparent" 
The text color is red, but the complete background of the dialog becomes grey.

Ist that a bug or a feature or am i missing something here?

Also it seems that the "Welcome Page" does not like $\r$\n for the title, since the german description of Welcome to.... is quite long a $\r$\n has been included but the second line is never displayed.
SuperPat#
can you send an example script showing this problem?


For the problem of the welcome page, try this define:
!define MUI_WELCOMEPAGE_TITLE_3LINES
xbarns#
i tried the "!define MUI_WELCOMEPAGE_TITLE_3LINES" but somehow it didn't work, does it have to be placed somewhere special?


I have attached the dialog and the contents of the function in the Zip File.
xbarns#
This didn't do the trick 🙁

!define MUI_WELCOMEPAGE_TITLE_3LINES
!insertmacro MUI_PAGE_WELCOME