diff options
author | scop <scop@e10066b5-e1e2-0310-b819-94efdf66514b> | 2008-01-01 16:53:11 +0000 |
---|---|---|
committer | scop <scop@e10066b5-e1e2-0310-b819-94efdf66514b> | 2008-01-01 16:53:11 +0000 |
commit | 7632e3a69feae05b9ce5b97ceb0e5bd4c53a8312 (patch) | |
tree | 39271477854bec7af571056120614e8720872e14 | |
parent | 3682f5fa4cc61ef1b0f2fa1361e3e51f73c6df4e (diff) | |
download | vdr-plugin-muggle-7632e3a69feae05b9ce5b97ceb0e5bd4c53a8312.tar.gz vdr-plugin-muggle-7632e3a69feae05b9ce5b97ceb0e5bd4c53a8312.tar.bz2 |
Make default music dir configurable at build time.
git-svn-id: https://vdr-muggle.svn.sourceforge.net/svnroot/vdr-muggle/trunk/muggle-plugin@993 e10066b5-e1e2-0310-b819-94efdf66514b
-rw-r--r-- | Makefile | 3 | ||||
-rw-r--r-- | README | 7 | ||||
-rw-r--r-- | mg_setup.c | 6 |
3 files changed, 10 insertions, 6 deletions
@@ -45,6 +45,8 @@ LIBDIR ?= ../../lib TMPDIR ?= /tmp BINDIR ?= /usr/local/bin +MUSICDIR ?= /mnt/music + ### Allow user defined options to overwrite defaults: -include $(VDRDIR)/Make.config @@ -78,6 +80,7 @@ INCLUDES += -I$(VDRDIR) -I$(VDRDIR)/include -I$(DVBDIR)/include \ $(shell taglib-config --cflags) DEFINES += -D_GNU_SOURCE -DPLUGIN_NAME_I18N='"$(PLUGIN)"' +DEFINES += -DMUSICDIR='"$(MUSICDIR)"' ### The object files (add further files here): @@ -114,9 +114,10 @@ about a missing -lwrap. First let's define what the top level directory (short TLD) is. Muggle expects all music files to be in the same directory (and its subdirectories). Symbolic links will be followed. You specify the TLD -with the argument -t. The default is /mnt/music. It is recommended to -store only music files in the TLD. You can organize files in orders -per genre, album or whatever. +with the argument -t. The default is /mnt/music; you can change the +default at build time using the MUSICDIR Makefile variable. It is +recommended to store only music files in the TLD. You can organize +files in orders per genre, album or whatever. It is essential that you always use the same TLD when using the muggle plugin or the external program mugglei, otherwise muggle will not find @@ -45,7 +45,7 @@ mgSetup::mgSetup () DbUser = 0; DbPass = 0; asprintf(&DbDatadir,"%s/.muggle",getenv("HOME")); - ToplevelDir = strdup("/mnt/music/"); + ToplevelDir = strdup(MUSICDIR "/"); CreateMode = false; DeleteStaleReferences = false; @@ -228,8 +228,8 @@ mgSetup::HelpText() static char buf[2000]; strcpy(buf, " -n NNNN, --name=NNNN specify database name (default is GiantDisc)\n" - " -t TTTT, --toplevel=TTTT specify toplevel directory for music (default is /mnt/music)\n" - " -d DIRN, --datadir=DIRN specify directory for embedded sql data (default is $HOME/.muggle)\n" + " -t TTTT, --toplevel=TTTT specify toplevel directory for music (default is " MUSICDIR ")\n" + " -d DIRN, --datadir=DIRN specify directory for embedded sql data (default is \"$HOME/.muggle\")\n" " -v, --verbose specify debug level. The higher the more. Default is 1\n"); if (IsMugglei()) strcat(buf, |