summaryrefslogtreecommitdiff
path: root/src/hub.c
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2020-05-25 22:01:51 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2020-05-25 22:02:15 (GMT)
commiteef3392134b489fbff7c96046581c987ff7192bd (patch)
treed9926feb13b8a5008cc0013e7ad0a5adb9c73637 /src/hub.c
parent2d16cca046ff80f2be3eea6934dd1dd8f4b807d1 (diff)
Provided a way to relocate built binaries.
Diffstat (limited to 'src/hub.c')
-rw-r--r--src/hub.c32
1 files changed, 26 insertions, 6 deletions
diff --git a/src/hub.c b/src/hub.c
index 8e8840c..b77bdb8 100644
--- a/src/hub.c
+++ b/src/hub.c
@@ -43,6 +43,7 @@
#include "analysis/db/server.h"
#include "core/global.h"
#include "core/logs.h"
+#include "core/paths.h"
@@ -207,6 +208,8 @@ static void show_hub_help(const char *name)
static void show_hub_version(void)
{
+ char *edir; /* Répertoire de base effectif */
+
printf("\n");
printf("-o- Chrysalide Hub r%u -o-\n", REVISION);
@@ -214,11 +217,25 @@ static void show_hub_version(void)
printf("\n");
- printf(_("Pictures directory: %s\n"), PIXMAPS_DIR);
- printf(_("Themes directory: %s\n"), THEMES_DIR);
- printf(_("Plugins library directory: %s\n"), PLUGINS_LIB_DIR);
- printf(_("Plugins data directory: %s\n"), PLUGINS_DATA_DIR);
- printf(_("Locale directory: %s\n"), LOCALE_DIR);
+ edir = get_effective_directory(PIXMAPS_DIR);
+ printf(_("Pictures directory: %s\n"), edir);
+ free(edir);
+
+ edir = get_effective_directory(THEMES_DIR);
+ printf(_("Themes directory: %s\n"), edir);
+ free(edir);
+
+ edir = get_effective_directory(PLUGINS_LIB_DIR);
+ printf(_("Plugins library directory: %s\n"), edir);
+ free(edir);
+
+ edir = get_effective_directory(PLUGINS_DATA_DIR);
+ printf(_("Plugins data directory: %s\n"), edir);
+ free(edir);
+
+ edir = get_effective_directory(LOCALE_DIR);
+ printf(_("Locale directory: %s\n"), edir);
+ free(edir);
printf("\n");
@@ -247,6 +264,7 @@ int main(int argc, char **argv)
LogMessageType verbosity; /* Niveau de filtre de message */
int index; /* Indice d'argument */
int ret; /* Bilan d'un appel */
+ char *edir; /* Répertoire de base effectif */
static struct option long_options[] = {
{ "help", no_argument, NULL, 'h' },
@@ -327,7 +345,9 @@ int main(int argc, char **argv)
/* Lancement des choses sérieuses */
setlocale(LC_ALL, "");
- bindtextdomain(PACKAGE, LOCALE_DIR);
+ edir = get_effective_directory(LOCALE_DIR);
+ bindtextdomain(PACKAGE, edir);
+ free(edir);
textdomain(PACKAGE);
/* Initialisation de GTK */