I want to add a new Setup Message ID named SetupMessageID[msgButtonNotify]
to Inno Setup.
And I also need its text to be modifiable using .isl Files like msgButtonNotify=Notify
.
How can I add a new Setup Message ID without getting any Exception Message?
If it is possible, where should I add it in its Source Code including MsgIDs.pas
?
How can I update MessageHdrID
in Struct.pas
to add a new Setup Message ID?
Because, Jordan Russel gives this warning on MsgIDs.pas
: { Note: When any messages are added/deleted/changed, MessagesHdrID needs to be updated in Struct.pas }
I can't understand what should I update in Struct.pas
.
The lines whose related to this warning can bee seen in Struct.pas
are:
TMessagesHdrID = array[0..63] of AnsiChar;
and
MessagesHdrID: TMessagesHdrID = 'Inno Setup Messages (5.5.3)'{$IFDEF UNICODE}+' (u)'{$ENDIF};
What should be updated in those lines?
What Jordan Russel means Update
there???
Should I increase the value of the AnsiChar Array or anything else?
I ask this because when I adding new Setup Message ID called msgButtonNotify
to MsgIDs.pas
and increasing TMessagesHdrID
's AnsiChar Array Length to 65,
adding my new Setup Message ID in Default.isl
, then compiling project and try a testing Compile with Inno Setup Compiler, Setup Loader says Message name "ButtonNotify" in Default.isl is not recognized by this version of Inno Setup
.
Why this Exception is occurring?
Are there any other Unit I have to update when adding a new Setup Message ID in Inno Setup Compiler's Source Code?
Thanks in Advance.
I do not see a point of recompiling Inno Setup to add a new message.
Use the CustomMessages
section in the .isl
or the .iss
to add new messages.
[CustomMessages]
ButtonNotify=&Notify
And then use the CustomMessage
function (or the {cm:...}
constant) to load the message.
procedure InitializeWizard();
var
NotifyButton: TNewButton;
begin
NotifyButton := TNewButton.Create(WizardForm);
NotifyButton.Parent := WizardForm;
NotifyButton.Caption := CustomMessage('ButtonNotify');
...
end;