]> git.saurik.com Git - wxWidgets.git/blob - include/wx/version.h
moved wxSTRINGIZE to defs.h and made it work with macro argument, so that it can...
[wxWidgets.git] / include / wx / version.h
1 /**
2 * Name: wx/version.h
3 * Purpose: wxWidgets version numbers
4 * Author: Julian Smart
5 * Modified by: Ryan Norton (Converted to C)
6 * Created: 29/01/98
7 * RCS-ID: $Id$
8 * Copyright: (c) 1998 Julian Smart
9 * Licence: wxWindows licence
10 */
11
12 /* THIS IS A C FILE, DON'T USE C++ FEATURES (IN PARTICULAR COMMENTS) IN IT */
13
14 #ifndef _WX_VERSION_H_
15 #define _WX_VERSION_H_
16
17 /* the constants below must be changed with each new version */
18 /* ---------------------------------------------------------------------------- */
19
20 /*
21 Don't forget to update WX_CURRENT, WX_REVISION and WX_AGE in
22 build/bakefiles/version.bkl and regenerate the makefiles when you change
23 this!
24 */
25
26 /* NB: this file is parsed by automatic tools so don't change its format! */
27 #define wxMAJOR_VERSION 2
28 #define wxMINOR_VERSION 7
29 #define wxRELEASE_NUMBER 0
30 #define wxSUBRELEASE_NUMBER 1
31 #define wxVERSION_STRING _T("wxWidgets 2.7.0")
32
33 /* nothing to update below this line when updating the version */
34 /* ---------------------------------------------------------------------------- */
35
36 /* Users can pre-define wxABI_VERSION to a lower value in their
37 * makefile/project settings to compile code that will be binary compatible
38 * with earlier versions of the ABI within the same minor version (between
39 * minor versions binary compatibility breaks anyway). The default is the
40 * version of wxWidgets being used. A single number with two decimal digits
41 * for each component, e.g. 20601 for 2.6.1 */
42 #ifndef wxABI_VERSION
43 #define wxABI_VERSION ( wxMAJOR_VERSION * 10000 + wxMINOR_VERSION * 100 + 99 )
44 #endif
45
46 /* helpers for wxVERSION_NUM_XXX */
47 #define wxMAKE_VERSION_STRING(x, y, z) \
48 wxSTRINGIZE(x) wxSTRINGIZE(y) wxSTRINGIZE(z)
49 #define wxMAKE_VERSION_DOT_STRING(x, y, z) \
50 wxSTRINGIZE(x) "." wxSTRINGIZE(y) "." wxSTRINGIZE(z)
51
52 /* these are used by src/msw/version.rc and should always be ASCII, not Unicode */
53 #define wxVERSION_NUM_STRING \
54 wxMAKE_VERSION_STRING(wxMAJOR_VERSION, wxMINOR_VERSION, wxRELEASE_NUMBER)
55 #define wxVERSION_NUM_DOT_STRING \
56 wxMAKE_VERSION_DOT_STRING(wxMAJOR_VERSION, wxMINOR_VERSION, wxRELEASE_NUMBER)
57
58 /* some more defines, not really sure if they're [still] useful */
59 #define wxVERSION_NUMBER ( (wxMAJOR_VERSION * 1000) + (wxMINOR_VERSION * 100) + wxRELEASE_NUMBER )
60 #define wxBETA_NUMBER 0
61 #define wxVERSION_FLOAT ( wxMAJOR_VERSION + (wxMINOR_VERSION/10.0) + (wxRELEASE_NUMBER/100.0) + (wxBETA_NUMBER/10000.0) )
62
63 /* check if the current version is at least major.minor.release */
64 #define wxCHECK_VERSION(major,minor,release) \
65 (wxMAJOR_VERSION > (major) || \
66 (wxMAJOR_VERSION == (major) && wxMINOR_VERSION > (minor)) || \
67 (wxMAJOR_VERSION == (major) && wxMINOR_VERSION == (minor) && wxRELEASE_NUMBER >= (release)))
68
69 /* the same but check the subrelease also */
70 #define wxCHECK_VERSION_FULL(major,minor,release,subrel) \
71 (wxCHECK_VERSION(major, minor, release) && \
72 ((major) != wxMAJOR_VERSION || \
73 (minor) != wxMINOR_VERSION || \
74 (release) != wxRELEASE_NUMBER || \
75 (subrel) <= wxSUBRELEASE_NUMBER))
76
77 #endif /* _WX_VERSION_H_ */
78