install.py

branch
5_4_x
changeset 3513
e3fe4823272a
parent 3512
29c2cea601cc
child 3514
f694be6063ef
--- a/install.py	Sun Apr 13 17:35:21 2014 +0200
+++ b/install.py	Sun Apr 13 17:40:51 2014 +0200
@@ -422,10 +422,17 @@
             # delete the Mac app bundle
             if os.path.exists("/Developer/Applications/Eric5"):
                 shutil.rmtree("/Developer/Applications/Eric5")
-            if os.path.exists(
-                    os.path.join(macAppBundlePath, macAppBundleName)):
-                shutil.rmtree(
-                    os.path.join(macAppBundlePath, macAppBundleName))
+            try:
+                macAppBundlePath = getConfig("macAppBundlePath")
+                macAppBundleName = getConfig("macAppBundleName")
+            except AttributeError:
+                macAppBundlePath = "/Applications"
+                macAppBundleName = "eric5.app"
+            if os.path.exists("/Applications/" + macAppBundleName):
+                shutil.rmtree("/Applications/" + macAppBundleName)
+            bundlePath = os.path.join(macAppBundlePath, macAppBundleName)
+            if os.path.exists(bundlePath):
+                shutil.rmtree(bundlePath)
         
     except (IOError, OSError) as msg:
         sys.stderr.write(

eric ide

mercurial