1
0
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:
Ciro Mattia Gonano
2013-11-08 15:32:22 +01:00
parent 6d9e2d3c03
commit 3e11a88a7c
3 changed files with 15 additions and 5 deletions

3
.gitignore vendored
View File

@@ -7,7 +7,6 @@ dist
test
Output
kindlegen*
UnRAR*
7za*
solaio
.DS_Store
Thumbs.db

6
kcc.py
View File

@@ -40,8 +40,10 @@ except ImportError:
from kcc import KCC_gui
from multiprocessing import freeze_support
if sys.platform.startswith('darwin'):
# Workaround Finder-launched app PATH evaluation
os.environ['PATH'] = '/usr/local/bin:' + os.environ['PATH']
if 'RESOURCEPATH' in os.environ:
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
elif sys.platform.startswith('linux'):
from kcc import KCC_ui_linux as KCC_ui

View File

@@ -24,10 +24,11 @@ if platform == "darwin":
argv_emulation=True,
iconfile='icons/comic2ebook.icns',
includes=['PIL', 'sip', 'PyQt4', 'PyQt4.QtCore', 'PyQt4.QtGui', 'PyQt4.QtNetwork'],
qt_plugins=[],
excludes=['PyQt4.QtDeclarative', 'PyQt4.QtDesigner', 'PyQt4.QtHelp', 'PyQt4.QtMultimedia',
'PyQt4.QtOpenGL', 'PyQt4.QtScript', 'PyQt4.QtScriptTools', 'PyQt4.QtSql', 'PyQt4.QtSvg',
'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(
CFBundleName=NAME,
CFBundleShortVersionString=VERSION,
@@ -44,6 +45,9 @@ if platform == "darwin":
)
],
LSMinimumSystemVersion='10.6.0',
LSEnvironment=dict(
PATH='/usr/local/bin:/usr/bin:/bin'
),
NSHumanReadableCopyright='ISC License (ISCL)'
)
)
@@ -84,3 +88,8 @@ setup(
packages=['kcc'], requires=['Pillow'],
**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)