mirror of
https://github.com/ptitSeb/box86.git
synced 2024-11-27 00:40:24 +00:00
feat: add BOX86_RCFILE support (#960)
* feat: try add BOX86_RCFILE support Make box86 support _RCFILE env like box64 https://github.com/ptitSeb/box64/blob/main/src/core.c#L1595 * adjust: comment rcfile loading to avoid crash
This commit is contained in:
parent
24f2c68805
commit
f5f1e1413d
13
src/main.c
13
src/main.c
@ -1202,17 +1202,24 @@ static void add_argv(const char* what) {
|
||||
|
||||
static void load_rcfiles()
|
||||
{
|
||||
char* rcpath = getenv("BOX86_RCFILE");
|
||||
|
||||
if(rcpath && FileExist(rcpath, IS_FILE))
|
||||
LoadRCFile(rcpath);
|
||||
|
||||
#ifndef TERMUX
|
||||
if(FileExist("/etc/box86.box86rc", IS_FILE))
|
||||
else 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))
|
||||
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))
|
||||
else if(FileExist("/mnt/utmp/codeblocks/usr/etc/box86.box86rc", IS_FILE))
|
||||
LoadRCFile("/mnt/utmp/codeblocks/usr/etc/box86.box86rc");
|
||||
#endif
|
||||
// else
|
||||
// LoadRCFile(NULL); // load default rcfile
|
||||
char* p = getenv("HOME");
|
||||
if(p) {
|
||||
char tmp[4096];
|
||||
|
Loading…
Reference in New Issue
Block a user