Skip to content

Commit

Permalink
Make sure the right gnc-fq-* scripts are used.
Browse files Browse the repository at this point in the history
With the original configuration, whatever script was found first on the path was used.
When testing development versions, this caused the also installed stable version to 
be used as it happened to appear first on the path.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@19651 57a11ea4-9604-0410-9ed3-97b8803252fd
  • Loading branch information
gjanssens committed Oct 13, 2010
1 parent f58788f commit de7b165
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 6 deletions.
4 changes: 1 addition & 3 deletions src/core-utils/core-utils.i
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,9 @@ SCM scm_init_sw_core_utils_module (void);

%import "base-typemaps.i"

%newobject g_find_program_in_path;
gchar * g_find_program_in_path(const gchar *);

gboolean gnc_is_debugging(void);

gchar * gnc_path_get_bindir(void);
gchar * gnc_path_get_stdreportsdir(void);
gchar * gnc_build_dotgnucash_path(const gchar *);
gchar * gnc_build_report_path(const gchar *);
Expand Down
2 changes: 1 addition & 1 deletion src/core-utils/core-utils.scm
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@
(use-modules (sw_core_utils))

(re-export gnc-is-debugging)
(re-export gnc-path-get-bindir)
(re-export gnc-path-get-stdreportsdir)
(re-export gnc-build-dotgnucash-path)
(re-export gnc-build-report-path)
(re-export gnc-build-stdreports-path)
(re-export g-find-program-in-path)
(re-export gnc-utf8?)
(re-export gnc-utf8-strip-invalid-strdup)
(re-export gnc-locale-from-utf8)
Expand Down
10 changes: 10 additions & 0 deletions src/core-utils/gnc-path.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,16 @@ gchar *gnc_path_get_prefix()
return gnc_gbr_find_prefix (PREFIX);
}

/** Returns the bindir path, usually
* "$prefix/bin".
*
* @returns A newly allocated string. */
gchar *gnc_path_get_bindir()
{
//printf("Returning bindir %s\n", gnc_gbr_find_bin_dir (BINDIR));
return gnc_gbr_find_bin_dir (BINDIR);
}

/** Returns the libdir path, usually
* "$prefix/lib". Needed for gnome_program_init().
*
Expand Down
6 changes: 6 additions & 0 deletions src/core-utils/gnc-path.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,12 @@
* @returns A newly allocated string. */
gchar *gnc_path_get_prefix(void);

/** Returns the bindir path, usually
* "$prefix/bin".
*
* @returns A newly allocated string. */
gchar *gnc_path_get_bindir(void);

/** Returns the libdir path, usually
* "$prefix/lib". Needed for gnome_program_init(void).
*
Expand Down
1 change: 1 addition & 0 deletions src/core-utils/gncla-dir.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
#define DATADIR "@-datadir-@"
#define SYSCONFDIR "@-sysconfdir-@"

#define BINDIR "@-bindir-@"
#define LIBDIR "@-libdir-@"

#define LOCALE_DATADIRNAME "@-DATADIRNAME-@"
4 changes: 2 additions & 2 deletions src/scm/price-quotes.scm
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

(define gnc:*finance-quote-check*
(g-find-program-in-path "gnc-fq-check"))
(string-append (gnc-path-get-bindir) "/gnc-fq-check"))

(define (gnc:fq-check-sources)
(let ((program '())
Expand Down Expand Up @@ -286,7 +286,7 @@
;; src/engine/gnc-pricedb.h

(define gnc:*finance-quote-helper*
(g-find-program-in-path "gnc-fq-helper"))
(string-append (gnc-path-get-bindir) "/gnc-fq-helper"))

(define (gnc:fq-get-quotes requests)
;; requests should be a list where each item is of the form
Expand Down

0 comments on commit de7b165

Please sign in to comment.