summaryrefslogtreecommitdiff
path: root/indra/newview/viewer_manifest.py
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/viewer_manifest.py')
-rw-r--r--indra/newview/viewer_manifest.py46
1 files changed, 45 insertions, 1 deletions
diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py
index 34565835e9..cd9d52cb85 100644
--- a/indra/newview/viewer_manifest.py
+++ b/indra/newview/viewer_manifest.py
@@ -31,6 +31,7 @@ import os.path
import re
import tarfile
import time
+import random
viewer_dir = os.path.dirname(__file__)
# add llmanifest library to our path so we don't have to muck with PYTHONPATH
sys.path.append(os.path.join(viewer_dir, '../lib/python/indra/util'))
@@ -62,6 +63,26 @@ class ViewerManifest(LLManifest):
# include the entire shaders directory recursively
self.path("shaders")
+ # include the extracted list of contributors
+ contributor_names = self.extract_names("../../doc/contributions.txt")
+ self.put_in_file(contributor_names, "contributors.txt")
+ # include the extracted list of translators
+ translator_names = self.extract_names("../../doc/translations.txt")
+ self.put_in_file(translator_names, "translators.txt")
+ # include the list of Lindens (if any)
+ # see https://wiki.lindenlab.com/wiki/Generated_Linden_Credits
+ linden_names_path = os.getenv("linden_credits")
+ if linden_names_path :
+ try:
+ linden_file = open(linden_names_path,'r')
+ # all names should be one line, but the join below also converts to a string
+ linden_names = ', '.join(linden_file.readlines())
+ self.put_in_file(linden_names, "lindens.txt")
+ linden_file.close()
+ except IOError:
+ print "No Linden names found at '%s', using built-in list" % linden_names_path
+ pass
+
# ... and the entire windlight directory
self.path("windlight")
self.end_prefix("app_settings")
@@ -147,10 +168,11 @@ class ViewerManifest(LLManifest):
icon_path="icons/"
channel_type=self.channel_lowerword()
if channel_type == 'release' \
- or channel_type == 'beta' \
or channel_type == 'development' \
:
icon_path += channel_type
+ elif channel_type == 'betaviewer' :
+ icon_path += 'beta'
elif re.match('project.*',channel_type) :
icon_path += 'project'
else :
@@ -188,6 +210,28 @@ class ViewerManifest(LLManifest):
return " ".join((channel_flags, grid_flags, setting_flags)).strip()
+ def extract_names(self,src):
+ try:
+ contrib_file = open(src,'r')
+ except IOError:
+ print "Failed to open '%s'" % src
+ raise
+ lines = contrib_file.readlines()
+ contrib_file.close()
+
+ # All lines up to and including the first blank line are the file header; skip them
+ lines.reverse() # so that pop will pull from first to last line
+ while not re.match("\s*$", lines.pop()) :
+ pass # do nothing
+
+ # A line that starts with a non-whitespace character is a name; all others describe contributions, so collect the names
+ names = []
+ for line in lines :
+ if re.match("\S", line) :
+ names.append(line.rstrip())
+ # It's not fair to always put the same people at the head of the list
+ random.shuffle(names)
+ return ', '.join(names)
class WindowsManifest(ViewerManifest):
def final_exe(self):