diff options
author | Tiger Wang <ziwei.tiger@hotmail.co.uk> | 2013-12-24 17:20:55 +0100 |
---|---|---|
committer | Tiger Wang <ziwei.tiger@hotmail.co.uk> | 2013-12-24 17:20:55 +0100 |
commit | 9e5e4156747f308ff3bc5da4b14a1c5dd4d7fca5 (patch) | |
tree | 2fbb60615fa5f1ea1d4b6378b7cf9c7c76f718b7 /Android | |
parent | Merge pull request #468 from mc-server/colourchange (diff) | |
parent | Removed unneeded include. (diff) | |
download | cuberite-9e5e4156747f308ff3bc5da4b14a1c5dd4d7fca5.tar cuberite-9e5e4156747f308ff3bc5da4b14a1c5dd4d7fca5.tar.gz cuberite-9e5e4156747f308ff3bc5da4b14a1c5dd4d7fca5.tar.bz2 cuberite-9e5e4156747f308ff3bc5da4b14a1c5dd4d7fca5.tar.lz cuberite-9e5e4156747f308ff3bc5da4b14a1c5dd4d7fca5.tar.xz cuberite-9e5e4156747f308ff3bc5da4b14a1c5dd4d7fca5.tar.zst cuberite-9e5e4156747f308ff3bc5da4b14a1c5dd4d7fca5.zip |
Diffstat (limited to '')
-rw-r--r-- | Android/jni/Android.mk | 28 | ||||
-rw-r--r-- | Android/jni/app-android.cpp | 10 | ||||
-rw-r--r-- | Android/res/layout/list_item.xml | 7 |
3 files changed, 25 insertions, 20 deletions
diff --git a/Android/jni/Android.mk b/Android/jni/Android.mk index 23488e359..3542e588b 100644 --- a/Android/jni/Android.mk +++ b/Android/jni/Android.mk @@ -5,7 +5,7 @@ LOCAL_MODULE := mcserver -LOCAL_SRC_FILES := $(shell find ../CryptoPP ../lua-5.1.4 ../jsoncpp-src-0.5.0 ../zlib-1.2.7 ../source ../squirrel_3_0_1_stable ../tolua++-1.0.93 ../iniFile ../WebServer ../expat '(' -name '*.cpp' -o -name '*.c' ')') +LOCAL_SRC_FILES := $(shell find ../CryptoPP ../lua ../jsoncpp ../zlib ../src ../tolua++ ../iniFile ../expat ../md5 ../sqlite ../luaexpat '(' -name '*.cpp' -o -name '*.c' ')') LOCAL_SRC_FILES := $(filter-out %SquirrelFunctions.cpp %SquirrelBindings.cpp %cPlugin_Squirrel.cpp %cSquirrelCommandBinder.cpp %minigzip.c %lua.c %tolua.c %toluabind.c %LeakFinder.cpp %StackWalker.cpp %example.c,$(LOCAL_SRC_FILES)) LOCAL_SRC_FILES := $(patsubst %.cpp,../%.cpp,$(LOCAL_SRC_FILES)) LOCAL_SRC_FILES := $(patsubst %.c,../%.c,$(LOCAL_SRC_FILES)) @@ -20,23 +20,21 @@ LOCAL_CFLAGS := -DANDROID_NDK \ LOCAL_STATIC_LIBRARIES := cpufeatures -LOCAL_C_INCLUDES := ../source \ - ../source/md5 \ - ../WebServer \ - ../source/packets \ - ../source/items \ - ../source/blocks \ - ../tolua++-1.0.93/src/lib \ - ../lua-5.1.4/src \ +LOCAL_C_INCLUDES := ../src \ + ../src/packets \ + ../src/items \ + ../src/blocks \ + ../tolua++/src/lib \ + ../lua/src \ ../zlib-1.2.7 \ ../iniFile \ - ../tolua++-1.0.93/include \ - ../jsoncpp-src-0.5.0/include \ - ../jsoncpp-src-0.5.0/src/lib_json \ - ../squirrel_3_0_1_stable/include \ - ../squirrel_3_0_1_stable \ - ../squirrel_3_0_1_stable/sqrat \ + ../tolua++/include \ + ../jsoncpp/include \ + ../jsoncpp/src/lib_json \ ../expat/ \ + ../md5/ \ + ../sqlite/ \ + ../luaexpat/ \ .. \ diff --git a/Android/jni/app-android.cpp b/Android/jni/app-android.cpp index 197df29c4..386f1b90e 100644 --- a/Android/jni/app-android.cpp +++ b/Android/jni/app-android.cpp @@ -11,7 +11,7 @@ #include <assert.h> #include "OSSupport/CriticalSection.h" -#include "OSSupport/MakeDir.h" +#include "OSSupport/File.h" #include "ToJava.h" #include "Root.h" @@ -84,7 +84,7 @@ extern "C" void Java_com_mcserver_MCServerActivity_NativeOnCreate( JNIEnv* env, //__android_log_print(ANDROID_LOG_ERROR,"MCServer", "%s", "Logging from C++!"); g_CriticalSection.Unlock(); - mkdir("/sdcard/mcserver", S_IRWXU | S_IRWXG | S_IRWXO); + cFile::CreateFolder("/sdcard/mcserver"); pRoot = new cRoot(); pRoot->Start(); @@ -105,7 +105,7 @@ extern "C" void Java_com_mcserver_MCServerActivity_NativeCleanUp( JNIEnv* env, __android_log_print(ANDROID_LOG_ERROR,"MCServer", "pRoot: %p", pRoot); if( pRoot != NULL ) { - pRoot->ExecuteConsoleCommand("stop"); + pRoot->QueueExecuteConsoleCommand("stop"); } } @@ -124,7 +124,7 @@ extern "C" jint Java_com_mcserver_MCServerActivity_NativeGetWebAdminPort( JNIEnv { if( pRoot != NULL && pRoot->GetWebAdmin() != NULL ) { - return pRoot->GetWebAdmin()->GetPort(); + return atoi(pRoot->GetWebAdmin()->GetIPv4Ports().c_str()); } return 0; -}
\ No newline at end of file +} diff --git a/Android/res/layout/list_item.xml b/Android/res/layout/list_item.xml new file mode 100644 index 000000000..e77da47db --- /dev/null +++ b/Android/res/layout/list_item.xml @@ -0,0 +1,7 @@ +<?xml version="1.0" encoding="utf-8"?> +<TextView xmlns:android="http://schemas.android.com/apk/res/android" + android:layout_width="match_parent" + android:layout_height="match_parent" > + + +</TextView>
\ No newline at end of file |