From 9a4d15f647bc90cc6b760cbad4bc4dab877f217b Mon Sep 17 00:00:00 2001 From: Erik Kundiman Date: Sun, 21 Jul 2024 20:10:58 +0800 Subject: CEF via Linux binary compatibility attempt on FBSD Since the condition is quite specific for now, debootstrapped Debian/Ubuntu x86-64 only, paths are just hardcoded. We got far enough that SLPlugin doesn't get killed, and there's no notification that "text/html" cannot be handled any more, it's just it hasn't worked yet, the built-in browser. --- indra/newview/llappviewer.cpp | 4 ++-- indra/newview/llviewermedia.cpp | 16 ++++++++++++++++ 2 files changed, 18 insertions(+), 2 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 975935ee6f..1048d36961 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -132,7 +132,7 @@ #include "stringize.h" #include "llcoros.h" #include "llexception.h" -#if LL_DARWIN || LL_LINUX +#if LL_DARWIN || LL_LINUX || __FreeBSD__ #include "cef/dullahan_version.h" #endif #include "vlc/libvlc_version.h" @@ -3420,7 +3420,7 @@ LLSD LLAppViewer::getViewerInfo() const info["VOICE_VERSION"] = LLTrans::getString("NotConnected"); } -#if LL_DARWIN || LL_LINUX +#if LL_DARWIN || LL_LINUX || __FreeBSD__ std::ostringstream cef_ver_codec; cef_ver_codec << "Dullahan: "; cef_ver_codec << DULLAHAN_VERSION_MAJOR; diff --git a/indra/newview/llviewermedia.cpp b/indra/newview/llviewermedia.cpp index c8b7a9c29b..e86cb7ab39 100644 --- a/indra/newview/llviewermedia.cpp +++ b/indra/newview/llviewermedia.cpp @@ -1719,6 +1719,13 @@ LLPluginClassMedia* LLViewerMediaImpl::newSourceFromMediaType(std::string media_ { std::string launcher_name = gDirUtilp->getLLPluginLauncher(); std::string plugin_name = gDirUtilp->getLLPluginFilename(plugin_basename); +#if __FreeBSD__ + if (plugin_basename == "media_plugin_cef") + { + launcher_name = "/compat/linux/usr/libexec/megapahit/SLPlugin"; + plugin_name = "/compat/linux/usr/lib/x86_64-linux-gnu/libmedia_plugin_cef.so"; + } +#endif std::string user_data_path_cache = gDirUtilp->getCacheDir(false); user_data_path_cache += gDirUtilp->getDirDelimiter(); @@ -1779,7 +1786,16 @@ LLPluginClassMedia* LLViewerMediaImpl::newSourceFromMediaType(std::string media_ media_source->setTarget(target); +#if __FreeBSD__ + std::string plugin_dir = gDirUtilp->getLLPluginDir(); + if (plugin_basename == "media_plugin_cef") + { + plugin_dir = "/compat/linux/usr/lib/x86_64-linux-gnu"; + plugin_name = "/usr/lib/x86_64-linux-gnu/libmedia_plugin_cef.so"; + } +#else const std::string plugin_dir = gDirUtilp->getLLPluginDir(); +#endif if (media_source->init(launcher_name, plugin_dir, plugin_name, gSavedSettings.getBOOL("PluginAttachDebuggerToPlugins"))) { return media_source; -- cgit v1.2.3 From 8f66fcb7e32ce074fda9816efec37b45659c45e3 Mon Sep 17 00:00:00 2001 From: Erik Kundiman Date: Sun, 21 Jul 2024 21:21:12 +0800 Subject: Wine-based Vivox-based voice support for FreeBSD https://megapahit.com/show_bug.cgi?id=57 For SLVoice to run, there is a couple of environment variables that need to be set, and users need to run `/usr/local/share/wine/pkg32.sh install wine mesa-dri` to install the necessary files first. All this time the env parameter on apr_proc_create was never used, and this is just the place for passing those environment settings, hence the LLProcess::Param attribute addition. --- indra/newview/llvoicevivox.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/llvoicevivox.cpp b/indra/newview/llvoicevivox.cpp index 4473c8b55b..cf5ee3af54 100644 --- a/indra/newview/llvoicevivox.cpp +++ b/indra/newview/llvoicevivox.cpp @@ -944,11 +944,15 @@ bool LLVivoxVoiceClient::startAndLaunchDaemon() // vivox executable exists. Build the command line and launch the daemon. LLProcess::Params params; #if LL_LINUX || __FreeBSD__ +#if __FreeBSD__ + params.envs.add("WINEARCH=win32"); + params.envs.add("WINEPREFIX=~/.i386-wine-pkg"); +#endif // __FreeBSD__ params.executable = "wine"; params.args.add(exe_path); #else params.executable = exe_path; -#endif +#endif // LL_LINUX || __FreeBSD__ // VOICE-88: Cycle through [portbase..portbase+portrange) on // successive tries because attempting to relaunch (after manually -- cgit v1.2.3