scripts/install.py

branch
eric7
changeset 9473
3f23dbf37dbe
parent 9453
e5065dde905d
child 9482
a2bc06a54d9d
equal deleted inserted replaced
9472:5798ee4a8807 9473:3f23dbf37dbe
1211 os.path.join(directories["icns"], "eric.icns"), 1211 os.path.join(directories["icns"], "eric.icns"),
1212 ) 1212 )
1213 1213
1214 if os.path.exists(os.path.join("eric", "eric7", "UI", "Info.py")): 1214 if os.path.exists(os.path.join("eric", "eric7", "UI", "Info.py")):
1215 # Installing from archive 1215 # Installing from archive
1216 from eric.eric7.UI.Info import Version, CopyrightShort 1216 from eric.eric7.UI.Info import CopyrightShort, Version
1217 elif os.path.exists(os.path.join("eric7", "UI", "Info.py")): 1217 elif os.path.exists(os.path.join("eric7", "UI", "Info.py")):
1218 # Installing from source tree 1218 # Installing from source tree
1219 from eric7.UI.Info import Version, CopyrightShort 1219 from eric7.UI.Info import CopyrightShort, Version
1220 else: 1220 else:
1221 Version = "Unknown" 1221 Version = "Unknown"
1222 CopyrightShort = "(c) 2002 - 2022 Detlev Offenbach" 1222 CopyrightShort = "(c) 2002 - 2022 Detlev Offenbach"
1223 1223
1224 copyToFile( 1224 copyToFile(
1987 @param targetPath path the shortcut shall point to 1987 @param targetPath path the shortcut shall point to
1988 @type str 1988 @type str
1989 @param iconPath path of the icon file 1989 @param iconPath path of the icon file
1990 @type str 1990 @type str
1991 """ 1991 """
1992 from pywintypes import com_error
1992 from win32com.client import Dispatch 1993 from win32com.client import Dispatch
1993 from pywintypes import com_error
1994 1994
1995 with contextlib.suppress(com_error): 1995 with contextlib.suppress(com_error):
1996 shell = Dispatch("WScript.Shell") 1996 shell = Dispatch("WScript.Shell")
1997 shortcut = shell.CreateShortCut(linkPath) 1997 shortcut = shell.CreateShortCut(linkPath)
1998 shortcut.Targetpath = targetPath 1998 shortcut.Targetpath = targetPath

eric ide

mercurial