scripts/uninstall.py

branch
eric7-maintenance
changeset 10272
7ae72d1df070
parent 10101
34f74c19ed7a
parent 10264
f06151820839
child 10349
df7edc29cbfb
equal deleted inserted replaced
10226:3a99ac054b39 10272:7ae72d1df070
23 currDir = os.getcwd() 23 currDir = os.getcwd()
24 pyModDir = None 24 pyModDir = None
25 progLanguages = ["MicroPython", "Python3", "QSS"] 25 progLanguages = ["MicroPython", "Python3", "QSS"]
26 defaultMacAppBundleName = "eric7.app" 26 defaultMacAppBundleName = "eric7.app"
27 defaultMacAppBundlePath = "/Applications" 27 defaultMacAppBundlePath = "/Applications"
28 defaultMacUserAppBundlePath = os.path.expanduser("~/Applications")
28 settingsNameOrganization = "Eric7" 29 settingsNameOrganization = "Eric7"
29 settingsNameGlobal = "eric7" 30 settingsNameGlobal = "eric7"
30 31
31 32
32 def exit(rcode=0): 33 def exit(rcode=0):
338 shutil.rmtree("/Developer/Applications/Eric7") 339 shutil.rmtree("/Developer/Applications/Eric7")
339 try: 340 try:
340 macAppBundlePath = getConfig("macAppBundlePath") 341 macAppBundlePath = getConfig("macAppBundlePath")
341 macAppBundleName = getConfig("macAppBundleName") 342 macAppBundleName = getConfig("macAppBundleName")
342 except AttributeError: 343 except AttributeError:
343 macAppBundlePath = defaultMacAppBundlePath 344 macAppBundlePath = (
345 defaultMacAppBundlePath
346 if os.getpid() == 0
347 else defaultMacUserAppBundlePath
348 )
344 macAppBundleName = defaultMacAppBundleName 349 macAppBundleName = defaultMacAppBundleName
345 for bundlePath in [ 350 for bundlePath in [
346 os.path.join(defaultMacAppBundlePath, macAppBundleName), 351 os.path.join(defaultMacAppBundlePath, macAppBundleName),
352 os.path.join(defaultMacUserAppBundlePath, macAppBundleName),
347 os.path.join(macAppBundlePath, macAppBundleName), 353 os.path.join(macAppBundlePath, macAppBundleName),
348 ]: 354 ]:
349 if os.path.exists(bundlePath): 355 if os.path.exists(bundlePath):
350 shutil.rmtree(bundlePath) 356 shutil.rmtree(bundlePath)
351 357

eric ide

mercurial