mirror of
https://github.com/ciromattia/kcc
synced 2025-12-12 17:26:23 +00:00
Bundle 7za and unrar for OSX too.
This commit is contained in:
3
.gitignore
vendored
3
.gitignore
vendored
@@ -7,7 +7,6 @@ dist
|
|||||||
test
|
test
|
||||||
Output
|
Output
|
||||||
kindlegen*
|
kindlegen*
|
||||||
UnRAR*
|
solaio
|
||||||
7za*
|
|
||||||
.DS_Store
|
.DS_Store
|
||||||
Thumbs.db
|
Thumbs.db
|
||||||
|
|||||||
6
kcc.py
6
kcc.py
@@ -40,8 +40,10 @@ except ImportError:
|
|||||||
from kcc import KCC_gui
|
from kcc import KCC_gui
|
||||||
from multiprocessing import freeze_support
|
from multiprocessing import freeze_support
|
||||||
if sys.platform.startswith('darwin'):
|
if sys.platform.startswith('darwin'):
|
||||||
# Workaround Finder-launched app PATH evaluation
|
if 'RESOURCEPATH' in os.environ:
|
||||||
os.environ['PATH'] = '/usr/local/bin:' + os.environ['PATH']
|
os.environ['PATH'] = os.environ['RESOURCEPATH'] + ':' + os.environ['PATH']
|
||||||
|
else:
|
||||||
|
os.environ['PATH'] = os.path.dirname(os.path.abspath(__file__)) + '/other/:' + os.environ['PATH']
|
||||||
from kcc import KCC_ui_osx as KCC_ui
|
from kcc import KCC_ui_osx as KCC_ui
|
||||||
elif sys.platform.startswith('linux'):
|
elif sys.platform.startswith('linux'):
|
||||||
from kcc import KCC_ui_linux as KCC_ui
|
from kcc import KCC_ui_linux as KCC_ui
|
||||||
|
|||||||
11
setup.py
11
setup.py
@@ -24,10 +24,11 @@ if platform == "darwin":
|
|||||||
argv_emulation=True,
|
argv_emulation=True,
|
||||||
iconfile='icons/comic2ebook.icns',
|
iconfile='icons/comic2ebook.icns',
|
||||||
includes=['PIL', 'sip', 'PyQt4', 'PyQt4.QtCore', 'PyQt4.QtGui', 'PyQt4.QtNetwork'],
|
includes=['PIL', 'sip', 'PyQt4', 'PyQt4.QtCore', 'PyQt4.QtGui', 'PyQt4.QtNetwork'],
|
||||||
|
qt_plugins=[],
|
||||||
excludes=['PyQt4.QtDeclarative', 'PyQt4.QtDesigner', 'PyQt4.QtHelp', 'PyQt4.QtMultimedia',
|
excludes=['PyQt4.QtDeclarative', 'PyQt4.QtDesigner', 'PyQt4.QtHelp', 'PyQt4.QtMultimedia',
|
||||||
'PyQt4.QtOpenGL', 'PyQt4.QtScript', 'PyQt4.QtScriptTools', 'PyQt4.QtSql', 'PyQt4.QtSvg',
|
'PyQt4.QtOpenGL', 'PyQt4.QtScript', 'PyQt4.QtScriptTools', 'PyQt4.QtSql', 'PyQt4.QtSvg',
|
||||||
'PyQt4.QtXmlPatterns', 'PyQt4.QtXml', 'PyQt4.QtWebKit', 'PyQt4.QtTest', 'Tkinter'],
|
'PyQt4.QtXmlPatterns', 'PyQt4.QtXml', 'PyQt4.QtWebKit', 'PyQt4.QtTest', 'Tkinter'],
|
||||||
resources=['LICENSE.txt', 'other/Additional-LICENSE.txt', 'other/unrar'],
|
resources=['LICENSE.txt', 'other/Additional-LICENSE.txt', 'other/unrar', 'other/7za'],
|
||||||
plist=dict(
|
plist=dict(
|
||||||
CFBundleName=NAME,
|
CFBundleName=NAME,
|
||||||
CFBundleShortVersionString=VERSION,
|
CFBundleShortVersionString=VERSION,
|
||||||
@@ -44,6 +45,9 @@ if platform == "darwin":
|
|||||||
)
|
)
|
||||||
],
|
],
|
||||||
LSMinimumSystemVersion='10.6.0',
|
LSMinimumSystemVersion='10.6.0',
|
||||||
|
LSEnvironment=dict(
|
||||||
|
PATH='/usr/local/bin:/usr/bin:/bin'
|
||||||
|
),
|
||||||
NSHumanReadableCopyright='ISC License (ISCL)'
|
NSHumanReadableCopyright='ISC License (ISCL)'
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
@@ -84,3 +88,8 @@ setup(
|
|||||||
packages=['kcc'], requires=['Pillow'],
|
packages=['kcc'], requires=['Pillow'],
|
||||||
**extra_options
|
**extra_options
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if platform == "darwin":
|
||||||
|
from os import chmod
|
||||||
|
chmod('dist/' + NAME + '.app/Contents/Resources/unrar', 0777)
|
||||||
|
chmod('dist/' + NAME + '.app/Contents/Resources/7za', 0777)
|
||||||
Reference in New Issue
Block a user