Compare commits

...

12 Commits

Author SHA1 Message Date
b34c93c399 fix missing flags, fix gettex generation, fix postgresql find pkg
* add missing flags for release flags on cmake
* use only cmake or pkgdonfig, remove PostgreSQL fallback code missed the includes
https://github.com/minetest/minetest/issues/11219
a24899bf2d
3e2145d662
* fix po build gettex due named files as minetest.po
* fix conditional gettex when no gettex configuration on cmake
2023-09-15 05:20:25 -04:00
04029e14a4 set flags on releases for cmake on lua module build in 2023-09-15 05:19:41 -04:00
4ba41738e0 find luajit by pkgconfig on cmake 2023-09-15 05:18:43 -04:00
3a919d3a3c fix missing git command for build ci/cd gitlab 2023-09-15 05:16:54 -04:00
8f690d2bbb set a new compilation set of rules, tune cmakefiles, tune buils
* tune up gitlab ci:
  * add winbuntu 14, add debian 7, winbuntu 17, build minetest for olders one
  * use minenux minetest repo game (seems not work)
  * remove non buildable stages.. remove windo shit
  * back cmake in list new behaviour for blacklist locales
  * gitlab ci build for debian 8 using backports on jsoncpp
  * solved https://github.com/minetest/minetest/issues/6567
  * solved https://github.com/minetest/minetest/issues/7681
* cmake fixed to minimum supported and c++11 standar able
  * Fix no locales being generated when APPLY_LOCALE_BLACKLIST=0
  * Fix linking with Postgres libs:
  * closes https://github.com/minetest/minetest/issues/12149
  * closes https://github.com/minetest/minetest/issues/11219
  * PostgreSQL fallback code missed the includes
  https://github.com/minetest/minetest/issues/11219
  * a24899bf2d
  * 3e2145d662
  * integrates https://github.com/minetest/minetest/pull/11215
  *  a24899bf2d
  * backported 998e4820c9
* use SSE registers for FP operations on i386 for modern gcc platforms only
  * only use if related are given, by example 32bit using gcc
    compilers/stdlibs becouse of the long time bugs around those
    errors by desing, its not about to crash the engine.. its about to
    permits to hacked clients (either players or the client program per se)
    making predictable results, so predictable results permits to catch
    securit issues!
  * floating point problems are only on modern gcc and modern platform
    arches, raising problems like bad calculations positions..
    a long time bug  reported at https://git.minetest.land/Mineclonia/Mineclonia/issues/201
    and addressed at https://github.com/minetest/minetest/issues/11742#issuecomment-994444462
    with enought explanations but not accepted byt stupid developers..
    now years later.. the problems were solved and reconiced as big bug!
    A workaround were proposed at https://github.com/minetest/minetest/pull/12389/files
    but never accepted (included in this repository), cos was superset by 8ff3fadba0
  * related minenux/minetest-engine-multicraft2#57
2023-09-14 20:29:46 -04:00
2fcfcf0873 fix ci build on gitlab for 0.4 stable branch 2023-09-13 02:18:13 -04:00
e32d7794b7 Fixes race condition in 'on joinplayer' that causes stat bar bugs.
* related to eea1fdaf25
* related to https://codeberg.org/minenux/minetest-engine-minetest/issues/33
2023-09-13 00:21:46 -04:00
600ab5f554 fix profiler errors if statbars are updated only
* Default to '??' (common Minetest notation) for unknown mods when loaded
* its related to a future implementation of statbars
* related to https://github.com/minetest/minetest/issues/8237
2023-09-13 00:19:12 -04:00
1da6298f14 Fix linking with Postgres libs on older cmake versions
* integrates https://github.com/minetest/minetest/pull/11215
  so it backported a24899bf2d
* closes https://github.com/minetest/minetest/issues/12149
* closes https://github.com/minetest/minetest/issues/11219
* backported 998e4820c9
2023-09-12 21:33:57 -04:00
3978237097 Fix no locales being generated when APPLY_LOCALE_BLACKLIST=0
* backported 6caed7073c
  fro upstream
2023-09-12 21:21:01 -04:00
7758ca0b71 change all trolltest to finetest so set minetest.org place 2023-09-12 21:15:04 -04:00
8760885750 fix find_path for newer jsoncpp installations 2023-09-12 20:22:30 -04:00
24 changed files with 561 additions and 316 deletions

View File

@ -1,223 +1,285 @@
---
# Github repository is cloned every day on Gitlab.com
# https://gitlab.com/minetest/minetest
# Pipelines URL: https://gitlab.com/minetest/minetest/pipelines
# Github repository is really at minetest.org using the poikilos git.minetest.io
# https://gitlab.com/minenux/minetest-engine-minetest
# Pipelines URL: https://gitlab.com/minenux/minetest-engine-minetest/pipelines
# packages moved to https://build.opensuse.org/project/show/home:venenux:minenux
# in future we only build here, or made apk packs for alpine
stages:
- build
- package
- deploy
variables:
MINETEST_GAME_REPO: "https://github.com/minetest/minetest_game.git"
MINETEST_GAME_REPO: "https://gitlab.com/minenux/minetest-game-minetest.git"
.build_template: &build_definition
.build_template:
stage: build
script:
- mkdir cmakebuild
- mkdir -p artifact/minetest/usr/
- cd cmakebuild
- cmake -DCMAKE_INSTALL_PREFIX=../artifact/minetest/usr/ -DCMAKE_BUILD_TYPE=Release -DRUN_IN_PLACE=FALSE -DENABLE_GETTEXT=TRUE -DBUILD_SERVER=TRUE ..
- make -j2
- mkdir -p games
- cd games
- git clone -b stable-0.4 --single-branch $MINETEST_GAME_REPO minetest
- cd ../cmakebuild
- cmake -DCMAKE_INSTALL_PREFIX=../artifact/minetest/usr/ -DBUILD_SERVER=ON -DBUILD_CLIENT=ON -DCMAKE_BUILD_TYPE=Release -DRUN_IN_PLACE=TRUE -DENABLE_GETTEXT=TRUE -DENABLE_SYSTEM_JSONCPP=TRUE APPLY_LOCALE_BLACKLIST=FALSE ..
- make -j$(nproc)
- make install
artifacts:
when: on_success
expire_in: 1h
expire_in: 5h
paths:
- artifact/*
.debpkg_template: &debpkg_template
stage: package
before_script:
- apt-get update -y
- apt-get install -y git
- mkdir -p build/deb/minetest/DEBIAN/
- cp misc/debpkg-control build/deb/minetest/DEBIAN/control
- cp -Rp artifact/minetest/usr build/deb/minetest/
script:
- git clone $MINETEST_GAME_REPO build/deb/minetest/usr/share/minetest/games/minetest
- rm -Rf build/deb/minetest/usr/share/minetest/games/minetest/.git
- sed -i 's/DATEPLACEHOLDER/'$(date +%y.%m.%d)'/g' build/deb/minetest/DEBIAN/control
- sed -i 's/LEVELDB_PLACEHOLDER/'$LEVELDB_PKG'/g' build/deb/minetest/DEBIAN/control
- cd build/deb/ && dpkg-deb -b minetest/
artifacts:
when: on_success
expire_in: 30 day
paths:
- build/deb/*.deb
.debpkg_install: &debpkg_install
stage: deploy
before_script:
- apt-get update -y
- apt-get install -y libc6 libcurl3-gnutls libfreetype6 libirrlicht1.8 $LEVELDB_PKG liblua5.1-0 libluajit-5.1-2 libopenal1 libstdc++6 libvorbisfile3 libx11-6 zlib1g
script:
- dpkg -i build/deb/*.deb
##
## Debian
## Debian mother of many distros
##
# Jessie
build:debian-7:
extends: .build_template
image: debian:7
before_script:
- echo "" > /etc/apt/apt.conf.d/50venenuxcustom
- echo "APT::Get::AllowUnauthenticated \"true\";" >> /etc/apt/apt.conf.d/50venenuxcustom
- echo "Acquire::AllowInsecureRepositories \"true\";" >> /etc/apt/apt.conf.d/50venenuxcustom
- echo "Acquire::AllowDowngradeToInsecureRepositories \"true\";" >> /etc/apt/apt.conf.d/50venenuxcustom
- echo "Acquire::AllowReleaseInfoChange::Suite \"true\";" >> /etc/apt/apt.conf.d/50venenuxcustom
- echo "Acquire::Check-Valid-Until \"false\";" >> /etc/apt/apt.conf.d/50venenuxcustom
- echo "Acquire::Languages \"en\";" >> /etc/apt/apt.conf.d/50venenuxcustom
- echo "Aptitude::CmdLine::Ignore-Trust-Violations \"true\";" >> /etc/apt/apt.conf.d/50venenuxcustom
# - echo "Acquire::https::download.opensuse.org::Verify-Peer "false";" >> /etc/apt/apt.conf.d/50venenuxcustom
- rm -rf /etc/apt/sources.list
- echo "deb http://archive.debian.org/debian/ wheezy main contrib" > /etc/apt/sources.list.d/50debianoficial.list
- echo "deb http://archive.debian.org/debian/ wheezy-backports main contrib non-free" >> /etc/apt/sources.list.d/50debianoficial.list
- echo "deb http://archive.debian.org/debian/ jessie-backports main contrib non-free" >> /etc/apt/sources.list.d/50debianoficial.list
- echo "deb http://deb.freexian.com/extended-lts wheezy main contrib non-free" >> /etc/apt/sources.list.d/50debianoficial.list
- DEBIAN_FRONTEND=noninteractive apt-get update -y || true
- DEBIAN_FRONTEND=noninteractive apt-get -y --force-yes install build-essential git cmake pkg-config debhelper lsb-release gettext libbz2-dev libcurl4-gnutls-dev libnl-genl-3-dev libnl-3-dev librtmp-dev libidn11-dev libncurses-dev libfreetype6-dev libglu1-mesa-dev libgmp-dev libirrlicht-dev libjpeg-dev libleveldb-dev libluajit-5.1-dev liblua5.1-dev libogg-dev libopenal-dev libpng-dev libpq-dev libhiredis-dev libspatialindex-dev libsqlite3-dev libvorbis-dev libx11-dev libxxf86vm-dev libpq-dev libhiredis-dev zlib1g-dev doxygen libxrandr-dev x11proto-xf86vidmode-dev
- DEBIAN_FRONTEND=noninteractive apt-get -y --force-yes install -t jessie-backports libjsoncpp-dev
# Stretch
build:debian-8:
<<: *build_definition
image: debian:8
before_script:
- apt-get update -y
- apt-get -y install build-essential libirrlicht-dev cmake libbz2-dev libpng-dev libjpeg-dev libxxf86vm-dev libgl1-mesa-dev libsqlite3-dev libogg-dev libvorbis-dev libopenal-dev libcurl4-gnutls-dev libfreetype6-dev zlib1g-dev libgmp-dev libjsoncpp-dev
package:debian-8:
image: debian:8
dependencies:
- build:debian-8
variables:
LEVELDB_PKG: libleveldb1
<<: *debpkg_template
deploy:debian-8:
image: debian:8
dependencies:
- package:debian-8
variables:
LEVELDB_PKG: libleveldb1
<<: *debpkg_install
extends: .build_template
image: debian:8
before_script:
- echo "" > /etc/apt/apt.conf.d/50venenuxcustom
- echo "APT::Get::AllowUnauthenticated \"true\";" >> /etc/apt/apt.conf.d/50venenuxcustom
- echo "Acquire::AllowInsecureRepositories \"true\";" >> /etc/apt/apt.conf.d/50venenuxcustom
- echo "Acquire::AllowDowngradeToInsecureRepositories \"true\";" >> /etc/apt/apt.conf.d/50venenuxcustom
- echo "Acquire::AllowReleaseInfoChange::Suite \"true\";" >> /etc/apt/apt.conf.d/50venenuxcustom
- echo "Acquire::Check-Valid-Until \"false\";" >> /etc/apt/apt.conf.d/50venenuxcustom
- echo "Acquire::Languages \"en\";" >> /etc/apt/apt.conf.d/50venenuxcustom
- echo "Aptitude::CmdLine::Ignore-Trust-Violations \"true\";" >> /etc/apt/apt.conf.d/50venenuxcustom
# - echo "Acquire::https::download.opensuse.org::Verify-Peer "false";" >> /etc/apt/apt.conf.d/50venenuxcustom
- rm -rf /etc/apt/sources.list
- echo "deb http://archive.debian.org/debian/ jessie main contrib" > /etc/apt/sources.list.d/50debianoficial.list
- echo "deb http://archive.debian.org/debian/ jessie-backports main contrib non-free" >> /etc/apt/sources.list.d/50debianoficial.list
- echo "deb http://deb.freexian.com/extended-lts jessie main contrib non-free" >> /etc/apt/sources.list.d/50debianoficial.list
- DEBIAN_FRONTEND=noninteractive apt-get update -y || true
- DEBIAN_FRONTEND=noninteractive apt-get -y --force-yes install build-essential git cmake pkg-config debhelper lsb-release gettext libbz2-dev libcurl4-gnutls-dev libnl-genl-3-dev libnl-3-dev librtmp-dev libidn11-dev libncurses-dev libfreetype6-dev libglu1-mesa-dev libgmp-dev libirrlicht-dev libjpeg-dev libleveldb-dev libluajit-5.1-dev liblua5.1-dev libogg-dev libopenal-dev libpng-dev libpq-dev libhiredis-dev libspatialindex-dev libsqlite3-dev libvorbis-dev libx11-dev libxxf86vm-dev libpq-dev libhiredis-dev zlib1g-dev doxygen libxrandr-dev x11proto-xf86vidmode-dev
- DEBIAN_FRONTEND=noninteractive apt-get -y --force-yes install -t jessie-backports libjsoncpp-dev
# Stretch
build:debian-9:
<<: *build_definition
extends: .build_template
image: debian:9
before_script:
- apt-get update -y
- apt-get -y install build-essential libirrlicht-dev cmake libbz2-dev libpng-dev libjpeg-dev libxxf86vm-dev libgl1-mesa-dev libsqlite3-dev libogg-dev libvorbis-dev libopenal-dev libcurl4-gnutls-dev libfreetype6-dev zlib1g-dev libgmp-dev libjsoncpp-dev
- echo "" > /etc/apt/apt.conf.d/50venenuxcustom
- echo "APT::Get::AllowUnauthenticated \"true\";" >> /etc/apt/apt.conf.d/50venenuxcustom
- echo "Acquire::AllowInsecureRepositories \"true\";" >> /etc/apt/apt.conf.d/50venenuxcustom
- echo "Acquire::AllowDowngradeToInsecureRepositories \"true\";" >> /etc/apt/apt.conf.d/50venenuxcustom
- echo "Acquire::AllowReleaseInfoChange::Suite \"true\";" >> /etc/apt/apt.conf.d/50venenuxcustom
- echo "Acquire::Check-Valid-Until \"false\";" >> /etc/apt/apt.conf.d/50venenuxcustom
- echo "Acquire::Languages \"en\";" >> /etc/apt/apt.conf.d/50venenuxcustom
- echo "Aptitude::CmdLine::Ignore-Trust-Violations \"true\";" >> /etc/apt/apt.conf.d/50venenuxcustom
- rm -rf /etc/apt/sources.list
- echo "deb http://archive.debian.org/debian/ stretch main contrib" > /etc/apt/sources.list.d/50debianoficial.list
- echo "deb http://archive.debian.org/debian/ stretch-backports main contrib non-free" >> /etc/apt/sources.list.d/50debianoficial.list
- echo "deb http://deb.freexian.com/extended-lts stretch main contrib non-free" >> /etc/apt/sources.list.d/50debianoficial.list
- DEBIAN_FRONTEND=noninteractive apt-get update -y || true
- DEBIAN_FRONTEND=noninteractive apt-get -y --force-yes install build-essential git cmake pkg-config cmake-data debhelper lsb-release gettext libbz2-dev libcurl4-gnutls-dev libnl-genl-3-dev libnl-3-dev librtmp-dev libidn11-dev libncurses-dev libfreetype6-dev libglu1-mesa-dev libgmp-dev libirrlicht-dev libjpeg-dev libjsoncpp-dev libleveldb-dev libluajit-5.1-dev liblua5.1-dev libogg-dev libopenal-dev libpng-dev libpq-dev libhiredis-dev libspatialindex-dev libsqlite3-dev libvorbis-dev libx11-dev libxxf86vm-dev postgresql-server-dev-all libpq-dev libhiredis-dev zlib1g-dev doxygen libxrandr-dev mesa-common-dev x11proto-xf86vidmode-dev libzstd-dev
package:debian-9:
image: debian:9
dependencies:
- build:debian-9
variables:
LEVELDB_PKG: libleveldb1v5
<<: *debpkg_template
# Bullseye
build:debian-11:
extends: .build_template
image: debian:11
before_script:
- echo "" > /etc/apt/apt.conf.d/50venenuxcustom
- echo "APT::Get::AllowUnauthenticated \"true\";" >> /etc/apt/apt.conf.d/50venenuxcustom
- echo "Acquire::AllowInsecureRepositories \"true\";" >> /etc/apt/apt.conf.d/50venenuxcustom
- echo "Acquire::AllowDowngradeToInsecureRepositories \"true\";" >> /etc/apt/apt.conf.d/50venenuxcustom
- echo "Acquire::AllowReleaseInfoChange::Suite \"true\";" >> /etc/apt/apt.conf.d/50venenuxcustom
- echo "Acquire::Check-Valid-Until \"false\";" >> /etc/apt/apt.conf.d/50venenuxcustom
- echo "Acquire::Languages \"en\";" >> /etc/apt/apt.conf.d/50venenuxcustom
- echo "Aptitude::CmdLine::Ignore-Trust-Violations \"true\";" >> /etc/apt/apt.conf.d/50venenuxcustom
- DEBIAN_FRONTEND=noninteractive apt-get update -y || true
- DEBIAN_FRONTEND=noninteractive apt-get -y install build-essential git cmake pkg-config cmake-data debhelper lsb-release gettext libbz2-dev libcurl4-gnutls-dev libnl-genl-3-dev libnl-3-dev librtmp-dev libidn11-dev libncurses-dev libfreetype6-dev libglu1-mesa-dev libgmp-dev libirrlicht-dev libjpeg-dev libjsoncpp-dev libleveldb-dev libluajit-5.1-dev liblua5.1-dev libogg-dev libopenal-dev libpng-dev libpq-dev libhiredis-dev libspatialindex-dev libsqlite3-dev libvorbis-dev libx11-dev libxxf86vm-dev postgresql-server-dev-all libpq-dev libhiredis-dev zlib1g-dev doxygen libxrandr-dev mesa-common-dev x11proto-xf86vidmode-dev libzstd-dev
# bookworm
build:debian-12:
extends: .build_template
image: debian:12
before_script:
- DEBIAN_FRONTEND=noninteractive apt-get update -y || true
- DEBIAN_FRONTEND=noninteractive apt-get -y install build-essential git cmake pkg-config cmake-data debhelper lsb-release gettext libbz2-dev libcurl4-gnutls-dev libnl-genl-3-dev libnl-3-dev librtmp-dev libidn11-dev libncurses-dev libfreetype6-dev libglu1-mesa-dev libgmp-dev libirrlicht-dev libjpeg-dev libjsoncpp-dev libleveldb-dev libluajit-5.1-dev liblua5.1-dev libogg-dev libopenal-dev libpng-dev libpq-dev libhiredis-dev libspatialindex-dev libsqlite3-dev libvorbis-dev libx11-dev libxxf86vm-dev postgresql-server-dev-all libpq-dev libhiredis-dev zlib1g-dev doxygen libxrandr-dev mesa-common-dev x11proto-xf86vidmode-dev libzstd-dev
deploy:debian-9:
image: debian:9
dependencies:
- package:debian-9
variables:
LEVELDB_PKG: libleveldb1v5
<<: *debpkg_install
##
## Ubuntu
##
# Trusty
# Utopic most close to jessie
build:ubuntu-14.04:
<<: *build_definition
image: ubuntu:trusty
build:ubuntu-14.10:
extends: .build_template
image: ubuntu:utopic
before_script:
- apt-get update -y
- apt-get -y install build-essential libirrlicht-dev cmake libbz2-dev libpng-dev libjpeg-dev libxxf86vm-dev libgl1-mesa-dev libsqlite3-dev libogg-dev libvorbis-dev libopenal-dev libcurl4-gnutls-dev libfreetype6-dev zlib1g-dev libgmp-dev libjsoncpp-dev
- echo "" > /etc/apt/apt.conf.d/50venenuxcustom
- echo "APT::Get::AllowUnauthenticated \"true\";" >> /etc/apt/apt.conf.d/50venenuxcustom
- echo "Acquire::AllowInsecureRepositories \"true\";" >> /etc/apt/apt.conf.d/50venenuxcustom
- echo "Acquire::AllowDowngradeToInsecureRepositories \"true\";" >> /etc/apt/apt.conf.d/50venenuxcustom
- echo "Acquire::AllowReleaseInfoChange::Suite \"true\";" >> /etc/apt/apt.conf.d/50venenuxcustom
- echo "Acquire::Check-Valid-Until \"false\";" >> /etc/apt/apt.conf.d/50venenuxcustom
- echo "Acquire::Languages \"en\";" >> /etc/apt/apt.conf.d/50venenuxcustom
- echo "Aptitude::CmdLine::Ignore-Trust-Violations \"true\";" >> /etc/apt/apt.conf.d/50venenuxcustom
- rm -rf /etc/apt/sources.list
- echo "deb http://old-releases.ubuntu.com/ubuntu/ utopic main restricted universe multiverse" > /etc/apt/sources.list.d/50debianoficial.list
- echo "deb http://old-releases.ubuntu.com/ubuntu/ utopic-updates main restricted universe multiverse" >> /etc/apt/sources.list.d/50debianoficial.list
- echo "deb http://old-releases.ubuntu.com/ubuntu utopic-security main restricted universe multiverse" >> /etc/apt/sources.list.d/50debianoficial.list
- apt-get update -y || true
- apt-get -y --force-yes install build-essential git cmake pkg-config cmake-data debhelper lsb-release gettext libbz2-dev libcurl4-gnutls-dev libnl-genl-3-dev libnl-3-dev librtmp-dev libidn11-dev libncurses-dev libfreetype6-dev libglu1-mesa-dev libgmp-dev libirrlicht-dev libjpeg-dev libjsoncpp-dev libleveldb-dev libluajit-5.1-dev liblua5.1-dev libogg-dev libopenal-dev libpng-dev libpq-dev libhiredis-dev libsqlite3-dev libvorbis-dev libx11-dev libxxf86vm-dev libpq-dev libhiredis-dev zlib1g-dev doxygen libxrandr-dev mesa-common-dev x11proto-xf86vidmode-dev
package:ubuntu-14.04:
image: ubuntu:trusty
dependencies:
- build:ubuntu-14.04
variables:
LEVELDB_PKG: libleveldb1
<<: *debpkg_template
build:ubuntu-17.04:
extends: .build_template
image: ubuntu:zesty
before_script:
- echo "" > /etc/apt/apt.conf.d/50venenuxcustom
- echo "APT::Get::AllowUnauthenticated \"true\";" >> /etc/apt/apt.conf.d/50venenuxcustom
- echo "Acquire::AllowInsecureRepositories \"true\";" >> /etc/apt/apt.conf.d/50venenuxcustom
- echo "Acquire::AllowDowngradeToInsecureRepositories \"true\";" >> /etc/apt/apt.conf.d/50venenuxcustom
- echo "Acquire::AllowReleaseInfoChange::Suite \"true\";" >> /etc/apt/apt.conf.d/50venenuxcustom
- echo "Acquire::Check-Valid-Until \"false\";" >> /etc/apt/apt.conf.d/50venenuxcustom
- echo "Acquire::Languages \"en\";" >> /etc/apt/apt.conf.d/50venenuxcustom
- echo "Aptitude::CmdLine::Ignore-Trust-Violations \"true\";" >> /etc/apt/apt.conf.d/50venenuxcustom
- rm -rf /etc/apt/sources.list
- echo "deb http://old-releases.ubuntu.com/ubuntu/ zesty main restricted universe multiverse" > /etc/apt/sources.list.d/50debianoficial.list
- echo "deb http://old-releases.ubuntu.com/ubuntu/ zesty-updates main restricted universe multiverse" >> /etc/apt/sources.list.d/50debianoficial.list
- echo "deb http://old-releases.ubuntu.com/ubuntu zesty-security main restricted universe multiverse" >> /etc/apt/sources.list.d/50debianoficial.list
- DEBIAN_FRONTEND=noninteractive apt-get update -y || true
- DEBIAN_FRONTEND=noninteractive apt-get -y --force-yes install build-essential git cmake pkg-config cmake-data debhelper dh-systemd dh-autoreconf lsb-release gettext libbz2-dev libcurl4-gnutls-dev libnl-genl-3-dev libnl-3-dev librtmp-dev libidn11-dev libncurses-dev libfreetype6-dev libglu1-mesa-dev libgmp-dev libirrlicht-dev libjpeg-dev libjsoncpp-dev libleveldb-dev libluajit-5.1-dev liblua5.1-dev libogg-dev libopenal-dev libpng-dev libpq-dev libhiredis-dev libspatialindex-dev libsqlite3-dev libvorbis-dev libx11-dev libxxf86vm-dev postgresql-server-dev-all libpq-dev libhiredis-dev zlib1g-dev doxygen libxrandr-dev mesa-common-dev x11proto-xf86vidmode-dev libzstd-dev
deploy:ubuntu-14.04:
image: ubuntu:trusty
dependencies:
- package:ubuntu-14.04
variables:
LEVELDB_PKG: libleveldb1
<<: *debpkg_install
# artful most close to stretch
build:ubuntu-17.10:
extends: .build_template
image: ubuntu:artful
before_script:
- echo "" > /etc/apt/apt.conf.d/50venenuxcustom
- echo "APT::Get::AllowUnauthenticated \"true\";" >> /etc/apt/apt.conf.d/50venenuxcustom
- echo "Acquire::AllowInsecureRepositories \"true\";" >> /etc/apt/apt.conf.d/50venenuxcustom
- echo "Acquire::AllowDowngradeToInsecureRepositories \"true\";" >> /etc/apt/apt.conf.d/50venenuxcustom
- echo "Acquire::AllowReleaseInfoChange::Suite \"true\";" >> /etc/apt/apt.conf.d/50venenuxcustom
- echo "Acquire::Check-Valid-Until \"false\";" >> /etc/apt/apt.conf.d/50venenuxcustom
- echo "Acquire::Languages \"en\";" >> /etc/apt/apt.conf.d/50venenuxcustom
- echo "Aptitude::CmdLine::Ignore-Trust-Violations \"true\";" >> /etc/apt/apt.conf.d/50venenuxcustom
- rm -rf /etc/apt/sources.list
- echo "deb http://old-releases.ubuntu.com/ubuntu/ artful main restricted universe multiverse" > /etc/apt/sources.list.d/50debianoficial.list
- echo "deb http://old-releases.ubuntu.com/ubuntu/ artful-updates main restricted universe multiverse" >> /etc/apt/sources.list.d/50debianoficial.list
- echo "deb http://old-releases.ubuntu.com/ubuntu artful-security main restricted universe multiverse" >> /etc/apt/sources.list.d/50debianoficial.list
- DEBIAN_FRONTEND=noninteractive apt-get update -y || true
- DEBIAN_FRONTEND=noninteractive apt-get -y --force-yes install build-essential git cmake pkg-config cmake-data debhelper dh-systemd dh-autoreconf lsb-release gettext libbz2-dev libcurl4-gnutls-dev libnl-genl-3-dev libnl-3-dev librtmp-dev libidn11-dev libncurses-dev libfreetype6-dev libglu1-mesa-dev libgmp-dev libirrlicht-dev libjpeg-dev libjsoncpp-dev libleveldb-dev libluajit-5.1-dev liblua5.1-dev libogg-dev libopenal-dev libpng-dev libpq-dev libhiredis-dev libspatialindex-dev libsqlite3-dev libvorbis-dev libx11-dev libxxf86vm-dev postgresql-server-dev-all libpq-dev libhiredis-dev zlib1g-dev doxygen libxrandr-dev mesa-common-dev x11proto-xf86vidmode-dev libzstd-dev
# Xenial
build:ubuntu-16.04:
<<: *build_definition
image: ubuntu:xenial
before_script:
- apt-get update -y
- apt-get -y install build-essential libirrlicht-dev cmake libbz2-dev libpng-dev libjpeg-dev libxxf86vm-dev libgl1-mesa-dev libsqlite3-dev libogg-dev libvorbis-dev libopenal-dev libcurl4-gnutls-dev libfreetype6-dev zlib1g-dev libgmp-dev libjsoncpp-dev
package:ubuntu-16.04:
extends: .build_template
image: ubuntu:xenial
dependencies:
- build:ubuntu-16.04
variables:
LEVELDB_PKG: libleveldb1v5
<<: *debpkg_template
before_script:
- echo "" > /etc/apt/apt.conf.d/50venenuxcustom
- echo "APT::Get::AllowUnauthenticated \"true\";" >> /etc/apt/apt.conf.d/50venenuxcustom
- echo "Acquire::AllowInsecureRepositories \"true\";" >> /etc/apt/apt.conf.d/50venenuxcustom
- echo "Acquire::AllowDowngradeToInsecureRepositories \"true\";" >> /etc/apt/apt.conf.d/50venenuxcustom
- echo "Acquire::AllowReleaseInfoChange::Suite \"true\";" >> /etc/apt/apt.conf.d/50venenuxcustom
- echo "Acquire::Check-Valid-Until \"false\";" >> /etc/apt/apt.conf.d/50venenuxcustom
- echo "Acquire::Languages \"en\";" >> /etc/apt/apt.conf.d/50venenuxcustom
- echo "Aptitude::CmdLine::Ignore-Trust-Violations \"true\";" >> /etc/apt/apt.conf.d/50venenuxcustom
- DEBIAN_FRONTEND=noninteractive apt-get update -y || true
- DEBIAN_FRONTEND=noninteractive apt-get -y install build-essential git cmake pkg-config libirrlicht-dev cmake libbz2-dev libpng-dev libjpeg-dev libxxf86vm-dev libgl1-mesa-dev libsqlite3-dev libogg-dev libvorbis-dev libopenal-dev libcurl4-gnutls-dev libfreetype6-dev zlib1g-dev libgmp-dev libjsoncpp-dev
deploy:ubuntu-16.04:
image: ubuntu:xenial
dependencies:
- package:ubuntu-16.04
variables:
LEVELDB_PKG: libleveldb1v5
<<: *debpkg_install
# Bionic
# Yakkety
build:ubuntu-18.04:
extends: .build_template
image: ubuntu:bionic
before_script:
- echo "" > /etc/apt/apt.conf.d/50venenuxcustom
- echo "APT::Get::AllowUnauthenticated \"true\";" >> /etc/apt/apt.conf.d/50venenuxcustom
- echo "Acquire::AllowInsecureRepositories \"true\";" >> /etc/apt/apt.conf.d/50venenuxcustom
- echo "Acquire::AllowDowngradeToInsecureRepositories \"true\";" >> /etc/apt/apt.conf.d/50venenuxcustom
- echo "Acquire::AllowReleaseInfoChange::Suite \"true\";" >> /etc/apt/apt.conf.d/50venenuxcustom
- echo "Acquire::Check-Valid-Until \"false\";" >> /etc/apt/apt.conf.d/50venenuxcustom
- echo "Acquire::Languages \"en\";" >> /etc/apt/apt.conf.d/50venenuxcustom
- echo "Aptitude::CmdLine::Ignore-Trust-Violations \"true\";" >> /etc/apt/apt.conf.d/50venenuxcustom
- DEBIAN_FRONTEND=noninteractive apt-get update -y || true
- DEBIAN_FRONTEND=noninteractive apt-get -y install build-essential git cmake pkg-config libirrlicht-dev cmake libbz2-dev libpng-dev libjpeg-dev libxxf86vm-dev libgl1-mesa-dev libsqlite3-dev libogg-dev libvorbis-dev libopenal-dev libcurl4-gnutls-dev libfreetype6-dev zlib1g-dev libgmp-dev libjsoncpp-dev
build:ubuntu-16.10:
<<: *build_definition
image: ubuntu:yakkety
before_script:
- apt-get update -y
- apt-get -y install build-essential libirrlicht-dev cmake libbz2-dev libpng-dev libjpeg-dev libxxf86vm-dev libgl1-mesa-dev libsqlite3-dev libogg-dev libvorbis-dev libopenal-dev libcurl4-gnutls-dev libfreetype6-dev zlib1g-dev libgmp-dev libjsoncpp-dev
# Focal
package:ubuntu-16.10:
image: ubuntu:yakkety
dependencies:
- build:ubuntu-16.10
variables:
LEVELDB_PKG: libleveldb1v5
<<: *debpkg_template
build:ubuntu-20.04:
extends: .build_template
image: ubuntu:focal
before_script:
- echo "" > /etc/apt/apt.conf.d/50venenuxcustom
- echo "APT::Get::AllowUnauthenticated \"true\";" >> /etc/apt/apt.conf.d/50venenuxcustom
- echo "Acquire::AllowInsecureRepositories \"true\";" >> /etc/apt/apt.conf.d/50venenuxcustom
- echo "Acquire::AllowDowngradeToInsecureRepositories \"true\";" >> /etc/apt/apt.conf.d/50venenuxcustom
- echo "Acquire::AllowReleaseInfoChange::Suite \"true\";" >> /etc/apt/apt.conf.d/50venenuxcustom
- echo "Acquire::Check-Valid-Until \"false\";" >> /etc/apt/apt.conf.d/50venenuxcustom
- echo "Acquire::Languages \"en\";" >> /etc/apt/apt.conf.d/50venenuxcustom
- echo "Aptitude::CmdLine::Ignore-Trust-Violations \"true\";" >> /etc/apt/apt.conf.d/50venenuxcustom
- DEBIAN_FRONTEND=noninteractive apt-get update -y || true
- DEBIAN_FRONTEND=noninteractive apt-get -y install build-essential git cmake pkg-config libirrlicht-dev cmake libbz2-dev libpng-dev libjpeg-dev libxxf86vm-dev libgl1-mesa-dev libsqlite3-dev libogg-dev libvorbis-dev libopenal-dev libcurl4-gnutls-dev libfreetype6-dev zlib1g-dev libgmp-dev libjsoncpp-dev
deploy:ubuntu-16.10:
image: ubuntu:yakkety
dependencies:
- package:ubuntu-16.10
variables:
LEVELDB_PKG: libleveldb1v5
<<: *debpkg_install
# jammy
# Zesty
build:ubuntu-17.04:
<<: *build_definition
image: ubuntu:zesty
before_script:
- apt-get update -y
- apt-get -y install build-essential libirrlicht-dev cmake libbz2-dev libpng-dev libjpeg-dev libxxf86vm-dev libgl1-mesa-dev libsqlite3-dev libogg-dev libvorbis-dev libopenal-dev libcurl4-gnutls-dev libfreetype6-dev zlib1g-dev libgmp-dev libjsoncpp-dev
package:ubuntu-17.04:
image: ubuntu:zesty
dependencies:
- build:ubuntu-17.04
variables:
LEVELDB_PKG: libleveldb1v5
<<: *debpkg_template
deploy:ubuntu-17.04:
image: ubuntu:zesty
dependencies:
- package:ubuntu-17.04
variables:
LEVELDB_PKG: libleveldb1v5
<<: *debpkg_install
build:ubuntu-22.04:
extends: .build_template
image: ubuntu:jammy
before_script:
- DEBIAN_FRONTEND=noninteractive apt-get update -y || true
- DEBIAN_FRONTEND=noninteractive apt-get -y install build-essential git cmake pkg-config libirrlicht-dev cmake libbz2-dev libpng-dev libjpeg-dev libxxf86vm-dev libgl1-mesa-dev libsqlite3-dev libogg-dev libvorbis-dev libopenal-dev libcurl4-gnutls-dev libfreetype6-dev zlib1g-dev libgmp-dev libjsoncpp-dev
##
## Fedora
##
build:fedora-24:
<<: *build_definition
image: fedora:24
# Fedora 28 <-> RHEL 8
build:fedora-28:
extends: .build_template
image: fedora:28
before_script:
- dnf -y install make automake gcc gcc-c++ kernel-devel cmake libcurl* openal* libvorbis* libXxf86vm-devel libogg-devel freetype-devel mesa-libGL-devel zlib-devel jsoncpp-devel irrlicht-devel bzip2-libs gmp-devel sqlite-devel luajit-devel leveldb-devel ncurses-devel doxygen spatialindex-devel bzip2-devel
- dnf -y install make automake gcc gcc-c++ kernel-devel git cmake pkgconfig libidn-devel libcurl-devel openal-soft-devel libvorbis-devel libXxf86vm-devel libogg-devel freetype-devel mesa-libGL-devel zlib-devel jsoncpp-devel irrlicht-devel gmp-devel sqlite-devel luajit-devel leveldb-devel ncurses-devel spatialindex-devel
# Fedora 36
build:fedora-36:
extends: .build_template
image: fedora:36
before_script:
- dnf -y install make automake gcc gcc-c++ kernel-devel git cmake pkgconfig libidn-devel bzip2-devel gettext-devel sqlite-devel zlib-devel libpng-devel libjpeg-turbo-devel libXxf86vm-devel mesa-libGL-devel irrlicht-devel desktop-file-utils systemd openal* libvorbis* jsoncpp-devel libcurl-devel libcurl luajit-devel leveldb-devel gmp-devel libappstream-glib freetype-devel spatialindex-devel openssl-devel libogg-devel libpq-devel hiredis-devel libzstd-devel libXi-devel ncurses-devel doxygen
# Fedora 37
build:fedora-37:
extends: .build_template
image: fedora:37
before_script:
- dnf -y install make automake gcc gcc-c++ kernel-devel git cmake pkgconfig libidn-devel bzip2-devel gettext-devel sqlite-devel zlib-devel libpng-devel libjpeg-turbo-devel libXxf86vm-devel mesa-libGL-devel irrlicht-devel desktop-file-utils systemd openal* libvorbis* jsoncpp-devel libcurl-devel libcurl luajit-devel leveldb-devel gmp-devel libappstream-glib freetype-devel spatialindex-devel openssl-devel libogg-devel libpq-devel hiredis-devel libzstd-devel libXi-devel ncurses-devel doxygen
# Fedora 38
build:fedora-38:
extends: .build_template
image: fedora:38
before_script:
- dnf -y install make automake gcc gcc-c++ kernel-devel git cmake pkgconfig libidn-devel bzip2-devel gettext-devel sqlite-devel zlib-devel libpng-devel libjpeg-turbo-devel libXxf86vm-devel mesa-libGL-devel irrlicht-devel desktop-file-utils systemd openal* libvorbis* jsoncpp-devel libcurl-devel libcurl luajit-devel leveldb-devel gmp-devel libappstream-glib freetype-devel spatialindex-devel openssl-devel libogg-devel libpq-devel hiredis-devel libzstd-devel libXi-devel ncurses-devel doxygen

View File

@ -9,12 +9,51 @@ endif()
project(minetest)
set(PROJECT_NAME_CAPITALIZED "Minetest")
# check compatible compileer must be after project definition and set flags, assume if C++ is installed also CC is installed
if(CMAKE_CXX_COMPILER_ID MATCHES "GNU")
if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.7)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++0x")
else()
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++11")
endif()
if (CMAKE_C_COMPILER_VERSION VERSION_LESS 4.6)
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu99")
elseif (CMAKE_C_COMPILER_VERSION VERSION_EQUAL 4.6)
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu1x")
else()
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu11")
endif()
message(STATUS "using gnu compiler")
elseif(CMAKE_C_COMPILER_ID MATCHES "Clang")
if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 3.4)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++1y")
else()
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++11")
endif()
if (CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL 3.5)
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu11")
endif()
message(STATUS "using clang compiler")
else()
if (CMAKE_VERSION VERSION_GREATER 3.0)
set(CMAKE_C_STANDARD 11)
set(CMAKE_CXX_STANDARD 11)
else()
if(APPLE)
# Fix behavior of CMAKE_CXX_STANDARD when targeting macOS.
if (POLICY CMP0025)
cmake_policy(SET CMP0025 NEW)
endif ()
endif ()
endif()
message(STATUS "using default installed compiler")
endif()
# Also remember to set PROTOCOL_VERSION in network/networkprotocol.h when releasing
set(VERSION_MAJOR 0)
set(VERSION_MINOR 4)
set(VERSION_PATCH 17)
set(VERSION_TWEAK 1)
set(VERSION_TWEAK 4)
set(VERSION_EXTRA "" CACHE STRING "Stuff to append to version string")
# Change to false for releases
@ -22,7 +61,7 @@ set(DEVELOPMENT_BUILD FALSE)
set(VERSION_STRING "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}.${VERSION_TWEAK}")
if(VERSION_EXTRA)
set(VERSION_STRING ${VERSION_STRING}-${VERSION_EXTRA})
set(VERSION_STRING "${VERSION_STRING}-${VERSION_EXTRA}")
elseif(DEVELOPMENT_BUILD)
set(VERSION_STRING "${VERSION_STRING}-dev")
endif()
@ -99,7 +138,7 @@ elseif(UNIX) # Linux, BSD etc
set(XDG_APPS_DIR "${CMAKE_INSTALL_PREFIX}/share/applications")
set(APPDATADIR "${CMAKE_INSTALL_PREFIX}/share/metainfo")
set(ICONDIR "${CMAKE_INSTALL_PREFIX}/share/icons")
set(LOCALEDIR "${CMAKE_INSTALL_PREFIX}/share/${PROJECT_NAME}/locale")
set(LOCALEDIR "${CMAKE_INSTALL_PREFIX}/share/locale")
endif()
endif()

View File

@ -10,13 +10,13 @@ Contributions are welcome! Here's how you can help:
## Code
If you are planning to start some significant coding, you would benefit from asking first on [our IRC channel](http://www.minetest.net/irc/) before starting.
If you are planning to start some significant coding, you would benefit from asking first on [our IRC channel](http://www.minetest.org/irc/) before starting.
1. [Fork](https://help.github.com/articles/fork-a-repo/) the repository and [clone](https://help.github.com/articles/cloning-a-repository/) your fork.
2. Start coding!
- Refer to the [Lua API](https://github.com/minetest/minetest/blob/master/doc/lua_api.txt), [Developer Wiki](http://dev.minetest.net/Main_Page) and other [documentation](https://github.com/minetest/minetest/tree/master/doc).
- Follow the [C/C++](http://dev.minetest.net/Code_style_guidelines) and [Lua](http://dev.minetest.net/Lua_code_style_guidelines) code style guidelines.
- Refer to the [Lua API](https://github.com/minetest/minetest/blob/master/doc/lua_api.txt), [Developer Wiki](http://dev.minetest.org/Main_Page) and other [documentation](https://github.com/minetest/minetest/tree/master/doc).
- Follow the [C/C++](http://dev.minetest.org/Code_style_guidelines) and [Lua](http://dev.minetest.org/Lua_code_style_guidelines) code style guidelines.
- Check your code works as expected and document any changes to the Lua API.
3. Commit & [push](https://help.github.com/articles/pushing-to-a-remote/) your changes to a new branch (not `master`, one change per branch)
@ -32,9 +32,9 @@ If you are planning to start some significant coding, you would benefit from ask
##### A pull-request is considered merge-able when:
1. It follows the [roadmap](https://forum.minetest.net/viewtopic.php?t=9177) in some way and fits the whole picture of the project.
1. It follows the [roadmap](https://forum.minetest.org/viewtopic.php?t=9177) in some way and fits the whole picture of the project.
2. It works.
3. It follows the code style for [C/C++](http://dev.minetest.net/Code_style_guidelines) or [Lua](http://dev.minetest.net/Lua_code_style_guidelines).
3. It follows the code style for [C/C++](http://dev.minetest.org/Code_style_guidelines) or [Lua](http://dev.minetest.org/Lua_code_style_guidelines).
4. The code's interfaces are well designed, regardless of other aspects that might need more work in the future.
5. It uses protocols and formats which include the required compatibility.
@ -43,7 +43,7 @@ If you are planning to start some significant coding, you would benefit from ask
If you experience an issue, we would like to know the details - especially when a stable release is on the way.
1. Do a quick search on GitHub to check if the issue has already been reported.
2. Is it an issue with the Minetest *engine*? If not, report it [elsewhere](http://www.minetest.net/development/#reporting-issues).
2. Is it an issue with the Minetest *engine*? If not, report it [elsewhere](http://www.minetest.org/development/#reporting-issues).
3. [Open an issue](https://github.com/minetest/minetest/issues/new) and describe the issue you are having - you could include:
- Error logs (check the bottom of the `debug.txt` file)
- Screenshots
@ -55,7 +55,7 @@ After reporting you should aim to answer questions or clarifications as this hel
## Feature requests
Feature requests are welcome but take a moment to see if your idea follows the [roadmap](https://forum.minetest.net/viewtopic.php?t=9177) in some way and fits the whole picture of the project. You should provide a clear explanation with as much detail as possible.
Feature requests are welcome but take a moment to see if your idea follows the [roadmap](https://forum.minetest.org/viewtopic.php?t=9177) in some way and fits the whole picture of the project. You should provide a clear explanation with as much detail as possible.
## Translations
@ -63,15 +63,15 @@ Translations of Minetest are performed using Weblate. You can access the project
### Donations
If you'd like to monetarily support Minetest development, you can find donation methods on [our website](http://www.minetest.net/development/#donate).
If you'd like to monetarily support Minetest development, you can find donation methods on [our website](http://www.minetest.org/development/#donate).
# Maintaining
*This is a concise version of the [Rules & Guidelines](http://dev.minetest.net/Category:Rules_and_Guidelines) on the developer wiki.*
*This is a concise version of the [Rules & Guidelines](http://dev.minetest.org/Category:Rules_and_Guidelines) on the developer wiki.*
These notes are for those who have push access Minetest (core developers / maintainers).
- See the [project organisation](http://dev.minetest.net/Organisation) for the people involved.
- See the [project organisation](http://dev.minetest.org/Organisation) for the people involved.
## Reviewing pull requests
@ -103,4 +103,4 @@ Submit a :+1: (+1) or "Looks good" comment to show you believe the pull-request
## Releasing a new version
*Refer to [dev.minetest.net/Releasing_Minetest](http://dev.minetest.net/Releasing_Minetest)*
*Refer to [dev.minetest.org/Releasing_Minetest](http://dev.minetest.org/Releasing_Minetest)*

View File

@ -10,22 +10,25 @@ In case you downloaded the source code:
---------------------------------------
If you downloaded the Minetest Engine source code in which this file is
contained, you probably want to download the minetest_game project too:
https://github.com/minetest/minetest_game/
See the README.txt in it.
* https://git.minetest.io/minenux/minetest-game-subnasa
* https://codeberg.org/minenux/minetest-game-minetest
* https://gitlab.com/minenux/minetest-game-minetest
See the README in it.
Further documentation
----------------------
- Website: http://minetest.net/
- Wiki: http://wiki.minetest.net/
- Developer wiki: http://dev.minetest.net/
- Forum: http://forum.minetest.net/
- Github: https://github.com/minetest/minetest/
- Website: http://minetest.org/
- Wiki: http://wiki.minetest.org/
- Developer wiki: http://dev.minetest.org/
- Forum: https://t.me/venenux_minetest
- Github: https://gitlab.com/minenux/minetest-engine-minetest
- doc/ directory of source distribution
This game is not finished
--------------------------
- Don't expect it to work as well as a finished game will.
- Please report any bugs. When doing that, debug.txt is useful.
- Don't expect it to work as well as a finished game but seems is pretty stable
Default controls
-----------------
@ -80,7 +83,7 @@ $bin = bin
$share = .
$user = .
Linux installed:
Linux distributions:
$bin = /usr/bin
$share = /usr/share/minetest
$user = ~/.minetest
@ -268,7 +271,7 @@ Compiling on Windows:
http://gnuwin32.sourceforge.net/downlinks/gettext.php
- This is used for other UI languages. Feel free to leave it out.
* And, of course, Minetest:
http://minetest.net/download
http://minetest.org/download
- Steps:
- Select a directory called DIR hereafter in which you will operate.
- Make sure you have CMake and a compiler installed.

View File

@ -160,6 +160,10 @@ function core.hud_replace_builtin(name, definition)
return false
end
core.register_on_joinplayer(initialize_builtin_statbars)
-- Append "update_builtin_statbars" as late as possible
-- This ensures that the HUD is hidden when the flags are updated in this callback
core.after(0, function()
core.register_on_joinplayer(initialize_builtin_statbars)
end)
core.register_on_leaveplayer(cleanup_builtin_statbars)
core.register_playerevent(player_event_handler)

View File

@ -66,11 +66,11 @@ local function create_world_formspec(dialogdata)
if #gamemgr.games == 0 then
retval = retval .. "box[2,4;8,1;#ff8800]label[2.25,4;" ..
fgettext("You have no subgames installed.") .. "]label[2.25,4.4;" ..
fgettext("Download one from minetest.net") .. "]"
fgettext("Download one from minetest.org") .. "]"
elseif #gamemgr.games == 1 and gamemgr.games[1].id == "minimal" then
retval = retval .. "box[1.75,4;8.7,1;#ff8800]label[2,4;" ..
fgettext("Warning: The minimal development test is meant for developers.") .. "]label[2,4.4;" ..
fgettext("Download a subgame, such as minetest_game, from minetest.net") .. "]"
fgettext("Download a subgame, such as minetest_game, from minetest.org") .. "]"
end
return retval

View File

@ -18,7 +18,7 @@ local minetest_example_header = [[
# to the program, eg. "minetest.exe --config ../minetest.conf.example".
# Further documentation:
# http://wiki.minetest.net/
# http://wiki.minetest.org/
]]

View File

@ -89,7 +89,7 @@ return {
local version = core.get_version()
return "image[0.5,1;" .. core.formspec_escape(logofile) .. "]" ..
"label[0.5,3.2;" .. version.project .. " " .. version.string .. "]" ..
"label[0.5,3.5;http://minetest.net]" ..
"label[0.5,3.5;http://minetest.org]" ..
"tablecolumns[color;text]" ..
"tableoptions[background=#00000000;highlight=#00000000;border=false]" ..
"table[3.5,-0.25;8.5,6.05;list_credits;" ..

View File

@ -88,7 +88,7 @@ local function instrument(def)
if not def or not def.func then
return
end
def.mod = def.mod or get_current_modname()
def.mod = def.mod or get_current_modname() or "??"
local modname = def.mod
local instrument_name = generate_name(def)
local func = def.func

View File

@ -711,10 +711,10 @@ server_name (Server name) string Minetest server
server_description (Server description) string mine here
# Domain name of server, to be displayed in the serverlist.
server_address (Server address) string game.minetest.net
server_address (Server address) string game.minetest.org
# Homepage of server, to be displayed in the serverlist.
server_url (Server URL) string http://minetest.net
server_url (Server URL) string http://minetest.org
# Automaticaly report to the serverlist.
server_announce (Announce server) bool false
@ -1499,11 +1499,11 @@ main_menu_game_mgr (Main menu game manager) int 0
main_menu_mod_mgr (Main menu mod manager) int 1
modstore_download_url (Modstore download URL) string https://forum.minetest.net/media/
modstore_download_url (Modstore download URL) string https://forum.minetest.org/media/
modstore_listmods_url (Modstore mods list URL) string https://forum.minetest.net/mmdb/mods/
modstore_listmods_url (Modstore mods list URL) string https://forum.minetest.org/mmdb/mods/
modstore_details_url (Modstore details URL) string https://forum.minetest.net/mmdb/mod/*/
modstore_details_url (Modstore details URL) string https://forum.minetest.org/mmdb/mod/*/
# Print the engine's profiling data in regular intervals (in seconds). 0 = disable. Useful for developers.
profiler_print_interval (Engine profiling data print interval) int 0

View File

@ -1,6 +1,6 @@
mark_as_advanced(CURL_LIBRARY CURL_INCLUDE_DIR)
find_library(CURL_LIBRARY NAMES curl)
find_library(CURL_LIBRARY NAMES curl libcurl)
find_path(CURL_INCLUDE_DIR NAMES curl/curl.h)
set(CURL_REQUIRED_VARS CURL_LIBRARY CURL_INCLUDE_DIR)

View File

@ -55,17 +55,21 @@ endif(WIN32)
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(GetText DEFAULT_MSG ${GETTEXT_REQUIRED_VARS})
find_package_handle_standard_args(GettextLib DEFAULT_MSG ${GETTEXT_REQUIRED_VARS})
if(GETTEXT_FOUND)
if(GETTEXTLIB_FOUND)
# BSD variants require special linkage as they don't use glibc
if(${CMAKE_SYSTEM_NAME} MATCHES "BSD")
if(${CMAKE_SYSTEM_NAME} MATCHES "BSD|DragonFly")
set(GETTEXT_LIBRARY "intl")
endif()
set(GETTEXT_PO_PATH ${CMAKE_SOURCE_DIR}/po)
set(GETTEXT_MO_BUILD_PATH ${CMAKE_BINARY_DIR}/locale/<locale>/LC_MESSAGES)
if(WIN32)
set(GETTEXT_MO_BUILD_PATH ${CMAKE_SOURCE_DIR}/locale/<locale>/LC_MESSAGES)
else()
set(GETTEXT_MO_BUILD_PATH ${CMAKE_BINARY_DIR}/locale/<locale>/LC_MESSAGES)
endif()
set(GETTEXT_MO_DEST_PATH ${LOCALEDIR}/<locale>/LC_MESSAGES)
file(GLOB GETTEXT_AVAILABLE_LOCALES RELATIVE ${GETTEXT_PO_PATH} "${GETTEXT_PO_PATH}/*")
list(REMOVE_ITEM GETTEXT_AVAILABLE_LOCALES minetest.pot)

View File

@ -42,12 +42,15 @@ else()
PATHS
/usr/local/include/irrlicht
/usr/include/irrlicht
/system/develop/headers/irrlicht #Haiku
PATH_SUFFIXES "include/irrlicht"
)
find_library(IRRLICHT_LIBRARY NAMES libIrrlicht.so libIrrlicht.a Irrlicht
PATHS
/usr/local/lib
/usr/lib
/system/develop/lib # Haiku
)
endif()

View File

@ -8,17 +8,21 @@ option(ENABLE_SYSTEM_JSONCPP "Enable using a system-wide JSONCPP. May cause seg
if(ENABLE_SYSTEM_JSONCPP)
find_library(JSON_LIBRARY NAMES jsoncpp)
find_path(JSON_INCLUDE_DIR json/features.h PATH_SUFFIXES jsoncpp)
if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5)
find_path(JSON_INCLUDE_DIR json/features.h PATH_SUFFIXES jsoncpp)
else()
find_path(JSON_INCLUDE_DIR json/allocator.h PATH_SUFFIXES jsoncpp)
endif()
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(JSONCPP DEFAULT_MSG JSON_LIBRARY JSON_INCLUDE_DIR)
find_package_handle_standard_args(Json DEFAULT_MSG JSON_LIBRARY JSON_INCLUDE_DIR)
if(JSONCPP_FOUND)
if(JSON_FOUND)
message(STATUS "Using system JSONCPP library.")
endif()
endif()
if(NOT JSONCPP_FOUND)
if(NOT JSON_FOUND)
message(STATUS "Using bundled JSONCPP library.")
set(JSON_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/lib/jsoncpp)
set(JSON_LIBRARY jsoncpp)

View File

@ -6,39 +6,11 @@
#
# This module is similar to FindLua51.cmake except that it finds LuaJit instead.
FIND_PATH(LUA_INCLUDE_DIR luajit.h
HINTS
$ENV{LUA_DIR}
PATH_SUFFIXES include/luajit-2.1 include/luajit-2.0 include/luajit-5_1-2.1 include/luajit-5_1-2.0 include
PATHS
~/Library/Frameworks
/Library/Frameworks
/sw # Fink
/opt/local # DarwinPorts
/opt/csw # Blastwave
/opt
)
FIND_LIBRARY(LUA_LIBRARY
NAMES luajit-5.1
HINTS
$ENV{LUA_DIR}
PATH_SUFFIXES lib64 lib
PATHS
~/Library/Frameworks
/Library/Frameworks
/sw
/opt/local
/opt/csw
/opt
)
IF(LUA_INCLUDE_DIR AND EXISTS "${LUA_INCLUDE_DIR}/luajit.h")
FILE(STRINGS "${LUA_INCLUDE_DIR}/luajit.h" lua_version_str REGEX "^#define[ \t]+LUA_RELEASE[ \t]+\"LuaJIT .+\"")
STRING(REGEX REPLACE "^#define[ \t]+LUA_RELEASE[ \t]+\"LuaJIT ([^\"]+)\".*" "\\1" LUA_VERSION_STRING "${lua_version_str}")
UNSET(lua_version_str)
ENDIF()
find_package (PkgConfig REQUIRED)
pkg_check_modules (LuaJIT QUIET REQUIRED luajit)
set (LUA_LIBRARY ${LuaJIT_LIBRARIES})
set (LUA_INCLUDE_DIR ${LuaJIT_INCLUDE_DIRS})
set (LUA_VERSION_STRING ${LuaJIT_VERSION})
INCLUDE(FindPackageHandleStandardArgs)
# handle the QUIETLY and REQUIRED arguments and set LUAJIT_FOUND to TRUE if

View File

@ -1,7 +1,7 @@
Minetest Lua Client Modding API Reference 0.4.15
================================================
* More information at <http://www.minetest.net/>
* Developer Wiki: <http://dev.minetest.net/>
* More information at <http://www.minetest.org/>
* Developer Wiki: <http://dev.minetest.org/>
Introduction
------------

View File

@ -1,7 +1,7 @@
Minetest Lua Modding API Reference 0.4.17
=========================================
* More information at <http://www.minetest.net/>
* Developer Wiki: <http://dev.minetest.net/>
* More information at <http://www.minetest.org/>
* Developer Wiki: <http://dev.minetest.org/>
Introduction
------------
@ -31,14 +31,10 @@ the `init.lua` scripts in a shared environment.
Paths
-----
* `RUN_IN_PLACE=1` (Windows release, local build)
* `$path_user`:
* Linux: `<build directory>`
* Windows: `<build directory>`
* `$path_share`
* Linux: `<build directory>`
* Windows: `<build directory>`
* `$path_user`: `<build directory>`
* `$path_share`: `<build directory>`
* `RUN_IN_PLACE=0`: (Linux release)
* `$path_share`
* `$path_share`:
* Linux: `/usr/share/minetest`
* Windows: `<install directory>/minetest-0.4.x`
* `$path_user`:

View File

@ -110,5 +110,5 @@ This man page was originally written by
Juhani Numminen <juhaninumminen0@gmail.com>.
.SH WWW
http://www.minetest.net/
http://www.minetest.org/

View File

@ -72,6 +72,53 @@ if(CMAKE_COMPILER_IS_GNUCC)
set(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_WITHDEBINFO} -O2 -g")
endif(CMAKE_COMPILER_IS_GNUCC)
# check compatible compileer must be after project definition and set flags, assume if C++ is installed also CC is installed
if(CMAKE_CXX_COMPILER_ID MATCHES "GNU")
if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.7)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++0x")
else()
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++11")
endif()
if (CMAKE_C_COMPILER_VERSION VERSION_LESS 4.6)
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu99")
elseif (CMAKE_C_COMPILER_VERSION VERSION_EQUAL 4.6)
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu1x")
else()
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu11")
endif()
message(STATUS "using gnu compiler")
set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} ${CMAKE_C_FLAGS} ")
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} ${CMAKE_C_FLAGS} -g")
set(CMAKE_C_FLAGS_PROFILE "${CMAKE_C_FLAGS_PROFILE} ${CMAKE_C_FLAGS} -O1 -g")
set(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_WITHDEBINFO} ${CMAKE_C_FLAGS} -g")
elseif(CMAKE_C_COMPILER_ID MATCHES "Clang")
if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 3.4)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++1y")
else()
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++11")
endif()
if (CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL 3.5)
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu11")
endif()
message(STATUS "using clang compiler")
set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} ${CMAKE_C_FLAGS} ")
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} ${CMAKE_C_FLAGS} -g")
set(CMAKE_C_FLAGS_PROFILE "${CMAKE_C_FLAGS_PROFILE} ${CMAKE_C_FLAGS} -O1 -g")
set(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_WITHDEBINFO} ${CMAKE_C_FLAGS} -g")
else()
if (CMAKE_VERSION VERSION_GREATER 3.0)
set(CMAKE_C_STANDARD 11)
set(CMAKE_CXX_STANDARD 11)
else()
if(APPLE)
# Fix behavior of CMAKE_CXX_STANDARD when targeting macOS.
if (POLICY CMP0025)
cmake_policy(SET CMP0025 NEW)
endif ()
endif ()
endif()
message(STATUS "using default installed compiler")
endif()
add_subdirectory(src build)

View File

@ -10,7 +10,7 @@
# to the program, eg. "minetest.exe --config ../minetest.conf.example".
# Further documentation:
# http://wiki.minetest.net/
# http://wiki.minetest.org/
#
# Client
@ -332,7 +332,7 @@
# URL to the server list displayed in the Multiplayer Tab.
# type: string
# serverlist_url = servers.minetest.net
# serverlist_url = servers.minetest.org
# File in client/serverlist/ that contains your favorite servers displayed in the Multiplayer Tab.
# type: string
@ -847,20 +847,20 @@
# Domain name of server, to be displayed in the serverlist.
# type: string
# server_address = game.minetest.net
# server_address = game.minetest.org
# Homepage of server, to be displayed in the serverlist.
# type: string
# server_url = http://minetest.net
# server_url = http://minetest.org
# Automaticaly report to the serverlist.
# type: bool
# server_announce = false
# Announce to this serverlist.
# If you want to announce your ipv6 address, use serverlist_url = v6.servers.minetest.net.
# If you want to announce your ipv6 address, use serverlist_url = v6.servers.minetest.org.
# type: string
# serverlist_url = servers.minetest.net
# serverlist_url = servers.minetest.org
# Remove color codes from incoming chat messages
# Use this to stop players from being able to use color in their messages
@ -1824,13 +1824,13 @@
# main_menu_mod_mgr = 1
# type: string
# modstore_download_url = https://forum.minetest.net/media/
# modstore_download_url = https://forum.minetest.org/media/
# type: string
# modstore_listmods_url = https://forum.minetest.net/mmdb/mods/
# modstore_listmods_url = https://forum.minetest.org/mmdb/mods/
# type: string
# modstore_details_url = https://forum.minetest.net/mmdb/mod/*/
# modstore_details_url = https://forum.minetest.org/mmdb/mod/*/
# Print the engine's profiling data in regular intervals (in seconds). 0 = disable. Useful for developers.
# type: int

View File

@ -29,13 +29,13 @@
</description>
<screenshots>
<screenshot type="default">
<image width="1920" height="1080">http://www.minetest.net/media/gallery/1.jpg</image>
<image width="1920" height="1080">http://www.minetest.org/media/gallery/1.jpg</image>
</screenshot>
<screenshot>
<image width="1920" height="1080">http://www.minetest.net/media/gallery/3.jpg</image>
<image width="1920" height="1080">http://www.minetest.org/media/gallery/3.jpg</image>
</screenshot>
<screenshot>
<image width="1920" height="1080">http://www.minetest.net/media/gallery/5.jpg</image>
<image width="1920" height="1080">http://www.minetest.org/media/gallery/5.jpg</image>
</screenshot>
</screenshots>
<keywords>
@ -44,12 +44,12 @@
<keyword>mining</keyword>
<keyword>multiplayer</keyword>
</keywords>
<url type="homepage">http://minetest.net</url>
<url type="bugtracker">http://www.minetest.net/development/#reporting-issues</url>
<url type="translate">http://dev.minetest.net/Translation</url>
<url type="donation">http://www.minetest.net/development/#donate</url>
<url type="faq">http://wiki.minetest.net/FAQ</url>
<url type="help">http://wiki.minetest.net</url>
<url type="homepage">http://minetest.org</url>
<url type="bugtracker">http://www.minetest.org/development/#reporting-issues</url>
<url type="translate">http://dev.minetest.org/Translation</url>
<url type="donation">http://www.minetest.org/development/#donate</url>
<url type="faq">http://wiki.minetest.org/FAQ</url>
<url type="help">http://wiki.minetest.org</url>
<provides>
<binary>minetest</binary>
</provides>

View File

@ -57,12 +57,12 @@ if(NOT USE_CURL)
endif()
option(ENABLE_GETTEXT "Use GetText for internationalization" FALSE)
option(ENABLE_GETTEXT "Use GetText for internationalization" TRUE)
set(USE_GETTEXT FALSE)
if(ENABLE_GETTEXT)
find_package(GettextLib)
if(GETTEXT_FOUND)
if(GETTEXTLIB_FOUND)
if(WIN32)
message(STATUS "GetText library: ${GETTEXT_LIBRARY}")
message(STATUS "GetText DLL: ${GETTEXT_DLL}")
@ -70,7 +70,7 @@ if(ENABLE_GETTEXT)
endif()
set(USE_GETTEXT TRUE)
message(STATUS "GetText enabled; locales found: ${GETTEXT_AVAILABLE_LOCALES}")
endif(GETTEXT_FOUND)
endif(GETTEXTLIB_FOUND)
else()
mark_as_advanced(GETTEXT_ICONV_DLL GETTEXT_INCLUDE_DIR GETTEXT_LIBRARY GETTEXT_MSGFMT)
message(STATUS "GetText disabled.")
@ -174,27 +174,25 @@ option(ENABLE_POSTGRESQL "Enable PostgreSQL backend" TRUE)
set(USE_POSTGRESQL FALSE)
if(ENABLE_POSTGRESQL)
find_program(POSTGRESQL_CONFIG_EXECUTABLE pg_config DOC "pg_config")
find_library(POSTGRESQL_LIBRARY pq)
if(POSTGRESQL_CONFIG_EXECUTABLE)
execute_process(COMMAND ${POSTGRESQL_CONFIG_EXECUTABLE} --includedir-server
OUTPUT_VARIABLE POSTGRESQL_SERVER_INCLUDE_DIRS
OUTPUT_STRIP_TRAILING_WHITESPACE)
execute_process(COMMAND ${POSTGRESQL_CONFIG_EXECUTABLE}
OUTPUT_VARIABLE POSTGRESQL_CLIENT_INCLUDE_DIRS
OUTPUT_STRIP_TRAILING_WHITESPACE)
# This variable is case sensitive for the cmake PostgreSQL module
set(PostgreSQL_ADDITIONAL_SEARCH_PATHS ${POSTGRESQL_SERVER_INCLUDE_DIRS} ${POSTGRESQL_CLIENT_INCLUDE_DIRS})
if(CMAKE_VERSION VERSION_LESS "3.10")
find_package(PostgreSQL QUIET)
# Before CMake 3.20 FindPostgreSQL.cmake always looked for server includes
# but we don't need them, so continue anyway if only those are missing.
if(PostgreSQL_INCLUDE_DIR AND PostgreSQL_LIBRARY)
set(PostgreSQL_FOUND TRUE)
set(PostgreSQL_INCLUDE_DIRS ${PostgreSQL_INCLUDE_DIR})
set(PostgreSQL_LIBRARIES ${PostgreSQL_LIBRARY})
endif()
else()
find_package(PostgreSQL)
endif()
find_package("PostgreSQL")
if(POSTGRESQL_FOUND)
set(USE_POSTGRESQL TRUE)
message(STATUS "PostgreSQL backend enabled")
# This variable is case sensitive, don't try to change it to POSTGRESQL_INCLUDE_DIR
message(STATUS "PostgreSQL includes: ${PostgreSQL_INCLUDE_DIR}")
include_directories(${PostgreSQL_INCLUDE_DIR})
message(STATUS "PostgreSQL includes: ${PostgreSQL_INCLUDE_DIRS}")
include_directories(${PostgreSQL_INCLUDE_DIRS})
else()
message(STATUS "PostgreSQL not found!")
endif()
@ -204,7 +202,7 @@ option(ENABLE_LEVELDB "Enable LevelDB backend" TRUE)
set(USE_LEVELDB FALSE)
if(ENABLE_LEVELDB)
find_library(LEVELDB_LIBRARY leveldb)
find_library(LEVELDB_LIBRARY NAMES leveldb libleveldb)
find_path(LEVELDB_INCLUDE_DIR db.h PATH_SUFFIXES leveldb)
if(LEVELDB_LIBRARY AND LEVELDB_INCLUDE_DIR)
set(USE_LEVELDB TRUE)
@ -254,6 +252,12 @@ if(NOT MSVC)
set(USE_GPROF FALSE CACHE BOOL "Use -pg flag for g++")
endif()
# Haiku endian support
if(HAIKU)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D_BSD_SOURCE")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D_BSD_SOURCE")
endif()
# Use cmake_config.h
add_definitions(-DUSE_CMAKE_CONFIG_H)
@ -297,15 +301,19 @@ if(WIN32)
else()
# Unix probably
if(BUILD_CLIENT)
find_package(X11 REQUIRED)
find_package(OpenGL REQUIRED)
if(NOT HAIKU AND NOT APPLE)
find_package(X11 REQUIRED)
find_package(OpenGL REQUIRED)
endif(NOT HAIKU AND NOT APPLE)
find_package(JPEG REQUIRED)
find_package(BZip2 REQUIRED)
find_package(PNG REQUIRED)
if(APPLE)
find_library(CARBON_LIB Carbon)
find_library(COCOA_LIB Cocoa)
find_library(IOKIT_LIB IOKit)
find_library(CARBON_LIB Carbon REQUIRED)
find_library(COCOA_LIB Cocoa REQUIRED)
find_library(IOKIT_LIB IOKit REQUIRED)
mark_as_advanced(
CARBON_LIB
COCOA_LIB
@ -325,12 +333,16 @@ else()
endif(HAVE_LIBRT)
endif(APPLE)
if(NOT APPLE)
# This way Xxf86vm is found on OpenBSD too
##
# The following dependencies are transitive dependencies from Irrlicht.
# Minetest itself does not use them, but we link them so that statically
# linking Irrlicht works.
if(NOT HAIKU AND NOT APPLE)
# This way Xxf86vm is found on OpenBSD too
find_library(XXF86VM_LIBRARY Xxf86vm)
mark_as_advanced(XXF86VM_LIBRARY)
set(CLIENT_PLATFORM_LIBS ${CLIENT_PLATFORM_LIBS} ${XXF86VM_LIBRARY})
endif(NOT APPLE)
endif(NOT HAIKU AND NOT APPLE)
# Prefer local iconv if installed
find_library(ICONV_LIBRARY iconv)
@ -338,6 +350,10 @@ else()
if (ICONV_LIBRARY)
set(PLATFORM_LIBS ${PLATFORM_LIBS} ${ICONV_LIBRARY})
endif()
if (HAIKU)
set(PLATFORM_LIBS ${PLATFORM_LIBS} intl network)
endif()
endif()
check_include_files(endian.h HAVE_ENDIAN_H)
@ -551,7 +567,6 @@ include_directories(
${ZLIB_INCLUDE_DIR}
${CMAKE_BUILD_TYPE}
${PNG_INCLUDE_DIR}
${GETTEXT_INCLUDE_DIR}
${SOUND_INCLUDE_DIRS}
${SQLITE3_INCLUDE_DIR}
${LUA_INCLUDE_DIR}
@ -561,6 +576,9 @@ include_directories(
${PROJECT_SOURCE_DIR}/script
)
if(USE_GETTEXT)
include_directories(${GETTEXT_INCLUDE_DIR})
endif()
if(USE_FREETYPE)
include_directories(${FREETYPE_INCLUDE_DIRS} ${CGUITTFONT_INCLUDE_DIR})
@ -651,13 +669,15 @@ if(BUILD_SERVER)
${ZLIB_LIBRARIES}
${SQLITE3_LIBRARY}
${JSON_LIBRARY}
${GETTEXT_LIBRARY}
${LUA_LIBRARY}
${GMP_LIBRARY}
${PLATFORM_LIBS}
)
set_target_properties(${PROJECT_NAME}server PROPERTIES
COMPILE_DEFINITIONS "SERVER")
if (USE_GETTEXT)
target_link_libraries(${PROJECT_NAME}server ${GETTEXT_LIBRARY})
endif()
if (USE_CURSES)
target_link_libraries(${PROJECT_NAME}server ${CURSES_LIBRARIES})
endif()
@ -694,7 +714,7 @@ set(GETTEXT_BLACKLISTED_LOCALES
option(APPLY_LOCALE_BLACKLIST "Use a blacklist to avoid broken locales" TRUE)
if (GETTEXT_FOUND AND APPLY_LOCALE_BLACKLIST)
if (GETTEXTLIB_FOUND AND APPLY_LOCALE_BLACKLIST)
set(GETTEXT_USED_LOCALES "")
foreach(LOCALE ${GETTEXT_AVAILABLE_LOCALES})
if (NOT ";${GETTEXT_BLACKLISTED_LOCALES};" MATCHES ";${LOCALE};")
@ -702,6 +722,8 @@ if (GETTEXT_FOUND AND APPLY_LOCALE_BLACKLIST)
endif()
endforeach()
message(STATUS "Locale blacklist applied; Locales used: ${GETTEXT_USED_LOCALES}")
elseif (GETTEXTLIB_FOUND)
set(GETTEXT_USED_LOCALES ${GETTEXT_AVAILABLE_LOCALES})
endif()
# Set some optimizations and tweaks
@ -740,12 +762,68 @@ else()
set(RELEASE_WARNING_FLAGS "")
endif()
# check compatible compileer must be after project definition and set flags, assume if C++ is installed also CC is installed
if(CMAKE_CXX_COMPILER_ID MATCHES "GNU")
if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.7)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++0x")
else()
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++11")
endif()
if (CMAKE_C_COMPILER_VERSION VERSION_LESS 4.6)
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu99")
elseif (CMAKE_C_COMPILER_VERSION VERSION_EQUAL 4.6)
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu1x")
else()
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu11")
endif()
message(STATUS "using gnu compiler")
elseif(CMAKE_C_COMPILER_ID MATCHES "Clang")
if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 3.4)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++1y")
else()
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++11")
endif()
if (CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL 3.5)
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu11")
endif()
message(STATUS "using clang compiler")
else()
if (CMAKE_VERSION VERSION_GREATER 3.0)
set(CMAKE_C_STANDARD 11)
set(CMAKE_CXX_STANDARD 11)
else()
if(APPLE)
# Fix behavior of CMAKE_CXX_STANDARD when targeting macOS.
if (POLICY CMP0025)
cmake_policy(SET CMP0025 NEW)
endif ()
endif ()
endif()
message(STATUS "using default installed compiler")
endif()
if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
set(WARNING_FLAGS "${WARNING_FLAGS} -Wsign-compare")
endif()
if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
# clang does not understand __extern_always_inline but libc headers use it
set(OTHER_FLAGS "${OTHER_FLAGS} \"-D__extern_always_inline=extern __always_inline\"")
set(OTHER_FLAGS "${OTHER_FLAGS} -Wsign-compare")
endif()
if(APPLE AND USE_LUAJIT)
# required per http://luajit.org/install.html
SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -pagezero_size 10000 -image_base 100000000")
elseif(UNIX AND USE_LUAJIT)
check_c_source_compiles("#ifndef __aarch64__\n#error\n#endif\nint main(){}" IS_AARCH64)
if(IS_AARCH64)
# Move text segment below LuaJIT's 47-bit limit (see issue #9367)
SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,-Ttext-segment=0x200000000")
endif()
endif()
if(WIN32 AND NOT ZLIBWAPI_DLL AND CMAKE_SIZEOF_VOID_P EQUAL 4)
set(OTHER_FLAGS "${OTHER_FLAGS} -DWIN32_NO_ZLIB_WINAPI")
message(WARNING "Defaulting to cdecl for zlib on win32 because ZLIBWAPI_DLL"
@ -754,16 +832,49 @@ else()
if(MINGW)
set(OTHER_FLAGS "${OTHER_FLAGS} -mthreads -fexceptions")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DWIN32_LEAN_AND_MEAN")
endif()
# Use a safe subset of flags to speed up math calculations:
# - we don't need errno or math exceptions
# - we don't deal with Inf/NaN or signed zero
set(MATH_FLAGS "-fno-math-errno -fno-trapping-math -ffinite-math-only -fno-signed-zeros")
# only related to moder x86 32bit platforms using gcc compilers
if(CMAKE_CXX_COMPILER_ID MATCHES "GNU")
if(CMAKE_C_COMPILER_VERSION VERSION_GREATER 4.7)
# Enable SSE for floating point math on 32-bit x86 by default
# reasoning see minetest issue #11810 and https://gcc.gnu.org/wiki/FloatingPointMath
if(CMAKE_SIZEOF_VOID_P EQUAL 4)
check_c_source_compiles("#ifndef __i686__\n#error\n#endif\nint main(){}" IS_I686)
if(IS_I686)
message(STATUS "Detected Intel x86: using SSE instead of x87 FPU")
set(OTHER_FLAGS "${OTHER_FLAGS} -mfpmath=sse -msse")
endif()
endif()
endif()
endif()
set(CMAKE_CXX_FLAGS_RELEASE "-DNDEBUG ${RELEASE_WARNING_FLAGS} ${WARNING_FLAGS} ${OTHER_FLAGS} -Wall -pipe -funroll-loops")
if(CMAKE_SYSTEM_NAME MATCHES "(Darwin|FreeBSD)")
if(CMAKE_SYSTEM_NAME MATCHES "(Darwin|BSD|DragonFly)")
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -Os")
else()
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -O3 -ffast-math -fomit-frame-pointer")
endif(CMAKE_SYSTEM_NAME MATCHES "(Darwin|FreeBSD)")
set(CMAKE_CXX_FLAGS_SEMIDEBUG "-g -O1 -Wall -Wabi ${WARNING_FLAGS} ${OTHER_FLAGS}")
set(CMAKE_CXX_FLAGS_DEBUG "-g -O0 -Wall -Wabi ${WARNING_FLAGS} ${OTHER_FLAGS}")
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -O3 -fomit-frame-pointer")
if(CMAKE_SYSTEM_NAME STREQUAL "Linux"
AND CMAKE_CXX_COMPILER_ID STREQUAL "Clang"
AND CMAKE_CXX_COMPILER_VERSION MATCHES "^9\\.")
# Clang 9 has broken -ffast-math on glibc
else()
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} ${MATH_FLAGS}")
endif()
endif(CMAKE_SYSTEM_NAME MATCHES "(Darwin|BSD|DragonFly)")
set(CMAKE_CXX_FLAGS_SEMIDEBUG "-g -O1 -Wall ${WARNING_FLAGS} ${CMAKE_C_FLAGS} ${OTHER_FLAGS}")
set(CMAKE_CXX_FLAGS_DEBUG "-g -O0 -Wall ${WARNING_FLAGS} ${CMAKE_C_FLAGS} ${OTHER_FLAGS}")
set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} ${CMAKE_C_FLAGS} ")
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} ${CMAKE_C_FLAGS} -g")
set(CMAKE_C_FLAGS_PROFILE "${CMAKE_C_FLAGS_PROFILE} ${CMAKE_C_FLAGS} -O1 -g")
set(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_WITHDEBINFO} ${CMAKE_C_FLAGS} -g")
if(USE_GPROF)
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -pg")
@ -859,7 +970,7 @@ if (USE_GETTEXT)
set(MO_FILES)
foreach(LOCALE ${GETTEXT_USED_LOCALES})
set(PO_FILE_PATH "${GETTEXT_PO_PATH}/${LOCALE}/${PROJECT_NAME}.po")
set(PO_FILE_PATH "${GETTEXT_PO_PATH}/${LOCALE}/minetest.po")
set_mo_paths(MO_BUILD_PATH MO_DEST_PATH ${LOCALE})
set(MO_FILE_PATH "${MO_BUILD_PATH}/${PROJECT_NAME}.mo")

View File

@ -221,9 +221,9 @@ void set_default_settings(Settings *settings)
settings->setDefault("main_menu_path", "");
settings->setDefault("main_menu_mod_mgr", "1");
settings->setDefault("main_menu_game_mgr", "0");
settings->setDefault("modstore_download_url", "https://forum.minetest.net/media/");
settings->setDefault("modstore_listmods_url", "https://forum.minetest.net/mmdb/mods/");
settings->setDefault("modstore_details_url", "https://forum.minetest.net/mmdb/mod/*/");
settings->setDefault("modstore_download_url", "https://forum.minetest.org/media/");
settings->setDefault("modstore_listmods_url", "https://forum.minetest.org/mmdb/mods/");
settings->setDefault("modstore_details_url", "https://forum.minetest.org/mmdb/mod/*/");
settings->setDefault("serverlist_file", "favoriteservers.txt");
#if USE_FREETYPE

View File

@ -394,7 +394,7 @@ ServerEnvironment::ServerEnvironment(ServerMap *map,
warningstream << "/!\\ You are using old player file backend. "
<< "This backend is deprecated and will be removed in next release /!\\"
<< std::endl << "Switching to SQLite3 or PostgreSQL is advised, "
<< "please read http://wiki.minetest.net/Database_backends." << std::endl;
<< "please read http://wiki.minetest.org/Database_backends." << std::endl;
if (!conf.updateConfigFile(conf_path.c_str())) {
errorstream << "ServerEnvironment::ServerEnvironment(): "