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

Inno setup 添加安装类型,维护预定义的安装类型,inno-setup,Inno Setup,我想将自己的安装类型添加到Inno安装项目中,同时保留原始安装类型(完整、紧凑和自定义)。问题是,当我创建[Types]部分时,这些安装类型丢失,我必须重新定义它们 如果这是不可能的,那么,让我们重新定义它们。但是我想使用.isl文件中的原始语言常量。我还没有找到任何选项,如何在Types的Description参数中以[CustomMessage]方式(例如,{cm:LaunchProgram})使用类似[Message]的声明作为常量。是否有任何选项,如何做到这一点?以下是如何使用[Cust

我想将自己的安装类型添加到Inno安装项目中,同时保留原始安装类型(完整、紧凑和自定义)。问题是,当我创建[Types]部分时,这些安装类型丢失,我必须重新定义它们


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

以下是如何使用
[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;

下面是使用
[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;

是的,这种回调方法可能是唯一的选择,尽管我不喜欢它。但是无论如何还是要感谢:)是的,我同意如果你能有类似
{msg:CustomInstallation}
的东西那就太好了。是的,这种回调方法可能是唯一的选择,尽管我不喜欢它。不过还是要谢谢你:)是的,我同意如果你能有像
{msg:CustomInstallation}