diff options
Diffstat (limited to 'linden/indra/newview/linux_tools')
3 files changed, 67 insertions, 0 deletions
diff --git a/linden/indra/newview/linux_tools/handle_secondlifeprotocol.sh b/linden/indra/newview/linux_tools/handle_secondlifeprotocol.sh new file mode 100755 index 0000000..7ff86d1 --- /dev/null +++ b/linden/indra/newview/linux_tools/handle_secondlifeprotocol.sh | |||
@@ -0,0 +1,17 @@ | |||
1 | #!/bin/bash | ||
2 | |||
3 | # Send a URL of the form secondlife://... to Second Life. | ||
4 | # | ||
5 | |||
6 | URL="$1" | ||
7 | |||
8 | if [ -z "$URL" ]; then | ||
9 | echo Usage: $0 secondlife://... | ||
10 | exit | ||
11 | fi | ||
12 | |||
13 | RUN_PATH=`dirname "$0" || echo .` | ||
14 | cd "${RUN_PATH}" | ||
15 | |||
16 | exec ./secondlife -url \'"${URL}"\' | ||
17 | |||
diff --git a/linden/indra/newview/linux_tools/register_secondlifeprotocol.sh b/linden/indra/newview/linux_tools/register_secondlifeprotocol.sh new file mode 100755 index 0000000..4ab96f9 --- /dev/null +++ b/linden/indra/newview/linux_tools/register_secondlifeprotocol.sh | |||
@@ -0,0 +1,46 @@ | |||
1 | #!/bin/bash | ||
2 | |||
3 | # Register a protocol handler (default: handle_secondlifeprotocol.sh) for | ||
4 | # URLs of the form secondlife://... | ||
5 | # | ||
6 | |||
7 | HANDLER="$1" | ||
8 | |||
9 | RUN_PATH=`dirname "$0" || echo .` | ||
10 | cd "${RUN_PATH}" | ||
11 | |||
12 | if [ -z "$HANDLER" ]; then | ||
13 | HANDLER=`pwd`/handle_secondlifeprotocol.sh | ||
14 | fi | ||
15 | |||
16 | # Register handler for GNOME-aware apps | ||
17 | LLGCONFTOOL2=gconftool-2 | ||
18 | if which ${LLGCONFTOOL2} >/dev/null; then | ||
19 | (${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. | ||
20 | else | ||
21 | echo Warning: Did not register secondlife:// handler with GNOME: ${LLGCONFTOOL2} not found. | ||
22 | fi | ||
23 | |||
24 | # Register handler for KDE-aware apps | ||
25 | if [ -z "$KDEHOME" ]; then | ||
26 | KDEHOME=~/.kde | ||
27 | fi | ||
28 | LLKDEPROTDIR=${KDEHOME}/share/services | ||
29 | if [ -d "$LLKDEPROTDIR" ]; then | ||
30 | LLKDEPROTFILE=${LLKDEPROTDIR}/secondlife.protocol | ||
31 | cat > ${LLKDEPROTFILE} <<EOF || echo Warning: Did not register secondlife:// handler with KDE: Could not write ${LLKDEPROTFILE} | ||
32 | [Protocol] | ||
33 | exec=${HANDLER} '%u' | ||
34 | protocol=secondlife | ||
35 | input=none | ||
36 | output=none | ||
37 | helper=true | ||
38 | listing= | ||
39 | reading=false | ||
40 | writing=false | ||
41 | makedir=false | ||
42 | deleting=false | ||
43 | EOF | ||
44 | else | ||
45 | echo Warning: Did not register secondlife:// handler with KDE: Directory $LLKDEPROTDIR does not exist. | ||
46 | fi | ||
diff --git a/linden/indra/newview/linux_tools/wrapper.sh b/linden/indra/newview/linux_tools/wrapper.sh index 10041ee..638a0f0 100755 --- a/linden/indra/newview/linux_tools/wrapper.sh +++ b/linden/indra/newview/linux_tools/wrapper.sh | |||
@@ -61,6 +61,10 @@ fi | |||
61 | 61 | ||
62 | RUN_PATH=`dirname "$0" || echo .` | 62 | RUN_PATH=`dirname "$0" || echo .` |
63 | cd "${RUN_PATH}" | 63 | cd "${RUN_PATH}" |
64 | |||
65 | # Re-register the secondlife:// protocol handler every launch, for now. | ||
66 | ./register_secondlifeprotocol.sh | ||
67 | |||
64 | if [ -n "$LL_TCMALLOC" ]; then | 68 | if [ -n "$LL_TCMALLOC" ]; then |
65 | tcmalloc_libs='/usr/lib/libtcmalloc.so.0 /usr/lib/libstacktrace.so.0 /lib/libpthread.so.0' | 69 | tcmalloc_libs='/usr/lib/libtcmalloc.so.0 /usr/lib/libstacktrace.so.0 /lib/libpthread.so.0' |
66 | all=1 | 70 | all=1 |