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
This commit is contained in:
Maxim Cournoyer
2022-01-19 12:12:08 -05:00
committed by Amin Bandali
parent 89b7ffe91f
commit 754ae6bfdb
5 changed files with 5 additions and 5 deletions

View File

@ -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 */

View File

@ -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)\" \

View File

@ -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())

View File

@ -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)

View File

@ -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