aboutsummaryrefslogtreecommitdiff
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
parentbaa6b5f04da28891e80b805a797ee278171d0134 (diff)
[rebrand][build sys] use dynamic application name
-rw-r--r--Makefile.in114
-rw-r--r--Makefile.include.in4
-rw-r--r--configure.in13
-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
-rw-r--r--xbmc/windowing/X11/XRandR.cpp24
10 files changed, 114 insertions, 97 deletions
diff --git a/Makefile.in b/Makefile.in
index 148b7e2fbf..658745a8d1 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -269,19 +269,19 @@ CXXFLAGS=@CXXFLAGS@
LDFLAGS=@LDFLAGS@
INCLUDES=$(sort @INCLUDES@)
-CLEAN_FILES=xbmc.bin xbmc-xrandr libxbmc.so
+CLEAN_FILES=@APP_NAME_LC@.bin @APP_NAME_LC@-xrandr lib@APP_NAME_LC@.so
-DISTCLEAN_FILES=config.h config.log config.status tools/Linux/xbmc.sh \
- tools/Linux/xbmc-standalone.sh autom4te.cache config.h.in~ \
+DISTCLEAN_FILES=config.h config.log config.status tools/Linux/@APP_NAME_LC@.sh \
+ tools/Linux/@APP_NAME_LC@-standalone.sh autom4te.cache config.h.in~ \
system/libcpluff-@ARCH@.so
ifeq (@USE_LIBXBMC@,1)
-FINAL_TARGETS+=libxbmc.so
+FINAL_TARGETS+=lib@APP_NAME_LC@.so
ifeq (@USE_ANDROID@,1)
FINAL_TARGETS+=skins
endif
else
-FINAL_TARGETS=xbmc.bin skins xbmc-xrandr
+FINAL_TARGETS=@APP_NAME_LC@.bin skins @APP_NAME_LC@-xrandr
endif
FINAL_TARGETS+=Makefile externals
@@ -326,7 +326,7 @@ sse4 : force
$(MAKE) -C xbmc/linux/sse4
endif
-CHECK_PROGRAMS = xbmc-test
+CHECK_PROGRAMS = @APP_NAME_LC@-test
CLEAN_FILES += $(CHECK_PROGRAMS) $(CHECK_EXTENSIONS)
@@ -406,7 +406,7 @@ dvdpcodecs: dllloader
$(MAKE) -C lib/libdvd
ifeq (@USE_LIBSTAGEFRIGHT@,1)
-dvdpextcodecs: libxbmc.so
+dvdpextcodecs: lib@APP_NAME_LC@.so
$(MAKE) -C xbmc/cores/dvdplayer/DVDCodecs/Video/libstagefrightICS
else
dvdpextcodecs:
@@ -518,36 +518,36 @@ $(NWAOBJSXBMC) $(DIRECTORY_ARCHIVES) $(MAINOBJS): force
# Binary Addon bindings
include xbmc/addons/addon-bindings.mk
-libxbmc.so: $(OBJSXBMC) $(DYNOBJSXBMC) $(NWAOBJSXBMC) $(MAINOBJS)
+lib@APP_NAME_LC@.so: $(OBJSXBMC) $(DYNOBJSXBMC) $(NWAOBJSXBMC) $(MAINOBJS)
ifeq ($(findstring osx,@ARCH@), osx)
$(SILENT_LD) $(CXX) $(LDFLAGS) -bundle -o $@ $(MAINOBJS) -Wl,-all_load,-ObjC $(MAINOBJS) $(DYNOBJSXBMC) $(NWAOBJSXBMC) $(OBJSXBMC) $(LIBS) -read_only_relocs suppress
else
$(SILENT_LD) $(CXX) $(CXXFLAGS) $(LDFLAGS) -shared -o $@ -Wl,--whole-archive $(MAINOBJS) -Wl,--no-whole-archive,--start-group $(MAINOBJS) $(DYNOBJSXBMC) $(OBJSXBMC) -Wl,--end-group -Wl,--no-undefined $(NWAOBJSXBMC) $(LIBS)
endif
-xbmc.bin: $(OBJSXBMC) $(DYNOBJSXBMC) $(NWAOBJSXBMC) $(MAINOBJS)
+@APP_NAME_LC@.bin: $(OBJSXBMC) $(DYNOBJSXBMC) $(NWAOBJSXBMC) $(MAINOBJS)
ifeq ($(findstring osx,@ARCH@), osx)
- $(SILENT_LD) $(CXX) $(LDFLAGS) -o xbmc.bin $(MAINOBJS) -Wl,-all_load,-ObjC $(MAINOBJS) $(DYNOBJSXBMC) $(NWAOBJSXBMC) $(OBJSXBMC) $(LIBS) -rdynamic
+ $(SILENT_LD) $(CXX) $(LDFLAGS) -o @APP_NAME_LC@.bin $(MAINOBJS) -Wl,-all_load,-ObjC $(MAINOBJS) $(DYNOBJSXBMC) $(NWAOBJSXBMC) $(OBJSXBMC) $(LIBS) -rdynamic
else
- $(SILENT_LD) $(CXX) $(CXXFLAGS) $(LDFLAGS) -o xbmc.bin $(MAINOBJS) -Wl,--start-group $(MAINOBJS) $(DYNOBJSXBMC) $(OBJSXBMC) -Wl,--end-group $(NWAOBJSXBMC) $(LIBS) -rdynamic
+ $(SILENT_LD) $(CXX) $(CXXFLAGS) $(LDFLAGS) -o @APP_NAME_LC@.bin $(MAINOBJS) -Wl,--start-group $(MAINOBJS) $(DYNOBJSXBMC) $(OBJSXBMC) -Wl,--end-group $(NWAOBJSXBMC) $(LIBS) -rdynamic
endif
-xbmc-xrandr: xbmc-xrandr.c
+@APP_NAME_LC@-xrandr: xbmc-xrandr.c
ifneq (1,@USE_XRANDR@)
# xbmc-xrandr.c gets picked up by the default make rules
- @echo "excluding xbmc-xrandr"
+ @echo "excluding @APP_NAME_LC@-xrandr"
else
- $(SILENT_LD) $(CC) $(CFLAGS) $(LDFLAGS) -o xbmc-xrandr xbmc-xrandr.c -lXrandr -lX11 -lm
+ $(SILENT_LD) $(CC) $(CFLAGS) $(LDFLAGS) -o @APP_NAME_LC@-xrandr xbmc-xrandr.c -lXrandr -lX11 -lm
endif
tools/TexturePacker/TexturePacker: xbmc/guilib/XBTF.h
$(MAKE) -C tools/TexturePacker/
-install-bin: xbmc.bin # developement convenience target
+install-bin: @APP_NAME_LC@.bin # developement convenience target
sudo install -d $(DESTDIR)$(libdir)
- sudo install xbmc.bin $(DESTDIR)$(libdir)/xbmc
+ sudo install @APP_NAME_LC@.bin $(DESTDIR)$(libdir)/@APP_NAME_LC@
ifeq ($(findstring osx,@ARCH@), osx)
# TODO: add osx install
@@ -561,16 +561,16 @@ apk-clean:
make -C tools/android/packaging clean
install-binaries: install-scripts
- @echo "Copying Kodi binary to $(DESTDIR)$(libdir)/kodi/"
- @install -d $(DESTDIR)$(libdir)/kodi
+ @echo "Copying @APP_NAME_LC@ binary to $(DESTDIR)$(libdir)/@APP_NAME_LC@/"
+ @install -d $(DESTDIR)$(libdir)/@APP_NAME_LC@
ifeq (1,@USE_XRANDR@)
- @install xbmc-xrandr $(DESTDIR)$(libdir)/xbmc/xbmc-xrandr
+ @install @APP_NAME_LC@-xrandr $(DESTDIR)$(libdir)/@APP_NAME_LC@/@APP_NAME_LC@-xrandr
endif
ifeq (@USE_LIBXBMC@,1)
- @install libxbmc.so $(DESTDIR)$(libdir)/xbmc/libxbmc.so
+ @install lib@APP_NAME_LC@.so $(DESTDIR)$(libdir)/@APP_NAME_LC@/lib@APP_NAME_LC@.so
else
- @install xbmc.bin $(DESTDIR)$(libdir)/xbmc/xbmc.bin
- @echo "You can run XBMC with the command 'xbmc'"
+ @install @APP_NAME_LC@.bin $(DESTDIR)$(libdir)/@APP_NAME_LC@/@APP_NAME_LC@.bin
+ @echo "You can run @APP_NAME_LC@ with the command '@APP_NAME_LC@'"
endif
endif
@@ -582,34 +582,34 @@ endif
ifeq ($(findstring freebsd,@ARCH@), freebsd)
@find -E system addons -type f -not -iregex ".*\.git.*" \
-iregex ".*@ARCH@.*|.*\.vis|.*\.xbs" \
- -exec sh -c "install -d \"$(DESTDIR)$(libdir)/xbmc/\`dirname '{}'\`\"" \; \
+ -exec sh -c "install -d \"$(DESTDIR)$(libdir)/@APP_NAME_LC@/\`dirname '{}'\`\"" \; \
-and \
- -exec install "{}" $(DESTDIR)$(libdir)/xbmc/"{}" \; \
+ -exec install "{}" $(DESTDIR)$(libdir)/@APP_NAME_LC@/"{}" \; \
-exec printf " -- %-75.75s\r" "{}" \;
else
ifeq ($(findstring Darwin,$(shell uname -s)),Darwin)
@find -E system addons -type f -not -iregex ".*\.git.*" \
-iregex ".*@ARCH@.*|.*\.vis|.*\.xbs" \
- -exec sh -c "install -d \"$(DESTDIR)$(libdir)/xbmc/\`dirname '{}'\`\"" \; \
+ -exec sh -c "install -d \"$(DESTDIR)$(libdir)/@APP_NAME_LC@/\`dirname '{}'\`\"" \; \
-and \
-exec install "{}" $(DESTDIR)$(libdir)/xbmc/"{}" \; \
-exec printf " -- %-75.75s\r" "{}" \;
else
- @find system addons -regextype posix-extended -type f -not -iregex ".*\.git.*" -iregex ".*\.so|.*\.vis|.*\.xbs|.*\.pvr" -exec install -D "{}" $(DESTDIR)$(libdir)/xbmc/"{}" \; -printf " -- %-75.75f\r"
+ @find system addons -regextype posix-extended -type f -not -iregex ".*\.git.*" -iregex ".*\.so|.*\.vis|.*\.xbs|.*\.pvr" -exec install -D "{}" $(DESTDIR)$(libdir)/@APP_NAME_LC@/"{}" \; -printf " -- %-75.75f\r"
endif
endif
install-scripts:
@install -d $(DESTDIR)$(bindir)
- @install tools/Linux/kodi.sh $(DESTDIR)$(bindir)/kodi
- @cd $(DESTDIR)$(bindir) && ln -s kodi xbmc
- @install tools/Linux/kodi-standalone.sh $(DESTDIR)$(bindir)/kodi-standalone
- @cd $(DESTDIR)$(bindir) && ln -s kodi-standalone xbmc-standalone
- @install -d $(DESTDIR)$(datarootdir)/kodi
- @install -m 0644 tools/Linux/FEH.py $(DESTDIR)$(datarootdir)/kodi/FEH.py
+ @install tools/Linux/@APP_NAME_LC@.sh $(DESTDIR)$(bindir)/@APP_NAME_LC@
+ @cd $(DESTDIR)$(bindir); [ -L xbmc ] || ln -s @APP_NAME_LC@ xbmc
+ @install tools/Linux/@APP_NAME_LC@-standalone.sh $(DESTDIR)$(bindir)/@APP_NAME_LC@-standalone
+ @cd $(DESTDIR)$(bindir); [ -L xbmc-standalone ] || ln -s @APP_NAME_LC@-standalone xbmc-standalone
+ @install -d $(DESTDIR)$(datarootdir)/@APP_NAME_LC@
+ @install -m 0644 tools/Linux/FEH.py $(DESTDIR)$(datarootdir)/@APP_NAME_LC@/FEH.py
@install -d $(DESTDIR)$(datarootdir)/xsessions
- @install -m 0644 tools/Linux/kodi-xsession.desktop $(DESTDIR)$(datarootdir)/xsessions/kodi.desktop
- @cd $(DESTDIR)$(datarootdir)/xsessions && ln -s kodi.desktop xbmc.desktop
+ @install -m 0644 tools/Linux/@APP_NAME_LC@-xsession.desktop $(DESTDIR)$(datarootdir)/xsessions/@APP_NAME_LC@.desktop
+ @cd $(DESTDIR)$(datarootdir)/xsessions; [ -L xbmc.desktop ] || ln -s @APP_NAME_LC@.desktop xbmc.desktop
install-datas: install-scripts
@echo "Copying support and legal files..."
@@ -618,15 +618,15 @@ install-datas: install-scripts
install -m 0644 "$$FILE" "$(DESTDIR)$(docdir)/$$FILE"; done
@install -m 0644 "docs/README.linux" "$(DESTDIR)$(docdir)/README.linux"
@echo "Done!"
- @echo "Copying system files to $(DESTDIR)$(datarootdir)/xbmc"
- @install -d $(DESTDIR)$(datarootdir)/xbmc
+ @echo "Copying system files to $(DESTDIR)$(datarootdir)/@APP_NAME_LC@"
+ @install -d $(DESTDIR)$(datarootdir)/@APP_NAME_LC@
@# Arch independent files
ifeq ($(findstring bsd,@ARCH@), bsd)
@find -E addons language media sounds userdata system -type f \
-not -iregex ".*@ARCH@.*|.*\.vis|.*\.xbs|.*\.git.*|.*\.so|.*\.dll|$(subst ${space},|,$(INSTALL_FILTER))" \
- -exec sh -c "install -d \"$(DESTDIR)$(datarootdir)/xbmc/\`dirname '{}'\`\"" \; \
+ -exec sh -c "install -d \"$(DESTDIR)$(datarootdir)/@APP_NAME_LC@/\`dirname '{}'\`\"" \; \
-and \
- -exec install -m 0644 "{}" $(DESTDIR)$(datarootdir)/xbmc/"{}" \; \
+ -exec install -m 0644 "{}" $(DESTDIR)$(datarootdir)/@APP_NAME_LC@/"{}" \; \
-exec printf " -- %-75.75s\r" "{}" \;
else
ifeq ($(findstring Darwin,$(shell uname -s)),Darwin)
@@ -637,42 +637,42 @@ ifeq ($(findstring Darwin,$(shell uname -s)),Darwin)
-exec install -m 0644 "{}" $(DESTDIR)$(datarootdir)/xbmc/"{}" \; \
-exec printf " -- %-75.75s\r" "{}" \;
else
- @find addons language media sounds userdata system -regextype posix-extended -type f -not -iregex ".*@ARCH@.*|.*\.vis|.*\.xbs|.*\.git.*|.*\.so|.*\.dll|.*\.pvr|$(subst ${space},|,$(INSTALL_FILTER))" -exec install -D -m 0644 "{}" $(DESTDIR)$(datarootdir)/xbmc/"{}" \; -printf " -- %-75.75f\r"
+ @find addons language media sounds userdata system -regextype posix-extended -type f -not -iregex ".*@ARCH@.*|.*\.vis|.*\.xbs|.*\.git.*|.*\.so|.*\.dll|.*\.pvr|$(subst ${space},|,$(INSTALL_FILTER))" -exec install -D -m 0644 "{}" $(DESTDIR)$(datarootdir)/@APP_NAME_LC@/"{}" \; -printf " -- %-75.75f\r"
endif
endif
@# Icons and links
@install -d $(DESTDIR)$(datarootdir)/applications
- @install -m 0644 tools/Linux/xbmc.desktop $(DESTDIR)$(datarootdir)/applications/xbmc.desktop
+ @install -m 0644 tools/Linux/@APP_NAME_LC@.desktop $(DESTDIR)$(datarootdir)/applications/@APP_NAME_LC@.desktop
@install -d $(DESTDIR)$(datadir)/icons/hicolor/48x48/apps
- @install -m 0644 media/icon48x48.png $(DESTDIR)$(datadir)/icons/hicolor/48x48/apps/xbmc.png
+ @install -m 0644 media/icon48x48.png $(DESTDIR)$(datadir)/icons/hicolor/48x48/apps/@APP_NAME_LC@.png
@install -d $(DESTDIR)$(datadir)/icons/hicolor/256x256/apps
- @install -m 0644 media/icon256x256.png $(DESTDIR)$(datadir)/icons/hicolor/256x256/apps/xbmc.png
+ @install -m 0644 media/icon256x256.png $(DESTDIR)$(datadir)/icons/hicolor/256x256/apps/@APP_NAME_LC@.png
@test -z "$(DESTDIR)" && gtk-update-icon-cache -f -q -t $(datadir)/icons/hicolor || :
- @echo "Copying bindings to $(DESTDIR)$(includedir)/xbmc"
- @install -d $(DESTDIR)$(includedir)/xbmc
+ @echo "Copying bindings to $(DESTDIR)$(includedir)/@APP_NAME_LC@"
+ @install -d $(DESTDIR)$(includedir)/@APP_NAME_LC@
@for f in $(BINDINGS); do \
- install -m 0644 $$f $(DESTDIR)$(includedir)/xbmc ; \
+ install -m 0644 $$f $(DESTDIR)$(includedir)/@APP_NAME_LC@ ; \
done
@for f in project/cmake/*.cmake; do \
- install -m 0644 $$f $(DESTDIR)$(libdir)/xbmc; \
+ install -m 0644 $$f $(DESTDIR)$(libdir)/@APP_NAME_LC@; \
done
@for f in project/cmake/scripts/common/*.cmake; do \
- install -m 0644 $$f $(DESTDIR)$(libdir)/xbmc; \
+ install -m 0644 $$f $(DESTDIR)$(libdir)/@APP_NAME_LC@; \
done
uninstall:
- @echo "Removing XBMC..."
- @rm -rf $(DESTDIR)$(libdir)/xbmc
- @rm -rf $(DESTDIR)$(datarootdir)/xbmc $(DESTDIR)$(bindir)/xbmc
- @rm -rf $(DESTDIR)$(bindir)/xbmc-standalone
- @rm -rf $(DESTDIR)$(datarootdir)/xsessions/XBMC.desktop
- @rm -rf $(libdir)/libXBMC_*
- @rm -rf $(prefix)/include/xbmc
+ @echo "Removing Kodi..."
+ @rm -rf $(DESTDIR)$(libdir)/@APP_NAME_LC@
+ @rm -rf $(DESTDIR)$(datarootdir)/@APP_NAME_LC@ $(DESTDIR)$(bindir)/@APP_NAME_LC@
+ @rm -rf $(DESTDIR)$(bindir)/@APP_NAME_LC@-standalone
+ @rm -rf $(DESTDIR)$(datarootdir)/xsessions/@APP_NAME_LC@.desktop
+ @rm -rf $(libdir)/lib@APP_NAME_LC@_*
+ @rm -rf $(prefix)/include/@APP_NAME_LC@
@echo "Done!"
-clean-xbmc.bin:
- rm -f xbmc.bin
+clean-@APP_NAME_LC@.bin:
+ rm -f @APP_NAME_LC@.bin
for d in $(BIN_DIRS); do if test -f $$d/Makefile; then $(MAKE) -C $$d clean; fi; done
clean-eventclients:
for d in $(EC_DIRS); do if test -f $$d/Makefile; then $(MAKE) -C $$d clean; fi; done
@@ -716,7 +716,7 @@ $(GTEST_DIR)/Makefile: force
$(CHECK_LIBS): force
@$(MAKE) $(if $(V),,-s) -C $(@D)
-xbmc-test: $(CHECK_LIBS) $(OBJSXBMC) $(DYNOBJSXBMC) $(NWAOBJSXBMC) $(GTEST_LIBS)
+@APP_NAME_LC@-test: $(CHECK_LIBS) $(OBJSXBMC) $(DYNOBJSXBMC) $(NWAOBJSXBMC) $(GTEST_LIBS)
ifeq ($(findstring osx,@ARCH@), osx)
$(SILENT_LD) $(CXX) $(LDFLAGS) $(GTEST_INCLUDES) -o $@ -Wl,-all_load,-ObjC $(DYNOBJSXBMC) $(NWAOBJSXBMC) $(OBJSXBMC) $(GTEST_LIBS) $(CHECK_LIBS) $(LIBS) $(CHECK_LIBADD) -rdynamic
else
diff --git a/Makefile.include.in b/Makefile.include.in
index 6ee228abfe..481da57c66 100644
--- a/Makefile.include.in
+++ b/Makefile.include.in
@@ -50,8 +50,8 @@ DEFINES+= \
@ARCH_DEFINES@ \
-D_FILE_DEFINED \
-D__STDC_CONSTANT_MACROS \
- -DBIN_INSTALL_PATH="\"$(libdir)/xbmc\"" \
- -DINSTALL_PATH="\"$(datarootdir)/xbmc\"" \
+ -DBIN_INSTALL_PATH="\"$(libdir)/@APP_NAME_LC@\"" \
+ -DINSTALL_PATH="\"$(datarootdir)/@APP_NAME_LC@\"" \
@SDL_DEFINES@ \
@UPNP_DEFINES@ \
@DEFS@ \
diff --git a/configure.in b/configure.in
index 3ce4b99a3c..40bfa3430a 100644
--- a/configure.in
+++ b/configure.in
@@ -2,7 +2,7 @@
# Process this file with autoconf to produce a configure script.
AC_PREREQ(2.59)
-AC_INIT([xbmc], [13.9.705], [http://issues.xbmc.org])
+AC_INIT([kodi], [13.9.705], [http://issues.kodi.org])
AC_CONFIG_HEADERS([xbmc/config.h])
AH_TOP([#pragma once])
m4_include([m4/ax_prog_cc_for_build.m4])
@@ -117,6 +117,7 @@ AC_DEFUN([XB_PUSH_FLAGS], [
# version can be overridden by setting the following as ENV vars when running configure
APP_NAME=${APP_NAME-$(${AWK} '/APP_NAME/ {print $2}' version.txt)}
+APP_NAME_LC=$(echo $APP_NAME | ${AWK} '{print tolower($0)}')
APP_VERSION_MAJOR=${APP_VERSION_MAJOR-$(${AWK} '/VERSION_MAJOR/ {print $2}' version.txt)}
APP_VERSION_MINOR=${APP_VERSION_MINOR-$(${AWK} '/VERSION_MINOR/ {print $2}' version.txt)}
APP_VERSION_TAG=${APP_VERSION_TAG-$(${AWK} '/VERSION_TAG/ {print $2}' version.txt)}
@@ -127,6 +128,7 @@ if test "$APP_NAME" != "" && test "$APP_VERSION_MAJOR" != "" && test "$APP_VERSI
&& test "$APP_VERSION_TAG" != "" && test "$APP_VERSION_CODE" != "" && test "$APP_ADDON_API" != ""; then
final_message="$final_message\n ${APP_NAME} Version:\t${APP_VERSION_MAJOR}.${APP_VERSION_MINOR}-${APP_VERSION_TAG}"
AC_SUBST(APP_NAME)
+ AC_SUBST(APP_NAME_LC)
AC_SUBST(APP_VERSION_MAJOR)
AC_SUBST(APP_VERSION_MINOR)
AC_SUBST(APP_VERSION_TAG)
@@ -230,7 +232,7 @@ AC_ARG_WITH([ffmpeg],
AC_ARG_ENABLE([shared-lib],
[AS_HELP_STRING([--enable-shared-lib],
- [build libxbmc. helpful for tests (default is no)])],
+ [build lib${APP_NAME_LC}. helpful for tests (default is no)])],
[build_shared_lib=$enableval],
[build_shared_lib=no])
@@ -2201,7 +2203,7 @@ else
fi
if test "x$use_pulse" != "xno"; then
- XBMC_STANDALONE_SH_PULSE=tools/Linux/xbmc-standalone.sh.pulse
+ XBMC_STANDALONE_SH_PULSE=tools/Linux/${APP_NAME_LC}-standalone.sh.pulse
final_message="$final_message\n PulseAudio:\tYes"
else
XBMC_STANDALONE_SH_PULSE=/dev/null
@@ -2472,8 +2474,9 @@ OUTPUT_FILES="Makefile \
lib/addons/library.xbmc.gui/Makefile \
lib/addons/library.xbmc.pvr/Makefile \
xbmc/visualizations/EGLHelpers/Makefile \
- tools/Linux/xbmc.sh \
- tools/Linux/xbmc-standalone.sh \
+ tools/Linux/${APP_NAME_LC}.sh \
+ tools/Linux/${APP_NAME_LC}-standalone.sh \
+ tools/Linux/${APP_NAME_LC}-xsession.desktop \
tools/Linux/FEH.py \
tools/Linux/FEH-ARM.py \
tools/TexturePacker/Makefile \
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
diff --git a/xbmc/windowing/X11/XRandR.cpp b/xbmc/windowing/X11/XRandR.cpp
index c94f2e3801..0cde1662e4 100644
--- a/xbmc/windowing/X11/XRandR.cpp
+++ b/xbmc/windowing/X11/XRandR.cpp
@@ -30,6 +30,7 @@
#include "utils/StringUtils.h"
#include "../xbmc/utils/log.h"
#include "threads/SystemClock.h"
+#include "CompileInfo.h"
#if defined(TARGET_FREEBSD)
#include <sys/types.h>
@@ -72,8 +73,10 @@ bool CXRandR::Query(bool force, bool ignoreoff)
bool CXRandR::Query(bool force, int screennum, bool ignoreoff)
{
CStdString cmd;
+ CStdString appname = CCompileInfo::GetAppName();
+ StringUtils::ToLower(appname);
cmd = getenv("XBMC_BIN_HOME");
- cmd += "/xbmc-xrandr";
+ cmd += "/" + appname + "-xrandr";
cmd = StringUtils::Format("%s -q --screen %d", cmd.c_str(), screennum);
FILE* file = popen(cmd.c_str(),"r");
@@ -154,8 +157,10 @@ bool CXRandR::TurnOffOutput(CStdString name)
return false;
CStdString cmd;
+ CStdString appname = CCompileInfo::GetAppName();
+ StringUtils::ToLower(appname);
cmd = getenv("XBMC_BIN_HOME");
- cmd += "/xbmc-xrandr";
+ cmd += "/" + appname + "-xrandr";
cmd = StringUtils::Format("%s --screen %d --output %s --off", cmd.c_str(), output->screen, name.c_str());
int status = system(cmd.c_str());
@@ -312,9 +317,11 @@ bool CXRandR::SetMode(XOutput output, XMode mode)
m_currentOutput = outputFound.name;
m_currentMode = modeFound.id;
+ CStdString appname = CCompileInfo::GetAppName();
+ StringUtils::ToLower(appname);
char cmd[255];
if (getenv("XBMC_BIN_HOME"))
- snprintf(cmd, sizeof(cmd), "%s/xbmc-xrandr --screen %d --output %s --mode %s", getenv("XBMC_BIN_HOME"), outputFound.screen, outputFound.name.c_str(), modeFound.id.c_str());
+ snprintf(cmd, sizeof(cmd), "%s/%s-xrandr --screen %d --output %s --mode %s", getenv("XBMC_BIN_HOME"),appname.c_str(), outputFound.screen, outputFound.name.c_str(), modeFound.id.c_str());
else
return false;
CLog::Log(LOGINFO, "XRANDR: %s", cmd);
@@ -401,10 +408,13 @@ void CXRandR::LoadCustomModeLinesToAllOutputs(void)
StringUtils::Trim(name);
strModeLine = modeline->FirstChild()->Value();
StringUtils::Trim(strModeLine);
+ CStdString appname = CCompileInfo::GetAppName();
+ StringUtils::ToLower(appname);
+
if (getenv("XBMC_BIN_HOME"))
{
- snprintf(cmd, sizeof(cmd), "%s/xbmc-xrandr --newmode \"%s\" %s > /dev/null 2>&1", getenv("XBMC_BIN_HOME"),
- name.c_str(), strModeLine.c_str());
+ snprintf(cmd, sizeof(cmd), "%s/%s-xrandr --newmode \"%s\" %s > /dev/null 2>&1", getenv("XBMC_BIN_HOME"),
+ appname.c_str(), name.c_str(), strModeLine.c_str());
if (system(cmd) != 0)
CLog::Log(LOGERROR, "Unable to create modeline \"%s\"", name.c_str());
}
@@ -413,8 +423,8 @@ void CXRandR::LoadCustomModeLinesToAllOutputs(void)
{
if (getenv("XBMC_BIN_HOME"))
{
- snprintf(cmd, sizeof(cmd), "%s/xbmc-xrandr --addmode %s \"%s\" > /dev/null 2>&1", getenv("XBMC_BIN_HOME"),
- m_outputs[i].name.c_str(), name.c_str());
+ snprintf(cmd, sizeof(cmd), "%s/%s-xrandr --addmode %s \"%s\" > /dev/null 2>&1", getenv("XBMC_BIN_HOME"),
+ appname.c_str(), m_outputs[i].name.c_str(), name.c_str());
if (system(cmd) != 0)
CLog::Log(LOGERROR, "Unable to add modeline \"%s\"", name.c_str());
}