File tree Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Original file line number Diff line number Diff line change 1+ #include <TargetConditionals.h>
2+
3+ #if TARGET_OS_IPHONE
4+
15#include <libroot/libroot.h>
26
37#ifdef XINA_SUPPORT
@@ -9,3 +13,23 @@ _Pragma("message(\"'XINA_SUPPORT' is deprecated. libroot will now handle this fo
913
1014#define ROOT_PATH_NS (nsPath ) JBROOT_PATH_NSSTRING(nsPath)
1115#define ROOT_PATH_NS_VAR (nsPath ) JBROOT_PATH_NSSTRING(nsPath)
16+
17+ #else
18+
19+ // no libroot support
20+
21+ #include <sys/syslimits.h>
22+ #include <string.h>
23+
24+ #define ROOT_PATH (cPath ) THEOS_PACKAGE_INSTALL_PREFIX cPath
25+ #define ROOT_PATH_NS (path ) @THEOS_PACKAGE_INSTALL_PREFIX path
26+
27+ #define ROOT_PATH_NS_VAR (path ) [@THEOS_PACKAGE_INSTALL_PREFIX stringByAppendingPathComponent:path]
28+ #define ROOT_PATH_VAR (path ) sizeof(THEOS_PACKAGE_INSTALL_PREFIX) > 1 ? ({ \
29+ char outPath[PATH_MAX]; \
30+ strlcpy(outPath, THEOS_PACKAGE_INSTALL_PREFIX, PATH_MAX); \
31+ strlcat(outPath, path, PATH_MAX); \
32+ outPath; \
33+ }) : path
34+
35+ #endif
You can’t perform that action at this time.
0 commit comments