[ovs-dev] [PATCH 4/6] installer-windows: Call WIX binaries outside of MSBuild on x64

Alin Gabriel Serdean aserdean at ovn.org
Tue Oct 31 17:25:35 UTC 2017


Unfortunately all WIX binaries (candle, heat, etc) are only 32 bit (up to
the latest version 3.11).

For performance reasons they are run as .NET assemblies inside the MSBuild
process. Running 32 bit assemblies inside a 64 bit process (MSBuild) makes
them segfault.

Add a new option for heat to be run as an individual process when the
platform is not x86.

Signed-off-by: Alin Gabriel Serdean <aserdean at ovn.org>
---
 windows/ovs-windows-installer/ovs-windows-installer.wixproj | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/windows/ovs-windows-installer/ovs-windows-installer.wixproj b/windows/ovs-windows-installer/ovs-windows-installer.wixproj
index a8256ed..241d605 100644
--- a/windows/ovs-windows-installer/ovs-windows-installer.wixproj
+++ b/windows/ovs-windows-installer/ovs-windows-installer.wixproj
@@ -13,6 +13,7 @@
     <Version Condition=" '$(Version)' == '' ">1.0.0.0</Version>
   </PropertyGroup>
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
+    <TestOutOfProccess Condition=" '$(PROCESSOR_ARCHITECTURE)'!='x86' ">true</TestOutOfProccess>
     <OutputPath>bin\$(Configuration)\</OutputPath>
     <IntermediateOutputPath>obj\$(Configuration)\</IntermediateOutputPath>
     <DefineConstants>BinariesPath=Binaries;SymbolsPath=Symbols;Version=$(Version)</DefineConstants>
@@ -21,6 +22,7 @@
     <SuppressSpecificWarnings>1076;</SuppressSpecificWarnings>
   </PropertyGroup>
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' ">
+    <TestOutOfProccess Condition=" '$(PROCESSOR_ARCHITECTURE)'!='x86' ">true</TestOutOfProccess>
     <DefineConstants>BinariesPath=Binaries;SymbolsPath=Symbols;Version=$(Version)</DefineConstants>
     <SuppressAllWarnings>False</SuppressAllWarnings>
     <Pedantic>False</Pedantic>
@@ -67,9 +69,9 @@
   </ItemGroup>
   <Import Project="$(WixTargetsPath)" />
   <Target Name="BeforeBuild">
-    <HeatDirectory DirectoryRefId="BINARIESDIR" OutputFile="Binaries.wxs" Directory="Binaries" ComponentGroupName="BinariesComponentGroup" ToolPath="$(WixToolPath)" PreprocessorVariable="var.BinariesPath" GenerateGuidsNow="true" SuppressCom="true" SuppressRegistry="true" KeepEmptyDirectories="true" SuppressRootDirectory="true">
+    <HeatDirectory RunAsSeparateProcess="$(TestOutOfProccess)" DirectoryRefId="BINARIESDIR" OutputFile="Binaries.wxs" Directory="Binaries" ComponentGroupName="BinariesComponentGroup" ToolPath="$(WixToolPath)" PreprocessorVariable="var.BinariesPath" GenerateGuidsNow="true" SuppressCom="true" SuppressRegistry="true" KeepEmptyDirectories="true" SuppressRootDirectory="true">
     </HeatDirectory>
-    <HeatDirectory DirectoryRefId="SYMBOLSDIR" OutputFile="Symbols.wxs" Directory="Symbols" ComponentGroupName="SymbolsComponentGroup" ToolPath="$(WixToolPath)" PreprocessorVariable="var.SymbolsPath" GenerateGuidsNow="true" SuppressCom="true" SuppressRegistry="true" KeepEmptyDirectories="true" SuppressRootDirectory="true">
+    <HeatDirectory RunAsSeparateProcess="$(TestOutOfProccess)" DirectoryRefId="SYMBOLSDIR" OutputFile="Symbols.wxs" Directory="Symbols" ComponentGroupName="SymbolsComponentGroup" ToolPath="$(WixToolPath)" PreprocessorVariable="var.SymbolsPath" GenerateGuidsNow="true" SuppressCom="true" SuppressRegistry="true" KeepEmptyDirectories="true" SuppressRootDirectory="true">
     </HeatDirectory>
   </Target>
   <!--
-- 
2.10.2.windows.1



More information about the dev mailing list