Changeset 295 for cpp/common/nonstd.h
- Timestamp:
- 01/15/15 22:43:01 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
cpp/common/nonstd.h
r286 r295 61 61 #endif 62 62 63 #ifdef IPHONE64 #include <string>65 std::string getAppHome();66 std::string getAppResources();67 #define GET_APP_HOME getAppHome()68 #define GET_APP_RESOURCES getAppResources()69 #endif70 71 #ifdef SHP72 #define GET_APP_HOME "/Home/"73 #define GET_APP_RESOURCES "/Res/"74 #endif75 76 #ifdef TIZEN77 #define GET_APP_HOME "/data/"78 #define GET_APP_RESOURCES "/res/"79 #endif80 81 #ifdef __ANDROID__82 #define GET_APP_HOME getAppHome()83 #define GET_APP_RESOURCES "/resrc/" //inside APK, resources are kept in the "assets" subdirectory (in the "res" subdirectory there is no support for subdirectories nor accessing files by name). The prefix /resrc/ is just an indication that lets mfile easily discriminate between HOME (r/w) and RESOURCES (r) locations84 #endif85 86 #ifdef LINUX87 #define GET_APP_HOME "./"88 #define GET_APP_RESOURCES "./"89 #endif90 91 #ifdef MACOS92 #ifdef MACOS_APP_DIR //separate home/resources93 #include <string>94 std::string getAppHome();95 #define GET_APP_HOME getAppHome()96 #else //old style97 #define GET_APP_HOME "./"98 #endif99 #define GET_APP_RESOURCES "./"100 #endif101 102 #if defined(_WIN32) && !defined(SHP)103 #define GET_APP_HOME ".\\"104 #define GET_APP_RESOURCES ".\\"105 #endif106 107 #ifdef INITIAL_DIR_IS_HOME108 #include "cwd.h"109 #ifdef GET_APP_HOME110 #undef GET_APP_HOME111 #endif112 #define GET_APP_HOME getAppHome()113 #endif114 115 #ifdef INITIAL_DIR_IS_RES116 #include "cwd.h"117 #ifdef GET_APP_RESOURCES118 #undef GET_APP_RESOURCES119 #endif120 #define GET_APP_RESOURCES getAppResources()121 #endif122 123 63 //typedef unsigned char boolean; //niestety nie mozna uzyc 'bool' bo VC w rpcndr.h wlasnie tak definiuje booleana, jako unsigned char 124 64 //typedef char byte; //rozne srodowiska c++ definiuja byte jako unsigned char! w javie jest inaczej -> trzeba i tak zmienic w portowanych zrodlach byte na char.
Note: See TracChangeset
for help on using the changeset viewer.