From 634e49b96138a9337a9b3104d3eb52e77954c6f4 Mon Sep 17 00:00:00 2001 From: Gary Miguel Date: Fri, 8 Dec 2023 12:11:54 -0800 Subject: [PATCH] Improve Irrlicht instructions (#14055) Specify the version when cloning. Move instructions from CMakeLists to docs/compiling/. --- CMakeLists.txt | 4 +--- doc/compiling/linux.md | 2 +- doc/compiling/macos.md | 4 ++-- doc/compiling/windows.md | 7 ++++++- 4 files changed, 10 insertions(+), 7 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 33f40688d..9e7582e9c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -114,9 +114,7 @@ else() find_package(IrrlichtMt QUIET) if(NOT TARGET IrrlichtMt::IrrlichtMt) string(CONCAT explanation_msg - "The Minetest team has forked Irrlicht to make their own customizations. " - "It can be found here: https://github.com/minetest/irrlicht\n" - "For example use: git clone --depth=1 https://github.com/minetest/irrlicht lib/irrlichtmt\n") + "You must install IrrlichMt as described in docs/compiling/\n") if(BUILD_CLIENT) message(FATAL_ERROR "IrrlichtMt is required to build the client, but it was not found.\n${explanation_msg}") endif() diff --git a/doc/compiling/linux.md b/doc/compiling/linux.md index 2d057ea2f..d2e30f74e 100644 --- a/doc/compiling/linux.md +++ b/doc/compiling/linux.md @@ -71,7 +71,7 @@ Download source (this is the URL to the latest of source repository, which might Download IrrlichtMt to `lib/irrlichtmt`, it will be used to satisfy the IrrlichtMt dependency that way: - git clone --depth 1 https://github.com/minetest/irrlicht.git lib/irrlichtmt + git clone --depth 1 --branch "$(cat misc/irrlichtmt_tag.txt)" https://github.com/minetest/irrlicht.git lib/irrlichtmt Download source, without using Git: diff --git a/doc/compiling/macos.md b/doc/compiling/macos.md index 5061223ab..460c8d99e 100644 --- a/doc/compiling/macos.md +++ b/doc/compiling/macos.md @@ -22,8 +22,8 @@ cd minetest Download Minetest's fork of Irrlicht: -``` -git clone --depth 1 https://github.com/minetest/irrlicht.git lib/irrlichtmt +```bash +git clone --depth 1 --branch "$(cat misc/irrlichtmt_tag.txt)" https://github.com/minetest/irrlicht.git lib/irrlichtmt ``` ## Build diff --git a/doc/compiling/windows.md b/doc/compiling/windows.md index a6fb8b580..38d6dac4f 100644 --- a/doc/compiling/windows.md +++ b/doc/compiling/windows.md @@ -17,7 +17,12 @@ After you successfully built vcpkg you can easily install the required libraries vcpkg install zlib zstd curl[winssl] openal-soft libvorbis libogg libjpeg-turbo sqlite3 freetype luajit gmp jsoncpp opengl-registry gettext --triplet x64-windows ``` -- **Don't forget about IrrlichtMt.** The easiest way is to clone it to `lib/irrlichtmt` as described in the Linux section. +- **Don't forget about IrrlichtMt.** The easiest way is to clone it to `lib/irrlichtmt`: + +```bat +for /F %i in (misc\irrlichtmt_tag.txt) do git clone --depth 1 --branch %i https://github.com/minetest/irrlicht.git lib\irrlichtmt +``` + - `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. - `luajit` is optional, it replaces the integrated Lua interpreter with a faster just-in-time interpreter.