aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/viewer_manifest.py
diff options
context:
space:
mode:
authorJacek Antonelli2008-08-15 23:45:04 -0500
committerJacek Antonelli2008-08-15 23:45:04 -0500
commit117e22047c5752352342d64e3fb7ce00a4eb8113 (patch)
treee32de2cfba0dda8705ae528fcd1fbe23ba075685 /linden/indra/newview/viewer_manifest.py
parentSecond Life viewer sources 1.18.0.6 (diff)
downloadmeta-impy-117e22047c5752352342d64e3fb7ce00a4eb8113.zip
meta-impy-117e22047c5752352342d64e3fb7ce00a4eb8113.tar.gz
meta-impy-117e22047c5752352342d64e3fb7ce00a4eb8113.tar.bz2
meta-impy-117e22047c5752352342d64e3fb7ce00a4eb8113.tar.xz
Second Life viewer sources 1.18.1.2
Diffstat (limited to 'linden/indra/newview/viewer_manifest.py')
-rwxr-xr-xlinden/indra/newview/viewer_manifest.py197
1 files changed, 134 insertions, 63 deletions
diff --git a/linden/indra/newview/viewer_manifest.py b/linden/indra/newview/viewer_manifest.py
index ccd6c6e..ecbeda2 100755
--- a/linden/indra/newview/viewer_manifest.py
+++ b/linden/indra/newview/viewer_manifest.py
@@ -32,7 +32,7 @@ import re
32import tarfile 32import tarfile
33viewer_dir = os.path.dirname(__file__) 33viewer_dir = os.path.dirname(__file__)
34# add llmanifest library to our path so we don't have to muck with PYTHONPATH 34# add llmanifest library to our path so we don't have to muck with PYTHONPATH
35sys.path.append(os.path.join(viewer_dir, '../lib/python/indra')) 35sys.path.append(os.path.join(viewer_dir, '../lib/python/indra/util'))
36from llmanifest import LLManifest, main, proper_windows_path, path_ancestors 36from llmanifest import LLManifest, main, proper_windows_path, path_ancestors
37 37
38class ViewerManifest(LLManifest): 38class ViewerManifest(LLManifest):
@@ -89,25 +89,42 @@ class ViewerManifest(LLManifest):
89 self.path("lsl_guide.html") 89 self.path("lsl_guide.html")
90 self.path("gpu_table.txt") 90 self.path("gpu_table.txt")
91 91
92 def channel_unique(self):
93 return self.args['channel'].replace("Second Life", "").strip()
94 def channel_oneword(self):
95 return "".join(self.channel_unique().split())
96 def channel_lowerword(self):
97 return self.channel_oneword().lower()
98
92 def flags_list(self): 99 def flags_list(self):
93 """ Convenience function that returns the command-line flags for the grid""" 100 """ Convenience function that returns the command-line flags for the grid"""
94 if(self.args['grid'] == ''): 101 channel_flags = ''
95 return "" 102 grid_flags = ''
96 elif(self.args['grid'] == 'firstlook'): 103 if not self.default_grid():
97 return '-settings settings_firstlook.xml' 104 if self.default_channel():
98 else: 105 # beta grid viewer
99 return ("-settings settings_beta.xml --%(grid)s -helperuri http://preview-%(grid)s.secondlife.com/helpers/" % {'grid':self.args['grid']}) 106 channel_flags = '-settings settings_beta.xml'
107 grid_flags = "--%(grid)s -helperuri http://preview-%(grid)s.secondlife.com/helpers/" % {'grid':self.args['grid']}
108
109 if not self.default_channel():
110 # some channel on some grid
111 channel_flags = '-settings settings_%s.xml -channel "%s"' % (self.channel_lowerword(), self.args['channel'])
112 return " ".join((grid_flags, channel_flags)).strip()
100 113
101 def login_url(self): 114 def login_url(self):
102 """ Convenience function that returns the appropriate login url for the grid""" 115 """ Convenience function that returns the appropriate login url for the grid"""
103 if(self.args.get('login_url')): 116 if(self.args.get('login_url')):
104 return self.args['login_url'] 117 return self.args['login_url']
105 else: 118 else:
106 if(self.args['grid'] == ''): 119 if(self.default_grid()):
107 return 'http://secondlife.com/app/login/' 120 if(self.default_channel()):
108 elif(self.args['grid'] == 'firstlook'): 121 # agni release
109 return 'http://secondlife.com/app/login/firstlook/' 122 return 'http://secondlife.com/app/login/'
123 else:
124 # first look (or other) on agni
125 return 'http://secondlife.com/app/login/%s/' % self.channel_lowerword()
110 else: 126 else:
127 # beta grid
111 return 'http://secondlife.com/app/login/beta/' 128 return 'http://secondlife.com/app/login/beta/'
112 129
113 def replace_login_url(self): 130 def replace_login_url(self):
@@ -117,14 +134,14 @@ class ViewerManifest(LLManifest):
117 134
118class WindowsManifest(ViewerManifest): 135class WindowsManifest(ViewerManifest):
119 def final_exe(self): 136 def final_exe(self):
120 # *NOTE: these are the only two executable names that the crash reporter recognizes 137 if self.default_channel():
121 if self.args['grid'] == '': 138 if self.default_grid():
122 return "SecondLife.exe" 139 return "SecondLife.exe"
123 elif self.args['grid'] == 'firstlook': 140 else:
124 return "SecondLifeFirstLook.exe" 141 return "SecondLifePreview.exe"
125 else: 142 else:
126 return "SecondLifePreview.exe" 143 return ''.join(self.args['channel'].split()) + '.exe'
127 # return "SecondLifePreview%s.exe" % (self.args['grid'], ) 144
128 145
129 def construct(self): 146 def construct(self):
130 super(WindowsManifest, self).construct() 147 super(WindowsManifest, self).construct()
@@ -174,6 +191,20 @@ class WindowsManifest(ViewerManifest):
174 self.path("res/*/*") 191 self.path("res/*/*")
175 self.end_prefix() 192 self.end_prefix()
176 193
194 # Vivox runtimes
195 if self.prefix(src="vivox-runtime/i686-win32", dst=""):
196 self.path("SLVoice.exe")
197 self.path("SLVoiceAgent.exe")
198 self.path("libeay32.dll")
199 self.path("srtp.dll")
200 self.path("ssleay32.dll")
201 self.path("tntk.dll")
202 self.path("alut.dll")
203 self.path("vivoxsdk.dll")
204 self.path("ortp.dll")
205 self.path("wrap_oal.dll")
206 self.end_prefix()
207
177# # pull in the crash logger and updater from other projects 208# # pull in the crash logger and updater from other projects
178# self.path(src="../win_crash_logger/win_crash_logger.exe", dst="win_crash_logger.exe") 209# self.path(src="../win_crash_logger/win_crash_logger.exe", dst="win_crash_logger.exe")
179 self.path(src="../win_updater/updater.exe", dst="updater.exe") 210 self.path(src="../win_updater/updater.exe", dst="updater.exe")
@@ -223,49 +254,75 @@ class WindowsManifest(ViewerManifest):
223 return result 254 return result
224 255
225 def package_finish(self): 256 def package_finish(self):
226 version_vars_template = """ 257 # a standard map of strings for replacing in the templates
258 substitution_strings = {
259 'version' : '.'.join(self.args['version']),
260 'version_short' : '.'.join(self.args['version'][:-1]),
261 'version_dashes' : '-'.join(self.args['version']),
262 'final_exe' : self.final_exe(),
263 'grid':self.args['grid'],
264 'grid_caps':self.args['grid'].upper(),
265 # escape quotes becase NSIS doesn't handle them well
266 'flags':self.flags_list().replace('"', '$\\"'),
267 'channel':self.args['channel'],
268 'channel_oneword':self.channel_oneword(),
269 'channel_unique':self.channel_unique(),
270 }
271
272 version_vars = """
227 !define INSTEXE "%(final_exe)s" 273 !define INSTEXE "%(final_exe)s"
228 !define VERSION "%(version_short)s" 274 !define VERSION "%(version_short)s"
229 !define VERSION_LONG "%(version)s" 275 !define VERSION_LONG "%(version)s"
230 !define VERSION_DASHES "%(version_dashes)s" 276 !define VERSION_DASHES "%(version_dashes)s"
231 """ 277 """ % substitution_strings
232 if(self.args['grid'] == ''): 278 if self.default_channel():
233 installer_file = "Second Life %(version_dashes)s Setup.exe" 279 if self.default_grid():
234 grid_vars_template = """ 280 # release viewer
235 OutFile "%(outfile)s" 281 installer_file = "Second Life %(version_dashes)s Setup.exe"
236 !define INSTFLAGS "%(flags)s" 282 grid_vars_template = """
237 !define INSTNAME "SecondLife" 283 OutFile "%(installer_file)s"
238 !define SHORTCUT "Second Life" 284 !define INSTFLAGS "%(flags)s"
239 !define URLNAME "secondlife" 285 !define INSTNAME "SecondLife"
240 Caption "Second Life ${VERSION}" 286 !define SHORTCUT "Second Life"
241 """ 287 !define URLNAME "secondlife"
288 Caption "Second Life ${VERSION}"
289 """
290 else:
291 # beta grid viewer
292 installer_file = "Second Life %(version_dashes)s (%(grid_caps)s) Setup.exe"
293 grid_vars_template = """
294 OutFile "%(installer_file)s"
295 !define INSTFLAGS "%(flags)s"
296 !define INSTNAME "SecondLife%(grid_caps)s"
297 !define SHORTCUT "Second Life (%(grid_caps)s)"
298 !define URLNAME "secondlife%(grid)s"
299 !define UNINSTALL_SETTINGS 1
300 Caption "Second Life %(grid)s ${VERSION}"
301 """
242 else: 302 else:
243 installer_file = "Second Life %(version_dashes)s (%(grid_caps)s) Setup.exe" 303 # some other channel on some grid
304 installer_file = "Second Life %(version_dashes)s %(channel_unique)s Setup.exe"
244 grid_vars_template = """ 305 grid_vars_template = """
245 OutFile "%(outfile)s" 306 OutFile "%(installer_file)s"
246 !define INSTFLAGS "%(flags)s" 307 !define INSTFLAGS "%(flags)s"
247 !define INSTNAME "SecondLife%(grid_caps)s" 308 !define INSTNAME "SecondLife%(channel_oneword)s"
248 !define SHORTCUT "Second Life (%(grid_caps)s)" 309 !define SHORTCUT "%(channel)s"
249 !define URLNAME "secondlife%(grid)s" 310 !define URLNAME "secondlife"
250 !define UNINSTALL_SETTINGS 1 311 !define UNINSTALL_SETTINGS 1
251 Caption "Second Life %(grid)s ${VERSION}" 312 Caption "%(channel)s ${VERSION}"
252 """ 313 """
253 if(self.args.has_key('installer_name')): 314 if(self.args.has_key('installer_name')):
254 installer_file = self.args['installer_name'] 315 installer_file = self.args['installer_name']
255 else: 316 else:
256 installer_file = installer_file % {'version_dashes' : '-'.join(self.args['version']), 317 installer_file = installer_file % substitution_strings
257 'grid_caps' : self.args['grid'].upper()} 318 substitution_strings['installer_file'] = installer_file
258 tempfile = "../secondlife_setup.nsi" 319
259 # the following is an odd sort of double-string replacement 320 tempfile = "../secondlife_setup_tmp.nsi"
321 # the following replaces strings in the nsi template
322 # it also does python-style % substitution
260 self.replace_in("installers/windows/installer_template.nsi", tempfile, { 323 self.replace_in("installers/windows/installer_template.nsi", tempfile, {
261 "%%VERSION%%":version_vars_template%{'version_short' : '.'.join(self.args['version'][:-1]), 324 "%%VERSION%%":version_vars,
262 'version' : '.'.join(self.args['version']), 325 "%%GRID_VARS%%":grid_vars_template % substitution_strings,
263 'version_dashes' : '-'.join(self.args['version']),
264 'final_exe' : self.final_exe()},
265 "%%GRID_VARS%%":grid_vars_template%{'grid':self.args['grid'],
266 'grid_caps':self.args['grid'].upper(),
267 'outfile':installer_file,
268 'flags':self.flags_list()},
269 "%%INSTALL_FILES%%":self.nsi_file_commands(True), 326 "%%INSTALL_FILES%%":self.nsi_file_commands(True),
270 "%%DELETE_FILES%%":self.nsi_file_commands(False)}) 327 "%%DELETE_FILES%%":self.nsi_file_commands(False)})
271 328
@@ -327,16 +384,26 @@ class DarwinManifest(ViewerManifest):
327 384
328 385
329 def package_finish(self): 386 def package_finish(self):
387 channel_standin = 'Second Life' # hah, our default channel is not usable on its own
388 if not self.default_channel():
389 channel_standin = self.args['channel']
390
330 imagename="SecondLife_" + '_'.join(self.args['version']) 391 imagename="SecondLife_" + '_'.join(self.args['version'])
331 if(self.args['grid'] != ''): 392 if self.default_channel():
332 imagename = imagename + '_' + self.args['grid'].upper() 393 if not self.default_grid():
394 # beta case
395 imagename = imagename + '_' + self.args['grid'].upper()
396 else:
397 # first look, etc
398 imagename = imagename + '_' + self.channel_oneword().upper()
333 399
334 sparsename = imagename + ".sparseimage" 400 sparsename = imagename + ".sparseimage"
335 finalname = imagename + ".dmg" 401 finalname = imagename + ".dmg"
336 # make sure we don't have stale files laying about 402 # make sure we don't have stale files laying about
337 self.remove(sparsename, finalname) 403 self.remove(sparsename, finalname)
338 404
339 self.run_command('hdiutil create "%(sparse)s" -volname "Second Life" -fs HFS+ -type SPARSE -megabytes 300' % {'sparse':sparsename}) 405 self.run_command('hdiutil create "%(sparse)s" -volname "Second Life" -fs HFS+ -type SPARSE -megabytes 300' % {
406 'sparse':sparsename})
340 407
341 # mount the image and get the name of the mount point and device node 408 # mount the image and get the name of the mount point and device node
342 hdi_output = self.run_command('hdiutil attach -private "' + sparsename + '"') 409 hdi_output = self.run_command('hdiutil attach -private "' + sparsename + '"')
@@ -344,15 +411,17 @@ class DarwinManifest(ViewerManifest):
344 volpath = re.search('HFS\s+(.+)', hdi_output).group(1).strip() 411 volpath = re.search('HFS\s+(.+)', hdi_output).group(1).strip()
345 412
346 # Copy everything in to the mounted .dmg 413 # Copy everything in to the mounted .dmg
347 # TODO change name of .app once mac_updater can handle it. 414 if self.default_channel() and not self.default_grid():
348 for s,d in { 415 app_name = "Second Life " + self.args['grid']
349 self.get_dst_prefix():"Second Life.app", 416 else:
350 "lsl_guide.html":"Linden Scripting Language Guide.html", 417 app_name = channel_standin.strip()
351 "releasenotes.txt":"Release Notes.txt",
352 "installers/darwin/mac_image_hidden":".hidden",
353 "installers/darwin/mac_image_background.tga":"background.tga",
354 "installers/darwin/mac_image_DS_Store":".DS_Store"}.items():
355 418
419 for s,d in {self.get_dst_prefix():app_name + ".app",
420 "lsl_guide.html":"Linden Scripting Language Guide.html",
421 "releasenotes.txt":"Release Notes.txt",
422 "installers/darwin/mac_image_hidden":".hidden",
423 "installers/darwin/mac_image_background.tga":"background.tga",
424 "installers/darwin/mac_image_DS_Store":".DS_Store"}.items():
356 print "Copying to dmg", s, d 425 print "Copying to dmg", s, d
357 self.copy_action(self.src_path_of(s), os.path.join(volpath, d)) 426 self.copy_action(self.src_path_of(s), os.path.join(volpath, d))
358 427
@@ -390,8 +459,8 @@ class LinuxManifest(ViewerManifest):
390 if(self.args.has_key('installer_name')): 459 if(self.args.has_key('installer_name')):
391 installer_name = self.args['installer_name'] 460 installer_name = self.args['installer_name']
392 else: 461 else:
393 installer_name = '_'.join('SecondLife_', self.args.get('arch'), *self.args['version']) 462 installer_name = '_'.join(['SecondLife', self.args.get('arch'), '_'.join(self.args['version'])])
394 if grid != '': 463 if not self.default_grid():
395 installer_name += "_" + grid.upper() 464 installer_name += "_" + grid.upper()
396 465
397 # temporarily move directory tree so that it has the right name in the tarfile 466 # temporarily move directory tree so that it has the right name in the tarfile
@@ -433,8 +502,10 @@ class Linux_i686Manifest(LinuxManifest):
433# self.path("libstdc++.so.6") 502# self.path("libstdc++.so.6")
434 self.path("libuuid.so", "libuuid.so.1") 503 self.path("libuuid.so", "libuuid.so.1")
435 self.path("libSDL-1.2.so.0") 504 self.path("libSDL-1.2.so.0")
436 #self.path("libtcmalloc.so.0") 505 self.path("libELFIO.so")
437 #self.path("libstacktrace.so.0") 506 #self.path("libresolv.so") - don't bundle
507 #self.path("libtcmalloc.so.0") - bugged
508 #self.path("libstacktrace.so.0") - probably bugged
438# self.path("libllkdu.so", "../bin/libllkdu.so") # llkdu goes in bin for some reason 509# self.path("libllkdu.so", "../bin/libllkdu.so") # llkdu goes in bin for some reason
439 self.end_prefix("lib") 510 self.end_prefix("lib")
440 511