Build proton 3d engine to Android in win32 and Linux, debug in c++ IDE
Ref:
http://www.rtsoft.com/wiki/doku.php?id= ... #v2_styles
http://www.rtsoft.com/wiki/doku.php?id= ... inux_setup
http://www.rtsoft.com/forums/showthread ... ected+file
/////////////////////////////Android win32/////////////////////
from
http://www.wretch.cc/blog/fatalfeel/858089
1.Install Cygwin
http://www.cygwin.com/
switch Devel Default to install
2.download follows
(1)proton sdk
http://www.rtsoft.com/wiki/doku.php?id=proton:download
(2)android sdk
http://dl.google.com/android/android-sd ... indows.zip
(3)platform-tools
http://www.rtsoft.com/temp2/android-sdk ... ls_r19.zip
(4)tools
http://www.rtsoft.com/temp2/android-sdk-tools_r19.zip
(5)apache ant
http://ftp.mirror.tw/pub/apache//ant/bi ... .4-bin.zip
3.copy file and set path
copy file to correct directory and set path in environment of control panel
[C]:\Program Files\Android\android-sdk\platform-tools;
[C]:\Program Files\Android\android-sdk\tools;
[C]:\apache-ant-1.8.4\bin;
[C]:\android-ndk-r8d
4.
android sdk manager
update
extra/google/usb_driver
5.
AVD manager
add android-15 device
6.
modify C:\proton\RT3DApp\android\app_info_setup.bat
call android update project -p ./
to
call android update project -p . -t android-15
7.
run build.bat
//////////////////////Android Linux///////////////////
1.
download proton sdk
http://www.rtsoft.com/wiki/doku.php?id=proton:download
1.
Execute in win32 system
[C:]\proton_sdk\RT3DApp\media\update_media.bat
2.
copy [C:]\proton_sdk\*.* to linux system
3.
apt-get install tofrodos
ln -s /usr/bin/fromdos /usr/bin/dos2unix
ln -s /usr/bin/todos /usr/bin/unix2dos
or
(option)
modify /[proton_sdk]/tools/linux/prepareAndroid.sh
dos2unix $ANDROID_MANIFES
to
fromdos $ANDROID_MANIFES
4.
gpedit /etc/environment
add path
/usr/local/android-sdk-linux/platform-tools:
/usr/local/android-sdk-linux/tools:
/usr/local/android-ndk-r7-crystax-5.beta3 (unofficial ndk for debug c++ use)
5.
android list targets
android update project -p . -t android-15
6.
apt-get install ant1.8
[proton_sdk]/RT3DApp/android# ../../tools/linux/prepareAndroid.sh -i
-i = Include IAP
-t = Include Tapjoy (option, in win32 system is off)
7.
delete
[proton_sdk]/RT3DApp/android/src/*.*
copy
[proton_sdk]/RT3DApp/android/temp_final_src/com/*.*
to
[proton_sdk]/RT3DApp/android/src/com
delete
[proton_sdk]/RT3DApp/android/temp_final_src/*.*
delete
[proton_sdk]/RT3DApp/android/temp_src/*.*
8.modify /root/proton_sdk/RT3DApp/android/jni/Application.mk
APP_OPTIM=release
to
APP_OPTIM=debug
(option for build one project only)
APP_ABI := armeabi armeabi-v7a
to
APP_ABI := armeabi
9.
gpedit [proton_sdk]\RT3DApp\android\AndroidManifest.xml
add
android:debuggable="true"
10.
[proton_sdk]/RT3DApp/android# ndk-build NDK_DEBUG=1
11.
[proton_sdk]/RT3DApp/android# ../../tools/linux/androidSyncAssets.sh
12.
If use Motodev to debug
[c/c++ application] -> [stop on startup at:] = Java_com_rtsoft_rt3dapp_AppRenderer_nativeInit
13.
RTPhysics cpp fixed
(1)
copy
[proton_sdk]/shared/android/v2_src/cpp/AndroidApp.cpp
to
[proton_sdk]/RTPhysics/android/temp_final_cpp_src/AndroidApp.cpp
(2)
gpedit [proton_sdk]/RTPhysics/android/temp_final_cpp_src/AndroidApp.cpp
replace all
${PACKAGE_NAME_WITH_UNDERSCORES}
to
'com_rtsoft_rtphysics'
14.
RTPhysics Android.mk fixed
(1)
gpedit [proton_sdk]/RTPhysics/android/jni/Android.mk
replace
$(SHARED)/android/AndroidApp.cpp
to
../temp_final_cpp_src/AndroidApp.cpp
(2)
gpedit [proton_sdk]/RTPhysics/android/jni/Android.mk
find
$(COMPPATH)/EmitVirtualKeyComponent.cpp
after add
$(COMPPATH)/RenderScissorComponent.cpp
15.RTPhysics java fixed
gpedit [proton_sdk]/RTPhysics/android/src/com/rtsoft/rtphysics/main.java
find
super.onCreate(savedInstanceState);
beffore add
System.loadLibrary(dllname);
Enable Framebuffer mode in Ubuntu
http://www.wretch.cc/blog/fatalfeel/655235
Install MOTODEV IDE
http://www.wretch.cc/blog/fatalfeel/857768
setting debug environment
http://www.wretch.cc/blog/fatalfeel/844598