]> git.openfabrics.org - ~shefty/rdma-win.git/commitdiff
{WinOF-WIX] Make sure %PATH% variable gets updated after install.
authorstansmith <stansmith@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Wed, 19 Sep 2007 19:46:45 +0000 (19:46 +0000)
committerstansmith <stansmith@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Wed, 19 Sep 2007 19:46:45 +0000 (19:46 +0000)
git-svn-id: svn://openib.tc.cornell.edu/gen1@804 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86

trunk/tools/nsc/SOURCES [new file with mode: 0644]
trunk/tools/nsc/makefile [new file with mode: 0644]
trunk/tools/nsc/nsc.c [new file with mode: 0644]
trunk/tools/nsc/nsc.rc [new file with mode: 0644]

diff --git a/trunk/tools/nsc/SOURCES b/trunk/tools/nsc/SOURCES
new file mode 100644 (file)
index 0000000..d4401bc
--- /dev/null
@@ -0,0 +1,26 @@
+TARGETNAME=nsc\r
+TARGETPATH=..\..\bin\user\obj$(BUILD_ALT_DIR)\r
+TARGETTYPE=PROGRAM\r
+UMTYPE=console\r
+USE_CRTDLL=1\r
+\r
+SOURCES=nsc.c \\r
+        nsc.rc\r
+\r
+INCLUDES=$(SDK_INC_PATH);\r
+\r
+RCOPTIONS=/I..\..\inc;\r
+\r
+TARGETLIBS=$(SDK_LIB_PATH)\user32.lib $(SDK_LIB_PATH)\ws2_32.lib \r
+\r
+!if $(FREEBUILD)\r
+\r
+!else\r
+C_DEFINES=$(C_DEFINES) -DDEBUG\r
+!endif\r
+\r
+C_DEFINES=$(C_DEFINES) -D__WIN__\r
+\r
+386_STDCALL=0\r
+\r
+\r
diff --git a/trunk/tools/nsc/makefile b/trunk/tools/nsc/makefile
new file mode 100644 (file)
index 0000000..af203a5
--- /dev/null
@@ -0,0 +1,8 @@
+#\r
+# DO NOT EDIT THIS FILE!!!  Edit .\sources. if you want to add a new source\r
+# file to this component.  This file merely indirects to the real make file\r
+# that is shared by all the driver components of the Windows NT DDK\r
+#\r
+\r
+!INCLUDE ..\..\inc\openib.def\r
+\r
diff --git a/trunk/tools/nsc/nsc.c b/trunk/tools/nsc/nsc.c
new file mode 100644 (file)
index 0000000..19d102f
--- /dev/null
@@ -0,0 +1,67 @@
+/*\r
+ * Copyright (c) 2007 Intel Corporation.  All rights reserved.\r
+ *\r
+ * This software is available to you under a choice of one of two\r
+ * licenses.  You may choose to be licensed under the terms of the GNU\r
+ * General Public License (GPL) Version 2, available from the file\r
+ * COPYING in the main directory of this source tree, or the\r
+ * OpenIB.org BSD license below:\r
+ *\r
+ *     Redistribution and use in source and binary forms, with or\r
+ *     without modification, are permitted provided that the following\r
+ *     conditions are met:\r
+ *\r
+ *      - Redistributions of source code must retain the above\r
+ *        copyright notice, this list of conditions and the following\r
+ *        disclaimer.\r
+ *\r
+ *      - Redistributions in binary form must reproduce the above\r
+ *        copyright notice, this list of conditions and the following\r
+ *        disclaimer in the documentation and/or other materials\r
+ *        provided with the distribution.\r
+ *\r
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,\r
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\r
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\r
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS\r
+ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN\r
+ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\r
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\r
+ * SOFTWARE.\r
+ *\r
+ */\r
+\r
+/*\r
+ * broadcast a settings changed message to all top-level windows in the system,\r
+ * including disabled or invisible unowned windows, overlapped windows,\r
+ * and pop-up windows; message is not sent to child windows.\r
+ *\r
+ * Utilized to notify top-level windows that an environment variable has \r
+ * been modified; specifically PATH. Functionality utilized during WinOF\r
+ * installation.\r
+ *\r
+*/\r
+#include <stdio.h>\r
+#include <stdlib.h>\r
+#include <string.h>\r
+#include <windows.h>\r
\r
+int main(int argc, char* argv[])\r
+{\r
+       DWORD dwReturnValue;\r
+       LRESULT rc;\r
\r
+       rc = SendMessageTimeout ( HWND_BROADCAST,\r
+                                 WM_SETTINGCHANGE,\r
+                                 0,\r
+                                 (LPARAM) "Environment",\r
+                                 SMTO_ABORTIFHUNG,\r
+                                 5000,\r
+                                 (PDWORD_PTR)&dwReturnValue );\r
+       if (rc != 1)\r
+               printf("%s() SendMessageTimeout() returns %d\n",\r
+                       __FUNCTION__,rc);\r
+\r
+       return 0;\r
+}\r
+\r
diff --git a/trunk/tools/nsc/nsc.rc b/trunk/tools/nsc/nsc.rc
new file mode 100644 (file)
index 0000000..92df29a
--- /dev/null
@@ -0,0 +1,47 @@
+/*\r
+ * Copyright (c) 2007 Intel Corporation.  All rights reserved.\r
+ *\r
+ * This software is available to you under the OpenIB.org BSD license\r
+ * below:\r
+ *\r
+ *     Redistribution and use in source and binary forms, with or\r
+ *     without modification, are permitted provided that the following\r
+ *     conditions are met:\r
+ *\r
+ *      - Redistributions of source code must retain the above\r
+ *        copyright notice, this list of conditions and the following\r
+ *        disclaimer.\r
+ *\r
+ *      - Redistributions in binary form must reproduce the above\r
+ *        copyright notice, this list of conditions and the following\r
+ *        disclaimer in the documentation and/or other materials\r
+ *        provided with the distribution.\r
+ *\r
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,\r
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\r
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\r
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS\r
+ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN\r
+ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\r
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\r
+ * SOFTWARE.\r
+ *\r
+ * $Id$\r
+ */\r
+\r
+\r
+#include <oib_ver.h>\r
+\r
+#define VER_FILETYPE                   VFT_APP\r
+#define VER_FILESUBTYPE                        VFT2_UNKNOWN\r
+\r
+#if DBG\r
+#define VER_FILEDESCRIPTION_STR                "Broadcast a setting changed message to root windows (Debug)"\r
+#else\r
+#define VER_FILEDESCRIPTION_STR                "Broadcast a setting changed message to root windows"\r
+#endif\r
+\r
+#define VER_INTERNALNAME_STR           "notifychange.exe"\r
+#define VER_ORIGINALFILENAME_STR       "notifychange.exe"\r
+\r
+#include <common.ver>\r