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