inno-setup-添加安装类型,维护预定义的安装类型



我想在Inno安装项目中添加一个自己的安装类型,同时保留原始安装类型(Full、Compact和Custom)。问题是,当我创建[Types]部分时,这些安装类型会丢失,我必须重新定义它们。

如果这不可能,好吧,让我们重新定义它们。但是我想使用.isl文件中的原始语言常量。我还没有找到任何选项,如何在Types的Description参数中以[CustomMessage]的方式使用类似[Message]的声明作为常量(例如{cm:LaunchProgram})。有什么选择吗,怎么做?

以下是使用[CustomMessages] 的方法

[CustomMessages]
FullInstall=Full installation
CompactInstall=Compact installation
CustomInstall=Custom installation
[Types]
Name: "full"; Description: "{cm:FullInstall}"
Name: "compact"; Description: "{cm:CompactInstall}"
Name: "custom"; Description: "{cm:CustomInstall}"; Flags: iscustom

以下是如何使用[Messages]值执行此操作。

[Types]
Name: "full"; Description: "{code:FullInstall}"
Name: "compact"; Description: "{code:CompactInstall}"
Name: "custom"; Description: "{code:CustomInstall}"; Flags: iscustom
[Code]
function FullInstall(Param : String) : String;
begin
  result := SetupMessage(msgFullInstallation);
end;
function CustomInstall(Param : String) : String;
begin
  result := SetupMessage(msgCustomInstallation);
end;
function CompactInstall(Param : String) : String;
begin
  result := SetupMessage(msgCompactInstallation);
end;

最新更新