From b508488fc764d41c2120543006b6185ff2554bf9 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Wed, 4 Oct 2017 16:40:33 -0400 Subject: MAINT-7831: Update to viewer-manager build 509308 --- autobuild.xml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/autobuild.xml b/autobuild.xml index 10ddb390bb..7f79a413d1 100644 --- a/autobuild.xml +++ b/autobuild.xml @@ -3150,9 +3150,9 @@ archive hash - 0d65bb763808feffb6308914aa53272b + 3df4d3b7f023e392ccd14b11d99b873b url - http://automated-builds-secondlife-com.s3.amazonaws.com/ct2/8942/38652/viewer_manager-1.0.508931-darwin64-508931.tar.bz2 + http://automated-builds-secondlife-com.s3.amazonaws.com/ct2/9319/42106/viewer_manager-1.0.509308-darwin64-509308.tar.bz2 name darwin64 @@ -3174,9 +3174,9 @@ archive hash - c235c6ef33f52b0130808fe57710fe35 + af35bb309d923b2137f8cb451f851c5d url - http://automated-builds-secondlife-com.s3.amazonaws.com/ct2/8943/38658/viewer_manager-1.0.508931-windows-508931.tar.bz2 + http://automated-builds-secondlife-com.s3.amazonaws.com/ct2/9321/42112/viewer_manager-1.0.509308-windows-509308.tar.bz2 name windows @@ -3187,7 +3187,7 @@ source_type hg version - 1.0.508931 + 1.0.509308 vlc-bin -- cgit v1.2.3 From 922289264d27228beae5f85b0563974a137e6ace Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Fri, 6 Oct 2017 14:13:38 -0400 Subject: MAINT-7831: Include secondlife.ico file in the Windows installer. --- indra/newview/viewer_manifest.py | 1 + 1 file changed, 1 insertion(+) diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py index 900e9f7b1b..84e3f51d84 100755 --- a/indra/newview/viewer_manifest.py +++ b/indra/newview/viewer_manifest.py @@ -380,6 +380,7 @@ class WindowsManifest(ViewerManifest): if self.prefix("vmp_icons"): self.path("*.png") self.path("*.gif") + self.path("*.ico") self.end_prefix("vmp_icons") #before, we only needed llbase at build time. With VMP, we need it at run time. -- cgit v1.2.3 From d9d6df313cbced45c9fd57212e51ac417fc896d6 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Mon, 9 Oct 2017 16:28:35 -0400 Subject: MAINT-7831: Allow LLManifest.prefix() to be a context manager. LLManifest.prefix() dates back to before Python had a 'with' statement or the notion of a context manager. That's why every prefix() call requires a corresponding end_prefix() call. Existing usage is of the form: if self.prefix(...some args...): self.path(...) ... self.end_prefix() The use of an 'if' statement is solely to allow the coder to indent the statements between the self.prefix() call and the corresponding call to self.end_prefix() -- there is no intention to make that code conditional. self.prefix() unconditionally returned True to facilitate that usage. But now that we have the 'with' statement, this all feels a little silly. Make prefix() return an instance of a context-manager class so that it's reasonable to say instead: with self.prefix(...some args...): self.path(...) ... and have the Right Things happen simply by leaving the 'with' block. The only tricky part is code to preserve compatibility with old-style usage: * The context manager has a __nonzero__() method so that if it's tested in an 'if' statement, it can unconditionally return True. * On leaving the 'with' block, rather than simply popping the top of each prefix stack, the context manager restores its length to the same length it had before that prefix() call. This allows for (erroneous but hardly unlikely) usage of the form: with self.prefix(...some args...): self.path(...) ... self.end_prefix() Restoring the previous length makes the context manager insensitive to whether or not end_prefix() has popped the most recent prefix() entries. --- indra/lib/python/indra/util/llmanifest.py | 82 ++++++++++++++++++++++++++++--- 1 file changed, 75 insertions(+), 7 deletions(-) diff --git a/indra/lib/python/indra/util/llmanifest.py b/indra/lib/python/indra/util/llmanifest.py index d4e61aedd1..7050ce43b7 100755 --- a/indra/lib/python/indra/util/llmanifest.py +++ b/indra/lib/python/indra/util/llmanifest.py @@ -376,12 +376,30 @@ class LLManifest(object): self.excludes.append(glob) def prefix(self, src='', build=None, dst=None): - """ Pushes a prefix onto the stack. Until end_prefix is - called, all relevant method calls (esp. to path()) will prefix - paths with the entire prefix stack. Source and destination - prefixes can be different, though if only one is provided they - are both equal. To specify a no-op, use an empty string, not - None.""" + """ + Usage: + + with self.prefix(...args as described...): + self.path(...) + + For the duration of the 'with' block, pushes a prefix onto the stack. + Within that block, all relevant method calls (esp. to path()) will + prefix paths with the entire prefix stack. Source and destination + prefixes can be different, though if only one is provided they are + both equal. To specify a no-op, use an empty string, not None. + + Also supports the older (pre-Python-2.5) syntax: + + if self.prefix(...args as described...): + self.path(...) + self.end_prefix(...) + + Before the arrival of the 'with' statement, one was required to code + self.prefix() and self.end_prefix() in matching pairs to push and to + pop the prefix stacks, respectively. The older prefix() method + returned True specifically so that the caller could indent the + relevant block of code with 'if', just for aesthetic purposes. + """ if dst is None: dst = src if build is None: @@ -390,7 +408,57 @@ class LLManifest(object): self.artwork_prefix.append(src) self.build_prefix.append(build) self.dst_prefix.append(dst) - return True # so that you can wrap it in an if to get indentation + + # The above code is unchanged from the original implementation. What's + # new is the return value. We're going to return an instance of + # PrefixManager that binds this LLManifest instance and Does The Right + # Thing on exit. + return self.PrefixManager(self) + + class PrefixManager(object): + def __init__(self, manifest): + self.manifest = manifest + # stack attributes we manage in this LLManifest (sub)class + # instance + stacks = ("src_prefix", "artwork_prefix", "build_prefix", "dst_prefix") + # If the caller wrote: + # with self.prefix(...): + # as intended, then bind the state of each prefix stack as it was + # just BEFORE the call to prefix(). Since prefix() appended an + # entry to each prefix stack, capture len()-1. + self.prevlen = { stack: len(getattr(self.manifest, stack)) - 1 + for stack in stacks } + + def __nonzero__(self): + # If the caller wrote: + # if self.prefix(...): + # then a value of this class had better evaluate as 'True'. + return True + + def __enter__(self): + # nobody uses 'with self.prefix(...) as variable:' + return None + + def __exit__(self, type, value, traceback): + # First, if the 'with' block raised an exception, just propagate. + # Do NOT swallow it. + if type is not None: + return False + + # Okay, 'with' block completed successfully. Restore previous + # state of each of the prefix stacks in self.stacks. + # Note that we do NOT simply call pop() on them as end_prefix() + # does. This is to cope with the possibility that the coder + # changed 'if self.prefix(...):' to 'with self.prefix(...):' yet + # forgot to remove the self.end_prefix(...) call at the bottom of + # the block. In that case, calling pop() again would be Bad! But + # if we restore the length of each stack to what it was before the + # current prefix() block, it doesn't matter whether end_prefix() + # was called or not. + for stack, prevlen in self.prevlen.items(): + # find the attribute in 'self.manifest' named by 'stack', and + # truncate that list back to 'prevlen' + del getattr(self.manifest, stack)[prevlen:] def end_prefix(self, descr=None): """Pops a prefix off the stack. If given an argument, checks -- cgit v1.2.3 From be0e3cb2508e4de9ff85fc03fdb91dcb7b68a6a2 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Mon, 9 Oct 2017 16:35:53 -0400 Subject: MAINT-7831: Update viewer_manifest.py to use 'with self.prefix(...):' Now that LLManifest.prefix() supports use as a context manager: with self.prefix(...): ... convert existing calls to that form. This was an interesting exercise because it surfaced at least two places where the indentation did not match the self.prefix() nesting, plus another place where existing code was undented without a self.end_prefix() call. (That last was an uncaught logic bug.) This underscores the value of using a SINGLE consistent, idiomatic mechanism to limit the scope of each self.prefix() call. --- indra/newview/viewer_manifest.py | 283 ++++++++++++++++----------------------- 1 file changed, 117 insertions(+), 166 deletions(-) diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py index 900e9f7b1b..d021e5b9f3 100755 --- a/indra/newview/viewer_manifest.py +++ b/indra/newview/viewer_manifest.py @@ -61,7 +61,7 @@ class ViewerManifest(LLManifest): self.path(src="../../etc/message.xml", dst="app_settings/message.xml") if self.is_packaging_viewer(): - if self.prefix(src="app_settings"): + with self.prefix(src="app_settings"): self.exclude("logcontrol.xml") self.exclude("logcontrol-dev.xml") self.path("*.pem") @@ -84,9 +84,8 @@ class ViewerManifest(LLManifest): # ... and the included spell checking dictionaries pkgdir = os.path.join(self.args['build'], os.pardir, 'packages') - if self.prefix(src=pkgdir,dst=""): + with self.prefix(src=pkgdir,dst=""): self.path("dictionaries") - self.end_prefix(pkgdir) # include the extracted packages information (see BuildPackagesInfo.cmake) self.path(src=os.path.join(self.args['build'],"packages-info.txt"), dst="packages-info.txt") @@ -129,24 +128,21 @@ class ViewerManifest(LLManifest): "settings_install.xml", src="environment") - self.end_prefix("app_settings") - if self.prefix(src="character"): + with self.prefix(src="character"): self.path("*.llm") self.path("*.xml") self.path("*.tga") - self.end_prefix("character") # Include our fonts - if self.prefix(src="fonts"): + with self.prefix(src="fonts"): self.path("*.ttf") self.path("*.txt") - self.end_prefix("fonts") # skins - if self.prefix(src="skins"): + with self.prefix(src="skins"): # include the entire textures directory recursively - if self.prefix(src="*/textures"): + with self.prefix(src="*/textures"): self.path("*/*.tga") self.path("*/*.j2c") self.path("*/*.jpg") @@ -156,7 +152,6 @@ class ViewerManifest(LLManifest): self.path("*.jpg") self.path("*.png") self.path("textures.xml") - self.end_prefix("*/textures") self.path("*/xui/*/*.xml") self.path("*/xui/*/widgets/*.xml") self.path("*/*.xml") @@ -168,19 +163,16 @@ class ViewerManifest(LLManifest): # we're wrong, a user actually does have the relevant # files; s/he just needs to rename every html.old # directory back to html to recover them. - if self.prefix(src="*/html", dst="*/html.old"): + with self.prefix(src="*/html", dst="*/html.old"): self.path("*.png") self.path("*/*/*.html") self.path("*/*/*.gif") - self.end_prefix("*/html") - self.end_prefix("skins") # local_assets dir (for pre-cached textures) - if self.prefix(src="local_assets"): + with self.prefix(src="local_assets"): self.path("*.j2c") self.path("*.tga") - self.end_prefix("local_assets") # File in the newview/ directory self.path("gpu_table.txt") @@ -377,19 +369,17 @@ class WindowsManifest(ViewerManifest): self.path2basename(vmpdir,"InstallerUserMessage.py") #VMP Tkinter icons - if self.prefix("vmp_icons"): + with self.prefix("vmp_icons"): self.path("*.png") self.path("*.gif") - self.end_prefix("vmp_icons") #before, we only needed llbase at build time. With VMP, we need it at run time. llbase_path = os.path.join(self.get_dst_prefix(),'llbase') if not os.path.exists(llbase_path): os.makedirs(llbase_path) - if self.prefix(dst="llbase"): + with self.prefix(dst="llbase"): self.path2basename(llbasedir,"*.py") self.path2basename(llbasedir,"_cllsd.so") - self.end_prefix() # Plugin host application self.path2basename(os.path.join(os.pardir, @@ -397,7 +387,7 @@ class WindowsManifest(ViewerManifest): "slplugin.exe") # Get shared libs from the shared libs staging directory - if self.prefix(src=os.path.join(os.pardir, 'sharedlibs', self.args['configuration']), + with self.prefix(src=os.path.join(os.pardir, 'sharedlibs', self.args['configuration']), dst=""): # Get llcommon and deps. If missing assume static linkage and continue. @@ -466,31 +456,27 @@ class WindowsManifest(ViewerManifest): except: print "Skipping libtcmalloc_minimal.dll" - self.end_prefix() self.path(src="licenses-win32.txt", dst="licenses.txt") self.path("featuretable.txt") self.path("ca-bundle.crt") # Media plugins - CEF - if self.prefix(src='../media_plugins/cef/%s' % self.args['configuration'], dst="llplugin"): + with self.prefix(src='../media_plugins/cef/%s' % self.args['configuration'], dst="llplugin"): self.path("media_plugin_cef.dll") - self.end_prefix() # Media plugins - LibVLC - if self.prefix(src='../media_plugins/libvlc/%s' % self.args['configuration'], dst="llplugin"): + with self.prefix(src='../media_plugins/libvlc/%s' % self.args['configuration'], dst="llplugin"): self.path("media_plugin_libvlc.dll") - self.end_prefix() # Media plugins - Example (useful for debugging - not shipped with release viewer) if self.channel_type() != 'release': - if self.prefix(src='../media_plugins/example/%s' % self.args['configuration'], dst="llplugin"): + with self.prefix(src='../media_plugins/example/%s' % self.args['configuration'], dst="llplugin"): self.path("media_plugin_example.dll") - self.end_prefix() # CEF runtime files - debug if self.args['configuration'].lower() == 'debug': - if self.prefix(src=os.path.join(os.pardir, 'packages', 'bin', 'debug'), dst="llplugin"): + with self.prefix(src=os.path.join(os.pardir, 'packages', 'bin', 'debug'), dst="llplugin"): self.path("chrome_elf.dll") self.path("d3dcompiler_43.dll") self.path("d3dcompiler_47.dll") @@ -501,10 +487,9 @@ class WindowsManifest(ViewerManifest): self.path("natives_blob.bin") self.path("snapshot_blob.bin") self.path("widevinecdmadapter.dll") - self.end_prefix() else: # CEF runtime files - not debug (release, relwithdebinfo etc.) - if self.prefix(src=os.path.join(os.pardir, 'packages', 'bin', 'release'), dst="llplugin"): + with self.prefix(src=os.path.join(os.pardir, 'packages', 'bin', 'release'), dst="llplugin"): self.path("chrome_elf.dll") self.path("d3dcompiler_43.dll") self.path("d3dcompiler_47.dll") @@ -515,25 +500,22 @@ class WindowsManifest(ViewerManifest): self.path("natives_blob.bin") self.path("snapshot_blob.bin") self.path("widevinecdmadapter.dll") - self.end_prefix() # MSVC DLLs needed for CEF and have to be in same directory as plugin - if self.prefix(src=os.path.join(os.pardir, 'sharedlibs', 'Release'), dst="llplugin"): + with self.prefix(src=os.path.join(os.pardir, 'sharedlibs', 'Release'), dst="llplugin"): self.path("msvcp120.dll") self.path("msvcr120.dll") - self.end_prefix() # CEF files common to all configurations - if self.prefix(src=os.path.join(os.pardir, 'packages', 'resources'), dst="llplugin"): + with self.prefix(src=os.path.join(os.pardir, 'packages', 'resources'), dst="llplugin"): self.path("cef.pak") self.path("cef_100_percent.pak") self.path("cef_200_percent.pak") self.path("cef_extensions.pak") self.path("devtools_resources.pak") self.path("icudtl.dat") - self.end_prefix() - if self.prefix(src=os.path.join(os.pardir, 'packages', 'resources', 'locales'), dst=os.path.join('llplugin', 'locales')): + with self.prefix(src=os.path.join(os.pardir, 'packages', 'resources', 'locales'), dst=os.path.join('llplugin', 'locales')): self.path("am.pak") self.path("ar.pak") self.path("bg.pak") @@ -587,13 +569,11 @@ class WindowsManifest(ViewerManifest): self.path("vi.pak") self.path("zh-CN.pak") self.path("zh-TW.pak") - self.end_prefix() - if self.prefix(src=os.path.join(os.pardir, 'packages', 'bin', 'release'), dst="llplugin"): + with self.prefix(src=os.path.join(os.pardir, 'packages', 'bin', 'release'), dst="llplugin"): self.path("libvlc.dll") self.path("libvlccore.dll") self.path("plugins/") - self.end_prefix() # pull in the crash logger and updater from other projects # tag:"crash-logger" here as a cue to the exporter @@ -796,14 +776,14 @@ class DarwinManifest(ViewerManifest): chardetdir = os.path.join(pkgdir, "lib", "python", "chardet") idnadir = os.path.join(pkgdir, "lib", "python", "idna") - if self.prefix(src="", dst="Contents"): # everything goes in Contents + with self.prefix(src="", dst="Contents"): # everything goes in Contents self.path("Info.plist", dst="Info.plist") # copy additional libs in /Contents/MacOS/ self.path(os.path.join(relpkgdir, "libndofdev.dylib"), dst="Resources/libndofdev.dylib") self.path(os.path.join(relpkgdir, "libhunspell-1.3.0.dylib"), dst="Resources/libhunspell-1.3.0.dylib") - if self.prefix(dst="MacOS"): + with self.prefix(dst="MacOS"): #this copies over the python wrapper script, associated utilities and required libraries, see SL-321, SL-322, SL-323 self.path2basename(vmpdir,"SL_Launcher") self.path2basename(vmpdir,"*.py") @@ -811,52 +791,44 @@ class DarwinManifest(ViewerManifest): certifi_path = os.path.join(self.get_dst_prefix(),'certifi') if not os.path.exists(certifi_path): os.makedirs(certifi_path) - if self.prefix(dst="certifi"): + with self.prefix(dst="certifi"): self.path2basename(os.path.join(vmpdir,"certifi"),"*") - self.end_prefix() # llbase provides our llrest service layer and llsd decoding llbase_path = os.path.join(self.get_dst_prefix(),'llbase') if not os.path.exists(llbase_path): os.makedirs(llbase_path) - if self.prefix(dst="llbase"): + with self.prefix(dst="llbase"): self.path2basename(llbasedir,"*.py") self.path2basename(llbasedir,"_cllsd.so") - self.end_prefix() #requests module needed by llbase/llrest.py #this is only needed on POSIX, because in Windows we compile it into the EXE requests_path = os.path.join(self.get_dst_prefix(),'requests') if not os.path.exists(requests_path): os.makedirs(requests_path) - if self.prefix(dst="requests"): + with self.prefix(dst="requests"): self.path2basename(requestsdir,"*") - self.end_prefix() urllib3_path = os.path.join(self.get_dst_prefix(),'urllib3') if not os.path.exists(urllib3_path): os.makedirs(urllib3_path) - if self.prefix(dst="urllib3"): + with self.prefix(dst="urllib3"): self.path2basename(urllib3dir,"*") - self.end_prefix() chardet_path = os.path.join(self.get_dst_prefix(),'chardet') if not os.path.exists(chardet_path): os.makedirs(chardet_path) - if self.prefix(dst="chardet"): + with self.prefix(dst="chardet"): self.path2basename(chardetdir,"*") - self.end_prefix() idna_path = os.path.join(self.get_dst_prefix(),'idna') if not os.path.exists(idna_path): os.makedirs(idna_path) - if self.prefix(dst="idna"): + with self.prefix(dst="idna"): self.path2basename(idnadir,"*") - self.end_prefix() - self.end_prefix() # most everything goes in the Resources directory - if self.prefix(src="", dst="Resources"): + with self.prefix(src="", dst="Resources"): super(DarwinManifest, self).construct() - if self.prefix("cursors_mac"): + with self.prefix("cursors_mac"): self.path("*.tif") - self.end_prefix("cursors_mac") self.path("licenses-mac.txt", dst="licenses.txt") self.path("featuretable_mac.txt") @@ -864,15 +836,13 @@ class DarwinManifest(ViewerManifest): self.path("ca-bundle.crt") icon_path = self.icon_path() - if self.prefix(src=icon_path, dst="") : + with self.prefix(src=icon_path, dst="") : self.path("secondlife.icns") - self.end_prefix(icon_path) #VMP Tkinter icons - if self.prefix("vmp_icons"): + with self.prefix("vmp_icons"): self.path("*.png") self.path("*.gif") - self.end_prefix("vmp_icons") self.path("SecondLife.nib") @@ -978,7 +948,7 @@ class DarwinManifest(ViewerManifest): print "Can't symlink %s -> %s: %s" % (src, dst, err) # Dullahan helper apps go inside SLPlugin.app - if self.prefix(src="", dst="SLPlugin.app/Contents/Frameworks"): + with self.prefix(src="", dst="SLPlugin.app/Contents/Frameworks"): helperappfile = 'DullahanHelper.app' self.path2basename(relpkgdir, helperappfile) @@ -994,15 +964,14 @@ class DarwinManifest(ViewerManifest): self.dst_path_of('DullahanHelper.app/Contents/MacOS/' 'Frameworks/Chromium Embedded Framework.framework') - self.end_prefix() - helperexecutablepath = self.dst_path_of('SLPlugin.app/Contents/Frameworks/DullahanHelper.app/Contents/MacOS/DullahanHelper') - self.run_command('install_name_tool -change ' - '"@rpath/Frameworks/Chromium Embedded Framework.framework/Chromium Embedded Framework" ' - '"@executable_path/Frameworks/Chromium Embedded Framework.framework/Chromium Embedded Framework" "%s"' % helperexecutablepath) + helperexecutablepath = self.dst_path_of('SLPlugin.app/Contents/Frameworks/DullahanHelper.app/Contents/MacOS/DullahanHelper') + self.run_command('install_name_tool -change ' + '"@rpath/Frameworks/Chromium Embedded Framework.framework/Chromium Embedded Framework" ' + '"@executable_path/Frameworks/Chromium Embedded Framework.framework/Chromium Embedded Framework" "%s"' % helperexecutablepath) # SLPlugin plugins - if self.prefix(src="", dst="llplugin"): + with self.prefix(src="", dst="llplugin"): self.path2basename("../media_plugins/cef/" + self.args['configuration'], "media_plugin_cef.dylib") @@ -1011,74 +980,68 @@ class DarwinManifest(ViewerManifest): "media_plugin_libvlc.dylib") # copy LibVLC dynamic libraries - if self.prefix(src=os.path.join(os.pardir, 'packages', 'lib', 'release' ), dst="lib"): + with self.prefix(src=os.path.join(os.pardir, 'packages', 'lib', 'release' ), dst="lib"): self.path( "libvlc*.dylib*" ) - self.end_prefix() # copy LibVLC plugins folder - if self.prefix(src=os.path.join(os.pardir, 'packages', 'lib', 'release', 'plugins' ), dst="lib"): + with self.prefix(src=os.path.join(os.pardir, 'packages', 'lib', 'release', 'plugins' ), dst="lib"): self.path( "*.dylib" ) self.path( "plugins.dat" ) - self.end_prefix() - - self.end_prefix("llplugin") - - # do this install_name_tool *after* media plugin is copied over - dylibexecutablepath = self.dst_path_of('llplugin/media_plugin_cef.dylib') - self.run_command('install_name_tool -change ' - '"@rpath/Frameworks/Chromium Embedded Framework.framework/Chromium Embedded Framework" ' - '"@executable_path/../Frameworks/Chromium Embedded Framework.framework/Chromium Embedded Framework" "%s"' % dylibexecutablepath) - - self.end_prefix("Resources") - - # CEF framework goes inside Second Life.app/Contents/Frameworks - if self.prefix(src="", dst="Frameworks"): - frameworkfile="Chromium Embedded Framework.framework" - self.path2basename(relpkgdir, frameworkfile) - self.end_prefix("Frameworks") - - # This code constructs a relative path from the - # target framework folder back to the location of the symlink. - # It needs to be relative so that the symlink still works when - # (as is normal) the user moves the app bundle out of the DMG - # and into the /Applications folder. Note we also call 'raise' - # to terminate the process if we get an error since without - # this symlink, Second Life web media can't possibly work. - # Real Framework folder: - # Second Life.app/Contents/Frameworks/Chromium Embedded Framework.framework/ - # Location of symlink and why it's relative - # Second Life.app/Contents/Resources/SLPlugin.app/Contents/Frameworks/Chromium Embedded Framework.framework/ - # Real Frameworks folder, with the symlink inside the bundled SLPlugin.app (and why it's relative) - # .app/Contents/Frameworks/Chromium Embedded Framework.framework/ - # .app/Contents/Resources/SLPlugin.app/Contents/Frameworks/Chromium Embedded Framework.framework -> - # It might seem simpler just to create a symlink Frameworks to - # the parent of Chromimum Embedded Framework.framework. But - # that would create a symlink cycle, which breaks our - # packaging step. So make a symlink from Chromium Embedded - # Framework.framework to the directory of the same name, which - # is NOT an ancestor of the symlink. - frameworkpath = os.path.join(os.pardir, os.pardir, os.pardir, - os.pardir, "Frameworks", - "Chromium Embedded Framework.framework") - try: - # from SLPlugin.app/Contents/Frameworks/Chromium Embedded - # Framework.framework back to Second - # Life.app/Contents/Frameworks/Chromium Embedded Framework.framework - origin, target = pluginframeworkpath, frameworkpath - symlinkf(target, origin) - # from SLPlugin.app/Contents/Frameworks/Dullahan - # Helper.app/Contents/MacOS/Frameworks/Chromium Embedded - # Framework.framework back to - # SLPlugin.app/Contents/Frameworks/Chromium Embedded Framework.framework - self.cmakedirs(os.path.dirname(helperframeworkpath)) - origin = helperframeworkpath - target = os.path.join(os.pardir, frameworkpath) - symlinkf(target, origin) - except OSError as err: - print "Can't symlink %s -> %s: %s" % (origin, target, err) - raise - - self.end_prefix("Contents") + + + # do this install_name_tool *after* media plugin is copied over + dylibexecutablepath = self.dst_path_of('llplugin/media_plugin_cef.dylib') + self.run_command('install_name_tool -change ' + '"@rpath/Frameworks/Chromium Embedded Framework.framework/Chromium Embedded Framework" ' + '"@executable_path/../Frameworks/Chromium Embedded Framework.framework/Chromium Embedded Framework" "%s"' % dylibexecutablepath) + + + # CEF framework goes inside Second Life.app/Contents/Frameworks + with self.prefix(src="", dst="Frameworks"): + frameworkfile="Chromium Embedded Framework.framework" + self.path2basename(relpkgdir, frameworkfile) + + # This code constructs a relative path from the + # target framework folder back to the location of the symlink. + # It needs to be relative so that the symlink still works when + # (as is normal) the user moves the app bundle out of the DMG + # and into the /Applications folder. Note we also call 'raise' + # to terminate the process if we get an error since without + # this symlink, Second Life web media can't possibly work. + # Real Framework folder: + # Second Life.app/Contents/Frameworks/Chromium Embedded Framework.framework/ + # Location of symlink and why it's relative + # Second Life.app/Contents/Resources/SLPlugin.app/Contents/Frameworks/Chromium Embedded Framework.framework/ + # Real Frameworks folder, with the symlink inside the bundled SLPlugin.app (and why it's relative) + # .app/Contents/Frameworks/Chromium Embedded Framework.framework/ + # .app/Contents/Resources/SLPlugin.app/Contents/Frameworks/Chromium Embedded Framework.framework -> + # It might seem simpler just to create a symlink Frameworks to + # the parent of Chromimum Embedded Framework.framework. But + # that would create a symlink cycle, which breaks our + # packaging step. So make a symlink from Chromium Embedded + # Framework.framework to the directory of the same name, which + # is NOT an ancestor of the symlink. + frameworkpath = os.path.join(os.pardir, os.pardir, os.pardir, + os.pardir, "Frameworks", + "Chromium Embedded Framework.framework") + try: + # from SLPlugin.app/Contents/Frameworks/Chromium Embedded + # Framework.framework back to Second + # Life.app/Contents/Frameworks/Chromium Embedded Framework.framework + origin, target = pluginframeworkpath, frameworkpath + symlinkf(target, origin) + # from SLPlugin.app/Contents/Frameworks/Dullahan + # Helper.app/Contents/MacOS/Frameworks/Chromium Embedded + # Framework.framework back to + # SLPlugin.app/Contents/Frameworks/Chromium Embedded Framework.framework + self.cmakedirs(os.path.dirname(helperframeworkpath)) + origin = helperframeworkpath + target = os.path.join(os.pardir, frameworkpath) + symlinkf(target, origin) + except OSError as err: + print "Can't symlink %s -> %s: %s" % (origin, target, err) + raise + # NOTE: the -S argument to strip causes it to keep enough info for # annotated backtraces (i.e. function names in the crash log). 'strip' with no @@ -1275,21 +1238,19 @@ class LinuxManifest(ViewerManifest): debpkgdir = os.path.join(pkgdir, "lib", "debug") self.path("licenses-linux.txt","licenses.txt") - if self.prefix("linux_tools", dst=""): + with self.prefix("linux_tools", dst=""): self.path("client-readme.txt","README-linux.txt") self.path("client-readme-voice.txt","README-linux-voice.txt") self.path("client-readme-joystick.txt","README-linux-joystick.txt") self.path("wrapper.sh","secondlife") - if self.prefix(src="", dst="etc"): + with self.prefix(src="", dst="etc"): self.path("handle_secondlifeprotocol.sh") self.path("register_secondlifeprotocol.sh") self.path("refresh_desktop_app_entry.sh") self.path("launch_url.sh") - self.end_prefix("etc") self.path("install.sh") - self.end_prefix("linux_tools") - if self.prefix(src="", dst="bin"): + with self.prefix(src="", dst="bin"): self.path("secondlife-bin","do-not-directly-run-secondlife-bin") self.path("../linux_crash_logger/linux-crash-logger","linux-crash-logger.bin") self.path2basename("../llplugin/slplugin", "SLPlugin") @@ -1299,40 +1260,33 @@ class LinuxManifest(ViewerManifest): llbase_path = os.path.join(self.get_dst_prefix(),'llbase') if not os.path.exists(llbase_path): os.makedirs(llbase_path) - if self.prefix(dst="llbase"): + with self.prefix(dst="llbase"): self.path2basename("../packages/lib/python/llbase","*.py") self.path2basename("../packages/lib/python/llbase","_cllsd.so") - self.end_prefix("bin") - if self.prefix("res-sdl"): + with self.prefix("res-sdl"): self.path("*") # recurse - self.end_prefix("res-sdl") # Get the icons based on the channel type icon_path = self.icon_path() print "DEBUG: icon_path '%s'" % icon_path - if self.prefix(src=icon_path, dst="") : + with self.prefix(src=icon_path, dst="") : self.path("secondlife_256.png","secondlife_icon.png") - if self.prefix(src="",dst="res-sdl") : + with self.prefix(src="",dst="res-sdl") : self.path("secondlife_256.BMP","ll_icon.BMP") - self.end_prefix("res-sdl") - self.end_prefix(icon_path) # plugins - if self.prefix(src="", dst="bin/llplugin"): + with self.prefix(src="", dst="bin/llplugin"): self.path("../media_plugins/gstreamer010/libmedia_plugin_gstreamer010.so", "libmedia_plugin_gstreamer.so") self.path("../media_plugins/libvlc/libmedia_plugin_libvlc.so", "libmedia_plugin_libvlc.so") - self.end_prefix("bin/llplugin") - if self.prefix(src=os.path.join(os.pardir, 'packages', 'lib', 'vlc', 'plugins'), dst="bin/llplugin/vlc/plugins"): + with self.prefix(src=os.path.join(os.pardir, 'packages', 'lib', 'vlc', 'plugins'), dst="bin/llplugin/vlc/plugins"): self.path( "plugins.dat" ) self.path( "*/*.so" ) - self.end_prefix() - if self.prefix(src=os.path.join(os.pardir, 'packages', 'lib' ), dst="lib"): + with self.prefix(src=os.path.join(os.pardir, 'packages', 'lib' ), dst="lib"): self.path( "libvlc*.so*" ) - self.end_prefix() # llcommon if not self.path("../llcommon/libllcommon.so", "lib/libllcommon.so"): @@ -1395,7 +1349,7 @@ class Linux_i686_Manifest(LinuxManifest): relpkgdir = os.path.join(pkgdir, "lib", "release") debpkgdir = os.path.join(pkgdir, "lib", "debug") - if self.prefix(relpkgdir, dst="lib"): + with self.prefix(relpkgdir, dst="lib"): self.path("libapr-1.so") self.path("libapr-1.so.0") self.path("libapr-1.so.0.4.5") @@ -1455,21 +1409,18 @@ class Linux_i686_Manifest(LinuxManifest): print "Skipping libfmodex.so - not found" pass - self.end_prefix("lib") - # Vivox runtimes - if self.prefix(src=relpkgdir, dst="bin"): - self.path("SLVoice") - self.end_prefix() - if self.prefix(src=relpkgdir, dst="lib"): - self.path("libortp.so") - self.path("libsndfile.so.1") - #self.path("libvivoxoal.so.1") # no - we'll re-use the viewer's own OpenAL lib - self.path("libvivoxsdk.so") - self.path("libvivoxplatform.so") - self.end_prefix("lib") - - self.strip_binaries() + # Vivox runtimes + with self.prefix(src=relpkgdir, dst="bin"): + self.path("SLVoice") + with self.prefix(src=relpkgdir, dst="lib"): + self.path("libortp.so") + self.path("libsndfile.so.1") + #self.path("libvivoxoal.so.1") # no - we'll re-use the viewer's own OpenAL lib + self.path("libvivoxsdk.so") + self.path("libvivoxplatform.so") + + self.strip_binaries() class Linux_x86_64_Manifest(LinuxManifest): -- cgit v1.2.3 From 9e95301be5e0466f4dbfec40abffadeb9f14e9fc Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Mon, 9 Oct 2017 16:46:22 -0400 Subject: MAINT-7809: Add secondlife.ico to viewer's vmp_icons install dir. --- indra/newview/viewer_manifest.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py index d021e5b9f3..0e6c98f230 100755 --- a/indra/newview/viewer_manifest.py +++ b/indra/newview/viewer_manifest.py @@ -368,6 +368,9 @@ class WindowsManifest(ViewerManifest): #IUM is not normally executed directly, just imported. No exe needed. self.path2basename(vmpdir,"InstallerUserMessage.py") + with self.prefix(src=self.icon_path(), dst="vmp_icons"): + self.path("secondlife.ico") + #VMP Tkinter icons with self.prefix("vmp_icons"): self.path("*.png") @@ -839,6 +842,9 @@ class DarwinManifest(ViewerManifest): with self.prefix(src=icon_path, dst="") : self.path("secondlife.icns") + with self.prefix(src=icon_path, dst="vmp_icons"): + self.path("secondlife.ico") + #VMP Tkinter icons with self.prefix("vmp_icons"): self.path("*.png") -- cgit v1.2.3 From 763a04ced29916a5b167e41eae2b5ebf25faae1b Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Mon, 9 Oct 2017 16:47:35 -0400 Subject: MAINT-7831: Update viewer-manager to build 509481. --- autobuild.xml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/autobuild.xml b/autobuild.xml index 7f79a413d1..37f3775f71 100644 --- a/autobuild.xml +++ b/autobuild.xml @@ -3150,9 +3150,9 @@ archive hash - 3df4d3b7f023e392ccd14b11d99b873b + edac0b8f318e3df3a7cbe10b9d5778cd url - http://automated-builds-secondlife-com.s3.amazonaws.com/ct2/9319/42106/viewer_manager-1.0.509308-darwin64-509308.tar.bz2 + http://automated-builds-secondlife-com.s3.amazonaws.com/ct2/9492/44035/viewer_manager-1.0.509481-darwin64-509481.tar.bz2 name darwin64 @@ -3174,9 +3174,9 @@ archive hash - af35bb309d923b2137f8cb451f851c5d + 3d47c183e364f34c1d962aa7e0fd6130 url - http://automated-builds-secondlife-com.s3.amazonaws.com/ct2/9321/42112/viewer_manager-1.0.509308-windows-509308.tar.bz2 + http://automated-builds-secondlife-com.s3.amazonaws.com/ct2/9493/44041/viewer_manager-1.0.509481-windows-509481.tar.bz2 name windows @@ -3187,7 +3187,7 @@ source_type hg version - 1.0.509308 + 1.0.509481 vlc-bin -- cgit v1.2.3