Introduction
Voici la méthode pour compiler et tester la dernière version de Luanti pour Debian. Je me suis basé sur les propositions du forum en anglais.
Voici un “oneliner” qui va permettre d’installer Luanti dans votre répertoire $HOME/luanti, sans l’installer dans le système, mais uniquement dans ce répertoire.
La commande ne se lancera pas si le répertoire luanti
existe déjà dans votre $home
.
Compilation (oneliner)
Pour exécution “in place”, c’est à dire que ce oneliner ne va pas installer Luanti, mais juste le compiler dans un répertoire à part pour le tester. Il n’y a donc pas besoin de désinstaller un éventuel Luanti ou Minetest existant.
Utilisation: copier / coller la ligne entière dans un terminal de votre Debian/Ubuntu/Mint, … et c’est tout. Avec PC récent et une bonne connexion ça prends 2 minutes. Un peu plus si le PC est plus lent.
export LUANTI_VERSION=5.12.0; sudo apt-get update && sudo apt-get install -y git 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 && git clone --branch ${LUANTI_VERSION} https://github.com/luanti-org/luanti.git $HOME/luanti && cd $HOME/luanti/games && git clone --depth=1 https://github.com/luanti-org/minetest_game.git && cd .. && cmake . -DRUN_IN_PLACE=1 && make -j$(nproc) && bin/luanti && echo -e "\n\n\e[1;33mYou can run Luanti again by \"cd\"ing into this directory and typing \"bin/luanti\" in a terminal. You can create a shortcut and place it in an applications menu.\nYou can install mods in \"mods/\" inside this directory, too.\e[0m"
Utilisation
La première fois, Luanti va s’exécuter automatiquement. Si vous voulez l’exécuter par la suite:
$HOME/luanti/bin/luanti
Vu qu’il s’agit d’une installation avec exécution “in-place”, vous n’êtes pas obligé de désinstaller la version actuelle de Luanti, et les packs comme les textures sont dans un répertoire séparé (sous `$HOME/luanti`)
One response to “Compilation du jeu Luanti sous Debian & Ubuntu”
CMake Error at irr/src/CMakeLists.txt:235 (find_package):
By not providing “FindSDL2.cmake” in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by “SDL2”, but
CMake did not find one.
Could not find a package configuration file provided by “SDL2” with any of
the following names:
SDL2Config.cmake
sdl2-config.cmake
Add the installation prefix of “SDL2” to CMAKE_PREFIX_PATH or set
“SDL2_DIR” to a directory containing one of the above files. If “SDL2”
provides a separate development package or SDK, be sure it has been
installed.
— Configuring incomplete, errors occurred!
See also “/home/user/luanti/CMakeFiles/CMakeOutput.log”.