From 803b75a718833ccf236f00b425faff4eaf0f29cb Mon Sep 17 00:00:00 2001 From: callum_linden Date: Wed, 18 Oct 2017 18:36:10 -0700 Subject: First version that builds with a dummy BugSplay call in llapp.cpp --- indra/cmake/Copy3rdPartyLibs.cmake | 3 +++ indra/cmake/bugsplat.cmake | 20 ++++++++++++++++++++ 2 files changed, 23 insertions(+) create mode 100644 indra/cmake/bugsplat.cmake (limited to 'indra/cmake') diff --git a/indra/cmake/Copy3rdPartyLibs.cmake b/indra/cmake/Copy3rdPartyLibs.cmake index 5ccbe7d1d8..9238d232b8 100644 --- a/indra/cmake/Copy3rdPartyLibs.cmake +++ b/indra/cmake/Copy3rdPartyLibs.cmake @@ -39,6 +39,9 @@ if(WINDOWS) libeay32.dll glod.dll libhunspell.dll + BugSplat64.dll + BugSplatRc64.dll + BsSndRpt64.exe ) if (FMODEX) diff --git a/indra/cmake/bugsplat.cmake b/indra/cmake/bugsplat.cmake new file mode 100644 index 0000000000..6805465023 --- /dev/null +++ b/indra/cmake/bugsplat.cmake @@ -0,0 +1,20 @@ +include(Prebuilt) + +set(BUGSPLAT_FIND_QUIETLY ON) +set(BUGSPLAT_FIND_REQUIRED ON) + +if (USESYSTEMLIBS) + include(FindBUGSPLAT) +else (USESYSTEMLIBS) + use_prebuilt_binary(bugsplat) + if (WINDOWS) + set(BUGSPLAT_LIBRARIES + ${ARCH_PREBUILT_DIRS_RELEASE}/bugsplat64.lib + ) + elseif (DARWIN) + + else (WINDOWS) + + endif (WINDOWS) + set(BUGSPLAT_INCLUDE_DIR ${LIBS_PREBUILT_DIR}/include/bugsplat) +endif (USESYSTEMLIBS) -- cgit v1.2.3 From 6cbb00fe85df8cb01c3a979dbdf2c0354e7bfa4d Mon Sep 17 00:00:00 2001 From: callum_linden Date: Thu, 19 Oct 2017 18:35:00 -0700 Subject: Differentiate between 32/64 bit windows builds for build systewm (BugsSplat enforces specifc names that vary across bitness) --- indra/cmake/bugsplat.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/cmake') diff --git a/indra/cmake/bugsplat.cmake b/indra/cmake/bugsplat.cmake index 6805465023..e993979902 100644 --- a/indra/cmake/bugsplat.cmake +++ b/indra/cmake/bugsplat.cmake @@ -9,7 +9,7 @@ else (USESYSTEMLIBS) use_prebuilt_binary(bugsplat) if (WINDOWS) set(BUGSPLAT_LIBRARIES - ${ARCH_PREBUILT_DIRS_RELEASE}/bugsplat64.lib + ${ARCH_PREBUILT_DIRS_RELEASE}/bugsplat.lib ) elseif (DARWIN) -- cgit v1.2.3 From 0ee774c39f3c689f998dae19d04af11981abd684 Mon Sep 17 00:00:00 2001 From: callum_linden Date: Mon, 23 Oct 2017 11:37:06 -0700 Subject: Missed a place in the Copy3rdPartyLibs.cmake file (thank Windows Find) that needs to differentiate between 32 and 64 bit Windows builds --- indra/cmake/Copy3rdPartyLibs.cmake | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) (limited to 'indra/cmake') diff --git a/indra/cmake/Copy3rdPartyLibs.cmake b/indra/cmake/Copy3rdPartyLibs.cmake index 9238d232b8..eaf1e31fce 100644 --- a/indra/cmake/Copy3rdPartyLibs.cmake +++ b/indra/cmake/Copy3rdPartyLibs.cmake @@ -39,11 +39,20 @@ if(WINDOWS) libeay32.dll glod.dll libhunspell.dll - BugSplat64.dll - BugSplatRc64.dll - BsSndRpt64.exe ) + # Filenames are different for 32/64 bit BugSplat file and we don't + # have any control over them so need to branch. + if(ADDRESS_SIZE EQUAL 32) + set(release_files ${release_files} BugSplat.dll) + set(release_files ${release_files} BugSplatRc.dll) + set(release_files ${release_files} BsSndRpt.exe) + else(ADDRESS_SIZE EQUAL 32) + set(release_files ${release_files} BugSplat64.dll) + set(release_files ${release_files} BugSplatRc64.dll) + set(release_files ${release_files} BsSndRpt64.exe) + endif(ADDRESS_SIZE EQUAL 32) + if (FMODEX) if(ADDRESS_SIZE EQUAL 32) -- cgit v1.2.3 From c5f618d096f05bdff91a5d384c46e26840f5a771 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Thu, 17 May 2018 06:53:42 -0400 Subject: SL-821: Move Windows BugSplat engagement from llcommon to newview. Use WSTRINGIZE(), LL_TO_WSTRING(), wstringize() to produce required wide strings. Use a lambda for callback that sends log file; use LLDir, if set, to find the log file. Introduce BUGSPLAT CMake variable to allow suppressing BugSplat. Make BUGSPLAT CMake variable set LL_BUGSPLAT for C++ compilations. Set viewer version macros on llappviewerwin32.cpp, llappviewerlinux.cpp and llappdelegate-objc.mm -- because BugSplat needs the viewer version data, and because the macOS BugSplat hook is engaged in an Objective-C++ function we override in the app delegate. --- indra/cmake/CMakeLists.txt | 1 + indra/cmake/bugsplat.cmake | 46 ++++++++++++++++++++++++++++------------------ 2 files changed, 29 insertions(+), 18 deletions(-) (limited to 'indra/cmake') diff --git a/indra/cmake/CMakeLists.txt b/indra/cmake/CMakeLists.txt index 4a3ebe4835..84e1c5d6fd 100644 --- a/indra/cmake/CMakeLists.txt +++ b/indra/cmake/CMakeLists.txt @@ -12,6 +12,7 @@ set(cmake_SOURCE_FILES Audio.cmake BerkeleyDB.cmake Boost.cmake + bugsplat.cmake BuildVersion.cmake CEFPlugin.cmake CEFPlugin.cmake diff --git a/indra/cmake/bugsplat.cmake b/indra/cmake/bugsplat.cmake index e993979902..a7f4194905 100644 --- a/indra/cmake/bugsplat.cmake +++ b/indra/cmake/bugsplat.cmake @@ -1,20 +1,30 @@ -include(Prebuilt) +# BUGSPLAT can be set when launching the make using the argument -DBUGSPLAT:BOOL=ON +# When building using proprietary binaries though (i.e. having access to LL private servers), +# we always build with BUGSPLAT. +# Open source devs should use the -DBUGSPLAT:BOOL=ON then if they want to +# build with BugSplat, whether they are using USESYSTEMLIBS or not. +if (INSTALL_PROPRIETARY) + set(BUGSPLAT ON CACHE BOOL "Using BugSplat crash reporting library.") +endif (INSTALL_PROPRIETARY) -set(BUGSPLAT_FIND_QUIETLY ON) -set(BUGSPLAT_FIND_REQUIRED ON) +if (BUGSPLAT) + if (USESYSTEMLIBS) + set(BUGSPLAT_FIND_QUIETLY ON) + set(BUGSPLAT_FIND_REQUIRED ON) + include(FindBUGSPLAT) + else (USESYSTEMLIBS) + include(Prebuilt) + use_prebuilt_binary(bugsplat) + if (WINDOWS) + set(BUGSPLAT_LIBRARIES + ${ARCH_PREBUILT_DIRS_RELEASE}/bugsplat.lib + ) + elseif (DARWIN) + find_library(BUGSPLAT_LIBRARIES BugsplatMac + PATHS "${ARCH_PREBUILT_DIRS_RELEASE}") + else (WINDOWS) -if (USESYSTEMLIBS) - include(FindBUGSPLAT) -else (USESYSTEMLIBS) - use_prebuilt_binary(bugsplat) - if (WINDOWS) - set(BUGSPLAT_LIBRARIES - ${ARCH_PREBUILT_DIRS_RELEASE}/bugsplat.lib - ) - elseif (DARWIN) - - else (WINDOWS) - - endif (WINDOWS) - set(BUGSPLAT_INCLUDE_DIR ${LIBS_PREBUILT_DIR}/include/bugsplat) -endif (USESYSTEMLIBS) + endif (WINDOWS) + set(BUGSPLAT_INCLUDE_DIR ${LIBS_PREBUILT_DIR}/include/bugsplat) + endif (USESYSTEMLIBS) +endif (BUGSPLAT) -- cgit v1.2.3 From 63fe7d802aad177107ef8e3bc0c9b7ea5118ad61 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Fri, 25 May 2018 12:09:50 -0400 Subject: SL-821, SL-826: Use BUGSPLAT_DB from environment on Windows and Mac. On TeamCity, set BUGSPLAT_DB from build-secrets. Use the presence of $BUGSPLAT_DB, rather than a new CMake BUGSPLAT option, to control whether CMake searches for BugSplat -- and passes LL_BUGSPLAT into C++. When BUGSPLAT_DB is present, make viewer_manifest.py set "BugSplat DB" in build_data.json, and "BugsplatServerURL" in Mac Info.plist. Make llappviewerwin32.cpp read "BugSplat DB" from build_data.json. Add placeholders for Mac hooks to suppress BugSplat prompt and send SecondLife.log. --- indra/cmake/bugsplat.cmake | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) (limited to 'indra/cmake') diff --git a/indra/cmake/bugsplat.cmake b/indra/cmake/bugsplat.cmake index a7f4194905..4db9068b49 100644 --- a/indra/cmake/bugsplat.cmake +++ b/indra/cmake/bugsplat.cmake @@ -1,13 +1,7 @@ -# BUGSPLAT can be set when launching the make using the argument -DBUGSPLAT:BOOL=ON -# When building using proprietary binaries though (i.e. having access to LL private servers), -# we always build with BUGSPLAT. -# Open source devs should use the -DBUGSPLAT:BOOL=ON then if they want to -# build with BugSplat, whether they are using USESYSTEMLIBS or not. -if (INSTALL_PROPRIETARY) - set(BUGSPLAT ON CACHE BOOL "Using BugSplat crash reporting library.") -endif (INSTALL_PROPRIETARY) - -if (BUGSPLAT) +# BugSplat is engaged by setting environment variable BUGSPLAT_DB to the +# target BugSplat database name prior to running CMake (and during autobuild +# build). +if (DEFINED ENV{BUGSPLAT_DB}) if (USESYSTEMLIBS) set(BUGSPLAT_FIND_QUIETLY ON) set(BUGSPLAT_FIND_REQUIRED ON) @@ -27,4 +21,4 @@ if (BUGSPLAT) endif (WINDOWS) set(BUGSPLAT_INCLUDE_DIR ${LIBS_PREBUILT_DIR}/include/bugsplat) endif (USESYSTEMLIBS) -endif (BUGSPLAT) +endif (DEFINED ENV{BUGSPLAT_DB}) -- cgit v1.2.3 From 8781b36d7ee5d6532fb6534caa595166ad00f04d Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Fri, 25 May 2018 16:08:00 -0400 Subject: SL-821: export BUGSPLAT_DB when loaded so child processes can detect. Produce CMake message when BugSplat is engaged so we can detect in build log. Don't try to copy BugSplat DLLs when NOT engaged. --- indra/cmake/Copy3rdPartyLibs.cmake | 8 +++++--- indra/cmake/bugsplat.cmake | 2 ++ 2 files changed, 7 insertions(+), 3 deletions(-) (limited to 'indra/cmake') diff --git a/indra/cmake/Copy3rdPartyLibs.cmake b/indra/cmake/Copy3rdPartyLibs.cmake index 7f708bc27a..c9519b0e1d 100644 --- a/indra/cmake/Copy3rdPartyLibs.cmake +++ b/indra/cmake/Copy3rdPartyLibs.cmake @@ -51,15 +51,17 @@ if(WINDOWS) # Filenames are different for 32/64 bit BugSplat file and we don't # have any control over them so need to branch. - if(ADDRESS_SIZE EQUAL 32) + if (DEFINED ENV{BUGSPLAT_DB}) + if(ADDRESS_SIZE EQUAL 32) set(release_files ${release_files} BugSplat.dll) set(release_files ${release_files} BugSplatRc.dll) set(release_files ${release_files} BsSndRpt.exe) - else(ADDRESS_SIZE EQUAL 32) + else(ADDRESS_SIZE EQUAL 32) set(release_files ${release_files} BugSplat64.dll) set(release_files ${release_files} BugSplatRc64.dll) set(release_files ${release_files} BsSndRpt64.exe) - endif(ADDRESS_SIZE EQUAL 32) + endif(ADDRESS_SIZE EQUAL 32) + endif (DEFINED ENV{BUGSPLAT_DB}) if (FMODEX) diff --git a/indra/cmake/bugsplat.cmake b/indra/cmake/bugsplat.cmake index 4db9068b49..eb5808b1fb 100644 --- a/indra/cmake/bugsplat.cmake +++ b/indra/cmake/bugsplat.cmake @@ -3,10 +3,12 @@ # build). if (DEFINED ENV{BUGSPLAT_DB}) if (USESYSTEMLIBS) + message(STATUS "Looking for system BugSplat") set(BUGSPLAT_FIND_QUIETLY ON) set(BUGSPLAT_FIND_REQUIRED ON) include(FindBUGSPLAT) else (USESYSTEMLIBS) + message(STATUS "Engaging autobuild BugSplat") include(Prebuilt) use_prebuilt_binary(bugsplat) if (WINDOWS) -- cgit v1.2.3 From d2fa5a53e8b91bd0aba10ab3917c722dc360b610 Mon Sep 17 00:00:00 2001 From: Oz Linden Date: Wed, 30 May 2018 13:14:43 -0400 Subject: remove unused UNATTENDED cmake variable that generates warnings --- indra/cmake/Variables.cmake | 1 - 1 file changed, 1 deletion(-) (limited to 'indra/cmake') diff --git a/indra/cmake/Variables.cmake b/indra/cmake/Variables.cmake index bd69c49856..b913d6398e 100644 --- a/indra/cmake/Variables.cmake +++ b/indra/cmake/Variables.cmake @@ -209,7 +209,6 @@ set(SIGNING_IDENTITY "" CACHE STRING "Specifies the signing identity to use, if set(VERSION_BUILD "0" CACHE STRING "Revision number passed in from the outside") set(USESYSTEMLIBS OFF CACHE BOOL "Use libraries from your system rather than Linden-supplied prebuilt libraries.") -set(UNATTENDED OFF CACHE BOOL "Should be set to ON for building with VC Express editions.") set(USE_PRECOMPILED_HEADERS ON CACHE BOOL "Enable use of precompiled header directives where supported.") -- cgit v1.2.3