Registered MIME type and application
authorAlberto Ruiz <aruiz@gnome.org>
Fri, 8 Jul 2011 15:48:16 +0000 (16:48 +0100)
committerAlberto Ruiz <aruiz@gnome.org>
Fri, 8 Jul 2011 15:48:16 +0000 (16:48 +0100)
Makefile.am
configure.ac
moonshot-webp.desktop.in [new file with mode: 0644]
moonshot.desktop.in [new file with mode: 0644]
src/moonshot-webp-parser.vala
webprovisioning/moonshot.xml

index 56c82b2..2e048a5 100644 (file)
@@ -69,8 +69,13 @@ libmoonshot/libmoonshot.lib: libmoonshot/libmoonshot.def
 endif
 
 if OS_LINUX
+## Installing mime type data
 mime_DATA = webprovisioning/moonshot.xml
 mimedir = $(datadir)/mime/packages
+
+## Installing
+dotdesktop_DATA = moonshot.desktop moonshot-webp.desktop
+dotdesktopdir = $(datadir)/applications
 endif
 
 if IPC_MSRPC
@@ -156,6 +161,7 @@ tests_basic_LDADD = ${top_builddir}/libmoonshot/libmoonshot.la $(moonshot_LIBS)
 if OS_LINUX
 install-data-hook:
        "${UPDATE_MIME_DATABASE}" $(datadir)/mime
+       "${UPDATE_DESKTOP_DATABASE}" $(datadir)/applications
 endif
 
 if OS_WIN32
index f8efeee..b7d53f2 100644 (file)
@@ -112,14 +112,26 @@ if test "$win32" != "yes"; then
 *** Could not find the Freedesktop.org  mime database update tool.
 *** Web provisioning files could not be automatically installed.])
   fi
+  AC_PATH_PROG([UPDATE_DESKTOP_DATABASE], [update-desktop-database], [no])
+  if test "$UPDATE_DESKTOP_DATABASE" = "no"; then
+    AC_MSG_ERROR([
+*** Could not find the Freedesktop.org desktop entry database update
+*** tool. Web provisioning files could not be automatically installed.])
+  fi
 fi
 
+MOONSHOT_APP="$bindir/moonshot"
+MOONSHOT_WEBP="$bindir/moonshot-webp"
+
 AC_SUBST(MIDL)
 AC_SUBST(MSVC_LIB)
 AC_SUBST(IMAGEMAGICK_CONVERT)
 AC_SUBST(WIX_CANDLE)
 AC_SUBST(WIX_LIGHT)
 AC_SUBST(UPDATE_MIME_DATABASE)
+AC_SUBST(UPDATE_DESKTOP_DATABASE)
+AC_SUBST(MOONSHOT_APP)
+AC_SUBST(MOONSHOT_WEBP)
 
 # Dependencies
 PKG_CHECK_MODULES(moonshot,[
@@ -144,6 +156,8 @@ AC_DEFINE([GETTEXT_PACKAGE],[PACKAGE_TARNAME],[Define to the gettext package nam
 AC_CONFIG_FILES([
         Makefile
         po/Makefile.in
+        moonshot.desktop
+        moonshot-webp.desktop
 ])
 
 AC_OUTPUT
diff --git a/moonshot-webp.desktop.in b/moonshot-webp.desktop.in
new file mode 100644 (file)
index 0000000..4847435
--- /dev/null
@@ -0,0 +1,10 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Exec=moonshot-webp %f
+Name=Moonshot Web Provisioning Installer
+NoDisplay=true
+Categories=System;Settings
+MimeType=application/moonshot
diff --git a/moonshot.desktop.in b/moonshot.desktop.in
new file mode 100644 (file)
index 0000000..449b7a3
--- /dev/null
@@ -0,0 +1,10 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Exec=moonshot
+Name=Moonshot Identity Manager
+Icon=config-user
+Categories=System;Settings
+URL=http://www.project-moonshot.org
index 09a2252..a1cbdd4 100644 (file)
@@ -306,8 +306,8 @@ namespace WebProvisioning
                              card.username,
                              card.password,
                              card.issuer,
-                             card.rules,
-                             card.services,
+                             rules,
+                             services,
                              card.trust_anchor.ca_cert,
                              card.trust_anchor.subject,
                              card.trust_anchor.subject_alt,
index bd995d4..7171308 100644 (file)
@@ -3,7 +3,6 @@
   <mime-type type="application/moonshot">
     <comment>Moonshot Web Provisioning document</comment>
     <acronym>MSHT</acronym>
-    <sub-class-of type="text/plain"/>
     <generic-icon name="text-x-generic"/>
     <glob pattern="*.msht"/>
     <alias type="application/moonshot+xml"/>