2010-05-10 03:12:24 +00:00
|
|
|
#include "AppConfig.h"
|
|
|
|
#include "PathUtils.h"
|
|
|
|
|
2019-10-17 21:06:53 -04:00
|
|
|
#define BASE_DATA_PATH ("PsfPlayer Data Files")
|
|
|
|
#define CONFIG_FILENAME ("config.xml")
|
2010-05-10 03:12:24 +00:00
|
|
|
|
2018-04-30 21:01:23 +01:00
|
|
|
CAppConfig::CAppConfig()
|
|
|
|
: CConfig(BuildConfigPath())
|
2010-05-10 03:12:24 +00:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2023-08-31 11:11:04 -04:00
|
|
|
Framework::CConfig::PathType CAppConfig::BuildConfigPath()
|
2010-05-10 03:12:24 +00:00
|
|
|
{
|
2023-08-31 11:11:04 -04:00
|
|
|
return GetBasePath() / CONFIG_FILENAME;
|
2010-05-10 03:12:24 +00:00
|
|
|
}
|
|
|
|
|
2023-08-31 11:11:04 -04:00
|
|
|
CAppConfigBasePath::CAppConfigBasePath()
|
2010-05-10 03:12:24 +00:00
|
|
|
{
|
2023-08-31 11:11:04 -04:00
|
|
|
m_basePath = Framework::PathUtils::GetPersonalDataPath() / BASE_DATA_PATH;
|
|
|
|
Framework::PathUtils::EnsurePathExists(m_basePath);
|
2010-05-10 03:12:24 +00:00
|
|
|
}
|
|
|
|
|
2023-08-31 11:11:04 -04:00
|
|
|
fs::path CAppConfigBasePath::GetBasePath() const
|
2010-05-10 03:12:24 +00:00
|
|
|
{
|
2023-08-31 11:11:04 -04:00
|
|
|
return m_basePath;
|
2010-05-10 03:12:24 +00:00
|
|
|
}
|