有没有办法让Inno设置脚本包含创建自定义页面的代码和外部.isi文件(我使用的是ISSI外接程序)。如果我同时使用这两种方法,我得到的错误消息是"Duplicate Identifier: INITIALIZEWIZARD“,因为(显然)标识符同时出现在我的主脚本和插件中。
这里(不完整!)是我想用来创建自定义页面的代码(我几乎全部取自Inno Setup提供的示例:
procedure CreateTheWizardPages;
var
Page: TWizardPage;
RichEditViewer: TRichEditViewer;
vDosFolder: String;
begin
if RegQueryStringValue(HKEY_CURRENT_USER, 'Software\WPDOS.org','vDosDir', vDosFolder) then
begin
if ((DirExists(vDosFolder + '\62Config')) OR (DirExists(vDosFolder + '\61Config')) OR (DirExists(vDosFolder + '\51Config'))) then
begin
Page := CreateCustomPage(wpInfoBefore, 'Existing installation found', 'Read this message!');
RichEditViewer := TRichEditViewer.Create(Page);
RichEditViewer.Width := Page.SurfaceWidth;
RichEditViewer.Height := Page.SurfaceHeight;
RichEditViewer.Parent := Page.Surface;
RichEditViewer.ScrollBars := ssVertical;
RichEditViewer.UseRichEdit := True;
RichEditViewer.RTFText := '{\rtf1\ansi\ansicpg1252\deff0\deflang1043{\fonttbl{\f0\fswiss\fcharset0 Arial;}}{\colortbl ;\red255\green0\blue0;\red0\green128\blue0;\red0\green0\blue128;}\viewkind4\uc1\pard\f0\fs20 R\cf1 ead\cf2 This\cf3 Message!\cf0\par}';
RichEditViewer.ReadOnly := True;
end;
end;
end;
procedure InitializeWizard();
begin
CreateTheWizardPages;
end;我还想做的(如果可能的话)是让ISSI插件在向导的状态栏上放置一个可点击的链接,但如果我包含以下代码,我会得到错误消息:
[ISSI]
#define ISSI_English
#define ISSI_URL
#define ISSI_URLText
#define ISSI_IncludePath "X:\ISSI"
#include ISSI_IncludePath+"\_issi.isi"此外,当然,自定义消息中的一些行拼写了ISSI应该显示的内容。
如果有什么办法能兼得这两样东西,我将不胜感激。
发布于 2014-10-06 10:39:48
为了让其他想要这样做的人生活更轻松,答案就在这里,尽管有点晦涩难懂:
http://members.home.nl/albartus/inno/ISSI_Functions/ISSI_MyNextButtonClick.htm
总而言之,如果您有一个如下所示的现有部分:
[ISSI]
#define ISSI_English
#define ISSI_URL
#define ISSI_URLText
#define ISSI_IncludePath "X:\ISSI"
#include ISSI_IncludePath+"\_issi.isi"执行以下操作:
(1)在上面所示的ISSI块中添加此行。
#define ISSI_UseMyInitializeWizard(2)。转到Pascal代码的末尾,添加三行代码,包括结束代码块的代码行,如下所示:
[/CODE]
#define ISSI_IncludePath "X:\ISSI"
#include ISSI_IncludePath+"\_issi.isi"从ISSI块中删除最后两行,因为您要在这里添加它们。
(3)然后,在你的代码块中,找到下面的代码行:
procedure InitializeWizard();
...
end;并将这些行的第一行更改为:
procedure ISSI_InitializeWizard(); // ISSI_ added to string问题解决了。我希望这是一个比我在野外发现的更清晰的陈述。
https://stackoverflow.com/questions/26208184
复制相似问题