Inno setup 如何在进度页上显示自定义文本消息?

Inno setup 如何在进度页上显示自定义文本消息?,inno-setup,Inno Setup,如何在InnoSetup中的进度页上显示自定义文本区域 在下面的图片中,我已经标记了我想用一些文本填充的区域(不介意进度条是否移动到底部,文本区域是否放置在其上方): 自定义消息必须添加到欢迎页面上!(第一页)-(黑色圆圈区域) 安装页面的示例: [CustomMessages] CustomMessage=This is my custom message! Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiu

如何在InnoSetup中的进度页上显示自定义文本区域

在下面的图片中,我已经标记了我想用一些文本填充的区域(不介意进度条是否移动到底部,文本区域是否放置在其上方):

自定义消息必须添加到欢迎页面上!(第一页)-(黑色圆圈区域)


安装页面的示例:

[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;
准备安装页面示例(简单覆盖):

准备安装页面示例(自定义消息):


安装页面的示例:

[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;
准备安装页面示例(简单覆盖):

准备安装页面示例(自定义消息):


所附屏幕截图中的页面是就绪页面(
wpReady
),但您说图片上有欢迎页面(
wprecome
),您想在进度页面上的“安装现在就绪…”文本附近添加一些信息,我想这是安装页面(
wppinstalling
)带有显示安装进度的进度条。所有这些都让你的问题变得很模糊。你能不能花点时间用合适的页面创建一个你想要实现的图像(在MS Paint中就足够了;-)谢谢!InnoSetup不是InstallShield。我删除了InstallShield标签,因为它不适用于此问题。所附屏幕截图中的页面是就绪页面(
wpredy
),但您说图片上有欢迎页面(
wprecome
),您想在进度页面上的“安装程序现在就绪…”文本附近添加一些信息,我猜这就是安装页面(
wppinstalling
),进度条显示安装进度。所有这些都让你的问题变得很模糊。你能不能花点时间用合适的页面创建一个你想要实现的图像(在MS Paint中就足够了;-)谢谢!InnoSetup不是InstallShield。我删除了InstallShield标记,因为它不适用于此问题。编辑了Qs。必须为欢迎页面执行此操作。无法通过将wpInstalling更改为wpWelcome来完成此操作。在您的图片上,它不是
wpWelcome
,而是
wpReady
。请明确您想要自定义邮件的位置。。。您可以在这里重写
ReadyLabel2a
ReadyLabel2b
字符串
[Messages]ReadyLabel2a=您的自定义就绪标签2a Message ReadyLabel2b=您的自定义就绪标签2b Message
正确,我通过default.isl得出结论,可以通过覆盖ReadyLabels消息来完成。但我无法向其中添加任何字符串。假设ReadyLabel2a=My Custom Message+Custom_string_Var。在这里,无论我分配给Custom_string_Var的字符串消息是什么,ReadyLabel2a消息都会变成-My Custom Message Custom_string_Var。无法将变量消息附加到它。这是一种对ReadyLabel2a的回应,而不接受分配给它的任何变量它。@Raulp-我在解决方案中添加了第三部分,为
wpredy
页面创建新的
自定义消息。您可以使用它作为
(ExpandConstant({cm:CustomMessage}')
,或者在那里输入您自己的文本作为
“我的文本”+MyStringVariable+“我的下一个文本”
编辑Qs。必须在欢迎页面上执行此操作。无法通过将wpInstalling更改为wpWelcome来完成此操作。在您的图片上,它不是
wpWelcome
,它是
wpredy
。请明确您想要自定义邮件的位置。。。您可以在这里重写
ReadyLabel2a
ReadyLabel2b
字符串
[Messages]ReadyLabel2a=您的自定义就绪标签2a Message ReadyLabel2b=您的自定义就绪标签2b Message
正确,我通过default.isl得出结论,可以通过覆盖ReadyLabels消息来完成。但我无法向其中添加任何字符串。假设ReadyLabel2a=My Custom Message+Custom_string_Var。在这里,无论我分配给Custom_string_Var的字符串消息是什么,ReadyLabel2a消息都会变成-My Custom Message Custom_string_Var。无法将变量消息附加到它。这是一种对ReadyLabel2a的回应,而不接受分配给它的任何变量它。@Raulp-我在解决方案中添加了第三部分,为
wpredy
页面创建新的
自定义消息。您可以使用它作为
(ExpandConstant({cm:CustomMessage}')
,或者在那里输入您自己的文本作为
“我的文本”+MyStringVariable+“我的进一步文本”
[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;