diff --git a/browser/admin/adminSettings.html b/browser/admin/adminSettings.html index 5fc74b6f8..150be9513 100644 --- a/browser/admin/adminSettings.html +++ b/browser/admin/adminSettings.html @@ -125,10 +125,12 @@

COOLWSD
+

LOKit
+

diff --git a/browser/admin/src/AdminSocketSettings.js b/browser/admin/src/AdminSocketSettings.js index cebf32eb0..0b572dcea 100644 --- a/browser/admin/src/AdminSocketSettings.js +++ b/browser/admin/src/AdminSocketSettings.js @@ -85,6 +85,7 @@ var AdminSocketSettings = AdminSocketBase.extend({ else { $('#coolwsd-version').text(coolwsdVersionObj.Version); } + $('#coolwsd-buildconfig').html(coolwsdVersionObj.BuildConfig); } else if (textMsg.startsWith('lokitversion ')) { var lokitVersionObj = JSON.parse(textMsg.substring(textMsg.indexOf('{'))); @@ -95,6 +96,7 @@ var AdminSocketSettings = AdminSocketBase.extend({ $('#lokit-version').html(lokitVersionObj.ProductName + ' ' + lokitVersionObj.ProductVersion + lokitVersionObj.ProductExtension + ' (git hash: ' + h + ')'); + $('#lokit-buildconfig').html(lokitVersionObj.BuildConfig); } }, diff --git a/common/Util.cpp b/common/Util.cpp index 149fe1dcf..7134e3fb1 100644 --- a/common/Util.cpp +++ b/common/Util.cpp @@ -8,6 +8,10 @@ #include #include +#ifndef COOLWSD_BUILDCONFIG +#define COOLWSD_BUILDCONFIG +#endif + #include "Util.hpp" #include @@ -635,11 +639,12 @@ namespace Util std::string version, hash; Util::getVersionInfo(version, hash); return - "{ \"Version\": \"" + version + "\", " - "\"Hash\": \"" + hash + "\", " - "\"Protocol\": \"" + COOLProtocol::GetProtocolVersion() + "\", " - "\"Id\": \"" + Util::getProcessIdentifier() + "\", " - "\"Options\": \"" + std::string(enableExperimental ? " (E)" : "") + "\" }"; + "{ \"Version\": \"" + version + "\", " + "\"Hash\": \"" + hash + "\", " + "\"BuildConfig\": \"" + std::string(COOLWSD_BUILDCONFIG) + "\", " + "\"Protocol\": \"" + COOLProtocol::GetProtocolVersion() + "\", " + "\"Id\": \"" + Util::getProcessIdentifier() + "\", " + "\"Options\": \"" + std::string(enableExperimental ? " (E)" : "") + "\" }"; } std::string UniqueId() diff --git a/config.h.in b/config.h.in index 13230c45c..ff441896e 100644 --- a/config.h.in +++ b/config.h.in @@ -12,6 +12,9 @@ /* Enable permanent anonymization in logs */ #undef COOLWSD_ANONYMIZE_USER_DATA +/* Options passed to configure script */ +#undef COOLWSD_BUILDCONFIG + /* Destination for Trace Event output */ #undef COOLWSD_TRACEEVENTFILE diff --git a/configure.ac b/configure.ac index f9763e71a..84b7e0c84 100644 --- a/configure.ac +++ b/configure.ac @@ -58,6 +58,8 @@ AC_DEFINE_UNQUOTED([COOLWSD_VERSION_HASH],[["$COOLWSD_VERSION_HASH"]],[Collabora AC_CONFIG_SRCDIR([wsd/COOLWSD.cpp]) +AC_DEFINE_UNQUOTED([COOLWSD_BUILDCONFIG],[["$ac_configure_args"]],[Options passed to configure script]) + # this is a dummy header, autoheader adds all entries to it # don't include config_unused.h anywhere! AC_CONFIG_HEADERS([config_unused.h])