On Linux and in standalone mode, first look for SLVoice in the executable path list. If none is found then try to use the one installed with Singularity, if any. Useful for packagers who want to make many sl clients share the same voice program.
This commit is contained in:
@@ -29,6 +29,9 @@
|
||||
* COMPLETENESS OR PERFORMANCE.
|
||||
* $/LicenseInfo$
|
||||
*/
|
||||
#if LL_LINUX && defined(LL_STANDALONE)
|
||||
#include <glib.h>
|
||||
#endif
|
||||
|
||||
#include "llviewerprecompiledheaders.h"
|
||||
#include "llvoiceclient.h"
|
||||
@@ -1635,9 +1638,22 @@ void LLVoiceClient::stateMachine()
|
||||
{
|
||||
// Launch the voice daemon
|
||||
|
||||
// *FIX:Mani - Using the executable dir instead
|
||||
// of mAppRODataDir, the working directory from which the app
|
||||
// is launched.
|
||||
#if LL_LINUX && defined(LL_STANDALONE)
|
||||
// Look for the vivox daemon in the executable path list
|
||||
// using glib first.
|
||||
char *voice_path = g_find_program_in_path ("SLVoice");
|
||||
std::string exe_path;
|
||||
if (voice_path) {
|
||||
exe_path = llformat("%s", voice_path);
|
||||
free(voice_path);
|
||||
} else {
|
||||
exe_path = gDirUtilp->getExecutableDir() +
|
||||
gDirUtilp->getDirDelimiter() + "SLVoice";
|
||||
}
|
||||
#else
|
||||
// *FIX:Mani - Using the executable dir instead
|
||||
// of mAppRODataDir, the working directory from which the
|
||||
// app is launched.
|
||||
//std::string exe_path = gDirUtilp->getAppRODataDir();
|
||||
std::string exe_path = gDirUtilp->getExecutableDir();
|
||||
exe_path += gDirUtilp->getDirDelimiter();
|
||||
@@ -1647,6 +1663,7 @@ void LLVoiceClient::stateMachine()
|
||||
exe_path += "../Resources/SLVoice";
|
||||
#else
|
||||
exe_path += "SLVoice";
|
||||
#endif
|
||||
#endif
|
||||
// See if the vivox executable exists
|
||||
llstat s;
|
||||
|
||||
Reference in New Issue
Block a user