Actually I´m trying to change my component size of the MUI2 Components of the following pages:
!insertmacro MUI_PAGE_LICENSE
!insertmacro MUI_PAGE_COMPONENTS
!insertmacro MUI_PAGE_DIRECTORY
!insertmacro MUI_PAGE_INSTFILES
!insertmacro MUI_PAGE_FINISH
I did add also the Customfunction to change the size of each window, with the nsResize Plug-In. Now i have the problem that the Components are missplaced and to small, in width and height.
I searched for it and did find some ideas for my question. But i do not want to use the resourcehacker to create the UI new, for several personal reasons. The i saw that i can use the System Plug-In to make the adjustments, but it´s overhelming me with the information Source.
Then I tried to execute it my self and failed.
My actual Solution is:
Function .myGuiInt
System::Call "user32::GetClientRect(i #32770 , i r1)"
System::Call "user32::SetWindowPos(i 1000, i, i, i 15000, i, i)"
....
FunctionEnd
I tried to change the size of the textbox where i set the license.
But i got no effect, how can i make this calls that i can effect the UI?
The easy solution for the components page is to !define MUI_COMPONENTSPAGE_SMALLDESC or MUI_COMPONENTSPAGE_NODESC, this will make the components list larger.
If this is not large enough then the absolute best solution is to create your own UI. You will have to use Resource Hacker or some other .EXE editor to do this but it is a one time operation, you do not have to redistribute the editor, just the produced UI file along with your .NSI if other people also need to compile your installer. Take ...NSIS\Contrib\UIs\modern.exe and edit it to suit your needs and then apply it with MUI_UI (or ChangeUI for classic installers).
The advantage of this is that you will be working with dialog units, not pixels and there are also no programming skills required.
The final option is to do it at run time. This means that you will be working in pixels most of the time so you should not really hardcode any sizes. To use the System plug-in you have to be familiar with Win32 programming. Knowing C/C++ or some other low-level programming language also helps.
!include MUI2.nsh
!insertmacro MUI_PAGE_WELCOME
!define MUI_COMPONENTSPAGE_NODESC
!define MUI_PAGE_CUSTOMFUNCTION_SHOW fullsize_tweak_components_page
!insertmacro MUI_PAGE_COMPONENTS
!insertmacro MUI_PAGE_INSTFILES
!insertmacro MUI_LANGUAGE "English"
!define /ifndef SWP_NOZORDER 4
!define /ifndef SWP_NOACTIVATE 0x10
Function fullsize_tweak_components_page
System::Call 'USER32::GetClientRect(p $mui.ComponentsPage, # r0)' ; Get the size of the inner dialog
System::Call '*$0(i,i,i.r3,i.r4)' ; Extract the right and bottom members from RECT
System::Call 'USER32::SetWindowPos(p $mui.ComponentsPage.Components, p 0, i 0, i 0, i $3, i $4, i ${SWP_NOZORDER}|${SWP_NOACTIVATE})' ; Resize the components list
FunctionEnd
Header text in license window is invisible. After I click I Agree button and Back button text appears.
!define MUI_HEADERIMAGE
!define MUI_HEADERIMAGE_BITMAP "MY\IMAGE.bmp"
!define MUI_HEADERIMAGE_BITMAP_NOSTRETCH
I use WelcomeFinish.nsi
How can I solve this?
Had to use Resource Hacker to change the order of elements on exe template.
I want to change the basic style of the Install Files page of NSIS.
Currently it shows a list box of sections and i want that the width of this listbox will change automatically according to it's content.
And maybe to remove the other empty listbox as shown in the image below.
thanks.
I'm using MUI2 and there is the code:
page components
!define MUI_PAGE_CUSTOMFUNCTION_SHOW InstFilesShow
!insertmacro MUI_PAGE_INSTFILES
http://i.stack.imgur.com/T3VD5.png
it happens because of this use
page components
i changed to this and added the
**!define MUI_COMPONENTSPAGE_NODESC**
!define MUI_COMPONENTSPAGE
!insertmacro MUI_PAGE_COMPONENTS
it works :)
I have pages lined up like this:
!define MUI_PAGE_CUSTOMFUNCTION_PRE PageCheck ;Hiding Welcome Page if needed
!insertmacro MUI_PAGE_WELCOME
Page custom ChooseDirAndOverWrite ChooseDirAndOverWriteLeave
!define MUI_STARTMENUPAGE_NODISABLE
!define MUI_STARTMENUPAGE_DEFAULTFOLDER $StartMenuDefault
!insertmacro UMUI_PAGE_ALTERNATIVESTARTMENU "Application" $StartMenuFolder
!insertmacro UMUI_PAGE_CONFIRM
When I reach the screen "choose Startmenu folder", which is !insertmacro UMUI_PAGE_ALTERNATIVESTARTMENU "Application" $StartMenuFolder, the Back button is visible for a split second and then gets hidden, only on first time.
On clicking next, then coming back, the Button is enabled there onwards.
What may be causing this behaviour, and where can I get it corrected ?
Also, I read that Ultra Modern UI StartMenu Page does not have a Show Function. Is there a work around for it ?
I'm using the MUI Page INSTFILES in my Installer and I want to change the length of the Progress bar and the Position of the "Show Details" Button in it.
Is this possible still using the MUI Page or do I have to make my own custom Page with nsDialogs?
You can use Resource Hacker to edit ${NSISDIR}\Contrib\UIs\modern.exe and then use this new UI resource:
!define MUI_UI myNewUI.exe
!include MUI2.nsh
...
The other alternative is to call SetWindowPos or MoveWindow with the system plugin at run-time but this is a bit harder to do...