将新的设置消息 ID 添加到 Inno 设置消息 - 语言文件 (.isl)
Add a new Setup Message ID to Inno Setup Messages - Language Files (.isl)
我想将名为 SetupMessageID[msgButtonNotify]
的新设置消息 ID 添加到 Inno Setup。
而且我还需要它的文本可以使用 .isl 文件进行修改,例如 msgButtonNotify=Notify
。
如何在不收到任何异常消息的情况下添加新的设置消息 ID?
如果可能的话,我应该把它添加到源代码中的什么地方,包括 MsgIDs.pas
?
如何更新 Struct.pas
中的 MessageHdrID
以添加新的设置消息 ID?
因为,Jordan Russel 在 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};
这些行中应该更新什么?
Jordan Russel 是什么意思Update
???
我应该增加 AnsiChar 数组的值还是其他值?
我问这个是因为当我将名为 msgButtonNotify
的新设置消息 ID 添加到 MsgIDs.pas
并将 TMessagesHdrID
的 AnsiChar 数组长度增加到 65 时,
在 Default.isl
中添加我的新设置消息 ID,然后编译项目并尝试使用 Inno Setup 编译器进行测试编译,安装加载程序显示 Message name "ButtonNotify" in Default.isl is not recognized by this version of Inno Setup
.
为什么会出现这个异常?
在 Inno Setup Compiler 的源代码中添加新的 Setup Message ID 时,是否需要更新任何其他单元?
提前致谢。
我没有看到重新编译 Inno Setup 以添加新消息的意义。
使用 .isl
或 .iss
中的 CustomMessages
section 添加新消息。
[CustomMessages]
ButtonNotify=&Notify
然后使用CustomMessage
function (or the {cm:...}
constant)加载消息。
procedure InitializeWizard();
var
NotifyButton: TNewButton;
begin
NotifyButton := TNewButton.Create(WizardForm);
NotifyButton.Parent := WizardForm;
NotifyButton.Caption := CustomMessage('ButtonNotify');
...
end;
我想将名为 SetupMessageID[msgButtonNotify]
的新设置消息 ID 添加到 Inno Setup。
而且我还需要它的文本可以使用 .isl 文件进行修改,例如 msgButtonNotify=Notify
。
如何在不收到任何异常消息的情况下添加新的设置消息 ID?
如果可能的话,我应该把它添加到源代码中的什么地方,包括 MsgIDs.pas
?
如何更新 Struct.pas
中的 MessageHdrID
以添加新的设置消息 ID?
因为,Jordan Russel 在 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};
这些行中应该更新什么?
Jordan Russel 是什么意思Update
???
我应该增加 AnsiChar 数组的值还是其他值?
我问这个是因为当我将名为 msgButtonNotify
的新设置消息 ID 添加到 MsgIDs.pas
并将 TMessagesHdrID
的 AnsiChar 数组长度增加到 65 时,
在 Default.isl
中添加我的新设置消息 ID,然后编译项目并尝试使用 Inno Setup 编译器进行测试编译,安装加载程序显示 Message name "ButtonNotify" in Default.isl is not recognized by this version of Inno Setup
.
为什么会出现这个异常?
在 Inno Setup Compiler 的源代码中添加新的 Setup Message ID 时,是否需要更新任何其他单元?
提前致谢。
我没有看到重新编译 Inno Setup 以添加新消息的意义。
使用 .isl
或 .iss
中的 CustomMessages
section 添加新消息。
[CustomMessages]
ButtonNotify=&Notify
然后使用CustomMessage
function (or the {cm:...}
constant)加载消息。
procedure InitializeWizard();
var
NotifyButton: TNewButton;
begin
NotifyButton := TNewButton.Create(WizardForm);
NotifyButton.Parent := WizardForm;
NotifyButton.Caption := CustomMessage('ButtonNotify');
...
end;