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

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?

Related

NSIS - How can I replace the various bitmaps in the NSIS ultra-modern user interface with my own?

Good Morning,
I have a problem with the naming of the individual bitmaps. What are their names?
The bitmap or icon on the title bar of the windows?
Can I place a Bitmap in the area below the title bar too?
The large bitmap on the left of each page?
How can I replace the NSIS bitmaps with my own in my script?
The same goes for the Uninstall pages, and how do I show Uninstall in the start menu together with Install including the icons?
The installation and uninstallation of my Application run flawlessly, only the damned bitmaps do not work. Can someone help me?
All the defines are listed in the UMUI documentation.
!define UMUI_HEADERBGIMAGE_BMP c:\foo.bmp
!define UMUI_LEFTIMAGE_BMP c:\bar.bmp
# UMUI_UNHEADERBGIMAGE_BMP...
!include "UMUI.nsh"

How to change line spacing of the label text in NSIS?

In every page, the text's line-spacing is too small, how to make it bigger?
you see
I found that if I increase the font size, the line-spacing can be larger, but at the same time, the window size increases too.
That text is displayed by the Windows Static control. I don't see anything in the documented styles that would change the line spacing. There is SS_EDITCONTROL but it does not seem to have any effect on the line spacing:
!include nsDialogs.nsh
!undef __NSD_Label_STYLE
!define __NSD_Label_STYLE ${DEFAULT_STYLES}|${SS_NOTIFY}|${SS_EDITCONTROL}
!undef NSD_CreateLabel
!insertmacro __NSD_DefineControl Label
!include "MUI2.nsh"
...
I believe the Static control uses DrawText to draw the text and it has a DT_EXTERNALLEADING flag that might change the line height but I don't think there is a way to enable the flag.
Without any further information to go on I have to assume that the Static control is the best way to display this kind of text and that Windows is displaying the text correctly.
If you are not running a Chinese version of Windows then you should make sure that you have the appropriate language pack and fonts installed so Windows can use the best available font (Chinese (Simplified) supplemental fonts
& Chinese (Traditional) supplemental fonts). This is especially important on Windows 10 because it removed some of the far east fonts by default.

Inno Setup : Displaying a Bitmap Image in a `NotebookPage` or `NotebookForm`

Hello I made an Inno Setup Script which has a custom uninstaller forms during uninstall of the program.
Those uninstaller forms are created by me according to the way described in this post(question):
Custom Uninstall Page (not MSGBOX).
But creating Custom Forms like that is looking bit bad because there is no way to display any kind of "IMAGE" in those.
I want to display one sameBitmap Image in all of my notebook pages whose displayed after pressing "Yes" to the message box Are you sure....?.
Displaying this in a Notebook Page is very hard.How can I do this?
My Bitmap Image should be in the bottom of the Notebook Page.
An image of the first Notebook Page I created.
Thanks in Advance.
Put the image outside of the notebook and make sure the notebook does not cover the space reserved for the image. This is the way the installer wizard is implemented.
Or just clone the image on all pages.
To add a new image, use TBitmapImage.Create. See for example: inno setup bmp image appear on a single page

Hiding the Hamburger while in shell using template10

Sorry if my query's a bit noobish, a uwp beginner here.
I'm trying to morph the hamburger template from template10 and an existing project of mine. Basically, I'd like to have a certain page with the hamburger menu being invisible, and display my own navigation buttons on the page (an intro page). Upon navigation away to any other page the menu will be visible again.
I tried changing Hamburger's visibility state as an experiment, but it seems to be affecting the content as well. Is what I'm talking about possible with this control and I'm missing something obvious? Or I'd have to manage shell usage in app.xaml and load my intro page without the shell?
Many thanks for the creation of the t10 btw (Jerry, Daren and everyone else), me being confused in this thing doesn't at all diminish my appreciation
There are a few options for you here. IsPaneOpen will only work for you depending on the DisplayMode you choose. But if I were to guess, it's HamburgerMenu,.IsFullScreen that you are really wanting to use here.
You can change the SplitView mode to Inline and set IsPaneOpen to false. That will hide the Pane.

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