1a2cb755e2
-=-=-=-=-=-=-=-=-=-=-=-=-= -New Vehicle (Based on Bullet's RaycastVehicle) - Vehiclebody/VehicleWheel. Demo will come soon, old vehicle (CarBody) will go away soon too. -A lot of fixes to the 3D physics engine -Added KinematicBody with demo -Fixed the space query API for 2D (demo will come soon). 3D is WIP. -Fixed long-standing bug with body_enter/body_exit for Area and Area2D -Performance variables now includes physics (active bodies, collision pairs and islands) -Ability to see what's inside of instanced scenes! -Fixed Blend Shapes (no bs+skeleton yet) -Added an Android JavaClassWrapper singleton for using Android native classes directly from GDScript. This is very Alpha!
71 lines
1.7 KiB
Text
71 lines
1.7 KiB
Text
import shutil
|
|
|
|
Import('env')
|
|
|
|
android_files = [
|
|
|
|
'os_android.cpp',
|
|
'godot_android.cpp',
|
|
'file_access_android.cpp',
|
|
'dir_access_android.cpp',
|
|
'audio_driver_opensl.cpp',
|
|
'file_access_jandroid.cpp',
|
|
'dir_access_jandroid.cpp',
|
|
'thread_jandroid.cpp',
|
|
'audio_driver_jandroid.cpp',
|
|
'ifaddrs_android.cpp',
|
|
'android_native_app_glue.c',
|
|
'java_glue.cpp',
|
|
'java_class_wrapper.cpp'
|
|
|
|
]
|
|
|
|
#env.Depends('#core/math/vector3.h', 'vector3_psp.h')
|
|
|
|
#obj = env.SharedObject('godot_android.cpp')
|
|
|
|
env_android = env.Clone()
|
|
if env['target'] == "profile":
|
|
env_android.Append(CPPFLAGS=['-DPROFILER_ENABLED'])
|
|
|
|
android_objects=[]
|
|
for x in android_files:
|
|
android_objects.append( env_android.SharedObject( x ) )
|
|
|
|
prog = None
|
|
|
|
abspath=env.Dir(".").abspath
|
|
|
|
|
|
pp_basein = open(abspath+"/project.properties.template","rb")
|
|
pp_baseout = open(abspath+"/java/project.properties","wb")
|
|
pp_baseout.write( pp_basein.read() )
|
|
|
|
refcount=1
|
|
|
|
for x in env.android_source_modules:
|
|
pp_baseout.write("android.library.reference."+str(refcount)+"="+x+"\n")
|
|
refcount+=1
|
|
|
|
|
|
|
|
pp_baseout.close()
|
|
|
|
|
|
pp_basein = open(abspath+"/AndroidManifest.xml.template","rb")
|
|
pp_baseout = open(abspath+"/java/AndroidManifest.xml","wb")
|
|
manifest = pp_basein.read()
|
|
manifest = manifest.replace("$$ADD_APPLICATION_CHUNKS$$",env.android_manifest_chunk)
|
|
pp_baseout.write( manifest )
|
|
|
|
|
|
for x in env.android_source_files:
|
|
shutil.copy(x,abspath+"/java/src/com/android/godot")
|
|
|
|
for x in env.android_module_libraries:
|
|
shutil.copy(x,abspath+"/java/libs")
|
|
|
|
|
|
env_android.SharedLibrary("#platform/android/libgodot_android.so",[android_objects])
|
|
|
|
env.Command('#bin/libgodot_android.so', '#platform/android/libgodot_android.so', Copy('bin/libgodot_android.so', 'platform/android/libgodot_android.so'))
|