-
Notifications
You must be signed in to change notification settings - Fork 289
/
BUILDING.txt
93 lines (61 loc) · 2.94 KB
/
BUILDING.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
------------------------------------------------------
IDAPython - Python plugin for Interactive Disassembler
------------------------------------------------------
Building From Source
--------------------
REQUIREMENTS
------------
[Tested versions are in brackets]
- IDA and IDA SDK [> 5.6]
http://www.hex-rays.com/idapro/
- Python 3.x
http://www.python.org/
- Simplified Wrapper Interface Generator (SWIG)
- if you intend to build for Python 3.x: [4.0.1, with support for -py3-limited-api]
Hex-Rays cannot guarantee support for IDAPython
versions built with other versions of SWIG.
If building for Python 3.x:
You can obtain the correct version of swig like so:
`git clone --branch py3-stable-abi https://github.com/idapython/swig.git swig-py3-stable-abi`,
and then compile it.
On Windows, please refer to the following instructions:
`http://www.swig.org/Doc4.0/Windows.html#Windows_cygwin_mingw`
On Linux or OSX,
(On Ubuntu, you might want to install a couple of packages:
`sudo apt install libpcre3-dev yacc bison automake autotools-dev patchelf -y`)
`sh autogen.sh`, then
`./configure --prefix=/my_path_to/swig-4.0.1-py3-install && make && make install`
- Unix utilities (GNU patch on Windows):
http://www.research.att.com/sw/tools/uwin/ or
http://unxutils.sourceforge.net/ or
http://www.cygwin.com/
- GCC on Linux and Mac OS X [4.0.1, 4.1.3]
Comes with your distribution
- Microsoft Visual C on Windows [Microsoft Visual C++ 2008 Express Edition]
http://msdn.microsoft.com/vstudio/express/visualc/
- Cygwin (requires GNU make)
BUILDING
--------
Make sure all the needed tools (compiler, swig) are on the PATH.
1. Unpack the IDA SDK into:
'.../idasdk74'
Note: the path you unpack the IDA SDK into cannot contain white spaces,
or special characters (such as '(', etc...)
2. Making sure the SDK compiles:
If you are on:
- Windows: set environment variable __NT__=1
- Linux: set environment variable __LINUX__=1
- Mac OSX: set environment variable __MAC__=1
then, run 'make'
3. Place the IDAPython sources into the SDK directory, such that the file:
'.../idasdk74/plugins/idapython/BUILDING.txt' exists
Note: To build with Hex-Rays decompiler support, you will need to copy
.../ida_install/plugins/hexrays_sdk/include/hexrays.hpp -> .../idasdk74/include/hexrays.hpp
Note: If you want to build for Python3 (let's say you are building for Python 3.8),
please set the following environment variables:
- export PYTHON_VERSION_MAJOR=3 ('set PYTHON_VERSION_MAJOR=3' on Windows)
- export PYTHON_VERSION_MINOR=8 ('set PYTHON_VERSION_MINOR=8 on Windows)
4. Build the plugin
python build.py --swig-home /my_path_to/swig-4.0.1-py3-install --with-hexrays --ida-install /path/to/ida_install/
You can also run 'build.py --help' for more information.
5. Install the components as described in README.md