mirror of
https://github.com/ciromattia/kcc
synced 2025-12-25 23:51:54 +00:00
Fixed KindleGen detection on macOS
This commit is contained in:
3
kcc.py
3
kcc.py
@@ -28,7 +28,8 @@ import os
|
|||||||
if sys.platform.startswith('darwin'):
|
if sys.platform.startswith('darwin'):
|
||||||
if getattr(sys, 'frozen', False):
|
if getattr(sys, 'frozen', False):
|
||||||
os.environ['PATH'] = os.path.dirname(os.path.abspath(sys.executable)) + \
|
os.environ['PATH'] = os.path.dirname(os.path.abspath(sys.executable)) + \
|
||||||
'/../Resources:/usr/local/bin:/usr/bin:/bin'
|
'/../Resources:/Applications/Kindle Comic Creator/Kindle Comic Creator.app/Contents/' \
|
||||||
|
'MacOS:/usr/local/bin:/usr/bin:/bin'
|
||||||
os.chdir(os.path.dirname(os.path.abspath(sys.executable)) + '/../Resources')
|
os.chdir(os.path.dirname(os.path.abspath(sys.executable)) + '/../Resources')
|
||||||
os.system('defaults write com.kindlecomicconverter.KindleComicConverter ApplePersistenceIgnoreState YES')
|
os.system('defaults write com.kindlecomicconverter.KindleComicConverter ApplePersistenceIgnoreState YES')
|
||||||
os.system('defaults write com.kindlecomicconverter.KindleComicConverter NSInitialToolTipDelay -int 1000')
|
os.system('defaults write com.kindlecomicconverter.KindleComicConverter NSInitialToolTipDelay -int 1000')
|
||||||
|
|||||||
@@ -858,7 +858,8 @@ class KCCGUI(KCC_ui.Ui_mainWindow):
|
|||||||
if sys.platform.startswith('win'):
|
if sys.platform.startswith('win'):
|
||||||
self.addMessage('Download it and place EXE in KCC directory.', 'error')
|
self.addMessage('Download it and place EXE in KCC directory.', 'error')
|
||||||
elif sys.platform.startswith('darwin'):
|
elif sys.platform.startswith('darwin'):
|
||||||
self.addMessage('Install it using <a href="http://brew.sh/">Brew</a>.', 'error')
|
self.addMessage('Install it using <a href="http://brew.sh/">Brew</a>: <i>brew cask install kindle-c'
|
||||||
|
'omic-creator</i>', 'error')
|
||||||
else:
|
else:
|
||||||
self.addMessage('Download it and place executable in /usr/local/bin directory.', 'error')
|
self.addMessage('Download it and place executable in /usr/local/bin directory.', 'error')
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user