将新的安装消息 ID 添加到 Inno 安装消息 - 语言文件 (.isl)



我想将一个名为 SetupMessageID[msgButtonNotify] 的新安装消息 ID 添加到 Inno 安装程序。

而且我还需要可以使用 .isl 文件修改其文本,例如 msgButtonNotify=Notify.

如何在不收到任何异常消息的情况下添加新的安装消息 ID?

如果可能,我应该将其添加到其源代码中的什么位置,包括MsgIDs.pas

如何更新Struct.pas中的MessageHdrID以添加新的安装消息 ID?

因为,乔丹·拉塞尔在MsgIDs.pas上给出了这样的警告: { Note: When any messages are added/deleted/changed, MessagesHdrID needs to be updated in Struct.pas }

我不明白我应该在Struct.pas中更新什么.

Struct.pas中可以看到与此警告相关的行是:

TMessagesHdrID = array[0..63] of AnsiChar;

MessagesHdrID: TMessagesHdrID = 'Inno Setup Messages (5.5.3)'{$IFDEF UNICODE}+' (u)'{$ENDIF};

这些行中应该更新什么?

乔丹·拉塞尔Update那里意味着什么???

我应该增加 AnsiChar 数组的值还是其他任何值?

我问这个是因为当我添加新的安装消息 ID msgButtonNotifyMsgIDs.pas 并将 TMessagesHdrID 的 AnsiChar 数组长度增加到 65 时,在Default.isl中添加我的新安装消息 ID,然后编译项目并尝试使用 Inno 安装程序编译器进行测试编译,安装加载程序说Message name "ButtonNotify" in Default.isl is not recognized by this version of Inno Setup

为什么会出现此异常?

在Inno 安装程序编译器的源代码中添加新的安装消息ID时,我是否需要更新任何其他单元?

提前谢谢。

我没有看到重新编译Inno安装程序以添加新消息的意义。


使用.isl.iss中的CustomMessages部分添加新消息。

[CustomMessages]
ButtonNotify=&Notify

然后使用 CustomMessage 函数(或 {cm:...} 常量(加载消息。

procedure InitializeWizard();
var
  NotifyButton: TNewButton;
begin
  NotifyButton := TNewButton.Create(WizardForm);
  NotifyButton.Parent := WizardForm;
  NotifyButton.Caption := CustomMessage('ButtonNotify');
  ...
end;

相关内容

最新更新