Added installation of a .desktop file for Linux systems.

Sat, 20 Mar 2010 12:17:57 +0000

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Sat, 20 Mar 2010 12:17:57 +0000
changeset 146
afeb742e7148
parent 145
96d12f8ab3d7
child 147
33830c229cc1

Added installation of a .desktop file for Linux systems.

changelog file | annotate | diff | comparison | revisions
eric5.desktop file | annotate | diff | comparison | revisions
eric5.e4p file | annotate | diff | comparison | revisions
install.py file | annotate | diff | comparison | revisions
uninstall.py file | annotate | diff | comparison | revisions
--- a/changelog	Sun Mar 14 15:57:57 2010 +0000
+++ b/changelog	Sat Mar 20 12:17:57 2010 +0000
@@ -1,5 +1,9 @@
 Change Log
 ----------
+Version 5.0-snapshot-2010mmdd:
+- bug fixes
+- added installation of a .desktop file for Linux systems
+
 Version 5.0-snapshot-20100306:
 - bug fixes
 - added code to indicate directories and files being symbolic links
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eric5.desktop	Sat Mar 20 12:17:57 2010 +0000
@@ -0,0 +1,13 @@
+[Desktop Entry]
+X-SuSE-translate=true
+Type=Application
+Exec=eric5
+MimeType=application/x-eric5;
+Icon=eric
+Terminal=false
+Name=eric5
+Name[de]=eric5
+GenericName=Integrated Development Environment for Python
+GenericName[de]=Integrierte Entwicklungsumgebung für Python
+Categories=Qt;Python;Development;IDE;
+
--- a/eric5.e4p	Sun Mar 14 15:57:57 2010 +0000
+++ b/eric5.e4p	Sat Mar 20 12:17:57 2010 +0000
@@ -1046,6 +1046,7 @@
     <Other>APIs/Ruby/eric5.api</Other>
     <Other>APIs/Python3/eric5.api</Other>
     <Other>.issues</Other>
+    <Other>eric5.desktop</Other>
   </Others>
   <MainScript>eric5.py</MainScript>
   <Vcs>
--- a/install.py	Sun Mar 14 15:57:57 2010 +0000
+++ b/install.py	Sat Mar 20 12:17:57 2010 +0000
@@ -231,6 +231,13 @@
     
     global pyModDir, progLanguages
     
+    # 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"]:
+            if os.path.exists(name):
+                os.remove(name)
+    
     # Remove the wrapper scripts
     rem_wnames = [
         "eric5-api", "eric5-compare",
@@ -397,6 +404,11 @@
                     shutil.copy(apiName, apidir)
                 except EnvironmentError:
                     print("Could not install '%s'." % apiName)
+    
+    # create menu entry for Linux systems
+    if sys.platform.startswith("linux"):
+        shutil.copy(os.path.join("eric", "icons", "default", "eric.png"), "/usr/share/pixmaps")
+        shutil.copy(os.path.join("eric", "eric5.desktop"), "/usr/share/applications")
 
 
 def createInstallConfig():
--- a/uninstall.py	Sun Mar 14 15:57:57 2010 +0000
+++ b/uninstall.py	Sat Mar 20 12:17:57 2010 +0000
@@ -62,6 +62,13 @@
     """
     global pyModDir
     
+    # 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"]:
+            if os.path.exists(name):
+                os.remove(name)
+    
     # Remove the wrapper scripts
     rem_wnames = [
         "eric5-api", "eric5-compare",

eric ide

mercurial