summaryrefslogtreecommitdiff
path: root/app/misc
diff options
context:
space:
mode:
Diffstat (limited to 'app/misc')
l---------app/misc1
-rw-r--r--app/misc/build-native.bat25
-rwxr-xr-xapp/misc/build-native.sh54
-rwxr-xr-xapp/misc/fetchtranslations.sh36
-rwxr-xr-xapp/misc/genFAQ.py135
-rwxr-xr-xapp/misc/prepareovpn3.sh3
6 files changed, 1 insertions, 253 deletions
diff --git a/app/misc b/app/misc
new file mode 120000
index 00000000..1b116211
--- /dev/null
+++ b/app/misc
@@ -0,0 +1 @@
+../ics-openvpn/main/misc \ No newline at end of file
diff --git a/app/misc/build-native.bat b/app/misc/build-native.bat
deleted file mode 100644
index 9885557a..00000000
--- a/app/misc/build-native.bat
+++ /dev/null
@@ -1,25 +0,0 @@
-
-@echo on
-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_ABI=x86_64 -j 8 USE_BREAKPAD=0
-
-
-cd libs
-mkdir ..\ovpnlibs
-mkdir ..\ovpnlibs\assets
-
-for /D %%f in (*) do (
- copy %%f\nopievpn ..\ovpnlibs\assets\nopievpn.%%f
- copy %%f\pievpn ..\ovpnlibs\assets\pievpn.%%f
-
- del %%f\libcrypto.so
- del %%f\libssl.so
-
- 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
deleted file mode 100755
index 7382efc9..00000000
--- a/app/misc/build-native.sh
+++ /dev/null
@@ -1,54 +0,0 @@
-#!/bin/bash
-
-# Exit on errors
-set -e
-
-# Generate git config if the openvpn directory is checked out from git
-if [ -d openvpn/.git ]; then
- GIT=git
- cd openvpn
- CONFIGURE_GIT_CHFILES=$($GIT diff-files --name-status -r --ignore-submodules --quiet -- || echo "+")
- CONFIGURE_GIT_UNCOMMITTED=$($GIT diff-index --cached --quiet --ignore-submodules HEAD || echo "*")
- CONFIGURE_GIT_REVISION=$($GIT rev-parse --symbolic-full-name HEAD | cut -d/ -f3)-$($GIT rev-parse --short=16 HEAD)
- echo "#define CONFIGURE_GIT_REVISION \"${CONFIGURE_GIT_REVISION}\"" > config-version.h.tmp; \
- echo "#define CONFIGURE_GIT_FLAGS \"${CONFIGURE_GIT_CHFILES}${CONFIGURE_GIT_UNCOMMITTED}\"" >> config-version.h.tmp
-
- if ! [ -f config-version.h ] || ! cmp -s config-version.h.tmp config-version.h; then \
- echo "replacing config-version.h"
- mv config-version.h.tmp config-version.h
- else
- rm -f config-version.h.tmp
- fi
- cd ..
-fi
-
-if [ "x$1" = "x" ]; then
- ndk-build -j 8 USE_BREAKPAD=0
-else
- ndk-build $@
-fi
-
-if [ $? = 0 ]; then
- rm -rf ovpnlibs/
-
- cd libs
- mkdir -p ../ovpnlibs/assets
- for i in *
- do
- cp -v $i/nopievpn ../ovpnlibs/assets/nopievpn.$i
- cp -v $i/pievpn ../ovpnlibs/assets/pievpn.$i
- done
- # Removed compiled openssl libs, will use platform so libs
- # Reduces size of apk
- #
- rm -v */libcrypto.so */libssl.so
-
- for arch in *
- do
- builddir=../ovpnlibs/jniLibs/$arch
- mkdir -p $builddir
- cp -v $arch/*.so $builddir
- done
-else
- exit $?
-fi
diff --git a/app/misc/fetchtranslations.sh b/app/misc/fetchtranslations.sh
deleted file mode 100755
index 356748d6..00000000
--- a/app/misc/fetchtranslations.sh
+++ /dev/null
@@ -1,36 +0,0 @@
-#! /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"
-fi
-
-echo "Fetch translation archive"
-fetch -q http://crowdin.net/download/project/ics-openvpn.zip
-
-
-# Chinese language require zh-CN and zh-TW
-
-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 (( ${+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 ics-openvpn.zip
diff --git a/app/misc/genFAQ.py b/app/misc/genFAQ.py
deleted file mode 100755
index 9a0c9af5..00000000
--- a/app/misc/genFAQ.py
+++ /dev/null
@@ -1,135 +0,0 @@
-#!/usr/bin/env python
-# Quick and dirty script to generate googlecode wiki pages
-
-import codecs
-import xml.dom.minidom as dom
-import os.path
-import re
-
-faqpath = "/Users/arne/oss/ics-openvpn.wiki"
-
-header="""
-<wiki:comment>
-This page is autogenerated. Do not edit
-</wiki:comment>
-
-= Frequently aksed questions =
-"""
-
-def getString(strid,lang):
- ostr=""
- if strid in strres[lang]:
- ostr=strres[lang][strid]
- else:
- ostr=strres["default"][strid]
-
- ostr = ostr.replace("&lt;","<")
- ostr = ostr.replace("&gt;",">")
- ostr = ostr.replace("\\\"","\"")
- ostr = ostr.replace("\\'","'")
- ostr = ostr.replace("\\n","<p>")
- return ostr
-
-def genPage(javafile, lang):
- #{R.string.faq_howto_title, R.string.faq_howto},
- out =""
- out+= header
- for l in javafile:
- m = re.search("\{.*R.string.([a-z_]+),.*R.string.([a-z_]+)\}", l)
- if m:
- (title, body) = m.groups()
-
- out += "== %s ==\n" % getString(title,lang)
- out += "%s\n" % getString(body,lang)
- if body == "faq_system_dialogs_title":
- out += "%s\n" % getString("faq_system_dialog_xposed",lang)
- return out
-
-def genPageXML(faqdom,lang):
- out =""
-
- #out+="#summary %s\n" % getString("faq_summary",lang)
- out+= header
-
- for xmld in faqdom.firstChild.childNodes:
- for xmle in xmld.childNodes:
- if xmle.nodeName == "TextView":
- style = xmle.getAttribute("style")
-
- textstyle = None
- if style == "@style/faqhead":
- textstyle = "== %s ==\n"
- elif style == "@style/faqitem":
- textstyle = "%s\n"
-
- atext = xmle.getAttribute("android:text")
- aid = xmle.getAttribute("android:id")
- if atext:
- atextid = atext.replace("@string/","")
- else:
- atextid = aid.replace("@+id/","")
-
- out += textstyle % getString(atextid,lang)
-
- return out
-
-
-strres={}
-
-def loadstrres(filename,lang):
- xmlstr = dom.parse(filename)
- strres[lang]={}
- for xmld in xmlstr.childNodes:
- for xmle in xmld.childNodes:
- if xmle.nodeName == "string":
- strname= xmle.getAttribute("name")
- strdata = xmle.firstChild.data
- strres[lang][strname]=strdata
-
-
-def main():
-
- loadstrres("src/main/res/values/strings.xml","default")
-
- #faqdom = dom.parse("src/main/res/layout/faq.xml")
- faqdom = open("src/main/java/de/blinkt/openvpn/fragments/FaqFragment.java").readlines()
- faq= genPage(faqdom,"default")
-
- open(faqpath + "/FAQ.wiki","w").write(faq)
-
- for directory in os.listdir("src/main/res"):
- if directory.startswith("values-") and directory.find("-sw")==-1 and not directory.startswith("values-v"):
- lang = directory.split("-",1)[1]
- print lang
- loadstrres("src/main/res/values-%s/strings.xml" % lang,lang)
-
- langdir= "%s/%s" %(faqpath,lang)
- if lang=="zh-rCN":
- langdir= "%s/%s" %(faqpath,"zh-Hans")
- elif lang=="zh-rTW":
- langdir= "%s/%s" %(faqpath,"zh-Hant")
-
-
- if not os.path.exists(langdir):
- os.mkdir(langdir)
-
- faq= genPage(faqdom,lang)
- open("%s/FAQ.wiki" % langdir,"w").write(faq.encode("utf-8"))
-
- checkFormatString(lang)
-
-def checkFormatString(lang):
- for strid in strres["default"]:
- ostr = getString(strid,"default")
- tstr = getString(strid,lang)
-
-
- for f in ["%s", "%d", "%f"] + ["%%%d$s" % d for d in range(0,10)] + ["%%%d$d" % d for d in range(0,10)]:
- ino = ostr.find(f)==-1
- int = tstr.find(f)==-1
-
- if ino != int:
- print "Mismatch StringID(%s): " % lang,strid,"Original String:",ostr,"Translated String:",tstr
-
-if __name__=="__main__":
- main()
diff --git a/app/misc/prepareovpn3.sh b/app/misc/prepareovpn3.sh
deleted file mode 100755
index 15982727..00000000
--- a/app/misc/prepareovpn3.sh
+++ /dev/null
@@ -1,3 +0,0 @@
-export O3=$PWD/openvpn3
-mkdir -p src/ovpn3/java/net/openvpn/ovpn3
-swig -outdir src/ovpn3/java/net/openvpn/ovpn3/ -c++ -java -package net.openvpn.ovpn3 -I$O3/client -I$O3 $O3/javacli/ovpncli.i \ No newline at end of file