[Orxonox-commit 831] r3348 - branches/resource/src/core
rgrieder at orxonox.net
rgrieder at orxonox.net
Sat Jul 25 01:14:30 CEST 2009
Author: rgrieder
Date: 2009-07-25 01:14:30 +0200 (Sat, 25 Jul 2009)
New Revision: 3348
Modified:
branches/resource/src/core/Core.cc
Log:
Fixing a problem for the installed version on windows: Media path is not anymore a config value if you don't start orxonox from the build tree. But you can still temporarily change it or supply a new path as command line argument in any case.
Modified: branches/resource/src/core/Core.cc
===================================================================
--- branches/resource/src/core/Core.cc 2009-07-24 23:10:09 UTC (rev 3347)
+++ branches/resource/src/core/Core.cc 2009-07-24 23:14:30 UTC (rev 3348)
@@ -141,9 +141,13 @@
.description("If true, all random actions are different each time you start the game")
.callback(this, &CoreConfiguration::initializeRandomNumberGenerator);
- SetConfigValue(mediaPathString_, mediaPath_.string())
- .description("Relative path to the game data.")
- .callback(this, &CoreConfiguration::mediaPathChanged);
+ // Only show this config value for development builds
+ if (Core::isDevelopmentRun())
+ {
+ SetConfigValue(mediaPathString_, mediaPath_.string())
+ .description("Relative path to the game data.")
+ .callback(this, &CoreConfiguration::mediaPathChanged);
+ }
}
/**
@@ -198,7 +202,16 @@
*/
void tsetMediaPath(const std::string& path)
{
- ModifyConfigValue(mediaPathString_, tset, path);
+ if (Core::isDevelopmentRun())
+ {
+ ModifyConfigValue(mediaPathString_, tset, path);
+ }
+ else
+ {
+ // Manual 'config' value without the file entry
+ mediaPathString_ = path;
+ this->mediaPathChanged();
+ }
}
void initializeRandomNumberGenerator()
More information about the Orxonox-commit
mailing list