Page 1 of 1
Single file portable Minetest for Linux (needs testing)

Posted:
Mon Feb 04, 2013 04:30
by RAPHAEL
I'm tinkering with making a single file portable Minetest. I need people to test to ensure it works.
READ THIS ENTIRE POST FIRSTThis is made for Ubuntu Precise/Linux Mint 13 but should (hopefully) work with NEWER versions. I need people to test on Ubuntu Precise/Linux Mint 13 or greater distros with and without NVIDIA graphics cards.
This is a vanilla dev version (minetestc55_201302030031).
To test:
* Download the Minetest:
https://www.dropbox.com/s/70679kg9zwhlvca/Minetest* Place it in a folder somewhere and make it executable
* Inside same folder create a new file called "launcher"
* Inside laucher file add the bash script that is in quotes below. Save and make executable
* Create a folder named "config"
* Launch it by doing: ./launcher Minetest
Launcher code:
#!/bin/bash
PWD= `pwd`
chmod u+x "$1"
mkdir -p "$PWD/config/$1"
export HOME="$PWD/config/$1"
./$1

Posted:
Mon Feb 04, 2013 10:43
by BZab
I use Ubuntu 10.04... (probably, not sure ;P) With Intel HD series...
If ya want, next week ill be able to check it for ya...

Posted:
Tue Feb 05, 2013 16:48
by veikk0
Tested this on Linux Mint 14 (Cinnamon Edition).
When trying to run from ~/Minetest_portable I get this:
./launcher: line 2: /home/veikk0/Minetest_portable: Is a directory
./Minetest: error while loading shared libraries: libfuse.so.2: cannot open shared object file: No such file or directory
Another try right after the first one:
./launcher: line 2: /home/veikk0/Minetest_portable: Is a directory
mkdir: cannot create directory `/home/veikk0/Minetest_portable/config/Minetest': File exists
./Minetest: error while loading shared libraries: libfuse.so.2: cannot open shared object file: No such file or directory

Posted:
Wed Feb 06, 2013 02:09
by Shaun
First attempt following above instructions on Ubuntu 12.10
shaun@shaun-Vostro-1000:~/Downloads$ ./launcher minetest
./launcher: line 3: /home/shaun/Downloads: Is a directory
mkdir: cannot create directory `/home/shaun/Downloads/config/minetest': No such file or directory
./launcher: line 7: ./minetest: No such file or directory

Posted:
Wed Feb 06, 2013 02:14
by Shaun
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
#!/bin/bash
PWD= `pwd`
mkdir -p "$PWD/config/$1"
export HOME="$PWD/config/$1"
./$1
I made a slight change.
You will also have to "chmod 777 launcher minetest" in order for them to become executable. Yes 777 is probably not the best.
In my experience, "mkdir" requires a "-p" to do more then one directory deep.
I will test on a few more linux and see what I get.

Posted:
Wed Feb 06, 2013 04:09
by VanessaE
Use 755, never 777. The latter allows anyone who gets onto the machine it is installed on to write to, modify, or delete the file. 755 just makes it so anyone can execute it, but only the machine's admin/owner/whatever can make changes to it.

Posted:
Thu Feb 07, 2013 03:53
by RAPHAEL
I will redo the singlefile minetest possibly tonight (within an hour or so). Seems I forgot a lib. I may also redo the launcher script... stay tuned

Posted:
Thu Feb 07, 2013 05:07
by RAPHAEL
Updated binary and launcher code. Link is same. (hopefully it works right this time)

Posted:
Sat Mar 02, 2013 15:42
by veikk0
I still get this 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
./launcher: line 2: /home/veikk0/Minetest_portable: Is a directory
./Minetest: error while loading shared libraries: libfuse.so.2: cannot open shared object file: No such file or directory

Posted:
Sat Mar 02, 2013 16:58
by Traxie21
Do all the libraries needed for the normal install need to be installed?

Posted:
Thu Mar 07, 2013 00:58
by Traxie21
Is this still being worked on?
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
./launcher.sh: line 3: *******/MT: Is a directory
./Minetest: error while loading shared libraries: libfuse.so.2: cannot open shared object file: No such file or directory

Posted:
Thu Mar 07, 2013 08:53
by prestidigitator
I don't understand. Why a separate launcher script? Why not have the one executable do all of it?
In fact, if you really wanted to you could make it a self-extracting bash script installer. This is really easy to do in bash, as you can search the script itself ($0) for a marker and pipe everything after that marker (IIRC this can all be done with "grep -m ...") to a common program like tar (more precisely something like "tar xzf -"). To make the self-extractor, you build your script, put the marker at the end, and then cat it and the .tgz file together into a single file. The installer script could also act like a launcher, by testing for the presence of an extracted file or directory and simply 'exec'ing the binary if it has already been extracted.

Posted:
Thu Mar 07, 2013 15:47
by RAPHAEL
Sorry about the delay in responses. I've been taking an unexpected "vacation" from minetest recently to work on some life things. This single file setup may still be worked on further but not at this moment. After life things are finished being dealt with I will be "officially back" from my "vacation".