From f9e0746e1c0ad4610188bdea0e56232444fddbda Mon Sep 17 00:00:00 2001 From: Vittorio Alfieri Date: Sat, 26 Dec 2020 17:19:02 +0100 Subject: [PATCH] Increased Android SDK and NDK version for Android 10, updated Italian and Spanish lang files, patch boost dependencies for TIME_UTC definition, fixed import for usleep. --- .travis.yml | 8 ++--- Boost/boost/thread/xtime.hpp | 4 +-- Boost/lib/pthread/thread.cpp | 4 +-- Boost/lib/pthread/timeconv.inl | 16 ++++----- JGE/src/SDLmain.cpp | 5 +++ projects/mtg/Android/AndroidManifest.xml | 44 +++++++++++++++--------- projects/mtg/Android/jni/Application.mk | 4 +-- projects/mtg/bin/Res/lang/es.txt | 3 ++ projects/mtg/bin/Res/lang/it.txt | 5 +++ tools/travis-script.sh | 2 +- 10 files changed, 60 insertions(+), 35 deletions(-) diff --git a/.travis.yml b/.travis.yml index 7e71bb775..89d09e74a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -35,8 +35,8 @@ before_install: if [ `uname -m` = x86_64 ]; then sudo dpkg --add-architecture i386 && sudo apt-get update && sudo apt-get install -qq --force-yes libgd2-xpm-dev libc6-i386 lib32stdc++6 lib32gcc1 lib32ncurses5 lib32z1 jq ant; fi && - wget http://dl.google.com/android/ndk/android-ndk-r9-linux-x86_64.tar.bz2 -nv && - wget http://dl.google.com/android/android-sdk_r24.3.4-linux.tgz -nv; + wget https://dl.google.com/android/repository/android-ndk-r22-linux-x86_64.zip -nv && + wget http://dl.google.com/android/android-sdk_r24.4.1-linux.tgz -nv; fi install: @@ -44,8 +44,8 @@ install: tar -x --xz -f sdk.lzma; fi - if [ "$BUILD_ANDROID" == "YES" ]; then - tar --absolute-names -jxf android-ndk-r9-linux-x86_64.tar.bz2 && - tar -zxf android-sdk_r24.3.4-linux.tgz && + unzip android-ndk-r22-linux-x86_64.zip && + tar -zxf android-sdk_r24.4.1-linux.tgz && $ANDROID list sdk --extended -a && echo yes | $ANDROID update sdk -a -t tools,platform-tools,build-tools-23.0.1,android-23 --no-ui --force --no-https; fi diff --git a/Boost/boost/thread/xtime.hpp b/Boost/boost/thread/xtime.hpp index d1439e0da..a10fa8f77 100644 --- a/Boost/boost/thread/xtime.hpp +++ b/Boost/boost/thread/xtime.hpp @@ -20,7 +20,7 @@ namespace boost { enum xtime_clock_types { - TIME_UTC=1 + TIME_UTC_=1 // TIME_TAI, // TIME_MONOTONIC, // TIME_PROCESS, @@ -68,7 +68,7 @@ inline xtime get_xtime(boost::system_time const& abs_time) inline int xtime_get(struct xtime* xtp, int clock_type) { - if (clock_type == TIME_UTC) + if (clock_type == TIME_UTC_) { *xtp=get_xtime(get_system_time()); return clock_type; diff --git a/Boost/lib/pthread/thread.cpp b/Boost/lib/pthread/thread.cpp index 4ff40a90b..fc0766d66 100644 --- a/Boost/lib/pthread/thread.cpp +++ b/Boost/lib/pthread/thread.cpp @@ -350,7 +350,7 @@ namespace boost cond.timed_wait(lock, xt); # endif xtime cur; - xtime_get(&cur, TIME_UTC); + xtime_get(&cur, TIME_UTC_); if (xtime_cmp(xt, cur) <= 0) return; } @@ -365,7 +365,7 @@ namespace boost BOOST_VERIFY(!pthread_yield()); # else xtime xt; - xtime_get(&xt, TIME_UTC); + xtime_get(&xt, TIME_UTC_); sleep(xt); # endif } diff --git a/Boost/lib/pthread/timeconv.inl b/Boost/lib/pthread/timeconv.inl index b75a1353b..7c07802cc 100644 --- a/Boost/lib/pthread/timeconv.inl +++ b/Boost/lib/pthread/timeconv.inl @@ -20,8 +20,8 @@ const int NANOSECONDS_PER_MICROSECOND = 1000; inline void to_time(int milliseconds, boost::xtime& xt) { int res = 0; - res = boost::xtime_get(&xt, boost::TIME_UTC); - BOOST_ASSERT(res == boost::TIME_UTC); + res = boost::xtime_get(&xt, boost::TIME_UTC_); + BOOST_ASSERT(res == boost::TIME_UTC_); xt.sec += (milliseconds / MILLISECONDS_PER_SECOND); xt.nsec += ((milliseconds % MILLISECONDS_PER_SECOND) * @@ -57,8 +57,8 @@ inline void to_timespec_duration(const boost::xtime& xt, timespec& ts) { boost::xtime cur; int res = 0; - res = boost::xtime_get(&cur, boost::TIME_UTC); - BOOST_ASSERT(res == boost::TIME_UTC); + res = boost::xtime_get(&cur, boost::TIME_UTC_); + BOOST_ASSERT(res == boost::TIME_UTC_); if (boost::xtime_cmp(xt, cur) <= 0) { @@ -88,8 +88,8 @@ inline void to_duration(boost::xtime xt, int& milliseconds) { boost::xtime cur; int res = 0; - res = boost::xtime_get(&cur, boost::TIME_UTC); - BOOST_ASSERT(res == boost::TIME_UTC); + res = boost::xtime_get(&cur, boost::TIME_UTC_); + BOOST_ASSERT(res == boost::TIME_UTC_); if (boost::xtime_cmp(xt, cur) <= 0) milliseconds = 0; @@ -110,8 +110,8 @@ inline void to_microduration(boost::xtime xt, int& microseconds) { boost::xtime cur; int res = 0; - res = boost::xtime_get(&cur, boost::TIME_UTC); - BOOST_ASSERT(res == boost::TIME_UTC); + res = boost::xtime_get(&cur, boost::TIME_UTC_); + BOOST_ASSERT(res == boost::TIME_UTC_); if (boost::xtime_cmp(xt, cur) <= 0) microseconds = 0; diff --git a/JGE/src/SDLmain.cpp b/JGE/src/SDLmain.cpp index c6d349708..5a8dea6e5 100644 --- a/JGE/src/SDLmain.cpp +++ b/JGE/src/SDLmain.cpp @@ -18,6 +18,11 @@ #include #include #include +#ifndef WIN32 +#include +#endif +#include +#include #if (defined FORCE_GLES) #undef GL_ES_VERSION_2_0 diff --git a/projects/mtg/Android/AndroidManifest.xml b/projects/mtg/Android/AndroidManifest.xml index b39ff5d03..1da0f820b 100644 --- a/projects/mtg/Android/AndroidManifest.xml +++ b/projects/mtg/Android/AndroidManifest.xml @@ -1,16 +1,28 @@ - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + diff --git a/projects/mtg/Android/jni/Application.mk b/projects/mtg/Android/jni/Application.mk index 53a2e0f9d..3aebe4ea6 100644 --- a/projects/mtg/Android/jni/Application.mk +++ b/projects/mtg/Android/jni/Application.mk @@ -1,8 +1,8 @@ APP_PROJECT_PATH := $(call my-dir)/.. APP_CPPFLAGS += -frtti -fexceptions -APP_ABI := armeabi armeabi-v7a +APP_ABI := armeabi-v7a #APP_ABI := x86 # mainly for emulators -APP_STL := gnustl_static +APP_STL := c++_static APP_MODULES := libpng libjpeg main SDL #APP_OPTIM is 'release' by default diff --git a/projects/mtg/bin/Res/lang/es.txt b/projects/mtg/bin/Res/lang/es.txt index a95ed1600..a7166e677 100644 --- a/projects/mtg/bin/Res/lang/es.txt +++ b/projects/mtg/bin/Res/lang/es.txt @@ -1512,6 +1512,9 @@ Stone Hewer Mode=Modo Forjador Won with more than 10 equipments.=Gana con mas de 10 equipos. Hermit Druid Mode=Modo Druida ermitano Won with less than 10 lands.=Gana con menos de 10 tierras. +Do you think you can dominate over other commanders? Take a big challenge in the commander format.=¿Crees que puedes dominar a otros comandantes? Acepta un gran desafío en el formato de comandante. +Commander Format Unlocked=Modo Comandante desbloqueado +Win a game with 40 or more life and with less creatures in your graveyard than your opponent.=Gana con 40 vidas o más y con menos criaturas en tu cementerio que tu oponente. Valuable Collection=El valor de la coleccion Collection valued over 10,000c.=La coleccion esta valuada en mas de 10,000 creditos. diff --git a/projects/mtg/bin/Res/lang/it.txt b/projects/mtg/bin/Res/lang/it.txt index 62df76d43..03dd96d64 100644 --- a/projects/mtg/bin/Res/lang/it.txt +++ b/projects/mtg/bin/Res/lang/it.txt @@ -480,6 +480,8 @@ Commander Anthology Volume II=Antologia del Comandante: Volume II Commander 2018=Comandante 2018 Commander 2019=Comandante 2019 Commander 2020=Comandante 2020 +Commander Collection: Green=Collezione del Comandante: Verde +Commander Legends=Leggenda del Comandante -Core Sets- Limited Edition Alpha=Edizione Limitata: Alfa @@ -1026,6 +1028,9 @@ Card Spoiler=Vedi carte Back to Trophies=Torna a Trofei Back to Main Menu=Indietro al menu' principale Cancel=Annulla +Do you think you can dominate over other commanders? Take a big challenge in the commander format.=Pensi di poter dominare gli altri comandanti? Raccogli la sfida con la modalilta' Comandante. +Commander Format Unlocked=Modalita' Comandante sbloccata +Win a game with 40 or more life and with less creatures in your graveyard than your opponent.=Vinci una partita con 40 o più punti vita e con meno creature nel cimitero rispetto al tuo avversario. Wagic Team (%s%%): %i%% : %s%%/%s%% cards=Team Wagic (%s%%): %i%% : %s%%/%s%% carte %i cards=%i carte. diff --git a/tools/travis-script.sh b/tools/travis-script.sh index d2bf0f0ca..fabc2c4f2 100755 --- a/tools/travis-script.sh +++ b/tools/travis-script.sh @@ -61,7 +61,7 @@ fi # we're building an Android binary here if [ "$BUILD_ANDROID" = "YES" ]; then - android-ndk-r9/ndk-build -C projects/mtg/Android -j4 + android-ndk-r22/ndk-build -C projects/mtg/Android -j4 $ANDROID list targets $ANDROID update project -t 1 -p projects/mtg/Android ant debug -f projects/mtg/Android/build.xml