-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Installing on Cygwin & Python3
E:V:A edited this page Oct 21, 2018
·
1 revision
If you want to use the latest Capstone features on Cygwin and Python3,
you need to follow this procedure (and not use pip install capstone
.)
- Install Cygwin Requirements
Here are some minimal requirements (not tested from scratch).
apt-cyg install base-cygwin base-files bind-utils diffutils
apt-cyg install coreutils binutils patch cygutils util-linux
apt-cyg install make cmake ncurses
apt-cyg install gcc-core gcc-g++
#apt-cyg install <countless other libraries>
apt-cyg install python3 python3-devel python3-pip
There will liekly be many more, but very similar to any *nix distribution.
Always use apt-cyg!
- (1b) Install Python3 Requirements
You should already have these...
pip3 install ...
- Download Capstone Sources
cd $HOME
git clone https://github.com/aquynh/capstone.git
cd capstone
- Use the "next" branch for the most recent API enhancements
git branch -a
git checkout next
- Clear the
LIBCAPSTONE_PATH
environment variable
echo $LIBCAPSTONE_PATH
export -n LIBCAPSTONE_PATH
- Compile Capstone (core) from sources
make clean
./make.sh gcc
🔴 (E1) Fix broken filename ❗
ls -alh capstone*
mv capstone. capstone.dll
- Install Capstone: core
./make.sh install
- Install Capstone: Python3 Bindings
#----------------------------------------------------
# You can use: `pip3 install capstone`, BUT then
# you will miss out on new features! Use sources!
#----------------------------------------------------
cd bindings/python
make clean
make install3
- Check that your Python Core and API bindings match:
python3 -c "from capstone import *; version_bind(); cs_version(); print(version_bind() == cs_version())"
- Check PIP package version
pip3 list |grep capstone
- Test all python scripts
python3 test_all.py
NOTE:
If you get any errors with this, it most likely due to missing Cygwin packages.
Make sure you have all the "normal" GCC stuff like, make, cmake and automake etc.