-
-
Save rwilkes/56cc65044d9fd2de39d7d1899b536d0a to your computer and use it in GitHub Desktop.
[InnoSetup] Custom link in installer footer
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#define ProjectURL "http://www.google.fr" | |
[CustomMessages] | |
english.Website=Website | |
[Code] | |
// link in installer footer | |
procedure URLLabelOnClick(Sender: TObject); | |
var | |
ErrorCode: Integer; | |
begin | |
ShellExec('open', '{#ProjectUrl}', '', '', SW_SHOWNORMAL, ewNoWait, ErrorCode); | |
end; | |
procedure InitializeWizard; | |
var | |
URLLabel: TNewStaticText; | |
begin | |
URLLabel := TNewStaticText.Create(WizardForm); | |
URLLabel.Caption := ExpandConstant('{cm:Website}'); | |
URLLabel.Cursor := crHand; | |
URLLabel.OnClick := @URLLabelOnClick; | |
URLLabel.Parent := WizardForm; | |
URLLabel.Font.Style := URLLabel.Font.Style + [fsUnderline]; | |
URLLabel.Font.Color := clBlue; | |
URLLabel.Top := WizardForm.ClientHeight - URLLabel.Height - 15; | |
URLLabel.Left := ScaleX(20); | |
end; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment