Files
krowlog/make_installer.py
Andreas Huber 67f16571f1 add version info to compiled executable
This works on Windows, but it might not work on Linux.
Also the version number is not updated automatically.
I probably have to generate the file from a template, because
even though this is a python file you cannot add python code.
2025-03-26 11:17:07 +01:00

26 lines
874 B
Python

import PyInstaller.__main__
import os
os.system("git -C . describe --match \"*.*.*\" --tags > version.txt")
PyInstaller.__main__.run([
'krowlog.py',
# '--onefile',
'--noconfirm',
'--version-file=version.py',
'--name=krowlog',
'--windowed',
'--icon=icons' + os.sep + 'krowlog.ico', # doesn't work on Linux (needs .desktop file), windows needs ico
'--add-data', 'src' + os.pathsep + 'src',
'--add-binary', 'icons' + os.pathsep + 'icons',
'--add-binary', 'locales' + os.pathsep + 'locales',
'--add-binary', 'LICENSE' + os.pathsep + '.',
'--add-binary', 'changelog.txt' + os.pathsep + '.',
'--add-binary', 'version.txt' + os.pathsep + '.',
'--hidden-import=krowlog',
'--hidden-import=watchdog',
'--hidden-import=watchdog.observers',
'--hidden-import=watchdog.version',
'--hidden-import=configparser'
])