Author: mladen.turk(a)jboss.com
Date: 2008-03-25 04:10:18 -0400 (Tue, 25 Mar 2008)
New Revision: 1454
Modified:
trunk/utils/windows/native/service/procrun/NMAKEmgr
trunk/utils/windows/native/service/procrun/apps/prunmgr/prunmgr.h
trunk/utils/windows/native/service/procrun/apps/prunsrv/prunsrv.h
trunk/utils/windows/native/service/procrun/src/cmdline.c
Log:
Allow .CPU file extension to be stripped from the service name. This allows to have
multiple executables in the same root
Modified: trunk/utils/windows/native/service/procrun/NMAKEmgr
===================================================================
--- trunk/utils/windows/native/service/procrun/NMAKEmgr 2008-03-20 20:28:36 UTC (rev
1453)
+++ trunk/utils/windows/native/service/procrun/NMAKEmgr 2008-03-25 08:10:18 UTC (rev
1454)
@@ -32,10 +32,6 @@
LFLAGS = $(LFLAGS) user32.lib gdi32.lib winspool.lib comdlg32.lib comctl32.lib
shlwapi.lib netapi32.lib
INCLUDES = -I$(SRCDIR)\include -I$(SRCDIR)\src -I$(SRCDIR)\apps\prunmgr
-I$(JAVA_HOME)\include -I$(JAVA_HOME)\include\win32
-!IF "$(CPU)" == "I386"
-RCFLAGS = $(RCFLAGS) /d "USE_MANIFEST"
-!ENDIF
-
PDBFLAGS = -Fo$(WORKDIR)\ -Fd$(WORKDIR)\$(PROJECT)-src
OBJECTS = \
$(WORKDIR)\cmdline.obj \
Modified: trunk/utils/windows/native/service/procrun/apps/prunmgr/prunmgr.h
===================================================================
--- trunk/utils/windows/native/service/procrun/apps/prunmgr/prunmgr.h 2008-03-20 20:28:36
UTC (rev 1453)
+++ trunk/utils/windows/native/service/procrun/apps/prunmgr/prunmgr.h 2008-03-25 08:10:18
UTC (rev 1454)
@@ -26,7 +26,7 @@
#undef PRG_VERSION
#define PRG_VERSION "2.0.4.0"
-#define PRG_REGROOT L"JBoss\\JBoss Web 2"
+#define PRG_REGROOT L"JBoss\\JBoss Web Service Wrapper"
#define IDM_TM_EXIT 2000
#define IDM_TM_START 2001
Modified: trunk/utils/windows/native/service/procrun/apps/prunsrv/prunsrv.h
===================================================================
--- trunk/utils/windows/native/service/procrun/apps/prunsrv/prunsrv.h 2008-03-20 20:28:36
UTC (rev 1453)
+++ trunk/utils/windows/native/service/procrun/apps/prunsrv/prunsrv.h 2008-03-25 08:10:18
UTC (rev 1454)
@@ -26,7 +26,7 @@
#undef PRG_VERSION
#define PRG_VERSION "2.0.4.0"
-#define PRG_REGROOT L"JBoss\\JBoss Web 2"
+#define PRG_REGROOT L"JBoss\\JBoss Web Service Wrapper"
#endif /* _PRUNSRV_H */
Modified: trunk/utils/windows/native/service/procrun/src/cmdline.c
===================================================================
--- trunk/utils/windows/native/service/procrun/src/cmdline.c 2008-03-20 20:28:36 UTC (rev
1453)
+++ trunk/utils/windows/native/service/procrun/src/cmdline.c 2008-03-25 08:10:18 UTC (rev
1454)
@@ -20,6 +20,10 @@
#define EXE_SUFFIX L".EXE"
#define EXE_SUFFIXLEN (sizeof(EXE_SUFFIX) / sizeof(WCHAR) - 1)
+#define X86_SUFFIX L".X86"
+#define X64_SUFFIX L".X64"
+#define A64_SUFFIX L".A64"
+
/* Those two are declared in handles.c */
extern LPWSTR *_st_sys_argvw;
extern int _st_sys_argc;
@@ -84,6 +88,20 @@
p = _st_sys_argvw[0] + l - EXE_SUFFIXLEN;
if (lstrcmpiW(p, EXE_SUFFIX) == 0)
*p = L'\0';
+ /* Strip CPU specific suffixes */
+ l = lstrlenW(_st_sys_argvw[0]);
+ if (l > EXE_SUFFIXLEN) {
+ p = _st_sys_argvw[0] + l - EXE_SUFFIXLEN;
+ if (lstrcmpiW(p, X86_SUFFIX) == 0) {
+ *p = L'\0';
+ }
+ else if (lstrcmpiW(p, X64_SUFFIX) == 0) {
+ *p = L'\0';
+ }
+ else if (lstrcmpiW(p, A64_SUFFIX) == 0) {
+ *p = L'\0';
+ }
+ }
if (lpszCommands && _st_sys_argc > 1 && lstrlenW(_st_sys_argvw[1])
> 5) {
if (_st_sys_argvw[1][0] == L'/' &&
_st_sys_argvw[1][1] == L'/' &&
Show replies by date