summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--navit/Makefile.am24
-rw-r--r--navit/xslt/android_hdpi.xslt30
-rw-r--r--navit/xslt/android_ldpi.xslt30
-rw-r--r--navit/xslt/android_mdpi.xslt30
4 files changed, 113 insertions, 1 deletions
diff --git a/navit/Makefile.am b/navit/Makefile.am
index 012a00553..2e518aff5 100644
--- a/navit/Makefile.am
+++ b/navit/Makefile.am
@@ -61,13 +61,31 @@ lib@LIBNAVIT@_la_SOURCES = announcement.c atom.c attr.c cache.c callback.c comma
navit_nls.h sunriset.c sunriset.h glib_slice.h
XSLTS=@XSLTS@
-navit.xml: navit_shipped.xml $(foreach xslt, $(subst $(comma), ,$(XSLTS)), $(addsuffix .xslt,$(addprefix xslt/,$(xslt))))
+navit.xml: navit_shipped.xml $(foreach xslt, $(subst $(comma), ,$(XSLTS)), $(addsuffix .xslt,$(addprefix xslt/,$(xslt)))) navit_android_xml
cp $< navit.xml.new
if [ ! -f navit.dtd ]; then cp -f $(top_srcdir)/navit/navit.dtd .; fi
for i in $^; do if [ "$${i%.xslt}" != "$$i" ]; then echo "Applying $$i" ; @SAXON@ -snone navit.xml.new $$i >navit.xml.tmp || exit ; mv navit.xml.tmp navit.xml.new || exit ; fi ; done
mv navit.xml.new navit.xml
rm -f navit.xml.tmp
+navit_android_xml:
+if SUPPORT_ANDROID
+# new android xml files for (mdpi,ldpi,hdpi)
+ cp navit_shipped.xml navit_android.xml.new
+ if [ ! -f navit.dtd ]; then cp -f $(top_srcdir)/navit/navit.dtd .; fi
+ @SAXON@ -snone navit_android.xml.new xslt/android_mdpi.xslt >navit_android_mdpi.xml.tmp
+ @SAXON@ -snone navit_android.xml.new xslt/android_ldpi.xslt >navit_android_ldpi.xml.tmp
+ @SAXON@ -snone navit_android.xml.new xslt/android_hdpi.xslt >navit_android_hdpi.xml.tmp
+ rm -f navit_android.xml.new
+ mv navit_android_mdpi.xml.tmp navit_android_mdpi.xml
+ mv navit_android_ldpi.xml.tmp navit_android_ldpi.xml
+ mv navit_android_hdpi.xml.tmp navit_android_hdpi.xml
+ rm -f navit_android_mdpi.xml.tmp
+ rm -f navit_android_ldpi.xml.tmp
+ rm -f navit_android_hdpi.xml.tmp
+else
+ echo "no Android support"
+endif
if SUPPORT_ANDROID
lib@LIBNAVIT@_la_SOURCES += android.c
@@ -110,6 +128,10 @@ apkg-all: all android/build.xml navit.xml
# if [ "$(builddir)" != "$(srcdir)" ]; then for i in $(shell cd $(builddir)/xpm && echo *.png); do cp $(builddir)/xpm/$$i android/res/drawable-ldpi/$$( echo $$i | tr "[A-Z]" "[a-z]") ; done ; fi
# if [ "$(builddir)" != "$(srcdir)" ]; then for i in $(shell cd $(builddir)/xpm && echo *.png); do cp $(builddir)/xpm/$$i android/res/drawable-hdpi/$$( echo $$i | tr "[A-Z]" "[a-z]") ; done ; fi
+ if [ "$(builddir)" != "$(srcdir)" ]; then for i in $(shell cd $(builddir)/xpm && echo *.png); do convert $(builddir)/xpm/$$i android/res/drawable-mdpi/$$( echo $$i | tr "[A-Z]" "[a-z]") ; done ; fi
+ if [ "$(builddir)" != "$(srcdir)" ]; then for i in $(shell cd $(builddir)/xpm && echo *.png); do convert -resize 75% $(builddir)/xpm/$$i android/res/drawable-ldpi/$$( echo $$i | tr "[A-Z]" "[a-z]") ; done ; fi
+ if [ "$(builddir)" != "$(srcdir)" ]; then for i in $(shell cd $(builddir)/xpm && echo *.png); do convert -resize 150% $(builddir)/xpm/$$i android/res/drawable-hdpi/$$( echo $$i | tr "[A-Z]" "[a-z]") ; done ; fi
+
mkdir -p android/res/raw
for i in $(shell cd ../po && echo *.mo); do cp ../po/$$i android/res/raw/$$( echo $$i | tr "[A-Z]" "[a-z]") ; done
# cp navit.xml android/res/raw
diff --git a/navit/xslt/android_hdpi.xslt b/navit/xslt/android_hdpi.xslt
new file mode 100644
index 000000000..7830cf8fc
--- /dev/null
+++ b/navit/xslt/android_hdpi.xslt
@@ -0,0 +1,30 @@
+<?xml version="1.0"?>
+<xsl:transform version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xi="http://www.w3.org/2001/XInclude">
+ <xsl:output method="xml" doctype-system="navit.dtd" cdata-section-elements="gui"/>
+ <xsl:variable name="OSD_SIZE">1.33</xsl:variable>
+ <xsl:include href="default_plugins.xslt"/>
+ <xsl:include href="map_sdcard_navitmap_bin.xslt"/>
+ <xsl:include href="osd_minimum.xslt"/>
+ <xsl:template match="/config/plugins/plugin[1]" priority="100">
+ <plugin path="$NAVIT_PREFIX/lib/libgraphics_android.so" ondemand="no"/>
+ <xsl:text>&#x0A; </xsl:text>
+ <plugin path="$NAVIT_PREFIX/lib/libvehicle_android.so" ondemand="no"/>
+ <xsl:text>&#x0A; </xsl:text>
+ <plugin path="$NAVIT_PREFIX/lib/libspeech_android.so" ondemand="no"/>
+ <xsl:text>&#x0A; </xsl:text>
+ <xsl:next-match/>
+ </xsl:template>
+ <xsl:template match="/config/navit/graphics">
+ <graphics type="android" />
+ </xsl:template>
+ <xsl:template match="/config/navit/vehicle[1]">
+ <xsl:copy><xsl:copy-of select="@*[not(name()='gpsd_query')]"/>
+ <xsl:attribute name="source">android:</xsl:attribute>
+ <xsl:attribute name="follow">1</xsl:attribute>
+ <xsl:apply-templates/></xsl:copy>
+ </xsl:template>
+ <xsl:template match="/config/navit/speech">
+ <xsl:copy><xsl:copy-of select="@*[not(name()='data')]"/><xsl:attribute name="type">android</xsl:attribute><xsl:apply-templates/></xsl:copy>
+ </xsl:template>
+ <xsl:template match="@*|node()"><xsl:copy><xsl:apply-templates select="@*|node()"/></xsl:copy></xsl:template>
+</xsl:transform>
diff --git a/navit/xslt/android_ldpi.xslt b/navit/xslt/android_ldpi.xslt
new file mode 100644
index 000000000..7830cf8fc
--- /dev/null
+++ b/navit/xslt/android_ldpi.xslt
@@ -0,0 +1,30 @@
+<?xml version="1.0"?>
+<xsl:transform version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xi="http://www.w3.org/2001/XInclude">
+ <xsl:output method="xml" doctype-system="navit.dtd" cdata-section-elements="gui"/>
+ <xsl:variable name="OSD_SIZE">1.33</xsl:variable>
+ <xsl:include href="default_plugins.xslt"/>
+ <xsl:include href="map_sdcard_navitmap_bin.xslt"/>
+ <xsl:include href="osd_minimum.xslt"/>
+ <xsl:template match="/config/plugins/plugin[1]" priority="100">
+ <plugin path="$NAVIT_PREFIX/lib/libgraphics_android.so" ondemand="no"/>
+ <xsl:text>&#x0A; </xsl:text>
+ <plugin path="$NAVIT_PREFIX/lib/libvehicle_android.so" ondemand="no"/>
+ <xsl:text>&#x0A; </xsl:text>
+ <plugin path="$NAVIT_PREFIX/lib/libspeech_android.so" ondemand="no"/>
+ <xsl:text>&#x0A; </xsl:text>
+ <xsl:next-match/>
+ </xsl:template>
+ <xsl:template match="/config/navit/graphics">
+ <graphics type="android" />
+ </xsl:template>
+ <xsl:template match="/config/navit/vehicle[1]">
+ <xsl:copy><xsl:copy-of select="@*[not(name()='gpsd_query')]"/>
+ <xsl:attribute name="source">android:</xsl:attribute>
+ <xsl:attribute name="follow">1</xsl:attribute>
+ <xsl:apply-templates/></xsl:copy>
+ </xsl:template>
+ <xsl:template match="/config/navit/speech">
+ <xsl:copy><xsl:copy-of select="@*[not(name()='data')]"/><xsl:attribute name="type">android</xsl:attribute><xsl:apply-templates/></xsl:copy>
+ </xsl:template>
+ <xsl:template match="@*|node()"><xsl:copy><xsl:apply-templates select="@*|node()"/></xsl:copy></xsl:template>
+</xsl:transform>
diff --git a/navit/xslt/android_mdpi.xslt b/navit/xslt/android_mdpi.xslt
new file mode 100644
index 000000000..7830cf8fc
--- /dev/null
+++ b/navit/xslt/android_mdpi.xslt
@@ -0,0 +1,30 @@
+<?xml version="1.0"?>
+<xsl:transform version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xi="http://www.w3.org/2001/XInclude">
+ <xsl:output method="xml" doctype-system="navit.dtd" cdata-section-elements="gui"/>
+ <xsl:variable name="OSD_SIZE">1.33</xsl:variable>
+ <xsl:include href="default_plugins.xslt"/>
+ <xsl:include href="map_sdcard_navitmap_bin.xslt"/>
+ <xsl:include href="osd_minimum.xslt"/>
+ <xsl:template match="/config/plugins/plugin[1]" priority="100">
+ <plugin path="$NAVIT_PREFIX/lib/libgraphics_android.so" ondemand="no"/>
+ <xsl:text>&#x0A; </xsl:text>
+ <plugin path="$NAVIT_PREFIX/lib/libvehicle_android.so" ondemand="no"/>
+ <xsl:text>&#x0A; </xsl:text>
+ <plugin path="$NAVIT_PREFIX/lib/libspeech_android.so" ondemand="no"/>
+ <xsl:text>&#x0A; </xsl:text>
+ <xsl:next-match/>
+ </xsl:template>
+ <xsl:template match="/config/navit/graphics">
+ <graphics type="android" />
+ </xsl:template>
+ <xsl:template match="/config/navit/vehicle[1]">
+ <xsl:copy><xsl:copy-of select="@*[not(name()='gpsd_query')]"/>
+ <xsl:attribute name="source">android:</xsl:attribute>
+ <xsl:attribute name="follow">1</xsl:attribute>
+ <xsl:apply-templates/></xsl:copy>
+ </xsl:template>
+ <xsl:template match="/config/navit/speech">
+ <xsl:copy><xsl:copy-of select="@*[not(name()='data')]"/><xsl:attribute name="type">android</xsl:attribute><xsl:apply-templates/></xsl:copy>
+ </xsl:template>
+ <xsl:template match="@*|node()"><xsl:copy><xsl:apply-templates select="@*|node()"/></xsl:copy></xsl:template>
+</xsl:transform>