Skip to content

Commit

Permalink
Fixes issues pointed by Themaister
Browse files Browse the repository at this point in the history
configure option is now --global-config-dir
  • Loading branch information
nstCactus committed May 27, 2013
1 parent 937b112 commit cdfa97a
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 8 deletions.
12 changes: 8 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,11 @@ ifeq ($(findstring Haiku,$(OS)),)
LIBS = -lm
endif

DEFINES = -DHAVE_CONFIG_H -DHAVE_SCREENSHOTS -DCONFIG_DIR='"$(CONFIG_DIR)"'
ifndef GLOBAL_CONFIG_DIR
GLOBAL_CONFIG_DIR = /etc
endif

DEFINES = -DHAVE_CONFIG_H -DHAVE_SCREENSHOTS -DGLOBAL_CONFIG_DIR='"$(GLOBAL_CONFIG_DIR)"'

ifeq ($(REENTRANT_TEST), 1)
DEFINES += -Dmain=retroarch_main
Expand Down Expand Up @@ -389,11 +393,11 @@ tools/input_common_joyconfig.o: input/input_common.c

install: $(TARGET)
mkdir -p $(DESTDIR)$(PREFIX)/bin 2>/dev/null || /bin/true
mkdir -p $(DESTDIR)$(CONFIG_DIR)/etc 2>/dev/null || /bin/true
mkdir -p $(DESTDIR)$(GLOBAL_CONFIG_DIR) 2>/dev/null || /bin/true
mkdir -p $(DESTDIR)$(PREFIX)/share/man/man1 2>/dev/null || /bin/true
mkdir -p $(DESTDIR)$(PREFIX)/share/pixmaps 2>/dev/null || /bin/true
install -m755 $(TARGET) $(DESTDIR)$(PREFIX)/bin
install -m644 retroarch.cfg $(DESTDIR)$(CONFIG_DIR)/etc/retroarch.cfg
install -m644 retroarch.cfg $(DESTDIR)$(GLOBAL_CONFIG_DIR)/retroarch.cfg
install -m644 docs/retroarch.1 $(DESTDIR)$(MAN_DIR)
install -m644 docs/retroarch-joyconfig.1 $(DESTDIR)$(MAN_DIR)
install -m755 retroarch-zip $(DESTDIR)$(PREFIX)/bin
Expand All @@ -404,7 +408,7 @@ uninstall:
rm -f $(DESTDIR)$(PREFIX)/bin/retroarch-joyconfig
rm -f $(DESTDIR)$(PREFIX)/bin/retrolaunch
rm -f $(DESTDIR)$(PREFIX)/bin/retroarch-zip
rm -f $(DESTDIR)$(CONFIG_DIR)/etc/retroarch.cfg
rm -f $(DESTDIR)$(GLOBAL_CONFIG_DIR)/retroarch.cfg
rm -f $(DESTDIR)$(PREFIX)/share/man/man1/retroarch.1
rm -f $(DESTDIR)$(PREFIX)/share/man/man1/retroarch-joyconfig.1
rm -f $(DESTDIR)$(PREFIX)/share/pixmaps/retroarch.png
Expand Down
1 change: 1 addition & 0 deletions qb/config.libs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,7 @@ check_macro NEON __ARM_NEON__
add_define_make OS "$OS"

# Creates config.mk and config.h.
add_define_make GLOBAL_CONFIG_DIR "$GLOBAL_CONFIG_DIR"
VARS="RGUI ALSA OSS OSS_BSD OSS_LIB AL RSOUND ROAR JACK COREAUDIO PULSE SDL OPENGL GLES VG EGL KMS GBM DRM DYLIB GETOPT_LONG THREADS CG LIBXML2 SDL_IMAGE ZLIB DYNAMIC FFMPEG AVCODEC AVFORMAT AVUTIL SWSCALE FREETYPE XVIDEO X11 XEXT XF86VM XINERAMA NETPLAY NETWORK_CMD STDIN_CMD COMMAND SOCKET_LEGACY FBO STRL PYTHON FFMPEG_ALLOC_CONTEXT3 FFMPEG_AVCODEC_OPEN2 FFMPEG_AVIO_OPEN FFMPEG_AVFORMAT_WRITE_HEADER FFMPEG_AVFORMAT_NEW_STREAM FFMPEG_AVCODEC_ENCODE_AUDIO2 FFMPEG_AVCODEC_ENCODE_VIDEO2 BSV_MOVIE VIDEOCORE NEON"
create_config_make config.mk $VARS
create_config_header config.h $VARS
1 change: 0 additions & 1 deletion qb/qb.libs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,6 @@ create_config_make()
echo "PACKAGE_NAME = $PACKAGE_NAME"
echo "PACKAGE_VERSION = $PACKAGE_VERSION"
echo "PREFIX = $PREFIX"
echo "CONFIG_DIR = $CONFIG_DIR"

while [ "$1" ]; do
case $(eval echo \$HAVE_$1) in
Expand Down
4 changes: 2 additions & 2 deletions qb/qb.params.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ LDFLAGS: Linker flags
General options:
--prefix=\$path: Install path prefix
--config-dir=\$path: System wide config file prefix
--global-config-dir=\$path: System wide config file prefix
--host=HOST: cross-compile to build programs to run on HOST
--help: Show this help
Expand Down Expand Up @@ -52,7 +52,7 @@ parse_input() # Parse stuff :V
while [ "$1" ]; do
case "$1" in
--prefix=*) PREFIX=${1##--prefix=};;
--config-dir=*) CONFIG_DIR=${1##--config-dir=};;
--global-config-dir=*) GLOBAL_CONFIG_DIR=${1##--global-config-dir=};;
--host=*) CROSS_COMPILE=${1##--host=}-;;
--enable-*)
opt_exists "${1##--enable-}"
Expand Down
5 changes: 4 additions & 1 deletion settings.c
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,10 @@ static config_file_t *open_default_config_file(void)
// Try this as a last chance ...
if (!conf)
{
snprintf(conf_path, sizeof(conf_path), "%s/retroarch.cfg", CONFIG_DIR);
#ifndef GLOBAL_CONFIG_DIR
#define GLOBAL_CONFIG_DIR "/etc"
#endif
fill_pathname_join(conf_path, GLOBAL_CONFIG_DIR, "retroarch.cfg", sizeof(conf_path));
RARCH_LOG("Looking for config in: \"%s\".\n", conf_path);
conf = config_file_new(conf_path);
}
Expand Down
Binary file modified tools/retrolaunch/retrolaunch
Binary file not shown.

0 comments on commit cdfa97a

Please sign in to comment.