2016-07-25 125 views
0

我想向Inno Setup添加名爲SetupMessageID[msgButtonNotify]的新安裝消息ID。向Inno Setup消息添加新的安裝消息ID - 語言文件(.isl)

而且我還需要使用.isl等文件修改文本,例如msgButtonNotify=Notify

如何添加新的安裝消息ID而不會收到任何異常消息?

如果可能的話,我應該在哪裏添加它的源代碼,包括MsgIDs.pas

如何更新MessageHdrIDStruct.pas以添加新的安裝消息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, 加入我的新安裝消息ID在Default.isl,然後編譯項目,並嘗試測試與創新科技編譯安裝程序編譯器,安裝程序加載程序說Message name "ButtonNotify" in Default.isl is not recognized by this version of Inno Setup

爲什麼會發生此異常?

在Inno Setup Compiler的源代碼中添加新的安裝消息ID時是否還有其他任何單元需要更新?

在此先感謝。

+0

你爲什麼要這樣做?你爲什麼不使用'[CustomMessages]'? –

+0

因爲自定義消息沒有一個消息叫做'{cm:ButtonNotify}'。使用'[CustomMessages]'可以添加一個新的自定義消息? – Blueeyes789

+0

喬丹羅素說,添加新的消息ID是可能的,我所示的行。 – Blueeyes789

回答

0

我沒有看到重新編譯Inno Setup以添加新消息的一點。


使用CustomMessages section.isl.iss添加新的消息。

[CustomMessages] 
ButtonNotify=&Notify 

然後使用CustomMessage function(或{cm:...} constant)來加載該消息。

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

Shit ..........即使知道要在腳本中添加大量的代碼,我甚至不知道如何使用內置的[CustomMessages]函數...........我是一個什麼樣的男人...... :( – Blueeyes789