Try with icon bundling...
This commit is contained in:
1 parent
89fa1393db
commit
0d61442c18
1 file changed
+48
-29
@@ -1,13 +1,14 @@
|
|||||||
"""
|
"""
|
||||||
cx_freeze/py2app build script for KCC.
|
py2app/py2exe build script for KCC.
|
||||||
|
|
||||||
Will automatically ensure that all build prerequisites are available via ez_setup
|
Will automatically ensure that all build prerequisites are available
|
||||||
|
via ez_setup
|
||||||
|
|
||||||
|
Usage (Mac OS X):
|
||||||
|
python setup.py py2app
|
||||||
|
|
||||||
Usage (Windows):
|
Usage (Windows):
|
||||||
python setup.py build
|
python setup.py build
|
||||||
|
|
||||||
Usage (OS X):
|
|
||||||
python setup.py py2app
|
|
||||||
"""
|
"""
|
||||||
from ez_setup import use_setuptools
|
from ez_setup import use_setuptools
|
||||||
use_setuptools()
|
use_setuptools()
|
||||||
@@ -18,6 +19,10 @@ NAME = "KindleComicConverter"
|
|||||||
VERSION = "2.7"
|
VERSION = "2.7"
|
||||||
MAIN = "kcc.py"
|
MAIN = "kcc.py"
|
||||||
|
|
||||||
|
includefiles = ['README.md', 'MANIFEST.in', 'LICENSE.txt', 'comic2ebook.ico', 'comic2ebook.icns']
|
||||||
|
includes = []
|
||||||
|
excludes = []
|
||||||
|
|
||||||
if sys.platform == "darwin":
|
if sys.platform == "darwin":
|
||||||
from setuptools import setup
|
from setuptools import setup
|
||||||
extra_options = dict(
|
extra_options = dict(
|
||||||
@@ -38,42 +43,56 @@ if sys.platform == "darwin":
|
|||||||
)
|
)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
elif sys.platform == "win32":
|
elif sys.platform == 'win32':
|
||||||
from cx_Freeze import setup, Executable
|
from cx_Freeze import setup, Executable
|
||||||
base = "Win32GUI"
|
base = "Win32GUI"
|
||||||
extra_options = dict(
|
extra_options = dict(
|
||||||
options = {"build_exe": {"include_files": ["comic2ebook.ico"]}},
|
executables=[Executable("kcc.py", base=base, icon='comic2ebook.ico',
|
||||||
executables=[Executable(MAIN, base=base, icon="comic2ebook.ico", appendScriptToExe=True, appendScriptToLibrary=False, compress=True)]
|
appendScriptToExe=True, appendScriptToLibrary=False)],
|
||||||
|
options=dict(
|
||||||
|
build_exe=dict(
|
||||||
|
compressed=True
|
||||||
|
)
|
||||||
|
)
|
||||||
)
|
)
|
||||||
|
base = "Win32GUI"
|
||||||
|
extra_options = dict(
|
||||||
|
options={"build_exe": {"include_files": includefiles, 'excludes': excludes, 'compressed': True}},
|
||||||
|
executables=[Executable(MAIN,
|
||||||
|
base='WIN32GUI',
|
||||||
|
icon="comic2ebook.ico",
|
||||||
|
copyDependentFiles=True,
|
||||||
|
appendScriptToExe=True,
|
||||||
|
appendScriptToLibrary=False,
|
||||||
|
compress=True)])
|
||||||
else:
|
else:
|
||||||
extra_options = dict(
|
extra_options = dict(
|
||||||
scripts=[MAIN],
|
scripts=[MAIN],
|
||||||
)
|
)
|
||||||
|
|
||||||
setup(
|
setup(
|
||||||
name = NAME,
|
name=NAME,
|
||||||
version = VERSION,
|
version=VERSION,
|
||||||
author = "Ciro Mattia Gonano",
|
author="Ciro Mattia Gonano",
|
||||||
author_email = "ciromattia@gmail.com",
|
author_email="ciromattia@gmail.com",
|
||||||
description = "A tool to convert comics (CBR/CBZ/PDFs/image folders) to MOBI.",
|
description="A tool to convert comics (CBR/CBZ/PDFs/image folders) to Mobipocket.",
|
||||||
license = "ISC License (ISCL)",
|
license="ISC License (ISCL)",
|
||||||
keywords = "kindle comic mobipocket mobi cbz cbr manga",
|
keywords="kindle comic mobipocket mobi cbz cbr manga",
|
||||||
url = "http://github.com/ciromattia/kcc",
|
url="http://github.com/ciromattia/kcc",
|
||||||
classifiers=[
|
classifiers=[
|
||||||
'Development Status :: 4 - Beta'
|
'Development Status :: 4 - Beta'
|
||||||
'License :: OSI Approved :: ISC License (ISCL)',
|
'License :: OSI Approved :: ISC License (ISCL)',
|
||||||
'Environment :: Console',
|
'Environment :: Console',
|
||||||
'Environment :: MacOS X',
|
'Environment :: MacOS X',
|
||||||
'Environment :: Win32 (MS Windows)',
|
'Environment :: Win32 (MS Windows)',
|
||||||
'Environment :: X11 Applications',
|
'Environment :: X11 Applications',
|
||||||
'Intended Audience :: End Users/Desktop',
|
'Intended Audience :: End Users/Desktop',
|
||||||
'Operating System :: OS Independent',
|
'Operating System :: OS Independent',
|
||||||
'Programming Language :: Python',
|
'Programming Language :: Python',
|
||||||
'Programming Language :: Python :: 3',
|
'Programming Language :: Python :: 2.7',
|
||||||
'Topic :: Multimedia :: Graphics :: Graphics Conversion',
|
'Topic :: Multimedia :: Graphics :: Graphics Conversion',
|
||||||
'Topic :: Utilities'
|
'Topic :: Utilities'
|
||||||
],
|
],
|
||||||
packages=['kcc'],
|
packages=['kcc'],
|
||||||
include_package_data=True,
|
|
||||||
**extra_options
|
**extra_options
|
||||||
)
|
)
|
||||||
Reference in new issue
Block a user