# HG changeset patch # User koda # Date 1362388118 -3600 # Node ID c1c6b815691e400ee8d9451504b7ba5d5029ef5f # Parent 5dcb1dc9e01b8d8606f6a21c404353eca444b8e3 convert HW_DEV in ifdef DEBUG clauses diff -r 5dcb1dc9e01b -r c1c6b815691e CMakeLists.txt --- a/CMakeLists.txt Sun Mar 03 20:59:27 2013 -0500 +++ b/CMakeLists.txt Mon Mar 04 10:08:38 2013 +0100 @@ -236,8 +236,6 @@ #get BUILD_TYPE and enable/disable optimisation message(STATUS "Using ${CMAKE_BUILD_TYPE} configuration") if(CMAKE_BUILD_TYPE MATCHES "DEBUG") - set(HW_DEV true) #becomes isDevBuild - list(APPEND pascal_flags "-O-" # disable all optimisations "-g" # enable debug symbols "-gl" # add line info to bt @@ -245,8 +243,6 @@ ) list(APPEND haskell_flags "-Wall" "-debug" "-dcore-lint" "-fno-warn-unused-do-bind") else() - set(HW_DEV false) - list(APPEND pascal_flags "-Os" # optimise for size "-Xs" # strip binary "-Si" # turn on inlining diff -r 5dcb1dc9e01b -r c1c6b815691e QTfrontend/hwconsts.cpp.in --- a/QTfrontend/hwconsts.cpp.in Sun Mar 03 20:59:27 2013 -0500 +++ b/QTfrontend/hwconsts.cpp.in Mon Mar 04 10:08:38 2013 +0100 @@ -74,7 +74,6 @@ quint16 netPort = NETGAME_DEFAULT_PORT; bool haveServer = ${HAVE_NETSERVER}; -bool isDevBuild = ${HW_DEV}; int season = SEASON_NONE; int years_since_foundation = 0; diff -r 5dcb1dc9e01b -r c1c6b815691e QTfrontend/hwconsts.h --- a/QTfrontend/hwconsts.h Sun Mar 03 20:59:27 2013 -0500 +++ b/QTfrontend/hwconsts.h Mon Mar 04 10:08:38 2013 +0100 @@ -51,7 +51,6 @@ extern quint16 netPort; extern bool haveServer; -extern bool isDevBuild; //Current season, SEASON_NONE by default extern int season; diff -r 5dcb1dc9e01b -r c1c6b815691e QTfrontend/net/tcpBase.cpp --- a/QTfrontend/net/tcpBase.cpp Sun Mar 03 20:59:27 2013 -0500 +++ b/QTfrontend/net/tcpBase.cpp Mon Mar 04 10:08:38 2013 +0100 @@ -141,9 +141,10 @@ connect(process, SIGNAL(error(QProcess::ProcessError)), this, SLOT(StartProcessError(QProcess::ProcessError))); QStringList arguments=getArguments(); +#ifdef DEBUG // redirect everything written on stdout/stderr - if(isDevBuild) - process->setProcessChannelMode(QProcess::ForwardedChannels); + process->setProcessChannelMode(QProcess::ForwardedChannels); +#endif process->start(bindir->absolutePath() + "/hwengine", arguments); #endif diff -r 5dcb1dc9e01b -r c1c6b815691e QTfrontend/ui/page/pagemain.cpp --- a/QTfrontend/ui/page/pagemain.cpp Sun Mar 03 20:59:27 2013 -0500 +++ b/QTfrontend/ui/page/pagemain.cpp Mon Mar 04 10:08:38 2013 +0100 @@ -127,17 +127,15 @@ { initPage(); - if(frontendEffects) setAttribute(Qt::WA_NoSystemBackground, true); + if(frontendEffects) + setAttribute(Qt::WA_NoSystemBackground, true); mainNote->setOpenExternalLinks(true); - if(!isDevBuild) - { - setDefautDescription(QLabel::tr("Tip: ") + randomTip()); - } - else - { - setDefautDescription(QLabel::tr("This development build is 'work in progress' and may not be compatible with other versions of the game, while some features might be broken or incomplete!")); - } +#ifdef DEBUG + setDefautDescription(QLabel::tr("This development build is 'work in progress' and may not be compatible with other versions of the game, while some features might be broken or incomplete!")); +#else + setDefautDescription(QLabel::tr("Tip: ") + randomTip()); +#endif } diff -r 5dcb1dc9e01b -r c1c6b815691e QTfrontend/ui_hwform.cpp --- a/QTfrontend/ui_hwform.cpp Sun Mar 03 20:59:27 2013 -0500 +++ b/QTfrontend/ui_hwform.cpp Mon Mar 04 10:08:38 2013 +0100 @@ -54,9 +54,10 @@ HWForm->setObjectName(QString::fromUtf8("HWForm")); HWForm->resize(QSize(640, 480).expandedTo(HWForm->minimumSizeHint())); HWForm->setMinimumSize(QSize(720, 450)); - QString suffix = isDevBuild ? - QMainWindow::tr("-r%1 (%2)").arg(*cRevisionString, *cHashString) : QString(""); - QString title = QMainWindow::tr("Hedgewars %1").arg(*cVersionString) + suffix; + QString title = QMainWindow::tr("Hedgewars %1").arg(*cVersionString); +#ifdef DEBUG + title += QMainWindow::tr("-r%1 (%2)").arg(*cRevisionString, *cHashString); +#endif HWForm->setWindowTitle(title); centralWidget = new QWidget(HWForm); centralWidget->setObjectName(QString::fromUtf8("centralWidget"));