Archive: Doing away with the header text and subtext


Doing away with the header text and subtext
Hi,

I've been using NSIS for quite sometime now and its really great.

Of late am using the modern UI and have a couple of urgent issues:

1. How do i do away with the header test/subtext and make my logo itself fill the header section ?

2. How to change the UI for the Welcome and Finish pages (am dumb to understand the .ini thing).

I've gone through the NSIS docs, Modern UI readme and the NSIS archives.

Kindly excuse me if this has been posted and answered before, i just couldn't get at it :-)

thanks,
Sathish


goto your nsis\Contrib\UIs\ directory make a backup of modern_headerbmp.exe then use a program called reshacker
http://www.users.on.net/johnson/resourcehacker/ to edit the modern_headerbmp.exe file strech the bmp control all the way to the right.

then delete controls 1037 and 1038
then make your header bmp the new width is around 500 i think and heres what you get

http://www.emeraldcpu.com/zman3/test1.png


Thanks for the reply.

Also, can i have a different header image for each of
the pages - my req. is to show a "train" Step "1 Of N"
sort of a thing on the images.

Please help me.

Meanwhile i'll try your suggestion and get back to you.

thanks a lot,
Sathish.


It worked !
Am very thankful to you - thanks a lot !!!

Now all thats left for me is to have separate headers for each of my pages, is this possible?

Thanks again.

Sathish.


theres a way to do that with the script i belive but one of the other guys will have to help you with that do a search on changing bmps in the forums ill mess around with it but someone will get back to you before me im sure

EDIT

ok try this
Function .onInit
InitPluginsDir
ReserveFile "bigheadertest1.bmp"
ReserveFile "bigheadertest2.bmp"
FunctionEnd

oh hell ill make a example check here later


well i havent got it to work quite right yet and I have to goto work I get it working sort of with adding a function before each page is defined to set the branding image.


ok this works unless they hit the back button and theres probley some way to fix that too but not sure anyway in the area where you define the pages you want in the installer add a call to a function before defining each page that has a header see mine below

;--------------------------------
;Pages
!define MUI_WELCOMEFINISHPAGE_INI "welcome.ini"
!define MUI_PAGE_CUSTOMFUNCTION_SHOW header1
!insertmacro MUI_PAGE_WELCOME
insertmacro MUI_PAGE_LICENSE "License.rtf"
!define MUI_PAGE_CUSTOMFUNCTION_SHOW header2
!insertmacro MUI_PAGE_COMPONENTS
!define MUI_PAGE_CUSTOMFUNCTION_SHOW header3
!insertmacro MUI_PAGE_DIRECTORY
!define MUI_PAGE_CUSTOMFUNCTION_SHOW InstColor
!insertmacro MUI_PAGE_INSTFILES

;--------------------------------
then have a function for each header so for the first one

Function "header1"
FindWindow $HWND "#32770" "" $HWNDPARENT
SetBrandingImage "E:\SYS_SHIT\NSIS\Examples\Modern UI\forum ui\bigheadertest.bmp"
FunctionEnd

now since for some reason I cant get the
InitPluginsDir command to work to pre extract my header bmps i put the path where they are on my system
"E:\SYS_SHIT\NSIS\Examples\Modern UI\forum ui\bigheadertest.bmp"
however in your installer your going to have to pre extract them somewhere on the users system.

anyway this works fine I have 3 differnt bmps showing in the header one for licence page one for components page one for the select install directory page.