diff options
| author | Felix Domke <tmbinc@elitedvb.net> | 2006-04-06 09:26:53 +0000 |
|---|---|---|
| committer | Felix Domke <tmbinc@elitedvb.net> | 2006-04-06 09:26:53 +0000 |
| commit | 4d2d58662cca3fcd12bea15482dd13359bc208ad (patch) | |
| tree | 54c9a12d84f94c5939a45ba3de97f64a0f9c3492 /main | |
| parent | 9ede0c7dfec7b949e13970725e370189035eb4c7 (diff) | |
| download | enigma2-4d2d58662cca3fcd12bea15482dd13359bc208ad.tar.gz enigma2-4d2d58662cca3fcd12bea15482dd13359bc208ad.zip | |
add some CVS information into crashlog
Diffstat (limited to 'main')
| -rw-r--r-- | main/Makefile.am | 14 | ||||
| -rw-r--r-- | main/bsod.cpp | 12 |
2 files changed, 26 insertions, 0 deletions
diff --git a/main/Makefile.am b/main/Makefile.am index 636c6ffa..abc71cdd 100644 --- a/main/Makefile.am +++ b/main/Makefile.am @@ -6,6 +6,20 @@ bin_PROGRAMS = enigma2 enigma2_SOURCES = \ enigma.cpp bsod.cpp +bsod.o: version.h + +# when there is no ../CVS/Entries, don't worry. +../CVS/Entries: + +../CVS/Root: + +# this depends on Entries and not on Tag because Tag isn't always there. +# Entries, however, will change then Tag is changed, so everything is fine. +version.h: ../CVS/Entries ../CVS/Root + > version.h + if [ -f ../CVS/Tag ]; then echo "#define ENIGMA2_CHECKOUT_TAG \"`cat ../CVS/Tag`\"" >> version.h; fi + if [ -f ../CVS/Root ]; then echo "#define ENIGMA2_CHECKOUT_ROOT \"`cat ../CVS/Root`\"" >> version.h; fi + enigma2_LDADD_WHOLE = \ $(top_builddir)/lib/actions/libenigma_actions.a \ $(top_builddir)/lib/base/libenigma_base.a \ diff --git a/main/bsod.cpp b/main/bsod.cpp index dd274eca..10021787 100644 --- a/main/bsod.cpp +++ b/main/bsod.cpp @@ -7,6 +7,8 @@ #include <lib/gdi/grc.h> #include <lib/gdi/gfbdc.h> +#include "version.h" + /************************************************/ #define CRASH_EMAILADDR "crashlog@dream-multimedia-tv.de" @@ -72,6 +74,14 @@ void bsodFatal() { time_t t = time(0); fprintf(f, "enigma2 crashed on %s", ctime(&t)); +#ifdef ENIGMA2_CHECKOUT_TAG + fprintf(f, "enigma2 CVS TAG: " ENIGMA2_CHECKOUT_TAG "\n"); +#else + fprintf(f, "enigma2 compiled on " __DATE__ "\n"); +#endif +#ifdef ENIGMA2_CHECKOUT_ROOT + fprintf(f, "enigma2 checked out from " ENIGMA2_CHECKOUT_ROOT "\n"); +#endif fprintf(f, "please email this file to " CRASH_EMAILADDR "\n"); std::string buffer = getLogBuffer(); fwrite(buffer.c_str(), buffer.size(), 1, f); @@ -83,6 +93,7 @@ void bsodFatal() { gPainter p(my_dc); + p.resetOffset(); p.resetClip(eRect(ePoint(0, 0), my_dc->size())); p.setBackgroundColor(gRGB(0x0000C0)); p.setForegroundColor(gRGB(0xFFFFFF)); @@ -120,6 +131,7 @@ void bsodFatal() p.renderText(usable_area, lines.substr(start), gPainter::RT_HALIGN_LEFT); + p.flush(); } raise(SIGKILL); |
