mirror of
https://github.com/ciromattia/kcc
synced 2026-07-11 15:33:17 +00:00
fix macOS app version showing 0.0.0 in Info.plist (#1385)
This commit is contained in:
@@ -0,0 +1,61 @@
|
||||
# -*- mode: python ; coding: utf-8 -*-
|
||||
# macOS GUI build, used by setup.py build_binary
|
||||
|
||||
import sys
|
||||
|
||||
sys.path.insert(0, SPECPATH)
|
||||
from kindlecomicconverter import __version__
|
||||
|
||||
|
||||
a = Analysis(
|
||||
['kcc.py'],
|
||||
pathex=[],
|
||||
binaries=[],
|
||||
datas=[],
|
||||
hiddenimports=['_cffi_backend'],
|
||||
hookspath=[],
|
||||
hooksconfig={},
|
||||
runtime_hooks=[],
|
||||
excludes=[],
|
||||
noarchive=False,
|
||||
optimize=0,
|
||||
)
|
||||
pyz = PYZ(a.pure)
|
||||
|
||||
exe = EXE(
|
||||
pyz,
|
||||
a.scripts,
|
||||
[],
|
||||
exclude_binaries=True,
|
||||
name='Kindle Comic Converter',
|
||||
debug=False,
|
||||
bootloader_ignore_signals=False,
|
||||
strip=True,
|
||||
upx=True,
|
||||
console=False,
|
||||
disable_windowed_traceback=False,
|
||||
argv_emulation=False,
|
||||
target_arch=None,
|
||||
codesign_identity=None,
|
||||
entitlements_file=None,
|
||||
icon=['icons/comic2ebook.icns'],
|
||||
)
|
||||
coll = COLLECT(
|
||||
exe,
|
||||
a.binaries,
|
||||
a.datas,
|
||||
strip=True,
|
||||
upx=True,
|
||||
upx_exclude=[],
|
||||
name='Kindle Comic Converter',
|
||||
)
|
||||
app = BUNDLE(
|
||||
coll,
|
||||
name='Kindle Comic Converter.app',
|
||||
icon='icons/comic2ebook.icns',
|
||||
bundle_identifier=None,
|
||||
info_plist={
|
||||
'CFBundleShortVersionString': __version__,
|
||||
'CFBundleVersion': __version__,
|
||||
},
|
||||
)
|
||||
@@ -38,7 +38,7 @@ class BuildBinaryCommand(setuptools.Command):
|
||||
def run(self):
|
||||
VERSION = __version__
|
||||
if sys.platform == 'darwin':
|
||||
os.system('pyinstaller --hidden-import=_cffi_backend -y -D -i icons/comic2ebook.icns -n "Kindle Comic Converter" -w -s kcc.py')
|
||||
os.system('pyinstaller -y kcc-macos.spec')
|
||||
# TODO /usr/bin/codesign --force -s "$MACOS_CERTIFICATE_NAME" --options runtime dist/Applications/Kindle\ Comic\ Converter.app -v
|
||||
min_os = os.getenv('MACOSX_DEPLOYMENT_TARGET', '')
|
||||
if min_os.startswith('10.1'):
|
||||
|
||||
Reference in New Issue
Block a user