How to change Progress bar length in MUI instfiles page and arrange button position? - nsis

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...

Related

NSIS invisible header text

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.

How to resize the list box of sections in NSIS MUI_PAGE_INSTFILES

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 :)

Back Button gets hidden in choose StartMenu Page for NSIS - Ultra Modern UI

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 ?

NSIS - How display a static sidebar image by extending the dialog

I hope someone out there can help me with my little problem. Currently, i work on a installer based on NSIS. I know, there is a sidebar image that i can set for welcome and finish page, but i want a sidebar image which is shown the whole time during i switch the pages. The size of the pages shouldnt change, but the dialog must be, for example 92px, bigger in the width to display the image.
My question is, how can i achieve this? By custom pages? A little example would be very nice!
Thanks a lot.
The sidebar on the welcome and finish pages come from the Modern UI scripts that are part of the NSIS install but it only supports a small header image for the other pages. If you want the sidebar on all pages you have to use something other than the MUI.
Creating your own version is not that hard:
InstallDir "$Temp\Example"
AddBrandingImage left 150 2 ; Reserve some space in the UI
LicenseData "${__FILE__}"
Page License
Page Components
Page Directory
Page InstFiles
Function .onGuiInit
InitPluginsDir
File "/oname=$PluginsDir\Wizard.bmp" "${NSISDIR}\Contrib\Graphics\Wizard\win.bmp"
SetBrandingImage /resizetofit "$PluginsDir\Wizard.bmp"
FunctionEnd
Section Hello
SectionEnd
Section World
SectionEnd
Depending on the size of your image, this might be all you need, if not then you would have to use Resource Hacker on one of the files in %NSIS%\Contrib\UIs and then use ChangeUI in your script.
Have you taken a look at some of the 3rd-party NSIS UIs that have been created? InstallSpiderUI perhaps?

How to put background on the top for internal pages of installer

How can I put the background image to the top of internal installer page, so it takes all header area.
In solution below background takes only left side of the header
!define MUI_HEADERIMAGE
!define MUI_HEADERIMAGE_BITMAP "top.bmp"
!include "MUI2.nsh"
You can't do this without modifying a UI executable. See the MUI 2 docs, specifically the MUI_UI definition. You'd need to take the default executable and with a resource hacker change the size of that header image.
You may also be able to swing this with resource hacking and the value of MUI_UI_HEADERIMAGE (see those docs). I'm not sure, though, as I've never tried it.
I have found the answer
!define MUI_HEADERIMAGE_BITMAP_NOSTRETCH

Resources