summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGraeme Geldenhuys <graeme@mastermaths.co.za>2011-07-27 11:35:50 +0200
committerGraeme Geldenhuys <graeme@mastermaths.co.za>2011-07-27 11:35:50 +0200
commit97c383a404af0cc9c76a89b14eee89cf47ea882f (patch)
tree28a6d74f31a2f2f78adc39fc1ab8896da0eab3b5
parentcc6d2fa7e8c0210a15351f7b16715ef40508c307 (diff)
downloadfpGUI-97c383a404af0cc9c76a89b14eee89cf47ea882f.tar.xz
docview installation and mime-type registration.
I created a install.sh script that registers DocView in the Gnome Applications menu, registers the INF file mime-type and associated icon (so it looks nice in Nautilus).
-rw-r--r--docview/install/docview.desktop19
-rwxr-xr-xdocview/install/install.sh19
-rw-r--r--docview/install/x-docview-extension-inf.xml (renamed from docview/install/docview-mime.xml)3
3 files changed, 29 insertions, 12 deletions
diff --git a/docview/install/docview.desktop b/docview/install/docview.desktop
index 53c007d6..129cb15f 100644
--- a/docview/install/docview.desktop
+++ b/docview/install/docview.desktop
@@ -1,15 +1,12 @@
[Desktop Entry]
Version=1.0
-Encoding=UTF-8
-Name=fpGUI DocView
-GenericName=INF Help Viewer
-Comment=A INF Documentation Viewer
-Exec=docview %f
-Terminal=false
Type=Application
-Icon=docview.png
-Categories=Utility;Application;
-StartupWMClass=docview
-MimeType=application/x-inf;
-
+Terminal=false
+Exec=docview %f
+Name=fpGUI DocView
+GenericName=INF help viewer
+Icon=docview
+MimeType=application/x-docview-extension-inf
+Categories=Development;Utility;Application;
+Comment=A fast cross-platform INF help file viewer
diff --git a/docview/install/install.sh b/docview/install/install.sh
new file mode 100755
index 00000000..3adf0d29
--- /dev/null
+++ b/docview/install/install.sh
@@ -0,0 +1,19 @@
+#!/bin/bash
+
+# Ease up the process of having nice icons for INF files in Nautilus,
+# and for launching the correct application when you click on those
+# INF files. This script also adds DocView in the Applications menu.
+# - Graeme Geldenhuys (graemeg@gmail.com)
+#
+# This was tested and working on Ubuntu 10.04
+
+cp x-docview-extension-inf.xml ~/.local/share/mime/packages/
+cp docview.desktop ~/.local/share/applications/
+cp ../images/inf-book-48x48.png ~/.icons/application-x-docview-extension-inf.png
+cp ../images/docview-48x48.png ~/.icons/docview.png
+
+# this registers the mime-type and related icon
+update-mime-database ~/.local/share/mime/
+
+# this registers the applications (*.desktop) with the mime-type
+update-desktop-database ~/.local/share/applications/
diff --git a/docview/install/docview-mime.xml b/docview/install/x-docview-extension-inf.xml
index 86674794..d8a5ddde 100644
--- a/docview/install/docview-mime.xml
+++ b/docview/install/x-docview-extension-inf.xml
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<mime-info xmlns="http://www.freedesktop.org/standards/shared-mime-info">
- <mime-type type="application/inf">
+ <mime-type type="application/x-docview-extension-inf">
<comment>Compiled INF Help File</comment>
<acronym>INF</acronym>
<expanded-acronym>Information Help File</expanded-acronym>
@@ -9,5 +9,6 @@
</magic>
<glob pattern="*.inf"/>
<alias type="application/x-inf"/>
+ <generic-icon name="application-x-docview-extension-inf" />
</mime-type>
</mime-info>