Browse Source

Add const bool VERSION_IS_BETA to serialize.h and use it when formatting the version string. Show the version string in --help text too.

0.8
Chris Moore 14 years ago
parent
commit
5284e1b60e
  1. 4
      init.cpp
  2. 1
      serialize.h

4
init.cpp

@ -158,7 +158,9 @@ bool AppInit2(int argc, char* argv[])
if (mapArgs.count("-?") || mapArgs.count("--help")) if (mapArgs.count("-?") || mapArgs.count("--help"))
{ {
string beta = VERSION_IS_BETA ? _(" beta") : "";
string strUsage = string() + string strUsage = string() +
_("Bitcoin version") + " " + FormatVersion(VERSION) + pszSubVer + beta + "\n\n" +
_("Usage:") + "\t\t\t\t\t\t\t\t\t\t\n" + _("Usage:") + "\t\t\t\t\t\t\t\t\t\t\n" +
" bitcoin [options] \t " + "\n" + " bitcoin [options] \t " + "\n" +
" bitcoin [options] <command> [params]\t " + _("Send command to -server or bitcoind\n") + " bitcoin [options] <command> [params]\t " + _("Send command to -server or bitcoind\n") +
@ -227,7 +229,7 @@ bool AppInit2(int argc, char* argv[])
if (!fDebug && !pszSetDataDir[0]) if (!fDebug && !pszSetDataDir[0])
ShrinkDebugFile(); ShrinkDebugFile();
printf("\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"); printf("\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n");
printf("Bitcoin version %s%s beta\n", FormatVersion(VERSION).c_str(), pszSubVer); printf("Bitcoin version %s%s%s\n", FormatVersion(VERSION).c_str(), pszSubVer, VERSION_IS_BETA ? _(" beta") : "");
#ifdef GUI #ifdef GUI
printf("OS version %s\n", ((string)wxGetOsDescription()).c_str()); printf("OS version %s\n", ((string)wxGetOsDescription()).c_str());
printf("System default language is %d %s\n", g_locale.GetSystemLanguage(), ((string)g_locale.GetSysName()).c_str()); printf("System default language is %d %s\n", g_locale.GetSystemLanguage(), ((string)g_locale.GetSysName()).c_str());

1
serialize.h

@ -27,6 +27,7 @@ static const unsigned int MAX_SIZE = 0x02000000;
static const int VERSION = 31902; static const int VERSION = 31902;
static const char* pszSubVer = ""; static const char* pszSubVer = "";
static const bool VERSION_IS_BETA = true;

Loading…
Cancel
Save