const QString Version::running_version() { if (curr_version_string.length()==0) { curr_version_string = QString("%1.%2.%3.%4").arg(svn_client_version()->major).arg(svn_client_version()->minor) .arg(svn_client_version()->patch).arg(svn_client_version()->tag); } return curr_version_string; }
BOOL CAboutDlg::OnInitDialog() { CStandAloneDialog::OnInitDialog(); CAppUtils::MarkWindowAsUnpinnable(m_hWnd); // set the version string CString temp; CString cmd, out, err; cmd=_T("git.exe --version"); if (g_Git.Run(cmd, &out, &err, CP_UTF8)) out = _T("git not found (") + err + _T(")");; int start =0; out=out.Tokenize(_T("\n"),start); CAppUtils::GetMsysgitVersion(&out); if (!CGit::ms_LastMsysGitDir.IsEmpty()) out += _T(" (") + CGit::ms_LastMsysGitDir + _T(")"); temp.Format(IDS_ABOUTVERSION, TGIT_VERMAJOR, TGIT_VERMINOR, TGIT_VERMICRO, TGIT_VERBUILD,out); #if 0 const svn_version_t * svnver = svn_client_version(); temp.Format(IDS_ABOUTVERSION, TSVN_VERMAJOR, TSVN_VERMINOR, TSVN_VERMICRO, TSVN_VERBUILD, _T(TSVN_PLATFORM), _T(TSVN_VERDATE), svnver->major, svnver->minor, svnver->patch, CString(svnver->tag), APR_MAJOR_VERSION, APR_MINOR_VERSION, APR_PATCH_VERSION, APU_MAJOR_VERSION, APU_MINOR_VERSION, APU_PATCH_VERSION, _T(NEON_VERSION), _T(OPENSSL_VERSION_TEXT), _T(ZLIB_VERSION)); #endif SetDlgItemText(IDC_VERSIONABOUT, temp); this->SetWindowText(_T("TortoiseGit")); CPictureHolder tmpPic; tmpPic.CreateFromBitmap(IDB_LOGOFLIPPED); m_renderSrc.Create32BitFromPicture(&tmpPic,468,64); m_renderDest.Create32BitFromPicture(&tmpPic,468,64); m_waterEffect.Create(468,64); SetTimer(ID_EFFECTTIMER, 40, NULL); SetTimer(ID_DROPTIMER, 1500, NULL); m_cWebLink.SetURL(_T("http://code.google.com/p/tortoisegit/")); m_cSupportLink.SetURL(_T("https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=GJGTG75GV5PL6&lc=C2&item_name=TortoiseGit¤cy_code=USD&bn=PP%2dDonationsBF%3abtn_donateCC_LG%2egif%3aNonHosted")); CenterWindow(CWnd::FromHandle(hWndExplorer)); GetDlgItem(IDOK)->SetFocus(); return FALSE; }
int Version::version_minor() { return svn_client_version()->minor; }
bool Version::client_version_compatible() { return svn_ver_compatible(svn_client_version(),&Linkedtag); }