scripts/uninstall.py

branch
eric7-maintenance
changeset 10272
7ae72d1df070
parent 10101
34f74c19ed7a
parent 10264
f06151820839
child 10349
df7edc29cbfb
--- a/scripts/uninstall.py	Thu Oct 05 10:06:49 2023 +0200
+++ b/scripts/uninstall.py	Tue Oct 31 09:22:17 2023 +0100
@@ -25,6 +25,7 @@
 progLanguages = ["MicroPython", "Python3", "QSS"]
 defaultMacAppBundleName = "eric7.app"
 defaultMacAppBundlePath = "/Applications"
+defaultMacUserAppBundlePath = os.path.expanduser("~/Applications")
 settingsNameOrganization = "Eric7"
 settingsNameGlobal = "eric7"
 
@@ -340,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