diff --git a/build.sh b/build.sh index bac447419..7c9a18de7 100755 --- a/build.sh +++ b/build.sh @@ -35,5 +35,5 @@ cd project && env PATH=$NDKBUILDPATH nice -n19 ndk-build V=1 -j4 && \ || true ; } && \ ant debug && \ test -z "$1" && cd bin && \ - { adb install -r MainActivity-debug.apk || { \ - adb uninstall `grep AppFullName ../../AndroidAppSettings.cfg | sed 's/.*=//'` && adb install -r MainActivity-debug.apk ; } ; } + adb install -r MainActivity-debug.apk | grep 'Failure' && \ + adb uninstall `grep AppFullName ../../AndroidAppSettings.cfg | sed 's/.*=//'` && adb install -r MainActivity-debug.apk diff --git a/exports-eclair.txt b/exports-eclair.txt index b8363cc50..8168a3a3d 100644 --- a/exports-eclair.txt +++ b/exports-eclair.txt @@ -1435,3 +1435,245 @@ z_errmsg zError zlibCompileFlags zlibVersion +glActiveTexture +glAlphaFunc +glAlphaFuncx +glAlphaFuncxOES +glBindBuffer +glBindFramebufferOES +glBindRenderbufferOES +glBindTexture +glBlendEquationOES +glBlendEquationSeparateOES +glBlendFunc +glBlendFuncSeparateOES +glBufferData +glBufferSubData +glCheckFramebufferStatusOES +glClear +glClearColor +glClearColorx +glClearColorxOES +glClearDepthf +glClearDepthfOES +glClearDepthx +glClearDepthxOES +glClearStencil +glClientActiveTexture +glClipPlanef +glClipPlanefOES +glClipPlanex +glClipPlanexOES +glColor4f +glColor4ub +glColor4x +glColor4xOES +glColorMask +glColorPointer +glColorPointerBounds +glCompressedTexImage2D +glCompressedTexSubImage2D +glCopyTexImage2D +glCopyTexSubImage2D +glCullFace +glCurrentPaletteMatrixOES +glDeleteBuffers +glDeleteFramebuffersOES +glDeleteRenderbuffersOES +glDeleteTextures +glDepthFunc +glDepthMask +glDepthRangef +glDepthRangefOES +glDepthRangex +glDepthRangexOES +glDisable +glDisableClientState +glDrawArrays +glDrawElements +glDrawTexfOES +glDrawTexfvOES +glDrawTexiOES +glDrawTexivOES +glDrawTexsOES +glDrawTexsvOES +glDrawTexxOES +glDrawTexxvOES +glEGLImageTargetRenderbufferStorageOES +glEGLImageTargetTexture2DOES +glEnable +glEnableClientState +glFinish +glFlush +glFogf +glFogfv +glFogx +glFogxOES +glFogxv +glFogxvOES +glFramebufferRenderbufferOES +glFramebufferTexture2DOES +glFrontFace +glFrustumf +glFrustumfOES +glFrustumx +glFrustumxOES +glGenBuffers +glGenFramebuffersOES +glGenRenderbuffersOES +glGenTextures +glGenerateMipmapOES +glGetBooleanv +glGetBufferParameteriv +glGetBufferPointervOES +glGetClipPlanef +glGetClipPlanefOES +glGetClipPlanex +glGetClipPlanexOES +glGetError +glGetFixedv +glGetFixedvOES +glGetFloatv +glGetFramebufferAttachmentParameterivOES +glGetIntegerv +glGetLightfv +glGetLightxv +glGetLightxvOES +glGetMaterialfv +glGetMaterialxv +glGetMaterialxvOES +glGetPointerv +glGetRenderbufferParameterivOES +glGetString +glGetTexEnvfv +glGetTexEnviv +glGetTexEnvxv +glGetTexEnvxvOES +glGetTexGenfvOES +glGetTexGenivOES +glGetTexGenxvOES +glGetTexParameterfv +glGetTexParameteriv +glGetTexParameterxv +glGetTexParameterxvOES +glHint +glIsBuffer +glIsEnabled +glIsFramebufferOES +glIsRenderbufferOES +glIsTexture +glLightModelf +glLightModelfv +glLightModelx +glLightModelxOES +glLightModelxv +glLightModelxvOES +glLightf +glLightfv +glLightx +glLightxOES +glLightxv +glLightxvOES +glLineWidth +glLineWidthx +glLineWidthxOES +glLoadIdentity +glLoadMatrixf +glLoadMatrixx +glLoadMatrixxOES +glLoadPaletteFromModelViewMatrixOES +glLogicOp +glMapBufferOES +glMaterialf +glMaterialfv +glMaterialx +glMaterialxOES +glMaterialxv +glMaterialxvOES +glMatrixIndexPointerOES +glMatrixIndexPointerOESBounds +glMatrixMode +glMultMatrixf +glMultMatrixx +glMultMatrixxOES +glMultiTexCoord4f +glMultiTexCoord4x +glMultiTexCoord4xOES +glNormal3f +glNormal3x +glNormal3xOES +glNormalPointer +glNormalPointerBounds +glOrthof +glOrthofOES +glOrthox +glOrthoxOES +glPixelStorei +glPointParameterf +glPointParameterfv +glPointParameterx +glPointParameterxOES +glPointParameterxv +glPointParameterxvOES +glPointSize +glPointSizePointerOES +glPointSizePointerOESBounds +glPointSizex +glPointSizexOES +glPolygonOffset +glPolygonOffsetx +glPolygonOffsetxOES +glPopMatrix +glPushMatrix +glQueryMatrixxOES +glReadPixels +glRenderbufferStorageOES +glRotatef +glRotatex +glRotatexOES +glSampleCoverage +glSampleCoveragex +glSampleCoveragexOES +glScalef +glScalex +glScalexOES +glScissor +glShadeModel +glStencilFunc +glStencilMask +glStencilOp +glTexCoordPointer +glTexCoordPointerBounds +glTexEnvf +glTexEnvfv +glTexEnvi +glTexEnviv +glTexEnvx +glTexEnvxOES +glTexEnvxv +glTexEnvxvOES +glTexGenfOES +glTexGenfvOES +glTexGeniOES +glTexGenivOES +glTexGenxOES +glTexGenxvOES +glTexImage2D +glTexParameterf +glTexParameterfv +glTexParameteri +glTexParameteriv +glTexParameterx +glTexParameterxOES +glTexParameterxv +glTexParameterxvOES +glTexSubImage2D +glTranslatef +glTranslatex +glTranslatexOES +glUnmapBufferOES +glVertexPointer +glVertexPointerBounds +glViewport +glWeightPointerOES +glWeightPointerOESBounds diff --git a/project/jni/application/Android.mk b/project/jni/application/Android.mk index ba665fd06..4df38ccab 100644 --- a/project/jni/application/Android.mk +++ b/project/jni/application/Android.mk @@ -39,7 +39,7 @@ LOCAL_SHARED_LIBRARIES := sdl-$(SDL_VERSION) $(filter-out $(APP_AVAILABLE_STATIC LOCAL_STATIC_LIBRARIES := $(filter $(APP_AVAILABLE_STATIC_LIBS), $(COMPILED_LIBRARIES)) -LOCAL_STATIC_LIBRARIES += stlport +LOCAL_STATIC_LIBRARIES += gnustl_static LOCAL_LDLIBS := -lGLESv1_CM -ldl -llog -lz diff --git a/project/jni/application/kobodeluxe/AndroidAppSettings.cfg b/project/jni/application/kobodeluxe/AndroidAppSettings.cfg new file mode 100644 index 000000000..bb095d726 --- /dev/null +++ b/project/jni/application/kobodeluxe/AndroidAppSettings.cfg @@ -0,0 +1,44 @@ +# The application settings for Android libSDL port +AppSettingVersion=17 +LibSdlVersion=1.2 +AppName="KoboDeluxe" +AppFullName=net.olofson.kobodl +ScreenOrientation=h +InhibitSuspend=y +AppDataDownloadUrl="!Game data1|kobodl-data1.zip^!Game data2|kobodl-data2.zip" +VideoDepthBpp=16 +NeedDepthBuffer=n +NeedStencilBuffer=n +NeedGles2=n +SwVideoMode=y +SdlVideoResize=y +SdlVideoResizeKeepAspect=n +CompatibilityHacks=n +AppUsesMouse=y +AppNeedsTwoButtonMouse=y +ShowMouseCursor=n +ForceRelativeMouseMode=n +AppNeedsArrowKeys=n +AppNeedsTextInput=n +AppUsesJoystick=n +AppHandlesJoystickSensitivity=y +AppUsesMultitouch=n +NonBlockingSwapBuffers=n +RedefinedKeys="SPACE RETURN NO_REMAP NO_REMAP SPACE ESCAPE SPACE" +AppTouchscreenKeyboardKeysAmount=2 +AppTouchscreenKeyboardKeysAmountAutoFire=0 +RedefinedKeysScreenKb="RETURN DOWN" +StartupMenuButtonTimeout=3000 +HiddenMenuOptions='OptionalDownloadConfig MouseConfigMainMenu' +FirstStartMenuOptions='' +MultiABI=n +AppVersionCode=05101 +AppVersionName="0.5.1.01" +ResetSdlConfigForThisVersion=n +CompiledLibraries="jpeg png sdl_image" +CustomBuildScript=y +AppCflags='' +AppLdflags='' +AppSubdirsBuild='' +AppCmdline='' +ReadmeText='^You may press "Home" now - the data will be downloaded in background' diff --git a/project/jni/application/kobodeluxe/AndroidBuild.sh b/project/jni/application/kobodeluxe/AndroidBuild.sh new file mode 100755 index 000000000..e18efaf79 --- /dev/null +++ b/project/jni/application/kobodeluxe/AndroidBuild.sh @@ -0,0 +1,18 @@ +#!/bin/sh + + +LOCAL_PATH=`dirname $0` +LOCAL_PATH=`cd $LOCAL_PATH && pwd` + +ln -sf libsdl-1.2.so $LOCAL_PATH/../../../obj/local/armeabi/libSDL.so +ln -sf libsdl_image.so $LOCAL_PATH/../../../obj/local/armeabi/libSDL_image.so + +if [ \! -f KoboDeluxe-0.5.1/configure ] ; then + sh -c "cd KoboDeluxe-0.5.1 && ./autogen.sh" +fi + +if [ \! -f KoboDeluxe-0.5.1/Makefile ] ; then + ../setEnvironment.sh sh -c "cd KoboDeluxe-0.5.1 && env LIBS='-lsdl-1.2 -lsdl_image -lgnustl_static' ./configure --host=arm-linux-androideabi --disable-opengl --without-x" +fi + +make -C KoboDeluxe-0.5.1 && mv -f KoboDeluxe-0.5.1/kobodl libapplication.so diff --git a/project/jni/application/kobodeluxe/AndroidData/kobodl-data1.zip b/project/jni/application/kobodeluxe/AndroidData/kobodl-data1.zip new file mode 100644 index 000000000..27ec3d028 Binary files /dev/null and b/project/jni/application/kobodeluxe/AndroidData/kobodl-data1.zip differ diff --git a/project/jni/application/kobodeluxe/AndroidData/kobodl-data2.zip b/project/jni/application/kobodeluxe/AndroidData/kobodl-data2.zip new file mode 100644 index 000000000..93d196071 Binary files /dev/null and b/project/jni/application/kobodeluxe/AndroidData/kobodl-data2.zip differ diff --git a/project/jni/application/kobodeluxe/ReadMe.txt b/project/jni/application/kobodeluxe/ReadMe.txt new file mode 100644 index 000000000..42d1122dc --- /dev/null +++ b/project/jni/application/kobodeluxe/ReadMe.txt @@ -0,0 +1,2 @@ +Source code +http://olofson.net/kobodl/download/KoboDeluxe-0.5.1.tar.bz2 \ No newline at end of file diff --git a/project/jni/application/kobodeluxe/icon.png b/project/jni/application/kobodeluxe/icon.png new file mode 100644 index 000000000..02a0751be Binary files /dev/null and b/project/jni/application/kobodeluxe/icon.png differ diff --git a/project/jni/application/kobodeluxe/kobodeluxe-diff.patch b/project/jni/application/kobodeluxe/kobodeluxe-diff.patch new file mode 100644 index 000000000..ac9397bde --- /dev/null +++ b/project/jni/application/kobodeluxe/kobodeluxe-diff.patch @@ -0,0 +1,34 @@ +diff -ru orig/KoboDeluxe-0.5.1/config.sub KoboDeluxe-0.5.1/config.sub +--- orig/KoboDeluxe-0.5.1/config.sub 2003-05-20 21:42:02.000000000 -0400 ++++ KoboDeluxe-0.5.1/config.sub 2011-11-26 13:20:37.000000000 -0500 +@@ -1122,7 +1122,7 @@ + | -hiux* | -386bsd* | -netbsd* | -openbsd* | -freebsd* | -riscix* \ + | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ + | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ +- | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ ++ | -udi* | -eabi* | -androideabi* | -lites* | -ieee* | -go32* | -aux* \ + | -chorusos* | -chorusrdb* \ + | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ + | -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \ + +diff -ru orig/KoboDeluxe-0.5.1/sound/a_midicon.c KoboDeluxe-0.5.1/sound/a_midicon.c +--- orig/KoboDeluxe-0.5.1/sound/a_midicon.c 2003-06-08 14:30:58.000000000 -0400 ++++ KoboDeluxe-0.5.1/sound/a_midicon.c 2011-11-27 07:10:17.000000000 -0500 +@@ -129,7 +129,7 @@ + * Returns the new last key (-1 if none), + * or -2 if there's no change. + */ +-static inline int __release(unsigned ch, unsigned key) ++static inline int __release2(unsigned ch, unsigned key) + { + if(m[ch].prev[key] != -1) + m[ch].next[m[ch].prev[key]] = m[ch].next[key]; +@@ -157,7 +157,7 @@ + + static void midicon_note_off(unsigned ch, unsigned pitch, unsigned vel) + { +- __release(ch, pitch); ++ __release2(ch, pitch); + (void)ce_stop(channeltab + MIDI_MAP_CH(ch), 0, + (int)pitch, (int)explut[vel]); + } diff --git a/project/jni/application/src b/project/jni/application/src index 550b7b622..a6b8725b1 120000 --- a/project/jni/application/src +++ b/project/jni/application/src @@ -1 +1 @@ -openttd \ No newline at end of file +kobodeluxe \ No newline at end of file diff --git a/readme.txt b/readme.txt index 094a7dce4..396ed46c6 100644 --- a/readme.txt +++ b/readme.txt @@ -321,6 +321,17 @@ that means you're allocating huge data buffer in heap (that may be C static or g run checkStaticDataSize.sh to see the size of all static symbols inside your application, heap memory limit on most phones is 24 Mb. +If the error string is like this: + +I/dalvikvm(18105): Unable to dlopen(/data/data/net.olofson.kobodl/lib/libapplication.so): Cannot load library: link_image[1995]: failed to link libapplication.so + +that means your application contains undefined symbols, absent in the system libraries, +you may check for all missing symbols by running script checkMissing.sh . +That typically happens because of linking to the dynamic libstdc++ which is not included into the .apk file - +specify "-lgnustl_static" in the linker flags to fix that. + + + License information ===================