mirror of
https://github.com/libretro/RetroArch
synced 2025-01-30 12:32:52 +00:00
Merge pull request #210 from sbooob/build-option-config-dir
--config-dir option in configure script
This commit is contained in:
commit
8be8ee6954
12
Makefile
12
Makefile
@ -58,7 +58,11 @@ ifeq ($(findstring Haiku,$(OS)),)
|
||||
LIBS = -lm
|
||||
endif
|
||||
|
||||
DEFINES = -DHAVE_CONFIG_H -DHAVE_SCREENSHOTS
|
||||
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
|
||||
@ -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)/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)/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
|
||||
@ -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)/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
|
||||
|
@ -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
|
||||
|
@ -6,6 +6,7 @@ cat /dev/null > "$MAKEFILE_DEFINES" > "$CONFIG_DEFINES"
|
||||
#cat /dev/null > "${MAKEFILE_DEFINES:=.MAKEFILE_DEFINES}" > "${CONFIG_DEFINES=.CONFIG_DEFINES}"
|
||||
|
||||
[ "$PREFIX" ] || PREFIX="/usr/local"
|
||||
[ "$CONFIG_DIR" ] || CONFIG_DIR="/etc"
|
||||
|
||||
add_define_header()
|
||||
{ echo "$1=$2" >> "$CONFIG_DEFINES";}
|
||||
|
@ -16,6 +16,7 @@ LDFLAGS: Linker flags
|
||||
|
||||
General options:
|
||||
--prefix=\$path: Install path 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
|
||||
|
||||
@ -51,6 +52,7 @@ parse_input() # Parse stuff :V
|
||||
while [ "$1" ]; do
|
||||
case "$1" in
|
||||
--prefix=*) PREFIX=${1##--prefix=};;
|
||||
--global-config-dir=*) GLOBAL_CONFIG_DIR=${1##--global-config-dir=};;
|
||||
--host=*) CROSS_COMPILE=${1##--host=}-;;
|
||||
--enable-*)
|
||||
opt_exists "${1##--enable-}"
|
||||
|
@ -380,9 +380,12 @@ static config_file_t *open_default_config_file(void)
|
||||
// Try this as a last chance ...
|
||||
if (!conf)
|
||||
{
|
||||
strlcpy(conf_path, "/etc/retroarch.cfg", sizeof(conf_path));
|
||||
#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);
|
||||
RARCH_LOG("Looking for config in: \"/etc/retroarch.cfg\".\n");
|
||||
}
|
||||
|
||||
if (conf)
|
||||
|
BIN
tools/retrolaunch/retrolaunch
Executable file
BIN
tools/retrolaunch/retrolaunch
Executable file
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user