From 9ef897a1782c4ca9fa91d071d2495203046f8dc1 Mon Sep 17 00:00:00 2001 From: Nicky Date: Sat, 1 Feb 2020 14:44:52 +0100 Subject: [PATCH 01/16] exclude all tags/branches to always just get a git hash rather than an amalgamation of tag/branch and hash (which though is valid too). --- scripts/configure_firestorm.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/configure_firestorm.sh b/scripts/configure_firestorm.sh index a19c5d25fa..2d2ff9bce4 100755 --- a/scripts/configure_firestorm.sh +++ b/scripts/configure_firestorm.sh @@ -405,7 +405,7 @@ if [ \( $WANTS_VERSION -eq $TRUE \) -o \( $WANTS_CONFIG -eq $TRUE \) ] ; then majorVer=`cat indra/newview/VIEWER_VERSION.txt | cut -d "." -f 1` minorVer=`cat indra/newview/VIEWER_VERSION.txt | cut -d "." -f 2` patchVer=`cat indra/newview/VIEWER_VERSION.txt | cut -d "." -f 3` - gitHash=`git describe --always` + gitHash=`git describe --always --exclude '*'` echo "Channel : ${CHANNEL}" echo "Version : ${majorVer}.${minorVer}.${patchVer}.${buildVer} [${gitHash}]" GITHASH=-DVIEWER_VERSION_GITHASH=\"${gitHash}\" From ee1b848f81543d9af123b2c7da461c12b79036ed Mon Sep 17 00:00:00 2001 From: Ansariel Date: Sat, 1 Feb 2020 19:30:33 +0100 Subject: [PATCH 02/16] Buildfix for non-OS builds --- indra/newview/llviewerregion.cpp | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/indra/newview/llviewerregion.cpp b/indra/newview/llviewerregion.cpp index 603beffd4b..1b43e8a11a 100644 --- a/indra/newview/llviewerregion.cpp +++ b/indra/newview/llviewerregion.cpp @@ -82,14 +82,11 @@ #include "llcorehttputil.h" #include "llcallstack.h" -// Opensim -#include "llviewerparcelmgr.h" //Aurora Sim -#ifdef OPENSIM -#include "llviewernetwork.h" -#endif -// -#include "llviewermenu.h" +// Firestorm includes #include "lfsimfeaturehandler.h" +#include "llviewermenu.h" +#include "llviewernetwork.h" +#include "llviewerparcelmgr.h" //Aurora Sim #ifdef LL_WINDOWS #pragma warning(disable:4355) From 8f535fa9874d90540ead1e9fe96ea9e30811d42c Mon Sep 17 00:00:00 2001 From: Ansariel Date: Mon, 3 Feb 2020 10:51:51 +0100 Subject: [PATCH 03/16] FIRE-29310: Fix typo in preferences --- .../newview/skins/default/xui/en/panel_preferences_privacy.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/newview/skins/default/xui/en/panel_preferences_privacy.xml b/indra/newview/skins/default/xui/en/panel_preferences_privacy.xml index fe0dfa525b..4f4ceffa8b 100644 --- a/indra/newview/skins/default/xui/en/panel_preferences_privacy.xml +++ b/indra/newview/skins/default/xui/en/panel_preferences_privacy.xml @@ -586,7 +586,7 @@ name="autorespond_nf_response_label" top_pad="5" width="450"> - Automatic response to non-friends when in AUTOREPONSE TO NON-FRIENDS mode: + Automatic response to non-friends when in AUTORESPONSE TO NON-FRIENDS mode: Date: Sat, 8 Feb 2020 20:15:16 +0100 Subject: [PATCH 04/16] Remmove opensim include guard to fix build failure for SL only builds. --- indra/newview/llvoavatarself.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/indra/newview/llvoavatarself.cpp b/indra/newview/llvoavatarself.cpp index 70a0115f73..b876ae6fd4 100644 --- a/indra/newview/llvoavatarself.cpp +++ b/indra/newview/llvoavatarself.cpp @@ -82,9 +82,7 @@ // [Legacy Bake] -#ifdef OPENSIM #include "llviewernetwork.h" -#endif // [Legacy Bake] #if LL_MSVC From f6012f78f9580439079063924043cb8ab0c0f917 Mon Sep 17 00:00:00 2001 From: Ansariel Date: Sun, 9 Feb 2020 19:36:10 +0100 Subject: [PATCH 05/16] FIRE-29311: Fix building with OpenAL on Windows, based on a patch by Testicular Slingshot --- indra/cmake/Copy3rdPartyLibs.cmake | 4 ++++ indra/lib/python/indra/util/llmanifest.py | 2 ++ indra/newview/CMakeLists.txt | 16 ++++++++++++++++ indra/newview/viewer_manifest.py | 5 +++++ scripts/configure_firestorm.sh | 16 +++++++++++++--- 5 files changed, 40 insertions(+), 3 deletions(-) diff --git a/indra/cmake/Copy3rdPartyLibs.cmake b/indra/cmake/Copy3rdPartyLibs.cmake index 265502a02d..069eada980 100644 --- a/indra/cmake/Copy3rdPartyLibs.cmake +++ b/indra/cmake/Copy3rdPartyLibs.cmake @@ -76,6 +76,10 @@ if(WINDOWS) endif(ADDRESS_SIZE EQUAL 32) endif (FMODEX) + if (OPENAL) + set(release_files ${release_files} OpenAL32.dll alut.dll) + endif (OPENAL) + #******************************* # Copy MS C runtime dlls, required for packaging. # *TODO - Adapt this to support VC9 diff --git a/indra/lib/python/indra/util/llmanifest.py b/indra/lib/python/indra/util/llmanifest.py index 201a2214ba..ffde022166 100755 --- a/indra/lib/python/indra/util/llmanifest.py +++ b/indra/lib/python/indra/util/llmanifest.py @@ -162,6 +162,8 @@ BASE_ARGUMENTS=[ description='Type of viewer build. Can be oss or hvk.', default="oss"), dict(name='fmodversion', description='Version of FMOD used. Can be fmodstudio or fmodex.', default=None), + dict(name='openal', + description='If OpenAL is used.', default=None) ] def usage(arguments, srctree=""): diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index 258b99db28..22c34de0d0 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -2269,6 +2269,15 @@ if (WINDOWS) ) endif (FMODEX) + if (OPENAL) + list(APPEND COPY_INPUT_DEPENDENCIES + ${SHARED_LIB_STAGING_DIR}/Release/OpenAL32.dll + ${SHARED_LIB_STAGING_DIR}/Release/alut.dll + ${SHARED_LIB_STAGING_DIR}/RelWithDebInfo/OpenAL32.dll + ${SHARED_LIB_STAGING_DIR}/RelWithDebInfo/alut.dll + ) + endif (OPENAL) + add_custom_command( OUTPUT ${CMAKE_CFG_INTDIR}/copy_touched.bat COMMAND ${PYTHON_EXECUTABLE} @@ -2289,6 +2298,7 @@ if (WINDOWS) --versionfile=${CMAKE_CURRENT_BINARY_DIR}/viewer_version.txt --viewer_flavor=${ND_VIEWER_FLAVOR} --fmodversion=${FMODVERSION} + --openal=${OPENAL} DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py stage_third_party_libs @@ -2352,6 +2362,7 @@ if (WINDOWS) --versionfile=${CMAKE_CURRENT_BINARY_DIR}/viewer_version.txt --viewer_flavor=${ND_VIEWER_FLAVOR} --fmodversion=${FMODVERSION} + --openal=${OPENAL} DEPENDS ${VIEWER_BINARY_NAME} ${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py @@ -2440,6 +2451,7 @@ target_link_libraries(${VIEWER_BINARY_NAME} ${DBUSGLIB_LIBRARIES} ${OPENGL_LIBRARIES} ${FMODWRAPPER_LIBRARY} # must come after LLAudio + ${OPENAL_LIBRARIES} ${GLOD_LIBRARIES} ${OPENGL_LIBRARIES} ${JSONCPP_LIBRARIES} @@ -2523,6 +2535,7 @@ endif (NOT ENABLE_MEDIA_PLUGINS) --versionfile=${CMAKE_CURRENT_BINARY_DIR}/viewer_version.txt --viewer_flavor=${ND_VIEWER_FLAVOR} --fmodversion=${FMODVERSION} + --openal=${OPENAL} DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py ${COPY_INPUT_DEPENDENCIES} @@ -2548,6 +2561,7 @@ endif (NOT ENABLE_MEDIA_PLUGINS) --versionfile=${CMAKE_CURRENT_BINARY_DIR}/viewer_version.txt --viewer_flavor=${ND_VIEWER_FLAVOR} --fmodversion=${FMODVERSION} + --openal=${OPENAL} DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py ${COPY_INPUT_DEPENDENCIES} @@ -2632,6 +2646,7 @@ if (DARWIN) --versionfile=${CMAKE_CURRENT_BINARY_DIR}/viewer_version.txt --viewer_flavor=${ND_VIEWER_FLAVOR} --fmodversion=${FMODVERSION} + --openal=${OPENAL} DEPENDS ${VIEWER_BINARY_NAME} ${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py @@ -2668,6 +2683,7 @@ if (DARWIN) --versionfile=${CMAKE_CURRENT_BINARY_DIR}/viewer_version.txt --viewer_flavor=${ND_VIEWER_FLAVOR} --fmodversion=${FMODVERSION} + --openal=${OPENAL} ${SIGNING_SETTING} DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py index 606a9bcc98..785b427f59 100755 --- a/indra/newview/viewer_manifest.py +++ b/indra/newview/viewer_manifest.py @@ -589,6 +589,11 @@ class WindowsManifest(ViewerManifest): else: self.path("fmodex.dll") + # Get openal dll + if self.args.get('openal'): + self.path("OpenAL32.dll") + self.path("alut.dll") + # For textures self.path("openjpeg.dll") diff --git a/scripts/configure_firestorm.sh b/scripts/configure_firestorm.sh index 2d2ff9bce4..3bc1a96a8d 100755 --- a/scripts/configure_firestorm.sh +++ b/scripts/configure_firestorm.sh @@ -35,6 +35,7 @@ WANTS_VERSION=$FALSE WANTS_KDU=$FALSE WANTS_FMODSTUDIO=$FALSE WANTS_FMODEX=$FALSE +WANTS_OPENAL=$FALSE WANTS_OPENSIM=$TRUE WANTS_SINGLEGRID=$FALSE WANTS_AVX=$FALSE @@ -72,6 +73,7 @@ showUsage() echo " --no-package : Build without installer (Overrides --package)" echo " --fmodstudio : Build with FMOD Studio" echo " --fmodex : Build with FMOD Ex" + echo " --openal : Build with OpenAL" echo " --opensim : Build with OpenSim support (Disables Havok features)" echo " --no-opensim : Build without OpenSim support (Overrides --opensim)" echo " --singlegrid : Build for single grid usage (Requires --opensim)" @@ -91,7 +93,7 @@ getArgs() # $* = the options passed in from main { if [ $# -gt 0 ]; then - while getoptex "clean build config version package no-package fmodstudio fmodex ninja jobs: platform: kdu opensim no-opensim singlegrid: avx avx2 crashreporting testbuild: help chan: btype:" "$@" ; do + while getoptex "clean build config version package no-package fmodstudio fmodex openal ninja jobs: platform: kdu opensim no-opensim singlegrid: avx avx2 crashreporting testbuild: help chan: btype:" "$@" ; do #ensure options are valid if [ -z "$OPTOPT" ] ; then @@ -111,6 +113,7 @@ getArgs() kdu) WANTS_KDU=$TRUE;; fmodstudio) WANTS_FMODSTUDIO=$TRUE;; fmodex) WANTS_FMODEX=$TRUE;; + openal) WANTS_OPENAL=$TRUE;; opensim) WANTS_OPENSIM=$TRUE;; no-opensim) WANTS_OPENSIM=$FALSE;; singlegrid) WANTS_SINGLEGRID=$TRUE @@ -294,10 +297,11 @@ if [ ! -d `dirname "$LOG"` ] ; then fi echo -e "configure_firestorm.sh" > $LOG -echo -e " PLATFORM: '$PLATFORM'" | tee -a $LOG +echo -e " PLATFORM: $PLATFORM" | tee -a $LOG echo -e " KDU: `b2a $WANTS_KDU`" | tee -a $LOG echo -e " FMODSTUDIO: `b2a $WANTS_FMODSTUDIO`" | tee -a $LOG echo -e " FMODEX: `b2a $WANTS_FMODEX`" | tee -a $LOG +echo -e " OPENAL: `b2a $WANTS_OPENAL`" | tee -a $LOG echo -e " OPENSIM: `b2a $WANTS_OPENSIM`" | tee -a $LOG if [ $WANTS_SINGLEGRID -eq $TRUE ] ; then echo -e " SINGLEGRID: `b2a $WANTS_SINGLEGRID` ($SINGLEGRID_URI)" | tee -a $LOG @@ -430,6 +434,11 @@ if [ $WANTS_CONFIG -eq $TRUE ] ; then else FMODEX="-DFMODEX:BOOL=OFF" fi + if [ $WANTS_OPENAL -eq $TRUE ] ; then + OPENAL="-DOPENAL:BOOL=ON" + else + OPENAL="-DOPENAL:BOOL=OFF" + fi if [ $WANTS_OPENSIM -eq $TRUE ] ; then OPENSIM="-DOPENSIM:BOOL=ON" else @@ -507,7 +516,8 @@ if [ $WANTS_CONFIG -eq $TRUE ] ; then UNATTENDED="-DUNATTENDED=ON" fi - cmake -G "$TARGET" ../indra $CHANNEL ${GITHASH} $FMODSTUDIO $FMODEX $KDU $OPENSIM $SINGLEGRID $AVX_OPTIMIZATION $AVX2_OPTIMIZATION $TESTBUILD $PACKAGE $UNATTENDED -DLL_TESTS:BOOL=OFF -DADDRESS_SIZE:STRING=$AUTOBUILD_ADDRSIZE -DCMAKE_BUILD_TYPE:STRING=$BTYPE \ + cmake -G "$TARGET" ../indra $CHANNEL ${GITHASH} $FMODSTUDIO $FMODEX $OPENAL $KDU $OPENSIM $SINGLEGRID $AVX_OPTIMIZATION $AVX2_OPTIMIZATION $TESTBUILD $PACKAGE \ + $UNATTENDED -DLL_TESTS:BOOL=OFF -DADDRESS_SIZE:STRING=$AUTOBUILD_ADDRSIZE -DCMAKE_BUILD_TYPE:STRING=$BTYPE \ $CRASH_REPORTING -DVIEWER_SYMBOL_FILE:STRING="${VIEWER_SYMBOL_FILE:-}" -DROOT_PROJECT_NAME:STRING=Firestorm $LL_ARGS_PASSTHRU | tee $LOG if [ $PLATFORM == "windows" ] ; then From 59a92532c3083470c48ca9bdbe1042ca468fc676 Mon Sep 17 00:00:00 2001 From: Ansariel Date: Mon, 10 Feb 2020 18:50:19 +0100 Subject: [PATCH 06/16] Fix building with OpenAL packaging --- indra/newview/CMakeLists.txt | 16 ++++++++++------ indra/newview/viewer_manifest.py | 2 +- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index 22c34de0d0..e5bf44fbf5 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -2163,6 +2163,10 @@ elseif (FMODEX) set(FMODVERSION "fmodex") endif (FMODSTUDIO) +if (OPENAL) + set(USE_OPENAL "true") +endif (OPENAL) + if (WINDOWS) set_target_properties(${VIEWER_BINARY_NAME} PROPERTIES @@ -2298,7 +2302,7 @@ if (WINDOWS) --versionfile=${CMAKE_CURRENT_BINARY_DIR}/viewer_version.txt --viewer_flavor=${ND_VIEWER_FLAVOR} --fmodversion=${FMODVERSION} - --openal=${OPENAL} + --openal=${USE_OPENAL} DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py stage_third_party_libs @@ -2362,7 +2366,7 @@ if (WINDOWS) --versionfile=${CMAKE_CURRENT_BINARY_DIR}/viewer_version.txt --viewer_flavor=${ND_VIEWER_FLAVOR} --fmodversion=${FMODVERSION} - --openal=${OPENAL} + --openal=${USE_OPENAL} DEPENDS ${VIEWER_BINARY_NAME} ${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py @@ -2535,7 +2539,7 @@ endif (NOT ENABLE_MEDIA_PLUGINS) --versionfile=${CMAKE_CURRENT_BINARY_DIR}/viewer_version.txt --viewer_flavor=${ND_VIEWER_FLAVOR} --fmodversion=${FMODVERSION} - --openal=${OPENAL} + --openal=${USE_OPENAL} DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py ${COPY_INPUT_DEPENDENCIES} @@ -2561,7 +2565,7 @@ endif (NOT ENABLE_MEDIA_PLUGINS) --versionfile=${CMAKE_CURRENT_BINARY_DIR}/viewer_version.txt --viewer_flavor=${ND_VIEWER_FLAVOR} --fmodversion=${FMODVERSION} - --openal=${OPENAL} + --openal=${USE_OPENAL} DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py ${COPY_INPUT_DEPENDENCIES} @@ -2646,7 +2650,7 @@ if (DARWIN) --versionfile=${CMAKE_CURRENT_BINARY_DIR}/viewer_version.txt --viewer_flavor=${ND_VIEWER_FLAVOR} --fmodversion=${FMODVERSION} - --openal=${OPENAL} + --openal=${USE_OPENAL} DEPENDS ${VIEWER_BINARY_NAME} ${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py @@ -2683,7 +2687,7 @@ if (DARWIN) --versionfile=${CMAKE_CURRENT_BINARY_DIR}/viewer_version.txt --viewer_flavor=${ND_VIEWER_FLAVOR} --fmodversion=${FMODVERSION} - --openal=${OPENAL} + --openal=${USE_OPENAL} ${SIGNING_SETTING} DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py index 785b427f59..b9f718863a 100755 --- a/indra/newview/viewer_manifest.py +++ b/indra/newview/viewer_manifest.py @@ -590,7 +590,7 @@ class WindowsManifest(ViewerManifest): self.path("fmodex.dll") # Get openal dll - if self.args.get('openal'): + if self.args.get('openal').lower() == 'true': self.path("OpenAL32.dll") self.path("alut.dll") From e9ad14eb25fd2a5eee12935b53647e50e6fffe6e Mon Sep 17 00:00:00 2001 From: Ansariel Date: Fri, 14 Feb 2020 23:43:29 +0100 Subject: [PATCH 07/16] Yoink back OpenAL changes from LL and sync with upstream --- indra/lib/python/indra/util/llmanifest.py | 4 +--- indra/llaudio/CMakeLists.txt | 4 ++++ indra/newview/CMakeLists.txt | 26 +++++++++++------------ indra/newview/viewer_manifest.py | 3 ++- 4 files changed, 19 insertions(+), 18 deletions(-) diff --git a/indra/lib/python/indra/util/llmanifest.py b/indra/lib/python/indra/util/llmanifest.py index ffde022166..f8771b5936 100755 --- a/indra/lib/python/indra/util/llmanifest.py +++ b/indra/lib/python/indra/util/llmanifest.py @@ -161,9 +161,7 @@ BASE_ARGUMENTS=[ dict(name='viewer_flavor', description='Type of viewer build. Can be oss or hvk.', default="oss"), dict(name='fmodversion', - description='Version of FMOD used. Can be fmodstudio or fmodex.', default=None), - dict(name='openal', - description='If OpenAL is used.', default=None) + description='Version of FMOD used. Can be fmodstudio or fmodex.', default=None) ] def usage(arguments, srctree=""): diff --git a/indra/llaudio/CMakeLists.txt b/indra/llaudio/CMakeLists.txt index 0df1be69b9..9da9e8f27c 100644 --- a/indra/llaudio/CMakeLists.txt +++ b/indra/llaudio/CMakeLists.txt @@ -78,6 +78,10 @@ if (FMODEX) endif (FMODEX) if (OPENAL) + include_directories( + ${OPENAL_LIBRARIES} + ) + list(APPEND llaudio_SOURCE_FILES llaudioengine_openal.cpp lllistener_openal.cpp diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index e5bf44fbf5..735da21d05 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -1974,6 +1974,10 @@ if (WINDOWS) LIST(APPEND viewer_SOURCE_FILES ${CMAKE_CURRENT_SOURCE_DIR}/../tools/manifests/legacy.manifest) endif (ADDRESS_SIZE EQUAL 64) # + + if (OPENAL) + LIST(APPEND viewer_LIBRARIES ${OPENAL_LIBRARIES}) + endif (OPENAL) endif (WINDOWS) # Add the xui files. This is handy for searching for xui elements @@ -2163,10 +2167,6 @@ elseif (FMODEX) set(FMODVERSION "fmodex") endif (FMODSTUDIO) -if (OPENAL) - set(USE_OPENAL "true") -endif (OPENAL) - if (WINDOWS) set_target_properties(${VIEWER_BINARY_NAME} PROPERTIES @@ -2275,10 +2275,8 @@ if (WINDOWS) if (OPENAL) list(APPEND COPY_INPUT_DEPENDENCIES - ${SHARED_LIB_STAGING_DIR}/Release/OpenAL32.dll - ${SHARED_LIB_STAGING_DIR}/Release/alut.dll - ${SHARED_LIB_STAGING_DIR}/RelWithDebInfo/OpenAL32.dll - ${SHARED_LIB_STAGING_DIR}/RelWithDebInfo/alut.dll + ${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR}/OpenAL32.dll + ${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR}/alut.dll ) endif (OPENAL) @@ -2302,7 +2300,7 @@ if (WINDOWS) --versionfile=${CMAKE_CURRENT_BINARY_DIR}/viewer_version.txt --viewer_flavor=${ND_VIEWER_FLAVOR} --fmodversion=${FMODVERSION} - --openal=${USE_OPENAL} + --openal=${OPENAL} DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py stage_third_party_libs @@ -2366,7 +2364,7 @@ if (WINDOWS) --versionfile=${CMAKE_CURRENT_BINARY_DIR}/viewer_version.txt --viewer_flavor=${ND_VIEWER_FLAVOR} --fmodversion=${FMODVERSION} - --openal=${USE_OPENAL} + --openal=${OPENAL} DEPENDS ${VIEWER_BINARY_NAME} ${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py @@ -2539,7 +2537,7 @@ endif (NOT ENABLE_MEDIA_PLUGINS) --versionfile=${CMAKE_CURRENT_BINARY_DIR}/viewer_version.txt --viewer_flavor=${ND_VIEWER_FLAVOR} --fmodversion=${FMODVERSION} - --openal=${USE_OPENAL} + --openal=${OPENAL} DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py ${COPY_INPUT_DEPENDENCIES} @@ -2565,7 +2563,7 @@ endif (NOT ENABLE_MEDIA_PLUGINS) --versionfile=${CMAKE_CURRENT_BINARY_DIR}/viewer_version.txt --viewer_flavor=${ND_VIEWER_FLAVOR} --fmodversion=${FMODVERSION} - --openal=${USE_OPENAL} + --openal=${OPENAL} DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py ${COPY_INPUT_DEPENDENCIES} @@ -2650,7 +2648,7 @@ if (DARWIN) --versionfile=${CMAKE_CURRENT_BINARY_DIR}/viewer_version.txt --viewer_flavor=${ND_VIEWER_FLAVOR} --fmodversion=${FMODVERSION} - --openal=${USE_OPENAL} + --openal=${OPENAL} DEPENDS ${VIEWER_BINARY_NAME} ${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py @@ -2687,7 +2685,7 @@ if (DARWIN) --versionfile=${CMAKE_CURRENT_BINARY_DIR}/viewer_version.txt --viewer_flavor=${ND_VIEWER_FLAVOR} --fmodversion=${FMODVERSION} - --openal=${USE_OPENAL} + --openal=${OPENAL} ${SIGNING_SETTING} DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py index b9f718863a..5e35b01063 100755 --- a/indra/newview/viewer_manifest.py +++ b/indra/newview/viewer_manifest.py @@ -590,7 +590,7 @@ class WindowsManifest(ViewerManifest): self.path("fmodex.dll") # Get openal dll - if self.args.get('openal').lower() == 'true': + if self.args.get('openal') == 'ON': self.path("OpenAL32.dll") self.path("alut.dll") @@ -2257,6 +2257,7 @@ if __name__ == "__main__": extra_arguments = [ dict(name='bugsplat', description="""BugSplat database to which to post crashes, if BugSplat crash reporting is desired""", default=''), + dict(name='openal', description="""Indication openal libraries are needed""", default='OFF') ] try: main(extra=extra_arguments) From 0ce85ef3b8b145fc13c7b56b781dc138bb2294f0 Mon Sep 17 00:00:00 2001 From: Nicky Date: Sat, 15 Feb 2020 10:22:19 +0100 Subject: [PATCH 08/16] Linux always builds (and always had been built) with OpenAL, make sure it is always enabled. --- scripts/configure_firestorm.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/configure_firestorm.sh b/scripts/configure_firestorm.sh index 3bc1a96a8d..3ce2959fec 100755 --- a/scripts/configure_firestorm.sh +++ b/scripts/configure_firestorm.sh @@ -506,6 +506,7 @@ if [ $WANTS_CONFIG -eq $TRUE ] ; then if [ $PLATFORM == "darwin" ] ; then TARGET="Xcode" elif [ \( $PLATFORM == "linux" \) ] ; then + OPENAL="-DOPENAL:BOOL=ON" if [ $WANTS_NINJA -eq $TRUE ] ; then TARGET="Ninja" else From f7b56e6f7cce8d221f439950badccb807ab73a51 Mon Sep 17 00:00:00 2001 From: Ansariel Date: Sun, 16 Feb 2020 01:46:08 +0100 Subject: [PATCH 09/16] FIRE-19933: Wire up context menu key in inventory (and other folder views) --- indra/llui/llfolderview.cpp | 40 +++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/indra/llui/llfolderview.cpp b/indra/llui/llfolderview.cpp index d7d4249d93..4fa0ba0117 100644 --- a/indra/llui/llfolderview.cpp +++ b/indra/llui/llfolderview.cpp @@ -1338,7 +1338,47 @@ BOOL LLFolderView::handleKeyHere( KEY key, MASK mask ) handled = TRUE; } break; + + // FIRE-19933: Open context menu on context menu key press + case KEY_CONTEXT_MENU: + S32 count = mSelectedItems.size(); + LLMenuGL* menu = (LLMenuGL*)mPopupMenuHandle.get(); + if (( count > 0 && (hasVisibleChildren()) ) // show menu only if selected items are visible + && menu ) + { + if (mCallbackRegistrar) + { + mCallbackRegistrar->pushScope(); + } + + updateMenuOptions(menu); + menu->updateParent(LLMenuGL::sMenuContainer); + + LLView* spawning_view = getParentByType(); + if (!spawning_view) + { + spawning_view = this; + } + + LLMenuGL::showPopup(spawning_view, menu, spawning_view->getRect().getCenterX(), spawning_view->getRect().getCenterY()); + + if (mCallbackRegistrar) + { + mCallbackRegistrar->popScope(); + } + } + else + { + if (menu && menu->getVisible()) + { + menu->setVisible(FALSE); + } + setSelection(NULL, FALSE, TRUE); + } + handled = TRUE; + break; } + // return handled; } From 1e8f149c7c71161f9eec27e484cd947becdf9629 Mon Sep 17 00:00:00 2001 From: Testy Date: Sun, 16 Feb 2020 06:14:34 -0400 Subject: [PATCH 10/16] Added a button to the sound explorer for stopping sounds that were played locally. --- indra/llaudio/llaudioengine.cpp | 9 ++- indra/llaudio/llaudioengine.h | 3 +- indra/newview/NACLfloaterexploresounds.cpp | 61 ++++++++++++++++++- indra/newview/NACLfloaterexploresounds.h | 4 ++ .../xui/en/floater_NACL_explore_sounds.xml | 1 + 5 files changed, 73 insertions(+), 5 deletions(-) diff --git a/indra/llaudio/llaudioengine.cpp b/indra/llaudio/llaudioengine.cpp index 2cb9f40a26..d3936298a1 100644 --- a/indra/llaudio/llaudioengine.cpp +++ b/indra/llaudio/llaudioengine.cpp @@ -832,7 +832,7 @@ F64 LLAudioEngine::mapWindVecToPan(LLVector3 wind_vec) void LLAudioEngine::triggerSound(const LLUUID &audio_uuid, const LLUUID& owner_id, const F32 gain, - const S32 type, const LLVector3d &pos_global, const LLUUID& source_object) + const S32 type, const LLVector3d &pos_global, const LLUUID& source_object, const LLUUID& audio_source_id) { // Create a new source (since this can't be associated with an existing source. //LL_INFOS() << "Localized: " << audio_uuid << LL_ENDL; @@ -843,8 +843,11 @@ void LLAudioEngine::triggerSound(const LLUUID &audio_uuid, const LLUUID& owner_i return; } - LLUUID source_id; - source_id.generate(); + LLUUID source_id = audio_source_id; + if (source_id.isNull()) + { + source_id.generate(); + } LLAudioSource *asp = new LLAudioSource(source_id, owner_id, gain, type, source_object, true); addAudioSource(asp); diff --git a/indra/llaudio/llaudioengine.h b/indra/llaudio/llaudioengine.h index 3e2bf542fb..245bf3c6ad 100644 --- a/indra/llaudio/llaudioengine.h +++ b/indra/llaudio/llaudioengine.h @@ -150,7 +150,8 @@ public: void triggerSound(const LLUUID &sound_id, const LLUUID& owner_id, const F32 gain, const S32 type = LLAudioEngine::AUDIO_TYPE_NONE, const LLVector3d &pos_global = LLVector3d::zero, - const LLUUID& source_object = LLUUID::null); + const LLUUID& source_object = LLUUID::null, + const LLUUID& audio_source_id = LLUUID::null); // NaCl End void triggerSound(SoundData& soundData); diff --git a/indra/newview/NACLfloaterexploresounds.cpp b/indra/newview/NACLfloaterexploresounds.cpp index c9e27c5fd4..9d6c38897c 100644 --- a/indra/newview/NACLfloaterexploresounds.cpp +++ b/indra/newview/NACLfloaterexploresounds.cpp @@ -63,6 +63,14 @@ NACLFloaterExploreSounds::~NACLFloaterExploreSounds() } } mBlacklistAvatarNameCacheConnections.clear(); + + uuid_list_t::iterator audio_source_id_iter = mLocalPlayingAudioSourceIDs.begin(); + uuid_list_t::iterator audio_source_id_end = mLocalPlayingAudioSourceIDs.end(); + for (; audio_source_id_iter != audio_source_id_end; ++audio_source_id_iter) + { + delete *audio_source_id_iter; + } + mLocalPlayingAudioSourceIDs.clear(); } BOOL NACLFloaterExploreSounds::postBuild() @@ -71,6 +79,7 @@ BOOL NACLFloaterExploreSounds::postBuild() getChild("look_at_btn")->setClickedCallback(boost::bind(&NACLFloaterExploreSounds::handleLookAt, this)); getChild("stop_btn")->setClickedCallback(boost::bind(&NACLFloaterExploreSounds::handleStop, this)); getChild("bl_btn")->setClickedCallback(boost::bind(&NACLFloaterExploreSounds::blacklistSound, this)); + getChild("stop_locally_btn")->setClickedCallback(boost::bind(&NACLFloaterExploreSounds::handleStopLocally, this)); mHistoryScroller = getChild("sound_list"); mHistoryScroller->setCommitCallback(boost::bind(&NACLFloaterExploreSounds::handleSelection, this)); @@ -296,6 +305,32 @@ BOOL NACLFloaterExploreSounds::tick() mHistoryScroller->selectMultiple(selected_ids); mHistoryScroller->setScrollPos(scroll_pos); + // Clean up stopped local audio source IDs + typedef std::vector uuid_vector_t; + uuid_vector_t stopped_audio_src_ids; + uuid_list_t::iterator audio_src_id_iter = mLocalPlayingAudioSourceIDs.begin(); + uuid_list_t::iterator audio_src_id_end = mLocalPlayingAudioSourceIDs.end(); + for (; audio_src_id_iter != audio_src_id_end; ++audio_src_id_iter) + { + LLUUID* audio_src_id = *audio_src_id_iter; + LLAudioSource* audio_source = gAudiop->findAudioSource(*audio_src_id); + if (!audio_source || audio_source->isDone()) + { + stopped_audio_src_ids.push_back(audio_src_id); + } + } + + uuid_vector_t::iterator stopped_audio_src_ids_iter = stopped_audio_src_ids.begin(); + uuid_vector_t::iterator stopped_audio_src_ids_end = stopped_audio_src_ids.end(); + for (; stopped_audio_src_ids_iter != stopped_audio_src_ids_end; ++stopped_audio_src_ids_iter) + { + LLUUID* audio_src_id = *stopped_audio_src_ids_iter; + mLocalPlayingAudioSourceIDs.remove(audio_src_id); + delete audio_src_id; + } + + childSetEnabled("stop_locally_btn", mLocalPlayingAudioSourceIDs.size() > 0); + return FALSE; } @@ -313,9 +348,14 @@ void NACLFloaterExploreSounds::handlePlayLocally() if(std::find(asset_list.begin(), asset_list.end(), item.mAssetID) == asset_list.end()) { asset_list.push_back(item.mAssetID); - gAudiop->triggerSound(item.mAssetID, gAgent.getID(), 1.0f, LLAudioEngine::AUDIO_TYPE_UI); + LLUUID* audio_source_id = new LLUUID(); + audio_source_id->generate(); + gAudiop->triggerSound(item.mAssetID, gAgent.getID(), 1.0f, LLAudioEngine::AUDIO_TYPE_UI, LLVector3d::zero, LLUUID::null, *audio_source_id); + mLocalPlayingAudioSourceIDs.push_back(audio_source_id); } } + + childSetEnabled("stop_locally_btn", mLocalPlayingAudioSourceIDs.size() > 0); } void NACLFloaterExploreSounds::handleLookAt() @@ -384,6 +424,25 @@ void NACLFloaterExploreSounds::handleStop() } } +void NACLFloaterExploreSounds::handleStopLocally() +{ + uuid_list_t::iterator audio_source_id_iter = mLocalPlayingAudioSourceIDs.begin(); + uuid_list_t::iterator audio_source_id_end = mLocalPlayingAudioSourceIDs.end(); + for (; audio_source_id_iter != audio_source_id_end; ++audio_source_id_iter) + { + LLUUID* audio_source_id = *audio_source_id_iter; + LLAudioSource* audio_source = gAudiop->findAudioSource(*audio_source_id); + if (audio_source && !audio_source->isDone()) + { + audio_source->play(LLUUID::null); + } + + delete audio_source_id; + } + + mLocalPlayingAudioSourceIDs.clear(); +} + //add sound to blacklist void NACLFloaterExploreSounds::blacklistSound() { diff --git a/indra/newview/NACLfloaterexploresounds.h b/indra/newview/NACLfloaterexploresounds.h index 33c1da97ce..5397f17adc 100644 --- a/indra/newview/NACLfloaterexploresounds.h +++ b/indra/newview/NACLfloaterexploresounds.h @@ -29,6 +29,7 @@ private: void handlePlayLocally(); void handleLookAt(); void handleStop(); + void handleStopLocally(); void handleSelection(); void blacklistSound(); @@ -41,6 +42,9 @@ private: std::list mLastHistory; + typedef std::list uuid_list_t; + uuid_list_t mLocalPlayingAudioSourceIDs; + typedef std::map blacklist_avatar_name_cache_connection_map_t; blacklist_avatar_name_cache_connection_map_t mBlacklistAvatarNameCacheConnections; diff --git a/indra/newview/skins/default/xui/en/floater_NACL_explore_sounds.xml b/indra/newview/skins/default/xui/en/floater_NACL_explore_sounds.xml index 7fe8c383ab..6a2f5ec867 100644 --- a/indra/newview/skins/default/xui/en/floater_NACL_explore_sounds.xml +++ b/indra/newview/skins/default/xui/en/floater_NACL_explore_sounds.xml @@ -47,6 +47,7 @@