mirror of
https://github.com/radareorg/radare2.git
synced 2024-11-23 13:19:54 +00:00
Add R2_GLOBAL_RC (#11258)
This commit is contained in:
parent
764a3ccbcb
commit
0ba26fb3d6
@ -1286,10 +1286,11 @@ int main(int argc, char **argv, char **envp) {
|
||||
}
|
||||
}
|
||||
{
|
||||
const char *global_rc = R2_PREFIX"/share/radare2/radare2rc";
|
||||
const char *global_rc = r_str_r2_prefix (R2_GLOBAL_RC);
|
||||
if (r_file_exists (global_rc)) {
|
||||
(void)r_core_run_script (&r, global_rc);
|
||||
}
|
||||
free (global_rc);
|
||||
}
|
||||
// only analyze if file contains entrypoint
|
||||
{
|
||||
|
@ -17,6 +17,7 @@
|
||||
#define R2_PLUGINS "@PLUGINS@"
|
||||
#define R2_EXTRAS "@EXTRAS@"
|
||||
#define R2_BINDINGS "@BINDINGS@"
|
||||
#define R2_DATDIR_R2 "@DATADIR_R2@"
|
||||
#define R2_SDB "@SDB@"
|
||||
#define R2_ZIGNS "@ZIGNS@"
|
||||
#define R2_THEMES "@THEMES@"
|
||||
@ -43,6 +44,7 @@
|
||||
#define R2_EXTRAS "lib/radare2-extras/" R2_VERSION
|
||||
#define R2_BINDINGS "lib/radare2-bindings/" R2_VERSION
|
||||
#endif
|
||||
#define R2_DATDIR_R2 R_JOIN_2_PATHS ("share", "radare2")
|
||||
#define R2_SDB R_JOIN_3_PATHS ("share", "radare2", R2_VERSION)
|
||||
#define R2_ZIGNS R_JOIN_4_PATHS ("share", "radare2", R2_VERSION, "zigns")
|
||||
#define R2_THEMES R_JOIN_4_PATHS ("share", "radare2", R2_VERSION, "cons")
|
||||
@ -71,10 +73,11 @@
|
||||
#define R2_HOME_BINRC R_JOIN_2_PATHS (R2_HOME_DATADIR, "rc.d")
|
||||
#define R2_HOME_BIN R_JOIN_3_PATHS (R2_HOME_DATADIR, "prefix", "bin")
|
||||
|
||||
#define R2_HOME_HISTORY R_JOIN_2_PATHS (R2_HOME_CACHEDIR, "history")
|
||||
|
||||
#define R2_HOME_RC R_JOIN_2_PATHS (R2_HOME_CONFIGDIR, "radare2rc")
|
||||
#define R2_HOME_RC_DIR R_JOIN_2_PATHS (R2_HOME_CONFIGDIR, "radare2rc.d")
|
||||
|
||||
#define R2_HOME_HISTORY R_JOIN_2_PATHS (R2_HOME_CACHEDIR, "history")
|
||||
#define R2_GLOBAL_RC R_JOIN_2_PATHS (R2_DATDIR_R2, "radare2rc")
|
||||
|
||||
#define HAVE_LIB_MAGIC @HAVE_LIB_MAGIC@
|
||||
#define USE_LIB_MAGIC @USE_LIB_MAGIC@
|
||||
|
@ -253,8 +253,10 @@ userconf.set('HAVE_OPENSSL', use_sys_openssl.to_int())
|
||||
userconf.set('HAVE_FORK', 1)
|
||||
userconf.set('WITH_GPL', 1)
|
||||
if host_machine.system() == 'windows'
|
||||
userconf.set('DATADIR_R2', r2_datdir)
|
||||
userconf.set('HAVE_JEMALLOC', 0)
|
||||
else
|
||||
userconf.set('DATADIR_R2', join_paths(get_option('datadir'), 'radare2'))
|
||||
userconf.set('HAVE_JEMALLOC', 1)
|
||||
endif
|
||||
if cc.has_header_symbol('sys/personality.h', 'ADDR_NO_RANDOMIZE')
|
||||
|
Loading…
Reference in New Issue
Block a user