PortableLinuxGames/unity2AppDir

40 lines
1.1 KiB
Plaintext
Raw Permalink Normal View History

2013-11-28 17:07:51 -08:00
#!/bin/bash
# Author : Ismael Barros² <ismael@barros2.org>
# License : BSD http://en.wikipedia.org/wiki/BSD_license
pg4l_dir=$(dirname $(readlink -f $0))
2013-11-30 08:51:52 -08:00
. "$pg4l_dir/util.sh"
2013-11-28 17:07:51 -08:00
if [ -z "$*" ]; then
echo "Usage: $0 [binary]"
exit
fi
binary="$1"
appName="${binary%.*}"
2013-11-30 08:51:52 -08:00
appDir="$PWD"
2013-11-28 17:07:51 -08:00
2013-11-30 08:51:52 -08:00
#appDir="${appName}.AppDir"
#mkdir -p "$appDir" || exit 1
#cp -av "$binary" "${appName}_Data" "$appDir" || exit 1
#pushd "$appDir"
2013-11-28 17:07:51 -08:00
2013-12-01 05:21:12 -08:00
cp -v "$pg4l_dir/data/AppRun_quick" AppRun || exit 1
2013-11-28 17:07:51 -08:00
for i in AppRun.desktop AppRun.png util.sh; do
2013-12-01 05:21:12 -08:00
{ [ -f "$i" ] || cp -v "$pg4l_dir/data/$i" "$i"; } || exit 1
2013-11-28 17:07:51 -08:00
done
sed -e "s|_BINARY_|$binary|g" AppRun -i
2013-12-01 05:21:12 -08:00
Suffix=-unity
desktopFile_setParameter "AppRun.desktop" "Name" "$appName r1$suffix"
2013-11-28 17:07:51 -08:00
desktopFile_setParameter "AppRun.desktop" "X-AppImage-Title" "$appName"
desktopFile_setParameter "AppRun.desktop" "X-AppImage-Release" "1"
desktopFile_setParameter "AppRun.desktop" "X-AppImage-ID" "$appName"
2013-12-01 05:21:12 -08:00
desktopFile_setParameter "AppRun.desktop" "X-AppImage-Tags" "Unity"
2013-11-28 17:07:51 -08:00
2014-06-28 13:05:37 -07:00
if [ -f *_Data/Resources/UnityPlayer.png ]; then
convert -resize 48x *_Data/Resources/UnityPlayer.png AppRun.png
fi
2013-11-30 08:51:52 -08:00
#popd