2016-06-12 124 views
6

我正在尝试使用Inno Setup进行安装。欢迎页面未显示,SelectDir页面首先显示

我想先显示Welcome页面,然后选择SelectDir。

这是CurPageChanged示例代码:

procedure CurPageChanged(CurPageID: integer); 
begin 
    if CurPageID = wpWelcome then 
    begin 
    HideComponents; 
    WLabel.show; 
    WizardForm.NextButton.Show; 
    WizardForm.NextButton.Caption := 'Configure'; 
    end; 

    if CurPageID = wpSelectDir then 
    begin 
    HideComponents; 

    BmpFile.Bitmap.LoadFromFile(ExpandConstant('{tmp}\2.bmp')); 
    WizardForm.DirEdit.Show; 
    WizardForm.NextButton.Show; 
    WizardForm.NextButton.Caption := 'Install'; 
    WizardForm.DirBrowseButton.Show; 
    TasksSeparateBevel.Show; 
    TasksSeparateBevel2.Show; 
    InstallpathLabel.Show; 
    DiskSpaceLablel.Show; 
    ShortcutLabel.Show; 
    ShortcutCB.Show; 
    CreateDLabel.Show; 
    end; 

    if CurPageID = wpInstalling then 
    begin 
    HideComponents; 

    MakeSlideShow; 
    TimerID := SetTimer(0, 0, 10000, WrapTimerProc(@OnTimer, 4)); 

    WizardForm.CancelButton.show; 
    WizardForm.ProgressGauge.show; 
    end; 
end; 

但SelectDir示出了第一然后安装。欢迎页面不显示!

回答

12

欢迎页面是因为Inno Setup 5.5.7默认跳过:

所推荐的微软的桌面应用指南,DisableWelcomePage现在默认为yes。 ...以前版本的默认值为no

要显示它,你必须设置:

[Setup] 
DisableWelcomePage=no 
+0

感谢您的帮助:d –