Commit Graph

52622 Commits (afcc64cb073eef83f07313bb5f3a0b364d4b6933)

Author SHA1 Message Date
Erik Kundiman afcc64cb07
Rich Presence support using Discord Social SDK (#4457)
* Rich Presence support using Discord Social SDK

Download DiscordSocialSdk-1.4.9649.zip from
https://discord.com/developers/applications/1394782217405862001/social-sdk/downloads
Add -DUSE_DISCORD:BOOL=ON to your cmake line.
The Discord app needs to be set to be a public client in the OAuth2 tab.
All Discord-related code are contained within one file, llstartup.cpp,
and other classes access it through some opaque layer, static functions,
otherwise we'd get these "duplicate symbol" linking errors.

* Move Discord-related code to llappviewer.cpp

The doFrame is the one called over and over again, so running the
Discord callbacks from there shouldn't have one extra function
overhead, while running the Discord initialisation is only once so
it's much more okay to have the extra function overhead there.

* panel_preferences_privacy tabs

Add tab and checkboxes for discord social SDK integration options to panel_preferences_privacy.xml

* Shorten Discord-related local variable names

* Connect to Discord now through privacy tab

Now the access token is saved the way passwords are saved, but
without a username, so we can have some persistence without having
to implement an OAuth2 backend server cause we would have to store
those tokens there anyway still, and it's just simpler to not go
that way. Discord Social SDK doesn't have a helper for sending code
to a custom server anyway, that we would have to have some
asynchronous HTTP requestor ready.
Show location check button gets enabled only when Discord
integration is enabled, though it's not functioning yet.

* Location for Discord Rich Presence Activity State

I was going to use LLAgentUI::buildLocationString but there's no
location format that shows only region and coords without having
to have the parcel name empty, so I copied buildLocationString
implementation in the case of LOCATION_FORMAT_NO_MATURITY but when
the parcel name is empty.
I had to make updateDiscordActivity check agent's ID and the
existence of agent avatar pointer first before trying to set
Activity Details or State, cause I like the "Show location" button
be checkable not only after online when both the ID & pointer will
have existed. I think this way is simpler than programmatically
enabling the "Show location" button after the user is logged in.
I put a trigger to Activity update somewhere after the user is
logged in for now, not yet after a TP.
The elapsed time gets reset whenever Activity is updated for now,
but I'll try to make elapsed time extended instead.
No Party for now, because I couldn't find a way to make a Party
shown without showing its CurrentSize (I could still get away not
showing its MaxSize by setting it to 0), so the State (location)
is shown above the elapsed time, not on the right of it.
I'll try to figure out to get some representative numbers for its
CurrentSize & MaxSize next.
Also no privacy on hiding the username for now, until the UI is
ready.

* Update Rich Presence location on region change

I had to find a spot in source code where it doesn't cause a crash
(it did in LLAgent::setRegion), but I'm not removing the one in
llstartup.cpp because on login, the one in llviewermessage.cpp
gets only the placeholder coords (10, 10, 10).

* Show display name too on Discord Rich Presence

Avatar name cache can be used right away upon login now after I
moved the update call to the end of PRECACHE section in llstartup.

* Show Discord Rich Presence Activity Party

By setting CurrentSize to the number of people within chat radius,
and MaxSize to the number of people within near range.

* Call updateDiscordActivity too in Discord init

so when the user enables the integration after being logged in,
the init can show the name and location right away.

* Discord Rich Presence: Hide name & connect to llappviewer.cpp

Add option to show/hide avatar name in privacy panel & connect rich presense directly to llappviewer.cpp

* Discord time elapsed not reset on region change

Time elapses right after viewer launch even before login.
Plus parameter name change in header to make it the same as in
implementation.

* Cache bool setting retrievals in updateDiscordActivity

As suggested by Andrey Kleschev.
getBOOL and getF32 are expensive, so using `static LLCachedControl<>`
is the way to do it in llappviewer.cpp.

* Check Discord creds existence before getting token

as suggested by Andrey Kleshchev, anticipating external factors
such as user moving settings from another PC.

* Tracy visibility for looped Discord function calls

As suggested by Andrey Kleshchev. They likely can get pricey so
they need to be visible in the profiler.

* Discord-related error handling/logging

plus delay saving Discord credentials to only after the access
token is successfully updated on Discord, and try to disconnect
from Discord when the integration gets disabled regardless whether
there are credentials to delete or not and whether there's an
access token to revoke or not.

* Use getAvatars already called for Discord Party numbers

so we don't have to make any extra getAvatars calls just for this,
as it's pricy in crowds, and we'll just be piggybacking
`updateSpeakerList` and `updateNearbyList`.

* Assemble Discord Activity Details only once

by saving it to a static global string for reuse.

* Remove updateDiscordActivity call in startup loop

The State field (region & coords) is updated well enough without it
now.

* Rename handleDiscordSocial to toggleDiscordIntegration

* Update Discord Activity only when integration is enabled

No need to check setting for the status change callback one,
because getting there would need to be connected to Discord first,
which in turn needs the integration to be enabled first.

---------

Co-authored-by: Secret Foxtail <remmy@megapahit.net>
2025-07-31 08:54:39 -07:00
Andrey Kleshchev afe5d29b96 #4460 debug text cannot be scrolled
setText was being called repeatedly and was forcing scroll up.
Also fixed a typo in floater_test_slapp.xml
2025-07-30 03:13:10 +03:00
Kyler Eastridge 2c91aed07b Add explaination as to why we do clearing inside effect set* functions 2025-07-29 20:12:46 +03:00
Kyler Eastridge c9aae542d6 Add tool tips to the new privacy features 2025-07-29 20:12:46 +03:00
Kyler Eastridge 38a6a4b1cd Fix spelling issue in settings.xml 2025-07-29 20:12:46 +03:00
Kyler Eastridge aae33e4ef2 It's a target, not a hint 2025-07-29 20:12:46 +03:00
Kyler Eastridge c7baab3926 This should be off by default 2025-07-29 20:12:46 +03:00
Kyler Eastridge 0a3c0222e6 Let's do 2m distance instead of 4m 2025-07-29 20:12:46 +03:00
Kyler Eastridge 5785bfdb70 Fix look at target privacy causing head to get stuck 2025-07-29 20:12:46 +03:00
Kyler Eastridge 5c8fdad01f Fix formatting issue caused by VS again 2025-07-29 20:12:46 +03:00
Kyler Eastridge 6c0e19cbec Expose lookat and selection hint privacy settings 2025-07-29 20:12:46 +03:00
Kyler Eastridge eb9c83cda3 Initial limit look at distance code 2025-07-29 20:12:46 +03:00
Kyler Eastridge 82477c484d Add ability to disable look at hints 2025-07-29 20:12:46 +03:00
Kyler Eastridge 87fa994ad0 Add option to disable selection hints 2025-07-29 20:12:46 +03:00
Andrey Kleshchev 792a38b68c #3705 Add an option to hide the $L balance 2025-07-29 18:05:34 +03:00
Kyler "Félix" Eastridge b82f52acbb
Remove the first login screen (#4451)
* Remove panel_login_first.xml and it's components

* Remove additional first login panel resources

* Remove redundant comment

* Remove *.jpg search from viewer manifest
2025-07-27 19:06:43 -07:00
Kyler "Félix" Eastridge 533390a531
2k image resize (#4444)
* Fix spelling error in variable name

* Resize images larger than allowed before upload

* Resize bulk images if they are larger than the allow size

* Fix indentation error caused by Visual Studio

* Fix bulk upload cost calculation
2025-07-26 12:18:26 -07:00
Signal Linden afdcd356db
Add "what to work on" to CONTRIBUTING.md (#4422)
Add a new section to CONTRIBUTING.md pointing people to our new [help wanted](https://github.com/secondlife/viewer/issues?q=is%3Aissue%20state%3Aopen%20label%3A%22help%20wanted%22) label.
2025-07-26 11:29:24 -07:00
Signal Linden 632bcd3d1e
Add media request to pull_request_template.md (#4440)
* Add media request to pull_request_template.md

A picture can be worth a thousand words. Prompt users to provide media when creating a PRs.

* Update pull_request_template.md
2025-07-26 11:29:12 -07:00
Maxim Nikolenko 5291fc252a
#4374 update icon for title bar 2025-07-26 01:20:22 +03:00
Andrey Kleshchev f80d62e6b2 #3851 Increase cache size
Increases default to 8GB and maximum to 32GB.
Viewer now supports 2K textures which require more space, so altered
disk cache vs textures space a little.
Made spinner a bit wider to properly fit whole cache string.
2025-07-24 03:13:17 +03:00
Maxim Nikolenko 9df3b30479
#4424 don't try to update theme too early 2025-07-24 00:44:16 +03:00
Maxim Nikolenko 0c89d06ec2
#4374 add support for the system theme (light and dark) 2025-07-23 12:11:14 +03:00
Henri Beauchamp 08971cd9ac
Fix a crash bug and bogus calculations in LLMeshRepoThread::lodReceived() (#4398, #4408)
When trying to update the rigging info for a newly received mesh LOD,
a wrong usage of LLVolume::getNumFaces() is done to get the number of
volume faces, causing the code to iterate over the number of faces in
the underlying LLProfile instead. LLVolume::getNumVolumeFaces() must
be used here.

This fixes a crash bug seen with low LODs in some meshes (when the number
of mesh faces is smaller than the number of faces in the LLProfile), and
also properly updates the rigging info for all mesh faces, as it should,
when the mesh got more faces than the LLProfile.
2025-07-22 19:22:55 +03:00
Andrey Kleshchev 8efc4744de #4370 Fix change in crouch behaviour
A motion wasn't reset and requires an extra 'push' from viewer.
2025-07-19 12:45:09 +03:00
Maxim Nikolenko 590ad6747f
#4047 fix 'Show on Map' command for parcel URI links 2025-07-17 23:51:42 +03:00
Andrey Kleshchev 211b6c65fd #4337 Full Screen debug setting on MacOS results in a black screen 2025-07-16 23:41:54 +03:00
Andrey Kleshchev dcd9d368c2 #3964 Don't spawn CEF instances for the build tools
unless strictly needed
2025-07-16 23:41:54 +03:00
Andrey Kleshchev be04175579 #4358 Fix 'Microphone in use' task bar icon
1. set_enabled(false) failed to apply, force set it to trigger observers
and remove the icon
2. Don't set audio devices if voice was disabled
2025-07-16 20:05:23 +03:00
AtlasLinden f97ae3c151
Merge pull request #4354 from secondlife/atlas-qaworkflow
Add mac self-hosted runner to QA workflow
2025-07-16 09:52:52 -04:00
Maxim Nikolenko 268ec1f9c2
#4283 fix for missing items in 'My Outfits' floater 2025-07-15 21:50:08 +03:00
TJ 621be9cb9e
#4365 Fix emoji hitboxes in the emoji history list in the IM floater by ensuring they are left aligned 2025-07-14 19:09:09 +03:00
Andrey Kleshchev 8daa59c329 #4267 Offline messages not being requested #2 2025-07-11 21:12:51 +03:00
Andrey Kleshchev c488919ef2 #4267 Offline messages not being requested
According to logs onFileMuteList doesn't get triggered.
I was able to repro, server just doesn't respond when file doesn't exist
server side.
As a workaround added timeout and state tracking into LLMuteList.
2025-07-11 20:31:32 +03:00
Andrey Kleshchev 2e931a55ad #3725 Improve reporting of avatar statistics
1. Don't report UI avatars, they are local and UI specific
2. Split animeshes from normal avatars
3. Rename 'cloud' to 'missing parts', it's not related to 'cloud'
4. Exclude self
5. Report avatars held by meshes
2025-07-11 00:22:54 +03:00
AtlasLinden 9cc5c07299
New method to handle removing previous viewer
Moving previous viewer to trash instead of "removing" it.
2025-07-10 10:36:16 -07:00
AtlasLinden db5af314b9
Remove previously installed viewer
More permission issues encountered if a job is repeated. That is, when attempting to replace an existing installed viewer.
2025-07-10 10:27:16 -07:00
AtlasLinden c70875e0ba
Redirecting viewer installation to Application directory 2025-07-10 08:56:37 -07:00
AtlasLinden 2f77cd09a9
Remove --no-xattrs option 2025-07-10 08:42:34 -07:00
AtlasLinden 450d4d77f7
New copy app command
An attempt to resolve another permission issue
2025-07-10 08:39:09 -07:00
AtlasLinden 239a9c7242
Removing previous permission "fix" 2025-07-10 08:18:16 -07:00
Maxim Nikolenko 210abc3755
#4349 fix repeats cannot be adjusted for specular when a normal map is not applied 2025-07-10 15:15:10 +03:00
AtlasLinden 8fe51b3c9a
Adjusting dmg mount point
Permission issues yet again. Adjusting this back
2025-07-09 14:38:36 -07:00
AtlasLinden c8f6eb045d
Remove whitespace 2025-07-09 14:27:46 -07:00
AtlasLinden 9533232ce7
Mount dmg to new /Volumes
Currently hitting another permission error while attempting to mount dmg in tmp
2025-07-09 14:26:09 -07:00
AtlasLinden 7b4cdd3040
Adjust permission before copying app 2025-07-09 14:14:40 -07:00
AtlasLinden 8c6e766311
Adjust mac artifact name
It was previously looking for a Mac-installer artifact instead of macOS-installer
2025-07-09 13:12:16 -07:00
Andrey Kleshchev 58420b8e63 #4339 World Map Find button shouldn't autocomplete
Either don't track (go) or implement trackSearch
onCommitSearchResult() tracks location and 'autocompletes' as it is
meant for selecting and applying items from search list.
2025-07-09 21:18:25 +03:00
AtlasLinden 0bb0d3efea
Add mac runner
Uncommenting mac runner lines to enable newly set up self-hosted runner with the workflow.
2025-07-09 08:50:41 -07:00
WolfGang de73d0f009
Merge pull request #4311 from WolfGangS/media-first-click-fixes-2
Fix bit logic mistake in PRIM_MEDIA_FIRST_CLICK_INTERACT work
2025-07-02 12:56:51 -07:00