summaryrefslogtreecommitdiff
path: root/app/misc
diff options
context:
space:
mode:
Diffstat (limited to 'app/misc')
-rw-r--r--app/misc/build-native.bat17
-rwxr-xr-xapp/misc/build-native.sh2
-rwxr-xr-xapp/misc/fetchtranslations.sh44
-rwxr-xr-xapp/misc/genFAQ.py2
4 files changed, 33 insertions, 32 deletions
diff --git a/app/misc/build-native.bat b/app/misc/build-native.bat
index 73a19a00..9885557a 100644
--- a/app/misc/build-native.bat
+++ b/app/misc/build-native.bat
@@ -1,22 +1,25 @@
@echo on
-echo Currently broken, feel free to fix and send me a patch, see .sh file
+echo Currently broken, feel free to fix and send me a patch, see the build-native.sh file how native libraries are build on UNIX
exit 1
-call ndk-build APP_API=all -j 8
+call ndk-build APP_ABI=x86_64 -j 8 USE_BREAKPAD=0
cd libs
-mkdir ..\assets
-mkdir ..\build\
+mkdir ..\ovpnlibs
+mkdir ..\ovpnlibs\assets
for /D %%f in (*) do (
- copy %%f\minivpn ..\assets\minivpn.%%f
+ copy %%f\nopievpn ..\ovpnlibs\assets\nopievpn.%%f
+ copy %%f\pievpn ..\ovpnlibs\assets\pievpn.%%f
+
del %%f\libcrypto.so
del %%f\libssl.so
- mkdir ..\build\native-libs\%%f\
- copy %%f\*.so ..\build\native-libs\%%f\
+ mkdir ..\ovpnlibs\jniLibs
+ mkdir ..\ovpnlibs\jniLibs\%%f\
+ copy %%f\*.so ..\ovpnlibs\jniLibs\%%f\
)
cd ..
diff --git a/app/misc/build-native.sh b/app/misc/build-native.sh
index f27384cd..7382efc9 100755
--- a/app/misc/build-native.sh
+++ b/app/misc/build-native.sh
@@ -23,7 +23,7 @@ if [ -d openvpn/.git ]; then
fi
if [ "x$1" = "x" ]; then
- ndk-build APP_API=all -j 8
+ ndk-build -j 8 USE_BREAKPAD=0
else
ndk-build $@
fi
diff --git a/app/misc/fetchtranslations.sh b/app/misc/fetchtranslations.sh
index 3529a646..356748d6 100755
--- a/app/misc/fetchtranslations.sh
+++ b/app/misc/fetchtranslations.sh
@@ -1,38 +1,36 @@
-#! /bin/sh
-
+#! /bin/zsh
+set -o shwordsplit
if [ "$ICSCROWDAPIKEY" != "" ]
then
echo "Generating new translation archives"
- fetch -q -1 -o - http://api.crowdin.net/api/project/ics-openvpn/export?key=$ICSCROWDAPIKEY
+ fetch -q -1 -o - "http://api.crowdin.net/api/project/ics-openvpn/export?key=$ICSCROWDAPIKEY"
fi
echo "Fetch translation archive"
fetch -q http://crowdin.net/download/project/ics-openvpn.zip
-langtoinclude="ca cs de es et fr hu it ja ko no nl pl ro ru sv tr uk"
-
-for lang in $langtoinclude
-do
- tar -xvf ics-openvpn.zip -C src/main res/values-$lang/
-done
# Chinese language require zh-CN and zh-TW
-for lang in zh-CN zh-TW id
+typeset -A langhash
+langhash=(zh-CN zh-rCN zh-TW zh-rTW id-ID in ca-ES ca cs-CZ cs et-EE et ja-JP ja ko-KR ko sv-SE sv uk-UA uk)
+
+langtoinclude="de es fr hu it no nl pl pt ro ru tr"
+
+for lang in $langtoinclude ${(k)langhash}
do
- if [ $lang = "zh-CN" ] ; then
- rlang="zh-rCN"
- elif [ $lang = "zh-TW" ] ; then
- rlang="zh-rTW"
- elif [ $lang = "id" ] ; then
- rlang="in"
- fi
-
- echo "Fetch archive for $lang"
- fetch http://crowdin.net/download/project/ics-openvpn/$lang.zip
- tar -xv -C src/main/res/values-$rlang/ --strip-components 3 -f $lang.zip
- rm $lang.zip
+ if (( ${+langhash[$lang]} )); then
+ alang=$lang
+ rlang=${langhash[$lang]}
+ else
+ alang=$lang-${lang:u}
+ rlang=$lang
+ fi
+
+ mkdir -p src/main/res/values-$rlang/
+ echo "$alang -> $rlang"
+ tar -xv -C src/main/res/values-$rlang/ --strip-components 2 -f ics-openvpn.zip res/values-$alang/
done
-rm -v ics-openvpn.zip
+rm ics-openvpn.zip
diff --git a/app/misc/genFAQ.py b/app/misc/genFAQ.py
index b1506420..09381caa 100755
--- a/app/misc/genFAQ.py
+++ b/app/misc/genFAQ.py
@@ -112,7 +112,7 @@ def checkFormatString(lang):
int = tstr.find(f)==-1
if ino != int:
- print "Mismatch",strid,f,ostr,tstr
+ print "Mismatch StringID(%s): " % lang,strid,"Original String:",ostr,"Translated String:",tstr
if __name__=="__main__":
main()