Ansariel 2019-12-30 18:47:48 +01:00
commit 4fa92819c9
8 changed files with 25 additions and 5 deletions

1
.gitattributes vendored Normal file
View File

@ -0,0 +1 @@
*.sh -text

2
.gitignore vendored
View File

@ -7,7 +7,7 @@
.*.swp
#OSX image cache file
*.DS_Store
#*.orig
*.orig
LICENSES
scripts/install.cache.*
indra/newview/res/viewerRes.rc

View File

@ -9,7 +9,7 @@ if (NOT DEFINED VIEWER_SHORT_VERSION) # will be true in indra/, false in indra/n
string(REGEX REPLACE "^([0-9]+)\\.[0-9]+\\.[0-9]+" "\\1" VIEWER_VERSION_MAJOR ${VIEWER_SHORT_VERSION})
string(REGEX REPLACE "^[0-9]+\\.([0-9]+)\\.[0-9]+" "\\1" VIEWER_VERSION_MINOR ${VIEWER_SHORT_VERSION})
string(REGEX REPLACE "^[0-9]+\\.[0-9]+\\.([0-9]+)" "\\1" VIEWER_VERSION_PATCH ${VIEWER_SHORT_VERSION})
if (DEFINED ENV{revision})
set(VIEWER_VERSION_REVISION $ENV{revision})
message("Revision (from environment): ${VIEWER_VERSION_REVISION}")
@ -64,6 +64,7 @@ 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}"
"FS_VIEWER_VERSION_GITHASH=${VIEWER_VERSION_GITHASH}"
"LLBUILD_CONFIG=\"${CMAKE_BUILD_TYPE}\""
)
endif (NOT DEFINED VIEWER_SHORT_VERSION)

View File

@ -42,7 +42,9 @@
#define LL_VIEWER_VERSION_MINOR @VIEWER_VERSION_MINOR@
#define LL_VIEWER_VERSION_PATCH @VIEWER_VERSION_PATCH@
#define LL_VIEWER_VERSION_BUILD @VIEWER_VERSION_REVISION@
const std::string LL_VIEWER_VERSION_GITHASH {@VIEWER_VERSION_GITHASH@};
#define LLBUILD_CONFIG "@CMAKE_BUILD_TYPE@"
// </FS:TS>
#endif

View File

@ -4196,7 +4196,11 @@ void LLAppViewer::writeSystemInfo()
// Dump some debugging info
LL_INFOS("SystemInfo") << "Application: " << LLTrans::getString("APP_NAME") << LL_ENDL;
LL_INFOS("SystemInfo") << "Version: " << LLVersionInfo::getChannelAndVersion() << LL_ENDL;
// <FS:ND> Print into about git sha hash this build is based on.
// LL_INFOS("SystemInfo") << "Version: " << LLVersionInfo::getChannelAndVersion() << LL_ENDL;
LL_INFOS("SystemInfo") << "Version: " << LLVersionInfo::getChannelAndVersion() << " [" << LLVersionInfo::getGitHash() << "]" << LL_ENDL;
// </FS:ND>
// Dump the local time and time zone
time_t now;

View File

@ -268,3 +268,9 @@ const std::string &LLVersionInfo::getBuildConfig()
static const std::string build_configuration(LLBUILD_CONFIG); // set in indra/cmake/BuildVersion.cmake
return build_configuration;
}
//<FS:ND> return hash of HEAD
std::string LLVersionInfo::getGitHash()
{
return LL_VIEWER_VERSION_GITHASH;
}

View File

@ -98,6 +98,10 @@ public:
RELEASE_VIEWER
} ViewerMaturity;
static ViewerMaturity getViewerMaturity();
//<FS:ND> return hash of HEAD
static std::string getGitHash();
// </FS:ND>
};
#endif

View File

@ -405,8 +405,10 @@ 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`
echo "Channel : ${CHANNEL}"
echo "Version : ${majorVer}.${minorVer}.${patchVer}.${buildVer}"
echo "Version : ${majorVer}.${minorVer}.${patchVer}.${buildVer} [${gitHash}]"
GITHASH=-DVIEWER_VERSION_GITHASH=\"${gitHash}\"
popd
fi
@ -505,7 +507,7 @@ if [ $WANTS_CONFIG -eq $TRUE ] ; then
UNATTENDED="-DUNATTENDED=ON"
fi
cmake -G "$TARGET" ../indra $CHANNEL $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 $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