1
0
mirror of https://github.com/ciromattia/kcc synced 2025-12-13 09:46:25 +00:00

prioritize KC2 over KP3 kindlegen version (#574)

* prioritize KC2 over KP3

* remove link to buggy KP3 kindlegen

* prioritize KC2 since KP3 version is buggy as of v3.72

* add kindlegen install link

* update comments
This commit is contained in:
Alex Xu
2023-08-08 13:25:03 -07:00
committed by GitHub
parent 6836c20377
commit 0d417b8e11
3 changed files with 8 additions and 15 deletions

6
kcc.py
View File

@@ -27,9 +27,10 @@ if sys.version_info < (3, 8, 0):
# OS specific workarounds
import os
if sys.platform.startswith('darwin'):
# prioritize KC2 since it optionally also installs KP3
mac_paths = [
'/Applications/Kindle Previewer 3.app/Contents/lib/fc/bin/',
'/Applications/Kindle Comic Creator/Kindle Comic Creator.app/Contents/MacOS',
'/Applications/Kindle Previewer 3.app/Contents/lib/fc/bin/',
]
if getattr(sys, 'frozen', False):
os.environ['PATH'] += os.pathsep + os.pathsep.join(mac_paths +
@@ -45,9 +46,10 @@ if sys.platform.startswith('darwin'):
os.environ['PATH'] += os.pathsep + os.pathsep.join(mac_paths)
os.chdir(os.path.dirname(os.path.abspath(__file__)))
elif sys.platform.startswith('win'):
# prioritize KC2 since it optionally also installs KP3
win_paths = [
os.path.expandvars('%LOCALAPPDATA%\\Amazon\\Kindle Previewer 3\\lib\\fc\\bin\\'),
os.path.expandvars('%LOCALAPPDATA%\\Amazon\\KC2'),
os.path.expandvars('%LOCALAPPDATA%\\Amazon\\Kindle Previewer 3\\lib\\fc\\bin\\'),
'C:\\Program Files\\7-Zip',
]
if getattr(sys, 'frozen', False):