python: distribute msvcr120.dll for Windows installer

This commit is contained in:
Nguyen Anh Quynh 2015-02-03 16:28:27 +08:00
parent 58a8369067
commit 59bc84de1d
11 changed files with 75 additions and 24 deletions

View File

@ -1,5 +1,54 @@
This file details the changelog of Capstone.
---------------------------------
Version 3.0.1: February 03, 2015
[ X86 ]
- Properly handle LOCK, REP, REPE & REPNE prefixes.
- Handle undocumented immediates for SSE's (V)CMPPS/PD/SS/SD instructions.
- Print LJUMP/LCALL without * as prefix for Intel syntax.
- Handle REX prefix properly for segment/MMX related instructions (x86_64).
- Instruction with length > 15 is consider invalid.
- Handle some tricky encodings for instructions MOVSXD, FXCH, FCOM, FCOMP,
FSTP, FSTPNCE, NOP.
- Handle some tricky code for some X86_64 instructions with REX prefix.
- Add missing operands in detail mode for PUSH , POP , IN/OUT reg, reg
- MOV32ms & MOV32sm should reference word rather than dword.
[ Arm64 ]
- BL & BLR instructions do not read SP register.
- Print absolute (rather than relative) address for instructions B, BL,
CBNZ, ADR.
[ Arm ]
- Instructions ADC & SBC do not update flags.
- BL & BLX do not read SP, but PC register.
- Alias LDR instruction with operands [sp], 4 to POP.
- Print immediate operand of MVN instruction in positive hexadecimal form.
[ PowerPC ]
- Fix some compilation bugs when DIET mode is enable.
- Populate SLWI/SRWI instruction details with SH operand.
[ Python binding ]
- Fix a Cython bug when CsInsn.bytes returns a shorten array of bytes.
- Fixed a memory leak for Cython disasm functions when we immaturely quit
the enumeration of disassembled instructions.
- Fix a NULL memory access issue when SKIPDATA & Detail modes are enable
at the same time.
- Fix a memory leaking bug when when we stop enumeration over the disassembled
instructions prematurely.
- Export generic operand types & groups (CS_OP_xxx & CS_GRP_xxx).
---------------------------------
Version 3.0: November 19th, 2014

View File

@ -1,3 +1,3 @@
The old bindings from version 2.x are not compatible with version 3.0, so
must be updated. For Java/Ocaml/Python bindings, see respective README files
under bindings/ directory in the source on how to reinstall them.
This version 3.0.1 fixed some important issues of Python binding, so Python
users should upgrade Python binding together with the core. See file
bindings/python/README.TXT for how to do that.

View File

@ -11,21 +11,21 @@ gen_const:
install:
rm -rf $(OBJDIR) src/
rm -rf prebuilt/win64/*.dll
rm -rf prebuilt/win32/*.dll
rm -rf prebuilt/win64/capstone.dll
rm -rf prebuilt/win32/capstone.dll
python setup.py build -b $(OBJDIR) install
install3:
rm -rf $(OBJDIR) src/
rm -rf prebuilt/win64/*.dll
rm -rf prebuilt/win32/*.dll
rm -rf prebuilt/win64/capstone.dll
rm -rf prebuilt/win32/capstone.dll
python3 setup.py build -b $(OBJDIR) install
# NOTE: Newer cython can be installed by: sudo pip install --upgrade cython
install_cython:
rm -rf $(OBJDIR) src/
rm -rf prebuilt/win64/*.dll
rm -rf prebuilt/win32/*.dll
rm -rf prebuilt/win64/capstone.dll
rm -rf prebuilt/win32/capstone.dll
mkdir -p $(OBJDIR)/pyx
cp setup_cython.py $(OBJDIR)
cp pyx/ccapstone* $(OBJDIR)/pyx/
@ -53,8 +53,8 @@ install_cython:
# build & upload PyPi package with source code of the core
sdist:
rm -rf src/
rm -rf prebuilt/win64/*.dll
rm -rf prebuilt/win32/*.dll
rm -rf prebuilt/win64/capstone.dll
rm -rf prebuilt/win32/capstone.dll
cp README.pypi-src README
cp PKG-INFO.src PKG-INFO
python setup.py sdist register upload
@ -62,8 +62,8 @@ sdist:
# build & upload PyPi package with source code of the core
sdist3:
rm -rf src/
rm -rf prebuilt/win64/*.dll
rm -rf prebuilt/win32/*.dll
rm -rf prebuilt/win64/capstone.dll
rm -rf prebuilt/win32/capstone.dll
cp README.pypi-src README
cp PKG-INFO.src PKG-INFO
python3 setup.py sdist register upload
@ -87,8 +87,8 @@ sdist3_win:
clean:
rm -rf $(OBJDIR) src/ README
rm -f capstone/*.so
rm -rf prebuilt/win64/*.dll
rm -rf prebuilt/win32/*.dll
rm -rf prebuilt/win64/capstone.dll
rm -rf prebuilt/win32/capstone.dll
TESTS = test.py test_detail.py test_arm.py test_arm64.py test_mips.py test_ppc.py

View File

@ -7,7 +7,7 @@ Maintainer: Nguyen Anh Quynh
Maintainer-email: aquynh at gmail com
Home-page: http://www.capstone-engine.org
Download-url: www.capstone-engine.org
Summary: Capstone disassembly framework
Summary: Capstone disassembly framework with Windows prebuilt core ready inside.
License: BSD
Description: Capstone is a lightweight multi-platform, multi-architecture disassembly framework with some advanced features. Further information is available at the homepage http://www.capstone-engine.org
Keywords: disassembly reverse binary arm arm64 aarch64 powerpc ppc mips x86 x86_64 sparc systemz xcore

View File

@ -2,7 +2,7 @@ NOTE: This package "capstone" includes source code of the core of Capstone.
So installing this would also compile the core with C compiler (either "gcc" or
"msvc" on Windows).
For Windows, if you do not want to compile the core, install package "capstone-win"
For Windows, if you do not want to compile the core, install package "capstone_win"
instead, which already has the prebuilt core inside.
--------------------------------------------------------------------------------

View File

@ -1,4 +1,4 @@
NOTE: This package "capstone-win" includes prebuilt Windows core of Capstone.
NOTE: This package "capstone_win" includes prebuilt Windows core of Capstone.
To compile from source, see package "capstone".
--------------------------------------------------------------------------------

View File

@ -1,4 +1,3 @@
# Ignore everything in this directory
*
capstone.dll
# Except this file
!.gitignore

Binary file not shown.

View File

@ -1,4 +1,3 @@
# Ignore everything in this directory
*
capstone.dll
# Except this file
!.gitignore

Binary file not shown.

View File

@ -15,12 +15,14 @@ from distutils.sysconfig import get_python_lib
# prebuilt libraries for Windows - for sdist
PATH_LIB64 = "prebuilt/win64/capstone.dll"
PATH_MSVCR64 = "prebuilt/win64/msvcr120.dll"
PATH_LIB32 = "prebuilt/win32/capstone.dll"
PATH_MSVCR32 = "prebuilt/win32/msvcr120.dll"
# package name can be 'capstone' or 'capstone-win'
# package name can be 'capstone' or 'capstone_win'
PKG_NAME = 'capstone'
if os.path.exists(PATH_LIB64) and os.path.exists(PATH_LIB32):
PKG_NAME = 'capstone-win'
PKG_NAME = 'capstone_win'
SYSTEM = sys.platform
VERSION = '4.0'
@ -102,9 +104,11 @@ class custom_build_clib(build_clib):
# if Windows prebuilt library is available, then include it
if is_64bits and os.path.exists(PATH_LIB64):
SETUP_DATA_FILES.append(PATH_LIB64)
SETUP_DATA_FILES.append(PATH_MSVCR64)
return
elif os.path.exists(PATH_LIB32):
SETUP_DATA_FILES.append(PATH_LIB32)
SETUP_DATA_FILES.append(PATH_MSVCR32)
return
# build library from source if src/ is existent