Fix mo create
This commit is contained in:
parent
2fc7468f78
commit
b30cbda468
|
@ -1,6 +1,7 @@
|
||||||
################################################################################
|
################################################################################
|
||||||
|
|
||||||
OS := $(shell uname)
|
OS := $(shell uname)
|
||||||
|
SHELL := /bin/bash
|
||||||
|
|
||||||
# compile with GPROF
|
# compile with GPROF
|
||||||
# GPROF = 1
|
# GPROF = 1
|
||||||
|
@ -144,7 +145,7 @@ NDK_MODULE_PATH = $(ANDROID_NDK)/toolchains
|
||||||
.PHONY : debug release reconfig delconfig \
|
.PHONY : debug release reconfig delconfig \
|
||||||
leveldb_download clean_leveldb leveldb\
|
leveldb_download clean_leveldb leveldb\
|
||||||
irrlicht_download clean_irrlicht irrlicht \
|
irrlicht_download clean_irrlicht irrlicht \
|
||||||
clean_assets assets sqlite3_download \
|
clean_assets assets \
|
||||||
freetype_download clean_freetype freetype \
|
freetype_download clean_freetype freetype \
|
||||||
luajit_download clean_luajit luajit \
|
luajit_download clean_luajit luajit \
|
||||||
apk clean_apk \
|
apk clean_apk \
|
||||||
|
@ -293,7 +294,7 @@ $(OPENSSL_TIMESTAMP) : openssl_download
|
||||||
openssl_download :
|
openssl_download :
|
||||||
@if [ ! -d ${OPENSSL_DIR} ] ; then \
|
@if [ ! -d ${OPENSSL_DIR} ] ; then \
|
||||||
echo "openssl sources missing, downloading..."; \
|
echo "openssl sources missing, downloading..."; \
|
||||||
mkdir -p ${ANDR_ROOT}/deps; \
|
mkdir -p ${ANDR_ROOT}/deps; \
|
||||||
cd ${ANDR_ROOT}/deps; \
|
cd ${ANDR_ROOT}/deps; \
|
||||||
wget ${OPENSSL_URL} || exit 1; \
|
wget ${OPENSSL_URL} || exit 1; \
|
||||||
tar -xzf openssl-$(OPENSSL_VERSION).tar.gz; \
|
tar -xzf openssl-$(OPENSSL_VERSION).tar.gz; \
|
||||||
|
@ -346,11 +347,11 @@ leveldb_download :
|
||||||
echo "leveldb sources missing, downloading..."; \
|
echo "leveldb sources missing, downloading..."; \
|
||||||
mkdir -p ${ANDR_ROOT}/deps; \
|
mkdir -p ${ANDR_ROOT}/deps; \
|
||||||
cd ${ANDR_ROOT}/deps ; \
|
cd ${ANDR_ROOT}/deps ; \
|
||||||
# git clone ${LEVELDB_URL_GIT} || exit 1; \
|
# git clone ${LEVELDB_URL_GIT} || exit 1; \
|
||||||
wget ${LEVELDB_URL} || exit 1; \
|
wget ${LEVELDB_URL} || exit 1; \
|
||||||
unzip v${LEVELDB_VER}.zip || exit 1; \
|
unzip v${LEVELDB_VER}.zip || exit 1; \
|
||||||
rm v${LEVELDB_VER}.zip || exit 1; \
|
rm v${LEVELDB_VER}.zip || exit 1; \
|
||||||
mv leveldb-${LEVELDB_VER} leveldb || exit 1; \
|
mv leveldb-${LEVELDB_VER} leveldb || exit 1; \
|
||||||
fi
|
fi
|
||||||
|
|
||||||
leveldb : $(LEVELDB_LIB)
|
leveldb : $(LEVELDB_LIB)
|
||||||
|
@ -523,7 +524,7 @@ intl_download :
|
||||||
wget ${INTL_URL_HTTP} -O libintl.tar.gz || exit 1; \
|
wget ${INTL_URL_HTTP} -O libintl.tar.gz || exit 1; \
|
||||||
tar -xzf libintl.tar.gz || exit 1; \
|
tar -xzf libintl.tar.gz || exit 1; \
|
||||||
rm libintl.tar.gz; \
|
rm libintl.tar.gz; \
|
||||||
ln -s libintl-lite-master libintl; \
|
mv libintl-lite-master libintl; \
|
||||||
fi
|
fi
|
||||||
|
|
||||||
intl : $(INTL_LIB)
|
intl : $(INTL_LIB)
|
||||||
|
@ -543,14 +544,17 @@ $(INTL_LIB) : $(INTL_TIMESTAMP)
|
||||||
mkdir -p ${INTL_DIR}; \
|
mkdir -p ${INTL_DIR}; \
|
||||||
echo "changed timestamp for intl detected building..."; \
|
echo "changed timestamp for intl detected building..."; \
|
||||||
cd ${INTL_DIR}; \
|
cd ${INTL_DIR}; \
|
||||||
\
|
|
||||||
export TOOLCHAIN=/tmp/ndk-${TARGET_HOST}-intl; \
|
export TOOLCHAIN=/tmp/ndk-${TARGET_HOST}-intl; \
|
||||||
${ANDROID_NDK}/build/tools/make-standalone-toolchain.sh \
|
${ANDROID_NDK}/build/tools/make-standalone-toolchain.sh \
|
||||||
--toolchain=${TARGET_TOOLCHAIN}-${COMPILER_VERSION} \
|
--toolchain=${TARGET_TOOLCHAIN}-${COMPILER_VERSION} \
|
||||||
--platform=${APP_PLATFORM} --install-dir=$${TOOLCHAIN}; \
|
--platform=${APP_PLATFORM} --install-dir=$${TOOLCHAIN}; \
|
||||||
export PATH="$${TOOLCHAIN}/bin:$${PATH}"; \
|
export PATH="$${TOOLCHAIN}/bin:$${PATH}"; \
|
||||||
cd internal; \
|
cd internal; \
|
||||||
${CROSS_PREFIX}g++ -O3 -c libintl.cpp -o libintl.o || exit 1; \
|
export TARGET_OS=OS_ANDROID_CROSSCOMPILE; \
|
||||||
|
export CPPFLAGS="$${CPPFLAGS} ${TARGET_CXXFLAGS_ADDON}"; \
|
||||||
|
export CFLAGS="$${CFLAGS} ${TARGET_CFLAGS_ADDON}"; \
|
||||||
|
export LDFLAGS="$${LDFLAGS} ${TARGET_LDFLAGS_ADDON}"; \
|
||||||
|
${CROSS_PREFIX}g++ -O3 -c libintl.cpp -o libintl.o || exit 1; \
|
||||||
${CROSS_PREFIX}ar rs ../libintl.a libintl.o || exit 1; \
|
${CROSS_PREFIX}ar rs ../libintl.a libintl.o || exit 1; \
|
||||||
cd ..; \
|
cd ..; \
|
||||||
touch ${INTL_TIMESTAMP}; \
|
touch ${INTL_TIMESTAMP}; \
|
||||||
|
@ -735,29 +739,14 @@ $(MPIR_LIB): $(MPIR_TIMESTAMP)
|
||||||
clean_mpir:
|
clean_mpir:
|
||||||
$(RM) -R deps/mpir
|
$(RM) -R deps/mpir
|
||||||
|
|
||||||
sqlite3_download: deps/sqlite/sqlite3.c
|
|
||||||
|
|
||||||
deps/sqlite/sqlite3.c :
|
|
||||||
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) -R sqlite
|
|
||||||
|
|
||||||
$(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 \
|
||||||
LAST_MODIF=$$(find ${PROJ_ROOT}/$$DIRNAME -type f -printf '%T@ %p\n' | sort -n | tail -1 | cut -f2- -d" "); \
|
LAST_MODIF=$$(find ${PROJ_ROOT}/$$DIRNAME -type f -printf '%T@ %p\n' | sort -n | tail -1 | cut -f2- -d" "); \
|
||||||
if [ $$(basename $$LAST_MODIF) != "timestamp" ]; then \
|
if [ $$(basename $$LAST_MODIF) != "timestamp" ]; then \
|
||||||
touch ${PROJ_ROOT}/$$DIRNAME/timestamp; \
|
touch ${PROJ_ROOT}/$$DIRNAME/timestamp; \
|
||||||
touch ${ASSETS_TIMESTAMP}; \
|
touch ${ASSETS_TIMESTAMP}; \
|
||||||
echo $$DIRNAME changed $$LAST_MODIF; \
|
echo $$DIRNAME changed $$LAST_MODIF; \
|
||||||
fi; \
|
fi; \
|
||||||
done; \
|
done; \
|
||||||
LAST_MODIF=$$(find ${IRRLICHT_DIR}/media -type f -printf '%T@ %p\n' | sort -n | tail -1 | cut -f2- -d" "); \
|
LAST_MODIF=$$(find ${IRRLICHT_DIR}/media -type f -printf '%T@ %p\n' | sort -n | tail -1 | cut -f2- -d" "); \
|
||||||
|
@ -829,7 +818,7 @@ assets : $(ASSETS_TIMESTAMP)
|
||||||
if [ ! -e ${ASSETS_TIMESTAMP}.old ] ; then \
|
if [ ! -e ${ASSETS_TIMESTAMP}.old ] ; then \
|
||||||
REFRESH=1; \
|
REFRESH=1; \
|
||||||
fi; \
|
fi; \
|
||||||
if [ ${ASSETS_TIMESTAMP} -nt ${ASSETS_TIMESTAMP}.old ] ; then \
|
if [ ${ASSETS_TIMESTAMP} -nt ${ASSETS_TIMESTAMP}.old ] ; then \
|
||||||
REFRESH=1; \
|
REFRESH=1; \
|
||||||
fi; \
|
fi; \
|
||||||
if [ ! -e ${APP_ROOT}/assets ] ; then \
|
if [ ! -e ${APP_ROOT}/assets ] ; then \
|
||||||
|
@ -887,8 +876,15 @@ clean_assets :
|
||||||
# $(MPIR_LIB)
|
# $(MPIR_LIB)
|
||||||
apk: local.properties $(ICONV_LIB) $(IRRLICHT_LIB) $(CURL_LIB) $(LEVELDB_LIB) $(LUAJIT_LIB) \
|
apk: local.properties $(ICONV_LIB) $(IRRLICHT_LIB) $(CURL_LIB) $(LEVELDB_LIB) $(LUAJIT_LIB) \
|
||||||
$(OPENAL_LIB) $(VORBIS_LIB) $(INTL_LIB) prep_srcdir $(ANDR_ROOT)/jni/src/android_version.h \
|
$(OPENAL_LIB) $(VORBIS_LIB) $(INTL_LIB) prep_srcdir $(ANDR_ROOT)/jni/src/android_version.h \
|
||||||
$(ANDR_ROOT)/jni/src/android_version_githash.h sqlite3_download assets
|
$(ANDR_ROOT)/jni/src/android_version_githash.h assets
|
||||||
+ @${ANDROID_NDK}/ndk-build NDK_MODULE_PATH=${NDK_MODULE_PATH} \
|
+@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; \
|
||||||
|
cd ..; \
|
||||||
|
${ANDROID_NDK}/ndk-build NDK_MODULE_PATH=${NDK_MODULE_PATH} \
|
||||||
GPROF=${GPROF} APP_ABI=${TARGET_ABI} \
|
GPROF=${GPROF} APP_ABI=${TARGET_ABI} \
|
||||||
APP_PLATFORM=${APP_PLATFORM} \
|
APP_PLATFORM=${APP_PLATFORM} \
|
||||||
NDK_TOOLCHAIN_VERSION=${COMPILER_VERSION} \
|
NDK_TOOLCHAIN_VERSION=${COMPILER_VERSION} \
|
||||||
|
@ -898,7 +894,7 @@ apk: local.properties $(ICONV_LIB) $(IRRLICHT_LIB) $(CURL_LIB) $(LEVELDB_LIB) $(
|
||||||
fi; \
|
fi; \
|
||||||
export VERSION_STR="${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}" && \
|
export VERSION_STR="${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}" && \
|
||||||
export BUILD_TYPE_C=$$(echo "$${BUILD_TYPE}" | sed 's/./\U&/') && \
|
export BUILD_TYPE_C=$$(echo "$${BUILD_TYPE}" | sed 's/./\U&/') && \
|
||||||
gradle assemble$$BUILD_TYPE_C && \
|
# gradle assemble$$BUILD_TYPE_C && \
|
||||||
echo "APK stored at: build/outputs/apk/MultiCraft-$$BUILD_TYPE.apk" && \
|
echo "APK stored at: build/outputs/apk/MultiCraft-$$BUILD_TYPE.apk" && \
|
||||||
echo "You can install it with \`make install_$$BUILD_TYPE\`"
|
echo "You can install it with \`make install_$$BUILD_TYPE\`"
|
||||||
|
|
||||||
|
@ -916,7 +912,7 @@ prep_srcdir :
|
||||||
fi
|
fi
|
||||||
|
|
||||||
clean_apk :
|
clean_apk :
|
||||||
gradle clean
|
# gradle clean
|
||||||
|
|
||||||
clean_all :
|
clean_all :
|
||||||
@$(MAKE) clean_apk; \
|
@$(MAKE) clean_apk; \
|
||||||
|
|
12
src/game.cpp
12
src/game.cpp
|
@ -1171,21 +1171,21 @@ static void show_pause_menu(GUIFormSpecMenu **cur_formspec,
|
||||||
|
|
||||||
os << FORMSPEC_VERSION_STRING << SIZE_TAG
|
os << FORMSPEC_VERSION_STRING << SIZE_TAG
|
||||||
<< "bgcolor[#00000060;true]"
|
<< "bgcolor[#00000060;true]"
|
||||||
<< "button_exit[4," << (ypos++) << ";3,0.5;btn_continue;"
|
<< "button_exit[3.5," << (ypos++) << ";4,0.5;btn_continue;"
|
||||||
<< strgettext("Continue") << "]";
|
<< strgettext("Continue") << "]";
|
||||||
#ifndef __ANDROID__
|
#ifndef __ANDROID__
|
||||||
if (!singleplayermode) {
|
if (!singleplayermode) {
|
||||||
os << "button_exit[4," << (ypos++) << ";3,0.5;btn_change_password;"
|
os << "button_exit[3.5," << (ypos++) << ";4,0.5;btn_change_password;"
|
||||||
<< strgettext("Change Password") << "]";
|
<< strgettext("Change Password") << "]";
|
||||||
}
|
}
|
||||||
os << "button_exit[4," << (ypos++) << ";3,0.5;btn_sound;"
|
os << "button_exit[3.5," << (ypos++) << ";4,0.5;btn_sound;"
|
||||||
<< strgettext("Sound Volume") << "]";
|
<< strgettext("Sound Volume") << "]";
|
||||||
os << "button_exit[4," << (ypos++) << ";3,0.5;btn_key_config;"
|
os << "button_exit[3.5," << (ypos++) << ";4,0.5;btn_key_config;"
|
||||||
<< strgettext("Change Keys") << "]";
|
<< strgettext("Change Keys") << "]";
|
||||||
#endif
|
#endif
|
||||||
os << "button_exit[4," << (ypos++) << ";3,0.5;btn_exit_menu;"
|
os << "button_exit[3.5," << (ypos++) << ";4,0.5;btn_exit_menu;"
|
||||||
<< strgettext("Save and Exit") << "]";
|
<< strgettext("Save and Exit") << "]";
|
||||||
os << "button_exit[4," << (ypos++) << ";3,0.5;btn_exit_os;"
|
os << "button_exit[3.5," << (ypos++) << ";4,0.5;btn_exit_os;"
|
||||||
<< strgettext("Close game") << "]"
|
<< strgettext("Close game") << "]"
|
||||||
<< "\n;]";
|
<< "\n;]";
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue