Reputation: 22018
I need to make an Windows installer either with NSIS or InnoSetup. The customer wants an image to be displayed in the installer dialogues/ wizard pages and the image needs to be clickable, e.g. open a browser window when clicked. Is this possible? If yes, is it also possible to use animated gifs?
Upvotes: 6
Views: 781
Reputation: 373
If you want to implement a gif image, you can use this extension:
It's Chinese but the example Inno script shows everything you need.
Upvotes: 2
Reputation: 101636
....and the same thing for NSIS:
!include MUI2.nsh
!define MUI_PAGE_CUSTOMFUNCTION_SHOW MakeClickableWizardImage
!insertmacro MUI_PAGE_WELCOME
!insertmacro MUI_PAGE_INSTFILES
!define MUI_PAGE_CUSTOMFUNCTION_SHOW MakeClickableWizardImage
!insertmacro MUI_PAGE_FINISH
!insertmacro MUI_LANGUAGE English
Function OnWizardClick
ExecShell "" "http://example.com"
FunctionEnd
Function MakeClickableWizardImage
StrCpy $0 $mui.WelcomePage.Image
${If} $mui.FinishPage.Image <> 0
StrCpy $0 $mui.FinishPage.Image
${EndIf}
${NSD_OnClick} $0 OnWizardClick
FunctionEnd
Upvotes: 3
Reputation: 76693
To make the welcome page's left image clickable, you can use the following:
[Code]
procedure OnBannerClick(Sender: TObject);
var
ErrorCode: Integer;
begin
ShellExec('', 'http://www.stackoverflow.com', '', '', SW_SHOW, ewNoWait,
ErrorCode);
end;
procedure InitializeWizard;
begin
WizardForm.WizardBitmapImage.Cursor := crHand;
WizardForm.WizardBitmapImage.OnClick := @OnBannerClick;
end;
Upvotes: 6