added android makefiles
ensure data directory is created
This commit is contained in:
parent
34bd4d1bbd
commit
6bcf41c5d2
5 changed files with 53 additions and 4 deletions
1
Android.mk
Normal file
1
Android.mk
Normal file
|
|
@ -0,0 +1 @@
|
|||
include $(call all-subdir-makefiles)
|
||||
|
|
@ -54,12 +54,12 @@
|
|||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<PlatformToolset>v120_xp</PlatformToolset>
|
||||
<PlatformToolset>v140_xp</PlatformToolset>
|
||||
<UseOfMfc>false</UseOfMfc>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<PlatformToolset>v120_xp</PlatformToolset>
|
||||
<PlatformToolset>v140_xp</PlatformToolset>
|
||||
<UseOfMfc>false</UseOfMfc>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
|
|
|
|||
36
source/Android.mk
Normal file
36
source/Android.mk
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
LOCAL_PATH := $(call my-dir)
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
|
||||
include $(XASH3D_CONFIG)
|
||||
|
||||
LOCAL_MODULE := yapb
|
||||
|
||||
LOCAL_CONLYFLAGS += -std=c99
|
||||
|
||||
ifeq ($(TARGET_ARCH_ABI),armeabi-v7a-hard)
|
||||
LOCAL_MODULE_FILENAME = libyapb_hardfp
|
||||
endif
|
||||
|
||||
LOCAL_C_INCLUDES := $(LOCAL_PATH)/../include \
|
||||
$(LOCAL_PATH)/../include/engine
|
||||
|
||||
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_C_INCLUDES)
|
||||
|
||||
LOCAL_SRC_FILES := \
|
||||
basecode.cpp \
|
||||
manager.cpp \
|
||||
chatlib.cpp \
|
||||
combat.cpp \
|
||||
globals.cpp \
|
||||
interface.cpp \
|
||||
navigate.cpp \
|
||||
netmsg.cpp \
|
||||
support.cpp \
|
||||
waypoint.cpp \
|
||||
|
||||
LOCAL_CFLAGS += -O2 -DLINUX -DXASH_CSDM -D_LINUX -DPOSIX -DHAVE_STDINT_H -D__extern_always_inline=inline -D_strdup=strdup -Dstricmp=strcasecmp -Dstrcmpi=strcasecmp -fno-strict-aliasing -Wall -Werror -Wno-uninitialized -Wno-unused -Wno-switch -Wno-c++11-compat-deprecated-writable-strings
|
||||
|
||||
LOCAL_CPPFLAGS += -w -Wno-invalid-offsetof -fno-exceptions -fno-rtti
|
||||
|
||||
include $(BUILD_SHARED_LIBRARY)
|
||||
|
|
@ -3017,6 +3017,18 @@ DLL_GIVEFNPTRSTODLL GiveFnptrsToDll (enginefuncs_t *functionTable, globalvars_t
|
|||
// register our cvars
|
||||
convars.PushRegisteredConVarsToEngine ();
|
||||
|
||||
// ensure data & learned directory are created (as we can download waypoints from the net)
|
||||
const char *path = GetWaypointDir ();
|
||||
|
||||
// ensure data path exists
|
||||
CreatePath (const_cast <char *> (path));
|
||||
|
||||
char learnedPath[256];
|
||||
snprintf (learnedPath, SIZEOF_CHAR (learnedPath), "%s/learned", path);
|
||||
|
||||
// ensure data/learned path exists
|
||||
CreatePath (learnedPath);
|
||||
|
||||
#ifdef PLATFORM_ANDROID
|
||||
g_gameVersion = CSV_OLD; // temporary, until opensource client dll get BotVoice message
|
||||
|
||||
|
|
|
|||
|
|
@ -959,8 +959,8 @@ extern bool OpenConfig(const char *fileName, const char *errorIfNotExists, File
|
|||
}
|
||||
|
||||
const char *GetWaypointDir (void)
|
||||
{
|
||||
return FormatBuffer ("%s/addons/yapb/data/", GetModName ());
|
||||
{
|
||||
return FormatBuffer ("%s/addons/yapb/data/", GetModName ());
|
||||
}
|
||||
|
||||
extern void RegisterCommand(const char *command, void funcPtr (void))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue