2021-02-07 21:39:18 +01:00
|
|
|
diff -uNr radare2-5.1.0/libr/core/cconfig.c radare2-5.1.0.mod/libr/core/cconfig.c
|
|
|
|
--- radare2-5.1.0/libr/core/cconfig.c 2021-01-25 14:41:12.000000000 +0000
|
|
|
|
+++ radare2-5.1.0.mod/libr/core/cconfig.c 2021-02-07 20:42:14.734203399 +0000
|
|
|
|
@@ -3070,7 +3070,7 @@
|
2019-09-18 15:17:18 +02:00
|
|
|
char *h = r_sys_getenv (R_SYS_HOME);
|
|
|
|
if (h) {
|
|
|
|
if (!strcmp (h, "/")) {
|
|
|
|
- r_sys_setenv (R_SYS_HOME, "/data/local/tmp");
|
2020-01-01 21:06:54 +01:00
|
|
|
+ r_sys_setenv (R_SYS_HOME, "@TERMUX_HOME@");
|
2019-09-18 15:17:18 +02:00
|
|
|
}
|
|
|
|
free (h);
|
|
|
|
}
|
2021-02-07 21:39:18 +01:00
|
|
|
@@ -3515,7 +3515,7 @@
|
2018-05-23 22:58:29 +02:00
|
|
|
free (path);
|
|
|
|
}
|
|
|
|
SETCB ("dir.source", "", &cb_dirsrc, "Path to find source files");
|
|
|
|
- SETPREF ("dir.types", "/usr/include", "Default path to look for cparse type files");
|
2019-09-18 15:17:18 +02:00
|
|
|
+ SETPREF ("dir.types", "@TERMUX_PREFIX@/include", "Default path to look for cparse type files");
|
|
|
|
SETPREF ("dir.libs", "", "Specify path to find libraries to load when bin.libs=true");
|
|
|
|
p = r_sys_getenv (R_SYS_HOME);
|
2021-02-07 21:39:18 +01:00
|
|
|
SETCB ("dir.home", r_str_get_fail (p, "/"), &cb_dirhome, "Path for the home directory");
|
|
|
|
@@ -3523,11 +3523,7 @@
|
2019-09-18 15:17:18 +02:00
|
|
|
p = r_sys_getenv (R_SYS_TMP);
|
2021-02-07 21:39:18 +01:00
|
|
|
SETCB ("dir.tmp", r_str_get (p), &cb_dirtmp, "Path of the tmp directory");
|
2019-09-18 15:17:18 +02:00
|
|
|
free (p);
|
2018-05-23 22:58:29 +02:00
|
|
|
-#if __ANDROID__
|
2021-02-07 21:39:18 +01:00
|
|
|
- SETCB ("dir.projects", "/data/data/org.radare.radare2installer/radare2/projects", &cb_dir_projects, "Default path for projects");
|
2018-05-23 22:58:29 +02:00
|
|
|
-#else
|
2021-02-07 21:39:18 +01:00
|
|
|
SETCB ("dir.projects", R_JOIN_2_PATHS ("~", R2_HOME_PROJECTS), &cb_dir_projects, "Default path for projects");
|
2018-05-23 22:58:29 +02:00
|
|
|
-#endif
|
|
|
|
SETCB ("dir.zigns", R_JOIN_2_PATHS ("~", R2_HOME_ZIGNS), &cb_dirzigns, "Default path for zignatures (see zo command)");
|
2019-03-02 00:38:47 +01:00
|
|
|
SETPREF ("stack.reg", "SP", "Which register to use as stack pointer in the visual debug");
|
2021-02-07 21:39:18 +01:00
|
|
|
SETBPREF ("stack.bytes", "true", "Show bytes instead of words in stack");
|
|
|
|
@@ -3665,9 +3661,8 @@
|
2018-05-23 22:58:29 +02:00
|
|
|
#else
|
|
|
|
if (r_file_exists ("/usr/bin/openURL")) { // iOS ericautils
|
|
|
|
r_config_set (cfg, "http.browser", "/usr/bin/openURL");
|
2019-09-18 15:17:18 +02:00
|
|
|
- } else if (r_file_exists ("/system/bin/toolbox")) {
|
|
|
|
- r_config_set (cfg, "http.browser",
|
|
|
|
- "LD_LIBRARY_PATH=/system/lib am start -a android.intent.action.VIEW -d");
|
|
|
|
+ } else if (r_file_exists ("@TERMUX_PREFIX@/bin/termux-open")) {
|
|
|
|
+ r_config_set (cfg, "http.browser", "@TERMUX_PREFIX@/bin/termux-open");
|
|
|
|
} else if (r_file_exists ("/usr/bin/xdg-open")) {
|
|
|
|
r_config_set (cfg, "http.browser", "xdg-open");
|
|
|
|
} else if (r_file_exists ("/usr/bin/open")) {
|
2021-02-07 21:39:18 +01:00
|
|
|
@@ -3687,8 +3682,6 @@
|
|
|
|
SETPREF ("http.root", wwwroot, "http root directory");
|
|
|
|
free (wwwroot);
|
|
|
|
}
|
|
|
|
-#elif __ANDROID__
|
2018-05-23 22:58:29 +02:00
|
|
|
- SETPREF ("http.root", "/data/data/org.radare.radare2installer/www", "http root directory");
|
2021-02-07 21:39:18 +01:00
|
|
|
#else
|
2018-05-23 22:58:29 +02:00
|
|
|
SETPREF ("http.root", R2_WWWROOT, "http root directory");
|
2021-02-07 21:39:18 +01:00
|
|
|
#endif
|