博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
InnoSetup能够实现“安装细节描述”界面吗?
阅读量:4611 次
发布时间:2019-06-09

本文共 4010 字,大约阅读时间需要 13 分钟。

QUOTE( Example_Test.iss )
// 脚本使用了 增强版脚本编辑器 build 091218:Beta2
// 编译器版本为 5.3.6.ee1 
[Setup]
AppName=My Program
AppVerName=My Program version 1.5
DefaultDirName={pf}\My Program
DefaultGroupName=My Program
UninstallDisplayIcon={app}\MyProg.exe
Compression=lzma
SolidCompression=yes
OutputDir=userdocs:Inno Setup Examples Output
[Files]
Source: "MyProg.exe"; DestDir: "{app}"; BeforeInstall: AddToDetaList;
Source: "MyProg.chm"; DestDir: "{app}"; BeforeInstall: AddToDetaList;
[ISFormDesigner]
WizardForm=FF0A005457495A415244464F524D0030107702000054504630F10B5457697A617264466F726D0A57697A617264466F726D044C656674020003546F7002000C436C69656E744865696768740366010B436C69656E74576964746803EF010D506978656C73506572496E636802600A54657874486569676874020D00F10C544E65774E6F7465626F6F6B0D4F757465724E6F7465626F6F6B00F110544E65774E6F7465626F6F6B5061676509496E6E65725061676500F10C544E65774E6F7465626F6F6B0D496E6E65724E6F7465626F6F6B00F110544E65774E6F7465626F6F6B506167650E496E7374616C6C696E675061676500F302000E544E6577537461746963546578740B5374617475734C6162656C0756697369626C65080000F202010B544E65774C697374426F7808446574614C697374044C656674020003546F70022C05576964746803A1010648656967687403B9000A4974656D486569676874020D085461624F7264657202040756697369626C65080000F302020E544E6577537461746963546578740D46696C656E616D654C6162656C0756697369626C65080000F10F544E657750726F67726573734261720D50726F6772657373476175676503546F70021200000A544E6577427574746F6E0B53686F774465746142746E044C656674020503546F700230055769647468024B0648656967687402160743617074696F6E12080000003E663A79C67E82822800260044002900085461624F72646572020300000E544E65775374617469635465787409446574614C6162656C044C656674020003546F70020005576964746803A101064865696768740210084175746F53697A65080D53686F77416363656C4368617208085461624F72646572020500000000000000
[Code]
procedure ShowDetaBtnOnClick(Sender: TObject); forward;
{ RedesignWizardFormBegin } // 不要删除这一行代码。
// 不要修改这一段代码,它是自动生成的。
var
DetaList: TNewListBox;
ShowDetaBtn: TNewButton;
DetaLabel: TNewStaticText;
procedure RedesignWizardForm;
begin
with WizardForm.StatusLabel do
begin
  Visible := False;
end;
{ DetaList }
DetaList := TNewListBox.Create(WizardForm);
with DetaList do
begin
  Parent := WizardForm.InstallingPage;
  Left := ScaleX(0);
  Top := ScaleY(44);
  Width := ScaleX(417);
  Height := ScaleY(185);
  ItemHeight := 13;
  TabOrder := 4;
  Visible := False;
end;
with WizardForm.FilenameLabel do
begin
  Visible := False;
end;
with WizardForm.ProgressGauge do
begin
  Top := ScaleY(18);
end;
{ ShowDetaBtn }
ShowDetaBtn := TNewButton.Create(WizardForm);
with ShowDetaBtn do
begin
  Parent := WizardForm.InstallingPage;
  Left := ScaleX(5);
  Top := ScaleY(48);
  Width := ScaleX(75);
  Height := ScaleY(22);
  Caption := '显示细节(&D)';
  TabOrder := 3;
end;
{ DetaLabel }
DetaLabel := TNewStaticText.Create(WizardForm);
with DetaLabel do
begin
  Parent := WizardForm.InstallingPage;
  Left := ScaleX(0);
  Top := ScaleY(0);
  Width := ScaleX(417);
  Height := ScaleY(16);
  AutoSize := False;
  ShowAccelChar := False;
  TabOrder := 5;
end;
{ ReservationBegin }
// 这一部分是提供给你的,你可以在这里输入一些补充代码。
ShowDetaBtn.OnClick := @ShowDetaBtnOnClick;
{ ReservationEnd }
end;
// 不要修改这一段代码,它是自动生成的。
{ RedesignWizardFormEnd } // 不要删除这一行代码。
procedure 
InitializeWizard();
begin
RedesignWizardForm;
end;
procedure ShowDetaBtnOnClick(Sender: TObject);
begin
ShowDetaBtn.Visible := False;
DetaList.Visible := True;
end;
procedure AddToDetaList;
begin         
DetaLabel.Caption := '安装: ' + ExpandConstant(CurrentFileName);
DetaList.Items.Append(DetaLabel.Caption); 
//滚动
DetaList.ItemIndex := DetaList.Items.Count - 1;
end;
procedure 
CurPageChanged(CurPageID: Integer);
begin
if CurPageID = wpFinished then
begin
  // 跳回前一页,忽略完成页。 
  DetaList.Items.Append('安装完成'); 
  WizardForm.PageNameLabel.Caption := '安装完成';
  WizardForm.PageDescriptionLabel.Caption := '安装程序已经成功完成安装。';
  DetaLabel.Caption := '完成';
  WizardForm.InnerNotebook.ActivePage := WizardForm.InstallingPage;
  WizardForm.OuterNotebook.ActivePage := WizardForm.InnerPage;
end;
end;

转载于:https://www.cnblogs.com/MaxWoods/p/4178855.html

你可能感兴趣的文章
20171013_数据库新环境后期操作
查看>>
poj 1654 && poj 1675
查看>>
运维派 企业面试题1 监控MySQL主从同步是否异常
查看>>
Docker 版本
查看>>
poj 1753 Flip Game
查看>>
在深信服实习是怎样的体验(研发测试岗)
查看>>
Linux免密码登陆
查看>>
SpringMVC中文件的上传(上传到服务器)和下载问题(二)--------下载
查看>>
Socket & TCP &HTTP
查看>>
osip及eXosip的编译方法
查看>>
Hibernate composite key
查看>>
[CF Round #294 div2] D. A and B and Interesting Substrings 【Map】
查看>>
keepalived+nginx安装配置
查看>>
我的2015---找寻真实的自己
查看>>
android编译遇到问题修改
查看>>
解决Ubuntu18.04.2远程桌面Xrdp登录蓝屏问题
查看>>
python_封装redis_hash方法
查看>>
《windows程序设计》获取窗口尺寸(05)
查看>>
【重点突破】——Canvas技术绘制音乐播放器界面
查看>>
监控级联时各个层的PoE交换机怎么选?
查看>>