[Openib-windows] Wsd service installer

Yossi Leybovich sleybo at mellanox.co.il
Wed Aug 10 05:24:59 PDT 2005


Fab

In the past we had little discussion about how to generate different rc file
per company 
The same problem stands for the instp.exe of WSD (need different company
name for each provider)

I created patch that generate different names according to env variable .
Let me know if its ok with and I will send patch for the ics_ver.h file and
that will fix all rc files.


10x
Yossi 

Index: tools/wsdinstall/user/InstallSP.sln
===================================================================
--- tools/wsdinstall/user/InstallSP.sln	(revision 260)
+++ tools/wsdinstall/user/InstallSP.sln	(working copy)
@@ -1,21 +0,0 @@
-Microsoft Visual Studio Solution File, Format Version 8.00
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "InstallSP",
"InstallSP.vcproj", "{B3A2B7A0-1906-413E-A457-8AD2FC5E88BB}"
-	ProjectSection(ProjectDependencies) = postProject
-	EndProjectSection
-EndProject
-Global
-	GlobalSection(SolutionConfiguration) = preSolution
-		Debug = Debug
-		Release = Release
-	EndGlobalSection
-	GlobalSection(ProjectConfiguration) = postSolution
-		{B3A2B7A0-1906-413E-A457-8AD2FC5E88BB}.Debug.ActiveCfg =
Debug|Win32
-		{B3A2B7A0-1906-413E-A457-8AD2FC5E88BB}.Debug.Build.0 =
Debug|Win32
-		{B3A2B7A0-1906-413E-A457-8AD2FC5E88BB}.Release.ActiveCfg =
Release|Win32
-		{B3A2B7A0-1906-413E-A457-8AD2FC5E88BB}.Release.Build.0 =
Release|Win32
-	EndGlobalSection
-	GlobalSection(ExtensibilityGlobals) = postSolution
-	EndGlobalSection
-	GlobalSection(ExtensibilityAddIns) = postSolution
-	EndGlobalSection
-EndGlobal
Index: tools/wsdinstall/user/installsp.c
===================================================================
--- tools/wsdinstall/user/installsp.c	(revision 260)
+++ tools/wsdinstall/user/installsp.c	(working copy)
@@ -44,11 +44,27 @@
 #include <stdio.h>
 
 /* Initialize the LSP's provider path for Infiband Service Provider dll */
+
+
 static const WCHAR *provider_path = L"%SYSTEMROOT%\\system32\\ibwsd.dll";
-static const WCHAR *provider_name = L"SilverStorm Winsock Direct for
InfiniBand";
 static const char *winsock_key_path =
"System\\CurrentControlSet\\Services\\Winsock\\Parameters\\TCP on SAN";
-static const char *silverstorm_key_name = "SilverStorm InfiniBand";
 
+#ifdef COMPANY_NAME_SILVERSTORM
+static const WCHAR *provider_name = L"SilverStorm Winsock Direct for
InfiniBand";
+static const char *winsock_key_name = "SilverStorm InfiniBand";
+#endif
+
+#ifdef COMPANY_NAME_MELLANOX
+static const WCHAR *provider_name = L"Mellanox Winsock Direct for
InfiniBand";
+static const char *winsock_key_name = "Mellanox InfiniBand";
+#endif
+
+#ifdef COMPANY_NAME_OPENIB
+static const WCHAR *provider_name = L"OpenIB Winsock Direct for
InfiniBand";
+static const char *winsock_key_name = "OpenIB InfiniBand";
+#endif
+
+
 /* Unique provider GUID generated with "uuidgen -s" */
 static GUID provider_guid = {
 	/* c943654d-2c84-4db7-af3e-fdf1c5322458 */
@@ -147,7 +163,7 @@
 		REG_OPTION_NON_VOLATILE, (KEY_WRITE | KEY_READ), NULL,
&hkey, NULL );
 	if( reg_error == ERROR_SUCCESS )
 	{
-		reg_error = RegSetValueEx( hkey, silverstorm_key_name, 0,
REG_BINARY,
+		reg_error = RegSetValueEx( hkey, winsock_key_name, 0,
REG_BINARY,
 			(PBYTE)&provider_guid, sizeof(GUID) );
 		if( reg_error == ERROR_SUCCESS )
 		{
@@ -222,7 +238,7 @@
 							 &hkey);
 	if (reg_error == ERROR_SUCCESS) {
 
-		reg_error = RegDeleteValue(hkey, silverstorm_key_name);
+		reg_error = RegDeleteValue(hkey, winsock_key_name);
 		if (reg_error == ERROR_SUCCESS) {
 			/* Force the system to remove the key now. */
 			RegFlushKey(hkey);
Index: tools/wsdinstall/user/makefile
===================================================================
--- tools/wsdinstall/user/makefile	(revision 260)
+++ tools/wsdinstall/user/makefile	(working copy)
@@ -4,4 +4,5 @@
 # that is shared by all the driver components of the Windows NT DDK
 #
 
+!INCLUDE ..\..\..\inc\makefile.inc
 !INCLUDE $(NTMAKEENV)\makefile.def
Index: inc/makefile.inc
===================================================================
--- inc/makefile.inc	(revision 0)
+++ inc/makefile.inc	(revision 0)
@@ -0,0 +1,10 @@
+!if "$(WINIB_COMPANYNAME)" == "SilverStorm"
+USER_C_FLAGS=$(USER_C_FLAGS) -DCOMPANY_NAME_SILVERSTORM
+!  message  Current company name Silverstorm 
+!elseif "$(WINIB_COMPANYNAME)" == "Mellanox"
+USER_C_FLAGS = $(USER_C_FLAGS) -DCOMPANY_NAME_MELLANOX
+!  message  Current company name Mellanox 
+!elseif "$(WINIB_COMPANYNAME)" == ""
+USER_C_FLAGS = $(USER_C_FLAGS) -DCOMPANY_NAME_OPENIB
+!  message  Current company name OpenIB 
+!	endif


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


More information about the ofw mailing list