PortableLinuxGames/quickAppDir

32 lines
869 B
Plaintext
Raw Normal View History

2013-03-16 05:09:28 -07:00
#!/bin/bash
2013-04-14 05:05:22 -07:00
# Author : Ismael Barros² <ismael@barros2.org>
# License : BSD http://en.wikipedia.org/wiki/BSD_license
2013-03-16 05:09:28 -07:00
pg4l_dir=$(dirname $(readlink -f $0))
2013-12-08 15:52:01 -08:00
. "$pg4l_dir/util.sh"
2013-03-16 05:09:28 -07:00
if [ -z "$*" ]; then
echo "Usage: $0 [binary]"
fi
2013-11-28 17:09:02 -08:00
for i in util.sh AppRun.desktop AppRun.png; do
2013-12-01 05:21:12 -08:00
{ [ -f "$i" ] || cp -v "$pg4l_dir/data/$i" "$i"; } || exit 1
2013-11-28 17:09:02 -08:00
done
2013-11-26 00:07:34 -08:00
if [ -f "$1" -a "${1##*.}" = "jar" ]; then
2013-12-01 05:21:12 -08:00
cp -v "$pg4l_dir/data/AppRun_java" AppRun || exit 1
2013-11-28 17:09:02 -08:00
desktopFile_setParameter "AppRun.desktop" "X-AppImage-Tags" "java"
2013-11-26 00:07:34 -08:00
else
2013-12-08 15:52:01 -08:00
cp -v "$pg4l_dir"/data/AppRun_quick AppRun || exit 1
2013-11-26 00:07:34 -08:00
fi
2013-04-14 05:05:22 -07:00
2013-12-08 15:52:01 -08:00
binary="$1"
if [ "$binary" ]; then
echo "Using binary $binary"
2013-03-26 08:14:00 -07:00
sed -e "s|_BINARY_|$1|g" AppRun -i
2013-11-28 17:09:02 -08:00
desktopFile_setParameter "AppRun.desktop" "Name" "$1 r1"
desktopFile_setParameter "AppRun.desktop" "X-AppImage-Title" "$1"
2013-03-16 05:09:28 -07:00
fi
2013-11-28 17:09:02 -08:00
desktopFile_setParameter "AppRun.desktop" "X-AppImage-Release" "1"