install.py

branch
5_4_x
changeset 3513
e3fe4823272a
parent 3512
29c2cea601cc
child 3514
f694be6063ef
equal deleted inserted replaced
3512:29c2cea601cc 3513:e3fe4823272a
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