I’m trying to make a simple build script that would work on windows and unix systems.
The script is to be run from cygwin if windows, otherwise just a standard shell.
The script will do the following:
- set the directory variable SDK_ROOT to ‘/cygdrive/C/PROGRA~2/Android/android-sdk/’
- set the directory variable NDK_ROOT to ‘/cygdrive/C/PROGRA~2/android-ndk-r6b’
- cd Android/bin/
- run javah -d ../../test/mytest/ -classpath .:$SDK_ROOT/platforms/android-8/android.jar com.test.MyTest
- cd ..
- run $NDK_ROOT/ndk-build
I’m not sure what kind of scripting language to use nor its syntax, I only know it would roughly look like above. Any ideas on how to proceed?
It seems to me that you already wrote the script, it just needs a few modifications:
Windows
myscript.cmdUnix
myscript.shAlso, make sure that javah exists in your PATH env variable.
if it doesn’t exist, you can add it to the scripts at the beginning:
Windows
SET PATH=c:\path\to\javah;%PATH%Unix
export PATH=/path/to/javah:$PATHNote: you might have to modify the sdk/ndk paths for the script on windows.