Skip to content

Commit

Permalink
add chip dict
Browse files Browse the repository at this point in the history
  • Loading branch information
axu2 committed Jan 15, 2024
1 parent 8fd1c2a commit e681f0b
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,12 @@ def run(self):
if sys.platform == 'darwin':
os.system('pyinstaller -y -D -i icons/comic2ebook.icns -n "Kindle Comic Converter" -w -s kcc.py')
# TODO /usr/bin/codesign --force -s "$MACOS_CERTIFICATE_NAME" --options runtime dist/Applications/Kindle\ Comic\ Converter.app -v
chip = 'apple' if platform.processor() == 'arm' else 'intel'
os.system(f'appdmg kcc.json dist/kcc_macos_{chip}_{VERSION}.dmg')
chip = {
'arm': 'apple',
'i386': 'intel'
}
cpu = platform.processor()
os.system(f'appdmg kcc.json dist/kcc_macos_{chip.get(cpu, cpu)}_{VERSION}.dmg')
sys.exit(0)
elif sys.platform == 'win32':
os.system('pyinstaller -y -F -i icons\\comic2ebook.ico -n KCC_' + VERSION + ' -w --noupx kcc.py')
Expand Down

0 comments on commit e681f0b

Please sign in to comment.