working on chunk generation

This commit is contained in:
2025-05-09 09:37:23 +02:00
parent 2336835250
commit 8c94d86fd4
18 changed files with 242 additions and 155 deletions

20
Application/Utils.h git.filemode.normal_file
View File

@@ -0,0 +1,20 @@
#ifndef UTILS_H
#define UTILS_H
#include <unistd.h>
#include <climits>
#include <filesystem>
inline std::filesystem::path GetExecutablePath()
{
char result[PATH_MAX];
ssize_t count = readlink("/proc/self/exe", result, PATH_MAX);
return std::string(result, (count > 0) ? count : 0);
}
inline std::filesystem::path GetResourcesPath()
{
return GetExecutablePath().parent_path().parent_path() / "Resources";
}
#endif