version.h 3.6 KB

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