rename android compilation
This commit is contained in:
parent
1097ee9b8d
commit
04092424bf
@ -2,9 +2,15 @@
|
|||||||
#
|
#
|
||||||
# script to compile yap for Android.
|
# script to compile yap for Android.
|
||||||
|
|
||||||
export SDK_ROOT=$HOME/Yap/android-sdk-linux
|
if test -d $HOME/Yap/android-sdk-linux
|
||||||
|
then
|
||||||
|
export SDK_ROOT=$HOME/Yap/android-sdk-linux
|
||||||
|
elif test -d $HOME/Yap/android-sdk-macosx
|
||||||
|
then
|
||||||
|
export SDK_ROOT=$HOME/Yap/android-sdk-macosx
|
||||||
|
fi
|
||||||
|
|
||||||
export NDK_ROOT=$HOME/Yap/android-ndk-r9d
|
export NDK_ROOT=$HOME/Yap/android-ndk-r9d
|
||||||
export PATH=$PATH:"$SDK_ROOT"/tools:"$NDK_ROOT"
|
|
||||||
|
|
||||||
export GMPDIR=$HOME/Yap/gmp-android
|
export GMPDIR=$HOME/Yap/gmp-android
|
||||||
|
|
||||||
@ -28,7 +34,7 @@ else
|
|||||||
--install-dir="$HOME"/Yap/my-android-toolchain
|
--install-dir="$HOME"/Yap/my-android-toolchain
|
||||||
fi
|
fi
|
||||||
|
|
||||||
export PATH=$HOME/Yap/my-android-toolchain/bin:"$NDK_ROOT":"$SDK_ROOT/tools":"$SDK_ROOT/platform-tools":$PATH
|
export PATH="$HOME"/Yap/my-android-toolchain/bin:"$NDK_ROOT":"$SDK_ROOT/tools":"$SDK_ROOT/platform-tools":$PATH
|
||||||
|
|
||||||
cd ~/Yap/bins/android
|
cd ~/Yap/bins/android
|
||||||
|
|
||||||
@ -55,5 +61,6 @@ fi
|
|||||||
cd packages/swig
|
cd packages/swig
|
||||||
mkdir -p $ANDROID_NDK_ROOT/build/core/lib
|
mkdir -p $ANDROID_NDK_ROOT/build/core/lib
|
||||||
make android
|
make android
|
||||||
adb uninstall org.swig.simple
|
make install-android
|
||||||
adb install android/bin/SwigSimple-debug.apk
|
adb uninstall pt.up.fc.dcc.yap
|
||||||
|
adb install android/bin/JavaYap-debug.apk
|
||||||
|
@ -5146,9 +5146,9 @@ static const PL_extension foreigns[] = {
|
|||||||
#if __ANDROID__
|
#if __ANDROID__
|
||||||
JNIEnv *Yap_jenv;
|
JNIEnv *Yap_jenv;
|
||||||
|
|
||||||
void Java_org_swig_simple_SwigSimple_load(JNIEnv *env0, jobject obj, jobject mgr);
|
void Java_pt_up_fc_dcc_yap_JavaYap_load(JNIEnv *env0, jobject obj, jobject mgr);
|
||||||
|
|
||||||
void Java_org_swig_simple_SwigSimple_load
|
void Java_pt_up_fc_dcc_yap_JavaYap_load
|
||||||
(JNIEnv *env0, jobject obj, jobject mgr0)
|
(JNIEnv *env0, jobject obj, jobject mgr0)
|
||||||
{
|
{
|
||||||
AAssetManager *mgr = AAssetManager_fromJava(env0, mgr0);
|
AAssetManager *mgr = AAssetManager_fromJava(env0, mgr0);
|
||||||
|
@ -48,16 +48,16 @@ jni/yap_wrap.o: jni/yap_wrap.cpp
|
|||||||
# emulator -avd first &
|
# emulator -avd first &
|
||||||
#
|
#
|
||||||
# adb uninstall org.swig.simple ( if not the first time )
|
# adb uninstall org.swig.simple ( if not the first time )
|
||||||
# adb install bin/SwigSimple-debug.apk
|
# adb install bin/JavaYap-debug.apk
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
android: android/jni/yap_wrap.cpp
|
android: android/jni/yap_wrap.cpp
|
||||||
|
|
||||||
android/jni/yap_wrap.cpp: $(srcdir)/yap.i
|
android/jni/yap_wrap.cpp: $(srcdir)/yap.i
|
||||||
android create project --target 1 --name Yap --path ./android --activity Yap --package pt.up.fc.dcc.yap;\
|
android create project --target 1 --name JavaYap --path ./android --activity JavaYap --package pt.up.fc.dcc.yap;\
|
||||||
( cd android ; mkdir -p jni jni/lib; mkdir -p assets/share/Yap; mkdir -p assets/lib/Yap;\
|
( cd android ; mkdir -p jni jni/lib; mkdir -p assets/share/Yap; mkdir -p assets/lib/Yap;\
|
||||||
$(SWIG) -c++ -java -I$(srcdir)/../../CXX -package pt.up.fc.dcc.simple -outdir src/pt/up/fc/dcc/yap -o jni/yap_wrap.cpp $(CXXFLAGS) $< ;\
|
$(SWIG) -c++ -java -I$(srcdir)/../../CXX -package pt.up.fc.dcc.yap -outdir src/pt/up/fc/dcc/yap -o jni/yap_wrap.cpp $(CXXFLAGS) $< ;\
|
||||||
cp $(srcdir)/android/Yap.java src/pt/up/fc/dcc/yap/ ;\
|
cp $(srcdir)/android/JavaYap.java src/pt/up/fc/dcc/yap/ ;\
|
||||||
cp $(srcdir)/android/main.xml res/layout ;\
|
cp $(srcdir)/android/main.xml res/layout ;\
|
||||||
cp $(srcdir)/android/Application.mk jni ;\
|
cp $(srcdir)/android/Application.mk jni ;\
|
||||||
cp -r $(DESTDIR)$(PLLIBDIR)/* assets/share/Yap;\
|
cp -r $(DESTDIR)$(PLLIBDIR)/* assets/share/Yap;\
|
||||||
@ -68,6 +68,10 @@ android/jni/yap_wrap.cpp: $(srcdir)/yap.i
|
|||||||
ant debug \
|
ant debug \
|
||||||
)
|
)
|
||||||
|
|
||||||
|
make install-android: android
|
||||||
|
adb uninstall pt.up.fc.dcc.yap
|
||||||
|
adb install android/bin/JavaYap-debug.apk
|
||||||
|
|
||||||
R:
|
R:
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
package org.swig.simple;
|
package pt.up.fc.dcc.yap;
|
||||||
|
|
||||||
import android.app.Activity;
|
import android.app.Activity;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
@ -14,7 +14,7 @@ import android.content.res.AssetManager;
|
|||||||
import android.widget.EditText;
|
import android.widget.EditText;
|
||||||
import java.text.ParseException;
|
import java.text.ParseException;
|
||||||
|
|
||||||
public class SwigSimple extends Activity
|
public class JavaYap extends Activity
|
||||||
{
|
{
|
||||||
TextView outputText = null;
|
TextView outputText = null;
|
||||||
ScrollView scroller = null;
|
ScrollView scroller = null;
|
||||||
@ -154,7 +154,7 @@ public class SwigSimple extends Activity
|
|||||||
|
|
||||||
private AssetManager mgr;
|
private AssetManager mgr;
|
||||||
|
|
||||||
private static final String TAG = "SwigSimple";
|
private static final String TAG = "JavaYap";
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Reference in New Issue
Block a user