You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

clientversion.h 2.0KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. // Copyright (c) 2009-2015 The Bitcoin Core developers
  2. // Distributed under the MIT software license, see the accompanying
  3. // file COPYING or http://www.opensource.org/licenses/mit-license.php.
  4. #ifndef BITCOIN_CLIENTVERSION_H
  5. #define BITCOIN_CLIENTVERSION_H
  6. #if defined(HAVE_CONFIG_H)
  7. #include "config/bitcoin-config.h"
  8. #else
  9. /**
  10. * client versioning and copyright year
  11. */
  12. //! These need to be macros, as clientversion.cpp's and bitcoin*-res.rc's voodoo requires it
  13. #define CLIENT_VERSION_MAJOR 0
  14. #define CLIENT_VERSION_MINOR 11
  15. #define CLIENT_VERSION_REVISION 99
  16. #define CLIENT_VERSION_BUILD 0
  17. //! Set to true for release, false for prerelease or test build
  18. #define CLIENT_VERSION_IS_RELEASE false
  19. /**
  20. * Copyright year (2009-this)
  21. * Todo: update this when changing our copyright comments in the source
  22. */
  23. #define COPYRIGHT_YEAR 2015
  24. #endif //HAVE_CONFIG_H
  25. /**
  26. * Converts the parameter X to a string after macro replacement on X has been performed.
  27. * Don't merge these into one macro!
  28. */
  29. #define STRINGIZE(X) DO_STRINGIZE(X)
  30. #define DO_STRINGIZE(X) #X
  31. //! Copyright string used in Windows .rc files
  32. #define COPYRIGHT_STR "2009-" STRINGIZE(COPYRIGHT_YEAR) " The Bitcoin Core Developers"
  33. /**
  34. * bitcoind-res.rc includes this file, but it cannot cope with real c++ code.
  35. * WINDRES_PREPROC is defined to indicate that its pre-processor is running.
  36. * Anything other than a define should be guarded below.
  37. */
  38. #if !defined(WINDRES_PREPROC)
  39. #include <string>
  40. #include <vector>
  41. static const int CLIENT_VERSION =
  42. 1000000 * CLIENT_VERSION_MAJOR
  43. + 10000 * CLIENT_VERSION_MINOR
  44. + 100 * CLIENT_VERSION_REVISION
  45. + 1 * CLIENT_VERSION_BUILD;
  46. extern const std::string CLIENT_NAME;
  47. extern const std::string CLIENT_BUILD;
  48. extern const std::string CLIENT_DATE;
  49. std::string FormatFullVersion();
  50. std::string FormatSubVersion(const std::string& name, int nClientVersion, const std::vector<std::string>& comments);
  51. #endif // WINDRES_PREPROC
  52. #endif // BITCOIN_CLIENTVERSION_H