1 // Copyright (c) 2009-2020 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 #include <util/macros.h> 9 10 #if defined(HAVE_CONFIG_H) 11 #include <config/bitcoin-config.h> 12 #endif //HAVE_CONFIG_H 13 14 // Check that required client information is defined 15 #if !defined(CLIENT_VERSION_MAJOR) || !defined(CLIENT_VERSION_MINOR) || !defined(CLIENT_VERSION_BUILD) || !defined(CLIENT_VERSION_IS_RELEASE) || !defined(COPYRIGHT_YEAR) 16 #error Client version information missing: version is not defined by bitcoin-config.h or in any other way 17 #endif 18 19 //! Copyright string used in Windows .rc files 20 #define COPYRIGHT_STR "2009-" STRINGIZE(COPYRIGHT_YEAR) " " COPYRIGHT_HOLDERS_FINAL 21 22 /** 23 * bitcoind-res.rc includes this file, but it cannot cope with real c++ code. 24 * WINDRES_PREPROC is defined to indicate that its pre-processor is running. 25 * Anything other than a define should be guarded below. 26 */ 27 28 #if !defined(WINDRES_PREPROC) 29 30 #include <string> 31 #include <vector> 32 33 static const int CLIENT_VERSION = 34 10000 * CLIENT_VERSION_MAJOR 35 + 100 * CLIENT_VERSION_MINOR 36 + 1 * CLIENT_VERSION_BUILD; 37 38 extern const std::string CLIENT_NAME; 39 extern const std::string CLIENT_BUILD; 40 41 42 std::string FormatFullVersion(); 43 std::string FormatSubVersion(const std::string& name, int nClientVersion, const std::vector<std::string>& comments); 44 45 #endif // WINDRES_PREPROC 46 47 #endif // BITCOIN_CLIENTVERSION_H 48