| 18 | #include <sys/types.h> |
| 19 | |
| 20 | static bool GetUserWritableDir(std::string & outDir) |
| 21 | { |
| 22 | char pathBuf[MAX_PATH] = {0}; |
| 23 | if (SUCCEEDED(::SHGetFolderPathA(NULL, CSIDL_LOCAL_APPDATA | CSIDL_FLAG_CREATE, NULL, SHGFP_TYPE_CURRENT, pathBuf))) |
| 24 | { |
| 25 | outDir = pathBuf; |
| 26 | ::CreateDirectoryA(outDir.c_str(), NULL); |
| 27 | outDir += "\\CoMaps\\"; |
| 28 | ::CreateDirectoryA(outDir.c_str(), NULL); |
| 29 | return true; |
| 30 | } |
| 31 | return false; |
| 32 | } |
| 33 | |
| 34 | /// @return Full path to the executable file |
| 35 | static bool GetPathToBinary(std::string & outPath) |