scripts/uninstall.py

branch
eric7
changeset 10264
f06151820839
parent 10261
fa560567d555
child 10272
7ae72d1df070
child 10300
60e8f2175b3b
diff -r f4bb67586615 -r f06151820839 scripts/uninstall.py
--- a/scripts/uninstall.py	Sun Oct 29 12:19:47 2023 +0100
+++ b/scripts/uninstall.py	Sun Oct 29 15:50:37 2023 +0100
@@ -24,10 +24,8 @@
 pyModDir = None
 progLanguages = ["MicroPython", "Python3", "QSS"]
 defaultMacAppBundleName = "eric7.app"
-if os.getuid() == 0:
-    defaultMacAppBundlePath = "/Applications"
-else:
-    defaultMacAppBundlePath = os.path.expanduser("~/Applications")
+defaultMacAppBundlePath = "/Applications"
+defaultMacUserAppBundlePath = os.path.expanduser("~/Applications")
 settingsNameOrganization = "Eric7"
 settingsNameGlobal = "eric7"
 
@@ -343,10 +341,15 @@
         macAppBundlePath = getConfig("macAppBundlePath")
         macAppBundleName = getConfig("macAppBundleName")
     except AttributeError:
-        macAppBundlePath = defaultMacAppBundlePath
+        macAppBundlePath = (
+            defaultMacAppBundlePath
+            if os.getpid() == 0
+            else defaultMacUserAppBundlePath
+        )
         macAppBundleName = defaultMacAppBundleName
     for bundlePath in [
         os.path.join(defaultMacAppBundlePath, macAppBundleName),
+        os.path.join(defaultMacUserAppBundlePath, macAppBundleName),
         os.path.join(macAppBundlePath, macAppBundleName),
     ]:
         if os.path.exists(bundlePath):

eric ide

mercurial