From: Vladimir Nadvornik Date: Wed, 10 Jun 2009 20:26:47 +0000 (+0000) Subject: do not install helper scripts into /usr/bin X-Git-Tag: v1.0.0~163 X-Git-Url: http://geeqie.org/cgi-bin/gitweb.cgi?p=geeqie.git;a=commitdiff_plain;h=545a2c2ca86722831c57ff5f5d8b1c641e6d6988 do not install helper scripts into /usr/bin - install the helper scripts into pkglibdir, that is /usr/lib/geeqie - add the directory to $PATH on startup - the Exec line in desktop files does not have to contain full path fixes https://sourceforge.net/tracker/?func=detail&aid=2801121&group_id=222125&atid=1054680 --- diff --git a/configure.in b/configure.in index 42969242..f4327a3a 100644 --- a/configure.in +++ b/configure.in @@ -222,6 +222,9 @@ AC_SUBST(htmldir) eval "eval appdir=${datadir}/${PACKAGE}" AC_DEFINE_UNQUOTED([GQ_APP_DIR], "$appdir", [Location of application data]) +eval "eval gq_bindir=${prefix}/lib/${PACKAGE}" +AC_DEFINE_UNQUOTED([GQ_BIN_DIR], "$gq_bindir", [Location of helper scripts and executables]) + # LIRC support # ---------------------------------------------------------------------- diff --git a/plugins/rotate/Makefile.am b/plugins/rotate/Makefile.am index c37ebfc3..f4647bed 100644 --- a/plugins/rotate/Makefile.am +++ b/plugins/rotate/Makefile.am @@ -1,4 +1,4 @@ -dist_bin_SCRIPTS = geeqie-rotate +dist_pkglib_SCRIPTS = geeqie-rotate qq_desktopdir = $(pkgdatadir)/applications qq_desktop_DATA = rotate90.desktop rotate180.desktop rotate270.desktop diff --git a/plugins/symlink/Makefile.am b/plugins/symlink/Makefile.am index 4c5c0c04..4d1e71ce 100644 --- a/plugins/symlink/Makefile.am +++ b/plugins/symlink/Makefile.am @@ -1,4 +1,4 @@ -dist_bin_SCRIPTS = geeqie-symlink +dist_pkglib_SCRIPTS = geeqie-symlink qq_desktopdir = $(pkgdatadir)/applications qq_desktop_DATA = symlink.desktop diff --git a/src/main.c b/src/main.c index 91c7a9fc..aa456f8e 100644 --- a/src/main.c +++ b/src/main.c @@ -446,6 +446,14 @@ static void parse_command_line_for_debug_option(gint argc, gchar *argv[]) #define RC_HISTORY_NAME "history" +static void setup_env_path(void) +{ + const gchar *old_path = g_getenv("PATH"); + gchar *path = g_strconcat(GQ_BIN_DIR, ":", old_path, NULL); + g_setenv("PATH", path, TRUE); + g_free(path); +} + static void keys_load(void) { gchar *path; @@ -785,6 +793,8 @@ gint main(gint argc, gchar *argv[]) mkdir_if_not_exists(get_thumbnails_cache_dir()); mkdir_if_not_exists(get_metadata_cache_dir()); + setup_env_path(); + keys_load(); accel_map_load();