Single file portable Minetest for Linux (needs testing)

Post Reply
User avatar
RAPHAEL
Member
Posts: 627
Joined: Tue Nov 01, 2011 09:09
Location: Earth

Single file portable Minetest for Linux (needs testing)

by RAPHAEL » Post

I'm tinkering with making a single file portable Minetest. I need people to test to ensure it works.

READ THIS ENTIRE POST FIRST

This 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
Last edited by RAPHAEL on Thu Feb 07, 2013 05:06, edited 1 time in total.
"Before you speak, ask yourself: Is it kind, is it true, is it necessary, does it improve upon the silence?"
My mods: http://goo.gl/n4kpn
(Currently Various, Industrial, Fakeblocks, Jail, MoarCraft, Christmas, Replicator, minetest dev installer for linux, bash mod installer, windows mod installer)

BZab
Member
Posts: 126
Joined: Mon Jan 28, 2013 10:04
Location: Poland

by BZab » Post

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

User avatar
veikk0
New member
Posts: 7
Joined: Tue Feb 05, 2013 16:35

by veikk0 » Post

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

Shaun
Member
Posts: 27
Joined: Thu Dec 06, 2012 23:24

by Shaun » Post

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

Shaun
Member
Posts: 27
Joined: Thu Dec 06, 2012 23:24

by Shaun » Post

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.

User avatar
VanessaE
Moderator
Posts: 4655
Joined: Sun Apr 01, 2012 12:38
GitHub: VanessaE
IRC: VanessaE
In-game: VanessaE
Location: Western NC
Contact:

by VanessaE » Post

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.
You might like some of my stuff: Plantlife ~ More Trees ~ Home Decor ~ Pipeworks ~ HDX Textures (64-512px)

User avatar
RAPHAEL
Member
Posts: 627
Joined: Tue Nov 01, 2011 09:09
Location: Earth

by RAPHAEL » Post

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
"Before you speak, ask yourself: Is it kind, is it true, is it necessary, does it improve upon the silence?"
My mods: http://goo.gl/n4kpn
(Currently Various, Industrial, Fakeblocks, Jail, MoarCraft, Christmas, Replicator, minetest dev installer for linux, bash mod installer, windows mod installer)

User avatar
RAPHAEL
Member
Posts: 627
Joined: Tue Nov 01, 2011 09:09
Location: Earth

by RAPHAEL » Post

Updated binary and launcher code. Link is same. (hopefully it works right this time)
"Before you speak, ask yourself: Is it kind, is it true, is it necessary, does it improve upon the silence?"
My mods: http://goo.gl/n4kpn
(Currently Various, Industrial, Fakeblocks, Jail, MoarCraft, Christmas, Replicator, minetest dev installer for linux, bash mod installer, windows mod installer)

User avatar
veikk0
New member
Posts: 7
Joined: Tue Feb 05, 2013 16:35

by veikk0 » Post

I still get this error:

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

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

by Traxie21 » Post

Do all the libraries needed for the normal install need to be installed?

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

by Traxie21 » Post

Is this still being worked on?

Error:

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

prestidigitator
Member
Posts: 647
Joined: Thu Feb 21, 2013 23:54

by prestidigitator » Post

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.

User avatar
RAPHAEL
Member
Posts: 627
Joined: Tue Nov 01, 2011 09:09
Location: Earth

by RAPHAEL » Post

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".
"Before you speak, ask yourself: Is it kind, is it true, is it necessary, does it improve upon the silence?"
My mods: http://goo.gl/n4kpn
(Currently Various, Industrial, Fakeblocks, Jail, MoarCraft, Christmas, Replicator, minetest dev installer for linux, bash mod installer, windows mod installer)

Post Reply

Who is online

Users browsing this forum: No registered users and 5 guests