From 495475cb1a4e444dc35a3c72f2f59221b0bfd3ef Mon Sep 17 00:00:00 2001 From: Rye Mutt <rye@alchemyviewer.org> Date: Fri, 12 Jan 2024 18:08:36 -0500 Subject: [PATCH] Add build expirey off switch --- indra/cmake/Variables.cmake | 2 ++ indra/newview/CMakeLists.txt | 4 ++++ indra/newview/llversioninfo.cpp | 3 +++ 3 files changed, 9 insertions(+) diff --git a/indra/cmake/Variables.cmake b/indra/cmake/Variables.cmake index 177456c1e41..2b9e0ee7180 100644 --- a/indra/cmake/Variables.cmake +++ b/indra/cmake/Variables.cmake @@ -48,6 +48,8 @@ set(VIEWER_SYMBOL_FILE "" CACHE STRING "Name of tarball into which to place symb option(USE_CEF "Enable CEF media plugin" ON) option(USE_VLC "Enable VLC media plugin" ON) +option(BUILD_EXPIREY "Use build expirey system" ON) + if(LIBS_CLOSED_DIR) file(TO_CMAKE_PATH "${LIBS_CLOSED_DIR}" LIBS_CLOSED_DIR) else(LIBS_CLOSED_DIR) diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index 5f14ea04447..7976f75778b 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -2149,6 +2149,10 @@ if( TARGET media_plugin_libvlc ) target_compile_definitions(${VIEWER_BINARY_NAME} PRIVATE USE_VLC=1) endif() +if(BUILD_EXPIREY) + target_compile_definitions(${VIEWER_BINARY_NAME} PRIVATE BUILD_EXPIREY=1) +endif() + if(USE_NFD) target_link_libraries(${VIEWER_BINARY_NAME} PUBLIC nfd ) endif() diff --git a/indra/newview/llversioninfo.cpp b/indra/newview/llversioninfo.cpp index 6427f0248e0..5f51414338f 100644 --- a/indra/newview/llversioninfo.cpp +++ b/indra/newview/llversioninfo.cpp @@ -185,6 +185,7 @@ std::string LLVersionInfo::getReleaseNotes() bool LLVersionInfo::isViewerExpired() { +#ifdef BUILD_EXPIREY static const U64 BUILD_TIME(UNIX_TIMESTAMP); static const U64Seconds TEST_EXPIREY(BUILD_TIME + ((60 * 60) * 24 * 14)); // 14 days static const U64Seconds PROJECT_EXPIREY(BUILD_TIME + ((60 * 60) * 24 * 30)); // 30 days @@ -210,5 +211,7 @@ bool LLVersionInfo::isViewerExpired() break; } } +#endif return false; + } -- GitLab