mirror of
https://github.com/geohot/qira
synced 2025-03-13 10:33:30 +03:00
fix mac ida plugin build
This commit is contained in:
parent
c7673e1148
commit
65ae3d6239
13
ida/build.sh
13
ida/build.sh
@ -1,22 +1,25 @@
|
||||
#!/bin/sh
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
unamestr=$(uname)
|
||||
if [[ "$unamestr" == 'Linux' ]]; then
|
||||
SDKROOT=~/build/idasdk66
|
||||
IDAROOT=~/ida-6.6
|
||||
OUTPUT="qira.plx"
|
||||
ln -sf linux_libwebsockets.a libwebsockets.a
|
||||
elif [[ "$unamestr" == 'Darwin' ]]; then
|
||||
SDKROOT=~/idasrc
|
||||
IDAROOT="/Applications/IDA Pro 6.6/idaq.app/Contents/MacOS/"
|
||||
OUTPUT="qira.pmc"
|
||||
ln -sf mac_libwebsockets.a libwebsockets.a
|
||||
fi
|
||||
|
||||
g++ template.cpp -m32 -fPIC -D__IDP__ -D__PLUGIN__ -c -D__LINUX__ -I . -I$SDKROOT/include
|
||||
g++ -m32 --shared template.o "-L$IDAROOT" -lida -o qira.plx libwebsockets.a -lcrypto -lz -lssl -lpthread
|
||||
sha1sum qira.plx
|
||||
if [ "$(diff qira.plx "$IDAROOT/plugins/qira.plx")" != "" ]; then
|
||||
g++ -m32 --shared template.o "-L$IDAROOT" -lida -o $OUTPUT libwebsockets.a -lcrypto -lz -lssl -lpthread
|
||||
|
||||
sha1sum $OUTPUT
|
||||
if [ "$(diff $OUTPUT "$IDAROOT/plugins/$OUTPUT")" != "" ]; then
|
||||
echo "copying plugin"
|
||||
cp qira.plx $IDAROOT/plugins
|
||||
cp $OUTPUT $IDAROOT/plugins
|
||||
fi
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user