Page 1 of 1

Bash Mod Installer with Repo support (linux)

PostPosted: Wed Jan 16, 2013 02:42
by RAPHAEL
EDIT: Forum automatically added extra question mark at end of poll question...

So I finally got around to making what I've been wanting to make since minetest got mods.. a bash script based mod installer/updater that can download mods from a repo.

NOTES: This ONLY works on Linux based operating systems. It has been tested and confirmed to work on Puppy Precise and Linux Mint 13. You MUST read the readme file and understand it. Also I'm not responsible for anything. The current test repo is also hosted within the github account.

To see a list of available mods to test go to:
https://github.com/TheZenKitteh/minetest-modrepo/tree/master/

A NOTE: This installer technically can use any mod archive format
supported by 7z which includes zip 7z tar.gz tar.bz2 etc.

These scripts allow you to easily install and
update mods from a repo. packmod also is used
to pack your mod for use with the installer and
compresses to 7z archive.

mtmodinstall:
# How to use:
# Edit the INSTALLLOC varible to point to your mod folder
# Update REPO URL if needed then
# chmod u+x nameofscript
# issue ./nameofthisscript modname
#
# Example:
# ./mtmodinstall.sh industrial

mtmodinstall-git:
# How to use:
# Edit the INSTALLLOC varible to point to your mod folder
# chmod u+x nameofscript
# issue ./nameofthisscript modname
#
# Example:
# ./mtmodinstall-git.sh industrial


packmod-7z:
# Packs your mod to work with the modinstaller script included here
#
# How to use:
# chmod u+x scriptname
# then
# ./scriptname modname modname_version
#
# Example:
# ./packmod-7z.sh industrial industrial_0.0.5
#
# IMPORTANT: your mod folder must be properly named
# such as industrial and not industrial-master or anything else

packmod-zip:
# Packs your mod to work with the modinstaller script included here
#
# How to use:
# chmod u+x scriptname
# then
# ./scriptname modname modname_version
#
# Example:
# ./packmod-zip.sh industrial industrial_0.0.5
#
# IMPORTANT: your mod folder must be properly named
# such as industrial and not industrial-master or anything else

make-packageslist:
Just run it to make a packages.txt


Download: https://github.com/TheZenKitteh/minetest-bashmodinstaller/archive/master.zip
Source: https://github.com/TheZenKitteh/minetest-bashmodinstaller
License: https://github.com/TheZenKitteh/minetest-bashmodinstaller/blob/master/LICENSE.txt

For the Windows based installer go here:
http://forum.minetest.net/viewtopic.php?pid=64225

PostPosted: Wed Jan 16, 2013 14:07
by madarexxx
mmm sounds nice, but what about windows compatibility? minetest has built in support of CURL library, AFAIK it has support of downloading files under windows. IMHO repo with mods must be in default minetest on all platforms.

PostPosted: Wed Jan 16, 2013 17:39
by RAPHAEL
madarexxx wrote:mmm sounds nice, but what about windows compatibility? minetest has built in support of CURL library, AFAIK it has support of downloading files under windows. IMHO repo with mods must be in default minetest on all platforms.


I agree there should be windows compatability, however seems nobody is working on anything like this installer in c++ and I use linux as well as a lot of minetest users. Maybe this will get someone with the needed coding skills/time to get off their arse and one up me lol.

I have a windows install but I almost never use it (once every few months is about it). However I may see what is possible with windows with time if nobody else comes up with a windows mod installer before then.

PostPosted: Wed Jan 16, 2013 19:20
by Ragnar
i think the mod should use atleast 1 .zip archive, so that some users, that dont use other extracters wont have to install a new extracter just to use this mod :/

PostPosted: Thu Jan 17, 2013 07:19
by RAPHAEL
Seems the poll is fairly divided still... Why do people not like tar.bz2?

PostPosted: Thu Jan 17, 2013 08:02
by 4aiman
If it's about linux only then tar.gz. Voted for that.
But if we would talk about all OSes then zip+some other format should do.
Maybe there can be an option to prefer some type of the archive and a note that will tell user he/she lacks smth to unpack a mod? And maybe some GUI, cause those things would be easier to display on form then in a terminal emulator? I can make a prototype if anyone is interested.

PostPosted: Thu Jan 17, 2013 08:05
by Calinou
RAPHAEL wrote:Seems the poll is fairly divided still... Why do people not like tar.bz2?


Not everyone has an i7. :-)

Voted zip, it's an universal formats. Minetest mods are small anyway.

PostPosted: Thu Jan 17, 2013 08:35
by kaeza
For me, it's ZIP. As calinou pointed, it's more universal. I'd like to say you don't need an i7 to uncompress BZip2 files; my old P2 @333MHz did a superb job at that :)
The problem with bz2 is compression; *not* decompression.

PostPosted: Thu Jan 17, 2013 08:48
by RAPHAEL
To help end the mod archive wars this installer has been updated.

The changes, it now has a packmod-7z.sh and packmod-zip.sh and both zip and 7z work with the installer (as well as any other format 7z handles).

PostPosted: Thu Jan 17, 2013 17:00
by rubenwardy
Does it support Minetest Extensions repo?

PostPosted: Thu Jan 17, 2013 17:04
by Likwid H-Craft
Zip is the best use since it free, and you don't need Download a Software to use a zip file or open it.

PostPosted: Thu Jan 17, 2013 18:27
by RAPHAEL
rubenwardy wrote:Does it support Minetest Extensions repo?

No but will look into it.

Likwid H-Craft wrote:Zip is the best use since it free, and you don't need Download a Software to use a zip file or open it.

That is only true on Windows. Most Linux users have to install support for zip if they want to use zip archives. This is probably why theres so much debate on the topic of zip or 7z or tar.gz or tar.bz2 etc. The inclusion of 7zip in this installer helps make this a non issue if you use this installer. It doesn't require you to have anything installed to pack/unpack mods no matter the format (except rar, mods packed in rar should be thrown out lol)

PostPosted: Fri Jan 18, 2013 00:00
by RAPHAEL
Moved mod repo to its own repository and updated installer/post to reflect change.

PostPosted: Sun Jan 27, 2013 22:05
by RAPHAEL
Bash mod installer with git support added. See first post.