1
votes

I'd like to add an own installation type into an Inno setup project, while keeping the original ones (Full, Compact and Custom). The problem is, when I create the [Types] section, these installation types are lost and I have to redefine them.

If this is not possible, okay then, let's redefine them. But I'd like to use the original language constants from the .isl files. I haven't found any option, how to use [Message]-like declarations as constants in [CustomMessage] way (e. g. {cm:LaunchProgram}) in the Types' Description parameter. Is there any option, how to do this?

1

1 Answers

1
votes

Here is how you can do it, using [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

Here is how you can do it using [Messages] values.

[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;