1
0
mirror of https://github.com/ciromattia/kcc synced 2025-12-15 02:36:44 +00:00

Updated setup.py - OSX use py2app again

This commit is contained in:
Paweł Jastrzębski
2013-06-21 13:23:14 +02:00
parent 4c2b5b010b
commit dbb14e37fa
2 changed files with 29 additions and 15 deletions

2
other/qt.conf Normal file
View File

@@ -0,0 +1,2 @@
[Paths]
Plugins = DumbHackThatFixPY2APP

View File

@@ -2,35 +2,46 @@
cx_Freeze build script for KCC. cx_Freeze build script for KCC.
Usage (Mac OS X): Usage (Mac OS X):
python setup.py bdist_mac python setup.py py2app
Usage (Windows): Usage (Windows):
python setup.py build python setup.py build
""" """
from sys import platform from sys import platform
from cx_Freeze import setup, Executable
NAME = "KindleComicConverter" NAME = "KindleComicConverter"
VERSION = "3.0" VERSION = "3.0"
MAIN = "kcc.py" MAIN = "kcc.py"
includefiles = ['LICENSE.txt']
includes = []
excludes = []
if platform == "darwin": if platform == "darwin":
from setuptools import setup
extra_options = dict( extra_options = dict(
options={"build_exe": {"include_files": includefiles, "excludes": excludes, "compressed": True}, setup_requires=['py2app'],
"bdist_mac": {"iconfile": "icons/comic2ebook.icns"}}, app=[MAIN],
executables=[Executable(MAIN, options=dict(
copyDependentFiles=True, py2app=dict(
appendScriptToExe=True, argv_emulation=True,
appendScriptToLibrary=False, iconfile='icons/comic2ebook.icns',
compress=True)]) includes=['PIL', 'sip', 'PyQt4', 'PyQt4.QtCore', 'PyQt4.QtGui'],
resources=['other/qt.conf', 'LICENSE.txt'],
plist=dict(
CFBundleName=NAME,
CFBundleShortVersionString=VERSION,
CFBundleGetInfoString=NAME + " " + VERSION +
", written 2012-2013 by Ciro Mattia Gonano and Pawel Jastrzebski",
CFBundleExecutable=NAME,
CFBundleIdentifier='com.github.ciromattia.kcc',
CFBundleSignature='dplt',
NSHumanReadableCopyright='ISC License (ISCL)'
)
)
)
)
elif platform == "win32": elif platform == "win32":
from cx_Freeze import setup, Executable
base = "Win32GUI" base = "Win32GUI"
extra_options = dict( extra_options = dict(
options={"build_exe": {"include_files": includefiles, "excludes": excludes, "compressed": True}}, options={"build_exe": {"include_files": ['LICENSE.txt'], "compressed": True}},
executables=[Executable(MAIN, executables=[Executable(MAIN,
base=base, base=base,
targetName="KCC.exe", targetName="KCC.exe",
@@ -40,8 +51,9 @@ elif platform == "win32":
appendScriptToLibrary=False, appendScriptToLibrary=False,
compress=True)]) compress=True)])
else: else:
from cx_Freeze import setup, Executable
extra_options = dict( extra_options = dict(
options={"build_exe": {"include_files": includefiles, "excludes": excludes, "compressed": True}}, options={"build_exe": {"include_files": ['LICENSE.txt'], "compressed": True}},
executables=[Executable(MAIN, executables=[Executable(MAIN,
icon="icons/comic2ebook.png", icon="icons/comic2ebook.png",
copyDependentFiles=True, copyDependentFiles=True,