summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/automated_build_scripts/opensrc-build.sh391
-rwxr-xr-xscripts/build_version.py77
-rwxr-xr-xscripts/gpu_table_tester87
-rwxr-xr-x[-rw-r--r--]scripts/messages/message_template.msg27
-rwxr-xr-x[-rw-r--r--]scripts/messages/message_template.msg.sha12
-rwxr-xr-xscripts/packages-formatter.py93
-rwxr-xr-x[-rw-r--r--]scripts/setup-path.py0
-rwxr-xr-x[-rw-r--r--]scripts/template_verifier.py0
-rwxr-xr-x[-rw-r--r--]scripts/templates/template-cpp.cpp0
-rwxr-xr-x[-rw-r--r--]scripts/templates/template-h.h0
-rwxr-xr-xscripts/update_version_files.py343
11 files changed, 180 insertions, 840 deletions
diff --git a/scripts/automated_build_scripts/opensrc-build.sh b/scripts/automated_build_scripts/opensrc-build.sh
deleted file mode 100755
index c1b592a972..0000000000
--- a/scripts/automated_build_scripts/opensrc-build.sh
+++ /dev/null
@@ -1,391 +0,0 @@
-#!/bin/sh
-
-# This is the build script used by Linden Lab's autmated build system.
-#
-
-set -x
-
-export PATH=/bin:/usr/bin:$PATH
-arch=`uname | cut -b-6`
-here=`echo $0 | sed 's:[^/]*$:.:'`
-year=`date +%Y`
-branch=`svn info | grep '^URL:' | sed 's:.*/::'`
-revision=`svn info | grep '^Revision:' | sed 's/.*: //'`
-
-[ x"$WGET_CACHE" = x ] && export WGET_CACHE=/var/tmp/parabuild/wget
-[ x"$S3GET_URL" = x ] && export S3GET_URL=http://viewer-source-downloads.s3.amazonaws.com/$year
-[ x"$S3PUT_URL" = x ] && export S3PUT_URL=https://s3.amazonaws.com/viewer-source-downloads/$year
-[ x"$PUBLIC_URL" = x ] && export PUBLIC_URL=http://secondlife.com/developers/opensource/downloads/$year
-[ x"$PUBLIC_EMAIL" = x ] && export PUBLIC_EMAIL=sldev-commits@lists.secondlife.com
-
-# Make sure command worked and bail out if not, reporting failure to parabuild
-fail()
-{
- release_lock
- echo "BUILD FAILED" $@
- exit 1
-}
-
-pass()
-{
- release_lock
- echo "BUILD SUCCESSFUL"
- exit 0
-}
-
-# Locking to avoid contention with u-s-c
-LOCK_CREATE=/usr/bin/lockfile-create
-LOCK_TOUCH=/usr/bin/lockfile-touch
-LOCK_REMOVE=/usr/bin/lockfile-remove
-LOCK_PROCESS=
-
-locking_available()
-{
- test -x "$LOCK_CREATE"\
- -a -x "$LOCK_TOUCH"\
- -a -x "$LOCK_REMOVE"
-}
-
-acquire_lock()
-{
- if locking_available
- then
- if "$LOCK_CREATE" /var/lock/update-system-config --retry 99
- then
- "$LOCK_TOUCH" /var/lock/update-system-config &
- LOCK_PROCESS="$!"
- else
- fail acquire lock
- fi
- else
- true
- fi
-}
-
-release_lock()
-{
- if locking_available
- then
- if test x"$LOCK_PROCESS" != x
- then
- kill "$LOCK_PROCESS"
- "$LOCK_REMOVE" /var/lock/update-system-config
- else
- echo No Lock Acquired >&2
- fi
- else
- true
- fi
-}
-
-get_asset()
-{
- mkdir -p "$WGET_CACHE" || fail creating WGET_CACHE
- local tarball=`basename "$1"`
- test -r "$WGET_CACHE/$tarball" || ( cd "$WGET_CACHE" && curl --location --remote-name "$1" || fail getting $1 )
- case "$tarball" in
- *.zip) unzip -qq -d .. -o "$WGET_CACHE/$tarball" || fail unzip $tarball ;;
- *.tar.gz|*.tgz) tar -C .. -xzf "$WGET_CACHE/$tarball" || fail untar $tarball ;;
- *) fail unrecognized filetype: $tarball ;;
- esac
-}
-
-s3_available()
-{
- test -x "$helpers/s3get.sh" -a -x "$helpers/s3put.sh" -a -r "$helpers/s3curl.pl"
-}
-
-build_dir_Darwin()
-{
- echo build-darwin-universal
-}
-
-build_dir_Linux()
-{
- echo viewer-linux-i686-`echo $1 | tr A-Z a-z`
-}
-
-build_dir_CYGWIN()
-{
- echo build-vc80
-}
-
-installer_Darwin()
-{
- ls -1td "`build_dir_Darwin Release`/newview/"*.dmg 2>/dev/null | sed 1q
-}
-
-installer_Linux()
-{
- ls -1td "`build_dir_Linux Release`/newview/"*.tar.bz2 2>/dev/null | sed 1q
-}
-
-installer_CYGWIN()
-{
- d=`build_dir_CYGWIN Release`
- p=`sed 's:.*=::' "$d/newview/Release/touched.bat"`
- echo "$d/newview/Release/$p"
-}
-
-# deal with aborts etc..
-trap fail 1 2 3 14 15
-
-# Check location
-cd "$here/../.."
-
-test -x ../linden/scripts/automated_build_scripts/opensrc-build.sh\
- || fail 'The parent dir of your checkout needs to be named "linden"'
-
-. doc/asset_urls.txt
-get_asset "$SLASSET_ART"
-
-
-# Set up platform specific stuff
-case "$arch" in
-
-# Note that we can only build the "Release" variant for Darwin, because of a compiler bug:
-# ld: bl out of range (-16777272 max is +/-16M)
-# from __static_initialization_and_destruction_0(int, int)at 0x033D319C
-# in __StaticInit of
-# indra/build-darwin-universal/newview/SecondLife.build/Debug/Second Life.build/Objects-normal/ppc/llvoicevisualizer.o
-# to ___cxa_atexit$island_2 at 0x023D50F8
-# in __text of
-# indra/build-darwin-universal/newview/SecondLife.build/Debug/Second Life.build/Objects-normal/ppc/Second Life
-# in __static_initialization_and_destruction_0(int, int)
-# from indra/build-darwin-universal/newview/SecondLife.build/Debug/Second Life.build/Objects-normal/ppc/llvoicevisualizer.o
-
-Darwin)
- helpers=/usr/local/buildscripts/generic_vc
- variants="Release"
- cmake_generator="Xcode"
- fmod=fmodapi375mac
- fmod_tar="$fmod.zip"
- fmod_so=libfmod.a
- fmod_lib=lib
- target_dirs="libraries/universal-darwin/lib_debug
- libraries/universal-darwin/lib_release
- libraries/universal-darwin/lib_release_client"
- other_archs="$S3GET_URL/$branch/$revision/CYGWIN $S3GET_URL/$branch/$revision/Linux"
- mail="$helpers"/mail.py
- all_done="$helpers"/all_done.py
- get_asset "$SLASSET_LIBS_DARWIN"
- ;;
-
-CYGWIN)
- helpers=/cygdrive/c/buildscripts
- variants="Debug RelWithDebInfo Release"
- #variants="Release"
- cmake_generator="vc80"
- fmod=fmodapi375win
- fmod_tar=fmodapi375win.zip
- fmod_so=fmodvc.lib
- fmod_lib=lib
- target_dirs="libraries/i686-win32/lib/debug
- libraries/i686-win32/lib/release"
- other_archs="$S3GET_URL/$branch/$revision/Darwin $S3GET_URL/$branch/$revision/Linux"
- export PATH="/cygdrive/c/Python25:/cygdrive/c/Program Files/Cmake 2.6/bin":$PATH
- export PERL="/cygdrive/c/Perl/bin/perl.exe"
- export S3CURL="C:\\buildscripts\s3curl.pl"
- export CURL="C:\\cygwin\\bin\\curl.exe"
- mail="C:\\buildscripts\\mail.py"
- all_done="C:\\buildscripts\\all_done.py"
- get_asset "$SLASSET_LIBS_WIN32"
- ;;
-
-Linux)
- helpers=/var/opt/parabuild/buildscripts/generic_vc
- [ x"$CXX" = x ] && test -x /usr/bin/g++-4.1 && export CXX=/usr/bin/g++-4.1
- acquire_lock
- variants="Debug RelWithDebInfo Release"
- #variants="Release"
- cmake_generator="Unix Makefiles"
- fmod=fmodapi375linux
- fmod_tar="$fmod".tar.gz
- fmod_so=libfmod-3.75.so
- fmod_lib=.
- target_dirs="libraries/i686-linux/lib_debug
- libraries/i686-linux/lib_release
- libraries/i686-linux/lib_release_client"
- other_archs="$S3GET_URL/$branch/$revision/Darwin $S3GET_URL/$branch/$revision/CYGWIN"
- mail="$helpers"/mail.py
- all_done="$helpers"/all_done.py
- # Change the DISTCC_DIR to be somewhere that the parabuild process can write to
- if test -r /etc/debian_version
- then
- [ x"$DISTCC_DIR" = x ] && export DISTCC_DIR=/var/tmp/parabuild
- case `cat /etc/debian_version` in
- 3.*) [ x"$DISTCC_HOSTS" = x ]\
- && export DISTCC_HOSTS="build-linux-1
- build-linux-2
- build-linux-3
- build-linux-4
- build-linux-5" ;;
- 4.*) [ x"$DISTCC_HOSTS" = x ]\
- && export DISTCC_HOSTS="build-linux-6
- build-linux-7
- build-linux-8
- build-linux-9" ;;
- esac
- fi
-
- get_asset "$SLASSET_LIBS_LINUXI386"
- ;;
-
-*) fail undefined $arch ;;
-esac
-
-get_asset "http://www.fmod.org/index.php/release/version/$fmod_tar"
-
-# Special case for Mac...
-case "$arch" in
-
-Darwin)
- if lipo -create -output "../$fmod"/api/$fmod_lib/libfmod-universal.a\
- "../$fmod"/api/$fmod_lib/libfmod.a\
- "../$fmod"/api/$fmod_lib/libfmodx86.a
- then
- mv "../$fmod"/api/$fmod_lib/libfmod.a "../$fmod"/api/$fmod_lib/libfmodppc.a
- mv "../$fmod"/api/$fmod_lib/libfmod-universal.a "../$fmod"/api/$fmod_lib/libfmod.a
- echo Created fat binary
- else
- fail running lipo
- fi
- ;;
-
-esac
-
-# ensure helpers are up to date
-( cd "$helpers" && svn up )
-
-# First, go into the directory where the code was checked out by Parabuild
-cd indra
-
-# This is the way it works now, but it will soon work on a variant dependent way
-for target_dir in $target_dirs
-do
- mkdir -p "../$target_dir"
- cp -f "../../$fmod/api/$fmod_lib/$fmod_so" "../$target_dir"
-done
-mkdir -p "../libraries/include"
-cp -f "../../$fmod/api/inc/"* "../libraries/include"
-
-# Special Windows case
-test -r "../../$fmod/api/fmod.dll" && cp -f "../../$fmod/api/fmod.dll" newview
-
-# Now run the build command over all variants
-succeeded=true
-cp /dev/null build.log
-
-### TEST CODE - remove when done
-### variants=
-### echo "Artificial build failure to test notifications" > build.log
-### succeeded=false
-### END TEST CODE
-
-for variant in $variants
-do
- build_dir=`build_dir_$arch $variant`
- rm -rf "$build_dir"
- # This is the way it will work in future
- #for target_dir in $target_dirs
- #do
- # mkdir -p "$build_dir/$target_dir"
- # cp "../../$fmod/api/$fmod_lib/$fmod_so" "$build_dir/$target_dir"
- #done
- #mkdir -p "$build_dir/libraries/include"
- #cp "../../$fmod/api/inc/"* "$build_dir/libraries/include"
- echo "==== $variant ====" >> build.log
- if ./develop.py \
- --unattended \
- --incredibuild \
- -t $variant \
- -G "$cmake_generator" \
- configure \
- -DPACKAGE:BOOL=ON >>build.log 2>&1
- then
- if ./develop.py\
- --unattended\
- --incredibuild \
- -t $variant\
- -G "$cmake_generator" \
- build package >>build.log 2>&1
- then
- # run tests if needed
- true
- else
- succeeded=false
- fi
- else
- succeeded=false
- fi
-done
-
-# check statuis and upload results to S3
-subject=
-if $succeeded
-then
- package=`installer_$arch`
- test -r "$package" || fail not found: $package
- package_file=`echo $package | sed 's:.*/::'`
- if s3_available
- then
- echo "$PUBLIC_URL/$branch/$revision/$package_file" > "$arch"
- echo "$PUBLIC_URL/$branch/$revision/good-build.$arch" >> "$arch"
- "$helpers/s3put.sh" "$package" "$S3PUT_URL/$branch/$revision/$package_file" binary/octet-stream\
- || fail Uploading "$package"
- "$helpers/s3put.sh" build.log "$S3PUT_URL/$branch/$revision/good-build.$arch" text/plain\
- || fail Uploading build.log
- "$helpers/s3put.sh" "$arch" "$S3PUT_URL/$branch/$revision/$arch" text/plain\
- || fail Uploading token file
- if python "$all_done"\
- curl\
- "$S3GET_URL/$branch/$revision/$arch"\
- $other_archs > message
- then
- subject="Successful Build for $branch ($revision)"
- fi
- else
- true s3 is not available
- fi
-else
- if s3_available
- then
- "$helpers/s3put.sh" build.log "$S3PUT_URL/$branch/$revision/failed-build.$arch" text/plain\
- || fail Uploading build.log
- subject="Failed Build for $branch ($revision) on $arch"
- cat >message <<EOF
-Build for $branch ($revision) failed for $arch.
-Please see the build log for details:
-
-$PUBLIC_URL/$branch/$revision/failed-build.$arch
-
-EOF
- else
- true s3 is not available
- fi
-fi
-
-# We have something to say...
-if [ x"$subject" != x ]
-then
- # Extract change list since last build
- if [ x"$PARABUILD_CHANGE_LIST_NUMBER" = x ]
- then
- echo "No change information available" >> message
- elif [ x"$PARABUILD_PREVIOUS_CHANGE_LIST_NUMBER" = x ]
- then
- ( cd .. && svn log --verbose --stop-on-copy --limit 50 ) >>message
- else
- ( cd .. && svn log --verbose -r"$PARABUILD_PREVIOUS_CHANGE_LIST_NUMBER":"$PARABUILD_CHANGE_LIST_NUMBER" ) >>message
- fi
- # $PUBLIC_EMAIL can be a list, so no quotes
- python "$mail" "$subject" $PUBLIC_EMAIL <message
-fi
-
-if $succeeded
-then
- pass
-else
- fail
-fi
-
diff --git a/scripts/build_version.py b/scripts/build_version.py
deleted file mode 100755
index 203d76fe9e..0000000000
--- a/scripts/build_version.py
+++ /dev/null
@@ -1,77 +0,0 @@
-#!/usr/bin/env python
-"""\
-@file build_version.py
-@brief Print the build information embedded in a header file.
-
- Expects to be invoked from the command line with a file name and a
- list of directories to search. The file name will be one of the
- following:
-
- llversionserver.h
- llversionviewer.h
-
- The directory list that follows will include indra/llcommon, where
- these files live.
-
-$LicenseInfo:firstyear=2010&license=viewerlgpl$
-Second Life Viewer Source Code
-Copyright (C) 2010-2011, Linden Research, Inc.
-
-This library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Lesser General Public
-License as published by the Free Software Foundation;
-version 2.1 of the License only.
-
-This library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Lesser General Public License for more details.
-
-You should have received a copy of the GNU Lesser General Public
-License along with this library; if not, write to the Free Software
-Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-
-Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
-$/LicenseInfo$
-"""
-
-import errno, os, re
-
-def get_version(filename):
- fp = open(filename)
- data = fp.read()
- fp.close()
-
- vals = {}
- m = re.search('const S32 LL_VERSION_MAJOR = (\d+);', data)
- vals['major'] = m.group(1)
- m = re.search('const S32 LL_VERSION_MINOR = (\d+);', data)
- vals['minor'] = m.group(1)
- m = re.search('const S32 LL_VERSION_PATCH = (\d+);', data)
- vals['patch'] = m.group(1)
- m = re.search('const S32 LL_VERSION_BUILD = (\d+);', data)
- vals['build'] = m.group(1)
-
- return "%(major)s.%(minor)s.%(patch)s.%(build)s" % vals
-
-if __name__ == '__main__':
- import sys
-
- try:
- for path in sys.argv[2:]:
- name = os.path.join(path, sys.argv[1])
- try:
- print get_version(name)
- break
- except OSError, err:
- if err.errno != errno.ENOENT:
- raise
- else:
- print >> sys.stderr, 'File not found:', sys.argv[1]
- sys.exit(1)
- except AttributeError:
- print >> sys.stderr, 'Error: malformatted file: ', name
- sys.exit(1)
- except IndexError:
- print >> sys.stderr, ('Usage: %s llversion[...].h [directories]' %
- sys.argv[0])
diff --git a/scripts/gpu_table_tester b/scripts/gpu_table_tester
index 9bc958636d..af0678000d 100755
--- a/scripts/gpu_table_tester
+++ b/scripts/gpu_table_tester
@@ -73,6 +73,10 @@ die "Must specify a --gpu-table <gpu_table.txt> value"
open(GPUS, "<$GpuTable")
|| die "Failed to open gpu table '$GpuTable':\n\t$!\n";
+my $FirstLine = <GPUS>;
+die "First line of gpu table does not begin with '//GPU_TABLE'"
+ unless $FirstLine =~ m|^//GPU_TABLE|;
+
# Parse the GPU table into these tables, indexed by the name
my %NameLine; # name -> line number on which a given name was found (catches duplicate names)
my %RecognizerLine; # name -> line number on which a given name was found (catches duplicate names)
@@ -81,11 +85,15 @@ my %Recognizer; # name -> recognizer
my %Class; # recognizer -> class
my %Supported; # recognizer -> supported
my @InOrder; # lowercased recognizers in file order - these are the ones really used to match
+my %StatsBased;
+my %ExpectedOpenGL;
$Name{$NoMatch} = $NoMatch;
$NameLine{$NoMatch} = '(hard-coded)'; # use this for error messages in table parsing
$Class{$NoMatch} = '';
$Supported{$NoMatch} = '';
+$StatsBased{$NoMatch} = '';
+$ExpectedOpenGL{$NoMatch} = '';
while (<GPUS>)
{
@@ -93,7 +101,7 @@ while (<GPUS>)
next if m|^\s*$|; # skip blank lines
chomp;
- my ($name, $regex, $class, $supported, $extra) = split('\t+');
+ my ($name, $regex, $class, $supported, $stats_based, $expected_opengl, $extra) = split('\t+');
my $errsOnLine = $ErrorsSeen;
if (!$name)
{
@@ -119,7 +127,7 @@ while (<GPUS>)
print STDERR " $INPUT_LINE_NUMBER: name '$name' " . ($supported ? "supported" : "unsupported") . " class $class - ignored\n";
$ErrorsSeen++;
}
- if ($class !~ m/[0123]/)
+ if ($class !~ m/[012345]/)
{
print STDERR "Invalid class value '$class' on $GpuTable line $INPUT_LINE_NUMBER\n";
$ErrorsSeen++;
@@ -129,6 +137,16 @@ while (<GPUS>)
print STDERR "Invalid supported value '$supported' on $GpuTable line $INPUT_LINE_NUMBER\n";
$ErrorsSeen++;
}
+ if ($stats_based !~ m/[01]/)
+ {
+ print STDERR "Invalid stats_based value '$stats_based' on $GpuTable line $INPUT_LINE_NUMBER\n";
+ $ErrorsSeen++;
+ }
+ if ($expected_opengl !~ m/\d+(\.\d+)?/)
+ {
+ print STDERR "Invalid expected_opengl value '$expected_opengl' on $GpuTable line $INPUT_LINE_NUMBER\n";
+ $ErrorsSeen++;
+ }
if ($extra)
{
print STDERR "Extra data '$extra' on $GpuTable line $INPUT_LINE_NUMBER\n";
@@ -144,6 +162,8 @@ while (<GPUS>)
$Recognizer{$name} = $regex;
$Class{$regex} = $class;
$Supported{$regex} = $supported ? "supported" : "unsupported";
+ $StatsBased{$regex} = $stats_based;
+ $ExpectedOpenGL{$regex} = $expected_opengl;
}
}
@@ -159,6 +179,7 @@ my %RecognizedBy;
while (<>)
{
chomp;
+ $_ = substr($_,0,100);
my $lcInput = lc $_; # the real gpu table parser lowercases the input string
my $recognizer;
$RecognizedBy{$_} = $NoMatch;
@@ -174,34 +195,31 @@ while (<>)
}
format STDOUT_TOP =
-GPU String Supported? Class Recognizer
------------------------------------------------------------------------------------------------------- ----------- ----- ------------------------------------
+GPU String Supported? Class Stats OpenGL Recognizer
+------------------------------------------------------------------------------------------------------ ----------- ----- ----- ------ ------------------------------------
.
format STDOUT =
-@<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<... @<<<<<<<<<< @> @<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<...
-$_, $Supported{$RecognizedBy{$_}},$Class{$RecognizedBy{$_}},$Name{$RecognizedBy{$_}}
+@<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< @<<<<<<<<<< @> @> @<<<< @<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<...
+$_, $Supported{$RecognizedBy{$_}},$Class{$RecognizedBy{$_}},$StatsBased{$RecognizedBy{$_}},$ExpectedOpenGL{$RecognizedBy{$_}},$Name{$RecognizedBy{$_}}
.
-my $ReportLineTemplate = "A102xxxA12xxxAA*"; # MUST match the format STDOUT above
-
-format DIFF_TOP =
- ------ OLD ------ ------ NEW ------
-GPU String Supported? Class Supported? Class
------------------------------------------------------------------------------------------------------- ----------- ----- ----------- -----
-.
+my $ReportLineTemplate = "A102xxxA12xxxA2xxxxA2xxxxA5A*"; # Used to read a previous report - MUST match the format STDOUT above
my ( $oldSupported, $oldClass, $newSupported, $newClass );
+format DIFF_TOP =
+ ------------- OLD ------------- ----------- NEW --------------------
+GPU String Supported? Class Stats OpenGL Supported? Class Stats OpenGL Line
+------------------------------------------------------------------------------------------------------ ----------- ----- ----- ------ ----------- ----- ----- ------ -----
+.
format DIFF =
-@<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<... @<<<<<<<<<< @> @<<<<<<<<<< @>
-$_, $oldSupported, $oldClass, $newSupported, $newClass
+@<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< @<<<<<<<<<< @> @> @<<<< @<<<<<<<<<< @> @> @<<<< @>>>>
+$_, $oldSupported, $oldClass, $oldStatsBased, $oldExpectedOpenGL, $newSupported, $newClass, $newStatsBased, $newExpectedOpenGL, $newRecognizedLine
.
if ( ! $Diff )
{
- ## Print results.
- ## For each input, show supported or unsupported, the class, and the recognizer name
-
+ ## Print results of testing each input line and how it was recognized.
foreach ( sort keys %RecognizedBy )
{
write if ! $UnMatchedOnly || $Name{$RecognizedBy{$_}} eq $NoMatch;
@@ -210,17 +228,20 @@ if ( ! $Diff )
}
else
{
+ ## Print a comparison of how the recognition this time compared to the results from the $Diff file
open OLD, "<$Diff"
|| die "Failed to open --diff file '$Diff'\n\t$!\n";
my $discard = 2;
while ( <OLD> )
{
- if ( $discard > 0 )
+ if ( $discard <= 0 )
{
- my ( $gpu, $supported, $class ) = unpack $ReportLineTemplate;
+ my ( $gpu, $supported, $class, $stats, $opengl ) = unpack $ReportLineTemplate;
$gpu =~ s/\s*$//;
( $OldSupported{$gpu} = $supported ) =~ s/\s*$//;
( $OldClass{$gpu} = $class ) =~ s/\s*$//;
+ ( $OldStatsBased{$gpu} = $stats ) =~ s/\s*$//;
+ ( $OldExpectedOpenGL{$gpu} = $opengl ) =~ s/\s*$//;
}
else
{
@@ -229,33 +250,43 @@ else
}
close OLD;
- $FORMAT_TOP_NAME = DIFF_TOP;
- $FORMAT_NAME = DIFF;
+ $FORMAT_TOP_NAME = 'DIFF_TOP';
+ $FORMAT_NAME = 'DIFF';
foreach ( sort keys %RecognizedBy )
{
$newSupported = $Supported{$RecognizedBy{$_}} || $NoMatch;
$newClass = $Class{$RecognizedBy{$_}};
+ $newStatsBased = $StatsBased{$RecognizedBy{$_}};
+ $newExpectedOpenGL = $ExpectedOpenGL{$RecognizedBy{$_}};
+ $newRecognizedLine = $RecognizerLine{$RecognizedBy{$_}};
if ( ! defined $OldSupported{$_} )
{
$oldSupported = 'NEW';
$oldClass = '-';
+ $oldStatsBased = '-';
+ $oldExpectedOpenGL = '-';
+ write;
+ $-++; # suppresses pagination
}
else
{
$oldSupported = $OldSupported{$_} || $NoMatch;
$oldClass = $OldClass{$_};
+ $oldStatsBased = $OldStatsBased{$_};
+ $oldExpectedOpenGL = $OldExpectedOpenGL{$_};
- if ( ( $oldSupported eq $newSupported )
- && ( $oldClass eq $newClass )
+ if ( ( $oldSupported ne $newSupported )
+ || ( $oldClass ne $newClass )
+ || ( $oldStatsBased ne $newStatsBased )
+ || ( $oldExpectedOpenGL ne $newExpectedOpenGL )
)
{
- $newSupported = '';
- $newClass = '';
+ write;
+ $-++; # suppresses pagination
}
}
- write;
- $-++; # suppresses pagination
+
}
}
diff --git a/scripts/messages/message_template.msg b/scripts/messages/message_template.msg
index 2cb0a833d4..3cec4ada1c 100644..100755
--- a/scripts/messages/message_template.msg
+++ b/scripts/messages/message_template.msg
@@ -2939,6 +2939,10 @@ version 2.0
PidStat Single
{ PID S32 }
}
+ {
+ RegionInfo Variable
+ { RegionFlagsExtended U64 }
+ }
}
// viewer -> sim
@@ -2991,6 +2995,10 @@ version 2.0
{ HardMaxAgents U32 }
{ HardMaxObjects U32 }
}
+ {
+ RegionInfo3 Variable
+ { RegionFlagsExtended U64 }
+ }
}
// GodUpdateRegionInfo
@@ -3016,6 +3024,10 @@ version 2.0
{ RedirectGridX S32 }
{ RedirectGridY S32 }
}
+ {
+ RegionInfo2 Variable
+ { RegionFlagsExtended U64 }
+ }
}
//NearestLandingRegionRequest
@@ -3116,6 +3128,11 @@ version 2.0
{ ProductSKU Variable 1 } // string
{ ProductName Variable 1 } // string
}
+ {
+ RegionInfo4 Variable
+ { RegionFlagsExtended U64 }
+ { RegionProtocols U64 }
+ }
}
// RegionHandshakeReply
@@ -3571,6 +3588,16 @@ version 2.0
VisualParam Variable
{ ParamValue U8 }
}
+ {
+ AppearanceData Variable
+ { AppearanceVersion U8 }
+ { CofVersion S32 }
+ { Flags U32 }
+ }
+ {
+ AppearanceHover Variable
+ { 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 6486d92851..e699efb03c 100644..100755
--- a/scripts/messages/message_template.msg.sha1
+++ b/scripts/messages/message_template.msg.sha1
@@ -1 +1 @@
-465164e1a07f63d68c4ad1f00c19805dfb6ee2d7 \ No newline at end of file
+2286adc795b1b06eb86fdda431a71a6f0874b4f1 \ No newline at end of file
diff --git a/scripts/packages-formatter.py b/scripts/packages-formatter.py
new file mode 100755
index 0000000000..4e66cf9ed4
--- /dev/null
+++ b/scripts/packages-formatter.py
@@ -0,0 +1,93 @@
+#!/usr/bin/env python
+"""\
+This module formats the package version and copyright information for the
+viewer and its dependent packages.
+
+$LicenseInfo:firstyear=2014&license=viewerlgpl$
+Second Life Viewer Source Code
+Copyright (C) 2014, Linden Research, Inc.
+
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation;
+version 2.1 of the License only.
+
+This library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Lesser General Public License for more details.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library; if not, write to the Free Software
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+
+Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+$/LicenseInfo$
+"""
+import os
+import sys
+import errno
+import re
+import subprocess
+
+_autobuild=os.getenv('AUTOBUILD', 'autobuild')
+
+pkg_line=re.compile('^([\w-]+):\s+(.*)$')
+
+def autobuild(*args):
+ """
+ Launch autobuild with specified command-line arguments.
+ Return its stdout pipe from which the caller can read.
+ """
+ # subprocess wants a list, not a tuple
+ command = [_autobuild] + list(args)
+ try:
+ child = subprocess.Popen(command,
+ stdin=None, stdout=subprocess.PIPE,
+ universal_newlines=True)
+ except OSError as err:
+ if err.errno != errno.ENOENT:
+ # Don't attempt to interpret anything but ENOENT
+ raise
+ # Here it's ENOENT: subprocess can't find the autobuild executable.
+ print >>sys.stderr, "packages-formatter on %s: can't run autobuild:\n%s\n%s" % \
+ (sys.platform, ' '.join(command), err)
+ sys.exit(1)
+
+ # no exceptions yet, let caller read stdout
+ return child.stdout
+
+version={}
+versions=autobuild('install', '--versions')
+for line in versions:
+ pkg_info = pkg_line.match(line)
+ if pkg_info:
+ pkg = pkg_info.group(1)
+ if pkg not in version:
+ version[pkg] = pkg_info.group(2).strip()
+ else:
+ sys.exit("Duplicate version for %s" % pkg)
+ else:
+ sys.exit("Unrecognized --versions output: %s" % line)
+
+copyright={}
+copyrights=autobuild('install', '--copyrights')
+viewer_copyright = copyrights.readline() # first line is the copyright for the viewer itself
+for line in copyrights:
+ pkg_info = pkg_line.match(line)
+ if pkg_info:
+ pkg = pkg_info.group(1)
+ if pkg not in copyright:
+ copyright[pkg] = pkg_info.group(2).strip()
+ else:
+ sys.exit("Duplicate copyright for %s" % pkg)
+ else:
+ sys.exit("Unrecognized --copyrights output: %s" % line)
+
+print viewer_copyright
+for pkg in sorted(version):
+ print ': '.join([pkg, version[pkg]])
+ if pkg in copyright:
+ print copyright[pkg]
+ else:
+ sys.exit("No copyright for %s" % pkg)
diff --git a/scripts/setup-path.py b/scripts/setup-path.py
index ce83d815bf..ce83d815bf 100644..100755
--- a/scripts/setup-path.py
+++ b/scripts/setup-path.py
diff --git a/scripts/template_verifier.py b/scripts/template_verifier.py
index b44410cdd8..b44410cdd8 100644..100755
--- a/scripts/template_verifier.py
+++ b/scripts/template_verifier.py
diff --git a/scripts/templates/template-cpp.cpp b/scripts/templates/template-cpp.cpp
index 35d8441c87..35d8441c87 100644..100755
--- a/scripts/templates/template-cpp.cpp
+++ b/scripts/templates/template-cpp.cpp
diff --git a/scripts/templates/template-h.h b/scripts/templates/template-h.h
index ce7b4ddc87..ce7b4ddc87 100644..100755
--- a/scripts/templates/template-h.h
+++ b/scripts/templates/template-h.h
diff --git a/scripts/update_version_files.py b/scripts/update_version_files.py
deleted file mode 100755
index 87036dc1c0..0000000000
--- a/scripts/update_version_files.py
+++ /dev/null
@@ -1,343 +0,0 @@
-#!/usr/bin/env python
-"""\
-@file update_version_files.py
-@brief Update all of the various files in the repository to a new version number,
-instead of having to figure it out by hand
-
-$LicenseInfo:firstyear=2010&license=viewerlgpl$
-Second Life Viewer Source Code
-Copyright (C) 2010-2011, Linden Research, Inc.
-
-This library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Lesser General Public
-License as published by the Free Software Foundation;
-version 2.1 of the License only.
-
-This library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Lesser General Public License for more details.
-
-You should have received a copy of the GNU Lesser General Public
-License along with this library; if not, write to the Free Software
-Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-
-Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
-$/LicenseInfo$
-"""
-
-import sys
-import os.path
-
-# Look for indra/lib/python in all possible parent directories ...
-# This is an improvement over the setup-path.py method used previously:
-# * the script may blocated anywhere inside the source tree
-# * it doesn't depend on the current directory
-# * it doesn't depend on another file being present.
-
-def add_indra_lib_path():
- root = os.path.realpath(__file__)
- # always insert the directory of the script in the search path
- dir = os.path.dirname(root)
- if dir not in sys.path:
- sys.path.insert(0, dir)
-
- # Now go look for indra/lib/python in the parent dies
- while root != os.path.sep:
- root = os.path.dirname(root)
- dir = os.path.join(root, 'indra', 'lib', 'python')
- if os.path.isdir(dir):
- if dir not in sys.path:
- sys.path.insert(0, dir)
- break
- else:
- print >>sys.stderr, "This script is not inside a valid installation."
- sys.exit(1)
-
-add_indra_lib_path()
-
-import getopt, os, re, commands
-from indra.util import llversion
-
-def usage():
- print "Usage:"
- print sys.argv[0] + """ [options]
-
-Options:
- --version
- Specify the version string to replace current version.
- --revision
- Specify the revision to replace the last digit of the version.
- By default, revision is computed from the version control system.
- --skip-on-branch
- Specify a regular expression against which the current branch
- is matched. If it matches, then leave version strings alone.
- Use this to avoid changing version strings on release candidate
- builds.
- --server
- Update llversionserver.h only with new version
- --viewer
- Update llversionviewer.h only with new version
- --channel
- Specify the viewer channel string to replace current channel.
- --server_channel
- Specify the server channel string to replace current channel.
- --verbose
- --help
- Print this message and exit.
-
-Common Uses:
- # Update server and viewer build numbers to the current hg revision:
- update_version_files.py
-
- # Update build numbers unless we are on a release branch:
- update_version_files.py --skip-on-branch='^Branch_'
-
- # Update server and viewer version numbers explicitly:
- update_version_files.py --version=1.18.1.6
-
- # Update just the viewer version number explicitly:
- update_version_files.py --viewer --version=1.18.1.6
-
- # Update just the server build number to the current hg revision:
- update_version_files.py --server
-
- # Update the viewer channel
- update_version_files.py --channel="First Look Puppeteering"
-
- # Update the server channel
- update_version_files.py --server_channel="Het Grid"
-
-"""
-def _getstatusoutput(cmd):
- """Return Win32 (status, output) of executing cmd
-in a shell."""
- if os.path.sep != "/":
- # stupid #%#$$ windows
- cmd = 'cmd.exe /c "'+cmd+'"'
- pipe = os.popen(cmd, 'r')
- text = pipe.read()
- sts = pipe.close()
- if sts is None: sts = 0
- if text[-1:] == '\n': text = text[:-1]
- return sts, text
-
-re_map = {}
-
-#re_map['filename'] = (('pattern', 'replacement'),
-# ('pattern', 'replacement')
-re_map['indra/llcommon/llversionviewer.h'] = \
- (('const S32 LL_VERSION_MAJOR = (\d+);',
- 'const S32 LL_VERSION_MAJOR = %(VER_MAJOR)s;'),
- ('const S32 LL_VERSION_MINOR = (\d+);',
- 'const S32 LL_VERSION_MINOR = %(VER_MINOR)s;'),
- ('const S32 LL_VERSION_PATCH = (\d+);',
- 'const S32 LL_VERSION_PATCH = %(VER_PATCH)s;'),
- ('const S32 LL_VERSION_BUILD = (\d+);',
- 'const S32 LL_VERSION_BUILD = %(VER_BUILD)s;'),
- ('const char \* const LL_CHANNEL = "(.+)";',
- 'const char * const LL_CHANNEL = "%(VIEWER_CHANNEL)s";'))
-re_map['indra/llcommon/llversionserver.h'] = \
- (('const S32 LL_VERSION_MAJOR = (\d+);',
- 'const S32 LL_VERSION_MAJOR = %(SERVER_VER_MAJOR)s;'),
- ('const S32 LL_VERSION_MINOR = (\d+);',
- 'const S32 LL_VERSION_MINOR = %(SERVER_VER_MINOR)s;'),
- ('const S32 LL_VERSION_PATCH = (\d+);',
- 'const S32 LL_VERSION_PATCH = %(SERVER_VER_PATCH)s;'),
- ('const S32 LL_VERSION_BUILD = (\d+);',
- 'const S32 LL_VERSION_BUILD = %(SERVER_VER_BUILD)s;'),
- ('const char \* const LL_CHANNEL = "(.+)";',
- 'const char * const LL_CHANNEL = "%(SERVER_CHANNEL)s";'))
-re_map['indra/newview/res/viewerRes.rc'] = \
- (('FILEVERSION [0-9,]+',
- 'FILEVERSION %(VER_MAJOR)s,%(VER_MINOR)s,%(VER_PATCH)s,%(VER_BUILD)s'),
- ('PRODUCTVERSION [0-9,]+',
- 'PRODUCTVERSION %(VER_MAJOR)s,%(VER_MINOR)s,%(VER_PATCH)s,%(VER_BUILD)s'),
- ('VALUE "FileVersion", "[0-9.]+"',
- 'VALUE "FileVersion", "%(VER_MAJOR)s.%(VER_MINOR)s.%(VER_PATCH)s.%(VER_BUILD)s"'),
- ('VALUE "ProductVersion", "[0-9.]+"',
- 'VALUE "ProductVersion", "%(VER_MAJOR)s.%(VER_MINOR)s.%(VER_PATCH)s.%(VER_BUILD)s"'))
-
-# Trailing ',' in top level tuple is special form to avoid parsing issues with one element tuple
-re_map['indra/newview/Info-SecondLife.plist'] = \
- (('<key>CFBundleVersion</key>\n\t<string>[0-9.]+</string>',
- '<key>CFBundleVersion</key>\n\t<string>%(VER_MAJOR)s.%(VER_MINOR)s.%(VER_PATCH)s.%(VER_BUILD)s</string>'),)
-
-# This will probably only work as long as InfoPlist.strings is NOT UTF16, which is should be...
-re_map['indra/newview/English.lproj/InfoPlist.strings'] = \
- (('CFBundleShortVersionString = "Second Life version [0-9.]+";',
- 'CFBundleShortVersionString = "Second Life version %(VER_MAJOR)s.%(VER_MINOR)s.%(VER_PATCH)s.%(VER_BUILD)s";'),
- ('CFBundleGetInfoString = "Second Life version [0-9.]+',
- 'CFBundleGetInfoString = "Second Life version %(VER_MAJOR)s.%(VER_MINOR)s.%(VER_PATCH)s.%(VER_BUILD)s'))
-
-
-version_re = re.compile('(\d+).(\d+).(\d+).(\d+)')
-
-def main():
- script_path = os.path.dirname(__file__)
- src_root = script_path + "/../"
- verbose = False
-
- opts, args = getopt.getopt(sys.argv[1:],
- "",
- ['version=',
- 'revision=',
- 'channel=',
- 'server_channel=',
- 'skip-on-branch=',
- 'verbose',
- 'server',
- 'viewer',
- 'help'])
- update_server = False
- update_viewer = False
- new_version = None
- new_revision = None
- new_viewer_channel = None
- new_server_channel = None
- skip_on_branch_re = None
- for o,a in opts:
- if o in ('--version'):
- new_version = a
- if o in ('--revision'):
- new_revision = a
- if o in ('--skip-on-branch'):
- skip_on_branch_re = re.compile(a)
- if o in ('--channel'):
- new_viewer_channel = a
- if o in ('--server_channel'):
- new_server_channel = a
- if o in ('--verbose'):
- verbose = True
- if o in ('--server'):
- update_server = True
- if o in ('--viewer'):
- update_viewer = True
- if o in ('--help'):
- usage()
- return 0
-
- if not(update_server or update_viewer):
- update_server = True
- update_viewer = True
-
- # Get current channel/version from llversion*.h
- try:
- viewer_channel = llversion.get_viewer_channel()
- viewer_version = llversion.get_viewer_version()
- except IOError:
- print "Viewer version file not present, skipping..."
- viewer_channel = None
- viewer_version = None
- update_viewer = False
-
- try:
- server_channel = llversion.get_server_channel()
- server_version = llversion.get_server_version()
- except IOError:
- print "Server version file not present, skipping..."
- server_channel = None
- server_version = None
- update_server = False
-
- if verbose:
- print "Source Path:", src_root
- if viewer_channel != None:
- print "Current viewer channel/version: '%(viewer_channel)s' / '%(viewer_version)s'" % locals()
- if server_channel != None:
- print "Current server channel/version: '%(server_channel)s' / '%(server_version)s'" % locals()
- print
-
- # Determine new channel(s)
- if new_viewer_channel != None and len(new_viewer_channel) > 0:
- viewer_channel = new_viewer_channel
- if new_server_channel != None and len(new_server_channel) > 0:
- server_channel = new_server_channel
-
- # Determine new version(s)
- if new_version:
- m = version_re.match(new_version)
- if not m:
- print "Invalid version string specified!"
- return -1
- if update_viewer:
- viewer_version = new_version
- if update_server:
- server_version = new_version
- else:
-
- if llversion.using_hg():
- if new_revision:
- revision = new_revision
- else:
- revision = llversion.get_hg_changeset()
- branch = llversion.get_hg_repo()
- elif new_revision:
- revision = new_revision
- branch = "unknown"
- else:
- print >>sys.stderr, "ERROR: could not determine revision and branch"
- return -1
-
- if skip_on_branch_re and skip_on_branch_re.match(branch):
- print "Release Candidate Build, leaving version files untouched."
- return 0
- if update_viewer:
- m = version_re.match(viewer_version)
- viewer_version = m.group(1)+"."+m.group(2)+"."+m.group(3)+"."+revision
- if update_server:
- m = version_re.match(server_version)
- server_version = m.group(1)+"."+m.group(2)+"."+m.group(3)+"."+revision
-
- if verbose:
- if update_viewer:
- print "Setting viewer channel/version: '%(viewer_channel)s' / '%(viewer_version)s'" % locals()
- if update_server:
- print "Setting server channel/version: '%(server_channel)s' / '%(server_version)s'" % locals()
- print
-
- # split out version parts
- if viewer_version != None:
- m = version_re.match(viewer_version)
- VER_MAJOR = m.group(1)
- VER_MINOR = m.group(2)
- VER_PATCH = m.group(3)
- VER_BUILD = m.group(4)
-
- if server_version != None:
- m = version_re.match(server_version)
- SERVER_VER_MAJOR = m.group(1)
- SERVER_VER_MINOR = m.group(2)
- SERVER_VER_PATCH = m.group(3)
- SERVER_VER_BUILD = m.group(4)
-
- # For readability and symmetry with version strings:
- VIEWER_CHANNEL = viewer_channel
- SERVER_CHANNEL = server_channel
-
- # Iterate through all of the files in the map, and apply the
- # substitution filters
- for filename in re_map.keys():
- try:
- # Read the entire file into a string
- full_fn = src_root + '/' + filename
- file = open(full_fn,"r")
- file_str = file.read()
- file.close()
-
- if verbose:
- print "Processing file:",filename
- for rule in re_map[filename]:
- repl = rule[1] % locals()
- file_str = re.sub(rule[0], repl, file_str)
-
- file = open(full_fn,"w")
- file.write(file_str)
- file.close()
- except IOError:
- print "File %(filename)s not present, skipping..." % locals()
- return 0
-
-if __name__ == '__main__':
- sys.exit(main())
-