jfclere 02/03/21 15:17:25 Modified: daemon/src/native/nt/lib moni_inst.h daemon/src/native/nt/service instmain.c Log: Fix the path detection for the service process. Revision Changes Path 1.3 +8 -8 jakarta-commons-sandbox/daemon/src/native/nt/lib/moni_inst.h Index: moni_inst.h =================================================================== RCS file: /home/cvs/jakarta-commons-sandbox/daemon/src/native/nt/lib/moni_inst.h,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- moni_inst.h 20 Mar 2002 23:39:32 -0000 1.2 +++ moni_inst.h 21 Mar 2002 23:17:25 -0000 1.3 @@ -1,14 +1,14 @@ /* * include for the service installation */ -#define SZAPPNAME "JavaService" -#define SZSERVICENAME "jsvc" // name of service +#define SZAPPNAME "JavaService" +#define SZSERVICENAME "jsvc" // name of service #define SZDEPENDENCIES "" -#define SZSERVICEDISPLAYNAME "Java Service" // name to display -#define SZKEY_ONSERVE "SOFTWARE\\apache\\jakarta\\1.0" -#define SZKEY_ONSERVEARG "SOFTWARE\\apache\\jakarta\\1.0\\arguments" +#define SZSERVICEDISPLAYNAME "Java Service" // name to display +#define SZKEY_ONSERVE "SOFTWARE\\apache\\jakarta\\1.0" +#define SZKEY_ONSERVEARG "SOFTWARE\\apache\\jakarta\\1.0\\arguments" #define SZKEY_F_DIR "F_DIR" -#define SZDEFMONISVCPATH "c:\\home\\jakarta\\bin\\vdmonisvc.exe" -#define SZCYGWINPATH "c:\\gnu" +#define SZDEFMONISVCPATH "\\vdmonisvc.exe" +#define SZCYGWINPATH "c:\\gnu" #define SZJAKARTA_HOME "c:\\home\\jakarta" -#define SZJAVA_HOME "c:\\jdk1.3.1" +#define SZJAVA_HOME "c:\\jdk1.3.1" 1.3 +11 -7 jakarta-commons-sandbox/daemon/src/native/nt/service/instmain.c Index: instmain.c =================================================================== RCS file: /home/cvs/jakarta-commons-sandbox/daemon/src/native/nt/service/instmain.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- instmain.c 20 Mar 2002 23:39:32 -0000 1.2 +++ instmain.c 21 Mar 2002 23:17:25 -0000 1.3 @@ -331,6 +331,7 @@ BOOL done; arg_data *args=NULL; char szPath[512]; + char szExePath[512]; int i; printf( "\r\n - Copyright (c) 2001 The Apache Software Foundation. \r\n"); @@ -359,11 +360,19 @@ } printf( "\r\ninstalling...\r\n\r\n"); + /* get the patch from the executable name */ + for(i=strlen(szPath);i>0;i--) + if (szPath[i]=='\\') { + szPath[i]='\0'; + break; + } + strcpy(szExePath,szPath); + strcat(szExePath,SZDEFMONISVCPATH); /* install jsvcservice.exe as a service */ if (isWindowsNT()) - done = InstallSvcNT(SZDEFMONISVCPATH); + done = InstallSvcNT(szExePath); else - done = InstallSvc(SZDEFMONISVCPATH); + done = InstallSvc(szExePath); if (done) printf( "InstallSvc done\r\n"); @@ -373,11 +382,6 @@ /* install the environment variable in registry */ /* should get it from szPath */ - for(i=strlen(szPath);i>0;i--) - if (szPath[i]=='\\') { - szPath[i]='\0'; - break; - } InstallEnv("JAKARTA_HOME",szPath); InstallEnv("CYGWIN",SZCYGWINPATH); /* need APR to get ride of it */
-- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>