install.py

branch
5_4_x
changeset 3713
cebe99c3ca18
parent 3707
ea1db3ec60b3
child 3754
57e71efb769f
equal deleted inserted replaced
3711:a48ba9505621 3713:cebe99c3ca18
32 cfg = {} 32 cfg = {}
33 progLanguages = ["Python", "Ruby"] 33 progLanguages = ["Python", "Ruby"]
34 sourceDir = "eric" 34 sourceDir = "eric"
35 configName = 'eric5config.py' 35 configName = 'eric5config.py'
36 defaultMacAppBundleName = "eric5.app" 36 defaultMacAppBundleName = "eric5.app"
37 defaultMacAppBundlePath = "/Applications"
37 macAppBundleName = "eric5.app" 38 macAppBundleName = "eric5.app"
38 macAppBundlePath = "/Applications" 39 macAppBundlePath = "/Applications"
39 macPythonExe = "{0}/Resources/Python.app/Contents/MacOS/Python".format( 40 macPythonExe = "{0}/Resources/Python.app/Contents/MacOS/Python".format(
40 sys.exec_prefix) 41 sys.exec_prefix)
41 42
425 shutil.rmtree("/Developer/Applications/Eric5") 426 shutil.rmtree("/Developer/Applications/Eric5")
426 try: 427 try:
427 macAppBundlePath = getConfig("macAppBundlePath") 428 macAppBundlePath = getConfig("macAppBundlePath")
428 macAppBundleName = getConfig("macAppBundleName") 429 macAppBundleName = getConfig("macAppBundleName")
429 except AttributeError: 430 except AttributeError:
430 macAppBundlePath = "/Applications" 431 macAppBundlePath = defaultMacAppBundlePath
431 macAppBundleName = "eric5.app" 432 macAppBundleName = defaultMacAppBundleName
432 if os.path.exists("/Applications/" + macAppBundleName): 433 for bundlePath in [os.path.join(defaultMacAppBundleName,
433 shutil.rmtree("/Applications/" + macAppBundleName) 434 macAppBundleName),
434 bundlePath = os.path.join(macAppBundlePath, macAppBundleName) 435 os.path.join(macAppBundlePath,
435 if os.path.exists(bundlePath): 436 macAppBundleName),
436 shutil.rmtree(bundlePath) 437 ]:
438 if os.path.exists(bundlePath):
439 shutil.rmtree(bundlePath)
437 440
438 except (IOError, OSError) as msg: 441 except (IOError, OSError) as msg:
439 sys.stderr.write( 442 sys.stderr.write(
440 'Error: {0}\nTry install with admin rights.\n'.format(msg)) 443 'Error: {0}\nTry install with admin rights.\n'.format(msg))
441 exit(7) 444 exit(7)

eric ide

mercurial