Skip to content

Commit

Permalink
fix:tomtom:Make sure the tomtom_plugin and tomtom_minimal contain nav…
Browse files Browse the repository at this point in the history
…it.xml (navit-gps#875)

* Issue/823 

Fix navit.xml (tomtom480.xml) and locales path

* Issue/823

Fix missing navit.xml (tomtom480.xml) and locale path

* add xslt support

* Update setup_common_requirements.sh

* Moving change performed in aa10e05 inside setup_tomtom_requirements.sh (and adding it to circleci process)

* Only running installation for xsltproc in circleci

* Update build_tomtom_minimal.sh

copy also the layout xml files to target

* copy also the layout xml to target

* Selecting specific xml prefixes during copy

* Fixing tomtom's xslt following split of xml config files at e70a289
  • Loading branch information
gefin authored and jkoan committed Jun 30, 2021
1 parent f12dd29 commit aa18b99
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 8 deletions.
6 changes: 4 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -187,9 +187,10 @@ jobs:
- checkout
- run: if scripts/check_need_build.sh; then circleci step halt; fi
- run:
name: Setup common requirements
name: Prepare the tomtom build environment
command: |
bash scripts/setup_common_requirements.sh
apt-get install -y xsltproc
- run:
name: Build for Tomtom (minimal)
command: |
Expand All @@ -208,9 +209,10 @@ jobs:
- checkout
- run: if scripts/check_need_build.sh; then circleci step halt; fi
- run:
name: Setup common requirements
name: Prepare the tomtom build environment
command: |
bash scripts/setup_common_requirements.sh
apt-get install -y xsltproc
- run:
name: Build for Tomtom (plugin)
command: |
Expand Down
8 changes: 8 additions & 0 deletions navit/xslt/tomtom.xslt
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

<xsl:template match="/">
<xsl:apply-templates select="config"/>
<xsl:apply-templates select="layout"/>
</xsl:template>

<xsl:template match="config">
Expand Down Expand Up @@ -52,6 +53,13 @@
</mapset>
<xsl:copy-of select="layer"/>
<xsl:copy-of select="layout"/>
<xsl:copy-of select="xi:include"/>
</xsl:copy>
</xsl:template>

<xsl:template match="layout">
<xsl:copy>
<xsl:copy-of select="@*|node()"/>
</xsl:copy>
</xsl:template>
</xsl:transform>
6 changes: 3 additions & 3 deletions scripts/build_tomtom_minimal.sh
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,11 @@ cp $PREFIX/share/navit/icons/*48.png $OUT_PATH/navit/share/icons
cp $PREFIX/share/navit/icons/*64.png $OUT_PATH/navit/share/icons
cp $PREFIX/share/navit/icons/nav*.* $OUT_PATH/navit/share/icons
cp $PREFIX/share/navit/icons/country*.png $OUT_PATH/navit/share/icons
cd ..
cp $PREFIX/share/navit/navit.xml ./tomtom480.xml
cp $PREFIX/share/navit/navit.xml $OUT_PATH/navit/share
cp $PREFIX/share/navit/navit_layout_*.xml $OUT_PATH/navit/share

# locale
cp -r $PREFIX/share/locale $OUT_PATH/navit/share/locale
cp -r $PREFIX/share/locale $OUT_PATH/navit/share


cd $OUT_PATH
Expand Down
5 changes: 3 additions & 2 deletions scripts/build_tomtom_plugin.sh
Original file line number Diff line number Diff line change
Expand Up @@ -115,11 +115,12 @@ cp $PREFIX/share/navit/icons/*48.png $OUT_PATH/navit/share/icons
cp $PREFIX/share/navit/icons/*64.png $OUT_PATH/navit/share/icons
cp $PREFIX/share/navit/icons/nav*.* $OUT_PATH/navit/share/icons
cp $PREFIX/share/navit/icons/country*.png $OUT_PATH/navit/share/icons
cp $PREFIX/share/navit/navit.xml ./tomtom480.xml
cp $PREFIX/share/navit/navit.xml $OUT_PATH/navit/share
cp $PREFIX/share/navit/navit_layout_*.xml $OUT_PATH/navit/share


# locale
cp -r $PREFIX/share/locale $OUT_PATH/navit/share/locale
cp -r $PREFIX/share/locale $OUT_PATH/navit/share

# espeak
cp -r ~/share/espeak-data $OUT_PATH/navit/share/
Expand Down
2 changes: 1 addition & 1 deletion scripts/setup_tomtom_requirements.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
set -e

# install additional packages to build TT evitonment and navit
apt-get install -y libglib2.0-dev git autogen autoconf libtool zip
apt-get install -y libglib2.0-dev git autogen autoconf libtool zip xsltproc
dpkg --add-architecture i386
apt-get update
apt-get install -y libc6:i386 libncurses5:i386 libstdc++6:i386
Expand Down

0 comments on commit aa18b99

Please sign in to comment.