[Orxonox-commit 2919] r7622 - code/branches/ois_update/src/libraries/core
youngk at orxonox.net
youngk at orxonox.net
Sat Nov 6 16:50:15 CET 2010
Author: youngk
Date: 2010-11-06 16:50:15 +0100 (Sat, 06 Nov 2010)
New Revision: 7622
Modified:
code/branches/ois_update/src/libraries/core/PathConfig.cc
Log:
Adjusted the executable path handling for Apple. Please test with other OSes.
Modified: code/branches/ois_update/src/libraries/core/PathConfig.cc
===================================================================
--- code/branches/ois_update/src/libraries/core/PathConfig.cc 2010-11-06 14:05:53 UTC (rev 7621)
+++ code/branches/ois_update/src/libraries/core/PathConfig.cc 2010-11-06 15:50:15 UTC (rev 7622)
@@ -89,9 +89,10 @@
#ifdef ORXONOX_PLATFORM_WINDOWS
// get executable module
TCHAR buffer[1024];
- if (GetModuleFileName(NULL, buffer, 1024) == 0)
+ if (GetModuleFileName(NULL, buffer, 1024) == 0){
ThrowException(General, "Could not retrieve executable path.");
-
+ }
+
#elif defined(ORXONOX_PLATFORM_APPLE)
char buffer[1024];
uint32_t path_len = 1023;
@@ -125,14 +126,14 @@
#endif
executablePath_ = bf::path(buffer);
-#ifndef ORXONOX_PLATFORM_APPLE
+//#ifndef ORXONOX_PLATFORM_APPLE
executablePath_ = executablePath_.branch_path(); // remove executable name
-#endif
-
+//#endif
+
/////////////////////
// SET MODULE PATH //
/////////////////////
-
+
if (bf::exists(executablePath_ / "orxonox_dev_build.keep_me"))
{
COUT(1) << "Running from the build tree." << std::endl;
More information about the Orxonox-commit
mailing list