mirror of
https://github.com/idapython/src
synced 2026-06-08 14:47:00 +00:00
IDAPython: added a mechanism to use the freshly-built modules to perform the pydoc injections check, in case of an out-of-tree build
This commit is contained in:
@@ -45,7 +45,8 @@ parser.add_argument("-v", "--verbose", help="Verbose mode", default=False, actio
|
||||
parser.add_argument("-I", "--ida-install", required=True, help="IDA's installation directory", type=str)
|
||||
args = parser.parse_args()
|
||||
|
||||
_probe = os.path.join("..", "..", "include", "pro.h")
|
||||
sdk_relpath = os.path.join("..", "..")
|
||||
_probe = os.path.join(sdk_relpath, "include", "pro.h")
|
||||
assert os.path.exists(_probe), "Could not find IDA SDK include path (looked for: \"%s\")" % _probe
|
||||
|
||||
|
||||
@@ -77,6 +78,7 @@ def main():
|
||||
if args.verbose:
|
||||
argv.append("-d")
|
||||
env["IDA_INSTALL"] = args.ida_install.replace('\\', '/')
|
||||
env["SDK_BIN_PATH"] = os.path.abspath(os.path.join(sdk_relpath, "bin")).replace('\\', '/')
|
||||
for ea64 in [True, False]:
|
||||
if ea64:
|
||||
env["__EA64__"] = "1"
|
||||
|
||||
+5
-1
@@ -986,6 +986,10 @@ bool idapython_plugin_t::init()
|
||||
msg("HexraysPython: Python compiled with DEBUG enabled.\n");
|
||||
#endif
|
||||
|
||||
qstring dynload_base;
|
||||
if ( !qgetenv("IDAPYTHON_DYNLOAD_BASE", &dynload_base) )
|
||||
dynload_base = idadir(nullptr);
|
||||
|
||||
// Set IDAPYTHON_VERSION in Python
|
||||
qstring init_code;
|
||||
init_code.sprnt(
|
||||
@@ -997,7 +1001,7 @@ bool idapython_plugin_t::init()
|
||||
"IDAPYTHON_IDAUSR_SYSPATH = %s\n",
|
||||
VER_MAJOR, VER_MINOR, VER_PATCH, VER_STATUS, VER_SERIAL,
|
||||
config.remove_cwd_sys_path ? "True" : "False",
|
||||
idadir(nullptr),
|
||||
dynload_base.c_str(),
|
||||
sizeof(ea_t)*8,
|
||||
config.autoimport_compat_idaapi ? "True" : "False",
|
||||
config.idausr_syspath ? "True" : "False"
|
||||
|
||||
@@ -187,7 +187,11 @@ else
|
||||
IDAT_PATH?=$(IDA_INSTALL)/idat
|
||||
endif
|
||||
|
||||
IDAT_CMD=TVHEADLESS=1 $(IDAT_PATH)$(SUFF64)
|
||||
ifeq ($(OUT_OF_TREE_BUILD),)
|
||||
IDAT_CMD=TVHEADLESS=1 $(IDAT_PATH)$(SUFF64)
|
||||
else
|
||||
IDAT_CMD=TVHEADLESS=1 IDAPYTHON_DYNLOAD_BASE=$(SDK_BIN_PATH) $(IDAT_PATH)$(SUFF64)
|
||||
endif
|
||||
|
||||
# envvar HAS_HEXRAYS must have been set by build.py if needed
|
||||
ifeq ($(OUT_OF_TREE_BUILD),)
|
||||
|
||||
Binary file not shown.
Reference in New Issue
Block a user