mirror of
https://github.com/iiab/iiab.git
synced 2025-03-09 15:40:17 +00:00
Merge pull request #3426 from tim-moody/7.3.7-minetest
Upgrade MineTest to only use package on all platforms
This commit is contained in:
commit
fcc8bcc127
12 changed files with 65 additions and 127 deletions
|
@ -30,7 +30,7 @@ If changes are necessary, please edit `/etc/iiab/local_vars.yml <https://wiki.ii
|
|||
- ``minetest_port:`` port on which client should connect; default is 30000
|
||||
- ``minetest_server_admin:`` user with all permissions on minetest server; default is Admin
|
||||
|
||||
- ``minetest_default_game:`` only carbone-ng and minetest are supported; default is `carbone-ng <https://github.com/Calinou/carbone-ng>`_
|
||||
- ``minetest_default_game:`` only the default minetest game is supported at present; in future the default will be DreamBuilder
|
||||
- ``minetest_flat_world:`` use a flat mapgen engine to lower computation on client; default is False
|
||||
|
||||
After installation, you can monitor the 'minetest-server' service with command::
|
||||
|
@ -42,17 +42,6 @@ File Locations
|
|||
|
||||
- The config file is ``/etc/minetest/minetest.conf``
|
||||
- The world files are at ``/library/games/minetest/worlds/world``
|
||||
|
||||
File Locations on Raspberry Pi
|
||||
------------------------------
|
||||
|
||||
- The server binary is ``/library/games/minetest/bin/minetestserver``
|
||||
- The working directory is ``/library/games/minetest``
|
||||
- mods are in ``/library/games/minetest/games/<game>/mods``
|
||||
|
||||
File Locations on Other Platforms
|
||||
---------------------------------
|
||||
|
||||
- The server binary is ``/usr/lib/minetest/minetestserver``
|
||||
- The working directory is ``/usr/share/games/minetest``
|
||||
- mods are in ``/usr/share/games/minetest/games/<game>/mods``
|
||||
|
@ -60,6 +49,6 @@ File Locations on Other Platforms
|
|||
To Do
|
||||
-----
|
||||
|
||||
- Add more mods — currently only the default mods are there in carbone-ng
|
||||
- Add more mods
|
||||
- Add more games
|
||||
- Minetest client software for Windows and Android, included onboard IIAB for offline communities (`#1465 <https://github.com/iiab/iiab/issues/1465>`_)
|
||||
|
|
|
@ -1,15 +1,13 @@
|
|||
# minetest_install: False
|
||||
# minetest_enabled: False
|
||||
|
||||
# minetest_port: 30000
|
||||
# minetest_server_admin: Admin
|
||||
|
||||
# minetest_default_game: carbone-ng # only carbone-ng and minetest are supported
|
||||
# minetest_flat_world: False
|
||||
|
||||
# All above are set in: github.com/iiab/iiab/blob/master/vars/default_vars.yml
|
||||
# Other vars set in: github.com/iiab/iiab/blob/master/vars/default_vars.yml
|
||||
# If nec, change them by editing /etc/iiab/local_vars.yml prior to installing!
|
||||
|
||||
# These should not be touched unless minetest packages change
|
||||
minetest_server_bin: /usr/lib/minetest/minetestserver
|
||||
minetest_config_file: /etc/minetest/minetest.conf
|
||||
minetest_world_dir: /library/games/minetest/worlds/world
|
||||
|
||||
minetest_runas_user: root
|
||||
minetest_runas_group: root
|
||||
|
||||
#minetest_runas_user: Debian-minetest
|
||||
#minetest_runas_group: games
|
||||
|
|
48
roles/minetest/tasks/install.yml
Normal file
48
roles/minetest/tasks/install.yml
Normal file
|
@ -0,0 +1,48 @@
|
|||
- name: Check for Minetest world file ({{ minetest_world_dir }}/world.mt)
|
||||
stat:
|
||||
path: "{{ minetest_world_dir }}/world.mt"
|
||||
register: minetest_world
|
||||
|
||||
- name: mkdir /library/games
|
||||
file:
|
||||
state: directory
|
||||
path: /library/games
|
||||
# owner: root
|
||||
# group: root
|
||||
# mode: '0755'
|
||||
|
||||
- include_tasks: minetest_install.yml
|
||||
when: not minetest_world.stat.exists
|
||||
|
||||
# Install games
|
||||
#- include_tasks: minetest_install_games.yml
|
||||
# with_items:
|
||||
# - name: carbone-ng
|
||||
# url: https://github.com/Calinou/carbone-ng
|
||||
|
||||
# Install mods
|
||||
- include_tasks: minetest_install_mods.yml
|
||||
with_items:
|
||||
- name: basic_materials
|
||||
url: https://content.minetest.net/packages/VanessaE/basic_materials/releases/14936/download/
|
||||
- name: mesecons
|
||||
url: https://content.minetest.net/packages/Jeija/mesecons/releases/14247/download/
|
||||
- name: digilines
|
||||
url: https://content.minetest.net/packages/Jeija/digilines/releases/13248/download/
|
||||
- name: pipeworks
|
||||
url: https://content.minetest.net/packages/VanessaE/pipeworks/releases/7488/download/
|
||||
- name: Minetest-WorldEdit
|
||||
url: https://content.minetest.net/packages/sfan5/worldedit/releases/13367/download/
|
||||
when: minetest_default_game == "minetest"
|
||||
|
||||
# RECORD Minetest AS INSTALLED
|
||||
|
||||
- name: "Set 'minetest_installed: True'"
|
||||
set_fact:
|
||||
minetest_installed: True
|
||||
|
||||
- name: "Add 'minetest_installed: True' to {{ iiab_state_file }}"
|
||||
lineinfile:
|
||||
path: "{{ iiab_state_file }}" # /etc/iiab/iiab_state.yml
|
||||
regexp: '^minetest_installed'
|
||||
line: 'minetest_installed: True'
|
|
@ -22,7 +22,7 @@
|
|||
- block:
|
||||
|
||||
- name: Install Minetest if 'minetest_installed' not defined, e.g. in {{ iiab_state_file }} # /etc/iiab/iiab_state.yml
|
||||
include_tasks: provision.yml # i.e. install.yml in other roles
|
||||
include_tasks: install.yml
|
||||
when: minetest_installed is undefined
|
||||
|
||||
- include_tasks: enable-or-disable.yml
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
# For non-rpi installs
|
||||
|
||||
- name: Install Minetest package
|
||||
package:
|
||||
name: minetest-server
|
||||
|
@ -35,11 +33,3 @@
|
|||
mode: 0755
|
||||
with_items:
|
||||
- "{{ minetest_world_dir }}"
|
||||
|
||||
- name: Change exec line in generated unit file
|
||||
lineinfile:
|
||||
path: /lib/systemd/system/minetest-server.service
|
||||
regexp: "{{ item.regexp }}"
|
||||
line: "{{ item.line }}"
|
||||
with_items:
|
||||
- { regexp: '^ExecStart=/usr/lib/minetest/minetestserver', line: 'ExecStart=/usr/lib/minetest/minetestserver --config /etc/minetest/minetest.conf --logfile /var/log/minetest/minetest.log --world "{{ minetest_world_dir }}"' }
|
||||
|
|
|
@ -1,83 +0,0 @@
|
|||
# Calculate local variables
|
||||
- include_tasks: calc_vars.yml
|
||||
|
||||
- name: Check for Minetest world file ({{ minetest_world_dir }}/world.mt)
|
||||
stat:
|
||||
path: "{{ minetest_world_dir }}/world.mt"
|
||||
register: minetest_world
|
||||
|
||||
- name: mkdir /library/games
|
||||
file:
|
||||
state: directory
|
||||
path: /library/games
|
||||
# owner: root
|
||||
# group: root
|
||||
# mode: '0755'
|
||||
|
||||
# rpi only
|
||||
- include_tasks: rpi_minetest_install.yml
|
||||
when: not minetest_world.stat.exists and is_raspbian
|
||||
|
||||
# not rpi
|
||||
- include_tasks: minetest_install.yml
|
||||
when: not minetest_world.stat.exists and not is_raspbian
|
||||
|
||||
- git:
|
||||
repo: https://github.com/Calinou/carbone-ng.git
|
||||
dest: "{{ minetest_game_dir }}"
|
||||
depth: 1
|
||||
when: not minetest_world.stat.exists and minetest_default_game == "carbone-ng"
|
||||
|
||||
- name: Give Minetest user ownership of carbone-ng
|
||||
file:
|
||||
state: directory
|
||||
path: "{{ minetest_game_dir }}"
|
||||
recurse: yes
|
||||
owner: "{{ minetest_runas_user }}"
|
||||
group: "{{ minetest_runas_group }}"
|
||||
# mode: 0755
|
||||
when: minetest_default_game == "carbone-ng"
|
||||
|
||||
# Install games
|
||||
#- include_tasks: minetest_install_games.yml
|
||||
# with_items:
|
||||
# - name: carbone-ng
|
||||
# url: https://github.com/Calinou/carbone-ng
|
||||
|
||||
# Install mods
|
||||
- include_tasks: minetest_install_mods.yml
|
||||
with_items:
|
||||
- name: moreblocks
|
||||
url: https://github.com/minetest-mods/moreblocks/archive/master.zip
|
||||
- name: moreores
|
||||
url: https://github.com/Calinou/moreores/archive/master.zip
|
||||
- name: basic_materials
|
||||
url: https://gitlab.com/VanessaE/basic_materials/-/archive/master/basic_materials-master.zip
|
||||
- name: mesecons
|
||||
url: https://github.com/minetest-mods/mesecons/archive/master.zip
|
||||
- name: digilines
|
||||
url: https://github.com/minetest-mods/digilines/archive/master.zip
|
||||
- name: pipeworks
|
||||
url: https://github.com/minetest-mods/pipeworks/archive/master.zip
|
||||
- name: Minetest-WorldEdit
|
||||
url: https://github.com/Uberi/Minetest-WorldEdit/archive/master.zip
|
||||
when: minetest_default_game == "minetest"
|
||||
|
||||
- name: Remove mod from carbone-ng that prevents our Admin name
|
||||
file:
|
||||
state: absent
|
||||
path: "{{ minetest_game_dir }}/mods/name_restrictions"
|
||||
when: minetest_default_game == "carbone-ng"
|
||||
|
||||
|
||||
# RECORD Minetest AS INSTALLED
|
||||
|
||||
- name: "Set 'minetest_installed: True'"
|
||||
set_fact:
|
||||
minetest_installed: True
|
||||
|
||||
- name: "Add 'minetest_installed: True' to {{ iiab_state_file }}"
|
||||
lineinfile:
|
||||
path: "{{ iiab_state_file }}" # /etc/iiab/iiab_state.yml
|
||||
regexp: '^minetest_installed'
|
||||
line: 'minetest_installed: True'
|
|
@ -631,8 +631,13 @@ internetarchive_port: 4244 # for http://box:4244
|
|||
minetest_install: False
|
||||
minetest_enabled: False
|
||||
minetest_port: 30000
|
||||
minetest_working_dir: /usr/share/games/minetest
|
||||
|
||||
minetest_server_admin: Admin
|
||||
minetest_default_game: carbone-ng # only carbone-ng and minetest are supported
|
||||
# minetest_default_game: carbone-ng # carbone-ng is not longer compatible so not supported
|
||||
minetest_default_game: minetest
|
||||
# minetest_default_game: dreambuilder - after 5.6
|
||||
minetest_game_dir: "{{ minetest_working_dir }}/games/{{ minetest_default_game }}_game"
|
||||
minetest_flat_world: False
|
||||
|
||||
# Calibre-Web E-Book Library -- Alternative to Calibre, offers a clean/modern UX
|
||||
|
|
|
@ -23,12 +23,3 @@ php_version: "7.4"
|
|||
postgresql_version: 13
|
||||
systemd_location: /lib/systemd/system
|
||||
python_ver: "3.9"
|
||||
|
||||
# Minetest for RPi
|
||||
minetest_server_bin: /library/games/minetest/bin/minetestserver
|
||||
minetest_working_dir: /library/games/minetest
|
||||
minetest_game_dir: /library/games/minetest/games/minetest_game
|
||||
minetest_rpi_src_tar: minetest.5.1.1.tar.gz
|
||||
#minetest_rpi_src_url: "https://www.nathansalapat.com/downloads/{{ minetest_rpi_src_tar }}"
|
||||
minetest_rpi_src_url: "{{ iiab_download_url }}/{{ minetest_rpi_src_tar }}"
|
||||
minetest_rpi_src_untarred: Minetest
|
||||
|
|
Loading…
Add table
Reference in a new issue