我有一個相當複雜的安裝程序,我在Wix中編寫了很多基於您正在安裝的組件的自定義對話框選項。一般來說,默認情況很好,因此無人值守的安裝會成功,但具有這種自定義功能會有所幫助。Wix UI條件最佳實踐
我想知道的是,Wix中做UI條件的最佳實踐是什麼?我注意到,維克斯評估所有<Publish>
標籤,無論是否不是最後一個被評估爲真,這是導致很多這樣的代碼:
<Publish Dialog="Questions" Control="Next" Event="NewDialog" Value="Component1Questions" Order="1">INSTALLCOMPONENT1</Publish>
<Publish Dialog="Questions" Control="Next" Event="NewDialog" Value="Component2Questions" Order="2">NOT INSTALLCOMPONENT1 AND INSTALLCOMPONENT2</Publish>
<Publish Dialog="Questions" Control="Next" Event="NewDialog" Value="Component3Questions" Order="3">NOT INSTALLCOMPONENT1 AND NOT INSTALLCOMPONENT2 AND INSTALLCOMPONENT3</Publish>
<Publish Dialog="Questions" Control="Next" Event="NewDialog" Value="VerifyReadyDlg" Order="4">NOT INSTALLCOMPONENT1 AND NOT INSTALLCOMPONENT2 AND NOT INSTALLCOMPONENT3</Publish>
而且同樣也在「後退」節每個對話框都有這個最佳實踐嗎?有沒有一種方法可以對Publish元素進行短路評估,並將第一個元素返回true?
邏輯更簡單但稍微不正確。如果我想安裝所有3個組件,在這種情況下,下一個按鈕將不起作用。 – Jeff 2009-06-25 20:14:45