Changeset 295 for cpp/common/nonstd.h


Ignore:
Timestamp:
01/15/15 22:43:01 (9 years ago)
Author:
Maciej Komosinski
Message:

Reorganizations and extensions of directory/file/filesystem IO classes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cpp/common/nonstd.h

    r286 r295  
    6161#endif
    6262
    63 #ifdef IPHONE
    64  #include <string>
    65  std::string getAppHome();
    66  std::string getAppResources();
    67  #define GET_APP_HOME getAppHome()
    68  #define GET_APP_RESOURCES getAppResources()
    69 #endif
    70 
    71 #ifdef SHP
    72  #define GET_APP_HOME "/Home/"
    73  #define GET_APP_RESOURCES "/Res/"
    74 #endif
    75 
    76 #ifdef TIZEN
    77  #define GET_APP_HOME "/data/"
    78  #define GET_APP_RESOURCES "/res/"
    79 #endif
    80 
    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) locations
    84 #endif
    85 
    86 #ifdef LINUX
    87  #define GET_APP_HOME "./"
    88  #define GET_APP_RESOURCES "./"
    89 #endif
    90 
    91 #ifdef MACOS
    92 #ifdef MACOS_APP_DIR //separate home/resources
    93  #include <string>
    94  std::string getAppHome();
    95  #define GET_APP_HOME getAppHome()
    96 #else //old style
    97  #define GET_APP_HOME "./"
    98 #endif
    99  #define GET_APP_RESOURCES "./"
    100 #endif
    101 
    102 #if defined(_WIN32) && !defined(SHP)
    103     #define GET_APP_HOME ".\\"
    104     #define GET_APP_RESOURCES ".\\"
    105 #endif
    106 
    107 #ifdef INITIAL_DIR_IS_HOME
    108  #include "cwd.h"
    109  #ifdef GET_APP_HOME
    110   #undef GET_APP_HOME
    111  #endif
    112  #define GET_APP_HOME getAppHome()
    113 #endif
    114 
    115 #ifdef INITIAL_DIR_IS_RES
    116  #include "cwd.h"
    117  #ifdef GET_APP_RESOURCES
    118   #undef GET_APP_RESOURCES
    119  #endif
    120  #define GET_APP_RESOURCES getAppResources()
    121 #endif
    122 
    12363//typedef unsigned char boolean; //niestety nie mozna uzyc 'bool' bo VC w rpcndr.h wlasnie tak definiuje booleana, jako unsigned char
    12464//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.