From e6abebb6aef6bddee45be22e368e9fd8a6b4ec68 Mon Sep 17 00:00:00 2001 From: Rye Date: Tue, 14 Oct 2025 07:43:04 -0400 Subject: Fix up linux feature table and various small build changes Signed-off-by: Rye --- indra/newview/linux_tools/wrapper.sh | 83 ++---------------------------------- 1 file changed, 4 insertions(+), 79 deletions(-) (limited to 'indra/newview/linux_tools') diff --git a/indra/newview/linux_tools/wrapper.sh b/indra/newview/linux_tools/wrapper.sh index eb3ead433b..dee6197b05 100755 --- a/indra/newview/linux_tools/wrapper.sh +++ b/indra/newview/linux_tools/wrapper.sh @@ -1,49 +1,17 @@ #!/bin/bash -## Here are some configuration options for Linux Client Testers. -## These options are for self-assisted troubleshooting during this beta -## testing phase; you should not usually need to touch them. +## Here are some configuration options for Linux Client Users. ## - Avoids using any FMOD STUDIO audio driver. #export LL_BAD_FMODSTUDIO_DRIVER=x ## - Avoids using any OpenAL audio driver. #export LL_BAD_OPENAL_DRIVER=x -## - Avoids using the FMOD Studio or FMOD Ex PulseAudio audio driver. +## - Avoids using the FMOD Studio PulseAudio audio driver. #export LL_BAD_FMOD_PULSEAUDIO=x -## - Avoids using the FMOD Studio or FMOD Ex ALSA audio driver. +## - Avoids using the FMOD Studio ALSA audio driver. #export LL_BAD_FMOD_ALSA=x -## - Avoids the optional OpenGL extensions which have proven most problematic -## on some hardware. Disabling this option may cause BETTER PERFORMANCE but -## may also cause CRASHES and hangs on some unstable combinations of drivers -## and hardware. -## NOTE: This is now disabled by default. -#export LL_GL_BASICEXT=x - -## - Avoids *all* optional OpenGL extensions. This is the safest and least- -## exciting option. Enable this if you experience stability issues, and -## report whether it helps in the Linux Client Testers forum. -#export LL_GL_NOEXT=x - -## - For advanced troubleshooters, this lets you disable specific GL -## extensions, each of which is represented by a letter a-o. If you can -## narrow down a stability problem on your system to just one or two -## extensions then please post details of your hardware (and drivers) to -## the Linux Client Testers forum along with the minimal -## LL_GL_BLACKLIST which solves your problems. -#export LL_GL_BLACKLIST=abcdefghijklmno - -## - Some ATI/Radeon users report random X server crashes when the mouse -## cursor changes shape. If you suspect that you are a victim of this -## driver bug, try enabling this option and report whether it helps: -#export LL_ATI_MOUSE_CURSOR_BUG=x - -if [ "`uname -m`" = "x86_64" ]; then - echo '64-bit Linux detected.' -fi - - ## Everything below this line is just for advanced troubleshooters. ##------------------------------------------------------------------- @@ -55,32 +23,6 @@ fi #export LL_WRAPPER='gdb --args' #export LL_WRAPPER='valgrind --smc-check=all --error-limit=no --log-file=secondlife.vg --leak-check=full --suppressions=/usr/lib/valgrind/glibc-2.5.supp --suppressions=secondlife-i686.supp' -## - Avoids an often-buggy X feature that doesn't really benefit us anyway. -export SDL_VIDEO_X11_DGAMOUSE=0 - -## - Works around a problem with misconfigured 64-bit systems not finding GL -I386_MULTIARCH="$(dpkg-architecture -ai386 -qDEB_HOST_MULTIARCH 2>/dev/null)" -MULTIARCH_ERR=$? -if [ $MULTIARCH_ERR -eq 0 ]; then - echo 'Multi-arch support detected.' - MULTIARCH_GL_DRIVERS="/usr/lib/${I386_MULTIARCH}/dri" - export LIBGL_DRIVERS_PATH="${LIBGL_DRIVERS_PATH}:${MULTIARCH_GL_DRIVERS}:/usr/lib64/dri:/usr/lib32/dri:/usr/lib/dri" -else - export LIBGL_DRIVERS_PATH="${LIBGL_DRIVERS_PATH}:/usr/lib64/dri:/usr/lib32/dri:/usr/lib/dri" -fi - -## - The 'scim' GTK IM module widely crashes the viewer. Avoid it. -if [ "$GTK_IM_MODULE" = "scim" ]; then - export GTK_IM_MODULE=xim -fi - -## - Automatically work around the ATI mouse cursor crash bug: -## (this workaround is disabled as most fglrx users do not see the bug) -#if lsmod | grep fglrx &>/dev/null ; then -# export LL_ATI_MOUSE_CURSOR_BUG=x -#fi - - ## Nothing worth editing below this line. ##------------------------------------------------------------------- @@ -99,24 +41,7 @@ cd "${RUN_PATH}" ## subprocesses that care. export SAVED_LD_LIBRARY_PATH="${LD_LIBRARY_PATH}" -# if [ -n "$LL_TCMALLOC" ]; then -# tcmalloc_libs='/usr/lib/libtcmalloc.so.0 /usr/lib/libstacktrace.so.0 /lib/libpthread.so.0' -# all=1 -# for f in $tcmalloc_libs; do -# if [ ! -f $f ]; then -# all=0 -# fi -# done -# if [ $all != 1 ]; then -# echo 'Cannot use tcmalloc libraries: components missing' 1>&2 -# else -# export LD_PRELOAD=$(echo $tcmalloc_libs | tr ' ' :) -# if [ -z "$HEAPCHECK" -a -z "$HEAPPROFILE" ]; then -# export HEAPCHECK=${HEAPCHECK:-normal} -# fi -# fi -#fi - +# Add our library directory export LD_LIBRARY_PATH="$PWD/lib:${LD_LIBRARY_PATH}" # Copy "$@" to ARGS array specifically to delete the --skip-gridargs switch. -- cgit v1.3 From 92db2aa7028c997069f281dd376c40b058f5b16f Mon Sep 17 00:00:00 2001 From: Rye Date: Mon, 27 Oct 2025 02:49:35 -0400 Subject: Cleanup up linux wrapper script and fix desktop entry creation Signed-off-by: Rye --- .../newview/linux_tools/client-readme-joystick.txt | 78 ------- indra/newview/linux_tools/client-readme-voice.txt | 81 ------- indra/newview/linux_tools/client-readme.txt | 244 --------------------- .../linux_tools/refresh_desktop_app_entry.sh | 17 +- indra/newview/linux_tools/wrapper.sh | 27 +-- indra/newview/viewer_manifest.py | 3 - 6 files changed, 14 insertions(+), 436 deletions(-) delete mode 100644 indra/newview/linux_tools/client-readme-joystick.txt delete mode 100644 indra/newview/linux_tools/client-readme-voice.txt delete mode 100644 indra/newview/linux_tools/client-readme.txt (limited to 'indra/newview/linux_tools') diff --git a/indra/newview/linux_tools/client-readme-joystick.txt b/indra/newview/linux_tools/client-readme-joystick.txt deleted file mode 100644 index 4f89a73ccb..0000000000 --- a/indra/newview/linux_tools/client-readme-joystick.txt +++ /dev/null @@ -1,78 +0,0 @@ -Second Life - Joystick & SpaceNavigator Support README --=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= - -WHAT IS IT? --=-=-=-=-=- - -This feature allows the use of a joystick or other supported multi-axis -device for controlling your avatar and camera. - -REQUIREMENTS --=-=-=-=-=-= - -* A joystick or other generic multi-axis input device supported by your chosen - version of Linux - -- OR - - -* A SpaceNavigator device (additional configuration may be required, see below) - -Success has been reported on the following systems so far: -* Ubuntu 7.04 (Feisty) with a generic USB joystick -* Ubuntu 7.04 (Feisty) with a USB 3DConnexion SpaceNavigator -* Ubuntu 6.06 (Dapper) with a generic USB joystick -* Ubuntu 6.06 (Dapper) with a USB 3DConnexion SpaceNavigator - -CONFIGURATION --=-=-=-=-=-=- - -SPACE NAVIGATOR: *Important* - do not install the Linux SpaceNavigator -drivers from the disk included with the device - these are problematic. -Some distributions of Linux (such as Ubuntu, Gentoo and Mandriva) will -need some system configuration to make the SpaceNavigator usable by -applications such as the Second Life Viewer, as follows: - -* Mandriva Linux Configuration: - You need to add two new files to your system. This only needs to be - done once. These files are available at the 'SpaceNavigator support with - udev and Linux input framework' section of - - -* Ubuntu or Gentoo Linux Configuration: - For a quick start, you can simply paste the following line into a terminal - before plugging in your SpaceNavigator - this only needs to be done once: - sudo bash -c 'echo KERNEL==\"event[0-9]*\", SYSFS{idVendor}==\"046d\", SYSFS{idProduct}==\"c626\", SYMLINK+=\"input/spacenavigator\", GROUP=\"plugdev\", MODE=\"664\" > /etc/udev/rules.d/91-spacenavigator-LL.rules ; echo "" > /etc/hal/fdi/policy/3Dconnexion_SpaceNavigator_LL.fdi' - -For more comprehensive Linux SpaceNavigator configuration information please -see the section 'Installing SpaceNavigator without the official driver' here: - - -JOYSTICKS: These should be automatically detected and configured on all -modern distributions of Linux. - -ALL: Your joystick or SpaceNavigator should be plugged-in before you start the -Second Life Viewer, so that it may be detected. If you have multiple input -devices attached, only the first detected SpaceNavigator or joystick device -will be available. - -Once your system recognises your joystick or SpaceNavigator correctly, you -can go into the Second Life Viewer's Preferences dialog, click the 'Input & -Camera' tab, and click the 'Joystick Setup' button. From here you may enable -and disable joystick support and change some configuration settings such as -sensitivity. SpaceNavigator users are recommended to click the -'SpaceNavigator Defaults' button. - -KNOWN PROBLEMS --=-=-=-=-=-=-= - -* If your chosen version of Linux treats your joystick/SpaceNavigator as -if it were a mouse when you plug it in (i.e. it is automatically used to control -your desktop cursor), then the SL Viewer may detect this device *but* will be -unable to use it properly. - -FURTHER PROBLEMS? --=-=-=-=-=-=-=-=- - -Please report further issues to the public Second Life issue-tracker -at (please note, however, that this is not -a support forum). diff --git a/indra/newview/linux_tools/client-readme-voice.txt b/indra/newview/linux_tools/client-readme-voice.txt deleted file mode 100644 index bfefdf3471..0000000000 --- a/indra/newview/linux_tools/client-readme-voice.txt +++ /dev/null @@ -1,81 +0,0 @@ -Second Life - Linux Voice Support README --=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= - -WHAT IS IT? --=-=-=-=-=- - -Linux Voice Support is a feature in testing which allows users of the Linux -Second Life client to participate in voice-chat with other residents and -groups inside Second Life, with an appropriate headset/microphone. - -REQUIREMENTS --=-=-=-=-=-= - -* A headset/microphone supported by your chosen version of Linux -* At this time, the PulseAudio audio system is recommended; this software - is already part of most modern (2009+) Linux desktop systems. Alternatively, - the ALSA audio system may be used on systems installed from around - 2007 onwards (again this is likely already installed on your system). - -TESTING YOUR SETTINGS --=-=-=-=-=-=-=-=-=-=- - -* The Second Life region 'Voice Echo Canyon' is a great place for testing -your hardware settings and quality - it will 'echo' your voice back to you -when you speak. - -KNOWN PROBLEMS --=-=-=-=-=-=-= - -* Compatibility with old ALSA-based audio systems (such as Ubuntu Dapper - from 2006) is poor. - -TROUBLESHOOTING --=-=-=-=-=-=-=- - -PROBLEM 1: I don't see a white dot over the head of my avatar or other - Voice-using avatars. -SOLUTION: -a. Ensure that 'Enable voice' is enabled in the 'Sound' section of the - Preferences window, and that you are in a voice-enabled area. -b. If the above does not help, exit Second Life and ensure that any - remaining 'SLVoice' processes (as reported by 'ps', 'top' or similar) - are killed before restarting. - -PROBLEM 2: I have a white dot over my head but I never see (or hear!) anyone - except myself listed in the Active Speakers dialog when I'm sure that other - residents nearby are active Voice users. -SOLUTION: This is an incompatibility between the Voice support and your - system's audio (ALSA) driver version/configuration. -a. Back-up and remove your ~/.asoundrc file, re-test. -b. Check for updates to your kernel, kernel modules and ALSA-related - packages using your Linux distribution's package-manager - install these, - reboot and re-test. -c. Update to the latest version of ALSA manually. For a guide, see the - 'Update to the Latest Version of ALSA' section of this page: - or the official - documentation on the ALSA site: - reboot - and re-test. - -PROBLEM 3: I can hear other people, but they cannot hear me. -SOLUTION: -a. Ensure that you have the 'Speak' button (at the bottom of the Second Life - window) activated while you are trying to speak. -b. Ensure that your microphone jack is inserted into the correct socket of your - sound card, where appropriate. -c. Use your system mixer-setting program (such as the PulseAudio 'volume - control' applet or the ALSA 'alsamixer' program) to ensure that microphone - input is set as the active input source and is not muted. -d. Verify that audio input works in other applications, i.e. Audacity - -PROBLEM 4: Other people just hear bursts of loud noise when I speak. -SOLUTION: -a. Use your system mixer-setting program or the 'alsamixer' program to ensure - that microphone Gain/Boost is not set too high. - -FURTHER PROBLEMS? --=-=-=-=-=-=-=-=- - -Please report further issues to the public Second Life issue-tracker -at (please note, however, that this is not -a support forum). diff --git a/indra/newview/linux_tools/client-readme.txt b/indra/newview/linux_tools/client-readme.txt deleted file mode 100644 index cb8d1af535..0000000000 --- a/indra/newview/linux_tools/client-readme.txt +++ /dev/null @@ -1,244 +0,0 @@ -Second Life - Linux Beta README --=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- - -This document contains information about the Second Life Linux -client, and isn't meant to serve as an introduction to Second -Life itself - please see . - -1. Introduction -2. System Requirements -3. Installing & Running -4. Known Issues -5. Troubleshooting - 5.1. 'Error creating window.' - 5.2. System hangs - 5.3. Blank window after minimizing it - 5.4. Audio - 5.5. 'Alt' key for camera controls doesn't work - 5.6. In-world streaming movie, music and Flash playback -6. Advanced Troubleshooting - 6.1. Audio - 6.2. OpenGL -7. Obtaining and working with the client source code -8. Getting more help, and reporting problems - - -1. INTRODUCTION --=-=-=-=-=-=-=- - -Hi! This is a BETA release of the Second Life client for Linux. -The 'beta' status means that although we're still smoothing-out a few rough -edges, this version of the client is functionally complete and should -work quite well 'out of the box' for accessing Second Life. - -We encourage you to try it out and let us know of its compatibility -with your system. Be aware that although this is a 'beta' client, it connects -to the main Second Life world and changes you make there are permanent. - -You will have either obtained this client from secondlife.com (the official -site) or from a third-party packager; if you encounter any problems then -we recommend trying the latest official builds from secondlife.com which are -updated often. - -Please enjoy! - - -2. SYSTEM REQUIREMENTS --=-=-=-=-=-=-=-=-=-=-= - -Minimum requirements: - * Internet Connection: Cable or DSL - * Computer Processor: 800MHz Pentium III or Athlon or better - (recommended: 1.5GHz or more) - * Computer Memory: 512MB (recommended: 768MB or more) - * Linux Operating System: A reasonably modern 32-bit Linux environment - is required. If you are running a 64-bit Linux distribution then - you will need its 32-bit compatibility environment installed, but - this configuration is not currently supported. - * PulseAudio or ALSA Linux system sound software. A recent PulseAudio - is the recommended configuration; see README-linux-voice.txt for more - information. - * Video/Graphics Card: - o nVidia GeForce 2, GeForce 4mx, or better (recommend one of the - following: 6700, 6800, 7600, 7800, 7900, 8400, 8500, 8600, - 8800, Go 7400, Go 7600, Go 7800, Go 7900, +) - o OR ATI Radeon 8500, 9250, or better - (nVidia cards are recommended for the Linux client) - - **NOTE**: Second Life absolutely requires you to have recent, correctly- - configured OpenGL 3D drivers for your hardware - the graphics drivers - that came with your operating system may not be good enough! See the - TROUBLESHOOTING section if you encounter problems starting Second Life. - -For a more comfortable experience, the RECOMMENDED hardware for the Second -Life Linux client is very similar to that for Windows, as detailed at: - - - -3. INSTALLING & RUNNING --=-=-=-=-=-=-=-=-=-=-=- - -The Second Life Linux client can entirely run from the directory you have -unpacked it into - no installation step is required. If you wish to -perform a separate installation step anyway, you may run './install.sh' - -Run ./secondlife from the installation directory to start Second Life. - -For in-world MOVIE and MUSIC PLAYBACK, you will need (32-bit) GStreamer 0.10 -installed on your system. This is optional - it is not required for general -client functionality. If you have GStreamer 0.10 installed, the selection of -in-world movies you can successfully play will depend on the GStreamer -plugins you have; if you cannot play a certain in-world movie then you are -probably missing the appropriate GStreamer plugin on your system - you may -be able to install it (see TROUBLESHOOTING). - -User data is stored in the hidden directory ~/.secondlife by default; you may -override this location with the SECONDLIFE_USER_DIR environment variable if -you wish. - - -4. KNOWN ISSUES --=-=-=-=-=-=-=- - -* No significant known issues at this time. - - -5. TROUBLESHOOTING --=-=-=-=-=-=-=-=-= - -The client prints a lot of diagnostic information to the console it was -run from. Most of this is also replicated in ~/.secondlife/logs/SecondLife.log -- this is helpful to read when troubleshooting, especially 'WARNING' and -'ERROR' lines. - -VOICE PROBLEMS? See the separate README-linux-voice.txt file for Voice - troubleshooting information. - -SPACENAVIGATOR OR JOYSTICK PROBLEMS? See the separate - README-linux-joystick.txt file for configuration information. - -PROBLEM 1:- Second Life fails to start up, with a warning on the console like: - 'Error creating window.' or - 'Unable to create window, be sure screen is set at 32-bit color' or - 'SDL: Couldn't find matching GLX visual.' -SOLUTION:- Usually this indicates that your graphics card does not meet - the minimum requirements, or that your system's OpenGL 3D graphics driver is - not updated and configured correctly. If you believe that your graphics - card DOES meet the minimum requirements then you likely need to install the - official so-called 'non-free' nVidia or ATI (fglrx) graphics drivers; we - suggest one of the following options: - * Consult your Linux distribution's documentation for installing these - official drivers. For example, Ubuntu provides documentation here: - - * If your distribution does not make it easy, then you can download the - required Linux drivers straight from your graphics card manufacturer: - - nVidia cards: - - ATI cards: - -PROBLEM 2:- My whole system seems to hang when running Second Life. -SOLUTION:- This is typically a hardware/driver issue. The first thing to - do is to check that you have the most recent official drivers for your - graphics card (see PROBLEM 1). -SOLUTION:- Some residents with ATI cards have reported that running - 'sudo aticonfig --locked-userpages=off' before running Second Life solves - their stability issues. -SOLUTION:- As a last resort, you can disable most of Second Life's advanced - graphics features by editing the 'secondlife' script and removing the '#' - from the line which reads '#export LL_GL_NOEXT=x' - -PROBLEM 3:- After I minimize the Second Life window, it's just blank when - it comes back. -SOLUTION:- Some Linux desktop 'Visual Effects' features are incompatible - with Second Life. One reported solution is to use your desktop - configuration program to disable such effects. For example, on Ubuntu 7.10, - use the desktop toolbar menu to select System -> Preferences -> Appearance, - then change 'Visual Effects' to 'None'. - -PROBLEM 4:- Music and sound effects are silent or very stuttery. -SOLUTION:- The most common solution is to ensure that you have the 'esd' - program (part of the 'esound' package) installed and running before you - start Second Life. Users of Ubuntu (and some other) Linux systems can - simply run the following to install and configure 'esound': - sudo apt-get install esound - For others, simply running 'esd&' from a command-line should get it running. - -PROBLEM 5:- Using the 'Alt' key to control the camera doesn't work or just - moves the Second Life window. -SOLUTION:- Some window managers eat the Alt key for their own purposes; you - can configure your window manager to use a different key instead (for - example, the 'Windows' key!) which will allow the Alt key to function - properly with mouse actions in Second Life and other applications. - -PROBLEM 6:- In-world movie, music, or Flash playback doesn't work for me. -SOLUTION:- You need to have a working installation of GStreamer 0.10; this - is usually an optional package for most versions of Linux. If you have - installed GStreamer 0.10 and you can play some music/movies but not others - then you need to install a wider selection of GStreamer plugins, either - from your vendor (i.e. the 'Ugly' plugins) or an appropriate third party. - For Flash playback, you need to have Flash 10 installed for your normal - web browser (for example, Firefox). PulseAudio is required for Flash - volume control / muting to fully function inside Second Life. - - -6. ADVANCED TROUBLESHOOTING --=-=-=-=-=-=-=-=-=-=-=-=-=- - -The 'secondlife' script which launches Second Life contains some -configuration options for advanced troubleshooters. - -* AUDIO - Edit the 'secondlife' script and you will see these audio - options: LL_BAD_OPENAL_DRIVER, LL_BAD_FMODSTUDIO_DRIVER. - Second Life tries to use OpenAL, FMODSTUDIO (PULSEAUDIO, ALSA) - audio drivers in this order; you may uncomment the corresponding LL_BAD_* - option to skip an audio driver which you believe may be causing you trouble. - -* OPENGL - For advanced troubleshooters, the LL_GL_BLACKLIST option lets - you disable specific GL extensions, each of which is represented by a - letter ("a"-"o"). If you can narrow down a stability problem on your system - to just one or two GL extensions then please post details of your hardware - (and drivers) to the Linux Client Testers forum (see link below) along - with the minimal LL_GL_BLACKLIST which solves your problems. This will help - us to improve stability for your hardware while minimally impacting - performance. - LL_GL_BASICEXT and LL_GL_NOEXT should be commented-out for this to be useful. - - -7. OBTAINING AND WORKING WITH THE CLIENT SOURCE CODE --=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= - -We're pleased to have released the Second Life client's source code under -an Open Source license compatible with the 'GPL'. To get involved with client -development, please see: - - - -8. GETTING MORE HELP AND REPORTING PROBLEMS --=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- - -For general help and support with Second Life: - - -For problems and discussion concerning unofficial (not secondlife.com) -releases, please contact your packager or the SLDev mailing list: - - -In-world help: Please use the 'Help' menu in the client for various -non-Linux-specific Second Life help options. - -In-world discussion: There is a 'Linux Client Users' group -inside Second Life which is free to join. You can find it by pressing -the 'Search' button at the bottom of the window and then selecting the -'Groups' tab and searching for 'Linux'. This group is useful for discussing -Linux issues with fellow Linux client users who are online. - -The Second Life Issue Tracker: - -This is the right place for finding known issues and reporting new -bugs in all Second Life releases if you find that the Troubleshooting -section in this file hasn't helped (please note, however, that this is -not a support forum). - -Linux Client Testers forum: - -This is a forum where Linux Client users can help each other out and -discuss the latest updates. diff --git a/indra/newview/linux_tools/refresh_desktop_app_entry.sh b/indra/newview/linux_tools/refresh_desktop_app_entry.sh index d2b2a732d5..93413d0336 100755 --- a/indra/newview/linux_tools/refresh_desktop_app_entry.sh +++ b/indra/newview/linux_tools/refresh_desktop_app_entry.sh @@ -3,7 +3,7 @@ SCRIPTSRC=`readlink -f "$0" || echo "$0"` RUN_PATH=`dirname "${SCRIPTSRC}" || echo .` -install_prefix=${RUN_PATH}/.. +install_prefix="$(realpath -- "${RUN_PATH}/..")" function install_desktop_entry() { @@ -13,18 +13,25 @@ function install_desktop_entry() local desktop_entry="\ [Desktop Entry]\n\ Name=Second Life\n\ +GenericName=Second Life Viewer\n\ Comment=Client for the On-line Virtual World, Second Life\n\ -Exec=${installation_prefix}/secondlife\n\ +Path=${installation_prefix}\n\ +Exec=secondlife\n\ Icon=${installation_prefix}/secondlife_icon.png\n\ Terminal=false\n\ Type=Application\n\ -Categories=Application;Network;\n\ +Categories=Game;Simulation;\n\ StartupNotify=true\n\ +StartupWMClass="com.secondlife.indra.viewer"\n\ X-Desktop-File-Install-Version=3.0" echo " - Installing menu entries in ${desktop_entries_dir}" - mkdir -vp "${desktop_entries_dir}" - echo -e $desktop_entry > "${desktop_entries_dir}/secondlife-viewer.desktop" || "Failed to install application menu!" + WORK_DIR=`mktemp -d` + echo -e $desktop_entry > "${WORK_DIR}/secondlife-viewer.desktop" || "Failed to install application menu!" + desktop-file-install --dir="${desktop_entries_dir}" ${WORK_DIR}/secondlife-viewer.desktop + rm -r $WORK_DIR + + update-desktop-database "${desktop_entries_dir}" } if [ "$UID" == "0" ]; then diff --git a/indra/newview/linux_tools/wrapper.sh b/indra/newview/linux_tools/wrapper.sh index dee6197b05..bab5ea8a46 100755 --- a/indra/newview/linux_tools/wrapper.sh +++ b/indra/newview/linux_tools/wrapper.sh @@ -2,15 +2,11 @@ ## Here are some configuration options for Linux Client Users. -## - Avoids using any FMOD STUDIO audio driver. -#export LL_BAD_FMODSTUDIO_DRIVER=x ## - Avoids using any OpenAL audio driver. #export LL_BAD_OPENAL_DRIVER=x -## - Avoids using the FMOD Studio PulseAudio audio driver. -#export LL_BAD_FMOD_PULSEAUDIO=x -## - Avoids using the FMOD Studio ALSA audio driver. -#export LL_BAD_FMOD_ALSA=x +## GL Driver Options +export mesa_glthread=true ## Everything below this line is just for advanced troubleshooters. ##------------------------------------------------------------------- @@ -65,23 +61,4 @@ LL_RUN_ERR=$? if [ $LL_RUN_ERR -ne 0 ]; then # generic error running the binary echo '*** Bad shutdown ($LL_RUN_ERR). ***' - if [ "$(uname -m)" = "x86_64" ]; then - echo - cat << EOFMARKER -You are running the Second Life Viewer on a x86_64 platform. The -most common problems when launching the Viewer (particularly -'bin/do-not-directly-run-secondlife-bin: not found' and 'error while -loading shared libraries') may be solved by installing your Linux -distribution's 32-bit compatibility packages. -For example, on Ubuntu and other Debian-based Linuxes you might run: -$ sudo apt-get install ia32-libs ia32-libs-gtk ia32-libs-kde ia32-libs-sdl -EOFMARKER - fi fi - -echo -echo '*******************************************************' -echo 'This is a BETA release of the Second Life linux client.' -echo 'Thank you for testing!' -echo 'Please see README-linux.txt before reporting problems.' -echo diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py index 3a9f9c2f28..d70d03bdc5 100755 --- a/indra/newview/viewer_manifest.py +++ b/indra/newview/viewer_manifest.py @@ -1124,9 +1124,6 @@ class LinuxManifest(ViewerManifest): self.path("licenses-linux.txt","licenses.txt") with self.prefix("linux_tools"): - self.path("client-readme.txt","README-linux.txt") - self.path("client-readme-voice.txt","README-linux-voice.txt") - self.path("client-readme-joystick.txt","README-linux-joystick.txt") self.path("wrapper.sh","secondlife") with self.prefix(dst="etc"): self.path("handle_secondlifeprotocol.sh") -- cgit v1.3 From 17fd0f6a50a7838792ca4f15d713a140fec037d5 Mon Sep 17 00:00:00 2001 From: Rye Date: Mon, 27 Oct 2025 01:53:04 -0400 Subject: Add support for building with address, undefined, and thread sanitizers on linux Signed-off-by: Rye --- indra/cmake/00-Common.cmake | 37 +++++++++-- indra/llcommon/llinstancetracker.h | 8 +++ indra/newview/CMakeLists.txt | 18 ++++-- indra/newview/linux_tools/wrapper.sh | 2 + indra/newview/llvoiceclient.cpp | 121 ++++++++++++++++++++++++++++++++++- 5 files changed, 171 insertions(+), 15 deletions(-) (limited to 'indra/newview/linux_tools') diff --git a/indra/cmake/00-Common.cmake b/indra/cmake/00-Common.cmake index c03b2d24ea..24402f03ee 100644 --- a/indra/cmake/00-Common.cmake +++ b/indra/cmake/00-Common.cmake @@ -143,14 +143,39 @@ if (LINUX) LL_IGNORE_SIGCHLD ) - if(ENABLE_ASAN) - add_compile_options(-U_FORTIFY_SOURCE - -fsanitize=address - --param asan-stack=0 + option(ENABLE_ASAN "Enable Address Sanitizer" OFF) + option(ENABLE_UBSAN "Enable Undefined Behavior Sanitizer" OFF) + option(ENABLE_THREADSAN "Enable Thread Sanitizer" OFF) + if(ENABLE_ASAN OR ENABLE_UBSAN OR ENABLE_THREADSAN) + set(GCC_DISABLE_FATAL_WARNINGS ON) # Disable warnings as errors during sanitizer builds due to false positives + + add_compile_options( + -U_FORTIFY_SOURCE + -fno-omit-frame-pointer + -fno-common + -fsanitize-recover=all ) - add_link_options(-fsanitize=address) + + # libwebrtc is incompatible with sanitizers + set(DISABLE_WEBRTC ON) + add_compile_definitions(DISABLE_WEBRTC=1) + + if(ENABLE_ASAN) + add_compile_options(-fsanitize=address) + add_link_options(-fsanitize=address) + endif() + + if(ENABLE_UBSAN) + add_compile_options(-fsanitize=undefined) + add_link_options(-fsanitize=undefined) + endif() + + if(ENABLE_THREADSAN) + add_compile_options(-fsanitize=thread) + add_link_options(-fsanitize=thread) + endif() else() - add_compile_definitions($<$:_FORTIFY_SOURCE=2>) + add_compile_definitions($<$:_FORTIFY_SOURCE=2>) endif() add_compile_options( diff --git a/indra/llcommon/llinstancetracker.h b/indra/llcommon/llinstancetracker.h index 92b26354a1..6692d6a697 100644 --- a/indra/llcommon/llinstancetracker.h +++ b/indra/llcommon/llinstancetracker.h @@ -28,6 +28,8 @@ #ifndef LL_LLINSTANCETRACKER_H #define LL_LLINSTANCETRACKER_H +#include "llpreprocessor.h" + #include #include #include @@ -244,6 +246,9 @@ public: } protected: +#if LL_CLANG || LL_GNUC + __attribute__((no_sanitize("vptr"))) +#endif LLInstanceTracker(const KEY& key) { // We do not intend to manage the lifespan of this object with @@ -482,6 +487,9 @@ public: using key_snapshot_of = instance_snapshot_of; protected: +#if LL_CLANG || LL_GNUC + __attribute__((no_sanitize("vptr"))) +#endif LLInstanceTracker() { // Since we do not intend for this shared_ptr to manage lifespan, give diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index 211d51ec15..8c39f5f249 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -718,7 +718,6 @@ set(viewer_SOURCE_FILES llvoiceclient.cpp llvoicevisualizer.cpp llvoicevivox.cpp - llvoicewebrtc.cpp llvoinventorylistener.cpp llvopartgroup.cpp llvosky.cpp @@ -1386,7 +1385,6 @@ set(viewer_HEADER_FILES llvoiceclient.h llvoicevisualizer.h llvoicevivox.h - llvoicewebrtc.h llvoinventorylistener.h llvopartgroup.h llvosky.h @@ -1424,6 +1422,11 @@ source_group("CMake Rules" FILES ViewerInstall.cmake) file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/viewer_version.txt" "${VIEWER_SHORT_VERSION}.${VIEWER_VERSION_REVISION}\n") +if (NOT DISABLE_WEBRTC) + LIST(APPEND viewer_SOURCE_FILES llvoicewebrtc.cpp) + LIST(APPEND viewer_HEADER_FILES llvoicewebrtc.h) +endif() + if (DARWIN) LIST(APPEND viewer_SOURCE_FILES llappviewermacosx.cpp) LIST(APPEND viewer_SOURCE_FILES llappviewermacosx-objc.mm) @@ -2014,7 +2017,6 @@ target_link_libraries(${VIEWER_BINARY_NAME} llcorehttp llcommon llmeshoptimizer - llwebrtc lllogin llprimitive llappearance @@ -2025,16 +2027,20 @@ target_link_libraries(${VIEWER_BINARY_NAME} ll::openxr ) +if (NOT DISABLE_WEBRTC) + target_link_libraries(${VIEWER_BINARY_NAME} llwebrtc ) +endif() + if (USE_DISCORD) - target_link_libraries(${VIEWER_BINARY_NAME} ll::discord_sdk ) + target_link_libraries(${VIEWER_BINARY_NAME} ll::discord_sdk ) endif () if( TARGET ll::intel_memops ) - target_link_libraries(${VIEWER_BINARY_NAME} ll::intel_memops ) + target_link_libraries(${VIEWER_BINARY_NAME} ll::intel_memops ) endif() if( TARGET ll::nvapi ) - target_link_libraries(${VIEWER_BINARY_NAME} ll::nvapi ) + target_link_libraries(${VIEWER_BINARY_NAME} ll::nvapi ) endif() if ( TARGET llconvexdecomposition ) diff --git a/indra/newview/linux_tools/wrapper.sh b/indra/newview/linux_tools/wrapper.sh index bab5ea8a46..7e7a9a5e49 100755 --- a/indra/newview/linux_tools/wrapper.sh +++ b/indra/newview/linux_tools/wrapper.sh @@ -18,6 +18,8 @@ export mesa_glthread=true ## an unstripped binary before you run. #export LL_WRAPPER='gdb --args' #export LL_WRAPPER='valgrind --smc-check=all --error-limit=no --log-file=secondlife.vg --leak-check=full --suppressions=/usr/lib/valgrind/glibc-2.5.supp --suppressions=secondlife-i686.supp' +#export ASAN_OPTIONS="halt_on_error=0 detect_leaks=1 symbolize=1" +#export UBSAN_OPTIONS="print_stacktrace=1 print_summary=1 halt_on_error=0" ## Nothing worth editing below this line. ##------------------------------------------------------------------- diff --git a/indra/newview/llvoiceclient.cpp b/indra/newview/llvoiceclient.cpp index 71a9e71a9f..507154a2a3 100644 --- a/indra/newview/llvoiceclient.cpp +++ b/indra/newview/llvoiceclient.cpp @@ -26,7 +26,9 @@ #include "llvoiceclient.h" #include "llvoicevivox.h" +#ifndef DISABLE_WEBRTC #include "llvoicewebrtc.h" +#endif #include "llviewernetwork.h" #include "llviewercontrol.h" #include "llcommandhandler.h" @@ -39,6 +41,7 @@ #include "llagent.h" #include "lltrans.h" #include "lluiusage.h" +#include "llmutelist.h" const F32 LLVoiceClient::OVERDRIVEN_POWER_LEVEL = 0.7f; @@ -120,10 +123,12 @@ LLVoiceModuleInterface *getVoiceModule(const std::string &voice_server_type) { return (LLVoiceModuleInterface *) LLVivoxVoiceClient::getInstance(); } +#ifndef DISABLE_WEBRTC else if (voice_server_type == WEBRTC_VOICE_SERVER_TYPE) { return (LLVoiceModuleInterface *) LLWebRTCVoiceClient::getInstance(); } +#endif else { LLNotificationsUtil::add("VoiceVersionMismatch"); @@ -165,7 +170,9 @@ void LLVoiceClient::init(LLPumpIO *pump) { // Initialize all of the voice modules m_servicePump = pump; +#ifndef DISABLE_WEBRTC LLWebRTCVoiceClient::getInstance()->init(pump); +#endif LLVivoxVoiceClient::getInstance()->init(pump); } @@ -176,7 +183,9 @@ void LLVoiceClient::userAuthorized(const std::string& user_id, const LLUUID &age mRegionChangedCallbackSlot.disconnect(); } mRegionChangedCallbackSlot = gAgent.addRegionChangedCallback(boost::bind(&LLVoiceClient::onRegionChanged, this)); +#ifndef DISABLE_WEBRTC LLWebRTCVoiceClient::getInstance()->userAuthorized(user_id, agentID); +#endif LLVivoxVoiceClient::getInstance()->userAuthorized(user_id, agentID); } @@ -286,16 +295,20 @@ void LLVoiceClient::setNonSpatialVoiceModule(const std::string &voice_server_typ void LLVoiceClient::setHidden(bool hidden) { LL_INFOS("Voice") << "( " << (hidden ? "true" : "false") << " )" << LL_ENDL; +#ifndef DISABLE_WEBRTC LLWebRTCVoiceClient::getInstance()->setHidden(hidden); +#endif LLVivoxVoiceClient::getInstance()->setHidden(hidden); } void LLVoiceClient::terminate() { - if (LLVivoxVoiceClient::instanceExists()) +#ifndef DISABLE_WEBRTC + if (LLWebRTCVoiceClient::instanceExists()) { LLWebRTCVoiceClient::getInstance()->terminate(); } +#endif if (LLVivoxVoiceClient::instanceExists()) { LLVivoxVoiceClient::getInstance()->terminate(); @@ -334,7 +347,9 @@ void LLVoiceClient::updateSettings() updateMicMuteLogic(); +#ifndef DISABLE_WEBRTC LLWebRTCVoiceClient::getInstance()->updateSettings(); +#endif LLVivoxVoiceClient::getInstance()->updateSettings(); } @@ -343,34 +358,50 @@ void LLVoiceClient::updateSettings() void LLVoiceClient::tuningStart() { +#ifndef DISABLE_WEBRTC LLWebRTCVoiceClient::getInstance()->tuningStart(); +#endif LLVivoxVoiceClient::getInstance()->tuningStart(); } void LLVoiceClient::tuningStop() { +#ifndef DISABLE_WEBRTC LLWebRTCVoiceClient::getInstance()->tuningStop(); +#endif LLVivoxVoiceClient::getInstance()->tuningStop(); } bool LLVoiceClient::inTuningMode() { +#ifndef DISABLE_WEBRTC return LLWebRTCVoiceClient::getInstance()->inTuningMode(); +#else + return false; +#endif } void LLVoiceClient::tuningSetMicVolume(float volume) { +#ifndef DISABLE_WEBRTC LLWebRTCVoiceClient::getInstance()->tuningSetMicVolume(volume); +#endif } void LLVoiceClient::tuningSetSpeakerVolume(float volume) { +#ifndef DISABLE_WEBRTC LLWebRTCVoiceClient::getInstance()->tuningSetSpeakerVolume(volume); +#endif } float LLVoiceClient::tuningGetEnergy(void) { +#ifndef DISABLE_WEBRTC return LLWebRTCVoiceClient::getInstance()->tuningGetEnergy(); +#else + return 0.f; +#endif } //------------------------------------------------ @@ -378,40 +409,64 @@ float LLVoiceClient::tuningGetEnergy(void) bool LLVoiceClient::deviceSettingsAvailable() { +#ifndef DISABLE_WEBRTC return LLWebRTCVoiceClient::getInstance()->deviceSettingsAvailable(); +#else + return false; +#endif } bool LLVoiceClient::deviceSettingsUpdated() { +#ifndef DISABLE_WEBRTC return LLWebRTCVoiceClient::getInstance()->deviceSettingsUpdated(); +#else + return false; +#endif } void LLVoiceClient::refreshDeviceLists(bool clearCurrentList) { +#ifndef DISABLE_WEBRTC LLWebRTCVoiceClient::getInstance()->refreshDeviceLists(clearCurrentList); +#endif } void LLVoiceClient::setCaptureDevice(const std::string& name) { LLVivoxVoiceClient::getInstance()->setCaptureDevice(name); +#ifndef DISABLE_WEBRTC LLWebRTCVoiceClient::getInstance()->setCaptureDevice(name); +#endif } void LLVoiceClient::setRenderDevice(const std::string& name) { LLVivoxVoiceClient::getInstance()->setRenderDevice(name); +#ifndef DISABLE_WEBRTC LLWebRTCVoiceClient::getInstance()->setRenderDevice(name); +#endif } const LLVoiceDeviceList& LLVoiceClient::getCaptureDevices() { +#ifndef DISABLE_WEBRTC return LLWebRTCVoiceClient::getInstance()->getCaptureDevices(); +#else + static LLVoiceDeviceList dummy_device_list; + return dummy_device_list; +#endif } const LLVoiceDeviceList& LLVoiceClient::getRenderDevices() { +#ifndef DISABLE_WEBRTC return LLWebRTCVoiceClient::getInstance()->getRenderDevices(); +#else + static LLVoiceDeviceList dummy_device_list; + return dummy_device_list; +#endif } @@ -420,13 +475,18 @@ const LLVoiceDeviceList& LLVoiceClient::getRenderDevices() void LLVoiceClient::getParticipantList(std::set &participants) const { +#ifndef DISABLE_WEBRTC LLWebRTCVoiceClient::getInstance()->getParticipantList(participants); +#endif LLVivoxVoiceClient::getInstance()->getParticipantList(participants); } bool LLVoiceClient::isParticipant(const LLUUID &speaker_id) const { - return LLWebRTCVoiceClient::getInstance()->isParticipant(speaker_id) || + return +#ifndef DISABLE_WEBRTC + LLWebRTCVoiceClient::getInstance()->isParticipant(speaker_id) || +#endif LLVivoxVoiceClient::getInstance()->isParticipant(speaker_id); } @@ -519,14 +579,22 @@ void LLVoiceClient::activateSpatialChannel(bool activate) bool LLVoiceClient::isCurrentChannel(const LLSD& channelInfo) { +#ifndef DISABLE_WEBRTC return LLWebRTCVoiceClient::getInstance()->isCurrentChannel(channelInfo) || LLVivoxVoiceClient::getInstance()->isCurrentChannel(channelInfo); +#else + return LLVivoxVoiceClient::getInstance()->isCurrentChannel(channelInfo); +#endif } bool LLVoiceClient::compareChannels(const LLSD &channelInfo1, const LLSD &channelInfo2) { +#ifndef DISABLE_WEBRTC return LLWebRTCVoiceClient::getInstance()->compareChannels(channelInfo1, channelInfo2) || LLVivoxVoiceClient::getInstance()->compareChannels(channelInfo1, channelInfo2); +#else + return LLVivoxVoiceClient::getInstance()->compareChannels(channelInfo1, channelInfo2); +#endif } LLVoiceP2PIncomingCallInterfacePtr LLVoiceClient::getIncomingCallInterface(const LLSD& voice_call_info) @@ -567,13 +635,17 @@ LLVoiceP2POutgoingCallInterface *LLVoiceClient::getOutgoingCallInterface(const L void LLVoiceClient::setVoiceVolume(F32 volume) { +#ifndef DISABLE_WEBRTC LLWebRTCVoiceClient::getInstance()->setVoiceVolume(volume); +#endif LLVivoxVoiceClient::getInstance()->setVoiceVolume(volume); } void LLVoiceClient::setMicGain(F32 gain) { +#ifndef DISABLE_WEBRTC LLWebRTCVoiceClient::getInstance()->setMicGain(gain); +#endif LLVivoxVoiceClient::getInstance()->setMicGain(gain); } @@ -620,10 +692,12 @@ bool LLVoiceClient::voiceEnabled() void LLVoiceClient::setVoiceEnabled(bool enabled) { +#ifndef DISABLE_WEBRTC if (LLWebRTCVoiceClient::instanceExists()) { LLWebRTCVoiceClient::getInstance()->setVoiceEnabled(enabled); } +#endif if (LLVivoxVoiceClient::instanceExists()) { LLVivoxVoiceClient::getInstance()->setVoiceEnabled(enabled); @@ -646,7 +720,9 @@ void LLVoiceClient::updateMicMuteLogic() // Either of these always overrides any other PTT setting. new_mic_mute = true; } +#ifndef DISABLE_WEBRTC LLWebRTCVoiceClient::getInstance()->setMuteMic(new_mic_mute); +#endif LLVivoxVoiceClient::getInstance()->setMuteMic(new_mic_mute); } @@ -741,8 +817,11 @@ bool LLVoiceClient::getVoiceEnabled(const LLUUID& id) const std::string LLVoiceClient::getDisplayName(const LLUUID& id) const { - std::string result = LLWebRTCVoiceClient::getInstance()->getDisplayName(id); + std::string result; +#ifndef DISABLE_WEBRTC + result = LLWebRTCVoiceClient::getInstance()->getDisplayName(id); if (result.empty()) +#endif { result = LLVivoxVoiceClient::getInstance()->getDisplayName(id); } @@ -751,8 +830,12 @@ std::string LLVoiceClient::getDisplayName(const LLUUID& id) const bool LLVoiceClient::isVoiceWorking() const { +#ifndef DISABLE_WEBRTC return LLVivoxVoiceClient::getInstance()->isVoiceWorking() || LLWebRTCVoiceClient::getInstance()->isVoiceWorking(); +#else + return LLVivoxVoiceClient::getInstance()->isVoiceWorking(); +#endif } bool LLVoiceClient::isParticipantAvatar(const LLUUID& id) @@ -767,22 +850,34 @@ bool LLVoiceClient::isOnlineSIP(const LLUUID& id) bool LLVoiceClient::getIsSpeaking(const LLUUID& id) { +#ifndef DISABLE_WEBRTC return LLWebRTCVoiceClient::getInstance()->getIsSpeaking(id) || LLVivoxVoiceClient::getInstance()->getIsSpeaking(id); +#else + return LLVivoxVoiceClient::getInstance()->getIsSpeaking(id); +#endif } bool LLVoiceClient::getIsModeratorMuted(const LLUUID& id) { // don't bother worrying about p2p calls, as // p2p calls don't have mute. +#ifndef DISABLE_WEBRTC return LLWebRTCVoiceClient::getInstance()->getIsModeratorMuted(id) || LLVivoxVoiceClient::getInstance()->getIsModeratorMuted(id); +#else + return LLVivoxVoiceClient::getInstance()->getIsModeratorMuted(id); +#endif } F32 LLVoiceClient::getCurrentPower(const LLUUID& id) { +#ifndef DISABLE_WEBRTC return std::fmax(LLVivoxVoiceClient::getInstance()->getCurrentPower(id), LLWebRTCVoiceClient::getInstance()->getCurrentPower(id)); +#else + return LLVivoxVoiceClient::getInstance()->getCurrentPower(id); +#endif } bool LLVoiceClient::getOnMuteList(const LLUUID& id) @@ -794,12 +889,18 @@ bool LLVoiceClient::getOnMuteList(const LLUUID& id) F32 LLVoiceClient::getUserVolume(const LLUUID& id) { +#ifndef DISABLE_WEBRTC return std::fmax(LLVivoxVoiceClient::getInstance()->getUserVolume(id), LLWebRTCVoiceClient::getInstance()->getUserVolume(id)); +#else + return LLVivoxVoiceClient::getInstance()->getUserVolume(id); +#endif } void LLVoiceClient::setUserVolume(const LLUUID& id, F32 volume) { +#ifndef DISABLE_WEBRTC LLWebRTCVoiceClient::getInstance()->setUserVolume(id, volume); +#endif LLVivoxVoiceClient::getInstance()->setUserVolume(id, volume); } @@ -809,7 +910,9 @@ void LLVoiceClient::setUserVolume(const LLUUID& id, F32 volume) void LLVoiceClient::addObserver(LLVoiceClientStatusObserver* observer) { LLVivoxVoiceClient::getInstance()->addObserver(observer); +#ifndef DISABLE_WEBRTC LLWebRTCVoiceClient::getInstance()->addObserver(observer); +#endif } void LLVoiceClient::removeObserver(LLVoiceClientStatusObserver* observer) @@ -818,16 +921,20 @@ void LLVoiceClient::removeObserver(LLVoiceClientStatusObserver* observer) { LLVivoxVoiceClient::getInstance()->removeObserver(observer); } +#ifndef DISABLE_WEBRTC if (LLWebRTCVoiceClient::instanceExists()) { LLWebRTCVoiceClient::getInstance()->removeObserver(observer); } +#endif } void LLVoiceClient::addObserver(LLFriendObserver* observer) { LLVivoxVoiceClient::getInstance()->addObserver(observer); +#ifndef DISABLE_WEBRTC LLWebRTCVoiceClient::getInstance()->addObserver(observer); +#endif } void LLVoiceClient::removeObserver(LLFriendObserver* observer) @@ -836,16 +943,20 @@ void LLVoiceClient::removeObserver(LLFriendObserver* observer) { LLVivoxVoiceClient::getInstance()->removeObserver(observer); } +#ifndef DISABLE_WEBRTC if (LLWebRTCVoiceClient::instanceExists()) { LLWebRTCVoiceClient::getInstance()->removeObserver(observer); } +#endif } void LLVoiceClient::addObserver(LLVoiceClientParticipantObserver* observer) { LLVivoxVoiceClient::getInstance()->addObserver(observer); +#ifndef DISABLE_WEBRTC LLWebRTCVoiceClient::getInstance()->addObserver(observer); +#endif } void LLVoiceClient::removeObserver(LLVoiceClientParticipantObserver* observer) @@ -854,10 +965,12 @@ void LLVoiceClient::removeObserver(LLVoiceClientParticipantObserver* observer) { LLVivoxVoiceClient::getInstance()->removeObserver(observer); } +#ifndef DISABLE_WEBRTC if (LLWebRTCVoiceClient::instanceExists()) { LLWebRTCVoiceClient::getInstance()->removeObserver(observer); } +#endif } std::string LLVoiceClient::sipURIFromID(const LLUUID &id) const @@ -920,10 +1033,12 @@ class LLViewerRequiredVoiceVersion : public LLHTTPNode { voiceModule = (LLVoiceModuleInterface *) LLVivoxVoiceClient::getInstance(); } +#ifndef DISABLE_WEBRTC else if (voice_server_type == "webrtc") { voiceModule = (LLVoiceModuleInterface *) LLWebRTCVoiceClient::getInstance(); } +#endif else { LL_WARNS("Voice") << "Unknown voice server type " << voice_server_type << LL_ENDL; -- cgit v1.3 From 5a2d0b0281154e736c5a4f2f9c605a9b4ad47731 Mon Sep 17 00:00:00 2001 From: Rye Date: Tue, 28 Oct 2025 08:12:49 -0400 Subject: Remove dead linux script Signed-off-by: Rye --- indra/newview/linux_tools/launch_url.sh | 86 --------------------------------- indra/newview/viewer_manifest.py | 1 - 2 files changed, 87 deletions(-) delete mode 100755 indra/newview/linux_tools/launch_url.sh (limited to 'indra/newview/linux_tools') diff --git a/indra/newview/linux_tools/launch_url.sh b/indra/newview/linux_tools/launch_url.sh deleted file mode 100755 index 404ea36f26..0000000000 --- a/indra/newview/linux_tools/launch_url.sh +++ /dev/null @@ -1,86 +0,0 @@ -#!/bin/bash - -# This script loads a web page in the 'default' graphical web browser. -# It MUST return immediately (or soon), so the browser should be -# launched in the background (thus no text-only browsers). -# This script does not trust the URL to be well-escaped or shell-safe. -# -# On Unixoids we try, in order of decreasing priority: -# - $BROWSER if set (preferred) -# - Default GNOME browser -# - Default KDE browser -# - x-www-browser -# - The first browser in $BROWSER_COMMANDS that is found. - -URL="$1" - -if [ -z "$URL" ]; then - echo "Usage: $(basename "$0") URL" - exit -fi - -# restore LD_LIBRARY_PATH from SAVED_LD_LIBRARY_PATH if it exists -if [ "${SAVED_LD_LIBRARY_PATH+isset}" = "isset" ]; then - export LD_LIBRARY_PATH="${SAVED_LD_LIBRARY_PATH}" - echo "$0: Restored library path to '${SAVED_LD_LIBRARY_PATH}'" -fi - -# if $BROWSER is defined, use it. -XBROWSER=`echo "$BROWSER" |cut -f1 -d:` -if [ ! -z "$XBROWSER" ]; then - XBROWSER_CMD=`echo "$XBROWSER" |cut -f1 -d' '` - # look for $XBROWSER_CMD either literally or in PATH - if [ -x "$XBROWSER_CMD" ] || which $XBROWSER_CMD >/dev/null; then - # check for %s string, avoiding bash2-ism of [[ ]] - if echo "$XBROWSER" | grep %s >/dev/null; then - # $XBROWSER has %s which needs substituting - echo "$URL" | xargs -r -i%s $XBROWSER & - exit - fi - # $XBROWSER has no %s, tack URL on the end instead - $XBROWSER "$URL" & - exit - fi - echo "$0: Couldn't find the browser specified by \$BROWSER ($BROWSER)" - echo "$0: Trying some others..." -fi - -# Launcher the default GNOME browser. -if [ ! -z "$GNOME_DESKTOP_SESSION_ID" ] && which gnome-open >/dev/null; then - gnome-open "$URL" & - exit -fi - -# Launch the default KDE browser. -if [ ! -z "$KDE_FULL_SESSION" ] && which kfmclient >/dev/null; then - kfmclient openURL "$URL" & - exit -fi - -# List of browser commands that will be tried in the order listed. x-www-browser -# will be tried first, which is a debian alternative. -BROWSER_COMMANDS=" \ - x-www-browser \ - firefox \ - mozilla-firefox \ - iceweasel \ - iceape \ - opera \ - epiphany-browser \ - epiphany-gecko \ - epiphany-webkit \ - epiphany \ - mozilla \ - seamonkey \ - galeon \ - dillo \ - netscape" -for browser_cmd in $BROWSER_COMMANDS; do - if which $browser_cmd >/dev/null; then - $browser_cmd "$URL" & - exit - fi -done - -echo '$0: Failed to find a known browser. Please consider setting the $BROWSER environment variable.' -exit 1 diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py index d70d03bdc5..07c1123d01 100755 --- a/indra/newview/viewer_manifest.py +++ b/indra/newview/viewer_manifest.py @@ -1129,7 +1129,6 @@ class LinuxManifest(ViewerManifest): self.path("handle_secondlifeprotocol.sh") self.path("register_secondlifeprotocol.sh") self.path("refresh_desktop_app_entry.sh") - self.path("launch_url.sh") self.path("install.sh") with self.prefix(dst="bin"): -- cgit v1.3 From af600606e67ea90e634827a6356caabc2ef37ccc Mon Sep 17 00:00:00 2001 From: Rye Date: Mon, 3 Nov 2025 01:43:27 -0500 Subject: Fix registration of secondlife protocol handler on linux Signed-off-by: Rye --- .../linux_tools/register_secondlifeprotocol.sh | 75 ++++++++++++---------- 1 file changed, 42 insertions(+), 33 deletions(-) (limited to 'indra/newview/linux_tools') diff --git a/indra/newview/linux_tools/register_secondlifeprotocol.sh b/indra/newview/linux_tools/register_secondlifeprotocol.sh index 33c34d7a76..d41e6dd6cb 100755 --- a/indra/newview/linux_tools/register_secondlifeprotocol.sh +++ b/indra/newview/linux_tools/register_secondlifeprotocol.sh @@ -6,43 +6,52 @@ HANDLER="$1" -RUN_PATH=`dirname "$0" || echo .` +SCRIPTSRC=`readlink -f "$0" || echo "$0"` +RUN_PATH=`dirname "${SCRIPTSRC}" || echo .` + +install_prefix="$(realpath -- "${RUN_PATH}/..")" + cd "${RUN_PATH}/.." if [ -z "$HANDLER" ]; then - HANDLER=`pwd`/etc/handle_secondlifeprotocol.sh + HANDLER=$install_prefix/etc/handle_secondlifeprotocol.sh fi -# Register handler for GNOME-aware apps -LLGCONFTOOL2=gconftool-2 -if which ${LLGCONFTOOL2} >/dev/null; then - (${LLGCONFTOOL2} -s -t string /desktop/gnome/url-handlers/secondlife/command "${HANDLER} \"%s\"" && ${LLGCONFTOOL2} -s -t bool /desktop/gnome/url-handlers/secondlife/enabled true) || echo Warning: Did not register secondlife:// handler with GNOME: ${LLGCONFTOOL2} failed. -else - echo Warning: Did not register secondlife:// handler with GNOME: ${LLGCONFTOOL2} not found. -fi +function install_desktop_entry() +{ + local installation_prefix="$1" + local desktop_entries_dir="$2" + + local desktop_entry="\ +[Desktop Entry]\n\ +Name=Second Life SLURL handler\n\ +Path=${installation_prefix}\n\ +Exec=${HANDLER} %u\n\ +Icon=${installation_prefix}/secondlife_icon.png\n\ +Terminal=false\n\ +Type=Application\n\ +StartupNotify=true\n\ +StartupWMClass="com.secondlife.indra.viewer"\n\ +NoDisplay=true\n\ +MimeType=x-scheme-handler/secondlife\n\ +X-Desktop-File-Install-Version=3.0" -# Register handler for KDE-aware apps -for LLKDECONFIG in kde-config kde4-config; do - if [ `which $LLKDECONFIG` ]; then - LLKDEPROTODIR=`$LLKDECONFIG --path services | cut -d ':' -f 1` - if [ -d "$LLKDEPROTODIR" ]; then - LLKDEPROTOFILE=${LLKDEPROTODIR}/secondlife.protocol - cat > ${LLKDEPROTOFILE} < "${WORK_DIR}/${PROTOCOL_HANDLER}" || "Failed to create desktop file!" + desktop-file-install --dir="${desktop_entries_dir}" "${WORK_DIR}/${PROTOCOL_HANDLER}" || "Failed to install desktop file!" + rm -r $WORK_DIR + xdg-mime default "${desktop_entries_dir}/${PROTOCOL_HANDLER}" x-scheme-handler/secondlife + + update-desktop-database "${desktop_entries_dir}" +} + +if [ "$UID" == "0" ]; then + # system-wide + install_desktop_entry "$install_prefix" /usr/local/share/applications +else + # user-specific + install_desktop_entry "$install_prefix" "$HOME/.local/share/applications" +fi -- cgit v1.3 From ae659adab6f8d1adf0224d12fb3b379251eaa501 Mon Sep 17 00:00:00 2001 From: Rye Date: Mon, 10 Nov 2025 08:31:49 -0500 Subject: Fix desktop entry lacking absolute path for Exec failing under KDE Signed-off-by: Rye --- indra/newview/linux_tools/refresh_desktop_app_entry.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/linux_tools') diff --git a/indra/newview/linux_tools/refresh_desktop_app_entry.sh b/indra/newview/linux_tools/refresh_desktop_app_entry.sh index 93413d0336..84af7505ea 100755 --- a/indra/newview/linux_tools/refresh_desktop_app_entry.sh +++ b/indra/newview/linux_tools/refresh_desktop_app_entry.sh @@ -16,7 +16,7 @@ Name=Second Life\n\ GenericName=Second Life Viewer\n\ Comment=Client for the On-line Virtual World, Second Life\n\ Path=${installation_prefix}\n\ -Exec=secondlife\n\ +Exec=${installation_prefix}/secondlife\n\ Icon=${installation_prefix}/secondlife_icon.png\n\ Terminal=false\n\ Type=Application\n\ -- cgit v1.3