Old 14th May 2003, 16:56   #1
Jump_Around
Junior Member
 
Join Date: May 2003
Posts: 4
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"
Jump_Around is offline   Reply With Quote
Old 14th May 2003, 19:46   #2
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
You need to make show page functions like so, and insert the macro into them:
code:

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



This goes for all of your pages.

-Stu
Afrow UK is offline   Reply With Quote
Old 14th May 2003, 19:48   #3
kichik
M.I.A.
[NSIS Dev, Mod]
 
kichik's Avatar
 
Join Date: Oct 2001
Location: Israel
Posts: 11,343
Insert the macro in the pre/show functions of those pages. In the MUI use (for the components page for example):

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



Without the MUI use:

code:
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.

NSIS FAQ | NSIS Home Page | Donate $
"I hear and I forget. I see and I remember. I do and I understand." -- Confucius
kichik 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