Repository navigation
Expand file tree
/
Copy pathBuildTarget.py
More file actions
69 lines (61 loc) · 1.49 KB
/
Copy pathBuildTarget.py
File metadata and controls
69 lines (61 loc) · 1.49 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
from enum import IntEnum
class BuildTarget(IntEnum):
UnknownPlatform = 3716
DashboardWidget = 1
StandaloneOSX = 2
StandaloneOSXPPC = 3
StandaloneOSXIntel = 4
StandaloneWindows = 5
WebPlayer = 6
WebPlayerStreamed = 7
Wii = 8
iOS = 9
PS3 = 10
XBOX360 = 11
Android = 13
StandaloneGLESEmu = 14
NaCl = 16
StandaloneLinux = 17
FlashPlayer = 18
StandaloneWindows64 = 19
WebGL = 20
WSAPlayer = 21
StandaloneLinux64 = 24
StandaloneLinuxUniversal = 25
WP8Player = 26
StandaloneOSXIntel64 = 27
BlackBerry = 28
Tizen = 29
PSP2 = 30
PS4 = 31
PSM = 32
XboxOne = 33
SamsungTV = 34
N3DS = 35
WiiU = 36
tvOS = 37
Switch = 38
NoTarget = -2
def __str__(self):
return self.name
def __format__(self, fmt):
return self.name
def __eq__(self, value):
if isinstance(value, str):
return self.name == value
elif isinstance(value, BuildTarget):
return self._value_ == value._value_
elif isinstance(value, int):
if self.has_value(value):
return self._value_ == value
return False
return self._value_ == value
@classmethod
def has_value(cls, value):
return value in cls._value2member_map_
def makeBuildTarget(_bt):
if isinstance(_bt, BuildTarget):
return _bt
elif BuildTarget.has_value(_bt):
return BuildTarget(_bt)
return _bt