You must insert the page macros before you insert the language macros. That includes both the installer pages and the uninstaller pages. Notice how many warnings the compiler gives you because of this.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
It was the BMP! But NSIS seems to be very pendant in the format. For the docs (FAQ/WIKI?) this is how to generate a BMP out of any image with ImageMagick suitable for NSIS:
convert -background white -alpha remove -alpha off /path/to/in.img -resize x57 -gravity center -extent 150x57 BMP3:/path/to/out.bmp
Important are -alpha offAFTER-alpha remove and BMP3: directly prepended to the output image filename.
Last edit: Heiko Schäfer 2014-12-17
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
NSIS (Modern UI) will usually just call USER32!LoadImage with the LR_LOADFROMFILE flag so if the image does not load you have to blame Windows. 32bpp ARGB bitmaps are really only supported when they use the v4 or v5 bitmap header IIRC and the static control that is used to display the image can probably only handle ARGB on WinXP+.
If you look at the MSDN documentation for BITMAPV4HEADER you will see this for 32bpp BI_RGB: "The value for blue is in the least significant 8 bits, followed by 8 bits each for green and red. The high byte in each DWORD is not used." Some people probably store alpha data there anyway but it might not always work. You are probably supposed to use 32bpp BI_BITFIELDS so you can set bV4AlphaMask but even this is not officially supported AFAIK.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
It is a miracle for me that there are people out who voluntary LIKE to develop for Winf*ck (sorry). The installer itself is for a port of a Linux program to Windows and I can tell horror stories about my #if _WIN32 uses.
Windows has such a strange and in many points almost unusable API...
My provided command just evaluates the Alpha channel to use the white background and afterward removes it. The final BMP has no more Alpha channel. But interesting was, without BMP3 prepended the Photo Viewer shipped with Win7 displayed the BMP while NSIS not.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The Script
Logged In: YES
user_id=584402
Originator: NO
You must insert the page macros before you insert the language macros. That includes both the installer pages and the uninstaller pages. Notice how many warnings the compiler gives you because of this.
I have the same problem, while I have the language macros BEFORE the pages.
I use 2.46 on Gentoo and the installer shows the image fine on Wine, but not on Win7.
I use a Makefile to prepare all, convert the image to BMP and to call makensis. I've attached both, the Makefile and my script.
Last edit: Heiko Schäfer 2014-12-17
netmaumau.nsi has MUI_LANGUAGE after the page macros which is correct. Could it be a problem with the generated BMP?
It seems you are right. I tested the BMP on another PC and it seemed to be invalid :-O
Maybe I need to re-emerge ImageMagick on my Gentoo, because there it was displayed correct, but also in Wine.
I'l check it and will give feedback.
Last edit: Heiko Schäfer 2014-12-17
It was the BMP! But NSIS seems to be very pendant in the format. For the docs (FAQ/WIKI?) this is how to generate a BMP out of any image with ImageMagick suitable for NSIS:
convert -background white -alpha remove -alpha off /path/to/in.img -resize x57 -gravity center -extent 150x57 BMP3:/path/to/out.bmp
Important are
-alpha off
AFTER-alpha remove
andBMP3:
directly prepended to the output image filename.Last edit: Heiko Schäfer 2014-12-17
NSIS (Modern UI) will usually just call USER32!LoadImage with the LR_LOADFROMFILE flag so if the image does not load you have to blame Windows. 32bpp ARGB bitmaps are really only supported when they use the v4 or v5 bitmap header IIRC and the static control that is used to display the image can probably only handle ARGB on WinXP+.
If you look at the MSDN documentation for BITMAPV4HEADER you will see this for 32bpp BI_RGB: "The value for blue is in the least significant 8 bits, followed by 8 bits each for green and red. The high byte in each DWORD is not used." Some people probably store alpha data there anyway but it might not always work. You are probably supposed to use 32bpp BI_BITFIELDS so you can set bV4AlphaMask but even this is not officially supported AFAIK.
It is a miracle for me that there are people out who voluntary LIKE to develop for Winf*ck (sorry). The installer itself is for a port of a Linux program to Windows and I can tell horror stories about my
#if _WIN32
uses.Windows has such a strange and in many points almost unusable API...
My provided command just evaluates the Alpha channel to use the white background and afterward removes it. The final BMP has no more Alpha channel. But interesting was, without BMP3 prepended the Photo Viewer shipped with Win7 displayed the BMP while NSIS not.