Fixed issue #4126: Capitalize the first letter in the Push dialog
[TortoiseGit.git] / src / TortoiseProc / VersioncheckParser.h
blob5de02437f010ac94482b93b5ec46186b88aabc0c
1 // TortoiseGit - a Windows shell extension for easy version control
3 // Copyright (C) 2013-2018, 2020-2024 - TortoiseGit
5 // This program is free software; you can redistribute it and/or
6 // modify it under the terms of the GNU General Public License
7 // as published by the Free Software Foundation; either version 2
8 // of the License, or (at your option) any later version.
10 // This program is distributed in the hope that it will be useful,
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 // GNU General Public License for more details.
15 // You should have received a copy of the GNU General Public License
16 // along with this program; if not, write to the Free Software Foundation,
17 // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19 #pragma once
20 #include "..\..\ext\simpleini\SimpleIni.h"
22 class CVersioncheckParser
24 public:
25 CVersioncheckParser();
26 ~CVersioncheckParser();
28 CVersioncheckParser(const CVersioncheckParser&) = delete;
29 CVersioncheckParser& operator=(const CVersioncheckParser&) = delete;
31 bool Load(const CString& filename, CString& err);
33 struct Version
35 CString version;
36 CString version_for_filename;
37 CString version_languagepacks;
38 unsigned int major = 0;
39 unsigned int minor = 0;
40 unsigned int micro = 0;
41 unsigned int build = 0;
43 Version GetTortoiseGitVersion();
45 CString GetTortoiseGitInfoText();
46 CString GetTortoiseGitInfoTextURL();
47 CString GetTortoiseGitIssuesURL();
48 bool GetTortoiseGitHasChangelog();
49 CString GetTortoiseGitChangelogURL();
50 bool GetTortoiseGitIsDirectDownloadable();
51 CString GetTortoiseGitBaseURL();
52 bool GetTortoiseGitIsHotfix();
53 CString GetTortoiseGitMainfilename();
55 struct LanguagePack
57 CString m_PackName;
58 CString m_LangName;
59 DWORD m_LocaleID;
60 CString m_LangCode;
62 CString m_filename;
64 using LANGPACK_VECTOR = std::vector<LanguagePack>;
65 LANGPACK_VECTOR GetTortoiseGitLanguagePacks();
67 private:
68 CString GetTortoiseGitLanguagepackFilenameTemplate();
69 CString GetStringValue(const CString& section, const CString& entry);
71 CSimpleIni m_versioncheckfile;
73 Version m_version;