forked from jrsoftware/issrc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdonate.iss
32 lines (29 loc) · 1.04 KB
/
donate.iss
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
[Files]
Source: "donate.bmp"; Flags: dontcopy
[Code]
procedure DonateImageOnClick(Sender: TObject);
var
ErrorCode: Integer;
begin
ShellExecAsOriginalUser('open', 'http://www.jrsoftware.org/isdonate.php', '', '', SW_SHOWNORMAL, ewNoWait, ErrorCode);
end;
<event('InitializeWizard')>
procedure DonateImageInitializeWizard;
var
DonateImageFileName: String;
DonateImage: TBitmapImage;
BevelTop: Integer;
begin
DonateImageFileName := ExpandConstant('{tmp}\donate.bmp');
ExtractTemporaryFile(ExtractFileName(DonateImageFileName));
DonateImage := TBitmapImage.Create(WizardForm);
DonateImage.AutoSize := True;
DonateImage.Bitmap.LoadFromFile(DonateImageFileName);
DonateImage.Anchors := [akLeft, akBottom];
BevelTop := WizardForm.Bevel.Top;
DonateImage.Top := BevelTop + (WizardForm.ClientHeight - BevelTop - DonateImage.Bitmap.Height) div 2;
DonateImage.Left := DonateImage.Top - BevelTop;
DonateImage.Cursor := crHand;
DonateImage.OnClick := @DonateImageOnClick;
DonateImage.Parent := WizardForm;
end;