Skip to content

Commit

Permalink
replace version in Info.plist
Browse files Browse the repository at this point in the history
  • Loading branch information
darodi committed Dec 23, 2022
1 parent 65c329d commit 4fbcb79
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
import distutils.cmd
from kindlecomicconverter import __version__

OSX_INFO_PLIST = "other/osx/Info.plist"

NAME = 'KindleComicConverterDarodi'
MAIN = 'kcc.py'
VERSION = __version__
Expand All @@ -37,6 +39,13 @@ def finalize_options(self):
def run(self):
VERSION = __version__
if sys.platform == 'darwin':

with open(OSX_INFO_PLIST, 'r') as file:
filedata = file.read()
filedata = filedata.replace('5.5.2', VERSION)
with open(OSX_INFO_PLIST, 'w') as file:
file.write(filedata)

os.system('pyinstaller -y -F -i icons/comic2ebook.icns -n "Kindle Comic Converter" -w -s kcc.py')
os.makedirs('dist/Kindle Comic Converter.app/Contents/Resources/Codecs')
shutil.copy('other/osx/7z', 'dist/Kindle Comic Converter.app/Contents/Resources')
Expand Down

0 comments on commit 4fbcb79

Please sign in to comment.