forked from organicmaps/organicmaps
[android] Add flag symlinks generation to android/res/drawable.
This commit is contained in:
parent
4e19504fe1
commit
1bc14d9f39
3 changed files with 45 additions and 9 deletions
24
.gitignore
vendored
24
.gitignore
vendored
|
@ -69,6 +69,21 @@ android/gen
|
|||
android/libs
|
||||
android/obj
|
||||
android/.settings
|
||||
android/.classpath
|
||||
android/.cproject
|
||||
android/.project
|
||||
android/assets
|
||||
android/local.properties
|
||||
android/ant.properties
|
||||
# local android scripts, such as debugger helper scrips
|
||||
android/local
|
||||
# ignore flags symlinks
|
||||
android/res/drawable-xhdpi/??.png
|
||||
android/res/drawable-xhdpi/do_hack.png
|
||||
android/res/drawable-xhdpi/uk_england.png
|
||||
android/res/drawable-xhdpi/uk_northern_ireland.png
|
||||
android/res/drawable-xhdpi/uk_scotland.png
|
||||
android/res/drawable-xhdpi/uk_wales.png
|
||||
|
||||
# data
|
||||
data/intermediate_data
|
||||
|
@ -91,15 +106,6 @@ data/benchmarks/ipod4/*
|
|||
data/benchmarks/ipad/*
|
||||
data/benchmarks/mac/*
|
||||
|
||||
android/.classpath
|
||||
android/.cproject
|
||||
android/.project
|
||||
android/assets
|
||||
android/local.properties
|
||||
android/ant.properties
|
||||
# local android scripts, such as debugger helper scrips
|
||||
android/local
|
||||
|
||||
qtc_packaging
|
||||
|
||||
syntax: regexp
|
||||
|
|
|
@ -20,3 +20,6 @@ done
|
|||
|
||||
# Separate case for World and countries list files without search support
|
||||
ln -s $SRC/countries.txt.nosearch $DST/countries.txt
|
||||
|
||||
# Call flag symlinks generation
|
||||
./update_flags.sh
|
||||
|
|
27
tools/android/update_flags.sh
Executable file
27
tools/android/update_flags.sh
Executable file
|
@ -0,0 +1,27 @@
|
|||
#!/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"
|
Loading…
Add table
Reference in a new issue