diff --git a/apps/Heroes 2/description b/apps/Heroes 2/description new file mode 100644 index 0000000..0b11ad2 --- /dev/null +++ b/apps/Heroes 2/description @@ -0,0 +1,4 @@ +Free implementation of Heroes of Might and Magic II game engine. +This package installs the shareware version, if you own the full game you can copy the game data to ~/.fheroes2 directory (replacing existing files). +To run: Menu -> Games -> Free Heroes 2 +To run in a terminal: ~/.fheroes2/fheroes2-rpi diff --git a/apps/Heroes 2/icon-24.png b/apps/Heroes 2/icon-24.png new file mode 100644 index 0000000..3100cd3 Binary files /dev/null and b/apps/Heroes 2/icon-24.png differ diff --git a/apps/Heroes 2/icon-64.png b/apps/Heroes 2/icon-64.png new file mode 100644 index 0000000..107b023 Binary files /dev/null and b/apps/Heroes 2/icon-64.png differ diff --git a/apps/Heroes 2/install-32 b/apps/Heroes 2/install-32 new file mode 100755 index 0000000..d9734e6 --- /dev/null +++ b/apps/Heroes 2/install-32 @@ -0,0 +1,39 @@ +#!/bin/bash + +DIRECTORY="$(dirname "$(dirname "$( cd "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )")")" + +function error { + echo -e "\\e[91m$1\\e[39m" + exit 1 +} + +"${DIRECTORY}/pkg-install" "libsdl2-mixer-2.0 libsdl2-ttf-2.0" "$(dirname "$0")" || exit 1 + +mkdir ~/.fheroes2 +cd ~/.fheroes2 + +# rename existing files to lower case +for i in $( ls | grep [A-Z] ); do mv -f $i `echo $i | tr 'A-Z' 'a-z'`; done + +if [ ! -e data ]; then + echo No game content detected, downloading shareware version + wget -q --show-progress https://archive.org/download/HeroesofMightandMagicIITheSuccessionWars_1020/h2demo.zip + unzip h2demo.zip + rm h2demo.zip +fi + +wget -N -q --show-progress https://github.com/dimag0g/fheroes2/releases/download/0.9.1-switch/fheroes2-rpi # || error "failed to download the executable!" +chmod a+x fheroes2-rpi + +echo "[Desktop Entry] +Name=Free Heroes 2 +Comment=Fheroes2 source port of Heroes of Might and Magic II +Exec=$HOME/.fheroes2/fheroes2-rpi +Icon=$(dirname "$0")/icon-64.png +Terminal=true +Type=Application +Categories=Game; +StartupNotify=false +" > ~/.local/share/applications/fheroes2.desktop || error "Failed to create menu entry!" + +exit 0 diff --git a/apps/Heroes 2/uninstall b/apps/Heroes 2/uninstall new file mode 100755 index 0000000..46d4ecb --- /dev/null +++ b/apps/Heroes 2/uninstall @@ -0,0 +1,7 @@ +#!/bin/bash + +DIRECTORY="$(dirname "$(dirname "$( cd "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )")")" + +rm -fr ~/.fheroes2 +rm ~/.local/share/applications/fheroes2.desktop +"${DIRECTORY}/purge-installed" "$(dirname "$0")" || exit 1 diff --git a/apps/Heroes 2/website b/apps/Heroes 2/website new file mode 100644 index 0000000..ffb986f --- /dev/null +++ b/apps/Heroes 2/website @@ -0,0 +1 @@ +https://github.com/ihhub/fheroes2 \ No newline at end of file diff --git a/data/categories/structure b/data/categories/structure index a93ef46..d131c52 100644 --- a/data/categories/structure +++ b/data/categories/structure @@ -28,6 +28,7 @@ FreeTube|Multimedia Geany Dark Mode|Eyecandy Github-CLI|Tools Godot Engine 3.2.4|Games +Heroes 2|Games Intellij IDEA|Editors Interactive Brokers TW|Tools jGRASP IDE|Editors