Sat, 02 Feb 2013 18:34:31 +0100
Extended the installation routine by the creation of a desktop file for the eric5 web browser.
eric5.desktop | file | annotate | diff | comparison | revisions | |
eric5.e4p | file | annotate | diff | comparison | revisions | |
eric5_webbrowser.desktop | file | annotate | diff | comparison | revisions | |
install.py | file | annotate | diff | comparison | revisions | |
uninstall.py | file | annotate | diff | comparison | revisions |
--- a/eric5.desktop Sat Feb 02 16:08:11 2013 +0100 +++ b/eric5.desktop Sat Feb 02 18:34:31 2013 +0100 @@ -1,4 +1,5 @@ [Desktop Entry] +Version=1.0 Type=Application Exec=eric5 MimeType=text/x-python;
--- a/eric5.e4p Sat Feb 02 16:08:11 2013 +0100 +++ b/eric5.e4p Sat Feb 02 18:34:31 2013 +0100 @@ -1,8 +1,6 @@ <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE Project SYSTEM "Project-5.1.dtd"> <!-- eric5 project file for project eric5 --> -<!-- Saved: 2013-02-02, 14:35:00 --> -<!-- Copyright (C) 2013 Detlev Offenbach, detlev@die-offenbachs.de --> <Project version="5.1"> <Language>en_US</Language> <ProjectWordList>Dictionaries/words.dic</ProjectWordList> @@ -1501,6 +1499,7 @@ <Other>Helpviewer/data/javascript/jquery-ui.js</Other> <Other>Helpviewer/data/javascript/jquery.js</Other> <Other>README-Raspberry.txt</Other> + <Other>eric5_webbrowser.desktop</Other> </Others> <MainScript>eric5.py</MainScript> <Vcs>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/eric5_webbrowser.desktop Sat Feb 02 18:34:31 2013 +0100 @@ -0,0 +1,15 @@ +[Desktop Entry] +Version=1.0 +Type=Application +Exec=eric5_webbrowser +MimeType=text/html;text/xml;application/xhtml+xml;x-scheme-handler/http;x-scheme-handler/https; +Icon=ericWeb +Terminal=false +Name=eric5 Web Browser +Name[de]=eric5 Web Browser +Comment=Web Browser for PyQt4 +Comment[de]=Web Browser für PyQt4 +GenericName=Web Browser +GenericName[de]=Web Browser +Categories=Qt;Python;Network;WebBrowser; +StartupNotify=true
--- a/install.py Sat Feb 02 16:08:11 2013 +0100 +++ b/install.py Sat Feb 02 18:34:31 2013 +0100 @@ -322,7 +322,9 @@ # Remove the menu entry for Linux systems if sys.platform.startswith("linux"): for name in ["/usr/share/pixmaps/eric.png", - "/usr/share/applications/eric5.desktop"]: + "/usr/share/applications/eric5.desktop", + "/usr/share/pixmaps/ericWeb.png", + "/usr/share/applications/eric5_webbrowser.desktop"]: if os.path.exists(name): os.remove(name) @@ -427,6 +429,8 @@ def installEric(): """ Actually perform the installation steps. + + @return result code (integer) """ global distDir, doCleanup, cfg, progLanguages, sourceDir, configName @@ -520,11 +524,11 @@ except IOError as msg: sys.stderr.write('IOError: {0}\nTry install with admin rights.\n'.format(msg)) - exit(7) + return(7) except OSError as msg: sys.stderr.write('OSError: {0}\nTry install with admin rights.\n'.format(msg)) - exit(7) + return(7) # copy some text files to the doc area for name in ["LICENSE.GPL3", "THANKS", "changelog"]: @@ -579,21 +583,27 @@ dst = os.path.normpath(os.path.join(distDir, "usr/share/pixmaps")) if not os.path.exists(dst): os.makedirs(dst) - shutilCopy(os.path.join(sourceDir, "icons", "default", "eric_2.png"), + shutilCopy(os.path.join(sourceDir, "icons", "default", "eric.png"), os.path.join(dst, "eric.png")) dst = os.path.normpath(os.path.join(distDir, "usr/share/applications")) if not os.path.exists(dst): os.makedirs(dst) shutilCopy(os.path.join(sourceDir, "eric5.desktop"), dst) else: - shutilCopy(os.path.join(sourceDir, "icons", "default", "eric_2.png"), + shutilCopy(os.path.join(sourceDir, "icons", "default", "eric.png"), "/usr/share/pixmaps/eric.png") shutilCopy(os.path.join(sourceDir, "eric5.desktop"), "/usr/share/applications") + shutilCopy(os.path.join(sourceDir, "icons", "default", "ericWeb48.png"), + "/usr/share/pixmaps/ericWeb.png") + shutilCopy(os.path.join(sourceDir, "eric5_webbrowser.desktop"), + "/usr/share/applications") # Create a Mac application bundle if sys.platform == "darwin": createMacAppBundle(cfg['ericDir']) + + return 0 def createMacAppBundle(pydir): @@ -1119,7 +1129,7 @@ py_compile.compile(configName, dfile=os.path.join(modDir, "eric5config.py")) print("\nInstalling eric5 ...") - installEric() + res = installEric() # do some cleanup try: @@ -1135,7 +1145,7 @@ print("\nInstallation complete.") print() - exit() + exit(res) if __name__ == "__main__":
--- a/uninstall.py Sat Feb 02 16:08:11 2013 +0100 +++ b/uninstall.py Sat Feb 02 18:34:31 2013 +0100 @@ -67,7 +67,9 @@ # Remove the menu entry for Linux systems if sys.platform.startswith("linux"): for name in ["/usr/share/pixmaps/eric.png", - "/usr/share/applications/eric5.desktop"]: + "/usr/share/applications/eric5.desktop", + "/usr/share/pixmaps/ericWeb.png", + "/usr/share/applications/eric5_webbrowser.desktop"]: if os.path.exists(name): os.remove(name)