From d0ca47cfd098995a8021301e051e6f5363055800 Mon Sep 17 00:00:00 2001 From: Pierre Pronchery Date: Sun, 5 Apr 2015 19:27:58 +0200 Subject: [PATCH] Let the path to "browser" be updated at compile-time This is done with the BROWSER_PROGNAME pre-processor variable. --- tools/gallery.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/tools/gallery.c b/tools/gallery.c index 34d13e1..45e9e22 100644 --- a/tools/gallery.c +++ b/tools/gallery.c @@ -32,6 +32,9 @@ #ifndef PROGNAME # define PROGNAME "gallery" #endif +#ifndef BROWSER_PROGNAME +# define BROWSER_PROGNAME "browser" +#endif #ifndef PREFIX # define PREFIX "/usr/local" #endif @@ -60,14 +63,14 @@ static int _usage(void); static int _gallery(void) { char const * homedir; - char const browser[] = BINDIR "/browser"; + char const browser[] = BINDIR "/" BROWSER_PROGNAME; char const dcim[] = "DCIM"; char * path; #if GTK_CHECK_VERSION(2, 6, 0) - char * argv[] = { "browser", "-T", "--", NULL, NULL }; + char * argv[] = { BROWSER_PROGNAME, "-T", "--", NULL, NULL }; const int arg = 3; #else - char * argv[] = { "browser", "--", NULL, NULL }; + char * argv[] = { BROWSER_PROGNAME, "--", NULL, NULL }; const int arg = 2; #endif