2013-06-16 03:13:28 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
# Quick and dangerous script for building OSX binaries.
|
|
|
|
|
2013-08-24 22:28:15 +00:00
|
|
|
# A few quirks to note, which should be re-checked every release:
|
|
|
|
# - We require the latest development version of PyInstaller.
|
|
|
|
|
|
|
|
# - PyInstaller has trouble detecting the zope.interfaces package. This is
|
|
|
|
# required by Twisted, which for mysterious reasons is required by Urwid. The
|
|
|
|
# answer is to touch the __init__.py file in the zope directory. On my system:
|
|
|
|
# touch /Library/Python/2.7/site-packages/zope/__init__.py
|
|
|
|
|
2014-11-02 05:04:57 +00:00
|
|
|
# To run, first install netlib and mitmproxy, then change into the pyinstaller
|
|
|
|
# directory, and then run this script.
|
2013-06-16 03:13:28 +00:00
|
|
|
|
2014-12-28 02:07:44 +00:00
|
|
|
TMPDIR=/tmp
|
|
|
|
DST=$TMPDIR/osx-mitmproxy
|
2013-06-16 03:50:08 +00:00
|
|
|
MITMPROXY=~/mitmproxy/mitmproxy
|
|
|
|
PYINST_CMD="./pyinstaller.py -F --clean"
|
|
|
|
|
2014-12-28 02:07:44 +00:00
|
|
|
rm -rf $TMPDIR/osx-mitmproxy*
|
2013-06-16 03:50:08 +00:00
|
|
|
mkdir -p $DST
|
2013-06-16 03:13:28 +00:00
|
|
|
rm -rf mitmproxy
|
|
|
|
rm -rf mitmdump
|
|
|
|
|
2013-06-16 03:50:08 +00:00
|
|
|
$PYINST_CMD $MITMPROXY/mitmproxy
|
2014-12-28 02:07:44 +00:00
|
|
|
$MITMPROXY/mitmproxy --version || exit 1
|
2013-06-16 03:50:08 +00:00
|
|
|
cp mitmproxy/dist/mitmproxy $DST
|
|
|
|
|
|
|
|
$PYINST_CMD $MITMPROXY/mitmdump
|
2014-12-28 02:07:44 +00:00
|
|
|
$MITMPROXY/mitmdump --version || exit 1
|
2013-06-16 03:50:08 +00:00
|
|
|
cp mitmdump/dist/mitmdump $DST
|
2013-06-16 03:13:28 +00:00
|
|
|
|
2013-06-16 03:50:08 +00:00
|
|
|
cshape $MITMPROXY/doc-src $DST/doc
|
2014-12-28 02:07:44 +00:00
|
|
|
|
|
|
|
VBASE=osx-mitmproxy-`$MITMPROXY/mitmdump --shortversion 2>&1`
|
|
|
|
mv $DST $TMPDIR/$VBASE
|
|
|
|
TGZDST=$TMPDIR/$VBASE.tgz
|
|
|
|
cd $TMPDIR
|
|
|
|
tar -czvf $VBASE.tgz $VBASE
|