Skip to content
This repository has been archived by the owner on Feb 19, 2021. It is now read-only.

Commit

Permalink
Debian packaging.
Browse files Browse the repository at this point in the history
  • Loading branch information
torralbaa committed Aug 30, 2020
1 parent b9ae094 commit badbfb8
Show file tree
Hide file tree
Showing 85 changed files with 133 additions and 219 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,7 @@

# Python stuff
__pycache__/

# Debian
mcpil_*-*.deb
deb/
12 changes: 0 additions & 12 deletions .gitmodules

This file was deleted.

44 changes: 44 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
#
# Makefile
#
# Copyright 2020 Alvarito050506 <[email protected]>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation; version 3 of the License.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
# MA 02110-1301, USA.
#
#

pack:
mkdir -p ./deb/
cp -a ./res/. ./deb/
cp ./src/mcpil.py ./deb/usr/bin/mcpil
cp ./src/mcpim.py ./deb/usr/bin/mcpim
chmod a+x ./deb/usr/bin/mcpil
chmod a+x ./deb/usr/bin/mcpim
@echo "Package: mcpil" > ./deb/DEBIAN/control
@echo "Version: 0.5.0" >> ./deb/DEBIAN/control
@echo "Priority: optional" >> ./deb/DEBIAN/control
@echo "Architecture: armhf" >> ./deb/DEBIAN/control
@echo "Depends: libmcpi, mcpi-proxy, mcpi-central, libmodpi, python3" >> ./deb/DEBIAN/control
@echo "Maintainer: Alvarito050506 <[email protected]>" >> ./deb/DEBIAN/control
@echo "Homepage: https://mcpi.tk" >> ./deb/DEBIAN/control
@echo "Vcs-Browser: https://github.com/MCPI-Devs/proxy" >> ./deb/DEBIAN/control
@echo "Vcs-Git: https://github.com/MCPI-Devs/proxy.git" >> ./deb/DEBIAN/control
@echo "Description: Minecraft Pi Proxy to allow players to connect to remote servers.\n" >> ./deb/DEBIAN/control
dpkg-deb -b ./deb/ ./mcpil_0.5.0-1.deb


clean:
rm -rf ./deb/
rm -f ./mcpil_*-*.deb
26 changes: 11 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,14 @@ A simple launcher for Minecraft: Pi Edition.
To use MCPIL you need to have `Python >= 3.7.x` pre-installed.

### Installation
To install MCPIL, download or clone the repository and run the `build.py` file in the root of the repo:
Download and install MCPIL from the Packagecloud Debian repository:
```shell
git clone --recurse-submodules https://github.com/MCPI-Devs/MCPIL.git
cd MCPIL
python3 ./build.py
```
It will generate a `install.pyc` file under the `build` directory, run it:
```shell
cd build
python3 ./install.pyc
# If you didn't add the repository yet
curl -s https://packagecloud.io/install/repositories/Alvarito050506/mcpi-devs/script.deb.sh | sudo bash

# Now the actual installation
sudo apt-get install mcpil
```
It will "install" MCPI and MCPE, and configure the Launcher.

## Features
+ Switch between Minecraft Pi and PE
Expand All @@ -35,20 +31,20 @@ It will "install" MCPI and MCPE, and configure the Launcher.
+ Coming soon: More stuff

## Usage
Launch the MCPIL desktop file or run the `mcpil.pyc` file in the `build` folder as following to see the magic! :wink:
Launch the MCPIL desktop file or run the `mcpil` command folder as following to see the magic! :wink:
```shell
python3.7 ./mcpil.pyc
mcpil # Yes, simple as this
```

## API
The API documentation was moved to the [ModPi repo](https://github.com/MCPI-Devs/modpi).

The old API still can be used, and its documentation is still avaiable [here](https://github.com/MCPI-Devs/MCPIL/tree/3470fb73b81510f5e819a34c04cca6f86457c2b2#api). However it is obsolete, it will be removed from future releases of the Launcher, and it is recommended to use the new ModPi API.
The support for the old API was **dropped** in the **v0.5.0 release**! It is recommended to use the new ModPi API. However, the old API documentation is still avaiable [here](https://github.com/MCPI-Devs/MCPIL/tree/3470fb73b81510f5e819a34c04cca6f86457c2b2#api).

## Mod compilation
To compile (compress) a Python mod, run the `mcpim.py` file passing the filename of the mod as the first argument. For example:
To compile (compress) a Python mod, run the `mcpim` command passing the filename of the mod as the first argument. For example:
```shell
python3 ./mcpim.pyc example.py
mcpim ./example.py
```
This will produce an `example.mcpi` mod file.

Expand Down
42 changes: 0 additions & 42 deletions build.py

This file was deleted.

6 changes: 0 additions & 6 deletions build/minecraft/LICENSE.txt

This file was deleted.

Binary file removed build/minecraft/data/images/armor/chain_1.png
Binary file not shown.
Binary file removed build/minecraft/data/images/armor/chain_2.png
Binary file not shown.
Binary file removed build/minecraft/data/images/armor/cloth_1.png
Binary file not shown.
Binary file removed build/minecraft/data/images/armor/cloth_2.png
Binary file not shown.
Binary file removed build/minecraft/data/images/armor/diamond_1.png
Binary file not shown.
Binary file removed build/minecraft/data/images/armor/diamond_2.png
Binary file not shown.
Binary file removed build/minecraft/data/images/armor/gold_1.png
Binary file not shown.
Binary file removed build/minecraft/data/images/armor/gold_2.png
Binary file not shown.
Binary file removed build/minecraft/data/images/armor/iron_1.png
Binary file not shown.
Binary file removed build/minecraft/data/images/armor/iron_2.png
Binary file not shown.
Binary file removed build/minecraft/data/images/art/kz.png
Binary file not shown.
Binary file removed build/minecraft/data/images/environment/clouds.png
Binary file not shown.
Binary file removed build/minecraft/data/images/font/default8.png
Binary file not shown.
Binary file removed build/minecraft/data/images/gui/background.png
Binary file not shown.
Binary file removed build/minecraft/data/images/gui/badge/minecon140.png
Binary file not shown.
Binary file removed build/minecraft/data/images/gui/bg32.png
Binary file not shown.
Binary file removed build/minecraft/data/images/gui/cursor.png
Binary file not shown.
Binary file removed build/minecraft/data/images/gui/default_world.png
Binary file not shown.
Binary file removed build/minecraft/data/images/gui/gui.png
Binary file not shown.
Binary file removed build/minecraft/data/images/gui/gui2.png
Binary file not shown.
Binary file removed build/minecraft/data/images/gui/gui_blocks.png
Binary file not shown.
Binary file removed build/minecraft/data/images/gui/icons.png
Binary file not shown.
Binary file removed build/minecraft/data/images/gui/itemframe.png
Binary file not shown.
Binary file removed build/minecraft/data/images/gui/items.png
Binary file not shown.
Binary file not shown.
Diff not rendered.
Binary file removed build/minecraft/data/images/gui/pi_title.png
Diff not rendered.
Binary file removed build/minecraft/data/images/gui/spritesheet.png
Diff not rendered.
Binary file removed build/minecraft/data/images/gui/title.png
Diff not rendered.
Binary file removed build/minecraft/data/images/gui/touchgui.png
Diff not rendered.
Binary file removed build/minecraft/data/images/item/arrows.png
Diff not rendered.
Binary file removed build/minecraft/data/images/item/camera.png
Diff not rendered.
Binary file removed build/minecraft/data/images/item/sign.png
Diff not rendered.
Binary file removed build/minecraft/data/images/mob/char.png
Diff not rendered.
Binary file removed build/minecraft/data/images/mob/chicken.png
Diff not rendered.
Binary file removed build/minecraft/data/images/mob/cow.png
Diff not rendered.
Binary file removed build/minecraft/data/images/mob/creeper.png
Diff not rendered.
Binary file removed build/minecraft/data/images/mob/pig.png
Diff not rendered.
Binary file removed build/minecraft/data/images/mob/pigzombie.png
Diff not rendered.
Binary file removed build/minecraft/data/images/mob/sheep.png
Diff not rendered.
Binary file removed build/minecraft/data/images/mob/sheep_fur.png
Diff not rendered.
Binary file removed build/minecraft/data/images/mob/skeleton.png
Diff not rendered.
Binary file removed build/minecraft/data/images/mob/spider.png
Diff not rendered.
Binary file removed build/minecraft/data/images/mob/zombie.png
Diff not rendered.
Binary file removed build/minecraft/data/images/particles.png
Diff not rendered.
Binary file removed build/minecraft/data/images/terrain.png
Diff not rendered.
Binary file removed build/minecraft/lib/brcm/libEGL.so
Binary file not shown.
Binary file removed build/minecraft/lib/brcm/libGLESv2.so
Binary file not shown.
1 change: 0 additions & 1 deletion build/minecraft/lib/mesa/libEGL.so

This file was deleted.

1 change: 0 additions & 1 deletion build/minecraft/lib/mesa/libGLESv2.so

This file was deleted.

Binary file removed build/minecraft/lib/mesa/libbcm_host.so.1.0
Binary file not shown.
Binary file removed build/minecraft/minecraft-pe
Binary file not shown.
13 changes: 0 additions & 13 deletions build/minecraft/minecraft-pe.sh

This file was deleted.

Binary file removed build/minecraft/minecraft-pi
Binary file not shown.
15 changes: 0 additions & 15 deletions build/minecraft/minecraft-pi.sh

This file was deleted.

Empty file removed build/minecraft/options.txt
Empty file.
1 change: 0 additions & 1 deletion libmcpi
Submodule libmcpi deleted from 86c941
1 change: 0 additions & 1 deletion mcpi-central
Submodule mcpi-central deleted from eae4b1
1 change: 0 additions & 1 deletion modpi
Submodule modpi deleted from 67297f
1 change: 0 additions & 1 deletion proxy
Submodule proxy deleted from 805af1
4 changes: 4 additions & 0 deletions res/DEBIAN/postinst
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/bash

bspatch /opt/minecraft-pi/minecraft-pi /opt/minecraft-pi/minecraft-pe /opt/minecraft-pi/pi2pe.bsdiff
rm -f /opt/minecraft-pi/pi2pe.bsdiff
Binary file added res/opt/minecraft-pi/pi2pe.bsdiff
Binary file not shown.
15 changes: 15 additions & 0 deletions res/usr/bin/minecraft-pe.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/bin/sh

cd /opt/minecraft-pi || exit

if grep -q okay /proc/device-tree/soc/v3d@7ec00000/status \
/proc/device-tree/soc/firmwarekms@7e600000/status 2> /dev/null; then
export LD_PRELOAD=libbcm_host.so.1.0
export LD_LIBRARY_PATH=lib/mesa
else
export LD_LIBRARY_PATH=lib/brcm
fi

export LD_PRELOAD=/usr/lib/libmodpi.so

./minecraft-pe
15 changes: 15 additions & 0 deletions res/usr/bin/minecraft-pi.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/bin/sh

cd /opt/minecraft-pi || exit

if grep -q okay /proc/device-tree/soc/v3d@7ec00000/status \
/proc/device-tree/soc/firmwarekms@7e600000/status 2> /dev/null; then
export LD_PRELOAD=libbcm_host.so.1.0
export LD_LIBRARY_PATH=lib/mesa
else
export LD_LIBRARY_PATH=lib/brcm
fi

export LD_PRELOAD="/usr/lib/libmodpi.so $LD_PRELOAD"

./minecraft-pi
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[Desktop Entry]
Name=MCPIL
Comment=Minecraft Pi Launcher
Exec=$(EXECUTABLE_PATH)
Exec=mcpil
Icon=mcpil
Terminal=false
Type=Application
Expand Down
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
61 changes: 0 additions & 61 deletions src/install.py

This file was deleted.

Loading

0 comments on commit badbfb8

Please sign in to comment.