diff options
author | Micah Lee <micah@snape.lan> | 2014-06-10 10:31:19 -0700 |
---|---|---|
committer | Micah Lee <micah@snape.lan> | 2014-06-10 10:31:19 -0700 |
commit | aaf8ae30d7d85849b91cb931d95e2f8fd2b33633 (patch) | |
tree | 8a58a8bd626f351599298c8d60fa313a1ced3ace | |
parent | afb7e8007a7829cf7629b5fc994b800327c25c62 (diff) | |
download | onionshare-aaf8ae30d7d85849b91cb931d95e2f8fd2b33633.tar.gz onionshare-aaf8ae30d7d85849b91cb931d95e2f8fd2b33633.zip |
starting OSX packaging
-rw-r--r-- | .gitignore | 3 | ||||
-rw-r--r-- | BUILD.md | 13 | ||||
-rw-r--r-- | MANIFEST.in | 11 | ||||
-rw-r--r-- | setup.py | 32 | ||||
-rw-r--r-- | setup/onionshare_osx.py | 2 |
5 files changed, 50 insertions, 11 deletions
@@ -35,3 +35,6 @@ nosetests.xml # vim *.swp + +# OSX +.DS_Store diff --git a/BUILD.md b/BUILD.md new file mode 100644 index 00000000..fba88efc --- /dev/null +++ b/BUILD.md @@ -0,0 +1,13 @@ +# Building OnionShare + +## Mac OS X + +If you don't already have pip installed, install it like this: + + sudo easy_install pip + +Then use pip to install py2app: + + sudo pip install py2app + + diff --git a/MANIFEST.in b/MANIFEST.in index 7e61731a..13271fc4 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,7 +1,12 @@ include LICENSE include README.md +include BUILD.md include version -include onionshare/*.html +include onionshare/index.html include onionshare/strings.json -include onionshare_gui/templates/* -include onionshare_gui/static/* +include onionshare_gui/templates/index.html +include onionshare_gui/static/jquery-1.11.1.min.js +include onionshare_gui/static/onionshare.js +include onionshare_gui/static/style.css +include onionshare_gui/static/loader.gif +include onionshare_gui/static/logo.png @@ -14,12 +14,27 @@ if sys.argv[-1] == 'publish': version = open('version').read().strip() -def get_data_files(): - if platform.system == 'Linux': - return [('/usr/share/applications', ['setup/onionshare.desktop']), - ('/usr/share/pixmaps', ['setup/onionshare80.xpm'])] - else: - return None +APP = None +DATA_FILES = [ + ('/usr/share/applications', ['setup/onionshare.desktop']), + ('/usr/share/pixmaps', ['setup/onionshare80.xpm']) +] +OPTIONS = None + +if platform.system() == 'Darwin': + APP = ['setup/onionshare_osx.py'] + DATA_FILES = ['LICENSE', 'README.md', 'BUILD.md', 'version', 'onionshare', 'onionshare_gui'] + OPTIONS = { + 'py2app': { + 'argv_emulation': True, + #'iconfile': 'setup/onionshare.icns', + 'packages': ['flask', 'stem'], + 'site_packages': True, + 'plist': { + 'CFBundleName': 'OnionShare', + } + } + } setup( name='onionshare', @@ -38,6 +53,7 @@ setup( keywords='onion, share, onionshare, tor, anonymous, web server', packages=['onionshare', 'onionshare_gui'], scripts=['bin/onionshare', 'bin/onionshare-gui'], - data_files=[('/usr/share/applications', ['setup/onionshare.desktop']), - ('/usr/share/pixmaps', ['setup/onionshare80.xpm'])] + data_files=DATA_FILES, + app=APP, + options=OPTIONS ) diff --git a/setup/onionshare_osx.py b/setup/onionshare_osx.py new file mode 100644 index 00000000..f0b9b7c0 --- /dev/null +++ b/setup/onionshare_osx.py @@ -0,0 +1,2 @@ +import onionshare_gui +onionshare_gui.main() |