use minetest<version> as name per program and files
* permits to handle multiple versions of minetest on same integration * permits better integration for distributions on linux and mac * for progress on https://codeberg.org/minenux/minetest-engine/issues/6 * fix missing include dir for subgame.cpp
This commit is contained in:
parent
24147d99c0
commit
f65bba2e5c
@ -7,17 +7,17 @@ endif()
|
||||
|
||||
# This can be read from ${PROJECT_NAME} after project() is called
|
||||
project(minetest)
|
||||
set(PROJECT_NAME_CAPITALIZED "Minetest")
|
||||
set(PROJECT_NAME_CAPITALIZED "minetest")
|
||||
|
||||
# Works only for cmake 3.1 and greater
|
||||
set(CMAKE_CXX_STANDARD 11)
|
||||
set(GCC_MINIMUM_VERSION "4.8")
|
||||
set(GCC_MINIMUM_VERSION "4.7")
|
||||
set(CLANG_MINIMUM_VERSION "3.4")
|
||||
|
||||
# Also remember to set PROTOCOL_VERSION in network/networkprotocol.h when releasing
|
||||
set(VERSION_MAJOR 5)
|
||||
set(VERSION_MINOR 2)
|
||||
set(VERSION_PATCH 0)
|
||||
set(VERSION_PATCH 1)
|
||||
set(VERSION_EXTRA "" CACHE STRING "Stuff to append to version string")
|
||||
|
||||
# Change to false for releases
|
||||
@ -75,11 +75,11 @@ if(WIN32)
|
||||
set(EXAMPLE_CONF_DIR ".")
|
||||
set(LOCALEDIR "locale")
|
||||
elseif(APPLE)
|
||||
set(BUNDLE_NAME ${PROJECT_NAME}.app)
|
||||
set(BUNDLE_NAME ${PROJECT_NAME}${VERSION_MAJOR}.app)
|
||||
set(BUNDLE_PATH "${BUNDLE_NAME}")
|
||||
set(BINDIR ${BUNDLE_NAME}/Contents/MacOS)
|
||||
set(SHAREDIR ${BUNDLE_NAME}/Contents/Resources)
|
||||
set(DOCDIR "${SHAREDIR}/${PROJECT_NAME}")
|
||||
set(DOCDIR "${SHAREDIR}/${PROJECT_NAME}${VERSION_MAJOR}")
|
||||
set(EXAMPLE_CONF_DIR ${DOCDIR})
|
||||
set(LOCALEDIR "${SHAREDIR}/locale")
|
||||
elseif(UNIX) # Linux, BSD etc
|
||||
@ -88,21 +88,21 @@ elseif(UNIX) # Linux, BSD etc
|
||||
set(BINDIR "bin")
|
||||
set(DOCDIR "doc")
|
||||
set(EXAMPLE_CONF_DIR ".")
|
||||
set(MANDIR "unix/man")
|
||||
set(XDG_APPS_DIR "unix/applications")
|
||||
set(APPDATADIR "unix/metainfo")
|
||||
set(ICONDIR "unix/icons")
|
||||
set(MANDIR "man")
|
||||
set(XDG_APPS_DIR "applications")
|
||||
set(APPDATADIR "metainfo")
|
||||
set(ICONDIR "icons")
|
||||
set(LOCALEDIR "locale")
|
||||
else()
|
||||
set(SHAREDIR "${CMAKE_INSTALL_PREFIX}/share/${PROJECT_NAME}")
|
||||
set(SHAREDIR "${CMAKE_INSTALL_PREFIX}/share/${PROJECT_NAME}${VERSION_MAJOR}")
|
||||
set(BINDIR "${CMAKE_INSTALL_PREFIX}/bin")
|
||||
set(DOCDIR "${CMAKE_INSTALL_PREFIX}/share/doc/${PROJECT_NAME}")
|
||||
set(DOCDIR "${CMAKE_INSTALL_PREFIX}/share/doc/${PROJECT_NAME}${VERSION_MAJOR}")
|
||||
set(MANDIR "${CMAKE_INSTALL_PREFIX}/share/man")
|
||||
set(EXAMPLE_CONF_DIR ${DOCDIR})
|
||||
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()
|
||||
|
||||
@ -185,20 +185,19 @@ install(FILES "doc/client_lua_api.txt" DESTINATION "${DOCDIR}" COMPONENT "Docs")
|
||||
install(FILES "doc/menu_lua_api.txt" DESTINATION "${DOCDIR}" COMPONENT "Docs")
|
||||
install(FILES "doc/texture_packs.txt" DESTINATION "${DOCDIR}" COMPONENT "Docs")
|
||||
install(FILES "doc/world_format.txt" DESTINATION "${DOCDIR}" COMPONENT "Docs")
|
||||
install(FILES "minetest.conf.example" DESTINATION "${EXAMPLE_CONF_DIR}")
|
||||
install(FILES "minetest.conf.example" DESTINATION "${EXAMPLE_CONF_DIR}" RENAME "${PROJECT_NAME}${VERSION_MAJOR}.conf.example")
|
||||
|
||||
if(UNIX AND NOT APPLE)
|
||||
install(FILES "doc/minetest.6" "doc/minetestserver.6" DESTINATION "${MANDIR}/man6")
|
||||
install(FILES "misc/net.minetest.minetest.desktop" DESTINATION "${XDG_APPS_DIR}")
|
||||
install(FILES "misc/net.minetest.minetest.appdata.xml" DESTINATION "${APPDATADIR}")
|
||||
install(FILES "misc/minetest.svg" DESTINATION "${ICONDIR}/hicolor/scalable/apps")
|
||||
install(FILES "misc/minetest-xorg-icon-128.png"
|
||||
DESTINATION "${ICONDIR}/hicolor/128x128/apps"
|
||||
RENAME "minetest.png")
|
||||
install(FILES "doc/minetest.6" DESTINATION "${MANDIR}/man6" RENAME "${PROJECT_NAME}${VERSION_MAJOR}.6")
|
||||
install(FILES "doc/minetestserver.6" DESTINATION "${MANDIR}/man6" RENAME "${PROJECT_NAME}${VERSION_MAJOR}server.6")
|
||||
install(FILES "misc/net.minetest.minetest.desktop" DESTINATION "${XDG_APPS_DIR}" RENAME "net.minetest.${PROJECT_NAME}${VERSION_MAJOR}.desktop")
|
||||
install(FILES "misc/net.minetest.minetest.appdata.xml" DESTINATION "${APPDATADIR}" RENAME "net.minetest.${PROJECT_NAME}${VERSION_MAJOR}.appdata.xml")
|
||||
install(FILES "misc/minetest.svg" DESTINATION "${ICONDIR}/hicolor/scalable/apps" RENAME "${PROJECT_NAME}${VERSION_MAJOR}.svg")
|
||||
install(FILES "misc/minetest-xorg-icon-128.png" DESTINATION "${ICONDIR}/hicolor/128x128/apps" RENAME "${PROJECT_NAME}${VERSION_MAJOR}.png")
|
||||
endif()
|
||||
|
||||
if(APPLE)
|
||||
install(FILES "misc/minetest-icon.icns" DESTINATION "${SHAREDIR}")
|
||||
install(FILES "misc/${PROJECT_NAME}-icon.icns" DESTINATION "${SHAREDIR}" RENAME "${PROJECT_NAME}${VERSION_MAJOR}-icon.icns")
|
||||
install(FILES "misc/Info.plist" DESTINATION "${BUNDLE_PATH}/Contents")
|
||||
endif()
|
||||
|
||||
@ -243,12 +242,12 @@ include(CPackComponent)
|
||||
|
||||
cpack_add_component(Docs
|
||||
DISPLAY_NAME "Documentation"
|
||||
DESCRIPTION "Documentation about Minetest and Minetest modding"
|
||||
DESCRIPTION "Documentation about ${PROJECT_NAME}${VERSION_MAJOR} and Minetest modding"
|
||||
)
|
||||
|
||||
cpack_add_component(SUBGAME_MINETEST_GAME
|
||||
DISPLAY_NAME "Minetest Game"
|
||||
DESCRIPTION "The official subgame for the Minetest engine, that can easily extended by mods."
|
||||
DISPLAY_NAME "${PROJECT_NAME}${VERSION_MAJOR} Game"
|
||||
DESCRIPTION "The official subgame for the ${PROJECT_NAME}${VERSION_MAJOR} engine, that can easily extended by mods."
|
||||
GROUP "Subgames"
|
||||
)
|
||||
|
||||
@ -260,7 +259,7 @@ cpack_add_component(SUBGAME_MINIMAL
|
||||
)
|
||||
|
||||
cpack_add_component_group(Subgames
|
||||
DESCRIPTION "Games for the Minetest engine."
|
||||
DESCRIPTION "Games for the ${PROJECT_NAME}${VERSION_MAJOR} engine."
|
||||
)
|
||||
|
||||
if(WIN32)
|
||||
@ -269,21 +268,21 @@ if(WIN32)
|
||||
|
||||
if(RUN_IN_PLACE)
|
||||
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
|
||||
set(CPACK_PACKAGE_FILE_NAME "${PROJECT_NAME}-${VERSION_STRING}-win64")
|
||||
set(CPACK_PACKAGE_FILE_NAME "${PROJECT_NAME}${VERSION_MAJOR}-${VERSION_STRING}-win64")
|
||||
else()
|
||||
set(CPACK_PACKAGE_FILE_NAME "${PROJECT_NAME}-${VERSION_STRING}-win32")
|
||||
set(CPACK_PACKAGE_FILE_NAME "${PROJECT_NAME}${VERSION_MAJOR}-${VERSION_STRING}-win32")
|
||||
endif()
|
||||
|
||||
set(CPACK_GENERATOR ZIP)
|
||||
|
||||
else()
|
||||
set(CPACK_GENERATOR WIX ZIP)
|
||||
set(CPACK_PACKAGE_NAME "${PROJECT_NAME_CAPITALIZED}")
|
||||
set(CPACK_PACKAGE_INSTALL_DIRECTORY "${PROJECT_NAME_CAPITALIZED}")
|
||||
set(CPACK_PACKAGE_EXECUTABLES ${PROJECT_NAME} "${PROJECT_NAME_CAPITALIZED}")
|
||||
set(CPACK_CREATE_DESKTOP_LINKS ${PROJECT_NAME})
|
||||
set(CPACK_PACKAGE_NAME "${PROJECT_NAME}${VERSION_MAJOR}")
|
||||
set(CPACK_PACKAGE_INSTALL_DIRECTORY "${PROJECT_NAME}${VERSION_MAJOR}")
|
||||
set(CPACK_PACKAGE_EXECUTABLES ${PROJECT_NAME}${VERSION_MAJOR} "${PROJECT_NAME}${VERSION_MAJOR}")
|
||||
set(CPACK_CREATE_DESKTOP_LINKS ${PROJECT_NAME}${VERSION_MAJOR})
|
||||
|
||||
set(CPACK_WIX_PRODUCT_ICON "${CMAKE_CURRENT_SOURCE_DIR}/misc/minetest-icon.ico")
|
||||
set(CPACK_WIX_PRODUCT_ICON "${CMAKE_CURRENT_SOURCE_DIR}/misc/${PROJECT_NAME}${VERSION_MAJOR}-icon.ico")
|
||||
# Supported languages can be found at
|
||||
# http://wixtoolset.org/documentation/manual/v3/wixui/wixui_localization.html
|
||||
#set(CPACK_WIX_CULTURES "ar-SA,bg-BG,ca-ES,hr-HR,cs-CZ,da-DK,nl-NL,en-US,et-EE,fi-FI,fr-FR,de-DE")
|
||||
@ -303,10 +302,10 @@ if(WIN32)
|
||||
endif()
|
||||
elseif(APPLE)
|
||||
set(CPACK_INCLUDE_TOPLEVEL_DIRECTORY 0)
|
||||
set(CPACK_PACKAGE_FILE_NAME "${PROJECT_NAME}-${VERSION_STRING}-osx")
|
||||
set(CPACK_PACKAGE_FILE_NAME "${PROJECT_NAME}${VERSION_MAJOR}-${VERSION_STRING}-osx")
|
||||
set(CPACK_GENERATOR ZIP)
|
||||
else()
|
||||
set(CPACK_PACKAGE_FILE_NAME "${PROJECT_NAME}-${VERSION_STRING}-linux")
|
||||
set(CPACK_PACKAGE_FILE_NAME "${PROJECT_NAME}${VERSION_MAJOR}-${VERSION_STRING}-linux")
|
||||
set(CPACK_GENERATOR TGZ)
|
||||
set(CPACK_SOURCE_GENERATOR TGZ)
|
||||
endif()
|
||||
|
20
Dockerfile
20
Dockerfile
@ -3,11 +3,11 @@ FROM debian:stretch
|
||||
USER root
|
||||
RUN apt-get update -y && \
|
||||
apt-get -y install build-essential libirrlicht-dev cmake libbz2-dev libpng-dev libjpeg-dev \
|
||||
libsqlite3-dev libcurl4-gnutls-dev zlib1g-dev libgmp-dev libjsoncpp-dev git
|
||||
libsqlite3-dev libcurl4-gnutls-dev zlib1g-dev libgmp-dev libjsoncpp-dev libidn11-dev git
|
||||
|
||||
COPY . /usr/src/minetest
|
||||
COPY . /usr/src/minetest5
|
||||
|
||||
RUN mkdir -p /usr/src/minetest/cmakebuild && cd /usr/src/minetest/cmakebuild && \
|
||||
RUN mkdir -p /usr/src/minetest5/cmakebuild && cd /usr/src/minetest5/cmakebuild && \
|
||||
cmake -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_BUILD_TYPE=Release -DRUN_IN_PLACE=FALSE \
|
||||
-DBUILD_SERVER=TRUE \
|
||||
-DBUILD_CLIENT=FALSE \
|
||||
@ -21,21 +21,21 @@ RUN mkdir -p /usr/src/minetest/cmakebuild && cd /usr/src/minetest/cmakebuild &&
|
||||
FROM debian:stretch
|
||||
|
||||
USER root
|
||||
RUN groupadd minetest && useradd -m -g minetest -d /var/lib/minetest minetest && \
|
||||
RUN groupadd minetest5 && useradd -m -g minetest5 -d /var/lib/minetest5 minetest5 && \
|
||||
apt-get update -y && \
|
||||
apt-get -y install libcurl3-gnutls libjsoncpp1 liblua5.1-0 libluajit-5.1-2 libpq5 libsqlite3-0 \
|
||||
libstdc++6 zlib1g libc6 && \
|
||||
apt-get clean && rm -rf /var/cache/apt/archives/* && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
WORKDIR /var/lib/minetest
|
||||
WORKDIR /var/lib/minetest5
|
||||
|
||||
COPY --from=0 /usr/local/share/minetest /usr/local/share/minetest
|
||||
COPY --from=0 /usr/local/bin/minetestserver /usr/local/bin/minetestserver
|
||||
COPY --from=0 /usr/local/share/doc/minetest/minetest.conf.example /etc/minetest/minetest.conf
|
||||
COPY --from=0 /usr/local/share/minetest5 /usr/local/share/minetest5
|
||||
COPY --from=0 /usr/local/bin/minetest5server /usr/local/bin/minetest5server
|
||||
COPY --from=0 /usr/local/share/doc/minetest5/minetest5.conf.example /etc/minetest5/minetest5.conf
|
||||
|
||||
USER minetest
|
||||
USER minetest5
|
||||
|
||||
EXPOSE 30000/udp
|
||||
|
||||
CMD ["/usr/local/bin/minetestserver", "--config", "/etc/minetest/minetest.conf"]
|
||||
CMD ["/usr/local/bin/minetest5server", "--config", "/etc/minetest5/minetest5.conf"]
|
||||
|
161
README.md
161
README.md
@ -1,20 +1,24 @@
|
||||
Minetest
|
||||
========
|
||||
Minetest5
|
||||
=========
|
||||
|
||||
[![Build Status](https://travis-ci.org/minetest/minetest.svg?branch=master)](https://travis-ci.org/minetest/minetest)
|
||||
[![Translation status](https://hosted.weblate.org/widgets/minetest/-/svg-badge.svg)](https://hosted.weblate.org/engage/minetest/?utm_source=widget)
|
||||
[![License](https://img.shields.io/badge/license-LGPLv2.1%2B-blue.svg)](https://www.gnu.org/licenses/old-licenses/lgpl-2.1.en.html)
|
||||
|
||||
Minetest is a free open-source voxel game engine with easy modding and game creation.
|
||||
this source is minetest modified up to 5.2 with namespace execution for distros integration with OS's
|
||||
also features the client identification patch to property get rid of cheaters.
|
||||
|
||||
Copyright (C) 2010-2019 Perttu Ahola <celeron55@gmail.com>
|
||||
and contributors (see source file comments and the version control log)
|
||||
|
||||
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](https://github.com/minetest/minetest_game/)
|
||||
project too. See its README.txt for more information.
|
||||
|
||||
If you downloaded the **Minetest5 Engine** source code from git, in which this file is
|
||||
contained, you probably want to download the Minetest5 Game at https://codeberg.org/minenux/minetest-game-minetest/src/branch/stable-5.2
|
||||
project too. See its README.md information. Those sources are a little modification of original Minetest.
|
||||
|
||||
For Minetest4 series of same engine please use the respective branch.
|
||||
|
||||
Table of Contents
|
||||
------------------
|
||||
@ -31,15 +35,33 @@ Table of Contents
|
||||
|
||||
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/
|
||||
- This sources https://codeberg.org/minenux/minetest-engine/src/branch/stable-5.2-namespace
|
||||
- Minetest4 sources https://codeberg.org/minenux/minetest-engine/src/branch/stable-4.0-namespace
|
||||
- Wiki of this project (minenux) https://codeberg.org/venenux/venenux-minetest/wiki
|
||||
- Original Minetest Website: http://minetest.net/
|
||||
- Original Minetest Wiki: http://wiki.minetest.net/
|
||||
- Minetest Developer wiki: http://dev.minetest.net/
|
||||
- Minetest Forum: http://forum.minetest.net/
|
||||
- Original Minetest GitHub: https://github.com/minetest/minetest/
|
||||
- [doc/](doc/) directory of source distribution
|
||||
|
||||
Generals of game
|
||||
----------------
|
||||
|
||||
This is **an engine that can acts as server and client**, it has **two main components**:
|
||||
|
||||
1. the **games** (that contains the mods and definition of how to play) and
|
||||
2. the **world** (that contains the creeated and playable data).
|
||||
|
||||
Paths places of those are in the [Paths](#paths) sections of this file.
|
||||
|
||||
Players used the client role of the program, that joins to a server that can be the same invoked
|
||||
or a remote server, currently many phone clients (apps like minetest that stolen its name)
|
||||
just used those remote servers to play.
|
||||
|
||||
Default controls
|
||||
----------------
|
||||
|
||||
All controls are re-bindable using settings.
|
||||
Some can be changed in the key config dialog in the settings tab.
|
||||
|
||||
@ -83,6 +105,7 @@ Some can be changed in the key config dialog in the settings tab.
|
||||
|
||||
Paths
|
||||
-----
|
||||
|
||||
Locations:
|
||||
|
||||
* `bin` - Compiled binaries
|
||||
@ -96,36 +119,39 @@ Where each location is on each platform:
|
||||
* `share` = `.`
|
||||
* `user` = `.`
|
||||
* Windows installed:
|
||||
* `bin` = `C:\Program Files\Minetest\bin (Depends on the install location)`
|
||||
* `share` = `C:\Program Files\Minetest (Depends on the install location)`
|
||||
* `user` = `%APPDATA%\Minetest`
|
||||
* `bin` = `C:\Program Files\Minetest5\bin (Depends on the install location)`
|
||||
* `share` = `C:\Program Files\Minetest5 (Depends on the install location)`
|
||||
* `user` = `%APPDATA%\Minetest5`
|
||||
* Linux installed:
|
||||
* `bin` = `/usr/bin`
|
||||
* `share` = `/usr/share/minetest`
|
||||
* `user` = `~/.minetest`
|
||||
* `share` = `/usr/share/minetest5`
|
||||
* `user` = `~/.minetest5`
|
||||
* macOS:
|
||||
* `bin` = `Contents/MacOS`
|
||||
* `share` = `Contents/Resources`
|
||||
* `user` = `Contents/User OR ~/Library/Application Support/minetest`
|
||||
* `user` = `Contents/User OR ~/Library/Application Support/minetest5`
|
||||
|
||||
Worlds can be found as separate folders in: `user/worlds/`
|
||||
|
||||
Configuration file
|
||||
------------------
|
||||
|
||||
- Default location:
|
||||
`user/minetest.conf`
|
||||
`user/minetest5.conf`
|
||||
- This file is created by closing Minetest for the first time.
|
||||
- A specific file can be specified on the command line:
|
||||
`--config <path-to-file>`
|
||||
- A run-in-place build will look for the configuration file in
|
||||
`location_of_exe/../minetest.conf` and also `location_of_exe/../../minetest.conf`
|
||||
`location_of_exe/../minetest5.conf` and also `location_of_exe/../../minetest5.conf`
|
||||
|
||||
Command-line options
|
||||
--------------------
|
||||
|
||||
- Use `--help`
|
||||
|
||||
Compiling
|
||||
---------
|
||||
|
||||
### Compiling on GNU/Linux
|
||||
|
||||
#### Dependencies
|
||||
@ -295,86 +321,6 @@ Library specific options:
|
||||
ZLIB_INCLUDE_DIR - Directory that contains zlib.h
|
||||
ZLIB_LIBRARY - Path to libz.a/libz.so/zlib.lib
|
||||
|
||||
### Compiling on Windows
|
||||
|
||||
### Requirements
|
||||
|
||||
- [Visual Studio 2015 or newer](https://visualstudio.microsoft.com)
|
||||
- [CMake](https://cmake.org/download/)
|
||||
- [vcpkg](https://github.com/Microsoft/vcpkg)
|
||||
- [Git](https://git-scm.com/downloads)
|
||||
|
||||
### Compiling and installing the dependencies
|
||||
|
||||
It is highly recommended to use vcpkg as package manager.
|
||||
|
||||
#### a) Using vcpkg to install dependencies
|
||||
|
||||
After you successfully built vcpkg you can easily install the required libraries:
|
||||
```powershell
|
||||
vcpkg install irrlicht zlib curl[winssl] openal-soft libvorbis libogg sqlite3 freetype luajit --triplet x64-windows
|
||||
```
|
||||
|
||||
- `curl` is optional, but required to read the serverlist, `curl[winssl]` is required to use the content store.
|
||||
- `openal-soft`, `libvorbis` and `libogg` are optional, but required to use sound.
|
||||
- `freetype` is optional, it allows true-type font rendering.
|
||||
- `luajit` is optional, it replaces the integrated Lua interpreter with a faster just-in-time interpreter.
|
||||
|
||||
There are other optional libraries, but they are not tested if they can build and link correctly.
|
||||
|
||||
Use `--triplet` to specify the target triplet, e.g. `x64-windows` or `x86-windows`.
|
||||
|
||||
#### b) Compile the dependencies on your own
|
||||
|
||||
This is outdated and not recommended. Follow the instructions on https://dev.minetest.net/Build_Win32_Minetest_including_all_required_libraries#VS2012_Build
|
||||
|
||||
### Compile Minetest
|
||||
|
||||
#### a) Using the vcpkg toolchain and CMake GUI
|
||||
1. Start up the CMake GUI
|
||||
2. Select **Browse Source...** and select DIR/minetest
|
||||
3. Select **Browse Build...** and select DIR/minetest-build
|
||||
4. Select **Configure**
|
||||
5. Choose the right visual Studio version and target platform. It has to match the version of the installed dependencies
|
||||
6. Choose **Specify toolchain file for cross-compiling**
|
||||
7. Click **Next**
|
||||
8. Select the vcpkg toolchain file e.g. `D:/vcpkg/scripts/buildsystems/vcpkg.cmake`
|
||||
9. Click Finish
|
||||
10. Wait until cmake have generated the cash file
|
||||
11. If there are any errors, solve them and hit **Configure**
|
||||
12. Click **Generate**
|
||||
13. Click **Open Project**
|
||||
14. Compile Minetest inside Visual studio.
|
||||
|
||||
#### b) Using the vcpkg toolchain and the commandline
|
||||
|
||||
Run the following script in PowerShell:
|
||||
|
||||
```powershell
|
||||
cmake . -G"Visual Studio 15 2017 Win64" -DCMAKE_TOOLCHAIN_FILE=D:/vcpkg/scripts/buildsystems/vcpkg.cmake -DCMAKE_BUILD_TYPE=Release -DENABLE_GETTEXT=0 -DENABLE_CURSES=0
|
||||
cmake --build . --config Release
|
||||
```
|
||||
Make sure that the right compiler is selected and the path to the vcpkg toolchain is correct.
|
||||
|
||||
#### c) Using your own compiled libraries
|
||||
|
||||
**This is outdated and not recommended**
|
||||
|
||||
Follow the instructions on https://dev.minetest.net/Build_Win32_Minetest_including_all_required_libraries#VS2012_Build
|
||||
|
||||
### Windows Installer using WiX Toolset
|
||||
|
||||
Requirements:
|
||||
* [Visual Studio 2017](https://visualstudio.microsoft.com/)
|
||||
* [WiX Toolset](https://wixtoolset.org/)
|
||||
|
||||
In the Visual Studio 2017 Installer select **Optional Features -> WiX Toolset**.
|
||||
|
||||
Build the binaries as described above, but make sure you unselect `RUN_IN_PLACE`.
|
||||
|
||||
Open the generated project file with Visual Studio. Right-click **Package** and choose **Generate**.
|
||||
It may take some minutes to generate the installer.
|
||||
|
||||
|
||||
Docker
|
||||
------
|
||||
@ -404,15 +350,14 @@ You can also host your Minetest server inside a Kubernetes cluster. See our exam
|
||||
|
||||
Version scheme
|
||||
--------------
|
||||
|
||||
We use `major.minor.patch` since 5.0.0-dev. Prior to that we used `0.major.minor`.
|
||||
|
||||
- Major is incremented when the release contains breaking changes, all other
|
||||
numbers are set to 0.
|
||||
- Minor is incremented when the release contains new non-breaking features,
|
||||
patch is set to 0.
|
||||
- Patch is incremented when the release only contains bugfixes and very
|
||||
minor/trivial features considered necessary.
|
||||
In minenux we used `4.minor.patch` for 0.4.X and `5.2.patch` for 5.2.X
|
||||
|
||||
Since 5.0.0-dev and 0.4.17-dev, the dev notation refers to the next release,
|
||||
i.e.: 5.0.0-dev is the development version leading to 5.0.0.
|
||||
Prior to that we used `previous_version-dev`.
|
||||
- Major in minenux is used only to those two releases, until 6.X comes in.
|
||||
- Minor in 4.X will be always "0" cos will be only backported things.
|
||||
- Patch is incremented when release contains bugfixes and veryminor/trivial features.
|
||||
|
||||
In minenux we do not use "-dev" notation, next release is never reached until
|
||||
a new tag. We only backports patchs and push bugfixes, fetures are avoided as possible.
|
||||
|
@ -11,11 +11,11 @@ local minetest_example_header = [[
|
||||
# By default, all the settings are commented and not functional.
|
||||
# Uncomment settings by removing the preceding #.
|
||||
|
||||
# minetest.conf is read by default from:
|
||||
# ../minetest.conf
|
||||
# ../../minetest.conf
|
||||
# minetest5.conf is read by default from:
|
||||
# ../minetest5.conf
|
||||
# ../../minetest5.conf
|
||||
# Any other path can be chosen by passing the path as a parameter
|
||||
# to the program, eg. "minetest.exe --config ../minetest.conf.example".
|
||||
# to the program, eg. "minetest --config ../minetest5.conf.example".
|
||||
|
||||
# Further documentation:
|
||||
# http://wiki.minetest.net/
|
||||
|
@ -118,7 +118,7 @@ local function init_globals()
|
||||
menudata.worldlist:set_sortmode("alphabetic")
|
||||
|
||||
if not core.settings:get("menu_last_game") then
|
||||
local default_game = core.settings:get("default_game") or "minetest"
|
||||
local default_game = core.settings:get("default_game") or "minetest5"
|
||||
core.settings:set("menu_last_game", default_game)
|
||||
end
|
||||
|
||||
|
@ -101,7 +101,7 @@ return {
|
||||
local logofile = defaulttexturedir .. "logo.png"
|
||||
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.2;" .. version.project .. " MinenuX fork" .. " " .. version.string .. "]" ..
|
||||
"label[0.5,3.5;http://minetest.net]" ..
|
||||
"tablecolumns[color;text]" ..
|
||||
"tableoptions[background=#00000000;highlight=#00000000;border=false]" ..
|
||||
|
@ -996,7 +996,7 @@ show_debug (Show debug info) bool false
|
||||
[Server / Singleplayer]
|
||||
|
||||
# Name of the server, to be displayed when players join and in the serverlist.
|
||||
server_name (Server name) string Minetest server
|
||||
server_name (Server name) string Minetest5 server
|
||||
|
||||
# Description of server, to be displayed when players join and in the serverlist.
|
||||
server_description (Server description) string mine here
|
||||
@ -1062,7 +1062,7 @@ max_packets_per_iteration (Max. packets per iteration) int 1024
|
||||
|
||||
# Default game when creating a new world.
|
||||
# This will be overridden when creating a world from the main menu.
|
||||
default_game (Default game) string minetest
|
||||
default_game (Default game) string minetest5
|
||||
|
||||
# Message of the day displayed to players connecting.
|
||||
motd (Message of the day) string
|
||||
|
@ -1,21 +1,21 @@
|
||||
.TH minetest 6 "2 February 2019" "" ""
|
||||
.TH minetest5 6 "2 February 2019" "" ""
|
||||
|
||||
.SH NAME
|
||||
minetest, minetestserver \- Multiplayer infinite-world block sandbox
|
||||
minetest5, minetest5server \- Multiplayer infinite-world block sandbox
|
||||
|
||||
.SH SYNOPSIS
|
||||
.B minetest
|
||||
.B minetest5
|
||||
[\fB--server SERVER OPTIONS\fR | \fBCLIENT OPTIONS\fR]
|
||||
[\fBCOMMON OPTIONS\fR]
|
||||
[\fBWORLD PATH\fR]
|
||||
|
||||
.B minetestserver
|
||||
.B minetest5server
|
||||
[\fBSERVER OPTIONS\fR]
|
||||
[\fBCOMMON OPTIONS\fR]
|
||||
[\fBWORLD PATH\fR]
|
||||
|
||||
.SH DESCRIPTION
|
||||
.B Minetest is one of the first InfiniMiner/Minecraft(/whatever) inspired games
|
||||
.B minetest5 is one of the first InfiniMiner/Minecraft(/whatever) inspired games
|
||||
(started October 2010), with a goal of taking the survival multiplayer gameplay
|
||||
in a slightly different direction.
|
||||
.PP
|
||||
|
@ -1,2 +1,2 @@
|
||||
.so man6/minetest.6
|
||||
.so man6/minetest5.6
|
||||
|
||||
|
@ -4,10 +4,10 @@
|
||||
# Uncomment settings by removing the preceding #.
|
||||
|
||||
# minetest.conf is read by default from:
|
||||
# ../minetest.conf
|
||||
# ../../minetest.conf
|
||||
# ../minetest5.conf
|
||||
# ../../minetest5.conf
|
||||
# Any other path can be chosen by passing the path as a parameter
|
||||
# to the program, eg. "minetest.exe --config ../minetest.conf.example".
|
||||
# to the program, eg. "minetest --config ../minetest5.conf.example".
|
||||
|
||||
# Further documentation:
|
||||
# http://wiki.minetest.net/
|
||||
@ -1191,7 +1191,7 @@
|
||||
|
||||
# Name of the server, to be displayed when players join and in the serverlist.
|
||||
# type: string
|
||||
# server_name = Minetest server
|
||||
server_name = Minetest5 server
|
||||
|
||||
# Description of server, to be displayed when players join and in the serverlist.
|
||||
# type: string
|
||||
@ -1272,7 +1272,7 @@
|
||||
# Default game when creating a new world.
|
||||
# This will be overridden when creating a world from the main menu.
|
||||
# type: string
|
||||
# default_game = minetest
|
||||
default_game = minetest5
|
||||
|
||||
# Message of the day displayed to players connecting.
|
||||
# type: string
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<component type="desktop-application">
|
||||
<id>net.minetest.minetest.desktop</id>
|
||||
<id>net.minetest.minetest5.desktop</id>
|
||||
<metadata_license>CC0-1.0</metadata_license>
|
||||
<project_license>LGPL-2.1+ and CC-BY-SA-3.0 and MIT and Apache-2.0</project_license>
|
||||
<content_rating type="oars-1.0">
|
||||
@ -9,20 +9,20 @@
|
||||
<content_attribute id="social-chat">intense</content_attribute>
|
||||
<content_attribute id="social-info">mild</content_attribute>
|
||||
</content_rating>
|
||||
<name>Minetest</name>
|
||||
<name>minetest5</name>
|
||||
<summary>Multiplayer infinite-world block sandbox game</summary>
|
||||
<description>
|
||||
<p>
|
||||
Minetest is an infinite-world block sandbox game and game engine.
|
||||
minetest5 is an infinite-world block sandbox game and game engine.
|
||||
</p><p>
|
||||
Players can create and destroy various types of blocks in a
|
||||
three-dimensional open world. This allows forming structures in
|
||||
every possible creation, on multiplayer servers or in singleplayer.
|
||||
</p><p>
|
||||
Minetest is designed to be simple, stable, and portable.
|
||||
minetest5 is designed to be simple, stable, and portable.
|
||||
It is lightweight enough to run on fairly old hardware.
|
||||
</p><p>
|
||||
Minetest has many features, including:
|
||||
minetest5 has many features, including:
|
||||
</p>
|
||||
<ul>
|
||||
<li>Ability to walk around, dig, and build in a near-infinite voxel world</li>
|
||||
@ -57,9 +57,9 @@
|
||||
<url type="faq">http://wiki.minetest.net/FAQ</url>
|
||||
<url type="help">http://wiki.minetest.net</url>
|
||||
<provides>
|
||||
<binary>minetest</binary>
|
||||
<binary>minetest5</binary>
|
||||
</provides>
|
||||
<translation type="gettext">minetest</translation>
|
||||
<translation type="gettext">minetest5</translation>
|
||||
<update_contact>sfan5@live.de</update_contact>
|
||||
<releases>
|
||||
<release date="2020-04-05" version="5.2.0"/>
|
||||
|
@ -1,6 +1,6 @@
|
||||
[Desktop Entry]
|
||||
Name=Minetest
|
||||
GenericName=Minetest
|
||||
Name=minetest5
|
||||
GenericName=minetest5
|
||||
Comment=Multiplayer infinite-world block sandbox
|
||||
Comment[de]=Mehrspieler-Sandkastenspiel mit unendlichen Blockwelten
|
||||
Comment[es]=Juego sandbox multijugador con mundos infinitos
|
||||
@ -8,8 +8,8 @@ Comment[fr]=Jeu multijoueurs de type bac à sable avec des mondes infinis
|
||||
Comment[ja]=マルチプレイに対応した、無限の世界のブロック型サンドボックスゲームです
|
||||
Comment[ru]=Игра-песочница с безграничным миром, состоящим из блоков
|
||||
Comment[tr]=Tek-Çok oyuncuyla küplerden sonsuz dünyalar inşa et
|
||||
Exec=minetest
|
||||
Icon=minetest
|
||||
Exec=minetest5
|
||||
Icon=minetest5
|
||||
Terminal=false
|
||||
Type=Application
|
||||
Categories=Game;Simulation;
|
||||
|
@ -38,7 +38,7 @@ BEGIN
|
||||
BEGIN
|
||||
BLOCK "040904b0"
|
||||
BEGIN
|
||||
VALUE "Comments", ""
|
||||
VALUE "Comments", "VenenuX powered"
|
||||
VALUE "CompanyName", PROJECT_NAME_C " community"
|
||||
VALUE "FileDescription", PROJECT_NAME_C " engine"
|
||||
VALUE "FileVersion", VERSION_STRING
|
||||
|
@ -523,10 +523,10 @@ set(EXECUTABLE_OUTPUT_PATH "${CMAKE_SOURCE_DIR}/bin")
|
||||
|
||||
|
||||
if(BUILD_CLIENT)
|
||||
add_executable(${PROJECT_NAME} ${client_SRCS} ${extra_windows_SRCS})
|
||||
add_dependencies(${PROJECT_NAME} GenerateVersion)
|
||||
add_executable(${PROJECT_NAME}${VERSION_MAJOR} ${client_SRCS} ${extra_windows_SRCS})
|
||||
add_dependencies(${PROJECT_NAME}${VERSION_MAJOR} GenerateVersion)
|
||||
set(client_LIBS
|
||||
${PROJECT_NAME}
|
||||
${PROJECT_NAME}${VERSION_MAJOR}
|
||||
${ZLIB_LIBRARIES}
|
||||
${IRRLICHT_LIBRARY}
|
||||
${JPEG_LIBRARIES}
|
||||
@ -546,63 +546,63 @@ if(BUILD_CLIENT)
|
||||
)
|
||||
if(ENABLE_GLES)
|
||||
target_link_libraries(
|
||||
${PROJECT_NAME}
|
||||
${PROJECT_NAME}${VERSION_MAJOR}
|
||||
${OPENGLES2_LIBRARIES}
|
||||
${EGL_LIBRARIES}
|
||||
)
|
||||
else()
|
||||
target_link_libraries(
|
||||
${PROJECT_NAME}
|
||||
${PROJECT_NAME}${VERSION_MAJOR}
|
||||
${OPENGL_LIBRARIES}
|
||||
)
|
||||
endif()
|
||||
if(USE_GETTEXT)
|
||||
target_link_libraries(
|
||||
${PROJECT_NAME}
|
||||
${PROJECT_NAME}${VERSION_MAJOR}
|
||||
${GETTEXT_LIBRARY}
|
||||
)
|
||||
endif()
|
||||
if(USE_CURL)
|
||||
target_link_libraries(
|
||||
${PROJECT_NAME}
|
||||
${PROJECT_NAME}${VERSION_MAJOR}
|
||||
${CURL_LIBRARY}
|
||||
)
|
||||
endif()
|
||||
if(USE_FREETYPE)
|
||||
if(FREETYPE_PKGCONFIG_FOUND)
|
||||
set_target_properties(${PROJECT_NAME}
|
||||
set_target_properties(${PROJECT_NAME}${VERSION_MAJOR}
|
||||
PROPERTIES
|
||||
COMPILE_FLAGS "${FREETYPE_CFLAGS_STR}"
|
||||
)
|
||||
endif()
|
||||
target_link_libraries(
|
||||
${PROJECT_NAME}
|
||||
${PROJECT_NAME}${VERSION_MAJOR}
|
||||
${FREETYPE_LIBRARY}
|
||||
)
|
||||
endif()
|
||||
if (USE_CURSES)
|
||||
target_link_libraries(${PROJECT_NAME} ${CURSES_LIBRARIES})
|
||||
target_link_libraries(${PROJECT_NAME}${VERSION_MAJOR} ${CURSES_LIBRARIES})
|
||||
endif()
|
||||
if (USE_POSTGRESQL)
|
||||
target_link_libraries(${PROJECT_NAME} ${PostgreSQL_LIBRARIES})
|
||||
target_link_libraries(${PROJECT_NAME}${VERSION_MAJOR} ${PostgreSQL_LIBRARIES})
|
||||
endif()
|
||||
if (USE_LEVELDB)
|
||||
target_link_libraries(${PROJECT_NAME} ${LEVELDB_LIBRARY})
|
||||
target_link_libraries(${PROJECT_NAME}${VERSION_MAJOR} ${LEVELDB_LIBRARY})
|
||||
endif()
|
||||
if (USE_REDIS)
|
||||
target_link_libraries(${PROJECT_NAME} ${REDIS_LIBRARY})
|
||||
target_link_libraries(${PROJECT_NAME}${VERSION_MAJOR} ${REDIS_LIBRARY})
|
||||
endif()
|
||||
if (USE_SPATIAL)
|
||||
target_link_libraries(${PROJECT_NAME} ${SPATIAL_LIBRARY})
|
||||
target_link_libraries(${PROJECT_NAME}${VERSION_MAJOR} ${SPATIAL_LIBRARY})
|
||||
endif()
|
||||
endif(BUILD_CLIENT)
|
||||
|
||||
|
||||
if(BUILD_SERVER)
|
||||
add_executable(${PROJECT_NAME}server ${server_SRCS} ${extra_windows_SRCS})
|
||||
add_dependencies(${PROJECT_NAME}server GenerateVersion)
|
||||
add_executable(${PROJECT_NAME}${VERSION_MAJOR}server ${server_SRCS} ${extra_windows_SRCS})
|
||||
add_dependencies(${PROJECT_NAME}${VERSION_MAJOR}server GenerateVersion)
|
||||
target_link_libraries(
|
||||
${PROJECT_NAME}server
|
||||
${PROJECT_NAME}${VERSION_MAJOR}server
|
||||
${ZLIB_LIBRARIES}
|
||||
${SQLITE3_LIBRARY}
|
||||
${JSON_LIBRARY}
|
||||
@ -610,31 +610,28 @@ if(BUILD_SERVER)
|
||||
${GMP_LIBRARY}
|
||||
${PLATFORM_LIBS}
|
||||
)
|
||||
set_target_properties(${PROJECT_NAME}server PROPERTIES
|
||||
set_target_properties(${PROJECT_NAME}${VERSION_MAJOR}server PROPERTIES
|
||||
COMPILE_DEFINITIONS "SERVER")
|
||||
if (USE_GETTEXT)
|
||||
target_link_libraries(${PROJECT_NAME}server ${GETTEXT_LIBRARY})
|
||||
target_link_libraries(${PROJECT_NAME}${VERSION_MAJOR}server ${GETTEXT_LIBRARY})
|
||||
endif()
|
||||
if (USE_CURSES)
|
||||
target_link_libraries(${PROJECT_NAME}server ${CURSES_LIBRARIES})
|
||||
target_link_libraries(${PROJECT_NAME}${VERSION_MAJOR}server ${CURSES_LIBRARIES})
|
||||
endif()
|
||||
if (USE_POSTGRESQL)
|
||||
target_link_libraries(${PROJECT_NAME}server ${PostgreSQL_LIBRARIES})
|
||||
target_link_libraries(${PROJECT_NAME}${VERSION_MAJOR}server ${PostgreSQL_LIBRARIES})
|
||||
endif()
|
||||
if (USE_LEVELDB)
|
||||
target_link_libraries(${PROJECT_NAME}server ${LEVELDB_LIBRARY})
|
||||
target_link_libraries(${PROJECT_NAME}${VERSION_MAJOR}server ${LEVELDB_LIBRARY})
|
||||
endif()
|
||||
if (USE_REDIS)
|
||||
target_link_libraries(${PROJECT_NAME}server ${REDIS_LIBRARY})
|
||||
target_link_libraries(${PROJECT_NAME}${VERSION_MAJOR}server ${REDIS_LIBRARY})
|
||||
endif()
|
||||
if (USE_SPATIAL)
|
||||
target_link_libraries(${PROJECT_NAME}server ${SPATIAL_LIBRARY})
|
||||
target_link_libraries(${PROJECT_NAME}${VERSION_MAJOR}server ${SPATIAL_LIBRARY})
|
||||
endif()
|
||||
if(USE_CURL)
|
||||
target_link_libraries(
|
||||
${PROJECT_NAME}server
|
||||
${CURL_LIBRARY}
|
||||
)
|
||||
target_link_libraries(${PROJECT_NAME}${VERSION_MAJOR}server ${CURL_LIBRARY})
|
||||
endif()
|
||||
endif(BUILD_SERVER)
|
||||
|
||||
@ -794,7 +791,7 @@ if(WIN32)
|
||||
endif()
|
||||
|
||||
if(BUILD_CLIENT)
|
||||
install(TARGETS ${PROJECT_NAME}
|
||||
install(TARGETS ${PROJECT_NAME}${VERSION_MAJOR}
|
||||
RUNTIME DESTINATION ${BINDIR}
|
||||
LIBRARY DESTINATION ${BINDIR}
|
||||
ARCHIVE DESTINATION ${BINDIR}
|
||||
@ -812,7 +809,7 @@ if(BUILD_CLIENT)
|
||||
if(USE_GETTEXT)
|
||||
foreach(LOCALE ${GETTEXT_USED_LOCALES})
|
||||
set_mo_paths(MO_BUILD_PATH MO_DEST_PATH ${LOCALE})
|
||||
set(MO_BUILD_PATH "${MO_BUILD_PATH}/${PROJECT_NAME}.mo")
|
||||
set(MO_BUILD_PATH "${MO_BUILD_PATH}/${PROJECT_NAME}${VERSION_MAJOR}.mo")
|
||||
install(FILES ${MO_BUILD_PATH} DESTINATION ${MO_DEST_PATH})
|
||||
endforeach()
|
||||
endif()
|
||||
@ -843,7 +840,7 @@ if(BUILD_CLIENT)
|
||||
endif(BUILD_CLIENT)
|
||||
|
||||
if(BUILD_SERVER)
|
||||
install(TARGETS ${PROJECT_NAME}server DESTINATION ${BINDIR})
|
||||
install(TARGETS ${PROJECT_NAME}${VERSION_MAJOR}server DESTINATION ${BINDIR})
|
||||
endif()
|
||||
|
||||
if (USE_GETTEXT)
|
||||
@ -852,7 +849,7 @@ if (USE_GETTEXT)
|
||||
foreach(LOCALE ${GETTEXT_USED_LOCALES})
|
||||
set(PO_FILE_PATH "${GETTEXT_PO_PATH}/${LOCALE}/${PROJECT_NAME}.po")
|
||||
set_mo_paths(MO_BUILD_PATH MO_DEST_PATH ${LOCALE})
|
||||
set(MO_FILE_PATH "${MO_BUILD_PATH}/${PROJECT_NAME}.mo")
|
||||
set(MO_FILE_PATH "${MO_BUILD_PATH}/${PROJECT_NAME}${VERSION_MAJOR}.mo")
|
||||
|
||||
add_custom_command(OUTPUT ${MO_BUILD_PATH}
|
||||
COMMAND ${CMAKE_COMMAND} -E make_directory ${MO_BUILD_PATH}
|
||||
|
@ -104,7 +104,7 @@ bool ClientLauncher::run(GameParams &game_params, const Settings &cmd_args)
|
||||
return false;
|
||||
}
|
||||
|
||||
RenderingEngine::get_instance()->setupTopLevelWindow(PROJECT_NAME_C);
|
||||
RenderingEngine::get_instance()->setupTopLevelWindow(PROJECT_NAME + std::to_string(VERSION_MAJOR));
|
||||
|
||||
/*
|
||||
This changes the minimum allowed number of vertices in a VBO.
|
||||
@ -198,7 +198,8 @@ bool ClientLauncher::run(GameParams &game_params, const Settings &cmd_args)
|
||||
// Set the window caption
|
||||
const wchar_t *text = wgettext("Main Menu");
|
||||
RenderingEngine::get_raw_device()->
|
||||
setWindowCaption((utf8_to_wide(PROJECT_NAME_C) +
|
||||
setWindowCaption((utf8_to_wide(PROJECT_NAME) +
|
||||
L"" + std::to_string(VERSION_MAJOR) +
|
||||
L" " + utf8_to_wide(g_version_hash) +
|
||||
L" [" + text + L"]").c_str());
|
||||
delete[] text;
|
||||
|
@ -1386,8 +1386,9 @@ bool Game::createClient(const std::string &playername,
|
||||
|
||||
/* Set window caption
|
||||
*/
|
||||
std::wstring str = utf8_to_wide(PROJECT_NAME_C);
|
||||
str += L" ";
|
||||
std::wstring str = utf8_to_wide(PROJECT_NAME);
|
||||
str += std::to_string(VERSION_MAJOR);
|
||||
str += L" VenenuX ";
|
||||
str += utf8_to_wide(g_version_hash);
|
||||
str += L" [";
|
||||
str += driver->getName();
|
||||
@ -4157,7 +4158,7 @@ void Game::showPauseMenu()
|
||||
os << "button_exit[4," << (ypos++) << ";3,0.5;btn_exit_os;"
|
||||
<< strgettext("Exit to OS") << "]"
|
||||
<< "textarea[7.5,0.25;3.9,6.25;;" << control_text << ";]"
|
||||
<< "textarea[0.4,0.25;3.9,6.25;;" << PROJECT_NAME_C " " VERSION_STRING "\n"
|
||||
<< "textarea[0.4,0.25;3.9,6.25;;" << PROJECT_NAME << std::to_string(VERSION_MAJOR) << " " << VERSION_STRING << "\n"
|
||||
<< "\n"
|
||||
<< strgettext("Game info:") << "\n";
|
||||
const std::string &address = client->getAddressName();
|
||||
@ -4251,7 +4252,7 @@ void the_game(bool *kill,
|
||||
} catch (SerializationError &e) {
|
||||
error_message = std::string("A serialization error occurred:\n")
|
||||
+ e.what() + "\n\nThe server is probably "
|
||||
" running a different version of " PROJECT_NAME_C ".";
|
||||
" running a different version of " + PROJECT_NAME + std::to_string(VERSION_MAJOR) + ".";
|
||||
errorstream << error_message << std::endl;
|
||||
} catch (ServerError &e) {
|
||||
error_message = e.what();
|
||||
|
@ -54,7 +54,7 @@ GameUI::GameUI()
|
||||
void GameUI::init()
|
||||
{
|
||||
// First line of debug text
|
||||
m_guitext = gui::StaticText::add(guienv, utf8_to_wide(PROJECT_NAME_C).c_str(),
|
||||
m_guitext = gui::StaticText::add(guienv, utf8_to_wide(PROJECT_NAME).c_str(),
|
||||
core::rect<s32>(0, 0, 0, 0), false, false, guiroot);
|
||||
|
||||
// Second line of debug text
|
||||
@ -98,7 +98,7 @@ void GameUI::update(const RunStats &stats, Client *client, MapDrawControl *draw_
|
||||
|
||||
std::ostringstream os(std::ios_base::binary);
|
||||
os << std::fixed
|
||||
<< PROJECT_NAME_C " " << g_version_hash
|
||||
<< PROJECT_NAME << std::to_string(VERSION_MAJOR) << " " << g_version_hash
|
||||
<< " | FPS: " << fps
|
||||
<< std::setprecision(0)
|
||||
<< " | drawtime: " << drawtime_avg << "ms"
|
||||
|
@ -340,15 +340,14 @@ bool RenderingEngine::setWindowIcon()
|
||||
#if defined(XORG_USED)
|
||||
#if RUN_IN_PLACE
|
||||
return setXorgWindowIconFromPath(
|
||||
porting::path_share + "/misc/" PROJECT_NAME "-xorg-icon-128.png");
|
||||
porting::path_share + "/misc/" + PROJECT_NAME + std::to_string(VERSION_MAJOR) + "-xorg-icon-128.png");
|
||||
#else
|
||||
// We have semi-support for reading in-place data if we are
|
||||
// compiled with RUN_IN_PLACE. Don't break with this and
|
||||
// also try the path_share location.
|
||||
return setXorgWindowIconFromPath(
|
||||
ICON_DIR "/hicolor/128x128/apps/" PROJECT_NAME ".png") ||
|
||||
setXorgWindowIconFromPath(porting::path_share + "/misc/" PROJECT_NAME
|
||||
"-xorg-icon-128.png");
|
||||
ICON_DIR "/hicolor/128x128/apps/" PROJECT_NAME + std::to_string(VERSION_MAJOR) + ".png") ||
|
||||
setXorgWindowIconFromPath(porting::path_share + "/misc/" PROJECT_NAME + std::to_string(VERSION_MAJOR) + "-xorg-icon-128.png");
|
||||
#endif
|
||||
#elif defined(_WIN32)
|
||||
const video::SExposedVideoData exposedData = driver->getExposedVideoData();
|
||||
|
@ -13,7 +13,8 @@
|
||||
#include "cmake_config.h"
|
||||
#elif defined (__ANDROID__) || defined (ANDROID)
|
||||
#define PROJECT_NAME "minetest"
|
||||
#define PROJECT_NAME_C "Minetest"
|
||||
#define VERSION_MAJOR "5"
|
||||
#define PROJECT_NAME_C "Minetest5"
|
||||
#define STATIC_SHAREDIR ""
|
||||
#include "android_version.h"
|
||||
#ifdef NDEBUG
|
||||
@ -22,6 +23,7 @@
|
||||
#define BUILD_TYPE "Debug"
|
||||
#endif
|
||||
#else
|
||||
#include "cmake_config.h"
|
||||
#ifdef NDEBUG
|
||||
#define BUILD_TYPE "Release"
|
||||
#else
|
||||
|
@ -33,7 +33,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
|
||||
bool getGameMinetestConfig(const std::string &game_path, Settings &conf)
|
||||
{
|
||||
std::string conf_path = game_path + DIR_DELIM + "minetest.conf";
|
||||
std::string conf_path = game_path + DIR_DELIM + PROJECT_NAME + std::to_string(VERSION_MAJOR) + ".conf";
|
||||
return conf.readConfigFile(conf_path.c_str());
|
||||
}
|
||||
|
||||
@ -230,7 +230,7 @@ std::string getWorldGameId(const std::string &world_path, bool can_be_legacy)
|
||||
return "";
|
||||
// The "mesetint" gameid has been discarded
|
||||
if (conf.get("gameid") == "mesetint")
|
||||
return "minetest";
|
||||
return LEGACY_GAMEID;
|
||||
return conf.get("gameid");
|
||||
}
|
||||
|
||||
|
@ -136,9 +136,9 @@ long WINAPI Win32ExceptionHandler(struct _EXCEPTION_POINTERS *pExceptInfo)
|
||||
MINIDUMP_USER_STREAM mdus;
|
||||
bool minidump_created = false;
|
||||
|
||||
std::string dumpfile = porting::path_user + DIR_DELIM PROJECT_NAME ".dmp";
|
||||
std::string dumpfile = porting::path_user + DIR_DELIM PROJECT_NAME + std::to_string(VERSION_MAJOR) + ".dmp";
|
||||
|
||||
std::string version_str(PROJECT_NAME " ");
|
||||
std::string version_str(PROJECT_NAME + std::to_string(VERSION_MAJOR) + " ");
|
||||
version_str += g_version_hash;
|
||||
|
||||
HANDLE hFile = CreateFileA(dumpfile.c_str(), GENERIC_WRITE,
|
||||
|
@ -345,7 +345,7 @@ void set_default_settings(Settings *settings)
|
||||
settings->setDefault("max_simultaneous_block_sends_per_client", "40");
|
||||
settings->setDefault("time_send_interval", "5");
|
||||
|
||||
settings->setDefault("default_game", "minetest");
|
||||
settings->setDefault("default_game", lowercase(PROJECT_NAME) + std::to_string(VERSION_MAJOR));
|
||||
settings->setDefault("motd", "");
|
||||
settings->setDefault("max_users", "15");
|
||||
settings->setDefault("creative_mode", "false");
|
||||
|
@ -142,7 +142,7 @@ void init_gettext(const char *path, const std::string &configured_language,
|
||||
// Hack to force gettext to see the right environment
|
||||
if (current_language != configured_language) {
|
||||
errorstream << "MSVC localization workaround active. "
|
||||
"Restarting " PROJECT_NAME_C " in a new environment!" << std::endl;
|
||||
<< "Restarting " << PROJECT_NAME + std::to_string(VERSION_MAJOR) << " in a new environment!" << std::endl;
|
||||
|
||||
std::string parameters;
|
||||
|
||||
@ -217,7 +217,7 @@ void init_gettext(const char *path, const std::string &configured_language,
|
||||
#endif
|
||||
#endif
|
||||
|
||||
static std::string name = lowercase(PROJECT_NAME);
|
||||
static std::string name = lowercase(PROJECT_NAME + std::to_string(VERSION_MAJOR));
|
||||
bindtextdomain(name.c_str(), path);
|
||||
textdomain(name.c_str());
|
||||
|
||||
|
@ -133,7 +133,7 @@ void GUIKeyChangeMenu::regenerateGui(v2u32 screensize)
|
||||
core::rect<s32> rect(0, 0, 600 * s, 40 * s);
|
||||
rect += topleft + v2s32(25 * s, 3 * s);
|
||||
//gui::IGUIStaticText *t =
|
||||
const wchar_t *text = wgettext("Keybindings. (If this menu screws up, remove stuff from minetest.conf)");
|
||||
const wchar_t *text = wgettext("Keybindings. (If this menu screws up, remove stuff from minetest5.conf)");
|
||||
Environment->addStaticText(text,
|
||||
rect, false, true, this, -1);
|
||||
delete[] text;
|
||||
|
@ -44,7 +44,7 @@ PcgRandom g_callerid_randomness;
|
||||
HTTPFetchRequest::HTTPFetchRequest() :
|
||||
timeout(g_settings->getS32("curl_timeout")),
|
||||
connect_timeout(timeout),
|
||||
useragent(std::string(PROJECT_NAME_C "/") + g_version_hash + " (" + porting::get_sysinfo() + ")")
|
||||
useragent(std::string(PROJECT_NAME_C "-VenenuX/") + g_version_hash + " (" + porting::get_sysinfo() + ")")
|
||||
{
|
||||
}
|
||||
|
||||
|
14
src/main.cpp
14
src/main.cpp
@ -343,7 +343,7 @@ static void print_allowed_options(const OptionList &allowed_options)
|
||||
|
||||
static void print_version()
|
||||
{
|
||||
std::cout << PROJECT_NAME_C " " << g_version_hash
|
||||
std::cout << PROJECT_NAME_C " by VenenuX" << g_version_hash
|
||||
<< " (" << porting::getPlatformName() << ")" << std::endl;
|
||||
#ifndef SERVER
|
||||
std::cout << "Using Irrlicht " IRRLICHT_SDK_VERSION << std::endl;
|
||||
@ -498,7 +498,7 @@ static bool init_common(const Settings &cmd_args, int argc, char *argv[])
|
||||
|
||||
static void startup_message()
|
||||
{
|
||||
infostream << PROJECT_NAME << " " << _("with")
|
||||
infostream << PROJECT_NAME << std::to_string(VERSION_MAJOR) << " " << _("with")
|
||||
<< " SER_FMT_VER_HIGHEST_READ="
|
||||
<< (int)SER_FMT_VER_HIGHEST_READ << ", "
|
||||
<< g_build_info << std::endl;
|
||||
@ -519,16 +519,16 @@ static bool read_config_file(const Settings &cmd_args)
|
||||
g_settings_path = cmd_args.get("config");
|
||||
} else {
|
||||
std::vector<std::string> filenames;
|
||||
filenames.push_back(porting::path_user + DIR_DELIM + "minetest.conf");
|
||||
filenames.push_back(porting::path_user + DIR_DELIM + PROJECT_NAME + std::to_string(VERSION_MAJOR) + ".conf");
|
||||
// Legacy configuration file location
|
||||
filenames.push_back(porting::path_user +
|
||||
DIR_DELIM + ".." + DIR_DELIM + "minetest.conf");
|
||||
DIR_DELIM + ".." + DIR_DELIM + PROJECT_NAME + std::to_string(VERSION_MAJOR) + ".conf");
|
||||
|
||||
#if RUN_IN_PLACE
|
||||
// Try also from a lower level (to aid having the same configuration
|
||||
// for many RUN_IN_PLACE installs)
|
||||
filenames.push_back(porting::path_user +
|
||||
DIR_DELIM + ".." + DIR_DELIM + ".." + DIR_DELIM + "minetest.conf");
|
||||
DIR_DELIM + ".." + DIR_DELIM + ".." + DIR_DELIM + PROJECT_NAME + std::to_string(VERSION_MAJOR) + ".conf");
|
||||
#endif
|
||||
|
||||
for (const std::string &filename : filenames) {
|
||||
@ -778,7 +778,7 @@ static bool determine_subgame(GameParams *game_params)
|
||||
if (game_params->game_spec.isValid()) {
|
||||
gamespec = game_params->game_spec;
|
||||
infostream << "Using commanded gameid [" << gamespec.id << "]" << std::endl;
|
||||
} else { // Otherwise we will be using "minetest"
|
||||
} else { // Otherwise we will be using default_game from config
|
||||
gamespec = findSubgame(g_settings->get("default_game"));
|
||||
infostream << "Using default gameid [" << gamespec.id << "]" << std::endl;
|
||||
if (!gamespec.isValid()) {
|
||||
@ -869,7 +869,7 @@ static bool run_dedicated_server(const GameParams &game_params, const Settings &
|
||||
if (!name_ok) {
|
||||
if (admin_nick.empty()) {
|
||||
errorstream << "No name given for admin. "
|
||||
<< "Please check your minetest.conf that it "
|
||||
<< "Please check your "<< PROJECT_NAME << std::to_string(VERSION_MAJOR) << ".conf that it "
|
||||
<< "contains a 'name = ' to your main admin account."
|
||||
<< std::endl;
|
||||
} else {
|
||||
|
@ -390,11 +390,11 @@ bool setSystemPaths()
|
||||
path_share += DIR_DELIM "..";
|
||||
}
|
||||
|
||||
// Use "C:\Users\<user>\AppData\Roaming\<PROJECT_NAME_C>"
|
||||
// Use "C:\Users\<user>\AppData\Roaming\<PROJECT_NAME VERSION_MAJOR>"
|
||||
DWORD len = GetEnvironmentVariable("APPDATA", buf, sizeof(buf));
|
||||
FATAL_ERROR_IF(len == 0 || len > sizeof(buf), "Failed to get APPDATA");
|
||||
|
||||
path_user = std::string(buf) + DIR_DELIM + PROJECT_NAME_C;
|
||||
path_user = std::string(buf) + DIR_DELIM + PROJECT_NAME + std::to_string(VERSION_MAJOR) ;
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -426,7 +426,7 @@ bool setSystemPaths()
|
||||
trylist.push_back(static_sharedir);
|
||||
|
||||
trylist.push_back(bindir + DIR_DELIM ".." DIR_DELIM "share"
|
||||
DIR_DELIM + PROJECT_NAME);
|
||||
DIR_DELIM + lowercase(PROJECT_NAME) + std::to_string(VERSION_MAJOR));
|
||||
trylist.push_back(bindir + DIR_DELIM "..");
|
||||
|
||||
#ifdef __ANDROID__
|
||||
@ -455,7 +455,7 @@ bool setSystemPaths()
|
||||
|
||||
#ifndef __ANDROID__
|
||||
path_user = std::string(getHomeOrFail()) + DIR_DELIM "."
|
||||
+ PROJECT_NAME;
|
||||
+ PROJECT_NAME + std::to_string(VERSION_MAJOR);
|
||||
#endif
|
||||
|
||||
return true;
|
||||
@ -480,7 +480,7 @@ bool setSystemPaths()
|
||||
|
||||
path_user = std::string(getHomeOrFail())
|
||||
+ "/Library/Application Support/"
|
||||
+ PROJECT_NAME;
|
||||
+ PROJECT_NAME + std::to_string(VERSION_MAJOR);
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -491,7 +491,7 @@ bool setSystemPaths()
|
||||
{
|
||||
path_share = STATIC_SHAREDIR;
|
||||
path_user = std::string(getHomeOrFail()) + DIR_DELIM "."
|
||||
+ lowercase(PROJECT_NAME);
|
||||
+ lowercase(PROJECT_NAME) + std::to_string(VERSION_MAJOR);
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -573,15 +573,15 @@ void initializePaths()
|
||||
path_cache = path_user + DIR_DELIM + "cache";
|
||||
# else
|
||||
// Initialize path_cache
|
||||
// First try $XDG_CACHE_HOME/PROJECT_NAME
|
||||
// First try $XDG_CACHE_HOME/PROJECT_NAME+VERSION_MAJOR
|
||||
const char *cache_dir = getenv("XDG_CACHE_HOME");
|
||||
const char *home_dir = getenv("HOME");
|
||||
if (cache_dir) {
|
||||
path_cache = std::string(cache_dir) + DIR_DELIM + PROJECT_NAME;
|
||||
path_cache = std::string(cache_dir) + DIR_DELIM + lowercase(PROJECT_NAME) + std::to_string(VERSION_MAJOR);
|
||||
} else if (home_dir) {
|
||||
// Then try $HOME/.cache/PROJECT_NAME
|
||||
// Then try $HOME/.cache/PROJECT_NAME+VERSION_MAJOR
|
||||
path_cache = std::string(home_dir) + DIR_DELIM + ".cache"
|
||||
+ DIR_DELIM + PROJECT_NAME;
|
||||
+ DIR_DELIM + lowercase(PROJECT_NAME) + std::to_string(VERSION_MAJOR);
|
||||
} else {
|
||||
// If neither works, use $PATH_USER/cache
|
||||
path_cache = path_user + DIR_DELIM + "cache";
|
||||
|
@ -139,9 +139,9 @@ extern std::string path_share;
|
||||
|
||||
/*
|
||||
Directory for storing user data. Examples:
|
||||
Windows: "C:\Documents and Settings\user\Application Data\<PROJECT_NAME>"
|
||||
Linux: "~/.<PROJECT_NAME>"
|
||||
Mac: "~/Library/Application Support/<PROJECT_NAME>"
|
||||
Windows: "C:\Documents and Settings\user\Application Data\<PROJECT_NAME VERSION_MAJOR>"
|
||||
Linux: "~/.<PROJECT_NAME VERSION_MAJOR>"
|
||||
Mac: "~/Library/Application Support/<PROJECT_NAME VERSION_MAJOR>"
|
||||
*/
|
||||
extern std::string path_user;
|
||||
|
||||
|
@ -48,7 +48,7 @@ void android_main(android_app *app)
|
||||
|
||||
try {
|
||||
app_dummy();
|
||||
char *argv[] = {strdup(PROJECT_NAME), NULL};
|
||||
char *argv[] = {strdup(PROJECT_NAME + std::to_string(VERSION_MAJOR)), NULL}; // TODO
|
||||
main(ARRLEN(argv) - 1, argv);
|
||||
free(argv[0]);
|
||||
} catch (std::exception &e) {
|
||||
|
@ -480,7 +480,7 @@ bool ScriptApiSecurity::checkPath(lua_State *L, const char *path,
|
||||
cur_path = fs::RemoveLastPathComponent(cur_path, &component);
|
||||
if (component == "..") {
|
||||
// Parent components can't be allowed or we could allow something like
|
||||
// /home/user/minetest/worlds/foo/noexist/../../../../../../etc/passwd.
|
||||
// /home/user/minetest5/worlds/foo/noexist/../../../../../../etc/passwd.
|
||||
// If we have previous non-relative elements in the path we might be
|
||||
// able to remove them so that things like worlds/foo/noexist/../auth.txt
|
||||
// could be allowed, but those paths will be interpreted as nonexistent
|
||||
|
@ -432,7 +432,7 @@ int ModApiUtil::l_get_version(lua_State *L)
|
||||
lua_createtable(L, 0, 3);
|
||||
int table = lua_gettop(L);
|
||||
|
||||
lua_pushstring(L, PROJECT_NAME_C);
|
||||
lua_pushstring(L, PROJECT_NAME);
|
||||
lua_setfield(L, table, "project");
|
||||
|
||||
lua_pushstring(L, g_version_string);
|
||||
|
@ -389,8 +389,9 @@ void TerminalChatConsole::step(int ch)
|
||||
// draw title
|
||||
move(0, 0);
|
||||
clrtoeol();
|
||||
addstr(PROJECT_NAME_C);
|
||||
addstr(" ");
|
||||
addstr(PROJECT_NAME);
|
||||
addstr(std::to_string(VERSION_MAJOR));
|
||||
addstr(" VenenuX ");
|
||||
addstr(g_version_hash);
|
||||
|
||||
u32 minutes = m_time_of_day % 1000;
|
||||
|
Loading…
x
Reference in New Issue
Block a user