create a desktop file when running the binary distribution on Linux

This commit is contained in:
2022-08-28 11:54:19 +02:00
parent 554220148f
commit fd840a2c95
3 changed files with 95 additions and 13 deletions

View File

@@ -5,6 +5,7 @@ from PySide6.QtWidgets import QApplication
from PySide6.QtCore import QTimer
import sys
import constants
from src import install
from src.pluginregistry import PluginRegistry
import gettext
from src.ui.icon import Icon
@@ -37,8 +38,12 @@ if __name__ == "__main__":
if sys.platform == 'win32' or sys.platform == 'cygwin':
myappid = 'krowlog' # arbitrary string
import ctypes
ctypes.windll.shell32.SetCurrentProcessExplicitAppUserModelID(myappid)
# install stuff, e.g. a desktop file
install.install()
# workaround to make signals work in QT apps.
# They do not work out of the box, because the main thread
# is running in C++ code once app.exec() is executed