From: Keith F. <ven...@us...> - 2003-06-13 19:09:26
|
Update of /cvsroot/planeshift/planeshift/src/common/util In directory sc8-pr-cvs1:/tmp/cvs-serv2803 Modified Files: pscssetup.cpp Log Message: The psCSSetup class presumed the existence of a CEL env var in order to initialize. This var does not and should not exist or be needed in Windows. I have added a handler for this case which gets the PATH and adds each directory in the PATH to the csAddLibraryPath list. This is in line with the standard way Windows locates dlls and other plugins, and should be ok to use with .csplugin files as well. Index: pscssetup.cpp =================================================================== RCS file: /cvsroot/planeshift/planeshift/src/common/util/pscssetup.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** pscssetup.cpp 12 Jun 2003 04:09:47 -0000 1.2 --- pscssetup.cpp 13 Jun 2003 19:09:23 -0000 1.3 *************** *** 109,115 **** else { ! csReport(object_reg, CS_REPORTER_SEVERITY_WARNING, ! "psclient", "no CEL environment variable set!"); ! return 0; } --- 109,132 ---- else { ! celpath = getenv("PATH"); ! if (celpath) ! { ! char newpath[1024]; ! strcpy(newpath,celpath); //non-read only copy ! char *tok = strtok(newpath,";"); ! while (tok) ! { ! char path[1024]; ! strcpy(path,tok); ! strcat(path,"/"); ! csAddLibraryPath(path); ! strcat(path,"lib/"); ! csAddLibraryPath(path); ! tok = strtok(NULL,";"); ! } ! } ! // csReport(object_reg, CS_REPORTER_SEVERITY_WARNING, ! // "psclient", "no CEL environment variable set!"); ! // return 0; } |