Added support for configuration file

- BASE_PATH is set using the openspace.cfg file. The binary will look
upwards in the directory hierarchy until it is found.
- All other paths is defined in the configurationfile. Paths may be
absolute or relative using the ${BASE_PATH} token
- Moved SGCT configuration files to its own folder
- Updated tests to support new configuration loading

- TODO: Make the loading of configuration easier for the programmer.
This commit is contained in:
Jonas Strandstedt
2014-04-04 11:00:25 -04:00
parent a27e9a573a
commit 5963920953
17 changed files with 181 additions and 487 deletions

View File

@@ -28,6 +28,7 @@
#include <openspace/interaction/interactionhandler.h>
#include <openspace/rendering/renderengine.h>
#include <ghoul/misc/configurationmanager.h>
#include <ghoul/misc/dictionary.h>
namespace openspace {
@@ -35,14 +36,17 @@ class ScriptEngine;
class OpenSpaceEngine {
public:
static void create(int argc, char** argv, int& newArgc, char**& newArgv);
static void create(int argc, char** argv, std::vector<std::string>& sgctArguments);
static void destroy();
static OpenSpaceEngine& ref();
static bool isInitialized();
bool initialize();
static bool registerFilePaths();
static bool registerPathsFromDictionary(const ghoul::Dictionary& dictionary);
static bool registerBasePathFromConfigurationFile(const std::string& filename);
static bool findConfiguration(std::string& filename) ;
ghoul::ConfigurationManager& configurationManager();
InteractionHandler& interactionHandler();
RenderEngine& renderEngine();