TrinityCore
Loading...
Searching...
No Matches
ClientBuildInfo.h
Go to the documentation of this file.
1/*
2 * This file is part of the TrinityCore Project. See AUTHORS file for Copyright information
3 *
4 * This program is free software; you can redistribute it and/or modify it
5 * under the terms of the GNU General Public License as published by the
6 * Free Software Foundation; either version 2 of the License, or (at your
7 * option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
12 * more details.
13 *
14 * You should have received a copy of the GNU General Public License along
15 * with this program. If not, see <http://www.gnu.org/licenses/>.
16 */
17
18#ifndef TRINITYCORE_CLIENT_BUILD_INFO_H
19#define TRINITYCORE_CLIENT_BUILD_INFO_H
20
21#include "FourCC.h"
22#include <array>
23#include <string_view>
24#include <vector>
25
26namespace ClientBuild
27{
28using namespace FourCCLiterals;
29
30struct Program
31{
33
34 static constexpr Id WoW { "WoW"_fourcc };
35
36 TC_SHARED_API static bool IsValid(std::string_view program);
37};
38
40{
42
43 static constexpr Id Win_x86 { "Win"_fourcc };
44 static constexpr Id Win_x64 { "Wn64"_fourcc };
45 static constexpr Id Win_arm64 { "WinA"_fourcc };
46 static constexpr Id Mac_x86 { "Mac"_fourcc };
47 static constexpr Id Mac_x64 { "Mc64"_fourcc };
48 static constexpr Id Mac_arm64 { "MacA"_fourcc };
49
50 TC_SHARED_API static bool IsValid(std::string_view platform);
51};
52
54{
56
57 static constexpr Id Windows { "Win"_fourcc };
58 static constexpr Id macOS { "Mac"_fourcc };
59
60 TC_SHARED_API static bool IsValid(std::string_view platformType);
61};
62
63struct Arch
64{
66
67 static constexpr Id x86 { "x86"_fourcc };
68 static constexpr Id x64 { "x64"_fourcc };
69 static constexpr Id Arm32 { "A32"_fourcc };
70 static constexpr Id Arm64 { "A64"_fourcc };
71 static constexpr Id WA32 { "WA32"_fourcc };
72
73 TC_SHARED_API static bool IsValid(std::string_view arch);
74};
75
76struct Type
77{
79
80 static constexpr Id Retail { "WoW"_fourcc };
81 static constexpr Id RetailChina { "WoWC"_fourcc };
82 static constexpr Id Beta { "WoWB"_fourcc };
83 static constexpr Id BetaRelease { "WoWE"_fourcc };
84 static constexpr Id Ptr { "WoWT"_fourcc };
85 static constexpr Id PtrRelease { "WoWR"_fourcc };
86
87 TC_SHARED_API static bool IsValid(std::string_view type);
88};
89
98
99struct AuthKey
100{
101 static constexpr std::size_t Size = 16;
102
104 std::array<uint8, Size> Key;
105};
106
116
120}
121
122#endif // TRINITYCORE_CLIENT_BUILD_INFO_H
#define TC_SHARED_API
Definition Define.h:123
uint32_t uint32
Definition Define.h:154
uint32 GetMinorMajorBugfixVersionForBuild(uint32 build)
Info const * GetBuildInfo(uint32 build)
static constexpr Id x86
static constexpr Id WA32
static constexpr Id Arm64
static constexpr Id Arm32
static TC_SHARED_API bool IsValid(std::string_view arch)
static constexpr Id x64
std::array< uint8, Size > Key
static constexpr std::size_t Size
std::array< char, 4 > HotfixVersion
std::vector< AuthKey > AuthKeys
static constexpr Id Windows
static constexpr Id macOS
static TC_SHARED_API bool IsValid(std::string_view platformType)
static constexpr Id Win_arm64
static constexpr Id Mac_arm64
static constexpr Id Win_x86
static TC_SHARED_API bool IsValid(std::string_view platform)
static constexpr Id Mac_x86
static constexpr Id Win_x64
static constexpr Id Mac_x64
static constexpr Id WoW
static TC_SHARED_API bool IsValid(std::string_view program)
static constexpr Id BetaRelease
static constexpr Id Beta
static constexpr Id PtrRelease
static constexpr Id Retail
static constexpr Id Ptr
static TC_SHARED_API bool IsValid(std::string_view type)
static constexpr Id RetailChina
ClientBuild::Type::Id Type
ClientBuild::Arch::Id Arch
friend bool operator==(VariantId const &left, VariantId const &right)=default
ClientBuild::Platform::Id Platform