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.py254
1 files changed, 154 insertions, 100 deletions
diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py
index 37dee9ac1d..682dc253ee 100755
--- a/indra/newview/viewer_manifest.py
+++ b/indra/newview/viewer_manifest.py
@@ -59,12 +59,14 @@ class ViewerManifest(LLManifest):
# files during the build (see copy_w_viewer_manifest
# and copy_l_viewer_manifest targets)
return 'package' in self.args['actions']
-
+
def construct(self):
super(ViewerManifest, self).construct()
self.path(src="../../scripts/messages/message_template.msg", dst="app_settings/message_template.msg")
self.path(src="../../etc/message.xml", dst="app_settings/message.xml")
+ os.environ["XZ_DEFAULTS"] = "-T0"
+
if self.is_packaging_viewer():
with self.prefix(src_dst="app_settings"):
self.exclude("logcontrol.xml")
@@ -87,7 +89,7 @@ class ViewerManifest(LLManifest):
# ... and the entire image filters directory
self.path("filters")
-
+
# ... and the included spell checking dictionaries
pkgdir = os.path.join(self.args['build'], os.pardir, 'packages')
with self.prefix(src=pkgdir):
@@ -260,14 +262,14 @@ class ViewerManifest(LLManifest):
def app_name_oneword(self):
return ''.join(self.app_name().split())
-
+
def icon_path(self):
return "icons/" + self.channel_type()
def extract_names(self,src):
"""Extract contributor names from source file, returns string"""
try:
- with open(src, 'r') as contrib_file:
+ with open(src, 'r') as contrib_file:
lines = contrib_file.readlines()
except IOError:
print("Failed to open '%s'" % src)
@@ -491,7 +493,7 @@ class Windows_x86_64_Manifest(ViewerManifest):
raise Exception("Directories are not supported by test_CRT_and_copy_action()")
else:
print("Doesn't exist:", src)
-
+
def construct(self):
super().construct()
@@ -543,7 +545,7 @@ class Windows_x86_64_Manifest(ViewerManifest):
self.path2basename(os.path.join(os.pardir,
'llplugin', 'slplugin', self.args['configuration']),
"slplugin.exe")
-
+
# Get shared libs from the shared libs staging directory
with self.prefix(src=os.path.join(self.args['build'], os.pardir,
'sharedlibs', self.args['buildtype'])):
@@ -578,7 +580,7 @@ class Windows_x86_64_Manifest(ViewerManifest):
# Vivox libraries
self.path("vivoxsdk_x64.dll")
self.path("ortp_x64.dll")
-
+
# OpenSSL
self.path("libcrypto-1_1-x64.dll")
self.path("libssl-1_1-x64.dll")
@@ -705,7 +707,7 @@ class Windows_x86_64_Manifest(ViewerManifest):
self.path("plugins/")
if not self.is_packaging_viewer():
- self.package_file = "copied_deps"
+ self.package_file = "copied_deps"
def nsi_file_commands(self, install=True):
def INSTDIR(path):
@@ -764,7 +766,7 @@ class Windows_x86_64_Manifest(ViewerManifest):
installer_file = self.installer_base_name() + '_Setup.exe'
substitution_strings['installer_file'] = installer_file
-
+
version_vars = """
!define INSTEXE "SLVersionChecker.exe"
!define VERSION "%(version_short)s"
@@ -773,7 +775,7 @@ class Windows_x86_64_Manifest(ViewerManifest):
!define VERSION_REGISTRY "%(version_registry)s"
!define VIEWER_EXE "%(final_exe)s"
""" % substitution_strings
-
+
if self.channel_type() == 'release':
substitution_strings['caption'] = CHANNEL_VENDOR_BASE
else:
@@ -904,7 +906,7 @@ class Darwin_x86_64_Manifest(ViewerManifest):
# yields a slightly smaller binary but makes crash
# logs mostly useless. This may be desirable for the
# final release. Or not.
- if ("package" in self.args['actions'] or
+ if ("package" in self.args['actions'] or
"unpacked" in self.args['actions']):
self.run_command(
['strip', '-S', executable])
@@ -929,7 +931,7 @@ class Darwin_x86_64_Manifest(ViewerManifest):
with self.prefix(src=relpkgdir, dst=""):
self.path("libndofdev.dylib")
- self.path("libhunspell-*.dylib")
+ self.path("libhunspell-*.dylib")
with self.prefix(src_dst="cursors_mac"):
self.path("*.tif")
@@ -1198,6 +1200,9 @@ class LinuxManifest(ViewerManifest):
super(LinuxManifest, self).construct()
pkgdir = os.path.join(self.args['build'], os.pardir, 'packages')
+ if "package_dir" in self.args:
+ pkgdir = self.args['package_dir']
+
relpkgdir = os.path.join(pkgdir, "lib", "release")
debpkgdir = os.path.join(pkgdir, "lib", "debug")
@@ -1216,49 +1221,123 @@ class LinuxManifest(ViewerManifest):
with self.prefix(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.path("../linux_crash_logger/linux-crash-logger","linux-crash-logger.bin")
self.path2basename("../llplugin/slplugin", "SLPlugin")
#this copies over the python wrapper script, associated utilities and required libraries, see SL-321, SL-322 and SL-323
- with self.prefix(src="../viewer_components/manager", dst=""):
- self.path("*.py")
+ #with self.prefix(src="../viewer_components/manager", dst=""):
+ # self.path("*.py")
# recurses, packaged again
self.path("res-sdl")
+ # We copy ll_icon.BMP in CMakeLists.txt to newview/res-sdl and this will let the above self.path step take care of copying
+ # the correct branded icon
# Get the icons based on the channel type
icon_path = self.icon_path()
- print("DEBUG: icon_path '%s'" % icon_path)
+ #print("DEBUG: icon_path '%s'" % icon_path)
with self.prefix(src=icon_path) :
self.path("secondlife_256.png","secondlife_icon.png")
with self.prefix(dst="res-sdl") :
self.path("secondlife_256.BMP","ll_icon.BMP")
# plugins
- with self.prefix(src="../media_plugins", dst="bin/llplugin"):
- self.path("gstreamer010/libmedia_plugin_gstreamer010.so",
- "libmedia_plugin_gstreamer.so")
- self.path2basename("libvlc", "libmedia_plugin_libvlc.so")
-
- with self.prefix(src=os.path.join(pkgdir, 'lib', 'vlc', 'plugins'), dst="bin/llplugin/vlc/plugins"):
- self.path( "plugins.dat" )
- self.path( "*/*.so" )
-
- with self.prefix(src=os.path.join(pkgdir, 'lib' ), dst="lib"):
- self.path( "libvlc*.so*" )
-
- # llcommon
- if not self.path("../llcommon/libllcommon.so", "lib/libllcommon.so"):
- print("Skipping llcommon.so (assuming llcommon was linked statically)")
+ with self.prefix(src=os.path.join(self.args['build'], os.pardir, 'media_plugins'), dst="bin/llplugin"):
+ self.path("gstreamer10/libmedia_plugin_gstreamer10.so", "libmedia_plugin_gstreamer.so")
+
+
+ with self.prefix(src=os.path.join(self.args['build'], os.pardir, 'media_plugins'), dst="bin/llplugin"):
+ self.path("cef/libmedia_plugin_cef.so", "libmedia_plugin_cef.so" )
+ with self.prefix(src=os.path.join(pkgdir, 'lib', 'release'), dst="lib"):
+ self.path( "libcef.so" )
+
+ self.path( "libEGL*" )
+ self.path( "libvulkan*" )
+ self.path( "libvk_swiftshader*" )
+ self.path( "libGLESv2*" )
+ self.path( "vk_swiftshader_icd.json")
+
+ with self.prefix(src=os.path.join(pkgdir, 'bin', 'release'), dst="bin"):
+ self.path( "chrome-sandbox" )
+ self.path( "dullahan_host" )
+ self.path( "snapshot_blob.bin" )
+ self.path( "v8_context_snapshot.bin" )
+ with self.prefix(src=os.path.join(pkgdir, 'bin', 'release'), dst="lib"):
+ self.path( "snapshot_blob.bin" )
+ self.path( "v8_context_snapshot.bin" )
+
+ with self.prefix(src=os.path.join(pkgdir, 'resources'), dst="lib"):
+ self.path( "chrome_100_percent.pak" )
+ self.path( "chrome_200_percent.pak" )
+ self.path( "resources.pak" )
+ self.path( "icudtl.dat" )
+
+ with self.prefix(src=os.path.join(pkgdir, 'resources', 'locales'), dst=os.path.join('lib', '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.path("featuretable_linux.txt")
self.path("cube.dae")
- with self.prefix(src=pkgdir):
+ with self.prefix(src=pkgdir, dst="bin"):
self.path("ca-bundle.crt")
def package_finish(self):
installer_name = self.installer_base_name()
+ # When running as a GitHub Action job, RUNNER_TEMP is defined as the tmp dir
+ RUNNER_TEMP = os.getenv('RUNNER_TEMP')
+
self.strip_binaries()
# Fix access permissions
@@ -1273,93 +1352,79 @@ class LinuxManifest(ViewerManifest):
# temporarily move directory tree so that it has the right
# name in the tarfile
realname = self.get_dst_prefix()
- tempname = self.build_path_of(installer_name)
- self.run_command(["mv", realname, tempname])
+ versionedName = self.build_path_of(installer_name)
+
+ tarName = versionedName + ".tar.xz"
+
+ # If using a github runner we divert packaging a little. Considering this wil be a VM/docker image
+ # we can just pack the final installer into RUNNER_TEMP and not into the usual stop we'd pick when
+ # not building a GHA release
+ if RUNNER_TEMP:
+ tarName = os.path.join(RUNNER_TEMP, self.package_file)
+
+ self.run_command(["mv", realname, versionedName])
+
try:
# only create tarball if it's a release build.
if self.args['buildtype'].lower() == 'release':
- # --numeric-owner hides the username of the builder for
- # security etc.
self.run_command(['tar', '-C', self.get_build_prefix(),
'--numeric-owner', '-cJf',
- tempname + '.tar.xz', installer_name])
+ tarName, installer_name])
+ self.set_github_output_path('viewer_app', tarName)
else:
print("Skipping %s.tar.xz for non-Release build (%s)" % \
(installer_name, self.args['buildtype']))
finally:
- self.run_command(["mv", tempname, realname])
+ self.run_command(["mv", versionedName, realname])
def strip_binaries(self):
+ doStrip = False
if self.args['buildtype'].lower() == 'release' and self.is_packaging_viewer():
- print("* Going strip-crazy on the packaged binaries, since this is a RELEASE build")
+ doStrip = True
+ # In case of flatpak flatpak-build will call strip, disable doStrip here to get a flatpak symbol package. Increases flatpak size by about 1G
+ if "FLATPAK_DEST" in os.environ:
+ doStrip = True
+
+ if doStrip:
+ print("* Going strip-crazy on the packaged binaries, since this is a Release build")
# makes some small assumptions about our packaged dir structure
self.run_command(
["find"] +
[os.path.join(self.get_dst_prefix(), dir) for dir in ('bin', 'lib')] +
['-type', 'f', '!', '-name', '*.py',
+ '!', '-name', '*.pak',
+ '!', '-name', '*.bin',
+ '!', '-name', '*.dat',
+ '!', '-name', '*.crt',
+ '!', '-name', '*.dll',
+ '!', '-name', '*.lib',
'!', '-name', 'update_install', '-exec', 'strip', '-S', '{}', ';'])
-class Linux_i686_Manifest(LinuxManifest):
- address_size = 32
+class Linux_x86_64_Manifest(LinuxManifest):
+ address_size = 64
def construct(self):
- super(Linux_i686_Manifest, self).construct()
+ super(Linux_x86_64_Manifest, self).construct()
pkgdir = os.path.join(self.args['build'], os.pardir, 'packages')
+ if "package_dir" in self.args:
+ pkgdir = self.args['package_dir']
+
relpkgdir = os.path.join(pkgdir, "lib", "release")
debpkgdir = os.path.join(pkgdir, "lib", "debug")
with self.prefix(src=relpkgdir, dst="lib"):
- self.path("libapr-1.so")
- self.path("libapr-1.so.0")
- self.path("libapr-1.so.0.4.5")
- self.path("libaprutil-1.so")
- self.path("libaprutil-1.so.0")
- self.path("libaprutil-1.so.0.4.1")
- self.path("libdb*.so")
+ self.path("libapr-1.so*")
+ self.path("libaprutil-1.so*")
self.path("libexpat.so.*")
- self.path("libuuid.so*")
- self.path("libSDL-1.2.so.*")
- self.path("libdirectfb-1.*.so.*")
- self.path("libfusion-1.*.so.*")
- self.path("libdirect-1.*.so.*")
- self.path("libopenjp2.so*")
- self.path("libdirectfb-1.4.so.5")
- self.path("libfusion-1.4.so.5")
- self.path("libdirect-1.4.so.5*")
- self.path("libhunspell-1.3.so*")
- self.path("libalut.so*")
- self.path("libopenal.so*")
- self.path("libopenal.so", "libvivoxoal.so.1") # vivox's sdk expects this soname
- # KLUDGE: As of 2012-04-11, the 'fontconfig' package installs
- # libfontconfig.so.1.4.4, along with symlinks libfontconfig.so.1
- # and libfontconfig.so. Before we added support for library-file
- # wildcards, though, this self.path() call specifically named
- # libfontconfig.so.1.4.4 WITHOUT also copying the symlinks. When I
- # (nat) changed the call to self.path("libfontconfig.so.*"), we
- # ended up with the libfontconfig.so.1 symlink in the target
- # directory as well. But guess what! At least on Ubuntu 10.04,
- # certain viewer fonts look terrible with libfontconfig.so.1
- # present in the target directory. Removing that symlink suffices
- # to improve them. I suspect that means we actually do better when
- # the viewer fails to find our packaged libfontconfig.so*, falling
- # back on the system one instead -- but diagnosing and fixing that
- # is a bit out of scope for the present project. Meanwhile, this
- # particular wildcard specification gets us exactly what the
- # previous call did, without having to explicitly state the
- # version number.
- self.path("libfontconfig.so.*.*")
-
- # Include libfreetype.so. but have it work as libfontconfig does.
- self.path("libfreetype.so.*.*")
+ self.path_optional("libSDL*.so.*")
- try:
- self.path("libtcmalloc.so*") #formerly called google perf tools
- pass
- except:
- print("tcmalloc files not found, skipping")
- pass
+ self.path_optional("libjemalloc*.so")
+ self.path("libhunspell-1.3.so*")
+ self.path_optional("libalut.so*")
+ self.path_optional("libopenal.so*")
+ self.path_optional("libopenal.so", "libvivoxoal.so.1") # vivox's sdk expects this soname
if self.args['fmodstudio'] == 'ON':
try:
self.path("libfmod.so.11.7")
@@ -1380,17 +1445,6 @@ class Linux_i686_Manifest(LinuxManifest):
self.path("libvivoxsdk.so")
self.strip_binaries()
-
-
-class Linux_x86_64_Manifest(LinuxManifest):
- address_size = 64
-
- def construct(self):
- super(Linux_x86_64_Manifest, self).construct()
-
- # support file for valgrind debug tool
- self.path("secondlife-i686.supp")
-
################################################################
if __name__ == "__main__":