为什么ShouldSkipPage过程可用于WelcomePage?

问题描述 投票:0回答:1

在Inno Setup帮助中,以下内容为:enter image description here

我编写此代码:

  [Setup]
    AppName=My Program
    AppVersion=1.5
    DefaultDirName={pf}\My Program
    DefaultGroupName=My Program
    UninstallDisplayIcon={app}\MyProg.exe
    Compression=lzma2
    SolidCompression=yes
    OutputDir=userdocs:Inno Setup Examples Output

    [Files]
    Source: "MyProg.exe"; DestDir: "{app}"
    Source: "MyProg.chm"; DestDir: "{app}"
    Source: "Readme.txt"; DestDir: "{app}"; Flags: isreadme

    [Icons]
    Name: "{group}\My Program"; Filename: "{app}\MyProg.exe"

    [code]
    function ShouldSkipPage(PageID: Integer): Boolean;
    begin
     if PageID = 1 then
       Result := True;
    end;

然后我按F7键进入单步模式,我看到的是应立即调用ShouldSkipPage,PageId为1,结果为True,结果实际上跳过了WelcomePage。我已经阅读过有关此过程的类似文章,并且它被多次调用等等,但我仍然不明白。看起来帮助是错误的。是否有人肯定知道此过程的工作原理,以及为什么忽略了帮助信息而将其作为WelcomePage调用的原因?

inno-setup skip
1个回答
0
投票
[Up-to-date documentation未列出wpWelcome

function ShouldSkipPage(PageID: Integer): Boolean;

该向导调用此事件函数来确定是否应完全显示特定页面(由PageID指定)。如果返回True,则页面将被跳过;如果返回False,则可能会显示该页面。

注意:wpPreparing和wpInstalling页面,以及安装程序已经确定的页面都不应跳过此事件函数(例如,不包含任何组件的安装中的wpSelectComponents。)>


根据version history,在5.3.9(2010-04-10)中已更改:

添加了新的[Setup]节指令:DisableWelcomePage隐藏“欢迎向导”页面。 Aero向导指南建议这样做。

此外,ShouldSkipPage事件函数现在也被称为wpWelcome


实际上,当前版本的Inno Setup根本不显示该页面默认值。参见Welcome page not showing, SelectDir page is showing first instead
© www.soinside.com 2019 - 2024. All rights reserved.