uninstall.py

branch
5_1_x
changeset 1395
1eb21f914629
parent 1347
c1f7967d062f
child 1510
e75ecf2bd9dd
--- a/uninstall.py	Sat Oct 22 19:53:10 2011 +0200
+++ b/uninstall.py	Sun Oct 23 18:31:31 2011 +0200
@@ -131,6 +131,11 @@
         for apiname in glob.glob(os.path.join(apidir, progLanguage.lower(), "*.bas")):
             os.remove(apiname)
     
+    if sys.platform == "darwin":
+        # delete the Mac app bundle
+        if os.path.exists("/Developer/Applications/Eric5"):
+            shutil.rmtree("/Developer/Applications/Eric5")
+    
 def main(argv):
     """The main function of the script.
 
@@ -158,7 +163,9 @@
     try:
         uninstallEric()
     except IOError as msg:
-        sys.stderr.write('IOError: {0}\nTry uninstall as root.\n'.format(msg))
+        sys.stderr.write('IOError: {0}\nTry uninstall with admin rights.\n'.format(msg))
+    except OSError as msg:
+        sys.stderr.write('OSError: {0}\nTry uninstall with admin rights.\n'.format(msg))
     
     
 if __name__ == "__main__":

eric ide

mercurial