为什么 ShouldSkipPage 过程适用于 WelcomePage?
Why does the ShouldSkipPage procedure work for the WelcomePage?
在Inno Setup Help中写下了:
我写这段代码:
[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 吗?
Up-to-date documentation不列出wpWelcome
:
function ShouldSkipPage(PageID: Integer): Boolean;
The wizard calls this event function to determine whether or not a particular page (specified by PageID) should be shown at all. If you return True, the page will be skipped; if you return False, the page may be shown.
Note: This event function isn't called for the wpPreparing, and wpInstalling pages, nor for pages that Setup has already determined should be skipped (for example, wpSelectComponents in an install containing no components).
根据 version history,这在 5.3.9 (2010-04-10) 中已更改:
Added new [Setup] section directive: DisableWelcomePage
to hide the Welcome wizard page. Doing so is recommended by the Aero wizard guidelines. Additionally, the ShouldSkipPage
event function is now also called for wpWelcome
.
实际上,当前版本的 Inno Setup 根本不显示该页面默认值。
参见
在Inno Setup Help中写下了:
我写这段代码:
[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 吗?
Up-to-date documentation不列出wpWelcome
:
function ShouldSkipPage(PageID: Integer): Boolean;
The wizard calls this event function to determine whether or not a particular page (specified by PageID) should be shown at all. If you return True, the page will be skipped; if you return False, the page may be shown.
Note: This event function isn't called for the wpPreparing, and wpInstalling pages, nor for pages that Setup has already determined should be skipped (for example, wpSelectComponents in an install containing no components).
根据 version history,这在 5.3.9 (2010-04-10) 中已更改:
Added new [Setup] section directive:
DisableWelcomePage
to hide the Welcome wizard page. Doing so is recommended by the Aero wizard guidelines. Additionally, theShouldSkipPage
event function is now also called forwpWelcome
.
实际上,当前版本的 Inno Setup 根本不显示该页面默认值。
参见