diff mbox series

[ovs-dev] MSI: Use platform specific netcfg location

Message ID 20171211182227.7716-1-aserdean@ovn.org
State Accepted
Headers show
Series [ovs-dev] MSI: Use platform specific netcfg location | expand

Commit Message

Alin-Gabriel Serdean Dec. 11, 2017, 6:22 p.m. UTC
We use the command `netcfg` to install the Windows datapath.

Since we have both 32 and 64 bit installers available point it to the
platform specific binary.

Found while testing.

Signed-off-by: Alin Gabriel Serdean <aserdean@ovn.org>
---
 windows/ovs-windows-installer/CustomActions.wxs | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

Comments

Ben Pfaff Jan. 4, 2018, 9:36 p.m. UTC | #1
On Mon, Dec 11, 2017 at 08:22:27PM +0200, Alin Gabriel Serdean wrote:
> We use the command `netcfg` to install the Windows datapath.
> 
> Since we have both 32 and 64 bit installers available point it to the
> platform specific binary.
> 
> Found while testing.
> 
> Signed-off-by: Alin Gabriel Serdean <aserdean@ovn.org>

Acked-by: Ben Pfaff <blp@ovn.org>
Alin-Gabriel Serdean Jan. 5, 2018, 1:57 p.m. UTC | #2
Thanks for the review. Applied on master.

> -----Original Message-----
> From: Ben Pfaff [mailto:blp@ovn.org]
> Sent: Thursday, January 4, 2018 11:36 PM
> To: Alin Gabriel Serdean <aserdean@ovn.org>
> Cc: dev@openvswitch.org
> Subject: Re: [ovs-dev] [PATCH] MSI: Use platform specific netcfg location
> 
> On Mon, Dec 11, 2017 at 08:22:27PM +0200, Alin Gabriel Serdean wrote:
> > We use the command `netcfg` to install the Windows datapath.
> >
> > Since we have both 32 and 64 bit installers available point it to the
> > platform specific binary.
> >
> > Found while testing.
> >
> > Signed-off-by: Alin Gabriel Serdean <aserdean@ovn.org>
> 
> Acked-by: Ben Pfaff <blp@ovn.org>
diff mbox series

Patch

diff --git a/windows/ovs-windows-installer/CustomActions.wxs b/windows/ovs-windows-installer/CustomActions.wxs
index 422f951..cc1b80e 100644
--- a/windows/ovs-windows-installer/CustomActions.wxs
+++ b/windows/ovs-windows-installer/CustomActions.wxs
@@ -16,6 +16,11 @@ 
     under the License.
   </copyright>
 -->
+<?if $(var.Platform) = x64 ?>
+  <?define NetcfgFolder = "[System64Folder]" ?>
+<?else ?>
+  <?define NetcfgFolder = "[WindowsFolder]Sysnative" ?>
+<?endif ?>
 <Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
   <Fragment>
     <Binary Id="OVSActions" SourceFile="Actions\OVSActions.js" />
@@ -35,14 +40,14 @@ 
               JScriptCall="runCommandAction" Execute="deferred" Return="check" Impersonate="no" />
 
     <CustomAction Id="InstallOpenVSwitchDriver_Prop" Property="InstallOpenVSwitchDriver"
-                  Value='"[WindowsFolder]Sysnative\netcfg.exe" -l "[DRIVERDIR]\ovsext.inf" -c s -i ovsext|0|netcfg failed to install the Open vSwitch Hyper-V switch extension'
+                  Value='"$(var.NetcfgFolder)\netcfg.exe" -l "[DRIVERDIR]\ovsext.inf" -c s -i ovsext|0|netcfg failed to install the Open vSwitch Hyper-V switch extension'
                   Execute="immediate" />
     <CustomAction Id="InstallOpenVSwitchDriver"
               BinaryKey="OVSActions"
               JScriptCall="runCommandAction" Execute="deferred" Return="check" Impersonate="no" />
 
     <CustomAction Id="UninstallOpenVSwitchDriver_Prop" Property="UninstallOpenVSwitchDriver"
-                  Value='"[WindowsFolder]Sysnative\netcfg.exe" -u ovsext|0|netcfg failed to uninstall the Open vSwitch Hyper-V switch extension'
+                  Value='"$(var.NetcfgFolder)\netcfg.exe" -u ovsext|0|netcfg failed to uninstall the Open vSwitch Hyper-V switch extension'
                   Execute="immediate" />
     <CustomAction Id="UninstallOpenVSwitchDriver"
               BinaryKey="OVSActions"