From ac606f8678c78aab6ffbf4a1998639059c76c2a5 Mon Sep 17 00:00:00 2001 From: orbea Date: Sat, 27 Aug 2016 19:44:41 -0700 Subject: [PATCH] Allow setting assets install directory --- Makefile | 22 +++++++++++----------- qb/config.libs.sh | 7 +++++++ qb/config.params.sh | 1 + 3 files changed, 19 insertions(+), 11 deletions(-) diff --git a/Makefile b/Makefile index c31ab2a7aa..8a857fba31 100644 --- a/Makefile +++ b/Makefile @@ -181,17 +181,17 @@ install: $(TARGET) install -m644 media/retroarch.svg $(DESTDIR)$(PREFIX)/share/pixmaps @if test -d media/assets; then \ echo "Installing media assets..."; \ - mkdir -p $(DESTDIR)$(PREFIX)/share/retroarch; \ - mkdir -p $(DESTDIR)$(PREFIX)/share/retroarch/assets; \ - mkdir -p $(DESTDIR)$(PREFIX)/share/retroarch/assets/xmb; \ - mkdir -p $(DESTDIR)$(PREFIX)/share/retroarch/assets/glui; \ - cp -r media/assets/xmb/ $(DESTDIR)$(PREFIX)/share/retroarch/assets; \ - cp -r media/assets/glui/ $(DESTDIR)$(PREFIX)/share/retroarch/assets; \ + mkdir -p $(DESTDIR)$(ASSETS_DIR)/retroarch; \ + mkdir -p $(DESTDIR)$(ASSETS_DIR)/share/retroarch/assets; \ + mkdir -p $(DESTDIR)$(ASSETS_DIR)/share/retroarch/assets/xmb; \ + mkdir -p $(DESTDIR)$(ASSETS_DIR)/retroarch/assets/glui; \ + cp -r media/assets/xmb/ $(DESTDIR)$(ASSETS_DIR)/retroarch/assets; \ + cp -r media/assets/glui/ $(DESTDIR)$(ASSETS_DIR)/retroarch/assets; \ echo "Removing unneeded source image files.."; \ - rm -rf $(DESTDIR)$(PREFIX)/share/retroarch/assets/xmb/flatui/src; \ - rm -rf $(DESTDIR)$(PREFIX)/share/retroarch/assets/xmb/monochrome/src; \ - rm -rf $(DESTDIR)$(PREFIX)/share/retroarch/assets/xmb/retroactive/src; \ - rm -rf $(DESTDIR)$(PREFIX)/share/retroarch/assets/xmb/retroactive_marked/src; \ + rm -rf $(DESTDIR)$(ASSETS_DIR)/retroarch/assets/xmb/flatui/src; \ + rm -rf $(DESTDIR)$(ASSETS_DIR)/retroarch/assets/xmb/monochrome/src; \ + rm -rf $(DESTDIR)$(ASSETS_DIR)/retroarch/assets/xmb/retroactive/src; \ + rm -rf $(DESTDIR)$(ASSETS_DIR)/retroarch/assets/xmb/retroactive_marked/src; \ echo "Asset copying done."; \ fi @@ -203,7 +203,7 @@ uninstall: rm -f $(DESTDIR)$(MAN_DIR)/man6/retroarch.6 rm -f $(DESTDIR)$(MAN_DIR)/man6/retroarch-cg2glsl.6 rm -f $(DESTDIR)$(PREFIX)/share/pixmaps/retroarch.svg - rm -rf $(DESTDIR)$(PREFIX)/share/retroarch/assets + rm -rf $(DESTDIR)$(ASSETS_DIR)/retroarch/assets clean: rm -rf $(OBJDIR) diff --git a/qb/config.libs.sh b/qb/config.libs.sh index 8bb9919d0b..ff33ba8ab5 100644 --- a/qb/config.libs.sh +++ b/qb/config.libs.sh @@ -130,6 +130,13 @@ fi add_define_make libretro "$LIBRETRO" } +if [ "$ASSETS_DIR" ]; then + + add_define_make ASSETS_DIR "$ASSETS_DIR" +else + add_define_make ASSETS_DIR "${PREFIX}/share" +fi + if [ "$BIN_DIR" ]; then add_define_make BIN_DIR "$BIN_DIR" else diff --git a/qb/config.params.sh b/qb/config.params.sh index 7c09abecfa..cba050479a 100644 --- a/qb/config.params.sh +++ b/qb/config.params.sh @@ -13,6 +13,7 @@ HAVE_LIBUSB=auto # Libusb HID support C89_LIBUSB=no HAVE_UDEV=auto # Udev/Evdev gamepad support HAVE_LIBRETRO= # Libretro library used +HAVE_ASSETS_DIR= # Assets install directory HAVE_BIN_DIR= # Binary install directory HAVE_MAN_DIR= # Manpage install directory HAVE_GLES_LIBS= # Link flags for custom GLES library