install.py

changeset 3509
bf0673c8f155
parent 3508
4861f0bb3509
child 3510
31d7e522ecb2
equal deleted inserted replaced
3508:4861f0bb3509 3509:bf0673c8f155
420 420
421 if sys.platform == "darwin": 421 if sys.platform == "darwin":
422 # delete the Mac app bundle 422 # delete the Mac app bundle
423 if os.path.exists("/Developer/Applications/Eric5"): 423 if os.path.exists("/Developer/Applications/Eric5"):
424 shutil.rmtree("/Developer/Applications/Eric5") 424 shutil.rmtree("/Developer/Applications/Eric5")
425 if os.path.exists( 425 try:
426 os.path.join(macAppBundlePath, macAppBundleName)): 426 macAppBundlePath = getConfig("macAppBundlePath")
427 shutil.rmtree( 427 macAppBundleName = getConfig("macAppBundleName")
428 os.path.join(macAppBundlePath, macAppBundleName)) 428 except AttributeError:
429 macAppBundlePath = "/Applications"
430 macAppBundleName = "eric5.app"
431 if os.path.exists("/Applications/" + macAppBundleName):
432 shutil.rmtree("/Applications/" + macAppBundleName)
433 bundlePath = os.path.join(macAppBundlePath, macAppBundleName)
434 if os.path.exists(bundlePath):
435 shutil.rmtree(bundlePath)
429 436
430 except (IOError, OSError) as msg: 437 except (IOError, OSError) as msg:
431 sys.stderr.write( 438 sys.stderr.write(
432 'Error: {0}\nTry install with admin rights.\n'.format(msg)) 439 'Error: {0}\nTry install with admin rights.\n'.format(msg))
433 exit(7) 440 exit(7)

eric ide

mercurial