File evince-2.32.0-wix.patch of Package mingw32-evince
diff -Naur evince-2.32.0/configure.ac evince-2.32.0.new/configure.ac
--- evince-2.32.0/configure.ac 2011-07-26 18:20:49.376806870 +0200
+++ evince-2.32.0.new/configure.ac 2011-07-26 18:21:18.148949547 +0200
@@ -190,10 +190,13 @@
# dependency.
AC_MSG_WARN([Evince has a soft run-time dependency on hicolor-icon-theme. You are advised to have this theme installed when running Evince.]);
SHELL_PLATFORM_PKGS=""
+ evince_runtime_requires="hicolor-icon-theme"
;;
esac
PKG_CHECK_MODULES([SHELL_CORE],[libxml-2.0 >= $LIBXML_REQUIRED gtk+-$GTK_API_VERSION >= $GTK_REQUIRED gio-2.0 >= $GLIB_REQUIRED gthread-2.0 $SHELL_PLATFORM_PKGS])
+evince_requires="libxml-2.0 >= $LIBXML_REQUIRED gail$GAIL_API_VERSION >= $GTK_REQUIRED gtk+-$GTK_API_VERSION >= $GTK_REQUIRED gio-2.0 >= $GLIB_REQUIRED gthread-2.0 $SHELL_PLATFORM_PKGS"
+
# *********
# SM client
@@ -226,6 +229,7 @@
esac
PKG_CHECK_MODULES([SMCLIENT],[gtk+-$GTK_API_VERSION gthread-2.0 $SMCLIENT_PKGS])
+ evince_requires="$evince_requires $SMCLIENT_PKGS"
AC_SUBST([SMCLIENT_CFLAGS])
AC_SUBST([SMCLIENT_LIBS])
fi
@@ -264,6 +268,7 @@
if test "$with_gtk_unix_print" = "yes"; then
PKG_CHECK_MODULES(GTKUNIXPRINT, [gtk+-unix-print-$GTK_API_VERSION >= $GTK_REQUIRED])
AC_DEFINE([GTKUNIXPRINT_ENABLED], [1], [Define if gtk+-unix-print is enabled.])
+ evince_requires="$evince_requires gtk+-unix-print-2.0 >= $GTK_REQUIRED"
fi
# *********************
@@ -284,6 +289,7 @@
if test "$with_keyring" = "yes"; then
PKG_CHECK_MODULES(KEYRING, gnome-keyring-1 >= $KEYRING_REQUIRED)
AC_DEFINE([WITH_KEYRING],[1],[Define if KEYRING support is enabled])
+ evince_requires="$evince_requires gnome-keyring-1 >= $KEYRING_REQUIRED"
fi
# *********************
@@ -355,6 +361,7 @@
if test "$GCONFTOOL" = "false"; then
AC_MSG_ERROR([gconftool-2 executable not found in your path - should be installed with GConf])
fi
+ evince_requires="$evince_requires gconf-2.0"
else
AM_CONDITIONAL([GCONF_SCHEMAS_INSTALL],false)
fi
@@ -426,6 +433,7 @@
AC_SUBST(NAUTILUS_LIBS)
AC_DEFINE([HAVE_NAUTILUS],[1], [defined if you build the nautilus plugin])
+ evince_requires="$evince_requires libnautilus-extension"
fi
AM_CONDITIONAL([ENABLE_NAUTILUS],[test "$enable_nautilus" = "yes"])
@@ -487,6 +495,7 @@
if test "$enable_introspection" = "yes"; then
GOBJECT_INTROSPECTION_REQUIRED=0.6
PKG_CHECK_MODULES([GOBJECT_INTROSPECTION],[gobject-introspection-1.0 >= $GOBJECT_INTROSPECTION_REQUIRED])
+ evince_requires="$evince_requires gobject-introspection-1.0 >= $GOBJECT_INTROSPECTION_REQUIRED"
G_IR_SCANNER="$($PKG_CONFIG --variable=g_ir_scanner gobject-introspection-1.0)"
G_IR_COMPILER="$($PKG_CONFIG --variable=g_ir_compiler gobject-introspection-1.0)"
@@ -524,6 +533,8 @@
PKG_CHECK_MODULES(POPPLER, poppler-glib >= $POPPLER_REQUIRED libxml-2.0 >= $LIBXML_REQUIRED,enable_pdf=yes,enable_pdf=no)
if test "x$enable_pdf" = "xyes"; then
+ evince_requires="$evince_requires poppler-glib >= $POPPLER_REQUIRED"
+ evince_runtime_requires="$evince_runtime_requires poppler-data"
evince_save_LIBS=$LIBS
LIBS="$LIBS $POPPLER_LIBS"
AC_CHECK_FUNCS(poppler_page_get_text_layout)
@@ -534,11 +545,13 @@
PKG_CHECK_MODULES(CAIRO_PDF, cairo-pdf, enable_cairo_pdf=yes, enable_cairo_pdf=no)
if test x$enable_cairo_pdf = xyes; then
AC_DEFINE([HAVE_CAIRO_PDF], [1], [defined if cairo-pdf is available])
+ evince_requires="$evince_requires cairo-pdf"
fi
PKG_CHECK_MODULES(CAIRO_PS, cairo-ps, enable_cairo_ps=yes, enable_cairo_ps=no)
if test x$enable_cairo_ps = xyes; then
AC_DEFINE([HAVE_CAIRO_PS], [1], [defined if cairo-ps is available])
+ evince_requires="$evince_requires cairo-ps"
fi
else
AC_MSG_ERROR("PDF support is disabled since poppler-glib library version $POPPLER_REQUIRED or newer not found")
@@ -566,6 +579,7 @@
if test "x$enable_ps" = "xyes"; then
if test "x$have_spectre" = "xyes"; then
AC_DEFINE([ENABLE_PS], [1], [Enable support for PostScript files.])
+ evince_requires="$evince_requires libspectre >= $SPECTRE_REQUIRED"
else
enable_ps="no"
AC_MSG_WARN([PS support is disabled since libspectre (version >= $SPECTRE_REQUIRED) is needed])
@@ -589,6 +603,7 @@
fi
if test "x$enable_tiff" = "xyes"; then
AC_DEFINE([ENABLE_TIFF], [1], [Enable multipage tiff support.])
+ evince_requires="$evince_requires tiff"
else
AC_MSG_WARN("Tiff support is disabled since tiff library version 3.6 or newer not found")
fi
@@ -611,6 +626,7 @@
if test "x$enable_djvu" = "xyes"; then
AC_DEFINE([ENABLE_DJVU], [1], [Enable djvu viewer support.])
+ evince_requires="$evince_requires ddjvuapi >= $DJVULIBRE_REQUIRED"
else
AC_MSG_WARN([
** Djvu support is disabled since a recent version of the djvulibre
@@ -650,6 +666,7 @@
if test "x$enable_dvi" = "xyes"; then
AC_DEFINE([ENABLE_DVI], [1], [Enable dvi viewer support.])
+ evince_requires="$evince_requires libkpathsea"
else
AC_MSG_WARN("Dvi support is disabled since kpathsea library is not found. Check your TeX installation.")
fi
@@ -663,6 +680,7 @@
if test "x$enable_type1_fonts" = xyes; then
AC_DEFINE([WITH_TYPE1_FONTS], [1], [Enable t1lib support in dvi.])
+ evince_requires="$evince_requires t1lib"
fi
else
enable_type1_fonts=no
@@ -709,6 +727,7 @@
if test "x$with_libgsf" = "xyes"; then
AC_DEFINE([WITH_LIBGSF], [1], [Use libgsf for comics support.])
COMICS_PKGS="$COMICS_PKGS libgsf-1"
+ evince_requires="$evince_requires libgsf-1"
fi
PKG_CHECK_MODULES(COMICS, [$COMICS_PKGS])
fi
@@ -822,6 +841,18 @@
AC_SUBST([EV_VIEW_LT_VERSION_INFO],[ev_view_lt_version_info])
AC_SUBST([EV_VIEW_LT_CURRENT_MINUS_AGE],[ev_view_lt_current_minus_age])
+
+# MSI packaging
+
+WIX_INIT(wxs msi_wxs)
+if test "x$enable_wix" = "xyes"; then
+ WIX_PKG_CHECK_MODULES(EVINCE, $evince_requires $evince_runtime_requires)
+fi
+AC_SUBST(EVINCE_WIXLIBS)
+AC_SUBST(EVINCE_FUAL_FLAGS)
+
+
+
# *****************************************************************************
# *****************************************************************************
diff -Naur evince-2.32.0/configure.ac.orig evince-2.32.0.new/configure.ac.orig
--- evince-2.32.0/configure.ac.orig 2011-07-26 18:20:49.376806870 +0200
+++ evince-2.32.0.new/configure.ac.orig 2011-07-26 18:21:04.320880974 +0200
@@ -286,6 +286,30 @@
AC_DEFINE([WITH_KEYRING],[1],[Define if KEYRING support is enabled])
fi
+# *********************
+# Metadata support
+# *********************
+
+AC_MSG_CHECKING([which metadata backend to use])
+AC_ARG_WITH([metadata],
+ [AS_HELP_STRING([--with-metadata=gvfs|builtin],
+ [Setting metadata backend ])],
+ [case "$withval" in
+ gvfs|builtin) ;;
+ *) AC_MSG_ERROR([invalid argument "$withval" for --with-metadata]) ;;
+ esac],
+ [case "$host" in
+ *-*-mingw*|*-*-cygwin*) with_metadata="builtin" ;;
+ *) with_metadata=gvfs ;;
+ esac])
+AC_MSG_RESULT([$with_metadata])
+
+if test "$with_metadata" = "builtin"; then
+ AC_DEFINE([WITH_METADATA_BUILTIN],[1],[Define to build builtin metadata support])
+fi
+AM_CONDITIONAL([WITH_METADATA_BUILTIN], [test "$with_metadata" = "builtin"])
+
+
# ****
# DBUS
# ****
@@ -877,6 +901,7 @@
GConf Support......: $with_gconf
GTK+ Unix Print....: $with_gtk_unix_print
Keyring Support....: $with_keyring
+ Metadata support...: $with_metadata
DBUS Support.......: $enable_dbus
SM client support..: $with_smclient
Help files.........: $enable_help
diff -Naur evince-2.32.0/filetypes.xsl evince-2.32.0.new/filetypes.xsl
--- evince-2.32.0/filetypes.xsl 1970-01-01 01:00:00.000000000 +0100
+++ evince-2.32.0.new/filetypes.xsl 2011-07-26 18:21:18.152949563 +0200
@@ -0,0 +1,191 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet version="1.0"
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns:xs="http://www.w3.org/2001/XMLSchema"
+ xmlns:fn="http://www.w3.org/2005/xpath-functions"
+ xmlns:wix="http://schemas.microsoft.com/wix/2006/wi">
+
+ <xsl:output method="xml" version="1.0" encoding="UTF-8"
+indent="yes" />
+
+ <!-- Identity template -->
+ <xsl:template match="@* | node()">
+ <xsl:copy>
+ <xsl:apply-templates select="@* | node()" />
+ </xsl:copy>
+ </xsl:template>
+
+ <xsl:template match="wix:Component/wix:File[substring(@Source,string-length(@Source)-9)='evince.exe']">
+ <xsl:copy>
+ <!--- copy all attributes -->
+ <xsl:apply-templates select="@*" />
+
+ </xsl:copy>
+
+ <!-- add pdf file type -->
+ <xsl:element name="ProgId" namespace="http://schemas.microsoft.com/wix/2006/wi">
+ <xsl:attribute name="Id">Evince.pdffile</xsl:attribute>
+ <xsl:attribute name="Advertise">yes</xsl:attribute>
+ <xsl:element name="Extension" namespace="http://schemas.microsoft.com/wix/2006/wi">
+ <xsl:attribute name="Id">pdf</xsl:attribute>
+ <xsl:attribute name="ContentType">application/pdf</xsl:attribute>
+ <xsl:attribute name="Advertise">yes</xsl:attribute>
+ <xsl:element name="Verb" namespace="http://schemas.microsoft.com/wix/2006/wi">
+ <xsl:attribute name="Id">open</xsl:attribute>
+ <xsl:attribute name="Command">Open</xsl:attribute>
+ <xsl:attribute name="Argument">"%1"</xsl:attribute>
+ </xsl:element>
+ </xsl:element>
+ </xsl:element>
+
+ <!-- add ps file type -->
+ <xsl:element name="ProgId" namespace="http://schemas.microsoft.com/wix/2006/wi">
+ <xsl:attribute name="Id">Evince.psfile</xsl:attribute>
+ <xsl:attribute name="Advertise">yes</xsl:attribute>
+ <xsl:element name="Extension" namespace="http://schemas.microsoft.com/wix/2006/wi">
+ <xsl:attribute name="Id">ps</xsl:attribute>
+ <xsl:attribute name="ContentType">application/postscript</xsl:attribute>
+ <xsl:attribute name="Advertise">yes</xsl:attribute>
+ <xsl:element name="Verb" namespace="http://schemas.microsoft.com/wix/2006/wi">
+ <xsl:attribute name="Id">open</xsl:attribute>
+ <xsl:attribute name="Command">Open</xsl:attribute>
+ <xsl:attribute name="Argument">"%1"</xsl:attribute>
+ </xsl:element>
+ </xsl:element>
+ </xsl:element>
+
+ <!-- add dvi file type -->
+ <xsl:element name="ProgId" namespace="http://schemas.microsoft.com/wix/2006/wi">
+ <xsl:attribute name="Id">Evince.dvifile</xsl:attribute>
+ <xsl:attribute name="Advertise">yes</xsl:attribute>
+ <xsl:element name="Extension" namespace="http://schemas.microsoft.com/wix/2006/wi">
+ <xsl:attribute name="Id">dvi</xsl:attribute>
+ <xsl:attribute name="ContentType">application/x-dvi</xsl:attribute>
+ <xsl:attribute name="Advertise">yes</xsl:attribute>
+ <xsl:element name="Verb" namespace="http://schemas.microsoft.com/wix/2006/wi">
+ <xsl:attribute name="Id">open</xsl:attribute>
+ <xsl:attribute name="Command">Open</xsl:attribute>
+ <xsl:attribute name="Argument">"%1"</xsl:attribute>
+ </xsl:element>
+ </xsl:element>
+ </xsl:element>
+
+ <!-- add djvu file type -->
+ <xsl:element name="ProgId" namespace="http://schemas.microsoft.com/wix/2006/wi">
+ <xsl:attribute name="Id">Evince.djvufile</xsl:attribute>
+ <xsl:attribute name="Advertise">yes</xsl:attribute>
+ <xsl:element name="Extension" namespace="http://schemas.microsoft.com/wix/2006/wi">
+ <xsl:attribute name="Id">djv</xsl:attribute>
+ <xsl:attribute name="ContentType">image/vnd.djvu</xsl:attribute>
+ <xsl:attribute name="Advertise">yes</xsl:attribute>
+ <xsl:element name="Verb" namespace="http://schemas.microsoft.com/wix/2006/wi">
+ <xsl:attribute name="Id">open</xsl:attribute>
+ <xsl:attribute name="Command">Open</xsl:attribute>
+ <xsl:attribute name="Argument">"%1"</xsl:attribute>
+ </xsl:element>
+ </xsl:element>
+ <xsl:element name="Extension" namespace="http://schemas.microsoft.com/wix/2006/wi">
+ <xsl:attribute name="Id">djvu</xsl:attribute>
+ <xsl:attribute name="ContentType">image/vnd.djvu</xsl:attribute>
+ <xsl:attribute name="Advertise">yes</xsl:attribute>
+ <xsl:element name="Verb" namespace="http://schemas.microsoft.com/wix/2006/wi">
+ <xsl:attribute name="Id">open</xsl:attribute>
+ <xsl:attribute name="Command">Open</xsl:attribute>
+ <xsl:attribute name="Argument">"%1"</xsl:attribute>
+ </xsl:element>
+ </xsl:element>
+ </xsl:element>
+
+ <!-- add cbr file type -->
+ <xsl:element name="ProgId" namespace="http://schemas.microsoft.com/wix/2006/wi">
+ <xsl:attribute name="Id">Evince.cbrfile</xsl:attribute>
+ <xsl:attribute name="Advertise">yes</xsl:attribute>
+ <xsl:element name="Extension" namespace="http://schemas.microsoft.com/wix/2006/wi">
+ <xsl:attribute name="Id">cbr</xsl:attribute>
+ <xsl:attribute name="ContentType">application/x-cbr</xsl:attribute>
+ <xsl:attribute name="Advertise">yes</xsl:attribute>
+ <xsl:element name="Verb" namespace="http://schemas.microsoft.com/wix/2006/wi">
+ <xsl:attribute name="Id">open</xsl:attribute>
+ <xsl:attribute name="Command">Open</xsl:attribute>
+ <xsl:attribute name="Argument">"%1"</xsl:attribute>
+ </xsl:element>
+ </xsl:element>
+ </xsl:element>
+
+ <!-- add cbz file type -->
+ <xsl:element name="ProgId" namespace="http://schemas.microsoft.com/wix/2006/wi">
+ <xsl:attribute name="Id">Evince.cbzfile</xsl:attribute>
+ <xsl:attribute name="Advertise">yes</xsl:attribute>
+ <xsl:element name="Extension" namespace="http://schemas.microsoft.com/wix/2006/wi">
+ <xsl:attribute name="Id">cbz</xsl:attribute>
+ <xsl:attribute name="ContentType">application/x-cbz</xsl:attribute>
+ <xsl:attribute name="Advertise">yes</xsl:attribute>
+ <xsl:element name="Verb" namespace="http://schemas.microsoft.com/wix/2006/wi">
+ <xsl:attribute name="Id">open</xsl:attribute>
+ <xsl:attribute name="Command">Open</xsl:attribute>
+ <xsl:attribute name="Argument">"%1"</xsl:attribute>
+ </xsl:element>
+ </xsl:element>
+ </xsl:element>
+
+ <!-- add cb7 file type -->
+ <xsl:element name="ProgId" namespace="http://schemas.microsoft.com/wix/2006/wi">
+ <xsl:attribute name="Id">Evince.cb7file</xsl:attribute>
+ <xsl:attribute name="Advertise">yes</xsl:attribute>
+ <xsl:element name="Extension" namespace="http://schemas.microsoft.com/wix/2006/wi">
+ <xsl:attribute name="Id">cb7</xsl:attribute>
+ <xsl:attribute name="ContentType">application/x-cb7</xsl:attribute>
+ <xsl:attribute name="Advertise">yes</xsl:attribute>
+ <xsl:element name="Verb" namespace="http://schemas.microsoft.com/wix/2006/wi">
+ <xsl:attribute name="Id">open</xsl:attribute>
+ <xsl:attribute name="Command">Open</xsl:attribute>
+ <xsl:attribute name="Argument">"%1"</xsl:attribute>
+ </xsl:element>
+ </xsl:element>
+ </xsl:element>
+
+ <!-- add cbt file type -->
+ <xsl:element name="ProgId" namespace="http://schemas.microsoft.com/wix/2006/wi">
+ <xsl:attribute name="Id">Evince.cbtfile</xsl:attribute>
+ <xsl:attribute name="Advertise">yes</xsl:attribute>
+ <xsl:element name="Extension" namespace="http://schemas.microsoft.com/wix/2006/wi">
+ <xsl:attribute name="Id">cbt</xsl:attribute>
+ <xsl:attribute name="ContentType">application/x-cbt</xsl:attribute>
+ <xsl:attribute name="Advertise">yes</xsl:attribute>
+ <xsl:element name="Verb" namespace="http://schemas.microsoft.com/wix/2006/wi">
+ <xsl:attribute name="Id">open</xsl:attribute>
+ <xsl:attribute name="Command">Open</xsl:attribute>
+ <xsl:attribute name="Argument">"%1"</xsl:attribute>
+ </xsl:element>
+ </xsl:element>
+ </xsl:element>
+
+ <!-- add tiff file type -->
+ <xsl:element name="ProgId" namespace="http://schemas.microsoft.com/wix/2006/wi">
+ <xsl:attribute name="Id">Evince.tifffile</xsl:attribute>
+ <xsl:attribute name="Advertise">yes</xsl:attribute>
+ <xsl:element name="Extension" namespace="http://schemas.microsoft.com/wix/2006/wi">
+ <xsl:attribute name="Id">tif</xsl:attribute>
+ <xsl:attribute name="ContentType">image/tiff</xsl:attribute>
+ <xsl:attribute name="Advertise">yes</xsl:attribute>
+ <xsl:element name="Verb" namespace="http://schemas.microsoft.com/wix/2006/wi">
+ <xsl:attribute name="Id">open</xsl:attribute>
+ <xsl:attribute name="Command">Open</xsl:attribute>
+ <xsl:attribute name="Argument">"%1"</xsl:attribute>
+ </xsl:element>
+ </xsl:element>
+ <xsl:element name="Extension" namespace="http://schemas.microsoft.com/wix/2006/wi">
+ <xsl:attribute name="Id">tiff</xsl:attribute>
+ <xsl:attribute name="ContentType">image/tiff</xsl:attribute>
+ <xsl:attribute name="Advertise">yes</xsl:attribute>
+ <xsl:element name="Verb" namespace="http://schemas.microsoft.com/wix/2006/wi">
+ <xsl:attribute name="Id">open</xsl:attribute>
+ <xsl:attribute name="Command">Open</xsl:attribute>
+ <xsl:attribute name="Argument">"%1"</xsl:attribute>
+ </xsl:element>
+ </xsl:element>
+ </xsl:element>
+
+ </xsl:template>
+
+</xsl:stylesheet>
diff -Naur evince-2.32.0/Makefile.am evince-2.32.0.new/Makefile.am
--- evince-2.32.0/Makefile.am 2010-07-27 17:47:54.000000000 +0200
+++ evince-2.32.0.new/Makefile.am 2011-07-26 18:21:18.148949547 +0200
@@ -113,4 +113,51 @@
.PHONY: ChangeLog
+if ENABLE_WIX
+
+noinst_msi_WIX = \
+ evince.msi
+evince_msi_WIXSOURCES = \
+ $(WIX_PACKAGE_MSI_WIXSOURCES)
+evince_msi_WIXLIBS = \
+ $(WIX_PACKAGE_MSI_WIXLIBS) \
+ $(EVINCE_WIXLIBS)
+evince_msi_FUAL_FLAGS = \
+ $(WIX_PACKAGE_FUAL_FLAGS) \
+ $(EVINCE_FUAL_FLAGS)
+evince_msi_LIGHT_FLAGS = \
+ $(WIX_PACKAGE_LIGHT_FLAGS) \
+ -dWixUILicenseRtf=license.rtf
+
+evince.msi: license.rtf
+
+license.rtf: COPYING
+ awk 'BEGIN { printf "%s", "{\\rtf1\\ansi{\\fonttbl\\f0 Tahoma;}\\f0\\fs16\\pard" ; } { printf "%s\\par ", $$0 ; } END { printf "%s", "}" ; }' $< | sed 's/ / /g' > $@
+
+#TODO: stupid hack to max 8 subdirs
+remove-help-stamp: wixdistdir
+ : #rm -r wixdistdir$(prefix)/share/gnome/help
+ touch $@
+add-license-stamp: wixdistdir
+ mkdir -p wixdistdir$(prefix)/share/license/evince
+ cp AUTHORS wixdistdir$(prefix)/share/license/evince
+ cp COPYING wixdistdir$(prefix)/share/license/evince
+ cp MAINTAINERS wixdistdir$(prefix)/share/license/evince
+ cp README wixdistdir$(prefix)/share/license/evince
+ touch $@
+run-glib-compile-schemas-stamp: wixdistdir
+ glib-compile-schemas wixdistdir$(prefix)/share/glib-2.0/schemas
+evince.wxs: remove-help-stamp add-license-stamp run-glib-compile-schemas-stamp
+
+#Workaround for bug in gnome-doc-utils
+wixdistdir: all-recursive
+
+#Hack for filetypes and shortcuts
+HEAT_FLAGS = -t:filetypes.xsl -t:shortcuts.xsl
+
+@WIX_MAKE_RULES@
+
+endif
+
+
-include $(top_srcdir)/git.mk
diff -Naur evince-2.32.0/shortcuts.xsl evince-2.32.0.new/shortcuts.xsl
--- evince-2.32.0/shortcuts.xsl 1970-01-01 01:00:00.000000000 +0100
+++ evince-2.32.0.new/shortcuts.xsl 2011-07-26 18:21:18.152949563 +0200
@@ -0,0 +1,55 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet version="1.0"
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns:xs="http://www.w3.org/2001/XMLSchema"
+ xmlns:fn="http://www.w3.org/2005/xpath-functions"
+ xmlns:wix="http://schemas.microsoft.com/wix/2006/wi">
+
+ <xsl:output method="xml" version="1.0" encoding="UTF-8"
+indent="yes" />
+
+ <!-- Identity template -->
+ <xsl:template match="@* | node()">
+ <xsl:copy>
+ <xsl:apply-templates select="@* | node()" />
+ </xsl:copy>
+ </xsl:template>
+
+ <xsl:template match="wix:Component/wix:File[substring(@Source,string-length(@Source)-9)='evince.exe']">
+ <xsl:copy>
+ <!--- copy all attributes -->
+ <xsl:apply-templates select="@*" />
+
+ </xsl:copy>
+
+ <!-- add desktop shortcut -->
+ <xsl:element name="Shortcut" namespace="http://schemas.microsoft.com/wix/2006/wi">
+ <xsl:attribute name="Id">stc6B9B8A4956D246C996C0747289251D34</xsl:attribute>
+ <xsl:attribute name="Advertise">yes</xsl:attribute>
+ <xsl:attribute name="Description">Evince Document Viewer</xsl:attribute>
+ <xsl:attribute name="Directory">DesktopFolder</xsl:attribute>
+ <xsl:attribute name="Name">Evince</xsl:attribute>
+ <xsl:attribute name="Icon">EvinceIcon1.exe</xsl:attribute>
+ <xsl:element name="Icon" namespace="http://schemas.microsoft.com/wix/2006/wi">
+ <xsl:attribute name="Id">EvinceIcon1.exe</xsl:attribute>
+ <xsl:attribute name="SourceFile">$(var.wixdistdir)\bin\evince.exe</xsl:attribute>
+ </xsl:element>
+ </xsl:element>
+
+ <!-- add menu shortcut -->
+ <xsl:element name="Shortcut" namespace="http://schemas.microsoft.com/wix/2006/wi">
+ <xsl:attribute name="Id">stc6815CB116A7D4012B7581994A80D470</xsl:attribute>
+ <xsl:attribute name="Advertise">yes</xsl:attribute>
+ <xsl:attribute name="Description">Evince Document Viewer</xsl:attribute>
+ <xsl:attribute name="Directory">ProgramMenuFolder</xsl:attribute>
+ <xsl:attribute name="Name">Evince</xsl:attribute>
+ <xsl:attribute name="Icon">EvinceIcon2.exe</xsl:attribute>
+ <xsl:element name="Icon" namespace="http://schemas.microsoft.com/wix/2006/wi">
+ <xsl:attribute name="Id">EvinceIcon2.exe</xsl:attribute>
+ <xsl:attribute name="SourceFile">$(var.wixdistdir)\bin\evince.exe</xsl:attribute>
+ </xsl:element>
+ </xsl:element>
+
+ </xsl:template>
+
+</xsl:stylesheet>