This commit is contained in:
kelson42 committed 2011-12-12 14:49:49 +00:00
1 parent faff227365
commit 4b545b8ae2
2 files changed
+13

No files matched your search

+11
View File
@@ -125,3 +125,14 @@ bool copyFile(const string &sourcePath, const string &destPath) {
return true;
}
string getExecutablePath() {
char binRootPath[PATH_MAX];
#ifdef _WIN32
#else
readlink("/proc/self/exe", binRootPath, PATH_MAX);
#endif
return std::string(binRootPath);
}