install.py

branch
5_5_x
changeset 3712
09b6f92a82ca
parent 3706
6265b4f8deb7
child 3725
540b1f7b25b5
equal deleted inserted replaced
3710:0060733678b0 3712:09b6f92a82ca
45 cfg = {} 45 cfg = {}
46 progLanguages = ["Python", "Ruby", "QSS"] 46 progLanguages = ["Python", "Ruby", "QSS"]
47 sourceDir = "eric" 47 sourceDir = "eric"
48 configName = 'eric5config.py' 48 configName = 'eric5config.py'
49 defaultMacAppBundleName = "eric5.app" 49 defaultMacAppBundleName = "eric5.app"
50 defaultMacAppBundlePath = "/Applications"
50 macAppBundleName = "eric5.app" 51 macAppBundleName = "eric5.app"
51 macAppBundlePath = "/Applications" 52 macAppBundlePath = "/Applications"
52 macPythonExe = "{0}/Resources/Python.app/Contents/MacOS/Python".format( 53 macPythonExe = "{0}/Resources/Python.app/Contents/MacOS/Python".format(
53 sys.exec_prefix) 54 sys.exec_prefix)
54 55
497 shutil.rmtree("/Developer/Applications/Eric5") 498 shutil.rmtree("/Developer/Applications/Eric5")
498 try: 499 try:
499 macAppBundlePath = getConfig("macAppBundlePath") 500 macAppBundlePath = getConfig("macAppBundlePath")
500 macAppBundleName = getConfig("macAppBundleName") 501 macAppBundleName = getConfig("macAppBundleName")
501 except AttributeError: 502 except AttributeError:
502 macAppBundlePath = "/Applications" 503 macAppBundlePath = defaultMacAppBundlePath
503 macAppBundleName = "eric5.app" 504 macAppBundleName = defaultMacAppBundleName
504 if os.path.exists("/Applications/" + macAppBundleName): 505 for bundlePath in [os.path.join(defaultMacAppBundleName,
505 shutil.rmtree("/Applications/" + macAppBundleName) 506 macAppBundleName),
506 bundlePath = os.path.join(macAppBundlePath, macAppBundleName) 507 os.path.join(macAppBundlePath,
507 if os.path.exists(bundlePath): 508 macAppBundleName),
508 shutil.rmtree(bundlePath) 509 ]:
510 if os.path.exists(bundlePath):
511 shutil.rmtree(bundlePath)
509 except (IOError, OSError) as msg: 512 except (IOError, OSError) as msg:
510 sys.stderr.write( 513 sys.stderr.write(
511 'Error: {0}\nTry install with admin rights.\n'.format(msg)) 514 'Error: {0}\nTry install with admin rights.\n'.format(msg))
512 exit(7) 515 exit(7)
513 516

eric ide

mercurial