mirror of
https://github.com/ciromattia/kcc
synced 2025-12-15 18:56:28 +00:00
Fixed OS X build script
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -4,3 +4,4 @@
|
|||||||
.idea
|
.idea
|
||||||
build
|
build
|
||||||
awkcc
|
awkcc
|
||||||
|
.DS_Store
|
||||||
|
|||||||
60
setup.py
60
setup.py
@@ -1,29 +1,54 @@
|
|||||||
"""
|
"""
|
||||||
cx_freeze build script for KCC.
|
cx_freeze/py2app 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 (Windows/Mac OS X):
|
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()
|
||||||
|
|
||||||
import sys
|
import sys
|
||||||
from cx_Freeze import setup, Executable
|
|
||||||
|
|
||||||
NAME = "KindleComicConverter"
|
NAME = "KindleComicConverter"
|
||||||
VERSION = "2.7"
|
VERSION = "2.7"
|
||||||
MAIN = "kcc.py"
|
MAIN = "kcc.py"
|
||||||
|
|
||||||
if sys.platform == "darwin":
|
if sys.platform == "darwin":
|
||||||
icon = "comic2ebook.icns"
|
from setuptools import setup
|
||||||
base = None
|
extra_options = dict(
|
||||||
buildEXEOptions = {}
|
setup_requires=['py2app'],
|
||||||
|
app=[MAIN],
|
||||||
|
options=dict(
|
||||||
|
py2app=dict(
|
||||||
|
argv_emulation=True,
|
||||||
|
iconfile='comic2ebook.icns',
|
||||||
|
plist=dict(
|
||||||
|
CFBundleName=NAME,
|
||||||
|
CFBundleShortVersionString=VERSION,
|
||||||
|
CFBundleGetInfoString=NAME + " " + VERSION + ", written 2012-2013 by Ciro Mattia Gonano",
|
||||||
|
CFBundleExecutable=NAME,
|
||||||
|
CFBundleIdentifier='com.github.ciromattia.kcc',
|
||||||
|
CFBundleSignature='dplt'
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
elif sys.platform == "win32":
|
elif sys.platform == "win32":
|
||||||
icon = "comic2ebook.ico"
|
from cx_Freeze import setup, Executable
|
||||||
base = "Win32GUI"
|
base = "Win32GUI"
|
||||||
buildEXEOptions = {"include_files": ["comic2ebook.ico"]}
|
extra_options = dict(
|
||||||
|
options = {"build_exe": {"include_files": ["comic2ebook.ico"]}},
|
||||||
|
executables=[Executable(MAIN, base=base, icon="comic2ebook.ico", appendScriptToExe=True, appendScriptToLibrary=False, compress=True)]
|
||||||
|
)
|
||||||
|
else:
|
||||||
|
extra_options = dict(
|
||||||
|
scripts=[MAIN],
|
||||||
|
)
|
||||||
|
|
||||||
setup(
|
setup(
|
||||||
name = NAME,
|
name = NAME,
|
||||||
@@ -34,6 +59,21 @@ setup(
|
|||||||
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",
|
||||||
options = {"build_exe": buildEXEOptions},
|
classifiers=[
|
||||||
executables = [Executable(MAIN, base=base, icon=icon, appendScriptToExe=True, appendScriptToLibrary=False, compress=True)]
|
'Development Status :: 4 - Beta'
|
||||||
|
'License :: OSI Approved :: ISC License (ISCL)',
|
||||||
|
'Environment :: Console',
|
||||||
|
'Environment :: MacOS X',
|
||||||
|
'Environment :: Win32 (MS Windows)',
|
||||||
|
'Environment :: X11 Applications',
|
||||||
|
'Intended Audience :: End Users/Desktop',
|
||||||
|
'Operating System :: OS Independent',
|
||||||
|
'Programming Language :: Python',
|
||||||
|
'Programming Language :: Python :: 3',
|
||||||
|
'Topic :: Multimedia :: Graphics :: Graphics Conversion',
|
||||||
|
'Topic :: Utilities'
|
||||||
|
],
|
||||||
|
packages=['kcc'],
|
||||||
|
include_package_data=True,
|
||||||
|
**extra_options
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user