Skip to content

Commit

Permalink
Fix for ticket #232. A make, make install, or make all in the toplevel
Browse files Browse the repository at this point in the history
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 2b697f8
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 1 deletion.
7 changes: 7 additions & 0 deletions Makefile.am
Expand Up @@ -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

4 changes: 4 additions & 0 deletions src/core/qgis.cpp
@@ -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;
Expand Down
2 changes: 2 additions & 0 deletions src/core/qgis.h
Expand Up @@ -43,6 +43,8 @@ class QGis
static const int qgisVersionInt;
// Release name
static const char* qgisReleaseName;
// The subversion version
static const char* qgisSvnVersion;

// Enumerations
//
Expand Down
4 changes: 3 additions & 1 deletion src/gui/main.cpp
Expand Up @@ -54,6 +54,7 @@
#include "qgisapp.h"
#include "qgsapplication.h"
#include <qgsconfig.h>
#include <qgssvnversion.h>
#include "qgsexception.h"
#include "qgsproject.h"

Expand All @@ -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"
Expand Down
3 changes: 3 additions & 0 deletions src/gui/qgisapp.cpp
Expand Up @@ -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");
Expand Down

0 comments on commit 2b697f8

Please sign in to comment.