diff --git a/icon.icns b/icon.icns new file mode 100644 index 0000000..04cbc86 Binary files /dev/null and b/icon.icns differ diff --git a/icon.ico b/icon.ico new file mode 100644 index 0000000..f93f9fb Binary files /dev/null and b/icon.ico differ diff --git a/setup.py b/setup.py new file mode 100644 index 0000000..c505c6b --- /dev/null +++ b/setup.py @@ -0,0 +1,86 @@ +from esky import bdist_esky +from setuptools import setup +import sys +import version +import os + + +# Include proper dirs +base_path = os.path.dirname(os.path.abspath(__file__)) +lib_dir = os.path.join(base_path, 'libs') + +sys.path.insert(0, base_path) +sys.path.insert(0, lib_dir) + + + +# Windows +if sys.platform == "win32": + import py2exe + + FREEZER = 'py2exe' + FREEZER_OPTIONS = dict( + compressed = 0, + optimize = 0, + bundle_files = 3, + dll_excludes = [ + 'MSVCP90.dll', + 'mswsock.dll', + 'powrprof.dll', + 'USP10.dll', + ], + packages = ['couchpotato', 'libs'], + includes = [ + 'telnetlib', + 'xml.etree.ElementTree', + 'xml.etree.cElementTree', + 'xml.dom', + 'xml.dom.minidom', + ], + ) + exeICON = 'icon.ico' + + +# OSX +elif sys.platform == "darwin": + import py2app + + FREEZER = 'py2app' + FREEZER_OPTIONS = dict( + argv_emulation = False, + iconfile = 'icon.icns', + plist = dict( + LSUIElement = True, + ), + packages = ['couchpotato', 'libs'], + includes = [ + 'telnetlib', + 'xml.etree.ElementTree', + 'xml.etree.cElementTree', + 'xml.dom', + 'xml.dom.minidom', + ], + ) + exeICON = None + +# Common +NAME = "CouchPotato" +APP = [bdist_esky.Executable("CouchPotato.py", gui_only = True, icon = exeICON,)] +DATA_FILES = ['icon.ico'] +ESKY_OPTIONS = dict( + freezer_module = FREEZER, + freezer_options = FREEZER_OPTIONS, + bundle_msvcrt = True, +) + + +# Build the app and the esky bundle +setup( + name = NAME, + scripts = APP, + version = version.VERSION, + data_files = DATA_FILES, + options = dict(bdist_esky = ESKY_OPTIONS), +) + +