Skip to content
Permalink
Browse files
Fix for ticket #232. A make, make install, or make all in the toplevel
qgis directory will update a file (qgssvnversion.h) that contains the
svn version of the qgis code, which is visible with the --help command
line argument or in the Help:About dialog box.


git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@5710 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
g_j_m committed Aug 19, 2006
1 parent b123372 commit 2b697f84a616cf7cc84f236417370c5181d03161
Showing with 19 additions and 1 deletion.
  1. +7 −0 Makefile.am
  2. +4 −0 src/core/qgis.cpp
  3. +2 −0 src/core/qgis.h
  4. +3 −1 src/gui/main.cpp
  5. +3 −0 src/gui/qgisapp.cpp
@@ -58,3 +58,10 @@ release: UIcheck distdir
> $(distdir)/qgis.spec
BZIP2=$(BZIP2_ENV) $(AMTAR)$(TAR) --bzip2 -chof $(distdir).tar.bz2 $(distdir)
-rm -rf $(distdir)

BUILT_SOURCES = qgssvnversion.h

.PHONY : qgssvnversion.h
qgssvnversion.h:
@ echo "#define QGSSVNVERSION \"`svnversion .`\"" > qgssvnversion.h

@@ -1,11 +1,15 @@

#include "qgis.h"
#include "qgssvnversion.h"

// Version constants
//

// Version string
const char* QGis::qgisVersion = VERSION;

// SVN version
const char* QGis::qgisSvnVersion = QGSSVNVERSION;

// Version number used for comparing versions using the "Check QGIS Version" function
const int QGis::qgisVersionInt =800;
@@ -43,6 +43,8 @@ class QGis
static const int qgisVersionInt;
// Release name
static const char* qgisReleaseName;
// The subversion version
static const char* qgisSvnVersion;

// Enumerations
//
@@ -54,6 +54,7 @@
#include "qgisapp.h"
#include "qgsapplication.h"
#include <qgsconfig.h>
#include <qgssvnversion.h>
#include "qgsexception.h"
#include "qgsproject.h"

@@ -63,7 +64,8 @@ static const char * const ident_ = "$Id$";
*/
void usage( std::string const & appName )
{
std::cerr << "Quantum GIS - " << VERSION << " 'Simon'\n"
std::cerr << "Quantum GIS - " << VERSION << " 'Simon' ("
<< QGSSVNVERSION << ")\n"
<< "Quantum GIS (QGIS) is a viewer for spatial data sets, including\n"
<< "raster and vector data.\n"
<< "Usage: " << appName << " [options] [FILES]\n"
@@ -1200,6 +1200,9 @@ void QgisApp::about()
QgsAbout *abt = new QgsAbout();
QString versionString = tr("Version ");
versionString += QGis::qgisVersion;
versionString += " (";
versionString += QGis::qgisSvnVersion;
versionString += ")";
#ifdef HAVE_POSTGRESQL

versionString += tr(" with PostgreSQL support");

0 comments on commit 2b697f8

Please sign in to comment.