diff --git a/src/main.c b/src/main.c index 83b60a2f6..94e0b736e 100644 --- a/src/main.c +++ b/src/main.c @@ -957,6 +957,7 @@ void LoadEnvVars(box86context_t *context) AddPath("/mnt/utmp/box86/lib/i386-linux-gnu", &context->box86_ld_lib, 1); //TODO: add relative path to box86 location #endif +#ifndef TERMUX if(FileExist("/lib/box86", 0)) AddPath("/lib/box86", &context->box86_ld_lib, 1); if(FileExist("/usr/lib/box86", 0)) @@ -971,6 +972,12 @@ void LoadEnvVars(box86context_t *context) AddPath("/usr/lib/i686-pc-linux-gnu", &context->box86_ld_lib, 1); if(FileExist("/usr/lib32", 0)) AddPath("/usr/lib32", &context->box86_ld_lib, 1); +#else + if(FileExist("/data/data/com.termux/files/usr/lib/i386-linux-gnu", 0)) + AddPath("/data/data/com.termux/files/usr/lib/i386-linux-gnu", &context->box86_ld_lib, 1); + if(FileExist("/data/data/com.termux/files/usr/lib/i686-linux-gnu", 0)) + AddPath("/data/data/com.termux/files/usr/lib/i686-linux-gnu", &context->box86_ld_lib, 1); +#endif if(getenv("LD_LIBRARY_PATH")) PrependList(&context->box86_ld_lib, getenv("LD_LIBRARY_PATH"), 1); // in case some of the path are for x86 world if(getenv("BOX86_EMULATED_LIBS")) { @@ -1180,8 +1187,13 @@ void endBox86() static void load_rcfiles() { + #ifndef TERMUX if(FileExist("/etc/box86.box86rc", IS_FILE)) LoadRCFile("/etc/box86.box86rc"); + #else + if(FileExist("/data/data/com.termux/files/usr/etc/box86.box86rc", IS_FILE)) + LoadRCFile("/data/data/com.termux/files/usr/etc/box86.box86rc"); + #endif #ifdef PANDORA if(FileExist("/mnt/utmp/codeblocks/usr/etc/box86.box86rc", IS_FILE)) LoadRCFile("/mnt/utmp/codeblocks/usr/etc/box86.box86rc");