prepare to add command line options

This commit is contained in:
2022-08-28 14:31:55 +02:00
parent bfe8ae460e
commit 33b79d6935
2 changed files with 30 additions and 20 deletions

View File

@@ -5,8 +5,7 @@ from pathlib import Path
def install():
if sys.platform == 'win32' or sys.platform == 'cygwin':
# nothing to do
pass
_windows_set_icon()
else:
if _is_executable():
_linux_install_desktop_file()
@@ -83,3 +82,12 @@ def _linux_install_icon_to_path(path: Path):
</svg>""")
path.write_text(svg, "utf8")
pass
def _windows_set_icon():
# make icon appear in Windows
# see https://stackoverflow.com/questions/1551605/how-to-set-applications-taskbar-icon-in-windows-7/1552105#1552105
if sys.platform == 'win32' or sys.platform == 'cygwin':
myappid = 'krowlog' # arbitrary string
import ctypes
ctypes.windll.shell32.SetCurrentProcessExplicitAppUserModelID(myappid)