mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-22 23:30:14 +00:00
Add Windows build support via MSYS2 and fix platform-specific code
Guard X11 display crash handler with __linux__, add Windows GlobalMemoryStatusEx path in memory_monitor, guard warden cache paths with APPDATA on Windows, and make pkg-config optional in CMakeLists with a find_library fallback. Add Windows x86-64 CI job using MSYS2 MINGW64 to the build workflow.
This commit is contained in:
parent
02fd0166e9
commit
cb01821d89
6 changed files with 125 additions and 16 deletions
|
|
@ -906,13 +906,18 @@ bool WardenModule::initializeModule() {
|
|||
// ============================================================================
|
||||
|
||||
WardenModuleManager::WardenModuleManager() {
|
||||
// Set cache directory: ~/.local/share/wowee/warden_cache/
|
||||
const char* home = std::getenv("HOME");
|
||||
if (home) {
|
||||
// Set cache directory
|
||||
#ifdef _WIN32
|
||||
if (const char* appdata = std::getenv("APPDATA"))
|
||||
cacheDirectory_ = std::string(appdata) + "\\wowee\\warden_cache";
|
||||
else
|
||||
cacheDirectory_ = ".\\warden_cache";
|
||||
#else
|
||||
if (const char* home = std::getenv("HOME"))
|
||||
cacheDirectory_ = std::string(home) + "/.local/share/wowee/warden_cache";
|
||||
} else {
|
||||
else
|
||||
cacheDirectory_ = "./warden_cache";
|
||||
}
|
||||
#endif
|
||||
|
||||
// Create cache directory if it doesn't exist
|
||||
std::filesystem::create_directories(cacheDirectory_);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue