uninstall.py

changeset 1387
1734bc5f4f82
parent 1346
8c9af7608afa
child 1509
c0b5e693b0eb
--- a/uninstall.py	Sat Oct 22 19:54:49 2011 +0200
+++ b/uninstall.py	Sun Oct 23 14:15:17 2011 +0200
@@ -132,6 +132,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.
@@ -160,7 +165,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