Filename: "{app}\program.exe"; Parameters: -d; \
StatusMsg: "How to put line break after this sentence? This sentence should be on new line."; \
Flags: runascurrentuser;
我试过了+ #13#10 +
,%n
但他们没有用。
Filename: "{app}\program.exe"; Parameters: -d; \
StatusMsg: "How to put line break after this sentence? This sentence should be on new line."; \
Flags: runascurrentuser;
我试过了+ #13#10 +
,%n
但他们没有用。
状态消息行只有一行(因此虽然您可以在消息中插入新行,但不会显示第二行)。
第二行是为文件名保留的(安装文件时)。
您可以像这样滥用文件名行:
[Run]
Filename: "{app}\program.exe"; Parameters: "-d"; \
StatusMsg: "How to put line break after this sentence?"; Flags: runascurrentuser; \
BeforeInstall: SetFileName('This sentence should be on new line.'); \
AfterInstall: SetFileName('')
[Code]
procedure SetFileName(FileName: string);
begin
WizardForm.FilenameLabel.Caption := FileName;
end;
另一个(更复杂的)选项是暂时使状态行更高(多行)。
此代码有效:
Filename: "{app}\program.exe"; Parameters: -d; StatusMsg: "How to put line break after this sentence?%nThis sentence should be on new line."; Flags: runascurrentuser;
我添加了%n作为换行符。但请记住 - 您的应用程序Program.exe必须支持此符号并将其识别为新行(该符号是从 Inno Setup 正确传递的)。