From 36c84cb7ff9ff0d4acd58a3024a1be898e00e43c Mon Sep 17 00:00:00 2001 From: pelya Date: Mon, 1 Nov 2010 10:30:51 +0200 Subject: [PATCH] Updated readme, added some warnings to autogenerated files that they are autogenerated --- ChangeAppSettings.sh | 8 +++++--- project/jni/application/src | 2 +- readme.txt | 14 ++++++++++++-- 3 files changed, 18 insertions(+), 6 deletions(-) diff --git a/ChangeAppSettings.sh b/ChangeAppSettings.sh index 01393c43d..40df3c5f7 100755 --- a/ChangeAppSettings.sh +++ b/ChangeAppSettings.sh @@ -383,7 +383,8 @@ mkdir -p project/src cd project/java for F in *.java; do echo Patching $F - cat $F | sed "s/package .*;/package $AppFullName;/" > ../src/$F + echo '// DO NOT EDIT THIS FILE - it is automatically generated, edit file under project/java dir' > ../src/$F + cat $F | sed "s/package .*;/package $AppFullName;/" >> ../src/$F done cd ../.. @@ -408,6 +409,7 @@ cat project/src/Globals.java | \ mv -f project/src/Globals.java.1 project/src/Globals.java echo Patching project/jni/Settings.mk +echo '# DO NOT EDIT THIS FILE - it is automatically generated, edit file SettingsTemplate.mk' > project/jni/Settings.mk cat project/jni/SettingsTemplate.mk | \ sed "s/APP_MODULES := .*/APP_MODULES := application sdl-$LibSdlVersion sdl_main stlport jpeg png ogg flac vorbis freetype $CompiledLibraries/" | \ sed "s/APP_ABI := .*/APP_ABI := $MultiABI/" | \ @@ -421,7 +423,7 @@ cat project/jni/SettingsTemplate.mk | \ sed "s^SDL_ADDITIONAL_CFLAGS :=.*^SDL_ADDITIONAL_CFLAGS := $RedefinedKeycodes^" | \ sed "s^APPLICATION_SUBDIRS_BUILD :=.*^APPLICATION_SUBDIRS_BUILD := $AppSubdirsBuild^" | \ sed "s^APPLICATION_CUSTOM_BUILD_SCRIPT :=.*^APPLICATION_CUSTOM_BUILD_SCRIPT := $CustomBuildScript^" | \ - sed "s^SDL_VERSION :=.*^SDL_VERSION := $LibSdlVersion^" > \ + sed "s^SDL_VERSION :=.*^SDL_VERSION := $LibSdlVersion^" >> \ project/jni/Settings.mk echo Patching strings.xml @@ -435,7 +437,7 @@ for F in */strings.xml; do done cd ../../.. -echo If you change libSDL version you have to clean all files in project/libs/obj +echo Cleaning up dependencies rm -rf project/libs/* for OUT in obj; do rm -rf project/$OUT/local/*/objs/sdl_main/* project/$OUT/local/*/libsdl_main.so diff --git a/project/jni/application/src b/project/jni/application/src index 706424f94..57d37d935 120000 --- a/project/jni/application/src +++ b/project/jni/application/src @@ -1 +1 @@ -sc2 \ No newline at end of file +pachi \ No newline at end of file diff --git a/readme.txt b/readme.txt index fdcdec757..c96222f72 100644 --- a/readme.txt +++ b/readme.txt @@ -80,8 +80,18 @@ SDL_BlitSurface(sprite, sourceRect, SDL_GetVideoSurface(), &targetRect); SDL_BlitSurface(SDL_GetVideoSurface(), sourceRect, sprite, &targetRect); // In the future I may add implementation to read screen buffer with glReadPixels(), however it will be slow (okay for screenshots). -To compile your own app, put your app sources into project/jni/application dir, and change symlink "src" -to point to your app, then launch script ChangeAppSettings.sh - it will ask few questions and modify some Java code. +To compile your own app, put your app sources into project/jni/application dir (or create symlink to them), +and change symlink "src" to point to your app: + + cp -r /path/to/my/app project/jni/application/myapp +or + ln -s /path/to/my/app project/jni/application/myapp +then + rm project/jni/application/src + ln -s myapp project/jni/application/src +(the second one should be relative link without slashes) + +Then launch script ChangeAppSettings.sh - it will ask few questions and modify some Java code. You may take AndroidAppSettings.cfg file from some other application to get some sane defaults. The C++ files shall have .cpp extension to be compiled, rename them if necessary. Also you can replace icon image at project/res/drawable/icon.png and image project/res/drawable/publisherlogo.png.