diff -r dac33c7fce07 -r e3642a6a1e71 scripts/uninstall.py --- a/scripts/uninstall.py Sat May 15 19:01:16 2021 +0200 +++ b/scripts/uninstall.py Sat May 15 20:08:03 2021 +0200 @@ -22,10 +22,10 @@ currDir = os.getcwd() pyModDir = None progLanguages = ["Python", "Ruby", "QSS"] -defaultMacAppBundleName = "eric6.app" +defaultMacAppBundleName = "eric7.app" defaultMacAppBundlePath = "/Applications" settingsNameOrganization = "Eric6" -settingsNameGlobal = "eric6" +settingsNameGlobal = "eric7" def exit(rcode=0): @@ -36,11 +36,11 @@ """ global currDir - # restore the local eric6config.py - if os.path.exists("eric6config.py.orig"): - if os.path.exists("eric6config.py"): - os.remove("eric6config.py") - os.rename("eric6config.py.orig", "eric6config.py") + # restore the local eric7config.py + if os.path.exists("eric7config.py.orig"): + if os.path.exists("eric7config.py"): + os.remove("eric7config.py") + os.rename("eric7config.py.orig", "eric7config.py") if sys.platform.startswith(("win", "cygwin")): with contextlib.suppress(): @@ -50,11 +50,11 @@ sys.exit(rcode) -# get a local eric6config.py out of the way -if os.path.exists("eric6config.py"): - os.rename("eric6config.py", "eric6config.py.orig") +# get a local eric7config.py out of the way +if os.path.exists("eric7config.py"): + os.rename("eric7config.py", "eric7config.py.orig") try: - from eric6config import getConfig + from eric7config import getConfig except ImportError: print("The eric IDE doesn't seem to be installed. Aborting.") exit(1) @@ -121,19 +121,19 @@ # Remove the wrapper scripts rem_wnames = [ - "eric6_api", "eric6_compare", - "eric6_configure", "eric6_diff", - "eric6_doc", "eric6_qregularexpression", - "eric6_qregexp", "eric6_re", - "eric6_trpreviewer", "eric6_uipreviewer", - "eric6_unittest", "eric6", - "eric6_tray", "eric6_editor", - "eric6_plugininstall", "eric6_pluginuninstall", - "eric6_pluginrepository", "eric6_sqlbrowser", - "eric6_iconeditor", "eric6_snap", "eric6_hexeditor", - "eric6_browser", "eric6_shell", + "eric7_api", "eric7_compare", + "eric7_configure", "eric7_diff", + "eric7_doc", "eric7_qregularexpression", + "eric7_qregexp", "eric7_re", + "eric7_trpreviewer", "eric7_uipreviewer", + "eric7_unittest", "eric7", + "eric7_tray", "eric7_editor", + "eric7_plugininstall", "eric7_pluginuninstall", + "eric7_pluginrepository", "eric7_sqlbrowser", + "eric7_iconeditor", "eric7_snap", "eric7_hexeditor", + "eric7_browser", "eric7_shell", # from Python2 era - "eric6_webbrowser", + "eric7_webbrowser", ] try: @@ -143,7 +143,7 @@ os.remove(rwname) # Cleanup our config file(s) - for name in ['eric6config.py', 'eric6config.pyc', 'eric6.pth']: + for name in ['eric7config.py', 'eric7config.pyc', 'eric7.pth']: e5cfile = os.path.join(pyModDir, name) if os.path.exists(e5cfile): os.remove(e5cfile) @@ -163,7 +163,7 @@ # Cleanup translations for name in glob.glob( - os.path.join(getConfig('ericTranslationsDir'), 'eric6_*.qm')): + os.path.join(getConfig('ericTranslationsDir'), 'eric7_*.qm')): if os.path.exists(name): os.remove(name) @@ -177,7 +177,7 @@ os.remove(apiname) for apiname in glob.glob( os.path.join(apidir, progLanguage.lower(), "*.bas")): - if os.path.basename(apiname) != "eric6.bas": + if os.path.basename(apiname) != "eric7.bas": os.remove(apiname) if sys.platform == "darwin": @@ -234,13 +234,13 @@ programsEntry = getWinregEntry(regName, regPath) if programsEntry: programsFolder = os.path.normpath(os.path.expandvars(programsEntry)) - eric6EntryPath = os.path.join(programsFolder, windowsProgramsEntry()) - if os.path.exists(eric6EntryPath): + eric7EntryPath = os.path.join(programsFolder, windowsProgramsEntry()) + if os.path.exists(eric7EntryPath): try: - shutil.rmtree(eric6EntryPath) + shutil.rmtree(eric7EntryPath) except OSError: # maybe restrictions prohibited link removal - print("Could not remove '{0}'.".format(eric6EntryPath)) + print("Could not remove '{0}'.".format(eric7EntryPath)) def uninstallLinuxSpecifics(): @@ -249,32 +249,32 @@ """ if os.getuid() == 0: for name in [ - "/usr/share/applications/eric6.desktop", - "/usr/share/appdata/eric6.appdata.xml", - "/usr/share/metainfo/eric6.appdata.xml", - "/usr/share/applications/eric6_browser.desktop", + "/usr/share/applications/eric7.desktop", + "/usr/share/appdata/eric7.appdata.xml", + "/usr/share/metainfo/eric7.appdata.xml", + "/usr/share/applications/eric7_browser.desktop", "/usr/share/pixmaps/eric.png", "/usr/share/pixmaps/ericWeb.png", "/usr/share/icons/eric.png", "/usr/share/icons/ericWeb.png", # from Python2 era - "/usr/share/applications/eric6_webbrowser.desktop", + "/usr/share/applications/eric7_webbrowser.desktop", ]: if os.path.exists(name): os.remove(name) elif os.getuid() >= 1000: # it is assumed that user ids start at 1000 for name in [ - "~/.local/share/applications/eric6.desktop", - "~/.local/share/appdata/eric6.appdata.xml", - "~/.local/share/metainfo/eric6.appdata.xml", - "~/.local/share/applications/eric6_browser.desktop", + "~/.local/share/applications/eric7.desktop", + "~/.local/share/appdata/eric7.appdata.xml", + "~/.local/share/metainfo/eric7.appdata.xml", + "~/.local/share/applications/eric7_browser.desktop", "~/.local/share/pixmaps/eric.png", "~/.local/share/pixmaps/ericWeb.png", "~/.local/share/icons/eric.png", "~/.local/share/icons/ericWeb.png", # from Python2 era - "/usr/share/applications/eric6_webbrowser.desktop", + "/usr/share/applications/eric7_webbrowser.desktop", ]: path = os.path.expanduser(name) if os.path.exists(path): @@ -308,11 +308,11 @@ """ pathsToRemove = [] - globalPluginsDir = os.path.join(getConfig('mdir'), "eric6plugins") + globalPluginsDir = os.path.join(getConfig('mdir'), "eric7plugins") if os.path.exists(globalPluginsDir): pathsToRemove.append(globalPluginsDir) - localPluginsDir = os.path.join(getConfigDir(), "eric6plugins") + localPluginsDir = os.path.join(getConfigDir(), "eric7plugins") if os.path.exists(localPluginsDir): pathsToRemove.append(localPluginsDir) @@ -376,7 +376,7 @@ @return directory name of the config dir (string) """ - cdn = ".eric6" + cdn = ".eric7" return os.path.join(os.path.expanduser("~"), cdn) @@ -412,8 +412,8 @@ """ majorVersion, minorVersion = sys.version_info[:2] linkTemplates = [ - "eric6 (Python {0}.{1}).lnk", - "eric6 Browser (Python {0}.{1}).lnk", + "eric7 (Python {0}.{1}).lnk", + "eric7 Browser (Python {0}.{1}).lnk", ] return [ll.format(majorVersion, minorVersion) for ll in linkTemplates] @@ -427,7 +427,7 @@ @rtype str """ majorVersion, minorVersion = sys.version_info[:2] - return "eric6 (Python {0}.{1})".format(majorVersion, minorVersion) + return "eric7 (Python {0}.{1})".format(majorVersion, minorVersion) def main(argv):