minetest / minetest

Minetest is an open source voxel game-creation platform with easy modding and game creation
https://www.minetest.net/
Other
10.59k stars 1.99k forks source link

Minetest build from `stable-5` branch requires `irrlichtmt` version that differs from the `stable-5` version of the build documentation #14700

Open AustrianLinuxMemer opened 3 months ago

AustrianLinuxMemer commented 3 months ago

Minetest version

Attempted Minetest build from `stable-5` branch

Irrlicht device

X11

Operating system and version

Linux Mint 21.3

CPU model

AMD Ryzen 7 4800H

GPU model

NVIDIA GeForce GTX 1660 Ti Mobile

Active renderer

No response

Summary

I noticed that the documentation for building Minetest mentions to clone from https://github.com/minetest/irrlicht.git that contains IrrlichtMt 1.9.0.15 but the CMakeLists.txt requires IrrlichtMt 1.9.0mt13 to build. How do i resolve this conflict?

Steps to reproduce

  1. Follow the documentation except to clone from master-5 instead of the default branch of the repository
  2. Attempt to build it
rubenwardy commented 3 months ago

You should switch the irrlicht branch to 1.9.0mt13. The release notes of both 5.8.1 and 5.8.0 say to use 1.9.0mt13

https://github.com/minetest/minetest/releases/tag/5.8.0 https://github.com/minetest/minetest/releases/tag/5.8.1-android

Note that this problem is going away in 5.9.0 as the irrlicht repo is no longer used

AustrianLinuxMemer commented 3 months ago

@rubenwardy The documentation tells users to get version 1.9.0.15 of irrlichtMt via cloning the Github repository of irrlichtMt. I believe that there should be a note about how to obtain older versions of irrlichtMt

AustrianLinuxMemer commented 3 months ago

I made a script that builds Minetest from stable-5 automagically

# Installs all dependencies of the build
sudo apt-get install g++ make libc6-dev cmake libpng-dev libjpeg-dev libgl1-mesa-dev libsqlite3-dev libogg-dev libvorbis-dev libopenal-dev libcurl4-gnutls-dev libfreetype6-dev zlib1g-dev libgmp-dev libjsoncpp-dev libzstd-dev libluajit-5.1-dev gettext libsdl2-dev
# Gets the stable-5 branch of the Minetest project
git clone --depth 1 -b stable-5 https://github.com/minetest/minetest.git
# Installs the correct version of IrrlichtMt for stable-5
cd minetest/lib
wget https://github.com/minetest/irrlicht/archive/refs/tags/1.9.0mt13.zip && unzip 1.9.0mt13.zip && mv irrlicht-1.9.0mt13 irrlichtmt && rm 1.9.0mt13.zip
cd ..
# CMake & Make
cmake . -DRUN_IN_PLACE=FALSE -DCMAKE_BUILD_TYPE=Release
make -j$(nproc)
# Cleanup
rm -rf android .clang-format .clang-tidy clientmods cmake CMakeCache.txt CMakeFiles cmake_install.cmake CMakeLists.txt CNAME CPackConfig.cmake CPackSourceConfig.cmake doc Dockerfile .dockerignore .editorconfig games .git .gitattributes .github .gitignore .gitlab-ci.yml .luacheckrc .mailmap Makefile minetest.conf.example mods README.md src worlds misc util

This script first installs all the dependencies, then downloads Minetest from stable-5 branch, downloads the correct IrrlichtMt, builds Minetest and cleans up all files that are no longer needed from the game, leaving behind a portable Minetest build for the architecture of the computer the script was made for