Replace string literal 'gnucash' with PROJECT_NAME parameter where it makes sense

The idea behind this is to not assume the project is always built
as "gnucash" exactly.
One example where it can be useful to use a different project name
would be when building multiple development versions of the project
on the same system and don't want these different versions share
the same settings in GSettings or the same stored passwords.
This commit is contained in:
Geert Janssens
2022-10-24 21:41:08 +02:00
parent 2c93c383ac
commit 734f90bd36
8 changed files with 21 additions and 20 deletions

View File

@@ -107,7 +107,7 @@ TEST_F(PathTest, gnc_path_get_datadir)
TEST_F(PathTest, gnc_path_get_sysconfdir)
{
gchar *dirname = gnc_file_path_relative_part(PREFIX, SYSCONFDIR);
gchar *sysconfpath = g_build_filename(m_prefix, dirname, "gnucash", NULL);
gchar *sysconfpath = g_build_filename(m_prefix, dirname, PROJECT_NAME, NULL);
g_free(dirname);
#ifdef ENABLE_BINRELOC
EXPECT_STREQ(gnc_path_get_pkgsysconfdir(), sysconfpath);
@@ -119,7 +119,7 @@ TEST_F(PathTest, gnc_path_get_sysconfdir)
g_free(sysconfpath);
g_unsetenv("GNC_UNINSTALLED");
g_unsetenv("GNC_BUILDDIR");
sysconfpath = g_build_filename(SYSCONFDIR, "gnucash", NULL);
sysconfpath = g_build_filename(SYSCONFDIR, PROJECT_NAME, NULL);
EXPECT_STREQ(gnc_path_get_pkgsysconfdir(), sysconfpath);
g_free(sysconfpath);
#endif