【发布时间】:2010-09-17 01:49:57
【问题描述】:
我需要一个 WiX 3 脚本来显示以仅显示 2 个对话框:欢迎和已完成。这就是它不需要 EULA、文件夹选择等。所有帮助表示赞赏。
【问题讨论】:
标签: wix installation windows-installer
我需要一个 WiX 3 脚本来显示以仅显示 2 个对话框:欢迎和已完成。这就是它不需要 EULA、文件夹选择等。所有帮助表示赞赏。
【问题讨论】:
标签: wix installation windows-installer
如果您使用的是 Visual Studio 和 Wix 3.8,那么您可以创建 Wix 安装项目并将下面的文本用作 Product.wxs 的内容。在我的情况下,我需要将 python 和文本文件复制到目标目录中。再次感谢 CheGueVerra 同志的原创杰作:
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Product Id="*" Name="testwixsetup" Language="1033" Version="2.1.3.0" Manufacturer="ttt" UpgradeCode="PUT-GUID-HERE">
<Package InstallerVersion="200" Compressed="yes" InstallScope="perMachine" />
<MajorUpgrade DowngradeErrorMessage="A newer version of [ProductName] is already installed." />
<MediaTemplate EmbedCab="yes"/>
<Feature Id="ProductFeature" Title="testwixsetup" Level="1">
<ComponentGroupRef Id="ProductComponents" />
</Feature>
<UI Id="UserInterface">
<Property Id="WIXUI_INSTALLDIR" Value="TARGETDIR" />
<Property Id="WixUI_Mode" Value="Custom" />
<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" />
<Publish Dialog="ExitDialog" Control="Finish" Event="EndDialog" Value="Return" Order="999">1</Publish>
<Publish Dialog="WelcomeDlg" Control="Next" Event="EndDialog" Value="Return" Order="2"></Publish>
</UI>
<UIRef Id="WixUI_Common" />
</Product>
<Fragment>
<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="ProgramFilesFolder">
<Directory Id="COMPANYFOLDER" Name="test-wixinstall">
<Directory Id="INSTALLFOLDER" Name="testwixsetup" />
</Directory>
</Directory>
</Directory>
</Fragment>
<Fragment>
<ComponentGroup Id="ProductComponents" Directory="INSTALLFOLDER">
<Component Id="ProductComponent" Guid="*">
<File Name="test.py"/>
<File Name="test.txt"/>
</Component>
</ComponentGroup>
</Fragment>
</Wix>
【讨论】:
您需要做的就是在您的 WIX 脚本中添加它,它会在安装前为您提供 WelcomeDlg 并显示安装进度,然后是退出对话框。不要忘记将 WixUIExtension.dll 添加到您的引用中。
<UI Id="UserInterface">
<Property Id="WIXUI_INSTALLDIR" Value="TARGETDIR" />
<Property Id="WixUI_Mode" Value="Custom" />
<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" />
<Publish Dialog="ExitDialog" Control="Finish" Event="EndDialog" Value="Return" Order="999">1</Publish>
<Publish Dialog="WelcomeDlg" Control="Next" Event="EndDialog" Value="Return" Order="2"></Publish>
</UI>
<UIRef Id="WixUI_Common" />
【讨论】:
C:\Program Files (x86)\WiX Toolset v3.7\bin\WixUIExtension.dll 我对 WiX 很陌生,如果这是常识,请原谅。