-
Notifications
You must be signed in to change notification settings - Fork 104
Linux: Wrapper and scripts modernizations #4982
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
Quinn-Elara
wants to merge
9
commits into
secondlife:develop-linux
Choose a base branch
from
Quinn-Elara:develop-linux
base: develop-linux
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+126
−93
Open
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
72a8fa3
Linux: Update linux scripts to use modern XDG handling for installati…
Quinn-Elara d1c9d1d
Remove whitespace
Quinn-Elara ba2f4d8
Refactoring of wrapper and scripts modernizations.
Quinn-Elara 955bb7d
Pick up missed change
Quinn-Elara 33118cd
Second round of missed changes
Quinn-Elara 803a0fe
Address Copilot review round 2
Quinn-Elara 81f6060
Update comment
Quinn-Elara 7b3a236
Change to correct appid
Quinn-Elara 9b7db58
Fix icon line
Quinn-Elara File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
24 changes: 24 additions & 0 deletions
24
indra/newview/linux_tools/com.secondlife.indra.viewer.desktop
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| [Desktop Entry] | ||
| Version=1.5 | ||
| Name=Second Life | ||
| GenericName=Second Life Viewer | ||
| Comment=Client for the Online Virtual World, Second Life | ||
| Path=@INSTALLATION_PREFIX@ | ||
| Exec=@INSTALLATION_PREFIX@/secondlife %u | ||
| Icon=com.secondlife.indra.viewer | ||
| Terminal=false | ||
| Type=Application | ||
| Categories=Game;Simulation; | ||
| StartupNotify=true | ||
| StartupWMClass="com.secondlife.indra.viewer" | ||
| MimeType=x-scheme-handler/secondlife; | ||
| PrefersNonDefaultGPU=true | ||
| Actions=DefaultGPU;AssociateMIME; | ||
|
|
||
| [Desktop Action DefaultGPU] | ||
| Exec=env __GLX_VENDOR_LIBRARY_NAME=\"\" @INSTALLATION_PREFIX@/secondlife | ||
| Name=Launch on default GPU | ||
|
|
||
| [Desktop Action AssociateMIME] | ||
| Exec=@INSTALLATION_PREFIX@/etc/register_secondlifeprotocol.sh | ||
| Name=Associate SLURLs | ||
28 changes: 20 additions & 8 deletions
28
indra/newview/linux_tools/handle_secondlifeprotocol.sh
100755 → 100644
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,17 +1,29 @@ | ||
| #!/bin/bash | ||
|
|
||
| # Send a URL of the form secondlife://... to Second Life. | ||
| # Note: This script is no longer used, as the main wrapper script is now handling SLURLs directly. | ||
|
|
||
| # Send a URL of the form secondlife://... to any running viewer, if not, launch the default viewer. | ||
| # | ||
|
|
||
| URL="$1" | ||
| sl_url="$1" | ||
|
|
||
| if [ -z "$URL" ]; then | ||
| echo Usage: $0 secondlife://... | ||
| exit | ||
| echo "Got SLURL: ${sl_url}" | ||
| if [ -z "${sl_url}" ]; then | ||
| echo "Usage: $0 secondlife:// ..." | ||
| exit | ||
| fi | ||
|
|
||
| RUN_PATH=`dirname "$0" || echo .` | ||
| cd "${RUN_PATH}/.." | ||
| run_path=$(dirname "$0" || echo .) | ||
|
|
||
| exec ./secondlife -url \'"${URL}"\' | ||
| #Poll DBus to get a list of registered services, then look through the list for the Second Life API Service - if present, this means a viewer is running, if not, then no viewer is running and a new instance should be launched | ||
| service_name="com.secondlife.ViewerAppAPIService" #Name of Second Life DBus service. This should be the same across all viewers. | ||
| if dbus-send --print-reply --dest=org.freedesktop.DBus /org/freedesktop/DBus org.freedesktop.DBus.ListNames | grep -q "${service_name}"; then | ||
| echo "Second Life running, sending to DBus..."; | ||
| exec dbus-send --type=method_call --dest="${service_name}" /com/secondlife/ViewerAppAPI com.secondlife.ViewerAppAPI.GoSLURL string:"${sl_url}" | ||
| else | ||
| echo "Second Life not running, launching new instance..."; | ||
| cd "${run_path}"/.. || exit | ||
| #Go to .sh location (/etc), then up a directory to the viewer location | ||
| exec ./secondlife -url "${sl_url}" | ||
| fi | ||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.