summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErik Kundiman <erik@megapahit.org>2025-07-03 21:21:58 +0800
committerErik Kundiman <erik@megapahit.org>2025-07-03 21:21:58 +0800
commitd32b1c090f396824c5ec2ffbc40b174a55bdbe0b (patch)
treebdf6f1753b8ec7b37aa0831e6ff0beeffcefd869
parentb024b356c75528b4d2688016d49a11e1270fb48d (diff)
parent2283c5c35103dd99b35ca43a09bf8e11e6cd7957 (diff)
Merge branch 'main' into gltf_mesh_import
-rw-r--r--README.md46
-rw-r--r--indra/cmake/cpuinfo.cmake5
-rw-r--r--indra/llcommon/CMakeLists.txt7
-rw-r--r--indra/llcommon/llprocessor.cpp60
-rw-r--r--indra/llcorehttp/_httpoprequest.cpp4
-rw-r--r--indra/llcorehttp/httpcommon.cpp2
-rw-r--r--indra/llplugin/slplugin/CMakeLists.txt4
-rw-r--r--indra/llwindow/llwindow.cpp26
-rw-r--r--indra/llwindow/llwindow.h2
-rw-r--r--indra/llwindow/llwindowheadless.h2
-rw-r--r--indra/llwindow/llwindowsdl.h2
-rw-r--r--indra/llwindow/llwindowwin32.cpp2
-rw-r--r--indra/newview/CMakeLists.txt41
-rw-r--r--indra/newview/llagent.cpp12
-rw-r--r--indra/newview/llagent.h10
-rw-r--r--indra/newview/llappviewerlinux.cpp4
-rw-r--r--indra/newview/llappviewerwin32.cpp6
-rw-r--r--indra/newview/llmoveview.cpp2
-rw-r--r--indra/newview/llmoveview.h1
-rw-r--r--indra/newview/llviewermenu.cpp3
-rw-r--r--indra/newview/llviewermessage.cpp2
-rw-r--r--indra/newview/llviewerobject.cpp1
-rw-r--r--indra/newview/llviewerobject.h4
-rw-r--r--indra/newview/llviewerwindow.cpp2
-rw-r--r--indra/newview/llvoavatar.cpp2
-rw-r--r--indra/newview/rlvdefines.h5
-rw-r--r--indra/newview/rlvhandler.cpp80
-rw-r--r--indra/newview/rlvhelper.cpp11
-rw-r--r--indra/newview/skins/contrast/textures/cloud-particle.j2cbin4049 -> 0 bytes
-rw-r--r--indra/newview/skins/contrast/textures/cloud-particle.pngbin0 -> 42378 bytes
-rw-r--r--indra/newview/skins/contrast/textures/textures.xml2
-rw-r--r--indra/newview/skins/default/textures/cloud-particle.j2cbin4049 -> 0 bytes
-rw-r--r--indra/newview/skins/default/textures/cloud-particle.pngbin0 -> 42378 bytes
-rw-r--r--indra/newview/skins/default/textures/textures.xml2
-rw-r--r--indra/newview/skins/default/xui/en/panel_preferences_privacy.xml13
35 files changed, 265 insertions, 100 deletions
diff --git a/README.md b/README.md
index 6c657e4972..d755121aa1 100644
--- a/README.md
+++ b/README.md
@@ -21,7 +21,16 @@ $ cd build-`uname -s|tr '[:upper:]' '[:lower:]'`-`uname -m`
```
$ sudo pacman -S cmake base-devel python apr-util boost fltk glm glu hunspell minizip nanosvg libnghttp2 openjpeg2 libpipewire sdl2 vlc libvorbis xxhash
$ export LL_BUILD="-O3 -std=c++20 -fPIC -DLL_LINUX=1"
-$ cmake -DCMAKE_BUILD_TYPE:STRING=Release -DADDRESS_SIZE:STRING=64 -DUSE_OPENAL:BOOL=OFF -DUSE_FMODSTUDIO:BOOL=ON -DENABLE_MEDIA_PLUGINS:BOOL=ON -DLL_TESTS:BOOL=OFF -DNDOF:BOOL=ON -DROOT_PROJECT_NAME:STRING=Megapahit -DVIEWER_CHANNEL:STRING=Megapahit -DVIEWER_BINARY_NAME:STRING=megapahit -DBUILD_SHARED_LIBS:BOOL=OFF -DINSTALL:BOOL=ON -DPACKAGE:BOOL=ON -DCMAKE_INSTALL_PREFIX:PATH=/usr ../indra
+```
+build with FMOD Studio: ([register with fmod to get linux package][fmod] and then place the `.tar.gz` in `~/Downloads`)
+```
+$ cmake -DCMAKE_BUILD_TYPE:STRING=Release -DADDRESS_SIZE:STRING=64 -DUSE_OPENAL:BOOL=OFF -DUSE_FMODSTUDIO:BOOL=ON -DENABLE_MEDIA_PLUGINS:BOOL=ON -DLL_TESTS:BOOL=OFF -DNDOF:BOOL=ON -DROOT_PROJECT_NAME:STRING=Megapahit -DVIEWER_CHANNEL:STRING=Megapahit -DVIEWER_BINARY_NAME:STRING=megapahit -DBUILD_SHARED_LIBS:BOOL=OFF -DINSTALL:BOOL=ON -DPACKAGE:BOOL=ON ../indra
+```
+OR, use openal audio: (currently breaks CEF)
+```
+$ cmake -DCMAKE_BUILD_TYPE:STRING=Release -DADDRESS_SIZE:STRING=64 -DUSE_OPENAL:BOOL=ON -DUSE_FMODSTUDIO:BOOL=OFF -DENABLE_MEDIA_PLUGINS:BOOL=ON -DLL_TESTS:BOOL=OFF -DNDOF:BOOL=ON -DROOT_PROJECT_NAME:STRING=Megapahit -DVIEWER_CHANNEL:STRING=Megapahit -DVIEWER_BINARY_NAME:STRING=megapahit -DBUILD_SHARED_LIBS:BOOL=OFF -DINSTALL:BOOL=ON -DPACKAGE:BOOL=ON ../indra
+```
+```
$ make -j`nproc`
$ makepkg -R
$ sudo pacman -U megapahit-`cat newview/viewer_version.txt|sed 's/\(.*\)\./\1-/'`-`uname -m`.pkg.tar.zst
@@ -45,7 +54,16 @@ $ megapahit
```
$ sudo dnf install cmake gcc-c++ patch patchelf rpm-build perl-FindBin apr-util-devel boost-devel boost-url expat-devel fltk-devel glm-devel mesa-libGLU-devel hunspell-devel minizip-ng-compat-devel libnghttp2-devel nanosvg-devel openjpeg-devel pipewire-devel pulseaudio-libs-devel SDL2-devel vlc-devel libvorbis-devel libXcursor-devel libXfixes-devel libXinerama-devel xxhash-devel
$ export LL_BUILD="-O3 -std=c++20 -fPIC -DLL_LINUX=1"
+```
+build with FMOD Studio: ([register with fmod to get linux package][fmod] and then place the `.tar.gz` in `~/Downloads`)
+```
$ cmake -DCMAKE_BUILD_TYPE:STRING=Release -DADDRESS_SIZE:STRING=64 -DUSE_OPENAL:BOOL=OFF -DUSE_FMODSTUDIO:BOOL=ON -DENABLE_MEDIA_PLUGINS:BOOL=ON -DLL_TESTS:BOOL=OFF -DNDOF:BOOL=ON -DROOT_PROJECT_NAME:STRING=Megapahit -DVIEWER_CHANNEL:STRING=Megapahit -DVIEWER_BINARY_NAME:STRING=megapahit -DBUILD_SHARED_LIBS:BOOL=OFF -DINSTALL:BOOL=ON -DPACKAGE:BOOL=ON ../indra
+```
+OR, use openal audio: (currently breaks CEF)
+```
+$ cmake -DCMAKE_BUILD_TYPE:STRING=Release -DADDRESS_SIZE:STRING=64 -DUSE_OPENAL:BOOL=ON -DUSE_FMODSTUDIO:BOOL=OFF -DENABLE_MEDIA_PLUGINS:BOOL=ON -DLL_TESTS:BOOL=OFF -DNDOF:BOOL=ON -DROOT_PROJECT_NAME:STRING=Megapahit -DVIEWER_CHANNEL:STRING=Megapahit -DVIEWER_BINARY_NAME:STRING=megapahit -DBUILD_SHARED_LIBS:BOOL=OFF -DINSTALL:BOOL=ON -DPACKAGE:BOOL=ON ../indra
+```
+```
$ make -j`nproc`
$ cpack -G RPM
$ sudo dnf install megapahit-`cat newview/viewer_version.txt`-Linux.rpm
@@ -53,6 +71,7 @@ $ megapahit
```
### FreeBSD
+(Currently does not have CEF or WebRTC Voice)
```
$ su -
# portmaster devel/cmake devel/pkgconf audio/freealut devel/apr1 devel/boost-libs x11-toolkits/fltk math/glm textproc/hunspell misc/meshoptimizer archivers/minizip graphics/nanosvg www/libnghttp2 graphics/openjpeg devel/sdl20 multimedia/vlc audio/libvorbis devel/xxhash
@@ -97,9 +116,18 @@ $ open newview/Megapahit.app
### openSUSE Tumbleweed
```
-$ sudo zypper install gcc-c++ patchelf apr-util-devel boost-devel libboost_program_options-devel libboost_url1_88_0-devel libboost_context-devel libboost_fiber-devel libboost_filesystem-devel libboost_regex-devel libboost_system-devel libboost_thread-devel libexpat-devel fltk-devel glu-devel hunspell-devel minizip-devel nanosvg-devel libnghttp2-devel openjpeg2-devel pipewire-devel libpulse-devel libSDL2_gfx-1_0-0 libSDL2_gfx-devel sdl2-compat-devel vlc-devel libvorbis-devel xxhash-devel zlib-ng-devel libXrender-devel libXcursor-devel libXfixes-devel libXext-devel libXft-devel libXinerama-devel freetype2-devel fontconfig-devel libjpeg8-devel libjpeg8-devel freealut-devel
+$ sudo zypper install gcc-c++ patchelf apr-util-devel boost-devel libboost_program_options-devel libboost_url1_88_0 libboost_url1_88_0-devel libboost_context-devel libboost_fiber-devel libboost_filesystem-devel libboost_regex-devel libboost_system-devel libboost_thread-devel libpng16-devel libxml++-devel libexpat-devel fltk-devel glu-devel hunspell-devel minizip-devel nanosvg-devel libnghttp2-devel openjpeg2-devel pipewire-devel libpulse-devel libSDL2_gfx-1_0-0 libSDL2_gfx-devel sdl2-compat-devel vlc-devel libvorbis-devel xxhash-devel zlib-ng-devel libXrender-devel libXcursor-devel libXfixes-devel libXext-devel libXft-devel libXinerama-devel freetype2-devel fontconfig-devel libjpeg8-devel libjpeg8-devel freealut-devel
$ export LL_BUILD="-O3 -std=c++20 -fPIC -DLL_LINUX=1"
-$ cmake -DCMAKE_BUILD_TYPE:STRING=Release -DADDRESS_SIZE:STRING=64 -DUSE_OPENAL:BOOL=ON -DENABLE_MEDIA_PLUGINS:BOOL=ON -DLL_TESTS:BOOL=OFF -DNDOF:BOOL=ON -DROOT_PROJECT_NAME:STRING=Megapahit -DVIEWER_CHANNEL:STRING=Megapahit -DVIEWER_BINARY_NAME:STRING=megapahit -DBUILD_SHARED_LIBS:BOOL=OFF -DINSTALL:BOOL=ON -DPACKAGE:BOOL=ON ../indra
+```
+build with FMOD Studio: ([register with fmod to get linux package][fmod] and then place the `.tar.gz` in `~/Downloads`)
+```
+$ cmake -DCMAKE_BUILD_TYPE:STRING=Release -DADDRESS_SIZE:STRING=64 -DUSE_OPENAL:BOOL=OFF -DUSE_FMODSTUDIO:BOOL=ON -DENABLE_MEDIA_PLUGINS:BOOL=ON -DLL_TESTS:BOOL=OFF -DNDOF:BOOL=ON -DROOT_PROJECT_NAME:STRING=Megapahit -DVIEWER_CHANNEL:STRING=Megapahit -DVIEWER_BINARY_NAME:STRING=megapahit -DBUILD_SHARED_LIBS:BOOL=OFF -DINSTALL:BOOL=ON -DPACKAGE:BOOL=ON ../indra
+```
+OR, use openal audio: (currently breaks CEF)
+```
+$ cmake -DCMAKE_BUILD_TYPE:STRING=Release -DADDRESS_SIZE:STRING=64 -DUSE_OPENAL:BOOL=ON -DUSE_FMODSTUDIO:BOOL=OFF -DENABLE_MEDIA_PLUGINS:BOOL=ON -DLL_TESTS:BOOL=OFF -DNDOF:BOOL=ON -DROOT_PROJECT_NAME:STRING=Megapahit -DVIEWER_CHANNEL:STRING=Megapahit -DVIEWER_BINARY_NAME:STRING=megapahit -DBUILD_SHARED_LIBS:BOOL=OFF -DINSTALL:BOOL=ON -DPACKAGE:BOOL=ON ../indra
+```
+```
$ make -j`nproc`
$ cpack -G RPM
$ rpm --addsign megapahit-`cat newview/viewer_version.txt`-Linux.rpm (Set up pgp public key first)
@@ -112,7 +140,16 @@ $ megapahit
```
$ sudo apt install cmake pkg-config libxml2-utils libaprutil1-dev libboost-fiber-dev libboost-json-dev libboost-program-options-dev libboost-regex-dev libboost-url-dev libexpat1-dev libfltk1.3-dev libfontconfig-dev libfreetype-dev libglu1-mesa-dev libhunspell-dev libjpeg-dev libmeshoptimizer-dev libminizip-dev libnanosvg-dev libnghttp2-dev libpipewire-0.3-dev libpng-dev libsdl2-dev libvlc-dev libvlccore-dev libvorbis-dev libxft-dev libxml2-dev libxxhash-dev
$ export LL_BUILD="-O3 -std=c++20 -fPIC -DLL_LINUX=1"
+```
+build with FMOD Studio: ([register with fmod to get linux package][fmod] and then place the `.tar.gz` in `~/Downloads`)
+```
$ cmake -DCMAKE_BUILD_TYPE:STRING=Release -DADDRESS_SIZE:STRING=64 -DUSE_OPENAL:BOOL=OFF -DUSE_FMODSTUDIO:BOOL=ON -DENABLE_MEDIA_PLUGINS:BOOL=ON -DLL_TESTS:BOOL=OFF -DNDOF:BOOL=ON -DROOT_PROJECT_NAME:STRING=Megapahit -DVIEWER_CHANNEL:STRING=Megapahit -DVIEWER_BINARY_NAME:STRING=megapahit -DBUILD_SHARED_LIBS:BOOL=OFF -DINSTALL:BOOL=ON -DPACKAGE:BOOL=ON ../indra
+```
+OR, use openal audio: (currently breaks CEF)
+```
+$ cmake -DCMAKE_BUILD_TYPE:STRING=Release -DADDRESS_SIZE:STRING=64 -DUSE_OPENAL:BOOL=ON -DUSE_FMODSTUDIO:BOOL=OFF -DENABLE_MEDIA_PLUGINS:BOOL=ON -DLL_TESTS:BOOL=OFF -DNDOF:BOOL=ON -DROOT_PROJECT_NAME:STRING=Megapahit -DVIEWER_CHANNEL:STRING=Megapahit -DVIEWER_BINARY_NAME:STRING=megapahit -DBUILD_SHARED_LIBS:BOOL=OFF -DINSTALL:BOOL=ON -DPACKAGE:BOOL=ON ../indra
+```
+```
$ make -j`nproc`
$ cpack -G DEB
$ sudo apt install ./megapahit-`cat newview/viewer_version.txt`-Linux.deb
@@ -121,7 +158,7 @@ $ megapahit
### Windows arm64
```
-$ vcpkg install pkgconf python3 freealut apr-util boost cpuinfo curl freetype glm hunspell libjpeg-turbo meshoptimizer minizip nghttp2 openjpeg sse2neon libvorbis libxml2[tools] xxhash
+$ vcpkg install pkgconf python3 freealut apr-util boost curl freetype glm hunspell libjpeg-turbo meshoptimizer minizip nghttp2 openjpeg sse2neon libvorbis libxml2[tools] xxhash
$ vcpkg install --allow-unsupported boost-fiber
$ export LL_BUILD="/MD /O2 /Ob2 /std:c++20 /Zc:wchar_t- /Zi /GR /DLL_RELEASE=1 /DLL_RELEASE_FOR_DOWNLOAD=1 /DNDEBUG /D_SECURE_STL=0 /D_HAS_ITERATOR_DEBUGGING=0 /DWIN32 /D_WINDOWS /DLL_WINDOWS=1 /DUNICODE /D_UNICODE /DWINVER=0x0602 /D_WIN32_WINNT=0x0602 /Zc:preprocessor"
$ export PATH="$VCPKG_ROOT/downloads/tools/cmake-3.30.1-windows/cmake-3.30.1-windows-arm64/bin:$VCPKG_ROOT/downloads/tools/msys2/2db36fb050d01f45/usr/bin:$VCPKG_ROOT/installed/arm64-windows/tools/libxml2:/c/Program Files (x86)/Microsoft Visual Studio/2022/BuildTools/MSBuild/Current/Bin:$PATH"
@@ -158,3 +195,4 @@ pull requests and more. See the [CONTRIBUTING][] and the [open source portal][]
[contributing]: https://megapahit.org/viewer.git/tree/CONTRIBUTING.md
[in-world group]: https://world.secondlife.com/group/1142646c-5fb2-162c-ecf8-c5e422ab5c6d
[Discord]: https://discord.gg/jpt33HPVEK
+[fmod]: https://www.fmod.com/studio
diff --git a/indra/cmake/cpuinfo.cmake b/indra/cmake/cpuinfo.cmake
deleted file mode 100644
index 10fcab8e40..0000000000
--- a/indra/cmake/cpuinfo.cmake
+++ /dev/null
@@ -1,5 +0,0 @@
-include(Prebuilt)
-
-add_library( ll::cpuinfo INTERFACE IMPORTED )
-
-use_system_binary(cpuinfo)
diff --git a/indra/llcommon/CMakeLists.txt b/indra/llcommon/CMakeLists.txt
index 07d2c4afeb..e8c51c4c8e 100644
--- a/indra/llcommon/CMakeLists.txt
+++ b/indra/llcommon/CMakeLists.txt
@@ -11,9 +11,6 @@ include(LLSharedLibs)
include(ZLIBNG)
include(Tracy)
-if ($ENV{MSYSTEM_CARCH} MATCHES aarch64)
- include(cpuinfo)
-endif ()
set(llcommon_SOURCE_FILES
apply.cpp
@@ -285,10 +282,6 @@ target_link_libraries(
ll::tracy
)
-if ($ENV{MSYSTEM_CARCH} MATCHES aarch64)
- target_link_libraries(llcommon ll::cpuinfo)
-endif ()
-
target_include_directories(llcommon INTERFACE ${CMAKE_CURRENT_SOURCE_DIR})
target_include_directories(llcommon PRIVATE ${CMAKE_CURRENT_SOURCE_DIR})
diff --git a/indra/llcommon/llprocessor.cpp b/indra/llcommon/llprocessor.cpp
index 434501af77..c0b1a5c9e3 100644
--- a/indra/llcommon/llprocessor.cpp
+++ b/indra/llcommon/llprocessor.cpp
@@ -40,9 +40,6 @@
# include <intrin.h>
# undef _interlockedbittestandset
# undef _interlockedbittestandreset
-#if _M_ARM64
-# include <cpuinfo.h>
-#endif
#endif
#include "llsd.h"
@@ -510,9 +507,7 @@ private:
// the other three array elements. The CPU identification string is
// not in linear order. The code below arranges the information
// in a human readable form.
-#if _M_ARM64
- cpuinfo_initialize();
-#else
+#if !_M_ARM64
int cpu_info[4] = {-1};
__cpuid(cpu_info, 0);
unsigned int ids = (unsigned int)cpu_info[0];
@@ -521,44 +516,7 @@ private:
char cpu_vendor[0x20];
memset(cpu_vendor, 0, sizeof(cpu_vendor));
-#if _M_ARM64
- switch (cpuinfo_get_current_core()->vendor)
- {
- case cpuinfo_vendor_unknown:
- setInfo(eVendor, "Unknown");
- break;
- case cpuinfo_vendor_arm:
- setInfo(eVendor, "ARM");
- break;
- case cpuinfo_vendor_qualcomm:
- setInfo(eVendor, "Qualcomm");
- break;
- case cpuinfo_vendor_apple:
- setInfo(eVendor, "Apple");
- break;
- case cpuinfo_vendor_samsung:
- setInfo(eVendor, "Samsung");
- break;
- case cpuinfo_vendor_nvidia:
- setInfo(eVendor, "Nvidia");
- break;
- case cpuinfo_vendor_cavium:
- setInfo(eVendor, "Cavium");
- break;
- case cpuinfo_vendor_broadcom:
- setInfo(eVendor, "Broadcom");
- break;
- case cpuinfo_vendor_apm:
- setInfo(eVendor, "APM");
- break;
- case cpuinfo_vendor_huawei:
- setInfo(eVendor, "Huawei");
- break;
- default:
- setInfo(eVendor, "Unknown");
- break;
- }
-#else
+#if !_M_ARM64
*((int*)cpu_vendor) = cpu_info[1];
*((int*)(cpu_vendor+4)) = cpu_info[3];
*((int*)(cpu_vendor+8)) = cpu_info[2];
@@ -572,8 +530,18 @@ private:
}
#if _M_ARM64
- setInfo(eModel, cpuinfo_get_package(0)->name);
- setInfo(eType, cpuinfo_get_uarch(0)->uarch);
+ HKEY hKey;
+ DWORD gotType;
+ char inBuffer[48] = "";
+ if (RegOpenKeyExA(HKEY_LOCAL_MACHINE, "HARDWARE\\DESCRIPTION\\System\\CentralProcessor\\0", 0, KEY_READ, &hKey) == ERROR_SUCCESS)
+ {
+ if (!RegQueryValueExA(hKey, "ProcessorNameString", nullptr, &gotType, (PBYTE)(inBuffer), nullptr))
+ {
+ if ((gotType == REG_SZ) && strlen(inBuffer))
+ setInfo(eModel, inBuffer);
+ }
+ RegCloseKey(hKey);
+ }
#else
// Get the information associated with each valid Id
for(unsigned int i=0; i<=ids; ++i)
diff --git a/indra/llcorehttp/_httpoprequest.cpp b/indra/llcorehttp/_httpoprequest.cpp
index 6186e7a308..56c0a97635 100644
--- a/indra/llcorehttp/_httpoprequest.cpp
+++ b/indra/llcorehttp/_httpoprequest.cpp
@@ -513,7 +513,9 @@ HttpStatus HttpOpRequest::prepareRequest(HttpService * service)
check_curl_easy_setopt(mCurlHandle, CURLOPT_NOPROGRESS, 1);
check_curl_easy_setopt(mCurlHandle, CURLOPT_URL, mReqURL.c_str());
check_curl_easy_setopt(mCurlHandle, CURLOPT_PRIVATE, getHandle());
+#if LIBCURL_VERSION_MAJOR < 8
check_curl_easy_setopt(mCurlHandle, CURLOPT_ENCODING, "");
+#endif
check_curl_easy_setopt(mCurlHandle, CURLOPT_AUTOREFERER, 1);
check_curl_easy_setopt(mCurlHandle, CURLOPT_MAXREDIRS, HTTP_REDIRECTS_DEFAULT);
@@ -603,7 +605,9 @@ HttpStatus HttpOpRequest::prepareRequest(HttpService * service)
case HOR_POST:
{
check_curl_easy_setopt(mCurlHandle, CURLOPT_POST, 1);
+#if LIBCURL_VERSION_MAJOR < 8
check_curl_easy_setopt(mCurlHandle, CURLOPT_ENCODING, "");
+#endif
long data_size(0);
if (mReqBody)
{
diff --git a/indra/llcorehttp/httpcommon.cpp b/indra/llcorehttp/httpcommon.cpp
index 315ff15ebb..2b09653d8e 100644
--- a/indra/llcorehttp/httpcommon.cpp
+++ b/indra/llcorehttp/httpcommon.cpp
@@ -289,8 +289,10 @@ CURL *getCurlTemplateHandle()
check_curl_code(result, CURLOPT_NOSIGNAL);
result = curl_easy_setopt(curlpTemplateHandle, CURLOPT_NOPROGRESS, 1);
check_curl_code(result, CURLOPT_NOPROGRESS);
+#if LIBCURL_VERSION_MAJOR < 8
result = curl_easy_setopt(curlpTemplateHandle, CURLOPT_ENCODING, "");
check_curl_code(result, CURLOPT_ENCODING);
+#endif
result = curl_easy_setopt(curlpTemplateHandle, CURLOPT_AUTOREFERER, 1);
check_curl_code(result, CURLOPT_AUTOREFERER);
result = curl_easy_setopt(curlpTemplateHandle, CURLOPT_FOLLOWLOCATION, 1);
diff --git a/indra/llplugin/slplugin/CMakeLists.txt b/indra/llplugin/slplugin/CMakeLists.txt
index 03a057fbcb..2100e6f556 100644
--- a/indra/llplugin/slplugin/CMakeLists.txt
+++ b/indra/llplugin/slplugin/CMakeLists.txt
@@ -49,10 +49,6 @@ target_link_libraries(SLPlugin
ll::pluginlibraries
)
-if ($ENV{MSYSTEM_CARCH} MATCHES aarch64)
- target_link_libraries(${PROJECT_NAME} clog)
-endif ()
-
if (DARWIN)
# Make sure the app bundle has a Resources directory (it will get populated by viewer-manifest.py later)
add_custom_command(
diff --git a/indra/llwindow/llwindow.cpp b/indra/llwindow/llwindow.cpp
index 4f3cc69c75..bff559591f 100644
--- a/indra/llwindow/llwindow.cpp
+++ b/indra/llwindow/llwindow.cpp
@@ -74,12 +74,12 @@ S32 OSMessageBox(const std::string& text, const std::string& caption, U32 type)
LL_WARNS() << "OSMessageBox: " << text << LL_ENDL;
#if LL_MESA_HEADLESS // !!! *FIX: (?)
return OSBTN_OK;
+#elif LL_SDL
+ result = OSMessageBoxSDL(text, caption, type);
#elif LL_WINDOWS
result = OSMessageBoxWin32(text, caption, type);
-#elif LL_DARWIN && !LL_SDL
+#elif LL_DARWIN
result = OSMessageBoxMacOSX(text, caption, type);
-#elif LL_SDL
- result = OSMessageBoxSDL(text, caption, type);
#else
#error("OSMessageBox not implemented for this platform!")
#endif
@@ -259,12 +259,12 @@ bool LLWindow::copyTextToPrimary(const LLWString &src)
// static
std::vector<std::string> LLWindow::getDynamicFallbackFontList()
{
-#if LL_WINDOWS
+#if LL_SDL
+ return LLWindowSDL::getDynamicFallbackFontList();
+#elif LL_WINDOWS
return LLWindowWin32::getDynamicFallbackFontList();
-#elif LL_DARWIN && !LL_SDL
+#elif LL_DARWIN
return LLWindowMacOSX::getDynamicFallbackFontList();
-#elif LL_SDL
- return LLWindowSDL::getDynamicFallbackFontList();
#else
return std::vector<std::string>();
#endif
@@ -273,12 +273,12 @@ std::vector<std::string> LLWindow::getDynamicFallbackFontList()
// static
std::vector<std::string> LLWindow::getDisplaysResolutionList()
{
-#if LL_WINDOWS
+#if LL_SDL
+ return std::vector<std::string>();
+#elif LL_WINDOWS
return LLWindowWin32::getDisplaysResolutionList();
-#elif LL_DARWIN && !LL_SDL
+#elif LL_DARWIN
return LLWindowMacOSX::getDisplaysResolutionList();
-#else
- return std::vector<std::string>();
#endif
}
@@ -346,7 +346,7 @@ LLSplashScreen *LLSplashScreen::create()
return 0;
#elif LL_WINDOWS
return new LLSplashScreenWin32;
-#elif LL_DARWIN && !LL_SDL
+#elif LL_DARWIN
return new LLSplashScreenMacOSX;
#else
#error("LLSplashScreen not implemented on this platform!")
@@ -359,7 +359,7 @@ void LLSplashScreen::show()
{
if (!gSplashScreenp)
{
-#if LL_WINDOWS && !LL_MESA_HEADLESS
+#if LL_WINDOWS && !LL_MESA_HEADLESS && !LL_SDL
gSplashScreenp = new LLSplashScreenWin32;
#elif LL_DARWIN && !LL_SDL
gSplashScreenp = new LLSplashScreenMacOSX;
diff --git a/indra/llwindow/llwindow.h b/indra/llwindow/llwindow.h
index 5e06e665f3..37e681c41b 100644
--- a/indra/llwindow/llwindow.h
+++ b/indra/llwindow/llwindow.h
@@ -92,7 +92,7 @@ public:
virtual bool setCursorPosition(LLCoordWindow position) = 0;
virtual bool getCursorPosition(LLCoordWindow *position) = 0;
-#if LL_WINDOWS
+#if LL_WINDOWS && !LL_SDL
virtual bool getCursorDelta(LLCoordCommon* delta) = 0;
#endif
virtual void showCursor() = 0;
diff --git a/indra/llwindow/llwindowheadless.h b/indra/llwindow/llwindowheadless.h
index 5696b69a59..acec401133 100644
--- a/indra/llwindow/llwindowheadless.h
+++ b/indra/llwindow/llwindowheadless.h
@@ -60,7 +60,7 @@ public:
/*virtual*/ void toggleVSync(bool enable_vsync) override { }
/*virtual*/ bool setCursorPosition(LLCoordWindow position) override {return false;}
/*virtual*/ bool getCursorPosition(LLCoordWindow *position) override {return false;}
-#if LL_WINDOWS
+#if LL_WINDOWS && !LL_SDL
/*virtual*/ bool getCursorDelta(LLCoordCommon* delta) override { return false; }
#endif
/*virtual*/ void showCursor() override {}
diff --git a/indra/llwindow/llwindowsdl.h b/indra/llwindow/llwindowsdl.h
index 144216f658..076d7234bc 100644
--- a/indra/llwindow/llwindowsdl.h
+++ b/indra/llwindow/llwindowsdl.h
@@ -32,7 +32,7 @@
#include "llwindow.h"
#include "lltimer.h"
-#if !defined(__i386__) && !defined(__x86_64__)
+#if !defined(__i386__) && !defined(__x86_64__) && !_M_X64
#define SDL_DISABLE_IMMINTRIN_H
#endif
#include "SDL2/SDL.h"
diff --git a/indra/llwindow/llwindowwin32.cpp b/indra/llwindow/llwindowwin32.cpp
index 4fca74497f..64f20e65ca 100644
--- a/indra/llwindow/llwindowwin32.cpp
+++ b/indra/llwindow/llwindowwin32.cpp
@@ -576,6 +576,7 @@ LLWindowWin32::LLWindowWin32(LLWindowCallbacks* callbacks,
// Make an instance of our window then define the window class
mhInstance = GetModuleHandle(NULL);
+#if !_M_ARM64
// Init Direct Input - needed for joystick / Spacemouse
LPDIRECTINPUT8 di8_interface;
@@ -590,6 +591,7 @@ LLWindowWin32::LLWindowWin32(LLWindowCallbacks* callbacks,
{
gDirectInput8 = di8_interface;
}
+#endif
mSwapMethod = SWAP_METHOD_UNDEFINED;
diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt
index 744c876c37..6b339a69d9 100644
--- a/indra/newview/CMakeLists.txt
+++ b/indra/newview/CMakeLists.txt
@@ -46,6 +46,9 @@ include(VisualLeakDetector)
#include(VulkanGltf)
include(ZLIBNG)
include(LLPrimitive)
+if (CMAKE_SYSTEM_PROCESSOR MATCHES aarch64)
+ include(UnixInstall)
+endif ()
if (ENABLE_MEDIA_PLUGINS)
include(LibVLCPlugin)
@@ -1500,6 +1503,7 @@ if (NOT (DARWIN OR WINDOWS))
llappviewerlinux.cpp
PROPERTIES
COMPILE_DEFINITIONS "${VIEWER_CHANNEL_VERSION_DEFINES}"
+ COMPILE_FLAGS "-DAPP_PLUGIN_DIR=\\\"${INSTALL_LIBRARY_DIR}\\\""
)
#LIST(APPEND viewer_SOURCE_FILES llappviewerlinux_api_dbus.cpp)
if (NOT CMAKE_CXX_COMPILER_ID MATCHES AppleClang)
@@ -1759,10 +1763,33 @@ if (PACKAGE)
CACHE STRING "Viewer major.minor.patch.revision versions.")
set(VIEWER_PACKAGE_COMMENT "A fork of the Second Life viewer")
set(VIEWER_PACKAGE_DESCRIPTION "An entrance to virtual empires in only megabytes. A shelter for the metaverse refugees, especially those from less supported operating systems.")
- set(VIEWER_PACKAGE_DOMAIN_NAME ${VIEWER_BINARY_NAME}.net)
+ string(TOLOWER ${VIEWER_BINARY_NAME} DOMAIN_NAME)
+ set(VIEWER_PACKAGE_DOMAIN_NAME ${DOMAIN_NAME}.net)
endif ()
-if (CMAKE_COMMAND MATCHES /usr/bin/cmake OR WINDOWS)
+if (CMAKE_COMMAND MATCHES /usr/bin/cmake)
+ add_custom_command(
+ TARGET ${VIEWER_BINARY_NAME} POST_BUILD
+ COMMAND sed
+ ARGS -e '/Linden Lab.*/d' ${CMAKE_HOME_DIRECTORY}/../doc/contributions.txt > ${CMAKE_CURRENT_BINARY_DIR}/contributions.txt
+ COMMAND sed
+ ARGS -i '/following residents.*/d' ${CMAKE_CURRENT_BINARY_DIR}/contributions.txt
+ COMMAND sed
+ ARGS -i '/along with.*/d' ${CMAKE_CURRENT_BINARY_DIR}/contributions.txt
+ COMMAND sed
+ ARGS -i '/^$$/d' ${CMAKE_CURRENT_BINARY_DIR}/contributions.txt
+ COMMAND sed
+ ARGS -i '/\t.*/d' ${CMAKE_CURRENT_BINARY_DIR}/contributions.txt
+ COMMAND sed
+ ARGS -i '/^ .*/d' ${CMAKE_CURRENT_BINARY_DIR}/contributions.txt
+ COMMAND sort
+ ARGS -R contributions.txt -o ${CMAKE_CURRENT_BINARY_DIR}/contributions.txt
+ COMMAND paste
+ ARGS -s -d, ${CMAKE_CURRENT_BINARY_DIR}/contributions.txt > ${CMAKE_CURRENT_BINARY_DIR}/contributors.txt
+ COMMAND sed
+ ARGS -i 's/,/, /g' ${CMAKE_CURRENT_BINARY_DIR}/contributors.txt
+ )
+elseif (WINDOWS)
add_custom_command(
TARGET ${VIEWER_BINARY_NAME} POST_BUILD
COMMAND sed
@@ -1982,9 +2009,9 @@ if (WINDOWS)
set(CPACK_NSIS_PACKAGE_NAME ${VIEWER_BINARY_NAME})
set(CPACK_NSIS_HELP_LINK https://${VIEWER_PACKAGE_DOMAIN_NAME})
set(CPACK_NSIS_URL_INFO_ABOUT https://${VIEWER_PACKAGE_DOMAIN_NAME})
- set(CPACK_NSIS_CONTACT $ENV{USER}@${VIEWER_PACKAGE_DOMAIN_NAME})
+ set(CPACK_NSIS_CONTACT $ENV{USERNAME}@${VIEWER_PACKAGE_DOMAIN_NAME})
set(CPACK_NSIS_WELCOME_TITLE "Welcome to ${VIEWER_BINARY_NAME}!")
- set(CPACK_NSIS_MENU_LINKS Megapahit.exe "Megapahit Viewer")
+ set(CPACK_NSIS_MENU_LINKS ${VIEWER_BINARY_NAME}.exe "${VIEWER_BINARY_NAME} Viewer")
set(CPACK_PACKAGE_INSTALL_DIRECTORY ${VIEWER_BINARY_NAME})
if (FALSE)
@@ -2109,10 +2136,6 @@ if (NOT (CMAKE_SYSTEM_NAME MATCHES FreeBSD OR ($ENV{MSYSTEM_CARCH} MATCHES aarch
target_link_libraries(${VIEWER_BINARY_NAME} llwebrtc )
endif ()
-if ($ENV{MSYSTEM_CARCH} MATCHES aarch64)
- target_link_libraries(${VIEWER_BINARY_NAME} clog)
-endif ()
-
if (ENABLE_MEDIA_PLUGINS)
target_link_libraries(${VIEWER_BINARY_NAME} ll::libvlc )
if (DARWIN OR LINUX)
@@ -2292,7 +2315,7 @@ if (LINUX)
set(CPACK_RPM_PACKAGE_REQUIRES "apr-util, boost-fiber, boost-program-options, boost-regex, boost-thread, boost-url, expat, fltk, mesa-libGLU, hunspell, libnghttp2, openjpeg2, SDL2, vlc-libs, vlc-plugins-base, libvorbis"
CACHE STRING "RPM package requirements.")
else ()
- set(CPACK_RPM_PACKAGE_REQUIRES "libapr-util1-0, libboost_fiber1_88_0, libboost_program_options1_88_0, libboost_regex1_88_0, libboost_thread1_88_0, libboost_url1_88_0, libboost_url1_88_0-x86-64-v3, expat, libfltk1_3, libGLU1, libhunspell-1_7-0, libnghttp2-14, openjpeg2, libSDL2-2_0-0, libvlc5, vlc-codecs, libvorbis0"
+ set(CPACK_RPM_PACKAGE_REQUIRES "libapr-util1-0, libboost_fiber1_88_0, libboost_program_options1_88_0, libboost_regex1_88_0, libboost_thread1_88_0, libboost_url1_88_0, libboost_url1_88_0-x86-64-v3, libpng16-16 expat, libfltk1_3, libGLU1, libhunspell-1_7-0, libnghttp2-14, openjpeg2, libSDL2-2_0-0, libvlc5, vlc-codecs, libvorbis0"
CACHE STRING "RPM package requirements.")
endif ()
endif ()
diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp
index 2161dbe19e..f7b48d25f2 100644
--- a/indra/newview/llagent.cpp
+++ b/indra/newview/llagent.cpp
@@ -386,6 +386,10 @@ LLAgent::LLAgent() :
mbRunning(false),
mbTeleportKeepsLookAt(false),
+ mAllowedToStand(true),
+ mAllowedToSit(true),
+ mSitObjectID(LLUUID::null),
+
mAgentAccess(new LLAgentAccess(gSavedSettings)),
mGodLevelChangeSignal(),
mCanEditParcel(false),
@@ -969,7 +973,11 @@ bool LLAgent::isSitting()
void LLAgent::standUp()
{
- setControlFlags(AGENT_CONTROL_STAND_UP);
+ if (mAllowedToStand)
+ {
+ setControlFlags(AGENT_CONTROL_STAND_UP);
+ mSitObjectID = LLUUID::null;
+ }
}
void LLAgent::changeParcels()
@@ -1343,7 +1351,7 @@ LLVector3d LLAgent::getPosGlobalFromAgent(const LLVector3 &pos_agent) const
void LLAgent::sitDown()
{
- setControlFlags(AGENT_CONTROL_SIT_ON_GROUND);
+ if (mAllowedToSit) setControlFlags(AGENT_CONTROL_SIT_ON_GROUND);
}
diff --git a/indra/newview/llagent.h b/indra/newview/llagent.h
index c1d3c6c14b..b475782946 100644
--- a/indra/newview/llagent.h
+++ b/indra/newview/llagent.h
@@ -446,6 +446,16 @@ public:
void standUp();
/// @brief ground-sit at agent's current position
void sitDown();
+ bool isAllowedToStand() const { return mAllowedToStand; }
+ void setAllowedToStand(bool allow) { mAllowedToStand = allow; }
+ bool isAllowedToSit() const { return mAllowedToSit; }
+ void setAllowedToSit(bool allow) { mAllowedToSit = allow; }
+ const LLUUID& getSitObjectID() const { return mSitObjectID; }
+ void setSitObjectID(const LLUUID& objectID) { mSitObjectID = objectID; }
+private:
+ bool mAllowedToStand;
+ bool mAllowedToSit;
+ LLUUID mSitObjectID;
//--------------------------------------------------------------------
// Do Not Disturb
diff --git a/indra/newview/llappviewerlinux.cpp b/indra/newview/llappviewerlinux.cpp
index c1e8f38c51..376eeca9fd 100644
--- a/indra/newview/llappviewerlinux.cpp
+++ b/indra/newview/llappviewerlinux.cpp
@@ -126,7 +126,11 @@ int main( int argc, char **argv )
// install unexpected exception handler
gOldTerminateHandler = std::set_terminate(exceptionTerminateHandler);
+#ifdef __aarch64__
+ setenv("LD_PRELOAD", APP_PLUGIN_DIR"/libcef.so", 1);
+#else
unsetenv( "LD_PRELOAD" ); // <FS:ND/> Get rid of any preloading, we do not want this to happen during startup of plugins.
+#endif
bool ok = viewer_app_ptr->init();
if(!ok)
diff --git a/indra/newview/llappviewerwin32.cpp b/indra/newview/llappviewerwin32.cpp
index 3e51a900ce..67a44cfb27 100644
--- a/indra/newview/llappviewerwin32.cpp
+++ b/indra/newview/llappviewerwin32.cpp
@@ -31,7 +31,9 @@
#endif
#include "llwin32headers.h"
+#if !LL_SDL
#include "llwindowwin32.h" // *FIX: for setting gIconResource.
+#endif
#include "llappviewerwin32.h"
@@ -423,7 +425,9 @@ int APIENTRY WINMAIN(HINSTANCE hInstance,
DWORD heap_enable_lfh_error[MAX_HEAPS];
S32 num_heaps = 0;
+#if !LL_SDL
LLWindowWin32::setDPIAwareness();
+#endif
#if WINDOWS_CRT_MEM_CHECKS && !INCLUDE_VLD
_CrtSetDbgFlag ( _CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF ); // dump memory leaks on exit
@@ -452,8 +456,10 @@ int APIENTRY WINMAIN(HINSTANCE hInstance,
#endif
#endif
+#if !LL_SDL
// *FIX: global
gIconResource = MAKEINTRESOURCE(IDI_LL_ICON);
+#endif
LLAppViewerWin32* viewer_app_ptr = new LLAppViewerWin32(ll_convert_wide_to_string(pCmdLine).c_str());
diff --git a/indra/newview/llmoveview.cpp b/indra/newview/llmoveview.cpp
index a8ceaffde8..df515389c5 100644
--- a/indra/newview/llmoveview.cpp
+++ b/indra/newview/llmoveview.cpp
@@ -538,7 +538,7 @@ void LLPanelStandStopFlying::setStandStopFlyingMode(EStandStopFlyingMode mode)
LLFirstUse::sit();
LLFirstUse::notMoving(false);
}
- panel->mStandButton->setVisible(SSFM_STAND == mode);
+ panel->mStandButton->setVisible((SSFM_STAND == mode) & gAgent.isAllowedToStand());
panel->mStopFlyingButton->setVisible(SSFM_STOP_FLYING == mode);
//visibility of it should be updated after updating visibility of the buttons
diff --git a/indra/newview/llmoveview.h b/indra/newview/llmoveview.h
index 3690245e1d..208e1e80f1 100644
--- a/indra/newview/llmoveview.h
+++ b/indra/newview/llmoveview.h
@@ -143,6 +143,7 @@ public:
static void clearStandStopFlyingMode(EStandStopFlyingMode mode);
/*virtual*/ bool postBuild();
/*virtual*/ void setVisible(bool visible);
+ void setVisibleStandButton(bool visible) { mStandButton->setVisible(visible); }
// *HACK: due to hard enough to have this control aligned with "Move" button while resizing
// let update its position in each frame
diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp
index 63527d8594..c3bb8ef4c4 100644
--- a/indra/newview/llviewermenu.cpp
+++ b/indra/newview/llviewermenu.cpp
@@ -4506,7 +4506,7 @@ void handle_object_sit(LLViewerObject* object, const LLVector3& offset)
{
// get object selection offset
- if (object && object->getPCode() == LL_PCODE_VOLUME)
+ if (gAgent.isAllowedToSit() && object && object->getPCode() == LL_PCODE_VOLUME)
{
gMessageSystem->newMessageFast(_PREHASH_AgentRequestSit);
@@ -7700,6 +7700,7 @@ bool enable_detach(const LLSD&)
// Only enable detach if all faces of object are selected
if (!object ||
!object->isAttachment() ||
+ object->isLocked() ||
!LLSelectMgr::getInstance()->getSelection()->contains(object,SELECT_ALL_TES ))
{
return false;
diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp
index b35be7d385..47d7d42bf7 100644
--- a/indra/newview/llviewermessage.cpp
+++ b/indra/newview/llviewermessage.cpp
@@ -4212,6 +4212,8 @@ void process_avatar_sit_response(LLMessageSystem *mesgsys, void **user_data)
{
LL_WARNS("Messaging") << "Received sit approval for unknown object " << sitObjectID << LL_ENDL;
}
+
+ gAgent.setSitObjectID(sitObjectID);
}
void process_clear_follow_cam_properties(LLMessageSystem *mesgsys, void **user_data)
diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp
index 8d90187e91..d64c0aa0d5 100644
--- a/indra/newview/llviewerobject.cpp
+++ b/indra/newview/llviewerobject.cpp
@@ -310,6 +310,7 @@ LLViewerObject::LLViewerObject(const LLUUID &id, const LLPCode pcode, LLViewerRe
mAttachmentItemID(LLUUID::null),
mLastUpdateType(OUT_UNKNOWN),
mLastUpdateCached(false),
+ mLocked(false),
mCachedMuteListUpdateTime(0),
mCachedOwnerInMuteList(false),
mRiggedAttachedWarned(false)
diff --git a/indra/newview/llviewerobject.h b/indra/newview/llviewerobject.h
index 2b52ea2076..972f8cf846 100644
--- a/indra/newview/llviewerobject.h
+++ b/indra/newview/llviewerobject.h
@@ -974,10 +974,14 @@ public:
LLJointRiggingInfoTab mJointRiggingInfoTab;
+ bool isLocked() const { return mLocked; }
+ void setLocked(bool locked) { mLocked = locked; }
+
private:
LLUUID mAttachmentItemID; // ItemID of the associated object is in user inventory.
EObjectUpdateType mLastUpdateType;
bool mLastUpdateCached;
+ bool mLocked;
public:
// reflection probe state
diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp
index 5c84346917..2b02d5165f 100644
--- a/indra/newview/llviewerwindow.cpp
+++ b/indra/newview/llviewerwindow.cpp
@@ -3848,7 +3848,7 @@ void LLViewerWindow::updateLayout()
void LLViewerWindow::updateMouseDelta()
{
-#if LL_WINDOWS
+#if LL_WINDOWS && !LL_SDL
LLCoordCommon delta;
mWindow->getCursorDelta(&delta);
S32 dx = delta.mX;
diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp
index a6d50af025..7ea70a781b 100644
--- a/indra/newview/llvoavatar.cpp
+++ b/indra/newview/llvoavatar.cpp
@@ -1191,7 +1191,7 @@ void LLVOAvatar::initClass()
LLControlAvatar::sRegionChangedSlot = gAgent.addRegionChangedCallback(&LLControlAvatar::onRegionChanged);
- sCloudTexture = LLViewerTextureManager::getFetchedTextureFromFile("cloud-particle.j2c");
+ sCloudTexture = LLViewerTextureManager::getFetchedTextureFromFile("cloud-particle.png");
}
diff --git a/indra/newview/rlvdefines.h b/indra/newview/rlvdefines.h
index e39328fdd6..c6ba135f3e 100644
--- a/indra/newview/rlvdefines.h
+++ b/indra/newview/rlvdefines.h
@@ -93,6 +93,11 @@ namespace Rlv
Version = 0,
VersionNew,
VersionNum,
+ GetSitID,
+ Sit,
+ SitGround,
+ Unsit,
+ Detach,
GetCommand,
Count,
diff --git a/indra/newview/rlvhandler.cpp b/indra/newview/rlvhandler.cpp
index 6c4b439105..67739ec72f 100644
--- a/indra/newview/rlvhandler.cpp
+++ b/indra/newview/rlvhandler.cpp
@@ -28,8 +28,11 @@
#include "llviewerprecompiledheaders.h"
#include "llagent.h"
#include "llstartup.h"
+#include "llmoveview.h"
#include "llviewercontrol.h"
+#include "llviewermenu.h"
#include "llviewerobject.h"
+#include "llviewerobjectlist.h"
#include "rlvcommon.h"
#include "rlvhandler.h"
@@ -109,6 +112,9 @@ ECmdRet RlvHandler::processCommand(std::reference_wrapper<const RlvCommand> rlvC
switch (rlvCmd.get().getParamType())
{
case EParamType::Reply:
+ case EParamType::Force:
+ case EParamType::Remove:
+ case EParamType::Add:
eRet = rlvCmd.get().processCommand();
break;
case EParamType::Unknown:
@@ -222,4 +228,78 @@ ECmdRet ReplyHandler<EBehaviour::VersionNum>::onCommand(const RlvCommand& rlvCmd
return ECmdRet::Succeeded;
}
+template<> template<>
+ECmdRet ReplyHandler<EBehaviour::GetSitID>::onCommand(const RlvCommand& rlvCmd, std::string& strReply)
+{
+ if (gAgent.isSitting())
+ gAgent.getSitObjectID().toString(strReply);
+ else
+ strReply = "00000000-0000-0000-0000-000000000000";
+ return ECmdRet::Succeeded;
+}
+
+// Force
+
+ECmdRet CommandHandlerBaseImpl<EParamType::Force>::processCommand(const RlvCommand& rlvCmd, ForceHandlerFunc* pHandler)
+{
+ return (*pHandler)(rlvCmd);
+}
+
+template<> template<>
+ECmdRet ForceHandler<EBehaviour::Sit>::onCommand(const RlvCommand& rlvCmd)
+{
+ handle_object_sit(LLUUID{rlvCmd.getOption()});
+ return ECmdRet::Succeeded;
+}
+
+template<> template<>
+ECmdRet ForceHandler<EBehaviour::SitGround>::onCommand(const RlvCommand& rlvCmd)
+{
+ gAgent.sitDown();
+ return ECmdRet::Succeeded;
+}
+
+template<> template<>
+ECmdRet ForceHandler<EBehaviour::Unsit>::onCommand(const RlvCommand& rlvCmd)
+{
+ gAgent.standUp();
+ return ECmdRet::Succeeded;
+}
+
+// AddRem
+
+ECmdRet CommandHandlerBaseImpl<EParamType::AddRem>::processCommand(const RlvCommand& rlvCmd, BhvrHandlerFunc* pHandler, BhvrToggleHandlerFunc* pToggleHandler)
+{
+ auto param = rlvCmd.getParam();
+ bool toggle = false;
+ if (param == "y")
+ toggle = true;
+ else if (param != "n")
+ return ECmdRet::FailedParam;
+ return (*pHandler)(rlvCmd, toggle);
+}
+
+template<> template<>
+ECmdRet BehaviourToggleHandler<EBehaviour::Sit>::onCommand(const RlvCommand& rlvCmd, bool& toggle)
+{
+ gAgent.setAllowedToSit(toggle);
+ return ECmdRet::Succeeded;
+}
+
+template<> template<>
+ECmdRet BehaviourToggleHandler<EBehaviour::Unsit>::onCommand(const RlvCommand& rlvCmd, bool& toggle)
+{
+ gAgent.setAllowedToStand(toggle);
+ if (gAgent.isSitting())
+ LLPanelStandStopFlying::getInstance()->setVisibleStandButton(toggle);
+ return ECmdRet::Succeeded;
+}
+
+template<> template<>
+ECmdRet BehaviourToggleHandler<EBehaviour::Detach>::onCommand(const RlvCommand& rlvCmd, bool& toggle)
+{
+ gObjectList.findObject(rlvCmd.getObjectID())->setLocked(!toggle);
+ return ECmdRet::Succeeded;
+}
+
// ============================================================================
diff --git a/indra/newview/rlvhelper.cpp b/indra/newview/rlvhelper.cpp
index 7cb1473c8c..b4abbc04f3 100644
--- a/indra/newview/rlvhelper.cpp
+++ b/indra/newview/rlvhelper.cpp
@@ -50,10 +50,21 @@ BehaviourDictionary::BehaviourDictionary()
// Reply-only
//
addEntry(new ReplyProcessor<EBehaviour::GetCommand>("getcommand"));
+ addEntry(new ReplyProcessor<EBehaviour::GetSitID>("getsitid"));
addEntry(new ReplyProcessor<EBehaviour::Version, VersionReplyHandler>("version"));
addEntry(new ReplyProcessor<EBehaviour::VersionNew, VersionReplyHandler>("versionnew"));
addEntry(new ReplyProcessor<EBehaviour::VersionNum>("versionnum"));
+ // Force
+ addEntry(new ForceProcessor<EBehaviour::Sit>("sit"));
+ addEntry(new ForceProcessor<EBehaviour::SitGround>("sitground"));
+ addEntry(new ForceProcessor<EBehaviour::Unsit>("unsit"));
+
+ // AddRem
+ addEntry(new BehaviourProcessor<EBehaviour::Sit>("sit"));
+ addEntry(new BehaviourProcessor<EBehaviour::Unsit>("unsit"));
+ addEntry(new BehaviourProcessor<EBehaviour::Detach>("detach"));
+
// Populate mString2InfoMap (the tuple <behaviour, type> should be unique)
for (const BehaviourInfo* bhvr_info_p : mBhvrInfoList)
{
diff --git a/indra/newview/skins/contrast/textures/cloud-particle.j2c b/indra/newview/skins/contrast/textures/cloud-particle.j2c
deleted file mode 100644
index 6c03bf6d05..0000000000
--- a/indra/newview/skins/contrast/textures/cloud-particle.j2c
+++ /dev/null
Binary files differ
diff --git a/indra/newview/skins/contrast/textures/cloud-particle.png b/indra/newview/skins/contrast/textures/cloud-particle.png
new file mode 100644
index 0000000000..f2080ddb9f
--- /dev/null
+++ b/indra/newview/skins/contrast/textures/cloud-particle.png
Binary files differ
diff --git a/indra/newview/skins/contrast/textures/textures.xml b/indra/newview/skins/contrast/textures/textures.xml
index f824816183..1fe1ff333a 100644
--- a/indra/newview/skins/contrast/textures/textures.xml
+++ b/indra/newview/skins/contrast/textures/textures.xml
@@ -796,7 +796,7 @@ with the same filename but different name
<texture name="script_error.j2c" use_mips="true" />
<texture name="silhouette.j2c" use_mips="true" />
<texture name="foot_shadow.j2c" use_mips="true" />
- <texture name="cloud-particle.j2c" use_mips="true" />
+ <texture name="cloud-particle.png" use_mips="true" />
<texture name="transparent.j2c" use_mips="true" />
<!--WARNING OLD ART BELOW *do not use*-->
diff --git a/indra/newview/skins/default/textures/cloud-particle.j2c b/indra/newview/skins/default/textures/cloud-particle.j2c
deleted file mode 100644
index 6c03bf6d05..0000000000
--- a/indra/newview/skins/default/textures/cloud-particle.j2c
+++ /dev/null
Binary files differ
diff --git a/indra/newview/skins/default/textures/cloud-particle.png b/indra/newview/skins/default/textures/cloud-particle.png
new file mode 100644
index 0000000000..f2080ddb9f
--- /dev/null
+++ b/indra/newview/skins/default/textures/cloud-particle.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/textures.xml b/indra/newview/skins/default/textures/textures.xml
index f824816183..1fe1ff333a 100644
--- a/indra/newview/skins/default/textures/textures.xml
+++ b/indra/newview/skins/default/textures/textures.xml
@@ -796,7 +796,7 @@ with the same filename but different name
<texture name="script_error.j2c" use_mips="true" />
<texture name="silhouette.j2c" use_mips="true" />
<texture name="foot_shadow.j2c" use_mips="true" />
- <texture name="cloud-particle.j2c" use_mips="true" />
+ <texture name="cloud-particle.png" use_mips="true" />
<texture name="transparent.j2c" use_mips="true" />
<!--WARNING OLD ART BELOW *do not use*-->
diff --git a/indra/newview/skins/default/xui/en/panel_preferences_privacy.xml b/indra/newview/skins/default/xui/en/panel_preferences_privacy.xml
index 5041fb4878..f1a38dc894 100644
--- a/indra/newview/skins/default/xui/en/panel_preferences_privacy.xml
+++ b/indra/newview/skins/default/xui/en/panel_preferences_privacy.xml
@@ -55,13 +55,24 @@
width="350" />
<check_box
+ control_name="ShowSelectionBeam"
+ height="16"
+ enabled="true"
+ label="Show selection particle beam when selecting or interacting with objects"
+ layout="topleft"
+ left="30"
+ name="selection_beam_visibility"
+ top_pad="15"
+ width="350" />
+
+ <check_box
height="16"
enabled="false"
label="Only friends and groups know I'm online"
layout="topleft"
left="30"
name="online_visibility"
- top_pad="30"
+ top_pad="15"
width="350" />
<check_box