diff options
108 files changed, 762 insertions, 694 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index f102f667d..d3be39d84 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -29,6 +29,8 @@ variables: artifacts: paths: - logs + - src/dyecmd + - src/manaplus when: always expire_in: 3 week except: @@ -39,6 +41,8 @@ variables: artifacts: paths: - logs + - src/dyecmd + - src/manaplus when: always expire_in: 3 week dependencies: [] @@ -319,7 +323,7 @@ gcc-5_sdl2: image: debian:bullseye script: - ./tools/ci/scripts/patchsdl1.sh - - ./tools/ci/jobs/gcc10.sh --without-manaplusgame + - ./tools/ci/jobs/gcc10.sh --without-gameclient - ./tools/ci/scripts/rundyecmd.sh <<: *job-push variables: @@ -337,7 +341,7 @@ gcc-8_unittestsbin: image: debian:buster script: - ./tools/ci/scripts/patchsdl1.sh - - ./tools/ci/jobs/gcc8_silent.sh --enable-unittestsbin --without-manaplusgame --without-dyecmd + - ./tools/ci/jobs/gcc8_silent.sh --enable-unittestsbin --without-gameclient --without-dyecmd <<: *job-push variables: PACKAGES: gcc-8 g++-8 @@ -350,17 +354,18 @@ gcc-8_unittestsbin: linters: stage: lint - image: debian:buster + image: debian:bullseye script: - ./tools/ci/jobs/mplint.sh src po data - ./tools/ci/jobs/pngcheck.sh - ./tools/ci/jobs/imagemagiccheck.sh - ./tools/ci/jobs/cpplint.sh - ./tools/ci/jobs/nsiqcppstyle.sh + - ./tools/ci/jobs/potfiles_update_check.sh <<: *job-push variables: MPLINT_PACKAGE_URL: "$CI_API_V4_URL/projects/mana%2Fmplint/jobs/artifacts/master/download?job=package_debian10_buster" - PACKAGES: git grep imagemagick pngcheck python unzip wget + PACKAGES: git grep imagemagick pngcheck python2 python3 unzip wget tags: - docker @@ -372,11 +377,11 @@ gcc-5_h_all: image: ubuntu:xenial script: - ./tools/ci/scripts/patchsdl1.sh - - ./tools/ci/jobs/gcc5_h.sh -std=c++0x -DDEBUGBUILD -DTMWA_SUPPORT -DENABLE_NLS -DUSE_OPENGL -DENABLE_LIBXML -I/usr/include/SDL - - ./tools/ci/jobs/gcc5_h.sh -std=c++0x -DDEBUGBUILD -DTMWA_SUPPORT -DENABLE_LIBXML -I/usr/include/SDL - - ./tools/ci/jobs/gcc5_h.sh -std=c++0x -DDEBUGBUILD -DTMWA_SUPPORT -DENABLE_NLS -DUSE_OPENGL -DENABLE_LIBXML -DUNITTESTS -DUNITTESTS_CATCH -DUNITTESTS_EMBED -I/usr/include/SDL - - ./tools/ci/jobs/gcc5_h.sh -std=c++0x -DDEBUGBUILD -DTMWA_SUPPORT -DENABLE_NLS -DENABLE_LIBXML -I/usr/include/SDL - - ./tools/ci/jobs/gcc5_h.sh -std=c++0x -DDEBUGBUILD -DENABLE_NLS -DUSE_OPENGL -DENABLE_LIBXML -I/usr/include/SDL + - ./tools/ci/jobs/gcc5_h.sh -std=c++11 -DDEBUGBUILD -DTMWA_SUPPORT -DENABLE_NLS -DUSE_OPENGL -DENABLE_LIBXML -I/usr/include/SDL + - ./tools/ci/jobs/gcc5_h.sh -std=c++11 -DDEBUGBUILD -DTMWA_SUPPORT -DENABLE_LIBXML -I/usr/include/SDL + - ./tools/ci/jobs/gcc5_h.sh -std=c++11 -DDEBUGBUILD -DTMWA_SUPPORT -DENABLE_NLS -DUSE_OPENGL -DENABLE_LIBXML -DUNITTESTS -DUNITTESTS_CATCH -DUNITTESTS_EMBED -I/usr/include/SDL + - ./tools/ci/jobs/gcc5_h.sh -std=c++11 -DDEBUGBUILD -DTMWA_SUPPORT -DENABLE_NLS -DENABLE_LIBXML -I/usr/include/SDL + - ./tools/ci/jobs/gcc5_h.sh -std=c++11 -DDEBUGBUILD -DENABLE_NLS -DUSE_OPENGL -DENABLE_LIBXML -I/usr/include/SDL <<: *job-push variables: PACKAGES: gcc-5 g++-5 @@ -392,11 +397,11 @@ gcc-5_h_all: image: i386/ubuntu:xenial script: - ./tools/ci/scripts/patchsdl1.sh - - ./tools/ci/jobs/gcc5_h.sh -std=c++0x -DDEBUGBUILD -DTMWA_SUPPORT -DENABLE_NLS -DUSE_OPENGL -DENABLE_LIBXML -I/usr/include/SDL - - ./tools/ci/jobs/gcc5_h.sh -std=c++0x -DDEBUGBUILD -DTMWA_SUPPORT -DENABLE_LIBXML -I/usr/include/SDL - - ./tools/ci/jobs/gcc5_h.sh -std=c++0x -DDEBUGBUILD -DTMWA_SUPPORT -DENABLE_NLS -DUSE_OPENGL -DENABLE_LIBXML -DUNITTESTS -DUNITTESTS_CATCH -DUNITTESTS_EMBED -I/usr/include/SDL - - ./tools/ci/jobs/gcc5_h.sh -std=c++0x -DDEBUGBUILD -DTMWA_SUPPORT -DENABLE_NLS -DENABLE_LIBXML -I/usr/include/SDL - - ./tools/ci/jobs/gcc5_h.sh -std=c++0x -DDEBUGBUILD -DENABLE_NLS -DUSE_OPENGL -DENABLE_LIBXML -I/usr/include/SDL + - ./tools/ci/jobs/gcc5_h.sh -std=c++11 -DDEBUGBUILD -DTMWA_SUPPORT -DENABLE_NLS -DUSE_OPENGL -DENABLE_LIBXML -I/usr/include/SDL + - ./tools/ci/jobs/gcc5_h.sh -std=c++11 -DDEBUGBUILD -DTMWA_SUPPORT -DENABLE_LIBXML -I/usr/include/SDL + - ./tools/ci/jobs/gcc5_h.sh -std=c++11 -DDEBUGBUILD -DTMWA_SUPPORT -DENABLE_NLS -DUSE_OPENGL -DENABLE_LIBXML -DUNITTESTS -DUNITTESTS_CATCH -DUNITTESTS_EMBED -I/usr/include/SDL + - ./tools/ci/jobs/gcc5_h.sh -std=c++11 -DDEBUGBUILD -DTMWA_SUPPORT -DENABLE_NLS -DENABLE_LIBXML -I/usr/include/SDL + - ./tools/ci/jobs/gcc5_h.sh -std=c++11 -DDEBUGBUILD -DENABLE_NLS -DUSE_OPENGL -DENABLE_LIBXML -I/usr/include/SDL <<: *job-push variables: PACKAGES: gcc-5 g++-5 @@ -413,7 +418,7 @@ gcc-5_h_all: script: - mkdir -p coverage/ - ./tools/ci/scripts/patchsdl1.sh - - ./tools/ci/jobs/gcc7_tests_gcov.sh --without-dyecmd --without-manaplusgame + - ./tools/ci/jobs/gcc7_tests_gcov.sh --without-dyecmd --without-gameclient variables: PACKAGES: gcc-7 g++-7 make autoconf automake autopoint gettext @@ -486,7 +491,7 @@ triggers: - echo /usr/local/spm/bin/${LIBNAME}_${LIBVERSION}/runenv.sh ${runenvz} - export LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libasan.so.4 - /usr/local/spm/bin/${LIBNAME}_${LIBVERSION}/runenv.sh ${runenvx} ${runenvz} env - - /usr/local/spm/bin/${LIBNAME}_${LIBVERSION}/runenv.sh ${runenvx} ${runenvz} ./tools/ci/jobs/gcc10_sanitize_tests.sh --enable-unittests=yes --without-manaplusgame --without-dyecmd + - /usr/local/spm/bin/${LIBNAME}_${LIBVERSION}/runenv.sh ${runenvx} ${runenvz} ./tools/ci/jobs/gcc10_sanitize_tests.sh --enable-unittests=yes --without-gameclient --without-dyecmd - export LD_PRELOAD - /usr/local/spm/bin/${LIBNAME}_${LIBVERSION}/runenv.sh ${runenvx} ${runenvz} ./tools/ci/scripts/checkldd.sh src/manaplustests - ldd ./src/manaplustests | grep "libasan" @@ -512,7 +517,7 @@ triggers: script: - ./tools/ci/scripts/downloadlib.sh ${LIBNAME} ${LIBVERSION} - export LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libasan.so.4 - - /usr/local/spm/bin/${LIBNAME}_${LIBVERSION}/runenv.sh ${runenvx} ${runenvz} ./tools/ci/jobs/gcc10_sanitize_tests.sh --enable-unittests=yes --with-sdl2 --without-manaplusgame --without-dyecmd + - /usr/local/spm/bin/${LIBNAME}_${LIBVERSION}/runenv.sh ${runenvx} ${runenvz} ./tools/ci/jobs/gcc10_sanitize_tests.sh --enable-unittests=yes --with-sdl2 --without-gameclient --without-dyecmd - export LD_PRELOAD - /usr/local/spm/bin/${LIBNAME}_${LIBVERSION}/runenv.sh ${runenvx} ${runenvz} ./tools/ci/scripts/checkldd.sh src/manaplustests - ldd ./src/manaplustests | grep "libasan" @@ -539,7 +544,7 @@ triggers: - ./tools/ci/scripts/downloadlib.sh ${LIBNAME} ${LIBVERSION} - echo /usr/local/spm/bin/${LIBNAME}_${LIBVERSION}/runenv.sh ${runenvz} - /usr/local/spm/bin/${LIBNAME}_${LIBVERSION}/runenv.sh ${runenvx} ${runenvz} env - - /usr/local/spm/bin/${LIBNAME}_${LIBVERSION}/runenv.sh ${runenvx} ${runenvz} ./tools/ci/jobs/gcc10_sanitize_tests.sh --enable-unittests=yes --without-manaplusgame --without-dyecmd + - /usr/local/spm/bin/${LIBNAME}_${LIBVERSION}/runenv.sh ${runenvx} ${runenvz} ./tools/ci/jobs/gcc10_sanitize_tests.sh --enable-unittests=yes --without-gameclient --without-dyecmd - /usr/local/spm/bin/${LIBNAME}_${LIBVERSION}/runenv.sh ${runenvx} ${runenvz} ./tools/ci/scripts/checkldd.sh src/manaplustests - ldd ./src/manaplustests | grep "libasan" <<: *job-push @@ -561,7 +566,7 @@ triggers: stage: build script: - ./tools/ci/scripts/downloadlib.sh ${LIBNAME} ${LIBVERSION} - - /usr/local/spm/bin/${LIBNAME}_${LIBVERSION}/runenv.sh ${runenvx} ${runenvz} ./tools/ci/jobs/gcc10_sanitize_tests.sh --enable-unittests=yes --with-sdl2 --without-manaplusgame --without-dyecmd + - /usr/local/spm/bin/${LIBNAME}_${LIBVERSION}/runenv.sh ${runenvx} ${runenvz} ./tools/ci/jobs/gcc10_sanitize_tests.sh --enable-unittests=yes --with-sdl2 --without-gameclient --without-dyecmd - /usr/local/spm/bin/${LIBNAME}_${LIBVERSION}/runenv.sh ${runenvx} ${runenvz} ./tools/ci/scripts/checkldd.sh src/manaplustests - ldd ./src/manaplustests | grep "libasan" <<: *job-push @@ -586,7 +591,7 @@ triggers: - ./tools/ci/scripts/downloadlib.sh ${LIBNAME} ${LIBVERSION} - echo /usr/local/spm/bin/${LIBNAME}_${LIBVERSION}/runenv.sh ${runenvz} - /usr/local/spm/bin/${LIBNAME}_${LIBVERSION}/runenv.sh ${runenvx} ${runenvz} env - - /usr/local/spm/bin/${LIBNAME}_${LIBVERSION}/runenv.sh ${runenvx} ${runenvz} ./tools/ci/jobs/gcc10_sanitize_tests.sh --enable-unittests=yes --without-manaplusgame --without-dyecmd + - /usr/local/spm/bin/${LIBNAME}_${LIBVERSION}/runenv.sh ${runenvx} ${runenvz} ./tools/ci/jobs/gcc10_sanitize_tests.sh --enable-unittests=yes --without-gameclient --without-dyecmd - /usr/local/spm/bin/${LIBNAME}_${LIBVERSION}/runenv.sh ${runenvx} ${runenvz} ./tools/ci/scripts/checkldd.sh src/manaplustests - ldd ./src/manaplustests | grep "libasan" <<: *job-push @@ -610,7 +615,7 @@ triggers: stage: build script: - ./tools/ci/scripts/downloadlib.sh ${LIBNAME} ${LIBVERSION} - - /usr/local/spm/bin/${LIBNAME}_${LIBVERSION}/runenv.sh ${runenvx} ${runenvz} ./tools/ci/jobs/gcc10_sanitize_tests.sh --enable-unittests=yes --with-sdl2 --without-manaplusgame --without-dyecmd + - /usr/local/spm/bin/${LIBNAME}_${LIBVERSION}/runenv.sh ${runenvx} ${runenvz} ./tools/ci/jobs/gcc10_sanitize_tests.sh --enable-unittests=yes --with-sdl2 --without-gameclient --without-dyecmd - /usr/local/spm/bin/${LIBNAME}_${LIBVERSION}/runenv.sh ${runenvx} ${runenvz} ./tools/ci/scripts/checkldd.sh src/manaplustests - ldd ./src/manaplustests | grep "libasan" <<: *job-push diff --git a/.travis.yml b/.travis.yml index 2caece97a..648e76ea6 100644 --- a/.travis.yml +++ b/.travis.yml @@ -41,22 +41,22 @@ env: PACKAGES="gcc-10 g++-10 ${LIBS_PACKAGES} ${SDL1}" - IMAGE=ubuntu:xenial - COMMAND="./tools/ci/jobs/gcc5_tests.sh --disable-tmwa --without-dyecmd --without-manaplusgame" + COMMAND="./tools/ci/jobs/gcc5_tests.sh --disable-tmwa --without-dyecmd --without-gameclient" PACKAGES="gcc-5 g++-5 ${LIBS_PACKAGES} ${SDL1} valgrind" - IMAGE=debian:stretch - COMMAND="./tools/ci/jobs/gcc6_tests.sh --disable-tmwa --without-dyecmd --without-manaplusgame" + COMMAND="./tools/ci/jobs/gcc6_tests.sh --disable-tmwa --without-dyecmd --without-gameclient" PACKAGES="gcc-6 g++-6 ${LIBS_PACKAGES} ${SDL1} valgrind" - IMAGE=debian:unstable - COMMAND="./tools/ci/jobs/gcc10_tests.sh --disable-tmwa --without-dyecmd --without-manaplusgame" + COMMAND="./tools/ci/jobs/gcc10_tests.sh --disable-tmwa --without-dyecmd --without-gameclient" PACKAGES="gcc-10 g++-10 ${LIBS_PACKAGES} ${SDL1} valgrind" - IMAGE=ubuntu:xenial - COMMAND="./tools/ci/jobs/gcc5_sanitize_tests.sh --disable-tmwa --without-dyecmd --without-manaplusgame" + COMMAND="./tools/ci/jobs/gcc5_sanitize_tests.sh --disable-tmwa --without-dyecmd --without-gameclient" PACKAGES="gcc-5 g++-5 ${LIBS_PACKAGES} ${SDL1} valgrind" @@ -75,17 +75,17 @@ env: PACKAGES="gcc-10 g++-10 ${LIBS_PACKAGES} ${SDL1}" - IMAGE=i386/ubuntu:xenial - COMMAND="./tools/ci/jobs/gcc5_tests.sh --disable-tmwa --without-dyecmd --without-manaplusgame" + COMMAND="./tools/ci/jobs/gcc5_tests.sh --disable-tmwa --without-dyecmd --without-gameclient" PACKAGES="gcc-5 g++-5 ${LIBS_PACKAGES} ${SDL1} valgrind" - IMAGE=i386/debian:stretch - COMMAND="./tools/ci/jobs/gcc6_tests.sh --disable-tmwa --without-dyecmd --without-manaplusgame" + COMMAND="./tools/ci/jobs/gcc6_tests.sh --disable-tmwa --without-dyecmd --without-gameclient" PACKAGES="gcc-6 g++-6 ${LIBS_PACKAGES} ${SDL1} valgrind" - IMAGE=i386/debian:unstable - COMMAND="./tools/ci/jobs/gcc10_tests.sh --disable-tmwa --without-dyecmd --without-manaplusgame" + COMMAND="./tools/ci/jobs/gcc10_tests.sh --disable-tmwa --without-dyecmd --without-gameclient" PACKAGES="gcc-10 g++-10 ${LIBS_PACKAGES} ${SDL1} valgrind" @@ -104,22 +104,22 @@ env: PACKAGES="gcc-10 g++-10 ${LIBS_PACKAGES} ${SDL2}" - IMAGE=ubuntu:xenial - COMMAND="./tools/ci/jobs/gcc5_tests.sh --disable-tmwa --without-dyecmd --without-manaplusgame --with-sdl2" + COMMAND="./tools/ci/jobs/gcc5_tests.sh --disable-tmwa --without-dyecmd --without-gameclient --with-sdl2" PACKAGES="gcc-5 g++-5 ${LIBS_PACKAGES} ${SDL2} valgrind" - IMAGE=debian:stretch - COMMAND="./tools/ci/jobs/gcc6_tests.sh --disable-tmwa --without-dyecmd --without-manaplusgame --with-sdl2" + COMMAND="./tools/ci/jobs/gcc6_tests.sh --disable-tmwa --without-dyecmd --without-gameclient --with-sdl2" PACKAGES="gcc-6 g++-6 ${LIBS_PACKAGES} ${SDL2} valgrind" - IMAGE=debian:unstable - COMMAND="./tools/ci/jobs/gcc10_tests.sh --disable-tmwa --without-dyecmd --without-manaplusgame --with-sdl2" + COMMAND="./tools/ci/jobs/gcc10_tests.sh --disable-tmwa --without-dyecmd --without-gameclient --with-sdl2" PACKAGES="gcc-10 g++-10 ${LIBS_PACKAGES} ${SDL2} valgrind" - IMAGE=ubuntu:xenial - COMMAND="./tools/ci/jobs/gcc5_sanitize_tests.sh --disable-tmwa --without-dyecmd --without-manaplusgame --with-sdl2" + COMMAND="./tools/ci/jobs/gcc5_sanitize_tests.sh --disable-tmwa --without-dyecmd --without-gameclient --with-sdl2" PACKAGES="gcc-5 g++-5 ${LIBS_PACKAGES} ${SDL2} valgrind" @@ -138,17 +138,17 @@ env: PACKAGES="gcc-10 g++-10 ${LIBS_PACKAGES} ${SDL2}" - IMAGE=i386/ubuntu:xenial - COMMAND="./tools/ci/jobs/gcc5_tests.sh --disable-tmwa --without-dyecmd --without-manaplusgame --with-sdl2" + COMMAND="./tools/ci/jobs/gcc5_tests.sh --disable-tmwa --without-dyecmd --without-gameclient --with-sdl2" PACKAGES="gcc-5 g++-5 ${LIBS_PACKAGES} ${SDL2} valgrind" - IMAGE=i386/debian:stretch - COMMAND="./tools/ci/jobs/gcc6_tests.sh --disable-tmwa --without-dyecmd --without-manaplusgame --with-sdl2" + COMMAND="./tools/ci/jobs/gcc6_tests.sh --disable-tmwa --without-dyecmd --without-gameclient --with-sdl2" PACKAGES="gcc-6 g++-6 ${LIBS_PACKAGES} ${SDL2} valgrind" - IMAGE=i386/debian:unstable - COMMAND="./tools/ci/jobs/gcc10_tests.sh --disable-tmwa --without-dyecmd --without-manaplusgame --with-sdl2" + COMMAND="./tools/ci/jobs/gcc10_tests.sh --disable-tmwa --without-dyecmd --without-gameclient --with-sdl2" PACKAGES="gcc-10 g++-10 ${LIBS_PACKAGES} ${SDL2} valgrind" @@ -6,6 +6,7 @@ Andrei Karas (4144) <akaras inbox ru> Ben Longbons <b.r.longbons gmail com> Danil Sagunov (Vasily_Makarov) <danilka.pro gmail com> +Fedja Beader <fedja protonmail ch> Helmut Grohne (gnurfk) <helmut subdivi de> Philippe Groarke (Socapex) Maarten Vanraes (AL13N) <maarten.vanraes gmail com> diff --git a/Android.mk b/Android.mk index c069363f6..640b9260b 100644 --- a/Android.mk +++ b/Android.mk @@ -17,7 +17,7 @@ LOCAL_C_INCLUDES := $(LOCAL_PATH)/$(SDL_PATH)/include \ LOCAL_CPPFLAGS += -DUSE_SDL2 -DTMWA_SUPPORT -DUSE_OPENGL -DENABLE_NLS -DENABLE_LIBXML LOCAL_CPPFLAGS += -frtti -fexceptions -Wno-error=format-security -fvisibility=hidden -LOCAL_CPPFLAGS += -ffast-math -funswitch-loops -pedantic -Wall -Wc++11-compat -std=c++0x -funsafe-loop-optimizations -flto -fwhole-program +LOCAL_CPPFLAGS += -ffast-math -funswitch-loops -pedantic -Wall -Wc++17-compat -std=c++11 -funsafe-loop-optimizations -flto -fwhole-program LOCAL_CPPFLAGS += -fpic -fpie LOCAL_SHARED_LIBRARIES := SDL2 SDL2_mixer sdl_net SDL2_ttf SDL2_image libcurl intl png sdl2_gfx xml2 @@ -48,9 +48,9 @@ LOCAL_SRC_FILES := $(SDL_PATH)/src/main/android/SDL_android_main.c \ $(wildcard $(LOCAL_PATH)/src/const/gui/*.cpp) \ $(wildcard $(LOCAL_PATH)/src/const/net/*.cpp) \ $(wildcard $(LOCAL_PATH)/src/progs/*.cpp) \ - $(wildcard $(LOCAL_PATH)/src/progs/manaplus/*.cpp) \ - $(wildcard $(LOCAL_PATH)/src/progs/manaplus/gui/*.cpp) \ - $(wildcard $(LOCAL_PATH)/src/progs/manaplus/actions/*.cpp) \ + $(wildcard $(LOCAL_PATH)/src/progs/manaverse/*.cpp) \ + $(wildcard $(LOCAL_PATH)/src/progs/manaverse/gui/*.cpp) \ + $(wildcard $(LOCAL_PATH)/src/progs/manaverse/actions/*.cpp) \ $(wildcard $(LOCAL_PATH)/src/resources/*.cpp) \ $(wildcard $(LOCAL_PATH)/src/resources/image/*.cpp) \ $(wildcard $(LOCAL_PATH)/src/resources/animation/*.cpp) \ @@ -1,8 +1,8 @@ -How to compile and run ManaVerse on your GNU/Linux Box -================================================= +How to compile and run ManaVerse on your GNU+Linux Box +====================================================== Homepage: http://manaverse.germantmw.de/ -IRC: irc.libera.chat:6697 (TLS) / #themanaworld-dev +IRC: irc.libera.chat:6697 (TLS) / #themanaworld-irc 1) Requirements 2) Compiling And Installing ManaVerse @@ -43,7 +43,7 @@ you to figure this out. 2. Compiling And Installing ManaVerse -==================================== +===================================== Building with GNU Autotools @@ -67,7 +67,7 @@ a different prefix to configure as usual. Rebuild the executable from scratch using "make clean" and then "make". -Building with CMake +Building with CMake (unsupported) 1) Create a directory for building and change to that directory. 2) Configure the build with: cmake <path_to_source> @@ -1,16 +1,13 @@ THE MANA VERSE CLIENT -=============== +===================== - Version: 1.0 Date: 2019-03-23 + Builds: + ManaVerse CI: https://git.themanaworld.org/mana/plus/-/pipelines + Windows: https://git.themanaworld.org/mana/docker-windows-builder/-/jobs/artifacts/master/browse?job=mxe_gcc5 + AppImg: https://git.themanaworld.org/mana/appimg-builder/-/jobs/artifacts/master/browse?job=x86_64-AppImage + deb: https://git.themanaworld.org/mana/appimg-builder/-/jobs/artifacts/master/browse?job=deb_pkg - Build status: - ManaVerse CI: https://git.themanaworld.org/mana/plus/badges/master/pipeline.svg - Windows: https://git.themanaworld.org/mana/docker-windows-builder/badges/master/pipeline.svg - AppImg: https://git.themanaworld.org/mana/appimg-builder/badges/master/pipeline.svg - deb: https://git.themanaworld.org/mana/appimg-builder/badges/master/pipeline.svg - Coverage: https://git.themanaworld.org/mana/plus/badges/master/coverage.svg - Doxygen: http://stats.manaplus.org/docs/index.html - Coverity: https://scan.coverity.com/projects/manaplus + See file INSTALL for build instructions. Development team: - See AUTHORS file for a list @@ -114,18 +111,17 @@ Actions: - /away MSG set away mode. - /follow NICK start follow mode. - /imitation NICK start imitation mode. -- /heal NICK heal nick. +- /heal NICK heal somebody by nickname - /move X Y move to X,Y position in short distance. - /navigate x y move to position x,y in current map in any distance. -- /mail NICK MSG send offline message to NICK. Working only in tmw server. +- /mail NICK MSG send offline message to NICK. Working only in servers with mail support. - /disconnect quick disconnect from server. - /attack attack target. -- /undress NICK remove all clothes from nick. Local effect only. Trade: - /trade NICK start trade with nick. -- /priceload load shop price from disc. -- /pricesave save shop price to disc. +- /priceload load shop price from disk. +- /pricesave save shop price to disk. Player relations: - /ignore NICK add nick to ignore list. @@ -142,35 +138,35 @@ Player relations: Debug: - /who print online players number to chat. - /all show visible beings list in debug tab. -- /where print current player position to chat. +- /where Show map and coordiantes of your avatar - /cacheinfo show text cache info. - /dirs show client directories in debug window. Other: - /help Displays the list of commands -- /announce broadcasts a global msg(Gm Cammand only) -- /who shows how many players are online -- /where displays the map name your currently on +- /announce (GM) broadcasts a global msg 4. Support ---------- -If you're having issues with this client, feel free to report them to us. -You can report on forum (http://forums.themanaworld.org/viewforum.php?f=12), -bugtracker (https://git.themanaworld.org/mana/plus/issues/) or other project -networks such as IRC. +Please report any issues you are having with this client. +You can report them at: + +- bugtracker: https://git.themanaworld.org/mana/plus/issues/ +- forum: http://forums.themanaworld.org/viewforum.php?f=56 +- IRC: https://web.libera.chat/?channels=themanaworld-irc +- Discord https://shields.io/discord/775612630836445206.svg?label=Discord +- In game: to game masters, developers or #world channel. If you have feedback about a specific game that uses the ManaVerse client, be sure -to contact the developers of the game instead. +to instead contact the developers of that game. 5. Licenses ----------- -All code in this repository under GPL 2+ license. Art can be under CC-BY-SA or GPL 2+. +All code in this repository is under GPL 2+ license. Art can be under CC-BY-SA or GPL 2+. -Github, Bitbucked or other non free hostings may use strange TOS what may violate this licenses. -If any of this hostings want to violate GPL or/and CC-BY-SA licenses, -they not have any rights to do so. -This hostings have rights to remove ManaVerse repositories if they want violate given licenses. +GitHub or other non-free hosting providers may use strange Terms of Service that may violate these licenses. +If any of their terms violate these licenses then these providers should remove ManaVerse repositories from their platforms. ManaVerse is a fork of ManaPlus, the main repository of the latter is hosted on https://gitlab.com/manaplus/manaplus/ @@ -2,16 +2,15 @@  -Version: 1.9.3.23 Date: 2019-03-23 - -### Build status - - - ManaVerse CI: [](https://git.themanaworld.org/mana/plus/commits/master) - - - Downloads: [](https://gitlab.com/themanaworld/manaplus/docker-windows-builder/commits/master), - [](https://git.themanaworld.org/mana/appimg-builder/commits/master), - [](https://git.themanaworld.org/mana/appimg-builder/commits/master) - +### Downloads and Build status +<!-- can't link to job pages directly (https://gitlab.com/gitlab-org/gitlab/-/issues/19845#note_435733246) + but the browse link has a job page reference and a download button. --> + <!-- direct link: */-/jobs/artifacts/master/download?job=mxe_gcc5 --> + [](https://git.themanaworld.org/mana/docker-windows-builder/-/jobs/artifacts/master/browse?job=mxe_gcc5) + [](https://git.themanaworld.org/mana/appimg-builder/-/jobs/artifacts/master/browse?job=x86_64-AppImage) + [](https://git.themanaworld.org/mana/appimg-builder/-/jobs/artifacts/master/browse?job=deb_pkg) + + [](https://git.themanaworld.org/mana/plus/-/pipelines) <!-- Cicle CI: [](https://circleci.com/gh/ManaPlus/ManaPlus/tree/master) @@ -23,12 +22,16 @@ Azure CI: [](https://dev.azure.com/manaplus/ManaPlus/_build/latest?definitionId=1) --> - - Coverage:  <!-- no pipeline rn --> + Click on an image above to download last good build or  - - Doxygen:  <!-- no pipeline rn --> +<!-- no pipelines rn :( - - Coverity:  <!-- no pipeline rn --> + - Coverage:  + - Doxygen:  + + - Coverity:  +--> ### Development team: - See [AUTHORS](AUTHORS) file for a list @@ -129,18 +132,17 @@ Whispers: - /away MSG set away mode. - /follow NICK start follow mode. - /imitation NICK start imitation mode. -- /heal NICK heal nick. +- /heal NICK heal somebody by nickname - /move X Y move to X,Y position in short distance. - /navigate x y move to position x,y in current map in any distance. -- /mail NICK MSG send offline message to NICK. Working only in tmw server. +- /mail NICK MSG send offline message to NICK. Working only in servers with mail support. - /disconnect quick disconnect from server. - /attack attack target. -- /undress NICK remove all clothes from nick. Local effect only. ### Trade: - /trade NICK start trade with nick. -- /priceload load shop price from disc. -- /pricesave save shop price to disc. +- /priceload load shop price from disk. +- /pricesave save shop price to disk. ### Player relations: - /ignore NICK add nick to ignore list. @@ -157,32 +159,34 @@ Whispers: ### Debug: - /who print online players number to chat. - /all show visible beings list in debug tab. -- /where print current player position to chat. +- /where Show map and coordiantes of your avatar - /cacheinfo show text cache info. - /dirs show client directories in debug window. ### Other: - /help Displays the list of commands -- /announce broadcasts a global msg(Gm Cammand only) -- /who shows how many players are online -- /where displays the map name your currently on +- /announce (GM) broadcasts a global msg ## 4. Support -If you're having issues with this client, feel free to report them to us. -You can report on [](http://forums.themanaworld.org/viewforum.php?f=12), -[](https://git.themanaworld.org/mana/plus/issues/), -[](web.libera.chat/?channels=themanaworld) or - +Please report any issues you are having with this client. +You can report them at: + +<!-- Can't easily get a badge for *open* issues from GitLab itself: https://stackoverflow.com/questions/48829255/gitlab-count-total-number-of-issues --> +-  (if you have a TMW GitLab account) +- [](https://forums.themanaworld.org/viewforum.php?f=56) +- [](https://web.libera.chat/?channels=themanaworld-irc) +-  +- In game: to game masters, developers or #world channel. If you have feedback about a specific game that uses the ManaVerse client, be sure -to contact the developers of the game instead. +to instead contact the developers of that game. ## 5. Licenses -All code in this repository under  license. Art can be under  or . +All code in this repository is under  license. Art can be under  or . -Github, Bitbucked or other non free hostings may use strange TOS what may violate this licenses. If any of this hostings want to violate GPL or/and CC-BY-SA licenses, -they not have any rights to do so. This hostings have rights to remove ManaVerse repositories if they want violate given licenses. +GitHub or other non-free hosting providers may use strange Terms of Service that may violate these licenses. +If any of their terms violate these licenses then these providers should remove ManaVerse repositories from their platforms. ManaVerse is a fork of ManaPlus, the main repository of the latter is hosted on [gitlab.com](https://gitlab.com/manaplus/manaplus/) diff --git a/build/bmake0 b/build/bmake0 index a8c44b597..71c6b587f 100755 --- a/build/bmake0 +++ b/build/bmake0 @@ -23,7 +23,7 @@ export CXXFLAGS="-Wvariadic-macros -Wvla -Wredundant-decls \ -Wstack-protector -Wshadow -Wunused-macros -Wsynth \ -Wbuiltin-macro-redefined -Wctor-dtor-privacy -Wdeprecated -Wextra \ -Wendif-labels -Wformat=1 -Wimport -Wnon-virtual-dtor -Wpsabi \ --Wsign-promo -Wwrite-strings -D_FORTIFY_SOURCE=2 -Wc++11-compat -std=c++0x \ +-Wsign-promo -Wwrite-strings -D_FORTIFY_SOURCE=2 -Wc++17-compat \ -Wdelete-non-virtual-dtor -Wmaybe-uninitialized -Wunused-local-typedefs \ -Wvector-operation-performance -Wfree-nonheap-object -Winvalid-memory-model \ -Wnarrowing -Wzero-as-null-pointer-constant \ diff --git a/build/bmake46 b/build/bmake46 index 55355b8d0..1c3082297 100755 --- a/build/bmake46 +++ b/build/bmake46 @@ -50,7 +50,7 @@ export CXXFLAGS="-Wvariadic-macros -Wvla -Wredundant-decls \ -Wstack-protector -Wshadow -Wunused -Wunused-macros -Wsynth \ -Wbuiltin-macro-redefined -Wctor-dtor-privacy -Wdeprecated -Wextra \ -Wendif-labels -Wformat=1 -Wimport -Wnon-virtual-dtor -Wpsabi \ --Wsign-promo -Wwrite-strings -D_FORTIFY_SOURCE=2 -Wc++0x-compat \ +-Wsign-promo -Wwrite-strings -D_FORTIFY_SOURCE=2 -Wc++17-compat \ -Wno-attributes" autoreconf -i diff --git a/configure.ac b/configure.ac index f6e2290d8..dc041d8c9 100755 --- a/configure.ac +++ b/configure.ac @@ -188,14 +188,14 @@ fi AM_CONDITIONAL(ENABLE_DYECMD, test "x$with_dyecmd" = xyes) -# Option to enable ManaPlus game -AC_ARG_WITH(manaplusgame,[ --without-manaplusgame don't build ManaPlus game ] ) -if test "x$with_manaplusgame" = "xno"; then - with_manaplusgame=no +# Option to enable ManaVerse game +AC_ARG_WITH(gameclient,[ --without-gameclient don't build ManaVerse game client ] ) +if test "x$with_gameclient" = "xno"; then + with_gameclient=no else - with_manaplusgame=yes + with_gameclient=yes fi -AM_CONDITIONAL(ENABLE_MANAPLUSGAME, test "x$with_manaplusgame" = xyes) +AM_CONDITIONAL(ENABLE_GAMECLIENT, test "x$with_gameclient" = xyes) # Enable nacl build AC_ARG_ENABLE(naclbuild, @@ -468,7 +468,7 @@ if test "x$xmllib" = "xlibxml"; then [libxml/xmlreader.h], , # workaround for icu-59 issue. - CPPFLAGS="$CPPFLAGS --std=c++0x" + CPPFLAGS="$CPPFLAGS -std=c++11" AC_MSG_RESULT([no]) AC_MSG_CHECKING([Checking libxml2 headers with icu bug fix]) icu_bug=yes @@ -940,8 +940,8 @@ AC_CONFIG_FILES([data/tmw/tmw], [chmod +x data/tmw/tmw]) AC_OUTPUT echo -if test "x$with_manaplusgame" = "xyes"; then - echo "Enabled building manaplus game." +if test "x$with_gameclient" = "xyes"; then + echo "Enabled building ManaVerse game client." fi if test "x$with_dyecmd" = "xyes"; then echo "Enabled building dyecmd tool." diff --git a/packaging/switch/CMakeLists.txt.switch b/packaging/switch/CMakeLists.txt.switch index 3895c9b0f..4520122ec 100644 --- a/packaging/switch/CMakeLists.txt.switch +++ b/packaging/switch/CMakeLists.txt.switch @@ -29,7 +29,7 @@ project(ManaPlus) file(GLOB SOURCES src/*.cpp) set(SOURCES_DIRS src/being src/enums/being src/fs src/gui src/input - src/listeners src/net src/particle src/progs/manaplus src/render + src/listeners src/net src/particle src/progs/manaverse src/render src/resources src/sdl2gfx src/test src/utils) foreach (DIR ${SOURCES_DIRS}) diff --git a/po/POTFILES.in b/po/POTFILES.in index 641a0e5d5..5bcdeb29e 100644 --- a/po/POTFILES.in +++ b/po/POTFILES.in @@ -1,3 +1,4 @@ +# Generated by ./po/POTgen.sh, do not edit manually src/actormanager.cpp src/being/being.cpp src/being/localplayer.cpp @@ -65,8 +66,8 @@ src/gui/widgets/tabs/setup_video.cpp src/gui/widgets/tabs/setup_visual.cpp src/gui/widgets/tabs/socialattacktab.h src/gui/widgets/tabs/socialfriendstab.h -src/gui/widgets/tabs/socialguildtab2.h src/gui/widgets/tabs/socialguildtab.h +src/gui/widgets/tabs/socialguildtab2.h src/gui/widgets/tabs/socialnavigationtab.h src/gui/widgets/tabs/socialpartytab.h src/gui/widgets/tabs/socialpickuptab.h @@ -146,6 +147,7 @@ src/net/ea/chatrecv.cpp src/net/ea/gamerecv.cpp src/net/ea/loginrecv.cpp src/net/ea/network.cpp +src/net/ea/traderecv.cpp src/net/eathena/charserverrecv.cpp src/net/eathena/chatrecv.cpp src/net/eathena/familyrecv.cpp @@ -161,7 +163,6 @@ src/net/eathena/maptypeproperty2.h src/net/eathena/playerrecv.cpp src/net/eathena/skillrecv.cpp src/net/eathena/vendingrecv.cpp -src/net/ea/traderecv.cpp src/net/tmwa/charserverhandler.cpp src/net/tmwa/charserverrecv.cpp src/net/tmwa/chatrecv.cpp @@ -172,15 +173,15 @@ src/net/tmwa/skillrecv.cpp src/pincodemanager.cpp src/progs/dyecmd/client.cpp src/progs/dyecmd/dyemain.cpp -src/progs/manaplus/actions/actions.cpp -src/progs/manaplus/actions/chat.cpp -src/progs/manaplus/actions/commands.cpp -src/progs/manaplus/actions/pets.cpp -src/progs/manaplus/actions/statusbar.cpp -src/progs/manaplus/actions/windows.cpp -src/progs/manaplus/client.cpp -src/render/rendererslistsdl2.h +src/progs/manaverse/actions/actions.cpp +src/progs/manaverse/actions/chat.cpp +src/progs/manaverse/actions/commands.cpp +src/progs/manaverse/actions/pets.cpp +src/progs/manaverse/actions/statusbar.cpp +src/progs/manaverse/actions/windows.cpp +src/progs/manaverse/client.cpp src/render/rendererslistsdl.h +src/render/rendererslistsdl2.h src/resources/beinginfo.cpp src/resources/db/avatardb.cpp src/resources/db/clandb.cpp diff --git a/po/POTgen.sh b/po/POTgen.sh index 15fc85677..a2b1ad31c 100755 --- a/po/POTgen.sh +++ b/po/POTgen.sh @@ -1,4 +1,25 @@ #!/bin/bash +# This program is run by a CI job -cd .. -grep "_(" -Irl src | sort >po/POTFILES.in +if [[ ! -d po || ! -d src ]]; then + printf "Please run this in top level directory" + exit 1 +fi + +printf "# Generated by %s, do not edit manually\n" "$0" > po/POTFILES.in + +#printf "Environment LANG is '%s'\n" "$(env | grep '^LANG=')" +#printf "Environment LC_COLLATE is '%s'\n" "$(env | grep '^LC_COLLATE=')" +#if command -v locale >/dev/null; then +# printf "locale LC_COLLATE is '%s'\n" "$(locale | grep '^LC_COLLATE=')" +#fi + +# See WARNING in manpage of GNU Coreutils sort: +# LC_COLLATE override is required to preserve the order of files +# across platforms. But it can be override by LC_ALL. +# But, LC_ALL should never be set in a sane environment. +grep "_(" src \ + --binary-files=without-match \ + --files-with-matches \ + --recursive \ + | LC_COLLATE="C" sort >> po/POTFILES.in diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 25d1e9be9..9f5a22e0f 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -579,8 +579,8 @@ SET(SRCS gui/windows/updaterwindow.h gui/userpalette.cpp gui/userpalette.h - progs/manaplus/gui/viewport.cpp - progs/manaplus/gui/viewport.h + progs/manaverse/gui/viewport.cpp + progs/manaverse/gui/viewport.h gui/viewport.h gui/windowmanager.cpp gui/windowmanager.h @@ -1052,23 +1052,23 @@ SET(SRCS test/testmain.h actions/actiondef.h actions/actionfuncptr.h - progs/manaplus/actions/actions.cpp + progs/manaverse/actions/actions.cpp actions/actions.h - progs/manaplus/actions/chat.cpp + progs/manaverse/actions/chat.cpp actions/chat.h - progs/manaplus/actions/commands.cpp + progs/manaverse/actions/commands.cpp actions/commands.h - progs/manaplus/actions/move.cpp + progs/manaverse/actions/move.cpp actions/move.h - progs/manaplus/actions/pets.cpp + progs/manaverse/actions/pets.cpp actions/pets.h - progs/manaplus/actions/statusbar.cpp + progs/manaverse/actions/statusbar.cpp actions/statusbar.h - progs/manaplus/actions/tabs.cpp + progs/manaverse/actions/tabs.cpp actions/tabs.h - progs/manaplus/actions/target.cpp + progs/manaverse/actions/target.cpp actions/target.h - progs/manaplus/actions/windows.cpp + progs/manaverse/actions/windows.cpp actions/windows.h being/actor.cpp being/actor.h @@ -1120,8 +1120,8 @@ SET(SRCS spellmanager.h chatlogger.cpp chatlogger.h - progs/manaplus/client.cpp - progs/manaplus/client.h + progs/manaverse/client.cpp + progs/manaverse/client.h client.h commandline.cpp commandline.h diff --git a/src/Makefile.am b/src/Makefile.am index a1934ac22..f11d310e4 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -7,7 +7,7 @@ AUTOMAKE_OPTIONS = subdir-objects #AM_TESTS_ENVIRONMENT = \ # ASAN_OPTIONS=detect_leaks=1 -if ENABLE_MANAPLUSGAME +if ENABLE_GAMECLIENT if ENABLE_DYECMD bin_PROGRAMS = manaplus dyecmd else @@ -48,10 +48,12 @@ manaplustests_CXXFLAGS += -DUNITTESTS_EMBED endif endif -dyecmd_CXXFLAGS = -DPKG_DATADIR=\""$(pkgdatadir)/"\" \ +dyecmd_CXXFLAGS = -std=c++11 \ + -DPKG_DATADIR=\""$(pkgdatadir)/"\" \ -DLOCALEDIR=\""$(localedir)"\" \ -Wall -manaplus_CXXFLAGS = -DPKG_DATADIR=\""$(pkgdatadir)/"\" \ +manaplus_CXXFLAGS = -std=c++11 \ + -DPKG_DATADIR=\""$(pkgdatadir)/"\" \ -DLOCALEDIR=\""$(localedir)"\" \ -Wall @@ -1700,19 +1702,19 @@ SRC = ${BASE_SRC} \ net/ea/tradehandler.h \ net/ea/traderecv.cpp \ net/ea/traderecv.h \ - progs/manaplus/actions/actions.cpp \ - progs/manaplus/actions/chat.cpp \ - progs/manaplus/actions/commands.cpp \ - progs/manaplus/actions/move.cpp \ - progs/manaplus/actions/pets.cpp \ - progs/manaplus/actions/statusbar.cpp \ - progs/manaplus/actions/tabs.cpp \ - progs/manaplus/actions/target.cpp \ - progs/manaplus/actions/windows.cpp \ - progs/manaplus/client.cpp \ - progs/manaplus/client.h \ - progs/manaplus/gui/viewport.cpp \ - progs/manaplus/gui/viewport.h + progs/manaverse/actions/actions.cpp \ + progs/manaverse/actions/chat.cpp \ + progs/manaverse/actions/commands.cpp \ + progs/manaverse/actions/move.cpp \ + progs/manaverse/actions/pets.cpp \ + progs/manaverse/actions/statusbar.cpp \ + progs/manaverse/actions/tabs.cpp \ + progs/manaverse/actions/target.cpp \ + progs/manaverse/actions/windows.cpp \ + progs/manaverse/client.cpp \ + progs/manaverse/client.h \ + progs/manaverse/gui/viewport.cpp \ + progs/manaverse/gui/viewport.h if ENABLE_TMWA manaplus_CXXFLAGS += -DTMWA_SUPPORT @@ -2126,7 +2128,7 @@ dyecmd_SOURCES += progs/dyecmd/gui/viewport.cpp \ progs/dyecmd/actions/target.cpp \ progs/dyecmd/actions/windows.cpp -if ENABLE_MANAPLUSGAME +if ENABLE_GAMECLIENT manaplus_SOURCES += ${SRC} endif diff --git a/src/actormanager.cpp b/src/actormanager.cpp index a7ebc8acc..80dc6e25d 100644 --- a/src/actormanager.cpp +++ b/src/actormanager.cpp @@ -817,14 +817,14 @@ bool ActorManager::pickUpAll(const int x1, const int y1, } bool ActorManager::pickUpNearest(const int x, const int y, - int maxdist) const + int maxDist) const { if (localPlayer == nullptr) return false; - maxdist = maxdist * maxdist; // avoids calculating square root FloorItem *closestItem = nullptr; - int dist = maxdist + 1; + // working with squared distances avoids calculating square root. + int closestDistSq = maxDist * maxDist + 1; // if "default" is in pickup items set, then the ignore list acts // as a blacklist. Otherwise, the pickup list acts as a whitelist. @@ -843,28 +843,28 @@ bool ActorManager::pickUpNearest(const int x, const int y, const int dx = item->getTileX() - x; const int dy = item->getTileY() - y; - const int d = dx*dx + dy*dy; + const int distSq = dx*dx + dy*dy; - if ((d < dist) && + if ((distSq < closestDistSq) && (!mTargetOnlyReachable || localPlayer->isReachable( item->getTileX(), item->getTileY(), false))) { if (allowAll) { - if (mIgnorePickupItemsSet.find(item->getName()) - == mIgnorePickupItemsSet.end()) - { - dist = d; + if (mIgnorePickupItemsSet.find(item->getName()) == + mIgnorePickupItemsSet.end()) + { // item is NOT in ignore set + closestDistSq = distSq; closestItem = item; } } else { - if (mPickupItemsSet.find(item->getName()) - != mPickupItemsSet.end()) + if (mPickupItemsSet.find(item->getName()) != + mPickupItemsSet.end()) { - dist = d; + closestDistSq = distSq; closestItem = item; } } @@ -909,8 +909,8 @@ Being *ActorManager::findNearestByName(const std::string &name, if (localPlayer == nullptr) return nullptr; - int dist = 0; Being* closestBeing = nullptr; + int closestDistSq = INT_MAX; const int x = localPlayer->getTileX(); const int y = localPlayer->getTileY(); @@ -920,8 +920,8 @@ Being *ActorManager::findNearestByName(const std::string &name, // if (reportTrue(*it == nullptr)) // continue; - if ((*it)->getType() == ActorType::FloorItem - || (*it)->getType() == ActorType::Portal) + if ((*it)->getType() == ActorType::FloorItem || + (*it)->getType() == ActorType::Portal) { continue; } @@ -932,17 +932,16 @@ Being *ActorManager::findNearestByName(const std::string &name, (type == ActorType::Unknown || type == being->getType())) { if (being->getType() == ActorType::Player) - { return being; - } + const int dx = being->getTileX() - x; const int dy = being->getTileY() - y; - const int d = dx*dx + dy*dy; + const int distSq = dx*dx + dy*dy; - if (validateBeing(nullptr, being, type, nullptr, 50) - && (d < dist || closestBeing == nullptr)) + if (distSq < closestDistSq + && validateBeing(nullptr, being, type, nullptr, 50)) { - dist = d; + closestDistSq = distSq; closestBeing = being; } } @@ -1082,7 +1081,7 @@ Being *ActorManager::findNearestPvpPlayer() const if (!((mapPvpMode != 0) || (teamId != 0))) continue; - if (!LocalPlayer::checAttackPermissions(being)) + if (!LocalPlayer::checkAttackPermissions(being)) continue; const int dx = being->getTileX() - localPlayer->getTileX(); @@ -1516,8 +1515,12 @@ Being* ActorManager::findMostDamagedPlayer(const int maxTileDist) const if (localPlayer == nullptr) return nullptr; + const int maxTileDistSq = maxTileDist * maxTileDist; int maxDamageTaken = 0; - Being *target = nullptr; + Being *maxDamagePlayer = nullptr; + + const int my_x = localPlayer->getTileX(); + const int my_y = localPlayer->getTileY(); for_actors { @@ -1526,29 +1529,31 @@ Being* ActorManager::findMostDamagedPlayer(const int maxTileDist) const Being *const being = static_cast<Being*>(*it); - if ((being == nullptr) || !being->isAlive() || // don't heal dead - playerRelations.getRelation(being->getName()) == - Relation::ENEMY2 || // don't heal enemy - localPlayer == being) // don't heal self + if ((being == nullptr) + || (localPlayer == being) // don't heal self + || (!being->isAlive()) ) // don't heal the dead { continue; } - const int dx = being->getTileX() - localPlayer->getTileX(); - const int dy = being->getTileY() - localPlayer->getTileY(); - const int distance = fastSqrtInt(dx * dx + dy * dy); + if (being->getDamageTaken() <= maxDamageTaken) + continue; - if (distance > maxTileDist) + const int dx = being->getTileX() - my_x; + const int dy = being->getTileY() - my_y; + const int distSq = dx*dx + dy*dy; + + if (distSq > maxTileDistSq) continue; - if (being->getDamageTaken() > maxDamageTaken) - { - maxDamageTaken = being->getDamageTaken(); - target = being; - } + if (playerRelations.getRelation(being->getName()) == Relation::ENEMY2) + continue; // don't heal enemy + + maxDamageTaken = being->getDamageTaken(); + maxDamagePlayer = being; } - return target; + return maxDamagePlayer; } #ifdef TMWA_SUPPORT diff --git a/src/actormanager.h b/src/actormanager.h index bea1267d1..43b9341b9 100644 --- a/src/actormanager.h +++ b/src/actormanager.h @@ -295,7 +295,7 @@ class ActorManager final : public ConfigListener const int y2, const bool serverBuggy) const; - bool pickUpNearest(const int x, const int y, int maxdist) const; + bool pickUpNearest(const int x, const int y, const int maxDist) const; void optionChanged(const std::string &name) override final; diff --git a/src/being/actorsprite.cpp b/src/being/actorsprite.cpp index 7bfb95df4..3beb5b9d2 100644 --- a/src/being/actorsprite.cpp +++ b/src/being/actorsprite.cpp @@ -281,7 +281,7 @@ static void applyEffectByOption1(ActorSprite *const actor, } } -void ActorSprite::setStatusEffectOpitons(const uint32_t option, +void ActorSprite::setStatusEffectOptions(const uint32_t option, const uint32_t opt1, const uint32_t opt2, const uint32_t opt3) @@ -296,7 +296,7 @@ void ActorSprite::setStatusEffectOpitons(const uint32_t option, StatusEffectDB::getOpt3Map()); } -void ActorSprite::setStatusEffectOpitons(const uint32_t option, +void ActorSprite::setStatusEffectOptions(const uint32_t option, const uint32_t opt1, const uint32_t opt2) { diff --git a/src/being/actorsprite.h b/src/being/actorsprite.h index 5b5b513ba..2ce25fb22 100644 --- a/src/being/actorsprite.h +++ b/src/being/actorsprite.h @@ -120,12 +120,12 @@ class ActorSprite notfinal : public CompoundSprite, public Actor const Enable active, const IsStart start); - void setStatusEffectOpitons(const uint32_t option, + void setStatusEffectOptions(const uint32_t option, const uint32_t opt1, const uint32_t opt2, const uint32_t opt3); - void setStatusEffectOpitons(const uint32_t option, + void setStatusEffectOptions(const uint32_t option, const uint32_t opt1, const uint32_t opt2); diff --git a/src/being/localplayer.cpp b/src/being/localplayer.cpp index f7576a01d..1e2f16bea 100644 --- a/src/being/localplayer.cpp +++ b/src/being/localplayer.cpp @@ -137,8 +137,7 @@ LocalPlayer::LocalPlayer(const BeingId id, mPingTime(0), mAfkTime(0), mActivityTime(0), - mNavigateX(0), - mNavigateY(0), + mNavigateDest(0, 0), mNavigateId(BeingId_zero), mCrossX(0), mCrossY(0), @@ -178,7 +177,7 @@ LocalPlayer::LocalPlayer(const BeingId id, mKeepAttacking(false), mPathSetByMouse(false), mWaitPing(false), - mShowNavigePath(false), + mShowNavigatePath(false), mAllowRename(false), mFreezed(false) { @@ -282,7 +281,7 @@ void LocalPlayer::logic() if (!mSyncPlayerMove) dist = 20; - if (((mNavigateX != 0) || (mNavigateY != 0)) && + if (((mNavigateDest.x != 0) || (mNavigateDest.y != 0)) && ((mCrossX + dist >= mX && mCrossX <= mX + dist && mCrossY + dist >= mY && mCrossY <= mY + dist) || ((mCrossX == 0) && (mCrossY == 0)))) @@ -549,13 +548,13 @@ bool LocalPlayer::pickUp(FloorItem *const item) break; case 1:// should never happen due to above check for adjecent-tile // pickup, but you never know. - navigateTo(item->getTileX(), item->getTileY()); + navigateTo({item->getTileX(), item->getTileY()}); break; default: { // at least two spots, move nearby. const Position& nearby = *(++debugPath.rbegin()); - navigateTo(nearby.x, nearby.y); + navigateTo(nearby); break; } } @@ -856,7 +855,7 @@ void LocalPlayer::attack(Being *const target, mActionTime = tick_time; if (target->getType() != ActorType::Player - || checAttackPermissions(target)) + || checkAttackPermissions(target)) { setAction(BeingAction::ATTACK, 0); @@ -1059,8 +1058,7 @@ void LocalPlayer::setGotoTarget(Being *const target) mPickUpTarget = nullptr; setTarget(target); mGoingToTarget = true; - navigateTo(target->mX, - target->mY); + navigateTo({target->mX, target->mY}); } void LocalPlayer::handleStatusEffect(const StatusEffect *const effect, @@ -1408,7 +1406,7 @@ void LocalPlayer::moveToTarget(int dist) limit = CAST_S32(sz) - dist; gotPos = true; } - else if ((mNavigateX != 0) || (mNavigateY != 0)) + else if ((mNavigateDest.x != 0) || (mNavigateDest.y != 0)) { debugPath = mNavigatePath; limit = dist; @@ -1420,7 +1418,7 @@ void LocalPlayer::moveToTarget(int dist) if (dist == 0) { if (mTarget != nullptr) - navigateTo(mTarget->mX, mTarget->mY); + navigateTo({mTarget->mX, mTarget->mY}); } else { @@ -1433,12 +1431,12 @@ void LocalPlayer::moveToTarget(int dist) { pos = (*i); } - navigateTo(pos.x, pos.y); + navigateTo(pos); } } else if ((mLastTargetX != 0) || (mLastTargetY != 0)) { - navigateTo(mLastTargetX, mLastTargetY); + navigateTo({mLastTargetX, mLastTargetY}); } } @@ -1466,7 +1464,7 @@ void LocalPlayer::moveToHome() } else { - navigateTo(CAST_S32(pos.x), CAST_S32(pos.y)); + navigateTo({CAST_S32(pos.x), CAST_S32(pos.y)}); } } } @@ -1710,8 +1708,11 @@ void LocalPlayer::moveByDirection(const unsigned char dir) void LocalPlayer::specialMove(const unsigned char direction) { - if ((direction != 0U) && ((mNavigateX != 0) || (mNavigateY != 0))) + if ((direction != 0U) + && ((mNavigateDest.x != 0) || (mNavigateDest.y != 0))) + { navigateClean(); + } if ((direction != 0U) && (settings.moveType >= 2 && settings.moveType <= 4)) @@ -2113,7 +2114,8 @@ void LocalPlayer::afkRespond(ChatTab *const tab, const std::string &nick) } } -bool LocalPlayer::navigateTo(const int x, const int y) + +bool LocalPlayer::navigateTo(const Position& to) { if (mMap == nullptr) return false; @@ -2122,20 +2124,19 @@ bool LocalPlayer::navigateTo(const int x, const int y) if (tmpLayer == nullptr) return false; - mShowNavigePath = true; + mShowNavigatePath = true; mOldX = mPixelX; mOldY = mPixelY; mOldTileX = mX; mOldTileY = mY; - mNavigateX = x; - mNavigateY = y; + mNavigateDest = to; mNavigateId = BeingId_zero; mNavigatePath = mMap->findPath( (mPixelX - mapTileSize / 2) / mapTileSize, (mPixelY - mapTileSize) / mapTileSize, - x, - y, + to.x, + to.y, getBlockWalkMask(), 0); @@ -2144,18 +2145,18 @@ bool LocalPlayer::navigateTo(const int x, const int y) return !mNavigatePath.empty(); } + void LocalPlayer::navigateClean() { if (mMap == nullptr) return; - mShowNavigePath = false; + mShowNavigatePath = false; mOldX = 0; mOldY = 0; mOldTileX = 0; mOldTileY = 0; - mNavigateX = 0; - mNavigateY = 0; + mNavigateDest = {0, 0}; mNavigateId = BeingId_zero; mNavigatePath.clear(); @@ -2223,11 +2224,10 @@ void LocalPlayer::updateCoords() navigateClean(); return; } - mNavigateX = being->mX; - mNavigateY = being->mY; + mNavigateDest = {being->mX, being->mY}; } - if (mNavigateX == x && mNavigateY == y) + if (mNavigateDest.x == x && mNavigateDest.y == y) { navigateClean(); return; @@ -2244,7 +2244,7 @@ void LocalPlayer::updateCoords() break; } } - if (mDrawPath && mShowNavigePath) + if (mDrawPath && mShowNavigatePath) { tmpLayer->clean(); tmpLayer->addRoad(mNavigatePath); @@ -2529,7 +2529,7 @@ void LocalPlayer::followMoveTo(const Being *const being, being->mName == mPlayerFollowed) { mPickUpTarget = nullptr; - navigateTo(x, y); + navigateTo({x, y}); } } @@ -2547,20 +2547,20 @@ void LocalPlayer::followMoveTo(const Being *const being, switch (settings.followMode) { case 0: - navigateTo(x1, y1); + navigateTo({x1, y1}); setNextDest(x2, y2); break; case 1: if (x1 != x2 || y1 != y2) { - navigateTo(mX + x2 - x1, mY + y2 - y1); + navigateTo({mX + x2 - x1, mY + y2 - y1}); setNextDest(mX + x2 - x1, mY + y2 - y1); } break; case 2: if (x1 != x2 || y1 != y2) { - navigateTo(mX + x1 - x2, mY + y1 - y2); + navigateTo({mX + x1 - x2, mY + y1 - y2}); setNextDest(mX + x1 - x2, mY + y1 - y2); } break; @@ -2638,13 +2638,13 @@ void LocalPlayer::fixPos() #endif setTileCoords(mCrossX, mCrossY); /* - if (mNavigateX != 0 || mNavigateY != 0) + if (mNavigateDest.x != 0 || mNavigateDest.y != 0) { #ifdef ENABLEDEBUGLOG logger->dlog(strprintf("Renavigate to (%d,%d)", - mNavigateX, mNavigateY)); + mNavigateDest.x, mNavigateDest.y)); #endif - navigateTo(mNavigateX, mNavigateY); + navigateTo({mNavigateDest.x, mNavigateDest.y}); } */ // alternative way to fix, move to real position @@ -2837,7 +2837,7 @@ void LocalPlayer::stopAdvert() mBlockAdvert = true; } -bool LocalPlayer::checAttackPermissions(const Being *const target) +bool LocalPlayer::checkAttackPermissions(const Being *const target) { if (target == nullptr) return false; diff --git a/src/being/localplayer.h b/src/being/localplayer.h index 05724a14a..a972e9d6e 100644 --- a/src/being/localplayer.h +++ b/src/being/localplayer.h @@ -243,10 +243,11 @@ class LocalPlayer final : public Being, static void setAfkMessage(std::string message); - bool navigateTo(const int x, const int y); + bool navigateTo(const Position& to); void navigateClean(); + void imitateEmote(const Being *const being, const unsigned char action) const; @@ -390,8 +391,8 @@ class LocalPlayer final : public Being, void addSpMessage(const int change); - static bool checAttackPermissions(const Being *const target) - A_WARN_UNUSED; + static bool checkAttackPermissions(const Being *const target) + A_WARN_UNUSED; void updateStatus() const; @@ -486,8 +487,7 @@ class LocalPlayer final : public Being, time_t mPingTime; time_t mAfkTime; time_t mActivityTime; - int mNavigateX; - int mNavigateY; + Position mNavigateDest; BeingId mNavigateId; int mCrossX; int mCrossY; @@ -531,7 +531,7 @@ class LocalPlayer final : public Being, // Tells if the path was set using mouse bool mPathSetByMouse; bool mWaitPing; - bool mShowNavigePath; + bool mShowNavigatePath; bool mAllowRename; bool mFreezed; }; diff --git a/src/client.h b/src/client.h index ad12c28a4..6dbda3801 100644 --- a/src/client.h +++ b/src/client.h @@ -1,6 +1,7 @@ /* * The ManaPlus Client - * Copyright (C) 2011-2019 The ManaPlus Developers + * Copyright (C) 2011-2020 The ManaPlus Developers + * Copyright (C) 2020-2023 The ManaVerse Developers * * This file is part of The ManaPlus Client. * @@ -25,7 +26,7 @@ #include "progs/dyecmd/client.h" PROGS_DYECMD_CLIENT_H #else // DYECMD -#include "progs/manaplus/client.h" -PROGS_MANAPLUS_CLIENT_H +#include "progs/manaverse/client.h" +PROGS_MANAVERSE_CLIENT_H #endif // DYECMD #endif // CLIENT_H diff --git a/src/dirs.cpp b/src/dirs.cpp index 44b23be0a..e564fe035 100644 --- a/src/dirs.cpp +++ b/src/dirs.cpp @@ -2,7 +2,8 @@ * The ManaPlus Client * Copyright (C) 2004-2009 The Mana World Development Team * Copyright (C) 2009-2010 The Mana Developers - * Copyright (C) 2011-2019 The ManaPlus Developers + * Copyright (C) 2011-2020 The ManaPlus Developers + * Copyright (C) 2020-2023 The ManaVerse Developers * * This file is part of The ManaPlus Client. * diff --git a/src/enums/magicschool.h b/src/enums/magicschool.h index 0299adf08..019ed53c6 100644 --- a/src/enums/magicschool.h +++ b/src/enums/magicschool.h @@ -26,6 +26,7 @@ #include "enums/simpletypes/enumdefines.h" +// These IDs are from world/map/db/const-magic.txt in TMW serverdata. enumStart(MagicSchool) { SkillMagic = 340, @@ -33,7 +34,8 @@ enumStart(MagicSchool) SkillMagicWar = 342, SkillMagicTransmute = 343, SkillMagicNature = 344, - SkillMagicAstral = 345 + SkillMagicAstral = 345, + SkillMagicDark = 346 } enumEnd(MagicSchool); diff --git a/src/enums/simpletypes/stringdefines.h b/src/enums/simpletypes/stringdefines.h index 4eaf0e76b..b11a80658 100644 --- a/src/enums/simpletypes/stringdefines.h +++ b/src/enums/simpletypes/stringdefines.h @@ -26,7 +26,7 @@ #define stringEnumStart(type) \ std::map<std::string, type> mStringsArray; \ - bool find(const std::string &key) \ + bool contains(const std::string &key) \ { \ return mStringsArray.find(key) != mStringsArray.end(); \ } \ diff --git a/src/enums/simpletypes/stringdefines2.h b/src/enums/simpletypes/stringdefines2.h index ab451347b..e162c014c 100644 --- a/src/enums/simpletypes/stringdefines2.h +++ b/src/enums/simpletypes/stringdefines2.h @@ -25,7 +25,7 @@ #include "localconsts.h" #define stringEnumDef(type) \ - bool find(const std::string &key); \ + bool contains(const std::string &key); \ type get(const std::string &key); \ void init(); diff --git a/src/fs/files.cpp b/src/fs/files.cpp index fcce1c0ea..1dcbb9962 100644 --- a/src/fs/files.cpp +++ b/src/fs/files.cpp @@ -1,6 +1,7 @@ /* * The ManaPlus Client - * Copyright (C) 2013-2019 The ManaPlus Developers + * Copyright (C) 2013-2020 The ManaPlus Developers + * Copyright (C) 2020-2023 The ManaVerse Developers * * This file is part of The ManaPlus Client. * diff --git a/src/fs/paths.cpp b/src/fs/paths.cpp index 942f69471..76dba99f3 100644 --- a/src/fs/paths.cpp +++ b/src/fs/paths.cpp @@ -1,6 +1,7 @@ /* * The ManaPlus Client - * Copyright (C) 2011-2019 The ManaPlus Developers + * Copyright (C) 2011-2020 The ManaPlus Developers + * Copyright (C) 2020-2023 The ManaVerse Developers * * This file is part of The ManaPlus Client. * diff --git a/src/game.cpp b/src/game.cpp index 69daa254d..8b8706a03 100644 --- a/src/game.cpp +++ b/src/game.cpp @@ -2,7 +2,8 @@ * The ManaPlus Client * Copyright (C) 2004-2009 The Mana World Development Team * Copyright (C) 2009-2010 The Mana Developers - * Copyright (C) 2011-2019 The ManaPlus Developers + * Copyright (C) 2011-2020 The ManaPlus Developers + * Copyright (C) 2020-2023 The ManaVerse Developers * * This file is part of The ManaPlus Client. * diff --git a/src/gui/models/magicschoolmodel.h b/src/gui/models/magicschoolmodel.h index 7237b5eec..b91af6cda 100644 --- a/src/gui/models/magicschoolmodel.h +++ b/src/gui/models/magicschoolmodel.h @@ -30,7 +30,9 @@ #include "localconsts.h" -const char *MAGIC_SCHOOL_TEXT[6] = +#define NUM_ELEMENTS(a) sizeof(a) / sizeof(a[0]) + +const char *MAGIC_SCHOOL_TEXT[] = { // TRANSLATORS: magic school N_("General Magic"), @@ -43,7 +45,9 @@ const char *MAGIC_SCHOOL_TEXT[6] = // TRANSLATORS: magic school N_("Nature Magic"), // TRANSLATORS: magic school - N_("Astral Magic") + N_("Astral Magic"), + // TRANSLATORS: magic school + N_("Dark Magic"), }; class MagicSchoolModel final : public ListModel @@ -57,7 +61,7 @@ class MagicSchoolModel final : public ListModel int getNumberOfElements() override final { - return 6; + return NUM_ELEMENTS(MAGIC_SCHOOL_TEXT); } std::string getElementAt(int i) override final diff --git a/src/gui/viewport.h b/src/gui/viewport.h index d5782986b..80327a3f1 100644 --- a/src/gui/viewport.h +++ b/src/gui/viewport.h @@ -1,6 +1,7 @@ /* * The ManaPlus Client - * Copyright (C) 2011-2019 The ManaPlus Developers + * Copyright (C) 2011-2020 The ManaPlus Developers + * Copyright (C) 2020-2023 The ManaVerse Developers * * This file is part of The ManaPlus Client. * @@ -25,8 +26,8 @@ #include "progs/dyecmd/gui/viewport.h" PROGS_DYECMD_GUI_VIEWPORT_H #else -#include "progs/manaplus/gui/viewport.h" -PROGS_MANAPLUS_GUI_VIEWPORT_H +#include "progs/manaverse/gui/viewport.h" +PROGS_MANAVERSE_GUI_VIEWPORT_H #endif // DYECMD #endif // GUI_VIEWPORT_H diff --git a/src/gui/widgets/avatarlistbox.cpp b/src/gui/widgets/avatarlistbox.cpp index 66c1b12c1..6c18643ba 100644 --- a/src/gui/widgets/avatarlistbox.cpp +++ b/src/gui/widgets/avatarlistbox.cpp @@ -629,7 +629,7 @@ void AvatarListBox::mousePressed(MouseEvent &event) else #endif // TMWA_SUPPORT { - localPlayer->navigateTo(ava->getX(), ava->getY()); + localPlayer->navigateTo({ava->getX(), ava->getY()}); } } else if (eventButton == MouseButton::RIGHT) diff --git a/src/gui/widgets/tabs/socialnavigationtab.h b/src/gui/widgets/tabs/socialnavigationtab.h index dc11060c0..4b69d0bbb 100644 --- a/src/gui/widgets/tabs/socialnavigationtab.h +++ b/src/gui/widgets/tabs/socialnavigationtab.h @@ -177,7 +177,7 @@ class SocialNavigationTab final : public SocialTab const Avatar *const ava = avatars->at(num); if (ava != nullptr) - localPlayer->navigateTo(ava->getX(), ava->getY()); + localPlayer->navigateTo({ava->getX(), ava->getY()}); } void updateNames() diff --git a/src/gui/windowmanager.cpp b/src/gui/windowmanager.cpp index e0172cca5..bbfd33db7 100644 --- a/src/gui/windowmanager.cpp +++ b/src/gui/windowmanager.cpp @@ -2,7 +2,8 @@ * The ManaPlus Client * Copyright (C) 2004-2009 The Mana World Development Team * Copyright (C) 2009-2010 The Mana Developers - * Copyright (C) 2011-2019 The ManaPlus Developers + * Copyright (C) 2011-2020 The ManaPlus Developers + * Copyright (C) 2020-2023 The ManaVerse Developers * * This file is part of The ManaPlus Client. * diff --git a/src/gui/windows/buydialog.cpp b/src/gui/windows/buydialog.cpp index 2786671cd..f30fb92e4 100644 --- a/src/gui/windows/buydialog.cpp +++ b/src/gui/windows/buydialog.cpp @@ -762,14 +762,12 @@ void BuyDialog::updateButtonsAndLabels() mMaxItems = 1; // Calculate how many the player can carry - using namespace PlayerInfo; // trick for line-length. const int itemWeight = item->getInfo().getWeight(); - // Should be inside if, but line-length... - const int myTotalWeight = getAttribute(Attributes::TOTAL_WEIGHT); - const int myMaxWeight = getAttribute(Attributes::MAX_WEIGHT); if (itemWeight != 0) { - const int myFreeWeight = myMaxWeight - myTotalWeight; + const int myFreeWeight + = PlayerInfo::getAttribute(Attributes::MAX_WEIGHT) + - PlayerInfo::getAttribute(Attributes::TOTAL_WEIGHT); const int canCarry = myFreeWeight / itemWeight; mMaxItems = std::min(mMaxItems, canCarry); } diff --git a/src/gui/windows/minimap.cpp b/src/gui/windows/minimap.cpp index d40efd032..ae1c0038e 100644 --- a/src/gui/windows/minimap.cpp +++ b/src/gui/windows/minimap.cpp @@ -495,11 +495,9 @@ void Minimap::mouseReleased(MouseEvent &event) if (event.getButton() == MouseButton::LEFT) { - int x = event.getX(); - int y = event.getY(); - screenToMap(x, y); - - localPlayer->navigateTo(x, y); + Position pos(event.getX(), event.getY()); + screenToMap(pos.x, pos.y); + localPlayer->navigateTo(pos); } else if (event.getButton() == MouseButton::RIGHT) { diff --git a/src/gui/windows/ministatuswindow.cpp b/src/gui/windows/ministatuswindow.cpp index e52a1a8d7..e62fd38dc 100644 --- a/src/gui/windows/ministatuswindow.cpp +++ b/src/gui/windows/ministatuswindow.cpp @@ -462,10 +462,20 @@ void MiniStatusWindow::mouseMoved(MouseEvent &event) } else if (event.getSource() == mWeightBar) { - textPopup->show(x + rect.x, y + rect.y, event.getSource()->getId(), - strprintf("%d/%d", PlayerInfo::getAttribute( - Attributes::TOTAL_WEIGHT), - PlayerInfo::getAttribute(Attributes::MAX_WEIGHT))); + const int totalWeight + = PlayerInfo::getAttribute(Attributes::TOTAL_WEIGHT); + const int maxWeight = PlayerInfo::getAttribute(Attributes::MAX_WEIGHT); + const int freeWeight = maxWeight - totalWeight; + // see maxWeight == 0 edge case in statuswindow for why: + const std::string freeWeightStr + = (freeWeight >= 0) + ? strprintf("Free: %d", freeWeight) + : ""; + + textPopup->show(x + rect.x, y + rect.y, + event.getSource()->getId(), + strprintf("%d/%d", totalWeight, maxWeight), + freeWeightStr); mStatusPopup->hide(); } else if (event.getSource() == mInvSlotsBar) diff --git a/src/gui/windows/statuswindow.cpp b/src/gui/windows/statuswindow.cpp index 6066ae592..95f76449f 100644 --- a/src/gui/windows/statuswindow.cpp +++ b/src/gui/windows/statuswindow.cpp @@ -239,7 +239,8 @@ StatusWindow::~StatusWindow() void StatusWindow::addTabs() { // TRANSLATORS: status window tab name - addTabBasic(_("Basic")); + mTabs->addTab(_("Basic"), mBasicStatsPage); + const STD_VECTOR<std::string> &pages = StatDb::getPages(); FOR_EACH(STD_VECTOR<std::string>::const_iterator, it, pages) { @@ -251,17 +252,10 @@ void StatusWindow::addTabs() void StatusWindow::addTab(const std::string &name) { StatsPage *const page = new StatsPage(this, name); - mTabs->addTab(name, - page); + mTabs->addTab(name, page); mPages.push_back(page); } -void StatusWindow::addTabBasic(const std::string &name) -{ - mTabs->addTab(name, - mBasicStatsPage); -} - void StatusWindow::updateLevelLabel() { if (localPlayer == nullptr) @@ -525,8 +519,8 @@ void StatusWindow::updateWeightBar(ProgressBar *const bar) } else { - const int totalWeight = PlayerInfo::getAttribute( - Attributes::TOTAL_WEIGHT); + const int totalWeight + = PlayerInfo::getAttribute(Attributes::TOTAL_WEIGHT); const int maxWeight = PlayerInfo::getAttribute(Attributes::MAX_WEIGHT); float progress = 1.0F; if (maxWeight != 0) diff --git a/src/gui/windows/statuswindow.h b/src/gui/windows/statuswindow.h index 04e04dfb2..d11762c80 100644 --- a/src/gui/windows/statuswindow.h +++ b/src/gui/windows/statuswindow.h @@ -91,7 +91,6 @@ class StatusWindow final : public Window, private: void addTabs(); void addTab(const std::string &name); - void addTabBasic(const std::string &name); static std::string translateLetter(const char *const letters); static std::string translateLetter2(const std::string &letters); diff --git a/src/gui/windows/updaterwindow.h b/src/gui/windows/updaterwindow.h index daa80f978..8ba66e08f 100644 --- a/src/gui/windows/updaterwindow.h +++ b/src/gui/windows/updaterwindow.h @@ -2,7 +2,8 @@ * The ManaPlus Client * Copyright (C) 2004-2009 The Mana World Development Team * Copyright (C) 2009-2010 The Mana Developers - * Copyright (C) 2011-2019 The ManaPlus Developers + * Copyright (C) 2011-2020 The ManaPlus Developers + * Copyright (C) 2020-2023 The ManaVerse Developers * * This file is part of The ManaPlus Client. * diff --git a/src/logger.cpp b/src/logger.cpp index c3c4cf699..ee95a85fe 100644 --- a/src/logger.cpp +++ b/src/logger.cpp @@ -2,7 +2,8 @@ * The ManaPlus Client * Copyright (C) 2004-2009 The Mana World Development Team * Copyright (C) 2009-2010 The Mana Developers - * Copyright (C) 2011-2019 The ManaPlus Developers + * Copyright (C) 2011-2020 The ManaPlus Developers + * Copyright (C) 2020-2023 The ManaVerse Developers * * This file is part of The ManaPlus Client. * diff --git a/src/logger.h b/src/logger.h index 4632c9bbf..b8c48e429 100644 --- a/src/logger.h +++ b/src/logger.h @@ -59,9 +59,6 @@ PRAGMA48(GCC diagnostic pop) #define UNIMPLEMENTEDPACKETFIELD(field) \ logger->unimplemented(msg.getId(), field) -#define WRONGPACKETSIZE \ - logger->unimplemented(CAST_U32(mId), mLength, mPos) - /** * The Log Class : Useful to write debug or info messages */ diff --git a/src/main.h b/src/main.h index b7cafe8e1..9b8d108a7 100644 --- a/src/main.h +++ b/src/main.h @@ -2,7 +2,8 @@ * The ManaPlus Client * Copyright (C) 2004-2009 The Mana World Development Team * Copyright (C) 2009-2010 The Mana Developers - * Copyright (C) 2011-2019 The ManaPlus Developers + * Copyright (C) 2011-2020 The ManaPlus Developers + * Copyright (C) 2020-2023 The ManaVerse Developers * * This file is part of The ManaPlus Client. * diff --git a/src/net/eathena/beingrecv.cpp b/src/net/eathena/beingrecv.cpp index 9d8c65389..5aedc9e01 100644 --- a/src/net/eathena/beingrecv.cpp +++ b/src/net/eathena/beingrecv.cpp @@ -597,10 +597,7 @@ void BeingRecv::processBeingVisible(Net::MessageIn &msg) msg.readString(24, "name"); } - dstBeing->setStatusEffectOpitons(option, - opt1, - opt2, - opt3); + dstBeing->setStatusEffectOptions(option, opt1, opt2, opt3); } void BeingRecv::processBeingMove(Net::MessageIn &msg) @@ -794,10 +791,7 @@ void BeingRecv::processBeingMove(Net::MessageIn &msg) msg.readString(24, "name"); } - dstBeing->setStatusEffectOpitons(option, - opt1, - opt2, - opt3); + dstBeing->setStatusEffectOptions(option, opt1, opt2, opt3); } void BeingRecv::processBeingSpawn(Net::MessageIn &msg) @@ -967,10 +961,7 @@ void BeingRecv::processBeingSpawn(Net::MessageIn &msg) msg.readString(24, "name"); } - dstBeing->setStatusEffectOpitons(option, - opt1, - opt2, - opt3); + dstBeing->setStatusEffectOptions(option, opt1, opt2, opt3); } void BeingRecv::processMapTypeProperty(Net::MessageIn &msg) @@ -1627,9 +1618,7 @@ void BeingRecv::processPlayerStatusChange(Net::MessageIn &msg) option = msg.readInt16("option"); dstBeing->setKarma(msg.readUInt8("karma")); - dstBeing->setStatusEffectOpitons(option, - opt1, - opt2); + dstBeing->setStatusEffectOptions(option, opt1, opt2); BLOCK_END("BeingRecv::processPlayerStop") } diff --git a/src/net/messagein.cpp b/src/net/messagein.cpp index 85430b4f4..0a85a981d 100644 --- a/src/net/messagein.cpp +++ b/src/net/messagein.cpp @@ -75,7 +75,8 @@ MessageIn::~MessageIn() CAST_U32(mId)); logger->log(" planned size: %u", mLength); logger->log(" read size: %u", mPos); - WRONGPACKETSIZE; + + logger->unimplemented(CAST_U32(mId), mLength, mPos); } } else diff --git a/src/net/tmwa/beingrecv.cpp b/src/net/tmwa/beingrecv.cpp index ae0b8df26..6d0811ac3 100644 --- a/src/net/tmwa/beingrecv.cpp +++ b/src/net/tmwa/beingrecv.cpp @@ -370,10 +370,7 @@ void BeingRecv::processPlayerUpdate1(Net::MessageIn &msg) dstBeing->setActionTime(tick_time); - dstBeing->setStatusEffectOpitons(option, - opt1, - opt2, - opt3); + dstBeing->setStatusEffectOptions(option, opt1, opt2, opt3); BLOCK_END("BeingRecv::processPlayerMoveUpdate") } @@ -512,10 +509,7 @@ void BeingRecv::processPlayerUpdate2(Net::MessageIn &msg) dstBeing->setLevel(level); dstBeing->setActionTime(tick_time); - dstBeing->setStatusEffectOpitons(option, - opt1, - opt2, - opt3); + dstBeing->setStatusEffectOptions(option, opt1, opt2, opt3); BLOCK_END("BeingRecv::processPlayerMoveUpdate") } @@ -684,10 +678,7 @@ void BeingRecv::processPlayerMove(Net::MessageIn &msg) if (dstBeing->getType() != ActorType::Player) dstBeing->setActionTime(tick_time); - dstBeing->setStatusEffectOpitons(option, - opt1, - opt2, - opt3); + dstBeing->setStatusEffectOptions(option, opt1, opt2, opt3); if (dstBeing->getType() == ActorType::Player) dstBeing->setMoveTime(); @@ -903,10 +894,7 @@ void BeingRecv::processBeingVisible(Net::MessageIn &msg) msg.readUInt8("unknown"); msg.readUInt8("unknown"); - dstBeing->setStatusEffectOpitons(option, - opt1, - opt2, - opt3); + dstBeing->setStatusEffectOptions(option, opt1, opt2, opt3); BLOCK_END("BeingRecv::processBeingVisibleOrMove") } @@ -1106,10 +1094,7 @@ void BeingRecv::processBeingMove(Net::MessageIn &msg) msg.readUInt8("unknown"); msg.readUInt8("unknown"); - dstBeing->setStatusEffectOpitons(option, - opt1, - opt2, - opt3); + dstBeing->setStatusEffectOptions(option, opt1, opt2, opt3); BLOCK_END("BeingRecv::processBeingVisibleOrMove") } @@ -1265,9 +1250,7 @@ void BeingRecv::processPlayerStatusChange(Net::MessageIn &msg) const uint32_t option = msg.readInt16("option"); msg.readUInt8("Unused?"); - dstBeing->setStatusEffectOpitons(option, - opt1, - opt2); + dstBeing->setStatusEffectOptions(option, opt1, opt2); BLOCK_END("BeingRecv::processPlayerStop") } diff --git a/src/net/tmwa/traderecv.cpp b/src/net/tmwa/traderecv.cpp index 101666820..433a1f62f 100644 --- a/src/net/tmwa/traderecv.cpp +++ b/src/net/tmwa/traderecv.cpp @@ -98,6 +98,9 @@ void TradeRecv::processTradeItemAddResponse(Net::MessageIn &msg) { // Trade: New Item add response (was 0x00ea, now 01b1) const int index = msg.readInt16("index") - INVENTORY_OFFSET; + const int quantity = msg.readInt16("amount"); + const uint8_t res = msg.readUInt8("status"); + Item *item = nullptr; if (PlayerInfo::getInventory() != nullptr) item = PlayerInfo::getInventory()->getItem(index); @@ -108,9 +111,7 @@ void TradeRecv::processTradeItemAddResponse(Net::MessageIn &msg) tradeWindow->receivedOk(true); return; } - const int quantity = msg.readInt16("amount"); - const uint8_t res = msg.readUInt8("status"); switch (res) { case 0: @@ -157,6 +158,8 @@ void TradeRecv::processTradeItemAddResponse(Net::MessageIn &msg) void TradeRecv::processTradeResponse(Net::MessageIn &msg) { + const uint8_t type = msg.readUInt8("type"); + if (tradePartnerName.empty() || !playerRelations.hasPermission(tradePartnerName, PlayerRelation::TRADE)) @@ -164,7 +167,6 @@ void TradeRecv::processTradeResponse(Net::MessageIn &msg) tradeHandler->respond(false); return; } - const uint8_t type = msg.readUInt8("type"); Ea::TradeRecv::processTradeResponseContinue(type); } diff --git a/src/particle/particleemitter.cpp b/src/particle/particleemitter.cpp index 9ec2eab36..3f96b6ee0 100644 --- a/src/particle/particleemitter.cpp +++ b/src/particle/particleemitter.cpp @@ -236,7 +236,7 @@ ParticleEmitter::ParticleEmitter(XmlNodeConstPtrConst emitterNode, else if (name == "follow-parent") { const std::string value = XML::getProperty(propertyNode, - "value", "0"); + "value", "1"); if (value == "1" || value == "true") mParticleFollow = true; } diff --git a/src/progs/dyecmd/client.cpp b/src/progs/dyecmd/client.cpp index ec88650c1..9460d1465 100644 --- a/src/progs/dyecmd/client.cpp +++ b/src/progs/dyecmd/client.cpp @@ -2,7 +2,8 @@ * The ManaPlus Client * Copyright (C) 2004-2009 The Mana World Development Team * Copyright (C) 2009-2010 The Mana Developers - * Copyright (C) 2011-2019 The ManaPlus Developers + * Copyright (C) 2011-2020 The ManaPlus Developers + * Copyright (C) 2020-2023 The ManaVerse Developers * * This file is part of The ManaPlus Client. * @@ -191,7 +192,7 @@ void Client::gameInit() else { settings.logFileName = pathJoin(settings.localDataDir, - "manaplus.log"); + "manaverse.log"); } logger->setLogFile(settings.logFileName); diff --git a/src/progs/manaplus/actions/actions.cpp b/src/progs/manaverse/actions/actions.cpp index 92c0f0050..8e997cb2a 100644 --- a/src/progs/manaplus/actions/actions.cpp +++ b/src/progs/manaverse/actions/actions.cpp @@ -1,6 +1,7 @@ /* * The ManaPlus Client - * Copyright (C) 2012-2019 The ManaPlus Developers + * Copyright (C) 2012-2020 The ManaPlus Developers + * Copyright (C) 2020-2023 The ManaVerse Developers * * This file is part of The ManaPlus Client. * diff --git a/src/progs/manaplus/actions/chat.cpp b/src/progs/manaverse/actions/chat.cpp index 22d0656cb..27963a75f 100644 --- a/src/progs/manaplus/actions/chat.cpp +++ b/src/progs/manaverse/actions/chat.cpp @@ -1,6 +1,7 @@ /* * The ManaPlus Client - * Copyright (C) 2012-2019 The ManaPlus Developers + * Copyright (C) 2012-2020 The ManaPlus Developers + * Copyright (C) 2020-2023 The ManaVerse Developers * * This file is part of The ManaPlus Client. * diff --git a/src/progs/manaplus/actions/commands.cpp b/src/progs/manaverse/actions/commands.cpp index 53c0996ac..087b96491 100644 --- a/src/progs/manaplus/actions/commands.cpp +++ b/src/progs/manaverse/actions/commands.cpp @@ -1,6 +1,7 @@ /* * The ManaPlus Client - * Copyright (C) 2012-2019 The ManaPlus Developers + * Copyright (C) 2012-2020 The ManaPlus Developers + * Copyright (C) 2020-2023 The ManaVerse Developers * * This file is part of The ManaPlus Client. * @@ -483,11 +484,10 @@ impHandler(navigate) return false; } - int x = 0; - int y = 0; + Position dest {0, 0}; - if (parse2Int(event.args, x, y)) - localPlayer->navigateTo(x, y); + if (parse2Int(event.args, dest.x, dest.y)) + localPlayer->navigateTo(dest); else localPlayer->navigateClean(); return true; @@ -509,7 +509,7 @@ impHandler(navigateTo) ActorType::Unknown); if (being != nullptr) { - localPlayer->navigateTo(being->getTileX(), being->getTileY()); + localPlayer->navigateTo({being->getTileX(), being->getTileY()}); } else if (localPlayer->isInParty()) { @@ -523,7 +523,7 @@ impHandler(navigateTo) o != nullptr && m->getMap() == o->getMap()) { - localPlayer->navigateTo(m->getX(), m->getY()); + localPlayer->navigateTo({m->getX(), m->getY()}); } } } diff --git a/src/progs/manaplus/actions/move.cpp b/src/progs/manaverse/actions/move.cpp index b9e658f81..38eff9403 100644 --- a/src/progs/manaplus/actions/move.cpp +++ b/src/progs/manaverse/actions/move.cpp @@ -1,6 +1,7 @@ /* * The ManaPlus Client - * Copyright (C) 2012-2019 The ManaPlus Developers + * Copyright (C) 2012-2020 The ManaPlus Developers + * Copyright (C) 2020-2023 The ManaVerse Developers * * This file is part of The ManaPlus Client. * diff --git a/src/progs/manaplus/actions/pets.cpp b/src/progs/manaverse/actions/pets.cpp index fd8c959f8..f4c3823a3 100644 --- a/src/progs/manaplus/actions/pets.cpp +++ b/src/progs/manaverse/actions/pets.cpp @@ -1,6 +1,7 @@ /* * The ManaPlus Client - * Copyright (C) 2012-2019 The ManaPlus Developers + * Copyright (C) 2012-2020 The ManaPlus Developers + * Copyright (C) 2020-2023 The ManaVerse Developers * * This file is part of The ManaPlus Client. * diff --git a/src/progs/manaplus/actions/statusbar.cpp b/src/progs/manaverse/actions/statusbar.cpp index 50ae32935..062d42a53 100644 --- a/src/progs/manaplus/actions/statusbar.cpp +++ b/src/progs/manaverse/actions/statusbar.cpp @@ -1,6 +1,7 @@ /* * The ManaPlus Client - * Copyright (C) 2012-2019 The ManaPlus Developers + * Copyright (C) 2012-2020 The ManaPlus Developers + * Copyright (C) 2020-2023 The ManaVerse Developers * * This file is part of The ManaPlus Client. * diff --git a/src/progs/manaplus/actions/tabs.cpp b/src/progs/manaverse/actions/tabs.cpp index 9a421bfa6..b5140a2e9 100644 --- a/src/progs/manaplus/actions/tabs.cpp +++ b/src/progs/manaverse/actions/tabs.cpp @@ -1,6 +1,7 @@ /* * The ManaPlus Client - * Copyright (C) 2012-2019 The ManaPlus Developers + * Copyright (C) 2012-2020 The ManaPlus Developers + * Copyright (C) 2020-2023 The ManaVerse Developers * * This file is part of The ManaPlus Client. * diff --git a/src/progs/manaplus/actions/target.cpp b/src/progs/manaverse/actions/target.cpp index 7760ff746..9b97cf576 100644 --- a/src/progs/manaplus/actions/target.cpp +++ b/src/progs/manaverse/actions/target.cpp @@ -1,6 +1,7 @@ /* * The ManaPlus Client - * Copyright (C) 2012-2019 The ManaPlus Developers + * Copyright (C) 2012-2020 The ManaPlus Developers + * Copyright (C) 2020-2023 The ManaVerse Developers * * This file is part of The ManaPlus Client. * diff --git a/src/progs/manaplus/actions/windows.cpp b/src/progs/manaverse/actions/windows.cpp index 2f803923e..9f8a68faa 100644 --- a/src/progs/manaplus/actions/windows.cpp +++ b/src/progs/manaverse/actions/windows.cpp @@ -1,6 +1,7 @@ /* * The ManaPlus Client - * Copyright (C) 2012-2019 The ManaPlus Developers + * Copyright (C) 2012-2020 The ManaPlus Developers + * Copyright (C) 2020-2023 The ManaVerse Developers * * This file is part of The ManaPlus Client. * diff --git a/src/progs/manaplus/client.cpp b/src/progs/manaverse/client.cpp index d8ba7e1c2..ad61670d7 100644 --- a/src/progs/manaplus/client.cpp +++ b/src/progs/manaverse/client.cpp @@ -2,7 +2,8 @@ * The ManaPlus Client * Copyright (C) 2004-2009 The Mana World Development Team * Copyright (C) 2009-2010 The Mana Developers - * Copyright (C) 2011-2019 The ManaPlus Developers + * Copyright (C) 2011-2020 The ManaPlus Developers + * Copyright (C) 2020-2023 The ManaVerse Developers * * This file is part of The ManaPlus Client. * @@ -20,7 +21,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#include "progs/manaplus/client.h" +#include "progs/manaverse/client.h" #include "chatlogger.h" #include "configmanager.h" @@ -311,7 +312,7 @@ void Client::gameInit() else { settings.logFileName = pathJoin(settings.localDataDir, - "manaplus.log"); + "manaverse.log"); } logger->log("Log file: " + settings.logFileName); logger->setLogFile(settings.logFileName); @@ -1342,6 +1343,7 @@ int Client::gameExec() // Choosing character on the command line should work only // once, clear it so that 'switch character' works. settings.options.character.clear(); + settings.options.chooseDefault = false; BLOCK_END("Client::gameExec State::CHAR_SELECT") break; diff --git a/src/progs/manaplus/client.h b/src/progs/manaverse/client.h index 26152270d..e74b179d2 100644 --- a/src/progs/manaplus/client.h +++ b/src/progs/manaverse/client.h @@ -2,7 +2,8 @@ * The ManaPlus Client * Copyright (C) 2004-2009 The Mana World Development Team * Copyright (C) 2009-2010 The Mana Developers - * Copyright (C) 2011-2019 The ManaPlus Developers + * Copyright (C) 2011-2020 The ManaPlus Developers + * Copyright (C) 2020-2023 The ManaVerse Developers * * This file is part of The ManaPlus Client. * @@ -20,8 +21,8 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef PROGS_MANAPLUS_CLIENT_H -#define PROGS_MANAPLUS_CLIENT_H +#ifndef PROGS_MANAVERSE_CLIENT_H +#define PROGS_MANAVERSE_CLIENT_H #include "enums/state.h" @@ -168,4 +169,4 @@ extern Client *client; extern unsigned int mLastHost; extern unsigned long mSearchHash; -#endif // PROGS_MANAPLUS_CLIENT_H +#endif // PROGS_MANAVERSE_CLIENT_H diff --git a/src/progs/manaplus/gui/viewport.cpp b/src/progs/manaverse/gui/viewport.cpp index 5483b3d0e..623378f5e 100644 --- a/src/progs/manaplus/gui/viewport.cpp +++ b/src/progs/manaverse/gui/viewport.cpp @@ -2,7 +2,8 @@ * The ManaPlus Client * Copyright (C) 2004-2009 The Mana World Development Team * Copyright (C) 2009-2010 The Mana Developers - * Copyright (C) 2011-2019 The ManaPlus Developers + * Copyright (C) 2011-2020 The ManaPlus Developers + * Copyright (C) 2020-2023 The ManaVerse Developers * * This file is part of The ManaPlus Client. * @@ -20,7 +21,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#include "progs/manaplus/gui/viewport.h" +#include "progs/manaverse/gui/viewport.h" #include "actormanager.h" #include "configuration.h" @@ -724,7 +725,7 @@ void Viewport::walkByMouse(const MouseEvent &event) BlockMask::WATER | BlockMask::PLAYERWALL)) { - localPlayer->navigateTo(playerX + dx, playerY + dy); + localPlayer->navigateTo({playerX + dx, playerY + dy}); } else { @@ -810,29 +811,27 @@ void Viewport::walkByMouse(const MouseEvent &event) } } } - localPlayer->navigateTo(playerX + dx, playerY + dy); + localPlayer->navigateTo({playerX + dx, playerY + dy}); } } else { - int destX; - int destY; - getMouseTile(event.getX(), event.getY(), - destX, destY); - if (playerX != destX || playerY != destY) + Position dest {0, 0}; + getMouseTile(event.getX(), event.getY(), dest.x, dest.y); + if (playerX != dest.x || playerY != dest.y) { - if (!localPlayer->navigateTo(destX, destY)) + if (!localPlayer->navigateTo(dest)) { - if (playerX > destX) + if (playerX > dest.x) playerX --; - else if (playerX < destX) + else if (playerX < dest.x) playerX ++; - if (playerY > destY) + if (playerY > dest.y) playerY --; - else if (playerY < destY) + else if (playerY < dest.y) playerY ++; if (mMap->getWalk(playerX, playerY, 0)) - localPlayer->navigateTo(playerX, playerY); + localPlayer->navigateTo({playerX, playerY}); } } } diff --git a/src/progs/manaplus/gui/viewport.h b/src/progs/manaverse/gui/viewport.h index ae92c7ccd..781f4255f 100644 --- a/src/progs/manaplus/gui/viewport.h +++ b/src/progs/manaverse/gui/viewport.h @@ -2,7 +2,8 @@ * The ManaPlus Client * Copyright (C) 2004-2009 The Mana World Development Team * Copyright (C) 2009-2010 The Mana Developers - * Copyright (C) 2011-2019 The ManaPlus Developers + * Copyright (C) 2011-2020 The ManaPlus Developers + * Copyright (C) 2020-2023 The ManaVerse Developers * * This file is part of The ManaPlus Client. * @@ -20,8 +21,8 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef PROGS_MANAPLUS_GUI_VIEWPORT_H -#define PROGS_MANAPLUS_GUI_VIEWPORT_H +#ifndef PROGS_MANAVERSE_GUI_VIEWPORT_H +#define PROGS_MANAVERSE_GUI_VIEWPORT_H #include "position.h" @@ -246,4 +247,4 @@ class Viewport final : public WindowContainer, extern Viewport *viewport; /**< The viewport. */ -#endif // PROGS_MANAPLUS_GUI_VIEWPORT_H +#endif // PROGS_MANAVERSE_GUI_VIEWPORT_H diff --git a/src/render/mobileopengl2graphics.cpp b/src/render/mobileopengl2graphics.cpp index 7c484a2c6..ef2a248af 100644 --- a/src/render/mobileopengl2graphics.cpp +++ b/src/render/mobileopengl2graphics.cpp @@ -2,7 +2,8 @@ * The ManaPlus Client * Copyright (C) 2004-2009 The Mana World Development Team * Copyright (C) 2009-2010 The Mana Developers - * Copyright (C) 2011-2019 The ManaPlus Developers + * Copyright (C) 2011-2020 The ManaPlus Developers + * Copyright (C) 2020-2023 The ManaVerse Developers * * This file is part of The ManaPlus Client. * @@ -169,7 +170,7 @@ void MobileOpenGL2Graphics::postInit() restrict2 if (mProgram == nullptr) { graphicsManager.logError(); - logger->safeError("Shader creation error. See manaplus.log."); + logger->safeError("Shader creation error. See manaverse.log."); } mProgramId = mProgram->getProgramId(); if (mProgramId == 0U) diff --git a/src/render/modernopenglgraphics.cpp b/src/render/modernopenglgraphics.cpp index 95e7140c0..afc424f6e 100644 --- a/src/render/modernopenglgraphics.cpp +++ b/src/render/modernopenglgraphics.cpp @@ -2,7 +2,8 @@ * The ManaPlus Client * Copyright (C) 2004-2009 The Mana World Development Team * Copyright (C) 2009-2010 The Mana Developers - * Copyright (C) 2011-2019 The ManaPlus Developers + * Copyright (C) 2011-2020 The ManaPlus Developers + * Copyright (C) 2020-2023 The ManaVerse Developers * * This file is part of The ManaPlus Client. * @@ -174,7 +175,7 @@ void ModernOpenGLGraphics::postInit() restrict2 if (mProgram == nullptr) { graphicsManager.logError(); - logger->safeError("Shader creation error. See manaplus.log."); + logger->safeError("Shader creation error. See manaverse.log."); } mProgramId = mProgram->getProgramId(); if (mProgramId == 0U) diff --git a/src/resources/db/emotedb.cpp b/src/resources/db/emotedb.cpp index 92ad983e5..6785b9516 100644 --- a/src/resources/db/emotedb.cpp +++ b/src/resources/db/emotedb.cpp @@ -1,7 +1,8 @@ /* * The ManaPlus Client * Copyright (C) 2009 Aethyra Development Team - * Copyright (C) 2011-2019 The ManaPlus Developers + * Copyright (C) 2011-2020 The ManaPlus Developers + * Copyright (C) 2020-2023 The ManaVerse Developers * * This file is part of The ManaPlus Client. * diff --git a/src/resources/db/statdb.cpp b/src/resources/db/statdb.cpp index d86ac5eb5..adedb1102 100644 --- a/src/resources/db/statdb.cpp +++ b/src/resources/db/statdb.cpp @@ -97,72 +97,44 @@ void StatDb::load() mLoaded = true; } -static void loadBasicStats(XmlNodeConstPtr rootNode) -{ - const int maxAttr = static_cast<int>(Attributes::MAX_ATTRIBUTE); - for_each_xml_child_node(node, rootNode) - { - if (xmlNameEqual(node, "stat")) - { - const std::string name = XML::getProperty(node, "name", ""); - const std::string attr = XML::getProperty(node, "attr", ""); - if (attr.empty() || AttributesEnum::find(attr) == false) - { - const int id = XML::getProperty(node, "id", 0); - if (id <= 0 || id >= maxAttr) - { - reportAlways("Wrong attr or id for basic " - "stat with name %s", - name.c_str()) - continue; - } - const std::string tag = XML::getProperty(node, "tag", ""); - mBasicStats.push_back(BasicStat(static_cast<AttributesT>(id), - tag, - name)); - } - else - { - const std::string tag = XML::getProperty(node, "tag", ""); - mBasicStats.push_back(BasicStat(AttributesEnum::get(attr), - tag, - name)); - } - } - } -} - static void loadStats(XmlNodeConstPtr rootNode, + const bool isBasic, const std::string &page) { const int maxAttr = static_cast<int>(Attributes::MAX_ATTRIBUTE); - STD_VECTOR<BasicStat> &stats = mStats[page]; - mPages.push_back(page); + STD_VECTOR<BasicStat> &stats = isBasic ? mBasicStats : mStats[page]; + if (!isBasic) + mPages.push_back(page); + for_each_xml_child_node(node, rootNode) { if (xmlNameEqual(node, "stat")) { const std::string name = XML::getProperty(node, "name", ""); const std::string attr = XML::getProperty(node, "attr", ""); - if (attr.empty() || AttributesEnum::find(attr) == false) + const std::string tag = XML::getProperty(node, "tag", ""); + if (attr.empty() || AttributesEnum::contains(attr) == false) { const int id = XML::getProperty(node, "id", 0); if (id <= 0 || id >= maxAttr) { - reportAlways("Wrong attr or id for extended " - "stat with name %s", - name.c_str()) - continue; + reportAlways("Wrong attr or id for %s stat with name %s", + (isBasic ? "basic" : "extended"), + name.c_str()) + } + else + { + reportAlways("StatDb: stat name '%s' has empty attr field" + ", using legacy method (id).", + name.c_str()); + stats.push_back(BasicStat(static_cast<AttributesT>(id), + tag, name)); } - stats.push_back(BasicStat(static_cast<AttributesT>(id), - std::string(), - name)); } else { stats.push_back(BasicStat(AttributesEnum::get(attr), - std::string(), - name)); + tag, name)); } } } @@ -192,16 +164,15 @@ void StatDb::loadXmlFile(const std::string &fileName, const std::string name = XML::getProperty(node, "name", ""); if (!name.empty()) loadXmlFile(name, skipError); - continue; } else if (xmlNameEqual(node, "basic")) { - loadBasicStats(node); + loadStats(node, true, ""); } else if (xmlNameEqual(node, "extended")) { // TRANSLATORS: stats page name - loadStats(node, _("Extended")); + loadStats(node, false, _("Extended")); } else if (xmlNameEqual(node, "page")) { @@ -211,9 +182,10 @@ void StatDb::loadXmlFile(const std::string &fileName, reportAlways("Page without name in stats.xml") page = "Unknown"; } - loadStats(node, page); + loadStats(node, false, page); } } + if (skipError == SkipError_false) { if (mBasicStats.empty() && diff --git a/src/resources/item/shopitem.cpp b/src/resources/item/shopitem.cpp index c724be7ca..efbda00ec 100644 --- a/src/resources/item/shopitem.cpp +++ b/src/resources/item/shopitem.cpp @@ -105,13 +105,16 @@ void ShopItem::updateDisplayName(const int quantity) else #endif // TMWA_SUPPORT mDisplayName = std::string(getInfo().getName(mColor)); + if (mPrice != 0) { mDisplayName.append(" (").append( UnitsDb::formatCurrency(mCurrency, mPrice)).append(") "); } - if (mShowQuantity && quantity > 1) + + if (mShowQuantity && quantity > 0) mDisplayName.append("[").append(toString(quantity)).append("]"); + if (mUsedQuantity > 0) mDisplayName.append(" +").append(toString(mUsedQuantity)); } @@ -144,8 +147,7 @@ int ShopItem::sellCurrentDuplicate(const int quantity) if (dupl == nullptr) return 0; - const int sellCount = quantity <= dupl->quantity - ? quantity : dupl->quantity; + const int sellCount = std::min(quantity, dupl->quantity); dupl->quantity -= sellCount; mQuantity -= sellCount; if (dupl->quantity == 0) @@ -158,18 +160,18 @@ int ShopItem::sellCurrentDuplicate(const int quantity) void ShopItem::increaseUsedQuantity(const int amount) { + const int newUsedQuantity = mUsedQuantity + amount; if (mShowQuantity && (mQuantity != 0)) { - if (mQuantity < mUsedQuantity + amount || - mUsedQuantity + amount < 0) + if (newUsedQuantity < 0 || mQuantity < newUsedQuantity) { return; } } - else if (mUsedQuantity + amount < 0) + else if (newUsedQuantity < 0) { return; } - mUsedQuantity += amount; + mUsedQuantity = newUsedQuantity; } diff --git a/src/test/testlauncher.cpp b/src/test/testlauncher.cpp index 6dea65522..a385abbea 100644 --- a/src/test/testlauncher.cpp +++ b/src/test/testlauncher.cpp @@ -1,6 +1,7 @@ /* * The ManaPlus Client - * Copyright (C) 2011-2019 The ManaPlus Developers + * Copyright (C) 2011-2020 The ManaPlus Developers + * Copyright (C) 2020-2023 The ManaVerse Developers * * This file is part of The ManaPlus Client. * diff --git a/src/test/testmain.cpp b/src/test/testmain.cpp index 38f35d335..1ca8adb1e 100644 --- a/src/test/testmain.cpp +++ b/src/test/testmain.cpp @@ -1,6 +1,7 @@ /* * The ManaPlus Client - * Copyright (C) 2011-2019 The ManaPlus Developers + * Copyright (C) 2011-2020 The ManaPlus Developers + * Copyright (C) 2020-2023 The ManaVerse Developers * * This file is part of The ManaPlus Client. * diff --git a/src/unittests/doctest.h b/src/unittests/doctest.h index 3642c2768..c7a745bb0 100644 --- a/src/unittests/doctest.h +++ b/src/unittests/doctest.h @@ -1311,7 +1311,7 @@ namespace detail { // clang-format off template <int, class L, class R> struct RelationalComparator { bool operator()(const DOCTEST_REF_WRAP(L), const DOCTEST_REF_WRAP(R) ) const { return false; } }; - + #define DOCTEST_BINARY_RELATIONAL_OP(n, op) \ template <class L, class R> struct RelationalComparator<n, L, R> { bool operator()(const DOCTEST_REF_WRAP(L) lhs, const DOCTEST_REF_WRAP(R) rhs) const { return op(lhs, rhs); } }; // clang-format on diff --git a/src/unittests/utils/xmlutils.cc b/src/unittests/utils/xmlutils.cc index 482580af5..1028a99e0 100644 --- a/src/unittests/utils/xmlutils.cc +++ b/src/unittests/utils/xmlutils.cc @@ -1,6 +1,7 @@ /* * The ManaPlus Client - * Copyright (C) 2014-2019 The ManaPlus Developers + * Copyright (C) 2014-2020 The ManaPlus Developers + * Copyright (C) 2020-2023 The ManaVerse Developers * * This file is part of The ManaPlus Client. * diff --git a/src/utils/checkutils.h b/src/utils/checkutils.h index 0d20673b8..5ef46110d 100644 --- a/src/utils/checkutils.h +++ b/src/utils/checkutils.h @@ -38,8 +38,7 @@ LOGGER_H #define reportAlwaysReal(...) \ { \ logger->log("Assert:"); \ - logger->assertLog( \ - __VA_ARGS__); \ + logger->assertLog(__VA_ARGS__); \ reportLogStack(__FILE__, __LINE__, __func__); \ } @@ -152,8 +151,7 @@ LOGGER_H #define failAlways(...) \ { \ logger->log("Assert:"); \ - logger->assertLog( \ - __VA_ARGS__); \ + logger->assertLog(__VA_ARGS__); \ reportLogStack(__FILE__, __LINE__, __func__); \ throw new std::exception(); \ } @@ -178,8 +176,7 @@ void reportStack(); #define reportAlwaysReal(...) \ { \ logger->log("Error:"); \ - logger->log( \ - __VA_ARGS__); \ + logger->log(__VA_ARGS__); \ } #define returnFalseVReal(val) \ diff --git a/src/utils/gettexthelper.cpp b/src/utils/gettexthelper.cpp index 66ebcb469..33b366ad1 100644 --- a/src/utils/gettexthelper.cpp +++ b/src/utils/gettexthelper.cpp @@ -1,6 +1,7 @@ /* * The ManaPlus Client - * Copyright (C) 2011-2019 The ManaPlus Developers + * Copyright (C) 2011-2020 The ManaPlus Developers + * Copyright (C) 2020-2023 The ManaVerse Developers * * This file is part of The ManaPlus Client. * diff --git a/src/utils/translation/translationmanager.cpp b/src/utils/translation/translationmanager.cpp index c5bad1a55..e75ef4857 100644 --- a/src/utils/translation/translationmanager.cpp +++ b/src/utils/translation/translationmanager.cpp @@ -1,6 +1,7 @@ /* * The ManaPlus Client - * Copyright (C) 2012-2019 The ManaPlus Developers + * Copyright (C) 2012-2020 The ManaPlus Developers + * Copyright (C) 2020-2023 The ManaVerse Developers * * This file is part of The ManaPlus Client. * diff --git a/tools/ci/branches/ci_clang6/.gitlab-ci.yml b/tools/ci/branches/ci_clang6/.gitlab-ci.yml index 0ec29486d..d4ff597cb 100644 --- a/tools/ci/branches/ci_clang6/.gitlab-ci.yml +++ b/tools/ci/branches/ci_clang6/.gitlab-ci.yml @@ -18,7 +18,7 @@ clang-6.0_tests: stage: build script: - ./tools/ci/scripts/patchsdl1.sh - - ./tools/ci/jobs/clang60_tests.sh --without-dyecmd --without-manaplusgame + - ./tools/ci/jobs/clang60_tests.sh --without-dyecmd --without-gameclient <<: *job-push image: debian:bullseye variables: @@ -34,7 +34,7 @@ clang-6.0_tests_i386: stage: build script: - ./tools/ci/scripts/patchsdl1.sh - - ./tools/ci/jobs/clang60_tests.sh --without-dyecmd --without-manaplusgame + - ./tools/ci/jobs/clang60_tests.sh --without-dyecmd --without-gameclient <<: *job-push image: i386/debian:bullseye variables: @@ -49,7 +49,7 @@ clang-6.0_tests_i386: clang-6.0_tests_sdl2: stage: build script: - - ./tools/ci/jobs/clang60_tests.sh --with-sdl2 --without-dyecmd --without-manaplusgame + - ./tools/ci/jobs/clang60_tests.sh --with-sdl2 --without-dyecmd --without-gameclient <<: *job-push image: debian:bullseye variables: @@ -64,7 +64,7 @@ clang-6.0_tests_sdl2: clang-6.0_tests_sdl2_i386: stage: build script: - - ./tools/ci/jobs/clang60_tests.sh --with-sdl2 --without-dyecmd --without-manaplusgame + - ./tools/ci/jobs/clang60_tests.sh --with-sdl2 --without-dyecmd --without-gameclient <<: *job-push image: i386/debian:bullseye variables: diff --git a/tools/ci/branches/ci_clang7/.gitlab-ci.yml b/tools/ci/branches/ci_clang7/.gitlab-ci.yml index fd92572f6..1763337b1 100644 --- a/tools/ci/branches/ci_clang7/.gitlab-ci.yml +++ b/tools/ci/branches/ci_clang7/.gitlab-ci.yml @@ -18,7 +18,7 @@ clang-7.0_tests: stage: build script: - ./tools/ci/scripts/patchsdl1.sh - - ./tools/ci/jobs/clang70_tests.sh --without-dyecmd --without-manaplusgame + - ./tools/ci/jobs/clang70_tests.sh --without-dyecmd --without-gameclient <<: *job-push image: debian:buster variables: @@ -34,7 +34,7 @@ clang-7.0_tests_i386: stage: build script: - ./tools/ci/scripts/patchsdl1.sh - - ./tools/ci/jobs/clang70_tests.sh --without-dyecmd --without-manaplusgame + - ./tools/ci/jobs/clang70_tests.sh --without-dyecmd --without-gameclient <<: *job-push image: i386/debian:buster variables: @@ -49,7 +49,7 @@ clang-7.0_tests_i386: clang-7.0_tests_sdl2: stage: build script: - - ./tools/ci/jobs/clang70_tests.sh --with-sdl2 --without-dyecmd --without-manaplusgame + - ./tools/ci/jobs/clang70_tests.sh --with-sdl2 --without-dyecmd --without-gameclient <<: *job-push image: debian:buster variables: @@ -64,7 +64,7 @@ clang-7.0_tests_sdl2: clang-7.0_tests_sdl2_i386: stage: build script: - - ./tools/ci/jobs/clang70_tests.sh --with-sdl2 --without-dyecmd --without-manaplusgame + - ./tools/ci/jobs/clang70_tests.sh --with-sdl2 --without-dyecmd --without-gameclient <<: *job-push image: i386/debian:buster variables: diff --git a/tools/ci/branches/ci_fedora/.gitlab-ci.yml b/tools/ci/branches/ci_fedora/.gitlab-ci.yml index 125b2f9d2..d6a8c7b44 100644 --- a/tools/ci/branches/ci_fedora/.gitlab-ci.yml +++ b/tools/ci/branches/ci_fedora/.gitlab-ci.yml @@ -20,7 +20,7 @@ stage: build script: - ./tools/ci/scripts/patchsdl1.sh - - ./tools/ci/jobs/gccsnapshot_sanitize_tests.sh --without-dyecmd --without-manaplusgame + - ./tools/ci/jobs/gccsnapshot_sanitize_tests.sh --without-dyecmd --without-gameclient - ldd ./src/manaplustests | grep "libasan" <<: *job-push image: fedora:rawhide @@ -34,7 +34,7 @@ .fedora_gcc-snapshot_sanitize_sdl2_tests: stage: build script: - - ./tools/ci/jobs/gccsnapshot_sanitize_tests.sh --with-sdl2 --without-dyecmd --without-manaplusgame + - ./tools/ci/jobs/gccsnapshot_sanitize_tests.sh --with-sdl2 --without-dyecmd --without-gameclient - ldd ./src/manaplustests | grep "libasan" <<: *job-push image: fedora:rawhide @@ -49,7 +49,7 @@ fedora_gcc-snapshot_tests: stage: build script: - ./tools/ci/scripts/patchsdl1.sh - - ./tools/ci/jobs/gccsnapshot_tests.sh --without-dyecmd --without-manaplusgame + - ./tools/ci/jobs/gccsnapshot_tests.sh --without-dyecmd --without-gameclient <<: *job-push image: fedora:rawhide variables: @@ -62,7 +62,7 @@ fedora_gcc-snapshot_tests: fedora_gcc-snapshot_sdl2_tests: stage: build script: - - ./tools/ci/jobs/gccsnapshot_tests.sh --with-sdl2 --without-dyecmd --without-manaplusgame + - ./tools/ci/jobs/gccsnapshot_tests.sh --with-sdl2 --without-dyecmd --without-gameclient <<: *job-push image: fedora:rawhide variables: diff --git a/tools/ci/branches/ci_gcc10_tests/.gitlab-ci.yml b/tools/ci/branches/ci_gcc10_tests/.gitlab-ci.yml index 48caf86ff..57ef7311e 100644 --- a/tools/ci/branches/ci_gcc10_tests/.gitlab-ci.yml +++ b/tools/ci/branches/ci_gcc10_tests/.gitlab-ci.yml @@ -21,7 +21,7 @@ stage: build script: - ./tools/ci/scripts/patchsdl1.sh - - ./tools/ci/jobs/gcc10_sanitize_tests.sh --enable-unittests=doctest --without-dyecmd --without-manaplusgame + - ./tools/ci/jobs/gcc10_sanitize_tests.sh --enable-unittests=doctest --without-dyecmd --without-gameclient - ldd ./src/manaplustests | grep "libasan" <<: *job-push variables: @@ -39,7 +39,7 @@ stage: build script: - ./tools/ci/scripts/patchsdl1.sh - - ./tools/ci/jobs/gcc10_sanitize_tests.sh --enable-glibcdebug --enable-unittests=doctest --without-dyecmd --without-manaplusgame + - ./tools/ci/jobs/gcc10_sanitize_tests.sh --enable-glibcdebug --enable-unittests=doctest --without-dyecmd --without-gameclient - ldd ./src/manaplustests | grep "libasan" <<: *job-push variables: @@ -56,7 +56,7 @@ gcc-10_doctest_tests_i386: stage: build script: - ./tools/ci/scripts/patchsdl1.sh - - ./tools/ci/jobs/gcc10_tests.sh --enable-unittests=doctest --without-dyecmd --without-manaplusgame + - ./tools/ci/jobs/gcc10_tests.sh --enable-unittests=doctest --without-dyecmd --without-gameclient image: i386/debian:unstable <<: *job-push variables: @@ -73,7 +73,7 @@ gcc-10_tests_simd: stage: build script: - ./tools/ci/scripts/patchsdl1.sh - - ./tools/ci/jobs/gcc10_tests_simd.sh --without-dyecmd --without-manaplusgame + - ./tools/ci/jobs/gcc10_tests_simd.sh --without-dyecmd --without-gameclient <<: *job-push variables: PACKAGES: gcc-10 g++-10 @@ -88,7 +88,7 @@ gcc-10_tests_O0: stage: build script: - ./tools/ci/scripts/patchsdl1.sh - - ./tools/ci/jobs/gcc10_tests_simd.sh --without-dyecmd --without-manaplusgame + - ./tools/ci/jobs/gcc10_tests_simd.sh --without-dyecmd --without-gameclient <<: *job-push variables: POST_CXXFLAGS: "-O0" @@ -104,7 +104,7 @@ gcc-10_tests_O1: stage: build script: - ./tools/ci/scripts/patchsdl1.sh - - ./tools/ci/jobs/gcc10_tests_simd.sh --without-dyecmd --without-manaplusgame + - ./tools/ci/jobs/gcc10_tests_simd.sh --without-dyecmd --without-gameclient <<: *job-push variables: POST_CXXFLAGS: "-O1" @@ -120,7 +120,7 @@ gcc-10_tests_lto: stage: build script: - ./tools/ci/scripts/patchsdl1.sh - - ./tools/ci/jobs/gcc10_tests.sh --without-dyecmd --without-manaplusgame + - ./tools/ci/jobs/gcc10_tests.sh --without-dyecmd --without-gameclient <<: *job-push variables: POST_CXXFLAGS: "-ffast-math -O10 -flto -fwhole-program -funswitch-loops" @@ -136,7 +136,7 @@ gcc-10_tests_lto_i386: stage: build script: - ./tools/ci/scripts/patchsdl1.sh - - ./tools/ci/jobs/gcc10_tests.sh --without-dyecmd --without-manaplusgame + - ./tools/ci/jobs/gcc10_tests.sh --without-dyecmd --without-gameclient <<: *job-push image: i386/debian:unstable variables: @@ -153,7 +153,7 @@ gcc-10_tests_i386: stage: build script: - ./tools/ci/scripts/patchsdl1.sh - - ./tools/ci/jobs/gcc10_tests.sh --without-dyecmd --without-manaplusgame + - ./tools/ci/jobs/gcc10_tests.sh --without-dyecmd --without-gameclient image: i386/debian:unstable <<: *job-push variables: @@ -169,8 +169,8 @@ gcc-10_tests_flags: stage: build script: - ./tools/ci/scripts/patchsdl1.sh - - ./tools/ci/jobs/gcc10_tests.sh --without-dyecmd --without-manaplusgame --enable-glibcdebug - - ./tools/ci/jobs/gcc10_tests.sh --without-dyecmd --without-manaplusgame --enable-stldebug + - ./tools/ci/jobs/gcc10_tests.sh --without-dyecmd --without-gameclient --enable-glibcdebug + - ./tools/ci/jobs/gcc10_tests.sh --without-dyecmd --without-gameclient --enable-stldebug <<: *job-push variables: PACKAGES: gcc-10 g++-10 @@ -185,7 +185,7 @@ gcc-10_tests: stage: build script: - ./tools/ci/scripts/patchsdl1.sh - - ./tools/ci/jobs/gcc10_tests.sh --without-dyecmd --without-manaplusgame + - ./tools/ci/jobs/gcc10_tests.sh --without-dyecmd --without-gameclient <<: *job-push variables: PACKAGES: gcc-10 g++-10 @@ -199,7 +199,7 @@ gcc-10_tests: gcc-10_sdl2_tests_i386: stage: build script: - - ./tools/ci/jobs/gcc10_tests.sh --with-sdl2 --without-dyecmd --without-manaplusgame + - ./tools/ci/jobs/gcc10_tests.sh --with-sdl2 --without-dyecmd --without-gameclient image: i386/debian:unstable <<: *job-push variables: @@ -215,7 +215,7 @@ gcc-10_sdl2_tests_i386: stage: build script: - ./tools/ci/scripts/patchsdl1.sh - - ./tools/ci/jobs/gcc10_tests.sh --without-dyecmd --without-manaplusgame || true + - ./tools/ci/jobs/gcc10_tests.sh --without-dyecmd --without-gameclient || true - echo test valgrind - valgrind -q --read-var-info=yes --track-origins=yes --malloc-fill=11 --free-fill=55 --show-reachable=yes --leak-check=full --leak-resolution=high --partial-loads-ok=yes --error-limit=no ./src/manaplustests 2>logs/valg.log - grep "invalid" logs/valg.log && exit 1 || true @@ -233,7 +233,7 @@ gcc-10_sdl2_tests_i386: stage: build script: - ./tools/ci/scripts/patchsdl1.sh - - ./tools/ci/jobs/gcc10_tests.sh --without-dyecmd --without-manaplusgame || true + - ./tools/ci/jobs/gcc10_tests.sh --without-dyecmd --without-gameclient || true - echo test valgrind - valgrind -q --read-var-info=yes --track-origins=yes --malloc-fill=11 --free-fill=55 --show-reachable=yes --leak-check=full --leak-resolution=high --partial-loads-ok=yes --error-limit=no ./src/manaplustests 2>logs/valg.log - grep "invalid" logs/valg.log && exit 1 || true @@ -252,7 +252,7 @@ gcc-10_separate_doctest: stage: build script: - ./tools/ci/scripts/patchsdl1.sh - - ./tools/ci/jobs/gcc10_silent.sh --enable-unittestsbin=doctest --without-manaplusgame --without-dyecmd + - ./tools/ci/jobs/gcc10_silent.sh --enable-unittestsbin=doctest --without-gameclient --without-dyecmd - ./tools/ci/scripts/separateunittests.sh <<: *job-push variables: @@ -266,7 +266,7 @@ gcc-10_separate_doctest_sanitize: stage: build script: - ./tools/ci/scripts/patchsdl1.sh - - ./tools/ci/jobs/gcc10_silent.sh --enable-unittestsbin=doctest --without-manaplusgame --without-dyecmd + - ./tools/ci/jobs/gcc10_silent.sh --enable-unittestsbin=doctest --without-gameclient --without-dyecmd - ./tools/ci/scripts/separateunittests.sh - ldd ./src/manaplustests | grep "libasan" <<: *job-push @@ -291,7 +291,7 @@ gcc-10_separate_doctest_sanitize: gcc-10_separate_doctest_sanitize_sdl2: stage: build script: - - ./tools/ci/jobs/gcc10_silent.sh --enable-unittestsbin=doctest --without-manaplusgame --without-dyecmd --with-sdl2 + - ./tools/ci/jobs/gcc10_silent.sh --enable-unittestsbin=doctest --without-gameclient --without-dyecmd --with-sdl2 - ./tools/ci/scripts/separateunittests.sh - ldd ./src/manaplustests | grep "libasan" <<: *job-push @@ -317,7 +317,7 @@ gcc-10_separate_doctest_i386: stage: build script: - ./tools/ci/scripts/patchsdl1.sh - - ./tools/ci/jobs/gcc10_silent.sh --enable-unittestsbin=doctest --without-manaplusgame --without-dyecmd + - ./tools/ci/jobs/gcc10_silent.sh --enable-unittestsbin=doctest --without-gameclient --without-dyecmd - ./tools/ci/scripts/separateunittests.sh <<: *job-push image: i386/debian:unstable @@ -333,7 +333,7 @@ gcc-10_separate_doctest_i386: gcc-10_separate_doctest_sdl2_i386: stage: build script: - - ./tools/ci/jobs/gcc10_silent.sh --enable-unittestsbin=doctest --without-manaplusgame --without-dyecmd --with-sdl2 + - ./tools/ci/jobs/gcc10_silent.sh --enable-unittestsbin=doctest --without-gameclient --without-dyecmd --with-sdl2 - ./tools/ci/scripts/separateunittests.sh <<: *job-push image: i386/debian:unstable @@ -364,7 +364,7 @@ gcc-10_systemcatch_tests: stage: build script: - ./tools/ci/scripts/patchsdl1.sh - - ./tools/ci/jobs/gcc10_tests.sh --enable-unittests=systemcatch --without-dyecmd --without-manaplusgame + - ./tools/ci/jobs/gcc10_tests.sh --enable-unittests=systemcatch --without-dyecmd --without-gameclient <<: *job-push variables: PACKAGES: gcc-10 g++-10 @@ -380,7 +380,7 @@ gcc-10_systemdoctest_tests: stage: build script: - ./tools/ci/scripts/patchsdl1.sh - - ./tools/ci/jobs/gcc10_tests.sh --enable-unittests=systemdoctest --without-dyecmd --without-manaplusgame + - ./tools/ci/jobs/gcc10_tests.sh --enable-unittests=systemdoctest --without-dyecmd --without-gameclient <<: *job-push variables: PACKAGES: gcc-10 g++-10 @@ -396,7 +396,7 @@ gcc-10_unsigned_char_tests: stage: build script: - ./tools/ci/scripts/patchsdl1.sh - - ./tools/ci/jobs/gcc10_tests.sh --without-dyecmd --without-manaplusgame + - ./tools/ci/jobs/gcc10_tests.sh --without-dyecmd --without-gameclient <<: *job-push variables: POST_CXXFLAGS: "-funsigned-char" @@ -411,7 +411,7 @@ gcc-10_unsigned_char_tests: gcc-10_sdl2_unsigned_char_tests: stage: build script: - - ./tools/ci/jobs/gcc10_tests.sh --with-sdl2 --without-dyecmd --without-manaplusgame + - ./tools/ci/jobs/gcc10_tests.sh --with-sdl2 --without-dyecmd --without-gameclient <<: *job-push variables: POST_CXXFLAGS: "-funsigned-char" diff --git a/tools/ci/branches/ci_gcc49/.gitlab-ci.yml b/tools/ci/branches/ci_gcc49/.gitlab-ci.yml index d5e2872df..5bb100707 100644 --- a/tools/ci/branches/ci_gcc49/.gitlab-ci.yml +++ b/tools/ci/branches/ci_gcc49/.gitlab-ci.yml @@ -93,7 +93,7 @@ gcc-4.9_sdl2_sanitize: gentoo_gcc-4.9_tests: stage: build script: - - ./tools/ci/jobs/gcc49_tests.sh --without-dyecmd --without-manaplusgame + - ./tools/ci/jobs/gcc49_tests.sh --without-dyecmd --without-gameclient image: registry.gitlab.com/manaplus/images:gentoo_gcc49_sdl1 <<: *job-push variables: @@ -107,7 +107,7 @@ gentoo_gcc-4.9_tests: gentoo_gcc-4.9_tests_sdl2: stage: build script: - - ./tools/ci/jobs/gcc49_tests.sh --without-dyecmd --without-manaplusgame --with-sdl2 + - ./tools/ci/jobs/gcc49_tests.sh --without-dyecmd --without-gameclient --with-sdl2 image: registry.gitlab.com/manaplus/images:gentoo_gcc49_sdl2 <<: *job-push variables: diff --git a/tools/ci/branches/ci_gcc5/.gitlab-ci.yml b/tools/ci/branches/ci_gcc5/.gitlab-ci.yml index 63c86ffa1..4173c2060 100644 --- a/tools/ci/branches/ci_gcc5/.gitlab-ci.yml +++ b/tools/ci/branches/ci_gcc5/.gitlab-ci.yml @@ -71,7 +71,7 @@ gcc-5_sanitize_tests: stage: build script: - ./tools/ci/scripts/patchsdl1.sh - - ./tools/ci/jobs/gcc5_sanitize_tests.sh --without-dyecmd --without-manaplusgame + - ./tools/ci/jobs/gcc5_sanitize_tests.sh --without-dyecmd --without-gameclient - ldd ./src/manaplustests | grep "libasan" image: i386/ubuntu:xenial <<: *job-push @@ -88,7 +88,7 @@ gcc-5_sanitize_no_opengl_tests: stage: build script: - ./tools/ci/scripts/patchsdl1.sh - - ./tools/ci/jobs/gcc5_sanitize_tests.sh --without-opengl --without-dyecmd --without-manaplusgame + - ./tools/ci/jobs/gcc5_sanitize_tests.sh --without-opengl --without-dyecmd --without-gameclient - ldd ./src/manaplustests | grep "libasan" image: ubuntu:xenial <<: *job-push @@ -106,7 +106,7 @@ gcc-5_sanitize_no_opengl_tests: stage: build script: - ./tools/ci/scripts/patchsdl1.sh - - ./tools/ci/jobs/gcc5_sanitize_tests.sh --without-opengl --without-dyecmd --without-manaplusgame + - ./tools/ci/jobs/gcc5_sanitize_tests.sh --without-opengl --without-dyecmd --without-gameclient - ldd ./src/manaplustests | grep "libasan" image: i386/ubuntu:xenial <<: *job-push @@ -174,7 +174,7 @@ gcc-5_tests_i386: stage: build script: - ./tools/ci/scripts/patchsdl1.sh - - ./tools/ci/jobs/gcc5_tests.sh --without-dyecmd --without-manaplusgame + - ./tools/ci/jobs/gcc5_tests.sh --without-dyecmd --without-gameclient image: i386/ubuntu:xenial <<: *job-push variables: @@ -189,8 +189,8 @@ gcc-5_tests_i386: gcc-5_sdl2_tests: stage: build script: - - ./tools/ci/jobs/gcc5_sdl2_tests.sh --without-manaplusgame --enable-glibcdebug - - ./tools/ci/jobs/gcc5_sdl2_tests.sh --without-manaplusgame --enable-stldebug + - ./tools/ci/jobs/gcc5_sdl2_tests.sh --without-gameclient --enable-glibcdebug + - ./tools/ci/jobs/gcc5_sdl2_tests.sh --without-gameclient --enable-stldebug image: ubuntu:xenial <<: *job-push variables: @@ -205,7 +205,7 @@ gcc-5_sdl2_tests: gcc-5_sdl2_tests_i386: stage: build script: - - ./tools/ci/jobs/gcc5_sdl2_tests.sh --without-dyecmd --without-manaplusgame + - ./tools/ci/jobs/gcc5_sdl2_tests.sh --without-dyecmd --without-gameclient image: i386/ubuntu:xenial <<: *job-push variables: @@ -220,7 +220,7 @@ gcc-5_sdl2_tests_i386: gcc-5_sdl2_no_opengl_tests: stage: build script: - - ./tools/ci/jobs/gcc5_sdl2_tests.sh --without-opengl --without-dyecmd --without-manaplusgame + - ./tools/ci/jobs/gcc5_sdl2_tests.sh --without-opengl --without-dyecmd --without-gameclient image: ubuntu:xenial <<: *job-push variables: @@ -235,7 +235,7 @@ gcc-5_sdl2_no_opengl_tests: gcc-5_sdl2_no_opengl_tests_i386: stage: build script: - - ./tools/ci/jobs/gcc5_sdl2_tests.sh --without-opengl --without-dyecmd --without-manaplusgame + - ./tools/ci/jobs/gcc5_sdl2_tests.sh --without-opengl --without-dyecmd --without-gameclient image: i386/ubuntu:xenial <<: *job-push variables: diff --git a/tools/ci/branches/ci_gcc6_tests/.gitlab-ci.yml b/tools/ci/branches/ci_gcc6_tests/.gitlab-ci.yml index f26477e95..c7b82a9aa 100644 --- a/tools/ci/branches/ci_gcc6_tests/.gitlab-ci.yml +++ b/tools/ci/branches/ci_gcc6_tests/.gitlab-ci.yml @@ -20,7 +20,7 @@ gcc-6_sanitize_doctest_tests: stage: build script: - ./tools/ci/scripts/patchsdl1.sh - - ./tools/ci/jobs/gcc6_sanitize_tests.sh --enable-unittests=doctest --without-dyecmd --without-manaplusgame + - ./tools/ci/jobs/gcc6_sanitize_tests.sh --enable-unittests=doctest --without-dyecmd --without-gameclient - ldd ./src/manaplustests | grep "libasan" image: debian:stretch <<: *job-push @@ -37,7 +37,7 @@ gcc-6_doctest_tests_i386: stage: build script: - ./tools/ci/scripts/patchsdl1.sh - - ./tools/ci/jobs/gcc6_tests.sh --enable-unittests=doctest --without-dyecmd --without-manaplusgame + - ./tools/ci/jobs/gcc6_tests.sh --enable-unittests=doctest --without-dyecmd --without-gameclient image: i386/debian:stretch <<: *job-push variables: @@ -53,7 +53,7 @@ gcc-6_tests_simd: stage: build script: - ./tools/ci/scripts/patchsdl1.sh - - ./tools/ci/jobs/gcc6_tests_simd.sh --without-dyecmd --without-manaplusgame + - ./tools/ci/jobs/gcc6_tests_simd.sh --without-dyecmd --without-gameclient image: debian:stretch <<: *job-push variables: @@ -69,7 +69,7 @@ gcc-6_tests_lto: stage: build script: - ./tools/ci/scripts/patchsdl1.sh - - ./tools/ci/jobs/gcc6_tests.sh --without-dyecmd --without-manaplusgame + - ./tools/ci/jobs/gcc6_tests.sh --without-dyecmd --without-gameclient image: debian:stretch <<: *job-push variables: @@ -86,7 +86,7 @@ gcc-6_tests_lto_i386: stage: build script: - ./tools/ci/scripts/patchsdl1.sh - - ./tools/ci/jobs/gcc6_tests.sh --without-dyecmd --without-manaplusgame + - ./tools/ci/jobs/gcc6_tests.sh --without-dyecmd --without-gameclient <<: *job-push image: i386/debian:stretch variables: @@ -103,7 +103,7 @@ gcc-6_tests: stage: build script: - ./tools/ci/scripts/patchsdl1.sh - - ./tools/ci/jobs/gcc6_tests.sh --without-dyecmd --without-manaplusgame + - ./tools/ci/jobs/gcc6_tests.sh --without-dyecmd --without-gameclient image: debian:stretch <<: *job-push variables: @@ -119,7 +119,7 @@ gcc-6_tests_i386: stage: build script: - ./tools/ci/scripts/patchsdl1.sh - - ./tools/ci/jobs/gcc6_tests.sh --without-dyecmd --without-manaplusgame + - ./tools/ci/jobs/gcc6_tests.sh --without-dyecmd --without-gameclient image: i386/debian:stretch <<: *job-push variables: @@ -135,7 +135,7 @@ gcc-6_tests_glibcdebug: stage: build script: - ./tools/ci/scripts/patchsdl1.sh - - ./tools/ci/jobs/gcc6_tests.sh --without-dyecmd --without-manaplusgame --enable-glibcdebug + - ./tools/ci/jobs/gcc6_tests.sh --without-dyecmd --without-gameclient --enable-glibcdebug image: debian:stretch <<: *job-push variables: @@ -151,7 +151,7 @@ gcc-6_tests_glibcdebug_i386: stage: build script: - ./tools/ci/scripts/patchsdl1.sh - - ./tools/ci/jobs/gcc6_tests.sh --without-dyecmd --without-manaplusgame --enable-glibcdebug + - ./tools/ci/jobs/gcc6_tests.sh --without-dyecmd --without-gameclient --enable-glibcdebug image: i386/debian:stretch <<: *job-push variables: @@ -166,7 +166,7 @@ gcc-6_tests_glibcdebug_i386: gcc-6_sdl2_tests: stage: build script: - - ./tools/ci/jobs/gcc6_sdl2_tests.sh --without-dyecmd --without-manaplusgame + - ./tools/ci/jobs/gcc6_sdl2_tests.sh --without-dyecmd --without-gameclient image: debian:stretch <<: *job-push variables: @@ -181,7 +181,7 @@ gcc-6_sdl2_tests: gcc-6_sdl2_tests_i386: stage: build script: - - ./tools/ci/jobs/gcc6_sdl2_tests.sh --without-dyecmd --without-manaplusgame + - ./tools/ci/jobs/gcc6_sdl2_tests.sh --without-dyecmd --without-gameclient image: i386/debian:stretch <<: *job-push variables: @@ -197,7 +197,7 @@ gcc-6_tests_valgrind: stage: build script: - ./tools/ci/scripts/patchsdl1.sh - - ./tools/ci/jobs/gcc6_tests.sh --without-dyecmd --without-manaplusgame || true + - ./tools/ci/jobs/gcc6_tests.sh --without-dyecmd --without-gameclient || true - echo test valgrind - valgrind -q --read-var-info=yes --track-origins=yes --malloc-fill=11 --free-fill=55 --show-reachable=yes --leak-check=full --leak-resolution=high --partial-loads-ok=yes --error-limit=no ./src/manaplustests 2>logs/valg.log - grep "invalid" logs/valg.log && exit 1 || true @@ -216,7 +216,7 @@ gcc-6_tests_valgrind_i386: stage: build script: - ./tools/ci/scripts/patchsdl1.sh - - ./tools/ci/jobs/gcc6_tests.sh --without-dyecmd --without-manaplusgame || true + - ./tools/ci/jobs/gcc6_tests.sh --without-dyecmd --without-gameclient || true - echo test valgrind - valgrind -q --read-var-info=yes --track-origins=yes --malloc-fill=11 --free-fill=55 --show-reachable=yes --leak-check=full --leak-resolution=high --partial-loads-ok=yes --error-limit=no ./src/manaplustests 2>logs/valg.log - grep "invalid" logs/valg.log && exit 1 || true @@ -235,7 +235,7 @@ gcc-6_tarball_tests: stage: build script: - ./tools/ci/scripts/patchsdl1.sh - - ./tools/ci/jobs/gcc6_tarball_tests.sh --without-dyecmd --without-manaplusgame + - ./tools/ci/jobs/gcc6_tarball_tests.sh --without-dyecmd --without-gameclient image: debian:stretch <<: *job-push variables: diff --git a/tools/ci/branches/ci_gcc7_tests/.gitlab-ci.yml b/tools/ci/branches/ci_gcc7_tests/.gitlab-ci.yml index d1be7f727..f3504aef3 100644 --- a/tools/ci/branches/ci_gcc7_tests/.gitlab-ci.yml +++ b/tools/ci/branches/ci_gcc7_tests/.gitlab-ci.yml @@ -20,7 +20,7 @@ gcc-7_sanitize_doctest_tests: stage: build script: - ./tools/ci/scripts/patchsdl1.sh - - ./tools/ci/jobs/gcc7_sanitize_tests.sh --enable-unittests=doctest --without-dyecmd --without-manaplusgame + - ./tools/ci/jobs/gcc7_sanitize_tests.sh --enable-unittests=doctest --without-dyecmd --without-gameclient - ldd ./src/manaplustests | grep "libasan" image: debian:buster <<: *job-push @@ -38,7 +38,7 @@ gcc-7_doctest_tests_i386: stage: build script: - ./tools/ci/scripts/patchsdl1.sh - - ./tools/ci/jobs/gcc7_tests.sh --enable-unittests=doctest --without-dyecmd --without-manaplusgame + - ./tools/ci/jobs/gcc7_tests.sh --enable-unittests=doctest --without-dyecmd --without-gameclient image: i386/debian:buster <<: *job-push variables: @@ -55,7 +55,7 @@ gcc-7_tests_simd: stage: build script: - ./tools/ci/scripts/patchsdl1.sh - - ./tools/ci/jobs/gcc7_tests_simd.sh --without-dyecmd --without-manaplusgame + - ./tools/ci/jobs/gcc7_tests_simd.sh --without-dyecmd --without-gameclient image: debian:buster <<: *job-push variables: @@ -71,7 +71,7 @@ gcc-7_tests_O0: stage: build script: - ./tools/ci/scripts/patchsdl1.sh - - ./tools/ci/jobs/gcc7_tests_simd.sh --without-dyecmd --without-manaplusgame + - ./tools/ci/jobs/gcc7_tests_simd.sh --without-dyecmd --without-gameclient image: debian:buster <<: *job-push variables: @@ -88,7 +88,7 @@ gcc-7_tests_O1: stage: build script: - ./tools/ci/scripts/patchsdl1.sh - - ./tools/ci/jobs/gcc7_tests_simd.sh --without-dyecmd --without-manaplusgame + - ./tools/ci/jobs/gcc7_tests_simd.sh --without-dyecmd --without-gameclient image: debian:buster <<: *job-push variables: @@ -105,7 +105,7 @@ gcc-7_tests_lto: stage: build script: - ./tools/ci/scripts/patchsdl1.sh - - ./tools/ci/jobs/gcc7_tests.sh --without-dyecmd --without-manaplusgame + - ./tools/ci/jobs/gcc7_tests.sh --without-dyecmd --without-gameclient image: debian:buster <<: *job-push variables: @@ -122,7 +122,7 @@ gcc-7_tests_lto_i386: stage: build script: - ./tools/ci/scripts/patchsdl1.sh - - ./tools/ci/jobs/gcc7_tests.sh --without-dyecmd --without-manaplusgame + - ./tools/ci/jobs/gcc7_tests.sh --without-dyecmd --without-gameclient <<: *job-push image: i386/debian:buster variables: @@ -139,7 +139,7 @@ gcc-7_tests_i386: stage: build script: - ./tools/ci/scripts/patchsdl1.sh - - ./tools/ci/jobs/gcc7_tests.sh --without-dyecmd --without-manaplusgame + - ./tools/ci/jobs/gcc7_tests.sh --without-dyecmd --without-gameclient image: i386/debian:buster <<: *job-push variables: @@ -155,8 +155,8 @@ gcc-7_tests_flags: stage: build script: - ./tools/ci/scripts/patchsdl1.sh - - ./tools/ci/jobs/gcc7_tests.sh --without-dyecmd --without-manaplusgame --enable-glibcdebug - - ./tools/ci/jobs/gcc7_tests.sh --without-dyecmd --without-manaplusgame --enable-stldebug + - ./tools/ci/jobs/gcc7_tests.sh --without-dyecmd --without-gameclient --enable-glibcdebug + - ./tools/ci/jobs/gcc7_tests.sh --without-dyecmd --without-gameclient --enable-stldebug image: debian:buster <<: *job-push variables: @@ -172,7 +172,7 @@ gcc-7_tests: stage: build script: - ./tools/ci/scripts/patchsdl1.sh - - ./tools/ci/jobs/gcc7_tests.sh --without-dyecmd --without-manaplusgame + - ./tools/ci/jobs/gcc7_tests.sh --without-dyecmd --without-gameclient image: debian:buster <<: *job-push variables: @@ -187,7 +187,7 @@ gcc-7_tests: gcc-7_sdl2_tests_i386: stage: build script: - - ./tools/ci/jobs/gcc7_tests.sh --with-sdl2 --without-dyecmd --without-manaplusgame + - ./tools/ci/jobs/gcc7_tests.sh --with-sdl2 --without-dyecmd --without-gameclient image: i386/debian:buster <<: *job-push variables: @@ -203,7 +203,7 @@ gcc-7_sdl2_tests_i386: stage: build script: - ./tools/ci/scripts/patchsdl1.sh - - ./tools/ci/jobs/gcc7_tests.sh --without-dyecmd --without-manaplusgame || true + - ./tools/ci/jobs/gcc7_tests.sh --without-dyecmd --without-gameclient || true - echo test valgrind - valgrind -q --read-var-info=yes --track-origins=yes --malloc-fill=11 --free-fill=55 --show-reachable=yes --leak-check=full --leak-resolution=high --partial-loads-ok=yes --error-limit=no ./src/manaplustests 2>logs/valg.log - grep "invalid" logs/valg.log && exit 1 || true @@ -222,7 +222,7 @@ gcc-7_sdl2_tests_i386: stage: build script: - ./tools/ci/scripts/patchsdl1.sh - - ./tools/ci/jobs/gcc7_tests.sh --without-dyecmd --without-manaplusgame || true + - ./tools/ci/jobs/gcc7_tests.sh --without-dyecmd --without-gameclient || true - echo test valgrind - valgrind -q --read-var-info=yes --track-origins=yes --malloc-fill=11 --free-fill=55 --show-reachable=yes --leak-check=full --leak-resolution=high --partial-loads-ok=yes --error-limit=no ./src/manaplustests 2>logs/valg.log - grep "invalid" logs/valg.log && exit 1 || true @@ -241,7 +241,7 @@ gcc-7_separate_doctest: stage: build script: - ./tools/ci/scripts/patchsdl1.sh - - ./tools/ci/jobs/gcc7_silent.sh --enable-unittestsbin=doctest --without-manaplusgame --without-dyecmd + - ./tools/ci/jobs/gcc7_silent.sh --enable-unittestsbin=doctest --without-gameclient --without-dyecmd - ./tools/ci/scripts/separateunittests.sh image: debian:buster <<: *job-push @@ -256,7 +256,7 @@ gcc-7_separate_doctest_sanitize: stage: build script: - ./tools/ci/scripts/patchsdl1.sh - - ./tools/ci/jobs/gcc7_silent.sh --enable-unittestsbin=doctest --without-manaplusgame --without-dyecmd + - ./tools/ci/jobs/gcc7_silent.sh --enable-unittestsbin=doctest --without-gameclient --without-dyecmd - ./tools/ci/scripts/separateunittests.sh - ldd ./src/manaplustests | grep "libasan" image: debian:buster @@ -282,7 +282,7 @@ gcc-7_separate_doctest_sanitize: gcc-7_separate_doctest_sanitize_sdl2: stage: build script: - - ./tools/ci/jobs/gcc7_silent.sh --enable-unittestsbin=doctest --without-manaplusgame --without-dyecmd --with-sdl2 + - ./tools/ci/jobs/gcc7_silent.sh --enable-unittestsbin=doctest --without-gameclient --without-dyecmd --with-sdl2 - ./tools/ci/scripts/separateunittests.sh - ldd ./src/manaplustests | grep "libasan" image: debian:buster @@ -309,7 +309,7 @@ gcc-7_separate_doctest_i386: stage: build script: - ./tools/ci/scripts/patchsdl1.sh - - ./tools/ci/jobs/gcc7_silent.sh --enable-unittestsbin=doctest --without-manaplusgame --without-dyecmd + - ./tools/ci/jobs/gcc7_silent.sh --enable-unittestsbin=doctest --without-gameclient --without-dyecmd - ./tools/ci/scripts/separateunittests.sh <<: *job-push image: i386/debian:buster @@ -325,7 +325,7 @@ gcc-7_separate_doctest_i386: gcc-7_separate_doctest_sdl2_i386: stage: build script: - - ./tools/ci/jobs/gcc7_silent.sh --enable-unittestsbin=doctest --without-manaplusgame --without-dyecmd --with-sdl2 + - ./tools/ci/jobs/gcc7_silent.sh --enable-unittestsbin=doctest --without-gameclient --without-dyecmd --with-sdl2 - ./tools/ci/scripts/separateunittests.sh <<: *job-push image: i386/debian:buster @@ -342,7 +342,7 @@ gcc-7_unsigned_char_tests: stage: build script: - ./tools/ci/scripts/patchsdl1.sh - - ./tools/ci/jobs/gcc7_tests.sh --without-dyecmd --without-manaplusgame + - ./tools/ci/jobs/gcc7_tests.sh --without-dyecmd --without-gameclient image: debian:buster <<: *job-push variables: @@ -358,7 +358,7 @@ gcc-7_unsigned_char_tests: gcc-7_sdl2_unsigned_char_tests: stage: build script: - - ./tools/ci/jobs/gcc7_tests.sh --with-sdl2 --without-dyecmd --without-manaplusgame + - ./tools/ci/jobs/gcc7_tests.sh --with-sdl2 --without-dyecmd --without-gameclient image: debian:buster <<: *job-push variables: diff --git a/tools/ci/branches/ci_gcc8_tests/.gitlab-ci.yml b/tools/ci/branches/ci_gcc8_tests/.gitlab-ci.yml index 65c5b8be5..a39b9ebc5 100644 --- a/tools/ci/branches/ci_gcc8_tests/.gitlab-ci.yml +++ b/tools/ci/branches/ci_gcc8_tests/.gitlab-ci.yml @@ -21,7 +21,7 @@ stage: build script: - ./tools/ci/scripts/patchsdl1.sh - - ./tools/ci/jobs/gcc8_sanitize_tests.sh --enable-unittests=doctest --without-dyecmd --without-manaplusgame + - ./tools/ci/jobs/gcc8_sanitize_tests.sh --enable-unittests=doctest --without-dyecmd --without-gameclient - ldd ./src/manaplustests | grep "libasan" <<: *job-push variables: @@ -39,7 +39,7 @@ stage: build script: - ./tools/ci/scripts/patchsdl1.sh - - ./tools/ci/jobs/gcc8_sanitize_tests.sh --enable-glibcdebug --enable-unittests=doctest --without-dyecmd --without-manaplusgame + - ./tools/ci/jobs/gcc8_sanitize_tests.sh --enable-glibcdebug --enable-unittests=doctest --without-dyecmd --without-gameclient - ldd ./src/manaplustests | grep "libasan" <<: *job-push variables: @@ -56,7 +56,7 @@ gcc-8_doctest_tests_i386: stage: build script: - ./tools/ci/scripts/patchsdl1.sh - - ./tools/ci/jobs/gcc8_tests.sh --enable-unittests=doctest --without-dyecmd --without-manaplusgame + - ./tools/ci/jobs/gcc8_tests.sh --enable-unittests=doctest --without-dyecmd --without-gameclient image: i386/debian:unstable <<: *job-push variables: @@ -73,7 +73,7 @@ gcc-8_tests_simd: stage: build script: - ./tools/ci/scripts/patchsdl1.sh - - ./tools/ci/jobs/gcc8_tests_simd.sh --without-dyecmd --without-manaplusgame + - ./tools/ci/jobs/gcc8_tests_simd.sh --without-dyecmd --without-gameclient <<: *job-push variables: PACKAGES: gcc-8 g++-8 @@ -88,7 +88,7 @@ gcc-8_tests_O0: stage: build script: - ./tools/ci/scripts/patchsdl1.sh - - ./tools/ci/jobs/gcc8_tests_simd.sh --without-dyecmd --without-manaplusgame + - ./tools/ci/jobs/gcc8_tests_simd.sh --without-dyecmd --without-gameclient <<: *job-push variables: POST_CXXFLAGS: "-O0" @@ -104,7 +104,7 @@ gcc-8_tests_O1: stage: build script: - ./tools/ci/scripts/patchsdl1.sh - - ./tools/ci/jobs/gcc8_tests_simd.sh --without-dyecmd --without-manaplusgame + - ./tools/ci/jobs/gcc8_tests_simd.sh --without-dyecmd --without-gameclient <<: *job-push variables: POST_CXXFLAGS: "-O1" @@ -120,7 +120,7 @@ gcc-8_tests_lto: stage: build script: - ./tools/ci/scripts/patchsdl1.sh - - ./tools/ci/jobs/gcc8_tests.sh --without-dyecmd --without-manaplusgame + - ./tools/ci/jobs/gcc8_tests.sh --without-dyecmd --without-gameclient <<: *job-push variables: POST_CXXFLAGS: "-ffast-math -O9 -flto -fwhole-program -funswitch-loops" @@ -136,7 +136,7 @@ gcc-8_tests_lto_i386: stage: build script: - ./tools/ci/scripts/patchsdl1.sh - - ./tools/ci/jobs/gcc8_tests.sh --without-dyecmd --without-manaplusgame + - ./tools/ci/jobs/gcc8_tests.sh --without-dyecmd --without-gameclient <<: *job-push image: i386/debian:unstable variables: @@ -153,7 +153,7 @@ gcc-8_tests_i386: stage: build script: - ./tools/ci/scripts/patchsdl1.sh - - ./tools/ci/jobs/gcc8_tests.sh --without-dyecmd --without-manaplusgame + - ./tools/ci/jobs/gcc8_tests.sh --without-dyecmd --without-gameclient image: i386/debian:unstable <<: *job-push variables: @@ -169,8 +169,8 @@ gcc-8_tests_flags: stage: build script: - ./tools/ci/scripts/patchsdl1.sh - - ./tools/ci/jobs/gcc8_tests.sh --without-dyecmd --without-manaplusgame --enable-glibcdebug - - ./tools/ci/jobs/gcc8_tests.sh --without-dyecmd --without-manaplusgame --enable-stldebug + - ./tools/ci/jobs/gcc8_tests.sh --without-dyecmd --without-gameclient --enable-glibcdebug + - ./tools/ci/jobs/gcc8_tests.sh --without-dyecmd --without-gameclient --enable-stldebug <<: *job-push variables: PACKAGES: gcc-8 g++-8 @@ -185,7 +185,7 @@ gcc-8_tests: stage: build script: - ./tools/ci/scripts/patchsdl1.sh - - ./tools/ci/jobs/gcc8_tests.sh --without-dyecmd --without-manaplusgame + - ./tools/ci/jobs/gcc8_tests.sh --without-dyecmd --without-gameclient <<: *job-push variables: PACKAGES: gcc-8 g++-8 @@ -199,7 +199,7 @@ gcc-8_tests: gcc-8_sdl2_tests_i386: stage: build script: - - ./tools/ci/jobs/gcc8_tests.sh --with-sdl2 --without-dyecmd --without-manaplusgame + - ./tools/ci/jobs/gcc8_tests.sh --with-sdl2 --without-dyecmd --without-gameclient image: i386/debian:unstable <<: *job-push variables: @@ -215,7 +215,7 @@ gcc-8_sdl2_tests_i386: stage: build script: - ./tools/ci/scripts/patchsdl1.sh - - ./tools/ci/jobs/gcc8_tests.sh --without-dyecmd --without-manaplusgame || true + - ./tools/ci/jobs/gcc8_tests.sh --without-dyecmd --without-gameclient || true - echo test valgrind - valgrind -q --read-var-info=yes --track-origins=yes --malloc-fill=11 --free-fill=55 --show-reachable=yes --leak-check=full --leak-resolution=high --partial-loads-ok=yes --error-limit=no ./src/manaplustests 2>logs/valg.log - grep "invalid" logs/valg.log && exit 1 || true @@ -233,7 +233,7 @@ gcc-8_sdl2_tests_i386: stage: build script: - ./tools/ci/scripts/patchsdl1.sh - - ./tools/ci/jobs/gcc8_tests.sh --without-dyecmd --without-manaplusgame || true + - ./tools/ci/jobs/gcc8_tests.sh --without-dyecmd --without-gameclient || true - echo test valgrind - valgrind -q --read-var-info=yes --track-origins=yes --malloc-fill=11 --free-fill=55 --show-reachable=yes --leak-check=full --leak-resolution=high --partial-loads-ok=yes --error-limit=no ./src/manaplustests 2>logs/valg.log - grep "invalid" logs/valg.log && exit 1 || true @@ -252,7 +252,7 @@ gcc-8_separate_doctest: stage: build script: - ./tools/ci/scripts/patchsdl1.sh - - ./tools/ci/jobs/gcc8_silent.sh --enable-unittestsbin=doctest --without-manaplusgame --without-dyecmd + - ./tools/ci/jobs/gcc8_silent.sh --enable-unittestsbin=doctest --without-gameclient --without-dyecmd - ./tools/ci/scripts/separateunittests.sh <<: *job-push variables: @@ -266,7 +266,7 @@ gcc-8_separate_doctest_sanitize: stage: build script: - ./tools/ci/scripts/patchsdl1.sh - - ./tools/ci/jobs/gcc8_silent.sh --enable-unittestsbin=doctest --without-manaplusgame --without-dyecmd + - ./tools/ci/jobs/gcc8_silent.sh --enable-unittestsbin=doctest --without-gameclient --without-dyecmd - ./tools/ci/scripts/separateunittests.sh - ldd ./src/manaplustests | grep "libasan" <<: *job-push @@ -291,7 +291,7 @@ gcc-8_separate_doctest_sanitize: gcc-8_separate_doctest_sanitize_sdl2: stage: build script: - - ./tools/ci/jobs/gcc8_silent.sh --enable-unittestsbin=doctest --without-manaplusgame --without-dyecmd --with-sdl2 + - ./tools/ci/jobs/gcc8_silent.sh --enable-unittestsbin=doctest --without-gameclient --without-dyecmd --with-sdl2 - ./tools/ci/scripts/separateunittests.sh - ldd ./src/manaplustests | grep "libasan" <<: *job-push @@ -317,7 +317,7 @@ gcc-8_separate_doctest_i386: stage: build script: - ./tools/ci/scripts/patchsdl1.sh - - ./tools/ci/jobs/gcc8_silent.sh --enable-unittestsbin=doctest --without-manaplusgame --without-dyecmd + - ./tools/ci/jobs/gcc8_silent.sh --enable-unittestsbin=doctest --without-gameclient --without-dyecmd - ./tools/ci/scripts/separateunittests.sh <<: *job-push image: i386/debian:unstable @@ -333,7 +333,7 @@ gcc-8_separate_doctest_i386: gcc-8_separate_doctest_sdl2_i386: stage: build script: - - ./tools/ci/jobs/gcc8_silent.sh --enable-unittestsbin=doctest --without-manaplusgame --without-dyecmd --with-sdl2 + - ./tools/ci/jobs/gcc8_silent.sh --enable-unittestsbin=doctest --without-gameclient --without-dyecmd --with-sdl2 - ./tools/ci/scripts/separateunittests.sh <<: *job-push image: i386/debian:unstable @@ -364,7 +364,7 @@ gcc-8_systemcatch_tests: stage: build script: - ./tools/ci/scripts/patchsdl1.sh - - ./tools/ci/jobs/gcc8_tests.sh --enable-unittests=systemcatch --without-dyecmd --without-manaplusgame + - ./tools/ci/jobs/gcc8_tests.sh --enable-unittests=systemcatch --without-dyecmd --without-gameclient <<: *job-push variables: PACKAGES: gcc-8 g++-8 @@ -380,7 +380,7 @@ gcc-8_systemdoctest_tests: stage: build script: - ./tools/ci/scripts/patchsdl1.sh - - ./tools/ci/jobs/gcc8_tests.sh --enable-unittests=systemdoctest --without-dyecmd --without-manaplusgame + - ./tools/ci/jobs/gcc8_tests.sh --enable-unittests=systemdoctest --without-dyecmd --without-gameclient <<: *job-push variables: PACKAGES: gcc-8 g++-8 @@ -396,7 +396,7 @@ gcc-8_unsigned_char_tests: stage: build script: - ./tools/ci/scripts/patchsdl1.sh - - ./tools/ci/jobs/gcc8_tests.sh --without-dyecmd --without-manaplusgame + - ./tools/ci/jobs/gcc8_tests.sh --without-dyecmd --without-gameclient <<: *job-push variables: POST_CXXFLAGS: "-funsigned-char" @@ -411,7 +411,7 @@ gcc-8_unsigned_char_tests: gcc-8_sdl2_unsigned_char_tests: stage: build script: - - ./tools/ci/jobs/gcc8_tests.sh --with-sdl2 --without-dyecmd --without-manaplusgame + - ./tools/ci/jobs/gcc8_tests.sh --with-sdl2 --without-dyecmd --without-gameclient <<: *job-push variables: POST_CXXFLAGS: "-funsigned-char" diff --git a/tools/ci/branches/ci_gcc9_tests/.gitlab-ci.yml b/tools/ci/branches/ci_gcc9_tests/.gitlab-ci.yml index 90f668189..401ba0ae0 100644 --- a/tools/ci/branches/ci_gcc9_tests/.gitlab-ci.yml +++ b/tools/ci/branches/ci_gcc9_tests/.gitlab-ci.yml @@ -21,7 +21,7 @@ stage: build script: - ./tools/ci/scripts/patchsdl1.sh - - ./tools/ci/jobs/gcc9_sanitize_tests.sh --enable-unittests=doctest --without-dyecmd --without-manaplusgame + - ./tools/ci/jobs/gcc9_sanitize_tests.sh --enable-unittests=doctest --without-dyecmd --without-gameclient - ldd ./src/manaplustests | grep "libasan" <<: *job-push variables: @@ -39,7 +39,7 @@ stage: build script: - ./tools/ci/scripts/patchsdl1.sh - - ./tools/ci/jobs/gcc9_sanitize_tests.sh --enable-glibcdebug --enable-unittests=doctest --without-dyecmd --without-manaplusgame + - ./tools/ci/jobs/gcc9_sanitize_tests.sh --enable-glibcdebug --enable-unittests=doctest --without-dyecmd --without-gameclient - ldd ./src/manaplustests | grep "libasan" <<: *job-push variables: @@ -56,7 +56,7 @@ gcc-9_doctest_tests_i386: stage: build script: - ./tools/ci/scripts/patchsdl1.sh - - ./tools/ci/jobs/gcc9_tests.sh --enable-unittests=doctest --without-dyecmd --without-manaplusgame + - ./tools/ci/jobs/gcc9_tests.sh --enable-unittests=doctest --without-dyecmd --without-gameclient image: i386/debian:unstable <<: *job-push variables: @@ -73,7 +73,7 @@ gcc-9_tests_simd: stage: build script: - ./tools/ci/scripts/patchsdl1.sh - - ./tools/ci/jobs/gcc9_tests_simd.sh --without-dyecmd --without-manaplusgame + - ./tools/ci/jobs/gcc9_tests_simd.sh --without-dyecmd --without-gameclient <<: *job-push variables: PACKAGES: gcc-9 g++-9 @@ -88,7 +88,7 @@ gcc-9_tests_O0: stage: build script: - ./tools/ci/scripts/patchsdl1.sh - - ./tools/ci/jobs/gcc9_tests_simd.sh --without-dyecmd --without-manaplusgame + - ./tools/ci/jobs/gcc9_tests_simd.sh --without-dyecmd --without-gameclient <<: *job-push variables: POST_CXXFLAGS: "-O0" @@ -104,7 +104,7 @@ gcc-9_tests_O1: stage: build script: - ./tools/ci/scripts/patchsdl1.sh - - ./tools/ci/jobs/gcc9_tests_simd.sh --without-dyecmd --without-manaplusgame + - ./tools/ci/jobs/gcc9_tests_simd.sh --without-dyecmd --without-gameclient <<: *job-push variables: POST_CXXFLAGS: "-O1" @@ -120,7 +120,7 @@ gcc-9_tests_lto: stage: build script: - ./tools/ci/scripts/patchsdl1.sh - - ./tools/ci/jobs/gcc9_tests.sh --without-dyecmd --without-manaplusgame + - ./tools/ci/jobs/gcc9_tests.sh --without-dyecmd --without-gameclient <<: *job-push variables: POST_CXXFLAGS: "-ffast-math -O9 -flto -fwhole-program -funswitch-loops" @@ -136,7 +136,7 @@ gcc-9_tests_lto_i386: stage: build script: - ./tools/ci/scripts/patchsdl1.sh - - ./tools/ci/jobs/gcc9_tests.sh --without-dyecmd --without-manaplusgame + - ./tools/ci/jobs/gcc9_tests.sh --without-dyecmd --without-gameclient <<: *job-push image: i386/debian:unstable variables: @@ -153,7 +153,7 @@ gcc-9_tests_i386: stage: build script: - ./tools/ci/scripts/patchsdl1.sh - - ./tools/ci/jobs/gcc9_tests.sh --without-dyecmd --without-manaplusgame + - ./tools/ci/jobs/gcc9_tests.sh --without-dyecmd --without-gameclient image: i386/debian:unstable <<: *job-push variables: @@ -169,8 +169,8 @@ gcc-9_tests_flags: stage: build script: - ./tools/ci/scripts/patchsdl1.sh - - ./tools/ci/jobs/gcc9_tests.sh --without-dyecmd --without-manaplusgame --enable-glibcdebug - - ./tools/ci/jobs/gcc9_tests.sh --without-dyecmd --without-manaplusgame --enable-stldebug + - ./tools/ci/jobs/gcc9_tests.sh --without-dyecmd --without-gameclient --enable-glibcdebug + - ./tools/ci/jobs/gcc9_tests.sh --without-dyecmd --without-gameclient --enable-stldebug <<: *job-push variables: PACKAGES: gcc-9 g++-9 @@ -185,7 +185,7 @@ gcc-9_tests: stage: build script: - ./tools/ci/scripts/patchsdl1.sh - - ./tools/ci/jobs/gcc9_tests.sh --without-dyecmd --without-manaplusgame + - ./tools/ci/jobs/gcc9_tests.sh --without-dyecmd --without-gameclient <<: *job-push variables: PACKAGES: gcc-9 g++-9 @@ -199,7 +199,7 @@ gcc-9_tests: gcc-9_sdl2_tests_i386: stage: build script: - - ./tools/ci/jobs/gcc9_tests.sh --with-sdl2 --without-dyecmd --without-manaplusgame + - ./tools/ci/jobs/gcc9_tests.sh --with-sdl2 --without-dyecmd --without-gameclient image: i386/debian:unstable <<: *job-push variables: @@ -215,7 +215,7 @@ gcc-9_sdl2_tests_i386: stage: build script: - ./tools/ci/scripts/patchsdl1.sh - - ./tools/ci/jobs/gcc9_tests.sh --without-dyecmd --without-manaplusgame || true + - ./tools/ci/jobs/gcc9_tests.sh --without-dyecmd --without-gameclient || true - echo test valgrind - valgrind -q --read-var-info=yes --track-origins=yes --malloc-fill=11 --free-fill=55 --show-reachable=yes --leak-check=full --leak-resolution=high --partial-loads-ok=yes --error-limit=no ./src/manaplustests 2>logs/valg.log - grep "invalid" logs/valg.log && exit 1 || true @@ -233,7 +233,7 @@ gcc-9_sdl2_tests_i386: stage: build script: - ./tools/ci/scripts/patchsdl1.sh - - ./tools/ci/jobs/gcc9_tests.sh --without-dyecmd --without-manaplusgame || true + - ./tools/ci/jobs/gcc9_tests.sh --without-dyecmd --without-gameclient || true - echo test valgrind - valgrind -q --read-var-info=yes --track-origins=yes --malloc-fill=11 --free-fill=55 --show-reachable=yes --leak-check=full --leak-resolution=high --partial-loads-ok=yes --error-limit=no ./src/manaplustests 2>logs/valg.log - grep "invalid" logs/valg.log && exit 1 || true @@ -252,7 +252,7 @@ gcc-9_separate_doctest: stage: build script: - ./tools/ci/scripts/patchsdl1.sh - - ./tools/ci/jobs/gcc9_silent.sh --enable-unittestsbin=doctest --without-manaplusgame --without-dyecmd + - ./tools/ci/jobs/gcc9_silent.sh --enable-unittestsbin=doctest --without-gameclient --without-dyecmd - ./tools/ci/scripts/separateunittests.sh <<: *job-push variables: @@ -266,7 +266,7 @@ gcc-9_separate_doctest_sanitize: stage: build script: - ./tools/ci/scripts/patchsdl1.sh - - ./tools/ci/jobs/gcc9_silent.sh --enable-unittestsbin=doctest --without-manaplusgame --without-dyecmd + - ./tools/ci/jobs/gcc9_silent.sh --enable-unittestsbin=doctest --without-gameclient --without-dyecmd - ./tools/ci/scripts/separateunittests.sh - ldd ./src/manaplustests | grep "libasan" <<: *job-push @@ -293,7 +293,7 @@ gcc-9_separate_doctest_sanitize: gcc-9_separate_doctest_sanitize_sdl2: stage: build script: - - ./tools/ci/jobs/gcc9_silent.sh --enable-unittestsbin=doctest --without-manaplusgame --without-dyecmd --with-sdl2 + - ./tools/ci/jobs/gcc9_silent.sh --enable-unittestsbin=doctest --without-gameclient --without-dyecmd --with-sdl2 - ./tools/ci/scripts/separateunittests.sh - ldd ./src/manaplustests | grep "libasan" <<: *job-push @@ -320,7 +320,7 @@ gcc-9_separate_doctest_i386: stage: build script: - ./tools/ci/scripts/patchsdl1.sh - - ./tools/ci/jobs/gcc9_silent.sh --enable-unittestsbin=doctest --without-manaplusgame --without-dyecmd + - ./tools/ci/jobs/gcc9_silent.sh --enable-unittestsbin=doctest --without-gameclient --without-dyecmd - ./tools/ci/scripts/separateunittests.sh <<: *job-push image: i386/debian:unstable @@ -336,7 +336,7 @@ gcc-9_separate_doctest_i386: gcc-9_separate_doctest_sdl2_i386: stage: build script: - - ./tools/ci/jobs/gcc9_silent.sh --enable-unittestsbin=doctest --without-manaplusgame --without-dyecmd --with-sdl2 + - ./tools/ci/jobs/gcc9_silent.sh --enable-unittestsbin=doctest --without-gameclient --without-dyecmd --with-sdl2 - ./tools/ci/scripts/separateunittests.sh <<: *job-push image: i386/debian:unstable @@ -367,7 +367,7 @@ gcc-9_systemcatch_tests: stage: build script: - ./tools/ci/scripts/patchsdl1.sh - - ./tools/ci/jobs/gcc9_tests.sh --enable-unittests=systemcatch --without-dyecmd --without-manaplusgame + - ./tools/ci/jobs/gcc9_tests.sh --enable-unittests=systemcatch --without-dyecmd --without-gameclient <<: *job-push variables: PACKAGES: gcc-9 g++-9 @@ -383,7 +383,7 @@ gcc-9_systemdoctest_tests: stage: build script: - ./tools/ci/scripts/patchsdl1.sh - - ./tools/ci/jobs/gcc9_tests.sh --enable-unittests=systemdoctest --without-dyecmd --without-manaplusgame + - ./tools/ci/jobs/gcc9_tests.sh --enable-unittests=systemdoctest --without-dyecmd --without-gameclient <<: *job-push variables: PACKAGES: gcc-9 g++-9 @@ -399,7 +399,7 @@ gcc-9_unsigned_char_tests: stage: build script: - ./tools/ci/scripts/patchsdl1.sh - - ./tools/ci/jobs/gcc9_tests.sh --without-dyecmd --without-manaplusgame + - ./tools/ci/jobs/gcc9_tests.sh --without-dyecmd --without-gameclient <<: *job-push variables: POST_CXXFLAGS: "-funsigned-char" @@ -414,7 +414,7 @@ gcc-9_unsigned_char_tests: gcc-9_sdl2_unsigned_char_tests: stage: build script: - - ./tools/ci/jobs/gcc9_tests.sh --with-sdl2 --without-dyecmd --without-manaplusgame + - ./tools/ci/jobs/gcc9_tests.sh --with-sdl2 --without-dyecmd --without-gameclient <<: *job-push variables: POST_CXXFLAGS: "-funsigned-char" diff --git a/tools/ci/branches/ci_glibcdebug/.gitlab-ci.yml b/tools/ci/branches/ci_glibcdebug/.gitlab-ci.yml index 2ada2b528..1952a8ec1 100644 --- a/tools/ci/branches/ci_glibcdebug/.gitlab-ci.yml +++ b/tools/ci/branches/ci_glibcdebug/.gitlab-ci.yml @@ -20,7 +20,7 @@ gcc-8_tests_glibcdebug_i386: stage: build script: - ./tools/ci/scripts/patchsdl1.sh - - ./tools/ci/jobs/gcc8_tests.sh --without-dyecmd --without-manaplusgame --enable-glibcdebug + - ./tools/ci/jobs/gcc8_tests.sh --without-dyecmd --without-gameclient --enable-glibcdebug image: i386/debian:unstable <<: *job-push variables: @@ -95,7 +95,7 @@ clang-7.0_glibcdebug_tests: stage: build script: - ./tools/ci/scripts/patchsdl1.sh - - ./tools/ci/jobs/clang70_tests.sh --without-dyecmd --without-manaplusgame --enable-glibcdebug + - ./tools/ci/jobs/clang70_tests.sh --without-dyecmd --without-gameclient --enable-glibcdebug <<: *job-push image: debian:buster variables: @@ -110,7 +110,7 @@ clang-7.0_glibcdebug_tests: clang-7.0_glibcdebug_tests_sdl2: stage: build script: - - ./tools/ci/jobs/clang70_tests.sh --with-sdl2 --without-dyecmd --without-manaplusgame --enable-glibcdebug + - ./tools/ci/jobs/clang70_tests.sh --with-sdl2 --without-dyecmd --without-gameclient --enable-glibcdebug <<: *job-push image: debian:buster variables: diff --git a/tools/ci/branches/ci_h/.gitlab-ci.yml b/tools/ci/branches/ci_h/.gitlab-ci.yml index 87eb88666..7054d42d6 100644 --- a/tools/ci/branches/ci_h/.gitlab-ci.yml +++ b/tools/ci/branches/ci_h/.gitlab-ci.yml @@ -18,11 +18,11 @@ gcc-5_h_all: stage: build script: - ./tools/ci/scripts/patchsdl1.sh - - ./tools/ci/jobs/gcc5_h.sh -std=c++0x -DDEBUGBUILD -DTMWA_SUPPORT -DENABLE_NLS -DUSE_OPENGL -DENABLE_LIBXML -I/usr/include/SDL - - ./tools/ci/jobs/gcc5_h.sh -std=c++0x -DDEBUGBUILD -DTMWA_SUPPORT -DENABLE_LIBXML -I/usr/include/SDL - - ./tools/ci/jobs/gcc5_h.sh -std=c++0x -DDEBUGBUILD -DTMWA_SUPPORT -DENABLE_NLS -DUSE_OPENGL -DENABLE_LIBXML -DUNITTESTS -DUNITTESTS_CATCH -DUNITTESTS_EMBED -I/usr/include/SDL - - ./tools/ci/jobs/gcc5_h.sh -std=c++0x -DDEBUGBUILD -DTMWA_SUPPORT -DENABLE_NLS -DENABLE_LIBXML -I/usr/include/SDL - - ./tools/ci/jobs/gcc5_h.sh -std=c++0x -DDEBUGBUILD -DENABLE_NLS -DUSE_OPENGL -DENABLE_LIBXML -I/usr/include/SDL + - ./tools/ci/jobs/gcc5_h.sh -std=c++11 -DDEBUGBUILD -DTMWA_SUPPORT -DENABLE_NLS -DUSE_OPENGL -DENABLE_LIBXML -I/usr/include/SDL + - ./tools/ci/jobs/gcc5_h.sh -std=c++11 -DDEBUGBUILD -DTMWA_SUPPORT -DENABLE_LIBXML -I/usr/include/SDL + - ./tools/ci/jobs/gcc5_h.sh -std=c++11 -DDEBUGBUILD -DTMWA_SUPPORT -DENABLE_NLS -DUSE_OPENGL -DENABLE_LIBXML -DUNITTESTS -DUNITTESTS_CATCH -DUNITTESTS_EMBED -I/usr/include/SDL + - ./tools/ci/jobs/gcc5_h.sh -std=c++11 -DDEBUGBUILD -DTMWA_SUPPORT -DENABLE_NLS -DENABLE_LIBXML -I/usr/include/SDL + - ./tools/ci/jobs/gcc5_h.sh -std=c++11 -DDEBUGBUILD -DENABLE_NLS -DUSE_OPENGL -DENABLE_LIBXML -I/usr/include/SDL <<: *job-push image: ubuntu:xenial variables: @@ -36,11 +36,11 @@ gcc-5_h_all_i386: stage: build script: - ./tools/ci/scripts/patchsdl1.sh - - ./tools/ci/jobs/gcc5_h.sh -std=c++0x -DDEBUGBUILD -DTMWA_SUPPORT -DENABLE_NLS -DUSE_OPENGL -DENABLE_LIBXML -I/usr/include/SDL - - ./tools/ci/jobs/gcc5_h.sh -std=c++0x -DDEBUGBUILD -DTMWA_SUPPORT -DENABLE_LIBXML -I/usr/include/SDL - - ./tools/ci/jobs/gcc5_h.sh -std=c++0x -DDEBUGBUILD -DTMWA_SUPPORT -DENABLE_NLS -DUSE_OPENGL -DENABLE_LIBXML -DUNITTESTS -DUNITTESTS_CATCH -DUNITTESTS_EMBED -I/usr/include/SDL - - ./tools/ci/jobs/gcc5_h.sh -std=c++0x -DDEBUGBUILD -DTMWA_SUPPORT -DENABLE_NLS -DENABLE_LIBXML -I/usr/include/SDL - - ./tools/ci/jobs/gcc5_h.sh -std=c++0x -DDEBUGBUILD -DENABLE_NLS -DUSE_OPENGL -DENABLE_LIBXML -I/usr/include/SDL + - ./tools/ci/jobs/gcc5_h.sh -std=c++11 -DDEBUGBUILD -DTMWA_SUPPORT -DENABLE_NLS -DUSE_OPENGL -DENABLE_LIBXML -I/usr/include/SDL + - ./tools/ci/jobs/gcc5_h.sh -std=c++11 -DDEBUGBUILD -DTMWA_SUPPORT -DENABLE_LIBXML -I/usr/include/SDL + - ./tools/ci/jobs/gcc5_h.sh -std=c++11 -DDEBUGBUILD -DTMWA_SUPPORT -DENABLE_NLS -DUSE_OPENGL -DENABLE_LIBXML -DUNITTESTS -DUNITTESTS_CATCH -DUNITTESTS_EMBED -I/usr/include/SDL + - ./tools/ci/jobs/gcc5_h.sh -std=c++11 -DDEBUGBUILD -DTMWA_SUPPORT -DENABLE_NLS -DENABLE_LIBXML -I/usr/include/SDL + - ./tools/ci/jobs/gcc5_h.sh -std=c++11 -DDEBUGBUILD -DENABLE_NLS -DUSE_OPENGL -DENABLE_LIBXML -I/usr/include/SDL image: i386/ubuntu:xenial <<: *job-push variables: @@ -56,11 +56,11 @@ gcc-5_h_pugi_all: stage: build script: - ./tools/ci/scripts/patchsdl1.sh - - ./tools/ci/jobs/gcc5_h.sh -std=c++0x -DDEBUGBUILD -DTMWA_SUPPORT -DENABLE_NLS -DUSE_OPENGL -DENABLE_PUGIXML -I/usr/include/SDL - - ./tools/ci/jobs/gcc5_h.sh -std=c++0x -DDEBUGBUILD -DTMWA_SUPPORT -DENABLE_PUGIXML -I/usr/include/SDL - - ./tools/ci/jobs/gcc5_h.sh -std=c++0x -DDEBUGBUILD -DTMWA_SUPPORT -DENABLE_NLS -DENABLE_PUGIXML -I/usr/include/SDL - - ./tools/ci/jobs/gcc5_h.sh -std=c++0x -DDEBUGBUILD -DTMWA_SUPPORT -DENABLE_NLS -DUSE_OPENGL -DENABLE_PUGIXML -DUNITTESTS -DUNITTESTS_CATCH -DUNITTESTS_EMBED -I/usr/include/SDL - - ./tools/ci/jobs/gcc5_h.sh -std=c++0x -DDEBUGBUILD -DENABLE_NLS -DUSE_OPENGL -DENABLE_PUGIXML -I/usr/include/SDL + - ./tools/ci/jobs/gcc5_h.sh -std=c++11 -DDEBUGBUILD -DTMWA_SUPPORT -DENABLE_NLS -DUSE_OPENGL -DENABLE_PUGIXML -I/usr/include/SDL + - ./tools/ci/jobs/gcc5_h.sh -std=c++11 -DDEBUGBUILD -DTMWA_SUPPORT -DENABLE_PUGIXML -I/usr/include/SDL + - ./tools/ci/jobs/gcc5_h.sh -std=c++11 -DDEBUGBUILD -DTMWA_SUPPORT -DENABLE_NLS -DENABLE_PUGIXML -I/usr/include/SDL + - ./tools/ci/jobs/gcc5_h.sh -std=c++11 -DDEBUGBUILD -DTMWA_SUPPORT -DENABLE_NLS -DUSE_OPENGL -DENABLE_PUGIXML -DUNITTESTS -DUNITTESTS_CATCH -DUNITTESTS_EMBED -I/usr/include/SDL + - ./tools/ci/jobs/gcc5_h.sh -std=c++11 -DDEBUGBUILD -DENABLE_NLS -DUSE_OPENGL -DENABLE_PUGIXML -I/usr/include/SDL image: ubuntu:xenial <<: *job-push variables: @@ -74,11 +74,11 @@ gcc-5_h_tinyxml2_all: stage: build script: - ./tools/ci/scripts/patchsdl1.sh - - ./tools/ci/jobs/gcc5_h.sh -std=c++0x -DDEBUGBUILD -DTMWA_SUPPORT -DENABLE_NLS -DUSE_OPENGL -DENABLE_TINYXML2 -I/usr/include/SDL - - ./tools/ci/jobs/gcc5_h.sh -std=c++0x -DDEBUGBUILD -DTMWA_SUPPORT -DENABLE_TINYXML2 -I/usr/include/SDL - - ./tools/ci/jobs/gcc5_h.sh -std=c++0x -DDEBUGBUILD -DTMWA_SUPPORT -DENABLE_NLS -DENABLE_TINYXML2 -I/usr/include/SDL - - ./tools/ci/jobs/gcc5_h.sh -std=c++0x -DDEBUGBUILD -DTMWA_SUPPORT -DENABLE_NLS -DUSE_OPENGL -DENABLE_TINYXML2 -DUNITTESTS -DUNITTESTS_CATCH -DUNITTESTS_EMBED -I/usr/include/SDL - - ./tools/ci/jobs/gcc5_h.sh -std=c++0x -DDEBUGBUILD -DENABLE_NLS -DUSE_OPENGL -DENABLE_TINYXML2 -I/usr/include/SDL + - ./tools/ci/jobs/gcc5_h.sh -std=c++11 -DDEBUGBUILD -DTMWA_SUPPORT -DENABLE_NLS -DUSE_OPENGL -DENABLE_TINYXML2 -I/usr/include/SDL + - ./tools/ci/jobs/gcc5_h.sh -std=c++11 -DDEBUGBUILD -DTMWA_SUPPORT -DENABLE_TINYXML2 -I/usr/include/SDL + - ./tools/ci/jobs/gcc5_h.sh -std=c++11 -DDEBUGBUILD -DTMWA_SUPPORT -DENABLE_NLS -DENABLE_TINYXML2 -I/usr/include/SDL + - ./tools/ci/jobs/gcc5_h.sh -std=c++11 -DDEBUGBUILD -DTMWA_SUPPORT -DENABLE_NLS -DUSE_OPENGL -DENABLE_TINYXML2 -DUNITTESTS -DUNITTESTS_CATCH -DUNITTESTS_EMBED -I/usr/include/SDL + - ./tools/ci/jobs/gcc5_h.sh -std=c++11 -DDEBUGBUILD -DENABLE_NLS -DUSE_OPENGL -DENABLE_TINYXML2 -I/usr/include/SDL image: ubuntu:xenial <<: *job-push variables: @@ -91,10 +91,10 @@ gcc-5_h_tinyxml2_all: gcc-5_h_sdl2: stage: build script: - - ./tools/ci/jobs/gcc5_h.sh -std=c++0x -DDEBUGBUILD -DTMWA_SUPPORT -DENABLE_NLS -DUSE_OPENGL -DENABLE_LIBXML -DUSE_SDL2 -I/usr/include/SDL2 - - ./tools/ci/jobs/gcc5_h.sh -std=c++0x -DDEBUGBUILD -DTMWA_SUPPORT -DENABLE_LIBXML -DUSE_SDL2 -I/usr/include/SDL2 - - ./tools/ci/jobs/gcc5_h.sh -std=c++0x -DDEBUGBUILD -DTMWA_SUPPORT -DENABLE_NLS -DENABLE_LIBXML -DUSE_SDL2 -I/usr/include/SDL2 - - ./tools/ci/jobs/gcc5_h.sh -std=c++0x -DDEBUGBUILD -DTMWA_SUPPORT -DENABLE_NLS -DUSE_OPENGL -DENABLE_LIBXML -DUNITTESTS -DUNITTESTS_CATCH -DUNITTESTS_EMBED -DUSE_SDL2 -I/usr/include/SDL2 + - ./tools/ci/jobs/gcc5_h.sh -std=c++11 -DDEBUGBUILD -DTMWA_SUPPORT -DENABLE_NLS -DUSE_OPENGL -DENABLE_LIBXML -DUSE_SDL2 -I/usr/include/SDL2 + - ./tools/ci/jobs/gcc5_h.sh -std=c++11 -DDEBUGBUILD -DTMWA_SUPPORT -DENABLE_LIBXML -DUSE_SDL2 -I/usr/include/SDL2 + - ./tools/ci/jobs/gcc5_h.sh -std=c++11 -DDEBUGBUILD -DTMWA_SUPPORT -DENABLE_NLS -DENABLE_LIBXML -DUSE_SDL2 -I/usr/include/SDL2 + - ./tools/ci/jobs/gcc5_h.sh -std=c++11 -DDEBUGBUILD -DTMWA_SUPPORT -DENABLE_NLS -DUSE_OPENGL -DENABLE_LIBXML -DUNITTESTS -DUNITTESTS_CATCH -DUNITTESTS_EMBED -DUSE_SDL2 -I/usr/include/SDL2 image: ubuntu:xenial <<: *job-push variables: @@ -107,10 +107,10 @@ gcc-5_h_sdl2: gcc-5_h_sdl2_i386: stage: build script: - - ./tools/ci/jobs/gcc5_h.sh -std=c++0x -DDEBUGBUILD -DTMWA_SUPPORT -DENABLE_NLS -DUSE_OPENGL -DENABLE_LIBXML -DUSE_SDL2 -I/usr/include/SDL2 - - ./tools/ci/jobs/gcc5_h.sh -std=c++0x -DDEBUGBUILD -DTMWA_SUPPORT -DENABLE_LIBXML -DUSE_SDL2 -I/usr/include/SDL2 - - ./tools/ci/jobs/gcc5_h.sh -std=c++0x -DDEBUGBUILD -DTMWA_SUPPORT -DENABLE_NLS -DENABLE_LIBXML -DUSE_SDL2 -I/usr/include/SDL2 - - ./tools/ci/jobs/gcc5_h.sh -std=c++0x -DDEBUGBUILD -DTMWA_SUPPORT -DENABLE_NLS -DUSE_OPENGL -DENABLE_LIBXML -DUNITTESTS -DUNITTESTS_CATCH -DUNITTESTS_EMBED -DUSE_SDL2 -I/usr/include/SDL2 + - ./tools/ci/jobs/gcc5_h.sh -std=c++11 -DDEBUGBUILD -DTMWA_SUPPORT -DENABLE_NLS -DUSE_OPENGL -DENABLE_LIBXML -DUSE_SDL2 -I/usr/include/SDL2 + - ./tools/ci/jobs/gcc5_h.sh -std=c++11 -DDEBUGBUILD -DTMWA_SUPPORT -DENABLE_LIBXML -DUSE_SDL2 -I/usr/include/SDL2 + - ./tools/ci/jobs/gcc5_h.sh -std=c++11 -DDEBUGBUILD -DTMWA_SUPPORT -DENABLE_NLS -DENABLE_LIBXML -DUSE_SDL2 -I/usr/include/SDL2 + - ./tools/ci/jobs/gcc5_h.sh -std=c++11 -DDEBUGBUILD -DTMWA_SUPPORT -DENABLE_NLS -DUSE_OPENGL -DENABLE_LIBXML -DUNITTESTS -DUNITTESTS_CATCH -DUNITTESTS_EMBED -DUSE_SDL2 -I/usr/include/SDL2 image: i386/ubuntu:xenial <<: *job-push variables: diff --git a/tools/ci/branches/ci_malloc/.gitlab-ci.yml b/tools/ci/branches/ci_malloc/.gitlab-ci.yml index ace0f93a3..bfa969317 100644 --- a/tools/ci/branches/ci_malloc/.gitlab-ci.yml +++ b/tools/ci/branches/ci_malloc/.gitlab-ci.yml @@ -19,7 +19,7 @@ gcc-8_tests_jmalloc: script: - ls ${MALLOC} - ./tools/ci/scripts/patchsdl1.sh - - LD_PRELOAD=${MALLOC} ./tools/ci/jobs/gcc8_tests.sh --without-dyecmd --without-manaplusgame + - LD_PRELOAD=${MALLOC} ./tools/ci/jobs/gcc8_tests.sh --without-dyecmd --without-gameclient <<: *job-push variables: PACKAGES: gcc-8 g++-8 @@ -36,7 +36,7 @@ gcc-8_tests_jmalloc_i386: script: - ls ${MALLOC} - ./tools/ci/scripts/patchsdl1.sh - - LD_PRELOAD=${MALLOC} ./tools/ci/jobs/gcc8_tests.sh --without-dyecmd --without-manaplusgame + - LD_PRELOAD=${MALLOC} ./tools/ci/jobs/gcc8_tests.sh --without-dyecmd --without-gameclient <<: *job-push image: i386/debian:unstable variables: @@ -53,7 +53,7 @@ gcc-8_tests_jmalloc_sdl2: stage: build script: - ls ${MALLOC} - - LD_PRELOAD=${MALLOC} ./tools/ci/jobs/gcc8_tests.sh --with-sdl2 --without-dyecmd --without-manaplusgame + - LD_PRELOAD=${MALLOC} ./tools/ci/jobs/gcc8_tests.sh --with-sdl2 --without-dyecmd --without-gameclient <<: *job-push variables: PACKAGES: gcc-8 g++-8 @@ -69,7 +69,7 @@ gcc-8_tests_jmalloc_sdl2_i386: stage: build script: - ls ${MALLOC} - - LD_PRELOAD=${MALLOC} ./tools/ci/jobs/gcc8_tests.sh --with-sdl2 --without-dyecmd --without-manaplusgame + - LD_PRELOAD=${MALLOC} ./tools/ci/jobs/gcc8_tests.sh --with-sdl2 --without-dyecmd --without-gameclient <<: *job-push image: i386/debian:unstable variables: @@ -86,7 +86,7 @@ gcc-8_tests_tcmalloc: stage: build script: - ./tools/ci/scripts/patchsdl1.sh - - ./tools/ci/jobs/gcc8_tests.sh --enable-tcmalloc --without-dyecmd --without-manaplusgame + - ./tools/ci/jobs/gcc8_tests.sh --enable-tcmalloc --without-dyecmd --without-gameclient <<: *job-push variables: PACKAGES: gcc-8 g++-8 @@ -101,7 +101,7 @@ gcc-8_tests_tcmalloc_i386: stage: build script: - ./tools/ci/scripts/patchsdl1.sh - - ./tools/ci/jobs/gcc8_tests.sh --enable-tcmalloc --without-dyecmd --without-manaplusgame + - ./tools/ci/jobs/gcc8_tests.sh --enable-tcmalloc --without-dyecmd --without-gameclient <<: *job-push image: i386/debian:unstable variables: @@ -116,7 +116,7 @@ gcc-8_tests_tcmalloc_i386: gcc-8_tests_tcmalloc_sdl2: stage: build script: - - ./tools/ci/jobs/gcc8_tests.sh --enable-tcmalloc --with-sdl2 --without-dyecmd --without-manaplusgame + - ./tools/ci/jobs/gcc8_tests.sh --enable-tcmalloc --with-sdl2 --without-dyecmd --without-gameclient <<: *job-push variables: PACKAGES: gcc-8 g++-8 @@ -130,7 +130,7 @@ gcc-8_tests_tcmalloc_sdl2: gcc-8_tests_tcmalloc_sdl2_i386: stage: build script: - - ./tools/ci/jobs/gcc8_tests.sh --enable-tcmalloc --with-sdl2 --without-dyecmd --without-manaplusgame + - ./tools/ci/jobs/gcc8_tests.sh --enable-tcmalloc --with-sdl2 --without-dyecmd --without-gameclient <<: *job-push image: i386/debian:unstable variables: diff --git a/tools/ci/branches/ci_mse/.gitlab-ci.yml b/tools/ci/branches/ci_mse/.gitlab-ci.yml index d35de9c08..3f347f003 100644 --- a/tools/ci/branches/ci_mse/.gitlab-ci.yml +++ b/tools/ci/branches/ci_mse/.gitlab-ci.yml @@ -20,7 +20,7 @@ gcc-7_tests_mse_i386: stage: build script: - ./tools/ci/scripts/patchsdl1.sh - - ./tools/ci/jobs/gcc7_tests.sh --without-dyecmd --without-manaplusgame --enable-stldebug + - ./tools/ci/jobs/gcc7_tests.sh --without-dyecmd --without-gameclient --enable-stldebug image: i386/debian:buster <<: *job-push variables: diff --git a/tools/ci/branches/ci_mxe/.gitlab-ci.yml b/tools/ci/branches/ci_mxe/.gitlab-ci.yml index 5e7526c7a..a0d64cdcf 100644 --- a/tools/ci/branches/ci_mxe/.gitlab-ci.yml +++ b/tools/ci/branches/ci_mxe/.gitlab-ci.yml @@ -24,7 +24,7 @@ mxe_gcc6_shared_32_testsbin: stage: build script: - ls /mxe - - ./tools/ci/jobs/mxe_gcc6_tests.sh --without-manaplusgame --without-dyecmd + - ./tools/ci/jobs/mxe_gcc6_tests.sh --without-gameclient --without-dyecmd artifacts: paths: - logs @@ -43,7 +43,7 @@ mxe_gcc6_shared_64_testsbin: stage: build script: - ls /mxe - - ./tools/ci/jobs/mxe_gcc6_tests.sh --without-manaplusgame --without-dyecmd + - ./tools/ci/jobs/mxe_gcc6_tests.sh --without-gameclient --without-dyecmd artifacts: paths: - logs diff --git a/tools/ci/branches/ci_site/.gitlab-ci.yml b/tools/ci/branches/ci_site/.gitlab-ci.yml index a5c5995b3..66fbe53d4 100644 --- a/tools/ci/branches/ci_site/.gitlab-ci.yml +++ b/tools/ci/branches/ci_site/.gitlab-ci.yml @@ -37,7 +37,7 @@ gcc-6_tests_gcov: - ./tools/ci/scripts/clonesrc.sh - cd manaplus - ./tools/ci/scripts/patchsdl1.sh - - ./tools/ci/jobs/gcc6_tests_gcov.sh --without-dyecmd --without-manaplusgame + - ./tools/ci/jobs/gcc6_tests_gcov.sh --without-dyecmd --without-gameclient <<: *job-push variables: PACKAGES: gcc-6 g++-6 @@ -55,7 +55,7 @@ gcc-6_sdl2_tests_gcov: script: - ./tools/ci/scripts/clonesrc.sh - cd manaplus - - ./tools/ci/jobs/gcc6_sdl2_tests_gcov.sh --without-dyecmd --without-manaplusgame + - ./tools/ci/jobs/gcc6_sdl2_tests_gcov.sh --without-dyecmd --without-gameclient <<: *job-push variables: PACKAGES: gcc-6 g++-6 diff --git a/tools/ci/branches/ci_xmllibs/.gitlab-ci.yml b/tools/ci/branches/ci_xmllibs/.gitlab-ci.yml index b1dcf40e6..ad0e743f8 100644 --- a/tools/ci/branches/ci_xmllibs/.gitlab-ci.yml +++ b/tools/ci/branches/ci_xmllibs/.gitlab-ci.yml @@ -20,7 +20,7 @@ gcc-8_pugixml_tests: stage: build script: - ./tools/ci/scripts/patchsdl1.sh - - ./tools/ci/jobs/gcc8_tests.sh --without-dyecmd --without-manaplusgame --enable-libxml=pugixml + - ./tools/ci/jobs/gcc8_tests.sh --without-dyecmd --without-gameclient --enable-libxml=pugixml <<: *job-push variables: PACKAGES: gcc-8 g++-8 @@ -35,7 +35,7 @@ gcc-8_pugixml_tests_i386: stage: build script: - ./tools/ci/scripts/patchsdl1.sh - - ./tools/ci/jobs/gcc8_tests.sh --without-dyecmd --without-manaplusgame --enable-libxml=pugixml + - ./tools/ci/jobs/gcc8_tests.sh --without-dyecmd --without-gameclient --enable-libxml=pugixml image: i386/debian:unstable <<: *job-push variables: diff --git a/tools/ci/branches/master/.gitlab-ci.yml b/tools/ci/branches/master/.gitlab-ci.yml index 610c4dfda..7c560cfc4 100644 --- a/tools/ci/branches/master/.gitlab-ci.yml +++ b/tools/ci/branches/master/.gitlab-ci.yml @@ -237,7 +237,7 @@ gcc-10_game_only: gcc-10_dyecmd_only: stage: prebuild script: - - ./tools/ci/jobs/gcc10.sh --without-manaplusgame + - ./tools/ci/jobs/gcc10.sh --without-gameclient <<: *job-push variables: PACKAGES: gcc-10 g++-10 @@ -248,7 +248,7 @@ gcc-10_dyecmd_only: gcc-10_unittestsbin: stage: prebuild script: - - ./tools/ci/jobs/gcc10_silent.sh --enable-unittestsbin --without-manaplusgame --without-dyecmd + - ./tools/ci/jobs/gcc10_silent.sh --enable-unittestsbin --without-gameclient --without-dyecmd <<: *job-push variables: PACKAGES: gcc-10 g++-10 @@ -281,11 +281,11 @@ linters: gcc-5_h_all: stage: prebuild script: - - ./tools/ci/jobs/gcc5_h.sh -std=c++0x -DDEBUGBUILD -DTMWA_SUPPORT -DENABLE_NLS -DUSE_OPENGL -DENABLE_LIBXML -I/usr/include/SDL - - ./tools/ci/jobs/gcc5_h.sh -std=c++0x -DDEBUGBUILD -DTMWA_SUPPORT -DENABLE_LIBXML -I/usr/include/SDL - - ./tools/ci/jobs/gcc5_h.sh -std=c++0x -DDEBUGBUILD -DTMWA_SUPPORT -DENABLE_NLS -DUSE_OPENGL -DENABLE_LIBXML -DUNITTESTS -DUNITTESTS_CATCH -DUNITTESTS_EMBED -I/usr/include/SDL - - ./tools/ci/jobs/gcc5_h.sh -std=c++0x -DDEBUGBUILD -DTMWA_SUPPORT -DENABLE_NLS -DENABLE_LIBXML -I/usr/include/SDL - - ./tools/ci/jobs/gcc5_h.sh -std=c++0x -DDEBUGBUILD -DENABLE_NLS -DUSE_OPENGL -DENABLE_LIBXML -I/usr/include/SDL + - ./tools/ci/jobs/gcc5_h.sh -std=c++11 -DDEBUGBUILD -DTMWA_SUPPORT -DENABLE_NLS -DUSE_OPENGL -DENABLE_LIBXML -I/usr/include/SDL + - ./tools/ci/jobs/gcc5_h.sh -std=c++11 -DDEBUGBUILD -DTMWA_SUPPORT -DENABLE_LIBXML -I/usr/include/SDL + - ./tools/ci/jobs/gcc5_h.sh -std=c++11 -DDEBUGBUILD -DTMWA_SUPPORT -DENABLE_NLS -DUSE_OPENGL -DENABLE_LIBXML -DUNITTESTS -DUNITTESTS_CATCH -DUNITTESTS_EMBED -I/usr/include/SDL + - ./tools/ci/jobs/gcc5_h.sh -std=c++11 -DDEBUGBUILD -DTMWA_SUPPORT -DENABLE_NLS -DENABLE_LIBXML -I/usr/include/SDL + - ./tools/ci/jobs/gcc5_h.sh -std=c++11 -DDEBUGBUILD -DENABLE_NLS -DUSE_OPENGL -DENABLE_LIBXML -I/usr/include/SDL <<: *job-push variables: PACKAGES: gcc-5 g++-5 @@ -296,11 +296,11 @@ gcc-5_h_all: gcc-5_h_all_i386: stage: prebuild script: - - ./tools/ci/jobs/gcc5_h.sh -std=c++0x -DDEBUGBUILD -DTMWA_SUPPORT -DENABLE_NLS -DUSE_OPENGL -DENABLE_LIBXML -I/usr/include/SDL - - ./tools/ci/jobs/gcc5_h.sh -std=c++0x -DDEBUGBUILD -DTMWA_SUPPORT -DENABLE_LIBXML -I/usr/include/SDL - - ./tools/ci/jobs/gcc5_h.sh -std=c++0x -DDEBUGBUILD -DTMWA_SUPPORT -DENABLE_NLS -DUSE_OPENGL -DENABLE_LIBXML -DUNITTESTS -DUNITTESTS_CATCH -DUNITTESTS_EMBED -I/usr/include/SDL - - ./tools/ci/jobs/gcc5_h.sh -std=c++0x -DDEBUGBUILD -DTMWA_SUPPORT -DENABLE_NLS -DENABLE_LIBXML -I/usr/include/SDL - - ./tools/ci/jobs/gcc5_h.sh -std=c++0x -DDEBUGBUILD -DENABLE_NLS -DUSE_OPENGL -DENABLE_LIBXML -I/usr/include/SDL + - ./tools/ci/jobs/gcc5_h.sh -std=c++11 -DDEBUGBUILD -DTMWA_SUPPORT -DENABLE_NLS -DUSE_OPENGL -DENABLE_LIBXML -I/usr/include/SDL + - ./tools/ci/jobs/gcc5_h.sh -std=c++11 -DDEBUGBUILD -DTMWA_SUPPORT -DENABLE_LIBXML -I/usr/include/SDL + - ./tools/ci/jobs/gcc5_h.sh -std=c++11 -DDEBUGBUILD -DTMWA_SUPPORT -DENABLE_NLS -DUSE_OPENGL -DENABLE_LIBXML -DUNITTESTS -DUNITTESTS_CATCH -DUNITTESTS_EMBED -I/usr/include/SDL + - ./tools/ci/jobs/gcc5_h.sh -std=c++11 -DDEBUGBUILD -DTMWA_SUPPORT -DENABLE_NLS -DENABLE_LIBXML -I/usr/include/SDL + - ./tools/ci/jobs/gcc5_h.sh -std=c++11 -DDEBUGBUILD -DENABLE_NLS -DUSE_OPENGL -DENABLE_LIBXML -I/usr/include/SDL image: i386/debian:unstable <<: *job-push variables: @@ -330,7 +330,7 @@ triggers: - echo /usr/local/spm/bin/${LIBNAME}_${LIBVERSION}/runenv.sh ${runenvz} - export LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libasan.so.5 - /usr/local/spm/bin/${LIBNAME}_${LIBVERSION}/runenv.sh ${runenvx} ${runenvz} env - - /usr/local/spm/bin/${LIBNAME}_${LIBVERSION}/runenv.sh ${runenvx} ${runenvz} ./tools/ci/jobs/gcc10_sanitize_tests.sh --enable-unittests=yes --without-manaplusgame --without-dyecmd + - /usr/local/spm/bin/${LIBNAME}_${LIBVERSION}/runenv.sh ${runenvx} ${runenvz} ./tools/ci/jobs/gcc10_sanitize_tests.sh --enable-unittests=yes --without-gameclient --without-dyecmd - export LD_PRELOAD - /usr/local/spm/bin/${LIBNAME}_${LIBVERSION}/runenv.sh ${runenvx} ${runenvz} ./tools/ci/scripts/checkldd.sh src/manaplustests - ldd ./src/manaplustests | grep "libasan" @@ -356,7 +356,7 @@ triggers: script: - ./tools/ci/scripts/downloadlib.sh ${LIBNAME} ${LIBVERSION} - export LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libasan.so.5 - - /usr/local/spm/bin/${LIBNAME}_${LIBVERSION}/runenv.sh ${runenvx} ${runenvz} ./tools/ci/jobs/gcc10_sanitize_tests.sh --enable-unittests=yes --with-sdl2 --without-manaplusgame --without-dyecmd + - /usr/local/spm/bin/${LIBNAME}_${LIBVERSION}/runenv.sh ${runenvx} ${runenvz} ./tools/ci/jobs/gcc10_sanitize_tests.sh --enable-unittests=yes --with-sdl2 --without-gameclient --without-dyecmd - export LD_PRELOAD - /usr/local/spm/bin/${LIBNAME}_${LIBVERSION}/runenv.sh ${runenvx} ${runenvz} ./tools/ci/scripts/checkldd.sh src/manaplustests - ldd ./src/manaplustests | grep "libasan" @@ -383,7 +383,7 @@ triggers: - ./tools/ci/scripts/downloadlib.sh ${LIBNAME} ${LIBVERSION} - echo /usr/local/spm/bin/${LIBNAME}_${LIBVERSION}/runenv.sh ${runenvz} - /usr/local/spm/bin/${LIBNAME}_${LIBVERSION}/runenv.sh ${runenvx} ${runenvz} env - - /usr/local/spm/bin/${LIBNAME}_${LIBVERSION}/runenv.sh ${runenvx} ${runenvz} ./tools/ci/jobs/gcc10_sanitize_tests.sh --enable-unittests=yes --without-manaplusgame --without-dyecmd + - /usr/local/spm/bin/${LIBNAME}_${LIBVERSION}/runenv.sh ${runenvx} ${runenvz} ./tools/ci/jobs/gcc10_sanitize_tests.sh --enable-unittests=yes --without-gameclient --without-dyecmd - /usr/local/spm/bin/${LIBNAME}_${LIBVERSION}/runenv.sh ${runenvx} ${runenvz} ./tools/ci/scripts/checkldd.sh src/manaplustests - ldd ./src/manaplustests | grep "libasan" <<: *job-push @@ -405,7 +405,7 @@ triggers: stage: build script: - ./tools/ci/scripts/downloadlib.sh ${LIBNAME} ${LIBVERSION} - - /usr/local/spm/bin/${LIBNAME}_${LIBVERSION}/runenv.sh ${runenvx} ${runenvz} ./tools/ci/jobs/gcc10_sanitize_tests.sh --enable-unittests=yes --with-sdl2 --without-manaplusgame --without-dyecmd + - /usr/local/spm/bin/${LIBNAME}_${LIBVERSION}/runenv.sh ${runenvx} ${runenvz} ./tools/ci/jobs/gcc10_sanitize_tests.sh --enable-unittests=yes --with-sdl2 --without-gameclient --without-dyecmd - /usr/local/spm/bin/${LIBNAME}_${LIBVERSION}/runenv.sh ${runenvx} ${runenvz} ./tools/ci/scripts/checkldd.sh src/manaplustests - ldd ./src/manaplustests | grep "libasan" <<: *job-push @@ -430,7 +430,7 @@ triggers: - ./tools/ci/scripts/downloadlib.sh ${LIBNAME} ${LIBVERSION} - echo /usr/local/spm/bin/${LIBNAME}_${LIBVERSION}/runenv.sh ${runenvz} - /usr/local/spm/bin/${LIBNAME}_${LIBVERSION}/runenv.sh ${runenvx} ${runenvz} env - - /usr/local/spm/bin/${LIBNAME}_${LIBVERSION}/runenv.sh ${runenvx} ${runenvz} ./tools/ci/jobs/gcc10_sanitize_tests.sh --enable-unittests=yes --without-manaplusgame --without-dyecmd + - /usr/local/spm/bin/${LIBNAME}_${LIBVERSION}/runenv.sh ${runenvx} ${runenvz} ./tools/ci/jobs/gcc10_sanitize_tests.sh --enable-unittests=yes --without-gameclient --without-dyecmd - /usr/local/spm/bin/${LIBNAME}_${LIBVERSION}/runenv.sh ${runenvx} ${runenvz} ./tools/ci/scripts/checkldd.sh src/manaplustests - ldd ./src/manaplustests | grep "libasan" <<: *job-push @@ -454,7 +454,7 @@ triggers: stage: build script: - ./tools/ci/scripts/downloadlib.sh ${LIBNAME} ${LIBVERSION} - - /usr/local/spm/bin/${LIBNAME}_${LIBVERSION}/runenv.sh ${runenvx} ${runenvz} ./tools/ci/jobs/gcc10_sanitize_tests.sh --enable-unittests=yes --with-sdl2 --without-manaplusgame --without-dyecmd + - /usr/local/spm/bin/${LIBNAME}_${LIBVERSION}/runenv.sh ${runenvx} ${runenvz} ./tools/ci/jobs/gcc10_sanitize_tests.sh --enable-unittests=yes --with-sdl2 --without-gameclient --without-dyecmd - /usr/local/spm/bin/${LIBNAME}_${LIBVERSION}/runenv.sh ${runenvx} ${runenvz} ./tools/ci/scripts/checkldd.sh src/manaplustests - ldd ./src/manaplustests | grep "libasan" <<: *job-push diff --git a/tools/ci/jobs/cpplint.sh b/tools/ci/jobs/cpplint.sh index 7bbccf271..d9ccf92c8 100755 --- a/tools/ci/jobs/cpplint.sh +++ b/tools/ci/jobs/cpplint.sh @@ -1,14 +1,21 @@ #!/usr/bin/env bash -export LOGFILE=cpplint.log +set -e # Fail if any command fails +set -u # Fail if any variable is unset when used +export LOGFILE=cpplint.log source ./tools/ci/scripts/init.sh # Re-download if not executable or older than a day if [[ ! -x cpplint.py \ || $(find cpplint.py -mtime 1 -print) ]]; then - tools/ci/scripts/retry.sh wget "https://raw.githubusercontent.com/google/styleguide/gh-pages/cpplint/cpplint.py" - chmod +x cpplint.py + #tools/ci/scripts/retry.sh wget "https://raw.githubusercontent.com/google/styleguide/gh-pages/cpplint/cpplint.py" + # Google no longer offers their cpplint and suggests using the following one, instead: + tools/ci/scripts/retry.sh wget "https://raw.githubusercontent.com/cpplint/cpplint/refs/tags/2.0.0/cpplint.py" + chmod +x cpplint.py + + # env python -> env python3 + sed -i -s -e '1s/python$/python3/' cpplint.py fi declare -a args @@ -40,19 +47,25 @@ args+=("--filter=\ -build/c++tr1"\ ) +# Cannot find a good way to handle execution errors +# (such cpplint.py demanding a version of Python that does not exist) +# So use || true here and assume any other problems will be exposed +# by the grep below. find src \ -type f \ - -name "*.cpp" -o -name "*.hpp" -o -name "*.h" -o -name "*.cc" \ - -exec ./cpplint.py "${args[@]}" {} \+ 2>${ERRFILE}2 + \( -name "*.cc" \ + -o -name "*.cpp"\ + -o -name "*.h" \ + -o -name "*.hpp" \ + \) -exec ./cpplint.py --verbose=5 "${args[@]}" {} \+ 2>"$ERRFILE_UNFILTERED" \ + || true -grep ": " ${ERRFILE}2 | grep -v -e "src/debug/" \ - -e "unittests/doctest.h" \ - -e "unittests/catch.hpp" \ - -e "debug/fast_mutex" \ - -e "sdl2gfx/SDL2" \ - >${ERRFILE} +# If grep does not find any messages, it exits non-zero. Therefore, use ||true +grep -v -e "^src/debug/nvwa/debug_new.cpp" \ + -e "^src/unittests/doctest.h" \ + -e "^src/unittests/catch.hpp" \ + < "$ERRFILE_UNFILTERED" > "$ERRFILE" || true -rm ${ERRFILE}2 run_check_warnings diff --git a/tools/ci/jobs/gcc47_c++11.sh b/tools/ci/jobs/gcc47_c++11.sh index 3860ee79e..b93a03b7b 100755 --- a/tools/ci/jobs/gcc47_c++11.sh +++ b/tools/ci/jobs/gcc47_c++11.sh @@ -16,7 +16,6 @@ source ./tools/ci/scripts/init.sh export CXXFLAGS="$CXXFLAGS -ggdb3 -O2 -pipe -ffast-math \ -funswitch-loops \ --std=c++0x \ -fno-omit-frame-pointer $POST_CXXFLAGS" do_init diff --git a/tools/ci/jobs/gcc48_c++11.sh b/tools/ci/jobs/gcc48_c++11.sh index 9652f1fc1..c6030ea22 100755 --- a/tools/ci/jobs/gcc48_c++11.sh +++ b/tools/ci/jobs/gcc48_c++11.sh @@ -31,7 +31,7 @@ export CXXFLAGS="$CXXFLAGS -ggdb3 -O2 -pipe -ffast-math \ -Wwrite-strings -Wstack-protector -Wshadow -Wunused-macros -Wsynth \ -Wbuiltin-macro-redefined -Wctor-dtor-privacy -Wdeprecated \ -Wendif-labels -Wformat=1 -Wimport -Wnon-virtual-dtor -Wpsabi \ --Wsign-promo -Wwrite-strings -D_FORTIFY_SOURCE=2 -Wc++11-compat -std=c++0x \ +-Wsign-promo -Wwrite-strings -D_FORTIFY_SOURCE=2 -Wc++17-compat -std=c++11 \ -Wdelete-non-virtual-dtor -Wmaybe-uninitialized -Wunused-local-typedefs \ -Wvector-operation-performance -Wfree-nonheap-object -Winvalid-memory-model \ -Wnarrowing -Wzero-as-null-pointer-constant -funsafe-loop-optimizations \ diff --git a/tools/ci/jobs/gcc49_c++11.sh b/tools/ci/jobs/gcc49_c++11.sh index e9ecdc154..09c161367 100755 --- a/tools/ci/jobs/gcc49_c++11.sh +++ b/tools/ci/jobs/gcc49_c++11.sh @@ -30,7 +30,7 @@ export CXXFLAGS="$CXXFLAGS -ggdb3 -O2 -pipe -ffast-math \ -Wwrite-strings -Wstack-protector -Wshadow -Wunused-macros -Wsynth \ -Wbuiltin-macro-redefined -Wctor-dtor-privacy -Wdeprecated \ -Wendif-labels -Wformat=1 -Wimport -Wnon-virtual-dtor -Wpsabi \ --Wsign-promo -Wwrite-strings -D_FORTIFY_SOURCE=2 -Wc++11-compat -std=c++0x \ +-Wsign-promo -Wwrite-strings -D_FORTIFY_SOURCE=2 -Wc++17-compat -std=c++11 \ -Wdelete-non-virtual-dtor -Wmaybe-uninitialized -Wunused-local-typedefs \ -Wvector-operation-performance -Wfree-nonheap-object -Winvalid-memory-model \ -Wnarrowing -Wzero-as-null-pointer-constant -funsafe-loop-optimizations \ diff --git a/tools/ci/jobs/gcc49_sanitize.sh b/tools/ci/jobs/gcc49_sanitize.sh index f9ae60711..3c22f7e21 100755 --- a/tools/ci/jobs/gcc49_sanitize.sh +++ b/tools/ci/jobs/gcc49_sanitize.sh @@ -32,7 +32,7 @@ export CXXFLAGS="$CXXFLAGS -ggdb3 -O2 -ffast-math \ -Wwrite-strings -Wstack-protector -Wshadow -Wunused-macros -Wsynth \ -Wbuiltin-macro-redefined -Wctor-dtor-privacy -Wdeprecated \ -Wendif-labels -Wformat=1 -Wimport -Wnon-virtual-dtor -Wpsabi \ --Wsign-promo -Wwrite-strings -D_FORTIFY_SOURCE=2 -Wc++11-compat -std=c++0x \ +-Wsign-promo -Wwrite-strings -D_FORTIFY_SOURCE=2 -Wc++17-compat -std=c++11 \ -Wdelete-non-virtual-dtor -Wmaybe-uninitialized -Wunused-local-typedefs \ -Wvector-operation-performance -Wfree-nonheap-object -Winvalid-memory-model \ -Wnarrowing -Wzero-as-null-pointer-constant -funsafe-loop-optimizations \ diff --git a/tools/ci/jobs/gcc49_sanitize_tests.sh b/tools/ci/jobs/gcc49_sanitize_tests.sh index 787022b13..2432dc02d 100755 --- a/tools/ci/jobs/gcc49_sanitize_tests.sh +++ b/tools/ci/jobs/gcc49_sanitize_tests.sh @@ -32,7 +32,7 @@ export CXXFLAGS="$CXXFLAGS -ggdb3 -O2 -ffast-math \ -Wwrite-strings -Wstack-protector -Wshadow -Wunused-macros -Wsynth \ -Wbuiltin-macro-redefined -Wctor-dtor-privacy -Wdeprecated \ -Wendif-labels -Wformat=1 -Wimport -Wnon-virtual-dtor -Wpsabi \ --Wsign-promo -Wwrite-strings -D_FORTIFY_SOURCE=2 -Wc++11-compat -std=c++0x \ +-Wsign-promo -Wwrite-strings -D_FORTIFY_SOURCE=2 -Wc++17-compat -std=c++11 \ -Wdelete-non-virtual-dtor -Wmaybe-uninitialized -Wunused-local-typedefs \ -Wvector-operation-performance -Wfree-nonheap-object -Winvalid-memory-model \ -Wnarrowing -Wzero-as-null-pointer-constant -funsafe-loop-optimizations \ diff --git a/tools/ci/jobs/nsiqcppstyle.sh b/tools/ci/jobs/nsiqcppstyle.sh index fd9f0499a..e83c8e932 100755 --- a/tools/ci/jobs/nsiqcppstyle.sh +++ b/tools/ci/jobs/nsiqcppstyle.sh @@ -1,19 +1,25 @@ #!/usr/bin/env bash -export LOGFILE=nsiqcppstyle.log +set -e # Fail if any command fails +set -u # Fail if any variable is unset when used +export LOGFILE=nsiqcppstyle.log source ./tools/ci/scripts/init.sh rm -rf nsiqcppstyle.git ./tools/ci/scripts/retry.sh git clone https://gitlab.com/4144/nsiqcppstyle nsiqcppstyle.git +# replace python -> python2 on line3. (Explicitly call python2) +sed -i -s -e '3s/^python/python2/' ./nsiqcppstyle.git/nsiqcppstyle + ./nsiqcppstyle.git/nsiqcppstyle --ci --show-url src \ | grep -v -e "catch.hpp" \ -e "doctest.h" \ -e "sdl2gfx" \ -e "/debug/" \ - > logs/nsiqcppstyle1.log + > "$ERRFILE_UNFILTERED" +# If grep does not find any messages, it exits non-zero. Therefore, use ||true grep -v -E \ -e "gamemodifiers[.]cpp(.+): Incorrect align on long parameter list in front of '(N_|{|})'" \ -e "graphics_calcImageRect[.]hpp(.+): function [(]calcTileVertexesInline[)] has non named parameter" \ @@ -23,10 +29,8 @@ grep -v -E \ -e "windowmenu[.]cpp(.+): Incorrect align on long parameter list in front of '(.|Visible_true)', it should be aligen in column 15" \ -e "channeltab[.]h(.+): Incorrect align on long parameter list in front of 'const'" \ -e "/enums/simpletypes/(.+): function [(]defIntEnum[)] has non named parameter" \ - logs/nsiqcppstyle1.log > "${ERRFILE}" + "$ERRFILE_UNFILTERED" > "$ERRFILE" || true + +run_check_warnings -if [[ -s "${ERRFILE}" ]]; then - echo "Warnings detected" - cat ${ERRFILE} - exit 1 -fi +echo ok diff --git a/tools/ci/jobs/potfiles_update_check.sh b/tools/ci/jobs/potfiles_update_check.sh new file mode 100755 index 000000000..6610d4332 --- /dev/null +++ b/tools/ci/jobs/potfiles_update_check.sh @@ -0,0 +1,21 @@ +#!/usr/bin/env bash + +set -e # Fail if any command fails +set -u # Fail if any variable is unset when used + +export LOGFILE=potfiles.log +source ./tools/ci/scripts/init.sh + +./po/POTgen.sh + +# error if POTgen applied any changes +git diff >> "$ERRFILE" + +# Save in-progress work in case someone runs this script manually. +#git stash push -m "POTgen run" +# Restore repository back to original state for other ci jobs. +#git reset --hard + +run_check_warnings + +echo ok diff --git a/tools/ci/scripts/azure/mxetest.sh b/tools/ci/scripts/azure/mxetest.sh index 30cf8342e..5745b69a0 100755 --- a/tools/ci/scripts/azure/mxetest.sh +++ b/tools/ci/scripts/azure/mxetest.sh @@ -6,7 +6,7 @@ echo docker login registry.gitlab.com -u azure -p TOKEN docker login registry.gitlab.com -u azure -p $GITLABTOKEN || exit 1 export IMAGE="registry.gitlab.com/manaplus/mxe:gcc6_shared_${BITS}" -export COMMAND="./tools/ci/jobs/mxe_gcc6_tests.sh --without-manaplusgame --without-dyecmd" +export COMMAND="./tools/ci/jobs/mxe_gcc6_tests.sh --without-gameclient --without-dyecmd" export PACKAGES="bash" ./tools/ci/scripts/docker_run_cross.sh || exit 1 mkdir dlls || true diff --git a/tools/ci/scripts/circleci/gcc6_sanitize_tests.sh b/tools/ci/scripts/circleci/gcc6_sanitize_tests.sh index afaae9234..2f0d5684c 100755 --- a/tools/ci/scripts/circleci/gcc6_sanitize_tests.sh +++ b/tools/ci/scripts/circleci/gcc6_sanitize_tests.sh @@ -6,7 +6,7 @@ echo "Current node: ${CIRCLE_NODE_INDEX}" case $CIRCLE_NODE_INDEX in 0) export IMAGE=debian:stretch - export COMMAND="./tools/ci/jobs/gcc6_sanitize_tests.sh --enable-unittests=yes --without-dyecmd --without-manaplusgame --without-opengl --with-sdl2" + export COMMAND="./tools/ci/jobs/gcc6_sanitize_tests.sh --enable-unittests=yes --without-dyecmd --without-gameclient --without-opengl --with-sdl2" export PACKAGES="gcc-6 g++-6 ${LIBS_PACKAGES} ${SDL2} valgrind" ./tools/ci/scripts/docker_run.sh ;; @@ -15,7 +15,7 @@ case $CIRCLE_NODE_INDEX in ;; 2) export IMAGE=debian:stretch - export COMMAND="./tools/ci/jobs/gcc6_sanitize_tests.sh --enable-unittests=yes --without-dyecmd --without-manaplusgame --without-opengl" + export COMMAND="./tools/ci/jobs/gcc6_sanitize_tests.sh --enable-unittests=yes --without-dyecmd --without-gameclient --without-opengl" export PACKAGES="gcc-6 g++-6 ${LIBS_PACKAGES} ${SDL1} valgrind" ./tools/ci/scripts/docker_run.sh ;; diff --git a/tools/ci/scripts/circleci/gcc6_tests.sh b/tools/ci/scripts/circleci/gcc6_tests.sh index 644f4b75f..d15a7dad9 100755 --- a/tools/ci/scripts/circleci/gcc6_tests.sh +++ b/tools/ci/scripts/circleci/gcc6_tests.sh @@ -6,25 +6,25 @@ echo "Current node: ${CIRCLE_NODE_INDEX}" case $CIRCLE_NODE_INDEX in 0) export IMAGE=i386/debian:stretch - export COMMAND="./tools/ci/jobs/gcc6_tests.sh --without-dyecmd --without-manaplusgame --without-opengl" + export COMMAND="./tools/ci/jobs/gcc6_tests.sh --without-dyecmd --without-gameclient --without-opengl" export PACKAGES="gcc-6 g++-6 ${LIBS_PACKAGES} ${SDL1} valgrind" ./tools/ci/scripts/docker_run.sh ;; 1) export IMAGE=debian:stretch - export COMMAND="./tools/ci/jobs/gcc6_tests.sh --without-dyecmd --without-manaplusgame --without-opengl --enable-glibcdebug --with-sdl2" + export COMMAND="./tools/ci/jobs/gcc6_tests.sh --without-dyecmd --without-gameclient --without-opengl --enable-glibcdebug --with-sdl2" export PACKAGES="gcc-6 g++-6 ${LIBS_PACKAGES} ${SDL2} valgrind" ./tools/ci/scripts/docker_run.sh ;; 2) export IMAGE=i386/debian:stretch - export COMMAND="./tools/ci/jobs/gcc6_tests.sh --without-dyecmd --without-manaplusgame --without-opengl --enable-glibcdebug --with-sdl2" + export COMMAND="./tools/ci/jobs/gcc6_tests.sh --without-dyecmd --without-gameclient --without-opengl --enable-glibcdebug --with-sdl2" export PACKAGES="gcc-6 g++-6 ${LIBS_PACKAGES} ${SDL2} valgrind" ./tools/ci/scripts/docker_run.sh ;; 3) export IMAGE=debian:stretch - export COMMAND="./tools/ci/jobs/gcc6_tests.sh --without-dyecmd --without-manaplusgame --without-opengl --enable-glibcdebug" + export COMMAND="./tools/ci/jobs/gcc6_tests.sh --without-dyecmd --without-gameclient --without-opengl --enable-glibcdebug" export PACKAGES="gcc-6 g++-6 ${LIBS_PACKAGES} ${SDL1} valgrind" ./tools/ci/scripts/docker_run.sh ;; diff --git a/tools/ci/scripts/circleci/gcc7_sanitize_tests.sh b/tools/ci/scripts/circleci/gcc7_sanitize_tests.sh index 1b3c9a8fa..c6b9e9e05 100755 --- a/tools/ci/scripts/circleci/gcc7_sanitize_tests.sh +++ b/tools/ci/scripts/circleci/gcc7_sanitize_tests.sh @@ -9,7 +9,7 @@ case $CIRCLE_NODE_INDEX in ;; 1) export IMAGE=debian:buster - export COMMAND="./tools/ci/jobs/gcc7_sanitize_tests.sh --enable-unittests=yes --without-dyecmd --without-manaplusgame --without-opengl" + export COMMAND="./tools/ci/jobs/gcc7_sanitize_tests.sh --enable-unittests=yes --without-dyecmd --without-gameclient --without-opengl" export PACKAGES="gcc-7 g++-7 ${LIBS_PACKAGES} ${SDL1} valgrind" ./tools/ci/scripts/docker_run.sh ;; @@ -18,7 +18,7 @@ case $CIRCLE_NODE_INDEX in ;; 3) export IMAGE=debian:buster - export COMMAND="./tools/ci/jobs/gcc7_sanitize_tests.sh --enable-unittests=yes --without-dyecmd --without-manaplusgame --without-opengl --with-sdl2" + export COMMAND="./tools/ci/jobs/gcc7_sanitize_tests.sh --enable-unittests=yes --without-dyecmd --without-gameclient --without-opengl --with-sdl2" export PACKAGES="gcc-7 g++-7 ${LIBS_PACKAGES} ${SDL2} valgrind" ./tools/ci/scripts/docker_run.sh ;; diff --git a/tools/ci/scripts/circleci/gcc7_tests.sh b/tools/ci/scripts/circleci/gcc7_tests.sh index 0acab9a7b..dae8188fc 100755 --- a/tools/ci/scripts/circleci/gcc7_tests.sh +++ b/tools/ci/scripts/circleci/gcc7_tests.sh @@ -6,25 +6,25 @@ echo "Current node: ${CIRCLE_NODE_INDEX}" case $CIRCLE_NODE_INDEX in 0) export IMAGE=debian:buster - export COMMAND="./tools/ci/jobs/gcc7_tests.sh --without-dyecmd --without-manaplusgame --without-opengl --enable-glibcdebug --with-sdl2" + export COMMAND="./tools/ci/jobs/gcc7_tests.sh --without-dyecmd --without-gameclient --without-opengl --enable-glibcdebug --with-sdl2" export PACKAGES="gcc-7 g++-7 ${LIBS_PACKAGES} ${SDL2} valgrind" ./tools/ci/scripts/docker_run.sh ;; 1) export IMAGE=i386/debian:buster - export COMMAND="./tools/ci/jobs/gcc7_tests.sh --without-dyecmd --without-manaplusgame --without-opengl --enable-glibcdebug --with-sdl2" + export COMMAND="./tools/ci/jobs/gcc7_tests.sh --without-dyecmd --without-gameclient --without-opengl --enable-glibcdebug --with-sdl2" export PACKAGES="gcc-7 g++-7 ${LIBS_PACKAGES} ${SDL2} valgrind" ./tools/ci/scripts/docker_run.sh ;; 2) export IMAGE=debian:buster - export COMMAND="./tools/ci/jobs/gcc7_tests.sh --without-dyecmd --without-manaplusgame --without-opengl --enable-glibcdebug" + export COMMAND="./tools/ci/jobs/gcc7_tests.sh --without-dyecmd --without-gameclient --without-opengl --enable-glibcdebug" export PACKAGES="gcc-7 g++-7 ${LIBS_PACKAGES} ${SDL1} valgrind" ./tools/ci/scripts/docker_run.sh ;; 3) export IMAGE=i386/debian:buster - export COMMAND="./tools/ci/jobs/gcc7_tests.sh --without-dyecmd --without-manaplusgame --without-opengl" + export COMMAND="./tools/ci/jobs/gcc7_tests.sh --without-dyecmd --without-gameclient --without-opengl" export PACKAGES="gcc-7 g++-7 ${LIBS_PACKAGES} ${SDL1} valgrind" ./tools/ci/scripts/docker_run.sh ;; diff --git a/tools/ci/scripts/init.sh b/tools/ci/scripts/init.sh index ed25a59e8..cd716cf94 100755 --- a/tools/ci/scripts/init.sh +++ b/tools/ci/scripts/init.sh @@ -2,8 +2,10 @@ export dir=$(pwd) export ERRFILE=${dir}/logs/${LOGFILE} +export ERRFILE_UNFILTERED=${ERRFILE%.log}.unfiltered.log rm -f "$ERRFILE" +rm -f "$ERRFILE_UNFILTERED" function do_init { $CC --version @@ -150,6 +152,16 @@ function run_make { echo "make -j${JOBS} V=0 $*" make -j${JOBS} V=0 $* 2>$ERRFILE check_error $? + + for path in "src/manaplus" "src/dyecmd"; do + if [[ -f "$path" ]]; then + stat -c '%s %n' "$path" + strip -o "$path.stripped" "$path" + stat -c '%s %n' "$path.stripped" + else + printf "%s does not exist, no strip & exe size summary\n" "$path" + fi + done } function run_make_check { @@ -205,9 +217,15 @@ function run_gcov { function run_check_warnings { if [[ -s "$ERRFILE" ]]; then + printf "Warnings detected in %s:\n" "$ERRFILE" cat $ERRFILE exit 1 fi + + if [[ -s "$ERRFILE_UNFILTERED" ]]; then + printf "Warnings detected in %s. The maintainer might want take a peek, sometimes.\n" \ + "$ERRFILE_UNFILTERED" + fi } function run_h { diff --git a/tools/ci/scripts/runtest.sh b/tools/ci/scripts/runtest.sh index e629fc514..622e04da0 100755 --- a/tools/ci/scripts/runtest.sh +++ b/tools/ci/scripts/runtest.sh @@ -18,7 +18,7 @@ function check_is_run { } function check_assert { - grep -A 20 "Assert:" "${HOME}/.local/share/mana/manaplus.log" + grep -A 20 "Assert:" "${HOME}/.local/share/mana/manaverse.log" if [ "$?" == 0 ]; then echo "Assert found in log" exit 1 @@ -31,9 +31,9 @@ function wait_for_servers_list { echo "wait for servers list ${n}" check_is_run # check here - grep "Skipping servers list update" "${HOME}/.local/share/mana/manaplus.log" && return - grep "Servers list updated" "${HOME}/.local/share/mana/manaplus.log" && return - grep "Error: servers list updating error" "${HOME}/.local/share/mana/manaplus.log" + grep "Skipping servers list update" "${HOME}/.local/share/mana/manaverse.log" && return + grep "Servers list updated" "${HOME}/.local/share/mana/manaverse.log" && return + grep "Error: servers list updating error" "${HOME}/.local/share/mana/manaverse.log" if [ "$?" == 0 ]; then echo "Servers list downloading error" exit 1 diff --git a/tools/ci/scripts/runtests.sh b/tools/ci/scripts/runtests.sh index 1263521f9..1afe5815f 100755 --- a/tools/ci/scripts/runtests.sh +++ b/tools/ci/scripts/runtests.sh @@ -26,8 +26,8 @@ while true; do rm "/root/.config/mana/mana/config.xml" rm "${HOME}/.config/mana/mana/serverlistplus.xml" rm "/root/.config/mana/mana/serverlistplus.xml" - rm "${HOME}/.local/share/mana/manaplus.log" - rm "/root/.local/share/mana/manaplus.log" + rm "${HOME}/.local/share/mana/manaverse.log" + rm "/root/.local/share/mana/manaverse.log" ./tools/ci/scripts/runtest.sh if [ "$?" != 0 ]; then exit 1 @@ -45,8 +45,8 @@ echo "existing config runs" n=0 while true; do echo "run test ${n}" - rm "${HOME}/.local/share/mana/manaplus.log" - rm "/root/.local/share/mana/manaplus.log" + rm "${HOME}/.local/share/mana/manaverse.log" + rm "/root/.local/share/mana/manaverse.log" ./tools/ci/scripts/runtest.sh if [ "$?" != 0 ]; then exit 1 |