summaryrefslogtreecommitdiffstats
path: root/awlsim-wininst-postinstall.py
blob: 3890f9d0c8c890206a5243ae43c82b27dd0aac31 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#! python

import sys
import os

try:
	if sys.argv[1] == "-install":
		wrapper = os.path.join(sys.prefix, "Scripts", "awlsim-win.bat")
		for d in (get_special_folder_path("CSIDL_COMMON_STARTMENU"),
			  get_special_folder_path("CSIDL_STARTMENU")):
			if os.path.isdir(d):
				shortcut = os.path.join(d, "Awlsim.lnk")
				create_shortcut(wrapper, "Awlsim", shortcut)
				file_created(shortcut)
				break
except Exception as e:
	print(str(e))
	raise
bues.ch cgit interface