我正在使用WiX 3.7的GenerateBootstrapper来生成我在Visual Studio部署项目中使用的引导程序。递归地打开WiX引导程序
我的Bundle.wxs
目前是一个链接与单个项目,引用我的MSI文件。
<Chain>
<MsiPackage Id="MyProgramInstaller" SourceFile="$(var.MyProgramInstaller.TargetPath)" Compressed="no"/>
</Chain>
我修改了我的Bootstrapper项目的.wixproj以包含各种组件的引导程序代。
...
<ItemGroup>
<ProjectReference Include="..\MyProgramInstaller\MyProgramInstaller.wixproj">
<Name>MyProgramInstaller</Name>
<Project>{my-guid}</Project>
<Private>True</Private>
<DoNotHarvest>True</DoNotHarvest>
<RefProjectOutputGroups>Binaries;Content;Satellites</RefProjectOutputGroups>
<RefTargetDir>INSTALLFOLDER</RefTargetDir>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<BootstrapperFile Include="Microsoft.Net.Framework.3.5.SP1">
<ProductName>.NET Framework 3.5 SP1</ProductName>
</BootstrapperFile>
<BootstrapperFile Include=".NETFramework,Version=v4.0">
<ProductName>.NET Framework 4.0</ProductName>
</BootstrapperFile>
<BootstrapperFile Include="Microsoft.Windows.Installer.3.1">
<ProductName>Windows Installer 3.1</ProductName>
</BootstrapperFile>
<BootstrapperFile Include="Microsoft.Windows.Installer.4.5">
<ProductName>Windows Installer 4.5</ProductName>
</BootstrapperFile>
<BootstrapperFile Include="Microsoft.Sql.Server.Express.10.50.1600.1">
<ProductName>Microsoft SQL Server 2008 R2</ProductName>
</BootstrapperFile>
<BootstrapperFile Include="Windows.Imaging.Component">
<ProductName>Windows Imaging Component</ProductName>
</BootstrapperFile>
<BootstrapperFile Include="WindowsXP-KB921337-x86-ENUWinXPSP2">
<ProductName>Win XP SP2 Hotfix</ProductName>
</BootstrapperFile>
</ItemGroup>
<Import Project="$(WixTargetsPath)" />
<!--
To modify your build process, add your task inside one of the
targets below and uncomment it.
Other similar extension points exist, see Wix.targets.
<Target Name="BeforeBuild">
</Target> -->
<Target Name="AfterBuild">
<GenerateBootstrapper ApplicationFile="$(TargetFileName)"
ApplicationName="My Program"
BootstrapperItems="@(BootstrapperFile)"
ComponentsLocation="Relative"
CopyComponents="True"
OutputPath="$(OutputPath)"
Path="C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bootstrapper\" />
</Target>
当我建立了包项目,我看到我的MSI,EXE,并如预期我的必备程序包的文件夹。当我执行我的引导程序exe时,我简要地看到一个对话框,指示'setup正在初始化组件',并且它隐藏起来,并且具有相同事物的新窗口正在打开。不知何故,安装文件递归调用自己,我不能确定为什么。看看我的install.log
,似乎执行了所有先决条件的检查,使用SQL Server完成,并确定不需要安装任何设备(对于我的开发计算机为true),然后再次调用setup.exe
。这不会停止,直到我足够快地关闭设置窗口以中止下一个呼叫。它应该试图再次调用.msi文件,而不是setup.exe,但我不确定是什么导致了这种行为。
Result of running operator 'ValueEqualTo' on property 'SQLExpressChk' and value '-2': false
Result of running operator 'ValueEqualTo' on property 'SQLExpressChk' and value '-3': false
Result of running operator 'ValueEqualTo' on property 'SQLExpressChk' and value '-4': false
Result of running operator 'ValueLessThan' on property 'SQLExpressChk' and value '-4': false
Result of running operator 'ValueNotEqualTo' on property 'ProcessorArchitecture' and value 'amd64': false
Result of running operator 'ValueNotEqualTo' on property 'SQLExpressChk' and value '1': true
Result of checks for command 'SqlExpress2008_R2\SQLEXPR_x64_ENU.EXE' is 'Bypass'
Running checks for command 'SqlExpress2008_R2\SQLEXPR32_x86_ENU.EXE'
Result of running operator 'ValueNotEqualTo' on property 'ProcessorArchitecture' and value 'amd64': false
Result of running operator 'ValueNotEqualTo' on property 'SQLExpressChk' and value '2': true
Result of checks for command 'SqlExpress2008_R2\SQLEXPR32_x86_ENU.EXE' is 'Bypass'
'SQL Server 2008 R2 Express' RunCheck result: No Install Needed
Launching Application.
Running command 'C:\Path\To\MyBootstrapper\bin\Release\setup.exe' with arguments ''
有没有在我的GenerateBootstapper
这是造成这种情况?我试图按照How to use Wix to create Windows Installer files ?的例子。
GenerateBootstrapper任务是一个MSBuild任务,用于创建与WiX引导程序完全不同的引导程序。尽管这里不一定是你的主要问题,但从它看起来,你正在MSBuild中创建一个引导程序,启动WiX引导程序,启动安装程序。 – BryanJ 2013-05-14 14:44:53