Page 1 of 5

[Debian / Ubuntu] 1-line script: install Minetest Git

PostPosted: Fri Nov 23, 2012 10:14
by Calinou
This is an 1-line script that downloads and compiles Minetest and minetest_game.

Just paste this in a terminal, type your password when it's required – this assumes you use sudo to use administrator commands (which is the default in Ubuntu/Mint), the password is required only once:

If you don't know which one to use, use the non-portable one: the portable one is meant to be put on an USB drive or similar to play on several PCs with only one installation.

NOTE: This script may not work immediately on Ubuntu 16.10. You may need to swap libpng and libjpeg for more recent versions, which have different package names. Consider the Minetest AppImage as a simpler way to run latest Minetest versions, that doesn't require root rights as well.

For non-portable installs (puts user data in ~/.minetest):
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
sudo apt-get install -y git build-essential libirrlicht-dev libgettextpo0 libfreetype6-dev cmake libbz2-dev libpng12-dev libjpeg8-dev libxxf86vm-dev libgl1-mesa-dev libsqlite3-dev libogg-dev libvorbis-dev libopenal-dev libcurl4-openssl-dev libluajit-5.1-dev liblua5.1-0-dev libleveldb-dev; cd; git clone https://github.com/minetest/minetest.git; cd minetest/games; git clone https://github.com/minetest/minetest_game.git; cd ..; cmake . -DENABLE_GETTEXT=1 -DENABLE_FREETYPE=1 -DENABLE_LEVELDB=1; make -j$(nproc); sudo make install; minetest; echo -e "\n\n\e[1;33mYou can run Minetest again by typing \"minetest\" in a terminal or selecting it in an applications menu.\nYou can install mods in ~/.minetest/mods, too.\e[0m"


For "portable" installs (puts user data in program data directory):
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
sudo apt-get install -y git build-essential libirrlicht-dev libgettextpo0 libfreetype6-dev cmake libbz2-dev libpng12-dev libjpeg8-dev libxxf86vm-dev libgl1-mesa-dev libsqlite3-dev libogg-dev libvorbis-dev libopenal-dev libcurl4-openssl-dev libluajit-5.1-dev liblua5.1-0-dev libleveldb-dev; cd; git clone https://github.com/minetest/minetest.git; cd minetest/games; git clone https://github.com/minetest/minetest_game.git; cd ..; cmake . -DRUN_IN_PLACE=1 -DENABLE_GETTEXT=1 -DENABLE_FREETYPE=1 -DENABLE_LEVELDB=1; make -j$(nproc); cd ../bin; ./minetest; echo -e "\n\n\e[1;33mYou can run Minetest again by double-clicking \"minetest\" in the \"bin\" folder of the \"minetest\" folder in your home folder.\nYou can install mods in ~/minetest/mods, too.\e[0m"


You can update your existing (portable or not) Minetest installation by typing this after opening a terminal, provided you haven't moved the directory:
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
cd minetest; git pull; make -j$(nproc)


This automatically runs Minetest when done and tells you the Minetest binary can be found in ~/minetest/bin.

PostPosted: Fri Nov 23, 2012 10:22
by OmniStudent
VERY NICE!!!

PostPosted: Fri Nov 23, 2012 20:19
by kaeza
Cool thing. Gonna try it :)

PostPosted: Thu Dec 27, 2012 21:26
by Ragnar
nice ;)

PostPosted: Thu Dec 27, 2012 21:28
by Ragnar
btw, will this take the latest version?

PostPosted: Thu Dec 27, 2012 21:30
by PilzAdam
2232 wrote:and how do you uninstall it??

Just remove the minetest folder.

PostPosted: Thu Dec 27, 2012 21:30
by PilzAdam
Ragnar wrote:btw, will this take the latest version?

Seems so.

PostPosted: Thu Dec 27, 2012 21:33
by Topywo
Yes, I just tried Calinous version out, it installs 0.4.4. It makes a 'minetest'-folder without serial numbers.

edit: typo

PostPosted: Wed Jan 02, 2013 17:20
by Calinou
Minor update about the "echo" command, which tells the user they can put mods in ~/.minetest/mods/minetest.

PostPosted: Wed Jan 02, 2013 17:41
by rubenwardy
you forgot -DRUN_IN_PLACE

Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
sudo apt-get install git-core build-essential libirrlicht-dev cmake libbz2-dev libpng12-dev libjpeg8-dev libxxf86vm-dev libgl1-mesa-dev libsqlite3-dev libogg-dev libvorbis-dev libopenal-dev;git clone git://github.com/celeron55/minetest.git;cd minetest/games;git clone git://github.com/celeron55/minetest_game.git;cd ..;cmake . -DRUN_IN_PLACE=1;cd src;make -j2;cd ../bin;./minetest;echo -e "\n\nYou can run Minetest again by double-clicking "minetest" in the "bin" folder of the "minetest" folder in your home folder.\nYou can install mods in ~/.minetest/mods/minetest, too."

PostPosted: Wed Jan 02, 2013 17:49
by Calinou
rubenwardy wrote:you forgot -DRUN_IN_PLACE

Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
sudo apt-get install git-core build-essential libirrlicht-dev cmake libbz2-dev libpng12-dev libjpeg8-dev libxxf86vm-dev libgl1-mesa-dev libsqlite3-dev libogg-dev libvorbis-dev libopenal-dev;git clone git://github.com/celeron55/minetest.git;cd minetest/games;git clone git://github.com/celeron55/minetest_game.git;cd ..;cmake . -DRUN_IN_PLACE=1;cd src;make -j2;cd ../bin;./minetest;echo -e "\n\nYou can run Minetest again by double-clicking "minetest" in the "bin" folder of the "minetest" folder in your home folder.\nYou can install mods in ~/.minetest/mods/minetest, too."


This is intended: this one-line script is not intended for "portable" installs. The user data goes to ~/.minetest, which means the whole minetest folder is cleaner.

PostPosted: Wed Jan 02, 2013 18:50
by pandaro
Beautiful
Yesterday I switched to debian wheezy, just to try.
But it was hard to install minetest through the package "deb" for ubuntu (missing dependencies, etc.).
Instead it seems to me that this script is perfect for debian, I would suggest you add it to the download page! so also those who use debian can be installed easily!

PostPosted: Tue Feb 26, 2013 19:11
by Calinou
Update: Freetype and gettext are now installed and used (for translations and a more complete character set).

PostPosted: Tue Feb 26, 2013 23:02
by dsalt
I've found it easier to use local git repositories with branches for packaging purposes. When I want to do a build, I merge the branches which I want (not necessarily committing the result) and then “debuild binary”. dpkg takes care of the rest.

As for missing dependencies, install using apt-get or aptitude or something similar (and, optionally, mark them as automatically installed).

PostPosted: Wed Feb 27, 2013 12:01
by xyz
Minetest repos have moved to https://github.com/minetest

PostPosted: Wed Feb 27, 2013 12:08
by Calinou
Edited.

PostPosted: Sat Mar 23, 2013 13:56
by Casimir
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
Irrlicht Engine version 1.7.3
Linux 3.5.0-17-generic #28-Ubuntu SMP Tue Oct 9 19:31:23 UTC 2012 x86_64
Using renderer: OpenGL 2.1.2
GeForce 7025 / nForce 630a/integrated/SSE2: NVIDIA Corporation
OpenGL driver version is 1.2 or better.
GLSL version: 1.2
Loaded texture: /home/casimir/minetest/textures/base/pack/menuheader.png
14:55:28: ERROR[main]: ModError: Required common mods "bucket", "default", "doors", "fire", "stairs" could not be found.

This makes me sad. *sad*

PostPosted: Sat Mar 23, 2013 15:12
by Traxie21
I assume you dont have common in the games folder.

PostPosted: Sat Mar 23, 2013 20:16
by Calinou
Edited the script so that it downloads the "common" mods.

PostPosted: Sat Mar 30, 2013 06:46
by doyousketch2
Using the latest Debian testing. Had to add libsm-dev to my apt-get line to get it to compile,
otherwise you get a libSM.so error.

You could also include libcurl4-openssl-dev in there if you so choose.

also git-core is considered an obsolete package, and they just call it git now.

PostPosted: Fri May 10, 2013 02:35
by ch98
can you do this for mac too? maybe both intel and ppc version.

PostPosted: Fri May 10, 2013 07:50
by Calinou
ch98 wrote:can you do this for mac too? maybe both intel and ppc version.


Nope.

PostPosted: Sat Jul 06, 2013 03:15
by keyxmakerx
Would cmake work for every compiled program via linux? dis/ubuntu

PostPosted: Sat Jul 06, 2013 06:05
by sfan5
keyxmakerx wrote:Would cmake work for every compiled program via linux? dis/ubuntu

No, cmake only works for programs that have a special CMake file

PostPosted: Fri Aug 23, 2013 04:35
by Neon

PostPosted: Tue Sep 17, 2013 12:17
by proller
add for nef features:
for ubuntu precise - libcurl-dev libluajit-5.1-dev libleveldb-dev
for ubuntu raring - libcurl4-openssl-dev libluajit-5.1-dev libleveldb-dev

PostPosted: Thu Sep 19, 2013 14:13
by leetelate
nice! thanks!

PostPosted: Fri Nov 01, 2013 02:35
by leetelate
my chain is:
git clone git://github.com/minetest/minetest.git
cd minetest
cd games
git clone git://github.com/minetest/minetest_game.git
git pull
cd ..
git pull
cmake . -DRUN_IN_PLACE=1
make -j2
cd bin
./minetest
#11 lines to happiness

PostPosted: Thu Feb 20, 2014 19:05
by thecole44
going to try it out.

PostPosted: Fri Feb 21, 2014 01:12
by grey
I am happy to say that this worked pefrectly in Elementary OS Linux as well! Fixing the problem of the repos always being terribly outdated.

Though I found that is did not work under Raspbian, it gave the following error:

Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
pi@groundbase ~/minetest-minetest-3da5669/bin $ ./minetest
Irrlicht Engine version 1.7.3
Linux 3.10.25+ #622 PREEMPT Fri Jan 3 18:41:00 GMT 2014 armv6l
No GLX support available. OpenGL driver will not work.
Fatal error, could not get visual.
Segmentation fault
pi@groundbase ~/minetest-minetest-3da5669/bin $





Normally the Raspberry Pi is more than capable of running 3D games, including Minecraft. Though I like Minetest a whole lot better than Minecraft. If anyone know's what I should do here, please tell me!