Clone in a terminal:
Commit 0fee0df
Johan Mattsson - 2014-03-15T00:41:07+00:00
0fee0dfdd9c03cc218083a8e00e19d2407154b14johan.mattsson.m@gmail.com

Android build scripts

Changed files (2)

Diff

diff --git a/android.vapi b/android.vapinew file mode 100644index 0000000..940ce4f--- /dev/null+++ b/android.vapi@@ -0,0 +1,8 @@+[CCode (cname = "ANDROID_LOG_WARN", cheader_filename = "android/log.h")]+public extern static const int ANDROID_LOG_WARN;++[CCode (cname = "ANDROID_LOG_INFO", cheader_filename = "android/log.h")]+public extern static const int ANDROID_LOG_INFO;++[CCode (cname = "__android_log_print", cheader_filename = "android/log.h")]+public extern static int __android_log_print (int prio, string tag,  string fmt, ...);diff --git a/scripts/android_build.py b/scripts/android_build.pynew file mode 100755index 0000000..29068e7--- /dev/null+++ b/scripts/android_build.py@@ -0,0 +1,41 @@+#!/usr/bin/python+"""+Copyright (C) 2013 Johan Mattsson++This library is free software; you can redistribute it and/or modify +it under the terms of the GNU Lesser General Public License as +published by the Free Software Foundation; either version 3 of the +License, or (at your option) any later version.++This library is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Lesser General Public License for more details.+"""++import build+from translations import compile_translations+import configfile+from run import run+import version++prefix = ""+valac = "valac"+valaflags = "--define ANDROID --vapidir=/opt/birdfont/include --vapidir=./ --pkg android"+cc = ""+cflags = ""+ldflags = ""+library_cflags = ""+library_ldflags = ""+library = "libbirdfont.so" ++configfile.write_config (prefix)+compile_translations()+build.libbirdfont(prefix, cc, cflags, library_ldflags, valac, valaflags, library)+run ("mkdir -p build/jni");+run ("cp scripts/Android.mk build/jni/");+run ("cp scripts/Application.mk build/jni");+run ("cp build/libbirdfont/*.c build/jni/");+run ("cd build/jni && ndk-build");++print ("Done")

Contact

Email: johan.mattsson.m@gmail.com
Mastodon: typo.social/@birdfont
GitHub: johanmattssonm
LinkedIn: johan-mattsson-2ab324112