diff --git a/.gitignore b/.gitignore index 378eac2..8199c86 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,3 @@ build +dist +.DS_Store \ No newline at end of file diff --git a/Icon.icns b/Icon.icns new file mode 100644 index 0000000..c365038 Binary files /dev/null and b/Icon.icns differ diff --git a/README.md b/README.md index d803e06..5a3768f 100644 --- a/README.md +++ b/README.md @@ -12,6 +12,8 @@ License: BSD ## Installation +### Linux + Windows + Download the [ZIP](https://github.com/jeena/feedthemonkey/archive/master.zip)-file, unzip it and then run: On Linux you can just do (if you have PyQt already installed): @@ -24,6 +26,10 @@ On Windows you need to install (those are links to the binary packages): Then rename `freethemonkey` to `freethemonkey.pyw` and then you can run it by double-clicking. +### OS X + +Download [FeedTheMonkey.app.zip](http://jabs.nu/feedthemonkey/download/FeedTheMonkey.app.zip) unzip it and move it to your Applications folder. After that just run it like every other app. + ## Keyboard shortcuts The keyboard shortcuts are inspired by other feed readers which are inspired by the text editor vi. diff --git a/setup.py b/setup.py index 13c458e..cadbce8 100644 --- a/setup.py +++ b/setup.py @@ -1,18 +1,65 @@ #!/usr/bin/env python2 -import os -from distutils.core import setup +import os, PyQt4 +from setuptools import setup +from sys import platform as _platform + +VERSION = "0.1.0" +APP = ["feedthemonkey"] + +files = [] +options = {} +setup_requires = [] + +is_osx = _platform == "darwin" +is_win = os.name == "nt" +is_linux = not is_osx and not is_win + +if is_linux: + files += ('/usr/share/applications', ["feedthemonkey.desktop"]) + files += ('/usr/share/pixmaps', ["feedthemonkey.xpm"]) + +if is_osx: + options = { + 'py2app': { + 'argv_emulation': False, + 'iconfile': 'Icon.icns', + 'plist': { + 'CFBundleShortVersionString': VERSION, + 'CFBundleIdentifier': "nu.jabs.apps.feedthemonkey", + 'LSMinimumSystemVersion': "10.4", + 'CFBundleURLTypes': [ + { + 'CFBundleURLName': 'nu.jabs.apps.feedthemonkey.handler', + 'CFBundleURLSchemes': ['feedthemonkey'] + } + ] + }, + 'includes':['PyQt4.QtWebKit', 'PyQt4', 'PyQt4.QtCore', 'PyQt4.QtGui', 'PyQt4.QtNetwork'], + 'excludes': ['PyQt4.QtDesigner', 'PyQt4.QtOpenGL', 'PyQt4.QtScript', 'PyQt4.QtSql', 'PyQt4.QtTest', 'PyQt4.QtXml', 'PyQt4.phonon', 'simplejson'], + 'qt_plugins': 'imageformats', + } + } + + setup_requires = ["py2app"] + + for dirname, dirnames, filenames in os.walk('.'): + for filename in filenames: + if filename == "Icon.icns": + files += [(dirname, [os.path.join(dirname, filename)])] + +print setup_requires setup( - name = "feedthemonkey", - version = "0.1.0", + app = APP, + name = "FeedTheMonkey", + options = options, + version = VERSION, author = "Jeena Paradies", author_email = "spam@jeenaparadies.net", url = "http://jabs.nu/feedthemonkey", license = "BSD license", scripts = ["feedthemonkey"], - data_files=[ - ('/usr/share/applications', ["feedthemonkey.desktop"]), - ('/usr/share/pixmaps', ["feedthemonkey.xpm"]) - ] + data_files = files, + setup_requires = setup_requires )