Distribution de travail :
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 22.04.3 LTS
Release: 22.04
Codename: jammy
Liens :
https://atelier.hacktech.dev/installation-du-client-minetest-stable-0-4-15-sur-raspberry-pi-3/
https://atelier.hacktech.dev/minetest-installation-de-raspberryjammod-python/
https://atelier.hacktech.dev/compilation-de-blockly-sous-ubuntu-17-10/
https://atelier.hacktech.dev/minetest-programmation-par-bloc-blockly/
util01@station40:~$ sudo apt install python2
util01@station40:~$ python2.7 --version
util01@station40:~$ Python 2.7.18
util01@station40:~$ sudo apt-get install build-essential git-core cmake libirrlicht-dev cmake libbz2-dev libpng-dev libjpeg-dev libxxf86vm-dev libgl1-mesa-dev libsqlite3-dev libcurl4-gnutls-dev libfreetype6-dev zlib1g-dev libgmp-dev libjsoncpp-dev libluajit-5.1-2 libluajit-5.1-dev libncurses5-dev doxygen gettext-base libgettextpo-dev libopenal-dev libvorbis-dev gettext libleveldb-dev postgresql postgresql-server-dev
util01@station40:~$ mkdir -p JEUX/MINETEST.415
util01@station40:~$ cd JEUX/MINETEST.415/
util01@station40:~/JEUX/MINETEST.415 $
util01@station40:~/JEUX/MINETEST.415 $ wget https://github.com/minetest/minetest/archive/refs/tags/0.4.15.tar.gz
util01@station40:~/JEUX/MINETEST.415 $ mv 0.4.15.tar.gz minetest_0.4.15.tar.gz
util01@station40:~/JEUX/MINETEST.415 $ tar xvfz minetest_0.4.15.tar.gz
util01@station40:~/JEUX/MINETEST.415 $ mv minetest-0.4.15 minetest
util01@station40:~/JEUX/MINETEST.415 $ cd minetest
util01@station40:~/JEUX/MINETEST.415 $ wget https://github.com/minetest/minetest_game/archive/refs/tags/0.4.15.tar.gz
util01@station40:~/JEUX/MINETEST.415 $ mv 0.4.15.tar.gz minetest_game_0.4.15.tar.gz
util01@station40:~/JEUX/MINETEST.415 $ tar xvfz minetest_game_0.4.15.tar.gz
util01@station40:~/JEUX/MINETEST.415 $ mv minetest_game-0.4.15 minetest_game
util01@station40:~/JEUX/MINETEST.415 $ cd minetest
util01@station40:~/JEUX/MINETEST.415/minetest $ cmake . -DRUN_IN_PLACE=TRUE -DBUILD_SERVER=TRUE -DENABLE_LUAJIT=TRUE -DENABLE_FREETYPE=TRUE -DENABLE_GETTEXT=TRUE -DENABLE_CURL=TRUE -DENABLE_GLES=TRUE -DCMAKE_BUILD_TYPE=Release
util01@station40:~/JEUX/MINETEST.415/minetest $ make -j2
util01@station40:~/JEUX/MINETEST.415/minetest $ cd games/
util01@station40:~/JEUX/MINETEST.415/minetest/games $
util01@station40:~/JEUX/MINETEST.415/minetest/games $ ln -s ../../minetest_game_0.4.15 minetest_game
util01@station40:~/JEUX/MINETEST.415/minetest/games $ cd ..
util01@station40:~/JEUX/MINETEST.415/minetest $ cd bin/
util01@station40:~/JEUX/MINETEST.415/minetest/bin $ ./minetest
util01@station40:~/JEUX/MINETEST.415 $ sudo apt-get install lua-sec lua-socket lua-socket-dev
util01@station40:~/JEUX/MINETEST.415$ wget http://ports.ubuntu.com/pool/universe/l/luasocket/lua-socket_3.0~rc1+git+ac3201d-6_arm64.deb
util01@station40:~/JEUX/MINETEST.415$ ar x lua-socket_3.0~rc1+git+ac3201d-6_amd64.deb
util01@station40:~/JEUX/MINETEST.415$ tar --use-compress-program=unzstd -xvf data.tar.zst
util01@station40:~/JEUX/MINETEST.415 $ wget https://github.com/arpruss/raspberryjammod-minetest/archive/0.20.tar.gz
util01@station40:~/JEUX/MINETEST.415 $ tar xvfz 0.20.tar.gz
util01@station40:~/JEUX/MINETEST.415 $ cd minetest/mods/
util01@station40:~/JEUX/MINETEST.415/minetest/mods $
util01@station40:~/JEUX/MINETEST.415/minetest/mods $ ln -s ../../raspberryjammod-minetest-0.20/raspberryjammod
util01@station40:~/JEUX/MINETEST.415$ cd minetest/mods/raspberryjammod/
util01@station40:~/JEUX/MINETEST.415/minetest/mods/raspberryjammod$
util01@station40:~/JEUX/MINETEST.415/minetest/mods/raspberryjammod$ cp ../../../usr/lib/x86_64-linux-gnu/liblua5.1-socket.so.2.0.0 .
util01@station40:~/JEUX/MINETEST.415/minetest/mods/raspberryjammod$ ln -s liblua5.1-socket.so.2.0.0 socket.so
util01@station40:~/JEUX/MINETEST.580/minetest/mods/raspberryjammod/socket$ ln -s liblua5.1-socket.so.2.0.0 socket.so
util01@station40:~/JEUX/MINETEST.580/minetest/mods/raspberryjammod/socket$ cd ../../../
util01@station40:~/JEUX/MINETEST.580/minetest$
util01@station40:~/JEUX/MINETEST.415/minetest $ cp games/minetest_game/minetest.conf.example games/minetest_game/minetest.conf
Ouvrir :
~/JEUX/MINETEST.415/minetest/games/minetest_game/minetest.conf
Chercher :
#creative_mode = false
Remplacer par :
creative_mode = true
secure.enable_security = false
secure.trusted_mods = raspberryjammod
Ouvrir :
mods/raspberryjammod/init.lua
Chercher :
if minetest.request_insecure_environment then
ie = minetest.request_insecure_environment()
else
ie = _G
end
Remplacer par :
ie = _G
En 'Solo', créer un monde 'plat', nommé 'plat', via le générateur de monde 'flat'.
[Configurer] ce monde en activant le mod 'raspberryjammod'.
Puis quitter le client Minetest.
Ouvrir :
mods/raspberryjammod/mcpipy/pillar.py
Ajouter :
import mcpi.minecraft as minecraft
import mcpi.block as block
import server
import math
# Connect to the Minecraft server
world = minecraft.Minecraft.create(server.address)
# Get the player's current position and store the coordinates
[x,y,z] = world.player.getPos()
# Set some variables to customize your pillar
height = 3
material = block.BRICK_BLOCK
# Build the pillar. It will be "height" blocks high and located one step away from the player.
for level in range(0, height):
world.setBlock( x+1, y+level, z+1, material )
level = level + 1;
Action:
util01@station40:~/JEUX/MINETEST.415/minetest/mods/raspberryjammod/mcpipy $ chmod +x pillar.py
util01@station40:~/JEUX/MINETEST.415/minetest/bin $ ./minetestserver
util01@station40:~/JEUX/MINETEST.415/minetest/bin $ ./minetest
Se connecter au serveur Minetest via [Client].
util01@station40:~/JEUX/MINETEST.415/minetest/mods/raspberryjammod/mcpipy $ python2.7 ./pillar.py
Après l'exécution du script :
util01@station40:~$ sudo apt-get install apache2
util01@station40:~$ cd JEUX/MINETEST.415/
util01@station40:~/JEUX/MINETEST.415 $
util01@station40:~/JEUX/MINETEST.415 $ wget https://github.com/google/closure-library/archive/refs/tags/v20161201.tar.gz
util01@station40:~/JEUX/MINETEST.415 $ tar xvfz v20161201.tar.gz
util01@station40:~/JEUX/MINETEST.415 $ mv closure-library-20161201/ closure-library
util01@station40:~/JEUX/MINETEST.415 $ wget https://github.com/arpruss/blockly-minecraft/archive/refs/heads/master.zip
util01@station40:~/JEUX/MINETEST.415$ unzip master.zip
util01@station40:~/JEUX/MINETEST.415 $ cd blockly-minecraft-master/
util01@station40:~/JEUX/MINETEST.415/blockly-minecraft-master $
util01@station40:~/JEUX/MINETEST.415/blockly-minecraft-master $ ./build.py
SUCCESS: msg/js/tr.js
SUCCESS: msg/js/de.js
...
SUCCESS: msg/js/sc.js
Exception in thread Thread-2:
Traceback (most recent call last):
File "/usr/lib/python2.7/threading.py", line 810, in __bootstrap_inner
self.run()
File "./build.py", line 162, in run
self.gen_core()
File "./build.py", line 193, in gen_core
self.do_compile(params, target_filename, filenames, "")
File "./build.py", line 258, in do_compile
json_data = json.loads(json_str)
File "/usr/lib/python2.7/json/__init__.py", line 338, in loads
return _default_decoder.decode(s)
File "/usr/lib/python2.7/json/decoder.py", line 366, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/lib/python2.7/json/decoder.py", line 384, in raw_decode
raise ValueError("No JSON object could be decoded")
ValueError: No JSON object could be decoded
SUCCESS: blockly_uncompressed.js
util01@station40:~/JEUX/MINETEST.415/blockly-minecraft-master $
util01@station40:~/JEUX/MINETEST.415/blockly-minecraft-master $ cd /var/www/html/
util01@station40:/var/www/html $
util01@station40:/var/www/html $ sudo ln -s /home/pi/JEUX/MINETEST.415/blockly-minecraft-master/ blocky
http://localhost/blockly/minecraft/