Frontend:
authorsmxx
Fri, 26 Mar 2010 12:16:12 +0000
changeset 3074 271cfcb2bcda
parent 3073 c22b395b6a2e
child 3075 b4ef08187d22
Frontend: * Added text notice to main screen if build is a dev build
CMakeLists.txt
QTfrontend/hwconsts.cpp.in
QTfrontend/hwconsts.h
QTfrontend/pages.cpp
--- a/CMakeLists.txt	Fri Mar 26 09:40:26 2010 +0000
+++ b/CMakeLists.txt	Fri Mar 26 12:16:12 2010 +0000
@@ -2,19 +2,24 @@
 
 cmake_minimum_required(VERSION 2.6.0 FATAL_ERROR)
 
-if(COMMAND cmake_policy)
+IF(COMMAND cmake_policy)
 	cmake_policy(SET CMP0003 NEW)
-endif(COMMAND cmake_policy)
+ENDIF(COMMAND cmake_policy)
 
 #detect subversion revision (if present)
 set(version_suffix "-dev") #UNSET THIS VARIABLE AT RELEASE TIME
-IF (version_suffix MATCHES "-dev" AND EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/.svn) 
-FIND_PACKAGE(Subversion)
-IF(Subversion_FOUND)
-	Subversion_WC_INFO(${CMAKE_HOME_DIRECTORY} Project)
-	MESSAGE(STATUS "Builing revision ${Project_WC_REVISION}")
-	set(version_suffix ".${Project_WC_REVISION}")
-ENDIF(Subversion_FOUND)
+IF(version_suffix MATCHES "-dev")
+	set(HW_DEV true)
+	IF (EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/.svn) 
+		FIND_PACKAGE(Subversion)
+		IF(Subversion_FOUND)
+			Subversion_WC_INFO(${CMAKE_HOME_DIRECTORY} Project)
+			MESSAGE(STATUS "Builing revision ${Project_WC_REVISION}")
+			set(version_suffix ".${Project_WC_REVISION}")
+		ENDIF(Subversion_FOUND)
+	ENDIF()
+ELSE()
+	set(HW_DEV false)
 ENDIF()
 
 set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake_modules)
--- a/QTfrontend/hwconsts.cpp.in	Fri Mar 26 09:40:26 2010 +0000
+++ b/QTfrontend/hwconsts.cpp.in	Fri Mar 26 12:16:12 2010 +0000
@@ -79,3 +79,4 @@
 quint16 netPort = 46631;
 
 bool haveServer = ${HAVE_NETSERVER};
+bool isDevBuild = ${HW_DEV};
--- a/QTfrontend/hwconsts.h	Fri Mar 26 09:40:26 2010 +0000
+++ b/QTfrontend/hwconsts.h	Fri Mar 26 12:16:12 2010 +0000
@@ -49,3 +49,4 @@
 extern quint16 netPort;
 
 extern bool haveServer;
+extern bool isDevBuild;
--- a/QTfrontend/pages.cpp	Fri Mar 26 09:40:26 2010 +0000
+++ b/QTfrontend/pages.cpp	Fri Mar 26 12:16:12 2010 +0000
@@ -87,6 +87,14 @@
     BtnNet->setToolTip(tr("Network Game (Play a game across a network)"));
     pageLayout->setAlignment(BtnNet, Qt::AlignHCenter);
 
+    if(isDevBuild)
+    {
+        QLabel* devNote = new QLabel(this);
+        devNote->setText(QLabel::tr("This SVN build is 'work in progress' and may not be compatible with other versions of the game.\nSome features might be broken or incomplete. Use at your own risk!"));
+        devNote->setAlignment(Qt::AlignHCenter | Qt::AlignVCenter);
+        pageLayout->addWidget(devNote, 4, 1, 1, 2);
+    }
+
     BtnSetup = addButton(":/res/Settings.png", pageLayout, 4, 3, true);
 
     //BtnInfo = addButton(":/res/About.png", pageLayout, 3, 1, 1, 2, true);