Build viewer/editor #13
2 changed files with 24 additions and 0 deletions
|
@ -95,6 +95,10 @@ SaveTool::SaveTool(const Arguments& arguments):
|
|||
|
||||
_backupsDir = Utility::Directory::join(Utility::Directory::path(Utility::Directory::executableLocation()), "backups");
|
||||
_stagingDir = Utility::Directory::join(Utility::Directory::path(Utility::Directory::executableLocation()), "staging");
|
||||
_armouryDir = Utility::Directory::join(Utility::Directory::path(Utility::Directory::executableLocation()), "armoury");
|
||||
_armoursDir = Utility::Directory::join(_armouryDir, "armours");
|
||||
_weaponsDir = Utility::Directory::join(_armouryDir, "weapons");
|
||||
_stylesDir = Utility::Directory::join(_armouryDir, "styles");
|
||||
|
||||
if(!Utility::Directory::exists(_backupsDir)) {
|
||||
Utility::Directory::mkpath(_backupsDir);
|
||||
|
@ -104,6 +108,22 @@ SaveTool::SaveTool(const Arguments& arguments):
|
|||
Utility::Directory::mkpath(_stagingDir);
|
||||
}
|
||||
|
||||
if(!Utility::Directory::exists(_armouryDir)) {
|
||||
Utility::Directory::mkpath(_armouryDir);
|
||||
}
|
||||
|
||||
if(!Utility::Directory::exists(_armoursDir)) {
|
||||
Utility::Directory::mkpath(_armoursDir);
|
||||
}
|
||||
|
||||
if(!Utility::Directory::exists(_weaponsDir)) {
|
||||
Utility::Directory::mkpath(_weaponsDir);
|
||||
}
|
||||
|
||||
if(!Utility::Directory::exists(_stylesDir)) {
|
||||
Utility::Directory::mkpath(_stylesDir);
|
||||
}
|
||||
|
||||
if(!findGameDataDirectory()) {
|
||||
SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR, "Error initialising the app", _lastError.c_str(), window());
|
||||
exit(EXIT_FAILURE);
|
||||
|
|
|
@ -212,6 +212,10 @@ class SaveTool: public Platform::Sdl2Application, public efsw::FileWatchListener
|
|||
|
||||
std::string _backupsDir;
|
||||
std::string _stagingDir;
|
||||
std::string _armouryDir;
|
||||
std::string _armoursDir;
|
||||
std::string _weaponsDir;
|
||||
std::string _stylesDir;
|
||||
|
||||
enum class GameState : UnsignedByte {
|
||||
Unknown, NotRunning, Running
|
||||
|
|
Loading…
Reference in a new issue