Archive: How can I chaneg the MUI's size?


How can I chaneg the MUI's size?
Hello!
I created an installer witch has got lot of sections with longer name. I want to create a new modern.exe, witch larger than original by 100x100px. I modified and recompile the dialog in ResHacker, but I cannot see the changes in the installer, but I can in the modified exe (but I do not know all setting are correct)... I used:

ChangeUI all "${NSISDIR}\Contrib\UIs\${MUI_FILE}"

in my script and

!define MUI_FILE "modernkami.exe"

Here is the modified code of modern.exe called modernkami.exe

105 DIALOGEX 0, 0, 431, 322
STYLE DS_FIXEDSYS | DS_MODALFRAME | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION ""
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
FONT 8, "MS Shell Dlg"
{
CONTROL "", 3, BUTTON, BS_PUSHBUTTON | WS_CHILD | WS_VISIBLE | WS_GROUP | WS_TABSTOP, 266, 301, 50, 14
CONTROL "", 1, BUTTON, BS_PUSHBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 316, 301, 50, 14
CONTROL "", 2, BUTTON, BS_PUSHBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 373, 301, 50, 14
CONTROL "", 1018, STATIC, SS_BLACKRECT | WS_CHILD | WS_GROUP, 15, 45, 400, 240
CONTROL "", 1044, STATIC, SS_BLACKRECT | WS_CHILD | WS_GROUP, 0, 0, 431, 293
CONTROL "", 1035, STATIC, SS_ETCHEDHORZ | WS_CHILD | WS_VISIBLE | WS_GROUP, 5, 293, 421, 1
CONTROL "", 1036, STATIC, SS_ETCHEDHORZ | WS_CHILD | WS_VISIBLE | WS_GROUP, 0, 35, 440, 1
CONTROL "", 1045, STATIC, SS_ETCHEDHORZ | WS_CHILD | WS_GROUP, 0, 293, 440, 1
CONTROL "", 1256, STATIC, SS_LEFT | WS_CHILD | WS_VISIBLE | WS_GROUP, 5, 288, 422, 8
CONTROL "", 1028, STATIC, SS_LEFT | WS_CHILD | WS_VISIBLE | WS_DISABLED | WS_GROUP, 5, 288, 422, 8
CONTROL "", 1034, STATIC, SS_LEFT | WS_CHILD | WS_VISIBLE | WS_GROUP, 0, 0, 432, 35
CONTROL "", 1037, STATIC, SS_LEFT | WS_CHILD | WS_VISIBLE | WS_GROUP, 10, 5, 380, 10
CONTROL "", 1038, STATIC, SS_LEFT | WS_CHILD | WS_VISIBLE | WS_GROUP, 15, 17, 375, 16
CONTROL 103, 1039, STATIC, SS_ICON | WS_CHILD | WS_VISIBLE | WS_GROUP, 400, 8, 21, 20
}



Whats wrong?

Many Thanks:
ACEMCP


The proper way is to define MUI_UI. See the MUI readme for more information about the required value of this define.


Nothing...
Thanks for the lighting fast answer!

I changed the code like this:

!define MUI_UIFILE "modernkami.exe"
!define MUI_UI "${NSISDIR}\Contrib\UIs\${MUI_UIFILE}"

The compiler run without any problem, but I can not see the differences between the old and the new one...

Please, help me!


THX,
ACEMCP


Have you defined it before including the first language file? If so, please attach the script and I will look further into it.


won't work... here is the snippet...
[edit]please attach big scripts, attached below[/edit]


file - modernkami.exe
Here is the modified resource file...


The script seems fine, for b3's MUI. Does it fail when you define MUI_UI with a path that doesn't exist?


Yes its fail:

!define: "MUI_UIFILE"="modernkami.exe"
!define: "MUI_UI"="C:\Program Files\NSIS\Contrib\UIsgygygyggy\modernkami.exe"
!insertmacro: MUI_LANGUAGE
Error: Can't find "all" in "C:\Program Files\NSIS\Contrib\UIsgygygyggy\modernkami.exe"!
Error in macro MUI_INTERFACE on macroline 101
Error in macro MUI_SYSTEM on macroline 15
Error in macro MUI_LANGUAGEFILE_BEGIN on macroline 7
!include: error in script: "C:\Program Files\NSIS\Contrib\Modern UI\Language files\English.nsh" on line 9
Error in macro MUI_LANGUAGE on macroline 6
Error in script "E:\Fejlesztes\ACE Mega CoDecS Pack\ACE Mega CoDecS Pack.nsi" on line 71 -- aborting creation process


Aside from the fact that you didn't resize all of the dialogs but 105 it works fine for me. If it fails when you give it an invalid file, the processing is ok.

Before I recommend you move to the latest CVS version (recommended anyway) tell me if the atteched installer is similar to the result you see with your installer. Is the problem that it doesn't resize the inner dialogs or that it doesn't resize the outer dialog at all and somehow still takes it from modern.exe?


modernkami.exe produce a same screen as unmodified modern.exe. The file what you send me is better, resized outer dialog (inner same - I see I have to resize all) :o)


Are you 100% sure that ${NSISDIR}\Contrib\UIs\modernkami.exe is the right file? Try renaming the file you think it uses and see if it fails to compile. There is absolutely no reason it would somehow fallback to modern.exe.


I tried to remove UIs
then
modern_headerbmp.exe
modern_smalldesc.exe
modernkami.exe

is req for a compile! I did not touch the firs two, so I try to resize that files!

Downloading Lastest CVS...

Any Idea?


Of course, I have missed that :(

If you use MUI_HEADERBITMAP then dialog 105 from modern_headerbmp.exe will be used. You have to either tell it to use another dialog with your own bitmap control, or change modern_headerbmp.exe. Use MUI_UI_HEADERBITMAP to tell which UI it should use for 105 when using MUI_HEADERBITMAP.


Hi!

There was a problem with
modern_headerbmp.exe
modern_smalldesc.exe
I redesigned them, adt they works perfectly! One problem, I want to use finish page and start page, witch is the resource file of these dialogs?

Best Regards,
ACEMCP


It's an InstallOptions page. The resource is actually an INI file. See the MUI readme for more information about changing those.


Now I rewrote all of dialog, then its work successfuly! If you interested in I send you the dialogs, and ini, to review, and for daily usage of course...

Many Thanks,
ACEMCP


If you think other users may find this useful, the best place to put it in public would be the archive.


Finally I added 100x120px to actual sizes... It fit on 800x600 sized desktop, and on 1024x768 if you want a gradient background... I will upload the archive, because for larger installation it provide more than more space...

ACEMCP


Modern UI in Big
Modern UI in Big


The Modern UI includes a components page UI with support for large section names. Did you try the MUI_COMPONENTSPAGE_SMALLDESC setting?


Yes of course, but It is too small to me :o))

Regards,
ACEMCP