14#include <wx/platinfo.h>
33 wxArrayString changelogSentenceList;
36 std::string s(changelogContent.ToStdString());
38 const std::string delimiter(
". ");
42 token = s.substr(0, pos + 1);
43 changelogSentenceList.Add(wxString(token).Trim());
45 s.erase(0, pos + delimiter.length());
47 changelogSentenceList.Add(wxString(s).Trim());
49 return changelogSentenceList;
62 constexpr bool is32Bit =
sizeof(
void*) == 4;
63 constexpr bool is64Bit =
sizeof(
void*) == 8;
69 if (info.GetOperatingSystemId() & wxOS_WINDOWS)
79 if (info.GetOperatingSystemId() & wxOS_WINDOWS)
87 if (info.GetOperatingSystemId() & wxOS_MAC)
94 if (info.GetOperatingSystemId() & wxOS_UNIX_LINUX)
115 if (tag == xmlTag.second)
139 wxString trimmedContent = std::string(content);
144 trimmedContent.Trim(
true).Trim(
false);
149 trimmedContent.Trim(
true).Trim(
false);
154 trimmedContent.Trim(
true).Trim(
false);
167 if (tag == xmlTag.second)
Declare a class that parses update server data format.
std::vector< Attribute > AttributesList
bool Parse(const VersionPatch::UpdateDataFormat &updateData, VersionPatch *versionPatch)
Parsing from update data format to VersionPatch fields.
std::map< XmlParsedTags, const char * > mXmlTagNames
bool HandleXMLTag(const std::string_view &tag, const AttributesList &attrs) override
void HandleXMLEndTag(const std::string_view &tag) override
XMLTagHandler * HandleXMLChild(const std::string_view &tag) override
VersionPatch * mVersionPatch
XmlParsedTags mXmlParsingState
void HandleXMLContent(const std::string_view &content) override
wxArrayString SplitChangelogSentences(const wxString &changelogContent)
Set a variable temporarily in a scope.
static VersionId ParseFromString(wxString &versionString)
Parse and return version object from version string like "1.2.3".
Reads a file and passes the results through an XMLTagHandler.
bool ParseString(XMLTagHandler *baseHandler, const wxString &xmldata)
This class is an interface which should be implemented by classes which wish to be able to load and s...
Services * Get()
Fetch the global instance, or nullptr if none is yet installed.
constexpr size_t npos(-1)
A structure that describes patch fields.
std::string UpdateDataFormat