25 # Define the globals. |
25 # Define the globals. |
26 progName = None |
26 progName = None |
27 pyModDir = None |
27 pyModDir = None |
28 progLanguages = ["Python", "Ruby", "QSS"] |
28 progLanguages = ["Python", "Ruby", "QSS"] |
29 includePythonVariant = False |
29 includePythonVariant = False |
|
30 defaultMacAppBundleName = "eric6.app" |
|
31 defaultMacAppBundlePath = "/Applications" |
30 |
32 |
31 # Define file name markers for Python variants |
33 # Define file name markers for Python variants |
32 PythonMarkers = { |
34 PythonMarkers = { |
33 2: "_py2", |
35 2: "_py2", |
34 3: "_py3", |
36 3: "_py3", |
172 shutil.rmtree("/Developer/Applications/Eric6") |
174 shutil.rmtree("/Developer/Applications/Eric6") |
173 try: |
175 try: |
174 macAppBundlePath = getConfig("macAppBundlePath") |
176 macAppBundlePath = getConfig("macAppBundlePath") |
175 macAppBundleName = getConfig("macAppBundleName") |
177 macAppBundleName = getConfig("macAppBundleName") |
176 except AttributeError: |
178 except AttributeError: |
177 macAppBundlePath = "/Applications" |
179 macAppBundlePath = defaultMacAppBundlePath |
178 macAppBundleName = "eric6.app" |
180 macAppBundleName = defaultMacAppBundleName |
179 if os.path.exists("/Applications/" + macAppBundleName): |
181 for bundlePath in [os.path.join(defaultMacAppBundleName, |
180 shutil.rmtree("/Applications/" + macAppBundleName) |
182 macAppBundleName), |
181 bundlePath = os.path.join(macAppBundlePath, macAppBundleName) |
183 os.path.join(macAppBundlePath, |
182 if os.path.exists(bundlePath): |
184 macAppBundleName), |
183 shutil.rmtree(bundlePath) |
185 ]: |
|
186 if os.path.exists(bundlePath): |
|
187 shutil.rmtree(bundlePath) |
184 except (IOError, OSError) as msg: |
188 except (IOError, OSError) as msg: |
185 sys.stderr.write( |
189 sys.stderr.write( |
186 'Error: {0}\nTry uninstall with admin rights.\n'.format(msg)) |
190 'Error: {0}\nTry uninstall with admin rights.\n'.format(msg)) |
187 exit(7) |
191 exit(7) |
188 |
192 |