Mod (Auto) Installer
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.
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:
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:
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:
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.
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.