INNO setup打包的一段界面美化的code端代码





[Code]
var
  DetailList: TNewListBox;
  newFileNameLabel: TNewStaticText;
  LastDir: string;


procedure InitializeWizard();
begin
//界面修改
WizardForm.WizardSmallBitmapImage.left:=426;
WizardForm.taskslist.color:=clWindow;
WizardForm.innerpage.color:=clWindow;
WizardForm.readymemo.color:=clWindow;
WizardForm.PAGENAMELABEL.Font.Color:= clGreen;


WizardForm.PAGEDESCRIPTIONLABEL.Font.Color:= clGreen;
 WizardForm.WelcomeLabel2.Caption := '现在将在你的电脑上安装 {#MyAppName} V{#MyAppVersion} ' + #13#10 +
         + #13#10 +
         '建议你在继续之前关闭所有其它应用程序。' + #13#10 +
         '' + #13#10 +
         '单击“下一步”继续,或单击“取消”退';
WizardForm.WELCOMELABEL1.Font.Color:= clGreen;
WizardForm.WELCOMELABEL1.top:= 31;


WizardForm.WELCOMELABEL2.top:= 91;
WizardForm.Color:= clwindow;
WizardForm.Bevel1.Left:=0;
WizardForm.Bevel1.top:=0;
WizardForm.Bevel1.width:=0;
 WizardForm.Bevel.Left:=0;
WizardForm.Bevel.top:=0;
WizardForm.selectdirbitmapimage.visible:=false;
WizardForm.selectgroupbitmapimage.visible:=false;
WizardForm.selectdirlabel.left:=0;
WizardForm.selectstartmenufolderlabel.left:=0;
WizardForm.Bevel.width:=0;
WizardForm.PageDescriptionLabel.Top:=40;


//页面修改完毕


 


//显示细节
  DetailList:= TNewListBox.Create(WizardForm);
  DetailList.Parent := WizardForm.InstallingPage;
  DetailList.Left := ScaleX(0);
  DetailList.Top := ScaleY(70);
  DetailList.Width := ScaleX(417);
  DetailList.Height := ScaleY(153);
  newFileNameLabel:= TNewStaticText.Create(WizardForm)      // 创建 FileNameLabel 的替代
  newFileNameLabel.Parent := WizardForm.InstallingPage;
  newFileNameLabel.Top := WizardForm.FileNameLabel.Top;
  newFileNameLabel.Left := WizardForm.FileNameLabel.Left;
  newFileNameLabel.Width := WizardForm.FileNameLabel.Width;
  WizardForm.FileNameLabel.Visible := false;               // 隐藏本来的 FileNameLabel


  LastDir:= '';
end;
procedure ChangeDisplay;
var
  dn, fn: string;
  pct: Extended;
begin
  pct := (WizardForm.ProgressGauge.Position-WizardForm.ProgressGauge.Min)/(WizardForm.ProgressGauge.Max-WizardForm.ProgressGauge.Min)*100;
  dn:= ExpandConstant(ExtractFileDir(CurrentFileName));
  fn:= ExtractFileName(CurrentFileName);


  WizardForm.StatusLabel.Caption:= '输出目录: ' + dn;
  newFileNameLabel.Caption:= '抽取: ' + fn + ' (' + IntToStr(Round(pct)) + '% 已完成)';
  if dn <> LastDir then
    begin
      DetailList.Items.Append('输出目录: ' + dn);
      LastDir:= dn;
    end;
  DetailList.Items.Append('抽取: ' + fn + ' (' + IntToStr(Round(pct)) + '% 已完成)');
  DetailList.ItemIndex := DetailList.Items.Count - 1;
end;


//显示细节完毕

你可能感兴趣的:(打包工具)