mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-01-08 04:31:08 -06:00
Feature/filesystem cleanup (#1587)
* Adapting to the changes in Ghoul * First step of moving filesystem functions to std * Remove persistence flag from cachemanager
This commit is contained in:
@@ -38,6 +38,7 @@
|
||||
#include <ghoul/lua/ghoul_lua.h>
|
||||
#include <ghoul/misc/dictionary.h>
|
||||
#include <ghoul/ghoul.h>
|
||||
#include <filesystem>
|
||||
#include <iostream>
|
||||
|
||||
int main(int argc, char** argv) {
|
||||
@@ -54,17 +55,20 @@ int main(int argc, char** argv) {
|
||||
// to make it possible to find other files in the same directory.
|
||||
FileSys.registerPathToken(
|
||||
"${BIN}",
|
||||
ghoul::filesystem::File(absPath(argv[0])).directoryName(),
|
||||
std::filesystem::path(argv[0]).parent_path(),
|
||||
ghoul::filesystem::FileSystem::Override::Yes
|
||||
);
|
||||
|
||||
std::string configFile = configuration::findConfiguration();
|
||||
std::filesystem::path configFile = configuration::findConfiguration();
|
||||
// Register the base path as the directory where 'filename' lives
|
||||
std::string base = ghoul::filesystem::File(configFile).directoryName();
|
||||
std::filesystem::path base = configFile.parent_path();
|
||||
constexpr const char* BasePathToken = "${BASE}";
|
||||
FileSys.registerPathToken(BasePathToken, base);
|
||||
|
||||
*global::configuration = configuration::loadConfigurationFromFile(configFile, "");
|
||||
*global::configuration = configuration::loadConfigurationFromFile(
|
||||
configFile.string(),
|
||||
""
|
||||
);
|
||||
global::openSpaceEngine->registerPathTokens();
|
||||
global::openSpaceEngine->initialize();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user