QuiteCuriousKoala
Posts: 28
Joined: Wed Oct 07, 2020 3:59 pm

TUTORIAL: How to set up Minetest 5.4.0 (or latest) on Raspberry Pi 4

Fri Nov 06, 2020 8:54 pm

If you type in

Code: Select all

sudo apt-get install minetest
then you will have Minetest, but not the latest update! It is only Minetest 4.17.1, which is kinda old!

This is a tutorial on how to install the latest update of Minetest on your Pi!

First we need to update things a little...

Code: Select all

sudo apt-get update
Then we need to install the required software onto the Pi...

Code: Select all

sudo apt install g++ make libc6-dev 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
Once that has been installed you can set up the actual game. NOTE: You will need to have git installed!

Code: Select all

git clone --depth 1 https://github.com/minetest/minetest.git
Now that the source code has been installed you need to build it. First cd into the directory like so:

Code: Select all

cd minetest
And now that you are in the directory type in this command:

Code: Select all

cmake . -DRUN_IN_PLACE=TRUE
And now you just need to run one more command:

Code: Select all

make -j$(nproc)
NOTE: This may take a little while so be patient.

Great! Now that that is done you can just run /home/pi/minetest/bin/minetest and you will find yourself staring at the Minetest start screen!

To add it to your menu, go to Preferences and then click Main Menu Editor and then add "Minetest" to your games menu. Set the command to what you ran when you started Minetest earlier.

Minetest Game is what you generally think of when you think of Minetest, so you should install that too. Go to https://github.com/minetest/minetest_game and save as a .zip file.
Now go to your downloads and copy it on over to /home/pi/minetest/games and unzip the file there.

It is recommended that you have a Raspberry Pi with 4GB or 8GB of RAM, and here is why...
2020-11-05-100202_1920x1080_scrot.png
2020-11-05-100202_1920x1080_scrot.png (83.87 KiB) Viewed 2552 times
Above is Minetest on a Raspberry Pi with 1GB RAM and below is one with 4GB.
2020-11-05-091917_1920x1080_scrot.png
2020-11-05-091917_1920x1080_scrot.png (84.98 KiB) Viewed 2552 times
As you can see more RAM is better for Minetest!

And lastly I will note that it works better in windowed mode, and if it is speed you are after, TURN OFF THOSE SHADERS!!! They make the game look better but they make things go really slow!

I hope this tutorial was useful!
Raspberry Pi is green, Arduino is blue, people can be any color but the color doesn't change what you can't do.
ALL. LIVES. MATTER.

chuckseins
Posts: 2
Joined: Thu Mar 11, 2021 8:03 pm

Re: TUTORIAL: How to set up Minetest 5.4.0 (or latest) on Raspberry Pi 4

Thu Mar 11, 2021 8:08 pm

Did anybody do this tutorial in the past? There will an error occure because of irrlicht. Can you fix this tutorial and post a solution that works with actual minetest 5.4.0 buidling from source. thx :oops:

chuckseins
Posts: 2
Joined: Thu Mar 11, 2021 8:03 pm

Re: TUTORIAL: How to set up Minetest 5.4.0 (or latest) on Raspberry Pi 4

Thu Mar 11, 2021 10:01 pm

solved it by building the minetest/irrlicht engine as shared library and added the include und lib path to cmake command line

:roll:

User avatar
MissingDependency
Posts: 11
Joined: Tue Mar 16, 2021 12:45 pm

Re: TUTORIAL: How to set up Minetest 5.4.0 (or latest) on Raspberry Pi 4

Tue Mar 16, 2021 1:28 pm

After using,

Code: Select all

cmake . -DRUN_IN_PLACE=TRUE

I too get stuck at the following,

Code: Select all

-- *** Will build version 5.5.0-dev ***
-- Found Irrlicht: /usr/lib/arm-linux-gnueabihf/libIrrlicht.so  
-- Looking for IRRLICHT_VERSION_MT
-- Looking for IRRLICHT_VERSION_MT - not found
CMake Error at CMakeLists.txt:78 (message):
  Irrlicht found, but it is not Minetest's Irrlicht fork.  The Minetest team
  has forked Irrlicht to make their own customizations.  It can be found
  here: https://github.com/minetest/irrlicht

  Building the client with upstream Irrlicht is no longer possible.


-- Configuring incomplete, errors occurred!

I tried the method chuckseins mentions, but I'm not really getting anywhere except deeper into the rabbit hole.
Raspberry Pi 4B 4GB
Raspbian GNU/Linux 10 (buster) 32-bit

Pythonic456
Posts: 6
Joined: Mon Apr 20, 2020 2:54 pm

Re: TUTORIAL: How to set up Minetest 5.4.0 (or latest) on Raspberry Pi 4

Wed Mar 24, 2021 11:20 am

chuckseins wrote:
Thu Mar 11, 2021 10:01 pm
solved it by building the minetest/irrlicht engine as shared library and added the include und lib path to cmake command line

:roll:
How did you do this? What commands did you use? Thanks in advance :)

morg4n
Posts: 1
Joined: Sun Apr 11, 2021 1:21 pm

Re: TUTORIAL: How to set up Minetest 5.4.0 (or latest) on Raspberry Pi 4

Sun Apr 11, 2021 1:37 pm

Pythonic456 wrote:
Wed Mar 24, 2021 11:20 am
chuckseins wrote:
Thu Mar 11, 2021 10:01 pm
solved it by building the minetest/irrlicht engine as shared library and added the include und lib path to cmake command line

:roll:
How did you do this? What commands did you use? Thanks in advance :)
Hi

Download and build irrlicht fork by Minetest developers as in https://github.com/minetest/irrlicht but using:

Code: Select all

cmake . -DBUILD_SHARED_LIBS=ON

Then, if you have minetest and irrlicht directory at the same level (e.g. in your home as me) from inside the minetest dir use the following command:

Code: Select all

cmake . -DRUN_IN_PLACE=TRUE -DIRRLICHT_LIBRARY=../irrlicht/lib/Linux/libIrrlichtMt.so -DIRRLICHT_INCLUDE_DIR=../irrlicht/include/

This is working in my Debian Buster but i think it should work in Raspbian too :D

User avatar
MissingDependency
Posts: 11
Joined: Tue Mar 16, 2021 12:45 pm

Re: TUTORIAL: How to set up Minetest 5.4.0 (or latest) on Raspberry Pi 4

Sun Apr 11, 2021 9:54 pm

I now see where I had problems. Thanks, morg4n! It works for me now in Raspbian. I BASHed, the entire installation, down into one terminal command. I hope this helps others,

Code: Select all

( echo ZZZZ Updating Apt-Get Repository List ; sudo apt-get update ; echo ZZZZ Installing Dependencies ; sudo apt -y install g++ make libc6-dev 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 ZZZZ Cloning Minetest Source ; git clone --depth 1 https://github.com/minetest/minetest.git ; echo ZZZZ Cloning Source of Minetests Fork of Irrlicht ; git clone https://github.com/minetest/irrlicht ; echo ZZZZ Entering Irrlicht Source dir ; cd irrlicht ; echo ZZZZ Generating Minetests Fork of Irrlicht Build Files ; cmake . -DBUILD_SHARED_LIBS=ON ; echo ZZZZ Compiling Minetests Fork of Irrlicht ; make -j$(nproc) ; echo ZZZZ Navigating to Parent Dir ; cd .. ; echo ZZZZ Navigating to Minetest Source Dir ; cd minetest ; echo ZZZZ Generating Minetest Build Files ; cmake . -DRUN_IN_PLACE=TRUE -DIRRLICHT_LIBRARY=../irrlicht/lib/Linux/libIrrlichtMt.so -DIRRLICHT_INCLUDE_DIR=../irrlicht/include/ ; echo ZZZZ Compiling Minetest ; make -j$(nproc) ; echo ZZZZ Cleaning up apt installs ; sudo apt clean ; echo ZZZZ Cleaning up apt-get installs ; sudo apt-get clean ; echo ZZZZ Launching Minetest ; /home/pi/minetest/bin/minetest ) > Minetest_install_output.txt

Just replace “pi” near the end of the comamnd with whatever the /home profile path name is you are using. If sudo triggers requests for a password then you’ll need to enter it once at the beginning and once at the end (just for apt/apt-get.) Minetest should run when done. If not, check for errors in the output file “Minetest_install_output.txt” or navigate to, “/home/pi/minetest/bin” and double click on, “minetest” execute it or run this in the terminal,

Code: Select all

( /home/pi/minetest/bin/minetest )

You’ll also see lots of various compiler warnings pass by in the terminal shell. The process takes a while to perform(less than 20mins for my Rpi4b-4GB) so be patient. In the file manager, you can check the file size of the output file, “/home/pi/Minetest_install_output.txt” to see it growing as the process takes place. It should be a tad over 50 KiB in size when done. Once the Minetest window pops up, check the version number to ensure it is the latest (top of the Minetest window). It is, “5.5.0-dev-4d0fef8,” as of this post.

I used echo for notation of command usage in the outputfile. Search, “ZZZZ,” to quickly locate them. That may help if anyone has problems that need solved.
Raspberry Pi 4B 4GB
Raspbian GNU/Linux 10 (buster) 32-bit

aliyat
Posts: 1
Joined: Thu May 20, 2021 4:37 pm

Re: TUTORIAL: How to set up Minetest 5.4.0 (or latest) on Raspberry Pi 4

Thu May 20, 2021 4:43 pm

MissingDependency wrote:
Sun Apr 11, 2021 9:54 pm
I now see where I had problems. Thanks, morg4n! It works for me now in Raspbian. I BASHed, the entire installation, down into one terminal command. I hope this helps others,

Code: Select all

( echo ZZZZ Updating Apt-Get Repository List ; sudo apt-get update ; echo ZZZZ Installing Dependencies ; sudo apt -y install g++ make libc6-dev 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 ZZZZ Cloning Minetest Source ; git clone --depth 1 https://github.com/minetest/minetest.git ; echo ZZZZ Cloning Source of Minetests Fork of Irrlicht ; git clone https://github.com/minetest/irrlicht ; echo ZZZZ Entering Irrlicht Source dir ; cd irrlicht ; echo ZZZZ Generating Minetests Fork of Irrlicht Build Files ; cmake . -DBUILD_SHARED_LIBS=ON ; echo ZZZZ Compiling Minetests Fork of Irrlicht ; make -j$(nproc) ; echo ZZZZ Navigating to Parent Dir ; cd .. ; echo ZZZZ Navigating to Minetest Source Dir ; cd minetest ; echo ZZZZ Generating Minetest Build Files ; cmake . -DRUN_IN_PLACE=TRUE -DIRRLICHT_LIBRARY=../irrlicht/lib/Linux/libIrrlichtMt.so -DIRRLICHT_INCLUDE_DIR=../irrlicht/include/ ; echo ZZZZ Compiling Minetest ; make -j$(nproc) ; echo ZZZZ Cleaning up apt installs ; sudo apt clean ; echo ZZZZ Cleaning up apt-get installs ; sudo apt-get clean ; echo ZZZZ Launching Minetest ; /home/pi/minetest/bin/minetest ) > Minetest_install_output.txt

Just replace “pi” near the end of the comamnd with whatever the /home profile path name is you are using. If sudo triggers requests for a password then you’ll need to enter it once at the beginning and once at the end (just for apt/apt-get.) Minetest should run when done. If not, check for errors in the output file “Minetest_install_output.txt” or navigate to, “/home/pi/minetest/bin” and double click on, “minetest” execute it or run this in the terminal,

Code: Select all

( /home/pi/minetest/bin/minetest )
like this
You’ll also see lots of various compiler warnings pass by in the terminal shell. The process takes a while to perform(less than 20mins for my Rpi4b-4GB) so be patient. In the file manager, you can check the file size of the output file, “/home/pi/Minetest_install_output.txt” to see it growing as the process takes place. It should be a tad over 50 KiB in size when done. Once the Minetest window pops up, check the version number to ensure it is the latest (top of the Minetest window). It is, “5.5.0-dev-4d0fef8,” as of this post.

I used echo for notation of command usage in the outputfile. Search, “ZZZZ,” to quickly locate them. That may help if anyone has problems that need solved.
how about replacing the

Code: Select all

/home/pi/minetest/bin/minetest
with

Code: Select all

/home/$USER/minetest/bin/minetest
? in script

So like this

Code: Select all

( echo ZZZZ Updating Apt-Get Repository List ; sudo apt-get update ; echo ZZZZ Installing Dependencies ; sudo apt -y install g++ make libc6-dev 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 ZZZZ Cloning Minetest Source ; git clone --depth 1 https://github.com/minetest/minetest.git ; echo ZZZZ Cloning Source of Minetests Fork of Irrlicht ; git clone https://github.com/minetest/irrlicht ; echo ZZZZ Entering Irrlicht Source dir ; cd irrlicht ; echo ZZZZ Generating Minetests Fork of Irrlicht Build Files ; cmake . -DBUILD_SHARED_LIBS=ON ; echo ZZZZ Compiling Minetests Fork of Irrlicht ; make -j$(nproc) ; echo ZZZZ Navigating to Parent Dir ; cd .. ; echo ZZZZ Navigating to Minetest Source Dir ; cd minetest ; echo ZZZZ Generating Minetest Build Files ; cmake . -DRUN_IN_PLACE=TRUE -DIRRLICHT_LIBRARY=../irrlicht/lib/Linux/libIrrlichtMt.so -DIRRLICHT_INCLUDE_DIR=../irrlicht/include/ ; echo ZZZZ Compiling Minetest ; make -j$(nproc) ; echo ZZZZ Cleaning up apt installs ; sudo apt clean ; echo ZZZZ Cleaning up apt-get installs ; sudo apt-get clean ; echo ZZZZ Launching Minetest ; /home/$USER/minetest/bin/minetest ) > Minetest_install_output.txt
in this way it will auto detect current user name, so just copy and paste in terminal

User avatar
MissingDependency
Posts: 11
Joined: Tue Mar 16, 2021 12:45 pm

Re: TUTORIAL: How to set up Minetest 5.4.0 (or latest) on Raspberry Pi 4

Thu May 27, 2021 5:01 pm

aliyat wrote:$USER
lol Thanks! I would have done similar on a Windows system, but forgot it should be a thing on any GNU/Linux system too.
Raspberry Pi 4B 4GB
Raspbian GNU/Linux 10 (buster) 32-bit

Return to “Gaming”