Skip to content

Commit 80f422f

Browse files
committed
Install keystone/unicorn from pypi instead of from source
fixes zardus#122
1 parent 5a22a71 commit 80f422f

File tree

7 files changed

+10
-63
lines changed

7 files changed

+10
-63
lines changed

keystone/install

Lines changed: 3 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,5 @@
11
#!/bin/bash -ex
2-
set -e -o pipefail
32

4-
git clone --depth 1 https://github.com/keystone-engine/keystone.git
5-
6-
source ctf-tools-venv-activate
7-
8-
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
9-
10-
mkdir -p keystone/build/
11-
pushd keystone/build/
12-
cmake -DCMAKE_INSTALL_PREFIX="$DIR" \
13-
-DCMAKE_BUILD_TYPE=Release \
14-
-DBUILD_SHARED_LIBS=ON \
15-
-DLLVM_TARGETS_TO_BUILD="all" \
16-
-G "Unix Makefiles" ..
17-
make -j$(getconf _NPROCESSORS_ONLN) install
18-
popd
19-
20-
pushd keystone/bindings/python
21-
pip install -U -e .
22-
# create a symlink that the python bindings can find the keystone lib
23-
ln -s $(readlink -f ../../../lib/libkeystone.so.0) keystone/libkeystone.so
24-
popd
25-
26-
# kstool doesn't find the lib. so let's rm it
27-
rm -r bin/
3+
ctf-tools-pip install -U keystone
4+
# seems to be broken?
5+
#ctf-tools-pip3 install -U keystone

keystone/install-root-archlinux

Lines changed: 0 additions & 4 deletions
This file was deleted.

keystone/install-root-debian

Lines changed: 0 additions & 4 deletions
This file was deleted.

keystone/uninstall

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,7 @@ set -e -o pipefail
44
source ctf-tools-venv-activate
55

66
pip uninstall -y keystone-engine || true
7+
#!/bin/bash -ex
78

8-
if [[ -d keystone && -d keystone/build ]]; then
9-
export PREFIX="$PWD"
10-
pushd keystone/build
11-
make uninstall
12-
popd
13-
fi
9+
ctf-tools-pip uninstall -y keystone || true
10+
ctf-tools-pip3 uninstall -y keystone || true

unicorn/install

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,4 @@
11
#!/bin/bash -ex
2-
set -e -o pipefail
32

4-
git clone --depth 1 https://github.com/unicorn-engine/unicorn.git
5-
6-
source ctf-tools-venv-activate
7-
8-
pushd unicorn
9-
echo "compiling unicorn"
10-
UNICORN_QEMU_FLAGS="--python=$(which python)" PREFIX="$VIRTUAL_ENV" ./make.sh
11-
echo "installing unicorn to $VIRTUAL_ENV"
12-
UNICORN_QEMU_FLAGS="--python=$(which python)" PREFIX="$VIRTUAL_ENV" ./make.sh install
13-
14-
pushd bindings/python
15-
#pip install -U .
16-
make DEST_DIR="$VIRTUAL_ENV" install
17-
popd
18-
popd
3+
ctf-tools-pip install -U unicorn
4+
ctf-tools-pip3 install -U unicorn

unicorn/install-root-debian

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
#!/bin/bash -ex
2-
set -eu -o pipefail
32

43
apt-get -y install libglib2.0-dev

unicorn/uninstall

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,4 @@
11
#!/bin/bash -ex
22

3-
ctf-tools-venv-activate
4-
5-
pip uninstall -y unicorn
6-
7-
pushd unicorn
8-
PREFIX="$VIRTUAL_ENV" ./make.sh uninstall
9-
popd
3+
ctf-tools-pip uninstall -y unicorn || true
4+
ctf-tools-pip3 uninstall -y unicorn || true

0 commit comments

Comments
 (0)