From e3bb756ea30fea6342a0f65ed46e262dcce22b75 Mon Sep 17 00:00:00 2001 From: Maran Date: Sat, 15 Jun 2013 21:07:22 +0200 Subject: [PATCH 1/4] Added OS X DS_Store files to git ignore --- .gitignore | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 36fbec0d..f1e78ac6 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ **pyc -**dat \ No newline at end of file +**dat +**.DS_Store From 1f622103ad15648a84e957b65b2a59437967b94c Mon Sep 17 00:00:00 2001 From: Maran Date: Sat, 15 Jun 2013 21:08:41 +0200 Subject: [PATCH 2/4] Added OS X Build directories to ignore file --- .gitignore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitignore b/.gitignore index f1e78ac6..acfa0ca1 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,5 @@ **pyc **dat **.DS_Store +src/build +src/dist From 3475000902d423a12afd6b59a70ef149ccebd9bf Mon Sep 17 00:00:00 2001 From: Maran Date: Sat, 15 Jun 2013 21:09:15 +0200 Subject: [PATCH 3/4] Added OS X Build scripts --- osx.sh | 23 ++++++++++++ src/build_osx.py | 71 +++++++++++++++++++++++++++++++++++++ src/images/bitmessage.icns | Bin 0 -> 39467 bytes 3 files changed, 94 insertions(+) create mode 100755 osx.sh create mode 100644 src/build_osx.py create mode 100644 src/images/bitmessage.icns diff --git a/osx.sh b/osx.sh new file mode 100755 index 00000000..ca05ffde --- /dev/null +++ b/osx.sh @@ -0,0 +1,23 @@ +#!/bin/bash + +# OS X Build script wrapper around the py2app script. +# These build can only be generated on OS X. +# Requires all build dependencies for Bitmessage + +export ARCHFLAGS="-arch i386 -arch x86_64" + +if [[ -z "$1" ]]; then + echo "Please supply a version number for this release as the first argument." + exit +fi + +echo "Creating OS X packages for Bitmessage. This script will ask for sudo to create the dmg volume" + +cd src && python build_osx.py py2app + +if [[ $? = "0" ]]; then + sudo hdiutil create -fs HFS+ -volname "Bitmessage" -srcfolder dist/Bitmessage.app dist/bitmessage-v$1.dmg +else + echo "Problem creating Bitmessage.app, stopping." + exit +fi diff --git a/src/build_osx.py b/src/build_osx.py new file mode 100644 index 00000000..ded1be4a --- /dev/null +++ b/src/build_osx.py @@ -0,0 +1,71 @@ +""" +py2app/py2exe build script for Bitmessage + +Usage (Mac OS X): + python setup.py py2app + +Usage (Windows): + python setup.py py2exe +""" + +import sys, os, shutil, re +from setuptools import setup + + +name = "Bitmessage" +mainscript = 'bitmessagemain.py' +version = "0.3.3" + +if sys.platform == 'darwin': + extra_options = dict( + setup_requires=['py2app'], + app=[mainscript], + options=dict(py2app=dict(argv_emulation=True, + includes = ['PyQt4.QtCore','PyQt4.QtGui', 'sip', 'sqlite'], + packages = ['bitmessageqt'], + iconfile='images/bitmessage.icns', + resources=["images"])), + ) +elif sys.platform == 'win32': + extra_options = dict( + setup_requires=['py2exe'], + app=[mainscript], + ) +else: + extra_options = dict( + # Normally unix-like platforms will use "setup.py install" + # and install the main script as such + scripts=[mainscript], + ) + +setup( + name = name, + version = version, + **extra_options +) +from distutils import dir_util + +if sys.platform == 'darwin': + resource = "dist/" + name + ".app/Contents/Resources/" + + # Try to locate qt_menu + # Let's try the port version first! + if os.path.isfile("/opt/local/lib/Resources/qt_menu.nib"): + qt_menu_location = "/opt/local/lib/Resources/qt_menu.nib" + else: + # No dice? Then let's try the brew version + qt_menu_location = os.popen("find /usr/local/Cellar -name qt_menu.nib | tail -n 1").read() + qt_menu_location = re.sub('\n','', qt_menu_location) + + if(len(qt_menu_location) == 0): + print "Sorry couldn't find your qt_menu.nib this probably won't work" + else: + print "Found your qib: " + qt_menu_location + + # Need to include a copy of qt_menu.nib + shutil.copytree(qt_menu_location, resource + "qt_menu.nib") + # Need to touch qt.conf to avoid loading 2 sets of Qt libraries + fname = resource + "qt.conf" + with file(fname, 'a'): + os.utime(fname, None) + diff --git a/src/images/bitmessage.icns b/src/images/bitmessage.icns new file mode 100644 index 0000000000000000000000000000000000000000..a796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>K+gj`5A;0H^FYr7JrDFe(DOjg13eG)Jn;W>5BzSwKG++5&jURV{0@8I{{uRH BjV1s9 literal 0 HcmV?d00001 From 5e66e81ab7ef5c15be162575ff261f0891fb3de3 Mon Sep 17 00:00:00 2001 From: Maran Date: Mon, 17 Jun 2013 00:25:03 +0200 Subject: [PATCH 4/4] Make sure libcrypto from brew is linked. In the resulting .app --- osx.sh | 1 + src/build_osx.py | 11 ++++++++++- src/pyelliptic/openssl.py | 30 +++++++++++++++++------------- 3 files changed, 28 insertions(+), 14 deletions(-) diff --git a/osx.sh b/osx.sh index ca05ffde..e5d2e371 100755 --- a/osx.sh +++ b/osx.sh @@ -3,6 +3,7 @@ # OS X Build script wrapper around the py2app script. # These build can only be generated on OS X. # Requires all build dependencies for Bitmessage +# Especially important is openssl installed through brew export ARCHFLAGS="-arch i386 -arch x86_64" diff --git a/src/build_osx.py b/src/build_osx.py index ded1be4a..de08da4c 100644 --- a/src/build_osx.py +++ b/src/build_osx.py @@ -21,8 +21,9 @@ if sys.platform == 'darwin': setup_requires=['py2app'], app=[mainscript], options=dict(py2app=dict(argv_emulation=True, - includes = ['PyQt4.QtCore','PyQt4.QtGui', 'sip', 'sqlite'], + includes = ['PyQt4.QtCore','PyQt4.QtGui', 'sip'], packages = ['bitmessageqt'], + frameworks = ['/usr/local/opt/openssl/lib/libcrypto.dylib'], iconfile='images/bitmessage.icns', resources=["images"])), ) @@ -44,9 +45,17 @@ setup( **extra_options ) from distutils import dir_util +import glob if sys.platform == 'darwin': resource = "dist/" + name + ".app/Contents/Resources/" + framework = "dist/" + name + ".app/Contents/Frameworks/" + + # The pyElliptive module only works with hardcoded libcrypto paths so rename it so it can actually find it. + libs = glob.glob(framework + "libcrypto*.dylib") + for lib in libs: + os.rename(lib, framework + "libcrypto.dylib") + break # Try to locate qt_menu # Let's try the port version first! diff --git a/src/pyelliptic/openssl.py b/src/pyelliptic/openssl.py index 59a0d324..de073fab 100644 --- a/src/pyelliptic/openssl.py +++ b/src/pyelliptic/openssl.py @@ -419,17 +419,21 @@ except: OpenSSL = _OpenSSL('/usr/local/opt/openssl/lib/libcrypto.dylib') except: try: - from os import path - lib_path = path.join(sys._MEIPASS, "libeay32.dll") - OpenSSL = _OpenSSL(lib_path) + # Load it from an Bitmessage.app on OSX + OpenSSL = _OpenSSL('./../Frameworks/libcrypto.dylib') except: - if 'linux' in sys.platform or 'darwin' in sys.platform: - try: - from ctypes.util import find_library - OpenSSL = _OpenSSL(find_library('ssl')) - except Exception, err: - sys.stderr.write('(On Linux) Couldn\'t find and load the OpenSSL library. You must install it. If you believe that you already have it installed, this exception information might be of use:\n') - from ctypes.util import find_library - OpenSSL = _OpenSSL(find_library('ssl')) - else: - raise Exception("Couldn't find and load the OpenSSL library. You must install it.") + try: + from os import path + lib_path = path.join(sys._MEIPASS, "libeay32.dll") + OpenSSL = _OpenSSL(lib_path) + except: + if 'linux' in sys.platform or 'darwin' in sys.platform: + try: + from ctypes.util import find_library + OpenSSL = _OpenSSL(find_library('ssl')) + except Exception, err: + sys.stderr.write('(On Linux) Couldn\'t find and load the OpenSSL library. You must install it. If you believe that you already have it installed, this exception information might be of use:\n') + from ctypes.util import find_library + OpenSSL = _OpenSSL(find_library('ssl')) + else: + raise Exception("Couldn't find and load the OpenSSL library. You must install it.")