Fixes for Android 1.6 - it still crashes on start

This commit is contained in:
pelya
2010-06-08 16:15:22 +03:00
parent c280a42120
commit 3efc812191
4 changed files with 9 additions and 2 deletions

View File

@@ -48,6 +48,7 @@ if [ "$DownloadToSdcard" = "y" ] ; then
DataPath="/sdcard/$AppShortName"
fi
AppFullNameUnderscored=`echo $AppFullName | sed 's/[.]/_/g'`
AppSharedLibrariesPath=/data/data/$AppFullName/lib
ScreenOrientation1=portrait
if [ "$ScreenOrientation" = "h" ] ; then
ScreenOrientation1=landscape
@@ -78,6 +79,9 @@ cat project/src/Globals.java | \
mv -f project/src/Globals.java.1 project/src/Globals.java
echo Patching project/jni/Android.mk
# sed "s^SDL_SHARED_LIBRARIES_PATH := .*^SDL_SHARED_LIBRARIES_PATH := $AppSharedLibrariesPath^" | \
cat project/jni/Android.mk | \
sed "s/SDL_JAVA_PACKAGE_PATH := .*/SDL_JAVA_PACKAGE_PATH := $AppFullNameUnderscored/" | \
sed "s^SDL_CURDIR_PATH := .*^SDL_CURDIR_PATH := $DataPath^" > \

View File

@@ -2,6 +2,9 @@
# The namespace in Java file, with dots replaced with underscores
SDL_JAVA_PACKAGE_PATH := de_schwardtnet_alienblaster
# Path to shared libraries - Android 1.6 cannot load them properly, thus we have to specify absolute path here
# SDL_SHARED_LIBRARIES_PATH := /data/data/de.schwardtnet.alienblaster/lib
# Path to files with application data - they should be downloaded from Internet on first app run inside
# Java sources, or unpacked from resources (TODO)
# Typically /sdcard/alienblaster

View File

@@ -33,7 +33,7 @@
#if defined(__WIN32__) || \
(defined(__MWERKS__) && !defined(__BEOS__)) || \
defined(__SYMBIAN32__) || defined(__IPHONEOS__)
defined(__SYMBIAN32__) || defined(__IPHONEOS__) || defined(ANDROID)
#ifdef __cplusplus
#define C_LINKAGE "C"

View File

@@ -17,6 +17,6 @@ LOCAL_CPP_EXTENSION := .cpp
LOCAL_SRC_FILES := sdl_main.c
LOCAL_SHARED_LIBRARIES := sdl application
LOCAL_LDLIBS := -llog
LOCAL_LDLIBS := -llog # -Wl,-rpath=$(SDL_SHARED_LIBRARIES_PATH) # -l:$(SDL_SHARED_LIBRARIES_PATH)/libsdl.so -l:$(SDL_SHARED_LIBRARIES_PATH)/libapplication.so
include $(BUILD_SHARED_LIBRARY)