I want to change nsis welcome page default image in welcome screen so i am trying to use following code .But these are showing blank.
CODE:
!define MUI_HEADERIMAGE_BITMAP "${NSISDIR}\Contrib\Graphics\Header\NXP.bmp"
!define MUI_WELCOMEFINISHPAGE_BITMAP "${NSISDIR}\Contrib\Graphics\Wizard\NXP.bmp"
How did you create NXP.bmp?
NSIS doesn't accept all BMP variants. I sometimes need to open and save bmp files with Paint in order to be sure it will be a valid BMP file.
Related
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"
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.
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.
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 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