Archive: Add branding image question


Add branding image question
I got a macro for addinf the image, and I can add an image perfectly but only to my sections I have created, but how to add the image into
the default pages choosing options to install and choosing the directory?

Please help

!macro BIMAGE IMAGE PARMS
Push $0
GetTempFileName $0
File /oname=$0 "${IMAGE}"
SetBrandingImage ${PARMS} $0
Delete $0
Pop $0
!macroend
;--------------------------------

!define ApplName "Appl"

; The name of the installer
Name "${ApplName}"

; The file to write
OutFile "Appl.exe"

; The default installation directory
InstallDir $PROGRAMFILES\${ApplName}



; Registry key to check for directory (so if you install again, it will
; overwrite the old one automatically)
InstallDirRegKey HKLM SOFTWARE\${ApplName} "Install_Dir"

; The text to prompt the user to enter a directory
ComponentText "Appl instalator choose the option you want to be installed."

; The text to prompt the user to enter a directory
DirText "Choose directory"


You need to make show page functions like so, and insert the macro into them:


Page Components "" "ComponentsFunc"
Function "ComponentsFunc"
!insertmacro BIMAGE "${NSISDIR}\pics\tmp1.bmp" "/RESIZETOFIT"
FunctionEnd


This goes for all of your pages.

-Stu

Insert the macro in the pre/show functions of those pages. In the MUI use (for the components page for example):

!define MUI_CUSTOMFUNCTION_COMPONENTS_SHOW myCompsShow
Function myCompsShow
!insertmacro ...
FunctionEnd


Without the MUI use:

Page components "" myCompsPre
# same function as above


You might also want to set the first image in .onGUIInit so the place holder won't stay empty.