2013年9月3日 星期二

Proton 3d engine open source on android, ios, win32, macos

Ref:
http://www.rtsoft.com/wiki/doku.php?id=proton:android_projects#v2_styles
http://www.rtsoft.com/wiki/doku.php?id=proton:linux_setup

/////////////////////////////Android win32/////////////////////
1.Install Cygwin
http://www.cygwin.com/
switch item 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-sdk_r21.0.1-windows.zip
(3)platform-tools
http://www.rtsoft.com/temp2/android-sdk-platform-tools_r19.zip
(4)tools
http://www.rtsoft.com/temp2/android-sdk-tools_r19.zip
(5)apache ant
http://ftp.mirror.tw/pub/apache//ant/binaries/apache-ant-1.8.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.
remove file
[proton_sdk]/RT3DApp/android/src/*

copy file
[proton_sdk]/RT3DApp/android/temp_final_src/com/*
to
[proton_sdk]/RT3DApp/android/src/com

remove directory
[proton_sdk]/RT3DApp/android/temp_final_src

remove directory
[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);

Download:
https://github.com/fatalfeel/proton_sdk_source
Demo:
https://plus.google.com/photos/106185541018774360364/albums/5964765088859640225
Product:
https://apkpure.com/ihala/com.alphainfo.ihala
https://appadvice.com/app/ihala/789622575

沒有留言:

張貼留言