#include <dlfcn.h>
-#ifdef __APPLE__
+#if defined(__APPLE__) && !defined(__arm__)
#include <JavaVM/jni.h>
#else
#include <jni.h>
guesses.push_back("/Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/lib/jli/libjli.dylib");
//guesses.push_back("/System/Library/Frameworks/JavaVM.framework/JavaVM");
+ guesses.push_back("libjvm.dylib");
guesses.push_back("libart.so");
guesses.push_back("libdvm.so");
$(lipo) -extract armv6 -extract arm64 -output package/usr/lib/libcycript.dylib Cycript.lib/libcycript.dylib
ln -s libcycript.dylib package/usr/lib/libcycript.0.dylib
cp -a libcycript.cy package/usr/lib/libcycript.cy
+ cp -a Cycript.lib/libcycript.jar package/usr/lib/libcycript.jar
cp -a Cycript.lib/libcycript.db package/usr/lib/libcycript.db
sqlite3 package/usr/lib/libcycript.db "delete from cache where system & $$(($$(cat build.ios-arm{v6,64}/Makefile | sed -e '/^CY_SYSTEM = \([0-9]*\)$$/{s//\1/;p;};d;' | tr $$'\n' '|') 0)) == 0; vacuum full;"
./dpkg-deb.sh -Zlzma -b package $@
mv sysroot.ios/usr/lib/_ncurses/* sysroot.ios/usr/lib
rmdir sysroot.ios/usr/lib/_ncurses
+
+for h in jni.h jni_md.h; do
+ ln -s /System/Library/Frameworks/JavaVM.framework/Versions/A/Headers/"${h}" sysroot.ios/usr/include
+done