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 |