diff options
Diffstat (limited to 'indra/newview')
| -rw-r--r-- | indra/newview/CMakeLists.txt | 52 | ||||
| -rwxr-xr-x | indra/newview/viewer_manifest.py | 45 | 
2 files changed, 53 insertions, 44 deletions
diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index 31c4c02d99..64a8e15c4b 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -8,9 +8,9 @@ include(00-Common)  include(Linking)  include(Boost) -if (DEFINED ENV{BUGSPLAT_DB}) +if (BUGSPLAT_DB)    include(bugsplat) -endif (DEFINED ENV{BUGSPLAT_DB}) +endif (BUGSPLAT_DB)  include(BuildPackagesInfo)  include(BuildVersion)  include(CMakeCopyIfDifferent) @@ -99,11 +99,11 @@ include_directories(      ${CMAKE_CURRENT_SOURCE_DIR}      ) -if (DEFINED ENV{BUGSPLAT_DB}) +if (BUGSPLAT_DB)    include_directories(      ${BUGSPLAT_INCLUDE_DIR}      ) -endif (DEFINED ENV{BUGSPLAT_DB}) +endif (BUGSPLAT_DB)  include_directories(SYSTEM      ${LLCOMMON_SYSTEM_INCLUDE_DIRS} @@ -1390,11 +1390,11 @@ if (DARWIN)      ${COREAUDIO_LIBRARY}      ) -  if (DEFINED ENV{BUGSPLAT_DB}) +  if (BUGSPLAT_DB)      list(APPEND viewer_LIBRARIES        ${BUGSPLAT_LIBRARIES}        ) -  endif (DEFINED ENV{BUGSPLAT_DB}) +  endif (BUGSPLAT_DB)    # Add resource files to the project.    set(viewer_RESOURCE_FILES @@ -1729,10 +1729,10 @@ if (SDL_FOUND)      )  endif (SDL_FOUND) -if (DEFINED ENV{BUGSPLAT_DB}) +if (BUGSPLAT_DB)    set_property(TARGET ${VIEWER_BINARY_NAME}      PROPERTY COMPILE_DEFINITIONS "LL_BUGSPLAT") -endif (DEFINED ENV{BUGSPLAT_DB}) +endif (BUGSPLAT_DB)  # add package files  file(GLOB EVENT_HOST_SCRIPT_GLOB_LIST @@ -1841,15 +1841,16 @@ if (WINDOWS)          --actions=copy          --arch=${ARCH}          --artwork=${ARTWORK_DIR} +        "--bugsplat=${BUGSPLAT_DB}"          --build=${CMAKE_CURRENT_BINARY_DIR}          --buildtype=${CMAKE_BUILD_TYPE} +        "--channel=${VIEWER_CHANNEL}"          --configuration=${CMAKE_CFG_INTDIR}          --dest=${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}          --grid=${GRID} -        "--channel=${VIEWER_CHANNEL}" -        --versionfile=${CMAKE_CURRENT_BINARY_DIR}/viewer_version.txt          --source=${CMAKE_CURRENT_SOURCE_DIR}          --touch=${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/copy_touched.bat +        --versionfile=${CMAKE_CURRENT_BINARY_DIR}/viewer_version.txt        DEPENDS          ${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py          stage_third_party_libs @@ -1892,15 +1893,16 @@ if (WINDOWS)            ${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py            --arch=${ARCH}            --artwork=${ARTWORK_DIR} +          "--bugsplat=${BUGSPLAT_DB}"            --build=${CMAKE_CURRENT_BINARY_DIR}            --buildtype=${CMAKE_BUILD_TYPE}            "--channel=${VIEWER_CHANNEL}" -          --versionfile=${CMAKE_CURRENT_BINARY_DIR}/viewer_version.txt            --configuration=${CMAKE_CFG_INTDIR}            --dest=${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}            --grid=${GRID}            --source=${CMAKE_CURRENT_SOURCE_DIR}            --touch=${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/touched.bat +          --versionfile=${CMAKE_CURRENT_BINARY_DIR}/viewer_version.txt          DEPENDS              ${VIEWER_BINARY_NAME}              ${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py @@ -2007,11 +2009,11 @@ target_link_libraries(${VIEWER_BINARY_NAME}      ${LLAPPEARANCE_LIBRARIES}      ) -if (DEFINED ENV{BUGSPLAT_DB}) +if (BUGSPLAT_DB)    target_link_libraries(${VIEWER_BINARY_NAME}      ${BUGSPLAT_LIBRARIES}      ) -endif (DEFINED ENV{BUGSPLAT_DB}) +endif (BUGSPLAT_DB)  set(ARTWORK_DIR ${CMAKE_CURRENT_SOURCE_DIR} CACHE PATH      "Path to artwork files.") @@ -2036,15 +2038,16 @@ if (LINUX)          ${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py          --arch=${ARCH}          --artwork=${ARTWORK_DIR} +        "--bugsplat=${BUGSPLAT_DB}"          --build=${CMAKE_CURRENT_BINARY_DIR}          --buildtype=${CMAKE_BUILD_TYPE}          "--channel=${VIEWER_CHANNEL}" -        --versionfile=${CMAKE_CURRENT_BINARY_DIR}/viewer_version.txt          --configuration=${CMAKE_CFG_INTDIR}          --dest=${CMAKE_CURRENT_BINARY_DIR}/packaged          --grid=${GRID}          --source=${CMAKE_CURRENT_SOURCE_DIR}          --touch=${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/.${product}.touched +        --versionfile=${CMAKE_CURRENT_BINARY_DIR}/viewer_version.txt        DEPENDS          ${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py          ${COPY_INPUT_DEPENDENCIES} @@ -2058,17 +2061,18 @@ if (LINUX)      COMMAND ${PYTHON_EXECUTABLE}      ARGS        ${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py -      --arch=${ARCH}        --actions=copy +      --arch=${ARCH}        --artwork=${ARTWORK_DIR} +      "--bugsplat=${BUGSPLAT_DB}"        --build=${CMAKE_CURRENT_BINARY_DIR}        --buildtype=${CMAKE_BUILD_TYPE} +      "--channel=${VIEWER_CHANNEL}"        --configuration=${CMAKE_CFG_INTDIR}        --dest=${CMAKE_CURRENT_BINARY_DIR}/packaged        --grid=${GRID} -      "--channel=${VIEWER_CHANNEL}" -      --versionfile=${CMAKE_CURRENT_BINARY_DIR}/viewer_version.txt        --source=${CMAKE_CURRENT_SOURCE_DIR} +      --versionfile=${CMAKE_CURRENT_BINARY_DIR}/viewer_version.txt      DEPENDS        ${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py        ${COPY_INPUT_DEPENDENCIES} @@ -2137,15 +2141,16 @@ if (DARWIN)        --actions=copy        --arch=${ARCH}        --artwork=${ARTWORK_DIR} +      "--bugsplat=${BUGSPLAT_DB}"        --build=${CMAKE_CURRENT_BINARY_DIR}        --buildtype=${CMAKE_BUILD_TYPE} +      --bundleid=${MACOSX_BUNDLE_GUI_IDENTIFIER} +      "--channel=${VIEWER_CHANNEL}"        --configuration=${CMAKE_CFG_INTDIR}        --dest=${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/${product}.app        --grid=${GRID} -      "--channel=${VIEWER_CHANNEL}" -      --versionfile=${CMAKE_CURRENT_BINARY_DIR}/viewer_version.txt -      --bundleid=${MACOSX_BUNDLE_GUI_IDENTIFIER}        --source=${CMAKE_CURRENT_SOURCE_DIR} +      --versionfile=${CMAKE_CURRENT_BINARY_DIR}/viewer_version.txt      DEPENDS        ${VIEWER_BINARY_NAME}        ${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py @@ -2170,15 +2175,16 @@ if (DARWIN)            ${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py            --arch=${ARCH}            --artwork=${ARTWORK_DIR} +          "--bugsplat=${BUGSPLAT_DB}"            --build=${CMAKE_CURRENT_BINARY_DIR}            --buildtype=${CMAKE_BUILD_TYPE} +          "--channel=${VIEWER_CHANNEL}"            --configuration=${CMAKE_CFG_INTDIR}            --dest=${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/${product}.app            --grid=${GRID} -          "--channel=${VIEWER_CHANNEL}" -          --versionfile=${CMAKE_CURRENT_BINARY_DIR}/viewer_version.txt            --source=${CMAKE_CURRENT_SOURCE_DIR}            --touch=${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/.${product}.touched +          --versionfile=${CMAKE_CURRENT_BINARY_DIR}/viewer_version.txt            ${SIGNING_SETTING}          DEPENDS            ${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py @@ -2190,7 +2196,7 @@ if (INSTALL)    include(${CMAKE_CURRENT_SOURCE_DIR}/ViewerInstall.cmake)  endif (INSTALL) -if (PACKAGE AND (RELEASE_CRASH_REPORTING OR NON_RELEASE_CRASH_REPORTING) AND NOT DEFINED ENV{BUGSPLAT_DB}) +if (PACKAGE AND (RELEASE_CRASH_REPORTING OR NON_RELEASE_CRASH_REPORTING) AND NOT BUGSPLAT_DB)    set(SYMBOL_SEARCH_DIRS "")    # Note that the path to VIEWER_SYMBOL_FILE must match that in ../../build.sh    if (WINDOWS) diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py index ea0b3625be..e5f0575e86 100755 --- a/indra/newview/viewer_manifest.py +++ b/indra/newview/viewer_manifest.py @@ -188,11 +188,10 @@ class ViewerManifest(LLManifest):                              "Address Size":self.address_size,                              "Update Service":"https://update.secondlife.com/update",                              } -            try: -                build_data_dict["BugSplat DB"] = os.environ["BUGSPLAT_DB"] -            except KeyError: -                # skip the assignment if there's no BUGSPLAT_DB variable -                pass +            # Only store this if it's both present and non-empty +            bugsplat_db = self.args.get('bugsplat') +            if bugsplat_db: +                build_data_dict["BugSplat DB"] = bugsplat_db              build_data_dict = self.finish_build_data_dict(build_data_dict)              with open(os.path.join(os.pardir,'build_data.json'), 'w') as build_data_handle:                  json.dump(build_data_dict,build_data_handle) @@ -589,14 +588,15 @@ class WindowsManifest(ViewerManifest):              self.path("libhunspell.dll")              # BugSplat -            if(self.address_size == 64): -                self.path("BsSndRpt64.exe") -                self.path("BugSplat64.dll") -                self.path("BugSplatRc64.dll") -            else: -                self.path("BsSndRpt.exe") -                self.path("BugSplat.dll") -                self.path("BugSplatRc.dll") +            if self.args.get('bugsplat'): +                if(self.address_size == 64): +                    self.path("BsSndRpt64.exe") +                    self.path("BugSplat64.dll") +                    self.path("BugSplatRc64.dll") +                else: +                    self.path("BsSndRpt.exe") +                    self.path("BugSplat.dll") +                    self.path("BugSplatRc.dll")              # For google-perftools tcmalloc allocator.              try: @@ -1038,7 +1038,7 @@ open "%s" --args "$@"                          if ("package" in self.args['actions'] or                               "unpacked" in self.args['actions']):                              # only if we're engaging BugSplat -                            if "BUGSPLAT_DB" in os.environ: +                            if self.args.get('bugsplat'):                                  # Create a symbol archive BEFORE stripping the                                  # binary.                                  self.run_command(['dsymutil', exepath]) @@ -1085,13 +1085,11 @@ open "%s" --args "$@"                      # runs the executable, instead of launching the app)                      Info["CFBundleExecutable"] = exename                      Info["CFBundleIconFile"] = viewer_icon -                    try: +                    bugsplat_db = self.args.get('bugsplat') +                    if bugsplat_db:                          # https://www.bugsplat.com/docs/platforms/os-x#configuration                          Info["BugsplatServerURL"] = \ -                            "https://{BUGSPLAT_DB}.bugsplatsoftware.com/".format(**os.environ) -                    except KeyError: -                        # skip the assignment if there's no BUGSPLAT_DB variable -                        pass +                            "https://{}.bugsplatsoftware.com/".format(bugsplat_db)                      self.put_in_file(                          plistlib.writePlistToString(Info),                          os.path.basename(Info_plist), @@ -1104,7 +1102,8 @@ open "%s" --args "$@"                          # Remember where we parked this car.                          CEF_framework = self.dst_path_of(CEF_framework) -                        self.path2basename(relpkgdir, "BugsplatMac.framework") +                        if self.args.get('bugsplat'): +                            self.path2basename(relpkgdir, "BugsplatMac.framework")                      with self.prefix(dst="Resources"):                          # defer cross-platform file copies until we're in the right @@ -1727,4 +1726,8 @@ class Linux_x86_64_Manifest(LinuxManifest):  ################################################################  if __name__ == "__main__": -    main() +    extra_arguments = [ +        dict(name='bugsplat', description="""BugSplat database to which to post crashes, +             if BugSplat crash reporting is desired""", default=''), +        ] +    main(extra=extra_arguments)  | 
