aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/scripts
diff options
context:
space:
mode:
authorJacek Antonelli2009-06-08 00:41:31 -0500
committerJacek Antonelli2009-06-08 00:41:31 -0500
commit0e5df9bdf8d6b418bb6e25615e2ffc922d0f02aa (patch)
tree2c93d38e210832e737d09cff7561373d8d5453b2 /linden/scripts
parentImprudence 1.1.0 released. (diff)
parentUpdated Imprudence to be based on SL 1.22.11. (ChangeLog Entry) (diff)
downloadmeta-impy-0e5df9bdf8d6b418bb6e25615e2ffc922d0f02aa.zip
meta-impy-0e5df9bdf8d6b418bb6e25615e2ffc922d0f02aa.tar.gz
meta-impy-0e5df9bdf8d6b418bb6e25615e2ffc922d0f02aa.tar.bz2
meta-impy-0e5df9bdf8d6b418bb6e25615e2ffc922d0f02aa.tar.xz
Merge branch 'sl-base-1.22' into next
Conflicts: linden/indra/newview/English.lproj/InfoPlist.strings linden/indra/newview/skins/default/xui/en-us/panel_chat_bar.xml
Diffstat (limited to 'linden/scripts')
-rwxr-xr-xlinden/scripts/install.py54
-rwxr-xr-xlinden/scripts/setup-path.py2
-rwxr-xr-xlinden/scripts/template_verifier.py34
3 files changed, 80 insertions, 10 deletions
diff --git a/linden/scripts/install.py b/linden/scripts/install.py
index 0cc2fad..f886a6e 100755
--- a/linden/scripts/install.py
+++ b/linden/scripts/install.py
@@ -11,7 +11,7 @@ https://wiki.lindenlab.com/wiki/User:Phoenix/Library_Installation
11 11
12$LicenseInfo:firstyear=2007&license=mit$ 12$LicenseInfo:firstyear=2007&license=mit$
13 13
14Copyright (c) 2007-2008, Linden Research, Inc. 14Copyright (c) 2007-2009, Linden Research, Inc.
15 15
16Permission is hereby granted, free of charge, to any person obtaining a copy 16Permission is hereby granted, free of charge, to any person obtaining a copy
17of this software and associated documentation files (the "Software"), to deal 17of this software and associated documentation files (the "Software"), to deal
@@ -37,6 +37,7 @@ import copy
37import md5 37import md5
38import optparse 38import optparse
39import os 39import os
40import platform
40import pprint 41import pprint
41import shutil 42import shutil
42import sys 43import sys
@@ -308,6 +309,13 @@ class Installer(object):
308 "Return a list of installed packages." 309 "Return a list of installed packages."
309 return self._installed.keys() 310 return self._installed.keys()
310 311
312 def detail_installed(self, name):
313 "Return file list for specific installed package."
314 filelist = []
315 for url in self._installed[name]._installed.keys():
316 filelist.extend(self._installed[name].files_in(url))
317 return filelist
318
311 def _update_field(self, description, field, value, multiline=False): 319 def _update_field(self, description, field, value, multiline=False):
312 """Given a block and a field name, add or update it. 320 """Given a block and a field name, add or update it.
313 @param description a dict containing all the details of a description. 321 @param description a dict containing all the details of a description.
@@ -458,7 +466,12 @@ windows/i686/vs/2003 -- specify a windows visual studio 2003 package"""
458 if not self._dryrun: 466 if not self._dryrun:
459 if os.path.exists(filename): 467 if os.path.exists(filename):
460 remove_dir_set.add(os.path.dirname(filename)) 468 remove_dir_set.add(os.path.dirname(filename))
461 os.remove(filename) 469 try:
470 os.remove(filename)
471 except OSError:
472 # This is just for cleanup, so we don't care
473 # about normal failures.
474 pass
462 for dirname in remove_dir_set: 475 for dirname in remove_dir_set:
463 try: 476 try:
464 os.removedirs(dirname) 477 os.removedirs(dirname)
@@ -730,7 +743,25 @@ def _get_platform():
730 'cygwin' : 'windows', 743 'cygwin' : 'windows',
731 'solaris' : 'solaris' 744 'solaris' : 'solaris'
732 } 745 }
733 return platform_map[sys.platform] 746 this_platform = platform_map[sys.platform]
747 if this_platform == 'linux':
748 if platform.architecture()[0] == '64bit':
749 # TODO -- someday when install.py accepts a platform of the form
750 # os/arch/compiler/compiler_version then we can replace the
751 # 'linux64' platform with 'linux/x86_64/gcc/4.1'
752 this_platform = 'linux64'
753 else:
754 gcc_version = os.popen("g++ -dumpversion", 'r').read()[:-3]
755 if gcc_version == '4.1':
756 # the 'linux32' platform is a HACK until we can figure
757 # out how to make the install.py script accept a platform of
758 # the form os/arch/compiler/compiler_version for the download
759 # and extract stage
760 #this_platform = 'linux/i686/gcc/4.1'
761 # NOTE: disabled linux32 as it hasn't been tested well
762 #this_platform = 'linux32'
763 this_platform = this_platform
764 return this_platform
734 765
735def _getuser(): 766def _getuser():
736 "Get the user" 767 "Get the user"
@@ -971,6 +1002,12 @@ Ignored if --add-installable or --add-installable-package is not specified.""")
971 dest='detail_installable', 1002 dest='detail_installable',
972 help="Get detailed information on specified installable and exit.") 1003 help="Get detailed information on specified installable and exit.")
973 parser.add_option( 1004 parser.add_option(
1005 '--detail-installed',
1006 type='string',
1007 default=None,
1008 dest='detail_installed',
1009 help="Get list of files for specified installed installable and exit.")
1010 parser.add_option(
974 '--uninstall', 1011 '--uninstall',
975 action='store_true', 1012 action='store_true',
976 default=False, 1013 default=False,
@@ -1012,6 +1049,17 @@ def main():
1012 print "Installable '"+options.detail_installable+"' not found in", 1049 print "Installable '"+options.detail_installable+"' not found in",
1013 print "install file." 1050 print "install file."
1014 return 0 1051 return 0
1052 if options.detail_installed:
1053 try:
1054 detail = installer.detail_installed(options.detail_installed)
1055 #print "Detail on installed",options.detail_installed+":"
1056 for line in detail:
1057 print line
1058 except:
1059 raise
1060 print "Installable '"+options.detail_installed+"' not found in ",
1061 print "install file."
1062 return 0
1015 if options.list_licenses: 1063 if options.list_licenses:
1016 print "license list:", installer.list_licenses() 1064 print "license list:", installer.list_licenses()
1017 return 0 1065 return 0
diff --git a/linden/scripts/setup-path.py b/linden/scripts/setup-path.py
index 9403dc8..7a73dad 100755
--- a/linden/scripts/setup-path.py
+++ b/linden/scripts/setup-path.py
@@ -6,7 +6,7 @@ to screw with PYTHONPATH or symbolic links.
6 6
7$LicenseInfo:firstyear=2007&license=viewergpl$ 7$LicenseInfo:firstyear=2007&license=viewergpl$
8 8
9Copyright (c) 2007-2008, Linden Research, Inc. 9Copyright (c) 2007-2009, Linden Research, Inc.
10 10
11Second Life Viewer Source Code 11Second Life Viewer Source Code
12The source code in this file ("Source Code") is provided by Linden Lab 12The source code in this file ("Source Code") is provided by Linden Lab
diff --git a/linden/scripts/template_verifier.py b/linden/scripts/template_verifier.py
index f1f3953..de9a444 100755
--- a/linden/scripts/template_verifier.py
+++ b/linden/scripts/template_verifier.py
@@ -5,7 +5,7 @@
5 5
6$LicenseInfo:firstyear=2007&license=viewergpl$ 6$LicenseInfo:firstyear=2007&license=viewergpl$
7 7
8Copyright (c) 2007-2008, Linden Research, Inc. 8Copyright (c) 2007-2009, Linden Research, Inc.
9 9
10Second Life Viewer Source Code 10Second Life Viewer Source Code
11The source code in this file ("Source Code") is provided by Linden Lab 11The source code in this file ("Source Code") is provided by Linden Lab
@@ -38,13 +38,35 @@ If [FILE] [FILE] is specified, two local files will be checked against
38each other. 38each other.
39""" 39"""
40 40
41from os.path import realpath, dirname, join, exists 41import sys
42setup_path = join(dirname(realpath(__file__)), "setup-path.py") 42import os.path
43if exists(setup_path): 43
44 execfile(setup_path) 44# Look for indra/lib/python in all possible parent directories ...
45# This is an improvement over the setup-path.py method used previously:
46# * the script may blocated anywhere inside the source tree
47# * it doesn't depend on the current directory
48# * it doesn't depend on another file being present.
49
50root = os.path.abspath(__file__)
51# always insert the directory of the script in the search path
52dir = os.path.dirname(root)
53if dir not in sys.path:
54 sys.path.insert(0, dir)
55
56# Now go look for indra/lib/python in the parent dies
57while root != os.path.sep:
58 root = os.path.dirname(root)
59 dir = os.path.join(root, 'indra', 'lib', 'python')
60 if os.path.isdir(dir):
61 if dir not in sys.path:
62 sys.path.insert(0, dir)
63 break
64else:
65 print >>sys.stderr, "This script is not inside a valid installation."
66 sys.exit(1)
67
45import optparse 68import optparse
46import os 69import os
47import sys
48import urllib 70import urllib
49 71
50from indra.ipc import compatibility 72from indra.ipc import compatibility