diff --git a/minetest/README.md b/minetest/README.md new file mode 100644 index 0000000..f02da27 --- /dev/null +++ b/minetest/README.md @@ -0,0 +1,25 @@ +# Minetest + +> These PufferPanel templates install the Minetest game engine. + +As there are no precompiled binaries, the installer compiles Minetest from source, resulting in long installation times. The number of available CPU cores can be obtained using `nproc` + +Please make sure the following dependencies are installed (for Debian/Ubuntu users): +```sh +sudo apt install g++ make libc6-dev cmake libpng-dev libjpeg-dev libxi-dev libgl1-mesa-dev libsqlite3-dev libogg-dev libvorbis-dev libopenal-dev libcurl4-gnutls-dev libfreetype6-dev zlib1g-dev libgmp-dev libjsoncpp-dev libzstd-dev libluajit-5.1-dev gettext +``` +*If you are using another distribution, a depency list can be found in the official Minetest documentation.* + +Due to some versions requiring an additional dependency, there are two different template files: + +- For Minetest versions between and including 5.5.0 and 5.8.0, please use the `minetest-irrlichtmt.json` template file. + - Please specify the required IrrlichtMT version: + - Minetest `5.5.0` requires IrrlichtMT `1.9.0mt4` + - Minetest `5.5.1` requires IrrlichtMT `1.9.0mt4` or `1.9.0mt5` + - Minetest `5.6.0` requires IrrlichtMT `1.9.0mt7` + - Minetest `5.6.1` requires IrrlichtMT `1.9.0mt8` + - Minetest `5.7.0` requires IrrlichtMT `1.9.0mt10` + - Minetest `5.8.0` requires IrrlichtMT `1.9.0mt13` +- For Minetest versions below 5.5.0 and above 5.8.0, please use the `minetest.json` template file. + +Minetest is only a game engine, games have to be downloaded from https://content.minetest.net/packages/?type=game and installed in the `minetest/games` directory. diff --git a/minetest/minetest-irrlichmt.json b/minetest/minetest-irrlichmt.json new file mode 100644 index 0000000..2661b91 --- /dev/null +++ b/minetest/minetest-irrlichmt.json @@ -0,0 +1,90 @@ +{ + "name": "minetest", + "display": "Minetest", + "type": "game", + "install": [ + { + "type": "download", + "files": [ + "https://github.com/minetest/minetest/archive/refs/tags/${version}.tar.gz", + "https://github.com/minetest/irrlicht/archive/refs/tags/${irrlichtmt}.tar.gz" + ] + }, + { + "type": "command", + "commands": [ + "tar -xzf minetest-${version}.tar.gz", + "tar -xzf irrlicht-${irrlichtmt}.tar.gz", + "rm minetest-${version}.tar.gz irrlicht-${irrlichtmt}.tar.gz", + "mv minetest-${version} minetest", + "mv irrlicht-${irrlichtmt} minetest/lib/irrlichtmt", + "cmake -S minetest -B minetest -DRUN_IN_PLACE=TRUE -DBUILD_SERVER=TRUE -DBUILD_CLIENT=FALSE -DCMAKE_BUILD_TYPE=Release", + "make -C minetest -j${cores}'" + ] + }, + { + "type": "writefile", + "target": "INFO.txt", + "text": "Minetest Version ${version}\nIrrlichtMT Version ${irrlichtmt}" + } + ], + "run": { + "stopCode": 2, + "command": "./bin/minetestserver --worldname ${worldname} --port ${port}", + "workingDirectory": "minetest", + "pre": [], + "post": [], + "environmentVars": {} + }, + "data": { + "worldname": { + "type": "string", + "desc": "Name of the world", + "display": "World name", + "required": true, + "userEdit": true, + "value": "world" + }, + "port": { + "type": "integer", + "desc": "Server port", + "display": "Port", + "required": true, + "userEdit": true, + "value": "30000" + }, + "version": { + "type": "string", + "desc": "Minetest version, e.g. 5.8.0", + "display": "Version", + "required": true, + "userEdit": true + }, + "irrlichtmt": { + "type": "string", + "desc": "IrrlichtMT version, e.g. 1.9.0mt13", + "display": "IrrlichtMT", + "required": true, + "userEdit": true + }, + "cores": { + "type": "integer", + "desc": "Available CPU cores", + "display": "Cores", + "required": true, + "userEdit": true, + "value": "1" + } + }, + "environment": { + "type": "standard" + }, + "supportedEnvironments": [ + { + "type": "standard" + } + ], + "requirements": { + "os": "linux" + } +} \ No newline at end of file diff --git a/minetest/minetest.json b/minetest/minetest.json new file mode 100644 index 0000000..663bf06 --- /dev/null +++ b/minetest/minetest.json @@ -0,0 +1,80 @@ +{ + "name": "minetest", + "display": "Minetest", + "type": "game", + "install": [ + { + "type": "download", + "files": [ + "https://github.com/minetest/minetest/archive/refs/tags/${version}.tar.gz" + ] + }, + { + "type": "command", + "commands": [ + "tar -xzf minetest-${version}.tar.gz", + "rm minetest-${version}.tar.gz", + "mv minetest-${version} minetest", + "cmake -S minetest -B minetest -DRUN_IN_PLACE=TRUE -DBUILD_SERVER=TRUE -DBUILD_CLIENT=FALSE -DCMAKE_BUILD_TYPE=Release", + "make -C minetest -j${cores}" + ] + }, + { + "type": "writefile", + "target": "INFO.txt", + "text": "Minetest Version ${version}" + } + ], + "run": { + "stopCode": 2, + "command": "./bin/minetestserver --worldname ${worldname} --port ${port}", + "workingDirectory": "minetest", + "pre": [], + "post": [], + "environmentVars": {} + }, + "data": { + "worldname": { + "type": "string", + "desc": "Name of the world", + "display": "World name", + "required": true, + "userEdit": true, + "value": "world" + }, + "port": { + "type": "integer", + "desc": "Server port", + "display": "Port", + "required": true, + "userEdit": true, + "value": "30000" + }, + "version": { + "type": "string", + "desc": "Minetest version, e.g. 5.4.1", + "display": "Version", + "required": true, + "userEdit": true + }, + "cores": { + "type": "integer", + "desc": "Available CPU cores", + "display": "Cores", + "required": true, + "userEdit": true, + "value": "1" + } + }, + "environment": { + "type": "standard" + }, + "supportedEnvironments": [ + { + "type": "standard" + } + ], + "requirements": { + "os": "linux" + } +} \ No newline at end of file