starting OSX packaging

This commit is contained in:
Micah Lee 2014-06-10 10:31:19 -07:00
parent afb7e8007a
commit aaf8ae30d7
5 changed files with 50 additions and 11 deletions

3
.gitignore vendored
View File

@ -35,3 +35,6 @@ nosetests.xml
# vim
*.swp
# OSX
.DS_Store

13
BUILD.md Normal file
View File

@ -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

View File

@ -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

View File

@ -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
)

2
setup/onionshare_osx.py Normal file
View File

@ -0,0 +1,2 @@
import onionshare_gui
onionshare_gui.main()