1 Star 0 Fork 4

tt56039/Inno Setup

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
isdonateandmail.iss 2.29 KB
一键复制 编辑 原始数据 按行查看 历史
Martijn Laan 提交于 2020-10-01 14:14 . Don't bother if running silently.
// -- IsDonateAndMail.iss --
// Include file which adds donate and subscribe buttons to Setup
//
[Files]
Source: "isdonate.bmp"; Flags: dontcopy
Source: "ismail.bmp"; Flags: dontcopy
[CustomMessages]
; No need to localize: The IS website is in English only
IsDonateAndMailDonateHint=Support Inno Setup - Thank you!
IsDonateAndMailMailHint=Be notified by e-mail of new Inno Setup releases
[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 IsDonateAndMailInitializeWizard;
var
ImageFileName: String;
DonateImage, MailImage: TBitmapImage;
BevelTop: Integer;
begin
if WizardSilent then
Exit;
ImageFileName := ExpandConstant('{tmp}\isdonate.bmp');
ExtractTemporaryFile(ExtractFileName(ImageFileName));
DonateImage := TBitmapImage.Create(WizardForm);
DonateImage.AutoSize := True;
DonateImage.Bitmap.LoadFromFile(ImageFileName);
DonateImage.Hint := CustomMessage('IsDonateAndMailDonateHint');
DonateImage.ShowHint := True;
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.Hint := CustomMessage('IsDonateAndMailMailHint');
MailImage.ShowHint := True;
MailImage.Anchors := [akLeft, akBottom];
MailImage.Top := DonateImage.Top
MailImage.Left := DonateImage.Left + DonateImage.Width + ScaleX(8);
MailImage.Cursor := crHand;
MailImage.OnClick := @MailImageOnClick;
MailImage.Parent := WizardForm;
end;
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/tt56039/issrc.git
git@gitee.com:tt56039/issrc.git
tt56039
issrc
Inno Setup
main

搜索帮助

0d507c66 1850385 C8b1a773 1850385