Add Desktop Icon

This commit is contained in:
TheBrokenRail 2020-09-25 19:37:22 -04:00
parent 72831c659a
commit e0fcc910c1
8 changed files with 41 additions and 15 deletions

View File

@ -2,4 +2,6 @@
.gitignore
Dockerfile
README.md
docker-compose.yml
data
install.sh
build.sh

View File

@ -16,10 +16,15 @@ PID="$!"
xhost local:root
sudo docker run -v /tmp/.X11-unix:/tmp/.X11-unix -v /tmp/.virgl_test:/tmp/.virgl_test -v ~/.minecraft-pi:/root/.minecraft -p 4711:4711/tcp -e DISPLAY=unix${DISPLAY} thebrokenrail/minecraft-pi
sudo docker run -v /tmp/.X11-unix:/tmp/.X11-unix -v /tmp/.virgl_test:/tmp/.virgl_test -v ~/.minecraft-pi:/root/.minecraft --network host -e DISPLAY=unix${DISPLAY} thebrokenrail/minecraft-pi
kill "${PID}"
```
## Installation
```sh
./install.sh
```
## Tweaks
The included version of Minecraft: Pi Ediiton is slightly modified to use the touchscreen UI.

15
data/usr/bin/minecraft-pi Executable file
View File

@ -0,0 +1,15 @@
#!/bin/sh
set -e
virgl_test_server &
PID="$!"
xhost local:root
DOCKER_COMPOSE="docker-compose -f /usr/share/minecraft-pi/docker-compose.yml"
${DOCKER_COMPOSE} up
${DOCKER_COMPOSE} down
kill "${PID}"

View File

@ -0,0 +1,10 @@
[Desktop Entry]
Name=Minecraft: Pi Edition
Comment=Fun with Blocks
Icon=/usr/share/pixmaps/minecraft-pi.png
StartupNotify=false
StartupWMClass=minecraft-pi
Exec=/usr/bin/minecraft-pi
Terminal=false
Type=Application
Categories=Application;Game;

Binary file not shown.

After

Width:  |  Height:  |  Size: 100 KiB

7
install.sh Executable file
View File

@ -0,0 +1,7 @@
#!/bin/sh
set -e
sudo adduser "$(whoami)" docker || :
sudo cp -r data/. /

13
run.sh
View File

@ -1,13 +0,0 @@
#!/bin/sh
set -e
virgl_test_server &
PID="$!"
xhost local:root
sudo docker-compose up
sudo docker-compose down
kill "${PID}"