1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-24 22:14:36 +02:00

simulator reads data from the macOS directory

This commit is contained in:
Andrey Filipenkov 2021-03-07 17:21:32 +03:00
parent 2e18299897
commit b8fa692bda
2 changed files with 29 additions and 4 deletions

View File

@ -68,7 +68,7 @@ static_assert(sizeof(bool) == 1, "Bool needs to be 1 byte in size.");
# define VCMI_UNIX
# define VCMI_APPLE
# include "TargetConditionals.h"
# if TARGET_IPHONE_SIMULATOR
# if TARGET_OS_SIMULATOR || TARGET_IPHONE_SIMULATOR
# define VCMI_IOS
# define VCMI_IOS_SIM
# elif TARGET_OS_IPHONE

View File

@ -400,11 +400,36 @@ bfs::path VCMIDirsIOS::userDataPath() const { return {ios_documentsPath()}; }
bfs::path VCMIDirsIOS::userCachePath() const { return {ios_cachesPath()}; }
bfs::path VCMIDirsIOS::userLogsPath() const { return {ios_documentsPath()}; }
std::vector<bfs::path> VCMIDirsIOS::dataPaths() const { return {binaryPath(), userDataPath()}; }
std::vector<bfs::path> VCMIDirsIOS::dataPaths() const
{
return {
#ifdef VCMI_IOS_SIM
// fixme ios
{"/Users/kambala/Library/Application Support/vcmi"},
#endif
binaryPath(),
userDataPath(),
};
}
bfs::path VCMIDirsIOS::libraryPath() const { return {ios_frameworksPath()}; }
bfs::path VCMIDirsIOS::libraryPath() const
{
#ifdef VCMI_IOS_SIM
// fixme ios
return {"/Users/kambala/dev/vcmi/build-sim64/bin/Debug"};
#else
return {ios_frameworksPath()};
#endif
}
// todo ios: place AI libs in subdir?
boost::filesystem::path VCMIDirsIOS::fullLibraryPath(const std::string & desiredFolder, const std::string & baseLibName) const { return libraryPath() / libraryName(baseLibName); }
boost::filesystem::path VCMIDirsIOS::fullLibraryPath(const std::string & desiredFolder, const std::string & baseLibName) const
{
#ifdef VCMI_IOS_SIM
return VCMIDirsApple::fullLibraryPath(desiredFolder, baseLibName);
#else
return libraryPath() / libraryName(baseLibName);
#endif
}
bfs::path VCMIDirsIOS::binaryPath() const { return {ios_bundlePath()}; }
bfs::path VCMIDirsIOS::serverPath() const { return clientPath(); }