2

I am trying to split out my wix file into two separate files. With everything that exists under my <UI> </UI> tag living in this secondary file.

I have googled this quite a bit but I don't seem to be getting any conclusive results.

Has anyone done this successfully?

4

2 回答 2

2

You can move the <UI> element with its contents to a separate file easily. Just make sure to reference it from the main Product.wxs with <UIRef> element.

于 2012-11-09T13:35:54.853 回答
1

In your Wix project add the reference to the WixUIExtension

In your Product.wxs (Main Install file) add a line like this

<UIRef Id="UserInterface"/>

Add the UserInterface.wxs to your project solution and customize the UI of your MSI:

  <TextStyle Id="WixUI_Font_Normal" FaceName="Tahoma" Size="8" />
  <TextStyle Id="WixUI_Font_Bigger" FaceName="Tahoma" Size="9" Bold="yes" />
  <TextStyle Id="WixUI_Font_Title"  FaceName="Tahoma" Size="9" Bold="yes" />

  <Property Id="DefaultUIFont" Value="WixUI_Font_Normal" />

  <DialogRef Id="ProgressDlg" />
  <DialogRef Id="ErrorDlg" />
  <DialogRef Id="FilesInUse" />
  <DialogRef Id="FatalError" />
  <DialogRef Id="UserExit" />
  <DialogRef Id="InstallDirDlg"/>
  <DialogRef Id="FeaturesDlg" />




  <Publish Dialog="WelcomeDlg" Control="Next" Event="NewDialog" Value="FeaturesDlg" Order="2"></Publish>

  <Publish Dialog="FeaturesDlg" Control="Back" Event="NewDialog" Value="WelcomeDlg">1</Publish>

  <Publish Dialog="InstallDirDlg" Control="Back" Event="NewDialog" Value="FeaturesDlg">1</Publish>
  <Publish Dialog="InstallDirDlg" Control="ChangeFolder" Property="_BrowseProperty" Value="[WIXUI_INSTALLDIR]" Order="1">1</Publish>
  <Publish Dialog="InstallDirDlg" Control="ChangeFolder" Event="SpawnDialog" Value="BrowseDlg" Order="2">1</Publish>
  <Publish Dialog="InstallDirDlg" Control="Next" Event="SetTargetPath" Value="[WIXUI_INSTALLDIR]" Order="1">1</Publish>
  <Publish Dialog="InstallDirDlg" Control="Next" Event="NewDialog" Value="ExitDialog" Order="2">1</Publish>



  <Publish Dialog="ExitDialog" Control="Finish" Event="EndDialog" Value="Return" Order="999">1</Publish>

</UI>
<UIRef Id="WixUI_Common" />

The complete sample of this code can be found at this answer

Look at this link, explains how to create Custom Dialogs

Good luck!

于 2012-11-09T15:16:24.733 回答