diff options
| -rw-r--r-- | navit/Makefile.am | 2 | ||||
| -rw-r--r-- | navit/android.c | 7 | ||||
| -rw-r--r-- | navit/graphics.c | 2 | ||||
| -rw-r--r-- | navit/main.c | 20 |
4 files changed, 17 insertions, 14 deletions
diff --git a/navit/Makefile.am b/navit/Makefile.am index f6a1ec6ca..c19cd8085 100644 --- a/navit/Makefile.am +++ b/navit/Makefile.am @@ -55,7 +55,7 @@ apk: all-am android/build.xml mkdir -p android/libs/armeabi cp .libs/*.so */*/.libs/*.so android/libs/armeabi for i in $(shell cd xpm && echo *.xpm); do convert xpm/$$i android/res/drawable/$${i%.xpm}.png; done - cp xpm/*.png android/res/drawable + for i in $(shell cd xpm && echo *.png); do cp xpm/$$i android/res/drawable/$$( echo $$i | tr "[A-Z]" "[a-z]") ; done mkdir -p android/res/raw for i in $(shell cd ../po && echo *.mo); do cp ../po/$$i android/res/raw/$$( echo $$i | tr "[A-Z]" "[a-z]") ; done cd android && ant debug diff --git a/navit/android.c b/navit/android.c index 9e94f5114..87a0132f5 100644 --- a/navit/android.c +++ b/navit/android.c @@ -54,7 +54,6 @@ Java_org_navitproject_navit_Navit_NavitMain( JNIEnv* env, jobject thiz, jobject android_activity=activity; (*jnienv)->NewGlobalRef(jnienv, activity); langstr=(*env)->GetStringUTFChars(env, lang, NULL); - setenv("LANG",langstr,1); dbg(0,"enter env=%p thiz=%p activity=%p lang=%s\n",env,thiz,activity,langstr); (*env)->ReleaseStringUTFChars(env, lang, langstr); main_real(1, strings); @@ -71,7 +70,7 @@ Java_org_navitproject_navit_NavitGraphics_SizeChangedCallback( JNIEnv* env, jobj JNIEXPORT void JNICALL Java_org_navitproject_navit_NavitGraphics_ButtonCallback( JNIEnv* env, jobject thiz, int id, int pressed, int button, int x, int y) { - dbg(0,"enter %p %d %d\n",(struct callback *)id,pressed,button); + dbg(1,"enter %p %d %d\n",(struct callback *)id,pressed,button); if (id) callback_call_4((struct callback *)id,pressed,button,x,y); } @@ -79,7 +78,7 @@ Java_org_navitproject_navit_NavitGraphics_ButtonCallback( JNIEnv* env, jobject t JNIEXPORT void JNICALL Java_org_navitproject_navit_NavitGraphics_MotionCallback( JNIEnv* env, jobject thiz, int id, int x, int y) { - dbg(0,"enter %p %d %d\n",(struct callback *)id,x,y); + dbg(1,"enter %p %d %d\n",(struct callback *)id,x,y); if (id) callback_call_2((struct callback *)id,x,y); } @@ -111,7 +110,7 @@ Java_org_navitproject_navit_NavitWatch_poll( JNIEnv* env, jobject thiz, int fd, { struct pollfd pfd; pfd.fd=fd; - dbg(0,"%p poll called for %d %d\n",env, fd, cond); + dbg(1,"%p poll called for %d %d\n",env, fd, cond); switch ((enum event_watch_cond)cond) { case event_watch_cond_read: pfd.events=POLLIN; diff --git a/navit/graphics.c b/navit/graphics.c index 25d027420..6f4ae1ced 100644 --- a/navit/graphics.c +++ b/navit/graphics.c @@ -1404,7 +1404,7 @@ get_font(struct graphics *gra, int size) char * graphics_icon_path(char *icon) { - dbg(0,"enter %s\n",icon); + dbg(1,"enter %s\n",icon); if (icon[0] == '/') return g_strdup(icon); else diff --git a/navit/main.c b/navit/main.c index 369d013e4..7a260816f 100644 --- a/navit/main.c +++ b/navit/main.c @@ -180,14 +180,14 @@ setenv(char *var, char *val, int overwrite) * '::' replaced with NAVIT_PREFIX and LIBDIR * '~' replaced with HOME */ -static char *environment_vars[][4]={ - {"NAVIT_LIBDIR", ":", "::/navit", ":\\lib"}, - {"NAVIT_SHAREDIR", ":", ":/share/navit", ":"}, - {"NAVIT_LOCALEDIR", ":/../locale",":/share/locale",":\\locale"}, - {"NAVIT_USER_DATADIR",":", "~/.navit", ":\\data"}, - {"NAVIT_LOGFILE", NULL, NULL, ":\\navit.log"}, - {"NAVIT_LIBPREFIX", "*/.libs/", NULL, NULL}, - {NULL, NULL, NULL, NULL}, +static char *environment_vars[][5]={ + {"NAVIT_LIBDIR", ":", "::/navit", ":\\lib", ":/lib"}, + {"NAVIT_SHAREDIR", ":", ":/share/navit", ":", ":"}, + {"NAVIT_LOCALEDIR", ":/../locale",":/share/locale",":\\locale", ":/locale"}, + {"NAVIT_USER_DATADIR",":", "~/.navit", ":\\data", ":/home"}, + {"NAVIT_LOGFILE", NULL, NULL, ":\\navit.log",NULL}, + {"NAVIT_LIBPREFIX", "*/.libs/", NULL, NULL, NULL}, + {NULL, NULL, NULL, NULL, NULL}, }; static void @@ -255,7 +255,11 @@ main_init(char *program) } else setenv("NAVIT_PREFIX", PREFIX, 0); } +#ifdef HAVE_API_ANDROID + main_setup_environment(3); +#else main_setup_environment(1); +#endif } #else /* _WIN32 || _WIN32_WCE */ |
