looking at version 3.0 beta

looking at version 3.0 beta
0.0 0


How would you build testlua for android using eclipse and cygwin. There is no build_native.sh. Is this version only for the iphone?



The file named “android-build.py” related building is in the “build” folder.You can put “./android-build.py testlua” in the terminal to build testlua.



I do not know Python. So any of my suggested code should be suspicious.

lets go

Install python newest and greatest
could not be found by bash even if it is in the path change the 1st line of the program to
now running but problems

————— first problem
$ ./android-build.py testlua
File “./android-build.py”, line 22
print “NDK_ROOT not defined. Please define NDK_ROOT in your environment”
in version 3 of python print is a function must add parenthesis around argument
better late then never :slight_smile:

————— second problem
$ ./android-build.py
File “./android-build.py”, line 199
sdk_root = check_environment_variables_sdk()
TabError: inconsistent use of tabs and spaces in indentation

change tabs to spaces seems to work better WOW
language is tab sensitive I am impressed

————— third problem
./android-build.py testlua
Couldn’t find the gcc toolchain.


/cygdrive/e/android/android-ndk-r9 toolchains/arm-linux-androideabi-4.8
does not look good

fix is:

change check_environment_variables
import re
NDK_ROOT = re.sub(‘/cygdrive/./’,‘/’, NDK_ROOT)+ ‘/’

————— problem 4
TCC: Unknown command “/android”
Build dynamic library for project [ E:2d-x-3.0beta\build/Lua/TestLua/proj.android ] fails!

TCC is my shell think of it as command.com

add this line just before os.system()
OK it should be conditional on win32 but do not look a gift horse in the mouth.

command = re.sub(‘/’, r“”, command)
if os.system(command) != 0:

Great it is working now lets try Eclipse

added my version as an attachment