22 currDir = os.getcwd() |
22 currDir = os.getcwd() |
23 pyModDir = None |
23 pyModDir = None |
24 progLanguages = ["Python", "Ruby", "QSS"] |
24 progLanguages = ["Python", "Ruby", "QSS"] |
25 defaultMacAppBundleName = "eric7.app" |
25 defaultMacAppBundleName = "eric7.app" |
26 defaultMacAppBundlePath = "/Applications" |
26 defaultMacAppBundlePath = "/Applications" |
27 settingsNameOrganization = "Eric6" |
27 settingsNameOrganization = "Eric7" |
28 settingsNameGlobal = "eric7" |
28 settingsNameGlobal = "eric7" |
29 |
29 |
30 |
30 |
31 def exit(rcode=0): |
31 def exit(rcode=0): |
32 """ |
32 """ |
130 "eric7_tray", "eric7_editor", |
130 "eric7_tray", "eric7_editor", |
131 "eric7_plugininstall", "eric7_pluginuninstall", |
131 "eric7_plugininstall", "eric7_pluginuninstall", |
132 "eric7_pluginrepository", "eric7_sqlbrowser", |
132 "eric7_pluginrepository", "eric7_sqlbrowser", |
133 "eric7_iconeditor", "eric7_snap", "eric7_hexeditor", |
133 "eric7_iconeditor", "eric7_snap", "eric7_hexeditor", |
134 "eric7_browser", "eric7_shell", |
134 "eric7_browser", "eric7_shell", |
135 # from Python2 era |
|
136 "eric7_webbrowser", |
|
137 ] |
135 ] |
138 |
136 |
139 try: |
137 try: |
140 for rem_wname in rem_wnames: |
138 for rem_wname in rem_wnames: |
141 for rwname in wrapperNames(getConfig('bindir'), rem_wname): |
139 for rwname in wrapperNames(getConfig('bindir'), rem_wname): |
255 "/usr/share/applications/eric7_browser.desktop", |
253 "/usr/share/applications/eric7_browser.desktop", |
256 "/usr/share/pixmaps/eric.png", |
254 "/usr/share/pixmaps/eric.png", |
257 "/usr/share/pixmaps/ericWeb.png", |
255 "/usr/share/pixmaps/ericWeb.png", |
258 "/usr/share/icons/eric.png", |
256 "/usr/share/icons/eric.png", |
259 "/usr/share/icons/ericWeb.png", |
257 "/usr/share/icons/ericWeb.png", |
260 # from Python2 era |
|
261 "/usr/share/applications/eric7_webbrowser.desktop", |
|
262 ]: |
258 ]: |
263 if os.path.exists(name): |
259 if os.path.exists(name): |
264 os.remove(name) |
260 os.remove(name) |
265 elif os.getuid() >= 1000: |
261 elif os.getuid() >= 1000: |
266 # it is assumed that user ids start at 1000 |
262 # it is assumed that user ids start at 1000 |
271 "~/.local/share/applications/eric7_browser.desktop", |
267 "~/.local/share/applications/eric7_browser.desktop", |
272 "~/.local/share/pixmaps/eric.png", |
268 "~/.local/share/pixmaps/eric.png", |
273 "~/.local/share/pixmaps/ericWeb.png", |
269 "~/.local/share/pixmaps/ericWeb.png", |
274 "~/.local/share/icons/eric.png", |
270 "~/.local/share/icons/eric.png", |
275 "~/.local/share/icons/ericWeb.png", |
271 "~/.local/share/icons/ericWeb.png", |
276 # from Python2 era |
|
277 "/usr/share/applications/eric7_webbrowser.desktop", |
|
278 ]: |
272 ]: |
279 path = os.path.expanduser(name) |
273 path = os.path.expanduser(name) |
280 if os.path.exists(path): |
274 if os.path.exists(path): |
281 os.remove(path) |
275 os.remove(path) |
282 |
276 |
283 |
277 |
284 def uninstallMacAppBundle(): |
278 def uninstallMacAppBundle(): |
285 """ |
279 """ |
286 Uninstall the macOS application bundle. |
280 Uninstall the macOS application bundle. |
287 """ |
281 """ |
288 if os.path.exists("/Developer/Applications/Eric6"): |
282 if os.path.exists("/Developer/Applications/Eric7"): |
289 shutil.rmtree("/Developer/Applications/Eric6") |
283 shutil.rmtree("/Developer/Applications/Eric7") |
290 try: |
284 try: |
291 macAppBundlePath = getConfig("macAppBundlePath") |
285 macAppBundlePath = getConfig("macAppBundlePath") |
292 macAppBundleName = getConfig("macAppBundleName") |
286 macAppBundleName = getConfig("macAppBundleName") |
293 except AttributeError: |
287 except AttributeError: |
294 macAppBundlePath = defaultMacAppBundlePath |
288 macAppBundlePath = defaultMacAppBundlePath |
354 except ImportError: |
348 except ImportError: |
355 print("No PyQt variant installed. The configuration directory") |
349 print("No PyQt variant installed. The configuration directory") |
356 print("cannot be determined. You have to remove it manually.\n") |
350 print("cannot be determined. You have to remove it manually.\n") |
357 return |
351 return |
358 |
352 |
359 settings = QSettings(QSettings.IniFormat, QSettings.UserScope, |
353 settings = QSettings(QSettings.Format.IniFormat, QSettings.Scope.UserScope, |
360 settingsNameOrganization, settingsNameGlobal) |
354 settingsNameOrganization, settingsNameGlobal) |
361 settingsDir = os.path.dirname(settings.fileName()) |
355 settingsDir = os.path.dirname(settings.fileName()) |
362 if os.path.exists(settingsDir): |
356 if os.path.exists(settingsDir): |
363 print("Found the eric configuration directory") |
357 print("Found the eric configuration directory") |
364 print(" - {0}".format(settingsDir)) |
358 print(" - {0}".format(settingsDir)) |