Skip to content

Commit

Permalink
Ensure persitent data directory exists
Browse files Browse the repository at this point in the history
  • Loading branch information
psiberx committed May 16, 2024
1 parent 241d0b3 commit 86b22b7
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/App/Project.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@ constexpr auto Author = "psiberx";
constexpr auto NameW = L"Codeware";
constexpr auto AuthorW = L"psiberx";

constexpr auto Version = semver::from_string_noexcept("1.9.4").value();
constexpr auto Version = semver::from_string_noexcept("1.9.5").value();
}
9 changes: 9 additions & 0 deletions src/App/Scripting/ScriptingService.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,15 @@ constexpr auto scnChatterTypeName = Red::CName("scnChatter");
App::ScriptingService::ScriptingService(const std::filesystem::path& aStateDir)
{
s_stateDir = aStateDir;

std::error_code error;
if (!std::filesystem::exists(s_stateDir, error))
{
if (!std::filesystem::create_directories(s_stateDir, error))
{
LogError("Cannot create directory \"{}\" for persistent data: {}.", s_stateDir.string(), error.message());
}
}
}

void App::ScriptingService::OnBootstrap()
Expand Down
8 changes: 4 additions & 4 deletions src/App/Version.rc
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#define VER_PRODUCTVERSION 1,9,4,0
#define VER_FILEVERSION 1,9,4,2405161113
#define VER_PRODUCTVERSION 1,9,5,0
#define VER_FILEVERSION 1,9,5,2405161440

#define VER_PRODUCTNAME_STR "Codeware\0"
#define VER_PRODUCTVERSION_STR "1.9.4\0"
#define VER_FILEVERSION_STR "1.9.4.2405161113\0"
#define VER_PRODUCTVERSION_STR "1.9.5\0"
#define VER_FILEVERSION_STR "1.9.5.2405161440\0"

1 VERSIONINFO
FILEVERSION VER_FILEVERSION
Expand Down
2 changes: 1 addition & 1 deletion xmake.lua
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
set_xmakever("2.5.9")

set_project("Codeware")
set_version("1.9.4", {build = "%y%m%d%H%M"})
set_version("1.9.5", {build = "%y%m%d%H%M"})

set_arch("x64")
set_languages("cxx2a")
Expand Down

0 comments on commit 86b22b7

Please sign in to comment.