diff mbox series

[ovs-dev,v3,7/8] windows, installer: Bundle Windows 10 driver

Message ID 20200924062305.1946-1-aserdean@ovn.org
State Accepted
Headers show
Series [ovs-dev,v3,1/8] windows: Remove unused variable | expand

Commit Message

Alin-Gabriel Serdean Sept. 24, 2020, 6:23 a.m. UTC
This patch bundles the Windows 10 driver family in the installer and also
adds detection for the family.

Signed-off-by: Alin Gabriel Serdean <aserdean@ovn.org>
---
 windows/automake.mk                                  |  5 ++++-
 windows/ovs-windows-installer/Driver/.gitignore      |  1 +
 .../ovs-windows-installer/Driver/Win10/.gitignore    |  3 +++
 windows/ovs-windows-installer/Product.wxs            | 12 +++++++++++-
 4 files changed, 19 insertions(+), 2 deletions(-)
 create mode 100644 windows/ovs-windows-installer/Driver/Win10/.gitignore

Comments

0-day Robot Sept. 24, 2020, 7:15 a.m. UTC | #1
Bleep bloop.  Greetings Alin Gabriel Serdean, I am a robot and I have tried out your patch.
Thanks for your contribution.

I encountered some error that I wasn't expecting.  See the details below.


checkpatch:
WARNING: Line is 128 characters long (recommended limit is 79)
#64 FILE: windows/ovs-windows-installer/Product.wxs:40:
      <RegistrySearch Id="Test" Root="HKLM" Key="SOFTWARE\Microsoft\Windows NT\CurrentVersion" Name="CurrentBuild" Type="raw" />

WARNING: Line is 88 characters long (recommended limit is 79)
#82 FILE: windows/ovs-windows-installer/Product.wxs:261:
        <Condition><![CDATA[(VersionNT = "603") AND (BUILDNUMBER < 10000)]]></Condition>

WARNING: Line is 92 characters long (recommended limit is 79)
#87 FILE: windows/ovs-windows-installer/Product.wxs:266:
      <Component Id='OpenvSwitchDriver_Win10' Guid='{7A1E2446-8196-4738-8362-5CFD55896A7D}'>

WARNING: Line is 130 characters long (recommended limit is 79)
#89 FILE: windows/ovs-windows-installer/Product.wxs:268:
          <File Id='win10_ovsext.sys' Name='ovsext.sys' DiskId='1' Source='Driver\Win10\ovsext.sys' Checksum='yes' KeyPath='yes'/>

WARNING: Line is 117 characters long (recommended limit is 79)
#90 FILE: windows/ovs-windows-installer/Product.wxs:269:
          <File Id='win10_ovsext.inf' Name='ovsext.inf' DiskId='1' Source='Driver\Win10\ovsext.inf' Checksum='yes' />

WARNING: Line is 117 characters long (recommended limit is 79)
#91 FILE: windows/ovs-windows-installer/Product.wxs:270:
          <File Id='win10_ovsext.cat' Name='ovsext.cat' DiskId='1' Source='Driver\Win10\ovsext.cat' Checksum='yes' />

Lines checked: 98, Warnings: 6, Errors: 0


Please check this out.  If you feel there has been an error, please email aconole@redhat.com

Thanks,
0-day Robot
diff mbox series

Patch

diff --git a/windows/automake.mk b/windows/automake.mk
index ce1fac66c..489343028 100644
--- a/windows/automake.mk
+++ b/windows/automake.mk
@@ -31,10 +31,13 @@  windows_installer: all
 #Forwarding extension files needed for the installer
 	cp -f $(top_srcdir)/datapath-windows/x64/Win8$(VSTUDIO_CONFIG)/package/ovsext.cat windows/ovs-windows-installer/Driver/Win8/ovsext.cat
 	cp -f $(top_srcdir)/datapath-windows/x64/Win8$(VSTUDIO_CONFIG)/package/ovsext.inf windows/ovs-windows-installer/Driver/Win8/ovsext.inf
-	cp -f $(top_srcdir)/datapath-windows/x64/Win8$(VSTUDIO_CONFIG)/package/OVSExt.sys windows/ovs-windows-installer/Driver/Win8/OVSExt.sys
+	cp -f $(top_srcdir)/datapath-windows/x64/Win8$(VSTUDIO_CONFIG)/package/OVSExt.sys windows/ovs-windows-installer/Driver/Win8/ovsext.sys
 	cp -f $(top_srcdir)/datapath-windows/x64/Win8.1$(VSTUDIO_CONFIG)/package/ovsext.cat windows/ovs-windows-installer/Driver/Win8.1/ovsext.cat
 	cp -f $(top_srcdir)/datapath-windows/x64/Win8.1$(VSTUDIO_CONFIG)/package/ovsext.inf windows/ovs-windows-installer/Driver/Win8.1/ovsext.inf
 	cp -f $(top_srcdir)/datapath-windows/x64/Win8.1$(VSTUDIO_CONFIG)/package/ovsext.sys windows/ovs-windows-installer/Driver/Win8.1/ovsext.sys
+	cp -f $(top_srcdir)/datapath-windows/x64/Win10$(VSTUDIO_CONFIG)/package/ovsext.cat windows/ovs-windows-installer/Driver/Win10/ovsext.cat
+	cp -f $(top_srcdir)/datapath-windows/x64/Win10$(VSTUDIO_CONFIG)/package/ovsext.inf windows/ovs-windows-installer/Driver/Win10/ovsext.inf
+	cp -f $(top_srcdir)/datapath-windows/x64/Win10$(VSTUDIO_CONFIG)/package/ovsext.sys windows/ovs-windows-installer/Driver/Win10/ovsext.sys
 	MSBuild.exe windows/ovs-windows-installer.sln //nologo //target:Build //p:Configuration="Release" //p:Version="$(PACKAGE_VERSION)" //p:Platform=$(PLATFORM)
 
 EXTRA_DIST += \
diff --git a/windows/ovs-windows-installer/Driver/.gitignore b/windows/ovs-windows-installer/Driver/.gitignore
index e9994b37d..3de517016 100644
--- a/windows/ovs-windows-installer/Driver/.gitignore
+++ b/windows/ovs-windows-installer/Driver/.gitignore
@@ -3,3 +3,4 @@ 
 !.gitignore
 !Win8
 !Win8.1
+!Win10
diff --git a/windows/ovs-windows-installer/Driver/Win10/.gitignore b/windows/ovs-windows-installer/Driver/Win10/.gitignore
new file mode 100644
index 000000000..cec9082b6
--- /dev/null
+++ b/windows/ovs-windows-installer/Driver/Win10/.gitignore
@@ -0,0 +1,3 @@ 
+*
+
+!.gitignore
diff --git a/windows/ovs-windows-installer/Product.wxs b/windows/ovs-windows-installer/Product.wxs
index d722fe927..61289da6b 100644
--- a/windows/ovs-windows-installer/Product.wxs
+++ b/windows/ovs-windows-installer/Product.wxs
@@ -36,6 +36,9 @@ 
     <Property Id="DriverID" Value="{583CC151-73EC-4A6A-8B47-578297AD7623}" />
     <Property Id="DriverVersion" Value="$(var.Version)" />
     <Property Id="ExtensionType" Value="Forwarding" />
+    <Property Id="BUILDNUMBER" Secure="yes">
+      <RegistrySearch Id="Test" Root="HKLM" Key="SOFTWARE\Microsoft\Windows NT\CurrentVersion" Name="CurrentBuild" Type="raw" />
+    </Property>
 
     <Condition Message="This application is only supported on Windows 2012 or higher.">
        <![CDATA[Installed OR (VersionNT >= 602)]]>
@@ -65,6 +68,7 @@ 
              Description="Installs the Open vSwitch Hyper-V switch extension driver." Display="expand">
       <ComponentRef Id="OpenvSwitchDriver_Win8" />
       <ComponentRef Id="OpenvSwitchDriver_Win8.1" />
+      <ComponentRef Id="OpenvSwitchDriver_Win10" />
       <ComponentRef Id="ConfDir" />
       <ComponentRef Id="LogsDir" />
       <ComponentRef Id="AppDataDir" />
@@ -254,11 +258,17 @@ 
           <File Id='win8_ovsext.cat' Name='ovsext.cat' DiskId='1' Source='Driver\Win8\ovsext.cat' Checksum='yes' />
      </Component>
      <Component Id='OpenvSwitchDriver_Win8.1' Guid='{7A1E2446-8196-4738-8362-5CFD55896A7C}'>
-        <Condition><![CDATA[VersionNT = "603"]]></Condition>
+        <Condition><![CDATA[(VersionNT = "603") AND (BUILDNUMBER < 10000)]]></Condition>
           <File Id='win81_ovsext.sys' Name='ovsext.sys' DiskId='1' Source='Driver\Win8.1\ovsext.sys' Checksum='yes' KeyPath='yes'/>
           <File Id='win81_ovsext.inf' Name='ovsext.inf' DiskId='1' Source='Driver\Win8.1\ovsext.inf' Checksum='yes' />
           <File Id='win81_ovsext.cat' Name='ovsext.cat' DiskId='1' Source='Driver\Win8.1\ovsext.cat' Checksum='yes' />
       </Component>
+      <Component Id='OpenvSwitchDriver_Win10' Guid='{7A1E2446-8196-4738-8362-5CFD55896A7D}'>
+      <Condition><![CDATA[BUILDNUMBER > 10000]]></Condition>
+          <File Id='win10_ovsext.sys' Name='ovsext.sys' DiskId='1' Source='Driver\Win10\ovsext.sys' Checksum='yes' KeyPath='yes'/>
+          <File Id='win10_ovsext.inf' Name='ovsext.inf' DiskId='1' Source='Driver\Win10\ovsext.inf' Checksum='yes' />
+          <File Id='win10_ovsext.cat' Name='ovsext.cat' DiskId='1' Source='Driver\Win10\ovsext.cat' Checksum='yes' />
+      </Component>
     </DirectoryRef>
   </Fragment>