aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/scripts
diff options
context:
space:
mode:
authorJacek Antonelli2008-08-15 23:45:34 -0500
committerJacek Antonelli2008-08-15 23:45:34 -0500
commitcd17687f01420952712a500107e0f93e7ab8d5f8 (patch)
treece48c2b706f2c1176290e39fb555fbdf6648ce01 /linden/scripts
parentSecond Life viewer sources 1.19.0.5 (diff)
downloadmeta-impy-cd17687f01420952712a500107e0f93e7ab8d5f8.zip
meta-impy-cd17687f01420952712a500107e0f93e7ab8d5f8.tar.gz
meta-impy-cd17687f01420952712a500107e0f93e7ab8d5f8.tar.bz2
meta-impy-cd17687f01420952712a500107e0f93e7ab8d5f8.tar.xz
Second Life viewer sources 1.19.1.0
Diffstat (limited to 'linden/scripts')
-rw-r--r--linden/scripts/messages/message_template.msg8
-rwxr-xr-xlinden/scripts/setup-path.py2
-rwxr-xr-xlinden/scripts/template_verifier.py25
3 files changed, 32 insertions, 3 deletions
diff --git a/linden/scripts/messages/message_template.msg b/linden/scripts/messages/message_template.msg
index 5332b12..b9c694b 100644
--- a/linden/scripts/messages/message_template.msg
+++ b/linden/scripts/messages/message_template.msg
@@ -8714,6 +8714,14 @@ version 2.0
8714 { MediaID LLUUID } 8714 { MediaID LLUUID }
8715 { MediaAutoScale U8 } 8715 { MediaAutoScale U8 }
8716 } 8716 }
8717 {
8718 DataBlockExtended Single
8719 { MediaType Variable 1 }
8720 { MediaDesc Variable 1 }
8721 { MediaWidth S32 }
8722 { MediaHeight S32 }
8723 { MediaLoop U8 }
8724 }
8717} 8725}
8718 8726
8719// LandStatRequest 8727// LandStatRequest
diff --git a/linden/scripts/setup-path.py b/linden/scripts/setup-path.py
index cd3a2ec..9403dc8 100755
--- a/linden/scripts/setup-path.py
+++ b/linden/scripts/setup-path.py
@@ -37,7 +37,7 @@ from os.path import realpath, dirname, join
37# Walk back to checkout base directory 37# Walk back to checkout base directory
38dir = dirname(dirname(realpath(__file__))) 38dir = dirname(dirname(realpath(__file__)))
39# Walk in to libraries directory 39# Walk in to libraries directory
40dir = join(join(join(dir, 'indra'), 'lib'), 'python') 40dir = join(dir, 'indra', 'lib', 'python')
41 41
42if dir not in sys.path: 42if dir not in sys.path:
43 sys.path.insert(0, dir) 43 sys.path.insert(0, dir)
diff --git a/linden/scripts/template_verifier.py b/linden/scripts/template_verifier.py
index 73bd329..f1f3953 100755
--- a/linden/scripts/template_verifier.py
+++ b/linden/scripts/template_verifier.py
@@ -145,9 +145,20 @@ def cache_master(master_url):
145 print "Cause: %s" % e 145 print "Cause: %s" % e
146 return master_cache_url 146 return master_cache_url
147 try: 147 try:
148 mc = open(master_cache, 'wb') 148 tmpname = '%s.%d' % (master_cache, os.getpid())
149 mc = open(tmpname, 'wb')
149 mc.write(new_master_contents) 150 mc.write(new_master_contents)
150 mc.close() 151 mc.close()
152 try:
153 os.rename(tmpname, master_cache)
154 except OSError:
155 # We can't rename atomically on top of an existing file on
156 # Windows. Unlinking the existing file will fail if the
157 # file is being held open by a process, but there's only
158 # so much working around a lame I/O API one can take in
159 # a single day.
160 os.unlink(master_cache)
161 os.rename(tmpname, master_cache)
151 except IOError, e: 162 except IOError, e:
152 print "WARNING: Unable to write master message template to %s, proceeding without cache." % master_cache 163 print "WARNING: Unable to write master message template to %s, proceeding without cache." % master_cache
153 print "Cause: %s" % e 164 print "Cause: %s" % e
@@ -160,12 +171,22 @@ def local_template_filename():
160 d = os.path.dirname(os.path.realpath(__file__)) 171 d = os.path.dirname(os.path.realpath(__file__))
161 return os.path.join(d, 'messages', MESSAGE_TEMPLATE) 172 return os.path.join(d, 'messages', MESSAGE_TEMPLATE)
162 173
174def getuser():
175 try:
176 # Unix-only.
177 import getpass
178 return getpass.getuser()
179 except ImportError:
180 import win32api
181 return win32api.GetUserName()
182
163def local_master_cache_filename(): 183def local_master_cache_filename():
164 """Returns the location of the master template cache (which is in the system tempdir) 184 """Returns the location of the master template cache (which is in the system tempdir)
165 <temp_dir>/master_message_template_cache.msg""" 185 <temp_dir>/master_message_template_cache.msg"""
166 import tempfile 186 import tempfile
167 d = tempfile.gettempdir() 187 d = tempfile.gettempdir()
168 return os.path.join(d, 'master_message_template_cache.msg') 188 user = getuser()
189 return os.path.join(d, 'master_message_template_cache.%s.msg' % user)
169 190
170 191
171def run(sysargs): 192def run(sysargs):