Mod (Auto) Installer

User avatar
octacian
Member
 
Posts: 408
Joined: Mon Dec 21, 2015 22:18
GitHub: octacian
IRC: octacian
In-game: octacian

Mod (Auto) Installer

by octacian » Fri Apr 15, 2016 15:02

Installing mods can be annoying (for me anyway), especially when you have to add read and execute permissions to the folder, so I've created a relatively simple Bash script to install mods. This is meant for mod developers who would like some type of auto installer, not just to install a mod that you have downloaded. Currently, the script is not compatible with Mac OS X, but works with most Linux distributions. Recently, I updated the script so that it will detect and install to the new v0.4.13 mods directory too. My purpose of this, is to create something that mod creators are welcome to use to simplify the installation. Yes, I know it's already fairly simple, yet it might confuse some.

So if anyone is interested in including this in their mod, here are the instructions. Note: these instructions are for mod creators to set up the script, end user instructions are below.

It's fairly simple. Just download the script, open it with your favourite editor, and find line 20.
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
# Name of mod to be installed
modname="modname"

Simply change the value of modname to the name of your mod. For example, I would change the value to genesis for my mod called genesis:
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
# Name of mod to be installed
modname="genesis"


Please remember that the modname must be the final name of the folder which will be placed in the mods directory. The script will automatically deal with everything else. To insure that the script is ready to go, cd to the directory in which the script is stored, and run chmod:
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
chmod +x install.sh


USE
Users can now open the mod directory in the terminal, and type ./install.sh, then follow the simple prompts to complete the installation. When you run the script, you are at one point prompted to choose which subgame you would like to install the mod to, so I have added a shortcut that skips this:
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
./install.sh minetest_game

Replacing minetest_game with the name of the subgame.

And for those who have a portable Minetest installation, or do not have the Minetest root folder in the expected places, the script will show an error allowing you to exit or enter a custom path.

Downloads:
Release v1.0 (stable)
Unstable (most recent)
or Browse the Code on Git

Lincense
MIT License

It would be great to see some people using this with their mods. I think it will help those people who are new to Minetest yet have even the most basic understanding of the terminal. If anybody has any suggestions or problems, let me know or open an Issue here.

Known Problems:
When subgame is specified through ./install.sh minetest_game, the script loops back to midCheck once after installation. I am working to figure this out, but any help would be really appreciated. This happened once before, and I believe I know what the problem is, but I am not sure how to efficiently fix it yet. However, I don't think this is a big problem, as it does not affect the functionality of the script - the rest still runs fine.
Last edited by octacian on Sun Jul 31, 2016 22:50, edited 2 times in total.
God isn't dead!

My Coolest Mods:
MicroExpansion, Working Computers, Interchangeable Hands

Check out my YouTube channel! (octacian)
 

User avatar
lisacvuk
Member
 
Posts: 165
Joined: Sat Jul 19, 2014 11:52
GitHub: lisacvuk
IRC: lisac
In-game: lisacvuk

Re: Mod (Auto) Installer

by lisacvuk » Sat Jul 30, 2016 00:06

Would it be too big of an issue to push it to github? Thanks :P
400 character limit? Am I writing a book?
I'm a Minetest player, 'learning' C++ and OpenGL, listening to Blind Guardian, Nightwish, Amon Amarth. Administrator on Craig's server. Likes cookies.
I live in Serbia.
 

User avatar
LNJ
Member
 
Posts: 200
Joined: Tue Sep 23, 2014 16:02
GitHub: LNJ2
IRC: LNJ2GO
In-game: LNJ

Re: Mod (Auto) Installer

by LNJ » Sun Jul 31, 2016 17:43

I normally install my mods so:
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/mods
$ git clone <git repo>
...


OR, if I want to install them globally:
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 /usr/share/games/minetest/mods
$ sudo git clone <git repo>
...


With this script I have to do this:
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
$ git clone <git repo>
...
$ cd <mod name>
$ ./install
$ cd ..
$ rm -rf <mod name>


Or did I misunderstood something here?
My Minetest Modding Tutorials (German) | Minetest TNG - My survival subgame! (OUTDATED... :() | #ComeToTheDuckSide - we have privacy! | diaspora* - The free and decentralized alternative to facebook and twitter!
 

User avatar
octacian
Member
 
Posts: 408
Joined: Mon Dec 21, 2015 22:18
GitHub: octacian
IRC: octacian
In-game: octacian

Re: Mod (Auto) Installer

by octacian » Sun Jul 31, 2016 22:52

lisacvuk wrote:Would it be too big of an issue to push it to github? Thanks :P


Sorry, forgot the links were broken. Fixed now :) Git

BTW, I'm not using GitHub but a self hosted alternative known as Gogs. Hopefully that's OK though, as you can still create an account there and such in case you want to fork the installer, or anything like that.
Last edited by octacian on Tue Aug 02, 2016 21:59, edited 2 times in total.
God isn't dead!

My Coolest Mods:
MicroExpansion, Working Computers, Interchangeable Hands

Check out my YouTube channel! (octacian)
 

User avatar
lisacvuk
Member
 
Posts: 165
Joined: Sat Jul 19, 2014 11:52
GitHub: lisacvuk
IRC: lisac
In-game: lisacvuk

Re: Mod (Auto) Installer

by lisacvuk » Tue Aug 02, 2016 15:39

Okay :D Thanks.
400 character limit? Am I writing a book?
I'm a Minetest player, 'learning' C++ and OpenGL, listening to Blind Guardian, Nightwish, Amon Amarth. Administrator on Craig's server. Likes cookies.
I live in Serbia.
 

User avatar
kaeza
Member
 
Posts: 2141
Joined: Thu Oct 18, 2012 05:00
GitHub: kaeza
IRC: kaeza diemartin blaaaaargh
In-game: kaeza

Re: Mod (Auto) Installer

by kaeza » Tue Aug 02, 2016 20:46

I don't understand why you need to "add read and execute permissions to the folder". Are you installing mods into `/usr[/local]`? You should be using `~/.minetest` unless you have a really weird setup.
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 | BTC: 1DFZAa5VtNG7Levux4oP6BuUzr1e83pJK2
 

User avatar
octacian
Member
 
Posts: 408
Joined: Mon Dec 21, 2015 22:18
GitHub: octacian
IRC: octacian
In-game: octacian

Re: Mod (Auto) Installer

by octacian » Tue Aug 02, 2016 21:59

kaeza wrote:I don't understand why you need to "add read and execute permissions to the folder". Are you installing mods into `/usr[/local]`? You should be using `~/.minetest` unless you have a really weird setup.


I'll look it over. Can probably refine some stuff considering the fact that I did this last year :P
God isn't dead!

My Coolest Mods:
MicroExpansion, Working Computers, Interchangeable Hands

Check out my YouTube channel! (octacian)
 


Return to Modding Discussion

Who is online

Users browsing this forum: Bing [Bot] and 4 guests

cron