2016-06-12 125 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 –