From: Oliver O. <fr...@us...> - 2007-03-30 03:43:22
|
Update of /cvsroot/simspark/simspark/spark/zeitgeist/scriptserver In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv18478 Modified Files: Tag: projectx scriptserver.cpp Log Message: - replaced config.h by sparkconfig.h - pathname changes due to changes in file classes - fixed pkgdatadir Index: scriptserver.cpp =================================================================== RCS file: /cvsroot/simspark/simspark/spark/zeitgeist/scriptserver/scriptserver.cpp,v retrieving revision 1.2.2.4.2.1 retrieving revision 1.2.2.4.2.2 diff -C2 -d -r1.2.2.4.2.1 -r1.2.2.4.2.2 *** scriptserver.cpp 7 Mar 2007 09:39:30 -0000 1.2.2.4.2.1 --- scriptserver.cpp 30 Mar 2007 03:43:18 -0000 1.2.2.4.2.2 *************** *** 33,44 **** #ifdef HAVE_CONFIG_H ! /* The include search path includes config.h of ruby as well. My system shows a strange behavior ! when resolving the search paths: ! using - include <config.h> - *before* the rubywrapper includes the correct file (our config.h) ! using - include <config.h> - *after* the rubywrapper includes the ruby - config.h ! using the same line before *and* after the rubywrapper includes the correct file before the rubywrapper, ! and the wrong one after.... :-( ! */ ! #include "../config.h" #endif --- 33,37 ---- #ifdef HAVE_CONFIG_H ! #include <sparkconfig.h> #endif *************** *** 256,260 **** rb_define_global_function("dirs", RUBY_METHOD_FUNC(dirs), 0); ! mRelPathPrefix = string("..") + salt::PathSeparator + ".." + salt::PathSeparator; } --- 249,253 ---- rb_define_global_function("dirs", RUBY_METHOD_FUNC(dirs), 0); ! mRelPathPrefix = string("..") + salt::RFile::Sep() + ".." + salt::RFile::Sep(); } *************** *** 484,488 **** { // run the init script in the sourceDir ! string sourcePath = sourceDir + salt::PathSeparator + name; GetLog()->Debug() << "(ScriptServer) Running " << sourcePath << "... "; --- 477,481 ---- { // run the init script in the sourceDir ! string sourcePath = sourceDir + salt::RFile::Sep() + name; GetLog()->Debug() << "(ScriptServer) Running " << sourcePath << "... "; *************** *** 507,511 **** } ! string destPath = destDir + salt::PathSeparator + name; GetLog()->Normal() << "Copying " << sourcePath --- 500,504 ---- } ! string destPath = destDir + salt::RFile::Sep() + name; GetLog()->Normal() << "Copying " << sourcePath *************** *** 542,546 **** } ! dotDir = string(home) + salt::PathSeparator + mDotName; return true; } --- 535,539 ---- } ! dotDir = string(home) + salt::RFile::Sep() + mDotName; return true; } *************** *** 600,613 **** CreateDotDir(dotDir); ! #ifdef WIN32 ! string pkgdatadir = ".\\"; ! #else ! // some macro magic (not at all) ! string pkgdatadir = PREFIX "/share/" PACKAGE_NAME; ! ! //std::cout << "dotDir = " << dotDir << std::endl; ! //std::cout << "pkgdatadir = " << pkgdatadir << std::endl; ! //std::cout << "filename = " << fileName << std::endl; #endif ERunScriptErrorType result = eNotFound; --- 593,602 ---- CreateDotDir(dotDir); ! // get the (OS specific) path to the script directory ! string pkgdatadir = salt::RFile::BundlePath(); ! #if __APPLE__ ! pkgdatadir += "Contents/Resources/"; #endif + std::cerr << "Getting scripts at " << pkgdatadir << "\n"; ERunScriptErrorType result = eNotFound; *************** *** 621,625 **** { GetLog()->Debug() << "(ScriptServer) : Ran init script '" ! << dotDir << salt::PathSeparator << fileName << "'\n"; return true; } --- 610,614 ---- { GetLog()->Debug() << "(ScriptServer) : Ran init script '" ! << dotDir << salt::RFile::Sep() << fileName << "'\n"; return true; } *************** *** 628,637 **** { GetLog()->Debug() << "(ScriptServer) : Did not find init script '" ! << dotDir << salt::PathSeparator << fileName << "'\n"; } else if (result == eError) { GetLog()->Error() << "(ScriptServer) ERROR: Found error in init script '" ! << dotDir << salt::PathSeparator << fileName << "'\n"; return false; } --- 617,626 ---- { GetLog()->Debug() << "(ScriptServer) : Did not find init script '" ! << dotDir << salt::RFile::Sep() << fileName << "'\n"; } else if (result == eError) { GetLog()->Error() << "(ScriptServer) ERROR: Found error in init script '" ! << dotDir << salt::RFile::Sep() << fileName << "'\n"; return false; } *************** *** 644,648 **** { GetLog()->Debug() << "(ScriptServer) : Ran init script '" ! << pkgdatadir << salt::PathSeparator << fileName << "'\n"; return true; } --- 633,637 ---- { GetLog()->Debug() << "(ScriptServer) : Ran init script '" ! << pkgdatadir << salt::RFile::Sep() << fileName << "'\n"; return true; } *************** *** 651,660 **** { GetLog()->Debug() << "(ScriptServer) : Did not find init script '" ! << pkgdatadir << salt::PathSeparator << fileName << "'\n"; } else if (result == eError) { GetLog()->Error() << "(ScriptServer) ERROR: Found error in init script '" ! << pkgdatadir << salt::PathSeparator << fileName << "'\n"; } --- 640,649 ---- { GetLog()->Debug() << "(ScriptServer) : Did not find init script '" ! << pkgdatadir << salt::RFile::Sep() << fileName << "'\n"; } else if (result == eError) { GetLog()->Error() << "(ScriptServer) ERROR: Found error in init script '" ! << pkgdatadir << salt::RFile::Sep() << fileName << "'\n"; } *************** *** 670,674 **** { GetLog()->Error() << "(ScriptServer) ERROR: Found error in init script '" ! << mRelPathPrefix+relPath << salt::PathSeparator << fileName << "'\n"; } --- 659,663 ---- { GetLog()->Error() << "(ScriptServer) ERROR: Found error in init script '" ! << mRelPathPrefix+relPath << salt::RFile::Sep() << fileName << "'\n"; } |