install.py: added fault handler for desktop shortcut creation on Windows systems.

Sun, 03 May 2020 09:36:15 +0200

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Sun, 03 May 2020 09:36:15 +0200
changeset 7566
7845da7a7ec2
parent 7565
928373562e36
child 7567
bb196e51827d

install.py: added fault handler for desktop shortcut creation on Windows systems.

scripts/install.py file | annotate | diff | comparison | revisions
--- a/scripts/install.py	Sat May 02 19:10:08 2020 +0200
+++ b/scripts/install.py	Sun May 03 09:36:15 2020 +0200
@@ -1027,11 +1027,12 @@
     
     # 1. create desktop shortcuts
     regName = "Desktop"
-    desktopFolder = os.path.normpath(
-        os.path.expandvars(getWinregEntry(regName, regPath)))
-    for linkName, targetPath, iconPath in windowsDesktopEntries():
-        linkPath = os.path.join(desktopFolder, linkName)
-        createWindowsShortcut(linkPath, targetPath, iconPath)
+    desktopEntry = getWinregEntry(regName, regPath)
+    if desktopEntry:
+        desktopFolder = os.path.normpath(os.path.expandvars(desktopEntry))
+        for linkName, targetPath, iconPath in windowsDesktopEntries():
+            linkPath = os.path.join(desktopFolder, linkName)
+            createWindowsShortcut(linkPath, targetPath, iconPath)
     
     # 2. create start menu entry and shortcuts
     regName = "Programs"

eric ide

mercurial