diff --git a/app/src/aboutdialog.cpp b/app/src/aboutdialog.cpp index df2881d4d..6a6c1d9dd 100644 --- a/app/src/aboutdialog.cpp +++ b/app/src/aboutdialog.cpp @@ -39,15 +39,24 @@ AboutDialog::~AboutDialog() void AboutDialog::init() { - QStringList devText; - devText << tr("Version: %1", "Version Number in About Dialog").arg(APP_VERSION); -#if defined(GIT_EXISTS) && defined(NIGHTLY_BUILD) - devText << "commit: " S__GIT_COMMIT_HASH - << "date: " S__GIT_TIMESTAMP; -#endif -#if !defined(PENCIL2D_RELEASE) + QStringList devText; + +#if defined(PENCIL2D_RELEASE_BUILD) + devText << tr("Version: %1", "Version Number in About Dialog").arg(APP_VERSION); +#elif defined(PENCIL2D_NIGHTLY_BUILD) + devText << "Nightly build"; +#else devText << "Development build"; #endif + + devText << ""; // An empty line + +#if defined(GIT_EXISTS) + devText << "commit: " S__GIT_COMMIT_HASH + << "date: " S__GIT_TIMESTAMP + << ""; +#endif + devText << QString("Operating System: %1").arg(QSysInfo::prettyProductName()) << QString("CPU Architecture: %1").arg(QSysInfo::buildCpuArchitecture()); if(QString(qVersion()) == QT_VERSION_STR) diff --git a/app/src/mainwindow2.cpp b/app/src/mainwindow2.cpp index ad7950902..c8b6b0a8a 100644 --- a/app/src/mainwindow2.cpp +++ b/app/src/mainwindow2.cpp @@ -80,8 +80,8 @@ GNU General Public License for more details. #define BUILD_DATE __DATE__ #endif -#ifdef NIGHTLY_BUILD -#define PENCIL_WINDOW_TITLE QString("[*]Pencil2D - Nightly Build %1").arg( BUILD_DATE ) +#ifdef PENCIL2D_NIGHTLY_BUILD +#define PENCIL_WINDOW_TITLE QString("[*]Pencil2D - Nightly Build %1").arg(BUILD_DATE) #else #define PENCIL_WINDOW_TITLE QString("[*]Pencil2D v%1").arg(APP_VERSION) #endif diff --git a/common.pri b/common.pri index a9158568f..81cc44537 100644 --- a/common.pri +++ b/common.pri @@ -2,8 +2,13 @@ VERSION = 0.6.4 DEFINES += APP_VERSION=\\\"$$VERSION\\\" -NIGHTLY { - DEFINES += NIGHTLY_BUILD +PENCIL2D_NIGHTLY { + DEFINES += PENCIL2D_NIGHTLY_BUILD +} + +PENCIL2D_RELEASE { + DEFINES += QT_NO_DEBUG_OUTPUT + DEFINES += PENCIL2D_RELEASE_BUILD } CONFIG += c++11 diff --git a/core_lib/src/util/pencilerror.cpp b/core_lib/src/util/pencilerror.cpp index 433c44c73..56a69d112 100644 --- a/core_lib/src/util/pencilerror.cpp +++ b/core_lib/src/util/pencilerror.cpp @@ -62,11 +62,14 @@ void DebugDetails::appendSystemInfo() #if QT_VERSION >= 0x050400 mDetails << "System Info"; -#if !defined(PENCIL2D_RELEASE) - mDetails << "Pencil version: " APP_VERSION " (dev)"; -#else +#if defined(PENCIL2D_RELEASE_BUILD) mDetails << "Pencil version: " APP_VERSION " (stable)"; +#elif defined(PENCIL2D_NIGHTLY_BUILD) + mDetails << "Pencil version: " APP_VERSION " (nightly)"; +#else + mDetails << "Pencil version: " APP_VERSION " (dev)"; #endif + #if defined(GIT_EXISTS) mDetails << "Commit: " S__GIT_COMMIT_HASH; #endif