From c9981ec59c4613531b2d5bb03f6ab8f6d914343c Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Mon, 8 Dec 2014 13:12:28 -0500 Subject: SL-92 WIP - hover height communicated via appearance messages. --- scripts/messages/message_template.msg | 4 ++++ scripts/messages/message_template.msg.sha1 | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) (limited to 'scripts') diff --git a/scripts/messages/message_template.msg b/scripts/messages/message_template.msg index 6702de9b4a..e0a80ee9cd 100755 --- a/scripts/messages/message_template.msg +++ b/scripts/messages/message_template.msg @@ -3594,6 +3594,10 @@ version 2.0 { CofVersion S32 } { Flags U32 } } + { + AppearanceHover Single + { HoverHeight LLVector3 } + } } // AvatarSitResponse - response to a request to sit on an object diff --git a/scripts/messages/message_template.msg.sha1 b/scripts/messages/message_template.msg.sha1 index 7a31177f11..affee31086 100755 --- a/scripts/messages/message_template.msg.sha1 +++ b/scripts/messages/message_template.msg.sha1 @@ -1 +1 @@ -4dbf88396c3188ad4c54c4f847a7d8817793668d \ No newline at end of file +bc6a4d7f7fd9bfddefcef336c3e30b623497447f \ No newline at end of file -- cgit v1.2.3 From 6539fe4a671ae73badc3aea6e00d497daafc7733 Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Tue, 16 Dec 2014 09:14:18 -0500 Subject: SL-92 WIP - track appearance message timing --- scripts/messages/message_template.msg | 2 +- scripts/messages/message_template.msg.sha1 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'scripts') diff --git a/scripts/messages/message_template.msg b/scripts/messages/message_template.msg index e0a80ee9cd..3cec4ada1c 100755 --- a/scripts/messages/message_template.msg +++ b/scripts/messages/message_template.msg @@ -3595,7 +3595,7 @@ version 2.0 { Flags U32 } } { - AppearanceHover Single + AppearanceHover Variable { HoverHeight LLVector3 } } } diff --git a/scripts/messages/message_template.msg.sha1 b/scripts/messages/message_template.msg.sha1 index affee31086..e699efb03c 100755 --- a/scripts/messages/message_template.msg.sha1 +++ b/scripts/messages/message_template.msg.sha1 @@ -1 +1 @@ -bc6a4d7f7fd9bfddefcef336c3e30b623497447f \ No newline at end of file +2286adc795b1b06eb86fdda431a71a6f0874b4f1 \ No newline at end of file -- cgit v1.2.3 From 136a925536dc55749de665424469d2111b14ba63 Mon Sep 17 00:00:00 2001 From: Oz Linden Date: Thu, 2 Apr 2015 16:01:17 -0400 Subject: add script to check xml files written by the viewer --- scripts/check-viewer-xml | 102 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 102 insertions(+) create mode 100755 scripts/check-viewer-xml (limited to 'scripts') diff --git a/scripts/check-viewer-xml b/scripts/check-viewer-xml new file mode 100755 index 0000000000..27c1112492 --- /dev/null +++ b/scripts/check-viewer-xml @@ -0,0 +1,102 @@ +#!/usr/bin/env python +from __future__ import print_function +import sys +import os +import argparse +import xml.etree.ElementTree as xml + +try: + from llbase import llsd +except ImportError: + try: + from indra.base import llsd + except ImportError: + sys.exit("""Failed to import python llsd module from llbase or indra.base. +Try + pip install llbase +or + sudo pip install llbase +""") + +def warning(*objs): + print(*objs, file=sys.stderr) + +def xml_is_ok(file): + # Check that the XML file is well formed. + try : + elements = xml.parse(file) + except IOError as read_error: + warning("XML not readable '%s':\n %s" % (file, read_error)) + return False + except xml.ParseError as parse_error : + warning("XML not well-formed '%s':\n %s" % (file, parse_error.msg)) + return False + + root = elements.getroot() + if root.tag == 'llsd': + # if it's LLSD, we should be able to also validate that + with open(file, "r") as llsd_file: + llsd_content=llsd_file.read() + try: + llsd.parse(llsd_content) + except Exception as validity_error: + warning("LLSD not valid '%s':\n %s" % (file, validity_error)) + return False + elif arg.verbosity == 'verbose': + warning(" %s is not a document type that can be validated" % root.tag) + + return True + +cmd_line = argparse.ArgumentParser(description='Checks all xml files found in viewer settings and cache directories ', + prog='check-viewer-xml', + ) +cmd_line.add_argument('directory', nargs='*', default=None, + help='additional directories to check') +verbosity_options=cmd_line.add_mutually_exclusive_group() +verbosity_options.add_argument('-v', '--verbose', + help='verbose output', action='store_const', const='verbose', dest='verbosity') +verbosity_options.add_argument('-q', '--quiet', + help='output errors only', action='store_const', const='quiet', dest='verbosity', default='normal') + +arg = cmd_line.parse_args() + +if sys.platform == 'darwin': + CheckDirs = [ os.path.expanduser('~/Library/Caches/SecondLife'), + os.path.expanduser('~/Library/Application Support/SecondLife'), + ] +elif sys.platform == 'linux2': + CheckDirs = [ os.path.expanduser('~/.secondlife'), + ] +elif sys.platform == 'win32' or sys.platform == 'cygwin': + CheckDirs = [ os.path.expanduser('~\\Local Settings\\Temp'), + os.path.expanduser('~\\Application\\Data\\Secondlife'), + os.path.expanduser('~\\AppData\\Roaming\\Secondlife'), + os.path.expanduser('~\\AppData\\Local\\Secondlife'), + ] +else: + sys.exit("unrecognized platform '%s'" % sys.platform) + +if arg.directory: + CheckDirs.extend(arg.directory) + +checked_files = 0 +invalid_files = 0 +for root in filter(os.path.isdir, CheckDirs): + if arg.verbosity == 'verbose': + print("Searching '%s'" % root) + for directory, dirs, files in os.walk(root): + for file in files: + if file.endswith('.xml'): + xml_file = os.path.join(directory,file) + if arg.verbosity == 'verbose': + print("Checking '%s'" % xml_file) + checked_files += 1 + if not xml_is_ok(xml_file): + invalid_files += 1 + +if arg.verbosity != 'quiet': + print("Checked %d files, %d errors found." % (checked_files, invalid_files)) + +sys.exit(invalid_files) + + -- cgit v1.2.3 From 6b9b4c91d122dccabf7541af70ed68a623ad8810 Mon Sep 17 00:00:00 2001 From: Oz Linden Date: Thu, 9 Apr 2015 11:12:47 -0400 Subject: Detect running under cygwin and fail gracefully --- scripts/check-viewer-xml | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'scripts') diff --git a/scripts/check-viewer-xml b/scripts/check-viewer-xml index 27c1112492..85366c02ae 100755 --- a/scripts/check-viewer-xml +++ b/scripts/check-viewer-xml @@ -68,11 +68,13 @@ elif sys.platform == 'linux2': CheckDirs = [ os.path.expanduser('~/.secondlife'), ] elif sys.platform == 'win32' or sys.platform == 'cygwin': - CheckDirs = [ os.path.expanduser('~\\Local Settings\\Temp'), - os.path.expanduser('~\\Application\\Data\\Secondlife'), - os.path.expanduser('~\\AppData\\Roaming\\Secondlife'), - os.path.expanduser('~\\AppData\\Local\\Secondlife'), - ] + if os.path.isdir(os.path.expanduser('~\\AppData\\Roaming')): + CheckDirs = [ os.path.expanduser('~\\Application\\Data\\Secondlife'), + os.path.expanduser('~\\AppData\\Roaming\\Secondlife'), + os.path.expanduser('~\\AppData\\Local\\Secondlife'), + ] + else: + sys.exit("No AppData\\Roaming directory found;\nThis script must be run in a native Windows command shell.\nRunning under cygwin does not work.") else: sys.exit("unrecognized platform '%s'" % sys.platform) -- cgit v1.2.3 From a49e11efd9e249cc6d3cf5bcffaafe1e831f2fa9 Mon Sep 17 00:00:00 2001 From: Oz Linden Date: Tue, 14 Apr 2015 10:44:16 -0400 Subject: remove check-viewer-xml (moved to the viewer-test-tools repo) --- scripts/check-viewer-xml | 104 ----------------------------------------------- 1 file changed, 104 deletions(-) delete mode 100755 scripts/check-viewer-xml (limited to 'scripts') diff --git a/scripts/check-viewer-xml b/scripts/check-viewer-xml deleted file mode 100755 index 85366c02ae..0000000000 --- a/scripts/check-viewer-xml +++ /dev/null @@ -1,104 +0,0 @@ -#!/usr/bin/env python -from __future__ import print_function -import sys -import os -import argparse -import xml.etree.ElementTree as xml - -try: - from llbase import llsd -except ImportError: - try: - from indra.base import llsd - except ImportError: - sys.exit("""Failed to import python llsd module from llbase or indra.base. -Try - pip install llbase -or - sudo pip install llbase -""") - -def warning(*objs): - print(*objs, file=sys.stderr) - -def xml_is_ok(file): - # Check that the XML file is well formed. - try : - elements = xml.parse(file) - except IOError as read_error: - warning("XML not readable '%s':\n %s" % (file, read_error)) - return False - except xml.ParseError as parse_error : - warning("XML not well-formed '%s':\n %s" % (file, parse_error.msg)) - return False - - root = elements.getroot() - if root.tag == 'llsd': - # if it's LLSD, we should be able to also validate that - with open(file, "r") as llsd_file: - llsd_content=llsd_file.read() - try: - llsd.parse(llsd_content) - except Exception as validity_error: - warning("LLSD not valid '%s':\n %s" % (file, validity_error)) - return False - elif arg.verbosity == 'verbose': - warning(" %s is not a document type that can be validated" % root.tag) - - return True - -cmd_line = argparse.ArgumentParser(description='Checks all xml files found in viewer settings and cache directories ', - prog='check-viewer-xml', - ) -cmd_line.add_argument('directory', nargs='*', default=None, - help='additional directories to check') -verbosity_options=cmd_line.add_mutually_exclusive_group() -verbosity_options.add_argument('-v', '--verbose', - help='verbose output', action='store_const', const='verbose', dest='verbosity') -verbosity_options.add_argument('-q', '--quiet', - help='output errors only', action='store_const', const='quiet', dest='verbosity', default='normal') - -arg = cmd_line.parse_args() - -if sys.platform == 'darwin': - CheckDirs = [ os.path.expanduser('~/Library/Caches/SecondLife'), - os.path.expanduser('~/Library/Application Support/SecondLife'), - ] -elif sys.platform == 'linux2': - CheckDirs = [ os.path.expanduser('~/.secondlife'), - ] -elif sys.platform == 'win32' or sys.platform == 'cygwin': - if os.path.isdir(os.path.expanduser('~\\AppData\\Roaming')): - CheckDirs = [ os.path.expanduser('~\\Application\\Data\\Secondlife'), - os.path.expanduser('~\\AppData\\Roaming\\Secondlife'), - os.path.expanduser('~\\AppData\\Local\\Secondlife'), - ] - else: - sys.exit("No AppData\\Roaming directory found;\nThis script must be run in a native Windows command shell.\nRunning under cygwin does not work.") -else: - sys.exit("unrecognized platform '%s'" % sys.platform) - -if arg.directory: - CheckDirs.extend(arg.directory) - -checked_files = 0 -invalid_files = 0 -for root in filter(os.path.isdir, CheckDirs): - if arg.verbosity == 'verbose': - print("Searching '%s'" % root) - for directory, dirs, files in os.walk(root): - for file in files: - if file.endswith('.xml'): - xml_file = os.path.join(directory,file) - if arg.verbosity == 'verbose': - print("Checking '%s'" % xml_file) - checked_files += 1 - if not xml_is_ok(xml_file): - invalid_files += 1 - -if arg.verbosity != 'quiet': - print("Checked %d files, %d errors found." % (checked_files, invalid_files)) - -sys.exit(invalid_files) - - -- cgit v1.2.3