]>
Commit | Line | Data |
---|---|---|
f914f1a7 | 1 | // Copyright (c) 2009-2014 The Bitcoin Core developers |
484e350f | 2 | // Distributed under the MIT software license, see the accompanying |
4d04492b PK |
3 | // file COPYING or http://www.opensource.org/licenses/mit-license.php. |
4 | ||
84738627 PJ |
5 | #ifndef BITCOIN_CLIENTVERSION_H |
6 | #define BITCOIN_CLIENTVERSION_H | |
f8759211 | 7 | |
35b8af92 | 8 | #if defined(HAVE_CONFIG_H) |
f3967bcc | 9 | #include "config/bitcoin-config.h" |
35b8af92 | 10 | #else |
f8759211 | 11 | |
484e350f MF |
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 | |
f11099e2 SB |
17 | #define CLIENT_VERSION_MAJOR 1 |
18 | #define CLIENT_VERSION_MINOR 0 | |
19 | #define CLIENT_VERSION_REVISION 0 | |
f7a62429 | 20 | #define CLIENT_VERSION_BUILD 25 |
f8759211 | 21 | |
484e350f | 22 | //! Set to true for release, false for prerelease or test build |
bbf75f9f | 23 | #define CLIENT_VERSION_IS_RELEASE false |
62e21fb5 | 24 | |
484e350f MF |
25 | /** |
26 | * Copyright year (2009-this) | |
27 | * Todo: update this when changing our copyright comments in the source | |
28 | */ | |
a71fb9ff | 29 | #define COPYRIGHT_YEAR 2016 |
ec3cac66 | 30 | |
35b8af92 CF |
31 | #endif //HAVE_CONFIG_H |
32 | ||
484e350f MF |
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 | */ | |
f8759211 PK |
37 | #define STRINGIZE(X) DO_STRINGIZE(X) |
38 | #define DO_STRINGIZE(X) #X | |
39 | ||
484e350f | 40 | //! Copyright string used in Windows .rc files |
20e01b1a | 41 | #define COPYRIGHT_STR "2009-" STRINGIZE(COPYRIGHT_YEAR) " The Bitcoin Core Developers" |
8d9cc7d7 | 42 | |
484e350f MF |
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 | */ | |
71697f97 CF |
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 | extern const std::string CLIENT_DATE; | |
63 | ||
64 | ||
65 | std::string FormatFullVersion(); | |
66 | std::string FormatSubVersion(const std::string& name, int nClientVersion, const std::vector<std::string>& comments); | |
67 | ||
68 | #endif // WINDRES_PREPROC | |
69 | ||
84738627 | 70 | #endif // BITCOIN_CLIENTVERSION_H |