scripts/create_windows_links.py

branch
eric7
changeset 9473
3f23dbf37dbe
parent 9448
ea215f7afab3
child 9482
a2bc06a54d9d
equal deleted inserted replaced
9472:5798ee4a8807 9473:3f23dbf37dbe
7 7
8 """ 8 """
9 Installation script for the eric IDE and all eric related tools. 9 Installation script for the eric IDE and all eric related tools.
10 """ 10 """
11 11
12 import contextlib
12 import os 13 import os
13 import sys 14 import sys
14 import contextlib
15 15
16 from eric7.Globals import getConfig 16 from eric7.Globals import getConfig
17 17
18 18
19 def main(argv): 19 def main(argv):
92 @param targetPath path the shortcut shall point to 92 @param targetPath path the shortcut shall point to
93 @type str 93 @type str
94 @param iconPath path of the icon file 94 @param iconPath path of the icon file
95 @type str 95 @type str
96 """ 96 """
97 from pywintypes import com_error
97 from win32com.client import Dispatch 98 from win32com.client import Dispatch
98 from pywintypes import com_error
99 99
100 with contextlib.suppress(com_error): 100 with contextlib.suppress(com_error):
101 shell = Dispatch("WScript.Shell") 101 shell = Dispatch("WScript.Shell")
102 shortcut = shell.CreateShortCut(linkPath) 102 shortcut = shell.CreateShortCut(linkPath)
103 shortcut.Targetpath = targetPath 103 shortcut.Targetpath = targetPath

eric ide

mercurial