Quote: "I don't quite see why cygwin is needed. It isn't needed for AppGameKit Pascal."
Cygwin is used for doing the compile bits to create the stuff that Eclipse uses. Simple steps.
leo877, if you upgrade your AppGameKit (I would recommend 1076), you need to update a bunch of stuff in your android setup. And starting with 1071, the byte code and media files go in a directory named 'media' under the 'assets' directory in your android project.
These are commands I execute every time I update/change my AppGameKit version. I have my Windows AppGameKit installed in C:\TGC\AGK (I never use the Program Files directories if given the choice, I hate spaces in paths/file names). And I used simply 'android-ndk' for the Android NDK path (I used the most recent version). And I just created from IDE down in the android set, since I didn't need anything else in the AppGameKit tree.
A good command to use before anything else, to make sure directory/file permissions are set well:
To update the core AppGameKit stuff:
cp --preserve=timestamps /cygdrive/c/TGC/AGK/IDE/common/include/* /cygdrive/c/Android/IDE/common/include
cp -R --preserve=timestamps /cygdrive/c/TGC/AGK/IDE/apps/interpreter/* /cygdrive/c/Android/IDE/apps/interpreter
cp -R --preserve=timestamps /cygdrive/c/TGC/AGK/IDE/apps/interpreter_android/* /cygdrive/c/Android/IDE/apps/interpreter_android
cp -R --preserve=timestamps /cygdrive/c/TGC/AGK/IDE/platform/android/* /cygdrive/c/Android/IDE/platform/android
cp -R --preserve=timestamps /cygdrive/c/TGC/AGK/IDE/templates/template_android/* /cygdrive/c/Android/IDE/templates/template_android
To update my own projects after updating core AppGameKit (this is important to make sure that your project uses any new stuff):
cp -R --preserve=timestamps /cygdrive/c/TGC/AGK/IDE/apps/interpreter_android/jni/* /cygdrive/c/Android/IDE/apps/<myappname>/jni
cp -R --preserve=timestamps /cygdrive/c/TGC/AGK/IDE/apps/interpreter_android/libs/* /cygdrive/c/Android/IDE/apps/<myappname>/libs
cp -R --preserve=timestamps /cygdrive/c/TGC/AGK/IDE/apps/interpreter_android/obj/* /cygdrive/c/Android/IDE/apps/<myappname>/obj
cp -R --preserve=timestamps /cygdrive/c/TGC/AGK/IDE/apps/interpreter_android/src/* /cygdrive/c/Android/IDE/apps/<myappname>/src
After doing the above to make sure the permissions are correct and that Eclipse will be able to run the app on the Android device:
cd /cygdrive/c/Android
chown -R <winusername>:mkgroup *
chmod -R a+r,a+w *
cd /cygdrive/c/Android/android-sdk/platform-tools/
chmod -R a+x *.exe
Now, just so you have a working player, build the player:
cd /cygdrive/c/Android/IDE/apps/interpreter_android
/cygdrive/c/android/android-ndk/ndk-build clean
/cygdrive/c/android/android-ndk/ndk-build 2> log.txt
Edit /cygdrive/c/Android/IDE/apps/interpreter/interpreter.cpp to uncomment the correct line so that your app will run instead of the player. In v1075 and v1076 it is at line #255:
#ifdef IDE_ANDROID
// Assign byte code filename when running standalone
// strcpy ( g_pInterpreterByteCodeFile, "bytecode.byc" ); // comment in for T1 BASIC APP
#endif
Copy from your AppGameKit Tier1 directory, clean and compile your app:
cd /cygdrive/c/Android/IDE/apps/<myappname>
\rm ./assets/media/*.txt
\rm ./assets/media/*.png
\rm ./assets/media/*.jpg
\rm ./assets/media/*.wav
cp --preserve=timestamps /cygdrive/c/TGC/AGK/Projects/Basic/<myappname>/media/*.jpg ./assets/media
cp --preserve=timestamps /cygdrive/c/TGC/AGK/Projects/Basic/<myappname>/media/*.txt ./assets/media
cp --preserve=timestamps /cygdrive/c/TGC/AGK/Projects/Basic/<myappname>/media/*.png ./assets/media
cp --preserve=timestamps /cygdrive/c/TGC/AGK/Projects/Basic/<myappname>/media/*.wav ./assets/media
cp --preserve=timestamps /cygdrive/c/TGC/AGK/Projects/Basic/<myappname>/media/<myappname>.byc ./assets/media/bytecode.byc
/cygdriveÆ’/c/android/android-ndk/ndk-build clean
/cygdrive/c/android/android-ndk/ndk-build 2> log.txt
Good luck!
Cheers,
Ancient Lady
AGK Community Tester