Run GBM.exe with a script

This commit is contained in:
Sebastian Riedel
2017-11-19 13:59:17 +01:00
parent bd2b828bd3
commit 03becc209c
3 changed files with 25 additions and 3 deletions
+1 -2
View File
@@ -6,9 +6,8 @@ Name=Game Backup Monitor
Comment=Monitors games and backs up their savegames
Comment[de]=Beobachtet Spiele und sichert ihre Spielstände
Path=/usr/local/bin
TryExec=mono
Exec=mono gbm
Exec=gbm
Terminal=false
Icon=gbm
Executable
+20
View File
@@ -0,0 +1,20 @@
#!/bin/sh -e
#check for all dependencies
for prog in {mono,readlink,df,7za,libsqlite3};do
[ -n "`whereis -b ${prog} | cut -sd' ' -f2`" ] || (echo "Please install ${prog}" && exit 1);
done
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )";
echo "Located in ${DIR}";
GBMPATH='./';
#locate GBM.exe
if [ \( "${DIR}" == '/bin' \) -a \( -s '/usr/share/gbm/GBM.exe' \) ]; then
GBMPATH='/usr/share/gbm/';
elif [ \( "${DIR}" == '/usr/local/bin' \) -a \( -s '/usr/local/share/gbm/GBM.exe' \) ]; then
GBMPATH='/usr/local/share/gbm/';
elif [ ! -s './GBM.exe' ]; then
echo 'GBM.exe not found';
exit 2;
fi
mono --desktop ${GBMPATH}'GBM.exe' "$@";
exit 0;
+4 -1
View File
@@ -11,7 +11,9 @@ ifndef XDGUTILS
$(error "xdg-desktop-menu is not available, please install xdg-utils")
endif
#rename it in a way, it can easily started from terminal
install GBM.exe /usr/local/bin/gbm;
install gbm.sh /usr/local/bin/gbm;
install -d /usr/local/share/gbm;
install GBM.exe /usr/local/share/gbm/;
#install icon in different sizes
$(foreach size,$(ICONSIZES),xdg-icon-resource install --mode system --novendor --noupdate --size $(size) gbm_$(size)x$(size).png gbm;$(\n))
xdg-icon-resource forceupdate --mode system;
@@ -23,6 +25,7 @@ ifndef XDGUTILS
$(error "xdg-desktop-menu is not available, please install xdg-utils")
endif
rm /usr/local/bin/gbm;
rm -r /usr/local/share/gbm/;
$(foreach size,$(ICONSIZES),xdg-icon-resource uninstall --mode system --novendor --noupdate --size $(size) gbm;$(\n))
xdg-icon-resource forceupdate --mode system;
xdg-desktop-menu uninstall --mode system --novendor gbm.desktop;