File 0001-WIP-wix.patch of Package mingw64-evince
From fd6fb93ae9de730be682b996c38cbccff74492af Mon Sep 17 00:00:00 2001
From: Hib Eris <hib@hiberis.nl>
Date: Mon, 26 Sep 2011 14:35:22 +0200
Subject: [PATCH] WIP wix
---
Makefile.am | 49 +++++++++++++
configure.ac | 30 ++++++++
filetypes.xsl | 181 ++++++++++++++++++++++++++++++++++++++++++++++
glib-schemas-compile.xsl | 61 ++++++++++++++++
shortcuts.xsl | 55 ++++++++++++++
5 files changed, 376 insertions(+), 0 deletions(-)
create mode 100644 filetypes.xsl
create mode 100644 glib-schemas-compile.xsl
create mode 100644 shortcuts.xsl
diff --git a/Makefile.am b/Makefile.am
index 73ecb4b..e9b7870 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -117,4 +117,53 @@ ChangeLog:
.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) \
+ -t glib-schemas-compile.xsl
+evince_msi_LIGHT_FLAGS = \
+ $(WIX_PACKAGE_LIGHT_FLAGS) \
+ -ext WixUtilExtension \
+ -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 --git a/configure.ac b/configure.ac
index dce6c5d..b200f57 100644
--- a/configure.ac
+++ b/configure.ac
@@ -175,10 +175,13 @@ case "$with_platform" in
# 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+-3.0 >= $GTK_REQUIRED gio-2.0 >= $GLIB_REQUIRED gmodule-no-export-2.0 >= $GLIB_REQUIRED gthread-2.0 $SHELL_PLATFORM_PKGS])
+evince_requires="libxml-2.0 >= $LIBXML_REQUIRED gtk+-3.0 >= $GTK_REQUIRED gio-2.0 >= $GLIB_REQUIRED gmodule-no-export-2.0 >= $GLIB_REQUIRED gthread-2.0 $SHELL_PLATFORM_PKGS"
+evince_requires="$evince_requires gail-3.0 >= $GTK_REQUIRED"
# ***************
# Build utilities
@@ -245,6 +248,7 @@ if test "$with_smclient" != "no"; then
esac
PKG_CHECK_MODULES([SMCLIENT],[gtk+-3.0 gthread-2.0 $SMCLIENT_PKGS])
+ evince_requires="$evince_requires $SMCLIENT_PKGS"
AC_SUBST([SMCLIENT_CFLAGS])
AC_SUBST([SMCLIENT_LIBS])
fi
@@ -283,6 +287,7 @@ AC_MSG_RESULT([$with_gtk_unix_print])
if test "$with_gtk_unix_print" = "yes"; then
PKG_CHECK_MODULES(GTKUNIXPRINT, [gtk+-unix-print-3.0 >= $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
# *********************
@@ -303,6 +308,7 @@ AM_CONDITIONAL([WITH_KEYRING],[test "$with_keyring" = "yes"])
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
# *********************
@@ -424,6 +430,7 @@ if test "$enable_nautilus" = "yes" ; then
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"])
@@ -505,13 +512,17 @@ if test "x$enable_pdf" = "xyes"; then
if test "x$enable_pdf" = "xyes"; then
PKG_CHECK_MODULES(CAIRO_PDF, cairo-pdf, enable_cairo_pdf=yes, enable_cairo_pdf=no)
+ evince_requires="$evince_requires poppler-glib >= $POPPLER_REQUIRED"
+ evince_runtime_requires="$evince_runtime_requires poppler-data"
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")
@@ -543,6 +554,7 @@ AC_ARG_ENABLE(ps,
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])
@@ -566,6 +578,7 @@ if test "x$enable_tiff" = "xyes"; then
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
@@ -588,6 +601,7 @@ if test "x$enable_djvu" = "xyes"; then
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
@@ -628,6 +642,7 @@ if test "x$enable_dvi" = "xyes"; then
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
@@ -641,6 +656,7 @@ if test "x$enable_dvi" = "xyes"; then
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
@@ -671,6 +687,7 @@ if test "x$enable_comics" = "xyes"; then
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
@@ -692,6 +709,7 @@ if test "x$enable_xps" = "xyes"; then
if test "x$enable_xps" = "xyes"; then
AC_DEFINE([ENABLE_XPS], [1], [Enable support for XPS documents.])
+ evince_requires="$evince_requires libgxps >= $GXPS_REQUIRED"
else
enable_xps="no"
AC_MSG_WARN(["XPS support is disabled since libgxps (version >= $GXPS_REQUIRED) is needed])
@@ -768,6 +786,18 @@ AC_SUBST([EV_DOCUMENT_LT_CURRENT_MINUS_AGE],[ev_document_lt_current_minus_age])
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 --git a/filetypes.xsl b/filetypes.xsl
new file mode 100644
index 0000000..f604a39
--- /dev/null
+++ b/filetypes.xsl
@@ -0,0 +1,181 @@
+<?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 xps file type -->
+ <xsl:element name="ProgId" namespace="http://schemas.microsoft.com/wix/2006/wi">
+ <xsl:attribute name="Id">Evince.xpsfile</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">xps</xsl:attribute>
+ <xsl:attribute name="ContentType">application/vnd.ms-xpsdocument</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>
+
+ </xsl:template>
+
+</xsl:stylesheet>
diff --git a/glib-schemas-compile.xsl b/glib-schemas-compile.xsl
new file mode 100644
index 0000000..5f6ffd4
--- /dev/null
+++ b/glib-schemas-compile.xsl
@@ -0,0 +1,61 @@
+<?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>
+
+ <!-- add RunGlibCompileSchemas action -->
+ <xsl:template match="wix:Product">
+ <xsl:copy>
+ <xsl:apply-templates select="*|@*" />
+
+ <xsl:element name="CustomAction" namespace="http://schemas.microsoft.com/wix/2006/wi">
+ <xsl:attribute name="Id">RunGlibCompileSchemas_Cmd</xsl:attribute>
+ <xsl:attribute name="Property">RunGlibCompileSchemas</xsl:attribute>
+ <xsl:attribute name="Value">"[APPLICATIONFOLDER]\bin\glib-compile-schemas.exe" "[APPLICATIONFOLDER]\share\glib-2.0\schemas"</xsl:attribute>
+ <xsl:attribute name="Execute">immediate</xsl:attribute>
+ </xsl:element>
+
+ <xsl:element name="CustomAction" namespace="http://schemas.microsoft.com/wix/2006/wi">
+ <xsl:attribute name="Id">RunGlibCompileSchemas</xsl:attribute>
+ <xsl:attribute name="BinaryKey">WixCA</xsl:attribute>
+ <xsl:attribute name="DllEntry">CAQuietExec</xsl:attribute>
+ <xsl:attribute name="Execute">deferred</xsl:attribute>
+ <xsl:attribute name="Return">check</xsl:attribute>
+ <xsl:attribute name="Impersonate">no</xsl:attribute>
+ </xsl:element>
+
+ </xsl:copy>
+ </xsl:template>
+
+ <!-- scheduale RunGlibCompileSchemas action -->
+ <xsl:template match="wix:InstallExecuteSequence">
+ <xsl:copy>
+ <xsl:apply-templates select="*|@*" />
+
+ <xsl:element name="Custom" namespace="http://schemas.microsoft.com/wix/2006/wi">
+ <xsl:attribute name="Action">RunGlibCompileSchemas_Cmd</xsl:attribute>
+ <xsl:attribute name="Before">RunGlibCompileSchemas</xsl:attribute>
+ </xsl:element>
+
+ <xsl:element name="Custom" namespace="http://schemas.microsoft.com/wix/2006/wi">
+ <xsl:attribute name="Action">RunGlibCompileSchemas</xsl:attribute>
+ <xsl:attribute name="After">PublishProduct</xsl:attribute>
+ NOT Installed
+ </xsl:element>
+
+ </xsl:copy>
+ </xsl:template>
+
+</xsl:stylesheet>
diff --git a/shortcuts.xsl b/shortcuts.xsl
new file mode 100644
index 0000000..2c462b9
--- /dev/null
+++ b/shortcuts.xsl
@@ -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>
--
1.7.5.4