隐藏Inno Setup进度页面中的文件名

时间:2012-10-29 04:31:52

标签: inno-setup

如何从安装进度条上方的标签隐藏或删除正在安装的文件的名称,只留下" ex:install"?

文件正在解压缩时显示。

Screenshot of the Inno Setup installation progress page

LabelCurrFileName.Caption :=
  ExpandConstant('{cm:ExtractedFile} ') + 
  MinimizePathName(
    CurrentFile, LabelCurrFileName.Font, LabelCurrFileName.Width - ScaleX(100));

LabelCurrFileName.Caption := ExpandConstant('{cm:ExtractedFile} ');

1 个答案:

答案 0 :(得分:14)

我认为您要将FilenameLabel标签替换为自定义标签。如何为不同语言指定自定义文本以及如何将其与自定义标签一起使用,而不是FilenameLabel标签,您可以在以下脚本中找到它:

[Languages]
Name: en; MessagesFile: "compiler:Default.isl"
Name: br; MessagesFile: "compiler:Languages\BrazilianPortuguese.isl"

[CustomMessages]
en.InstallingLabel=Installing...
br.InstallingLabel=Instalando...

[Code]

procedure InitializeWizard;
begin
  with TNewStaticText.Create(WizardForm) do
  begin
    Parent := WizardForm.FilenameLabel.Parent;
    Left := WizardForm.FilenameLabel.Left;
    Top := WizardForm.FilenameLabel.Top;
    Width := WizardForm.FilenameLabel.Width;
    Height := WizardForm.FilenameLabel.Height;
    Caption := ExpandConstant('{cm:InstallingLabel}');
  end;
  WizardForm.FilenameLabel.Visible := False;
end;

@MartinPrikryl edit:有关完整的实施,请参阅Inno Setup - How to create a personalized FilenameLabel with the names I want?