summaryrefslogtreecommitdiff
path: root/indra/newview/viewer_manifest.py
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/viewer_manifest.py')
-rwxr-xr-xindra/newview/viewer_manifest.py315
1 files changed, 193 insertions, 122 deletions
diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py
index cae6bded9f..f3d89bb866 100755
--- a/indra/newview/viewer_manifest.py
+++ b/indra/newview/viewer_manifest.py
@@ -28,7 +28,9 @@ $/LicenseInfo$
"""
import sys
import os.path
+import shutil
import errno
+import json
import re
import tarfile
import time
@@ -180,9 +182,16 @@ class ViewerManifest(LLManifest):
self.path("*.tga")
self.end_prefix("local_assets")
- # Files in the newview/ directory
+ # File in the newview/ directory
self.path("gpu_table.txt")
- # The summary.json file gets left in the build directory by newview/CMakeLists.txt.
+
+ #summary.json. Standard with exception handling is fine. If we can't open a new file for writing, we have worse problems
+ summary_dict = {"Type":"viewer","Version":'.'.join(self.args['version']),"Channel":self.channel_with_pkg_suffix()}
+ with open(os.path.join(os.pardir,'summary.json'), 'w') as summary_handle:
+ json.dump(summary_dict,summary_handle)
+
+ #we likely no longer need the test, since we will throw an exception above, but belt and suspenders and we get the
+ #return code for free.
if not self.path2basename(os.pardir, "summary.json"):
print "No summary.json file"
@@ -340,9 +349,9 @@ class Windows_i686_Manifest(ViewerManifest):
self.path(src='%s/secondlife-bin.exe' % self.args['configuration'], dst=self.final_exe())
# Plugin host application
- # The current slplugin package places slplugin.exe right into the
- # packages base directory.
- self.path2basename(pkgdir, "slplugin.exe")
+ self.path2basename(os.path.join(os.pardir,
+ 'llplugin', 'slplugin', self.args['configuration']),
+ "slplugin.exe")
self.path2basename("../viewer_components/updater/scripts/windows", "update_install.bat")
# Get shared libs from the shared libs staging directory
@@ -400,8 +409,6 @@ class Windows_i686_Manifest(ViewerManifest):
self.path("vivoxsdk.dll")
self.path("ortp.dll")
self.path("libsndfile-1.dll")
- self.path("zlib1.dll")
- self.path("vivoxplatform.dll")
self.path("vivoxoal.dll")
self.path("ca-bundle.crt")
@@ -428,54 +435,121 @@ class Windows_i686_Manifest(ViewerManifest):
self.path("featuretable_xp.txt")
# Media plugins - QuickTime
- # Media plugins - WebKit/Qt
- if self.prefix(src=os.path.join(pkgdir, "llplugin"), dst="llplugin"):
+ if self.prefix(src='../media_plugins/quicktime/%s' % self.args['configuration'], dst="llplugin"):
self.path("media_plugin_quicktime.dll")
- self.path("media_plugin_webkit.dll")
- self.path("qtcore4.dll")
- self.path("qtgui4.dll")
- self.path("qtnetwork4.dll")
- self.path("qtopengl4.dll")
- self.path("qtwebkit4.dll")
- self.path("qtxmlpatterns4.dll")
-
- # For WebKit/Qt plugin runtimes (image format plugins)
- if self.prefix(src="imageformats", dst="imageformats"):
- self.path("qgif4.dll")
- self.path("qico4.dll")
- self.path("qjpeg4.dll")
- self.path("qmng4.dll")
- self.path("qsvg4.dll")
- self.path("qtiff4.dll")
- self.end_prefix()
-
- # For WebKit/Qt plugin runtimes (codec/character encoding plugins)
- if self.prefix(src="codecs", dst="codecs"):
- self.path("qcncodecs4.dll")
- self.path("qjpcodecs4.dll")
- self.path("qkrcodecs4.dll")
- self.path("qtwcodecs4.dll")
- self.end_prefix()
+ self.end_prefix()
- self.end_prefix()
+ # Media plugins - CEF
+ if self.prefix(src='../media_plugins/cef/%s' % self.args['configuration'], dst="llplugin"):
+ self.path("media_plugin_cef.dll")
+ self.end_prefix()
# winmm.dll shim
if self.prefix(src='../media_plugins/winmmshim/%s' % self.args['configuration'], dst=""):
self.path("winmm.dll")
self.end_prefix()
+ # CEF runtime files - debug
if self.args['configuration'].lower() == 'debug':
- if self.prefix(src=debpkgdir, dst="llplugin"):
- self.path("libeay32.dll")
- self.path("ssleay32.dll")
+ if self.prefix(src=os.path.join(os.pardir, 'packages', 'bin', 'debug'), dst="llplugin"):
+ self.path("d3dcompiler_43.dll")
+ self.path("d3dcompiler_47.dll")
+ self.path("libcef.dll")
+ self.path("libEGL.dll")
+ self.path("libGLESv2.dll")
+ self.path("llceflib_host.exe")
+ self.path("natives_blob.bin")
+ self.path("snapshot_blob.bin")
+ self.path("widevinecdmadapter.dll")
+ self.path("wow_helper.exe")
self.end_prefix()
-
else:
- if self.prefix(src=relpkgdir, dst="llplugin"):
- self.path("libeay32.dll")
- self.path("ssleay32.dll")
+ # CEF runtime files - not debug (release, relwithdebinfo etc.)
+ if self.prefix(src=os.path.join(os.pardir, 'packages', 'bin', 'release'), dst="llplugin"):
+ self.path("d3dcompiler_43.dll")
+ self.path("d3dcompiler_47.dll")
+ self.path("libcef.dll")
+ self.path("libEGL.dll")
+ self.path("libGLESv2.dll")
+ self.path("llceflib_host.exe")
+ self.path("natives_blob.bin")
+ self.path("snapshot_blob.bin")
+ self.path("widevinecdmadapter.dll")
+ self.path("wow_helper.exe")
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"):
+ 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"):
+ 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')):
+ self.path("am.pak")
+ self.path("ar.pak")
+ self.path("bg.pak")
+ self.path("bn.pak")
+ self.path("ca.pak")
+ self.path("cs.pak")
+ self.path("da.pak")
+ self.path("de.pak")
+ self.path("el.pak")
+ self.path("en-GB.pak")
+ self.path("en-US.pak")
+ self.path("es-419.pak")
+ self.path("es.pak")
+ self.path("et.pak")
+ self.path("fa.pak")
+ self.path("fi.pak")
+ self.path("fil.pak")
+ self.path("fr.pak")
+ self.path("gu.pak")
+ self.path("he.pak")
+ self.path("hi.pak")
+ self.path("hr.pak")
+ self.path("hu.pak")
+ self.path("id.pak")
+ self.path("it.pak")
+ self.path("ja.pak")
+ self.path("kn.pak")
+ self.path("ko.pak")
+ self.path("lt.pak")
+ self.path("lv.pak")
+ self.path("ml.pak")
+ self.path("mr.pak")
+ self.path("ms.pak")
+ self.path("nb.pak")
+ self.path("nl.pak")
+ self.path("pl.pak")
+ self.path("pt-BR.pak")
+ self.path("pt-PT.pak")
+ self.path("ro.pak")
+ self.path("ru.pak")
+ self.path("sk.pak")
+ self.path("sl.pak")
+ self.path("sr.pak")
+ self.path("sv.pak")
+ self.path("sw.pak")
+ self.path("ta.pak")
+ self.path("te.pak")
+ self.path("th.pak")
+ self.path("tr.pak")
+ self.path("uk.pak")
+ self.path("vi.pak")
+ self.path("zh-CN.pak")
+ self.path("zh-TW.pak")
+ self.end_prefix()
+
# pull in the crash logger and updater from other projects
# tag:"crash-logger" here as a cue to the exporter
self.path(src='../win_crash_logger/%s/windows-crash-logger.exe' % self.args['configuration'],
@@ -739,14 +813,13 @@ class Darwin_i386_Manifest(ViewerManifest):
dylibs += path_optional(os.path.join(relpkgdir, libfile), libfile)
# our apps
- for app_bld_dir, app in ((os.path.join(os.pardir,
- "mac_crash_logger",
- self.args['configuration']),
- "mac-crash-logger.app"),
+ for app_bld_dir, app in (("mac_crash_logger", "mac-crash-logger.app"),
# plugin launcher
- (pkgdir, "SLPlugin.app"),
+ (os.path.join("llplugin", "slplugin"), "SLPlugin.app"),
):
- self.path2basename(app_bld_dir, app)
+ self.path2basename(os.path.join(os.pardir,
+ app_bld_dir, self.args['configuration']),
+ app)
# our apps dependencies on shared libs
# for each app, for each dylib we collected in dylibs,
@@ -759,44 +832,54 @@ class Darwin_i386_Manifest(ViewerManifest):
symlinkf(src, dst)
except OSError as err:
print "Can't symlink %s -> %s: %s" % (src, dst, err)
- # SLPlugin.app/Contents/Resources gets those Qt4 libraries it needs.
- if self.prefix(src="", dst="SLPlugin.app/Contents/Resources"):
- for libfile in ('libQtCore.4.dylib',
- 'libQtCore.4.7.1.dylib',
- 'libQtGui.4.dylib',
- 'libQtGui.4.7.1.dylib',
- 'libQtNetwork.4.dylib',
- 'libQtNetwork.4.7.1.dylib',
- 'libQtOpenGL.4.dylib',
- 'libQtOpenGL.4.7.1.dylib',
- 'libQtSvg.4.dylib',
- 'libQtSvg.4.7.1.dylib',
- 'libQtWebKit.4.dylib',
- 'libQtWebKit.4.7.1.dylib',
- 'libQtXml.4.dylib',
- 'libQtXml.4.7.1.dylib'):
- self.path2basename(relpkgdir, libfile)
- self.end_prefix("SLPlugin.app/Contents/Resources")
-
- # Qt4 codecs go to llplugin. Not certain why but this is the first
- # location probed according to dtruss so we'll go with that.
- if self.prefix(src=os.path.join(pkgdir, "llplugin/codecs/"), dst="llplugin/codecs"):
- self.path("libq*.dylib")
- self.end_prefix("llplugin/codecs")
-
- # Similarly for imageformats.
- if self.prefix(src=os.path.join(pkgdir, "llplugin/imageformats/"), dst="llplugin/imageformats"):
- self.path("libq*.dylib")
- self.end_prefix("llplugin/imageformats")
-
- # SLPlugin plugins proper
- if self.prefix(src=os.path.join(pkgdir, "llplugin"), dst="llplugin"):
- self.path("media_plugin_quicktime.dylib")
- self.path("media_plugin_webkit.dylib")
+
+ # LLCefLib helper apps go inside SLPlugin.app
+ if self.prefix(src="", dst="SLPlugin.app/Contents/Frameworks"):
+ for helperappfile in ('LLCefLib Helper.app',
+ 'LLCefLib Helper EH.app'):
+ self.path2basename(relpkgdir, helperappfile)
+
+ pluginframeworkpath = self.dst_path_of('Chromium Embedded Framework.framework');
+
+ self.end_prefix()
+
+ # SLPlugin plugins
+ if self.prefix(src="", dst="llplugin"):
+ self.path2basename("../media_plugins/quicktime/" + self.args['configuration'],
+ "media_plugin_quicktime.dylib")
+ self.path2basename("../media_plugins/cef/" + self.args['configuration'],
+ "media_plugin_cef.dylib")
self.end_prefix("llplugin")
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'ds 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)
+ # <top level>.app/Contents/Frameworks/Chromium Embedded Framework.framework/
+ # <top level>.app/Contents/Resources/SLPlugin.app/Contents/Frameworks/Chromium Embedded Framework.framework ->
+ frameworkpath = os.path.join(os.pardir, os.pardir, os.pardir, os.pardir, "Frameworks", "Chromium Embedded Framework.framework")
+ try:
+ symlinkf(frameworkpath, pluginframeworkpath)
+ except OSError as err:
+ print "Can't symlink %s -> %s: %s" % (frameworkpath, pluginframeworkpath, err)
+ raise
+
self.end_prefix("Contents")
# NOTE: the -S argument to strip causes it to keep enough info for
@@ -808,7 +891,6 @@ class Darwin_i386_Manifest(ViewerManifest):
self.run_command('strip -S %(viewer_binary)r' %
{ 'viewer_binary' : self.dst_path_of('Contents/MacOS/Second Life')})
-
def copy_finish(self):
# Force executable permissions to be set for scripts
# see CHOP-223 and http://mercurial.selenic.com/bts/issue1802
@@ -985,7 +1067,7 @@ class LinuxManifest(ViewerManifest):
if 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(pkgdir, "SLPlugin")
+ self.path2basename("../llplugin/slplugin", "SLPlugin")
self.path2basename("../viewer_components/updater/scripts/linux", "update_install")
self.end_prefix("bin")
@@ -1005,9 +1087,8 @@ class LinuxManifest(ViewerManifest):
self.end_prefix(icon_path)
# plugins
- if self.prefix(src=os.path.join(pkgdir, "llplugin"), dst="bin/llplugin"):
- self.path("libmedia_plugin_webkit.so")
- self.path("libmedia_plugin_gstreamer.so")
+ if self.prefix(src="", dst="bin/llplugin"):
+ self.path("../media_plugins/gstreamer010/libmedia_plugin_gstreamer010.so", "libmedia_plugin_gstreamer.so")
self.end_prefix("bin/llplugin")
# llcommon
@@ -1147,37 +1228,6 @@ class Linux_i686_Manifest(LinuxManifest):
self.path("libvivoxplatform.so")
self.end_prefix("lib")
- # plugin runtime
- if self.prefix(src=os.path.join(pkgdir, "lib"), dst="lib"):
- self.path("libQtCore.so*")
- self.path("libQtGui.so*")
- self.path("libQtNetwork.so*")
- self.path("libQtOpenGL.so*")
- self.path("libQtSvg.so*")
- self.path("libQtWebKit.so*")
- self.path("libQtXml.so*")
- self.end_prefix("lib")
-
- # For WebKit/Qt plugin runtimes (image format plugins)
- if self.prefix(src=os.path.join(pkgdir, "llplugin", "imageformats"),
- dst="bin/llplugin/imageformats"):
- self.path("libqgif.so")
- self.path("libqico.so")
- self.path("libqjpeg.so")
- self.path("libqmng.so")
- self.path("libqsvg.so")
- self.path("libqtiff.so")
- self.end_prefix("bin/llplugin/imageformats")
-
- # For WebKit/Qt plugin runtimes (codec/character encoding plugins)
- if self.prefix(src=os.path.join(pkgdir, "llplugin", "codecs"),
- dst="bin/llplugin/codecs"):
- self.path("libqcncodecs.so")
- self.path("libqjpcodecs.so")
- self.path("libqkrcodecs.so")
- self.path("libqtwcodecs.so")
- self.end_prefix("bin/llplugin/codecs")
-
self.strip_binaries()
@@ -1203,12 +1253,33 @@ def symlinkf(src, dst):
# file, but that strategy doesn't work so well if we don't have
# permissions to remove it. Check to see if it's already the
# symlink we want, which is the usual reason for EEXIST.
- if not (os.path.islink(dst) and os.readlink(dst) == src):
- # Here either dst isn't a symlink or it's the wrong symlink.
- # Remove and recreate. Caller will just have to deal with any
- # exceptions at this stage.
+ elif os.path.islink(dst):
+ if os.readlink(dst) == src:
+ # the requested link already exists
+ pass
+ else:
+ # dst is the wrong symlink; attempt to remove and recreate it
+ os.remove(dst)
+ os.symlink(src, dst)
+ elif os.path.isdir(dst):
+ print "Requested symlink (%s) exists but is a directory; replacing" % dst
+ shutil.rmtree(dst)
+ os.symlink(src, dst)
+ elif os.path.exists(dst):
+ print "Requested symlink (%s) exists but is a file; replacing" % dst
os.remove(dst)
os.symlink(src, dst)
+ else:
+ # see if the problem is that the parent directory does not exist
+ # and try to explain what is missing
+ (parent, tail) = os.path.split(dst)
+ while not os.path.exists(parent):
+ (parent, tail) = os.path.split(parent)
+ if tail:
+ raise Exception("Requested symlink (%s) cannot be created because %s does not exist"
+ % os.path.join(parent, tail))
+ else:
+ raise
if __name__ == "__main__":
main()