OpenEnroth 73e68f7
Loading...
Searching...
No Matches
Classes | Functions | Variables
PathResolver.cpp File Reference
#include "PathResolver.h"
#include <string>
#include <vector>
#include <filesystem>
#include "Library/Logger/Logger.h"
#include "Library/Environment/Interface/Environment.h"
#include "Library/FileSystem/Directory/DirectoryFileSystem.h"
#include "Library/FileSystem/Lowercase/LowercaseFileSystem.h"

Classes

struct  PathResolutionConfig
 

Functions

static std::vector< std::string > resolvePaths (Environment *environment, const PathResolutionConfig &config)
 
std::vector< std::string > resolveMm6Paths (Environment *environment)
 
std::vector< std::string > resolveMm7Paths (Environment *environment)
 
std::vector< std::string > resolveMm8Paths (Environment *environment)
 
bool validateMm7Path (std::string_view dataPath, std::string *missingFile)
 
std::string resolveMm7UserPath (Environment *environment)
 

Variables

static const std::vector< std::string_view > globalValidateList
 
static const PathResolutionConfig mm6Config
 
static const PathResolutionConfig mm7Config
 
static const PathResolutionConfig mm8Config
 

Function Documentation

◆ resolveMm6Paths()

std::vector< std::string > resolveMm6Paths ( Environment environment)

◆ resolveMm7Paths()

std::vector< std::string > resolveMm7Paths ( Environment environment)

◆ resolveMm7UserPath()

std::string resolveMm7UserPath ( Environment environment)

◆ resolveMm8Paths()

std::vector< std::string > resolveMm8Paths ( Environment environment)

◆ resolvePaths()

static std::vector< std::string > resolvePaths ( Environment environment,
const PathResolutionConfig config 
)
static

◆ validateMm7Path()

bool validateMm7Path ( std::string_view  dataPath,
std::string *  missingFile 
)

Variable Documentation

◆ globalValidateList

const std::vector<std::string_view> globalValidateList
static
Initial value:
= {
{"anims/magic7.vid"},
{"anims/might7.vid"},
{"data/bitmaps.lod"},
{"data/events.lod"},
{"data/games.lod"},
{"data/icons.lod"},
{"data/sprites.lod"},
{"sounds/audio.snd"}
}

◆ mm6Config

const PathResolutionConfig mm6Config
static
Initial value:
= {
{
"HKEY_LOCAL_MACHINE/SOFTWARE/GOG.com/Games/1207661253/PATH",
"HKEY_LOCAL_MACHINE/SOFTWARE/GOG.com/GOGMM6/PATH",
"HKEY_LOCAL_MACHINE/SOFTWARE/New World Computing/Might and Magic\xC2\xAE VI/1.0/AppPath",
"HKEY_LOCAL_MACHINE/SOFTWARE/WOW6432Node/GOG.com/Games/1207661253/PATH",
"HKEY_LOCAL_MACHINE/SOFTWARE/WOW6432Node/GOG.com/GOGMM6/PATH",
"HKEY_LOCAL_MACHINE/SOFTWARE/WOW6432Node/New World Computing/Might and Magic\xC2\xAE VI/1.0/AppPath"
}
}
constexpr char mm6PathOverrideKey[]
Definition: PathResolver.h:8

◆ mm7Config

const PathResolutionConfig mm7Config
static
Initial value:
= {
{
"HKEY_LOCAL_MACHINE/SOFTWARE/GOG.com/Games/1207658916/Path",
"HKEY_LOCAL_MACHINE/SOFTWARE/GOG.com/GOGMM7/PATH",
"HKEY_LOCAL_MACHINE/SOFTWARE/New World Computing/Might and Magic VII/1.0/AppPath",
"HKEY_LOCAL_MACHINE/SOFTWARE/WOW6432Node/GOG.com/Games/1207658916/Path",
"HKEY_LOCAL_MACHINE/SOFTWARE/WOW6432Node/GOG.com/GOGMM7/PATH",
"HKEY_LOCAL_MACHINE/SOFTWARE/WOW6432Node/New World Computing/Might and Magic VII/1.0/AppPath"
}
}
constexpr char mm7PathOverrideKey[]
Definition: PathResolver.h:9

◆ mm8Config

const PathResolutionConfig mm8Config
static
Initial value:
= {
{
"HKEY_LOCAL_MACHINE/SOFTWARE/GOG.com/GOGMM8/PATH",
"HKEY_LOCAL_MACHINE/SOFTWARE/New World Computing/Might and Magic Day of the Destroyer/1.0/AppPath",
"HKEY_LOCAL_MACHINE/SOFTWARE/WOW6432Node/GOG.com/GOGMM8/PATH",
"HKEY_LOCAL_MACHINE/SOFTWARE/WOW6432Node/New World Computing/Might and Magic Day of the Destroyer/1.0/AppPath"
}
}
constexpr char mm8PathOverrideKey[]
Definition: PathResolver.h:10