diff --git a/autobuild.xml b/autobuild.xml index ae4bd5f639..558a10b9fb 100755 --- a/autobuild.xml +++ b/autobuild.xml @@ -2231,9 +2231,9 @@ archive hash - 06c3a9b1005249f0c94a8b9f3775f3d3 + 6e7b0961d6489a1b3c3090eccfd6e80e url - http://automated-builds-secondlife-com.s3.amazonaws.com/hg/repo/vivox_3p-slvoice/rev/302004/arch/Linux/installer/slvoice-3.2.0002.10426.302004-linux-302004.tar.bz2 + http://downloads.phoenixviewer.com/slvoice-3.2.0002.10426.298329-linux-20160717.tar.bz2 name linux diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 32f0f3ee7a..afc9042f47 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -24020,6 +24020,17 @@ Change of this parameter will affect the layout of buttons in notification toast Value 0 + FSLinuxEnableWin32VoiceProxy + + Comment + Use Win32 SLVoice.exe for voice. Needs wine (https://www.winehq.org/) installed, as SLVoice.exe is started inside wine. + Persist + 1 + Type + Boolean + Value + 0 + diff --git a/indra/newview/llvoicevivox.cpp b/indra/newview/llvoicevivox.cpp index ab691ba80d..444c71370d 100644 --- a/indra/newview/llvoicevivox.cpp +++ b/indra/newview/llvoicevivox.cpp @@ -395,6 +395,26 @@ bool LLVivoxVoiceClient::writeString(const std::string &str) return result; } +// On Linux the viewer can run SLVoice.exe through wine (https://www.winehq.org/) +// Vivox does not support Linux anymore and the SDK SLVoice for Linux uses is old and according to LL +// will stop working 'soon' (as of 2016-07-17). See also FIRE-19663 +bool viewerUsesWineForVoice() +{ +#ifndef LL_LINUX + return false; +#else + static LLCachedControl sEnableVoiceChat(gSavedSettings, "FSLinuxEnableWin32VoiceProxy" ); + + return sEnableVoiceChat; +#endif +} + +bool viewerChoosesConnectionHandles() +{ + return viewerUsesWineForVoice(); +} +// + ///////////////////////////// // session control messages @@ -425,15 +445,19 @@ void LLVivoxVoiceClient::connectorCreate() loglevel = savedLogLevel; // } + + // Check if using the old SLVoice for Linux. the SDK in that version is too old to handle the extra args + std::string strConnectorHandle; + if( viewerChoosesConnectionHandles() ) + strConnectorHandle = "" + LLVivoxSecurity::getInstance()->connectorHandle() + ""; + // stream << "" << "V2 SDK" << "" << mVoiceAccountServerURI << "" << "Normal" -#ifndef LL_LINUX // FIRE-19556: Linux voice fix - << "" << LLVivoxSecurity::getInstance()->connectorHandle() << "" -#endif // + << strConnectorHandle // Voice in multiple instances; by Latif Khalifa << (gSavedSettings.getBOOL("VoiceMultiInstance") ? "3000050000" : "") // @@ -654,7 +678,13 @@ bool LLVivoxVoiceClient::startAndLaunchDaemon() #elif LL_DARWIN exe_path += "../Resources/SLVoice"; #else - exe_path += "SLVoice"; + // On Linux the viewer can run SLVoice.exe through wine (https://www.winehq.org/) + // exe_path += "SLVoice"; + if( !viewerUsesWineForVoice() ) + exe_path += "SLVoice"; // native version + else + exe_path += "win32/SLVoice.exe"; // use bundled win32 version + // #endif // See if the vivox executable exists llstat s; @@ -662,8 +692,19 @@ bool LLVivoxVoiceClient::startAndLaunchDaemon() { // vivox executable exists. Build the command line and launch the daemon. LLProcess::Params params; + + // On Linux the viewer can run SLVoice.exe through wine (https://www.winehq.org/) params.executable = exe_path; + if( !viewerUsesWineForVoice() ) + params.executable = exe_path; + else + { + params.executable = "wine"; + params.args.add( exe_path ); + } + // + std::string loglevel = gSavedSettings.getString("VivoxDebugLevel"); std::string shutdown_timeout = gSavedSettings.getString("VivoxShutdownTimeout"); if (loglevel.empty()) @@ -713,7 +754,8 @@ bool LLVivoxVoiceClient::startAndLaunchDaemon() params.cwd = gDirUtilp->getAppRODataDir(); -#ifndef LL_LINUX // FIRE-19556: Linux voice fix + // Check if using the old SLVoice for Linux. the SDK in that version is too old to handle the extra args + if( viewerChoosesConnectionHandles() ) { // # ifdef VIVOX_HANDLE_ARGS params.args.add("-ah"); params.args.add(LLVivoxSecurity::getInstance()->accountHandle()); @@ -721,7 +763,7 @@ bool LLVivoxVoiceClient::startAndLaunchDaemon() params.args.add("-ch"); params.args.add(LLVivoxSecurity::getInstance()->connectorHandle()); # endif // VIVOX_HANDLE_ARGS -#endif // + } // sGatewayPtr = LLProcess::create(params); @@ -1885,14 +1927,18 @@ void LLVivoxVoiceClient::loginSendMessage() bool autoPostCrashDumps = gSavedSettings.getBOOL("VivoxAutoPostCrashDumps"); + // Check if using the old SLVoice for Linux. the SDK in that version is too old to handle the extra args + std::string strAccountHandle; + if( viewerChoosesConnectionHandles() ) + strAccountHandle = "" + LLVivoxSecurity::getInstance()->accountHandle() + ""; + // + stream << "" << "" << LLVivoxSecurity::getInstance()->connectorHandle() << "" << "" << mAccountName << "" << "" << mAccountPassword << "" -#ifndef LL_LINUX // FIRE-19556: Linux voice fix - << "" << LLVivoxSecurity::getInstance()->accountHandle() << "" -#endif // + << strAccountHandle << "VerifyAnswer" << "false" << "0" @@ -2913,7 +2959,8 @@ void LLVivoxVoiceClient::connectorCreateResponse(int statusCode, std::string &st else { // Connector created, move forward. -#ifndef LL_LINUX // FIRE-19556: Linux voice fix + // Check if using the old SLVoice for Linux. the SDK in that version is too old to handle the extra args + if( viewerChoosesConnectionHandles() ) { // if (connectorHandle == LLVivoxSecurity::getInstance()->connectorHandle()) { LL_INFOS("Voice") << "Connector.Create succeeded, Vivox SDK version is " << versionID << " connector handle " << connectorHandle << LL_ENDL; @@ -2931,8 +2978,7 @@ void LLVivoxVoiceClient::connectorCreateResponse(int statusCode, std::string &st << LL_ENDL; result["connector"] = LLSD::Boolean(false); } - // FIRE-19556: Linux voice fix -#else + } else { // For old Linux Voice LL_INFOS("Voice") << "Connector.Create succeeded, Vivox SDK version is " << versionID << LL_ENDL; mVoiceVersion.serverVersion = versionID; LLVivoxSecurity::getInstance()->setConnectorHandle(connectorHandle); @@ -2940,8 +2986,7 @@ void LLVivoxVoiceClient::connectorCreateResponse(int statusCode, std::string &st mTerminateDaemon = false; result["connector"] = LLSD::Boolean(true); -#endif - // + } // For old Linux voice } LLEventPumps::instance().post("vivoxClientPump", result); @@ -2969,9 +3014,11 @@ void LLVivoxVoiceClient::loginResponse(int statusCode, std::string &statusString else { // Login succeeded, move forward. -#ifdef LL_LINUX // FIRE-19556: Linux voice fix - LLVivoxSecurity::getInstance()->setAccountHandle(accountHandle); -#endif // + + // Check if using the old SLVoice for Linux. + if( !viewerChoosesConnectionHandles() ) + LLVivoxSecurity::getInstance()->setAccountHandle(accountHandle); + // mAccountLoggedIn = true; mNumberOfAliases = numberOfAliases; result["login"] = LLSD::String("response_ok"); diff --git a/indra/newview/llvoicevivox.h b/indra/newview/llvoicevivox.h index 6dc0a1a75a..b48da94084 100644 --- a/indra/newview/llvoicevivox.h +++ b/indra/newview/llvoicevivox.h @@ -1050,13 +1050,11 @@ class LLVivoxSecurity : public LLSingleton std::string connectorHandle() { return mConnectorHandle; }; std::string accountHandle() { return mAccountHandle; }; -// FIRE-19556: Linux voice fix -#ifdef LL_LINUX - void setConnectorHandle(const std::string& handle) { mConnectorHandle = handle; } - void setAccountHandle(const std::string& handle) { mAccountHandle = handle; } -#endif -// - + // For the old Vivox SDK used on Linux + void setConnectorHandle(const std::string& handle) { mConnectorHandle = handle; } + void setAccountHandle(const std::string& handle) { mAccountHandle = handle; } + // + private: std::string mConnectorHandle; std::string mAccountHandle; diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py index c5d1746472..df445d25ef 100755 --- a/indra/newview/viewer_manifest.py +++ b/indra/newview/viewer_manifest.py @@ -1489,6 +1489,7 @@ class LinuxManifest(ViewerManifest): # Currentelly, the 32-bit ones will work with a 64-bit client. if self.prefix(src="../packages/lib/release", dst="bin"): self.path("SLVoice") + self.path("win32") self.end_prefix() if self.prefix(src="../packages/lib/release", dst="lib"): self.path("libortp.so") @@ -1554,7 +1555,7 @@ class LinuxManifest(ViewerManifest): def strip_binaries(self): if self.args['buildtype'].lower() == 'release' and self.is_packaging_viewer(): print "* Going strip-crazy on the packaged binaries, since this is a RELEASE build" - self.run_command(r"find %(d)r/bin %(d)r/lib -type f \! -name update_install \! -name *.pak \! -name *.dat \! -name *.bin \! -name core | xargs --no-run-if-empty strip -S" % {'d': self.get_dst_prefix()} ) # makes some small assumptions about our packaged dir structure + self.run_command(r"find %(d)r/bin %(d)r/lib -type f \! -name update_install \! -name *.pak \! -name *.dat \! -name *.bin \! -name core \! -path '*win32*' | xargs --no-run-if-empty strip -S" % {'d': self.get_dst_prefix()} ) # makes some small assumptions about our packaged dir structure class Linux_i686_Manifest(LinuxManifest): def construct(self):