Completely disable SQLite so it can be omitted (#120)
* Completely disable SQLite so it can be omitted * Remove old auto-migration code * Show error when loading sqlite3 world in Main Menu
This commit is contained in:
parent
05015fdc70
commit
8a4933f707
|
@ -98,10 +98,6 @@ ICONV_URL_HTTP = https://ftp.gnu.org/pub/gnu/libiconv/libiconv-$(ICONV_VERSION).
|
||||||
INTL_DIR = $(ANDR_ROOT)/deps/libintl
|
INTL_DIR = $(ANDR_ROOT)/deps/libintl
|
||||||
INTL_URL_GIT = https://github.com/j-jorge/libintl-lite.git
|
INTL_URL_GIT = https://github.com/j-jorge/libintl-lite.git
|
||||||
|
|
||||||
SQLITE3_VERSION = 3240000
|
|
||||||
SQLITE3_DIR = $(ANDR_ROOT)/deps/sqlite
|
|
||||||
SQLITE3_URL = https://www.sqlite.org/2018/sqlite-amalgamation-$(SQLITE3_VERSION).zip
|
|
||||||
|
|
||||||
LUAJIT_GIT_BRANCH = v2.1
|
LUAJIT_GIT_BRANCH = v2.1
|
||||||
LUAJIT_DIR = $(ANDR_ROOT)/deps/luajit
|
LUAJIT_DIR = $(ANDR_ROOT)/deps/luajit
|
||||||
LUAJIT_LIB = $(LUAJIT_DIR)src/libluajit.a
|
LUAJIT_LIB = $(LUAJIT_DIR)src/libluajit.a
|
||||||
|
@ -510,21 +506,6 @@ $(CURL_LIB): $(CURL_TIMESTAMP)
|
||||||
clean_curl :
|
clean_curl :
|
||||||
$(RM) -R ${CURL_DIR}
|
$(RM) -R ${CURL_DIR}
|
||||||
|
|
||||||
sqlite3_download :
|
|
||||||
@if [ ! -d ${SQLITE3_DIR} ] ; then \
|
|
||||||
echo "sqlite3 sources missing, downloading..."; \
|
|
||||||
mkdir -p ${ANDR_ROOT}/deps; \
|
|
||||||
cd ${ANDR_ROOT}/deps; \
|
|
||||||
rm -R sqlite; \
|
|
||||||
wget ${SQLITE3_URL}; \
|
|
||||||
unzip sqlite-amalgamation-$(SQLITE3_VERSION).zip || exit 1; \
|
|
||||||
rm sqlite-amalgamation-$(SQLITE3_VERSION).zip; \
|
|
||||||
mv sqlite-amalgamation-$(SQLITE3_VERSION) sqlite; \
|
|
||||||
fi
|
|
||||||
|
|
||||||
clean_sqlite3 :
|
|
||||||
$(RM) -rf ${SQLITE3_DIR}
|
|
||||||
|
|
||||||
$(ASSETS_TIMESTAMP) : $(IRRLICHT_LIB)
|
$(ASSETS_TIMESTAMP) : $(IRRLICHT_LIB)
|
||||||
@mkdir -p ${ANDR_ROOT}/deps; \
|
@mkdir -p ${ANDR_ROOT}/deps; \
|
||||||
for DIRNAME in {builtin,client,doc,fonts,games,po,textures}; do \
|
for DIRNAME in {builtin,client,doc,fonts,games,po,textures}; do \
|
||||||
|
@ -662,7 +643,7 @@ clean_assets :
|
||||||
|
|
||||||
apk: local.properties $(IRRLICHT_LIB) $(CURL_LIB) $(LEVELDB_LIB) $(LUAJIT_LIB) \
|
apk: local.properties $(IRRLICHT_LIB) $(CURL_LIB) $(LEVELDB_LIB) $(LUAJIT_LIB) \
|
||||||
$(OPENAL_LIB) $(VORBIS_LIB) prep_srcdir $(ANDR_ROOT)/jni/src/android_version.h \
|
$(OPENAL_LIB) $(VORBIS_LIB) prep_srcdir $(ANDR_ROOT)/jni/src/android_version.h \
|
||||||
$(ANDR_ROOT)/jni/src/android_version_githash.h sqlite3_download intl_download iconv_download assets
|
$(ANDR_ROOT)/jni/src/android_version_githash.h intl_download iconv_download assets
|
||||||
+@${ANDROID_NDK}/ndk-build \
|
+@${ANDROID_NDK}/ndk-build \
|
||||||
TARGET_LIBDIR=${TARGET_LIBDIR} \
|
TARGET_LIBDIR=${TARGET_LIBDIR} \
|
||||||
APP_PLATFORM=${APP_PLATFORM} TARGET_ABI=${TARGET_ABI} || exit 1; \
|
APP_PLATFORM=${APP_PLATFORM} TARGET_ABI=${TARGET_ABI} || exit 1; \
|
||||||
|
|
|
@ -88,7 +88,6 @@ LOCAL_C_INCLUDES := \
|
||||||
deps/curl/include \
|
deps/curl/include \
|
||||||
deps/openal-soft/include \
|
deps/openal-soft/include \
|
||||||
deps/libvorbis-android/jni/include \
|
deps/libvorbis-android/jni/include \
|
||||||
deps/sqlite/ \
|
|
||||||
deps/leveldb/include \
|
deps/leveldb/include \
|
||||||
deps/luajit/src \
|
deps/luajit/src \
|
||||||
|
|
||||||
|
@ -115,7 +114,6 @@ LOCAL_SRC_FILES := \
|
||||||
jni/src/craftdef.cpp \
|
jni/src/craftdef.cpp \
|
||||||
jni/src/database-dummy.cpp \
|
jni/src/database-dummy.cpp \
|
||||||
jni/src/database-files.cpp \
|
jni/src/database-files.cpp \
|
||||||
jni/src/database-sqlite3.cpp \
|
|
||||||
jni/src/database.cpp \
|
jni/src/database.cpp \
|
||||||
jni/src/debug.cpp \
|
jni/src/debug.cpp \
|
||||||
jni/src/defaultsettings.cpp \
|
jni/src/defaultsettings.cpp \
|
||||||
|
@ -193,7 +191,6 @@ LOCAL_SRC_FILES := \
|
||||||
jni/src/raycast.cpp \
|
jni/src/raycast.cpp \
|
||||||
jni/src/reflowscan.cpp \
|
jni/src/reflowscan.cpp \
|
||||||
jni/src/remoteplayer.cpp \
|
jni/src/remoteplayer.cpp \
|
||||||
jni/src/rollback.cpp \
|
|
||||||
jni/src/rollback_interface.cpp \
|
jni/src/rollback_interface.cpp \
|
||||||
jni/src/serialization.cpp \
|
jni/src/serialization.cpp \
|
||||||
jni/src/server.cpp \
|
jni/src/server.cpp \
|
||||||
|
@ -324,11 +321,6 @@ LOCAL_SRC_FILES += \
|
||||||
deps/libiconv/lib/iconv.c \
|
deps/libiconv/lib/iconv.c \
|
||||||
deps/libiconv/libcharset/lib/localcharset.c
|
deps/libiconv/libcharset/lib/localcharset.c
|
||||||
|
|
||||||
# SQLite3
|
|
||||||
LOCAL_CFLAGS += -fno-fast-math -funsafe-math-optimizations -ffinite-math-only -fno-rounding-math -fno-signaling-nans -fcx-limited-range
|
|
||||||
|
|
||||||
LOCAL_SRC_FILES += deps/sqlite/sqlite3.c
|
|
||||||
|
|
||||||
LOCAL_STATIC_LIBRARIES := Irrlicht LevelDB Freetype Curl LuaJIT OpenAL Vorbis android_native_app_glue $(PROFILER_LIBS)
|
LOCAL_STATIC_LIBRARIES := Irrlicht LevelDB Freetype Curl LuaJIT OpenAL Vorbis android_native_app_glue $(PROFILER_LIBS)
|
||||||
|
|
||||||
LOCAL_LDLIBS := -lEGL -lGLESv1_CM -lGLESv2 -landroid -lOpenSLES
|
LOCAL_LDLIBS := -lEGL -lGLESv1_CM -lGLESv2 -landroid -lOpenSLES
|
||||||
|
|
|
@ -68,7 +68,6 @@
|
||||||
F8E6C6051DCA3F9900F64426 /* craftdef.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F8E6C5211DCA3F9900F64426 /* craftdef.cpp */; };
|
F8E6C6051DCA3F9900F64426 /* craftdef.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F8E6C5211DCA3F9900F64426 /* craftdef.cpp */; };
|
||||||
F8E6C6061DCA3F9900F64426 /* database-dummy.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F8E6C5231DCA3F9900F64426 /* database-dummy.cpp */; };
|
F8E6C6061DCA3F9900F64426 /* database-dummy.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F8E6C5231DCA3F9900F64426 /* database-dummy.cpp */; };
|
||||||
F8E6C6071DCA3F9900F64426 /* database-leveldb.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F8E6C5251DCA3F9900F64426 /* database-leveldb.cpp */; };
|
F8E6C6071DCA3F9900F64426 /* database-leveldb.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F8E6C5251DCA3F9900F64426 /* database-leveldb.cpp */; };
|
||||||
F8E6C6091DCA3F9900F64426 /* database-sqlite3.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F8E6C5291DCA3F9900F64426 /* database-sqlite3.cpp */; };
|
|
||||||
F8E6C60A1DCA3F9900F64426 /* database.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F8E6C52B1DCA3F9900F64426 /* database.cpp */; };
|
F8E6C60A1DCA3F9900F64426 /* database.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F8E6C52B1DCA3F9900F64426 /* database.cpp */; };
|
||||||
F8E6C60B1DCA3F9900F64426 /* debug.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F8E6C52E1DCA3F9900F64426 /* debug.cpp */; };
|
F8E6C60B1DCA3F9900F64426 /* debug.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F8E6C52E1DCA3F9900F64426 /* debug.cpp */; };
|
||||||
F8E6C60C1DCA3F9900F64426 /* defaultsettings.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F8E6C5301DCA3F9900F64426 /* defaultsettings.cpp */; };
|
F8E6C60C1DCA3F9900F64426 /* defaultsettings.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F8E6C5301DCA3F9900F64426 /* defaultsettings.cpp */; };
|
||||||
|
@ -138,7 +137,6 @@
|
||||||
F8E6C64C1DCA3F9900F64426 /* profiler.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F8E6C5C11DCA3F9900F64426 /* profiler.cpp */; };
|
F8E6C64C1DCA3F9900F64426 /* profiler.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F8E6C5C11DCA3F9900F64426 /* profiler.cpp */; };
|
||||||
F8E6C64D1DCA3F9900F64426 /* quicktune.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F8E6C5C41DCA3F9900F64426 /* quicktune.cpp */; };
|
F8E6C64D1DCA3F9900F64426 /* quicktune.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F8E6C5C41DCA3F9900F64426 /* quicktune.cpp */; };
|
||||||
F8E6C64E1DCA3F9900F64426 /* rollback_interface.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F8E6C5C61DCA3F9900F64426 /* rollback_interface.cpp */; };
|
F8E6C64E1DCA3F9900F64426 /* rollback_interface.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F8E6C5C61DCA3F9900F64426 /* rollback_interface.cpp */; };
|
||||||
F8E6C64F1DCA3F9900F64426 /* rollback.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F8E6C5C81DCA3F9900F64426 /* rollback.cpp */; };
|
|
||||||
F8E6C6501DCA3F9900F64426 /* serialization.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F8E6C5CA1DCA3F9900F64426 /* serialization.cpp */; };
|
F8E6C6501DCA3F9900F64426 /* serialization.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F8E6C5CA1DCA3F9900F64426 /* serialization.cpp */; };
|
||||||
F8E6C6511DCA3F9900F64426 /* server.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F8E6C5CC1DCA3F9900F64426 /* server.cpp */; };
|
F8E6C6511DCA3F9900F64426 /* server.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F8E6C5CC1DCA3F9900F64426 /* server.cpp */; };
|
||||||
F8E6C6521DCA3F9900F64426 /* serverlist.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F8E6C5CE1DCA3F9900F64426 /* serverlist.cpp */; };
|
F8E6C6521DCA3F9900F64426 /* serverlist.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F8E6C5CE1DCA3F9900F64426 /* serverlist.cpp */; };
|
||||||
|
@ -228,7 +226,6 @@
|
||||||
F8E6C7CD1DCA431B00F64426 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F8E6C7CC1DCA431B00F64426 /* Foundation.framework */; };
|
F8E6C7CD1DCA431B00F64426 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F8E6C7CC1DCA431B00F64426 /* Foundation.framework */; };
|
||||||
F8E6C7CF1DCA432200F64426 /* CoreMotion.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F8E6C7CE1DCA432200F64426 /* CoreMotion.framework */; };
|
F8E6C7CF1DCA432200F64426 /* CoreMotion.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F8E6C7CE1DCA432200F64426 /* CoreMotion.framework */; };
|
||||||
F8E6C7D11DCA433E00F64426 /* libiconv.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = F8E6C7D01DCA433E00F64426 /* libiconv.tbd */; };
|
F8E6C7D11DCA433E00F64426 /* libiconv.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = F8E6C7D01DCA433E00F64426 /* libiconv.tbd */; };
|
||||||
F8E6C7D31DCA434900F64426 /* libsqlite3.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = F8E6C7D21DCA434900F64426 /* libsqlite3.tbd */; };
|
|
||||||
F8E6C7D51DCA476800F64426 /* libIrrlicht.a in Frameworks */ = {isa = PBXBuildFile; fileRef = F8E6C7D41DCA476800F64426 /* libIrrlicht.a */; };
|
F8E6C7D51DCA476800F64426 /* libIrrlicht.a in Frameworks */ = {isa = PBXBuildFile; fileRef = F8E6C7D41DCA476800F64426 /* libIrrlicht.a */; };
|
||||||
F8E6C7D71DCA477600F64426 /* libfreetype.a in Frameworks */ = {isa = PBXBuildFile; fileRef = F8E6C7D61DCA477600F64426 /* libfreetype.a */; };
|
F8E6C7D71DCA477600F64426 /* libfreetype.a in Frameworks */ = {isa = PBXBuildFile; fileRef = F8E6C7D61DCA477600F64426 /* libfreetype.a */; };
|
||||||
F8E6C7D91DCA478500F64426 /* libleveldb.a in Frameworks */ = {isa = PBXBuildFile; fileRef = F8E6C7D81DCA478500F64426 /* libleveldb.a */; };
|
F8E6C7D91DCA478500F64426 /* libleveldb.a in Frameworks */ = {isa = PBXBuildFile; fileRef = F8E6C7D81DCA478500F64426 /* libleveldb.a */; };
|
||||||
|
@ -356,8 +353,6 @@
|
||||||
F8E6C5241DCA3F9900F64426 /* database-dummy.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "database-dummy.h"; path = "../../../../src/database-dummy.h"; sourceTree = "<group>"; };
|
F8E6C5241DCA3F9900F64426 /* database-dummy.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "database-dummy.h"; path = "../../../../src/database-dummy.h"; sourceTree = "<group>"; };
|
||||||
F8E6C5251DCA3F9900F64426 /* database-leveldb.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = "database-leveldb.cpp"; path = "../../../../src/database-leveldb.cpp"; sourceTree = "<group>"; };
|
F8E6C5251DCA3F9900F64426 /* database-leveldb.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = "database-leveldb.cpp"; path = "../../../../src/database-leveldb.cpp"; sourceTree = "<group>"; };
|
||||||
F8E6C5261DCA3F9900F64426 /* database-leveldb.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "database-leveldb.h"; path = "../../../../src/database-leveldb.h"; sourceTree = "<group>"; };
|
F8E6C5261DCA3F9900F64426 /* database-leveldb.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "database-leveldb.h"; path = "../../../../src/database-leveldb.h"; sourceTree = "<group>"; };
|
||||||
F8E6C5291DCA3F9900F64426 /* database-sqlite3.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = "database-sqlite3.cpp"; path = "../../../../src/database-sqlite3.cpp"; sourceTree = "<group>"; };
|
|
||||||
F8E6C52A1DCA3F9900F64426 /* database-sqlite3.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "database-sqlite3.h"; path = "../../../../src/database-sqlite3.h"; sourceTree = "<group>"; };
|
|
||||||
F8E6C52B1DCA3F9900F64426 /* database.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = database.cpp; path = ../../../../src/database.cpp; sourceTree = "<group>"; };
|
F8E6C52B1DCA3F9900F64426 /* database.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = database.cpp; path = ../../../../src/database.cpp; sourceTree = "<group>"; };
|
||||||
F8E6C52C1DCA3F9900F64426 /* database.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = database.h; path = ../../../../src/database.h; sourceTree = "<group>"; };
|
F8E6C52C1DCA3F9900F64426 /* database.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = database.h; path = ../../../../src/database.h; sourceTree = "<group>"; };
|
||||||
F8E6C52D1DCA3F9900F64426 /* daynightratio.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = daynightratio.h; path = ../../../../src/daynightratio.h; sourceTree = "<group>"; };
|
F8E6C52D1DCA3F9900F64426 /* daynightratio.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = daynightratio.h; path = ../../../../src/daynightratio.h; sourceTree = "<group>"; };
|
||||||
|
@ -515,7 +510,6 @@
|
||||||
F8E6C5C51DCA3F9900F64426 /* quicktune.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = quicktune.h; path = ../../../../src/quicktune.h; sourceTree = "<group>"; };
|
F8E6C5C51DCA3F9900F64426 /* quicktune.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = quicktune.h; path = ../../../../src/quicktune.h; sourceTree = "<group>"; };
|
||||||
F8E6C5C61DCA3F9900F64426 /* rollback_interface.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = rollback_interface.cpp; path = ../../../../src/rollback_interface.cpp; sourceTree = "<group>"; };
|
F8E6C5C61DCA3F9900F64426 /* rollback_interface.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = rollback_interface.cpp; path = ../../../../src/rollback_interface.cpp; sourceTree = "<group>"; };
|
||||||
F8E6C5C71DCA3F9900F64426 /* rollback_interface.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = rollback_interface.h; path = ../../../../src/rollback_interface.h; sourceTree = "<group>"; };
|
F8E6C5C71DCA3F9900F64426 /* rollback_interface.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = rollback_interface.h; path = ../../../../src/rollback_interface.h; sourceTree = "<group>"; };
|
||||||
F8E6C5C81DCA3F9900F64426 /* rollback.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = rollback.cpp; path = ../../../../src/rollback.cpp; sourceTree = "<group>"; };
|
|
||||||
F8E6C5C91DCA3F9900F64426 /* rollback.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = rollback.h; path = ../../../../src/rollback.h; sourceTree = "<group>"; };
|
F8E6C5C91DCA3F9900F64426 /* rollback.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = rollback.h; path = ../../../../src/rollback.h; sourceTree = "<group>"; };
|
||||||
F8E6C5CA1DCA3F9900F64426 /* serialization.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = serialization.cpp; path = ../../../../src/serialization.cpp; sourceTree = "<group>"; };
|
F8E6C5CA1DCA3F9900F64426 /* serialization.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = serialization.cpp; path = ../../../../src/serialization.cpp; sourceTree = "<group>"; };
|
||||||
F8E6C5CB1DCA3F9900F64426 /* serialization.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = serialization.h; path = ../../../../src/serialization.h; sourceTree = "<group>"; };
|
F8E6C5CB1DCA3F9900F64426 /* serialization.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = serialization.h; path = ../../../../src/serialization.h; sourceTree = "<group>"; };
|
||||||
|
@ -702,7 +696,6 @@
|
||||||
F8E6C7CC1DCA431B00F64426 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
|
F8E6C7CC1DCA431B00F64426 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
|
||||||
F8E6C7CE1DCA432200F64426 /* CoreMotion.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreMotion.framework; path = System/Library/Frameworks/CoreMotion.framework; sourceTree = SDKROOT; };
|
F8E6C7CE1DCA432200F64426 /* CoreMotion.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreMotion.framework; path = System/Library/Frameworks/CoreMotion.framework; sourceTree = SDKROOT; };
|
||||||
F8E6C7D01DCA433E00F64426 /* libiconv.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libiconv.tbd; path = usr/lib/libiconv.tbd; sourceTree = SDKROOT; };
|
F8E6C7D01DCA433E00F64426 /* libiconv.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libiconv.tbd; path = usr/lib/libiconv.tbd; sourceTree = SDKROOT; };
|
||||||
F8E6C7D21DCA434900F64426 /* libsqlite3.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libsqlite3.tbd; path = usr/lib/libsqlite3.tbd; sourceTree = SDKROOT; };
|
|
||||||
F8E6C7D41DCA476800F64426 /* libIrrlicht.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libIrrlicht.a; path = ../deps/irrlicht/libIrrlicht.a; sourceTree = "<group>"; };
|
F8E6C7D41DCA476800F64426 /* libIrrlicht.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libIrrlicht.a; path = ../deps/irrlicht/libIrrlicht.a; sourceTree = "<group>"; };
|
||||||
F8E6C7D61DCA477600F64426 /* libfreetype.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libfreetype.a; path = ../deps/freetype/lib/libfreetype.a; sourceTree = "<group>"; };
|
F8E6C7D61DCA477600F64426 /* libfreetype.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libfreetype.a; path = ../deps/freetype/lib/libfreetype.a; sourceTree = "<group>"; };
|
||||||
F8E6C7D81DCA478500F64426 /* libleveldb.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libleveldb.a; path = ../deps/leveldb/lib/libleveldb.a; sourceTree = "<group>"; };
|
F8E6C7D81DCA478500F64426 /* libleveldb.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libleveldb.a; path = ../deps/leveldb/lib/libleveldb.a; sourceTree = "<group>"; };
|
||||||
|
@ -725,7 +718,6 @@
|
||||||
F8E6C7CD1DCA431B00F64426 /* Foundation.framework in Frameworks */,
|
F8E6C7CD1DCA431B00F64426 /* Foundation.framework in Frameworks */,
|
||||||
F8E6C7CF1DCA432200F64426 /* CoreMotion.framework in Frameworks */,
|
F8E6C7CF1DCA432200F64426 /* CoreMotion.framework in Frameworks */,
|
||||||
F8E6C7D11DCA433E00F64426 /* libiconv.tbd in Frameworks */,
|
F8E6C7D11DCA433E00F64426 /* libiconv.tbd in Frameworks */,
|
||||||
F8E6C7D31DCA434900F64426 /* libsqlite3.tbd in Frameworks */,
|
|
||||||
F8E6C7D51DCA476800F64426 /* libIrrlicht.a in Frameworks */,
|
F8E6C7D51DCA476800F64426 /* libIrrlicht.a in Frameworks */,
|
||||||
F8E6C7D71DCA477600F64426 /* libfreetype.a in Frameworks */,
|
F8E6C7D71DCA477600F64426 /* libfreetype.a in Frameworks */,
|
||||||
F8E6C7D91DCA478500F64426 /* libleveldb.a in Frameworks */,
|
F8E6C7D91DCA478500F64426 /* libleveldb.a in Frameworks */,
|
||||||
|
@ -873,8 +865,6 @@
|
||||||
4B35A9B21EEDD16C00274961 /* database-files.h */,
|
4B35A9B21EEDD16C00274961 /* database-files.h */,
|
||||||
F8E6C5251DCA3F9900F64426 /* database-leveldb.cpp */,
|
F8E6C5251DCA3F9900F64426 /* database-leveldb.cpp */,
|
||||||
F8E6C5261DCA3F9900F64426 /* database-leveldb.h */,
|
F8E6C5261DCA3F9900F64426 /* database-leveldb.h */,
|
||||||
F8E6C5291DCA3F9900F64426 /* database-sqlite3.cpp */,
|
|
||||||
F8E6C52A1DCA3F9900F64426 /* database-sqlite3.h */,
|
|
||||||
F8E6C52B1DCA3F9900F64426 /* database.cpp */,
|
F8E6C52B1DCA3F9900F64426 /* database.cpp */,
|
||||||
F8E6C52C1DCA3F9900F64426 /* database.h */,
|
F8E6C52C1DCA3F9900F64426 /* database.h */,
|
||||||
F8E6C52D1DCA3F9900F64426 /* daynightratio.h */,
|
F8E6C52D1DCA3F9900F64426 /* daynightratio.h */,
|
||||||
|
@ -1051,7 +1041,6 @@
|
||||||
F8E6C5C61DCA3F9900F64426 /* rollback_interface.cpp */,
|
F8E6C5C61DCA3F9900F64426 /* rollback_interface.cpp */,
|
||||||
F8E6C5C71DCA3F9900F64426 /* rollback_interface.h */,
|
F8E6C5C71DCA3F9900F64426 /* rollback_interface.h */,
|
||||||
F8E6C6E41DCA415800F64426 /* script */,
|
F8E6C6E41DCA415800F64426 /* script */,
|
||||||
F8E6C5C81DCA3F9900F64426 /* rollback.cpp */,
|
|
||||||
F8E6C5C91DCA3F9900F64426 /* rollback.h */,
|
F8E6C5C91DCA3F9900F64426 /* rollback.h */,
|
||||||
F8E6C5CA1DCA3F9900F64426 /* serialization.cpp */,
|
F8E6C5CA1DCA3F9900F64426 /* serialization.cpp */,
|
||||||
F8E6C5CB1DCA3F9900F64426 /* serialization.h */,
|
F8E6C5CB1DCA3F9900F64426 /* serialization.h */,
|
||||||
|
@ -1351,7 +1340,6 @@
|
||||||
F8E6C7D81DCA478500F64426 /* libleveldb.a */,
|
F8E6C7D81DCA478500F64426 /* libleveldb.a */,
|
||||||
F8E6C7D61DCA477600F64426 /* libfreetype.a */,
|
F8E6C7D61DCA477600F64426 /* libfreetype.a */,
|
||||||
F8E6C7D41DCA476800F64426 /* libIrrlicht.a */,
|
F8E6C7D41DCA476800F64426 /* libIrrlicht.a */,
|
||||||
F8E6C7D21DCA434900F64426 /* libsqlite3.tbd */,
|
|
||||||
F8E6C7D01DCA433E00F64426 /* libiconv.tbd */,
|
F8E6C7D01DCA433E00F64426 /* libiconv.tbd */,
|
||||||
F8E6C7CE1DCA432200F64426 /* CoreMotion.framework */,
|
F8E6C7CE1DCA432200F64426 /* CoreMotion.framework */,
|
||||||
F8E6C7CC1DCA431B00F64426 /* Foundation.framework */,
|
F8E6C7CC1DCA431B00F64426 /* Foundation.framework */,
|
||||||
|
@ -1680,7 +1668,6 @@
|
||||||
F8E6C6051DCA3F9900F64426 /* craftdef.cpp in Sources */,
|
F8E6C6051DCA3F9900F64426 /* craftdef.cpp in Sources */,
|
||||||
4B0F49CF1E424FDF0003953D /* enriched_string.cpp in Sources */,
|
4B0F49CF1E424FDF0003953D /* enriched_string.cpp in Sources */,
|
||||||
4B0F49D31E42501D0003953D /* static_text.cpp in Sources */,
|
4B0F49D31E42501D0003953D /* static_text.cpp in Sources */,
|
||||||
F8E6C6091DCA3F9900F64426 /* database-sqlite3.cpp in Sources */,
|
|
||||||
F8E6C6411DCA3F9900F64426 /* nodedef.cpp in Sources */,
|
F8E6C6411DCA3F9900F64426 /* nodedef.cpp in Sources */,
|
||||||
F8E6C6F81DCA41DB00F64426 /* c_internal.cpp in Sources */,
|
F8E6C6F81DCA41DB00F64426 /* c_internal.cpp in Sources */,
|
||||||
F8E6C60E1DCA3F9900F64426 /* dungeongen.cpp in Sources */,
|
F8E6C60E1DCA3F9900F64426 /* dungeongen.cpp in Sources */,
|
||||||
|
@ -1695,7 +1682,6 @@
|
||||||
F8E6C65F1DCA3F9900F64426 /* treegen.cpp in Sources */,
|
F8E6C65F1DCA3F9900F64426 /* treegen.cpp in Sources */,
|
||||||
F8E6C5F61DCA3F9900F64426 /* chat.cpp in Sources */,
|
F8E6C5F61DCA3F9900F64426 /* chat.cpp in Sources */,
|
||||||
F8E6C60B1DCA3F9900F64426 /* debug.cpp in Sources */,
|
F8E6C60B1DCA3F9900F64426 /* debug.cpp in Sources */,
|
||||||
F8E6C64F1DCA3F9900F64426 /* rollback.cpp in Sources */,
|
|
||||||
4B35A9B61EEDD18400274961 /* face_position_cache.cpp in Sources */,
|
4B35A9B61EEDD18400274961 /* face_position_cache.cpp in Sources */,
|
||||||
F8E6C6251DCA3F9900F64426 /* inventorymanager.cpp in Sources */,
|
F8E6C6251DCA3F9900F64426 /* inventorymanager.cpp in Sources */,
|
||||||
F8E6C60C1DCA3F9900F64426 /* defaultsettings.cpp in Sources */,
|
F8E6C60C1DCA3F9900F64426 /* defaultsettings.cpp in Sources */,
|
||||||
|
|
|
@ -232,7 +232,7 @@ if(ENABLE_REDIS)
|
||||||
endif(ENABLE_REDIS)
|
endif(ENABLE_REDIS)
|
||||||
|
|
||||||
|
|
||||||
find_package(SQLite3 REQUIRED)
|
#find_package(SQLite3 REQUIRED)
|
||||||
|
|
||||||
OPTION(ENABLE_SPATIAL "Enable SpatialIndex AreaStore backend" TRUE)
|
OPTION(ENABLE_SPATIAL "Enable SpatialIndex AreaStore backend" TRUE)
|
||||||
set(USE_SPATIAL FALSE)
|
set(USE_SPATIAL FALSE)
|
||||||
|
@ -381,7 +381,6 @@ set(common_SRCS
|
||||||
database-leveldb.cpp
|
database-leveldb.cpp
|
||||||
database-postgresql.cpp
|
database-postgresql.cpp
|
||||||
database-redis.cpp
|
database-redis.cpp
|
||||||
database-sqlite3.cpp
|
|
||||||
database.cpp
|
database.cpp
|
||||||
debug.cpp
|
debug.cpp
|
||||||
defaultsettings.cpp
|
defaultsettings.cpp
|
||||||
|
@ -434,7 +433,6 @@ set(common_SRCS
|
||||||
reflowscan.cpp
|
reflowscan.cpp
|
||||||
remoteplayer.cpp
|
remoteplayer.cpp
|
||||||
raycast.cpp
|
raycast.cpp
|
||||||
rollback.cpp
|
|
||||||
rollback_interface.cpp
|
rollback_interface.cpp
|
||||||
serialization.cpp
|
serialization.cpp
|
||||||
server.cpp
|
server.cpp
|
||||||
|
@ -551,7 +549,6 @@ include_directories(
|
||||||
${PNG_INCLUDE_DIR}
|
${PNG_INCLUDE_DIR}
|
||||||
${GETTEXT_INCLUDE_DIR}
|
${GETTEXT_INCLUDE_DIR}
|
||||||
${SOUND_INCLUDE_DIRS}
|
${SOUND_INCLUDE_DIRS}
|
||||||
${SQLITE3_INCLUDE_DIR}
|
|
||||||
${LUA_INCLUDE_DIR}
|
${LUA_INCLUDE_DIR}
|
||||||
${GMP_INCLUDE_DIR}
|
${GMP_INCLUDE_DIR}
|
||||||
${JSON_INCLUDE_DIR}
|
${JSON_INCLUDE_DIR}
|
||||||
|
@ -586,7 +583,6 @@ if(BUILD_CLIENT)
|
||||||
${X11_LIBRARIES}
|
${X11_LIBRARIES}
|
||||||
${GETTEXT_LIBRARY}
|
${GETTEXT_LIBRARY}
|
||||||
${SOUND_LIBRARIES}
|
${SOUND_LIBRARIES}
|
||||||
${SQLITE3_LIBRARY}
|
|
||||||
${LUA_LIBRARY}
|
${LUA_LIBRARY}
|
||||||
${GMP_LIBRARY}
|
${GMP_LIBRARY}
|
||||||
${JSON_LIBRARY}
|
${JSON_LIBRARY}
|
||||||
|
@ -647,7 +643,6 @@ if(BUILD_SERVER)
|
||||||
target_link_libraries(
|
target_link_libraries(
|
||||||
${PROJECT_NAME}server
|
${PROJECT_NAME}server
|
||||||
${ZLIB_LIBRARIES}
|
${ZLIB_LIBRARIES}
|
||||||
${SQLITE3_LIBRARY}
|
|
||||||
${JSON_LIBRARY}
|
${JSON_LIBRARY}
|
||||||
${GETTEXT_LIBRARY}
|
${GETTEXT_LIBRARY}
|
||||||
${LUA_LIBRARY}
|
${LUA_LIBRARY}
|
||||||
|
@ -803,9 +798,6 @@ if(WIN32)
|
||||||
if(FREETYPE_DLL)
|
if(FREETYPE_DLL)
|
||||||
install(FILES ${FREETYPE_DLL} DESTINATION ${BINDIR})
|
install(FILES ${FREETYPE_DLL} DESTINATION ${BINDIR})
|
||||||
endif()
|
endif()
|
||||||
if(SQLITE3_DLL)
|
|
||||||
install(FILES ${SQLITE3_DLL} DESTINATION ${BINDIR})
|
|
||||||
endif()
|
|
||||||
if(LEVELDB_DLL)
|
if(LEVELDB_DLL)
|
||||||
install(FILES ${LEVELDB_DLL} DESTINATION ${BINDIR})
|
install(FILES ${LEVELDB_DLL} DESTINATION ${BINDIR})
|
||||||
endif()
|
endif()
|
||||||
|
|
|
@ -42,7 +42,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
#include "clientmedia.h"
|
#include "clientmedia.h"
|
||||||
#include "version.h"
|
#include "version.h"
|
||||||
#include "drawscene.h"
|
#include "drawscene.h"
|
||||||
#include "database-sqlite3.h"
|
#include "database.h"
|
||||||
#include "serialization.h"
|
#include "serialization.h"
|
||||||
#include "guiscalingfilter.h"
|
#include "guiscalingfilter.h"
|
||||||
#include "script/scripting_client.h"
|
#include "script/scripting_client.h"
|
||||||
|
@ -774,7 +774,7 @@ void Client::initLocalMapSaving(const Address &address,
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const std::string world_path = porting::path_user
|
/*const std::string world_path = porting::path_user
|
||||||
+ DIR_DELIM + "worlds"
|
+ DIR_DELIM + "worlds"
|
||||||
+ DIR_DELIM + "server_"
|
+ DIR_DELIM + "server_"
|
||||||
+ hostname + "_" + std::to_string(address.getPort());
|
+ hostname + "_" + std::to_string(address.getPort());
|
||||||
|
@ -783,7 +783,7 @@ void Client::initLocalMapSaving(const Address &address,
|
||||||
|
|
||||||
m_localdb = new MapDatabaseSQLite3(world_path);
|
m_localdb = new MapDatabaseSQLite3(world_path);
|
||||||
m_localdb->beginSave();
|
m_localdb->beginSave();
|
||||||
actionstream << "Local map saving started, map will be saved at '" << world_path << "'" << std::endl;
|
actionstream << "Local map saving started, map will be saved at '" << world_path << "'" << std::endl;*/
|
||||||
}
|
}
|
||||||
|
|
||||||
void Client::ReceiveAll()
|
void Client::ReceiveAll()
|
||||||
|
|
59
src/game.cpp
59
src/game.cpp
|
@ -1223,7 +1223,6 @@ protected:
|
||||||
bool initSound();
|
bool initSound();
|
||||||
bool createSingleplayerServer(const std::string &map_dir,
|
bool createSingleplayerServer(const std::string &map_dir,
|
||||||
const SubgameSpec &gamespec, u16 port, std::string *address);
|
const SubgameSpec &gamespec, u16 port, std::string *address);
|
||||||
bool autoMigrateSingleplayerWorld(const std::string map_dir);
|
|
||||||
|
|
||||||
// Client creation
|
// Client creation
|
||||||
bool createClient(const std::string &playername,
|
bool createClient(const std::string &playername,
|
||||||
|
@ -1862,8 +1861,6 @@ bool Game::createSingleplayerServer(const std::string &map_dir,
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
autoMigrateSingleplayerWorld(map_dir);
|
|
||||||
|
|
||||||
server = new Server(map_dir, gamespec, simple_singleplayer_mode,
|
server = new Server(map_dir, gamespec, simple_singleplayer_mode,
|
||||||
bind_addr.isIPv6(), false);
|
bind_addr.isIPv6(), false);
|
||||||
|
|
||||||
|
@ -1872,62 +1869,6 @@ bool Game::createSingleplayerServer(const std::string &map_dir,
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Game::autoMigrateSingleplayerWorld(const std::string map_dir)
|
|
||||||
{
|
|
||||||
const std::string new_backend = "leveldb";
|
|
||||||
|
|
||||||
#if !defined(__ANDROID__) && !defined(__IOS__)
|
|
||||||
infostream << "Auto-migration disabled on this platform..." << std::endl;
|
|
||||||
return false;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// Check if needed for this world
|
|
||||||
Settings world_mt;
|
|
||||||
std::string world_mt_path = map_dir + DIR_DELIM + "world.mt";
|
|
||||||
if (!world_mt.readConfigFile(world_mt_path.c_str())) {
|
|
||||||
infostream << "Skipping migration check as world.mt can't be read." << std::endl;
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
if (!world_mt.exists("backend"))
|
|
||||||
return false;
|
|
||||||
std::string old_backend = world_mt.get("backend");
|
|
||||||
if (old_backend == new_backend) {
|
|
||||||
infostream << "Backend matches, not migrating world!" << std::endl;
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Do migration
|
|
||||||
showOverlayMessage(wgettext("Migrating world..."), 0, 7.5);
|
|
||||||
infostream << "Doing auto-migration to " << new_backend << " backend." << std::endl;
|
|
||||||
MapDatabase *old_db = ServerMap::createDatabase(old_backend, map_dir, world_mt),
|
|
||||||
*new_db = ServerMap::createDatabase(new_backend, map_dir, world_mt);
|
|
||||||
|
|
||||||
std::vector<v3s16> blocks;
|
|
||||||
old_db->listAllLoadableBlocks(blocks);
|
|
||||||
new_db->beginSave();
|
|
||||||
for (std::vector<v3s16>::const_iterator it = blocks.begin(); it != blocks.end(); ++it) {
|
|
||||||
std::string data;
|
|
||||||
old_db->loadBlock(*it, &data);
|
|
||||||
if (!data.empty())
|
|
||||||
new_db->saveBlock(*it, data);
|
|
||||||
else
|
|
||||||
errorstream << "Failed to load block " << PP(*it) << ", skipping it." << std::endl;
|
|
||||||
}
|
|
||||||
new_db->endSave();
|
|
||||||
delete old_db;
|
|
||||||
delete new_db;
|
|
||||||
|
|
||||||
world_mt.set("backend", new_backend);
|
|
||||||
world_mt.updateConfigFile(world_mt_path.c_str());
|
|
||||||
|
|
||||||
// Delete old map data if possible
|
|
||||||
if (old_backend == "sqlite3")
|
|
||||||
fs::DeleteSingleFileOrEmptyDirectory(map_dir + DIR_DELIM + "map.sqlite");
|
|
||||||
|
|
||||||
infostream << "Migration successful!" << std::endl;
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool Game::createClient(const std::string &playername,
|
bool Game::createClient(const std::string &playername,
|
||||||
const std::string &password, std::string *address, u16 port)
|
const std::string &password, std::string *address, u16 port)
|
||||||
{
|
{
|
||||||
|
|
|
@ -43,7 +43,6 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
#include "server.h"
|
#include "server.h"
|
||||||
#include "database.h"
|
#include "database.h"
|
||||||
#include "database-dummy.h"
|
#include "database-dummy.h"
|
||||||
#include "database-sqlite3.h"
|
|
||||||
#include "script/scripting_server.h"
|
#include "script/scripting_server.h"
|
||||||
#include <deque>
|
#include <deque>
|
||||||
#include <queue>
|
#include <queue>
|
||||||
|
@ -2293,8 +2292,6 @@ MapDatabase *ServerMap::createDatabase(
|
||||||
const std::string &savedir,
|
const std::string &savedir,
|
||||||
Settings &conf)
|
Settings &conf)
|
||||||
{
|
{
|
||||||
if (name == "sqlite3")
|
|
||||||
return new MapDatabaseSQLite3(savedir);
|
|
||||||
if (name == "dummy")
|
if (name == "dummy")
|
||||||
return new Database_Dummy();
|
return new Database_Dummy();
|
||||||
#if USE_LEVELDB
|
#if USE_LEVELDB
|
||||||
|
@ -2313,7 +2310,7 @@ MapDatabase *ServerMap::createDatabase(
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
else
|
else
|
||||||
throw BaseException(std::string("Database backend ") + name + " not supported.");
|
throw ModError(std::string("Database backend ") + name + " not supported.");
|
||||||
}
|
}
|
||||||
|
|
||||||
void ServerMap::beginSave()
|
void ServerMap::beginSave()
|
||||||
|
|
|
@ -25,7 +25,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
#include "rollback_interface.h"
|
#include "rollback_interface.h"
|
||||||
#include <list>
|
#include <list>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include "sqlite3.h"
|
//#include "sqlite3.h"
|
||||||
|
|
||||||
class IGameDef;
|
class IGameDef;
|
||||||
|
|
||||||
|
@ -63,7 +63,7 @@ private:
|
||||||
bool createTables();
|
bool createTables();
|
||||||
bool initDatabase();
|
bool initDatabase();
|
||||||
bool registerRow(const ActionRow & row);
|
bool registerRow(const ActionRow & row);
|
||||||
const std::list<ActionRow> actionRowsFromSelect(sqlite3_stmt * stmt);
|
//const std::list<ActionRow> actionRowsFromSelect(sqlite3_stmt * stmt);
|
||||||
ActionRow actionRowFromRollbackAction(const RollbackAction & action);
|
ActionRow actionRowFromRollbackAction(const RollbackAction & action);
|
||||||
const std::list<RollbackAction> rollbackActionsFromActionRows(
|
const std::list<RollbackAction> rollbackActionsFromActionRows(
|
||||||
const std::list<ActionRow> & rows);
|
const std::list<ActionRow> & rows);
|
||||||
|
@ -88,7 +88,7 @@ private:
|
||||||
std::list<RollbackAction> action_todisk_buffer;
|
std::list<RollbackAction> action_todisk_buffer;
|
||||||
std::list<RollbackAction> action_latest_buffer;
|
std::list<RollbackAction> action_latest_buffer;
|
||||||
|
|
||||||
std::string database_path;
|
/*std::string database_path;
|
||||||
sqlite3 * db;
|
sqlite3 * db;
|
||||||
sqlite3_stmt * stmt_insert;
|
sqlite3_stmt * stmt_insert;
|
||||||
sqlite3_stmt * stmt_replace;
|
sqlite3_stmt * stmt_replace;
|
||||||
|
@ -98,7 +98,7 @@ private:
|
||||||
sqlite3_stmt * stmt_knownActor_select;
|
sqlite3_stmt * stmt_knownActor_select;
|
||||||
sqlite3_stmt * stmt_knownActor_insert;
|
sqlite3_stmt * stmt_knownActor_insert;
|
||||||
sqlite3_stmt * stmt_knownNode_select;
|
sqlite3_stmt * stmt_knownNode_select;
|
||||||
sqlite3_stmt * stmt_knownNode_insert;
|
sqlite3_stmt * stmt_knownNode_insert;*/
|
||||||
|
|
||||||
std::vector<Entity> knownActors;
|
std::vector<Entity> knownActors;
|
||||||
std::vector<Entity> knownNodes;
|
std::vector<Entity> knownNodes;
|
||||||
|
|
|
@ -300,8 +300,7 @@ Server::Server(
|
||||||
|
|
||||||
m_enable_rollback_recording = g_settings->getBool("enable_rollback_recording");
|
m_enable_rollback_recording = g_settings->getBool("enable_rollback_recording");
|
||||||
if (m_enable_rollback_recording) {
|
if (m_enable_rollback_recording) {
|
||||||
// Create rollback manager
|
FATAL_ERROR("Rollback not supported");
|
||||||
m_rollback = new RollbackManager(m_path_world, this);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Give environment reference to scripting api
|
// Give environment reference to scripting api
|
||||||
|
|
|
@ -39,7 +39,6 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
#include "gameparams.h"
|
#include "gameparams.h"
|
||||||
#include "database-dummy.h"
|
#include "database-dummy.h"
|
||||||
#include "database-files.h"
|
#include "database-files.h"
|
||||||
#include "database-sqlite3.h"
|
|
||||||
#if USE_POSTGRESQL
|
#if USE_POSTGRESQL
|
||||||
#include "database-postgresql.h"
|
#include "database-postgresql.h"
|
||||||
#endif
|
#endif
|
||||||
|
@ -2212,9 +2211,7 @@ PlayerDatabase *ServerEnvironment::openPlayerDatabase(const std::string &name,
|
||||||
const std::string &savedir, const Settings &conf)
|
const std::string &savedir, const Settings &conf)
|
||||||
{
|
{
|
||||||
|
|
||||||
if (name == "sqlite3")
|
if (name == "dummy")
|
||||||
return new PlayerDatabaseSQLite3(savedir);
|
|
||||||
else if (name == "dummy")
|
|
||||||
return new Database_Dummy();
|
return new Database_Dummy();
|
||||||
#if USE_POSTGRESQL
|
#if USE_POSTGRESQL
|
||||||
else if (name == "postgresql") {
|
else if (name == "postgresql") {
|
||||||
|
|
Loading…
Reference in New Issue