Archive: Branding Images not in modern.exes included with NSIS?


Branding Images not in modern.exes included with NSIS?
I'm trying to add a branding image. On the left side would be preferable. I just can't seem to figure out how to make this happen. The closest I have gotten is:

!define MUI_UI "${NSISDIR}\Contrib\UIs\modern.exe"
!define MUI_CUSTOMFUNCTION_ONGUIINIT .ownGuiInit
Function .ownGUIInit
File logo.bmp
SetBrandingImage logo.bmp
!insertmacro MUI_GUIINIT
FunctionEnd

The error i get when compiling is:

Function: ".ownGUIInit"
File: "logo.bmp" [compress] 35231/107576 bytes
SetBrandingImage:
Error: no branding image found in chosen UI!

Can someone tell me what I'm doing wrong? It seems that maybe the modern.exe doesnt have ability to use a branding image?! If so, can someone show me where to get ones that do?

Thanks


You have to first add a branding image placer in the UI. To do that, open up modern.exe (or any other UI you are using) with a resource editing program such as Resource Hacker, open dialog number 105, (in Resource Hacker) right click the dialog preview you get, choose Insert control (Ctrl + I), then choose bitmap (the icon with the tree) and place it wherever you want in the dialog. Save it as, lets say, modern_branding.exe and use that (!define MUI_UI modern_branding.exe). Only then your script will work. It only sets the branding image if it has somewhere to set it at.