Archive: Adding label to MUI_PAGE_INSTFILES


Adding label to MUI_PAGE_INSTFILES
Hi all
Please help - I am quite desperate
I understood the nice example on the nsis site for adding a link to the welcome page:

http://nsis.sourceforge.net/Add_link_to_welcome_page_(MUI)

But I need to add a label to the installation_page!!!

The label has to be dynamic - once the installer will get to a certain point it should change its text.

I couldn't find any documntation for that.
Can anyone help me with that?
Thanks a Million
Danny


(Attached is the code for the example if you don't want to click the link)






!include "MUI.nsh"

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

Outfile linkexample.exe

;--------------------------------
;Pages

!define MUI_PAGE_CUSTOMFUNCTION_PRE WelcomePageSetupLinkPre
!define MUI_PAGE_CUSTOMFUNCTION_SHOW WelcomePageSetupLinkShow
!insertmacro MUI_PAGE_WELCOME
!insertmacro MUI_PAGE_COMPONENTS
!insertmacro MUI_PAGE_INSTFILES

Section "secDummy"
; ...
SectionEnd


Function WelcomePageSetupLinkPre
!insertmacro MUI_INSTALLOPTIONS_WRITE "ioSpecial.ini" "Settings" "Numfields" "4" ; increase counter
!insertmacro MUI_INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 3" "Bottom" "122" ; limit size of the upper label
!insertmacro MUI_INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 4" "Type" "Link"
!insertmacro MUI_INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 4" "Text" "http://www.google.ch/"
!insertmacro MUI_INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 4" "Left" "120"
!insertmacro MUI_INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 4" "Right" "315"
!insertmacro MUI_INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 4" "Top" "123"
!insertmacro MUI_INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 4" "Bottom" "132"
FunctionEnd

Function WelcomePageSetupLinkShow
; Thanks to pengyou
; Fix colors of added link control
; See http://forums.winamp.com/showthread....hreadid=205674
Push $0

GetDlgItem $0 $MUI_HWND 1203
SetCtlColors $0 "0000FF" "FFFFFF"
; underline font
CreateFont $1 "$(^Font)" "$(^FontSize)" "400" /UNDERLINE
SendMessage $0 ${WM_SETFONT} $1 1
Pop $0

FunctionEnd

;--------------------------------
;Languages

!insertmacro MUI_LANGUAGE "English"


The InstFiles page is not an InstallOptions page unlike the Welcome and Finish pages. You must edit the resource executable with Resource Hacker. The resource executables are under Contrib\UIs (modern.exe).

Stu


Will there be any other way to do this in the future? Maybe in next version of MUI?


What is the resource hacker?
Do I need another installation


http://angusj.com/resourcehacker/

Stu


You could also add labels and other controls at run time by calling CreateWindow/CreateWindowEx with the System plug-in.

Stu


Thanks man
The Hacker seems like a nice tool but I am having difficulties to associate the dialog numbers to the pages.
Reading the manual didn't help much
Did you use it before?
Danny