24 #include "gncla-dir.h" 29 gchar *gnc_path_get_prefix()
32 return gnc_gbr_find_prefix (PREFIX);
39 gchar *gnc_path_get_bindir()
42 return gnc_gbr_find_bin_dir (BINDIR);
49 gchar *gnc_path_get_libdir()
52 return gnc_gbr_find_lib_dir (LIBDIR);
59 gchar *gnc_path_get_datadir()
62 return gnc_gbr_find_data_dir (DATADIR);
69 gchar *gnc_path_get_pkgdatadir()
71 gchar *datadir = gnc_gbr_find_data_dir (DATADIR);
72 gchar *result = g_build_filename (datadir, PROJECT_NAME, (
char*)NULL);
82 gchar *gnc_path_get_pkgdocdir()
84 gchar *docdir = gnc_gbr_find_data_dir (DATADIR);
85 gchar *result = g_build_filename (docdir,
"doc", PROJECT_NAME, (
char*)NULL);
95 gchar *gnc_path_get_pkgsysconfdir()
97 gchar *sysconfdir = gnc_gbr_find_etc_dir (SYSCONFDIR);
98 gchar *result = g_build_filename (sysconfdir, PROJECT_NAME, (
char*)NULL);
109 gchar *gnc_path_get_pkglibdir()
111 gchar *libdir = gnc_path_get_libdir ();
114 gchar *result = gnc_gbr_find_bin_dir(libdir);
116 gchar *result = g_build_filename (libdir, PROJECT_NAME, (
char*)NULL);
127 gchar *gnc_path_get_gtkbuilderdir()
129 gchar *pkgdatadir = gnc_path_get_pkgdatadir ();
130 gchar *result = g_build_filename (pkgdatadir,
"gtkbuilder", (
char*)NULL);
140 gchar *gnc_path_get_localedir()
142 gchar *prefix = gnc_path_get_prefix();
144 if (prefix == NULL || g_strcmp0 (locale_subdir, LOCALEDIR) == 0)
147 g_free (locale_subdir);
148 return g_strdup (LOCALEDIR);
152 gchar *result = g_build_filename (prefix, locale_subdir, (
char*)NULL);
154 g_free (locale_subdir);
164 gchar *gnc_path_get_accountsdir()
166 gchar *pkgdatadir = gnc_path_get_pkgdatadir ();
167 gchar *result = g_build_filename (pkgdatadir,
"accounts", (
char*)NULL);
179 gchar *gnc_path_get_scmdir()
181 gchar *prefix = gnc_path_get_prefix ();
182 gchar *result = g_build_filename (prefix, GUILE_REL_SITEDIR, (
char*)NULL);
192 gchar *gnc_path_get_reportdir()
194 gchar *scmdir = gnc_path_get_scmdir ();
195 gchar *result = g_build_filename (scmdir, PROJECT_NAME,
"report", (
char*)NULL);
205 gchar *gnc_path_get_reportsdir()
207 gchar *scmdir = gnc_path_get_scmdir ();
208 gchar *result = g_build_filename (scmdir, PROJECT_NAME,
"reports", NULL);
219 gchar *gnc_path_get_stdreportsdir()
221 gchar *reportdir = gnc_path_get_reportdir ();
222 gchar *result = g_build_filename (reportdir,
"reports",
"standard", NULL);
gchar * gnc_file_path_relative_part(const gchar *prefix, const gchar *path)
Given a prefix and a path return the relative portion of the path.
File path resolution utility functions.