Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Hide the file names from the Inno Setup progress page

Tags:

inno-setup

How can I hide or remove the names of files being installed from the label above the installation progress bar leaving only "ex: install"?

It appears as the files are being unpacked.

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} ');
like image 441
Marcio Avatar asked Oct 29 '12 04:10

Marcio


1 Answers

I think you want to replace the FilenameLabel label with your custom one. How to specify custom texts for different languages and how to use them with a custom label, that will be placed instead of FilenameLabel label you can find in the following script:

[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: For a complete implementation, see Inno Setup - How to create a personalized FilenameLabel with the names I want?

like image 126
TLama Avatar answered Oct 26 '22 01:10

TLama