Skip to content

Commit

Permalink
Add ismail button to Setup.
Browse files Browse the repository at this point in the history
  • Loading branch information
martijnlaan committed Jun 27, 2020
1 parent 7c7b76a commit dc538b8
Show file tree
Hide file tree
Showing 5 changed files with 55 additions and 33 deletions.
32 changes: 0 additions & 32 deletions donate.iss

This file was deleted.

File renamed without changes.
54 changes: 54 additions & 0 deletions isdonateandmail.iss
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
[Files]
Source: "isdonate.bmp"; Flags: dontcopy
Source: "ismail.bmp"; Flags: dontcopy

[Code]
procedure DonateImageOnClick(Sender: TObject);
var
ErrorCode: Integer;
begin
ShellExecAsOriginalUser('open', 'https://jrsoftware.org/isdonate.php', '', '', SW_SHOWNORMAL, ewNoWait, ErrorCode);
end;
procedure MailImageOnClick(Sender: TObject);
var
ErrorCode: Integer;
begin
ShellExecAsOriginalUser('open', 'https://jrsoftware.org/ismail.php', '', '', SW_SHOWNORMAL, ewNoWait, ErrorCode);
end;
<event('InitializeWizard')>
procedure DonateAndMailImagesInitializeWizard;
var
ImageFileName: String;
DonateImage, MailImage: TBitmapImage;
BevelTop: Integer;
begin
ImageFileName := ExpandConstant('{tmp}\isdonate.bmp');
ExtractTemporaryFile(ExtractFileName(ImageFileName));
DonateImage := TBitmapImage.Create(WizardForm);
DonateImage.AutoSize := True;
DonateImage.Bitmap.LoadFromFile(ImageFileName);
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;
ImageFileName := ExpandConstant('{tmp}\ismail.bmp');
ExtractTemporaryFile(ExtractFileName(ImageFileName));
MailImage := TBitmapImage.Create(WizardForm);
MailImage.AutoSize := True;
MailImage.Bitmap.LoadFromFile(ImageFileName);
MailImage.Anchors := [akLeft, akBottom];
BevelTop := WizardForm.Bevel.Top;
MailImage.Top := DonateImage.Top
MailImage.Left := DonateImage.Left + DonateImage.Width + ScaleX(8);
MailImage.Cursor := crHand;
MailImage.OnClick := @MailImageOnClick;
MailImage.Parent := WizardForm;
end;
Binary file added ismail.bmp
Binary file not shown.
2 changes: 1 addition & 1 deletion setup.iss
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
;
; Setup script

#include "donate.iss"
#include "isdonateandmail.iss"

[Setup]
AppName=Inno Setup
Expand Down

0 comments on commit dc538b8

Please sign in to comment.