From: Josh T <spa...@us...> - 2006-10-23 16:27:29
|
Update of /cvsroot/sashimi/trans_proteomic_pipeline/src/Visualization/PepXMLViewer In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv21514 Modified Files: PipelineAnalysis.cxx Log Message: Generated links are now based on invoked location of script. For example, if the user wishes to keep a "last-good-config" directory of the TPP tools before an install, this script will now generate appropriate link-outs to the appropriate (previous) version. Index: PipelineAnalysis.cxx =================================================================== RCS file: /cvsroot/sashimi/trans_proteomic_pipeline/src/Visualization/PepXMLViewer/PipelineAnalysis.cxx,v retrieving revision 1.28 retrieving revision 1.29 diff -C2 -d -r1.28 -r1.29 *** PipelineAnalysis.cxx 11 Oct 2006 17:35:32 -0000 1.28 --- PipelineAnalysis.cxx 23 Oct 2006 16:27:22 -0000 1.29 *************** *** 111,118 **** modificationInfo_.clear(); ! generalInfo_["cgiBase"] = CGI_BIN; // TEMP ! generalInfo_["cgiBaseStd"] = CGI_BIN; generalInfo_["cgiName"] = "PepXMLViewer.cgi"; --- 111,136 ---- modificationInfo_.clear(); ! // get the cgiBase (something like "/tpp-jtasman/cgi-bin/" on linux, ! // "/tpp-bin/" on windows, but instead use the actual URL-path that ! // this script is running from; this way, if the script is moved to ! // another dir, like ("oldDir"), all linkouts will be in the same ! // directory. ! ! /* generalInfo_["cgiBase"] = CGI_BIN; */ ! char* envTest = getenv("SCRIPT_NAME"); ! if (envTest == NULL) { ! // throw exception ! throw runtime_error(string("unable to access webserver environmental variable SCRIPT_NAME; check your webserver configuration.")); ! } ! string tmpStr = envTest; ! int slashPos = tmpStr.find_last_of('/'); ! if (slashPos == string::npos) { ! // throw exception ! throw runtime_error(string("unable to parse webserver environmental variable SCRIPT_NAME; check your webserver configuration.")); ! } ! generalInfo_["cgiBase"] = tmpStr.substr(0, slashPos+1); // +1 to include the slash character // TEMP ! generalInfo_["cgiBaseStd"] = generalInfo_["cgiBase"]; generalInfo_["cgiName"] = "PepXMLViewer.cgi"; |