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