Old 13th April 2015, 07:04   #1
albercuba
Junior Member
 
Join Date: Apr 2015
Posts: 2
MUI_HEADERIMAGE_BITMAP not working

Hello everyone.

I am trying to insert my custom images in the installer and I create a 150x57 pixels image (nsis.bmp) to use as MUI_HEADERIMAGE_BITMAP and it does not work. I also create a 164x314 pixels image (win.bmp) for MUI_WELCOMEFINISHPAGE_BITMAP and it does not work either.

I know the configuration file is ok because if I use an old image that came with the installer I can see it, but if I replace it it does not work.

I create the images with GIMP in Linux.

I use RGB.

this are my lines

-------------------------------------------------

;Modern UI Configuration

Name "${PRODUCT_NAME} ${OPENVPN_VERSION}"

!define MUI_COMPONENTSPAGE_SMALLDESC
!define MUI_FINISHPAGE_NOAUTOCLOSE
!define MUI_FINISHPAGE_SHOWREADME_NOTCHECKED
!define MUI_ABORTWARNING
!define MUI_ICON "${HOME}\openvpn.ico"
!define MUI_UNICON "${HOME}\openvpn.ico"
!define MUI_HEADERIMAGE
!define MUI_HEADERIMAGE_UNBITMAP "${HOME}\nsis.bmp"
!define MUI_HEADERIMAGE_BITMAP "${HOME}\nsis.bmp"
!define MUI_HEADERIMAGE_RIGHT
!define MUI_WELCOMEFINISHPAGE_BITMAP "${HOME}\win.bmp"
!define MUI_UNWELCOMEFINISHPAGE_BITMAP "${HOME}\win.bmp"
!define MUI_UNFINISHPAGE_NOAUTOCLOSE

and a bit further down I have:

ReserveFile "${HOME}\win.bmp"

Can anyone help me?

Thanks
albercuba is offline   Reply With Quote
Old 13th April 2015, 07:56   #2
albercuba
Junior Member
 
Join Date: Apr 2015
Posts: 2
Solved. Just had to change the color palette to 256 colors
albercuba is offline   Reply With Quote
Old 13th April 2015, 15:43   #3
Anders
Moderator
 
Anders's Avatar
 
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 4,507
The MUI uses the LoadImage Windows function. I'm guessing a 24bpp should work but you need to save it in the correct BMP format. It is not unusual for *nix tools to save BMPs in a undocumented BMP version that Windows is not always compatible with. Choose the Windows v3.x format (BITMAPCOREHEADER or BITMAPINFOHEADER) if possible...

IntOp $PostCount $PostCount + 1
Anders is offline   Reply With Quote
Old 14th June 2017, 10:07   #4
dothebart
Junior Member
 
Join Date: May 2017
Posts: 6
Talking Creating the file using Imagemagic...

According to
http://www.imagemagick.org/discourse...ic.php?t=22728

Imagemagic produces the correct file format for this if you prefix the filename with "BMP2:"

Which created a file for me that would display.
dothebart is offline   Reply With Quote
Reply
Go Back   Winamp & SHOUTcast Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump