mirror of
https://github.com/kiwix/libkiwix.git
synced 2026-10-26 02:49:20 -04:00
+ small windows adaptation to the function to get the exe full path
This commit is contained in:
1 parent
17a4c42eb3
commit
b8a13ede0a
1 file changed
+3
@@ -22,6 +22,8 @@
|
||||
#ifdef __APPLE__
|
||||
#include <mach-o/dyld.h>
|
||||
#include <limits.h>
|
||||
#elif _WIN32
|
||||
#include <windows.h>
|
||||
#endif
|
||||
|
||||
#ifndef PATH_MAX
|
||||
@@ -140,6 +142,7 @@ string getExecutablePath() {
|
||||
char binRootPath[PATH_MAX];
|
||||
|
||||
#ifdef _WIN32
|
||||
GetModuleFileName( NULL, binRootPath, PATH_MAX);
|
||||
#elif __APPLE__
|
||||
uint32_t max = (uint32_t)PATH_MAX;
|
||||
_NSGetExecutablePath(binRootPath, &max);
|
||||
|
||||
Reference in new issue
Block a user