application path

This commit is contained in:
2025-11-24 14:52:58 +01:00
parent 80ee3fcadf
commit 6cfa0d5a2d
4 changed files with 918 additions and 0 deletions

20
exe_path.cpp Normal file
View File

@@ -0,0 +1,20 @@
#include "exe_path.h"
#include "utils/whereami.h"
#include <iostream>
std::string WhereAmI::containing_folder()
{
int len = wai_getExecutablePath(NULL, 0, NULL);
char *path = static_cast<char *>(malloc(len + 1));
wai_getExecutablePath(path, len, NULL);
path[len] = '\0';
std::string p(path);
std::cout << p << std::endl;
return p;
}
WhereAmI::WhereAmI() {}