aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorToni Uhlig <matzeton@googlemail.com>2018-09-23 22:45:03 +0200
committerToni Uhlig <matzeton@googlemail.com>2018-09-23 22:45:03 +0200
commit77387ad5e4303bf4ebc688e1c6a2dc7c0b70163c (patch)
tree89a014be6b6c52068a528d3b54eb32200ffb04d8 /src
parent885cbe9e1c3efc802c58a8d4cce84a9f4dd27899 (diff)
print build information to STDOUT during startup
Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
Diffstat (limited to 'src')
-rw-r--r--src/UpdateGUI.cpp4
-rw-r--r--src/UpdateTool.cpp49
2 files changed, 53 insertions, 0 deletions
diff --git a/src/UpdateGUI.cpp b/src/UpdateGUI.cpp
index e153d16..3379afe 100644
--- a/src/UpdateGUI.cpp
+++ b/src/UpdateGUI.cpp
@@ -42,9 +42,13 @@ wxBEGIN_EVENT_TABLE(UpdateGUILicense, wxFrame)
EVT_BUTTON(wxID_DECLINE, UpdateGUILicense::OnDecline)
wxEND_EVENT_TABLE()
+extern void print_build_details(void);
+
bool UpdateGUI::OnInit()
{
+ print_build_details();
+
if (isLicenseAlreadyAccepted()) {
UpdateGUIFrame *frame = new UpdateGUIFrame("UpdateTool",
wxPoint(50, 50), wxSize(450, 340));
diff --git a/src/UpdateTool.cpp b/src/UpdateTool.cpp
index 1f5ccda..1919801 100644
--- a/src/UpdateTool.cpp
+++ b/src/UpdateTool.cpp
@@ -1,8 +1,51 @@
#include <cstdio>
#include <iostream>
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
#include "UpdateFactory.hpp"
+
+extern void print_build_details(void)
+{
+ std::cout << "[BUILD_DETAILS]" << std::endl
+
+#ifdef UT_GITHASH
+ << "git-hash..: " << UT_GITHASH << std::endl
+#endif
+
+#ifdef UT_BUILDGUI
+ << "with-gui..: " << UT_BUILDGUI << std::endl
+#endif
+
+#ifdef UT_BUILDWIN
+ << "windows...: " << UT_BUILDWIN << std::endl
+#endif
+
+#ifdef UT_CFLAGS
+ << "ut-cflags.: " << UT_CFLAGS << std::endl
+#endif
+
+#ifdef UT_LIBS
+ << "ut-libs...: " << UT_LIBS << std::endl
+#endif
+
+#ifdef WX_CFLAGS
+ << "wx-cflags.: " << WX_CFLAGS << std::endl
+#endif
+
+#ifdef WX_LIBS
+ << "wx-libs...: " << WX_LIBS << std::endl
+#endif
+
+#ifdef WX_VERSION
+ << "wx-version: " << WX_VERSION << std::endl
+#endif
+
+ << std::endl;
+}
+
#ifdef USE_GUI
#include "UpdateGUI.hpp"
@@ -16,6 +59,8 @@ int wmain(int argc, wchar_t* argv[])
int main(int argc, char* argv[])
#endif
{
+ print_build_details();
+
wxEntryStart(argc, argv);
wxTheApp->CallOnInit();
wxTheApp->OnRun();
@@ -33,6 +78,8 @@ int main(int argc, char *argv[])
std::vector<UpdateFactory*> uf;
std::string errstr, hostPorts;
+ print_build_details();
+
if (argc == 0)
return 1;
if (argc == 3) {
@@ -109,6 +156,8 @@ int wmain(int argc, wchar_t* wargv[])
size_t len;
static char **argv = new char*[argc];
+ print_build_details();
+
/* convert wide character argvector to ASCII, dirty .. */
for (int i = 0; i < argc; ++i) {
len = wcslen(wargv[i]) * sizeof(wchar_t);