Public Member Functions | |
void | Set (char const *defaultPath) |
sets a default path, for when we have no better idea | |
char const * | Get () const |
Private Attributes | |
tString | path_ |
Definition at line 1368 of file tDirectories.cpp.
void tPathToExecutable::Set | ( | char const * | defaultPath | ) | [inline] |
sets a default path, for when we have no better idea
Definition at line 1372 of file tDirectories.cpp.
References BINDIR, con, and PROGNAME.
Referenced by tDirectoriesCommandLineAnalyzer::DoInitialize().
01373 { 01374 #ifndef WIN32 01375 #ifdef ENABLE_BINRELOC 01376 // get path of executable 01377 char const * bestGuess = SELFPATH; 01378 #else // binreloc 01379 char const * bestGuess = BINDIR "/" PROGNAME; 01380 #endif// binreloc 01381 #else // win32 01382 char const * bestGuess = "./" PROGNAME; 01383 #endif// win32 01384 01385 #ifndef ENABLE_BINRELOC 01386 // if the passed default path is a real path, let it override the best guess 01387 if ( strstr( defaultPath, "/" ) || strstr( defaultPath, "\\" ) ) 01388 bestGuess = defaultPath; 01389 // bestGuess = "./armagetronad-dedicated"; 01390 #endif 01391 01392 path_ = bestGuess; 01393 01394 #ifdef DEBUG_PATH 01395 con << "path to executable: " << path_ << "\n"; 01396 #endif 01397 }
char const* tPathToExecutable::Get | ( | ) | const [inline] |
Definition at line 1400 of file tDirectories.cpp.
References tASSERT.
Referenced by FindDataPath(), and GenerateParentOfExecutable().
tString tPathToExecutable::path_ [private] |
Definition at line 1406 of file tDirectories.cpp.