Version: 0.6.0
version.h
1 /******************************************************************************
2  * Project: wxGIS
3  * Purpose: version functions
4  * Author: Baryshnikov Dmitriy (aka Bishop), polimax@mail.ru
5  ******************************************************************************
6 * Copyright (C) 2010-2011 Bishop
7 *
8 * This program is free software: you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation, either version 2 of the License, or
11 * (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program. If not, see <http://www.gnu.org/licenses/>.
20  ****************************************************************************/
21 #pragma once
22 
23 #include "wx/version.h"
24 
25 /* NB: this file is parsed by automatic tools so don't change its format! */
26 #define wxGIS_MAJOR_VERSION 0
27 #define wxGIS_MINOR_VERSION 6
28 #define wxGIS_RELEASE_NUMBER 0
29 #define wxGIS_SUBRELEASE_NUMBER 0
30 
31 /* these are used by version.rc and should always be ASCII, not Unicode */
32 #define wxGIS_VERSION_NUM_STRING \
33  wxMAKE_VERSION_STRING(wxGIS_MAJOR_VERSION, wxGIS_MINOR_VERSION, wxGIS_RELEASE_NUMBER)
34 #define wxGIS_VERSION_NUM_DOT_STRING \
35  wxMAKE_VERSION_DOT_STRING(wxGIS_MAJOR_VERSION, wxGIS_MINOR_VERSION, wxGIS_RELEASE_NUMBER)
36 
37 /* those are Unicode-friendly */
38 #define wxGIS_VERSION_NUM_STRING_T \
39  wxMAKE_VERSION_STRING_T(wxGIS_MAJOR_VERSION, wxGIS_MINOR_VERSION, wxGIS_RELEASE_NUMBER)
40 #define wxGIS_VERSION_NUM_DOT_STRING_T \
41  wxMAKE_VERSION_DOT_STRING_T(wxGIS_MAJOR_VERSION, wxGIS_MINOR_VERSION, wxGIS_RELEASE_NUMBER)
42 
43 /* check if the current version is at least major.minor.release */
44 #define wxGIS_CHECK_VERSION(major,minor,release) \
45  (wxGIS_MAJOR_VERSION > (major) || \
46  (wxGIS_MAJOR_VERSION == (major) && wxGIS_MINOR_VERSION > (minor)) || \
47  (wxGIS_MAJOR_VERSION == (major) && wxGIS_MINOR_VERSION == (minor) && wxGIS_RELEASE_NUMBER >= (release)))
48 
49 /* the same but check the subrelease also */
50 #define wxGIS_CHECK_VERSION_FULL(major,minor,release,subrel) \
51  (wxCHECK_VERSION(major, minor, release) && \
52  ((major) != wxGIS_MAJOR_VERSION || \
53  (minor) != wxGIS_MINOR_VERSION || \
54  (release) != wxGIS_RELEASE_NUMBER || \
55  (subrel) <= wxGIS_SUBRELEASE_NUMBER))
56 
57