1

How can I display a custom text area on a progress page in InnoSetup ?

In the following picture I've marked the area which I would like to fill with some text (it wouldn't mind if the progress bar would be moved to bottom and the text area would be placed above it):

The custom message has to be added on the welcome Page !(the first Page) -(Black Circled area)

enter image description here

Raulp
  • 7,758
  • 20
  • 93
  • 155
  • The page from the attached screenshot is the ready page (`wpReady`), but you said there's the welcome page (`wpWelcome`) on the picture and that you want to put some information near "Setup is now ready..." text on progress page, which is I guess the installing page (`wpInstalling`) with progress bar showing the installation progress. All that makes your question really vague. Could you take time and create an image with the proper page with what you want to achieve (it's enough to do it in MS Paint ;-) Thanks! – TLama Mar 21 '14 at 07:37
  • 1
    InnoSetup is not InstallShield. I removed the InstallShield tag, as it's not applicable to this question. – Ken White Mar 21 '14 at 19:27

1 Answers1

9

Sample for Installing Page:

[CustomMessages]
CustomMessage=This is my custom message! Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

[Code]
procedure CurPageChanged(CurPageID: Integer);
var
InstallMessage: TLabel;
begin
  if CurPageID = wpInstalling then begin
    InstallMessage:= TLabel.Create(WizardForm);
    InstallMessage.AutoSize:= False;
    InstallMessage.Top := WizardForm.ProgressGauge.Top + 
     WizardForm.ProgressGauge.Height + ScaleY(8);
    InstallMessage.Height := ScaleY(150);
    InstallMessage.Left := WizardForm.ProgressGauge.Left + ScaleX(0);
    InstallMessage.Width := ScaleX(417);
    InstallMessage.Font:= WizardForm.FilenameLabel.Font;
    InstallMessage.Font.Color:= clBlack;
    InstallMessage.Font.Height:= ScaleY(15);
    InstallMessage.Transparent:= True;
    InstallMessage.WordWrap:= true;
    InstallMessage.Caption:= (ExpandConstant('{cm:CustomMessage}'));
    InstallMessage.Parent:= WizardForm.InstallingPage; 
  end;
end;

Sample for Ready to Install page (simple override):

[Messages] 
ReadyLabel2a=Your Custom Ready Label 2a Message. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. 
ReadyLabel2b=Your Custom Ready Label 2b Message. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.

Sample for Ready to Install page (Custom Message):

[CustomMessages]
CustomMessage=This is my custom message! Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

procedure CurPageChanged(CurPageID: Integer);
var
InstallMessage: TLabel;
begin
  if CurPageID = wpReady then begin
    InstallMessage:= TLabel.Create(WizardForm);
    InstallMessage.AutoSize:= False;
    InstallMessage.Top := WizardForm.ReadyLabel.Top + 
     WizardForm.ReadyLabel.Height + ScaleY(8);
    InstallMessage.Height := ScaleY(150);
    InstallMessage.Left := WizardForm.ReadyLabel.Left + ScaleX(0);
    InstallMessage.Width := ScaleX(417);
    InstallMessage.Font:= WizardForm.ReadyLabel.Font;
    InstallMessage.Font.Color:= clBlack;
    InstallMessage.Font.Height:= ScaleY(15);
    InstallMessage.Transparent:= True;
    InstallMessage.WordWrap:= true;
    InstallMessage.Caption:= (ExpandConstant('{cm:CustomMessage}'));
    InstallMessage.Parent:= WizardForm.ReadyPage; 
  end;
end;
RobeN
  • 5,346
  • 1
  • 33
  • 50
  • edited the Qs.Have to do it for the Welcome page.Cant get it done by changing the wpInstalling to wpWelcome. – Raulp Mar 26 '14 at 09:27
  • 1
    On you picture it is NOT `wpWelcome`, it is `wpReady`. Please make it clear where you want your Custom Message... Here you may just override `ReadyLabel2a` or `ReadyLabel2b` String. `[Messages] ReadyLabel2a=Your Custom Ready Label 2a Message ReadyLabel2b=Your Custom Ready Label 2b Message ` – RobeN Mar 26 '14 at 10:02
  • Yes correct , I followed through default.isl and came to this conclusion that it can be done by overriding the ReadyLabels messages.But I am not able to add any string to it. say ReadyLabel2a = My Custom Message + custom_string_Var .Here no matter what string message I assign to custom_string_Var the ReadyLabel2a message becomes - My Custom Message custom_string_Var .Not able to append the variable message to it. – Raulp Mar 26 '14 at 10:25
  • This is kind of echoing what is being given to ReadyLabel2a and not taking any variable assigned to it. – Raulp Mar 26 '14 at 11:08
  • @Raulp - I have added 3rd part to the solution which creates new `Custom Message` for `wpReady` page. You may either use it as `(ExpandConstant('{cm:CustomMessage}'))` or input there your own text as `'My text' + MyStringVariable + 'My further text'` – RobeN Mar 26 '14 at 11:33