Skip to content

Commit

Permalink
Add the build system to the crash dialog
Browse files Browse the repository at this point in the history
  • Loading branch information
sjoelund committed Dec 8, 2016
1 parent 75245d0 commit 01d9403
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 5 deletions.
14 changes: 9 additions & 5 deletions OMEdit/OMEditGUI/CrashReport/CrashReportDialog.cpp
Expand Up @@ -60,14 +60,18 @@ CrashReportDialog::CrashReportDialog()
// bug description label and textbox
mpBugDescriptionLabel = new Label(tr("Describe in a few words what you were doing when the error occurred:"));
mpBugDescriptionTextBox = new QPlainTextEdit(
QString("OMEdit %1 connected to OMC %2.\nMy OS is %3 and CPU architecture is %4.\n").arg(GIT_SHA).arg(Helper::OpenModelicaVersion).arg(
QString("OMEdit %1 connected to OMC %2%5.\nThe running OS is %3 on %4.\n").arg(GIT_SHA,Helper::OpenModelicaVersion,
#if (QT_VERSION >= QT_VERSION_CHECK(5, 4, 0))
QSysInfo::prettyProductName(),
QSysInfo::currentCpuArchitecture()
QSysInfo::prettyProductName(), QSysInfo::currentCpuArchitecture(),
#elif defined(__APPLE__)
"OSX", "unknown (probably amd64)"
"OSX", "unknown (probably amd64)",
#else
"unknown", "unknown"
"unknown", "unknown",
#endif
#if defined(LSB_RELEASE)
" built for " LSB_RELEASE
#else
""
#endif
)
);
Expand Down
1 change: 1 addition & 0 deletions OMEdit/OMEditGUI/omc_config.h.in
@@ -1,2 +1,3 @@
#define CONFIG_DEFAULT_OPENMODELICAHOME "@OPENMODELICAHOME@"
#define GIT_SHA "@SOURCE_REVISION@"
@LSB_RELEASE@
10 changes: 10 additions & 0 deletions configure.ac
Expand Up @@ -12,6 +12,7 @@ AC_SUBST(SOURCE_REVISION)
AC_SUBST(QT4BUILD)
AC_SUBST(QMAKE_CONFIG_OSG)
AC_SUBST(LIBOSG)
AC_SUBST(LSB_RELEASE)

m4_include([common/m4/pre-commit.m4])
cp common/install-sh common/config.guess common/config.sub ./
Expand Down Expand Up @@ -100,6 +101,15 @@ for flag in -Wno-clobbered -Wno-unused-variable -Wno-unused-function -Wno-unused
AC_TRY_LINK([], [return 0;], [CXXFLAGS="$OLD_CXXFLAGS $flag"],[CXXFLAGS="$OLD_CXXFLAGS"])
done

AC_MSG_CHECKING([for LSB description])
LSB_RELEASE="`lsb_release -ds | tr -d '\"'`"
if test ! -z "$LSB_RELEASE"; then
AC_MSG_RESULT([$LSB_RELEASE])
LSB_RELEASE="#define LSB_RELEASE \"$LSB_RELEASE\""
else
AC_MSG_RESULT([no])
fi

m4_include([common/m4/semver.m4])
SOURCE_REVISION="$SOURCE_REVISION$NON_FREE_VERSION"

Expand Down

0 comments on commit 01d9403

Please sign in to comment.