[ofw] [patch] separate nd and wsd

Anatoly Greenblatt anatolyg at voltaire.com
Wed Aug 13 07:14:35 PDT 2008


Hi,
 
Client of ours is interested in evaluation of ND alone and I believe
there are more like him. This patch separates ND from WSD.
 
Thanks,
Anatoly.
 
Index: WIX/CustomActions.vbs
===================================================================
--- WIX/CustomActions.vbs (revision 1479)
+++ WIX/CustomActions.vbs (working copy)
@@ -1041,9 +1041,6 @@
 ' Enable WSD if installsp.exe was installed (feature Winsock direct
selected).
 ' For Windows XP, this CustomAction should not be called as WSD is not
 ' supported on XP.
-' ND (Network Direct) is closely bound to WSD and follows the same
support
-' rules. If the WSD feature is selected (default is selected, except
for XP)
-' then installsp.exe & ndinstall.exe will be present. Enable WSD & ND.
 
 Sub WSDEnable()
       Dim sInstalldir, WshShell, fso
@@ -1060,10 +1057,23 @@
       End If
       If Err Then ShowError
 
-      ' Start the Network Direct Service.
+End Sub
+
+' Enable NetworkDirect if ndinstall.exe was installed (feature
NetworkDirect selected).
+' For Windows XP, this CustomAction should not be called as ND is not
+' supported on XP.
+
+Sub NDEnable()
+      Dim sInstalldir, WshShell, fso
+
+      sInstalldir = Session.Property("INSTALLDIR")
+
+      Set WshShell = CreateObject("WScript.Shell")
+      Set fso = CreateObject("Scripting.FileSystemObject")
+
       If fso.FileExists(sInstalldir & "ndinstall.exe") Then
-          ' install the Network Direct Service
-         Return = WshShell.Run ("cmd.exe /c cd " & sInstalldir _
+          ' install the Network Direct provider
+          Return = WshShell.Run ("cmd.exe /c cd " & sInstalldir _
                                  & " & ndinstall.exe -i", 0, true)
       End If
       If Err Then ShowError
Index: WIX/wlh/x64/wof.wxs
===================================================================
--- WIX/wlh/x64/wof.wxs (revision 1479)
+++ WIX/wlh/x64/wof.wxs (working copy)
@@ -474,6 +474,10 @@
             <File Id="installsp.exe" Compressed="yes" DiskId="1"
                      LongName="installsp.exe" Name="INSTALL.EXE"
                      Source="..\bin\net\amd64\installsp.exe" />
+          </Component>
+
+          <Component Id="NetworkDirect"
+                     Guid="1B211282-6CE6-4f1f-BD0C-5D7541514A44">
             <File Id="ndinstall.exe" Compressed="yes" DiskId="1"
                      LongName="ndinstall.exe" Name="NDINSTAL.EXE"
                      Source="..\bin\net\amd64\ndinstall.exe" />
@@ -1174,6 +1178,15 @@
       <ComponentRef Id="IPoIB" />
     </Feature>
 
+    <Feature Id="fND" Title="NetworkDirect" Description="NetworkDirect
Enabled"
+        Display="expand" Level="1" ConfigurableDirectory="INSTALLDIR"
+        AllowAdvertise="no" InstallDefault="local" Absent="allow">
+                <!-- skip ND on Windows XP or ia64 -->
+        <Condition Level="200"><![CDATA[VersionNT=501]] AND
![CDATA[Intel64]]></Condition>
+        <Condition Level="201"> IPOIB_EXISTS </Condition>
+        <ComponentRef Id="NetworkDirect" />
+    </Feature>
+
     <Feature Id="fWSD" Title="WSD" Description="Winsock Direct Enabled"
       Display="expand" Level="1" ConfigurableDirectory="INSTALLDIR"
          AllowAdvertise='no' InstallDefault='local' Absent='allow'>
@@ -1289,6 +1302,9 @@
     <CustomAction Id='WSD_start' BinaryKey='CA'
          VBScriptCall='WSDEnable' Return='check' />
 
+   <CustomAction Id="ND_start" BinaryKey="CA"
+         VBScriptCall="NDEnable" Return="check" />
+
     <CustomAction Id="OpenSM_start" BinaryKey="CA"
          VBScriptCall="OpenSM_StartMeUp" Return="check" />
  
@@ -1315,6 +1331,9 @@
        <Custom Action="WSD_start" After='InstallFinalize'>
                Not Installed</Custom>
 
+       <Custom Action="ND_start" After="InstallFinalize">
+           Not Installed</Custom>
+
        <Custom Action="OpenSM_start" After="WSD_start">
           ($OpenSM_Service_enabled = 3) AND  Not Installed </Custom>
 
Index: WIX/wlh/x86/wof.wxs
===================================================================
--- WIX/wlh/x86/wof.wxs (revision 1479)
+++ WIX/wlh/x86/wof.wxs (working copy)
@@ -416,6 +416,10 @@
                     <File Id="installsp.exe" Compressed="yes"
DiskId="1"
                               LongName="installsp.exe"
Name="INSTALL.EXE"
                               Source="..\bin\net\x86\installsp.exe" />
+                </Component>
+
+                <Component Id="NetworkDirect"
+                           Guid="A6C66EAA-1D57-41ba-8F8E-B7A85CE51A81">
                     <File Id="ndinstall.exe" Compressed="yes"
DiskId="1"
                               LongName="ndinstall.exe"
Name="NDINSTAL.EXE"
                               Source="..\bin\net\x86\ndinstall.exe" />
@@ -1064,6 +1068,14 @@
         <ComponentRef Id="IPoIB" />
     </Feature>
 
+    <Feature Id="fND" Title="NetworkDirect" Description="NetworkDirect
Enabled"
+        Display="expand" Level="1" ConfigurableDirectory="INSTALLDIR"
+        AllowAdvertise="no" InstallDefault="local" Absent="allow">
+                <!-- skip ND on Windows XP or ia64 -->
+        <Condition Level="0"><![CDATA[VersionNT=501]] AND
![CDATA[Intel64]]></Condition>
+        <ComponentRef Id="NetworkDirect" />
+    </Feature>
+
     <Feature Id="fWSD" Title="WSD" Description="Winsock Direct Enabled"
         Display="expand" Level="1" ConfigurableDirectory="INSTALLDIR"
         AllowAdvertise="no" InstallDefault="local" Absent="allow">
@@ -1182,6 +1194,9 @@
     <CustomAction Id="WSD_start" BinaryKey="CA"
          VBScriptCall="WSDEnable" Return="check" />
 
+    <CustomAction Id="ND_start" BinaryKey="CA"
+         VBScriptCall="NDEnable" Return="check" />
+
     <CustomAction Id="OpenSM_start" BinaryKey="CA"
          VBScriptCall="OpenSM_StartMeUp" Return="check" />
 
@@ -1207,6 +1222,9 @@
        <Custom Action="WSD_start" After="InstallFinalize">
            Not Installed</Custom>
 
+       <Custom Action="ND_start" After="InstallFinalize">
+           Not Installed</Custom>
+
        <Custom Action="OpenSM_start" After="WSD_start">
           ($OpenSM_Service_enabled = 3) AND  Not Installed </Custom>
 
Index: WIX/wnet/x64/wof.wxs
===================================================================
--- WIX/wnet/x64/wof.wxs (revision 1479)
+++ WIX/wnet/x64/wof.wxs (working copy)
@@ -474,8 +474,12 @@
             <File Id="installsp.exe" Compressed="yes" DiskId="1"
                      LongName="installsp.exe" Name="INSTALL.EXE"
                      Source="..\bin\net\amd64\installsp.exe" />
+          </Component>
+
+          <Component Id="NetworkDirect"
+                     Guid="941B5314-5D7C-461d-A5EF-20E797C1DA96">
             <File Id="ndinstall.exe" Compressed="yes" DiskId="1"
-                     LongName="ndinstall.exe" Name="INSTALL.EXE"
+                     LongName="ndinstall.exe" Name="NDINSTAL.EXE"
                      Source="..\bin\net\amd64\ndinstall.exe" />
           </Component>
 
@@ -1183,6 +1187,15 @@
       <ComponentRef Id="WinsockDirect" />
     </Feature>
 
+    <Feature Id="fND" Title="NetworkDirect" Description="NetworkDirect
Enabled"
+        Display="expand" Level="1" ConfigurableDirectory="INSTALLDIR"
+        AllowAdvertise="no" InstallDefault="local" Absent="allow">
+                <!-- skip ND on Windows XP or ia64 -->
+        <Condition Level="200"><![CDATA[VersionNT=501]] AND
![CDATA[Intel64]]></Condition>
+        <Condition Level="201"> IPOIB_EXISTS </Condition>
+        <ComponentRef Id="NetworkDirect" />
+    </Feature>
+
     <Feature Id="fDAPL" Title="DAPL" Description="DAT+DAPL over
InfiniBand"
          Display="collapse" Level="1"
ConfigurableDirectory="INSTALLDIR"
          AllowAdvertise='no' InstallDefault='local' Absent='allow'>
@@ -1289,6 +1302,9 @@
     <CustomAction Id='WSD_start' BinaryKey='CA'
          VBScriptCall='WSDEnable' Return='check' />
 
+    <CustomAction Id="ND_start" BinaryKey="CA"
+         VBScriptCall="NDEnable" Return="check" />
+
     <CustomAction Id="OpenSM_start" BinaryKey="CA"
          VBScriptCall="OpenSM_StartMeUp" Return="check" />
  
@@ -1315,6 +1331,9 @@
        <Custom Action="WSD_start" After='InstallFinalize'>
                Not Installed</Custom>
 
+       <Custom Action="ND_start" After="InstallFinalize">
+           Not Installed</Custom>
+
        <Custom Action="OpenSM_start" After="WSD_start">
           ($OpenSM_Service_enabled = 3) AND  Not Installed </Custom>
 
Index: WIX/wnet/x86/wof.wxs
===================================================================
--- WIX/wnet/x86/wof.wxs (revision 1479)
+++ WIX/wnet/x86/wof.wxs (working copy)
@@ -416,6 +416,10 @@
                     <File Id="installsp.exe" Compressed="yes"
DiskId="1"
                               LongName="installsp.exe"
Name="INSTALL.EXE"
                               Source="..\bin\net\x86\installsp.exe" />
+                </Component>
+
+                <Component Id="NetworkDirect"
+                           Guid="99CD501B-8982-4b5f-A1E8-90A1C3C05AF7">
                     <File Id="ndinstall.exe" Compressed="yes"
DiskId="1"
                               LongName="ndinstall.exe"
Name="NDINSTAL.EXE"
                               Source="..\bin\net\x86\ndinstall.exe" />
@@ -1064,6 +1068,14 @@
         <ComponentRef Id="IPoIB" />
     </Feature>
 
+    <Feature Id="fND" Title="NetworkDirect" Description="NetworkDirect
Enabled"
+        Display="expand" Level="1" ConfigurableDirectory="INSTALLDIR"
+        AllowAdvertise="no" InstallDefault="local" Absent="allow">
+        <!-- skip ND on Windows XP or ia64 -->
+        <Condition Level="0"><![CDATA[VersionNT=501]] AND
![CDATA[Intel64]]></Condition>
+        <ComponentRef Id="NetworkDirect" />
+    </Feature>
+
     <Feature Id="fWSD" Title="WSD" Description="Winsock Direct Enabled"
         Display="expand" Level="1" ConfigurableDirectory="INSTALLDIR"
         AllowAdvertise="no" InstallDefault="local" Absent="allow">
@@ -1182,6 +1194,9 @@
     <CustomAction Id="WSD_start" BinaryKey="CA"
          VBScriptCall="WSDEnable" Return="check" />
 
+    <CustomAction Id="ND_start" BinaryKey="CA"
+         VBScriptCall="NDEnable" Return="check" />
+
     <CustomAction Id="OpenSM_start" BinaryKey="CA"
          VBScriptCall="OpenSM_StartMeUp" Return="check" />
 
@@ -1207,6 +1222,9 @@
        <Custom Action="WSD_start" After="InstallFinalize">
            Not Installed</Custom>
 
+       <Custom Action="ND_start" After="InstallFinalize">
+           Not Installed</Custom>
+
        <Custom Action="OpenSM_start" After="WSD_start">
           ($OpenSM_Service_enabled = 3) AND  Not Installed </Custom>
 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openfabrics.org/pipermail/ofw/attachments/20080813/4c9af558/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: separate_nd_and_wsd.patch
Type: application/octet-stream
Size: 10714 bytes
Desc: not available
URL: <http://lists.openfabrics.org/pipermail/ofw/attachments/20080813/4c9af558/attachment.obj>


More information about the ofw mailing list