From 754ae6bfdb51db0e278dbdc1f2459283c2ca627b Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com> Date: Wed, 19 Jan 2022 12:12:08 -0500 Subject: [PATCH] build: Rename PROGSHAREDIR to JAMI_DATADIR. This name matches a common naming convention in build systems. * compat/msvc/config.h (PROGSHAREDIR): Rename to... (JAMI_DATADIR) ... this. * globals.mk (-DJAMI_DATADIR): Likewise. * meson.build (conf): Likewise. * src/account.cpp: Likewise. * src/manager.cpp (Manager::playRingtone): Likewise. Change-Id: I123251f3e420948bc7359ce0a3ac54bddd12977a --- compat/msvc/config.h | 2 +- globals.mk | 2 +- meson.build | 2 +- src/account.cpp | 2 +- src/manager.cpp | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/compat/msvc/config.h b/compat/msvc/config.h index fafffeb72a..5e31cb7dee 100644 --- a/compat/msvc/config.h +++ b/compat/msvc/config.h @@ -201,7 +201,7 @@ STACK_DIRECTION = 0 => direction of growth unknown */ #define VERSION "10.0.2" // UWP compatibility -#define PROGSHAREDIR "" +#define JAMI_DATADIR "" /* Define to limit the scope of <windows.h>. */ /* #undef WIN32_LEAN_AND_MEAN */ diff --git a/globals.mk b/globals.mk index 579c0232fe..c159792d8c 100644 --- a/globals.mk +++ b/globals.mk @@ -17,7 +17,7 @@ AM_CPPFLAGS += \ -I$(src)/src/jami \ $(SIP_CFLAGS) \ -DPREFIX=\"$(prefix)\" \ - -DPROGSHAREDIR=\"$(datadir)/jami\" \ + -DJAMI_DATADIR=\"$(datadir)/jami\" \ -DENABLE_TRACE \ -DRING_REVISION=\"$(RING_REVISION)\" \ -DRING_DIRTY_REPO=\"$(RING_DIRTY_REPO)\" \ diff --git a/meson.build b/meson.build index 8b74963f7b..a2ac3f6021 100644 --- a/meson.build +++ b/meson.build @@ -72,7 +72,7 @@ conf.set_quoted('PACKAGE', 'jami') conf.set_quoted('PACKAGE_NAME', 'Jami Daemon') conf.set_quoted('PACKAGE_VERSION', meson.project_version()) conf.set_quoted('PACKAGE_STRING', 'Jami Daemon ' + meson.project_version()) -conf.set_quoted('PROGSHAREDIR', get_option('datadir') / 'jami') +conf.set_quoted('JAMI_DATADIR', get_option('datadir') / 'jami') depopensl = meson.get_compiler('cpp').find_library('OpenSLES', has_headers: 'SLES/OpenSLES.h', required: get_option('opensl')) conf.set10('HAVE_OPENSL', depopensl.found()) diff --git a/src/account.cpp b/src/account.cpp index f24d1f1bc0..f28adbab11 100644 --- a/src/account.cpp +++ b/src/account.cpp @@ -101,7 +101,7 @@ const char* const Account::PROXY_PUSH_TOKEN_KEY = "proxyPushToken"; constexpr const char* const DEFAULT_RINGTONE_PATH = "/data/data/cx.ring/files/ringtones/default.opus"; #else -constexpr const char* const DEFAULT_RINGTONE_PATH = PROGSHAREDIR "/ringtones/default.opus"; +constexpr const char* const DEFAULT_RINGTONE_PATH = JAMI_DATADIR "/ringtones/default.opus"; #endif Account::Account(const std::string& accountID) diff --git a/src/manager.cpp b/src/manager.cpp index 7af53b049d..37cd51399c 100644 --- a/src/manager.cpp +++ b/src/manager.cpp @@ -2091,7 +2091,7 @@ Manager::playRingtone(const std::string& accountID) if (ringchoice.find(DIR_SEPARATOR_CH) == std::string::npos) { // check inside global share directory static const char* const RINGDIR = "ringtones"; - ringchoice = std::string(PROGSHAREDIR) + DIR_SEPARATOR_STR + RINGDIR + DIR_SEPARATOR_STR + ringchoice = std::string(JAMI_DATADIR) + DIR_SEPARATOR_STR + RINGDIR + DIR_SEPARATOR_STR + ringchoice; } #endif -- GitLab