# HG changeset patch # User unc0rr # Date 1210086782 0 # Node ID a5b0b93a39c8e849901ada965ec2f51914ee89d1 # Parent 1cc10dde304cf6efc182208227e2d8b98d4e0343 Use constant generated by cmake for version string diff -r 1cc10dde304c -r a5b0b93a39c8 CMakeLists.txt --- a/CMakeLists.txt Tue May 06 15:00:03 2008 +0000 +++ b/CMakeLists.txt Tue May 06 15:13:02 2008 +0000 @@ -2,6 +2,10 @@ cmake_minimum_required(VERSION 2.4.4 FATAL_ERROR) +set(CPACK_PACKAGE_VERSION_MAJOR "0") +set(CPACK_PACKAGE_VERSION_MINOR "9") +set(CPACK_PACKAGE_VERSION_PATCH "4-dev") + if(DEFINED DATA_INSTALL_DIR) set(SHAREPATH ${DATA_INSTALL_DIR}/hedgewars/) else(DEFINED DATA_INSTALL_DIR) @@ -9,6 +13,7 @@ endif(DEFINED DATA_INSTALL_DIR) set(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin) +set(HEDGEWARS_VERSION "${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}") set(HEDGEWARS_PROTO_VER 11) add_subdirectory(bin) @@ -20,14 +25,11 @@ set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Hedgewars, a turn-based strategy") set(CPACK_PACKAGE_VENDOR "Hedgewars") -set(CPACK_PACKAGE_VERSION_MAJOR "0") -set(CPACK_PACKAGE_VERSION_MINOR "9") -set(CPACK_PACKAGE_VERSION_PATCH "3") -set(CPACK_PACKAGE_FILE_NAME "hedgewars-${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}") -set(CPACK_SOURCE_PACKAGE_FILE_NAME "hedgewars-src-${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}") +set(CPACK_PACKAGE_FILE_NAME "hedgewars-${HEDGEWARS_VERSION}") +set(CPACK_SOURCE_PACKAGE_FILE_NAME "hedgewars-src-${HEDGEWARS_VERSION}") set(CPACK_PACKAGE_EXECUTABLES "hedgewars" "hedgewars") set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/COPYING") -set(CPACK_PACKAGE_INSTALL_DIRECTORY "Hedgewars ${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}") +set(CPACK_PACKAGE_INSTALL_DIRECTORY "Hedgewars ${HEDGEWARS_VERSION}") if(WIN32 AND NOT UNIX) set(CPACK_NSIS_DISPLAY_NAME "Hedgewars, a turn-based Worms-like strategy") diff -r 1cc10dde304c -r a5b0b93a39c8 QTfrontend/about.cpp --- a/QTfrontend/about.cpp Tue May 06 15:00:03 2008 +0000 +++ b/QTfrontend/about.cpp Tue May 06 15:13:02 2008 +0000 @@ -21,6 +21,7 @@ #include #include #include "about.h" +#include "hwconsts.h" About::About(QWidget * parent) : QWidget(parent) @@ -34,8 +35,8 @@ lbl1->setOpenExternalLinks(true); lbl1->setText( - "

Hedgewars

" + - QLabel::tr("

Version 0.9.3

") + + "

Hedgewars

" + "

" + QLabel::tr("Version") + " " + *cVersionString + "

" "

http://www.hedgewars.org/


" + QLabel::tr("This program is distributed under the GNU General Public License") + "
" diff -r 1cc10dde304c -r a5b0b93a39c8 QTfrontend/hwconsts.cpp.in --- a/QTfrontend/hwconsts.cpp.in Tue May 06 15:00:03 2008 +0000 +++ b/QTfrontend/hwconsts.cpp.in Tue May 06 15:13:02 2008 +0000 @@ -20,6 +20,7 @@ QString * cProtoVer = new QString("${HEDGEWARS_PROTO_VER}"); QString * cDataDir = new QString("${HEDGEWARS_DATADIR}"); +QString * cVersionString = new QString("${HEDGEWARS_VERSION}"); QDir * bindir = new QDir("${HEDGEWARS_BINDIR}"); QDir * cfgdir = new QDir(); diff -r 1cc10dde304c -r a5b0b93a39c8 QTfrontend/hwconsts.h --- a/QTfrontend/hwconsts.h Tue May 06 15:00:03 2008 +0000 +++ b/QTfrontend/hwconsts.h Tue May 06 15:13:02 2008 +0000 @@ -22,6 +22,7 @@ #include extern QString * cProtoVer; +extern QString * cVersionString; extern QString * cDataDir; extern QDir * bindir; diff -r 1cc10dde304c -r a5b0b93a39c8 hedgewars/hwengine.dpr --- a/hedgewars/hwengine.dpr Tue May 06 15:00:03 2008 +0000 +++ b/hedgewars/hwengine.dpr Tue May 06 15:13:02 2008 +0000 @@ -291,7 +291,7 @@ //////////////////////////////////////////////////////////////////////////////// begin -WriteLnToConsole('-= HedgeWars 0.9.3 =-'); +WriteLnToConsole('-= Hedgewars ' + cVersionString + ' =-'); WriteLnToConsole(' -= by unC0Rr =- '); GetParams; Randomize; diff -r 1cc10dde304c -r a5b0b93a39c8 hedgewars/proto.inc.in --- a/hedgewars/proto.inc.in Tue May 06 15:00:03 2008 +0000 +++ b/hedgewars/proto.inc.in Tue May 06 15:13:02 2008 +0000 @@ -17,3 +17,4 @@ *) const cNetProtoVersion = ${HEDGEWARS_PROTO_VER}; + cVersionString = '${HEDGEWARS_VERSION}';