Skip to content

Commit

Permalink
build: Rename PROGSHAREDIR to JAMI_DATADIR.
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Maxim Cournoyer authored and bandali committed Jan 20, 2022
1 parent 89b7ffe commit 754ae6b
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion compat/msvc/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down
2 changes: 1 addition & 1 deletion globals.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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)\" \
Expand Down
2 changes: 1 addition & 1 deletion meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -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())
Expand Down
2 changes: 1 addition & 1 deletion src/account.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion src/manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 754ae6b

Please sign in to comment.