mirror of
https://github.com/minetest/minetest.git
synced 2024-11-27 10:03:45 +01:00
fixed data path in porting.cpp for normal linux builds to get data from /binary/dir/../share/APPNAME
This commit is contained in:
parent
56918c0ca4
commit
023876dafb
@ -143,8 +143,16 @@ void initializePaths()
|
|||||||
#elif defined(linux)
|
#elif defined(linux)
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
|
char buf[BUFSIZ];
|
||||||
|
// Get path to executable
|
||||||
|
readlink("/proc/self/exe", buf, BUFSIZ);
|
||||||
|
|
||||||
|
pathRemoveFile(buf, '/');
|
||||||
|
|
||||||
|
path_data = std::string(buf) + "/../share/" + APPNAME;
|
||||||
|
//path_data = std::string(INSTALL_PREFIX) + "/share/" + APPNAME;
|
||||||
|
|
||||||
path_userdata = std::string(getenv("HOME")) + "/." + APPNAME;
|
path_userdata = std::string(getenv("HOME")) + "/." + APPNAME;
|
||||||
path_data = std::string(INSTALL_PREFIX) + "/share/" + APPNAME;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
OS X
|
OS X
|
||||||
|
Loading…
Reference in New Issue
Block a user