print.cpp 983 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. #include "last_getopt.h"
  2. #include "last_getopt_support.h"
  3. #include "modchooser.h"
  4. #include "opt.h"
  5. #include "opt2.h"
  6. #include "posix_getopt.h"
  7. #include "ygetopt.h"
  8. #include <library/cpp/svnversion/svnversion.h>
  9. #include <library/cpp/build_info/build_info.h>
  10. namespace NLastGetoptPrivate {
  11. TString InitVersionString() {
  12. TString ts = GetProgramSvnVersion();
  13. ts += "\n";
  14. ts += GetBuildInfo();
  15. TString sandboxTaskId = GetSandboxTaskId();
  16. if (sandboxTaskId != TString("0")) {
  17. ts += "\nSandbox task id: ";
  18. ts += sandboxTaskId;
  19. }
  20. return ts;
  21. }
  22. TString InitShortVersionString() {
  23. TString ts = GetProgramShortVersionData();
  24. return ts;
  25. }
  26. TString& VersionString();
  27. TString& ShortVersionString();
  28. struct TInit {
  29. TInit() {
  30. VersionString() = InitVersionString();
  31. ShortVersionString() = InitShortVersionString();
  32. }
  33. } Init;
  34. }