summaryrefslogtreecommitdiff
path: root/indra/newview/viewer_manifest.py
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/viewer_manifest.py')
-rwxr-xr-x[-rw-r--r--]indra/newview/viewer_manifest.py288
1 files changed, 124 insertions, 164 deletions
diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py
index 0eda4007e3..18ac10fe38 100644..100755
--- a/indra/newview/viewer_manifest.py
+++ b/indra/newview/viewer_manifest.py
@@ -4,31 +4,36 @@
# @brief Description of all installer viewer files, and methods for packaging
# them into installers for all supported platforms.
#
-# $LicenseInfo:firstyear=2006&license=viewerlgpl$
-# Second Life Viewer Source Code
-# Copyright (C) 2010, Linden Research, Inc.
+# $LicenseInfo:firstyear=2006&license=viewergpl$
+#
+# Copyright (c) 2006-2009, Linden Research, Inc.
#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation;
-# version 2.1 of the License only.
+# Second Life Viewer Source Code
+# The source code in this file ("Source Code") is provided by Linden Lab
+# to you under the terms of the GNU General Public License, version 2.0
+# ("GPL"), unless you have obtained a separate licensing agreement
+# ("Other License"), formally executed by you and Linden Lab. Terms of
+# the GPL can be found in doc/GPL-license.txt in this distribution, or
+# online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
+# There are special exceptions to the terms and conditions of the GPL as
+# it is applied to this Source Code. View the full text of the exception
+# in the file doc/FLOSS-exception.txt in this software distribution, or
+# online at
+# http://secondlifegrid.net/programs/open_source/licensing/flossexception
#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+# By copying, modifying or distributing this software, you acknowledge
+# that you have read and understood your obligations described above,
+# and agree to abide by those obligations.
#
-# Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+# ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
+# WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
+# COMPLETENESS OR PERFORMANCE.
# $/LicenseInfo$
import sys
import os.path
import re
import tarfile
-import time
viewer_dir = os.path.dirname(__file__)
# add llmanifest library to our path so we don't have to muck with PYTHONPATH
sys.path.append(os.path.join(viewer_dir, '../lib/python/indra/util'))
@@ -36,12 +41,9 @@ from llmanifest import LLManifest, main, proper_windows_path, path_ancestors
class ViewerManifest(LLManifest):
def is_packaging_viewer(self):
- # Some commands, files will only be included
- # if we are packaging the viewer on windows.
- # This manifest is also used to copy
- # files during the build (see copy_w_viewer_manifest
- # and copy_l_viewer_manifest targets)
- return 'package' in self.args['actions']
+ # This is overridden by the WindowsManifest sub-class,
+ # which has different behavior if it is not packaging the viewer.
+ return True
def construct(self):
super(ViewerManifest, self).construct()
@@ -103,12 +105,6 @@ class ViewerManifest(LLManifest):
self.end_prefix("*/html")
self.end_prefix("skins")
- # local_assets dir (for pre-cached textures)
- if self.prefix(src="local_assets"):
- self.path("*.j2c")
- self.path("*.tga")
- self.end_prefix("local_assets")
-
# Files in the newview/ directory
self.path("gpu_table.txt")
@@ -173,6 +169,13 @@ class WindowsManifest(ViewerManifest):
else:
return ''.join(self.channel().split()) + '.exe'
+ def is_packaging_viewer(self):
+ # Some commands, files will only be included
+ # if we are packaging the viewer on windows.
+ # This manifest is also used to copy
+ # files during the build.
+ return 'package' in self.args['actions']
+
def test_msvcrt_and_copy_action(self, src, dst):
# This is used to test a dll manifest.
# It is used as a temporary override during the construct method
@@ -251,16 +254,14 @@ class WindowsManifest(ViewerManifest):
if self.prefix(src=os.path.join(os.pardir, 'sharedlibs', self.args['configuration']),
dst=""):
- self.enable_no_crt_manifest_check()
-
+ self.enable_crt_manifest_check()
+
# Get kdu dll, continue if missing.
try:
self.path('llkdu.dll', dst='llkdu.dll')
except RuntimeError:
print "Skipping llkdu.dll"
- self.enable_crt_manifest_check()
-
# Get llcommon and deps. If missing assume static linkage and continue.
try:
self.path('llcommon.dll')
@@ -316,11 +317,8 @@ class WindowsManifest(ViewerManifest):
# For use in crash reporting (generates minidumps)
self.path("dbghelp.dll")
- try:
- # FMOD for sound
- self.path("fmod.dll")
- except:
- print "Skipping FMOD - not found"
+ # For using FMOD for sound... DJS
+ self.path("fmod.dll")
self.enable_no_crt_manifest_check()
@@ -334,12 +332,6 @@ class WindowsManifest(ViewerManifest):
self.path("media_plugin_webkit.dll")
self.end_prefix()
- # winmm.dll shim
- if self.prefix(src='../media_plugins/winmmshim/%s' % self.args['configuration'], dst="llplugin"):
- self.path("winmm.dll")
- self.end_prefix()
-
-
if self.args['configuration'].lower() == 'debug':
if self.prefix(src=os.path.join(os.pardir, os.pardir, 'libraries', 'i686-win32', 'lib', 'debug'),
dst="llplugin"):
@@ -559,10 +551,6 @@ class WindowsManifest(ViewerManifest):
class DarwinManifest(ViewerManifest):
- def is_packaging_viewer(self):
- # darwin requires full app bundle packaging even for debugging.
- return True
-
def construct(self):
# copy over the build result (this is a no-op if run within the xcode script)
self.path(self.args['configuration'] + "/Second Life.app", dst="")
@@ -641,35 +629,24 @@ class DarwinManifest(ViewerManifest):
if dylibs["llcommon"]:
for libfile in ("libapr-1.0.3.7.dylib",
"libaprutil-1.0.3.8.dylib",
- "libexpat.0.5.0.dylib",
- "libexception_handler.dylib",
- ):
+ "libexpat.0.5.0.dylib"):
self.path(os.path.join(libdir, libfile), libfile)
- try:
- # FMOD for sound
- self.path(self.args['configuration'] + "/libfmodwrapper.dylib", "libfmodwrapper.dylib")
- except:
- print "Skipping FMOD - not found"
+ #libfmodwrapper.dylib
+ self.path(self.args['configuration'] + "/libfmodwrapper.dylib", "libfmodwrapper.dylib")
# our apps
self.path("../mac_crash_logger/" + self.args['configuration'] + "/mac-crash-logger.app", "mac-crash-logger.app")
self.path("../mac_updater/" + self.args['configuration'] + "/mac-updater.app", "mac-updater.app")
- # plugin launcher
- self.path("../llplugin/slplugin/" + self.args['configuration'] + "/SLPlugin.app", "SLPlugin.app")
-
# our apps dependencies on shared libs
if dylibs["llcommon"]:
mac_crash_logger_res_path = self.dst_path_of("mac-crash-logger.app/Contents/Resources")
mac_updater_res_path = self.dst_path_of("mac-updater.app/Contents/Resources")
- slplugin_res_path = self.dst_path_of("SLPlugin.app/Contents/Resources")
for libfile in ("libllcommon.dylib",
"libapr-1.0.3.7.dylib",
"libaprutil-1.0.3.8.dylib",
- "libexpat.0.5.0.dylib",
- "libexception_handler.dylib",
- ):
+ "libexpat.0.5.0.dylib"):
target_lib = os.path.join('../../..', libfile)
self.run_command("ln -sf %(target)r %(link)r" %
{'target': target_lib,
@@ -679,10 +656,9 @@ class DarwinManifest(ViewerManifest):
{'target': target_lib,
'link' : os.path.join(mac_updater_res_path, libfile)}
)
- self.run_command("ln -sf %(target)r %(link)r" %
- {'target': target_lib,
- 'link' : os.path.join(slplugin_res_path, libfile)}
- )
+
+ # plugin launcher
+ self.path("../llplugin/slplugin/" + self.args['configuration'] + "/SLPlugin", "SLPlugin")
# plugins
if self.prefix(src="", dst="llplugin"):
@@ -740,72 +716,55 @@ class DarwinManifest(ViewerManifest):
# mount the image and get the name of the mount point and device node
hdi_output = self.run_command('hdiutil attach -private %r' % sparsename)
- try:
- devfile = re.search("/dev/disk([0-9]+)[^s]", hdi_output).group(0).strip()
- volpath = re.search('HFS\s+(.+)', hdi_output).group(1).strip()
+ devfile = re.search("/dev/disk([0-9]+)[^s]", hdi_output).group(0).strip()
+ volpath = re.search('HFS\s+(.+)', hdi_output).group(1).strip()
- # Copy everything in to the mounted .dmg
+ # Copy everything in to the mounted .dmg
- if self.default_channel() and not self.default_grid():
- app_name = "Second Life " + self.args['grid']
- else:
- app_name = channel_standin.strip()
-
- # Hack:
- # Because there is no easy way to coerce the Finder into positioning
- # the app bundle in the same place with different app names, we are
- # adding multiple .DS_Store files to svn. There is one for release,
- # one for release candidate and one for first look. Any other channels
- # will use the release .DS_Store, and will look broken.
- # - Ambroff 2008-08-20
- dmg_template = os.path.join(
- 'installers',
- 'darwin',
- '%s-dmg' % "".join(self.channel_unique().split()).lower())
-
- if not os.path.exists (self.src_path_of(dmg_template)):
- dmg_template = os.path.join ('installers', 'darwin', 'release-dmg')
-
- for s,d in {self.get_dst_prefix():app_name + ".app",
- os.path.join(dmg_template, "_VolumeIcon.icns"): ".VolumeIcon.icns",
- os.path.join(dmg_template, "background.jpg"): "background.jpg",
- os.path.join(dmg_template, "_DS_Store"): ".DS_Store"}.items():
- print "Copying to dmg", s, d
- self.copy_action(self.src_path_of(s), os.path.join(volpath, d))
-
- # Hide the background image, DS_Store file, and volume icon file (set their "visible" bit)
- for f in ".VolumeIcon.icns", "background.jpg", ".DS_Store":
- pathname = os.path.join(volpath, f)
- # We've observed mysterious "no such file" failures of the SetFile
- # command, especially on the first file listed above -- yet
- # subsequent inspection of the target directory confirms it's
- # there. Timing problem with copy command? Try to handle.
- for x in xrange(3):
- if os.path.exists(pathname):
- print "Confirmed existence: %r" % pathname
- break
- print "Waiting for %s copy command to complete (%s)..." % (f, x+1)
- sys.stdout.flush()
- time.sleep(1)
- # If we fall out of the loop above without a successful break, oh
- # well, possibly we've mistaken the nature of the problem. In any
- # case, don't hang up the whole build looping indefinitely, let
- # the original problem manifest by executing the desired command.
- self.run_command('SetFile -a V %r' % pathname)
-
- # Create the alias file (which is a resource file) from the .r
- self.run_command('rez %r -o %r' %
- (self.src_path_of("installers/darwin/release-dmg/Applications-alias.r"),
- os.path.join(volpath, "Applications")))
-
- # Set the alias file's alias and custom icon bits
- self.run_command('SetFile -a AC %r' % os.path.join(volpath, "Applications"))
-
- # Set the disk image root's custom icon bit
- self.run_command('SetFile -a C %r' % volpath)
- finally:
- # Unmount the image even if exceptions from any of the above
- self.run_command('hdiutil detach -force %r' % devfile)
+ if self.default_channel() and not self.default_grid():
+ app_name = "Second Life " + self.args['grid']
+ else:
+ app_name = channel_standin.strip()
+
+ # Hack:
+ # Because there is no easy way to coerce the Finder into positioning
+ # the app bundle in the same place with different app names, we are
+ # adding multiple .DS_Store files to svn. There is one for release,
+ # one for release candidate and one for first look. Any other channels
+ # will use the release .DS_Store, and will look broken.
+ # - Ambroff 2008-08-20
+ dmg_template = os.path.join(
+ 'installers',
+ 'darwin',
+ '%s-dmg' % "".join(self.channel_unique().split()).lower())
+
+ if not os.path.exists (self.src_path_of(dmg_template)):
+ dmg_template = os.path.join ('installers', 'darwin', 'release-dmg')
+
+ for s,d in {self.get_dst_prefix():app_name + ".app",
+ os.path.join(dmg_template, "_VolumeIcon.icns"): ".VolumeIcon.icns",
+ os.path.join(dmg_template, "background.jpg"): "background.jpg",
+ os.path.join(dmg_template, "_DS_Store"): ".DS_Store"}.items():
+ print "Copying to dmg", s, d
+ self.copy_action(self.src_path_of(s), os.path.join(volpath, d))
+
+ # Hide the background image, DS_Store file, and volume icon file (set their "visible" bit)
+ for f in ".VolumeIcon.icns", "background.jpg", ".DS_Store":
+ self.run_command('SetFile -a V %r' % os.path.join(volpath, f))
+
+ # Create the alias file (which is a resource file) from the .r
+ self.run_command('rez %r -o %r' %
+ (self.src_path_of("installers/darwin/release-dmg/Applications-alias.r"),
+ os.path.join(volpath, "Applications")))
+
+ # Set the alias file's alias and custom icon bits
+ self.run_command('SetFile -a AC %r' % os.path.join(volpath, "Applications"))
+
+ # Set the disk image root's custom icon bit
+ self.run_command('SetFile -a C %r' % volpath)
+
+ # Unmount the image
+ self.run_command('hdiutil detach -force %r' % devfile)
print "Converting temp disk image to final disk image"
self.run_command('hdiutil convert %(sparse)r -format UDZO -imagekey zlib-level=9 -o %(final)r' % {'sparse':sparsename, 'final':finalname})
@@ -833,28 +792,6 @@ class LinuxManifest(ViewerManifest):
# Create an appropriate gridargs.dat for this package, denoting required grid.
self.put_in_file(self.flags_list(), 'etc/gridargs.dat')
- self.path("secondlife-bin","bin/do-not-directly-run-secondlife-bin")
- self.path("../linux_crash_logger/linux-crash-logger","bin/linux-crash-logger.bin")
- self.path("../linux_updater/linux-updater", "bin/linux-updater.bin")
- self.path("../llplugin/slplugin/SLPlugin", "bin/SLPlugin")
-
- if self.prefix("res-sdl"):
- self.path("*")
- # recurse
- self.end_prefix("res-sdl")
-
- # plugins
- if self.prefix(src="", dst="bin/llplugin"):
- self.path("../media_plugins/webkit/libmedia_plugin_webkit.so", "libmedia_plugin_webkit.so")
- self.path("../media_plugins/gstreamer010/libmedia_plugin_gstreamer010.so", "libmedia_plugin_gstreamer.so")
- self.end_prefix("bin/llplugin")
-
- try:
- self.path("../llcommon/libllcommon.so", "lib/libllcommon.so")
- except:
- print "Skipping llcommon.so (assuming llcommon was linked statically)"
-
- self.path("featuretable_linux.txt")
def package_finish(self):
if 'installer_name' in self.args:
@@ -869,10 +806,6 @@ class LinuxManifest(ViewerManifest):
else:
installer_name += '_' + self.channel_oneword().upper()
- 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"
- self.run_command("find %(d)r/bin %(d)r/lib -type f | xargs --no-run-if-empty strip -S" % {'d': self.get_dst_prefix()} ) # makes some small assumptions about our packaged dir structure
-
# Fix access permissions
self.run_command("""
find %(dst)s -type d | xargs --no-run-if-empty chmod 755;
@@ -909,17 +842,40 @@ class Linux_i686Manifest(LinuxManifest):
# install either the libllkdu we just built, or a prebuilt one, in
# decreasing order of preference. for linux package, this goes to bin/
- try:
- self.path(self.find_existing_file('../llkdu/libllkdu.so',
- '../../libraries/i686-linux/lib_release_client/libllkdu.so'),
- dst='bin/libllkdu.so')
- except:
- print "Skipping libllkdu.so - not found"
+ for lib, destdir in ("llkdu", "bin"), ("llcommon", "lib"):
+ libfile = "lib%s.so" % lib
+ try:
+ self.path(self.find_existing_file(os.path.join(os.pardir, lib, libfile),
+ '../../libraries/i686-linux/lib_release_client/%s' % libfile),
+ dst=os.path.join(destdir, libfile))
+ # keep this one to preserve syntax, open source mangling removes previous lines
+ pass
+ except RuntimeError:
+ print "Skipping %s - not found" % libfile
+ pass
+
+ self.path("secondlife-bin","bin/do-not-directly-run-secondlife-bin")
+
+ self.path("../linux_crash_logger/linux-crash-logger","bin/linux-crash-logger.bin")
+ self.path("../linux_updater/linux-updater", "bin/linux-updater.bin")
+ self.path("../llplugin/slplugin/SLPlugin", "bin/SLPlugin")
+ if self.prefix("res-sdl"):
+ self.path("*")
+ # recurse
+ self.end_prefix("res-sdl")
+
+ # plugins
+ if self.prefix(src="", dst="bin/llplugin"):
+ self.path("../media_plugins/webkit/libmedia_plugin_webkit.so", "libmedia_plugin_webkit.so")
+ self.path("../media_plugins/gstreamer010/libmedia_plugin_gstreamer010.so", "libmedia_plugin_gstreamer.so")
+ self.end_prefix("bin/llplugin")
+
+ self.path("featuretable_linux.txt")
+ #self.path("secondlife-i686.supp")
if self.prefix("../../libraries/i686-linux/lib_release_client", dst="lib"):
self.path("libapr-1.so.0")
self.path("libaprutil-1.so.0")
- self.path("libbreakpad_client.so.0.0.0", "libbreakpad_client.so.0")
self.path("libdb-4.2.so")
self.path("libcrypto.so.0.9.7")
self.path("libexpat.so.1")
@@ -941,7 +897,7 @@ class Linux_i686Manifest(LinuxManifest):
self.path("libfmod-3.75.so")
pass
except:
- print "Skipping libfmod-3.75.so - not found"
+ print "Skipping libkdu_v42R.so - not found"
pass
self.end_prefix("lib")
@@ -957,6 +913,10 @@ class Linux_i686Manifest(LinuxManifest):
self.path("libvivoxplatform.so")
self.end_prefix("lib")
+ if self.args['buildtype'].lower() == 'release':
+ print "* Going strip-crazy on the packaged binaries, since this is a RELEASE build"
+ self.run_command("find %(d)r/bin %(d)r/lib -type f | xargs --no-run-if-empty strip -S" % {'d': self.get_dst_prefix()} ) # makes some small assumptions about our packaged dir structure
+
################################################################
if __name__ == "__main__":