Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add BOX86_RCFILE support #960

Merged
merged 2 commits into from
Apr 30, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 10 additions & 3 deletions src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
ptitSeb marked this conversation as resolved.
Show resolved Hide resolved
char* p = getenv("HOME");
if(p) {
char tmp[4096];
Expand Down
Loading