aboutsummaryrefslogtreecommitdiff
path: root/util
Commit message (Collapse)AuthorAge
* Wireshark dissector: correct messed up field namesKahrl2011-12-01
|
* Wireshark dissector: Add TOSERVER_RESPAWN and TOCLIENT_DEATHSCREEN, plus ↵Kahrl2011-12-01
| | | | some failed assertion fix (well, hack).
* minetestmapper: Fix the way ylist is computed, use cStringIO instead of ↵Kahrl2011-09-27
| | | | rolling own Bytestream, remove some artifacts when drawing underground blocks, introduce a --drawunderground switch (defaults to of), 'blocknum' renamed to 'content'.
* minetestmapper speed tweaks (kahrl & JacobF)Perttu Ahola2011-09-26
|
* Add apple color to minetestmapper and fix cactus colorPerttu Ahola2011-09-26
|
* Fix minetestmapper.pyPerttu Ahola2011-09-26
|
* Support Python 2 and 3 in sectors2sqlite.py.Kahrl2011-09-26
|
* Fix processing of blocks below y=0 in sectors2sqlite.py.Kahrl2011-09-26
|
* update minetestmapper so it can read the database alsoJacobF2011-09-16
|
* Updated colors.txt (which is used by minetestmapper)Kahrl2011-09-15
|
* Cull empty lines...JacobF2011-09-04
|
* Files to database converterJacobF2011-09-04
|
* dissector branch: added wireshark dissector minetest.luaKahrl2011-08-25
|
* minetestmapper can be run from any directoryGiuseppe Bilotta2011-08-05
| | | | | If it doesn't find colors.txt locally, it looks for the one in the directory of the script itself.
* updated po update script to detect wgettext and N_Constantin Wenger2011-08-05
|
* * honor environment variables, use utf-8Nils Dagsson Moskopp2011-07-30
|
* * PEP 8 complianceNils Dagsson Moskopp2011-07-30
|
* * support for content types extension in minetestmapperWolfgang Fellger2011-07-30
|
* Merge remote-tracking branch 'origin/upstream'Nils Dagsson Moskopp2011-07-30
|\
| * extended content-type rangePerttu Ahola2011-07-23
| |
* | Bring po update out of cmake againGiuseppe Bilotta2011-07-24
|/ | | | | | | | | | | | | | This solves two issues at once: * CMake would delete po files during ‘make clean’ because it thought they were autogenerated and not just managed * the only gettext tools readily available in Windows are so old they don't support options like --package-name The change also moves minetest.pot down one level, so we don't need to special case ‘en’ anymore. The downside is of course that you need some sane POSIX shell to update the po files.
* added minetestmapper in utils/Perttu Ahola2011-06-25
|
* Reorganizing stuff (import from temporary git repo)Perttu Ahola2011-06-25
std::endl; dstream<<DTIME<<"INFO: sigint_handler(): " <<"Printing debug stacks"<<std::endl; debug_stacks_print(); g_killed = true; } else { (void)signal(SIGINT, SIG_DFL); } } void signal_handler_init(void) { dstream<<"signal_handler_init()"<<std::endl; (void)signal(SIGINT, sigint_handler); } #else // _WIN32 void signal_handler_init(void) { // No-op } #endif /* Path mangler */ std::string path_data = "../data"; std::string path_userdata = "../"; void pathRemoveFile(char *path, char delim) { // Remove filename and path delimiter int i; for(i = strlen(path)-1; i>=0; i--) { if(path[i] == delim) break; } path[i] = 0; } void initializePaths() { #ifdef RUN_IN_PLACE /* Use relative paths if RUN_IN_PLACE */ dstream<<"Using relative paths (RUN_IN_PLACE)"<<std::endl; /* Windows */ #if defined(_WIN32) #include <windows.h> const DWORD buflen = 1000; char buf[buflen]; DWORD len; // Find path of executable and set path_data relative to it len = GetModuleFileName(GetModuleHandle(NULL), buf, buflen); assert(len < buflen); pathRemoveFile(buf, '\\'); // Use "./bin/../data" path_data = std::string(buf) + "/../data"; // Use "./bin/../" path_userdata = std::string(buf) + "/../"; /* Linux */ #elif defined(linux) #include <unistd.h> char buf[BUFSIZ]; memset(buf, 0, BUFSIZ); // Get path to executable assert(readlink("/proc/self/exe", buf, BUFSIZ-1) != -1); pathRemoveFile(buf, '/'); // Use "./bin/../data" path_data = std::string(buf) + "/../data"; // Use "./bin/../" path_userdata = std::string(buf) + "/../"; /* OS X */ #elif defined(__APPLE__) //TODO: Get path of executable. This assumes working directory is bin/ dstream<<"WARNING: Relative path not properly supported on OS X" <<std::endl; path_data = std::string("../data"); path_userdata = std::string("../"); #endif #else // RUN_IN_PLACE /* Use platform-specific paths otherwise */ dstream<<"Using system-wide paths (NOT RUN_IN_PLACE)"<<std::endl; /* Windows */ #if defined(_WIN32) #include <windows.h> const DWORD buflen = 1000; char buf[buflen]; DWORD len; // Find path of executable and set path_data relative to it len = GetModuleFileName(GetModuleHandle(NULL), buf, buflen); assert(len < buflen); pathRemoveFile(buf, '\\'); // Use "./bin/../data" path_data = std::string(buf) + "/../data"; //path_data = std::string(buf) + "/../share/" + APPNAME; // Use "C:\Documents and Settings\user\Application Data\<APPNAME>" len = GetEnvironmentVariable("APPDATA", buf, buflen); assert(len < buflen); path_userdata = std::string(buf) + "/" + APPNAME; /* Linux */ #elif defined(linux) #include <unistd.h> char buf[BUFSIZ]; memset(buf, 0, BUFSIZ); // Get path to executable assert(readlink("/proc/self/exe", buf, BUFSIZ-1) != -1); pathRemoveFile(buf, '/'); path_data = std::string(buf) + "/../share/" + APPNAME; //path_data = std::string(INSTALL_PREFIX) + "/share/" + APPNAME; if (!fs::PathExists(path_data)) { dstream<<"WARNING: data path " << path_data << " not found!"; path_data = std::string(buf) + "/../data"; dstream<<" Trying " << path_data << std::endl; } path_userdata = std::string(getenv("HOME")) + "/." + APPNAME; /* OS X */ #elif defined(__APPLE__) #include <unistd.h> // Code based on // http://stackoverflow.com/questions/516200/relative-paths-not-working-in-xcode-c CFBundleRef main_bundle = CFBundleGetMainBundle();