From 76fa559164f18a001a68b1c8a60847e6dd05494b Mon Sep 17 00:00:00 2001 From: Alex Zolotarev Date: Mon, 20 Oct 2014 16:09:59 -0700 Subject: [PATCH] [android] APKs with fonts and mwm for Samsung and Amazon --- android/build.gradle | 6 ++-- .../flavors/mwm-ttf-assets/01_dejavusans.ttf | 1 + .../mwm-ttf-assets/02_wqy-microhei.ttf | 1 + .../mwm-ttf-assets/03_jomolhari-id-a3d.ttf | 1 + android/flavors/mwm-ttf-assets/04_padauk.ttf | 1 + android/flavors/mwm-ttf-assets/05_khmeros.ttf | 1 + .../flavors/mwm-ttf-assets/06_code2000.ttf | 1 + android/flavors/mwm-ttf-assets/World.mwm | 1 + .../flavors/mwm-ttf-assets/WorldCoasts.mwm | 1 + tools/android/update_assets.sh | 2 +- tools/android/update_assets_yota.sh | 1 - tools/android/update_flags.sh | 28 ------------------- 12 files changed, 13 insertions(+), 32 deletions(-) create mode 120000 android/flavors/mwm-ttf-assets/01_dejavusans.ttf create mode 120000 android/flavors/mwm-ttf-assets/02_wqy-microhei.ttf create mode 120000 android/flavors/mwm-ttf-assets/03_jomolhari-id-a3d.ttf create mode 120000 android/flavors/mwm-ttf-assets/04_padauk.ttf create mode 120000 android/flavors/mwm-ttf-assets/05_khmeros.ttf create mode 120000 android/flavors/mwm-ttf-assets/06_code2000.ttf create mode 120000 android/flavors/mwm-ttf-assets/World.mwm create mode 120000 android/flavors/mwm-ttf-assets/WorldCoasts.mwm delete mode 100755 tools/android/update_flags.sh diff --git a/android/build.gradle b/android/build.gradle index 2fe034c0d7..dd51817701 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -76,7 +76,7 @@ android { buildConfigField 'String', 'PRO_URL', '"samsungapps://ProductDetail/com.mapswithme.maps.pro"' buildConfigField 'String', 'REVIEW_URL', '"samsungapps://ProductDetail/com.mapswithme.maps.pro"' android.sourceSets.samsungPro.setRoot('flavors/pro') - android.sourceSets.samsungPro.assets.srcDirs = ['flavors/guides-assets'] + android.sourceSets.samsungPro.assets.srcDirs = ['flavors/guides-assets', 'flavors/mwm-ttf-assets'] } samsungLite { @@ -85,7 +85,7 @@ android { buildConfigField 'String', 'PRO_URL', '"samsungapps://ProductDetail/com.mapswithme.maps.pro"' buildConfigField 'String', 'REVIEW_URL', '"samsungapps://ProductDetail/com.mapswithme.maps.samsung"' android.sourceSets.samsungLite.setRoot('flavors/lite') - android.sourceSets.samsungLite.assets.srcDirs = ['flavors/guides-assets'] + android.sourceSets.samsungLite.assets.srcDirs = ['flavors/guides-assets', 'flavors/mwm-ttf-assets'] } amazonPro { @@ -95,6 +95,7 @@ android { buildConfigField 'String', 'REVIEW_URL', '"amzn://apps/android?p=com.mapswithme.maps.pro"' android.sourceSets.amazonPro.setRoot('flavors/pro') // Do not include guides assets for Amazon, they don't like GP apps ads + android.sourceSets.amazonPro.assets.srcDirs = ['flavors/mwm-ttf-assets'] } amazonLite { @@ -104,6 +105,7 @@ android { buildConfigField 'String', 'REVIEW_URL', '"amzn://apps/android?p=com.mapswithme.maps"' android.sourceSets.amazonLite.setRoot('flavors/lite') // Do not include guides assets for Amazon, they don't like GP apps ads + android.sourceSets.amazonLite.assets.srcDirs = ['flavors/mwm-ttf-assets'] } androidpitPro { diff --git a/android/flavors/mwm-ttf-assets/01_dejavusans.ttf b/android/flavors/mwm-ttf-assets/01_dejavusans.ttf new file mode 120000 index 0000000000..9fa46acb16 --- /dev/null +++ b/android/flavors/mwm-ttf-assets/01_dejavusans.ttf @@ -0,0 +1 @@ +../../../data/01_dejavusans.ttf \ No newline at end of file diff --git a/android/flavors/mwm-ttf-assets/02_wqy-microhei.ttf b/android/flavors/mwm-ttf-assets/02_wqy-microhei.ttf new file mode 120000 index 0000000000..b6825508f8 --- /dev/null +++ b/android/flavors/mwm-ttf-assets/02_wqy-microhei.ttf @@ -0,0 +1 @@ +../../../data/02_wqy-microhei.ttf \ No newline at end of file diff --git a/android/flavors/mwm-ttf-assets/03_jomolhari-id-a3d.ttf b/android/flavors/mwm-ttf-assets/03_jomolhari-id-a3d.ttf new file mode 120000 index 0000000000..aaeacdf663 --- /dev/null +++ b/android/flavors/mwm-ttf-assets/03_jomolhari-id-a3d.ttf @@ -0,0 +1 @@ +../../../data/03_jomolhari-id-a3d.ttf \ No newline at end of file diff --git a/android/flavors/mwm-ttf-assets/04_padauk.ttf b/android/flavors/mwm-ttf-assets/04_padauk.ttf new file mode 120000 index 0000000000..7045b5b29b --- /dev/null +++ b/android/flavors/mwm-ttf-assets/04_padauk.ttf @@ -0,0 +1 @@ +../../../data/04_padauk.ttf \ No newline at end of file diff --git a/android/flavors/mwm-ttf-assets/05_khmeros.ttf b/android/flavors/mwm-ttf-assets/05_khmeros.ttf new file mode 120000 index 0000000000..0c2294786a --- /dev/null +++ b/android/flavors/mwm-ttf-assets/05_khmeros.ttf @@ -0,0 +1 @@ +../../../data/05_khmeros.ttf \ No newline at end of file diff --git a/android/flavors/mwm-ttf-assets/06_code2000.ttf b/android/flavors/mwm-ttf-assets/06_code2000.ttf new file mode 120000 index 0000000000..990f3f1b0b --- /dev/null +++ b/android/flavors/mwm-ttf-assets/06_code2000.ttf @@ -0,0 +1 @@ +../../../data/06_code2000.ttf \ No newline at end of file diff --git a/android/flavors/mwm-ttf-assets/World.mwm b/android/flavors/mwm-ttf-assets/World.mwm new file mode 120000 index 0000000000..e2572d530b --- /dev/null +++ b/android/flavors/mwm-ttf-assets/World.mwm @@ -0,0 +1 @@ +../../../data/World.mwm \ No newline at end of file diff --git a/android/flavors/mwm-ttf-assets/WorldCoasts.mwm b/android/flavors/mwm-ttf-assets/WorldCoasts.mwm new file mode 120000 index 0000000000..846fc5ce30 --- /dev/null +++ b/android/flavors/mwm-ttf-assets/WorldCoasts.mwm @@ -0,0 +1 @@ +../../../data/WorldCoasts.mwm \ No newline at end of file diff --git a/tools/android/update_assets.sh b/tools/android/update_assets.sh index 8fbc83eaca..6436bc8151 100755 --- a/tools/android/update_assets.sh +++ b/tools/android/update_assets.sh @@ -1,2 +1,2 @@ ./update_assets_for_version.sh ../../android/assets -./update_flags.sh +./add_assets_mwm-ttf.sh ../../android/flavors/mwm-ttf-assets diff --git a/tools/android/update_assets_yota.sh b/tools/android/update_assets_yota.sh index 8b2d90880e..ce3109a750 100755 --- a/tools/android/update_assets_yota.sh +++ b/tools/android/update_assets_yota.sh @@ -17,4 +17,3 @@ rm -rf $DST/resources-xhdpi rm -rf $DST/resources-xxhdpi ln -s $SRC/resources-yota $DST/resources-mdpi -./update_flags.sh diff --git a/tools/android/update_flags.sh b/tools/android/update_flags.sh deleted file mode 100755 index e78939ebb9..0000000000 --- a/tools/android/update_flags.sh +++ /dev/null @@ -1,28 +0,0 @@ -#!/bin/bash -set -x -u - -SRC=../../data/flags -DST=../../android/res - -# *@2x.png -sobakaPos=7 - -for file in $SRC/*.png; -do - filename=$(basename "$file") - - if [[ "$file" == *\@2x.png ]]; then - strLen=${#filename} - prefixName=${filename:0:`expr $strLen - $sobakaPos`} - - rm "$DST/drawable-xhdpi/${prefixName}.png" - ln -s "../$SRC/$filename" "$DST/drawable-xhdpi/${prefixName}.png" - else - rm "$DST/drawable-mdpi/$filename" - ln -s "../$SRC/$filename" "$DST/drawable-mdpi/$filename" - fi -done - -# rename do.png because of aapt - it doesn't support resource name "do" -mv "$DST/drawable-xhdpi/do.png" "$DST/drawable-xhdpi/do_hack.png" -mv "$DST/drawable-mdpi/do.png" "$DST/drawable-mdpi/do_hack.png" \ No newline at end of file