mirror of https://github.com/kiwix/libkiwix.git
+ small windows adaptation to the function to get the exe full path
This commit is contained in:
parent
17a4c42eb3
commit
b8a13ede0a
|
@ -22,6 +22,8 @@
|
||||||
#ifdef __APPLE__
|
#ifdef __APPLE__
|
||||||
#include <mach-o/dyld.h>
|
#include <mach-o/dyld.h>
|
||||||
#include <limits.h>
|
#include <limits.h>
|
||||||
|
#elif _WIN32
|
||||||
|
#include <windows.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef PATH_MAX
|
#ifndef PATH_MAX
|
||||||
|
@ -140,6 +142,7 @@ string getExecutablePath() {
|
||||||
char binRootPath[PATH_MAX];
|
char binRootPath[PATH_MAX];
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
|
GetModuleFileName( NULL, binRootPath, PATH_MAX);
|
||||||
#elif __APPLE__
|
#elif __APPLE__
|
||||||
uint32_t max = (uint32_t)PATH_MAX;
|
uint32_t max = (uint32_t)PATH_MAX;
|
||||||
_NSGetExecutablePath(binRootPath, &max);
|
_NSGetExecutablePath(binRootPath, &max);
|
||||||
|
|
Loading…
Reference in New Issue