aboutsummaryrefslogtreecommitdiff
path: root/tools/Linux
diff options
context:
space:
mode:
authorwsnipex <wsnipex@a1.net>2014-08-13 17:41:52 +0200
committerMemphiz <memphis@machzwo.de>2014-10-19 21:33:05 +0200
commit1b449ef4d6257bded5e83620e22a98fbd1e38c75 (patch)
tree1b85c94d6139317f440c0a476f689ff69307bf98 /tools/Linux
parentbaa6b5f04da28891e80b805a797ee278171d0134 (diff)
[rebrand][build sys] use dynamic application name
Diffstat (limited to 'tools/Linux')
-rw-r--r--tools/Linux/kodi-standalone.sh.in (renamed from tools/Linux/xbmc-standalone.sh.in)8
-rw-r--r--tools/Linux/kodi-standalone.sh.pulse (renamed from tools/Linux/xbmc-standalone.sh.pulse)0
-rw-r--r--tools/Linux/kodi-xsession.desktop.in6
-rw-r--r--tools/Linux/kodi.desktop (renamed from tools/Linux/xbmc.desktop)10
-rw-r--r--tools/Linux/kodi.sh.in (renamed from tools/Linux/xbmc.sh.in)26
-rw-r--r--tools/Linux/xbmc-xsession.desktop6
6 files changed, 30 insertions, 26 deletions
diff --git a/tools/Linux/xbmc-standalone.sh.in b/tools/Linux/kodi-standalone.sh.in
index 48c2658501..d6069ea49b 100644
--- a/tools/Linux/xbmc-standalone.sh.in
+++ b/tools/Linux/kodi-standalone.sh.in
@@ -18,10 +18,12 @@
# the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
# http://www.gnu.org/copyleft/gpl.html
+APP=@APP_NAME@
prefix="@prefix@"
exec_prefix="@exec_prefix@"
bindir="@bindir@"
-KODI="${bindir}/kodi --standalone $@"
+bin_name=$(echo $APP | tr '[:upper:]' '[:lower:]')
+APP="${bindir}/${bin_name} --standalone $@"
@XBMC_STANDALONE_SH_PULSE@
@@ -31,7 +33,7 @@ LASTSUCCESSFULSTART=$(date +%s)
while [ $(( $LOOP )) = "1" ]
do
- $KODI
+ $APP
RET=$?
NOW=$(date +%s)
if [ $(( ($RET >= 64 && $RET <=66) || $RET == 0 )) = "1" ]; then # clean exit
@@ -45,7 +47,7 @@ do
CRASHCOUNT=$((CRASHCOUNT+1))
if [ $(($CRASHCOUNT >= 3)) = "1" ]; then # Too many, bail out
LOOP=0
- echo "KODI has exited uncleanly 3 times in the last ${DIFF} seconds."
+ echo "${APP} has exited uncleanly 3 times in the last ${DIFF} seconds."
echo "Something is probably wrong"
fi
fi
diff --git a/tools/Linux/xbmc-standalone.sh.pulse b/tools/Linux/kodi-standalone.sh.pulse
index c4d5564344..c4d5564344 100644
--- a/tools/Linux/xbmc-standalone.sh.pulse
+++ b/tools/Linux/kodi-standalone.sh.pulse
diff --git a/tools/Linux/kodi-xsession.desktop.in b/tools/Linux/kodi-xsession.desktop.in
new file mode 100644
index 0000000000..73436dbd2b
--- /dev/null
+++ b/tools/Linux/kodi-xsession.desktop.in
@@ -0,0 +1,6 @@
+[Desktop Entry]
+Name=@APP_NAME@
+Comment=This session will start @APP_NAME@ Media Center
+Exec=@APP_NAME_LC@-standalone
+TryExec=@APP_NAME_LC@-standalone
+Type=Application
diff --git a/tools/Linux/xbmc.desktop b/tools/Linux/kodi.desktop
index 02bb368aae..351be2e9a0 100644
--- a/tools/Linux/xbmc.desktop
+++ b/tools/Linux/kodi.desktop
@@ -2,9 +2,9 @@
Version=1.0
Name=KODI Media Center
GenericName=Media Center
-Comment=Manage and view your media
-Exec=xbmc
-Icon=xbmc
+Comment=Manage and view your media
+Exec=kodi
+Icon=kodi
Terminal=false
Type=Application
Categories=AudioVideo;Video;Player;TV;
@@ -13,10 +13,10 @@ Actions=Fullscreen;Standalone;
[Desktop Action Fullscreen]
Name=Open in fullscreen
-Exec=xbmc -fs
+Exec=kodi -fs
OnlyShowIn=Unity;
[Desktop Action Standalone]
Name=Open in standalone mode
-Exec=xbmc --standalone
+Exec=kodi --standalone
OnlyShowIn=Unity;
diff --git a/tools/Linux/xbmc.sh.in b/tools/Linux/kodi.sh.in
index 31b5234df1..bd361d4e38 100644
--- a/tools/Linux/xbmc.sh.in
+++ b/tools/Linux/kodi.sh.in
@@ -18,6 +18,8 @@
# the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
# http://www.gnu.org/copyleft/gpl.html
+APP=@APP_NAME@
+bin_name=$(echo $APP | tr '[:upper:]' '[:lower:]')
SAVED_ARGS="$@"
prefix="@prefix@"
exec_prefix="@exec_prefix@"
@@ -25,7 +27,7 @@ datarootdir="@datarootdir@"
LIBDIR="@libdir@"
CRASHLOG_DIR=${CRASHLOG_DIR:-$HOME}
-[ "$(basename $0)" == "xbmc" ] && echo "WARNING: running kodi as "xbmc" is deprecated and will be removed in later versions, please switch to using the kodi binary"
+[ "$(basename $0)" == "xbmc" ] && echo "WARNING: running ${bin_name} as "xbmc" is deprecated and will be removed in later versions, please switch to using the ${bin_name} binary"
# Check for some options used by this script
while [ "$#" -gt "0" ]
@@ -50,23 +52,23 @@ single_stacktrace()
{
# core filename is either "core.$PID" or "core"
find "$1" -maxdepth $2 -name 'core*' | while read core; do
- LC_ALL=C gdb --core="$core" --batch 2> /dev/null | grep -q "^Core was generated by \`$LIBDIR/kodi/kodi.bin" || continue
+ LC_ALL=C gdb --core="$core" --batch 2> /dev/null | grep -q "^Core was generated by \`$LIBDIR/${bin_name}/${bin_name}.bin" || continue
echo "=====> Core file: "$core" ($(stat -c%y "$core"))" >> $FILE
echo " =========================================" >> $FILE
- gdb "$LIBDIR/xbmc/xbmc.bin" --core="$core" --batch -ex "thread apply all bt" 2> /dev/null >> $FILE
+ gdb "$LIBDIR/${bin_name}/${bin_name}.bin" --core="$core" --batch -ex "thread apply all bt" 2> /dev/null >> $FILE
rm -f "$core"
done
}
print_crash_report()
{
- FILE="$CRASHLOG_DIR/kodi_crashlog-`date +%Y%m%d_%H%M%S`.log"
- echo "############## KODI CRASH LOG ###############" >> $FILE
+ FILE="$CRASHLOG_DIR/${bin_name}_crashlog-`date +%Y%m%d_%H%M%S`.log"
+ echo "############## $APP CRASH LOG ###############" >> $FILE
echo >> $FILE
echo "################ SYSTEM INFO ################" >> $FILE
echo -n " Date: " >> $FILE
date >> $FILE
- echo " KODI Options: $*" >> $FILE
+ echo " $APP Options: $*" >> $FILE
echo -n " Arch: " >> $FILE
uname -m >> $FILE
echo -n " Kernel: " >> $FILE
@@ -86,14 +88,14 @@ print_crash_report()
echo "############### STACK TRACE #################" >> $FILE
if command_exists gdb; then
if command_exists systemd-coredumpctl; then
- systemd-coredumpctl dump -o core xbmc.bin > /dev/null 2>&1
+ systemd-coredumpctl dump -o core ${bin_name}.bin > /dev/null 2>&1
fi
single_stacktrace "$PWD" 1
# Find in plugins directories
if [ $XBMC_HOME ]; then
BASEDIR=$XBMC_HOME
else
- BASEDIR="$LIBDIR/xbmc/"
+ BASEDIR="$LIBDIR/${bin_name}/"
fi
single_stacktrace "$BASEDIR" 5
# find in user xbmc dir
@@ -117,11 +119,11 @@ print_crash_report()
echo >> $FILE
echo "############### END LOG FILE ################" >> $FILE
echo >> $FILE
- echo "############ END KODI CRASH LOG #############" >> $FILE
+ echo "############ END $APP CRASH LOG #############" >> $FILE
echo "Crash report available at $FILE"
}
-python @datadir@/xbmc/FEH.py $SAVED_ARGS
+python @datadir@/${bin_name}/FEH.py $SAVED_ARGS
RET=$?
if [ $RET -ne 0 ]; then
exit $RET
@@ -131,7 +133,7 @@ if command_exists gdb; then
# Output warning in case ulimit is unsupported by shell
eval ulimit -c unlimited
if [ ! $? = "0" ]; then
- echo "kodi: ulimit is unsupported by this shell" 1>&2
+ echo "${bin_name}: ulimit is unsupported by this shell" 1>&2
fi
fi
@@ -139,7 +141,7 @@ LOOP=1
while [ $(( $LOOP )) = "1" ]
do
LOOP=0
- "$LIBDIR/xbmc/xbmc.bin" $SAVED_ARGS
+ "$LIBDIR/${bin_name}/${bin_name}.bin" $SAVED_ARGS
RET=$?
if [ $(( $RET == 65 )) = "1" ]
then # User requested to restart app
diff --git a/tools/Linux/xbmc-xsession.desktop b/tools/Linux/xbmc-xsession.desktop
deleted file mode 100644
index f2dfe4d4ed..0000000000
--- a/tools/Linux/xbmc-xsession.desktop
+++ /dev/null
@@ -1,6 +0,0 @@
-[Desktop Entry]
-Name=KODI
-Comment=This session will start KODI Media Center
-Exec=kodi-standalone
-TryExec=kodi-standalone
-Type=Application