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 
5 #ifndef BITCOIN_CLIENTVERSION_H
6 #define BITCOIN_CLIENTVERSION_H
7 
8 #if defined(HAVE_CONFIG_H)
9 #include "config/bitcoin-config.h"
10 #else
11 
12 /**
13  * client versioning and copyright year
14  */
15 
16 //! These need to be macros, as clientversion.cpp's and bitcoin*-res.rc's voodoo requires it
17 #define CLIENT_VERSION_MAJOR 0
18 #define CLIENT_VERSION_MINOR 13
19 #define CLIENT_VERSION_REVISION 2
20 #define CLIENT_VERSION_BUILD 1
21 
22 //! Set to true for release, false for prerelease or test build
23 #define CLIENT_VERSION_IS_RELEASE true
24 
25 /**
26  * Copyright year (2009-this)
27  * Todo: update this when changing our copyright comments in the source
28  */
29 #define COPYRIGHT_YEAR 2018
30 
31 #endif //HAVE_CONFIG_H
32 
33 /**
34  * Converts the parameter X to a string after macro replacement on X has been performed.
35  * Don't merge these into one macro!
36  */
37 #define STRINGIZE(X) DO_STRINGIZE(X)
38 #define DO_STRINGIZE(X) #X
39 
40 //! Copyright string used in Windows .rc files
41 #define COPYRIGHT_STR "2009-" STRINGIZE(COPYRIGHT_YEAR) " " COPYRIGHT_HOLDERS_FINAL
42 
43 /**
44  * bitcoind-res.rc includes this file, but it cannot cope with real c++ code.
45  * WINDRES_PREPROC is defined to indicate that its pre-processor is running.
46  * Anything other than a define should be guarded below.
47  */
48 
49 #if !defined(WINDRES_PREPROC)
50 
51 #include <string>
52 #include <vector>
53 
54 static const int CLIENT_VERSION =
55                            1000000 * CLIENT_VERSION_MAJOR
56                          +   10000 * CLIENT_VERSION_MINOR
57                          +     100 * CLIENT_VERSION_REVISION
58                          +       1 * CLIENT_VERSION_BUILD;
59 
60 extern const std::string CLIENT_NAME;
61 extern const std::string CLIENT_BUILD;
62 
63 
64 std::string FormatFullVersion();
65 std::string FormatSubVersion(const std::string& name, int nClientVersion, const std::vector<std::string>& comments);
66 
67 #endif // WINDRES_PREPROC
68 
69 #endif // BITCOIN_CLIENTVERSION_H
70