]> git.saurik.com Git - cycript.git/commitdiff
Compile Java support for armv6 where we use JamVM.
authorJay Freeman (saurik) <saurik@saurik.com>
Wed, 6 Jan 2016 10:44:43 +0000 (02:44 -0800)
committerJay Freeman (saurik) <saurik@saurik.com>
Wed, 6 Jan 2016 10:44:43 +0000 (02:44 -0800)
Java/Execute.cpp
build.mk
sysroot.sh

index 88409069fc71e27c0a5731c80f95395baf159f75..8e7acbfab071268aca88b4edaba21b3bdf7ff39f 100644 (file)
@@ -25,7 +25,7 @@
 
 #include <dlfcn.h>
 
-#ifdef __APPLE__
+#if defined(__APPLE__) && !defined(__arm__)
 #include <JavaVM/jni.h>
 #else
 #include <jni.h>
@@ -1342,6 +1342,7 @@ static JavaVM *CYGetJavaVM(JSContextRef context) {
 
         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");
index 0aa2b5988ac0696e8f21e2409cb97c5dcb76b601..7f0d8903fbd5bd036a495ccb4c9c88b669e12b3a 100644 (file)
--- a/build.mk
+++ b/build.mk
@@ -97,6 +97,7 @@ $(deb): Cycript.lib/cycript-apl Cycript.lib/libcycript.dylib Cycript.lib/libcycr
        $(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 $@
index 6699c2b7ad881b98f5eed4f32bccf73fcd306795..2681c0d7dd982151a4ff9496b925146c65b737e5 100755 (executable)
@@ -35,3 +35,7 @@ done
 
 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