From c8726aba303bcf1207b730a344536e25491420bc Mon Sep 17 00:00:00 2001 From: Oz Linden Date: Tue, 10 Nov 2015 09:48:56 -0500 Subject: remove execute permission from many files that should not have it --- indra/cmake/BuildVersion.cmake | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100755 => 100644 indra/cmake/BuildVersion.cmake (limited to 'indra/cmake/BuildVersion.cmake') diff --git a/indra/cmake/BuildVersion.cmake b/indra/cmake/BuildVersion.cmake old mode 100755 new mode 100644 -- cgit v1.3 From b46627ffc4f9dd72d252121768da8cd91f185f63 Mon Sep 17 00:00:00 2001 From: Oz Linden Date: Thu, 4 Feb 2016 23:32:42 -0500 Subject: add build configuration to the About box if it is not Release remove some superfluous other information from About --- indra/cmake/BuildVersion.cmake | 1 + indra/newview/llappviewer.cpp | 27 +++++++++----------------- indra/newview/llversioninfo.cpp | 5 +++++ indra/newview/llversioninfo.h | 3 +++ indra/newview/skins/default/xui/en/strings.xml | 13 +++++-------- 5 files changed, 23 insertions(+), 26 deletions(-) (limited to 'indra/cmake/BuildVersion.cmake') diff --git a/indra/cmake/BuildVersion.cmake b/indra/cmake/BuildVersion.cmake index e618a988b8..389ded1d98 100644 --- a/indra/cmake/BuildVersion.cmake +++ b/indra/cmake/BuildVersion.cmake @@ -53,5 +53,6 @@ if (NOT DEFINED VIEWER_SHORT_VERSION) # will be true in indra/, false in indra/n "LL_VIEWER_VERSION_MINOR=${VIEWER_VERSION_MINOR}" "LL_VIEWER_VERSION_PATCH=${VIEWER_VERSION_PATCH}" "LL_VIEWER_VERSION_BUILD=${VIEWER_VERSION_REVISION}" + "LLBUILD_CONFIG=\"${CMAKE_BUILD_TYPE}\"" ) endif (NOT DEFINED VIEWER_SHORT_VERSION) diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 1341cde95f..18baf6bf00 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -3310,6 +3310,11 @@ LLSD LLAppViewer::getViewerInfo() const info["VIEWER_VERSION"] = version; info["VIEWER_VERSION_STR"] = LLVersionInfo::getVersion(); info["CHANNEL"] = LLVersionInfo::getChannel(); + std::string build_config = LLVersionInfo::getBuildConfig(); + if (build_config != "Release") + { + info["BUILD_CONFIG"] = build_config; + } // return a URL to the release notes for this viewer, such as: // http://wiki.secondlife.com/wiki/Release_Notes/Second Life Beta Viewer/2.1.0.123456 @@ -3321,14 +3326,6 @@ LLSD LLAppViewer::getViewerInfo() const info["VIEWER_RELEASE_NOTES_URL"] = url; -#if LL_MSVC - info["COMPILER"] = "MSVC"; - info["COMPILER_VERSION"] = _MSC_VER; -#elif LL_GNUC - info["COMPILER"] = "GCC"; - info["COMPILER_VERSION"] = GCC_VERSION; -#endif - // Position LLViewerRegion* region = gAgent.getRegion(); if (region) @@ -3362,10 +3359,6 @@ LLSD LLAppViewer::getViewerInfo() const #endif info["OPENGL_VERSION"] = (const char*)(glGetString(GL_VERSION)); - info["LIBCURL_VERSION"] = LLCurl::getVersionString(); - info["J2C_VERSION"] = LLImageJ2C::getEngineInfo(); - bool want_fullname = true; - info["AUDIO_DRIVER_VERSION"] = gAudiop ? LLSD(gAudiop->getDriverName(want_fullname)) : LLSD(); if(LLVoiceClient::getInstance()->voiceEnabled()) { LLVoiceVersionInfo version = LLVoiceClient::getInstance()->getVersion(); @@ -3378,12 +3371,6 @@ LLSD LLAppViewer::getViewerInfo() const info["VOICE_VERSION"] = LLTrans::getString("NotConnected"); } -#if !LL_LINUX - info["LLCEFLIB_VERSION"] = LLCEFLIB_VERSION; -#else - info["LLCEFLIB_VERSION"] = "Undefined"; -#endif - S32 packets_in = LLViewerStats::instance().getRecording().getSum(LLStatViewer::PACKETS_IN); if (packets_in > 0) { @@ -3455,6 +3442,10 @@ std::string LLAppViewer::getViewerInfoString() const // Now build the various pieces support << LLTrans::getString("AboutHeader", args); + if (info.has("BUILD_CONFIG")) + { + support << "\n" << LLTrans::getString("BuildConfig", args); + } if (info.has("REGION")) { support << "\n\n" << LLTrans::getString("AboutPosition", args); diff --git a/indra/newview/llversioninfo.cpp b/indra/newview/llversioninfo.cpp index e53de8be32..a0ca91672a 100644 --- a/indra/newview/llversioninfo.cpp +++ b/indra/newview/llversioninfo.cpp @@ -172,3 +172,8 @@ LLVersionInfo::ViewerMaturity LLVersionInfo::getViewerMaturity() } +const std::string &LLVersionInfo::getBuildConfig() +{ + static const std::string build_configuration(LLBUILD_CONFIG); // set in indra/cmake/BuildVersion.cmake + return build_configuration; +} diff --git a/indra/newview/llversioninfo.h b/indra/newview/llversioninfo.h index 4e75535ec5..ec599c0cda 100644 --- a/indra/newview/llversioninfo.h +++ b/indra/newview/llversioninfo.h @@ -66,6 +66,9 @@ public: /// return the channel name, e.g. "Second Life" static const std::string &getChannel(); + /// return the CMake build type + static const std::string &getBuildConfig(); + /// reset the channel name used by the viewer. static void resetChannel(const std::string& channel); diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml index 5266400e77..8c676292b1 100644 --- a/indra/newview/skins/default/xui/en/strings.xml +++ b/indra/newview/skins/default/xui/en/strings.xml @@ -22,10 +22,11 @@ -[APP_NAME] [VIEWER_VERSION_0].[VIEWER_VERSION_1].[VIEWER_VERSION_2].[VIEWER_VERSION_3] [BUILD_DATE] [BUILD_TIME] ([CHANNEL]) +[APP_NAME] [VIEWER_VERSION_0].[VIEWER_VERSION_1].[VIEWER_VERSION_2].[VIEWER_VERSION_3] ([CHANNEL]) [[VIEWER_RELEASE_NOTES_URL] [ReleaseNotes]] - Built with [COMPILER] version [COMPILER_VERSION] + Build Configuration [BUILD_CONFIG] + You are at [POSITION_LOCAL_0,number,1], [POSITION_LOCAL_1,number,1], [POSITION_LOCAL_2,number,1] in [REGION] located at <nolink>[HOSTNAME]</nolink> ([HOSTIP]) SLURL: <nolink>[SLURL]</nolink> @@ -46,16 +47,12 @@ Graphics Card: [GRAPHICS_CARD] Windows Graphics Driver Version: [GRAPHICS_DRIVER_VERSION] OpenGL Version: [OPENGL_VERSION] - -libcurl Version: [LIBCURL_VERSION] -J2C Decoder Version: [J2C_VERSION] -Audio Driver Version: [AUDIO_DRIVER_VERSION] -LLCEFLib/CEF Version: [LLCEFLIB_VERSION] Voice Server Version: [VOICE_VERSION] Packets Lost: [PACKETS_LOST,number,0]/[PACKETS_IN,number,0] ([PACKETS_PCT,number,1]%) Error fetching server release notes URL. - + Build Configuration + Restoring... Changing resolution... -- cgit v1.3 From 4fd57774dd8491ffc760114b6d89fd0ab1989bbd Mon Sep 17 00:00:00 2001 From: Oz Linden Date: Sun, 7 Feb 2016 14:58:47 -0800 Subject: OPEN-297 simplify build number generation --- doc/contributions.txt | 1 + indra/cmake/BuildVersion.cmake | 46 ++++++++++++++++++++++++------------------ 2 files changed, 27 insertions(+), 20 deletions(-) (limited to 'indra/cmake/BuildVersion.cmake') diff --git a/doc/contributions.txt b/doc/contributions.txt index 1608b65033..f086ed2716 100755 --- a/doc/contributions.txt +++ b/doc/contributions.txt @@ -319,6 +319,7 @@ Cinder Roxley OPEN-185 OPEN-282 OPEN-292 + OPEN-297 STORM-1703 STORM-1948 STORM-1831 diff --git a/indra/cmake/BuildVersion.cmake b/indra/cmake/BuildVersion.cmake index 389ded1d98..195d6e705e 100644 --- a/indra/cmake/BuildVersion.cmake +++ b/indra/cmake/BuildVersion.cmake @@ -15,27 +15,33 @@ if (NOT DEFINED VIEWER_SHORT_VERSION) # will be true in indra/, false in indra/n message("Revision (from environment): ${VIEWER_VERSION_REVISION}") else (DEFINED ENV{revision}) - find_program(MERCURIAL hg) - find_program(WORDCOUNT wc) - find_program(SED sed) - if (DEFINED MERCURIAL AND DEFINED WORDCOUNT AND DEFINED SED) - execute_process( - COMMAND ${MERCURIAL} log -r tip:0 --template '\\n' - COMMAND ${WORDCOUNT} -l - COMMAND ${SED} "s/ //g" - OUTPUT_VARIABLE VIEWER_VERSION_REVISION - OUTPUT_STRIP_TRAILING_WHITESPACE - ) - if ("${VIEWER_VERSION_REVISION}" MATCHES "^[0-9]+$") - message("Revision (from hg) ${VIEWER_VERSION_REVISION}") - else ("${VIEWER_VERSION_REVISION}" MATCHES "^[0-9]+$") - message("Revision not set (repository not found?); using 0") - set(VIEWER_VERSION_REVISION 0 ) - endif ("${VIEWER_VERSION_REVISION}" MATCHES "^[0-9]+$") - else (DEFINED MERCURIAL AND DEFINED WORDCOUNT AND DEFINED SED) - message("Revision not set: 'hg', 'wc' or 'sed' not found; using 0") + find_program(MERCURIAL + NAMES hg + PATHS [HKEY_LOCAL_MACHINE\\Software\\TortoiseHG] + PATH_SUFFIXES Mercurial) + mark_as_advanced(MERCURIAL) + if (MERCURIAL) + execute_process(COMMAND ${MERCURIAL} identify --num --rev tip + WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} + RESULT_VARIABLE hg_id_result + ERROR_VARIABLE hg_id_error + OUTPUT_VARIABLE VIEWER_VERSION_REVISION + OUTPUT_STRIP_TRAILING_WHITESPACE) + if (NOT ${hg_id_result} EQUAL 0) + message(SEND_ERROR "Revision number generation failed with output:\n${hg_id_error}") + else (NOT ${hg_id_result} EQUAL 0) + string(REGEX REPLACE "[^0-9a-f]" "" VIEWER_VERSION_REVISION ${VIEWER_VERSION_REVISION}) + endif (NOT ${hg_id_result} EQUAL 0) + if ("${VIEWER_VERSION_REVISION}" MATCHES "^[0-9]+$") + message("Revision (from hg) ${VIEWER_VERSION_REVISION}") + else ("${VIEWER_VERSION_REVISION}" MATCHES "^[0-9]+$") + message("Revision not set (repository not found?); using 0") + set(VIEWER_VERSION_REVISION 0 ) + endif ("${VIEWER_VERSION_REVISION}" MATCHES "^[0-9]+$") + else (MERCURIAL) + message("Revision not set: mercurial not found; using 0") set(VIEWER_VERSION_REVISION 0) - endif (DEFINED MERCURIAL AND DEFINED WORDCOUNT AND DEFINED SED) + endif (MERCURIAL) endif (DEFINED ENV{revision}) message("Building '${VIEWER_CHANNEL}' Version ${VIEWER_SHORT_VERSION}.${VIEWER_VERSION_REVISION}") else ( EXISTS ${VIEWER_VERSION_BASE_FILE} ) -- cgit v1.3