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

Post Reply
User avatar
Calinou
Moderator
Posts: 3162
Joined: Mon Aug 01, 2011 14:26
GitHub: Calinou
IRC: Calinou
In-game: Calinou
Location: Troyes, France
Contact:

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

by Calinou » Post

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 and 17.04. You may need to swap libpng and libjpeg for more recent versions, which have different package names. Consider the Minetest Flatpak 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):

Code: Select all

sudo apt-get update && 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 && git clone --depth=1 https://github.com/minetest/minetest.git "$HOME/minetest" && cd "$HOME/minetest/games" && git clone --depth=1 https://github.com/minetest/minetest_game.git && cd .. && cmake . && 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):

Code: Select all

sudo apt-get update && 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 && git clone --depth=1 https://github.com/minetest/minetest.git "$HOME/minetest" && cd "$HOME/minetest/games" && git clone --depth=1 https://github.com/minetest/minetest_game.git && cd .. && cmake . -DRUN_IN_PLACE=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"
You can update your existing (portable or not) Minetest installation by typing this after opening a terminal, provided you haven't moved the directory:

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.
Last edited by Calinou on Sat Dec 28, 2013 21:27, edited 1 time in total.

User avatar
OmniStudent
Member
Posts: 261
Joined: Sat Nov 03, 2012 06:40

by OmniStudent » Post

VERY NICE!!!

User avatar
kaeza
Moderator
Posts: 2162
Joined: Thu Oct 18, 2012 05:00
GitHub: kaeza
IRC: kaeza diemartin blaaaaargh
In-game: kaeza
Location: Montevideo, Uruguay
Contact:

by kaeza » Post

Cool thing. Gonna try it :)
Your signature is not the place for a blog post. Please keep it as concise as possible. Thank you!

Check out my stuff! | Donations greatly appreciated! PayPal

Ragnar
Member
Posts: 850
Joined: Thu Oct 25, 2012 15:19
Location: Estonia
Contact:

by Ragnar » Post

nice ;)
Are you saying that I put an abnormal brain into a seven and a half foot long, fifty-four inch wide GORILLA?

Ragnar
Member
Posts: 850
Joined: Thu Oct 25, 2012 15:19
Location: Estonia
Contact:

by Ragnar » Post

btw, will this take the latest version?
Are you saying that I put an abnormal brain into a seven and a half foot long, fifty-four inch wide GORILLA?

User avatar
PilzAdam
Member
Posts: 4026
Joined: Fri Jul 20, 2012 16:19
GitHub: PilzAdam
IRC: PilzAdam
Location: Germany

by PilzAdam » Post

2232 wrote:and how do you uninstall it??
Just remove the minetest folder.

User avatar
PilzAdam
Member
Posts: 4026
Joined: Fri Jul 20, 2012 16:19
GitHub: PilzAdam
IRC: PilzAdam
Location: Germany

by PilzAdam » Post

Ragnar wrote:btw, will this take the latest version?
Seems so.

User avatar
Topywo
Member
Posts: 1721
Joined: Fri May 18, 2012 20:27

by Topywo » Post

Yes, I just tried Calinous version out, it installs 0.4.4. It makes a 'minetest'-folder without serial numbers.

edit: typo
Last edited by Topywo on Thu Dec 27, 2012 21:36, edited 1 time in total.

User avatar
Calinou
Moderator
Posts: 3162
Joined: Mon Aug 01, 2011 14:26
GitHub: Calinou
IRC: Calinou
In-game: Calinou
Location: Troyes, France
Contact:

by Calinou » Post

Minor update about the "echo" command, which tells the user they can put mods in ~/.minetest/mods/minetest.

User avatar
rubenwardy
Moderator
Posts: 6106
Joined: Tue Jun 12, 2012 18:11
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy
Location: United Kingdom
Contact:

by rubenwardy » Post

you forgot -DRUN_IN_PLACE

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."

User avatar
Calinou
Moderator
Posts: 3162
Joined: Mon Aug 01, 2011 14:26
GitHub: Calinou
IRC: Calinou
In-game: Calinou
Location: Troyes, France
Contact:

by Calinou » Post

rubenwardy wrote:you forgot -DRUN_IN_PLACE

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.
Last edited by Calinou on Fri Jan 18, 2013 17:59, edited 1 time in total.

User avatar
pandaro
Member
Posts: 320
Joined: Sun Jan 08, 2012 21:34
GitHub: pandaro
Location: behind

by pandaro » Post

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!
sorry for bad english
Linux debian 7 wheezy 64
kde

User avatar
Calinou
Moderator
Posts: 3162
Joined: Mon Aug 01, 2011 14:26
GitHub: Calinou
IRC: Calinou
In-game: Calinou
Location: Troyes, France
Contact:

by Calinou » Post

Update: Freetype and gettext are now installed and used (for translations and a more complete character set).

User avatar
dsalt
Member
Posts: 12
Joined: Wed Feb 20, 2013 13:13

by dsalt » Post

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).

User avatar
xyz
Member
Posts: 450
Joined: Thu Nov 10, 2011 14:25

by xyz » Post

Minetest repos have moved to https://github.com/minetest

User avatar
Calinou
Moderator
Posts: 3162
Joined: Mon Aug 01, 2011 14:26
GitHub: Calinou
IRC: Calinou
In-game: Calinou
Location: Troyes, France
Contact:

by Calinou » Post

Edited.

User avatar
Casimir
Member
Posts: 1163
Joined: Fri Aug 03, 2012 16:59
GitHub: CasimirKaPazi

by Casimir » Post

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*

User avatar
Traxie21
Member
Posts: 753
Joined: Mon Dec 31, 2012 10:48
Location: McKinney, Texas U.S.A.
Contact:

by Traxie21 » Post

I assume you dont have common in the games folder.

User avatar
Calinou
Moderator
Posts: 3162
Joined: Mon Aug 01, 2011 14:26
GitHub: Calinou
IRC: Calinou
In-game: Calinou
Location: Troyes, France
Contact:

by Calinou » Post

Edited the script so that it downloads the "common" mods.

User avatar
doyousketch2
Member
Posts: 112
Joined: Tue Feb 05, 2013 16:06
GitHub: doyousketch2
In-game: Sketch2
Location: Ohio
Contact:

by doyousketch2 » Post

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.
Last edited by doyousketch2 on Sat Mar 30, 2013 06:55, edited 1 time in total.

ch98
Member
Posts: 463
Joined: Wed Jan 02, 2013 06:14

by ch98 » Post

can you do this for mac too? maybe both intel and ppc version.
I have stopped playing minetest, and may not come back to it again. I would like to thank everyone that made the amazing time I had playing it. This account is not in use anymore, and the email has been linked to a unused account. If any administrator reading this has time, feel free to delete my account. Thank you very much for the great experience.

User avatar
Calinou
Moderator
Posts: 3162
Joined: Mon Aug 01, 2011 14:26
GitHub: Calinou
IRC: Calinou
In-game: Calinou
Location: Troyes, France
Contact:

by Calinou » Post

ch98 wrote:can you do this for mac too? maybe both intel and ppc version.
Nope.

User avatar
keyxmakerx
Member
Posts: 104
Joined: Mon Apr 08, 2013 23:53

by keyxmakerx » Post

Would cmake work for every compiled program via linux? dis/ubuntu

User avatar
sfan5
Moderator
Posts: 3892
Joined: Wed Aug 24, 2011 09:44
GitHub: sfan5
IRC: sfan5
Location: Germany

by sfan5 » Post

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
Mods: Mesecons | WorldEdit | Nuke & Minetest builds for Windows (32-bit & 64-bit)

User avatar
Neon
Member
Posts: 126
Joined: Thu Aug 15, 2013 02:03
In-game: Neon

by Neon » Post

This works for Fedora distros: viewtopic.php?id=5211

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest