diff mbox series

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

Message ID 20171106101203.10508-4-aserdean@ovn.org
State Accepted
Headers show
Series [ovs-dev,v2,1/6] build-windows: Suppress output from MSBuild | expand

Commit Message

Alin-Gabriel Serdean Nov. 6, 2017, 10:12 a.m. UTC
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@ovn.org>
Acked-by: Alin Balutoiu <abalutoiu@cloudbasesolutions.com>
---
v2: Add acked
---
 windows/ovs-windows-installer/ovs-windows-installer.wixproj | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
diff mbox series

Patch

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>
   <!--