Archive: Error: no branding image found in chosen UI


Error: no branding image found in chosen UI
hi,
I have a problem inserting BrandingImages. I always get the message

SetBrandingImage:
Error: no branding image found in chosen UI!

here's my script. Any Help for me?
Thanks a lot
josue

******************************************************************

[edit by kichik]Please attach large scripts instead of pasting. Attached below :down:[/edit]


As the modern UI macros change the UI it overrides whatever changes you have priorly made to the UI, and that's why NSIS can't find the branding image later on in the script when you try to set it. To make your changes the new UI used my the Modern UI you have to put the AddBrandingImage command after all !insertmacro MUI_LANGAUGE, or !insertmacro MUI_SYSTEM (it's not required anymore).

Another problem in your script is that you specified 98x243 as the size of the image, that's not possible. You only get to specify either the width if the image is on the left or the height if the image is on the top. Plesae remember the size you specify is only a recommended and NSIS will choose the real size (and print it for you in the output) according to some settings. You can play around with the numbers until you get the desired result or just create your own UI which will fit your exact needs as you selected the size manually.

Please also be aware that a bug has been fixed in the latest CVS version related to AddBrandingImage. If you use AddBrandingImage not on the default UI the results will be not exactly what you've been expecting for. You can use NSIS Update to get latest CVS files.


Thanks a lot. But where would you then recommend ma to put the SetBrandingImage Command so that the bmp is resident in all pages. The reference is telling to put it in the .onGUIInit but this is already used in MUI_SYSTEM so that it should ba placed in MUI_CUSTOMGUIINIT. I did so

!define MUI_CUSTOMGUIINIT IBSGUIInit

Function IBSGUIInit
!insertmacro BIMAGE "N:\Office\Grafik\IBS LOGO\BMP\LogoMitSlogan.bmp" ""
FunctionEnd

But now: WHERE TO CALL this Function. All attempts failed until now.


The new define is MUI_CUSTOMFUNCTION_GUIINIT so you can have one for uninstaller too. It should be:

!define MUI_CUSTOMFUNCTION_GUIINIT IBSGUIInit.


OK. But where t call the function IBSGUIInit. In .onInit? That doesnt work (it seems to be ignored there).


The MUI macros will call IBSGUIInit from .onGUIInit.


why than this compiler message:

install function "IBSGUIInit" not referenced - zeroing code (115-121) out

the code segment looks now like

[all stuff of !insertMacro etc.]
[...]

;--------------------------------
;General

OutFile "hoklaUpdate.exe"

;Folder selection page
InstallDir "$PROGRAMFILES\Hotelklassifizierung"

; Platzhalter Grafik
AddBrandingImage Top 100

; Installer Font
SetFont "Arial" 8


!define MUI_CUSTOMGUIINIT IBSGUIInit
!define MUI_CUSTOMFUNCTION_GUIINIT IBSGUIInit

Function IBSGUIInit
!insertmacro BIMAGE "N:\LogoMitSlogan.bmp" ""
FunctionEnd


You have to put the define before any !insertmacro MUI_SYSTEM and !insertmacro MUI_LANGUAGE.


Everything fine. Thanks a lot and greetings from germany.