开发者

How to replace the default logo in NSIS installer?

I would like to replace the default logo in my NSIS installer (see image below), but I cannot find anything a开发者_开发百科bout this on the internet. Can it be done?

How to replace the default logo in NSIS installer?


For the sake of completion, this is the full code I used to change the logo (using Anders method) and the executable icon (using CharlesB method). Also included MUI2.nsh as mentioned by Yuri Korolov.

!include "MUI2.nsh"

!define MUI_ICON "path\to\icon.ico"
!define MUI_HEADERIMAGE
!define MUI_HEADERIMAGE_BITMAP "path\to\InstallerLogo.bmp"
!define MUI_HEADERIMAGE_RIGHT


put this anywhere in your .nsi (after inclusion of MUI.nsh):

!define MUI_ICON path_to_icon_file.ico


With MakeNSISW 2.3 only type Icon

Icon "MyIcon.ico"

https://nsis.sourceforge.io/Reference/Icon


MUI_ICON changes the .exe icon and that icon is used by default in the MUI header but if you want to use a specific bitmap in the header you can use MUI_HEADERIMAGE/MUI_HEADERIMAGE_BITMAP

You can find all the Modern UI configuration options in the docs


You have to include MUI or MUI2 in order to make it work in your script

!include "MUI2.nsh"

!define MUI_ICON "icon.ico"
!define MUI_HEADERIMAGE
!define MUI_HEADERIMAGE_BITMAP "header.bmp"
!define MUI_HEADERIMAGE_RIGHT
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜