如何告诉WIX安装程序将整个文件夹用作源而不是单个文件。 这是我的示例 Product.wxs 。当我安装它时,它只复制一个“exe”文件。
<?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>