159 lines
4.7 KiB
C++
159 lines
4.7 KiB
C++
#ifndef PATHS_HPP
|
|
#define PATHS_HPP
|
|
|
|
#include <vector>
|
|
#include <array>
|
|
#include <map>
|
|
#include <string>
|
|
#include <openssl/md5.h> /* md5sum */
|
|
|
|
#include "generic.hpp"
|
|
#include "backup.hpp"
|
|
#include "calibrate.hpp"
|
|
#include "calibratetext.hpp"
|
|
|
|
const std::string FERAL_PREFIX = "/.local/share/feral-interactive/Empire/";
|
|
const std::string STEAM_PREFIX = "/.local/share/Steam/steamapps/common/Empire\ Total\ War/";
|
|
const std::string MAIN_CAMPAIGN = "data/campaigns/main";
|
|
const std::string GLOBAL_MAP = "data/campaign_maps/global_map";
|
|
|
|
const std::map<std::string, std::string> PATH_MD5_MAP =
|
|
{
|
|
{FERAL_PREFIX + "AppData/scripts/preferences.empire_script.txt",
|
|
"5d064a6cfdc35f4714fd31d5d99735d0"},
|
|
{FERAL_PREFIX + "preferences",
|
|
"a0f283d89d97a00011f292cc8f9c0d24"},
|
|
{STEAM_PREFIX + MAIN_CAMPAIGN + "/" + "scripting.lua",
|
|
"89b18f2c2c3f98b6fed7ed7ae4e3e4f9"},
|
|
{STEAM_PREFIX + MAIN_CAMPAIGN + "/" + "startpos.esf",
|
|
"084b14b4174b93c6489422fe33dc7b2b"},
|
|
{STEAM_PREFIX + GLOBAL_MAP + "/" + "america_lookup.tga",
|
|
"086f52fb74d2d0c03ef4e0a969fac4d9"},
|
|
{STEAM_PREFIX + GLOBAL_MAP + "/" + "america_map.tga",
|
|
"92569145991bb8c1937769f023264fbb"},
|
|
{STEAM_PREFIX + GLOBAL_MAP + "/" + "brazil_map.tga",
|
|
"c77b3468113aae3e1ebf43d0a2279986"},
|
|
{STEAM_PREFIX + GLOBAL_MAP + "/" + "east_indies_lookup.tga",
|
|
"98f9a1c82a9fbf2ce15aa9c37eb5735c"},
|
|
{STEAM_PREFIX + GLOBAL_MAP + "/" + "east_indies_map.tga",
|
|
"c15c8e4db971585dce18f764db084f2c"},
|
|
{STEAM_PREFIX + GLOBAL_MAP + "/" + "europe_lookup.tga",
|
|
"62c929e8849b77b3d3060bdd448fe0db"},
|
|
{STEAM_PREFIX + GLOBAL_MAP + "/" + "europe_map.tga",
|
|
"dd31679ed17096692475dad452c2d2c5"},
|
|
{STEAM_PREFIX + GLOBAL_MAP + "/" + "india_lookup.tga",
|
|
"a731bf4b7574ad3abf4cbbff0873880d"},
|
|
{STEAM_PREFIX + GLOBAL_MAP + "/" + "india_map.tga",
|
|
"6a69c2b16c421aabc642396a8f5ecf48"},
|
|
{STEAM_PREFIX + GLOBAL_MAP + "/" + "ivory_coast_map.tga",
|
|
"e03faec4549366c5d6df0e37e37e9c28"},
|
|
{STEAM_PREFIX + GLOBAL_MAP + "/" + "madagascar_map.tga",
|
|
"46788119db0b0c3e79d307f7005dbac4"},
|
|
{STEAM_PREFIX + GLOBAL_MAP + "/" + "stratradar_america.tga",
|
|
"84648966d1ad44ae072b698dc0e311d4"},
|
|
{STEAM_PREFIX + GLOBAL_MAP + "/" + "stratradar_brazil.tga",
|
|
"c77b3468113aae3e1ebf43d0a2279986"},
|
|
{STEAM_PREFIX + GLOBAL_MAP + "/" + "stratradar_east_indies.tga",
|
|
"c15c8e4db971585dce18f764db084f2c"},
|
|
{STEAM_PREFIX + GLOBAL_MAP + "/" + "stratradar_europe.tga",
|
|
"b95431493f9a1078c013efb627cfe12a"},
|
|
{STEAM_PREFIX + GLOBAL_MAP + "/" + "stratradar_india.tga",
|
|
"e25d189f93fa3761a48a033d0818176a"},
|
|
{STEAM_PREFIX + GLOBAL_MAP + "/" + "stratradar_ivory_coast.tga",
|
|
"e03faec4549366c5d6df0e37e37e9c28"},
|
|
{STEAM_PREFIX + GLOBAL_MAP + "/" + "stratradar_madagascar.tga",
|
|
"46788119db0b0c3e79d307f7005dbac4"},
|
|
{STEAM_PREFIX + GLOBAL_MAP + "/" + "pathfinding.esf",
|
|
"d3cd17af453c9aaa5dd64dfeb8499585"},
|
|
{STEAM_PREFIX + GLOBAL_MAP + "/" + "poi.esf",
|
|
"57d6dac4b3c39587819607fce460e00e"},
|
|
{STEAM_PREFIX + GLOBAL_MAP + "/" + "regions.esf",
|
|
"e30d0b9873fad972d490a7cacb039ea9"},
|
|
{STEAM_PREFIX + GLOBAL_MAP + "/" + "sea_grids.esf",
|
|
"ebd02a0e4f39e07816054445cbd59d3d"},
|
|
{STEAM_PREFIX + GLOBAL_MAP + "/" + "trade_routes.esf",
|
|
"dd853d15992a5c0f15da0cdd6ac443c1"}
|
|
};
|
|
|
|
const Generic INSTALLED =
|
|
{
|
|
"/.local/share/etw-lmm/installed.csv"
|
|
};
|
|
|
|
const CalibrateText EMPIRE_SCRIPT =
|
|
{
|
|
"~" + FERAL_PREFIX + "AppData/scripts/preferences.empire_script.txt",
|
|
"fbf65ef80563e0bd76836c150e49ecd0",
|
|
"write_preferences_at_exit true",
|
|
"write_preferences_at_exit false",
|
|
UCS2
|
|
};
|
|
|
|
const CalibrateText PREFERENCES =
|
|
{
|
|
"~" + FERAL_PREFIX + "preferences",
|
|
"1d7c5d84f79a3d361bfa7c608b71d8c8",
|
|
"\"UsePBOSurfaces\" type=\"integer\">1",
|
|
"\"UsePBOSurfaces\" type=\"integer\">0",
|
|
NORMAL
|
|
};
|
|
|
|
const std::array<CalibrateText, 2> CALIB_VERIFY_ARR =
|
|
{
|
|
EMPIRE_SCRIPT,
|
|
PREFERENCES
|
|
};
|
|
|
|
const std::vector<std::string> MAIN_CAMPAIGN_PATH_VEC =
|
|
{
|
|
"scripting.lua",
|
|
"startpos.esf"
|
|
};
|
|
|
|
const std::vector<std::string> GLOBAL_MAP_PATH_VEC =
|
|
{
|
|
"america_lookup.tga",
|
|
"america_map.tga",
|
|
"brazil_map.tga",
|
|
"east_indies_lookup.tga",
|
|
"east_indies_map.tga",
|
|
"europe_lookup.tga",
|
|
"europe_map.tga",
|
|
"india_lookup.tga",
|
|
"india_map.tga",
|
|
"ivory_coast_map.tga",
|
|
"madagascar_map.tga",
|
|
"stratradar_america.tga",
|
|
"stratradar_brazil.tga",
|
|
"stratradar_east_indies.tga",
|
|
"stratradar_europe.tga",
|
|
"stratradar_india.tga",
|
|
"stratradar_ivory_coast.tga",
|
|
"stratradar_madagascar.tga",
|
|
"pathfinding.esf",
|
|
"poi.esf",
|
|
"regions.esf",
|
|
"sea_grids.esf",
|
|
"trade_routes.esf"
|
|
};
|
|
|
|
const Backup MAIN_CAMPAIGN_BACKUP =
|
|
{
|
|
STEAM_PREFIX + "data/campaigns/main",
|
|
MAIN_CAMPAIGN_PATH_VEC
|
|
};
|
|
|
|
const Backup GLOBAL_MAP_BACKUP =
|
|
{
|
|
STEAM_PREFIX + "data/campaign_maps/global_map",
|
|
GLOBAL_MAP_PATH_VEC
|
|
};
|
|
|
|
const std::array<Backup, 2> BACKUP_ARR =
|
|
{
|
|
MAIN_CAMPAIGN_BACKUP,
|
|
GLOBAL_MAP_BACKUP
|
|
};
|
|
|
|
#endif
|