我想使用Heat.exe命令构建一个WIX文件(.wxs)。我想知道热量是否支持同一命令中的多个收获类型(文件和注册表)。
我尝试了以下命令,但它没有在生成的输出中添加收获类型的条目:
" C:\ Program Files(x86)\ WiX Toolset v3.11 \ bin \ heat.exe" file" C:\ Users \ ragh.jenkins \ jobs \ ODBC \ workspace \ bin \ Win32 \ Debug \ driver.dll" -reg" C:\ DIS \ master_latest \ odbc \ DEBUG_64.reg" -cg RegistryEntries -out" C:\ Users \ ragh \ Documents \ Visual Studio 2013 \ Projects \ SetupProject1 \ SetupProject1 \ jenkinsprod.wxs"
当前输出:
<?xml version="1.0" encoding="utf-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Fragment>
<ComponentGroup Id="RegistryEntries">
<Component Id="cmpD31B63367AF259550643AC8C1AB78978"
Directory="TARGETDIR" Guid="PUT-GUID-HERE" KeyPath="yes">
<RegistryKey Key="SOFTWARE\ODBC\ODBCINST.INI\ODBC Drivers"
Root="HKLM">
<RegistryValue Name="NelDriver64" Value="Installed" Type="string" />
</RegistryKey>
</Component>
<Component Id="cmp56B0ADF81BA4CE92E17B4BF179176FCE"
Directory="TARGETDIR" Guid="PUT-GUID-HERE" KeyPath="yes">
<RegistryKey Key="SOFTWARE\ODBC\ODBCINST.INI\NelDriver64"
Root="HKLM">
<RegistryValue Name="UsageCount" Value="1" Type="integer" />
<RegistryValue Name="Driver" Value="C:\
{PROJECT_FOLDER}\bin\x64\Debug\driver.dll" Type="string" />
<RegistryValue Name="Setup" Value="C:\
{PROJECT_FOLDER}\bin\x64\Debug\driver.dll" Type="string" />
</RegistryKey>
</Component>
</ComponentGroup>
</Fragment>
</Wix>
预期输出:
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Product Id="*" Name="SetupProject1" Language="1033" Version="1.0.0.0"
Manufacturer="Test" UpgradeCode="fc444cfd-b871-44c5-a920-8b7fc99674c1">
<Package InstallerVersion="200" Compressed="yes" InstallScope="perMachine" />
<MajorUpgrade DowngradeErrorMessage="A newer version of [ProductName] is
already installed." />
<MediaTemplate />
<Feature Id="ProductFeature" Title="SetupProject1" Level="1">
<ComponentGroupRef Id="ProductComponents" />
</Feature>
</Product>
<Fragment>
<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="ProgramFilesFolder">
<Directory Id="INSTALLFOLDER" Name="SetupProject1" />
</Directory>
</Directory>
</Fragment>
<Fragment>
<ComponentGroup Id="ProductComponents" Directory="INSTALLFOLDER">
<Component Id="driver.dll" Guid="*">
<File Id="driver.dll" KeyPath="yes"
Source="C:\Users\ragh\.jenkins\jobs\ODBC\workspace\bin\Win32\Debug\driver.dll">
</File>
</Component>
<Component Id="RegistryEntries" Guid="*">
<RegistryKey Root="HKLM"
Key="Software\Wow6432Node\ODBC\ODBCINST.INI\ODBC Drivers" >
<RegistryValue Type="string" Name="NelDriver" Value="Installed"/>
</RegistryKey>
<RegistryKey Root="HKLM"
Key="Software\Wow6432Node\ODBC\ODBCINST.INI\NelDriver" >
<RegistryValue Type="string" Name="UsageCount" Value="dword:00000001"/>
</RegistryKey>
<RegistryKey Root="HKLM"
Key="Software\Wow6432Node\ODBC\ODBCINST.INI\NelDriver" >
<RegistryValue Type="string" Name="Driver" Value="[INSTALLFOLDER]\driver.dll"/>
</RegistryKey>
<RegistryKey Root="HKLM"
Key="Software\Wow6432Node\ODBC\ODBCINST.INI\NelDriver" >
<RegistryValue Type="string" Name="Setup" Value="[INSTALLFOLDER]\driver.dll" />
</RegistryKey>
</Component>
</ComponentGroup>
</Fragment>
</Wix>
答案 0 :(得分:1)
热量不会产生预期的输出。它创建一个ComponentGroup并且不创建产品。因此,您将拥有多个文件。因此,热量处理多个输入没有任何优势。
以下是您可以做的事情:
答案 1 :(得分:0)
你是否尝试使用热量的'dir'选项,它将收集指定目录中的所有文件,我假设注册表文件带有'reg'选项,而常规文件带有'file'选项。如果您需要按下输出或从输出中排除一些组件,那么您始终可以使用XSL转换选项来加热。