2013-11-26 50 views
0

如何告知WIX安装程序将整个文件夹用作非单个文件。 这是我的样品Product.wxs。当我安装它时,它只复制一个“exe”文件。作为WIX安装程序源的文件夹

<?xml version="1.0" encoding="UTF-8"?> 
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"> 
    <Product Id="*" Name="installer" Language="1033" Version="1.0.0.0" Manufacturer="google" UpgradeCode="b9a36165-554f-493b-8e11-f2aef7fb90a3"> 
    <Package InstallerVersion="200" Compressed="yes" InstallScope="perMachine" /> 

    <MajorUpgrade DowngradeErrorMessage="A newer version of [ProductName] is already installed." /> 
    <MediaTemplate /> 

    <Feature Id="ProductFeature" Title="installer" Level="1"> 
     <ComponentGroupRef Id="ProductComponents" /> 
    </Feature> 
    </Product> 

    <Fragment> 
    <Directory Id="TARGETDIR" Name="SourceDir"> 
     <Directory Id="ProgramFilesFolder"> 
     <Directory Id="INSTALLFOLDER" Name="myProduct" /> 
     </Directory> 
    </Directory> 
    </Fragment> 

    <Fragment> 
    <ComponentGroup Id="ProductComponents" Directory="INSTALLFOLDER"> 
     <Component> 
     <File Id="MyFiles" Name="$(var.MyProduct.UI.TargetFileName)" Source="$(var.MyProduct.UI.TargetDir)" /> 
     </Component> 
    </ComponentGroup> 
    </Fragment> 
</Wix> 

回答

3

据我所知,你必须在你的WiX工程中的所有文件,如果你想将它们包括到您的安装。

要获取所有文件,您可以使用Harvest Tool (Heat)

+0

热是正确的方法。它可以作为VS构建事件运行。 – Somedust