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