Merge viewer-bugsplat
commit
606adaffe7
6
build.sh
6
build.sh
|
|
@ -116,8 +116,10 @@ pre_build()
|
|||
symplat="linux"
|
||||
;;
|
||||
esac
|
||||
# This name is consumed by indra/newview/CMakeLists.txt
|
||||
VIEWER_SYMBOL_FILE="$build_dir/newview/$variant/secondlife-symbols-$symplat-${AUTOBUILD_ADDRSIZE}.tar.bz2"
|
||||
# This name is consumed by indra/newview/CMakeLists.txt. Make it
|
||||
# absolute because we've had troubles with relative pathnames.
|
||||
abs_build_dir="$(cd "$build_dir"; pwd)"
|
||||
VIEWER_SYMBOL_FILE="$(native_path "$abs_build_dir/newview/$variant/secondlife-symbols-$symplat-${AUTOBUILD_ADDRSIZE}.tar.bz2")"
|
||||
fi
|
||||
|
||||
# don't spew credentials into build log
|
||||
|
|
|
|||
|
|
@ -76,6 +76,7 @@ if (WINDOWS AND EXISTS ${LIBS_CLOSED_DIR}copy_win_scripts)
|
|||
endif (WINDOWS AND EXISTS ${LIBS_CLOSED_DIR}copy_win_scripts)
|
||||
|
||||
add_custom_target(viewer)
|
||||
|
||||
add_subdirectory(${LIBS_OPEN_PREFIX}llcrashlogger)
|
||||
add_subdirectory(${LIBS_OPEN_PREFIX}llplugin)
|
||||
add_subdirectory(${LIBS_OPEN_PREFIX}llui)
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
# -*- cmake -*-
|
||||
include(00-Common)
|
||||
include(LLTestCommand)
|
||||
|
||||
# <FS:ND> Google Mock/Test is not used
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ add_executable(llimage_libtest
|
|||
WIN32
|
||||
MACOSX_BUNDLE
|
||||
${llimage_libtest_SOURCE_FILES}
|
||||
)
|
||||
)
|
||||
|
||||
set_target_properties(llimage_libtest
|
||||
PROPERTIES
|
||||
|
|
|
|||
|
|
@ -50,7 +50,9 @@ class ManifestError(RuntimeError):
|
|||
|
||||
class MissingError(ManifestError):
|
||||
"""You specified a file that doesn't exist"""
|
||||
pass
|
||||
def __init__(self, msg):
|
||||
self.msg = msg
|
||||
super(MissingError, self).__init__(self.msg)
|
||||
|
||||
def path_ancestors(path):
|
||||
drive, path = os.path.splitdrive(os.path.normpath(path))
|
||||
|
|
@ -247,14 +249,18 @@ def main(extra=[]):
|
|||
# Build base package.
|
||||
touch = args.get('touch')
|
||||
if touch:
|
||||
print 'Creating base package'
|
||||
print '================ Creating base package'
|
||||
else:
|
||||
print '================ Starting base copy'
|
||||
wm = LLManifest.for_platform(args['platform'], args.get('arch'))(args)
|
||||
wm.do(*args['actions'])
|
||||
# Store package file for later if making touched file.
|
||||
base_package_file = ""
|
||||
if touch:
|
||||
print 'Created base package ', wm.package_file
|
||||
print '================ Created base package ', wm.package_file
|
||||
base_package_file = "" + wm.package_file
|
||||
else:
|
||||
print '================ Finished base copy'
|
||||
|
||||
# handle multiple packages if set
|
||||
# ''.split() produces empty list
|
||||
|
|
@ -281,17 +287,20 @@ def main(extra=[]):
|
|||
args['sourceid'] = os.environ.get(package_id + "_sourceid")
|
||||
args['dest'] = base_dest_template.format(package_id)
|
||||
if touch:
|
||||
print 'Creating additional package for "', package_id, '" in ', args['dest']
|
||||
print '================ Creating additional package for "', package_id, '" in ', args['dest']
|
||||
else:
|
||||
print '================ Starting additional copy for "', package_id, '" in ', args['dest']
|
||||
try:
|
||||
wm = LLManifest.for_platform(args['platform'], args.get('arch'))(args)
|
||||
wm.do(*args['actions'])
|
||||
except Exception as err:
|
||||
sys.exit(str(err))
|
||||
if touch:
|
||||
print 'Created additional package ', wm.package_file, ' for ', package_id
|
||||
print '================ Created additional package ', wm.package_file, ' for ', package_id
|
||||
with open(base_touch_template.format(package_id), 'w') as fp:
|
||||
fp.write('set package_file=%s\n' % wm.package_file)
|
||||
|
||||
else:
|
||||
print '================ Finished additional copy "', package_id, '" in ', args['dest']
|
||||
# Write out the package file in this format, so that it can easily be called
|
||||
# and used in a .bat file - yeah, it sucks, but this is the simplest...
|
||||
if touch:
|
||||
|
|
@ -495,6 +504,19 @@ class LLManifest(object):
|
|||
relative to the destination directory."""
|
||||
return os.path.join(self.get_dst_prefix(), relpath)
|
||||
|
||||
def _relative_dst_path(self, dstpath):
|
||||
"""
|
||||
Returns the path to a file or directory relative to the destination directory.
|
||||
This should only be used for generating diagnostic output in the path method.
|
||||
"""
|
||||
dest_root=self.dst_prefix[0]
|
||||
if dstpath.startswith(dest_root+os.path.sep):
|
||||
return dstpath[len(dest_root)+1:]
|
||||
elif dstpath.startswith(dest_root):
|
||||
return dstpath[len(dest_root):]
|
||||
else:
|
||||
return dstpath
|
||||
|
||||
def ensure_src_dir(self, reldir):
|
||||
"""Construct the path for a directory relative to the
|
||||
source path, and ensures that it exists. Returns the
|
||||
|
|
@ -794,13 +816,13 @@ class LLManifest(object):
|
|||
return self.path(os.path.join(path, file), file)
|
||||
|
||||
def path(self, src, dst=None):
|
||||
sys.stdout.write("Processing %s => %s ... " % (src, dst))
|
||||
sys.stdout.flush()
|
||||
if src == None:
|
||||
raise ManifestError("No source file, dst is " + dst)
|
||||
if dst == None:
|
||||
dst = src
|
||||
dst = os.path.join(self.get_dst_prefix(), dst)
|
||||
sys.stdout.write("Processing %s => %s ... " % (src, self._relative_dst_path(dst)))
|
||||
|
||||
def try_path(src):
|
||||
# expand globs
|
||||
|
|
@ -820,22 +842,18 @@ class LLManifest(object):
|
|||
count += self.process_file(src, dst)
|
||||
return count
|
||||
|
||||
for pfx in self.get_src_prefix(), self.get_artwork_prefix(), self.get_build_prefix():
|
||||
try_prefixes = [self.get_src_prefix(), self.get_artwork_prefix(), self.get_build_prefix()]
|
||||
tried=[]
|
||||
count=0
|
||||
while not count and try_prefixes:
|
||||
pfx = try_prefixes.pop(0)
|
||||
try:
|
||||
count = try_path(os.path.join(pfx, src))
|
||||
except MissingError:
|
||||
# If src isn't a wildcard, and if that file doesn't exist in
|
||||
# this pfx, try next pfx.
|
||||
count = 0
|
||||
continue
|
||||
|
||||
# Here try_path() didn't raise MissingError. Did it process any files?
|
||||
if count:
|
||||
break
|
||||
# Even though try_path() didn't raise MissingError, it returned 0
|
||||
# files. src is probably a wildcard meant for some other pfx. Loop
|
||||
# back to try the next.
|
||||
|
||||
tried.append(pfx)
|
||||
if not try_prefixes:
|
||||
# no more prefixes left to try
|
||||
print "unable to find '%s'; looked in:\n %s" % (src, '\n '.join(tried))
|
||||
print "%d files" % count
|
||||
|
||||
# Let caller check whether we processed as many files as expected. In
|
||||
|
|
|
|||
|
|
@ -78,4 +78,4 @@ target_link_libraries(linux-crash-logger
|
|||
)
|
||||
|
||||
add_custom_target(linux-crash-logger-target ALL
|
||||
DEPENDS linux-crash-logger)
|
||||
DEPENDS linux-crash-logger)
|
||||
|
|
|
|||
|
|
@ -29,7 +29,9 @@ set_source_files_properties(${llimagej2coj_HEADER_FILES}
|
|||
list(APPEND llimagej2coj_SOURCE_FILES ${llimagej2coj_HEADER_FILES})
|
||||
|
||||
add_library (llimagej2coj ${llimagej2coj_SOURCE_FILES})
|
||||
|
||||
target_link_libraries(
|
||||
llimagej2coj
|
||||
${OPENJPEG_LIBRARIES}
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@ add_executable(SLPlugin
|
|||
WIN32
|
||||
MACOSX_BUNDLE
|
||||
${SLPlugin_SOURCE_FILES}
|
||||
)
|
||||
)
|
||||
|
||||
if (WINDOWS)
|
||||
set_target_properties(SLPlugin
|
||||
|
|
|
|||
|
|
@ -85,7 +85,7 @@ add_custom_command(
|
|||
COMMAND ${CMAKE_COMMAND}
|
||||
ARGS
|
||||
-E
|
||||
copy_directory
|
||||
copy_if_different
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/CrashReporter.nib
|
||||
${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/mac-crash-logger.app/Contents/Resources/CrashReporter.nib
|
||||
)
|
||||
|
|
|
|||
|
|
@ -48,5 +48,5 @@ set(media_plugin_base_HEADER_FILES
|
|||
|
||||
add_library(media_plugin_base
|
||||
${media_plugin_base_SOURCE_FILES}
|
||||
)
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -83,7 +83,7 @@ list(APPEND media_plugin_cef_SOURCE_FILES ${media_plugin_cef_HEADER_FILES})
|
|||
add_library(media_plugin_cef
|
||||
SHARED
|
||||
${media_plugin_cef_SOURCE_FILES}
|
||||
)
|
||||
)
|
||||
|
||||
#add_dependencies(media_plugin_cef
|
||||
# ${MEDIA_PLUGIN_BASE_LIBRARIES}
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ set(media_plugin_example_SOURCE_FILES
|
|||
add_library(media_plugin_example
|
||||
SHARED
|
||||
${media_plugin_example_SOURCE_FILES}
|
||||
)
|
||||
)
|
||||
|
||||
target_link_libraries(media_plugin_example
|
||||
${LLPLUGIN_LIBRARIES}
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@ set(media_plugin_gstreamer010_HEADER_FILES
|
|||
add_library(media_plugin_gstreamer010
|
||||
SHARED
|
||||
${media_plugin_gstreamer010_SOURCE_FILES}
|
||||
)
|
||||
)
|
||||
|
||||
target_link_libraries(media_plugin_gstreamer010
|
||||
${LLPLUGIN_LIBRARIES}
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@ set(media_plugin_libvlc_SOURCE_FILES
|
|||
add_library(media_plugin_libvlc
|
||||
SHARED
|
||||
${media_plugin_libvlc_SOURCE_FILES}
|
||||
)
|
||||
)
|
||||
|
||||
target_link_libraries(media_plugin_libvlc
|
||||
${LLPLUGIN_LIBRARIES}
|
||||
|
|
|
|||
|
|
@ -2568,12 +2568,8 @@ if (DARWIN)
|
|||
)
|
||||
|
||||
set(VIEWER_APP_BUNDLE "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/${product}.app")
|
||||
# VIEWER_APP_EXECUTABLE was originally a prediction of the executable
|
||||
# pathname that would result from running viewer_manifest.py, but CMake
|
||||
# complained that there was no rule to make that executable. Try using the
|
||||
# existing target.
|
||||
set(VIEWER_APP_EXECUTABLE "${VIEWER_BINARY_NAME}")
|
||||
set(VIEWER_APP_DSYM "${VIEWER_APP_EXECUTABLE}.dSYM")
|
||||
set(VIEWER_APP_EXE "${VIEWER_APP_BUNDLE}/Contents/MacOS/${product}")
|
||||
set(VIEWER_APP_DSYM "${VIEWER_APP_EXE}.dSYM")
|
||||
set(VIEWER_APP_XCARCHIVE "${VIEWER_APP_BUNDLE}/../${product}.xcarchive.zip")
|
||||
|
||||
configure_file(
|
||||
|
|
@ -2698,9 +2694,9 @@ if (PACKAGE AND (RELEASE_CRASH_REPORTING OR NON_RELEASE_CRASH_REPORTING) AND VIE
|
|||
DEPENDS generate_breakpad_symbols.py
|
||||
VERBATIM)
|
||||
|
||||
## add_custom_target(generate_symbols DEPENDS "${VIEWER_SYMBOL_FILE}" "${VIEWER_BINARY_NAME}" "${VIEWER_COPY_MANIFEST}")
|
||||
## add_custom_target(generate_symbols DEPENDS "${VIEWER_SYMBOL_FILE}" ${VIEWER_BINARY_NAME} "${VIEWER_COPY_MANIFEST}")
|
||||
add_custom_target(generate_symbols DEPENDS "${VIEWER_SYMBOL_FILE}")
|
||||
add_dependencies(generate_symbols "${VIEWER_BINARY_NAME}")
|
||||
add_dependencies(generate_symbols ${VIEWER_BINARY_NAME})
|
||||
if (WINDOWS OR LINUX)
|
||||
add_dependencies(generate_symbols "${VIEWER_COPY_MANIFEST}")
|
||||
endif (WINDOWS OR LINUX)
|
||||
|
|
@ -2714,6 +2710,9 @@ if (PACKAGE AND (RELEASE_CRASH_REPORTING OR NON_RELEASE_CRASH_REPORTING) AND VIE
|
|||
execute_process(COMMAND "cygpath" "-u" "${VIEWER_SYMBOL_FILE}"
|
||||
OUTPUT_VARIABLE VIEWER_SYMBOL_FILE_CYGWIN
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
execute_process(COMMAND "cygpath" "-u" "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}"
|
||||
OUTPUT_VARIABLE PARENT_DIRECTORY_CYGWIN
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
add_custom_command(OUTPUT "${VIEWER_SYMBOL_FILE}"
|
||||
# Use of 'tar ...j' here assumes VIEWER_SYMBOL_FILE endswith .tar.bz2;
|
||||
# testing a string suffix is painful enough in CMake language that
|
||||
|
|
@ -2722,25 +2721,25 @@ if (PACKAGE AND (RELEASE_CRASH_REPORTING OR NON_RELEASE_CRASH_REPORTING) AND VIE
|
|||
ARGS
|
||||
"cjf"
|
||||
"${VIEWER_SYMBOL_FILE_CYGWIN}"
|
||||
"-C"
|
||||
"${PARENT_DIRECTORY_CYGWIN}"
|
||||
"secondlife-bin.pdb"
|
||||
WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}"
|
||||
DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/secondlife-bin.pdb"
|
||||
COMMENT "Packing viewer PDB into ${VIEWER_SYMBOL_FILE_CYGWIN}"
|
||||
)
|
||||
add_custom_target(generate_symbols DEPENDS "${VIEWER_SYMBOL_FILE}" "${VIEWER_BINARY_NAME}")
|
||||
add_dependencies(generate_symbols "${VIEWER_BINARY_NAME}")
|
||||
add_custom_target(generate_symbols DEPENDS "${VIEWER_SYMBOL_FILE}" ${VIEWER_BINARY_NAME})
|
||||
add_dependencies(generate_symbols ${VIEWER_BINARY_NAME})
|
||||
endif (WINDOWS)
|
||||
if (DARWIN)
|
||||
# Have to run dsymutil first, then pack up the resulting .dSYM directory
|
||||
add_custom_command(OUTPUT "${VIEWER_APP_DSYM}"
|
||||
COMMAND "dsymutil"
|
||||
ARGS
|
||||
"${VIEWER_APP_EXECUTABLE}"
|
||||
DEPENDS "${VIEWER_APP_EXECUTABLE}"
|
||||
${VIEWER_APP_EXE}
|
||||
COMMENT "Generating ${VIEWER_APP_DSYM}"
|
||||
)
|
||||
add_custom_target(dsym_generate DEPENDS "${VIEWER_APP_DSYM}")
|
||||
add_dependencies(dsym_generate "${VIEWER_APP_EXECUTABLE}")
|
||||
add_dependencies(dsym_generate ${VIEWER_BINARY_NAME})
|
||||
add_custom_command(OUTPUT "${VIEWER_SYMBOL_FILE}"
|
||||
# See above comments about "tar ...j"
|
||||
COMMAND "tar"
|
||||
|
|
|
|||
|
|
@ -1028,12 +1028,19 @@ class DarwinManifest(ViewerManifest):
|
|||
return True
|
||||
|
||||
# <FS:Ansariel> construct method VMP trampoline crazy VMP launcher juggling shamelessly replaced with old version
|
||||
# def is_rearranging(self):
|
||||
# # That said, some stuff should still only be performed once.
|
||||
# # Are either of these actions in 'actions'? Is the set intersection
|
||||
# # non-empty?
|
||||
# return bool(set(["package", "unpacked"]).intersection(self.args['actions']))
|
||||
|
||||
# def construct(self):
|
||||
# # These are the names of the top-level application and the embedded
|
||||
# # applications for the VMP and for the actual viewer, respectively.
|
||||
# # These names, without the .app suffix, determine the flyover text for
|
||||
# # their corresponding Dock icons.
|
||||
# toplevel_app, toplevel_icon = "Second Life.app", "secondlife.icns"
|
||||
# toplevel_app = self.channel()+".app"
|
||||
# toplevel_icon = "secondlife.icns"
|
||||
# launcher_app, launcher_icon = "Second Life Launcher.app", "secondlife.icns"
|
||||
# viewer_app, viewer_icon = "Second Life Viewer.app", "secondlife.icns"
|
||||
|
||||
|
|
@ -1053,20 +1060,24 @@ class DarwinManifest(ViewerManifest):
|
|||
# # top-level Info.plist is as generated by CMake
|
||||
# Info_plist = self.dst_path_of("Info.plist")
|
||||
|
||||
# toplevel_MacOS = self.dst_path_of("MacOS")
|
||||
# # the one file in top-level MacOS directory is the trampoline to
|
||||
# # our nested launcher_app
|
||||
# with self.prefix(dst="MacOS"):
|
||||
# toplevel_MacOS = self.get_dst_prefix()
|
||||
# trampoline = self.put_in_file("""\
|
||||
# if not self.is_rearranging():
|
||||
# trampoline = ""
|
||||
# else:
|
||||
# with self.prefix(dst="MacOS"):
|
||||
# trampoline = self.put_in_file("""\
|
||||
# #!/bin/bash
|
||||
# open "%s" --args "$@"
|
||||
# """ %
|
||||
# # up one directory from MacOS to its sibling Resources directory
|
||||
# os.path.join('$(dirname "$0")', os.pardir, 'Resources', launcher_app),
|
||||
# "SL_Launcher", # write this file
|
||||
# "trampoline") # flag to add to list of copied files
|
||||
# # Script must be executable
|
||||
# self.run_command(["chmod", "+x", trampoline])
|
||||
# # up one directory from MacOS to its sibling Resources directory
|
||||
# os.path.join('$(dirname "$0")', os.pardir, 'Resources', launcher_app),
|
||||
# "SL_Launcher", # write this file
|
||||
# "trampoline") # flag to add to list of copied files
|
||||
# # Script must be executable
|
||||
# self.run_command(["chmod", "+x", trampoline])
|
||||
|
||||
# # Make a symlink to a nested app Frameworks directory that doesn't
|
||||
# # yet exist. We shouldn't need this; the only things that need
|
||||
|
|
@ -1147,25 +1158,31 @@ class DarwinManifest(ViewerManifest):
|
|||
# continue
|
||||
# fromwhere = os.path.join(toplevel_MacOS, f)
|
||||
# towhere = self.dst_path_of(f)
|
||||
# print "Moving %s => %s" % \
|
||||
# (self.relpath(fromwhere, relbase),
|
||||
# self.relpath(towhere, relbase))
|
||||
# # now do it, only without relativizing paths
|
||||
# os.rename(fromwhere, towhere)
|
||||
# fromrel = self.relpath(fromwhere, relbase)
|
||||
# torel = self.relpath(towhere, relbase)
|
||||
# if not self.is_rearranging():
|
||||
# print "Not yet moving {} => {}".format(fromrel, torel)
|
||||
# else:
|
||||
# print "Moving {} => {}".format(fromrel, torel)
|
||||
# # now do it, only without relativizing paths
|
||||
# os.rename(fromwhere, towhere)
|
||||
|
||||
# Pick the biggest of the executables as the real viewer.
|
||||
# Make (basename, fullpath) pairs; for each pair,
|
||||
# expand to (size, basename, fullpath) triples; sort
|
||||
# by size; pick the last triple; take the basename and
|
||||
# fullpath from that.
|
||||
# _, exename, exepath = \
|
||||
# sorted((os.path.getsize(path), name, path)
|
||||
# for name, path in
|
||||
# ((name, os.path.join(here, name))
|
||||
# for name in os.listdir(here)))[-1]
|
||||
# # If we haven't yet moved executables, find our viewer
|
||||
# # executable where it was linked, in toplevel_MacOS.
|
||||
# # If we have, find it here.
|
||||
# whichdir = here if self.is_rearranging() else toplevel_MacOS
|
||||
# # Pick the biggest of the executables as the real viewer.
|
||||
# # Make (basename, fullpath) pairs; for each pair,
|
||||
# # expand to (size, basename, fullpath) triples; sort
|
||||
# # by size; pick the last triple; take the basename and
|
||||
# # fullpath from that.
|
||||
# # _, exename, exepath = \
|
||||
# # sorted((os.path.getsize(path), name, path)
|
||||
# # for name, path in
|
||||
# # ((name, os.path.join(whichdir, name))
|
||||
# # for name in os.listdir(whichdir)))[-1]
|
||||
|
||||
# if ("package" in self.args['actions'] or
|
||||
# "unpacked" in self.args['actions']):
|
||||
# if self.is_rearranging():
|
||||
# # 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 arguments
|
||||
|
|
@ -1321,13 +1338,14 @@ class DarwinManifest(ViewerManifest):
|
|||
|
||||
# # our apps
|
||||
# executable_path = {}
|
||||
# for app_bld_dir, app in (("mac_crash_logger", "mac-crash-logger.app"),
|
||||
# # plugin launcher
|
||||
# (os.path.join("llplugin", "slplugin"), "SLPlugin.app"),
|
||||
# ):
|
||||
# self.path2basename(os.path.join(os.pardir,
|
||||
# app_bld_dir, self.args['configuration']),
|
||||
# app)
|
||||
# for app_bld_dir, app in (
|
||||
# ("mac_crash_logger", "mac-crash-logger.app"),
|
||||
# # plugin launcher
|
||||
# (os.path.join("llplugin", "slplugin"), "SLPlugin.app"),
|
||||
# ):
|
||||
# self.path2basename(
|
||||
# os.path.join(os.pardir, app_bld_dir, self.args['configuration']),
|
||||
# app)
|
||||
# executable_path[app] = \
|
||||
# self.dst_path_of(os.path.join(app, "Contents", "MacOS"))
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue