Compare commits
1910 Commits
v5.8.0
...
rft/battle
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8d434fb84c | ||
|
|
8681039067 | ||
|
|
dd36585b16 | ||
|
|
b58917c74b | ||
|
|
633fe73993 | ||
|
|
aa46d668d1 | ||
|
|
f76db36364 | ||
|
|
7f4a95280c | ||
|
|
711041f190 | ||
|
|
21086dcf68 | ||
|
|
2c3b6ac50a | ||
|
|
743c51a4b5 | ||
|
|
61ce039b12 | ||
|
|
f6788e6029 | ||
|
|
a7ed964cb0 | ||
|
|
a91fc84942 | ||
|
|
66ef1f0836 | ||
|
|
f0a3bbf16a | ||
|
|
529fedd95e | ||
|
|
434932d39a | ||
|
|
6601c6621c | ||
|
|
7a65be5fa5 | ||
|
|
0ca0de9663 | ||
|
|
c69ce8ca7a | ||
|
|
9bccb24654 | ||
|
|
0d4ffca813 | ||
|
|
b13e4d022b | ||
|
|
110847e005 | ||
|
|
772424e920 | ||
|
|
57888f783e | ||
|
|
f4ee5356d1 | ||
|
|
035fdaa6ca | ||
|
|
2d4c556bc6 | ||
|
|
58a3157bb3 | ||
|
|
848ebeb747 | ||
|
|
989ba7ee52 | ||
|
|
53e3ec8273 | ||
|
|
dbc1f1f6da | ||
|
|
0d57e73bb4 | ||
|
|
cf4553fa0a | ||
|
|
0af71a9f32 | ||
|
|
6ab3b6cc56 | ||
|
|
ec1de48e42 | ||
|
|
87e43d91f0 | ||
|
|
6104d0602b | ||
|
|
f04b9a6409 | ||
|
|
4fbb831c44 | ||
|
|
9301ea44b1 | ||
|
|
7e7beabb35 | ||
|
|
eb5803fef7 | ||
|
|
24f2cb5cbf | ||
|
|
fb8f3b78ad | ||
|
|
abcaf2ee06 | ||
|
|
03188824f7 | ||
|
|
340e2798a0 | ||
|
|
f9d468f557 | ||
|
|
e71eb3985d | ||
|
|
5adb76e377 | ||
|
|
be0ff90b8a | ||
|
|
cd723f2210 | ||
|
|
93ab1cc811 | ||
|
|
92421d464c | ||
|
|
260ab6e839 | ||
|
|
7e3e43e81a | ||
|
|
3b3056a65f | ||
|
|
5aa1d74b96 | ||
|
|
b9f196c3a1 | ||
|
|
c7a8191e03 | ||
|
|
3a87307bda | ||
|
|
f0ff035546 | ||
|
|
81504417c7 | ||
|
|
771c3e53b7 | ||
|
|
5cc7861d5c | ||
|
|
61f25c94e5 | ||
|
|
8da46bf991 | ||
|
|
26f421418e | ||
|
|
82dbe28b5e | ||
|
|
cc7c740921 | ||
|
|
4396c71802 | ||
|
|
351529d4cf | ||
|
|
eeeca5aa0f | ||
|
|
37c712637c | ||
|
|
3c995514a6 | ||
|
|
5038576b75 | ||
|
|
43952444bb | ||
|
|
1848caf82a | ||
|
|
baff16c024 | ||
|
|
894d540649 | ||
|
|
aef60f179c | ||
|
|
25903aba2d | ||
|
|
42f57797d7 | ||
|
|
30ade6e2a6 | ||
|
|
017147f3f6 | ||
|
|
4c5afa12c7 | ||
|
|
2fa5c743cc | ||
|
|
1702372f0f | ||
|
|
3dc32c1368 | ||
|
|
d6415c301b | ||
|
|
9bd75e6692 | ||
|
|
9dc8c05a73 | ||
|
|
00d1f93472 | ||
|
|
639c6d711b | ||
|
|
bd6176b25f | ||
|
|
e60a065ba4 | ||
|
|
41c9643b38 | ||
|
|
1e9d9ba5a0 | ||
|
|
678f0bd60e | ||
|
|
9bffc02d7f | ||
|
|
9c020dd5f9 | ||
|
|
e159598dc8 | ||
|
|
022b39c25a | ||
|
|
e94e3888bb | ||
|
|
ed2c55e81c | ||
|
|
b861c544a6 | ||
|
|
c72d99a030 | ||
|
|
4a836290b9 | ||
|
|
34a5bfdd3d | ||
|
|
1a072e302e | ||
|
|
e2e496122a | ||
|
|
6ac61f2274 | ||
|
|
a68ee788e1 | ||
|
|
7022a6d298 | ||
|
|
5cda61f8a6 | ||
|
|
b37afbaec1 | ||
|
|
be075ab749 | ||
|
|
6461d6a7e2 | ||
|
|
68130ede6d | ||
|
|
2f7d4a6c91 | ||
|
|
8a6982a144 | ||
|
|
5a2e2f2d6a | ||
|
|
754b4135cc | ||
|
|
966ded3836 | ||
|
|
b9e69dde73 | ||
|
|
f184093732 | ||
|
|
ef844da918 | ||
|
|
a3ac79d999 | ||
|
|
29b25079b8 | ||
|
|
7059375a2f | ||
|
|
062397669f | ||
|
|
c7d1718d97 | ||
|
|
9d875538bf | ||
|
|
6a05dfa694 | ||
|
|
109d20d3fd | ||
|
|
e579d2c683 | ||
|
|
c3a7ae0c22 | ||
|
|
558746add6 | ||
|
|
d51895af57 | ||
|
|
512ffa55bb | ||
|
|
56f2b35ea7 | ||
|
|
3086cee0cc | ||
|
|
66577b193c | ||
|
|
35f28a7c29 | ||
|
|
245279711d | ||
|
|
979f6699cc | ||
|
|
7359653317 | ||
|
|
f311f8525e | ||
|
|
4debf210bd | ||
|
|
1eeae5326f | ||
|
|
ce3624cfbb | ||
|
|
632447e8d3 | ||
|
|
a5917adc1c | ||
|
|
c86ea9fa12 | ||
|
|
539e2b48b2 | ||
|
|
58c2c6eccd | ||
|
|
8eb49dc463 | ||
|
|
cd44b22b8c | ||
|
|
1f7b675d04 | ||
|
|
e89e3d3f35 | ||
|
|
a47b1d427b | ||
|
|
774cc6d6fe | ||
|
|
c740e71900 | ||
|
|
a73eb5d52d | ||
|
|
7dfae900f1 | ||
|
|
edb5e0f7fc | ||
|
|
e9f0353d01 | ||
|
|
bc734f288b | ||
|
|
89f4d927a4 | ||
|
|
54c434c547 | ||
|
|
bb0d148fae | ||
|
|
cd42686824 | ||
|
|
7c9b12113f | ||
|
|
22f88ef718 | ||
|
|
722302bc28 | ||
|
|
188e55450a | ||
|
|
df2edc4bd4 | ||
|
|
c9672599a0 | ||
|
|
6c80f26542 | ||
|
|
7cd6873085 | ||
|
|
254db83bf6 | ||
|
|
6b6bed6c4d | ||
|
|
c11543f5a4 | ||
|
|
31cc95fb7f | ||
|
|
457ffe67de | ||
|
|
d53509ff06 | ||
|
|
6d8a4c7a5b | ||
|
|
e2c19995c2 | ||
|
|
3f10c972cd | ||
|
|
d3730cc0da | ||
|
|
b5b357938e | ||
|
|
805b76f113 | ||
|
|
4c5ae67063 | ||
|
|
8a97330be3 | ||
|
|
623e542f45 | ||
|
|
7350401ddd | ||
|
|
c4db21dd2b | ||
|
|
d713ca59e3 | ||
|
|
b3203ad848 | ||
|
|
89a42be269 | ||
|
|
218e9ec31a | ||
|
|
ba26b64b22 | ||
|
|
33b54e81b0 | ||
|
|
cb64ca4b13 | ||
|
|
e6549f0bf6 | ||
|
|
5466678785 | ||
|
|
8f279dc1b4 | ||
|
|
60c83e78e1 | ||
|
|
e63de8df32 | ||
|
|
053e11c9ba | ||
|
|
fbf48ebefd | ||
|
|
7ef4343f16 | ||
|
|
3e75ec507f | ||
|
|
94a0a4d916 | ||
|
|
ca605edffd | ||
|
|
7177e48d5c | ||
|
|
14c809a9ac | ||
|
|
ad4f4a93c0 | ||
|
|
5add3a5d8a | ||
|
|
f3f8264b53 | ||
|
|
3e30750da7 | ||
|
|
715c2c13b5 | ||
|
|
8d02395657 | ||
|
|
824d3bfebe | ||
|
|
88a0b97224 | ||
|
|
d6f73bc753 | ||
|
|
d1c09cc01a | ||
|
|
d65cde7574 | ||
|
|
afaeb011cf | ||
|
|
fa42a0880e | ||
|
|
2a32052ab0 | ||
|
|
1dba23a93e | ||
|
|
9592b1fd40 | ||
|
|
6deea622bd | ||
|
|
503d653330 | ||
|
|
fe5744f328 | ||
|
|
abcc3ba100 | ||
|
|
0b058bb0d9 | ||
|
|
c62d2ac4f8 | ||
|
|
9a81315b7f | ||
|
|
42f9b80be3 | ||
|
|
57cde24e99 | ||
|
|
f775b2a551 | ||
|
|
756f352c02 | ||
|
|
f574b14ed4 | ||
|
|
ef99f63311 | ||
|
|
62b72b0faa | ||
|
|
c988b7463d | ||
|
|
ee281863ff | ||
|
|
08f78a3151 | ||
|
|
af34bb6a6f | ||
|
|
0e5ed3be50 | ||
|
|
6f3bc269d6 | ||
|
|
68d7ac593b | ||
|
|
ab664d74fb | ||
|
|
aba41f09c0 | ||
|
|
2dc6745fdb | ||
|
|
5820fb202d | ||
|
|
cba20d7835 | ||
|
|
81f8ad902d | ||
|
|
426d76ee50 | ||
|
|
dd82fa0075 | ||
|
|
91b53a4b73 | ||
|
|
12fc5bbde3 | ||
|
|
6cfab2c1f0 | ||
|
|
730b9b2ad9 | ||
|
|
ddbf647524 | ||
|
|
6e9ef3c66e | ||
|
|
1ad6f70b55 | ||
|
|
9e990c337a | ||
|
|
8733055e83 | ||
|
|
e8885dc095 | ||
|
|
0d140c1b46 | ||
|
|
1f29f9dc16 | ||
|
|
505ba76fea | ||
|
|
e76e95c0a4 | ||
|
|
aff4ef43fa | ||
|
|
e4aa506cb4 | ||
|
|
7c5fe215ac | ||
|
|
ced3843c4b | ||
|
|
5f30226d99 | ||
|
|
2e30ef6169 | ||
|
|
3b0093c13c | ||
|
|
3416a47b26 | ||
|
|
d646af45ca | ||
|
|
c69fd51bc9 | ||
|
|
4fb83a9bca | ||
|
|
abf69a9c63 | ||
|
|
436643db9c | ||
|
|
1311a40126 | ||
|
|
dc49df6c0d | ||
|
|
209902466a | ||
|
|
6f0426b285 | ||
|
|
317a0d5224 | ||
|
|
193525cacb | ||
|
|
e32b526e81 | ||
|
|
96751335d3 | ||
|
|
2e6df0af8e | ||
|
|
43d13f5aaf | ||
|
|
6c405da322 | ||
|
|
dce6e317c8 | ||
|
|
fdc76bc5b5 | ||
|
|
2f8840feac | ||
|
|
f98a595620 | ||
|
|
2a7729074a | ||
|
|
40e607c98f | ||
|
|
351395f5b9 | ||
|
|
3e38b59f0c | ||
|
|
079932e34c | ||
|
|
9666b4a42b | ||
|
|
8779c867bf | ||
|
|
d10c90bc79 | ||
|
|
ac83069b99 | ||
|
|
8077d73a9b | ||
|
|
e5357e7dd7 | ||
|
|
f87be175e1 | ||
|
|
316dd9a005 | ||
|
|
6f07b16388 | ||
|
|
b59b42345a | ||
|
|
f80ec0b232 | ||
|
|
0cab88a1fb | ||
|
|
f5b8fe18e1 | ||
|
|
8fb76030b2 | ||
|
|
0234f2d274 | ||
|
|
018955d010 | ||
|
|
ed361efcd3 | ||
|
|
08665869ea | ||
|
|
2b0ad53830 | ||
|
|
f5010a3681 | ||
|
|
072592c49a | ||
|
|
45e55c0eaf | ||
|
|
d32ed24879 | ||
|
|
8c83b5e2d2 | ||
|
|
8a33102408 | ||
|
|
432a51a238 | ||
|
|
39dce2a0e1 | ||
|
|
c58e0a0e92 | ||
|
|
5e30ffc714 | ||
|
|
68a5ef3f85 | ||
|
|
d1bb221096 | ||
|
|
0743e1773b | ||
|
|
fafd1970be | ||
|
|
446ec8b8f6 | ||
|
|
07e561fae8 | ||
|
|
d42a8ba42e | ||
|
|
86a861f1c1 | ||
|
|
73801e5eae | ||
|
|
085444f25f | ||
|
|
81f6540170 | ||
|
|
66d49a7e81 | ||
|
|
9982545c99 | ||
|
|
eaf3b93c8e | ||
|
|
e29d506cf2 | ||
|
|
e4e9c8264c | ||
|
|
7204d0f62a | ||
|
|
60308846f3 | ||
|
|
e8717c0936 | ||
|
|
786518917c | ||
|
|
91195d3c02 | ||
|
|
09608430a9 | ||
|
|
f09e4de87e | ||
|
|
d306941c4f | ||
|
|
288fa379d3 | ||
|
|
66c9e3c65c | ||
|
|
f2586ec7fe | ||
|
|
63a30d96f6 | ||
|
|
99db411ea6 | ||
|
|
b330cb465b | ||
|
|
3c76830ad5 | ||
|
|
2b87578d53 | ||
|
|
a4420961ce | ||
|
|
4d76fabd77 | ||
|
|
457023106c | ||
|
|
e1b000631a | ||
|
|
04531f33c7 | ||
|
|
d3d8e1a5cf | ||
|
|
deb5fa3044 | ||
|
|
18a4a3fc31 | ||
|
|
3f5a7322e5 | ||
|
|
fc4437183d | ||
|
|
1d8068daf0 | ||
|
|
b0d14b4820 | ||
|
|
26caabb8d0 | ||
|
|
9443c835fa | ||
|
|
b981160487 | ||
|
|
9ed30c5658 | ||
|
|
cc7891c11d | ||
|
|
21f9864140 | ||
|
|
de2c50ec7e | ||
|
|
c447ee3568 | ||
|
|
5727be3b3a | ||
|
|
debcf92010 | ||
|
|
0839de2c94 | ||
|
|
c9374383c1 | ||
|
|
1c321bb313 | ||
|
|
4d975a1633 | ||
|
|
6137cc701b | ||
|
|
e15b95c084 | ||
|
|
660bb141aa | ||
|
|
d3981265bb | ||
|
|
d801be3fc1 | ||
|
|
8abff51da2 | ||
|
|
28ad1f2816 | ||
|
|
6bbc15040a | ||
|
|
86cbff2cab | ||
|
|
c3dc7d3711 | ||
|
|
4e3b10ded7 | ||
|
|
1a8e1bc989 | ||
|
|
814d9a651f | ||
|
|
5c9a01be2a | ||
|
|
13fa90a214 | ||
|
|
ae9a1f1cf0 | ||
|
|
21bc191a96 | ||
|
|
aa754996f0 | ||
|
|
631466cfff | ||
|
|
3d64624ad4 | ||
|
|
76a007501a | ||
|
|
cfad7fc743 | ||
|
|
e99dcb3e10 | ||
|
|
0b16a4fb26 | ||
|
|
8586c21312 | ||
|
|
80aa7c3bee | ||
|
|
3cb0a8ac08 | ||
|
|
40a614df0d | ||
|
|
30276f9c2d | ||
|
|
6c62cc373b | ||
|
|
31bf864f78 | ||
|
|
6196676eb3 | ||
|
|
856e2a140f | ||
|
|
d32f0c202f | ||
|
|
cf496728a3 | ||
|
|
2f9c187916 | ||
|
|
a265d0c06b | ||
|
|
4a5c808e21 | ||
|
|
fab8731f50 | ||
|
|
9eda7095e7 | ||
|
|
ee29f65a8e | ||
|
|
d2298e0105 | ||
|
|
f0b318fed3 | ||
|
|
68641758ab | ||
|
|
4302611bf7 | ||
|
|
9310f2e204 | ||
|
|
3685dae146 | ||
|
|
7ed3da2bee | ||
|
|
edfb4ce73a | ||
|
|
f679256612 | ||
|
|
383c38831a | ||
|
|
c3dc844b9a | ||
|
|
a7f909cad0 | ||
|
|
2df97627fe | ||
|
|
5d5492b018 | ||
|
|
741eaafee1 | ||
|
|
f0d7840b51 | ||
|
|
3d62daed59 | ||
|
|
d85b69632f | ||
|
|
c64c80b7fc | ||
|
|
875a8dbe65 | ||
|
|
c3bf90dd44 | ||
|
|
6db893a23d | ||
|
|
db03ab5976 | ||
|
|
55721e9e35 | ||
|
|
3d7b7d5e58 | ||
|
|
8971893e81 | ||
|
|
af68ac46cf | ||
|
|
951ed330a8 | ||
|
|
3babe9d76e | ||
|
|
adf6f1f80c | ||
|
|
ebaf3f9307 | ||
|
|
60f0d56ddf | ||
|
|
f94ddabeef | ||
|
|
74f85680e8 | ||
|
|
60f6b910cd | ||
|
|
e9bf062b55 | ||
|
|
4142896c82 | ||
|
|
70398dda8b | ||
|
|
63bedace6e | ||
|
|
bc677b69ca | ||
|
|
3bb0833704 | ||
|
|
29dad9ac7f | ||
|
|
ea29cc2c20 | ||
|
|
934f752820 | ||
|
|
bd28098db9 | ||
|
|
a1ff2a522d | ||
|
|
7a329c8647 | ||
|
|
f74a04155f | ||
|
|
e95f5f5ad7 | ||
|
|
8ffc1a253d | ||
|
|
b22805843b | ||
|
|
0045bbcd8b | ||
|
|
90ed19b192 | ||
|
|
402ececdde | ||
|
|
4c4b56c1a8 | ||
|
|
7277b7e8ec | ||
|
|
7f1466eeb0 | ||
|
|
fb8ba366ca | ||
|
|
fd5b5cab4e | ||
|
|
62abaf51d7 | ||
|
|
51926cd41c | ||
|
|
fef3fd4817 | ||
|
|
11a120b056 | ||
|
|
86f76f71ea | ||
|
|
ee41f9c322 | ||
|
|
5ad0f1e1fc | ||
|
|
e432deee2c | ||
|
|
2b64f974ec | ||
|
|
46d3e91483 | ||
|
|
105bf5b865 | ||
|
|
73be332b4d | ||
|
|
eb69190f18 | ||
|
|
3096f8e311 | ||
|
|
419b3ae82d | ||
|
|
563c9507d5 | ||
|
|
13ccf1b851 | ||
|
|
e312d425b8 | ||
|
|
517141a5f4 | ||
|
|
433eb0aa0b | ||
|
|
5680895daa | ||
|
|
3f426ffd35 | ||
|
|
2ec5caf456 | ||
|
|
2540ec0bc3 | ||
|
|
4f81046a40 | ||
|
|
1e6ae76a2e | ||
|
|
e2afc7a0cd | ||
|
|
9c30e9e83e | ||
|
|
b28ebf3ca9 | ||
|
|
a642024500 | ||
|
|
4b61fdf5d9 | ||
|
|
0e13f97b8c | ||
|
|
0475421520 | ||
|
|
c7c17676e2 | ||
|
|
6a85baede6 | ||
|
|
a935caf588 | ||
|
|
34ac9b69f4 | ||
|
|
7174edab5a | ||
|
|
6bc2c2167e | ||
|
|
634738a24d | ||
|
|
567e62abe2 | ||
|
|
b508d9e306 | ||
|
|
768c0e289a | ||
|
|
f9319906b0 | ||
|
|
b33d88861c | ||
|
|
088be6e970 | ||
|
|
a6d52b4a44 | ||
|
|
0ff82e143f | ||
|
|
977cd6c9b6 | ||
|
|
53b0d56209 | ||
|
|
079359749d | ||
|
|
0b92134160 | ||
|
|
1a7b615cf8 | ||
|
|
7479b95179 | ||
|
|
0fb839f0f6 | ||
|
|
704bf6e05a | ||
|
|
0b6ff2a7ad | ||
|
|
0b3c18e206 | ||
|
|
1bb16ee657 | ||
|
|
63cd7a56a9 | ||
|
|
80039160cf | ||
|
|
15bfd243f1 | ||
|
|
763264e110 | ||
|
|
5c405a321e | ||
|
|
fa0065cff7 | ||
|
|
0dbd5ee80b | ||
|
|
219d3a9151 | ||
|
|
79f3228389 | ||
|
|
f13c265e70 | ||
|
|
ca11661405 | ||
|
|
5dab97c71e | ||
|
|
de1ca4d414 | ||
|
|
bb7eb4f095 | ||
|
|
40e158bb24 | ||
|
|
7d0cfcddda | ||
|
|
c46024cb6a | ||
|
|
df905440f5 | ||
|
|
42e36f11da | ||
|
|
69acd541d3 | ||
|
|
a8cc94d5b9 | ||
|
|
5cd9164d21 | ||
|
|
b481071e6b | ||
|
|
443c9a74ff | ||
|
|
acd8afd3b5 | ||
|
|
a3795b4312 | ||
|
|
d643bd332e | ||
|
|
a145ddc5fc | ||
|
|
d0d71cb45b | ||
|
|
bb860a5f26 | ||
|
|
4226546b46 | ||
|
|
f80d89cee4 | ||
|
|
46d7d4b2ad | ||
|
|
3c2105eae1 | ||
|
|
81d5d51938 | ||
|
|
2f373ba893 | ||
|
|
db2edc29be | ||
|
|
47dc686e89 | ||
|
|
434d5b9f2b | ||
|
|
5429120a93 | ||
|
|
5f0e2a8366 | ||
|
|
5c06a78ac1 | ||
|
|
26917639b9 | ||
|
|
4676e83921 | ||
|
|
b24d1f8b7e | ||
|
|
8d4dc58ddf | ||
|
|
8fb585c3bd | ||
|
|
d4cfdd0153 | ||
|
|
a82fbe2193 | ||
|
|
616a283538 | ||
|
|
38ffe6e047 | ||
|
|
b39ef8d44c | ||
|
|
92e81d51be | ||
|
|
ebc06d3b9c | ||
|
|
6e215b016a | ||
|
|
fb33815586 | ||
|
|
ea269d69c7 | ||
|
|
5453be7ed4 | ||
|
|
9c5cb6e020 | ||
|
|
62ce927ef9 | ||
|
|
ed814d77f4 | ||
|
|
2af21754d7 | ||
|
|
31e64c87bc | ||
|
|
9ae1e097f4 | ||
|
|
078e03b637 | ||
|
|
0673d8f790 | ||
|
|
13c6737d87 | ||
|
|
a10009f6ae | ||
|
|
8a98f06910 | ||
|
|
881f3c6393 | ||
|
|
2312a6b766 | ||
|
|
6929abc2db | ||
|
|
6c0c2d548e | ||
|
|
1e20c8ce30 | ||
|
|
b872cbf0ec | ||
|
|
8958b93a98 | ||
|
|
a7a48c6145 | ||
|
|
66db13d1ae | ||
|
|
673231881e | ||
|
|
7274b29714 | ||
|
|
5631e8ea0d | ||
|
|
e180bf6fb4 | ||
|
|
c911d27a8f | ||
|
|
2198df02b4 | ||
|
|
4cb4622438 | ||
|
|
9299625f04 | ||
|
|
81a53dbb6f | ||
|
|
424effe5f2 | ||
|
|
43c672df54 | ||
|
|
d0de85c7cd | ||
|
|
b25796e4b5 | ||
|
|
28259b23f7 | ||
|
|
cb398487f1 | ||
|
|
758f79d1ad | ||
|
|
a42b1546b3 | ||
|
|
04eacd6615 | ||
|
|
a13550370a | ||
|
|
9ab022f5ba | ||
|
|
35089726d9 | ||
|
|
a3d81c6029 | ||
|
|
5828b76ea7 | ||
|
|
882c617031 | ||
|
|
8523b760e4 | ||
|
|
f1210a6103 | ||
|
|
8a85df4a36 | ||
|
|
aeb557d004 | ||
|
|
ccd343db0f | ||
|
|
15d1a8623e | ||
|
|
d2b2538d77 | ||
|
|
8bad202185 | ||
|
|
2fd03290e6 | ||
|
|
ee0e6a9519 | ||
|
|
b0ba0fc4fc | ||
|
|
622c22cf24 | ||
|
|
793a4631d6 | ||
|
|
bb1758b699 | ||
|
|
211e3eaea9 | ||
|
|
13d766e071 | ||
|
|
4427d37cd3 | ||
|
|
2ee090e749 | ||
|
|
56e578f99c | ||
|
|
a033d99f66 | ||
|
|
f101fb5afb | ||
|
|
325db06cd6 | ||
|
|
b36bd89a32 | ||
|
|
917534e474 | ||
|
|
2e17de4983 | ||
|
|
2aa996b59d | ||
|
|
ae2f714ec1 | ||
|
|
3b73b28e1c | ||
|
|
a786556623 | ||
|
|
abbcbdfdac | ||
|
|
2115d2e7c9 | ||
|
|
b73087a190 | ||
|
|
7275d126c7 | ||
|
|
dff4b57d66 | ||
|
|
f59ca76dfc | ||
|
|
6bc44b934c | ||
|
|
19a73ef5d4 | ||
|
|
a42d253962 | ||
|
|
bfd0ce283e | ||
|
|
c0ff1ddbe9 | ||
|
|
907d742ba6 | ||
|
|
67b680e83a | ||
|
|
3d5189c8a8 | ||
|
|
f5e17393a7 | ||
|
|
d354f5cefe | ||
|
|
7f60b24c15 | ||
|
|
75d30fd48c | ||
|
|
1dd501427d | ||
|
|
c5fb4f099a | ||
|
|
e63c471baf | ||
|
|
1090f6bd5a | ||
|
|
c139c29538 | ||
|
|
2f5c625abd | ||
|
|
85a19f514a | ||
|
|
d57b196649 | ||
|
|
7ccd76e99f | ||
|
|
bad812ff2a | ||
|
|
b14a563403 | ||
|
|
c9261d7702 | ||
|
|
8f5a398154 | ||
|
|
bf13b5ebc8 | ||
|
|
81e1eb5660 | ||
|
|
8419dc567e | ||
|
|
82b63a0c3e | ||
|
|
a80d7bbc03 | ||
|
|
bc5e04e6b8 | ||
|
|
d131261dda | ||
|
|
a1d49556d2 | ||
|
|
e6e6b3d486 | ||
|
|
f82a3615b3 | ||
|
|
12ec6e3ca5 | ||
|
|
79097158e5 | ||
|
|
36788ed6c7 | ||
|
|
a74b0e23de | ||
|
|
eaa85466e3 | ||
|
|
d6cab77a7b | ||
|
|
a12ea44824 | ||
|
|
4d3124aadb | ||
|
|
5a4fe8ce43 | ||
|
|
5f1abee203 | ||
|
|
6070861ed2 | ||
|
|
4923cf0277 | ||
|
|
834d55a156 | ||
|
|
49d9af722e | ||
|
|
ecb098e65c | ||
|
|
55c1391afc | ||
|
|
35b1ce3d1d | ||
|
|
e61c61679d | ||
|
|
6737e8b958 | ||
|
|
520819a8c2 | ||
|
|
8e36b6b0ea | ||
|
|
05edea23b5 | ||
|
|
f933d7a605 | ||
|
|
836e26cb55 | ||
|
|
375daa1d13 | ||
|
|
cc7df9d88b | ||
|
|
3f20295c89 | ||
|
|
8b1f4ab24d | ||
|
|
e709445fb8 | ||
|
|
fd6c8c2742 | ||
|
|
6872945e32 | ||
|
|
14ee103e19 | ||
|
|
589bc60267 | ||
|
|
05c8f3728c | ||
|
|
ecd148149e | ||
|
|
9ccdd9884a | ||
|
|
7597fd7a20 | ||
|
|
d004729626 | ||
|
|
7a9c5a9f2d | ||
|
|
83c45934af | ||
|
|
4c8d57cca9 | ||
|
|
5aa8f17670 | ||
|
|
76e59348b2 | ||
|
|
931a136d5c | ||
|
|
7e2d61d788 | ||
|
|
16c47f466b | ||
|
|
2ee0114b14 | ||
|
|
2d3947ecd1 | ||
|
|
d69b7e3e49 | ||
|
|
d9256650b7 | ||
|
|
e7fb41f56f | ||
|
|
ff007306fc | ||
|
|
fe362d09fc | ||
|
|
206352a8e6 | ||
|
|
faff79e9c6 | ||
|
|
7a34a175e6 | ||
|
|
aac930bdb4 | ||
|
|
de3e1cf0ba | ||
|
|
75c71a90d5 | ||
|
|
baad476f38 | ||
|
|
94cb4f8f7f | ||
|
|
4154184fb4 | ||
|
|
e1860299f7 | ||
|
|
d49eea9fbd | ||
|
|
3171c8a84c | ||
|
|
ab1c6e1c13 | ||
|
|
6b594d31f4 | ||
|
|
c93302501e | ||
|
|
90ce95977b | ||
|
|
beac7446ff | ||
|
|
730a45d383 | ||
|
|
4077409448 | ||
|
|
fa24231caf | ||
|
|
2d648bf4cc | ||
|
|
07f46ab421 | ||
|
|
d603bbc495 | ||
|
|
d3ca47d386 | ||
|
|
43992af553 | ||
|
|
73907eb807 | ||
|
|
e354e17266 | ||
|
|
ca7563d9a2 | ||
|
|
5fef5b818e | ||
|
|
6670293ccd | ||
|
|
e75717260b | ||
|
|
edd46c8f79 | ||
|
|
e42a839828 | ||
|
|
c8d60f65e0 | ||
|
|
afe2165af6 | ||
|
|
ff83e07e69 | ||
|
|
e40e7f08e3 | ||
|
|
403579c512 | ||
|
|
b5a8792350 | ||
|
|
5d12a9f055 | ||
|
|
aa3f472c37 | ||
|
|
9b91ee760b | ||
|
|
af4e6c1ad3 | ||
|
|
5d09cacc6c | ||
|
|
7cd4fe3b4f | ||
|
|
7b47443385 | ||
|
|
39e712cf51 | ||
|
|
96d725e88a | ||
|
|
fcaf4e442e | ||
|
|
daee3f88d2 | ||
|
|
8fd4cd8009 | ||
|
|
151608c57c | ||
|
|
27b7b59c4a | ||
|
|
0d59ac68c0 | ||
|
|
c166a21a8b | ||
|
|
f0ea039514 | ||
|
|
7d4ddba8df | ||
|
|
7a820560c5 | ||
|
|
3d495b1c21 | ||
|
|
edc45943e2 | ||
|
|
ea35873645 | ||
|
|
62aad5a22b | ||
|
|
876df6e005 | ||
|
|
7b2ec0f967 | ||
|
|
25155facf6 | ||
|
|
4186fb3080 | ||
|
|
ebb4b603a4 | ||
|
|
3ae29ec453 | ||
|
|
f3233b12db | ||
|
|
107c9d330c | ||
|
|
45ae528f17 | ||
|
|
ef2c721fd0 | ||
|
|
842e49cc86 | ||
|
|
f080f55b88 | ||
|
|
26d270a51a | ||
|
|
53f0807add | ||
|
|
222ab9be7c | ||
|
|
3bc44d3e0d | ||
|
|
54edd21f79 | ||
|
|
5cee25efee | ||
|
|
f8b417506a | ||
|
|
f55ea6b1f8 | ||
|
|
8e63f60a6e | ||
|
|
77cc830feb | ||
|
|
6d229c72fe | ||
|
|
66c59a3600 | ||
|
|
f147b89c2b | ||
|
|
9d9f3ea70c | ||
|
|
b2a458f547 | ||
|
|
cd7c6a54e0 | ||
|
|
6f2f239e93 | ||
|
|
d2c5a7d784 | ||
|
|
5d42b463c8 | ||
|
|
bc7774de4d | ||
|
|
de4af1518c | ||
|
|
3ff11e072b | ||
|
|
dd71224d63 | ||
|
|
d9c32d5b1e | ||
|
|
f78deb7b93 | ||
|
|
1e3d5f28bd | ||
|
|
0fab23f4e4 | ||
|
|
c4c529f3a2 | ||
|
|
ce4887435a | ||
|
|
004d6b4a9b | ||
|
|
efe5f33a22 | ||
|
|
3182eff718 | ||
|
|
a4fbee3207 | ||
|
|
9980536522 | ||
|
|
0b05cc5b17 | ||
|
|
39707f70ac | ||
|
|
596257122e | ||
|
|
92d53de182 | ||
|
|
65a290f447 | ||
|
|
76ea0d34e7 | ||
|
|
ded67fe648 | ||
|
|
ffdd316a67 | ||
|
|
35058aa56e | ||
|
|
3bd7f05694 | ||
|
|
51f2758f7a | ||
|
|
70a1b34c3a | ||
|
|
746d3a514c | ||
|
|
5e7dd5eeff | ||
|
|
16022bcc2d | ||
|
|
952b1b2f34 | ||
|
|
06a01c257e | ||
|
|
01900aa7ba | ||
|
|
9d5c5266a4 | ||
|
|
172dd92636 | ||
|
|
7a567a967e | ||
|
|
d09899fb68 | ||
|
|
ec3bd9b48b | ||
|
|
242f165c5c | ||
|
|
091d3b0f70 | ||
|
|
c4aafe3dd3 | ||
|
|
0ec33a46d5 | ||
|
|
05812c394e | ||
|
|
f1c27399a3 | ||
|
|
72b9d6b983 | ||
|
|
789884b41c | ||
|
|
c3478fd090 | ||
|
|
8abd69a723 | ||
|
|
ff1281e386 | ||
|
|
066b844b8e | ||
|
|
c425c79d2b | ||
|
|
f44b11dfc9 | ||
|
|
927ad515ab | ||
|
|
53e1d93352 | ||
|
|
3ce1cd520f | ||
|
|
4df531e749 | ||
|
|
e3a21d50ba | ||
|
|
6cf98066ac | ||
|
|
40ad3c429c | ||
|
|
9b8f92f0f7 | ||
|
|
89102a1e86 | ||
|
|
77b5187fd3 | ||
|
|
a4e54a3c7f | ||
|
|
1844845d1c | ||
|
|
bbef238e61 | ||
|
|
47443ef810 | ||
|
|
634c7c6917 | ||
|
|
eeb0b78328 | ||
|
|
a9032e22a7 | ||
|
|
361256bdf0 | ||
|
|
33811962fe | ||
|
|
4a007f497c | ||
|
|
34124cc037 | ||
|
|
c5d36d0bf9 | ||
|
|
76c315882d | ||
|
|
6d99a935d9 | ||
|
|
334e99026d | ||
|
|
a8d68dd72d | ||
|
|
39fdfac0c1 | ||
|
|
687ebe8827 | ||
|
|
dd6aeee59c | ||
|
|
559c588472 | ||
|
|
96ce68340d | ||
|
|
538f734cc8 | ||
|
|
b321264add | ||
|
|
383a3ee34f | ||
|
|
b085aa2d80 | ||
|
|
6b52105797 | ||
|
|
819b74e8ee | ||
|
|
1e2ded6dde | ||
|
|
7b78e0762e | ||
|
|
632ff2b027 | ||
|
|
7799d94699 | ||
|
|
d61a7b5e5d | ||
|
|
d54c408769 | ||
|
|
8ce492dbae | ||
|
|
6985a93b59 | ||
|
|
7b737a85f9 | ||
|
|
f3f6dd40f1 | ||
|
|
c350b62cd2 | ||
|
|
0e95ef2192 | ||
|
|
aaa6aa35bc | ||
|
|
7b3ba914de | ||
|
|
7b547ed88c | ||
|
|
7367e9c4e8 | ||
|
|
6013c42cd4 | ||
|
|
95aa8c9560 | ||
|
|
d6cf18bd5c | ||
|
|
f1ab78279e | ||
|
|
122f6dfc60 | ||
|
|
dd7517fb67 | ||
|
|
656256dc66 | ||
|
|
aa4bd03e38 | ||
|
|
888a39837d | ||
|
|
81b8fa2114 | ||
|
|
83804a7668 | ||
|
|
fe2dfe1d65 | ||
|
|
32d519b272 | ||
|
|
71a2e7f619 | ||
|
|
38f22e2aa0 | ||
|
|
4390ec12b5 | ||
|
|
9a138670c3 | ||
|
|
39b03e4720 | ||
|
|
8b6cb46655 | ||
|
|
7969378335 | ||
|
|
547b95a473 | ||
|
|
13a549a015 | ||
|
|
2e707458c7 | ||
|
|
79465ac833 | ||
|
|
ef78c399b9 | ||
|
|
918ecba24e | ||
|
|
86663ad2d2 | ||
|
|
59af6900ad | ||
|
|
c9e257ea1a | ||
|
|
eaac213d4f | ||
|
|
67a8c4860d | ||
|
|
c47e48a9b6 | ||
|
|
f9399fc1d9 | ||
|
|
61db62b21d | ||
|
|
a1b8c0d103 | ||
|
|
a6f99a3e4d | ||
|
|
72ac9f094d | ||
|
|
463b4a02ea | ||
|
|
6342391243 | ||
|
|
918cebcaf0 | ||
|
|
f455f1425b | ||
|
|
9e6192db8c | ||
|
|
d690ecd363 | ||
|
|
5420d33c7d | ||
|
|
72355204fc | ||
|
|
4e3a0351d6 | ||
|
|
b281c993e0 | ||
|
|
34acb5b739 | ||
|
|
038789f301 | ||
|
|
5f784bdf41 | ||
|
|
9e81a4cc4f | ||
|
|
e23b0b4d2b | ||
|
|
ba7f837c3f | ||
|
|
28e9076e82 | ||
|
|
32f80411a8 | ||
|
|
21cd004974 | ||
|
|
01504ff404 | ||
|
|
3f5ab514c0 | ||
|
|
01c794b83e | ||
|
|
14942259e5 | ||
|
|
33e8eefc6e | ||
|
|
878b651765 | ||
|
|
d8c1fe8108 | ||
|
|
b96af4cc02 | ||
|
|
349a5b792a | ||
|
|
06497e1d9a | ||
|
|
662150c821 | ||
|
|
551aab1cfb | ||
|
|
4f37edcbaf | ||
|
|
3dfee0ac65 | ||
|
|
515b453da4 | ||
|
|
0d82b1a976 | ||
|
|
911f2b4bab | ||
|
|
387c6e298b | ||
|
|
3712be5b70 | ||
|
|
12d63cbc2c | ||
|
|
6cf10a2c8f | ||
|
|
c94a0b546a | ||
|
|
ff51c61744 | ||
|
|
2ba65cb802 | ||
|
|
80d85aafe8 | ||
|
|
d7bff50abd | ||
|
|
bad87d0d5e | ||
|
|
c08f38eb2e | ||
|
|
ad793ba764 | ||
|
|
b1ba539945 | ||
|
|
663d017a1f | ||
|
|
2dc0f84dcc | ||
|
|
79371dc12f | ||
|
|
c31fdccbfb | ||
|
|
7701272539 | ||
|
|
66957eef90 | ||
|
|
7738532199 | ||
|
|
0d9f495e05 | ||
|
|
25daf694c1 | ||
|
|
f7152c3061 | ||
|
|
f4ec9c1bcb | ||
|
|
e080c65b70 | ||
|
|
a532ef9914 | ||
|
|
84126547ba | ||
|
|
690f2b8841 | ||
|
|
1b57a27879 | ||
|
|
ffc7da7028 | ||
|
|
f62f37904d | ||
|
|
62cb676b6a | ||
|
|
5f6dee8df5 | ||
|
|
d1eaff1d22 | ||
|
|
6e5708bb98 | ||
|
|
2ede6097ad | ||
|
|
d2fa4e9b63 | ||
|
|
9d3f859974 | ||
|
|
5f5c406a3d | ||
|
|
0f20c91e94 | ||
|
|
aaf5d826a3 | ||
|
|
dad5bb71ee | ||
|
|
036b2350e7 | ||
|
|
bc81f492f2 | ||
|
|
2a78ca9a1b | ||
|
|
85cf5087f7 | ||
|
|
bfe2e29249 | ||
|
|
7113ea82aa | ||
|
|
e5d9f1a191 | ||
|
|
b888a3e064 | ||
|
|
15bf60f397 | ||
|
|
35ab099cce | ||
|
|
36ea07b076 | ||
|
|
f05c860692 | ||
|
|
bee9c1c045 | ||
|
|
f5c2b951c6 | ||
|
|
6ac39062f2 | ||
|
|
31c5e9b29c | ||
|
|
87faeb12dd | ||
|
|
e24d8109ff | ||
|
|
f417f8caae | ||
|
|
40f7bc9185 | ||
|
|
6472a448a9 | ||
|
|
80bfdfa257 | ||
|
|
8477690784 | ||
|
|
b09eb7cb42 | ||
|
|
fc15bad06c | ||
|
|
ed8b0bcc06 | ||
|
|
59bdc266e9 | ||
|
|
9c196d080a | ||
|
|
d7deb04c74 | ||
|
|
ffab8ec14d | ||
|
|
027aaea799 | ||
|
|
9459388036 | ||
|
|
684b2c787d | ||
|
|
d6eed05b35 | ||
|
|
f28bff152b | ||
|
|
a473c610d8 | ||
|
|
786b72e55c | ||
|
|
2d0c19a2f7 | ||
|
|
c6c1832bc6 | ||
|
|
0ce4006b5e | ||
|
|
d00e26d0fd | ||
|
|
6b877bcf8f | ||
|
|
b4e595ce3b | ||
|
|
5f34d3e906 | ||
|
|
888582339f | ||
|
|
74dd9d2c40 | ||
|
|
1e69ae827e | ||
|
|
8f2fe6a334 | ||
|
|
65ff54b98d | ||
|
|
a5ba2d94e0 | ||
|
|
b4be266d15 | ||
|
|
d6a7e7fe5a | ||
|
|
9ba7ead6c8 | ||
|
|
ce0beb62a1 | ||
|
|
6b7b78802b | ||
|
|
4f62898f31 | ||
|
|
dc8951dd89 | ||
|
|
1054cfe93c | ||
|
|
40fa5f8161 | ||
|
|
ea4bffeaa5 | ||
|
|
a329d55857 | ||
|
|
d7d1f7f2e8 | ||
|
|
2b77443ddc | ||
|
|
85d928f2e6 | ||
|
|
8688baa623 | ||
|
|
ce67295e7d | ||
|
|
e79efce17d | ||
|
|
a40dde9432 | ||
|
|
e785b540c7 | ||
|
|
2f8dfa3a36 | ||
|
|
c0730c419f | ||
|
|
a7e5f6ff5f | ||
|
|
600cee7395 | ||
|
|
14f414f6ca | ||
|
|
7d8ab5e77a | ||
|
|
3eee1c769a | ||
|
|
7095790129 | ||
|
|
b831a11746 | ||
|
|
0dbe5ac09c | ||
|
|
f2ff8d3248 | ||
|
|
0ec0cdbff1 | ||
|
|
1bc82628f6 | ||
|
|
3a90c008b0 | ||
|
|
e71e817577 | ||
|
|
cbf7a61260 | ||
|
|
9b55aad993 | ||
|
|
1d50dc1587 | ||
|
|
6ed439063b | ||
|
|
64ea49044a | ||
|
|
6802be2a34 | ||
|
|
38c8dd81e1 | ||
|
|
df96a45b4f | ||
|
|
8139eca40f | ||
|
|
aa7e949df9 | ||
|
|
68357b95bf | ||
|
|
1ca9ca4112 | ||
|
|
380bf68cfc | ||
|
|
93f431431f | ||
|
|
1e46f9234a | ||
|
|
13364bff65 | ||
|
|
8d83ab15c5 | ||
|
|
bf034aab41 | ||
|
|
6a7fb1643d | ||
|
|
51a336ae83 | ||
|
|
e1ed7237a0 | ||
|
|
9042abab6a | ||
|
|
902828dc49 | ||
|
|
7b0fbf9b23 | ||
|
|
0137f9ca11 | ||
|
|
dcd7e0a7cf | ||
|
|
dc545a3ba5 | ||
|
|
fc0fa1f078 | ||
|
|
023ed5563f | ||
|
|
ed42afa473 | ||
|
|
7058163f70 | ||
|
|
4ee96b8f10 | ||
|
|
0350521a58 | ||
|
|
c91ac4d9dd | ||
|
|
65b87a5699 | ||
|
|
2359a6e113 | ||
|
|
89d7a3be49 | ||
|
|
87088f7b55 | ||
|
|
04cd0505c5 | ||
|
|
9c2b777b05 | ||
|
|
ff4454c85b | ||
|
|
9e0f58ca46 | ||
|
|
7d67cefd73 | ||
|
|
dc70f2bf2e | ||
|
|
b44b0472b9 | ||
|
|
623c930158 | ||
|
|
f5188ea76c | ||
|
|
2488031e83 | ||
|
|
499e18280a | ||
|
|
09a016b58b | ||
|
|
2d367b55e3 | ||
|
|
70cefeb99c | ||
|
|
a832fb028e | ||
|
|
66a2c34be3 | ||
|
|
673e13f462 | ||
|
|
1f04e25e13 | ||
|
|
4e71d5a186 | ||
|
|
30ce3bae48 | ||
|
|
4271beb615 | ||
|
|
0ebf5e5bea | ||
|
|
ada5eb0a0d | ||
|
|
302fd92754 | ||
|
|
47535d2cdd | ||
|
|
6de2f61076 | ||
|
|
af861d03b5 | ||
|
|
5eb6737b0b | ||
|
|
f333c420f0 | ||
|
|
22986f7a19 | ||
|
|
a519a9eaee | ||
|
|
cf97aa4c18 | ||
|
|
b1a5f92916 | ||
|
|
a50d48ddd1 | ||
|
|
21a90dca17 | ||
|
|
2deff411bf | ||
|
|
bac348b6e8 | ||
|
|
8f5ee4819e | ||
|
|
0b0486a4ee | ||
|
|
28c5d624c2 | ||
|
|
98d0777a79 | ||
|
|
350b5b7023 | ||
|
|
774bbf2c03 | ||
|
|
3a43d26aef | ||
|
|
a3ca02c8a5 | ||
|
|
d0a84e0d0f | ||
|
|
59f3667aa2 | ||
|
|
81b0f4a988 | ||
|
|
be441991ca | ||
|
|
794f1717a1 | ||
|
|
0549fd0347 | ||
|
|
ecaf6a8f53 | ||
|
|
102bc8cb31 | ||
|
|
c7d808c0bd | ||
|
|
56e136e717 | ||
|
|
94a8e01543 | ||
|
|
eaecef60d1 | ||
|
|
eafb294209 | ||
|
|
7f0dd034c4 | ||
|
|
caa7fac662 | ||
|
|
f6c0627e32 | ||
|
|
6dc64c65a2 | ||
|
|
a7bdb0b115 | ||
|
|
7afa244e6a | ||
|
|
3fa01d304c | ||
|
|
ceb5d45085 | ||
|
|
0a6e7b48c7 | ||
|
|
0938351e6a | ||
|
|
432684550d | ||
|
|
681a09201a | ||
|
|
447fa76acb | ||
|
|
6d143de11b | ||
|
|
0e990e163c | ||
|
|
86d422087f | ||
|
|
9b3f2874ed | ||
|
|
ddf634ab30 | ||
|
|
a55c977441 | ||
|
|
ba415a937d | ||
|
|
a113526ca9 | ||
|
|
524fe9e22a | ||
|
|
ba33274087 | ||
|
|
41a551fc12 | ||
|
|
0e56713f48 | ||
|
|
04d0f59144 | ||
|
|
c5d9644e70 | ||
|
|
e3afd3d4b5 | ||
|
|
f2a8d3619c | ||
|
|
3afc19fd1b | ||
|
|
2d2ecc8862 | ||
|
|
1d48465456 | ||
|
|
be7db3fa40 | ||
|
|
8aaad31a7b | ||
|
|
dcc4aa0d7f | ||
|
|
bda924566f | ||
|
|
6b8b32ae5e | ||
|
|
ae2aaa1e6d | ||
|
|
7b8d1dade0 | ||
|
|
40e133a806 | ||
|
|
b268cb063d | ||
|
|
321992a284 | ||
|
|
0fdcae4c21 | ||
|
|
ca060c6088 | ||
|
|
8caac62e18 | ||
|
|
3436904035 | ||
|
|
7f8eb5deb7 | ||
|
|
ae0fe4c054 | ||
|
|
0d3168782e | ||
|
|
2ec5b06e44 | ||
|
|
0bce9b0ba8 | ||
|
|
e6e8b2f783 | ||
|
|
dc220f05cf | ||
|
|
f8fa4cdb5a | ||
|
|
30d3aec48a | ||
|
|
8fa2591d1c | ||
|
|
e6d76e5049 | ||
|
|
f56beb312f | ||
|
|
f435beea8f | ||
|
|
669e289d27 | ||
|
|
96b2084b64 | ||
|
|
af613af810 | ||
|
|
5e79834287 | ||
|
|
2c5f027534 | ||
|
|
b224237503 | ||
|
|
71b7f80207 | ||
|
|
4ba078784a | ||
|
|
76c4096761 | ||
|
|
868467ec1f | ||
|
|
4367865f6f | ||
|
|
da73ba18dc | ||
|
|
17ef7a759c | ||
|
|
b9f2d793f5 | ||
|
|
01d63d9d63 | ||
|
|
1e9380f418 | ||
|
|
325e83920c | ||
|
|
9c0b40b367 | ||
|
|
6149329707 | ||
|
|
ecc6962024 | ||
|
|
be36a88607 | ||
|
|
026b0742c2 | ||
|
|
1e29fe6525 | ||
|
|
81b1465cd1 | ||
|
|
b960f0305c | ||
|
|
b396063d7d | ||
|
|
1a408a7234 | ||
|
|
e203728fb5 | ||
|
|
6d0ca82418 | ||
|
|
d09fed8f95 | ||
|
|
e874df408b | ||
|
|
03c1fc8d28 | ||
|
|
e78f94d59f | ||
|
|
512a199382 | ||
|
|
c4317b556b | ||
|
|
3efab62747 | ||
|
|
835d9b9816 | ||
|
|
3bedb90578 | ||
|
|
d63085002a | ||
|
|
23602d95f2 | ||
|
|
f522a38f68 | ||
|
|
2556b0f9ed | ||
|
|
e24842913f | ||
|
|
2f70d3d665 | ||
|
|
44349b2775 | ||
|
|
fbf26fe628 | ||
|
|
28eb7efff2 | ||
|
|
c0f2eb3471 | ||
|
|
a184f8fe89 | ||
|
|
0ef899f955 | ||
|
|
7ca44dd84c | ||
|
|
40700ef1bd | ||
|
|
b47adf15fd | ||
|
|
ca53694c71 | ||
|
|
c6c85f76ad | ||
|
|
47f649c96d | ||
|
|
a17c8f2eef | ||
|
|
57bfafbaeb | ||
|
|
ab2debfd32 | ||
|
|
e20cb789e6 | ||
|
|
fd81de52d4 | ||
|
|
2b501bb815 | ||
|
|
fe8739c587 | ||
|
|
14e71e3aaa | ||
|
|
1e35d0ef02 | ||
|
|
f8b1ce122a | ||
|
|
3a01a7f50c | ||
|
|
afd286d72b | ||
|
|
53d86fb008 | ||
|
|
581e4649d5 | ||
|
|
f95f1b8cc6 | ||
|
|
430164d52d | ||
|
|
d64863a6cf | ||
|
|
c0a0657f42 | ||
|
|
447d6d0aee | ||
|
|
cc2968c2e9 | ||
|
|
562e84aa97 | ||
|
|
bab71d1da4 | ||
|
|
e1fab541e5 | ||
|
|
8d12d313f5 | ||
|
|
c643045b57 | ||
|
|
b72b30ab6d | ||
|
|
d1e6ca611a | ||
|
|
47b8fc72a5 | ||
|
|
a0047a6d49 | ||
|
|
4eef588031 | ||
|
|
00439ecfa9 | ||
|
|
24542bc4fc | ||
|
|
8b4dd70b48 | ||
|
|
ea4256a9f2 | ||
|
|
395d53fe0c | ||
|
|
a6a02e5c6e | ||
|
|
f55db60431 | ||
|
|
881a852d96 | ||
|
|
ef9fbf81da | ||
|
|
2a31a33194 | ||
|
|
7317087458 | ||
|
|
92b69fbe93 | ||
|
|
a4369b7d59 | ||
|
|
a73f1fe939 | ||
|
|
ae69496159 | ||
|
|
6b1854afe7 | ||
|
|
0128c309a9 | ||
|
|
3053680369 | ||
|
|
0b3bfa9678 | ||
|
|
16db020f04 | ||
|
|
fd95858e65 | ||
|
|
45c803def4 | ||
|
|
74c7cb0bc6 | ||
|
|
cd15f14d5c | ||
|
|
01e4b2470f | ||
|
|
b7c763375e | ||
|
|
4f35c1d7c4 | ||
|
|
19fc7d3472 | ||
|
|
ae4239597d | ||
|
|
be67372350 | ||
|
|
4e382eccd4 | ||
|
|
96c6abe1c9 | ||
|
|
a02a7a91ee | ||
|
|
dce5d55672 | ||
|
|
7e46255ca6 | ||
|
|
3b25f8d8da | ||
|
|
70119da5b2 | ||
|
|
7629c089f4 | ||
|
|
4c38bb4094 | ||
|
|
2f7bea450b | ||
|
|
1cc457266f | ||
|
|
1b89299c9c | ||
|
|
570648a89c | ||
|
|
35d9b03b96 | ||
|
|
14c68fb69d | ||
|
|
0d746a4053 | ||
|
|
06685f185c | ||
|
|
bde76c94cb | ||
|
|
2b573aedaf | ||
|
|
b1cabfca1a | ||
|
|
588ec01baf | ||
|
|
6a9390170d | ||
|
|
d81b61dd46 | ||
|
|
74989c14ef | ||
|
|
7b1f41a064 | ||
|
|
848201f71a | ||
|
|
d3ab6c4060 | ||
|
|
229bdb6514 | ||
|
|
d7f4f974d3 | ||
|
|
411bba66f8 | ||
|
|
9cfde0b6a6 | ||
|
|
424fe44e30 | ||
|
|
074088de08 | ||
|
|
012671159c | ||
|
|
21ce4d5fbb | ||
|
|
12c57cc762 | ||
|
|
64f4358c77 | ||
|
|
8fb2734f7c | ||
|
|
ff7fff97fa | ||
|
|
e57efd0d79 | ||
|
|
e4c03d2775 | ||
|
|
42dfa2233c | ||
|
|
f6882998dd | ||
|
|
da7b0bf51a | ||
|
|
8c4a47916b | ||
|
|
3c965f556b | ||
|
|
b5113dee24 | ||
|
|
c925d4d85b | ||
|
|
d11893a05a | ||
|
|
272d71fa29 | ||
|
|
5140055482 | ||
|
|
0a38544023 | ||
|
|
6dc53704b8 | ||
|
|
9577fc4e95 | ||
|
|
355cbbc32b | ||
|
|
6311c1c612 | ||
|
|
d5d5daee8e | ||
|
|
d684b3b6f0 | ||
|
|
d56404207f | ||
|
|
2d5aee85f8 | ||
|
|
c4f3a1c795 | ||
|
|
88673a2f16 | ||
|
|
15c60163a8 | ||
|
|
d18e824c70 | ||
|
|
3587b57a3a | ||
|
|
fec66d5c05 | ||
|
|
92144559a9 | ||
|
|
0389430f17 | ||
|
|
cbd71c0d74 | ||
|
|
d57487dfb0 | ||
|
|
8bbc4c2209 | ||
|
|
540ac8939c | ||
|
|
2b45705ffd | ||
|
|
e9e20e78c3 | ||
|
|
62da79859f | ||
|
|
91b4fc1025 | ||
|
|
79fb27cbac | ||
|
|
81cd1ae247 | ||
|
|
1e6bab9a0b | ||
|
|
4d70df7457 | ||
|
|
7081bb3a43 | ||
|
|
07023b15a4 | ||
|
|
e96c698fe9 | ||
|
|
e250f780c0 | ||
|
|
94d445d354 | ||
|
|
11ea7470b4 | ||
|
|
70cf5096f3 | ||
|
|
85e6f51724 | ||
|
|
ec3c3543f3 | ||
|
|
0696fde360 | ||
|
|
d73d4e7e8c | ||
|
|
8cc0779541 | ||
|
|
c778353cda | ||
|
|
ccca4afc53 | ||
|
|
524d5fa2a0 | ||
|
|
fdbe389995 | ||
|
|
3065689ed2 | ||
|
|
2654499f62 | ||
|
|
32dac5731c | ||
|
|
8a4fb52830 | ||
|
|
74aa188bd4 | ||
|
|
9b2400040f | ||
|
|
29e74c1f50 | ||
|
|
b3d4269476 | ||
|
|
68776ea8af | ||
|
|
4a11d0eeb0 | ||
|
|
941a98d90a | ||
|
|
f549c1feee | ||
|
|
fe1deb1f23 | ||
|
|
941c5bee4e | ||
|
|
f803a6510d | ||
|
|
dc016a982c | ||
|
|
0b1b48a42f | ||
|
|
1c5bbd1602 | ||
|
|
14b99f8538 | ||
|
|
f22f817ed2 | ||
|
|
e7925f5191 | ||
|
|
30fe628a30 | ||
|
|
5e126b6c09 | ||
|
|
84a8313d6c | ||
|
|
f69bab0594 | ||
|
|
3c9b3c53fc | ||
|
|
3977bdd69d | ||
|
|
79c656e271 | ||
|
|
fc8e43037e | ||
|
|
d4f49b60fc | ||
|
|
02b0234a27 | ||
|
|
26aed3ea0f | ||
|
|
bf656ab6eb | ||
|
|
f450292a51 | ||
|
|
488040a140 | ||
|
|
4ddf92e827 | ||
|
|
db81dd428a | ||
|
|
df5ee99fc0 | ||
|
|
2d9637372e | ||
|
|
437bf628f1 | ||
|
|
7b2b69dd03 | ||
|
|
79e526833b | ||
|
|
cf4ea870cb | ||
|
|
8c6d72c88d | ||
|
|
f7a5bad3a9 | ||
|
|
1523683633 | ||
|
|
ac2b7d461d | ||
|
|
a724ddddfb | ||
|
|
bdd3b3396f | ||
|
|
94f5a264ca | ||
|
|
b4a674efe5 | ||
|
|
2f61a4d31f | ||
|
|
c36a4cab44 | ||
|
|
901e61ae78 | ||
|
|
c246b30991 | ||
|
|
cc138a42df | ||
|
|
bf01575dc1 | ||
|
|
e7aab4d034 | ||
|
|
185b980d9e | ||
|
|
033f24731a | ||
|
|
8fa17ad8af | ||
|
|
23fa98b4d4 | ||
|
|
310e59e582 | ||
|
|
d7f34153a7 | ||
|
|
8e494d47fb | ||
|
|
4c95f3504e | ||
|
|
247e47a754 | ||
|
|
2b7a590aa6 | ||
|
|
25e32840aa | ||
|
|
53ba8f28b6 | ||
|
|
24bb091e4d | ||
|
|
122b32731e | ||
|
|
2f8d624bcb | ||
|
|
fbb8193091 | ||
|
|
99406da8eb | ||
|
|
50652cda12 | ||
|
|
fdffb9cc89 | ||
|
|
7eb9fcaed2 | ||
|
|
0c534b94b9 | ||
|
|
cd0a53fbe5 | ||
|
|
39997a467b | ||
|
|
7ea94ef014 | ||
|
|
47d8b0f604 | ||
|
|
89fe3ddcc2 | ||
|
|
0e7a5e8974 | ||
|
|
c7cf92df67 | ||
|
|
885a1a8a6c | ||
|
|
70f26f5f73 | ||
|
|
82859d6a12 | ||
|
|
a8c04a4b17 | ||
|
|
d166461c12 | ||
|
|
6a2f25a8bd | ||
|
|
3d127fba5f | ||
|
|
bae7fcbe90 | ||
|
|
0935da1cd6 | ||
|
|
c987b3a3e1 | ||
|
|
e7742bc226 | ||
|
|
bdea1f5554 | ||
|
|
184da533a5 | ||
|
|
8bed0b9705 | ||
|
|
214a3021b0 | ||
|
|
a8398e017a | ||
|
|
3a311dbd6d | ||
|
|
219459eb7e | ||
|
|
9a8dc9b9a4 | ||
|
|
9b490f37f6 | ||
|
|
03a99a9a99 | ||
|
|
e9bb0681a2 | ||
|
|
962f8b200d | ||
|
|
8ccf5da63e | ||
|
|
5445ca5c53 | ||
|
|
3175d67da3 | ||
|
|
b69203ffa5 | ||
|
|
09cee87600 | ||
|
|
c27ae95a89 | ||
|
|
bbfa3a21eb | ||
|
|
fad068ba71 | ||
|
|
66684553a5 | ||
|
|
6435d700a9 | ||
|
|
37bf2841b4 | ||
|
|
12bfe03c58 | ||
|
|
cb1a609350 | ||
|
|
64f55cd2c6 | ||
|
|
449838625c | ||
|
|
748293b91a | ||
|
|
e9db404960 | ||
|
|
4cc3051da5 | ||
|
|
a2902fdd29 | ||
|
|
94031f7da9 | ||
|
|
fc3bade2df | ||
|
|
1c1852b940 | ||
|
|
1ed394b034 | ||
|
|
63fb2293c4 | ||
|
|
d6b24b26c0 | ||
|
|
1c14b211d3 | ||
|
|
3e4ca1111c | ||
|
|
efa0050cb7 | ||
|
|
343ceb40f5 | ||
|
|
b634aef1c4 | ||
|
|
36feae8e16 | ||
|
|
82a6326be2 | ||
|
|
d58ed52cbe | ||
|
|
5e959927f4 | ||
|
|
1d24adfa89 | ||
|
|
53916b3b9d | ||
|
|
4edc788c13 | ||
|
|
f3b07e8f84 | ||
|
|
4254668bfb | ||
|
|
0295638422 | ||
|
|
300c2284e4 | ||
|
|
4ac175d1f0 | ||
|
|
ae1adb84fb | ||
|
|
b4df55d4d6 | ||
|
|
bdb16e5a32 | ||
|
|
6ae13d87a0 | ||
|
|
0be44e2696 | ||
|
|
a8d6be994a | ||
|
|
ffa7ce55ee | ||
|
|
378ecd7629 | ||
|
|
d847ecfeed | ||
|
|
d30637c3fc | ||
|
|
a277fa550c | ||
|
|
f349fa8421 | ||
|
|
66411c76f1 | ||
|
|
f52d9ca449 | ||
|
|
b54a3d52fa | ||
|
|
f1d60f3654 | ||
|
|
5e47bed765 | ||
|
|
89fd84518b | ||
|
|
9ded9435f4 | ||
|
|
5fe64e4105 | ||
|
|
067944a472 | ||
|
|
f5aa884005 | ||
|
|
90751cdb53 | ||
|
|
8ef3a34ddf | ||
|
|
1f18b8647e | ||
|
|
f1f2255b5b | ||
|
|
7925360b22 | ||
|
|
e6862636a6 | ||
|
|
89ced63090 | ||
|
|
225b6155fa | ||
|
|
a080a3f8e4 | ||
|
|
3757626b2a | ||
|
|
e13f1e357a | ||
|
|
57d79eddcf | ||
|
|
3b91c61816 | ||
|
|
04e2524d40 | ||
|
|
4b4fdb9a03 | ||
|
|
75a279b25e | ||
|
|
3f2db7d83f | ||
|
|
56ec14acb9 | ||
|
|
84f6ebd897 | ||
|
|
4a19a0417f | ||
|
|
fd40a8c218 | ||
|
|
8c05d5063b | ||
|
|
d5617d6304 | ||
|
|
216d78f6e8 | ||
|
|
20ab374337 | ||
|
|
72119ac361 | ||
|
|
3de378b7f7 | ||
|
|
a17ac2ea69 | ||
|
|
38e3ff5c50 | ||
|
|
c5ce1f79c2 | ||
|
|
9cb69b49d7 | ||
|
|
1456e11803 | ||
|
|
ddd926e073 | ||
|
|
46aa097801 | ||
|
|
3c97864f0a | ||
|
|
e83d188d10 | ||
|
|
5a028c506d | ||
|
|
4a4e8e47a9 | ||
|
|
5256640fc3 | ||
|
|
be01c24635 | ||
|
|
75e14c8379 | ||
|
|
0b0e007d05 | ||
|
|
2306eb40ae | ||
|
|
ab0d6324cb | ||
|
|
a4de0ef66c | ||
|
|
f013a5980d | ||
|
|
616c12951b | ||
|
|
14bab28e63 | ||
|
|
755aeff1cd | ||
|
|
2a93ea01d2 | ||
|
|
1d3f543fbd | ||
|
|
059cd38f73 | ||
|
|
2916be666d | ||
|
|
2996de0a18 | ||
|
|
6c91a87474 | ||
|
|
d0c03174d9 | ||
|
|
5bbd4923a8 | ||
|
|
315216d7fd | ||
|
|
17251bb417 | ||
|
|
9f10c31f33 | ||
|
|
aff03a3bbd | ||
|
|
62195dfa0b | ||
|
|
b2ec0007e4 | ||
|
|
3c30f19198 | ||
|
|
02229b32db | ||
|
|
ed166e1011 | ||
|
|
d7545f20fe | ||
|
|
730da23524 | ||
|
|
ff124dd085 | ||
|
|
8e41170298 | ||
|
|
da937c6d5a | ||
|
|
afcfdd394d | ||
|
|
b2392e419e | ||
|
|
4d2978ff07 | ||
|
|
bd0a51ecb3 | ||
|
|
1270f69261 | ||
|
|
f12729ec6a | ||
|
|
b0ca5f6165 | ||
|
|
9c5ba9e3ae | ||
|
|
70aa3558f0 | ||
|
|
89a0c947a6 | ||
|
|
5b97f8d063 | ||
|
|
99d4fc16f7 | ||
|
|
950c7959b8 | ||
|
|
7355f3e2f7 | ||
|
|
5c59ce6662 | ||
|
|
82ede27999 | ||
|
|
bff501f250 | ||
|
|
bcd8b02270 | ||
|
|
9d633c100c | ||
|
|
fe90503f6d | ||
|
|
fe470f3188 | ||
|
|
ffeb9d3e6e | ||
|
|
f6d0426ee7 | ||
|
|
d1818c4b44 | ||
|
|
ebe4775a71 | ||
|
|
3036c88ada | ||
|
|
98630837bb | ||
|
|
a69d5d92f3 | ||
|
|
42982a8fad | ||
|
|
6865ed0f80 | ||
|
|
9086c0df30 | ||
|
|
c3f034f977 | ||
|
|
fe1e105df3 | ||
|
|
ec17e7f799 | ||
|
|
963b250aa6 | ||
|
|
0dced4556b | ||
|
|
023518bf0d | ||
|
|
8449677510 | ||
|
|
8ba4ba137d | ||
|
|
611379083e | ||
|
|
2e6388420a | ||
|
|
a4984e9831 | ||
|
|
71216b8d4d | ||
|
|
d1f242090e | ||
|
|
c7572b5864 | ||
|
|
e1e210c99d | ||
|
|
63885d1a04 | ||
|
|
a8233796be | ||
|
|
51874622e4 | ||
|
|
043ce3aa2b | ||
|
|
a6bbd936e0 | ||
|
|
90d816c619 | ||
|
|
902a70db23 | ||
|
|
84b471bed5 | ||
|
|
c711f3e05e | ||
|
|
cea619c62f | ||
|
|
bc39c2d2ec | ||
|
|
3ecbf8bc26 | ||
|
|
5cca9e5e1f | ||
|
|
e740012e81 | ||
|
|
2d05141535 | ||
|
|
57c0692444 | ||
|
|
5e40d92a61 | ||
|
|
6ade1ab7a6 | ||
|
|
ed3d64e849 | ||
|
|
6c7376f445 | ||
|
|
ef08237fd6 | ||
|
|
9a0013026f | ||
|
|
2a598bda65 | ||
|
|
b28ffcc13e | ||
|
|
2dcd54a2d8 | ||
|
|
acf4c9ccc7 | ||
|
|
ccbf15e5a2 | ||
|
|
e2ad6b69f8 | ||
|
|
b152814afb | ||
|
|
5014fb8e70 | ||
|
|
3d2307fced | ||
|
|
8f483ae1ed | ||
|
|
b1ad1b2b55 | ||
|
|
c533e7379a | ||
|
|
1f69ccb654 | ||
|
|
627fa36b69 | ||
|
|
82e2c2ad6d | ||
|
|
f678f65c8e | ||
|
|
aee8ba3aea | ||
|
|
2b7a457cbd | ||
|
|
f02208c7c6 | ||
|
|
482f013697 | ||
|
|
2802e169d3 | ||
|
|
1049b17d9e | ||
|
|
28f5e009a2 | ||
|
|
906de62d58 | ||
|
|
9be4b9c157 | ||
|
|
e0b963aef8 | ||
|
|
2445453de0 | ||
|
|
eaeaab7b18 | ||
|
|
5d45fc7ec2 | ||
|
|
d464d87d07 | ||
|
|
e7872bb76e | ||
|
|
e83888d548 | ||
|
|
cc3afa83bd | ||
|
|
fce556ff46 | ||
|
|
6e965ef2da | ||
|
|
afc39b5843 | ||
|
|
b430f36bb4 | ||
|
|
7d6212026b | ||
|
|
5480c20328 | ||
|
|
2e9950ab60 | ||
|
|
dcfe9510d2 | ||
|
|
9f24927367 | ||
|
|
cdb7e781bf | ||
|
|
22c26483dc | ||
|
|
2f6a6dfafc | ||
|
|
5dc3512bb8 |
@@ -1,5 +1,5 @@
|
||||
# https://clang.llvm.org/docs/ClangFormatStyleOptions.html
|
||||
# for clang-format 17.0.1
|
||||
# for clang-format 20.0.0
|
||||
Language: Cpp
|
||||
BasedOnStyle: "WebKit"
|
||||
# AccessModifierOffset: 2
|
||||
@@ -26,9 +26,9 @@ AllowShortIfStatementsOnASingleLine: Never
|
||||
AllowShortLambdasOnASingleLine: Inline
|
||||
AllowShortLoopsOnASingleLine: false
|
||||
AlwaysBreakAfterDefinitionReturnType: None
|
||||
AlwaysBreakAfterReturnType: None
|
||||
BreakAfterReturnType: Automatic
|
||||
AlwaysBreakBeforeMultilineStrings: true
|
||||
AlwaysBreakTemplateDeclarations: Yes
|
||||
BreakTemplateDeclarations: Yes
|
||||
# AttributeMacros:
|
||||
# - __pragma
|
||||
# - _Pragma
|
||||
@@ -145,7 +145,7 @@ PointerAlignment: Left
|
||||
# - constexpr
|
||||
# - type
|
||||
ReferenceAlignment: Left
|
||||
ReflowComments: true
|
||||
ReflowComments: Always
|
||||
RemoveBracesLLVM: false
|
||||
RemoveParentheses: Leave
|
||||
RemoveSemicolon: false
|
||||
@@ -188,3 +188,4 @@ TabWidth: 4
|
||||
UseTab: Never
|
||||
# VerilogBreakBetweenInstancePorts:
|
||||
# WhitespaceSensitiveMacros:
|
||||
RemoveEmptyLinesInUnwrappedLines: true
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
290cc30f153a0206bd870a0a58cb6338aa16ea34
|
||||
db9afdc77e85d5fc462d923fca5318be021656cd
|
||||
a5daac889a55baf8895918d4964f20dad1938470
|
||||
9ed30c5658c88edf1ef839771a53c7d599183b8b
|
||||
|
||||
# incorrect format of 3rdparty/resource/Arknights-Tile-Pos/levels.json
|
||||
65d654e54b9d04d1902c9ee9f9fb2679520adafd
|
||||
@@ -39,8 +40,15 @@ f0bdccdf0da7fac29f475951f0f43d3ab56a7ffe
|
||||
5f3730b76785b1168125eb3b5edbed399722f8f9
|
||||
bc3ad67a02cb3b8e154c06955cf17091c4265000
|
||||
|
||||
# oxipng template optimization
|
||||
e3d63894b28b2ef5e2405e144a32a6981de5e1b2
|
||||
|
||||
# refactor: divide tasks.json into multiple jsons
|
||||
dce6e317c8e56836662b64ac4b3d1a69b4ff4dd8
|
||||
|
||||
# usage: add "[blame ignore]" to the commit message
|
||||
# This file is managed by an automated workflow
|
||||
# Do not add, remove or modify lines below this comment
|
||||
# as they are automatically appended
|
||||
# --------------------------------------------------- #
|
||||
f7772bc814c52f9a5e65af02404cf54b70fe0a32
|
||||
|
||||
1
.github/.last-blame-ignore-commit
vendored
Normal file
@@ -0,0 +1 @@
|
||||
272d71fa2938f945832f86232532b86a9e5406b8
|
||||
20
.github/ISSUE_TEMPLATE/cn-bug-report.yaml
vendored
@@ -5,17 +5,15 @@ body:
|
||||
- type: checkboxes
|
||||
id: checks
|
||||
attributes:
|
||||
label: 在提问之前...
|
||||
description: |
|
||||
请确认自己完成了要求之后再进行勾选
|
||||
label: 请确认自己完成了下列要求之后再进行勾选,若未完成但勾选将被直接关闭 Issue
|
||||
options:
|
||||
- label: 我理解 Issue 是用于反馈和解决问题的,而非吐槽评论区,将尽可能提供更多信息帮助问题解决
|
||||
required: true
|
||||
- label: 我填写了简短且清晰明确的标题,以便开发者在翻阅 Issue 列表时能快速确定大致问题。而不是“一个建议”、“卡住了”等
|
||||
required: true
|
||||
- label: 我使用的是当前更新版本的最新版,且已查看版本发布至今和 Pull Requests 中尚未发布的更新内容,并未提及该 Bug 已被修复的情况
|
||||
- label: 我使用的是当前更新版本的最新版,且已查看版本发布至今的 [更新内容](https://github.com/MaaAssistantArknights/MaaAssistantArknights/commits/dev/) 和 [Pull Requests](https://github.com/MaaAssistantArknights/MaaAssistantArknights/pulls) 中尚未发布的更新内容,并未提及该 Bug 已被修复的情况
|
||||
required: true
|
||||
- label: 我已检查了置顶议题(Pinned Issue)(公告)、活跃议题(Open Issue)、已关闭议题(Closed Issue),确认我的问题未被提及
|
||||
- label: 我已检查了[常见问题](https://maa.plus/docs/zh-cn/manual/faq.html)、[公告](/MaaAssistantArknights/MaaAssistantArknights/issues/7732)、[活跃议题](https://github.com/MaaAssistantArknights/MaaAssistantArknights/issues)、[已关闭议题](https://github.com/MaaAssistantArknights/MaaAssistantArknights/issues?q=is%3Aissue%20state%3Aclosed),确认我的问题未被提及
|
||||
required: true
|
||||
- type: textarea
|
||||
id: describe
|
||||
@@ -28,8 +26,9 @@ body:
|
||||
id: version
|
||||
attributes:
|
||||
label: Version
|
||||
description: >-
|
||||
请提供 MAA 版本。可在 MAA -> 设置 -> 软件更新中找到(点击图标可复制)。
|
||||
description: |
|
||||
请提供 MAA 版本。可在 MAA -> 设置 -> 软件更新中找到。点击图标可复制。
|
||||
请分别点击 `资源版本` 和 `MAA 版本` 并粘贴,最终应有 5 行版本信息。
|
||||
placeholder: |
|
||||
Resource Version:
|
||||
MAA Version:
|
||||
@@ -40,12 +39,11 @@ body:
|
||||
attributes:
|
||||
label: 日志和配置文件
|
||||
description: |
|
||||
**请在关闭 MAA 后,上传以下 5 个文件:**
|
||||
1. `debug` 文件夹中的 `asst.log` `gui.log` `asst.bak.log` 和 `gui.bak.log` 日志文件,并说明问题出现的大致时间点
|
||||
2. `config` 文件夹中的 `gui.json` 配置文件
|
||||
**请在 MAA -> 设置 -> 问题反馈中找到生成日志压缩包按钮,点击并上传压缩包**
|
||||
|
||||
**请直接将完整的文件拖拽进来,而非自己裁切或复制的片段;若文件体积过大可压缩后再上传**
|
||||
|
||||
如果你在使用 MacBook,请点击屏幕左上角的“文件”,点击“打开日志文件夹”
|
||||
**请直接将完整的文件拖拽进来,而非自己裁切或复制的片段;若文件体积过大可压缩后再上传**
|
||||
placeholder: |
|
||||
请确认上传文件前已关闭 MAA
|
||||
validations:
|
||||
|
||||
@@ -11,6 +11,10 @@ body:
|
||||
required: true
|
||||
- label: 我基本确定这是一个新功能/建议,而不是遇到了 Bug(不确定的话请附上日志)
|
||||
required: true
|
||||
- label: 我使用的是当前更新版本的最新版,且已查看版本发布至今的 [更新内容](https://github.com/MaaAssistantArknights/MaaAssistantArknights/commits/dev/) 和 [Pull Requests](https://github.com/MaaAssistantArknights/MaaAssistantArknights/pulls) 中尚未发布的更新内容,确认我的建议未被提及
|
||||
required: true
|
||||
- label: 我已检查了 [公告](/MaaAssistantArknights/MaaAssistantArknights/issues/7732)、[活跃议题](https://github.com/MaaAssistantArknights/MaaAssistantArknights/issues)、[已关闭议题](https://github.com/MaaAssistantArknights/MaaAssistantArknights/issues?q=is%3Aissue%20state%3Aclosed),确认我的建议未被提及
|
||||
required: true
|
||||
- type: textarea
|
||||
id: describe
|
||||
attributes:
|
||||
|
||||
8
.github/ISSUE_TEMPLATE/cn-ld-report.yaml
vendored
@@ -11,7 +11,7 @@ body:
|
||||
required: true
|
||||
- label: 我填写了简短且清晰明确的标题,以便开发者在翻阅 Issue 列表时能快速确定大致问题。而不是“一个建议”、“卡住了”等
|
||||
required: true
|
||||
- label: 我已检查了置顶议题(Pinned Issue),确认我的问题未被提及
|
||||
- label: 我已检查了[公告](/MaaAssistantArknights/MaaAssistantArknights/issues/7732)、[活跃议题](https://github.com/MaaAssistantArknights/MaaAssistantArknights/issues)、[已关闭议题](https://github.com/MaaAssistantArknights/MaaAssistantArknights/issues?q=is%3Aissue%20state%3Aclosed),确认我的问题未被提及
|
||||
required: true
|
||||
- label: 我正在使用最新的 MAA 公测版本和最新的官版雷电 9 模拟器
|
||||
required: true
|
||||
@@ -44,10 +44,8 @@ body:
|
||||
attributes:
|
||||
label: MAA 日志和配置文件
|
||||
description: |
|
||||
**请在关闭 MAA 后,上传以下三个文件:**
|
||||
1. `debug` 文件夹中的 `asst.log` 和 `gui.log` 日志文件,并说明问题出现的大致时间点
|
||||
若 asst.log 文件小于 10 KB,则需同时上传 asst.log.bak 文件
|
||||
2. `config` 文件夹中的 `gui.json` 配置文件
|
||||
**请在 MAA -> 设置 -> 问题反馈中找到生成日志压缩包按钮,点击并上传压缩包**
|
||||
|
||||
**请直接将完整的文件拖拽进来,而非自己裁切或复制的片段;若文件体积过大可压缩后再上传**
|
||||
placeholder: |
|
||||
请确认上传文件前已关闭 MAA
|
||||
|
||||
8
.github/ISSUE_TEMPLATE/cn-mumu-report.yaml
vendored
@@ -11,7 +11,7 @@ body:
|
||||
required: true
|
||||
- label: 我填写了简短且清晰明确的标题,以便开发者在翻阅 Issue 列表时能快速确定大致问题。而不是“一个建议”、“卡住了”等
|
||||
required: true
|
||||
- label: 我已检查了置顶议题(Pinned Issue),确认我的问题未被提及
|
||||
- label: 我已检查了[公告](/MaaAssistantArknights/MaaAssistantArknights/issues/7732)、[活跃议题](https://github.com/MaaAssistantArknights/MaaAssistantArknights/issues)、[已关闭议题](https://github.com/MaaAssistantArknights/MaaAssistantArknights/issues?q=is%3Aissue%20state%3Aclosed),确认我的问题未被提及
|
||||
required: true
|
||||
- label: 我正在使用最新的 MAA 公测版本和最新的官版或方舟专版 MuMu 模拟器
|
||||
required: true
|
||||
@@ -44,10 +44,8 @@ body:
|
||||
attributes:
|
||||
label: MAA 日志和配置文件
|
||||
description: |
|
||||
**请在关闭 MAA 后,上传以下三个文件:**
|
||||
1. `debug` 文件夹中的 `asst.log` 和 `gui.log` 日志文件,并说明问题出现的大致时间点
|
||||
若 asst.log 文件小于 10 KB,则需同时上传 asst.log.bak 文件
|
||||
2. `config` 文件夹中的 `gui.json` 配置文件
|
||||
**请在 MAA -> 设置 -> 问题反馈中找到生成日志压缩包按钮,点击并上传压缩包**
|
||||
|
||||
**请直接将完整的文件拖拽进来,而非自己裁切或复制的片段;若文件体积过大可压缩后再上传**
|
||||
placeholder: |
|
||||
请确认上传文件前已关闭 MAA
|
||||
|
||||
36
.github/ISSUE_TEMPLATE/en-bug-report.yaml
vendored
@@ -9,27 +9,16 @@ body:
|
||||
attributes:
|
||||
label: Before raising the issue...
|
||||
description: |
|
||||
Please ensure that you have completed the requirements before checking the box.
|
||||
Please ensure that you have completed the requirements before checking the box.
|
||||
Issues with the checkbox checked but not completed will be directly closed.
|
||||
options:
|
||||
- label: >-
|
||||
I understand that Issues are for feedback and problem solving,
|
||||
not trolling the comments section, and will provide as
|
||||
much information as possible to help solve the problem.
|
||||
- label: I understand that Issues are for feedback and problem solving, not trolling the comments section, and will provide as much information as possible to help solve the problem.
|
||||
required: true
|
||||
- label: >-
|
||||
I filled in a short, clear title
|
||||
so that developers could quickly identify the general problem
|
||||
when going through the issue list.
|
||||
Instead of "Some suggestions", "Stuck", etc.
|
||||
- label: I filled in a short, clear title so that developers could quickly identify the general problem when going through the issue list. Instead of "Some suggestions", "Stuck", etc.
|
||||
required: true
|
||||
- label: >-
|
||||
I am using the latest version of the current update and have reviewed
|
||||
both the updates released so far and the unreleased changes in the Pull Requests,
|
||||
there is no mention of the bug being fixed.
|
||||
- label: I am using the latest version of the current update version and have reviewed both the [Unreleased changes](https://github.com/MaaAssistantArknights/MaaAssistantArknights/commits/dev/) and there is no mention of the bug being fixed.
|
||||
required: true
|
||||
- label: >-
|
||||
I have reviewed the Pinned issue (Announcements), Open issues, and Closed issues
|
||||
to ensure that my issue has not been mentioned.
|
||||
- label: I have reviewed the [FAQs](https://maa.plus/docs/en-us/manual/faq.html), [Announcement](/MaaAssistantArknights/MaaAssistantArknights/issues/7732), [Open Issue](https://github.com/MaaAssistantArknights/MaaAssistantArknights/issues), [Closed Issue](https://github.com/MaaAssistantArknights/MaaAssistantArknights/issues?q=is%3Aissue%20state%3Aclosed) to ensure that my issue/bug has not been mentioned.
|
||||
required: true
|
||||
- type: textarea
|
||||
id: describe
|
||||
@@ -42,8 +31,9 @@ body:
|
||||
id: version
|
||||
attributes:
|
||||
label: Version
|
||||
description: >-
|
||||
Please provide the MAA version. Can be found in MAA -> Settings -> Update. (Click to copy)
|
||||
description: |
|
||||
Please provide the MAA version. Can be found in MAA -> Settings -> Update. Click to copy.
|
||||
Click on `Resource Version` and `MAA Version` and paste them respectively. There should be 5 lines of version information in total.
|
||||
placeholder: |
|
||||
Resource Version:
|
||||
MAA Version:
|
||||
@@ -54,13 +44,11 @@ body:
|
||||
attributes:
|
||||
label: Log and config files
|
||||
description: >-
|
||||
**After closing MAA, upload the following 5 files:**
|
||||
1. The `asst.log` `gui.log` `asst.bak.log` and `gui.bak.log` log file in the `debug` folder, and indicate the approximate point in time when the problem occurred.
|
||||
2. The `gui.json` config file in the `config` folder
|
||||
**Please locate the Generate Support Payload button under MAA Settings -> Issue Report, click the button, and upload the generated zip file**
|
||||
|
||||
**Please drag and drop the full file in, not your own cuttings or copies; compress it before uploading if too large.**
|
||||
|
||||
If you are using MacBook, please click the "File" option in the top-left corner of the screen, then click "Open Log Folder".
|
||||
**Please drag and drop the full file in, not your own cuttings or copies;**
|
||||
**compress it before uploading if too large.**
|
||||
placeholder: |
|
||||
Please confirm that MAA is not running before uploading files.
|
||||
validations:
|
||||
|
||||
14
.github/ISSUE_TEMPLATE/en-feature-request.yaml
vendored
@@ -7,9 +7,19 @@ body:
|
||||
attributes:
|
||||
label: Before raising the issue...
|
||||
options:
|
||||
- label: I filled in a short, clear title so that developers could quickly identify the general problem when going through the issue list. Instead of "Some suggestions", "Stuck", etc.
|
||||
- label: |
|
||||
I filled in a short, clear title so that developers could quickly identify the general problem when going through the issue list.
|
||||
Instead of "Some suggestions", "Stuck", etc.
|
||||
required: true
|
||||
- label: I'm probably sure this is a new feature/suggestion and not a bug encountered (please attach logs if you're not sure)
|
||||
- label: |
|
||||
I'm probably sure this is a new feature/suggestion and not a bug encountered (please attach logs if you're not sure).
|
||||
required: true
|
||||
- label: |
|
||||
I am using the latest version of the current update version and have reviewed both the [Unreleased changes](https://github.com/MaaAssistantArknights/MaaAssistantArknights/commits/dev/) and the [Pull requests](https://github.com/MaaAssistantArknights/MaaAssistantArknights/pulls),
|
||||
but there is no mention of this feature/suggestion being added.
|
||||
required: true
|
||||
- label: |
|
||||
I have reviewed the [Announcement](/MaaAssistantArknights/MaaAssistantArknights/issues/7732), [Open Issue](https://github.com/MaaAssistantArknights/MaaAssistantArknights/issues), [Closed Issue](https://github.com/MaaAssistantArknights/MaaAssistantArknights/issues?q=is%3Aissue%20state%3Aclosed) to ensure that my feature/suggestion has not been mentioned.
|
||||
required: true
|
||||
- type: textarea
|
||||
id: describe
|
||||
|
||||
70
.github/issue-checker.yml
vendored
@@ -184,7 +184,7 @@ labels:
|
||||
# `module: roguelike`
|
||||
- name: roguelike
|
||||
content: "module: roguelike"
|
||||
regexes: "肉[鸽鴿]|集成战略|[Rr]ogue|[Ii]ntegrated [Ss]tategy|I\\.S\\.|ローグ"
|
||||
regexes: "肉[鸽鴿]|集成战略|[Rr]ogue|[Ii]ntegrated [Ss]tategy|I\\.S\\.|ローグ|IS[1-4]"
|
||||
skip-if:
|
||||
- skip all
|
||||
- skip module
|
||||
@@ -522,7 +522,7 @@ labels:
|
||||
# `incomplete`
|
||||
- name: incomplete
|
||||
content: incomplete
|
||||
regexes: '(?:\[Uploading asst(?:.bak|)(?: - 副本|)(?:.log|)(?:.zip|)…\]\(\))'
|
||||
regexes: '(?:\[Uploading asst(?:.bak|)(?: - 副本|)(?:.log|)(?:.zip|)…\]\(\))|<!-- Uploading "(log|report)[^"]*\.zip"\.\.\. -->'
|
||||
mode: add
|
||||
skip-if:
|
||||
- skip all
|
||||
@@ -532,7 +532,7 @@ labels:
|
||||
- remove incomplete
|
||||
- name: complete
|
||||
content:
|
||||
regexes: '(?:\[asst(?:.bak|)(?: - 副本|)(?:.log|)(?:.zip|)\]\([^\)]+\))'
|
||||
regexes: '(?:\[asst(?:.bak|)(?: - 副本|)(?:.log|)(?:.zip|)\]\([^\)]+\))|(log|report)[^.]*.zip'
|
||||
- name: remove incomplete
|
||||
content: incomplete
|
||||
mode: remove
|
||||
@@ -547,7 +547,7 @@ labels:
|
||||
|
||||
comments:
|
||||
- name: Log upload failed
|
||||
regexes: '\[Uploading asst(?:.bak|)(?: - 副本|)(?:.log|)(?:.zip|)…\]\(\)'
|
||||
regexes: '\[Uploading asst(?:.bak|)(?: - 副本|)(?:.log|)(?:.zip|)…\]\(\)|<!-- Uploading "log[^"]*\.zip"\.\.\. -->'
|
||||
content: "你的日志没有上传成功,请重新上传。\n\n\
|
||||
Your log did not upload successfully, please re-upload it."
|
||||
mode: add
|
||||
@@ -558,34 +558,34 @@ comments:
|
||||
mode: add
|
||||
skip-if:
|
||||
- "Log upload failed"
|
||||
- name: Check Link
|
||||
url_mode: allow_only # allow_only: 当评论出现下列列表中允许的模式以外的链接时触发规则;deny: 当评论出现下列列表中禁止的模式的链接时触发规则
|
||||
url_list: # 均解析为正则表达式,允许使用 URL 所有字符串属性,参见: https://developer.mozilla.org/zh-CN/docs/Web/API/URL#%E5%B1%9E%E6%80%A7
|
||||
# MAA 组织地址
|
||||
- hostname: ^(?:.+\.)?github\.com$
|
||||
pathname: ^/MaaAssistantArknights/
|
||||
# MAA 官网
|
||||
- hostname: ^(?:.+\.)?maa\.plus$
|
||||
# 作业站
|
||||
- hostname: ^(?:.+\.)?prts\.plus$
|
||||
# issue / pr
|
||||
- hostname: ^github\.com$
|
||||
pathname: ^/[^/]+/[^/]+/(?:issues|pull)/[1-9]\d*$
|
||||
# commit
|
||||
- hostname: ^github\.com$
|
||||
pathname: ^/[^/]+/[^/]+/commit/[\da-fA-F]{7,}$
|
||||
# @ 用户
|
||||
- hostname: ^github\.com$
|
||||
pathname: ^/[^/]+$
|
||||
# GitHub 图片地址,形如 `https://private-user-images.githubusercontent.com/55343783/364401381-34803448-400d-4c98-bd06-9ba5a259a931.png?jwt=[token]`
|
||||
- hostname: ^private-user-images\.githubusercontent\.com$
|
||||
pathname: ^/\d+/[0-9a-fA-F-]+\.([a-z\d]+)$
|
||||
search: ^\?jwt=[^&]+$
|
||||
content: "> [!warning]\n存在未确认的链接,请谨慎访问。\n\
|
||||
There are unconfirmed links, please visit with caution.\n\n${body}"
|
||||
mode: update
|
||||
- name: Hide gcc
|
||||
regexes: "(?=.*(changeme|gcc|select the desired compiler in the installer))"
|
||||
content: "> [!Caution]\n该评论中的链接文件含有病毒,请勿下载。\n\
|
||||
The file linked in this comment contain a virus. Please do not download it.\n\n${body}"
|
||||
mode: update
|
||||
# - name: Check Link
|
||||
# url_mode: allow_only # allow_only: 当评论出现下列列表中允许的模式以外的链接时触发规则;deny: 当评论出现下列列表中禁止的模式的链接时触发规则
|
||||
# url_list: # 均解析为正则表达式,允许使用 URL 所有字符串属性,参见: https://developer.mozilla.org/zh-CN/docs/Web/API/URL#%E5%B1%9E%E6%80%A7
|
||||
# # MAA 组织地址
|
||||
# - hostname: ^(?:.+\.)?github\.com$
|
||||
# pathname: ^/MaaAssistantArknights/
|
||||
# # MAA 官网
|
||||
# - hostname: ^(?:.+\.)?maa\.plus$
|
||||
# # 作业站
|
||||
# - hostname: ^(?:.+\.)?prts\.plus$
|
||||
# # issue / pr
|
||||
# - hostname: ^github\.com$
|
||||
# pathname: ^/[^/]+/[^/]+/(?:issues|pull)/[1-9]\d*$
|
||||
# # commit
|
||||
# - hostname: ^github\.com$
|
||||
# pathname: ^/[^/]+/[^/]+/commit/[\da-fA-F]{7,}$
|
||||
# # @ 用户
|
||||
# - hostname: ^github\.com$
|
||||
# pathname: ^/[^/]+$
|
||||
# # GitHub 图片地址,形如 `https://private-user-images.githubusercontent.com/55343783/364401381-34803448-400d-4c98-bd06-9ba5a259a931.png?jwt=[token]`
|
||||
# - hostname: ^private-user-images\.githubusercontent\.com$
|
||||
# pathname: ^/\d+/[0-9a-fA-F-]+\.([a-z\d]+)$
|
||||
# search: ^\?jwt=[^&]+$
|
||||
# content: "> [!warning]\n存在未确认的链接,请谨慎访问。\n\
|
||||
# There are unconfirmed links, please visit with caution.\n\n${body}"
|
||||
# mode: update
|
||||
# - name: Hide gcc
|
||||
# regexes: "(?=.*(changeme|gcc|select the desired compiler in the installer))"
|
||||
# content: "> [!Caution]\n该评论中的链接文件含有病毒,请勿下载。\n\
|
||||
# The file linked in this comment contain a virus. Please do not download it.\n\n${body}"
|
||||
# mode: update
|
||||
|
||||
38
.github/stale_cache_remover.ps1
vendored
Normal file
@@ -0,0 +1,38 @@
|
||||
$totalClearedSize = 0
|
||||
$cacheList = gh cache list --json id,ref,sizeInBytes | ConvertFrom-Json
|
||||
$prCaches = $cacheList | Where-Object { $_.ref -like "*merge*" }
|
||||
|
||||
if (-not $prCaches) {
|
||||
Write-Output "No PR caches found."
|
||||
exit
|
||||
}
|
||||
|
||||
foreach ($cache in $prCaches) {
|
||||
$cacheId = $cache.id
|
||||
$cacheRef = $cache.ref
|
||||
$cacheSizeInBytes = $cache.sizeInBytes
|
||||
|
||||
if ($cacheRef -match "refs/pull/(\d+)/merge") {
|
||||
$prNumber = $matches[1]
|
||||
|
||||
Write-Host "PR #${prNumber}: " -NoNewline
|
||||
|
||||
$prStatus = gh pr view $prNumber --json state | ConvertFrom-Json
|
||||
|
||||
Write-Host $prStatus.state -NoNewline
|
||||
|
||||
if ($prStatus.state -eq "MERGED" -or $prStatus.state -eq "CLOSED") {
|
||||
Write-Host " -> DELETING"
|
||||
|
||||
gh cache delete $cacheId
|
||||
|
||||
$totalClearedSize += $cacheSizeInBytes
|
||||
}
|
||||
else {
|
||||
Write-Host ""
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$formattedSize = "{0:N2}" -f ($totalClearedSize / 1MB)
|
||||
Write-Output "Cleared size: $formattedSize MB"
|
||||
29
.github/workflows/blame-ignore.yml
vendored
@@ -1,10 +1,13 @@
|
||||
name: Blame Ignore Commit
|
||||
name: Git Blame Ignore
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: "45 21 * * *" # Runs daily at 22:00 UTC
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
blame-ignore:
|
||||
if: github.repository_owner == 'MaaAssistantArknights'
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
@@ -14,25 +17,33 @@ jobs:
|
||||
fetch-depth: 0
|
||||
persist-credentials: false # Needed to bypass protection rules in Push changes
|
||||
|
||||
- name: Get last checked commit
|
||||
- name: Check blame
|
||||
id: check_changes
|
||||
run: |
|
||||
LAST_CHECKED_COMMIT=$(cat .last-checked-commit 2>/dev/null || git rev-list --max-parents=0 HEAD)
|
||||
echo "LAST_CHECKED_COMMIT=$LAST_CHECKED_COMMIT" >> $GITHUB_ENV
|
||||
LAST_CHECKED_COMMIT=$(cat .github/.last-blame-ignore-commit 2>/dev/null || git rev-list --max-parents=0 HEAD)
|
||||
|
||||
- name: Process commits and update blame ignore list
|
||||
git log $LAST_CHECKED_COMMIT..HEAD --pretty=format:"%H %s" --grep="\[blame ignore\]" | awk '{print $1}' >> .git-blame-ignore-revs
|
||||
|
||||
git diff --quiet .git-blame-ignore-revs
|
||||
|
||||
- name: Commit and Push changes
|
||||
if: ${{ steps.check_changes.outcome == 'failure' }}
|
||||
run: |
|
||||
git log ${{ env.LAST_CHECKED_COMMIT }}..HEAD --pretty=format:"%H %s" --grep="\[blame ignore\]" | awk '{print $1}' >> .git-blame-ignore-revs
|
||||
|
||||
git config user.name "github-actions[bot]"
|
||||
git config user.email "github-actions[bot]@users.noreply.github.com"
|
||||
|
||||
git rev-parse HEAD > .last-checked-commit
|
||||
git rev-parse HEAD > .github/.last-blame-ignore-commit
|
||||
|
||||
git add .last-checked-commit .git-blame-ignore-revs
|
||||
git add .github/.last-blame-ignore-commit .git-blame-ignore-revs
|
||||
git commit -m "chore: auto blame ignore" -m "[skip changelog]"
|
||||
|
||||
- name: Push changes
|
||||
if: ${{ steps.check_changes.outcome == 'failure' }}
|
||||
uses: ad-m/github-push-action@master
|
||||
with:
|
||||
branch: ${{ github.ref }}
|
||||
github_token: ${{ secrets.MAA_RESOURCE_SYNC }}
|
||||
|
||||
- name: Stop if no changes
|
||||
if: ${{ steps.check_changes.outcome == 'success' }}
|
||||
uses: andymckay/cancel-action@0.5
|
||||
|
||||
39
.github/workflows/cache-delete.yml
vendored
Normal file
@@ -0,0 +1,39 @@
|
||||
name: Delete Cache
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
types: [closed]
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
pr_number:
|
||||
description: "PR Number"
|
||||
required: true
|
||||
|
||||
jobs:
|
||||
cache-delete:
|
||||
# Run only on organization branches with PRs
|
||||
if: github.event_name == 'workflow_dispatch' ||
|
||||
github.event.pull_request.head.repo.full_name ==
|
||||
github.event.pull_request.base.repo.full_name
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Delete cache on PR merged
|
||||
run: |
|
||||
if [ "${{ github.event_name }}" == "workflow_dispatch" ]; then
|
||||
PR_NUMBER=${{ github.event.inputs.pr_number }}
|
||||
else
|
||||
PR_NUMBER=${{ github.event.pull_request.number }}
|
||||
fi
|
||||
echo "PR Number: $PR_NUMBER"
|
||||
|
||||
curl -s -L https://api.github.com/repos/Maaassistantarknights/Maaassistantarknights/actions/caches |
|
||||
jq -r --arg PR_NUMBER "refs/pull/$PR_NUMBER/merge" '.actions_caches[] | select(.ref == $PR_NUMBER) | .id' |
|
||||
while read -r id; do
|
||||
echo "Deleting cache with ID: $id"
|
||||
|
||||
curl -L -X DELETE \
|
||||
-H "Accept: application/vnd.github+json" \
|
||||
-H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \
|
||||
-H "X-GitHub-Api-Version: 2022-11-28" \
|
||||
"https://api.github.com/repos/MaaAssistantArknights/MaaAssistantArknights/actions/caches/$id"
|
||||
done
|
||||
140
.github/workflows/ci.yml
vendored
@@ -34,6 +34,11 @@ concurrency:
|
||||
|
||||
jobs:
|
||||
meta:
|
||||
# Prevent duplicate runs on organization branches with PRs
|
||||
if: github.event_name != 'pull_request' ||
|
||||
github.event.pull_request.head.repo.full_name !=
|
||||
github.event.pull_request.base.repo.full_name
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
tag: ${{ steps.set_tag.outputs.tag }}
|
||||
@@ -84,6 +89,8 @@ jobs:
|
||||
fi
|
||||
echo >> CHANGELOG.md
|
||||
echo "**Full Changelog**: [$last_tag -> $this_tag](https://github.com/MaaAssistantArknights/MaaAssistantArknights/compare/${last_tag}...${this_tag})" >> CHANGELOG.md
|
||||
echo >> CHANGELOG.md
|
||||
echo "[已有 Mirror酱 CDK?前往 Mirror酱 高速下载](https://mirrorchyan.com/zh/projects?rid=MAA)" >> CHANGELOG.md
|
||||
|
||||
- name: Upload changelog to Github
|
||||
uses: actions/upload-artifact@v4
|
||||
@@ -93,6 +100,11 @@ jobs:
|
||||
path: CHANGELOG.md
|
||||
|
||||
windows:
|
||||
# Prevent duplicate runs on organization branches with PRs
|
||||
if: github.event_name != 'pull_request' ||
|
||||
github.event.pull_request.head.repo.full_name !=
|
||||
github.event.pull_request.base.repo.full_name
|
||||
|
||||
needs: meta
|
||||
strategy:
|
||||
matrix:
|
||||
@@ -110,7 +122,10 @@ jobs:
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
show-progress: false
|
||||
submodules: recursive
|
||||
|
||||
- name: Fetch submodules
|
||||
run: |
|
||||
git submodule update --init --depth 1 3rdparty/EmulatorExtras
|
||||
|
||||
- name: Cache .nuke/temp, ~/.nuget/packages
|
||||
id: cache-nuget
|
||||
@@ -125,7 +140,16 @@ jobs:
|
||||
if: steps.cache-nuget.outputs.cache-hit != 'true'
|
||||
run: dotnet restore
|
||||
|
||||
- name: Cache MaaDeps
|
||||
id: cache-maadeps
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: |
|
||||
./MaaDeps
|
||||
key: ${{ runner.os }}-${{ matrix.lowercase_target }}-maadeps-${{ hashFiles('./maadeps-download.py') }}
|
||||
|
||||
- name: Bootstrap MaaDeps
|
||||
if: steps.cache-maadeps.outputs.cache-hit != 'true'
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: |
|
||||
@@ -183,8 +207,13 @@ jobs:
|
||||
path: artifacts
|
||||
|
||||
ubuntu:
|
||||
# Prevent duplicate runs on organization branches with PRs
|
||||
if: github.event_name != 'pull_request' ||
|
||||
github.event.pull_request.head.repo.full_name !=
|
||||
github.event.pull_request.base.repo.full_name
|
||||
|
||||
needs: meta
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: ubuntu-22.04
|
||||
strategy:
|
||||
matrix:
|
||||
arch: [aarch64, x86_64]
|
||||
@@ -195,7 +224,11 @@ jobs:
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
show-progress: false
|
||||
submodules: recursive
|
||||
|
||||
- name: Fetch submodules
|
||||
run: |
|
||||
git submodule update --init --depth 1 3rdparty/EmulatorExtras
|
||||
git submodule update --init --depth 1 src/maa-cli
|
||||
|
||||
- name: Install cross compile toolchains
|
||||
if: ${{ matrix.arch != 'x86_64' }}
|
||||
@@ -203,9 +236,7 @@ jobs:
|
||||
sudo apt-get update
|
||||
sudo apt-get install g++-12-aarch64-linux-gnu g++-12-aarch64-linux-gnu
|
||||
|
||||
- name: Setup ccache
|
||||
uses: Chocobo1/setup-ccache-action@v1
|
||||
|
||||
# Caching not necessary on ubuntu runner
|
||||
- name: Bootstrap MaaDeps
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
@@ -216,6 +247,7 @@ jobs:
|
||||
run: |
|
||||
mkdir -p build
|
||||
cmake -B build \
|
||||
-DCMAKE_COMPILE_WARNING_AS_ERROR=ON \
|
||||
-DMAADEPS_TRIPLET='maa-${{ matrix.arch == 'x86_64' && 'x64' || 'arm64' }}-linux' \
|
||||
-DINSTALL_THIRD_LIBS=ON \
|
||||
-DINSTALL_RESOURCE=ON \
|
||||
@@ -226,8 +258,12 @@ jobs:
|
||||
mkdir -p install
|
||||
cmake --install build --prefix install
|
||||
env:
|
||||
CC: ${{ matrix.arch == 'x86_64' && 'ccache gcc-12' || 'ccache aarch64-linux-gnu-gcc-12' }}
|
||||
CXX: ${{ matrix.arch == 'x86_64' && 'ccache g++-12' || 'ccache aarch64-linux-gnu-g++-12' }}
|
||||
CC: ${{ matrix.arch == 'x86_64' && 'gcc-12' || 'aarch64-linux-gnu-gcc-12' }}
|
||||
CXX: ${{ matrix.arch == 'x86_64' && 'g++-12' || 'aarch64-linux-gnu-g++-12' }}
|
||||
CMAKE_COLOR_DIAGNOSTICS: ON
|
||||
CLICOLOR_FORCE: 1
|
||||
CXXFLAGS: | # workaround for gcc bugs
|
||||
-Wno-error=restrict -Wno-error=array-bounds -Wno-error=stringop-overread -Wno-error=missing-field-initializers
|
||||
|
||||
- name: Setup Cross Compile Toolchains for CLI
|
||||
uses: ./src/maa-cli/.github/actions/setup
|
||||
@@ -295,6 +331,11 @@ jobs:
|
||||
release/*.tar.gz
|
||||
|
||||
macOS-Core:
|
||||
# Prevent duplicate runs on organization branches with PRs
|
||||
if: github.event_name != 'pull_request' ||
|
||||
github.event.pull_request.head.repo.full_name !=
|
||||
github.event.pull_request.base.repo.full_name
|
||||
|
||||
needs: meta
|
||||
runs-on: macos-14
|
||||
strategy:
|
||||
@@ -310,6 +351,7 @@ jobs:
|
||||
run: |
|
||||
brew install ninja
|
||||
|
||||
# Caching not necessary on macOS runner
|
||||
- name: Bootstrap MaaDeps
|
||||
run: |
|
||||
[[ ${{ matrix.arch }} = "arm64" ]] && triplet="arm64-osx" || triplet="x64-osx"
|
||||
@@ -333,6 +375,11 @@ jobs:
|
||||
path: "install/*.dylib"
|
||||
|
||||
macOS-GUI:
|
||||
# Prevent duplicate runs on organization branches with PRs
|
||||
if: github.event_name != 'pull_request' ||
|
||||
github.event.pull_request.head.repo.full_name !=
|
||||
github.event.pull_request.base.repo.full_name
|
||||
|
||||
needs: [meta, macOS-Core]
|
||||
runs-on: macos-14
|
||||
steps:
|
||||
@@ -340,7 +387,16 @@ jobs:
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
show-progress: false
|
||||
submodules: recursive
|
||||
|
||||
- name: Install Dependencies
|
||||
if: startsWith(github.ref, 'refs/tags/v')
|
||||
run: |
|
||||
brew install graphicsmagick imagemagick
|
||||
npm install -g create-dmg
|
||||
|
||||
- name: Fetch submodules
|
||||
run: |
|
||||
git submodule update --init --depth 1 src/MaaMacGui
|
||||
|
||||
- name: Download Arm64 MAA from Github
|
||||
uses: actions/download-artifact@v4
|
||||
@@ -356,14 +412,24 @@ jobs:
|
||||
|
||||
- name: Install Developer ID Certificate
|
||||
if: startsWith(github.ref, 'refs/tags/v')
|
||||
uses: ssrobins/import-codesign-certs@v2
|
||||
uses: apple-actions/import-codesign-certs@v5
|
||||
with:
|
||||
p12-file-base64: ${{ secrets.HGUANDL_SIGN_CERT_P12 }}
|
||||
p12-password: ${{ secrets.HGUANDL_SIGN_CERT_PASSWD }}
|
||||
|
||||
- name: Download Provisioning Profiles
|
||||
if: startsWith(github.ref, 'refs/tags/v')
|
||||
uses: apple-actions/download-provisioning-profiles@v4
|
||||
with:
|
||||
bundle-id: "com.hguandl.MeoAsstMac"
|
||||
issuer-id: ${{ secrets.HGUANDL_APPSTORE_ISSUER }}
|
||||
api-key-id: ${{ secrets.HGUANDL_APPSTORE_KEYID }}
|
||||
api-private-key: ${{ secrets.HGUANDL_APPSTORE_KEY }}
|
||||
|
||||
- name: Setup Xcode Toolchain
|
||||
if: true
|
||||
run: |
|
||||
sudo xcode-select -s /Applications/Xcode_15.0.1.app/Contents/Developer
|
||||
sudo xcode-select -s /Applications/Xcode_16.1.app/Contents/Developer
|
||||
|
||||
- name: Build Universal Binaries
|
||||
run: |
|
||||
@@ -407,9 +473,9 @@ jobs:
|
||||
- name: Build MAA
|
||||
run: |
|
||||
if ${{ startsWith(github.ref, 'refs/tags/v') }}; then
|
||||
xcodebuild -project MeoAsstMac.xcodeproj -scheme MAA archive -archivePath MAA.xcarchive -configuration Release
|
||||
xcodebuild -scheme MAA archive -archivePath MAA.xcarchive
|
||||
else
|
||||
xcodebuild CODE_SIGN_IDENTITY="-" DEVELOPMENT_TEAM="-" ONLY_ACTIVE_ARCH=NO -project MeoAsstMac.xcodeproj -scheme MAA archive -archivePath MAA.xcarchive -configuration Debug
|
||||
xcodebuild CODE_SIGNING_ALLOWED=NO -scheme MAA archive -archivePath MAA.xcarchive
|
||||
fi
|
||||
working-directory: src/MaaMacGui
|
||||
|
||||
@@ -422,10 +488,8 @@ jobs:
|
||||
- name: Create Disk Image
|
||||
if: startsWith(github.ref, 'refs/tags/v')
|
||||
run: |
|
||||
mkdir Image
|
||||
mv Export/MAA.app Image/
|
||||
ln -s /Applications Image/
|
||||
hdiutil create -volname MAA -srcfolder Image -ov -fs APFS -format ULMO MAA.dmg
|
||||
create-dmg Export/MAA.app
|
||||
mv MAA*.dmg MAA.dmg
|
||||
working-directory: src/MaaMacGui
|
||||
|
||||
- name: Archive Debug Symbols
|
||||
@@ -446,16 +510,25 @@ jobs:
|
||||
|
||||
- name: Notarize Image
|
||||
if: startsWith(github.ref, 'refs/tags/v')
|
||||
run: |
|
||||
find . -name "*.dmg" | while read dmg; do
|
||||
codesign -s "$NOTARY_TEAM" --timestamp ${dmg}
|
||||
xcrun notarytool submit --apple-id "$NOTARY_USER" --password "$NOTARY_PASSWD" --team-id "$NOTARY_TEAM" --wait ${dmg}
|
||||
xcrun stapler staple ${dmg}
|
||||
done
|
||||
uses: nick-fields/retry@v3
|
||||
with:
|
||||
max_attempts: 3
|
||||
timeout_minutes: 15
|
||||
command: |
|
||||
cd release
|
||||
echo "$APPSTORE_KEY" > "AuthKey_${APPSTORE_KEYID}.p8"
|
||||
dmg="MAA-${{ needs.meta.outputs.tag }}-macos-universal.dmg"
|
||||
xcrun notarytool submit -k "AuthKey_${APPSTORE_KEYID}.p8" -d "$APPSTORE_KEYID" -i "$ISSUER_ID" --wait ${dmg}
|
||||
env:
|
||||
NOTARY_USER: ${{ secrets.HGUANDL_NOTARY_AAPL_ID }}
|
||||
NOTARY_PASSWD: ${{ secrets.HGUANDL_NOTARY_PASSWD }}
|
||||
NOTARY_TEAM: ${{ secrets.HGUANDL_SIGN_IDENTITY }}
|
||||
APPSTORE_KEYID: ${{ secrets.HGUANDL_APPSTORE_KEYID }}
|
||||
APPSTORE_KEY: ${{ secrets.HGUANDL_APPSTORE_KEY }}
|
||||
ISSUER_ID: ${{ secrets.HGUANDL_APPSTORE_ISSUER }}
|
||||
|
||||
- name: Attach Notarization Tickets
|
||||
if: startsWith(github.ref, 'refs/tags/v')
|
||||
run: |
|
||||
dmg="MAA-${{ needs.meta.outputs.tag }}-macos-universal.dmg"
|
||||
xcrun stapler staple ${dmg}
|
||||
working-directory: release
|
||||
|
||||
- name: Upload MAA to Github
|
||||
@@ -465,8 +538,12 @@ jobs:
|
||||
path: ${{ startsWith(github.ref, 'refs/tags/v') && 'release/MAA*' || 'src/MaaMacGui/MAA.xcarchive/**' }}
|
||||
|
||||
release:
|
||||
if: startsWith(github.ref, 'refs/tags/v')
|
||||
needs: [meta, windows, ubuntu, macOS-GUI]
|
||||
# Prevent duplicate runs on organization branches with PRs
|
||||
if: (github.event_name != 'pull_request' ||
|
||||
github.event.pull_request.head.repo.full_name !=
|
||||
github.event.pull_request.base.repo.full_name) && startsWith(github.ref, 'refs/tags/v')
|
||||
|
||||
needs: [meta, windows, ubuntu, macOS-Core, macOS-GUI]
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Download MAA from Github
|
||||
@@ -490,6 +567,13 @@ jobs:
|
||||
assets/*
|
||||
prerelease: ${{ needs.meta.outputs.prerelease != 'false' }}
|
||||
|
||||
- name: Trigger MirrorChyan
|
||||
run: |
|
||||
gh workflow run --repo $GITHUB_REPOSITORY mirrorchyan
|
||||
gh workflow run --repo $GITHUB_REPOSITORY mirrorchyan_release_note
|
||||
env:
|
||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Trigger secondary workflows # ref: https://docs.github.com/en/actions/using-workflows/triggering-a-workflow#triggering-a-workflow-from-a-workflow
|
||||
run: |
|
||||
gh workflow run --repo $GITHUB_REPOSITORY release-ota
|
||||
|
||||
1
.github/workflows/issue-checker.yml
vendored
@@ -1,4 +1,5 @@
|
||||
name: "Issue Checker"
|
||||
|
||||
on:
|
||||
issues:
|
||||
types: [opened, edited]
|
||||
|
||||
28
.github/workflows/markdown-checker.yml
vendored
@@ -1,6 +1,8 @@
|
||||
name: Check Dead Links
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: "0 0 * * 2" # Every Tuesday at 00:00 UTC
|
||||
push:
|
||||
branches:
|
||||
- dev
|
||||
@@ -15,42 +17,42 @@ on:
|
||||
- "**/*.md"
|
||||
- "docs/**"
|
||||
- ".github/workflows/markdown-checker.yml"
|
||||
schedule:
|
||||
- cron: "44 7 * * 2" # Every Tuesday at 7:44 AM UTC
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
check-links:
|
||||
if: ${{ github.event.head_commit.author.email != '41898282+github-actions[bot]@users.noreply.github.com' }}
|
||||
if: github.repository_owner == 'MaaAssistantArknights' && github.event.head_commit.author.email != '41898282+github-actions[bot]@users.noreply.github.com'
|
||||
name: Check Dead Links
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
pull-requests: write
|
||||
env:
|
||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
steps:
|
||||
- name: Check out code
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
show-progress: false
|
||||
|
||||
- name: Cache lychee
|
||||
- name: Cache Primes
|
||||
id: cache-primes
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: .lycheecache
|
||||
key: cache-lychee-${{ github.sha }}
|
||||
restore-keys: cache-lychee-
|
||||
key: lychee-cache
|
||||
|
||||
- name: Check dead links
|
||||
uses: lycheeverse/lychee-action@v2
|
||||
with:
|
||||
# 仅检查内部链接和 Github 相关链接
|
||||
# 仅检查内部链接,排除所有外部链接
|
||||
args: >
|
||||
--verbose --no-progress --cache --max-cache-age 1d
|
||||
--verbose --no-progress
|
||||
--cache --max-cache-age 1d --cache-exclude-status '429, 500..599'
|
||||
--exclude 'https?://.*'
|
||||
--include 'https?://github\.com/.*'
|
||||
--include 'https?://raw\.githubusercontent\.com/.*'
|
||||
--include 'https?://user-images\.githubusercontent\.com/.*'
|
||||
--exclude-path 'docs/zh-tw/manual/introduction/introduction_old.md'
|
||||
--exclude-path 'docs/ja-jp/manual/introduction/introduction_old.md'
|
||||
--exclude-path 'docs/zh-tw/manual/introduction/introduction_old.md'
|
||||
--exclude-path 'docs/ja-jp/manual/introduction/introduction_old.md'
|
||||
--exclude 'files/MAA_Runtime_Fix_Pwsh.ps1$'
|
||||
-- './docs/**/*.md' './README.md'
|
||||
|
||||
- name: Comment (only for PR)
|
||||
|
||||
71
.github/workflows/mirrorchyan.yml
vendored
Normal file
@@ -0,0 +1,71 @@
|
||||
name: mirrorchyan
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
mirrorchyan:
|
||||
runs-on: macos-latest
|
||||
|
||||
steps:
|
||||
- name: Upload MAA win x64
|
||||
uses: MirrorChyan/uploading-action@v1
|
||||
if: always()
|
||||
with:
|
||||
filetype: latest-release
|
||||
filename: "*MAA-*-win-x64.zip"
|
||||
mirrorchyan_rid: MAA
|
||||
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
owner: ${{ github.repository_owner }}
|
||||
repo: ${{ github.event.repository.name }}
|
||||
upload_token: ${{ secrets.MirrorChyanUploadToken }}
|
||||
os: win
|
||||
arch: x64
|
||||
|
||||
- name: Upload MAA win arm64
|
||||
uses: MirrorChyan/uploading-action@v1
|
||||
if: always()
|
||||
with:
|
||||
filetype: latest-release
|
||||
filename: "*MAA-*-win-arm64.zip"
|
||||
mirrorchyan_rid: MAA
|
||||
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
owner: ${{ github.repository_owner }}
|
||||
repo: ${{ github.event.repository.name }}
|
||||
upload_token: ${{ secrets.MirrorChyanUploadToken }}
|
||||
os: win
|
||||
arch: arm64
|
||||
|
||||
- name: Upload MAA macos arm64
|
||||
uses: MirrorChyan/uploading-action@v1
|
||||
if: always()
|
||||
with:
|
||||
filetype: latest-release
|
||||
filename: "MAA-*-macos-universal.dmg"
|
||||
extra_zip: true
|
||||
mirrorchyan_rid: MAA
|
||||
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
owner: ${{ github.repository_owner }}
|
||||
repo: ${{ github.event.repository.name }}
|
||||
upload_token: ${{ secrets.MirrorChyanUploadToken }}
|
||||
os: macos
|
||||
arch: arm64
|
||||
|
||||
- name: Upload MAA macos x64
|
||||
uses: MirrorChyan/uploading-action@v1
|
||||
if: always()
|
||||
with:
|
||||
filetype: latest-release
|
||||
filename: "MAA-*-macos-universal.dmg"
|
||||
extra_zip: true
|
||||
mirrorchyan_rid: MAA
|
||||
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
owner: ${{ github.repository_owner }}
|
||||
repo: ${{ github.event.repository.name }}
|
||||
upload_token: ${{ secrets.MirrorChyanUploadToken }}
|
||||
os: macos
|
||||
arch: x64
|
||||
19
.github/workflows/mirrorchyan_release_note.yml
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
name: mirrorchyan_release_note
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
release:
|
||||
types: [edited]
|
||||
|
||||
jobs:
|
||||
mirrorchyan:
|
||||
runs-on: macos-latest
|
||||
|
||||
steps:
|
||||
- name: Release Note for MAA
|
||||
uses: MirrorChyan/release-note-action@v1
|
||||
with:
|
||||
mirrorchyan_rid: MAA
|
||||
|
||||
upload_token: ${{ secrets.MirrorChyanUploadToken }}
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
50
.github/workflows/optimize-templates.yml
vendored
@@ -1,4 +1,4 @@
|
||||
name: Auto Optimize PNG Templates
|
||||
name: Optimize PNG Templates
|
||||
|
||||
on:
|
||||
push:
|
||||
@@ -6,7 +6,7 @@ on:
|
||||
- "dev"
|
||||
paths:
|
||||
- "resource/**/*.png"
|
||||
- "docs/.vuepress/public/image/**"
|
||||
- "docs/.vuepress/public/images/**"
|
||||
- "website/apps/web/public/**"
|
||||
- "website/apps/web/src/assets/links/**"
|
||||
workflow_dispatch:
|
||||
@@ -19,44 +19,70 @@ on:
|
||||
jobs:
|
||||
optimize-png:
|
||||
# Skip workflow to prevent double consecutive runs
|
||||
if: ${{ github.event.head_commit.author.email != '41898282+github-actions[bot]@users.noreply.github.com' }}
|
||||
# Skip workflow on PR merges
|
||||
if: github.repository_owner == 'MaaAssistantArknights' && ${{ github.event.head_commit.author.email != '41898282+github-actions[bot]@users.noreply.github.com' }}
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Check for direct push
|
||||
id: check_push
|
||||
run: |
|
||||
if [[ "${{ github.event_name }}" != "workflow_dispatch" ]]; then
|
||||
pr_merge_status=$(curl -s -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
|
||||
"https://api.github.com/repos/${{ github.repository }}/commits/${{ github.event.after }}/pulls" | xargs)
|
||||
|
||||
if [[ "$pr_merge_status" == "[ ]" ]]; then
|
||||
echo "Direct push detected. Proceeding..."
|
||||
echo "is_pr=False" >> $GITHUB_OUTPUT
|
||||
else
|
||||
echo "PR merge detected. Exiting."
|
||||
echo "is_pr=True" >> $GITHUB_OUTPUT
|
||||
fi
|
||||
else
|
||||
echo "Manual trigger detected. Proceeding..."
|
||||
echo "is_pr=False" >> $GITHUB_OUTPUT
|
||||
fi
|
||||
|
||||
- name: Checkout repository
|
||||
if: steps.check_push.outputs.is_pr != 'True'
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
show-progress: false
|
||||
persist-credentials: false
|
||||
|
||||
- name: Setup python
|
||||
if: steps.check_push.outputs.is_pr != 'True'
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: "3.11"
|
||||
|
||||
- name: Cache Python packages
|
||||
id: cache_python
|
||||
if: always()
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: ${{ env.pythonLocation }}/lib/python3.11/site-packages
|
||||
key: ${{ runner.os }}-pip-optimize-templates-${{ hashFiles('./tools/OptimizeTemplates/requirements.txt') }}
|
||||
# - name: Cache Python packages
|
||||
# id: cache_python
|
||||
# if: steps.check_push.outputs.is_pr != 'True' && always()
|
||||
# uses: actions/cache@v4
|
||||
# with:
|
||||
# path: ${{ env.pythonLocation }}/lib/python3.11/site-packages
|
||||
# key: ${{ runner.os }}-pip-optimize-templates-${{ hashFiles('./tools/OptimizeTemplates/requirements.txt') }}
|
||||
|
||||
- name: Install dependencies
|
||||
if: steps.cache_python.outputs.cache-hit != 'true'
|
||||
# if: steps.check_push.outputs.is_pr != 'True' && steps.cache_python.outputs.cache-hit != 'true'
|
||||
if: steps.check_push.outputs.is_pr != 'True'
|
||||
run: |
|
||||
pip install -r tools/OptimizeTemplates/requirements.txt
|
||||
|
||||
- name: Setup oxipng
|
||||
if: steps.check_push.outputs.is_pr != 'True'
|
||||
uses: baptiste0928/cargo-install@v3
|
||||
with:
|
||||
crate: oxipng
|
||||
|
||||
- name: Run optimize_templates
|
||||
if: steps.check_push.outputs.is_pr != 'True'
|
||||
run: |
|
||||
python3 tools/OptimizeTemplates/optimize_templates.py
|
||||
|
||||
- name: Commit changes
|
||||
id: commit_changes
|
||||
if: steps.check_push.outputs.is_pr != 'True'
|
||||
run: |
|
||||
git config user.name "github-actions[bot]"
|
||||
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
|
||||
@@ -76,7 +102,7 @@ jobs:
|
||||
fi
|
||||
|
||||
- name: Push changes
|
||||
if: steps.commit_changes.outputs.have_commits == 'True'
|
||||
if: steps.check_push.outputs.is_pr != 'True' && steps.commit_changes.outputs.have_commits == 'True'
|
||||
uses: ad-m/github-push-action@master
|
||||
with:
|
||||
github_token: ${{ secrets.MAA_RESOURCE_SYNC }}
|
||||
|
||||
4
.github/workflows/pr-checker.yml
vendored
@@ -38,7 +38,7 @@ jobs:
|
||||
per_page: 100
|
||||
});
|
||||
|
||||
const regex = /^((build|chore|ci|docs?|feat!?|fix|perf|refactor|rft|style|test|i18n|typo|debug)[\:\.\(\,]|[Rr]evert|[Rr]elease)/;
|
||||
const regex = /^((build|chore|ci|docs?|feat!?|fix|perf|refactor|rft|style|test|i18n|typo|debug)[\:\.\(\,]|[Rr]evert|[Rr]elease|[Rr]eapply)/;
|
||||
const invalidCommits = commits.filter(commit => !regex.test(commit.commit.message) || commit.parents.length > 1);
|
||||
|
||||
console.log(`Checked ${commits.length} commit(s)`);
|
||||
@@ -51,7 +51,7 @@ jobs:
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
issue_number: context.payload.pull_request.number,
|
||||
body: `## ⚠️ Found ${invalidCommits.length} invalid commit(s):\n\n${invalidCommitInfoList}\n\n---\nPlease follow the [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) format, and do not use merge commits.`
|
||||
body: `## ⚠️ Found ${invalidCommits.length} invalid commit(s):\n\n${invalidCommitInfoList}\n\n---\nPlease follow the [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) format, and **DO NOT** use merge commits.\n请遵循 [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) 格式,以及**不要**使用Merge Commit(修改 Commit Message 无法绕过检测)。`
|
||||
});
|
||||
|
||||
core.setFailed(`Found ${invalidCommits.length} invalid commit(s):\n${invalidCommitNames.join("\n-------------------\n")}`);
|
||||
|
||||
186
.github/workflows/release-nightly-ota.yml
vendored
@@ -1,6 +1,8 @@
|
||||
name: release-nightly-ota
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: "0 22 * * *" # Runs daily at 22:00 UTC
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
release_body:
|
||||
@@ -11,25 +13,24 @@ on:
|
||||
description: "Commit to build (git checkout)"
|
||||
type: string
|
||||
required: false
|
||||
limit:
|
||||
limit_maa:
|
||||
description: "Number of releases to fetch from MaaAssistantArknights"
|
||||
required: true
|
||||
default: "30"
|
||||
default: "10"
|
||||
type: number
|
||||
limit_2:
|
||||
limit_mr:
|
||||
description: "Number of releases to fetch from MaaRelease"
|
||||
required: true
|
||||
default: "30"
|
||||
default: "10"
|
||||
type: number
|
||||
|
||||
jobs:
|
||||
build-win-nightly:
|
||||
if: github.repository_owner == 'MaaAssistantArknights'
|
||||
runs-on: windows-latest
|
||||
strategy:
|
||||
matrix:
|
||||
include:
|
||||
- msbuild_target: x64
|
||||
lowercase_target: x64
|
||||
msbuild_target: [x64]
|
||||
fail-fast: false
|
||||
env:
|
||||
MAABUILDER_TARGET_PLATFORM: ${{ matrix.msbuild_target }}
|
||||
@@ -42,56 +43,102 @@ jobs:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
# repository: 'MaaAssistantArknights/MaaAssistantArknights'
|
||||
submodules: recursive
|
||||
#ref: ${{ inputs.ref }}
|
||||
fetch-depth: 0
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
fetch-depth: 250
|
||||
|
||||
- name: Checkout ref
|
||||
- name: Fetch tags
|
||||
run: |
|
||||
if ("${{ inputs.ref }}" -ne "") {
|
||||
git checkout --progress --recurse-submodules ${{ inputs.ref || 'dev' }}
|
||||
}
|
||||
git fetch --depth=250 --tags
|
||||
|
||||
- name: Install semver
|
||||
- name: Fetch submodules
|
||||
run: |
|
||||
npm install --global --progress semver
|
||||
git submodule update --init --depth 1 3rdparty/EmulatorExtras
|
||||
|
||||
- name: Set tag
|
||||
- name: Checkout ref (if provided)
|
||||
if: inputs.ref != ''
|
||||
run: |
|
||||
git checkout --progress --recurse-submodules ${{ inputs.ref }}
|
||||
|
||||
- name: Check for Changes and Set tag
|
||||
id: set_tag
|
||||
run: |
|
||||
# pre_version是上一个公版,这里需要拉上一个tag,避免堆积过多commit
|
||||
$latest_tag=$(git describe --tags --abbrev=0)
|
||||
echo "latest_tag=$latest_tag" >> $env:GITHUB_OUTPUT
|
||||
$described = $(git describe --tags --long --match 'v*')
|
||||
$ids = $($described -split "-")
|
||||
if ($ids.length -eq 3) {
|
||||
$ver = "v$(semver --increment $ids[0].Substring(1))"
|
||||
$pre_version = "$($ids[0])"
|
||||
$dist = `printf "%03d"` $ids[1]
|
||||
echo "tag=$ver-alpha.1.d$($dist).$($ids[2])" >> $env:GITHUB_OUTPUT
|
||||
echo "pre_version=$pre_version" >> $env:GITHUB_OUTPUT
|
||||
# Fetch the latest tag from the repository
|
||||
$latest_tag = git describe --tags --abbrev=0
|
||||
|
||||
Write-Output "Previous Tag: $latest_tag"
|
||||
Write-Output "latest_tag=$latest_tag" >> $env:GITHUB_OUTPUT
|
||||
|
||||
# Check for changes between the latest tag and HEAD
|
||||
$recent_changes = git log "$latest_tag..HEAD" --oneline
|
||||
|
||||
if (-not $recent_changes) {
|
||||
Write-Output "No commits. Cancelling workflow..."
|
||||
Write-Output "cancel_run=true" >> $env:GITHUB_ENV
|
||||
exit 0
|
||||
} else {
|
||||
Write-Output "Recent commits: $recent_changes"
|
||||
Write-Output "Commits found. Continuing build..."
|
||||
Write-Output "cancel_run=false" >> $env:GITHUB_ENV
|
||||
}
|
||||
|
||||
# Get the full description of the current commit
|
||||
$described = git describe --tags --long --match 'v*'
|
||||
Write-Output "New Described: $described"
|
||||
$ids = $described -split "-"
|
||||
|
||||
if ($ids.Length -eq 3) {
|
||||
# Extract and parse the current version
|
||||
$current_version = $ids[0].Substring(1)
|
||||
$parts = $current_version -split '\.'
|
||||
if ($parts.Length -ne 3) {
|
||||
Write-Error "Invalid version format: $current_version. Expected 'major.minor.patch'."
|
||||
exit 1
|
||||
}
|
||||
|
||||
# Increment the patch version
|
||||
$parts[2] = [int]$parts[2] + 1
|
||||
$new_version = "$($parts[0]).$($parts[1]).$($parts[2])"
|
||||
|
||||
# Construct the new tag and pre_version
|
||||
$ver = "v$new_version"
|
||||
$pre_version = $ids[0]
|
||||
$dist = "{0:D3}" -f [int]$ids[1]
|
||||
|
||||
Write-Output "pre_version=$pre_version" >> $env:GITHUB_OUTPUT
|
||||
Write-Output "New Tag: $ver-alpha.1.d$dist.$($ids[2])"
|
||||
Write-Output "tag=$ver-alpha.1.d$dist.$($ids[2])" >> $env:GITHUB_OUTPUT
|
||||
|
||||
exit 0
|
||||
}
|
||||
if ($ids.length -eq 4) {
|
||||
$dist = `printf "%03d"` $ids[2]
|
||||
|
||||
if ($ids.Length -eq 4) {
|
||||
$dist = "{0:D3}" -f [int]$ids[2]
|
||||
$pre_version = "$($ids[0])-$($ids[1])"
|
||||
echo "pre_version=$pre_version" >> $env:GITHUB_OUTPUT
|
||||
echo "tag=$pre_version.d$($dist).$($ids[3])" >> $env:GITHUB_OUTPUT
|
||||
|
||||
Write-Output "Pre Version: $pre_version"
|
||||
Write-Output "pre_version=$pre_version" >> $env:GITHUB_OUTPUT
|
||||
|
||||
Write-Output "tag: $pre_version.d$dist.$($ids[3])"
|
||||
Write-Output "tag=$pre_version.d$dist.$($ids[3])" >> $env:GITHUB_OUTPUT
|
||||
|
||||
exit 0
|
||||
}
|
||||
|
||||
exit 1
|
||||
|
||||
- name: Push tag to main repo
|
||||
id: push_main_tag
|
||||
- name: Stop if no changes
|
||||
if: env.cancel_run == 'true'
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: |
|
||||
git config user.name 'github-actions[bot]'
|
||||
git config user.email 'github-actions[bot]@users.noreply.github.com'
|
||||
curl -s -L -X POST `
|
||||
-H "Accept: application/vnd.github+json" `
|
||||
-H "Authorization: Bearer ${{ secrets.MAA_ACTION_READ_WRITE }}" `
|
||||
-H "X-GitHub-Api-Version: 2022-11-28" `
|
||||
"https://api.github.com/repos/MaaAssistantArknights/MaaAssistantArknights/actions/runs/${{ github.run_id }}/cancel" > $null
|
||||
|
||||
$main_tag_name=$(echo "alpha/${{ steps.set_tag.outputs.tag }}")
|
||||
git tag $main_tag_name -f
|
||||
git push --tags origin HEAD:refs/tags/$main_tag_name -f
|
||||
echo "main_tag_name=$main_tag_name" >> $env:GITHUB_OUTPUT
|
||||
gh run watch ${{ github.run_id }}
|
||||
|
||||
- name: Generate Changelog
|
||||
id: generate_changelog
|
||||
@@ -102,6 +149,19 @@ jobs:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
PYTHONIOENCODING: "utf-8"
|
||||
|
||||
- name: Stop if no changes
|
||||
if: steps.generate_changelog.outputs.cancel_run == 'true'
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: |
|
||||
curl -s -L -X POST `
|
||||
-H "Accept: application/vnd.github+json" `
|
||||
-H "Authorization: Bearer ${{ secrets.MAA_ACTION_READ_WRITE }}" `
|
||||
-H "X-GitHub-Api-Version: 2022-11-28" `
|
||||
"https://api.github.com/repos/MaaAssistantArknights/MaaAssistantArknights/actions/runs/${{ github.run_id }}/cancel" > $null
|
||||
|
||||
gh run watch ${{ github.run_id }}
|
||||
|
||||
- name: Read Changelog to variable
|
||||
id: read_changelog
|
||||
uses: juliangruber/read-file-action@v1
|
||||
@@ -115,17 +175,26 @@ jobs:
|
||||
path: |
|
||||
.nuke/temp
|
||||
~/.nuget/packages
|
||||
key: ${{ runner.os }}-${{ hashFiles('**/global.json', '**/*.csproj') }}
|
||||
key: ${{ runner.os }}-${{ matrix.msbuild_target }}-${{ hashFiles('**/global.json', '**/*.csproj') }}
|
||||
|
||||
- name: Restore dependencies
|
||||
if: steps.cache-nuget.outputs.cache-hit != 'true'
|
||||
run: dotnet restore
|
||||
|
||||
- name: Cache MaaDeps
|
||||
id: cache-maadeps
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: |
|
||||
./MaaDeps
|
||||
key: ${{ runner.os }}-${{ matrix.msbuild_target }}-maadeps-${{ hashFiles('./maadeps-download.py') }}
|
||||
|
||||
- name: Bootstrap MaaDeps
|
||||
run: |
|
||||
python3 maadeps-download.py ${{ matrix.lowercase_target }}-windows
|
||||
if: steps.cache-maadeps.outputs.cache-hit != 'true'
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: |
|
||||
python3 maadeps-download.py ${{ matrix.msbuild_target }}-windows
|
||||
|
||||
- name: Taggify Version
|
||||
run: |
|
||||
@@ -163,10 +232,22 @@ jobs:
|
||||
- name: Upload MAA to Github
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: MAA-win-${{ matrix.lowercase_target }}
|
||||
name: MAA-win-${{ matrix.msbuild_target }}
|
||||
path: artifacts
|
||||
|
||||
- name: Push tag to main repo
|
||||
id: push_main_tag
|
||||
run: |
|
||||
git config user.name 'github-actions[bot]'
|
||||
git config user.email 'github-actions[bot]@users.noreply.github.com'
|
||||
|
||||
$main_tag_name=$(echo "alpha/${{ steps.set_tag.outputs.tag }}")
|
||||
git tag $main_tag_name -f
|
||||
git push --tags origin HEAD:refs/tags/$main_tag_name -f
|
||||
echo "main_tag_name=$main_tag_name" >> $env:GITHUB_OUTPUT
|
||||
|
||||
push-tag:
|
||||
if: github.repository_owner == 'MaaAssistantArknights'
|
||||
needs: build-win-nightly
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
@@ -189,6 +270,7 @@ jobs:
|
||||
git push --tags origin HEAD:refs/tags/${{ needs.build-win-nightly.outputs.tag }}
|
||||
|
||||
make-ota:
|
||||
if: github.repository_owner == 'MaaAssistantArknights'
|
||||
needs: [build-win-nightly, push-tag]
|
||||
strategy:
|
||||
matrix:
|
||||
@@ -217,16 +299,16 @@ jobs:
|
||||
mkdir -pv build-ota && cd build-ota
|
||||
|
||||
# Convert inputs to integers
|
||||
limit=${{ inputs.limit || 30 }}
|
||||
limit=${limit%.*}
|
||||
echo "Parsed limit: $limit"
|
||||
limit_maa=${{ inputs.limit_maa || 10 }}
|
||||
limit_maa=${limit_maa%.*}
|
||||
echo "Parsed limit_maa: $limit_maa"
|
||||
|
||||
limit_2=${{ inputs.limit_2 || 30 }}
|
||||
limit_2=${limit_2%.*}
|
||||
echo "Parsed limit_2: $limit_2"
|
||||
limit_mr=${{ inputs.limit_mr || 10 }}
|
||||
limit_mr=${limit_mr%.*}
|
||||
echo "Parsed limit_mr: $limit_mr"
|
||||
|
||||
gh release list --repo 'MaaAssistantArknights/MaaAssistantArknights' --limit $limit | tee ./release_maa.txt
|
||||
gh release list --repo "${{ github.repository_owner }}/MaaRelease" --limit $limit_2 | tee ./release_mr.txt
|
||||
gh release list --repo 'MaaAssistantArknights/MaaAssistantArknights' --limit $limit_maa | tee ./release_maa.txt
|
||||
gh release list --repo "${{ github.repository_owner }}/MaaRelease" --limit $limit_mr | tee ./release_mr.txt
|
||||
echo ${{ needs.build-win-nightly.outputs.tag }} > ./config
|
||||
|
||||
cat ./release_maa.txt | awk '{ print $1 }' > ./tags_maa.txt
|
||||
@@ -275,5 +357,7 @@ jobs:
|
||||
- name: Setup release mirror
|
||||
run: |
|
||||
gh workflow --repo MaaAssistantArknights/MaaRelease run release-mirrors.yml
|
||||
gh workflow --repo MaaAssistantArknights/MaaRelease run mirrorchyan_alpha.yml
|
||||
gh workflow --repo MaaAssistantArknights/MaaRelease run mirrorchyan_alpha_release_note.yml
|
||||
env:
|
||||
GH_TOKEN: ${{ secrets.MISTEOWORKFLOW }}
|
||||
|
||||
306
.github/workflows/res-update-game-unix.yml
vendored
@@ -1,306 +0,0 @@
|
||||
name: res-update-game-unix
|
||||
|
||||
on:
|
||||
# schedule:
|
||||
# - cron: "*/20 * * * *"
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
commit_message:
|
||||
description: "Commit Message"
|
||||
type: string
|
||||
required: false
|
||||
|
||||
jobs:
|
||||
clone-resources-official:
|
||||
if: github.repository_owner == 'MaaAssistantArknights'
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Clone ArknightsGameResource for Official
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
show-progress: false
|
||||
repository: yuanyan3060/ArknightsGameResource
|
||||
ref: main
|
||||
path: ./Official
|
||||
sparse-checkout-cone-mode: false
|
||||
sparse-checkout: |
|
||||
/levels.json
|
||||
/item
|
||||
/building_skill
|
||||
/gamedata/excel/item_table.json
|
||||
/gamedata/excel/building_data.json
|
||||
/gamedata/excel/range_table.json
|
||||
/gamedata/excel/character_table.json
|
||||
/gamedata/excel/gacha_table.json
|
||||
/gamedata/excel/roguelike_topic_table.json
|
||||
/gamedata/excel/activity_table.json
|
||||
|
||||
- name: Upload Official
|
||||
uses: actions/upload-artifact@v4.3.4
|
||||
with:
|
||||
name: official
|
||||
path: ./Official
|
||||
|
||||
clone-resources-overseas:
|
||||
if: github.repository_owner == 'MaaAssistantArknights'
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Clone ArknightsGameResource_Yostar for Overseas
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
show-progress: false
|
||||
repository: Kengxxiao/ArknightsGameData_Yostar
|
||||
ref: main
|
||||
path: ./Overseas
|
||||
sparse-checkout-cone-mode: false
|
||||
sparse-checkout: |
|
||||
/en_US/gamedata/excel/item_table.json
|
||||
/en_US/gamedata/excel/building_data.json
|
||||
/en_US/gamedata/excel/range_table.json
|
||||
/en_US/gamedata/excel/character_table.json
|
||||
/en_US/gamedata/excel/gacha_table.json
|
||||
/en_US/gamedata/excel/roguelike_topic_table.json
|
||||
/en_US/gamedata/excel/activity_table.json
|
||||
/ja_JP/gamedata/excel/item_table.json
|
||||
/ja_JP/gamedata/excel/building_data.json
|
||||
/ja_JP/gamedata/excel/range_table.json
|
||||
/ja_JP/gamedata/excel/character_table.json
|
||||
/ja_JP/gamedata/excel/gacha_table.json
|
||||
/ja_JP/gamedata/excel/roguelike_topic_table.json
|
||||
/ja_JP/gamedata/excel/activity_table.json
|
||||
/ko_KR/gamedata/excel/item_table.json
|
||||
/ko_KR/gamedata/excel/building_data.json
|
||||
/ko_KR/gamedata/excel/range_table.json
|
||||
/ko_KR/gamedata/excel/character_table.json
|
||||
/ko_KR/gamedata/excel/gacha_table.json
|
||||
/ko_KR/gamedata/excel/roguelike_topic_table.json
|
||||
/ko_KR/gamedata/excel/activity_table.json
|
||||
|
||||
- name: Upload Official
|
||||
uses: actions/upload-artifact@v4.3.4
|
||||
with:
|
||||
name: overseas
|
||||
path: ./Overseas
|
||||
|
||||
clone-resources-txwy:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Clone arknights-toolbox-update for Taiwan
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
show-progress: false
|
||||
repository: arkntools/arknights-toolbox-update
|
||||
ref: data-tw
|
||||
path: ./excel
|
||||
token: ${{ secrets.ARKNTOOLS_MAA_RESOURCE_UPDATER}}
|
||||
|
||||
- name: Upload Official
|
||||
uses: actions/upload-artifact@v4.3.4
|
||||
with:
|
||||
name: txwy
|
||||
path: ./excel
|
||||
|
||||
update-game-resources:
|
||||
if: github.repository_owner == 'MaaAssistantArknights'
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout MAA
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
# TL;DR https://github.com/MaaAssistantArknights/MaaAssistantArknights/issues/9872#issuecomment-2251378371
|
||||
# actions/checkout uses ${{ secrets.GITHUB_TOKEN }} by default, meaning all steps will inherit it
|
||||
persist-credentials: false # Needed to bypass protection rules in Push changes
|
||||
show-progress: false
|
||||
|
||||
- name: Restore ResourceUpdater.exe from cache
|
||||
id: cache-resupd
|
||||
uses: actions/cache/restore@v4
|
||||
with:
|
||||
key: ${{ runner.os }}-resource-updater-unix-${{ hashFiles('./tools/ResourceUpdaterUnix/main.cpp') }}
|
||||
path: |
|
||||
./tools/ResourceUpdaterUnix/build/ResourceUpdaterUnix
|
||||
|
||||
- name: Bootstrap MaaDeps
|
||||
if: steps.cache-resupd.outputs.cache-hit != 'true'
|
||||
run: |
|
||||
python3 maadeps-download.py x64-linux
|
||||
|
||||
- name: Build ResourceUpdater
|
||||
if: steps.cache-resupd.outputs.cache-hit != 'true'
|
||||
run: |
|
||||
cmake -S . -B build
|
||||
cd build
|
||||
make -j$(nproc)
|
||||
|
||||
- name: Save ResourceUpdater.exe to cache
|
||||
if: always() && steps.cache-resupd.outputs.cache-hit != 'true'
|
||||
uses: actions/cache/save@v4
|
||||
with:
|
||||
key: ${{ runner.os }}-resource-updater-unix-${{ hashFiles('./tools/ResourceUpdaterUnix/main.cpp') }}
|
||||
path: |
|
||||
./tools/ResourceUpdaterUnix/build/ResourceUpdaterUnix
|
||||
|
||||
- name: Download txwy
|
||||
uses: actions/download-artifact@v4.1.8
|
||||
with:
|
||||
name: txwy
|
||||
path: ./tools/ResourceUpdaterUnix/build/Overseas/zh_TW/gamedata/excel
|
||||
|
||||
- name: Download Overseas
|
||||
uses: actions/download-artifact@v4.1.8
|
||||
with:
|
||||
name: overseas
|
||||
path: ./tools/ResourceUpdaterUnix/build/Overseas
|
||||
|
||||
- name: Download Official
|
||||
uses: actions/download-artifact@v4.1.8
|
||||
with:
|
||||
name: official
|
||||
path: ./tools/ResourceUpdaterUnix/build/Official
|
||||
|
||||
- name: Run Resource Updater
|
||||
run: |
|
||||
./tools/ResourceUpdaterUnix/build/ResourceUpdaterUnix
|
||||
|
||||
- name: Task Sorting
|
||||
run: |
|
||||
python3 tools/TaskSorter/TaskSorter.py
|
||||
|
||||
- name: Cache Prettier
|
||||
id: cache-prettier
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
key: ${{ runner.os }}-prettier
|
||||
path: ./node_modules
|
||||
|
||||
- name: Install Prettier
|
||||
if: steps.cache-prettier.outputs.cache-hit != 'true'
|
||||
run: |
|
||||
npm i prettier --no-save
|
||||
|
||||
- name: Run Prettier on modified Jsons
|
||||
run: |
|
||||
npx prettier -w $(git diff --name-only --diff-filter=ACM 2>/dev/null | grep '\.json$')
|
||||
|
||||
- name: Check if only sorted and Templates
|
||||
id: check_sorted_templates
|
||||
run: |
|
||||
git status
|
||||
|
||||
gd=$(git diff --numstat HEAD 2>/dev/null | grep -i resource)
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "no diff"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
echo ""
|
||||
echo "$gd"
|
||||
echo ""
|
||||
|
||||
diff=false
|
||||
hasPng=false
|
||||
|
||||
IFS=$'\n' read -rd '' -a diffLines <<<"$gd"
|
||||
|
||||
for line in "${diffLines[@]}"; do
|
||||
parts=($line)
|
||||
filePath=${parts[2]}
|
||||
firstNumber=${parts[0]}
|
||||
secondNumber=${parts[1]}
|
||||
|
||||
if [[ $filePath =~ \.png$ ]]; then
|
||||
hasPng=true
|
||||
fi
|
||||
|
||||
if [[ $firstNumber -gt 1 || $firstNumber -ne $secondNumber ]]; then
|
||||
diff=true
|
||||
fi
|
||||
|
||||
if $hasPng && $diff; then
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
changes=$($hasPng || $diff)
|
||||
|
||||
echo "diff: $diff"
|
||||
echo "hasPng: $hasPng"
|
||||
echo "changes: $changes"
|
||||
|
||||
echo "contains_png=$hasPng" >> $GITHUB_OUTPUT
|
||||
echo "changes=$changes" >> $GITHUB_OUTPUT
|
||||
- name: Setup python
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: "3.11"
|
||||
|
||||
- name: Cache Python packages
|
||||
id: cache_python
|
||||
if: always()
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: ${{ env.pythonLocation }}/lib/python3.11/site-packages
|
||||
key: ${{ runner.os }}-pip-optimize-templates-${{ hashFiles('./tools/OptimizeTemplates/requirements.txt') }}
|
||||
|
||||
- name: Install dependencies
|
||||
if: steps.cache_python.outputs.cache-hit != 'true'
|
||||
run: |
|
||||
pip install -r tools/OptimizeTemplates/requirements.txt
|
||||
|
||||
- name: Setup oxipng
|
||||
uses: baptiste0928/cargo-install@v3
|
||||
with:
|
||||
crate: oxipng
|
||||
|
||||
- name: Optimize Templates
|
||||
if: steps.check_sorted_templates.outputs.contains_png == 'True'
|
||||
run: |
|
||||
python3 tools/OptimizeTemplates/optimize_templates.py resource/template/items/ resource/template/infrast/
|
||||
|
||||
- name: Cancelling
|
||||
if: steps.check_sorted_templates.outputs.changes != 'True'
|
||||
uses: andymckay/cancel-action@0.5
|
||||
|
||||
- name: Add files to git
|
||||
if: steps.check_sorted_templates.outputs.changes == 'True'
|
||||
id: add_files
|
||||
run: |
|
||||
git config user.name "github-actions[bot]"
|
||||
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
|
||||
git add .
|
||||
|
||||
commit_msg="${{ github.event.inputs.commit_message }}"
|
||||
if [ -n "$commit_msg" ]; then
|
||||
commit_msg=$(echo "$commit_msg" | xargs) # Trim whitespace
|
||||
else
|
||||
commit_msg="chore: Auto Update Game Resources - $(date +'%Y-%m-%d')"
|
||||
fi
|
||||
|
||||
git commit -m "$commit_msg" -m "[skip changelog]"
|
||||
if [ $? -eq 0 ]; then
|
||||
echo "have_commits=True" >> $GITHUB_OUTPUT
|
||||
fi
|
||||
|
||||
git pull origin $(git rev-parse --abbrev-ref HEAD) --unshallow --rebase
|
||||
|
||||
- name: Cancelling
|
||||
if: steps.add_files.outputs.have_commits != 'True'
|
||||
uses: andymckay/cancel-action@0.5
|
||||
|
||||
- name: Push changes
|
||||
if: steps.add_files.outputs.have_commits == 'True'
|
||||
uses: ad-m/github-push-action@master
|
||||
with:
|
||||
github_token: ${{ secrets.MAA_RESOURCE_SYNC }}
|
||||
|
||||
- name: Update OTA resource
|
||||
if: steps.add_files.outputs.have_commits == 'True'
|
||||
env:
|
||||
GH_TOKEN: ${{ secrets.MAA_RESOURCE_SYNC }}
|
||||
run: |
|
||||
gh workflow --repo MaaAssistantArknights/MaaRelease run update-resource.yml
|
||||
|
||||
# - name: Release # ref: https://docs.github.com/en/actions/using-workflows/triggering-a-workflow#triggering-a-workflow-from-a-workflow
|
||||
# if: steps.add_files.outputs.have_commits == 'True'
|
||||
# run: |
|
||||
# gh workflow run release-nightly-ota -f release_body="Auto Release of Resource Updates"
|
||||
153
.github/workflows/res-update-game.yml
vendored
@@ -2,7 +2,7 @@ name: res-update-game
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: "*/20 * * * *"
|
||||
- cron: "*/20 * * * *" # Runs every 20 minutes
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
commit_message:
|
||||
@@ -36,10 +36,11 @@ jobs:
|
||||
/gamedata/excel/activity_table.json
|
||||
|
||||
- name: Upload Official
|
||||
uses: actions/upload-artifact@v4.3.4
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: official
|
||||
path: ./Official
|
||||
compression-level: 0
|
||||
|
||||
clone-resources-overseas:
|
||||
if: github.repository_owner == 'MaaAssistantArknights'
|
||||
@@ -49,38 +50,39 @@ jobs:
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
show-progress: false
|
||||
repository: Kengxxiao/ArknightsGameData_Yostar
|
||||
ref: main
|
||||
repository: ArknightsAssets/ArknightsGamedata
|
||||
ref: master
|
||||
path: ./Overseas
|
||||
sparse-checkout-cone-mode: false
|
||||
sparse-checkout: |
|
||||
/en_US/gamedata/excel/item_table.json
|
||||
/en_US/gamedata/excel/building_data.json
|
||||
/en_US/gamedata/excel/range_table.json
|
||||
/en_US/gamedata/excel/character_table.json
|
||||
/en_US/gamedata/excel/gacha_table.json
|
||||
/en_US/gamedata/excel/roguelike_topic_table.json
|
||||
/en_US/gamedata/excel/activity_table.json
|
||||
/ja_JP/gamedata/excel/item_table.json
|
||||
/ja_JP/gamedata/excel/building_data.json
|
||||
/ja_JP/gamedata/excel/range_table.json
|
||||
/ja_JP/gamedata/excel/character_table.json
|
||||
/ja_JP/gamedata/excel/gacha_table.json
|
||||
/ja_JP/gamedata/excel/roguelike_topic_table.json
|
||||
/ja_JP/gamedata/excel/activity_table.json
|
||||
/ko_KR/gamedata/excel/item_table.json
|
||||
/ko_KR/gamedata/excel/building_data.json
|
||||
/ko_KR/gamedata/excel/range_table.json
|
||||
/ko_KR/gamedata/excel/character_table.json
|
||||
/ko_KR/gamedata/excel/gacha_table.json
|
||||
/ko_KR/gamedata/excel/roguelike_topic_table.json
|
||||
/ko_KR/gamedata/excel/activity_table.json
|
||||
/en/gamedata/excel/item_table.json
|
||||
/en/gamedata/excel/building_data.json
|
||||
/en/gamedata/excel/range_table.json
|
||||
/en/gamedata/excel/character_table.json
|
||||
/en/gamedata/excel/gacha_table.json
|
||||
/en/gamedata/excel/roguelike_topic_table.json
|
||||
/en/gamedata/excel/activity_table.json
|
||||
/jp/gamedata/excel/item_table.json
|
||||
/jp/gamedata/excel/building_data.json
|
||||
/jp/gamedata/excel/range_table.json
|
||||
/jp/gamedata/excel/character_table.json
|
||||
/jp/gamedata/excel/gacha_table.json
|
||||
/jp/gamedata/excel/roguelike_topic_table.json
|
||||
/jp/gamedata/excel/activity_table.json
|
||||
/kr/gamedata/excel/item_table.json
|
||||
/kr/gamedata/excel/building_data.json
|
||||
/kr/gamedata/excel/range_table.json
|
||||
/kr/gamedata/excel/character_table.json
|
||||
/kr/gamedata/excel/gacha_table.json
|
||||
/kr/gamedata/excel/roguelike_topic_table.json
|
||||
/kr/gamedata/excel/activity_table.json
|
||||
|
||||
- name: Upload Official
|
||||
uses: actions/upload-artifact@v4.3.4
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: overseas
|
||||
path: ./Overseas
|
||||
compression-level: 0
|
||||
|
||||
clone-resources-txwy:
|
||||
if: github.repository_owner == 'MaaAssistantArknights'
|
||||
@@ -116,12 +118,16 @@ jobs:
|
||||
wait
|
||||
|
||||
- name: Upload Official
|
||||
uses: actions/upload-artifact@v4.3.4
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: txwy
|
||||
path: ./excel
|
||||
compression-level: 0
|
||||
|
||||
update-game-resources:
|
||||
# In case of rate limitations on the runners/instances, add dependency, by removing the comment
|
||||
|
||||
# needs: [clone-resources-official, clone-resources-overseas, clone-resources-txwy]
|
||||
if: github.repository_owner == 'MaaAssistantArknights'
|
||||
runs-on: windows-latest
|
||||
steps:
|
||||
@@ -138,13 +144,24 @@ jobs:
|
||||
id: cache-resupd
|
||||
uses: actions/cache/restore@v4
|
||||
with:
|
||||
key: ${{ runner.os }}-resource-updater-main-cpp-${{ hashFiles('./tools/ResourceUpdater/main.cpp') }}
|
||||
key: Resource-updater-${{ hashFiles('./tools/ResourceUpdater/main.cpp') }}
|
||||
path: |
|
||||
./tools/ResourceUpdater/x64/Release/opencv_world4_maa.dll
|
||||
./tools/ResourceUpdater/x64/Release/ResourceUpdater.exe
|
||||
|
||||
- name: Bootstrap MaaDeps
|
||||
- name: Cache MaaDeps
|
||||
if: steps.cache-resupd.outputs.cache-hit != 'true'
|
||||
id: cache-maadeps
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: |
|
||||
./MaaDeps
|
||||
key: ${{ runner.os }}-x64-maadeps-${{ hashFiles('./maadeps-download.py') }}
|
||||
|
||||
- name: Bootstrap MaaDeps
|
||||
if: steps.cache-resupd.outputs.cache-hit != 'true' && steps.cache-maadeps.outputs.cache-hit != 'true'
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: |
|
||||
python3 maadeps-download.py x64-windows
|
||||
|
||||
@@ -161,24 +178,66 @@ jobs:
|
||||
if: always() && steps.cache-resupd.outputs.cache-hit != 'true'
|
||||
uses: actions/cache/save@v4
|
||||
with:
|
||||
key: ${{ runner.os }}-resource-updater-main-cpp-${{ hashFiles('./tools/ResourceUpdater/main.cpp') }}
|
||||
key: Resource-updater-${{ hashFiles('./tools/ResourceUpdater/main.cpp') }}
|
||||
path: |
|
||||
./tools/ResourceUpdater/x64/Release/opencv_world4_maa.dll
|
||||
./tools/ResourceUpdater/x64/Release/ResourceUpdater.exe
|
||||
|
||||
- name: Download txwy
|
||||
id: download-txwy
|
||||
uses: actions/download-artifact@v4.1.8
|
||||
continue-on-error: true
|
||||
with:
|
||||
name: txwy
|
||||
path: ./tools/ResourceUpdater/x64/Release/Overseas/tw/gamedata/excel
|
||||
|
||||
- name: Delay txwy
|
||||
if: steps.download-txwy.outcome == 'failure'
|
||||
run: |
|
||||
Start-Sleep -s 20
|
||||
|
||||
- name: Re-download txwy
|
||||
if: steps.download-txwy.outcome == 'failure'
|
||||
uses: actions/download-artifact@v4.1.8
|
||||
with:
|
||||
name: txwy
|
||||
path: ./tools/ResourceUpdater/x64/Release/Overseas/zh_TW/gamedata/excel
|
||||
path: ./tools/ResourceUpdater/x64/Release/Overseas/tw/gamedata/excel
|
||||
|
||||
- name: Download Overseas
|
||||
id: download-overseas
|
||||
uses: actions/download-artifact@v4.1.8
|
||||
continue-on-error: true
|
||||
with:
|
||||
name: overseas
|
||||
path: ./tools/ResourceUpdater/x64/Release/Overseas
|
||||
|
||||
- name: Delay Overseas
|
||||
if: steps.download-overseas.outcome == 'failure'
|
||||
run: |
|
||||
Start-Sleep -s 20
|
||||
|
||||
- name: Re-download Overseas
|
||||
if: steps.download-overseas.outcome == 'failure'
|
||||
uses: actions/download-artifact@v4.1.8
|
||||
with:
|
||||
name: overseas
|
||||
path: ./tools/ResourceUpdater/x64/Release/Overseas
|
||||
|
||||
- name: Download Official
|
||||
id: download-official
|
||||
uses: actions/download-artifact@v4.1.8
|
||||
continue-on-error: true
|
||||
with:
|
||||
name: official
|
||||
path: ./tools/ResourceUpdater/x64/Release/Official
|
||||
|
||||
- name: Delay Official
|
||||
if: steps.download-official.outcome == 'failure'
|
||||
run: |
|
||||
Start-Sleep -s 20
|
||||
|
||||
- name: Re-download Official
|
||||
if: steps.download-official.outcome == 'failure'
|
||||
uses: actions/download-artifact@v4.1.8
|
||||
with:
|
||||
name: official
|
||||
@@ -199,18 +258,18 @@ jobs:
|
||||
with:
|
||||
args: -w ${{ steps.task_sorting.outputs.gitdiff }}
|
||||
|
||||
- name: Check if only sorted and Templates
|
||||
id: check_sorted_templates
|
||||
run: pwsh tools/ResourceUpdater/validator.ps1
|
||||
- name: Update version.json date if necessary
|
||||
id: update_version
|
||||
run: pwsh tools/ResourceUpdater/version.ps1
|
||||
|
||||
- name: Setup python
|
||||
if: steps.check_sorted_templates.outputs.contains_png == 'True'
|
||||
if: steps.update_version.outputs.contains_png == 'True'
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: "3.11"
|
||||
|
||||
- name: Cache Python packages
|
||||
if: always() && steps.check_sorted_templates.outputs.contains_png == 'True'
|
||||
if: always() && steps.update_version.outputs.contains_png == 'True'
|
||||
id: cache_python
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
@@ -218,23 +277,23 @@ jobs:
|
||||
key: ${{ runner.os }}-pip-optimize-templates-${{ hashFiles('./tools/OptimizeTemplates/requirements.txt') }}
|
||||
|
||||
- name: Install dependencies
|
||||
if: steps.cache_python.outputs.cache-hit != 'true' && steps.check_sorted_templates.outputs.contains_png == 'True'
|
||||
if: steps.cache_python.outputs.cache-hit != 'true' && steps.update_version.outputs.contains_png == 'True'
|
||||
run: |
|
||||
pip install -r tools/OptimizeTemplates/requirements.txt
|
||||
|
||||
- name: Setup oxipng
|
||||
if: steps.check_sorted_templates.outputs.contains_png == 'True'
|
||||
if: steps.update_version.outputs.contains_png == 'True'
|
||||
uses: baptiste0928/cargo-install@v3
|
||||
with:
|
||||
crate: oxipng
|
||||
|
||||
- name: Run optimize_templates
|
||||
if: steps.check_sorted_templates.outputs.contains_png == 'True'
|
||||
if: steps.update_version.outputs.contains_png == 'True'
|
||||
run: |
|
||||
python3 tools/OptimizeTemplates/optimize_templates.py -p resource/template/items/ resource/template/infrast/
|
||||
|
||||
- name: Add files to git
|
||||
if: steps.check_sorted_templates.outputs.changes == 'True'
|
||||
if: steps.update_version.outputs.changes == 'True'
|
||||
id: add_files
|
||||
run: |
|
||||
git config user.name "github-actions[bot]"
|
||||
@@ -264,15 +323,15 @@ jobs:
|
||||
branch: ${{ github.ref }}
|
||||
github_token: ${{ secrets.MAA_RESOURCE_SYNC }}
|
||||
|
||||
- name: Update OTA resource
|
||||
if: steps.add_files.outputs.have_commits == 'True'
|
||||
env:
|
||||
GH_TOKEN: ${{ secrets.MAA_RESOURCE_SYNC }}
|
||||
run: |
|
||||
gh workflow --repo MaaAssistantArknights/MaaRelease run update-resource.yml
|
||||
# - name: Update OTA resource
|
||||
# if: steps.update_version.outputs.update_resources == 'True'
|
||||
# env:
|
||||
# GH_TOKEN: ${{ secrets.MISTEOWORKFLOW }}
|
||||
# run: |
|
||||
# gh workflow --repo MaaAssistantArknights/MaaRelease run update-resource.yml
|
||||
|
||||
- name: Add cancelled status
|
||||
if: steps.check_sorted_templates.outputs.changes != 'True' || steps.add_files.outputs.have_commits != 'True'
|
||||
if: steps.update_version.outputs.changes != 'True' || steps.add_files.outputs.have_commits != 'True'
|
||||
uses: andymckay/cancel-action@0.5
|
||||
|
||||
# - name: Release # ref: https://docs.github.com/en/actions/using-workflows/triggering-a-workflow#triggering-a-workflow-from-a-workflow
|
||||
|
||||
98
.github/workflows/smoke-testing.yml
vendored
@@ -1,27 +1,25 @@
|
||||
name: test
|
||||
name: smoke-testing
|
||||
|
||||
on:
|
||||
push:
|
||||
paths:
|
||||
- "3rdparty/include/**"
|
||||
- "include/**"
|
||||
- "src/**"
|
||||
- "cmake/**"
|
||||
- "CMakeLists.txt"
|
||||
- "src/Cpp/**"
|
||||
- "src/MaaCore/**"
|
||||
- "src/SyncRes/**"
|
||||
- "MAA.sln"
|
||||
- "resource/**"
|
||||
- "MaaDeps/**"
|
||||
- "!**/*.md"
|
||||
pull_request:
|
||||
paths:
|
||||
- "3rdparty/include/**"
|
||||
- "include/**"
|
||||
- "src/**"
|
||||
- "cmake/**"
|
||||
- "CMakeLists.txt"
|
||||
- "src/Cpp/**"
|
||||
- "src/MaaCore/**"
|
||||
- "src/SyncRes/**"
|
||||
- "MAA.sln"
|
||||
- "resource/**"
|
||||
- "MaaDeps/**"
|
||||
- "!**/*.md"
|
||||
workflow_dispatch:
|
||||
|
||||
@@ -31,53 +29,93 @@ concurrency:
|
||||
|
||||
jobs:
|
||||
smoke-testing:
|
||||
# Prevent duplicate runs on organization branches with PRs
|
||||
if: github.event_name != 'pull_request' ||
|
||||
github.event.pull_request.head.repo.full_name !=
|
||||
github.event.pull_request.base.repo.full_name
|
||||
runs-on: windows-latest
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
show-progress: false
|
||||
submodules: recursive
|
||||
|
||||
- name: Restore dependencies
|
||||
run: dotnet restore
|
||||
- name: Generate cache key
|
||||
id: cache_key
|
||||
run: |
|
||||
Write-Output "key=Smoke-testing-${{ hashFiles('src/Cpp/**', 'src/MaaCore/**', 'src/SyncRes/**', '3rdparty/include/**', 'include/**', 'MAA.sln') }}" >> $env:GITHUB_OUTPUT
|
||||
|
||||
- name: Restore cache smoke-testing
|
||||
id: cache-exe
|
||||
uses: actions/cache/restore@v4
|
||||
with:
|
||||
key: ${{ steps.cache_key.outputs.key }}
|
||||
path: |
|
||||
./x64/Debug/Sample.exe
|
||||
./x64/Debug/fastdeploy_ppocr.dll
|
||||
./x64/Debug/MaaCore.dll
|
||||
./x64/Debug/onnxruntime_maa.dll
|
||||
./x64/Debug/opencv_world4d_maa.dll
|
||||
|
||||
- name: Fetch submodules
|
||||
if: steps.cache-exe.outputs.cache-hit != 'true'
|
||||
run: |
|
||||
git submodule update --init --depth 1 3rdparty/EmulatorExtras
|
||||
|
||||
- name: Cache MaaDeps
|
||||
if: steps.cache-exe.outputs.cache-hit != 'true'
|
||||
id: cache-maadeps
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: |
|
||||
./MaaDeps
|
||||
key: ${{ runner.os }}-x64-maadeps-${{ hashFiles('./maadeps-download.py') }}
|
||||
|
||||
- name: Bootstrap MaaDeps
|
||||
if: steps.cache-exe.outputs.cache-hit != 'true' && steps.cache-maadeps.outputs.cache-hit != 'true'
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: |
|
||||
python3 maadeps-download.py x64-windows
|
||||
|
||||
- name: Add msbuild to PATH
|
||||
if: steps.cache-exe.outputs.cache-hit != 'true'
|
||||
uses: microsoft/setup-msbuild@v2
|
||||
with:
|
||||
msbuild-architecture: x64
|
||||
|
||||
- name: Build MaaSample
|
||||
if: steps.cache-exe.outputs.cache-hit != 'true'
|
||||
run: |
|
||||
MSBUILD src/Cpp/MaaSample.slnf /t:rebuild /p:Configuration="Debug" /p:Platform="x64" /m
|
||||
MSBUILD src/Cpp/MaaSample.slnf -t:restore,build -p:Configuration="Debug" -p:Platform="x64" -m
|
||||
|
||||
- name: Run tests - Official #用来判断是不是国服资源出错导致外服全炸
|
||||
- name: Copy resource to build directory
|
||||
if: steps.cache-exe.outputs.cache-hit == 'true'
|
||||
run: |
|
||||
.\x64\Debug\Sample.exe
|
||||
(robocopy "resource" "x64/Debug/resource" /E /XD "Arknights-Tile-Pos" /MT:4 > $null);
|
||||
if ($LASTEXITCODE -lt 2) { $global:LASTEXITCODE = $null }
|
||||
(robocopy "resource/Arknights-Tile-Pos" "x64/Debug/resource/Arknights-Tile-Pos" "overview.json" > $null);
|
||||
if ($LASTEXITCODE -lt 2) { $global:LASTEXITCODE= $null }
|
||||
|
||||
- name: Run tests - YostarJP
|
||||
- name: Run tests
|
||||
run: |
|
||||
.\x64\Debug\Sample.exe YostarJP
|
||||
pwsh tools/SmokeTesting/run_tests.ps1
|
||||
|
||||
- name: Run tests - YostarEN
|
||||
run: |
|
||||
.\x64\Debug\Sample.exe YostarEN
|
||||
|
||||
- name: Run tests - YostarKR
|
||||
run: |
|
||||
.\x64\Debug\Sample.exe YostarKR
|
||||
|
||||
- name: Run tests - txwy
|
||||
run: |
|
||||
.\x64\Debug\Sample.exe txwy
|
||||
- name: Save cache smoke-testing (only in dev)
|
||||
if: steps.cache-exe.outputs.cache-hit != 'true' && github.ref == 'refs/heads/dev'
|
||||
uses: actions/cache/save@v4
|
||||
with:
|
||||
key: ${{ steps.cache_key.outputs.key }}
|
||||
path: |
|
||||
./x64/Debug/Sample.exe
|
||||
./x64/Debug/fastdeploy_ppocr.dll
|
||||
./x64/Debug/MaaCore.dll
|
||||
./x64/Debug/onnxruntime_maa.dll
|
||||
./x64/Debug/opencv_world4d_maa.dll
|
||||
|
||||
- name: Upload logs
|
||||
if: always()
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: log
|
||||
path: .\x64\Debug\debug
|
||||
name: logs
|
||||
path: ./x64/Debug/debug
|
||||
|
||||
13
.github/workflows/stale.yml
vendored
@@ -1,16 +1,17 @@
|
||||
name: "Inactive Issues auto close"
|
||||
|
||||
env: # config
|
||||
daysBeforeStale: 90 # Number of days of inactivity before marking as stale
|
||||
daysBeforeClose: 7 # Number of days to wait after marking as stale before closing
|
||||
name: "Inactive Issues Closer"
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: "0 0 * * *" # Runs daily at UTC 00:00
|
||||
workflow_dispatch: # Allows manual triggering
|
||||
|
||||
env: # config
|
||||
daysBeforeStale: 90 # Number of days of inactivity before marking as stale
|
||||
daysBeforeClose: 7 # Number of days to wait after marking as stale before closing
|
||||
|
||||
jobs:
|
||||
stale:
|
||||
if: github.repository_owner == 'MaaAssistantArknights'
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
actions: write # Workaround for https://github.com/actions/stale/issues/1090
|
||||
@@ -34,5 +35,5 @@ jobs:
|
||||
days-before-pr-close: -1 # Completely disable closing for PRs
|
||||
|
||||
# Temporary to reduce the huge issues number
|
||||
operations-per-run: 500
|
||||
operations-per-run: 100
|
||||
debug-only: false
|
||||
|
||||
15
.github/workflows/sync-resource.yml
vendored
@@ -1,16 +1,17 @@
|
||||
name: sync-resource
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
branches:
|
||||
- dev
|
||||
paths:
|
||||
- "resource/**"
|
||||
- ".github/workflows/sync-resource.yml"
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
sync-reource:
|
||||
sync-resource:
|
||||
if: github.repository_owner == 'MaaAssistantArknights'
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
@@ -21,8 +22,8 @@ jobs:
|
||||
|
||||
- name: Setup Git
|
||||
run: |
|
||||
git config --global user.name "$GITHUB_ACTOR"
|
||||
git config --global user.email "$GITHUB_ACTOR@users.noreply.github.com"
|
||||
git config --global user.name 'github-actions[bot]'
|
||||
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
|
||||
git show -s
|
||||
|
||||
- name: Checkout MaaResource
|
||||
@@ -48,9 +49,3 @@ jobs:
|
||||
git status
|
||||
git commit -m "$commit_msg" || exit 0
|
||||
git push
|
||||
|
||||
- name: Setup resource update
|
||||
env:
|
||||
GH_TOKEN: ${{ secrets.MISTEOWORKFLOW }}
|
||||
run: |
|
||||
gh workflow --repo MaaAssistantArknights/MaaRelease run update-resource.yml
|
||||
|
||||
4
.github/workflows/website-workflow.yml
vendored
@@ -41,9 +41,7 @@ jobs:
|
||||
- name: Setup Node.js environment
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 20
|
||||
cache: pnpm
|
||||
cache-dependency-path: "./website/pnpm-lock.yaml"
|
||||
node-version: 22
|
||||
|
||||
- name: Install dependencies
|
||||
run: pnpm install --frozen-lockfile
|
||||
|
||||
10
.gitignore
vendored
@@ -457,3 +457,13 @@ tools/RoguelikeRecruitmentTool/output
|
||||
|
||||
# MaaDeps
|
||||
/MaaDeps/*
|
||||
|
||||
# ResourceUpdater workflow
|
||||
/original/*
|
||||
|
||||
# Windows Explorer Shits
|
||||
desktop.ini
|
||||
Thumbs.db
|
||||
|
||||
# macOS Finder Shit
|
||||
.DS_Store
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
7521b526ee2a272d267ff9cb60651ab0e012b63f
|
||||
@@ -4,25 +4,26 @@ ci:
|
||||
autofix_prs: true
|
||||
repos:
|
||||
- repo: https://github.com/shssoichiro/oxipng
|
||||
rev: v9.1.2
|
||||
rev: v9.1.4
|
||||
hooks:
|
||||
- id: oxipng
|
||||
args: ["-q", "-o", "2", "-s", "--ng"]
|
||||
- repo: https://github.com/pre-commit/mirrors-clang-format
|
||||
rev: v17.0.1
|
||||
rev: v20.1.0
|
||||
hooks:
|
||||
- id: clang-format
|
||||
files: ^src/MaaCore/.*
|
||||
args: ["--assume-filename", ".clang-format"]
|
||||
- repo: https://github.com/pre-commit/mirrors-prettier
|
||||
rev: v4.0.0-alpha.8
|
||||
- repo: https://github.com/rbubley/mirrors-prettier
|
||||
rev: v3.5.3
|
||||
hooks:
|
||||
- id: prettier
|
||||
files: ^((\.github/ISSUE_TEMPLATE|docs|resource|src|tools|website)/.*|\.pre-commit-config\.yaml|package-definition\.json)
|
||||
types_or:
|
||||
- yaml
|
||||
- json
|
||||
- repo: https://github.com/DavidAnson/markdownlint-cli2
|
||||
rev: v0.13.0
|
||||
rev: v0.17.2
|
||||
hooks:
|
||||
- id: markdownlint-cli2
|
||||
files: ^docs/.*|^README\.md$
|
||||
|
||||
@@ -6,5 +6,10 @@ src/maa-cli
|
||||
src/MaaMacGui
|
||||
|
||||
website/
|
||||
docs/
|
||||
|
||||
resource/Arknights-Tile-Pos/
|
||||
tools/OptimizeTemplates/optimize_templates.json
|
||||
|
||||
CITATION.cff
|
||||
CHANGELOG.md
|
||||
|
||||
320
3rdparty/include/meojson/common/array.hpp
vendored
@@ -1,3 +1,5 @@
|
||||
// IWYU pragma: private, include <meojson/json.hpp>
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <initializer_list>
|
||||
@@ -37,37 +39,86 @@ public:
|
||||
// explicit basic_array(const basic_value<string_t>& val);
|
||||
// explicit basic_array(basic_value<string_t>&& val);
|
||||
|
||||
template <typename collection_t,
|
||||
std::enable_if_t<_utils::is_collection<collection_t> &&
|
||||
std::is_constructible_v<value_type, _utils::range_value_t<collection_t>>,
|
||||
bool> = true>
|
||||
template <
|
||||
typename collection_t,
|
||||
std::enable_if_t<
|
||||
_utils::is_collection<collection_t>
|
||||
&& std::is_constructible_v<value_type, _utils::range_value_t<collection_t>>,
|
||||
bool> = true>
|
||||
basic_array(collection_t arr)
|
||||
: _array_data(std::make_move_iterator(arr.begin()), std::make_move_iterator(arr.end()))
|
||||
{}
|
||||
template <typename jsonization_t,
|
||||
std::enable_if_t<_utils::has_to_json_in_member<jsonization_t>::value, bool> = true>
|
||||
basic_array(const jsonization_t& value) : basic_array(value.to_json())
|
||||
{}
|
||||
template <typename jsonization_t,
|
||||
std::enable_if_t<_utils::has_to_json_in_templ_spec<jsonization_t>::value, bool> = true>
|
||||
basic_array(const jsonization_t& value) : basic_array(ext::jsonization<jsonization_t>().to_json(value))
|
||||
{}
|
||||
{
|
||||
}
|
||||
|
||||
template <
|
||||
typename fixed_array_t,
|
||||
std::enable_if_t<_utils::is_fixed_array<fixed_array_t>, bool> = true>
|
||||
basic_array(const fixed_array_t& arr)
|
||||
: _array_data(arr.begin(), arr.end())
|
||||
{
|
||||
}
|
||||
|
||||
template <
|
||||
typename jsonization_t,
|
||||
std::enable_if_t<_utils::has_to_json_in_member<jsonization_t>::value, bool> = true>
|
||||
basic_array(const jsonization_t& value)
|
||||
: basic_array(value.to_json())
|
||||
{
|
||||
}
|
||||
|
||||
template <
|
||||
typename jsonization_t,
|
||||
std::enable_if_t<_utils::has_to_json_in_templ_spec<jsonization_t>::value, bool> = true>
|
||||
basic_array(const jsonization_t& value)
|
||||
: basic_array(ext::jsonization<jsonization_t>().to_json(value))
|
||||
{
|
||||
}
|
||||
|
||||
template <typename... elem_ts>
|
||||
basic_array(const std::tuple<elem_ts...>& tup)
|
||||
{
|
||||
foreach_tuple(tup, std::make_index_sequence<std::tuple_size_v<std::tuple<elem_ts...>>>());
|
||||
}
|
||||
template <typename first_t, typename second_t>
|
||||
basic_array(std::pair<first_t, second_t> pair)
|
||||
: _array_data({ std::move(pair.first), std::move(pair.second) })
|
||||
{
|
||||
}
|
||||
|
||||
~basic_array() noexcept = default;
|
||||
|
||||
bool empty() const noexcept { return _array_data.empty(); }
|
||||
|
||||
size_t size() const noexcept { return _array_data.size(); }
|
||||
|
||||
bool contains(size_t pos) const { return pos < _array_data.size(); }
|
||||
|
||||
bool exists(size_t pos) const { return contains(pos); }
|
||||
|
||||
const basic_value<string_t>& at(size_t pos) const;
|
||||
|
||||
string_t dumps(std::optional<size_t> indent = std::nullopt) const { return indent ? format(*indent) : to_string(); }
|
||||
string_t dumps(std::optional<size_t> indent = std::nullopt) const
|
||||
{
|
||||
return indent ? format(*indent) : to_string();
|
||||
}
|
||||
|
||||
string_t to_string() const;
|
||||
|
||||
string_t format(size_t indent = 4) const { return format(indent, 0); }
|
||||
|
||||
template <typename value_t>
|
||||
bool all() const;
|
||||
template <typename value_t, template <typename...> typename collection_t = std::vector>
|
||||
collection_t<value_t> as_collection() const;
|
||||
template <
|
||||
typename value_t,
|
||||
size_t Size,
|
||||
template <typename, size_t> typename fixed_array_t = std::array>
|
||||
fixed_array_t<value_t, Size> as_fixed_array() const;
|
||||
template <typename... elem_ts>
|
||||
std::tuple<elem_ts...> as_tuple() const;
|
||||
template <typename first_t, typename second_t>
|
||||
std::pair<first_t, second_t> as_pair() const;
|
||||
|
||||
// Usage: get(key_1, key_2, ..., default_value);
|
||||
template <typename... key_then_default_value_t>
|
||||
@@ -112,23 +163,54 @@ public:
|
||||
|
||||
basic_array<string_t>& operator=(const basic_array<string_t>&) = default;
|
||||
basic_array<string_t>& operator=(basic_array<string_t>&&) noexcept = default;
|
||||
template <typename value_t, std::enable_if_t<std::is_convertible_v<value_t, basic_array<string_t>>, bool> = true>
|
||||
|
||||
template <
|
||||
typename value_t,
|
||||
std::enable_if_t<std::is_convertible_v<value_t, basic_array<string_t>>, bool> = true>
|
||||
basic_array<string_t>& operator=(value_t rhs)
|
||||
{
|
||||
return *this = basic_array<string_t>(std::move(rhs));
|
||||
}
|
||||
|
||||
bool operator==(const basic_array<string_t>& rhs) const;
|
||||
|
||||
bool operator!=(const basic_array<string_t>& rhs) const { return !(*this == rhs); }
|
||||
|
||||
template <typename value_t, template <typename...> typename collection_t = std::vector,
|
||||
std::enable_if_t<_utils::is_collection<collection_t<value_t>>, bool> = true>
|
||||
template <
|
||||
typename value_t,
|
||||
template <typename...> typename collection_t = std::vector,
|
||||
std::enable_if_t<_utils::is_collection<collection_t<value_t>>, bool> = true>
|
||||
explicit operator collection_t<value_t>() const
|
||||
{
|
||||
return as_collection<value_t, collection_t>();
|
||||
}
|
||||
template <typename jsonization_t,
|
||||
std::enable_if_t<_utils::has_from_json_in_member<jsonization_t, string_t>::value, bool> = true>
|
||||
|
||||
template <
|
||||
typename value_t,
|
||||
size_t Size,
|
||||
template <typename, size_t> typename fixed_array_t = std::array,
|
||||
std::enable_if_t<_utils::is_fixed_array<fixed_array_t<value_t, Size>>, bool> = true>
|
||||
explicit operator fixed_array_t<value_t, Size>() const
|
||||
{
|
||||
return as_fixed_array<value_t, Size, fixed_array_t>();
|
||||
}
|
||||
|
||||
template <typename... elem_ts>
|
||||
explicit operator std::tuple<elem_ts...>() const
|
||||
{
|
||||
return as_tuple<elem_ts...>();
|
||||
}
|
||||
|
||||
template <typename elem1_t, typename elem2_t>
|
||||
explicit operator std::pair<elem1_t, elem2_t>() const
|
||||
{
|
||||
return as_pair<elem1_t, elem2_t>();
|
||||
}
|
||||
|
||||
template <
|
||||
typename jsonization_t,
|
||||
std::enable_if_t<_utils::has_from_json_in_member<jsonization_t, string_t>::value, bool> =
|
||||
true>
|
||||
explicit operator jsonization_t() const
|
||||
{
|
||||
jsonization_t dst {};
|
||||
@@ -137,8 +219,12 @@ public:
|
||||
}
|
||||
return dst;
|
||||
}
|
||||
template <typename jsonization_t,
|
||||
std::enable_if_t<_utils::has_from_json_in_templ_spec<jsonization_t, string_t>::value, bool> = true>
|
||||
|
||||
template <
|
||||
typename jsonization_t,
|
||||
std::enable_if_t<
|
||||
_utils::has_from_json_in_templ_spec<jsonization_t, string_t>::value,
|
||||
bool> = true>
|
||||
explicit operator jsonization_t() const
|
||||
{
|
||||
jsonization_t dst {};
|
||||
@@ -150,13 +236,25 @@ public:
|
||||
|
||||
private:
|
||||
template <typename... key_then_default_value_t, size_t... keys_indexes_t>
|
||||
auto get(std::tuple<key_then_default_value_t...> keys_then_default_value,
|
||||
std::index_sequence<keys_indexes_t...>) const;
|
||||
auto
|
||||
get(std::tuple<key_then_default_value_t...> keys_then_default_value,
|
||||
std::index_sequence<keys_indexes_t...>) const;
|
||||
template <typename value_t, typename... rest_keys_t>
|
||||
auto get_helper(const value_t& default_value, size_t pos, rest_keys_t&&... rest) const;
|
||||
template <typename value_t>
|
||||
auto get_helper(const value_t& default_value, size_t pos) const;
|
||||
|
||||
template <typename tuple_t>
|
||||
tuple_t as_tuple_templ() const;
|
||||
template <size_t index, typename tuple_t>
|
||||
void set_tuple(tuple_t& tup) const;
|
||||
|
||||
template <typename Tuple, std::size_t... Is>
|
||||
void foreach_tuple(const Tuple& t, std::index_sequence<Is...>)
|
||||
{
|
||||
(_array_data.emplace_back(std::get<Is>(t)), ...);
|
||||
}
|
||||
|
||||
string_t format(size_t indent, size_t indent_times) const;
|
||||
|
||||
private:
|
||||
@@ -164,15 +262,20 @@ private:
|
||||
};
|
||||
|
||||
template <typename string_t>
|
||||
inline basic_array<string_t>::basic_array(std::initializer_list<value_type> init_list) : _array_data(init_list)
|
||||
{}
|
||||
inline basic_array<string_t>::basic_array(std::initializer_list<value_type> init_list)
|
||||
: _array_data(init_list)
|
||||
{
|
||||
}
|
||||
|
||||
template <typename string_t>
|
||||
inline basic_array<string_t>::basic_array(typename raw_array::size_type size) : _array_data(size)
|
||||
{}
|
||||
inline basic_array<string_t>::basic_array(typename raw_array::size_type size)
|
||||
: _array_data(size)
|
||||
{
|
||||
}
|
||||
|
||||
// template <typename string_t>
|
||||
// inline basic_array<string_t>::basic_array(const basic_value<string_t>& val) : basic_array<string_t>(val.as_array())
|
||||
// inline basic_array<string_t>::basic_array(const basic_value<string_t>& val) :
|
||||
// basic_array<string_t>(val.as_array())
|
||||
//{}
|
||||
//
|
||||
// template <typename string_t>
|
||||
@@ -202,8 +305,9 @@ template <typename string_t>
|
||||
template <typename... args_t>
|
||||
inline decltype(auto) basic_array<string_t>::emplace_back(args_t&&... args)
|
||||
{
|
||||
static_assert(std::is_constructible_v<value_type, args_t...>,
|
||||
"Parameter can't be used to construct a raw_array::value_type");
|
||||
static_assert(
|
||||
std::is_constructible_v<value_type, args_t...>,
|
||||
"Parameter can't be used to construct a raw_array::value_type");
|
||||
return _array_data.emplace_back(std::forward<args_t>(args)...);
|
||||
}
|
||||
|
||||
@@ -266,18 +370,18 @@ inline bool basic_array<string_t>::all() const
|
||||
|
||||
namespace _as_collection_helper
|
||||
{
|
||||
template <typename T>
|
||||
class has_emplace_back
|
||||
{
|
||||
template <typename U>
|
||||
static auto test(int) -> decltype(std::declval<U>().emplace_back(), std::true_type());
|
||||
template <typename T>
|
||||
class has_emplace_back
|
||||
{
|
||||
template <typename U>
|
||||
static auto test(int) -> decltype(std::declval<U>().emplace_back(), std::true_type());
|
||||
|
||||
template <typename U>
|
||||
static std::false_type test(...);
|
||||
template <typename U>
|
||||
static std::false_type test(...);
|
||||
|
||||
public:
|
||||
static constexpr bool value = decltype(test<T>(0))::value;
|
||||
};
|
||||
public:
|
||||
static constexpr bool value = decltype(test<T>(0))::value;
|
||||
};
|
||||
}
|
||||
|
||||
template <typename string_t>
|
||||
@@ -298,31 +402,94 @@ inline collection_t<value_t> basic_array<string_t>::as_collection() const
|
||||
return result;
|
||||
}
|
||||
|
||||
template <typename string_t>
|
||||
template <typename value_t, size_t Size, template <typename, size_t> typename fixed_array_t>
|
||||
inline fixed_array_t<value_t, Size> basic_array<string_t>::as_fixed_array() const
|
||||
{
|
||||
if (size() != Size) {
|
||||
throw exception("Wrong array size");
|
||||
}
|
||||
|
||||
fixed_array_t<value_t, Size> result;
|
||||
for (size_t i = 0; i < Size; ++i) {
|
||||
result.at(i) = _array_data.at(i).template as<value_t>();
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
template <typename string_t>
|
||||
template <size_t index, typename tuple_t>
|
||||
inline void basic_array<string_t>::set_tuple(tuple_t& tup) const
|
||||
{
|
||||
using elem_t = std::tuple_element_t<index, tuple_t>;
|
||||
|
||||
if constexpr (index > 0) {
|
||||
set_tuple<index - 1>(tup);
|
||||
}
|
||||
|
||||
std::get<index>(tup) = static_cast<elem_t>(at(index));
|
||||
}
|
||||
|
||||
template <typename string_t>
|
||||
template <typename tuple_t>
|
||||
inline tuple_t basic_array<string_t>::as_tuple_templ() const
|
||||
{
|
||||
constexpr size_t tuple_size = std::tuple_size_v<tuple_t>;
|
||||
|
||||
if (size() != tuple_size) {
|
||||
throw exception("Wrong array size");
|
||||
}
|
||||
|
||||
tuple_t result;
|
||||
set_tuple<tuple_size - 1>(result);
|
||||
return result;
|
||||
}
|
||||
|
||||
template <typename string_t>
|
||||
template <typename... elem_ts>
|
||||
inline std::tuple<elem_ts...> basic_array<string_t>::as_tuple() const
|
||||
{
|
||||
return as_tuple_templ<std::tuple<elem_ts...>>();
|
||||
}
|
||||
|
||||
template <typename string_t>
|
||||
template <typename first_t, typename second_t>
|
||||
inline std::pair<first_t, second_t> basic_array<string_t>::as_pair() const
|
||||
{
|
||||
return as_tuple_templ<std::pair<first_t, second_t>>();
|
||||
}
|
||||
|
||||
template <typename string_t>
|
||||
template <typename... key_then_default_value_t>
|
||||
inline auto basic_array<string_t>::get(key_then_default_value_t&&... keys_then_default_value) const
|
||||
{
|
||||
return get(std::forward_as_tuple(keys_then_default_value...),
|
||||
std::make_index_sequence<sizeof...(keys_then_default_value) - 1> {});
|
||||
return get(
|
||||
std::forward_as_tuple(keys_then_default_value...),
|
||||
std::make_index_sequence<sizeof...(keys_then_default_value) - 1> {});
|
||||
}
|
||||
|
||||
template <typename string_t>
|
||||
template <typename... key_then_default_value_t, size_t... keys_indexes_t>
|
||||
inline auto basic_array<string_t>::get(std::tuple<key_then_default_value_t...> keys_then_default_value,
|
||||
std::index_sequence<keys_indexes_t...>) const
|
||||
inline auto basic_array<string_t>::get(
|
||||
std::tuple<key_then_default_value_t...> keys_then_default_value,
|
||||
std::index_sequence<keys_indexes_t...>) const
|
||||
{
|
||||
constexpr unsigned long default_value_index = sizeof...(key_then_default_value_t) - 1;
|
||||
return get_helper(std::get<default_value_index>(keys_then_default_value),
|
||||
std::get<keys_indexes_t>(keys_then_default_value)...);
|
||||
return get_helper(
|
||||
std::get<default_value_index>(keys_then_default_value),
|
||||
std::get<keys_indexes_t>(keys_then_default_value)...);
|
||||
}
|
||||
|
||||
template <typename string_t>
|
||||
template <typename value_t, typename... rest_keys_t>
|
||||
inline auto basic_array<string_t>::get_helper(const value_t& default_value, size_t pos, rest_keys_t&&... rest) const
|
||||
inline auto basic_array<string_t>::get_helper(
|
||||
const value_t& default_value,
|
||||
size_t pos,
|
||||
rest_keys_t&&... rest) const
|
||||
{
|
||||
constexpr bool is_json = std::is_same_v<basic_value<string_t>, value_t> ||
|
||||
std::is_same_v<basic_array<string_t>, value_t> ||
|
||||
std::is_same_v<basic_object<string_t>, value_t>;
|
||||
constexpr bool is_json = std::is_same_v<basic_value<string_t>, value_t>
|
||||
|| std::is_same_v<basic_array<string_t>, value_t>
|
||||
|| std::is_same_v<basic_object<string_t>, value_t>;
|
||||
constexpr bool is_string = std::is_constructible_v<string_t, value_t> && !is_json;
|
||||
|
||||
if (!contains(pos)) {
|
||||
@@ -341,9 +508,9 @@ template <typename string_t>
|
||||
template <typename value_t>
|
||||
inline auto basic_array<string_t>::get_helper(const value_t& default_value, size_t pos) const
|
||||
{
|
||||
constexpr bool is_json = std::is_same_v<basic_value<string_t>, value_t> ||
|
||||
std::is_same_v<basic_array<string_t>, value_t> ||
|
||||
std::is_same_v<basic_object<string_t>, value_t>;
|
||||
constexpr bool is_json = std::is_same_v<basic_value<string_t>, value_t>
|
||||
|| std::is_same_v<basic_array<string_t>, value_t>
|
||||
|| std::is_same_v<basic_object<string_t>, value_t>;
|
||||
constexpr bool is_string = std::is_constructible_v<string_t, value_t> && !is_json;
|
||||
|
||||
if (!contains(pos)) {
|
||||
@@ -382,7 +549,8 @@ inline std::optional<value_t> basic_array<string_t>::find(size_t pos) const
|
||||
return std::nullopt;
|
||||
}
|
||||
const auto& val = _array_data.at(pos);
|
||||
return val.template is<value_t>() ? std::optional<value_t>(val.template as<value_t>()) : std::nullopt;
|
||||
return val.template is<value_t>() ? std::optional<value_t>(val.template as<value_t>())
|
||||
: std::nullopt;
|
||||
}
|
||||
|
||||
template <typename string_t>
|
||||
@@ -434,25 +602,29 @@ inline typename basic_array<string_t>::reverse_iterator basic_array<string_t>::r
|
||||
}
|
||||
|
||||
template <typename string_t>
|
||||
inline typename basic_array<string_t>::const_reverse_iterator basic_array<string_t>::rbegin() const noexcept
|
||||
inline typename basic_array<string_t>::const_reverse_iterator
|
||||
basic_array<string_t>::rbegin() const noexcept
|
||||
{
|
||||
return _array_data.rbegin();
|
||||
}
|
||||
|
||||
template <typename string_t>
|
||||
inline typename basic_array<string_t>::const_reverse_iterator basic_array<string_t>::rend() const noexcept
|
||||
inline typename basic_array<string_t>::const_reverse_iterator
|
||||
basic_array<string_t>::rend() const noexcept
|
||||
{
|
||||
return _array_data.rend();
|
||||
}
|
||||
|
||||
template <typename string_t>
|
||||
inline typename basic_array<string_t>::const_reverse_iterator basic_array<string_t>::crbegin() const noexcept
|
||||
inline typename basic_array<string_t>::const_reverse_iterator
|
||||
basic_array<string_t>::crbegin() const noexcept
|
||||
{
|
||||
return _array_data.crbegin();
|
||||
}
|
||||
|
||||
template <typename string_t>
|
||||
inline typename basic_array<string_t>::const_reverse_iterator basic_array<string_t>::crend() const noexcept
|
||||
inline typename basic_array<string_t>::const_reverse_iterator
|
||||
basic_array<string_t>::crend() const noexcept
|
||||
{
|
||||
return _array_data.crend();
|
||||
}
|
||||
@@ -470,7 +642,8 @@ inline const basic_value<string_t>& basic_array<string_t>::operator[](size_t pos
|
||||
}
|
||||
|
||||
template <typename string_t>
|
||||
inline basic_array<string_t> basic_array<string_t>::operator+(const basic_array<string_t>& rhs) const&
|
||||
inline basic_array<string_t>
|
||||
basic_array<string_t>::operator+(const basic_array<string_t>& rhs) const&
|
||||
{
|
||||
basic_array<string_t> temp = *this;
|
||||
temp._array_data.insert(_array_data.end(), rhs.begin(), rhs.end());
|
||||
@@ -481,8 +654,10 @@ template <typename string_t>
|
||||
inline basic_array<string_t> basic_array<string_t>::operator+(basic_array<string_t>&& rhs) const&
|
||||
{
|
||||
basic_array<string_t> temp = *this;
|
||||
temp._array_data.insert(_array_data.end(), std::make_move_iterator(rhs.begin()),
|
||||
std::make_move_iterator(rhs.end()));
|
||||
temp._array_data.insert(
|
||||
_array_data.end(),
|
||||
std::make_move_iterator(rhs.begin()),
|
||||
std::make_move_iterator(rhs.end()));
|
||||
return temp;
|
||||
}
|
||||
|
||||
@@ -496,7 +671,10 @@ inline basic_array<string_t> basic_array<string_t>::operator+(const basic_array<
|
||||
template <typename string_t>
|
||||
inline basic_array<string_t> basic_array<string_t>::operator+(basic_array<string_t>&& rhs) &&
|
||||
{
|
||||
_array_data.insert(_array_data.end(), std::make_move_iterator(rhs.begin()), std::make_move_iterator(rhs.end()));
|
||||
_array_data.insert(
|
||||
_array_data.end(),
|
||||
std::make_move_iterator(rhs.begin()),
|
||||
std::make_move_iterator(rhs.end()));
|
||||
return std::move(*this);
|
||||
}
|
||||
|
||||
@@ -510,7 +688,10 @@ inline basic_array<string_t>& basic_array<string_t>::operator+=(const basic_arra
|
||||
template <typename string_t>
|
||||
inline basic_array<string_t>& basic_array<string_t>::operator+=(basic_array<string_t>&& rhs)
|
||||
{
|
||||
_array_data.insert(_array_data.end(), std::make_move_iterator(rhs.begin()), std::make_move_iterator(rhs.end()));
|
||||
_array_data.insert(
|
||||
_array_data.end(),
|
||||
std::make_move_iterator(rhs.begin()),
|
||||
std::make_move_iterator(rhs.end()));
|
||||
return *this;
|
||||
}
|
||||
|
||||
@@ -520,11 +701,14 @@ inline bool basic_array<string_t>::operator==(const basic_array<string_t>& rhs)
|
||||
return _array_data == rhs._array_data;
|
||||
}
|
||||
|
||||
template <typename ostream_t, typename string_t,
|
||||
typename std_ostream_t =
|
||||
std::basic_ostream<typename string_t::value_type, std::char_traits<typename string_t::value_type>>,
|
||||
typename enable_t =
|
||||
std::enable_if_t<std::is_same_v<std_ostream_t, ostream_t> || std::is_base_of_v<std_ostream_t, ostream_t>>>
|
||||
template <
|
||||
typename ostream_t,
|
||||
typename string_t,
|
||||
typename std_ostream_t = std::basic_ostream<
|
||||
typename string_t::value_type,
|
||||
std::char_traits<typename string_t::value_type>>,
|
||||
typename enable_t = std::enable_if_t<
|
||||
std::is_same_v<std_ostream_t, ostream_t> || std::is_base_of_v<std_ostream_t, ostream_t>>>
|
||||
ostream_t& operator<<(ostream_t& out, const basic_array<string_t>& arr)
|
||||
{
|
||||
out << arr.format();
|
||||
|
||||
13
3rdparty/include/meojson/common/exception.hpp
vendored
@@ -1,3 +1,5 @@
|
||||
// IWYU pragma: private, include <meojson/json.hpp>
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <exception>
|
||||
@@ -9,7 +11,11 @@ class exception : public std::exception
|
||||
{
|
||||
public:
|
||||
exception() = default;
|
||||
exception(const std::string& msg) : _what(msg) {}
|
||||
|
||||
exception(const std::string& msg)
|
||||
: _what(msg)
|
||||
{
|
||||
}
|
||||
|
||||
exception(const exception&) = default;
|
||||
exception& operator=(const exception&) = default;
|
||||
@@ -18,7 +24,10 @@ public:
|
||||
|
||||
virtual ~exception() noexcept override = default;
|
||||
|
||||
virtual const char* what() const noexcept override { return _what.empty() ? "Unknown exception" : _what.c_str(); }
|
||||
virtual const char* what() const noexcept override
|
||||
{
|
||||
return _what.empty() ? "Unknown exception" : _what.c_str();
|
||||
}
|
||||
|
||||
protected:
|
||||
std::string _what;
|
||||
|
||||
174
3rdparty/include/meojson/common/object.hpp
vendored
@@ -1,3 +1,5 @@
|
||||
// IWYU pragma: private, include <meojson/json.hpp>
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <initializer_list>
|
||||
@@ -36,31 +38,54 @@ public:
|
||||
// explicit basic_object(const basic_value<string_t>& val);
|
||||
// explicit basic_object(basic_value<string_t>&& val);
|
||||
|
||||
template <typename map_t, std::enable_if_t<_utils::is_map<map_t> &&
|
||||
std::is_constructible_v<value_type, _utils::range_value_t<map_t>>,
|
||||
bool> = true>
|
||||
basic_object(map_t map) : _object_data(std::make_move_iterator(map.begin()), std::make_move_iterator(map.end()))
|
||||
{}
|
||||
template <typename jsonization_t,
|
||||
std::enable_if_t<_utils::has_to_json_in_member<jsonization_t>::value, bool> = true>
|
||||
basic_object(const jsonization_t& value) : basic_object(value.to_json())
|
||||
{}
|
||||
template <typename jsonization_t,
|
||||
std::enable_if_t<_utils::has_to_json_in_templ_spec<jsonization_t>::value, bool> = true>
|
||||
basic_object(const jsonization_t& value) : basic_object(ext::jsonization<jsonization_t>().to_json(value))
|
||||
{}
|
||||
template <
|
||||
typename map_t,
|
||||
std::enable_if_t<
|
||||
_utils::is_map<map_t>
|
||||
&& std::is_constructible_v<value_type, _utils::range_value_t<map_t>>,
|
||||
bool> = true>
|
||||
basic_object(map_t map)
|
||||
: _object_data(std::make_move_iterator(map.begin()), std::make_move_iterator(map.end()))
|
||||
{
|
||||
}
|
||||
|
||||
template <
|
||||
typename jsonization_t,
|
||||
std::enable_if_t<_utils::has_to_json_in_member<jsonization_t>::value, bool> = true>
|
||||
basic_object(const jsonization_t& value)
|
||||
: basic_object(value.to_json())
|
||||
{
|
||||
}
|
||||
|
||||
template <
|
||||
typename jsonization_t,
|
||||
std::enable_if_t<_utils::has_to_json_in_templ_spec<jsonization_t>::value, bool> = true>
|
||||
basic_object(const jsonization_t& value)
|
||||
: basic_object(ext::jsonization<jsonization_t>().to_json(value))
|
||||
{
|
||||
}
|
||||
|
||||
~basic_object() = default;
|
||||
|
||||
bool empty() const noexcept { return _object_data.empty(); }
|
||||
|
||||
size_t size() const noexcept { return _object_data.size(); }
|
||||
|
||||
bool contains(const string_t& key) const;
|
||||
|
||||
bool exists(const string_t& key) const { return contains(key); }
|
||||
|
||||
const basic_value<string_t>& at(const string_t& key) const;
|
||||
|
||||
string_t dumps(std::optional<size_t> indent = std::nullopt) const { return indent ? format(*indent) : to_string(); }
|
||||
string_t dumps(std::optional<size_t> indent = std::nullopt) const
|
||||
{
|
||||
return indent ? format(*indent) : to_string();
|
||||
}
|
||||
|
||||
string_t to_string() const;
|
||||
|
||||
string_t format(size_t indent = 4) const { return format(indent, 0); }
|
||||
|
||||
template <typename value_t>
|
||||
bool all() const;
|
||||
template <typename value_t, template <typename...> typename map_t = std::map>
|
||||
@@ -102,23 +127,32 @@ public:
|
||||
|
||||
basic_object<string_t>& operator=(const basic_object<string_t>&) = default;
|
||||
basic_object<string_t>& operator=(basic_object<string_t>&&) = default;
|
||||
template <typename value_t, std::enable_if_t<std::is_convertible_v<value_t, basic_object<string_t>>, bool> = true>
|
||||
|
||||
template <
|
||||
typename value_t,
|
||||
std::enable_if_t<std::is_convertible_v<value_t, basic_object<string_t>>, bool> = true>
|
||||
basic_object<string_t>& operator=(value_t rhs)
|
||||
{
|
||||
return *this = basic_object<string_t>(std::move(rhs));
|
||||
}
|
||||
|
||||
bool operator==(const basic_object<string_t>& rhs) const;
|
||||
|
||||
bool operator!=(const basic_object<string_t>& rhs) const { return !(*this == rhs); }
|
||||
|
||||
template <typename value_t, template <typename...> typename map_t = std::map,
|
||||
std::enable_if_t<_utils::is_map<map_t<string_t, value_t>>, bool> = true>
|
||||
template <
|
||||
typename value_t,
|
||||
template <typename...> typename map_t = std::map,
|
||||
std::enable_if_t<_utils::is_map<map_t<string_t, value_t>>, bool> = true>
|
||||
explicit operator map_t<string_t, value_t>() const
|
||||
{
|
||||
return as_map<value_t, map_t>();
|
||||
}
|
||||
template <typename jsonization_t,
|
||||
std::enable_if_t<_utils::has_from_json_in_member<jsonization_t, string_t>::value, bool> = true>
|
||||
|
||||
template <
|
||||
typename jsonization_t,
|
||||
std::enable_if_t<_utils::has_from_json_in_member<jsonization_t, string_t>::value, bool> =
|
||||
true>
|
||||
explicit operator jsonization_t() const
|
||||
{
|
||||
jsonization_t dst {};
|
||||
@@ -127,8 +161,12 @@ public:
|
||||
}
|
||||
return dst;
|
||||
}
|
||||
template <typename jsonization_t,
|
||||
std::enable_if_t<_utils::has_from_json_in_templ_spec<jsonization_t, string_t>::value, bool> = true>
|
||||
|
||||
template <
|
||||
typename jsonization_t,
|
||||
std::enable_if_t<
|
||||
_utils::has_from_json_in_templ_spec<jsonization_t, string_t>::value,
|
||||
bool> = true>
|
||||
explicit operator jsonization_t() const
|
||||
{
|
||||
jsonization_t dst {};
|
||||
@@ -140,8 +178,9 @@ public:
|
||||
|
||||
private:
|
||||
template <typename... key_then_default_value_t, size_t... keys_indexes_t>
|
||||
auto get(std::tuple<key_then_default_value_t...> keys_then_default_value,
|
||||
std::index_sequence<keys_indexes_t...>) const;
|
||||
auto
|
||||
get(std::tuple<key_then_default_value_t...> keys_then_default_value,
|
||||
std::index_sequence<keys_indexes_t...>) const;
|
||||
template <typename value_t, typename... rest_keys_t>
|
||||
auto get_helper(const value_t& default_value, const string_t& key, rest_keys_t&&... rest) const;
|
||||
template <typename value_t>
|
||||
@@ -155,8 +194,11 @@ private:
|
||||
|
||||
template <typename string_t>
|
||||
inline basic_object<string_t>::basic_object(std::initializer_list<value_type> init_list)
|
||||
: _object_data(std::make_move_iterator(init_list.begin()), std::make_move_iterator(init_list.end()))
|
||||
{}
|
||||
: _object_data(
|
||||
std::make_move_iterator(init_list.begin()),
|
||||
std::make_move_iterator(init_list.end()))
|
||||
{
|
||||
}
|
||||
|
||||
// template <typename string_t>
|
||||
// inline basic_object<string_t>::basic_object(const basic_value<string_t>& val) :
|
||||
@@ -202,9 +244,10 @@ template <typename string_t>
|
||||
template <typename... args_t>
|
||||
inline decltype(auto) basic_object<string_t>::emplace(args_t&&... args)
|
||||
{
|
||||
static_assert(std::is_constructible_v<value_type, args_t...>,
|
||||
"Parameter can't be used to construct a raw_object::value_type");
|
||||
return _object_data.emplace(std::forward<args_t>(args)...);
|
||||
static_assert(
|
||||
std::is_constructible_v<value_type, args_t...>,
|
||||
"Parameter can't be used to construct a raw_object::value_type");
|
||||
return _object_data.insert_or_assign(std::forward<args_t>(args)...);
|
||||
}
|
||||
|
||||
template <typename string_t>
|
||||
@@ -220,7 +263,8 @@ inline string_t basic_object<string_t>::to_string() const
|
||||
string_t str { '{' };
|
||||
for (auto iter = _object_data.cbegin(); iter != _object_data.cend();) {
|
||||
const auto& [key, val] = *iter;
|
||||
str += char_t('"') + _utils::unescape_string(key) + string_t { '\"', ':' } + val.to_string();
|
||||
str +=
|
||||
char_t('"') + _utils::unescape_string(key) + string_t { '\"', ':' } + val.to_string();
|
||||
if (++iter != _object_data.cend()) {
|
||||
str += ',';
|
||||
}
|
||||
@@ -238,8 +282,8 @@ inline string_t basic_object<string_t>::format(size_t indent, size_t indent_time
|
||||
string_t str { '{', '\n' };
|
||||
for (auto iter = _object_data.cbegin(); iter != _object_data.cend();) {
|
||||
const auto& [key, val] = *iter;
|
||||
str += body_indent + char_t('"') + _utils::unescape_string(key) + string_t { '\"', ':', ' ' } +
|
||||
val.format(indent, indent_times + 1);
|
||||
str += body_indent + char_t('"') + _utils::unescape_string(key)
|
||||
+ string_t { '\"', ':', ' ' } + val.format(indent, indent_times + 1);
|
||||
if (++iter != _object_data.cend()) {
|
||||
str += ',';
|
||||
}
|
||||
@@ -276,28 +320,33 @@ template <typename string_t>
|
||||
template <typename... key_then_default_value_t>
|
||||
inline auto basic_object<string_t>::get(key_then_default_value_t&&... keys_then_default_value) const
|
||||
{
|
||||
return get(std::forward_as_tuple(keys_then_default_value...),
|
||||
std::make_index_sequence<sizeof...(keys_then_default_value) - 1> {});
|
||||
return get(
|
||||
std::forward_as_tuple(keys_then_default_value...),
|
||||
std::make_index_sequence<sizeof...(keys_then_default_value) - 1> {});
|
||||
}
|
||||
|
||||
template <typename string_t>
|
||||
template <typename... key_then_default_value_t, size_t... keys_indexes_t>
|
||||
inline auto basic_object<string_t>::get(std::tuple<key_then_default_value_t...> keys_then_default_value,
|
||||
std::index_sequence<keys_indexes_t...>) const
|
||||
inline auto basic_object<string_t>::get(
|
||||
std::tuple<key_then_default_value_t...> keys_then_default_value,
|
||||
std::index_sequence<keys_indexes_t...>) const
|
||||
{
|
||||
constexpr unsigned long default_value_index = sizeof...(key_then_default_value_t) - 1;
|
||||
return get_helper(std::get<default_value_index>(keys_then_default_value),
|
||||
std::get<keys_indexes_t>(keys_then_default_value)...);
|
||||
return get_helper(
|
||||
std::get<default_value_index>(keys_then_default_value),
|
||||
std::get<keys_indexes_t>(keys_then_default_value)...);
|
||||
}
|
||||
|
||||
template <typename string_t>
|
||||
template <typename value_t, typename... rest_keys_t>
|
||||
inline auto basic_object<string_t>::get_helper(const value_t& default_value, const string_t& key,
|
||||
rest_keys_t&&... rest) const
|
||||
inline auto basic_object<string_t>::get_helper(
|
||||
const value_t& default_value,
|
||||
const string_t& key,
|
||||
rest_keys_t&&... rest) const
|
||||
{
|
||||
constexpr bool is_json = std::is_same_v<basic_value<string_t>, value_t> ||
|
||||
std::is_same_v<basic_array<string_t>, value_t> ||
|
||||
std::is_same_v<basic_object<string_t>, value_t>;
|
||||
constexpr bool is_json = std::is_same_v<basic_value<string_t>, value_t>
|
||||
|| std::is_same_v<basic_array<string_t>, value_t>
|
||||
|| std::is_same_v<basic_object<string_t>, value_t>;
|
||||
constexpr bool is_string = std::is_constructible_v<string_t, value_t> && !is_json;
|
||||
|
||||
if (!contains(key)) {
|
||||
@@ -314,11 +363,12 @@ inline auto basic_object<string_t>::get_helper(const value_t& default_value, con
|
||||
|
||||
template <typename string_t>
|
||||
template <typename value_t>
|
||||
inline auto basic_object<string_t>::get_helper(const value_t& default_value, const string_t& key) const
|
||||
inline auto
|
||||
basic_object<string_t>::get_helper(const value_t& default_value, const string_t& key) const
|
||||
{
|
||||
constexpr bool is_json = std::is_same_v<basic_value<string_t>, value_t> ||
|
||||
std::is_same_v<basic_array<string_t>, value_t> ||
|
||||
std::is_same_v<basic_object<string_t>, value_t>;
|
||||
constexpr bool is_json = std::is_same_v<basic_value<string_t>, value_t>
|
||||
|| std::is_same_v<basic_array<string_t>, value_t>
|
||||
|| std::is_same_v<basic_object<string_t>, value_t>;
|
||||
constexpr bool is_string = std::is_constructible_v<string_t, value_t> && !is_json;
|
||||
|
||||
if (!contains(key)) {
|
||||
@@ -358,7 +408,8 @@ inline std::optional<value_t> basic_object<string_t>::find(const string_t& key)
|
||||
return std::nullopt;
|
||||
}
|
||||
const auto& val = iter->second;
|
||||
return val.template is<value_t>() ? std::optional<value_t>(val.template as<value_t>()) : std::nullopt;
|
||||
return val.template is<value_t>() ? std::optional<value_t>(val.template as<value_t>())
|
||||
: std::nullopt;
|
||||
}
|
||||
|
||||
template <typename string_t>
|
||||
@@ -374,7 +425,8 @@ inline typename basic_object<string_t>::iterator basic_object<string_t>::end() n
|
||||
}
|
||||
|
||||
template <typename string_t>
|
||||
inline typename basic_object<string_t>::const_iterator basic_object<string_t>::begin() const noexcept
|
||||
inline typename basic_object<string_t>::const_iterator
|
||||
basic_object<string_t>::begin() const noexcept
|
||||
{
|
||||
return _object_data.begin();
|
||||
}
|
||||
@@ -386,7 +438,8 @@ inline typename basic_object<string_t>::const_iterator basic_object<string_t>::e
|
||||
}
|
||||
|
||||
template <typename string_t>
|
||||
inline typename basic_object<string_t>::const_iterator basic_object<string_t>::cbegin() const noexcept
|
||||
inline typename basic_object<string_t>::const_iterator
|
||||
basic_object<string_t>::cbegin() const noexcept
|
||||
{
|
||||
return _object_data.cbegin();
|
||||
}
|
||||
@@ -410,7 +463,8 @@ inline basic_value<string_t>& basic_object<string_t>::operator[](string_t&& key)
|
||||
}
|
||||
|
||||
template <typename string_t>
|
||||
inline basic_object<string_t> basic_object<string_t>::operator|(const basic_object<string_t>& rhs) const&
|
||||
inline basic_object<string_t>
|
||||
basic_object<string_t>::operator|(const basic_object<string_t>& rhs) const&
|
||||
{
|
||||
basic_object<string_t> temp = *this;
|
||||
temp._object_data.insert(rhs.begin(), rhs.end());
|
||||
@@ -422,12 +476,15 @@ inline basic_object<string_t> basic_object<string_t>::operator|(basic_object<str
|
||||
{
|
||||
basic_object<string_t> temp = *this;
|
||||
// temp._object_data.merge(std::move(rhs._object_data));
|
||||
temp._object_data.insert(std::make_move_iterator(rhs.begin()), std::make_move_iterator(rhs.end()));
|
||||
temp._object_data.insert(
|
||||
std::make_move_iterator(rhs.begin()),
|
||||
std::make_move_iterator(rhs.end()));
|
||||
return temp;
|
||||
}
|
||||
|
||||
template <typename string_t>
|
||||
inline basic_object<string_t> basic_object<string_t>::operator|(const basic_object<string_t>& rhs) &&
|
||||
inline basic_object<string_t>
|
||||
basic_object<string_t>::operator|(const basic_object<string_t>& rhs) &&
|
||||
{
|
||||
_object_data.insert(rhs.begin(), rhs.end());
|
||||
return std::move(*this);
|
||||
@@ -461,11 +518,14 @@ inline bool basic_object<string_t>::operator==(const basic_object<string_t>& rhs
|
||||
return _object_data == rhs._object_data;
|
||||
}
|
||||
|
||||
template <typename ostream_t, typename string_t,
|
||||
typename std_ostream_t =
|
||||
std::basic_ostream<typename string_t::value_type, std::char_traits<typename string_t::value_type>>,
|
||||
typename enable_t =
|
||||
std::enable_if_t<std::is_same_v<std_ostream_t, ostream_t> || std::is_base_of_v<std_ostream_t, ostream_t>>>
|
||||
template <
|
||||
typename ostream_t,
|
||||
typename string_t,
|
||||
typename std_ostream_t = std::basic_ostream<
|
||||
typename string_t::value_type,
|
||||
std::char_traits<typename string_t::value_type>>,
|
||||
typename enable_t = std::enable_if_t<
|
||||
std::is_same_v<std_ostream_t, ostream_t> || std::is_base_of_v<std_ostream_t, ostream_t>>>
|
||||
ostream_t& operator<<(ostream_t& out, const basic_object<string_t>& obj)
|
||||
{
|
||||
out << obj.format();
|
||||
|
||||
179
3rdparty/include/meojson/common/serialization.hpp
vendored
@@ -1,3 +1,5 @@
|
||||
// IWYU pragma: private, include <meojson/json.hpp>
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <type_traits>
|
||||
@@ -9,96 +11,101 @@ namespace json
|
||||
{
|
||||
namespace _serialization_helper
|
||||
{
|
||||
template <typename in_t, typename serializer_t>
|
||||
class is_serializable
|
||||
{
|
||||
template <typename U>
|
||||
static auto test(int) -> decltype(std::declval<serializer_t>()(std::declval<U>()), std::true_type());
|
||||
template <typename in_t, typename serializer_t>
|
||||
class is_serializable
|
||||
{
|
||||
template <typename U>
|
||||
static auto test(int)
|
||||
-> decltype(std::declval<serializer_t>()(std::declval<U>()), std::true_type());
|
||||
|
||||
template <typename U>
|
||||
static std::false_type test(...);
|
||||
template <typename U>
|
||||
static std::false_type test(...);
|
||||
|
||||
public:
|
||||
static constexpr bool value = decltype(test<in_t>(0))::value;
|
||||
};
|
||||
public:
|
||||
static constexpr bool value = decltype(test<in_t>(0))::value;
|
||||
};
|
||||
|
||||
struct empty_serializer
|
||||
{
|
||||
// sample:
|
||||
// json::value operator()(const type_1&) const { return ...; }
|
||||
// json::value operator()(const type_2&) const { return ...; }
|
||||
// json::value operator()(const type_3&) const { return ...; }
|
||||
};
|
||||
struct empty_serializer
|
||||
{
|
||||
// sample:
|
||||
// json::value operator()(const type_1&) const { return ...; }
|
||||
// json::value operator()(const type_2&) const { return ...; }
|
||||
// json::value operator()(const type_3&) const { return ...; }
|
||||
};
|
||||
|
||||
template <typename T>
|
||||
void unable_to_serialize()
|
||||
{
|
||||
static_assert(!sizeof(T), "Unable to serialize T. "
|
||||
template <typename T>
|
||||
void unable_to_serialize()
|
||||
{
|
||||
static_assert(
|
||||
!sizeof(T),
|
||||
"Unable to serialize T. "
|
||||
#ifdef _MSC_VER
|
||||
"See T below: " __FUNCSIG__
|
||||
"See T below: " __FUNCSIG__
|
||||
#else
|
||||
// "See T below: " __PRETTY_FUNCTION__
|
||||
// "See T below: " __PRETTY_FUNCTION__
|
||||
|
||||
#endif
|
||||
);
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
namespace _serialization_helper
|
||||
{
|
||||
template <typename out_t, typename deserializer_t, typename string_t = default_string_t>
|
||||
class is_deserializable
|
||||
{
|
||||
template <typename U>
|
||||
static auto test(int)
|
||||
-> decltype(std::declval<deserializer_t>()(std::declval<basic_value<string_t>>(), std::declval<U&>()),
|
||||
std::true_type());
|
||||
template <typename out_t, typename deserializer_t, typename string_t = default_string_t>
|
||||
class is_deserializable
|
||||
{
|
||||
template <typename U>
|
||||
static auto test(int)
|
||||
-> decltype(std::declval<deserializer_t>()(std::declval<basic_value<string_t>>(), std::declval<U&>()), std::true_type());
|
||||
|
||||
template <typename U>
|
||||
static std::false_type test(...);
|
||||
template <typename U>
|
||||
static std::false_type test(...);
|
||||
|
||||
public:
|
||||
static constexpr bool value = decltype(test<out_t>(0))::value;
|
||||
};
|
||||
public:
|
||||
static constexpr bool value = decltype(test<out_t>(0))::value;
|
||||
};
|
||||
|
||||
struct empty_deserializer
|
||||
{
|
||||
// sample:
|
||||
// bool operator()(const json::value&, type_1&) const { return ...; }
|
||||
// bool operator()(const json::value&, type_2&) const { return ...; }
|
||||
// bool operator()(const json::value&, type_3&) const { return ...; }
|
||||
};
|
||||
struct empty_deserializer
|
||||
{
|
||||
// sample:
|
||||
// bool operator()(const json::value&, type_1&) const { return ...; }
|
||||
// bool operator()(const json::value&, type_2&) const { return ...; }
|
||||
// bool operator()(const json::value&, type_3&) const { return ...; }
|
||||
};
|
||||
|
||||
template <typename T>
|
||||
void unable_to_deserialize()
|
||||
{
|
||||
static_assert(!sizeof(T), "Unable to deserialize T. "
|
||||
template <typename T>
|
||||
void unable_to_deserialize()
|
||||
{
|
||||
static_assert(
|
||||
!sizeof(T),
|
||||
"Unable to deserialize T. "
|
||||
#ifdef _MSC_VER
|
||||
"See T below: " __FUNCSIG__
|
||||
"See T below: " __FUNCSIG__
|
||||
#else
|
||||
// "See T below: " __PRETTY_FUNCTION__
|
||||
// "See T below: " __PRETTY_FUNCTION__
|
||||
|
||||
#endif
|
||||
);
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
template <typename in_t, typename serializer_t = _serialization_helper::empty_serializer,
|
||||
typename string_t = default_string_t>
|
||||
template <
|
||||
typename in_t,
|
||||
typename serializer_t = _serialization_helper::empty_serializer,
|
||||
typename string_t = default_string_t>
|
||||
basic_value<string_t> serialize(in_t&& in, const serializer_t& serializer = {})
|
||||
{
|
||||
if constexpr (_serialization_helper::is_serializable<in_t, serializer_t>::value) {
|
||||
return serializer(std::forward<in_t>(in));
|
||||
}
|
||||
else if constexpr (std::is_constructible_v<basic_value<string_t>, in_t>) {
|
||||
return basic_value<string_t>(std::forward<in_t>(in));
|
||||
}
|
||||
else if constexpr (_utils::is_collection<std::decay_t<in_t>>) {
|
||||
else if constexpr (
|
||||
_utils::is_collection<std::decay_t<in_t>> || _utils::is_fixed_array<std::decay_t<in_t>>) {
|
||||
basic_array<string_t> arr;
|
||||
for (auto&& elem : in) {
|
||||
using elem_t = decltype(elem);
|
||||
|
||||
auto j_elem = serialize<elem_t, serializer_t, string_t>(std::forward<elem_t>(elem), serializer);
|
||||
auto j_elem =
|
||||
serialize<elem_t, serializer_t, string_t>(std::forward<elem_t>(elem), serializer);
|
||||
arr.emplace_back(std::move(j_elem));
|
||||
}
|
||||
return arr;
|
||||
@@ -109,27 +116,32 @@ basic_value<string_t> serialize(in_t&& in, const serializer_t& serializer = {})
|
||||
using key_t = decltype(key);
|
||||
using elem_t = decltype(elem);
|
||||
|
||||
auto j_elem = serialize<elem_t, serializer_t, string_t>(std::forward<elem_t>(elem), serializer);
|
||||
auto j_elem =
|
||||
serialize<elem_t, serializer_t, string_t>(std::forward<elem_t>(elem), serializer);
|
||||
obj.emplace(std::forward<key_t>(key), std::move(j_elem));
|
||||
}
|
||||
return obj;
|
||||
}
|
||||
else if constexpr (std::is_constructible_v<basic_value<string_t>, in_t>) {
|
||||
return basic_value<string_t>(std::forward<in_t>(in));
|
||||
}
|
||||
else {
|
||||
_serialization_helper::unable_to_serialize<in_t>();
|
||||
}
|
||||
}
|
||||
|
||||
template <typename out_t, typename deserializer_t = _serialization_helper::empty_deserializer,
|
||||
typename string_t = default_string_t>
|
||||
bool deserialize(const basic_value<string_t>& in, out_t& out, const deserializer_t& deserializer = {})
|
||||
template <
|
||||
typename out_t,
|
||||
typename deserializer_t = _serialization_helper::empty_deserializer,
|
||||
typename string_t = default_string_t>
|
||||
bool deserialize(
|
||||
const basic_value<string_t>& in,
|
||||
out_t& out,
|
||||
const deserializer_t& deserializer = {})
|
||||
{
|
||||
if constexpr (_serialization_helper::is_deserializable<out_t, deserializer_t>::value) {
|
||||
return deserializer(in, out);
|
||||
}
|
||||
else if constexpr (std::is_constructible_v<out_t, basic_value<string_t>>) {
|
||||
out = out_t(in);
|
||||
return true;
|
||||
}
|
||||
else if constexpr (_utils::is_collection<std::decay_t<out_t>>) {
|
||||
if (!in.is_array()) {
|
||||
return false;
|
||||
@@ -149,20 +161,45 @@ bool deserialize(const basic_value<string_t>& in, out_t& out, const deserializer
|
||||
}
|
||||
return true;
|
||||
}
|
||||
else if constexpr (_utils::is_map<std::decay_t<out_t>>) {
|
||||
if (!in.is_object()) {
|
||||
else if constexpr (_utils::is_fixed_array<std::decay_t<out_t>>) {
|
||||
if (!in.is_array()) {
|
||||
return false;
|
||||
}
|
||||
for (auto&& [key, j_elem] : in.as_object()) {
|
||||
auto&& in_as_arr = in.as_array();
|
||||
constexpr size_t out_size = _utils::fixed_array_size<out_t>;
|
||||
if (in_as_arr.size() != out_size) {
|
||||
return false;
|
||||
}
|
||||
|
||||
for (size_t i = 0; i < out_size; ++i) {
|
||||
auto&& j_elem = in_as_arr.at(i);
|
||||
using elem_t = typename out_t::value_type;
|
||||
elem_t elem {};
|
||||
if (!deserialize<elem_t, deserializer_t, string_t>(j_elem, elem, deserializer)) {
|
||||
return false;
|
||||
}
|
||||
out.emplace(std::move(elem));
|
||||
out.at(i) = std::move(elem);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
else if constexpr (_utils::is_map<std::decay_t<out_t>>) {
|
||||
if (!in.is_object()) {
|
||||
return false;
|
||||
}
|
||||
for (auto&& [key, j_elem] : in.as_object()) {
|
||||
using elem_t = typename out_t::mapped_type;
|
||||
elem_t elem {};
|
||||
if (!deserialize<elem_t, deserializer_t, string_t>(j_elem, elem, deserializer)) {
|
||||
return false;
|
||||
}
|
||||
out.emplace(std::forward<decltype(key)>(key), std::move(elem));
|
||||
}
|
||||
return true;
|
||||
}
|
||||
else if constexpr (std::is_constructible_v<out_t, basic_value<string_t>>) {
|
||||
out = out_t(in);
|
||||
return true;
|
||||
}
|
||||
else {
|
||||
_serialization_helper::unable_to_deserialize<out_t>();
|
||||
}
|
||||
|
||||
4
3rdparty/include/meojson/common/types.hpp
vendored
@@ -1,5 +1,7 @@
|
||||
// IWYU pragma: private, include <meojson/json.hpp>
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "array.hpp"
|
||||
#include "object.hpp"
|
||||
#include "value.hpp"
|
||||
#include "value.hpp"
|
||||
|
||||
122
3rdparty/include/meojson/common/utils.hpp
vendored
@@ -1,7 +1,14 @@
|
||||
// IWYU pragma: private, include <meojson/json.hpp>
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <iomanip>
|
||||
#include <limits>
|
||||
#include <sstream>
|
||||
#include <string>
|
||||
#include <type_traits>
|
||||
#include <utility>
|
||||
#include <variant>
|
||||
|
||||
namespace json
|
||||
{
|
||||
@@ -61,12 +68,38 @@ constexpr bool is_container<T, std::void_t<typename T::value_type, range_value_t
|
||||
template <typename T, typename = void>
|
||||
constexpr bool is_map = false;
|
||||
template <typename T>
|
||||
constexpr bool is_map<T, std::void_t<typename T::key_type, typename T::mapped_type>> = is_container<T>;
|
||||
constexpr bool is_map<T, std::void_t<typename T::key_type, typename T::mapped_type>> =
|
||||
is_container<T>;
|
||||
|
||||
template <typename T, typename = void>
|
||||
constexpr bool is_fixed_array = false;
|
||||
template <template <typename, size_t> typename arr_t, typename value_t, size_t size>
|
||||
constexpr bool is_fixed_array<arr_t<value_t, size>> = true;
|
||||
|
||||
template <typename T, typename = std::enable_if_t<is_fixed_array<T>>>
|
||||
constexpr size_t fixed_array_size = 0;
|
||||
template <template <typename, size_t> typename arr_t, typename value_t, size_t size>
|
||||
constexpr size_t fixed_array_size<arr_t<value_t, size>> = size;
|
||||
|
||||
template <typename T, typename = void>
|
||||
constexpr bool is_collection = false;
|
||||
template <typename T>
|
||||
constexpr bool is_collection<T> = is_container<T> && !is_map<T>;
|
||||
constexpr bool is_collection<T> = is_container<T> && !is_map<T> && !is_fixed_array<T>;
|
||||
|
||||
template <typename T>
|
||||
constexpr bool is_variant = false;
|
||||
template <typename... args_t>
|
||||
constexpr bool is_variant<std::variant<args_t...>> = true;
|
||||
|
||||
template <typename T>
|
||||
constexpr bool is_tuple = false;
|
||||
template <typename... args_t>
|
||||
constexpr bool is_tuple<std::tuple<args_t...>> = true;
|
||||
|
||||
template <typename T>
|
||||
constexpr bool is_pair = false;
|
||||
template <typename... args_t>
|
||||
constexpr bool is_pair<std::pair<args_t...>> = true;
|
||||
|
||||
template <typename T>
|
||||
class has_to_json_in_member
|
||||
@@ -85,7 +118,8 @@ template <typename T>
|
||||
class has_to_json_in_templ_spec
|
||||
{
|
||||
template <typename U>
|
||||
static auto test(int) -> decltype(std::declval<ext::jsonization<U>>().to_json(std::declval<U>()), std::true_type());
|
||||
static auto test(int)
|
||||
-> decltype(std::declval<ext::jsonization<U>>().to_json(std::declval<U>()), std::true_type());
|
||||
|
||||
template <typename U>
|
||||
static std::false_type test(...);
|
||||
@@ -113,8 +147,7 @@ class has_check_json_in_templ_spec
|
||||
{
|
||||
template <typename U>
|
||||
static auto test(int)
|
||||
-> decltype(std::declval<ext::jsonization<U>>().check_json(std::declval<json::basic_value<string_t>>()),
|
||||
std::true_type());
|
||||
-> decltype(std::declval<ext::jsonization<U>>().check_json(std::declval<json::basic_value<string_t>>()), std::true_type());
|
||||
|
||||
template <typename U>
|
||||
static std::false_type test(...);
|
||||
@@ -142,9 +175,7 @@ class has_from_json_in_templ_spec
|
||||
{
|
||||
template <typename U>
|
||||
static auto test(int)
|
||||
-> decltype(std::declval<ext::jsonization<U>>().from_json(std::declval<json::basic_value<string_t>>(),
|
||||
std::declval<U&>()),
|
||||
std::true_type());
|
||||
-> decltype(std::declval<ext::jsonization<U>>().from_json(std::declval<json::basic_value<string_t>>(), std::declval<U&>()), std::true_type());
|
||||
|
||||
template <typename U>
|
||||
static std::false_type test(...);
|
||||
@@ -154,7 +185,7 @@ public:
|
||||
};
|
||||
|
||||
template <typename string_t>
|
||||
static constexpr string_t unescape_string(const string_t& str)
|
||||
inline constexpr string_t unescape_string(const string_t& str)
|
||||
{
|
||||
using char_t = typename string_t::value_type;
|
||||
|
||||
@@ -202,26 +233,41 @@ static constexpr string_t unescape_string(const string_t& str)
|
||||
}
|
||||
|
||||
template <typename string_t>
|
||||
static constexpr string_t true_string()
|
||||
inline constexpr string_t true_string()
|
||||
{
|
||||
return { 't', 'r', 'u', 'e' };
|
||||
}
|
||||
|
||||
template <typename string_t>
|
||||
static constexpr string_t false_string()
|
||||
inline constexpr string_t false_string()
|
||||
{
|
||||
return { 'f', 'a', 'l', 's', 'e' };
|
||||
}
|
||||
|
||||
template <typename string_t>
|
||||
static constexpr string_t null_string()
|
||||
inline constexpr string_t null_string()
|
||||
{
|
||||
return { 'n', 'u', 'l', 'l' };
|
||||
}
|
||||
|
||||
template <typename string_t, typename any_t>
|
||||
string_t to_basic_string(any_t&& arg)
|
||||
inline string_t to_basic_string(any_t&& arg)
|
||||
{
|
||||
#ifdef MEOJSON_KEEP_FLOATING_PRECISION
|
||||
using real_type = std::remove_reference_t<any_t>;
|
||||
if constexpr (std::is_floating_point_v<real_type>) {
|
||||
if constexpr (std::is_same_v<string_t, std::string>) {
|
||||
std::ostringstream oss;
|
||||
oss << std::setprecision(std::numeric_limits<real_type>::max_digits10) << arg;
|
||||
return oss.str();
|
||||
}
|
||||
else if constexpr (std::is_same_v<string_t, std::wstring>) {
|
||||
std::wostringstream oss;
|
||||
oss << std::setprecision(std::numeric_limits<real_type>::max_digits10) << arg;
|
||||
return oss.str();
|
||||
}
|
||||
}
|
||||
#endif
|
||||
if constexpr (std::is_same_v<string_t, std::string>) {
|
||||
return std::to_string(std::forward<any_t>(arg));
|
||||
}
|
||||
@@ -232,4 +278,54 @@ string_t to_basic_string(any_t&& arg)
|
||||
static_assert(!sizeof(any_t), "Unsupported type");
|
||||
}
|
||||
}
|
||||
|
||||
template <std::size_t id, typename string_t, typename variant_t>
|
||||
inline bool _serialize_variant_impl(basic_value<string_t>& val, variant_t&& var)
|
||||
{
|
||||
if (var.index() != id) {
|
||||
return false;
|
||||
}
|
||||
val = basic_value<string_t>(std::get<id>(std::forward<variant_t>(var)));
|
||||
return true;
|
||||
}
|
||||
|
||||
template <typename string_t, typename variant_t, std::size_t... ids>
|
||||
inline basic_value<string_t> serialize_variant(variant_t&& var, std::index_sequence<ids...>)
|
||||
{
|
||||
basic_value<string_t> val;
|
||||
(_serialize_variant_impl<ids>(val, std::forward<variant_t>(var)) || ...);
|
||||
return val;
|
||||
}
|
||||
|
||||
template <std::size_t id, typename string_t, typename variant_t>
|
||||
inline bool _deserialize_variant_impl(const basic_value<string_t>& val, variant_t& var)
|
||||
{
|
||||
using alt_t = std::variant_alternative_t<id, variant_t>;
|
||||
if (!val.template is<alt_t>()) {
|
||||
return false;
|
||||
}
|
||||
var = val.template as<alt_t>();
|
||||
return true;
|
||||
}
|
||||
|
||||
template <typename string_t, typename variant_t, std::size_t... ids>
|
||||
inline variant_t deserialize_variant(const basic_value<string_t>& val, std::index_sequence<ids...>)
|
||||
{
|
||||
variant_t var;
|
||||
(_deserialize_variant_impl<ids>(val, var) || ...);
|
||||
return var;
|
||||
}
|
||||
|
||||
template <typename string_t, typename variant_t, std::size_t... ids>
|
||||
inline bool detect_variant(const basic_value<string_t>& val, std::index_sequence<ids...>)
|
||||
{
|
||||
return (val.template is<std::variant_alternative_t<ids, variant_t>>() || ...);
|
||||
}
|
||||
|
||||
template <typename string_t, typename tuple_t, std::size_t... ids>
|
||||
inline bool detect_tuple(const basic_value<string_t>& val, std::index_sequence<ids...>)
|
||||
{
|
||||
return val.is_array() && val.as_array().size() == std::tuple_size_v<tuple_t>
|
||||
&& (val.at(ids).template is<std::tuple_element_t<ids, tuple_t>>() || ...);
|
||||
}
|
||||
} // namespace json::_utils
|
||||
|
||||
445
3rdparty/include/meojson/common/value.hpp
vendored
@@ -1,3 +1,5 @@
|
||||
// IWYU pragma: private, include <meojson/json.hpp>
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <cstddef>
|
||||
@@ -7,6 +9,8 @@
|
||||
#include <ostream>
|
||||
#include <string>
|
||||
#include <tuple>
|
||||
#include <type_traits>
|
||||
#include <utility>
|
||||
#include <variant>
|
||||
|
||||
#include "exception.hpp"
|
||||
@@ -64,30 +68,87 @@ public:
|
||||
template <typename... args_t>
|
||||
basic_value(value_type type, args_t&&... args);
|
||||
|
||||
template <typename collection_t,
|
||||
std::enable_if_t<_utils::is_collection<collection_t> &&
|
||||
std::is_constructible_v<typename basic_array<string_t>::value_type,
|
||||
_utils::range_value_t<collection_t>>,
|
||||
bool> = true>
|
||||
basic_value(collection_t&& collection) : basic_value(basic_array<string_t>(std::forward<collection_t>(collection)))
|
||||
{}
|
||||
template <typename map_t, std::enable_if_t<_utils::is_map<map_t> &&
|
||||
std::is_constructible_v<typename basic_object<string_t>::value_type,
|
||||
_utils::range_value_t<map_t>>,
|
||||
bool> = true>
|
||||
basic_value(map_t&& map) : basic_value(basic_object<string_t>(std::forward<map_t>(map)))
|
||||
{}
|
||||
template <
|
||||
typename collection_t,
|
||||
std::enable_if_t<
|
||||
_utils::is_collection<collection_t>
|
||||
&& std::is_constructible_v<
|
||||
typename basic_array<string_t>::value_type,
|
||||
_utils::range_value_t<collection_t>>,
|
||||
bool> = true>
|
||||
basic_value(collection_t&& collection)
|
||||
: basic_value(basic_array<string_t>(std::forward<collection_t>(collection)))
|
||||
{
|
||||
}
|
||||
|
||||
template <typename jsonization_t,
|
||||
std::enable_if_t<_utils::has_to_json_in_member<jsonization_t>::value, bool> = true>
|
||||
basic_value(const jsonization_t& value) : basic_value(value.to_json())
|
||||
{}
|
||||
template <typename jsonization_t,
|
||||
std::enable_if_t<_utils::has_to_json_in_templ_spec<jsonization_t>::value, bool> = true>
|
||||
basic_value(const jsonization_t& value) : basic_value(ext::jsonization<jsonization_t>().to_json(value))
|
||||
{}
|
||||
template <
|
||||
typename fixed_array_t,
|
||||
std::enable_if_t<_utils::is_fixed_array<fixed_array_t>, bool> = true>
|
||||
basic_value(const fixed_array_t& arr)
|
||||
: basic_value(basic_array<string_t>(arr))
|
||||
{
|
||||
}
|
||||
|
||||
template <typename value_t, std::enable_if_t<!std::is_convertible_v<value_t, basic_value<string_t>>, bool> = true>
|
||||
template <
|
||||
typename map_t,
|
||||
std::enable_if_t<
|
||||
_utils::is_map<map_t>
|
||||
&& std::is_constructible_v<
|
||||
typename basic_object<string_t>::value_type,
|
||||
_utils::range_value_t<map_t>>,
|
||||
bool> = true>
|
||||
basic_value(map_t&& map)
|
||||
: basic_value(basic_object<string_t>(std::forward<map_t>(map)))
|
||||
{
|
||||
}
|
||||
|
||||
template <typename enum_t, std::enable_if_t<std::is_enum_v<enum_t>, bool> = true>
|
||||
basic_value(enum_t e)
|
||||
: basic_value(static_cast<std::underlying_type_t<enum_t>>(e))
|
||||
{
|
||||
}
|
||||
|
||||
template <
|
||||
typename jsonization_t,
|
||||
std::enable_if_t<_utils::has_to_json_in_member<jsonization_t>::value, bool> = true>
|
||||
basic_value(const jsonization_t& value)
|
||||
: basic_value(value.to_json())
|
||||
{
|
||||
}
|
||||
|
||||
template <
|
||||
typename jsonization_t,
|
||||
std::enable_if_t<_utils::has_to_json_in_templ_spec<jsonization_t>::value, bool> = true>
|
||||
basic_value(const jsonization_t& value)
|
||||
: basic_value(ext::jsonization<jsonization_t>().to_json(value))
|
||||
{
|
||||
}
|
||||
|
||||
template <typename... elem_ts>
|
||||
basic_value(std::tuple<elem_ts...>&& tup)
|
||||
: basic_value(basic_array<string_t>(std::forward<std::tuple<elem_ts...>>(tup)))
|
||||
{
|
||||
}
|
||||
|
||||
template <typename elem1_t, typename elem2_t>
|
||||
basic_value(std::pair<elem1_t, elem2_t>&& pair)
|
||||
: basic_value(basic_array<string_t>(std::pair<elem1_t, elem2_t>(pair)))
|
||||
{
|
||||
}
|
||||
|
||||
template <
|
||||
typename variant_t,
|
||||
std::enable_if_t<_utils::is_variant<std::decay_t<variant_t>>, bool> = true>
|
||||
basic_value(variant_t&& var)
|
||||
: basic_value(_utils::serialize_variant<string_t>(
|
||||
std::forward<variant_t>(var),
|
||||
std::make_index_sequence<std::variant_size_v<std::decay_t<variant_t>>>()))
|
||||
{
|
||||
}
|
||||
|
||||
template <
|
||||
typename value_t,
|
||||
std::enable_if_t<!std::is_convertible_v<value_t, basic_value<string_t>>, bool> = true>
|
||||
basic_value(value_t) = delete;
|
||||
|
||||
// I don't know if you want to convert char to string or number, so I delete these constructors.
|
||||
@@ -99,13 +160,21 @@ public:
|
||||
~basic_value();
|
||||
|
||||
bool valid() const noexcept { return _type != value_type::invalid; }
|
||||
|
||||
bool empty() const noexcept { return is_null(); }
|
||||
|
||||
bool is_null() const noexcept { return _type == value_type::null; }
|
||||
|
||||
bool is_number() const noexcept { return _type == value_type::number; }
|
||||
|
||||
bool is_boolean() const noexcept { return _type == value_type::boolean; }
|
||||
|
||||
bool is_string() const noexcept { return _type == value_type::string; }
|
||||
|
||||
bool is_array() const noexcept { return _type == value_type::array; }
|
||||
|
||||
bool is_object() const noexcept { return _type == value_type::object; }
|
||||
|
||||
template <typename value_t>
|
||||
bool is() const noexcept;
|
||||
|
||||
@@ -114,9 +183,13 @@ public:
|
||||
|
||||
bool contains(const string_t& key) const;
|
||||
bool contains(size_t pos) const;
|
||||
|
||||
bool exists(const string_t& key) const { return contains(key); }
|
||||
|
||||
bool exists(size_t pos) const { return contains(pos); }
|
||||
|
||||
value_type type() const noexcept { return _type; }
|
||||
|
||||
const basic_value<string_t>& at(size_t pos) const;
|
||||
const basic_value<string_t>& at(const string_t& key) const;
|
||||
|
||||
@@ -148,6 +221,11 @@ public:
|
||||
|
||||
template <typename value_t, template <typename...> typename collection_t = std::vector>
|
||||
collection_t<value_t> as_collection() const;
|
||||
template <
|
||||
typename value_t,
|
||||
size_t Size,
|
||||
template <typename, size_t> typename fixed_array_t = std::array>
|
||||
fixed_array_t<value_t, Size> as_fixed_array() const;
|
||||
template <typename value_t, template <typename...> typename map_t = std::map>
|
||||
map_t<string_t, value_t> as_map() const;
|
||||
|
||||
@@ -162,20 +240,29 @@ public:
|
||||
|
||||
void clear() noexcept;
|
||||
|
||||
string_t dumps(std::optional<size_t> indent = std::nullopt) const { return indent ? format(*indent) : to_string(); }
|
||||
string_t dumps(std::optional<size_t> indent = std::nullopt) const
|
||||
{
|
||||
return indent ? format(*indent) : to_string();
|
||||
}
|
||||
|
||||
// return raw string
|
||||
string_t to_string() const;
|
||||
|
||||
string_t format(size_t indent = 4) const { return format(indent, 0); }
|
||||
|
||||
basic_value<string_t>& operator=(const basic_value<string_t>& rhs);
|
||||
basic_value<string_t>& operator=(basic_value<string_t>&&) noexcept;
|
||||
template <typename value_t, std::enable_if_t<std::is_convertible_v<value_t, basic_value<string_t>>, bool> = true>
|
||||
|
||||
template <
|
||||
typename value_t,
|
||||
std::enable_if_t<std::is_convertible_v<value_t, basic_value<string_t>>, bool> = true>
|
||||
basic_value<string_t>& operator=(value_t rhs)
|
||||
{
|
||||
return *this = basic_value<string_t>(std::move(rhs));
|
||||
}
|
||||
|
||||
bool operator==(const basic_value<string_t>& rhs) const;
|
||||
|
||||
bool operator!=(const basic_value<string_t>& rhs) const { return !(*this == rhs); }
|
||||
|
||||
const basic_value<string_t>& operator[](size_t pos) const;
|
||||
@@ -200,34 +287,63 @@ public:
|
||||
basic_value<string_t>& operator+=(basic_array<string_t>&& rhs);
|
||||
|
||||
explicit operator bool() const { return as_boolean(); }
|
||||
|
||||
explicit operator int() const { return as_integer(); }
|
||||
|
||||
explicit operator unsigned() const { return as_unsigned(); }
|
||||
|
||||
explicit operator long() const { return as_long(); }
|
||||
|
||||
explicit operator unsigned long() const { return as_unsigned_long(); }
|
||||
|
||||
explicit operator long long() const { return as_long_long(); }
|
||||
|
||||
explicit operator unsigned long long() const { return as_unsigned_long_long(); }
|
||||
|
||||
explicit operator float() const { return as_float(); }
|
||||
|
||||
explicit operator double() const { return as_double(); }
|
||||
|
||||
explicit operator long double() const { return as_long_double(); }
|
||||
|
||||
explicit operator string_t() const { return as_string(); }
|
||||
|
||||
explicit operator basic_array<string_t>() const { return as_array(); }
|
||||
|
||||
explicit operator basic_object<string_t>() const { return as_object(); }
|
||||
|
||||
template <typename value_t, template <typename...> typename collection_t = std::vector,
|
||||
std::enable_if_t<_utils::is_collection<collection_t<value_t>>, bool> = true>
|
||||
template <
|
||||
typename value_t,
|
||||
template <typename...> typename collection_t = std::vector,
|
||||
std::enable_if_t<_utils::is_collection<collection_t<value_t>>, bool> = true>
|
||||
explicit operator collection_t<value_t>() const
|
||||
{
|
||||
return as_collection<value_t, collection_t>();
|
||||
}
|
||||
template <typename value_t, template <typename...> typename map_t = std::map,
|
||||
std::enable_if_t<_utils::is_map<map_t<string_t, value_t>>, bool> = true>
|
||||
|
||||
template <
|
||||
typename value_t,
|
||||
size_t Size,
|
||||
template <typename, size_t> typename fixed_array_t = std::array,
|
||||
std::enable_if_t<_utils::is_fixed_array<fixed_array_t<value_t, Size>>, bool> = true>
|
||||
explicit operator fixed_array_t<value_t, Size>() const
|
||||
{
|
||||
return as_fixed_array<value_t, Size, fixed_array_t>();
|
||||
}
|
||||
|
||||
template <
|
||||
typename value_t,
|
||||
template <typename...> typename map_t = std::map,
|
||||
std::enable_if_t<_utils::is_map<map_t<string_t, value_t>>, bool> = true>
|
||||
explicit operator map_t<string_t, value_t>() const
|
||||
{
|
||||
return as_map<value_t, map_t>();
|
||||
}
|
||||
template <typename jsonization_t,
|
||||
std::enable_if_t<_utils::has_from_json_in_member<jsonization_t, string_t>::value, bool> = true>
|
||||
|
||||
template <
|
||||
typename jsonization_t,
|
||||
std::enable_if_t<_utils::has_from_json_in_member<jsonization_t, string_t>::value, bool> =
|
||||
true>
|
||||
explicit operator jsonization_t() const
|
||||
{
|
||||
jsonization_t dst {};
|
||||
@@ -236,8 +352,12 @@ public:
|
||||
}
|
||||
return dst;
|
||||
}
|
||||
template <typename jsonization_t,
|
||||
std::enable_if_t<_utils::has_from_json_in_templ_spec<jsonization_t, string_t>::value, bool> = true>
|
||||
|
||||
template <
|
||||
typename jsonization_t,
|
||||
std::enable_if_t<
|
||||
_utils::has_from_json_in_templ_spec<jsonization_t, string_t>::value,
|
||||
bool> = true>
|
||||
explicit operator jsonization_t() const
|
||||
{
|
||||
jsonization_t dst {};
|
||||
@@ -247,6 +367,32 @@ public:
|
||||
return dst;
|
||||
}
|
||||
|
||||
template <typename enum_t, std::enable_if_t<std::is_enum_v<enum_t>, bool> = true>
|
||||
explicit operator enum_t() const
|
||||
{
|
||||
return static_cast<enum_t>(static_cast<std::underlying_type_t<enum_t>>(*this));
|
||||
}
|
||||
|
||||
template <typename... elem_ts>
|
||||
explicit operator std::tuple<elem_ts...>() const
|
||||
{
|
||||
return as_array().template as_tuple<elem_ts...>();
|
||||
}
|
||||
|
||||
template <typename elem1_t, typename elem2_t>
|
||||
explicit operator std::pair<elem1_t, elem2_t>() const
|
||||
{
|
||||
return as_array().template as_pair<elem1_t, elem2_t>();
|
||||
}
|
||||
|
||||
template <typename... args_t>
|
||||
explicit operator std::variant<args_t...>() const
|
||||
{
|
||||
return _utils::deserialize_variant<string_t, std::variant<args_t...>>(
|
||||
*this,
|
||||
std::make_index_sequence<std::variant_size_v<std::variant<args_t...>>>());
|
||||
}
|
||||
|
||||
private:
|
||||
friend class basic_array<string_t>;
|
||||
friend class basic_object<string_t>;
|
||||
@@ -256,8 +402,9 @@ private:
|
||||
static var_t deep_copy(const var_t& src);
|
||||
|
||||
template <typename... key_then_default_value_t, size_t... keys_indexes_t>
|
||||
auto get(std::tuple<key_then_default_value_t...> keys_then_default_value,
|
||||
std::index_sequence<keys_indexes_t...>) const;
|
||||
auto
|
||||
get(std::tuple<key_then_default_value_t...> keys_then_default_value,
|
||||
std::index_sequence<keys_indexes_t...>) const;
|
||||
|
||||
template <typename value_t, typename first_key_t, typename... rest_keys_t>
|
||||
auto get_helper(const value_t& default_value, first_key_t&& first, rest_keys_t&&... rest) const;
|
||||
@@ -276,89 +423,125 @@ inline basic_value<string_t>::basic_value() = default;
|
||||
|
||||
template <typename string_t>
|
||||
inline basic_value<string_t>::basic_value(const basic_value<string_t>& rhs)
|
||||
: _type(rhs._type), _raw_data(deep_copy(rhs._raw_data))
|
||||
{}
|
||||
: _type(rhs._type)
|
||||
, _raw_data(deep_copy(rhs._raw_data))
|
||||
{
|
||||
}
|
||||
|
||||
template <typename string_t>
|
||||
inline basic_value<string_t>::basic_value(basic_value<string_t>&& rhs) noexcept = default;
|
||||
|
||||
template <typename string_t>
|
||||
inline basic_value<string_t>::basic_value(bool b)
|
||||
: _type(value_type::boolean),
|
||||
_raw_data(string_t(b ? _utils::true_string<string_t>() : _utils::false_string<string_t>()))
|
||||
{}
|
||||
: _type(value_type::boolean)
|
||||
, _raw_data(string_t(b ? _utils::true_string<string_t>() : _utils::false_string<string_t>()))
|
||||
{
|
||||
}
|
||||
|
||||
template <typename string_t>
|
||||
inline basic_value<string_t>::basic_value(int num)
|
||||
: _type(value_type::number), _raw_data(_utils::to_basic_string<string_t>(num))
|
||||
{}
|
||||
: _type(value_type::number)
|
||||
, _raw_data(_utils::to_basic_string<string_t>(num))
|
||||
{
|
||||
}
|
||||
|
||||
template <typename string_t>
|
||||
inline basic_value<string_t>::basic_value(unsigned num)
|
||||
: _type(value_type::number), _raw_data(_utils::to_basic_string<string_t>(num))
|
||||
{}
|
||||
: _type(value_type::number)
|
||||
, _raw_data(_utils::to_basic_string<string_t>(num))
|
||||
{
|
||||
}
|
||||
|
||||
template <typename string_t>
|
||||
inline basic_value<string_t>::basic_value(long num)
|
||||
: _type(value_type::number), _raw_data(_utils::to_basic_string<string_t>(num))
|
||||
{}
|
||||
: _type(value_type::number)
|
||||
, _raw_data(_utils::to_basic_string<string_t>(num))
|
||||
{
|
||||
}
|
||||
|
||||
template <typename string_t>
|
||||
inline basic_value<string_t>::basic_value(unsigned long num)
|
||||
: _type(value_type::number), _raw_data(_utils::to_basic_string<string_t>(num))
|
||||
{}
|
||||
: _type(value_type::number)
|
||||
, _raw_data(_utils::to_basic_string<string_t>(num))
|
||||
{
|
||||
}
|
||||
|
||||
template <typename string_t>
|
||||
inline basic_value<string_t>::basic_value(long long num)
|
||||
: _type(value_type::number), _raw_data(_utils::to_basic_string<string_t>(num))
|
||||
{}
|
||||
: _type(value_type::number)
|
||||
, _raw_data(_utils::to_basic_string<string_t>(num))
|
||||
{
|
||||
}
|
||||
|
||||
template <typename string_t>
|
||||
inline basic_value<string_t>::basic_value(unsigned long long num)
|
||||
: _type(value_type::number), _raw_data(_utils::to_basic_string<string_t>(num))
|
||||
{}
|
||||
: _type(value_type::number)
|
||||
, _raw_data(_utils::to_basic_string<string_t>(num))
|
||||
{
|
||||
}
|
||||
|
||||
template <typename string_t>
|
||||
inline basic_value<string_t>::basic_value(float num)
|
||||
: _type(value_type::number), _raw_data(_utils::to_basic_string<string_t>(num))
|
||||
{}
|
||||
: _type(value_type::number)
|
||||
, _raw_data(_utils::to_basic_string<string_t>(num))
|
||||
{
|
||||
}
|
||||
|
||||
template <typename string_t>
|
||||
inline basic_value<string_t>::basic_value(double num)
|
||||
: _type(value_type::number), _raw_data(_utils::to_basic_string<string_t>(num))
|
||||
{}
|
||||
: _type(value_type::number)
|
||||
, _raw_data(_utils::to_basic_string<string_t>(num))
|
||||
{
|
||||
}
|
||||
|
||||
template <typename string_t>
|
||||
inline basic_value<string_t>::basic_value(long double num)
|
||||
: _type(value_type::number), _raw_data(_utils::to_basic_string<string_t>(num))
|
||||
{}
|
||||
: _type(value_type::number)
|
||||
, _raw_data(_utils::to_basic_string<string_t>(num))
|
||||
{
|
||||
}
|
||||
|
||||
template <typename string_t>
|
||||
inline basic_value<string_t>::basic_value(const char_t* str) : _type(value_type::string), _raw_data(string_t(str))
|
||||
{}
|
||||
inline basic_value<string_t>::basic_value(const char_t* str)
|
||||
: _type(value_type::string)
|
||||
, _raw_data(string_t(str))
|
||||
{
|
||||
}
|
||||
|
||||
template <typename string_t>
|
||||
inline basic_value<string_t>::basic_value(string_t str) : _type(value_type::string), _raw_data(std::move(str))
|
||||
{}
|
||||
inline basic_value<string_t>::basic_value(string_t str)
|
||||
: _type(value_type::string)
|
||||
, _raw_data(std::move(str))
|
||||
{
|
||||
}
|
||||
|
||||
template <typename string_t>
|
||||
inline basic_value<string_t>::basic_value(std::nullptr_t) : _type(value_type::null)
|
||||
{}
|
||||
inline basic_value<string_t>::basic_value(std::nullptr_t)
|
||||
: _type(value_type::null)
|
||||
{
|
||||
}
|
||||
|
||||
template <typename string_t>
|
||||
inline basic_value<string_t>::basic_value(basic_array<string_t> arr)
|
||||
: _type(value_type::array), _raw_data(std::make_unique<basic_array<string_t>>(std::move(arr)))
|
||||
{}
|
||||
: _type(value_type::array)
|
||||
, _raw_data(std::make_unique<basic_array<string_t>>(std::move(arr)))
|
||||
{
|
||||
}
|
||||
|
||||
template <typename string_t>
|
||||
inline basic_value<string_t>::basic_value(basic_object<string_t> obj)
|
||||
: _type(value_type::object), _raw_data(std::make_unique<basic_object<string_t>>(std::move(obj)))
|
||||
{}
|
||||
: _type(value_type::object)
|
||||
, _raw_data(std::make_unique<basic_object<string_t>>(std::move(obj)))
|
||||
{
|
||||
}
|
||||
|
||||
template <typename string_t>
|
||||
inline basic_value<string_t>::basic_value(std::initializer_list<typename basic_object<string_t>::value_type> init_list)
|
||||
: _type(value_type::object), _raw_data(std::make_unique<basic_object<string_t>>(init_list))
|
||||
{}
|
||||
inline basic_value<string_t>::basic_value(
|
||||
std::initializer_list<typename basic_object<string_t>::value_type> init_list)
|
||||
: _type(value_type::object)
|
||||
, _raw_data(std::make_unique<basic_object<string_t>>(init_list))
|
||||
{
|
||||
}
|
||||
|
||||
// for Pimpl
|
||||
template <typename string_t>
|
||||
@@ -380,7 +563,7 @@ inline bool basic_value<string_t>::is() const noexcept
|
||||
else if constexpr (std::is_same_v<bool, value_t>) {
|
||||
return is_boolean();
|
||||
}
|
||||
else if constexpr (std::is_arithmetic_v<value_t>) {
|
||||
else if constexpr (std::is_arithmetic_v<value_t> || std::is_enum_v<value_t>) {
|
||||
return is_number();
|
||||
}
|
||||
else if constexpr (std::is_constructible_v<string_t, value_t>) {
|
||||
@@ -392,12 +575,31 @@ inline bool basic_value<string_t>::is() const noexcept
|
||||
else if constexpr (_utils::is_collection<value_t>) {
|
||||
return is_array() && all<typename value_t::value_type>();
|
||||
}
|
||||
else if constexpr (_utils::is_fixed_array<value_t>) {
|
||||
return is_array() && all<typename value_t::value_type>()
|
||||
&& as_array().size() == _utils::fixed_array_size<value_t>;
|
||||
}
|
||||
else if constexpr (std::is_same_v<basic_object<string_t>, value_t>) {
|
||||
return is_object();
|
||||
}
|
||||
else if constexpr (_utils::is_map<value_t>) {
|
||||
return is_object() && std::is_constructible_v<string_t, typename value_t::key_type> &&
|
||||
all<typename value_t::mapped_type>();
|
||||
return is_object() && std::is_constructible_v<string_t, typename value_t::key_type>
|
||||
&& all<typename value_t::mapped_type>();
|
||||
}
|
||||
else if constexpr (_utils::is_variant<value_t>) {
|
||||
return _utils::detect_variant<string_t, value_t>(
|
||||
*this,
|
||||
std::make_index_sequence<std::variant_size_v<value_t>>());
|
||||
}
|
||||
else if constexpr (_utils::is_pair<value_t>) {
|
||||
return is_array() && as_array().size() == 2
|
||||
&& at(0).template is<typename value_t::first_type>()
|
||||
&& at(1).template is<typename value_t::second_type>();
|
||||
}
|
||||
else if constexpr (_utils::is_tuple<value_t>) {
|
||||
return _utils::detect_tuple<string_t, value_t>(
|
||||
*this,
|
||||
std::make_index_sequence<std::tuple_size_v<value_t>>());
|
||||
}
|
||||
else {
|
||||
static_assert(!sizeof(value_t), "Unsupported type");
|
||||
@@ -444,33 +646,42 @@ template <typename string_t>
|
||||
template <typename... key_then_default_value_t>
|
||||
inline auto basic_value<string_t>::get(key_then_default_value_t&&... keys_then_default_value) const
|
||||
{
|
||||
return get(std::forward_as_tuple(keys_then_default_value...),
|
||||
std::make_index_sequence<sizeof...(keys_then_default_value) - 1> {});
|
||||
return get(
|
||||
std::forward_as_tuple(keys_then_default_value...),
|
||||
std::make_index_sequence<sizeof...(keys_then_default_value) - 1> {});
|
||||
}
|
||||
|
||||
template <typename string_t>
|
||||
template <typename... key_then_default_value_t, size_t... keys_indexes_t>
|
||||
inline auto basic_value<string_t>::get(std::tuple<key_then_default_value_t...> keys_then_default_value,
|
||||
std::index_sequence<keys_indexes_t...>) const
|
||||
inline auto basic_value<string_t>::get(
|
||||
std::tuple<key_then_default_value_t...> keys_then_default_value,
|
||||
std::index_sequence<keys_indexes_t...>) const
|
||||
{
|
||||
constexpr unsigned long default_value_index = sizeof...(key_then_default_value_t) - 1;
|
||||
return get_helper(std::get<default_value_index>(keys_then_default_value),
|
||||
std::get<keys_indexes_t>(keys_then_default_value)...);
|
||||
return get_helper(
|
||||
std::get<default_value_index>(keys_then_default_value),
|
||||
std::get<keys_indexes_t>(keys_then_default_value)...);
|
||||
}
|
||||
|
||||
template <typename string_t>
|
||||
template <typename value_t, typename first_key_t, typename... rest_keys_t>
|
||||
inline auto basic_value<string_t>::get_helper(const value_t& default_value, first_key_t&& first,
|
||||
rest_keys_t&&... rest) const
|
||||
inline auto basic_value<string_t>::get_helper(
|
||||
const value_t& default_value,
|
||||
first_key_t&& first,
|
||||
rest_keys_t&&... rest) const
|
||||
{
|
||||
if constexpr (std::is_constructible_v<string_t, first_key_t>) {
|
||||
return is_object() ? as_object().get_helper(default_value, std::forward<first_key_t>(first),
|
||||
std::forward<rest_keys_t>(rest)...)
|
||||
return is_object() ? as_object().get_helper(
|
||||
default_value,
|
||||
std::forward<first_key_t>(first),
|
||||
std::forward<rest_keys_t>(rest)...)
|
||||
: default_value;
|
||||
}
|
||||
else if constexpr (std::is_integral_v<std::decay_t<first_key_t>>) {
|
||||
return is_array() ? as_array().get_helper(default_value, std::forward<first_key_t>(first),
|
||||
std::forward<rest_keys_t>(rest)...)
|
||||
return is_array() ? as_array().get_helper(
|
||||
default_value,
|
||||
std::forward<first_key_t>(first),
|
||||
std::forward<rest_keys_t>(rest)...)
|
||||
: default_value;
|
||||
}
|
||||
else {
|
||||
@@ -480,16 +691,22 @@ inline auto basic_value<string_t>::get_helper(const value_t& default_value, firs
|
||||
|
||||
template <typename string_t>
|
||||
template <typename value_t, typename unique_key_t>
|
||||
inline auto basic_value<string_t>::get_helper(const value_t& default_value, unique_key_t&& first) const
|
||||
inline auto
|
||||
basic_value<string_t>::get_helper(const value_t& default_value, unique_key_t&& first) const
|
||||
{
|
||||
if constexpr (std::is_constructible_v<string_t, unique_key_t>) {
|
||||
return is_object() ? as_object().get_helper(default_value, std::forward<unique_key_t>(first)) : default_value;
|
||||
return is_object()
|
||||
? as_object().get_helper(default_value, std::forward<unique_key_t>(first))
|
||||
: default_value;
|
||||
}
|
||||
else if constexpr (std::is_integral_v<std::decay_t<unique_key_t>>) {
|
||||
return is_array() ? as_array().get_helper(default_value, std::forward<unique_key_t>(first)) : default_value;
|
||||
return is_array() ? as_array().get_helper(default_value, std::forward<unique_key_t>(first))
|
||||
: default_value;
|
||||
}
|
||||
else {
|
||||
static_assert(!sizeof(unique_key_t), "Parameter must be integral or string_t constructible");
|
||||
static_assert(
|
||||
!sizeof(unique_key_t),
|
||||
"Parameter must be integral or string_t constructible");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -722,10 +939,14 @@ template <typename string_t>
|
||||
template <typename... args_t>
|
||||
inline decltype(auto) basic_value<string_t>::emplace(args_t&&... args)
|
||||
{
|
||||
constexpr bool is_array_args = std::is_constructible_v<typename basic_array<string_t>::value_type, args_t...>;
|
||||
constexpr bool is_object_args = std::is_constructible_v<typename basic_object<string_t>::value_type, args_t...>;
|
||||
constexpr bool is_array_args =
|
||||
std::is_constructible_v<typename basic_array<string_t>::value_type, args_t...>;
|
||||
constexpr bool is_object_args =
|
||||
std::is_constructible_v<typename basic_object<string_t>::value_type, args_t...>;
|
||||
|
||||
static_assert(is_array_args || is_object_args, "Args can not constructure a array or object value");
|
||||
static_assert(
|
||||
is_array_args || is_object_args,
|
||||
"Args can not constructure a array or object value");
|
||||
|
||||
if constexpr (is_array_args) {
|
||||
return as_array().emplace_back(std::forward<args_t>(args)...);
|
||||
@@ -801,6 +1022,13 @@ inline collection_t<value_t> basic_value<string_t>::as_collection() const
|
||||
return as_array().template as_collection<value_t, collection_t>();
|
||||
}
|
||||
|
||||
template <typename string_t>
|
||||
template <typename value_t, size_t Size, template <typename, size_t> typename fixed_array_t>
|
||||
inline fixed_array_t<value_t, Size> basic_value<string_t>::as_fixed_array() const
|
||||
{
|
||||
return as_array().template as_fixed_array<value_t, Size>();
|
||||
}
|
||||
|
||||
template <typename string_t>
|
||||
template <typename value_t, template <typename...> typename map_t>
|
||||
inline map_t<string_t, value_t> basic_value<string_t>::as_map() const
|
||||
@@ -818,12 +1046,15 @@ inline basic_value<string_t>& basic_value<string_t>::operator=(const basic_value
|
||||
}
|
||||
|
||||
template <typename string_t>
|
||||
inline basic_value<string_t>& basic_value<string_t>::operator=(basic_value<string_t>&& rhs) noexcept = default;
|
||||
inline basic_value<string_t>&
|
||||
basic_value<string_t>::operator=(basic_value<string_t>&& rhs) noexcept = default;
|
||||
|
||||
template <typename string_t>
|
||||
inline bool basic_value<string_t>::operator==(const basic_value<string_t>& rhs) const
|
||||
{
|
||||
if (_type != rhs._type) return false;
|
||||
if (_type != rhs._type) {
|
||||
return false;
|
||||
}
|
||||
|
||||
switch (_type) {
|
||||
case value_type::null:
|
||||
@@ -878,7 +1109,8 @@ inline basic_value<string_t>& basic_value<string_t>::operator[](string_t&& key)
|
||||
}
|
||||
|
||||
template <typename string_t>
|
||||
inline basic_value<string_t> basic_value<string_t>::operator|(const basic_object<string_t>& rhs) const&
|
||||
inline basic_value<string_t>
|
||||
basic_value<string_t>::operator|(const basic_object<string_t>& rhs) const&
|
||||
{
|
||||
return as_object() | rhs;
|
||||
}
|
||||
@@ -916,7 +1148,8 @@ inline basic_value<string_t>& basic_value<string_t>::operator|=(basic_object<str
|
||||
}
|
||||
|
||||
template <typename string_t>
|
||||
inline basic_value<string_t> basic_value<string_t>::operator+(const basic_array<string_t>& rhs) const&
|
||||
inline basic_value<string_t>
|
||||
basic_value<string_t>::operator+(const basic_array<string_t>& rhs) const&
|
||||
{
|
||||
return as_array() + rhs;
|
||||
}
|
||||
@@ -956,9 +1189,12 @@ inline basic_value<string_t>& basic_value<string_t>::operator+=(basic_array<stri
|
||||
template <typename string_t>
|
||||
template <typename... args_t>
|
||||
inline basic_value<string_t>::basic_value(value_type type, args_t&&... args)
|
||||
: _type(type), _raw_data(std::forward<args_t>(args)...)
|
||||
: _type(type)
|
||||
, _raw_data(std::forward<args_t>(args)...)
|
||||
{
|
||||
static_assert(std::is_constructible_v<var_t, args_t...>, "Parameter can't be used to construct a var_t");
|
||||
static_assert(
|
||||
std::is_constructible_v<var_t, args_t...>,
|
||||
"Parameter can't be used to construct a var_t");
|
||||
}
|
||||
|
||||
template <typename string_t>
|
||||
@@ -981,11 +1217,14 @@ inline typename basic_value<string_t>::var_t basic_value<string_t>::deep_copy(co
|
||||
return dst;
|
||||
}
|
||||
|
||||
template <typename ostream_t, typename string_t,
|
||||
typename std_ostream_t =
|
||||
std::basic_ostream<typename string_t::value_type, std::char_traits<typename string_t::value_type>>,
|
||||
typename =
|
||||
std::enable_if_t<std::is_same_v<std_ostream_t, ostream_t> || std::is_base_of_v<std_ostream_t, ostream_t>>>
|
||||
template <
|
||||
typename ostream_t,
|
||||
typename string_t,
|
||||
typename std_ostream_t = std::basic_ostream<
|
||||
typename string_t::value_type,
|
||||
std::char_traits<typename string_t::value_type>>,
|
||||
typename = std::enable_if_t<
|
||||
std::is_same_v<std_ostream_t, ostream_t> || std::is_base_of_v<std_ostream_t, ostream_t>>>
|
||||
ostream_t& operator<<(ostream_t& out, const basic_value<string_t>& val)
|
||||
{
|
||||
out << val.format();
|
||||
|
||||
4
3rdparty/include/meojson/json.hpp
vendored
@@ -1,6 +1,10 @@
|
||||
#pragma once
|
||||
|
||||
// IWYU pragma: begin_exports
|
||||
|
||||
#include "common/serialization.hpp"
|
||||
#include "common/types.hpp"
|
||||
#include "parser/parser.hpp"
|
||||
#include "reflection/jsonization.hpp"
|
||||
|
||||
// IWYU pragma: end_exports
|
||||
|
||||
6
3rdparty/include/meojson/json5.hpp
vendored
@@ -1,4 +1,8 @@
|
||||
#pragma once
|
||||
|
||||
// IWYU pragma: begin_exports
|
||||
|
||||
#include "common/types.hpp"
|
||||
#include "parser5/parser5.hpp"
|
||||
#include "parser5/parser5.hpp"
|
||||
|
||||
// IWYU pragma: end_exports
|
||||
|
||||
37
3rdparty/include/meojson/parser/bitops.hpp
vendored
@@ -1,13 +1,17 @@
|
||||
// IWYU pragma: private, include <meojson/json.hpp>
|
||||
|
||||
#pragma once
|
||||
|
||||
#if __cplusplus >= 202002L || (defined(_MSVC_LANG) && _MSVC_LANG >= 202002L)
|
||||
#include <bit>
|
||||
|
||||
namespace json::_bitops
|
||||
{
|
||||
using std::countl_one;
|
||||
using std::countl_zero;
|
||||
using std::countr_one;
|
||||
using std::countr_zero;
|
||||
|
||||
inline constexpr bool is_little_endian()
|
||||
{
|
||||
return std::endian::native == std::endian::little;
|
||||
@@ -15,25 +19,37 @@ inline constexpr bool is_little_endian()
|
||||
}
|
||||
#else
|
||||
#include <cstdint>
|
||||
|
||||
namespace json::_bitops
|
||||
{
|
||||
#if defined(__GNUC__) || defined(__clang__)
|
||||
inline constexpr int countl_zero(uint32_t x)
|
||||
{
|
||||
if constexpr (sizeof(uint32_t) == sizeof(unsigned int)) return x == 0 ? 32 : __builtin_clz(x);
|
||||
if constexpr (sizeof(uint32_t) == sizeof(unsigned long)) return x == 0 ? 32 : __builtin_clzl(x);
|
||||
if constexpr (sizeof(uint32_t) == sizeof(unsigned int)) {
|
||||
return x == 0 ? 32 : __builtin_clz(x);
|
||||
}
|
||||
if constexpr (sizeof(uint32_t) == sizeof(unsigned long)) {
|
||||
return x == 0 ? 32 : __builtin_clzl(x);
|
||||
}
|
||||
return x == 0 ? 32 : __builtin_clzll(x);
|
||||
}
|
||||
|
||||
inline constexpr int countr_zero(uint32_t x)
|
||||
{
|
||||
if constexpr (sizeof(uint32_t) == sizeof(unsigned int)) return x == 0 ? 32 : __builtin_ctz(x);
|
||||
if constexpr (sizeof(uint32_t) == sizeof(unsigned long)) return x == 0 ? 32 : __builtin_ctzl(x);
|
||||
if constexpr (sizeof(uint32_t) == sizeof(unsigned int)) {
|
||||
return x == 0 ? 32 : __builtin_ctz(x);
|
||||
}
|
||||
if constexpr (sizeof(uint32_t) == sizeof(unsigned long)) {
|
||||
return x == 0 ? 32 : __builtin_ctzl(x);
|
||||
}
|
||||
return x == 0 ? 32 : __builtin_ctzll(x);
|
||||
}
|
||||
|
||||
inline constexpr int countl_zero(uint64_t x)
|
||||
{
|
||||
return x == 0 ? 64 : __builtin_clzll(x);
|
||||
}
|
||||
|
||||
inline constexpr int countr_zero(uint64_t x)
|
||||
{
|
||||
return x == 0 ? 64 : __builtin_ctzll(x);
|
||||
@@ -45,14 +61,17 @@ inline int countl_zero(uint32_t x)
|
||||
{
|
||||
return __lzcnt(x);
|
||||
}
|
||||
|
||||
inline int countr_zero(uint32_t x)
|
||||
{
|
||||
return _tzcnt_u32(x);
|
||||
}
|
||||
|
||||
inline int countl_zero(uint64_t x)
|
||||
{
|
||||
return (int)__lzcnt64(x);
|
||||
}
|
||||
|
||||
inline int countr_zero(uint64_t x)
|
||||
{
|
||||
return (int)_tzcnt_u64(x);
|
||||
@@ -63,16 +82,19 @@ inline constexpr int countl_zero(uint32_t x)
|
||||
unsigned long index = 0;
|
||||
return _BitScanReverse(&index, x) ? 31 - index : 32;
|
||||
}
|
||||
|
||||
inline constexpr int countr_zero(uint32_t x)
|
||||
{
|
||||
unsigned long index = 0;
|
||||
return _BitScanForward(&index, x) ? index : 32;
|
||||
}
|
||||
|
||||
inline constexpr int countl_zero(uint64_t x)
|
||||
{
|
||||
unsigned long index = 0;
|
||||
return _BitScanReverse64(&index, x) ? 63 - index : 64;
|
||||
}
|
||||
|
||||
inline constexpr int countr_zero(uint64_t x)
|
||||
{
|
||||
unsigned long index = 0;
|
||||
@@ -86,14 +108,17 @@ inline int countl_one(uint32_t x)
|
||||
{
|
||||
return countl_zero(~x);
|
||||
}
|
||||
|
||||
inline int countr_one(uint32_t x)
|
||||
{
|
||||
return countr_zero(~x);
|
||||
}
|
||||
|
||||
inline int countl_one(uint64_t x)
|
||||
{
|
||||
return countl_zero(~x);
|
||||
}
|
||||
|
||||
inline int countr_one(uint64_t x)
|
||||
{
|
||||
return countr_zero(~x);
|
||||
@@ -102,10 +127,12 @@ inline int countr_one(uint64_t x)
|
||||
// no constexpr endian awareness before C++20
|
||||
inline bool is_little_endian()
|
||||
{
|
||||
union {
|
||||
union
|
||||
{
|
||||
uint32_t u32;
|
||||
uint8_t u8;
|
||||
} u = { 0x01020304 };
|
||||
|
||||
return u.u8 == 4;
|
||||
}
|
||||
} // namespace json::_bitops
|
||||
|
||||
42
3rdparty/include/meojson/parser/packed_bytes.hpp
vendored
@@ -1,3 +1,5 @@
|
||||
// IWYU pragma: private, include <meojson/json.hpp>
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <cstdint>
|
||||
@@ -28,11 +30,13 @@ struct packed_bytes
|
||||
};
|
||||
}
|
||||
|
||||
#ifndef MEOJSON_DISABLE_PACKED_BYTES
|
||||
#if defined(__SSE2__) || defined(_M_X64) || (defined(_M_IX86_FP) && _M_IX86_FP)
|
||||
#include "packed_bytes_x86.hpp"
|
||||
#elif defined(__ARM_NEON) || defined(_M_ARM) || defined(_M_ARM64)
|
||||
#include "packed_bytes_arm.hpp"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
namespace json::_packed_bytes
|
||||
{
|
||||
@@ -66,14 +70,19 @@ struct packed_bytes_trait_uint64
|
||||
return is_zero_memberwise((x) ^ (UINT64_C(0x0101010101010101) * (n)));
|
||||
}
|
||||
|
||||
__packed_bytes_strong_inline static value_type bitwise_or(value_type a, value_type b) { return a | b; }
|
||||
__packed_bytes_strong_inline static value_type bitwise_or(value_type a, value_type b)
|
||||
{
|
||||
return a | b;
|
||||
}
|
||||
|
||||
__packed_bytes_strong_inline static size_t first_nonzero_byte(value_type x)
|
||||
{
|
||||
if (_bitops::is_little_endian())
|
||||
if (_bitops::is_little_endian()) {
|
||||
return _bitops::countr_zero(x) / 8;
|
||||
else
|
||||
}
|
||||
else {
|
||||
return _bitops::countl_zero(x) / 8;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@@ -108,16 +117,22 @@ struct packed_bytes_trait_uint32
|
||||
return is_zero_memberwise((x) ^ (~UINT32_C(0) / 255 * (n)));
|
||||
}
|
||||
|
||||
__packed_bytes_strong_inline static value_type bitwise_or(value_type a, value_type b) { return a | b; }
|
||||
__packed_bytes_strong_inline static value_type bitwise_or(value_type a, value_type b)
|
||||
{
|
||||
return a | b;
|
||||
}
|
||||
|
||||
__packed_bytes_strong_inline static size_t first_nonzero_byte(value_type x)
|
||||
{
|
||||
if (_bitops::is_little_endian())
|
||||
if (_bitops::is_little_endian()) {
|
||||
return _bitops::countr_zero(x) / 8;
|
||||
else
|
||||
}
|
||||
else {
|
||||
return _bitops::countl_zero(x) / 8;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
template <>
|
||||
struct packed_bytes<8>
|
||||
{
|
||||
@@ -133,9 +148,14 @@ struct packed_bytes<4>
|
||||
template <size_t N>
|
||||
using packed_bytes_trait = typename packed_bytes<N>::traits;
|
||||
|
||||
using packed_bytes_trait_max =
|
||||
std::conditional_t<packed_bytes_trait<32>::available, packed_bytes_trait<32>,
|
||||
std::conditional_t<packed_bytes_trait<16>::available, packed_bytes_trait<16>,
|
||||
std::conditional_t<packed_bytes_trait<8>::available, packed_bytes_trait<8>,
|
||||
packed_bytes_trait<4>>>>;
|
||||
using packed_bytes_trait_max = std::conditional_t<
|
||||
packed_bytes_trait<32>::available,
|
||||
packed_bytes_trait<32>,
|
||||
std::conditional_t<
|
||||
packed_bytes_trait<16>::available,
|
||||
packed_bytes_trait<16>,
|
||||
std::conditional_t<
|
||||
packed_bytes_trait<8>::available,
|
||||
packed_bytes_trait<8>,
|
||||
packed_bytes_trait<4>>>>;
|
||||
} // namespace json::_packed_bytes
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
// IWYU pragma: private, include <meojson/json.hpp>
|
||||
|
||||
#pragma once
|
||||
|
||||
// current NEON implementation doesn't outperform 64-bit scalar implementation
|
||||
@@ -17,7 +19,10 @@ struct packed_bytes_trait_neon
|
||||
static constexpr auto step = 16;
|
||||
using value_type = uint8x16_t;
|
||||
|
||||
__packed_bytes_strong_inline static value_type load_unaligned(const void* ptr) { return vld1q_u8((uint8_t*)ptr); }
|
||||
__packed_bytes_strong_inline static value_type load_unaligned(const void* ptr)
|
||||
{
|
||||
return vld1q_u8((uint8_t*)ptr);
|
||||
}
|
||||
|
||||
__packed_bytes_strong_inline static value_type less(value_type x, uint8_t n)
|
||||
{
|
||||
@@ -26,19 +31,31 @@ struct packed_bytes_trait_neon
|
||||
return is_less;
|
||||
}
|
||||
|
||||
__packed_bytes_strong_inline static value_type equal(value_type x, uint8_t n) { return vceqq_u8(x, vdupq_n_u8(n)); }
|
||||
__packed_bytes_strong_inline static value_type equal(value_type x, uint8_t n)
|
||||
{
|
||||
return vceqq_u8(x, vdupq_n_u8(n));
|
||||
}
|
||||
|
||||
__packed_bytes_strong_inline static value_type equal(value_type x, value_type y) { return vceqq_u8(x, y); }
|
||||
__packed_bytes_strong_inline static value_type equal(value_type x, value_type y)
|
||||
{
|
||||
return vceqq_u8(x, y);
|
||||
}
|
||||
|
||||
__packed_bytes_strong_inline static value_type bitwise_or(value_type a, value_type b) { return vorrq_u8(a, b); }
|
||||
__packed_bytes_strong_inline static value_type bitwise_or(value_type a, value_type b)
|
||||
{
|
||||
return vorrq_u8(a, b);
|
||||
}
|
||||
|
||||
__packed_bytes_strong_inline static bool is_all_zero(value_type x)
|
||||
{
|
||||
#ifdef __packed_bytes_trait_arm64
|
||||
return vmaxvq_u8(x) == 0;
|
||||
#else
|
||||
auto fold64 = vorr_u64(vget_high_u64(vreinterpretq_u8_u64(x), 0), vget_low_u64(vreinterpretq_u8_u64(x), 1));
|
||||
auto fold32 = vget_lane_u32(vreinterpret_u64_u32(fold64), 0) | vget_lane_u32(vreinterpret_u64_u32(fold64), 1);
|
||||
auto fold64 = vorr_u64(
|
||||
vget_high_u64(vreinterpretq_u8_u64(x), 0),
|
||||
vget_low_u64(vreinterpretq_u8_u64(x), 1));
|
||||
auto fold32 = vget_lane_u32(vreinterpret_u64_u32(fold64), 0)
|
||||
| vget_lane_u32(vreinterpret_u64_u32(fold64), 1);
|
||||
return fold32 == 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
// IWYU pragma: private, include <meojson/json.hpp>
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "packed_bytes.hpp"
|
||||
|
||||
#include <emmintrin.h>
|
||||
@@ -35,9 +38,15 @@ struct packed_bytes_trait_sse
|
||||
return _mm_cmpeq_epi8(x, _mm_set1_epi8(static_cast<char>(n)));
|
||||
}
|
||||
|
||||
__packed_bytes_strong_inline static value_type equal(value_type x, value_type y) { return _mm_cmpeq_epi8(x, y); }
|
||||
__packed_bytes_strong_inline static value_type equal(value_type x, value_type y)
|
||||
{
|
||||
return _mm_cmpeq_epi8(x, y);
|
||||
}
|
||||
|
||||
__packed_bytes_strong_inline static value_type bitwise_or(value_type a, value_type b) { return _mm_or_si128(a, b); }
|
||||
__packed_bytes_strong_inline static value_type bitwise_or(value_type a, value_type b)
|
||||
{
|
||||
return _mm_or_si128(a, b);
|
||||
}
|
||||
|
||||
__packed_bytes_strong_inline static bool is_all_zero(value_type x)
|
||||
{
|
||||
@@ -97,14 +106,20 @@ struct packed_bytes_trait_avx2
|
||||
return _mm256_cmpeq_epi8(x, _mm256_set1_epi8(static_cast<char>(n)));
|
||||
}
|
||||
|
||||
__packed_bytes_strong_inline static value_type equal(value_type x, value_type y) { return _mm256_cmpeq_epi8(x, y); }
|
||||
__packed_bytes_strong_inline static value_type equal(value_type x, value_type y)
|
||||
{
|
||||
return _mm256_cmpeq_epi8(x, y);
|
||||
}
|
||||
|
||||
__packed_bytes_strong_inline static value_type bitwise_or(value_type a, value_type b)
|
||||
{
|
||||
return _mm256_or_si256(a, b);
|
||||
}
|
||||
|
||||
__packed_bytes_strong_inline static bool is_all_zero(value_type x) { return (bool)_mm256_testz_si256(x, x); }
|
||||
__packed_bytes_strong_inline static bool is_all_zero(value_type x)
|
||||
{
|
||||
return (bool)_mm256_testz_si256(x, x);
|
||||
}
|
||||
|
||||
__packed_bytes_strong_inline static size_t first_nonzero_byte(value_type x)
|
||||
{
|
||||
|
||||
256
3rdparty/include/meojson/parser/parser.hpp
vendored
@@ -1,5 +1,8 @@
|
||||
// IWYU pragma: private, include <meojson/json.hpp>
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <cctype>
|
||||
#include <fstream>
|
||||
#include <optional>
|
||||
#include <ostream>
|
||||
@@ -15,8 +18,10 @@ namespace json
|
||||
// * parser declare *
|
||||
// ****************************
|
||||
|
||||
template <typename string_t = default_string_t, typename parsing_t = void,
|
||||
typename accel_traits = _packed_bytes::packed_bytes_trait_max>
|
||||
template <
|
||||
typename string_t = default_string_t,
|
||||
typename parsing_t = void,
|
||||
typename accel_traits = _packed_bytes::packed_bytes_trait_max>
|
||||
class parser
|
||||
{
|
||||
public:
|
||||
@@ -28,7 +33,12 @@ public:
|
||||
static std::optional<basic_value<string_t>> parse(const parsing_t& content);
|
||||
|
||||
private:
|
||||
parser(parsing_iter_t cbegin, parsing_iter_t cend) noexcept : _cur(cbegin), _end(cend) { ; }
|
||||
parser(parsing_iter_t cbegin, parsing_iter_t cend) noexcept
|
||||
: _cur(cbegin)
|
||||
, _end(cend)
|
||||
{
|
||||
;
|
||||
}
|
||||
|
||||
std::optional<basic_value<string_t>> parse();
|
||||
basic_value<string_t> parse_value();
|
||||
@@ -47,6 +57,7 @@ private:
|
||||
bool skip_string_literal_with_accel();
|
||||
bool skip_whitespace() noexcept;
|
||||
bool skip_digit();
|
||||
bool skip_unicode_escape(uint16_t& pair_high, string_t& result);
|
||||
|
||||
private:
|
||||
parsing_iter_t _cur;
|
||||
@@ -63,8 +74,10 @@ auto parse(const parsing_t& content);
|
||||
template <typename char_t>
|
||||
auto parse(char_t* content);
|
||||
|
||||
template <typename istream_t,
|
||||
typename = std::enable_if_t<std::is_base_of_v<std::basic_istream<typename istream_t::char_type>, istream_t>>>
|
||||
template <
|
||||
typename istream_t,
|
||||
typename = std::enable_if_t<
|
||||
std::is_base_of_v<std::basic_istream<typename istream_t::char_type>, istream_t>>>
|
||||
auto parse(istream_t& istream, bool check_bom);
|
||||
|
||||
template <typename ifstream_t = std::ifstream, typename path_t = void>
|
||||
@@ -72,17 +85,17 @@ auto open(const path_t& path, bool check_bom = false);
|
||||
|
||||
namespace literals
|
||||
{
|
||||
value operator""_json(const char* str, size_t len);
|
||||
wvalue operator""_json(const wchar_t* str, size_t len);
|
||||
value operator""_json(const char* str, size_t len);
|
||||
wvalue operator""_json(const wchar_t* str, size_t len);
|
||||
|
||||
value operator""_jvalue(const char* str, size_t len);
|
||||
wvalue operator""_jvalue(const wchar_t* str, size_t len);
|
||||
value operator""_jvalue(const char* str, size_t len);
|
||||
wvalue operator""_jvalue(const wchar_t* str, size_t len);
|
||||
|
||||
array operator""_jarray(const char* str, size_t len);
|
||||
warray operator""_jarray(const wchar_t* str, size_t len);
|
||||
array operator""_jarray(const char* str, size_t len);
|
||||
warray operator""_jarray(const wchar_t* str, size_t len);
|
||||
|
||||
object operator""_jobject(const char* str, size_t len);
|
||||
wobject operator""_jobject(const wchar_t* str, size_t len);
|
||||
object operator""_jobject(const char* str, size_t len);
|
||||
wobject operator""_jobject(const wchar_t* str, size_t len);
|
||||
}
|
||||
|
||||
template <typename string_t = default_string_t>
|
||||
@@ -93,7 +106,8 @@ const basic_value<string_t> invalid_value();
|
||||
// *************************
|
||||
|
||||
template <typename string_t, typename parsing_t, typename accel_traits>
|
||||
inline std::optional<basic_value<string_t>> parser<string_t, parsing_t, accel_traits>::parse(const parsing_t& content)
|
||||
inline std::optional<basic_value<string_t>>
|
||||
parser<string_t, parsing_t, accel_traits>::parse(const parsing_t& content)
|
||||
{
|
||||
return parser<string_t, parsing_t, accel_traits>(content.cbegin(), content.cend()).parse();
|
||||
}
|
||||
@@ -252,7 +266,9 @@ inline basic_value<string_t> parser<string_t, parsing_t, accel_traits>::parse_st
|
||||
if (!string_opt) {
|
||||
return invalid_value<string_t>();
|
||||
}
|
||||
return basic_value<string_t>(basic_value<string_t>::value_type::string, std::move(string_opt).value());
|
||||
return basic_value<string_t>(
|
||||
basic_value<string_t>::value_type::string,
|
||||
std::move(string_opt).value());
|
||||
}
|
||||
|
||||
template <typename string_t, typename parsing_t, typename accel_traits>
|
||||
@@ -350,7 +366,10 @@ inline basic_value<string_t> parser<string_t, parsing_t, accel_traits>::parse_ob
|
||||
return invalid_value<string_t>();
|
||||
}
|
||||
|
||||
result.emplace(std::move(*key_opt), std::move(val));
|
||||
auto emplaced = result.emplace(std::move(*key_opt), std::move(val)).second;
|
||||
if (!emplaced) {
|
||||
return invalid_value<string_t>();
|
||||
}
|
||||
|
||||
if (*_cur == ',') {
|
||||
++_cur;
|
||||
@@ -382,6 +401,7 @@ inline std::optional<string_t> parser<string_t, parsing_t, accel_traits>::parse_
|
||||
|
||||
string_t result;
|
||||
auto no_escape_beg = _cur;
|
||||
uint16_t pair_high = 0;
|
||||
|
||||
while (_cur != _end) {
|
||||
if constexpr (sizeof(*_cur) == 1 && accel_traits::available) {
|
||||
@@ -399,6 +419,9 @@ inline std::optional<string_t> parser<string_t, parsing_t, accel_traits>::parse_
|
||||
if (_cur == _end) {
|
||||
return std::nullopt;
|
||||
}
|
||||
if (pair_high && *_cur != 'u') {
|
||||
return std::nullopt;
|
||||
}
|
||||
switch (*_cur) {
|
||||
case '"':
|
||||
result.push_back('"');
|
||||
@@ -424,9 +447,11 @@ inline std::optional<string_t> parser<string_t, parsing_t, accel_traits>::parse_
|
||||
case 't':
|
||||
result.push_back('\t');
|
||||
break;
|
||||
// case 'u':
|
||||
// result.push_back('\u');
|
||||
// break;
|
||||
case 'u':
|
||||
if (!skip_unicode_escape(pair_high, result)) {
|
||||
return std::nullopt;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
// Illegal backslash escape
|
||||
return std::nullopt;
|
||||
@@ -435,10 +460,16 @@ inline std::optional<string_t> parser<string_t, parsing_t, accel_traits>::parse_
|
||||
break;
|
||||
}
|
||||
case '"': {
|
||||
if (pair_high) {
|
||||
return std::nullopt;
|
||||
}
|
||||
result += string_t(no_escape_beg, _cur++);
|
||||
return result;
|
||||
}
|
||||
default:
|
||||
if (pair_high) {
|
||||
return std::nullopt;
|
||||
}
|
||||
++_cur;
|
||||
break;
|
||||
}
|
||||
@@ -446,6 +477,103 @@ inline std::optional<string_t> parser<string_t, parsing_t, accel_traits>::parse_
|
||||
return std::nullopt;
|
||||
}
|
||||
|
||||
template <typename string_t, typename parsing_t, typename accel_traits>
|
||||
inline bool parser<string_t, parsing_t, accel_traits>::skip_unicode_escape(
|
||||
uint16_t& pair_high,
|
||||
string_t& result)
|
||||
{
|
||||
uint16_t cp = 0;
|
||||
for (int i = 0; i < 4; ++i) {
|
||||
if (++_cur == _end) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!std::isxdigit(static_cast<unsigned char>(*_cur))) {
|
||||
return false;
|
||||
}
|
||||
|
||||
cp <<= 4;
|
||||
|
||||
if ('0' <= *_cur && *_cur <= '9') {
|
||||
cp |= *_cur - '0';
|
||||
}
|
||||
else if ('a' <= *_cur && *_cur <= 'f') {
|
||||
cp |= *_cur - 'a' + 10;
|
||||
}
|
||||
else if ('A' <= *_cur && *_cur <= 'F') {
|
||||
cp |= *_cur - 'A' + 10;
|
||||
}
|
||||
else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
uint32_t ext_cp = cp;
|
||||
uint16_t hi_cp = 0, lo_cp = 0;
|
||||
|
||||
if (0xD800 <= cp && cp <= 0xDBFF) {
|
||||
if (pair_high) {
|
||||
return false;
|
||||
}
|
||||
pair_high = cp;
|
||||
return true;
|
||||
}
|
||||
|
||||
if (0xDC00 <= cp && cp <= 0xDFFF) {
|
||||
if (!pair_high) {
|
||||
return false;
|
||||
}
|
||||
ext_cp = (((pair_high - 0xD800) << 10) | (cp - 0xDC00)) + 0x10000;
|
||||
hi_cp = pair_high;
|
||||
lo_cp = cp;
|
||||
pair_high = 0;
|
||||
}
|
||||
|
||||
if constexpr (std::is_same_v<typename string_t::value_type, char>) {
|
||||
// utf8
|
||||
if (ext_cp <= 0x7F) {
|
||||
result.push_back(static_cast<char>(ext_cp));
|
||||
}
|
||||
else if (ext_cp <= 0x7FF) {
|
||||
result.push_back(static_cast<char>(((ext_cp >> 6) & 0b00011111) | 0b11000000u));
|
||||
result.push_back(static_cast<char>((ext_cp & 0b00111111) | 0b10000000u));
|
||||
}
|
||||
else if (ext_cp <= 0xFFFF) {
|
||||
result.push_back(static_cast<char>(((ext_cp >> 12) & 0b00001111) | 0b11100000u));
|
||||
result.push_back(static_cast<char>(((ext_cp >> 6) & 0b00111111) | 0b10000000u));
|
||||
result.push_back(static_cast<char>((ext_cp & 0b00111111) | 0b10000000u));
|
||||
}
|
||||
else {
|
||||
result.push_back(static_cast<char>(((ext_cp >> 18) & 0b00000111) | 0b11110000u));
|
||||
result.push_back(static_cast<char>(((ext_cp >> 12) & 0b00111111) | 0b10000000u));
|
||||
result.push_back(static_cast<char>(((ext_cp >> 6) & 0b00111111) | 0b10000000u));
|
||||
result.push_back(static_cast<char>((ext_cp & 0b00111111) | 0b10000000u));
|
||||
}
|
||||
}
|
||||
else if constexpr (std::is_same_v<typename string_t::value_type, wchar_t>) {
|
||||
if constexpr (sizeof(wchar_t) == 4) {
|
||||
result.push_back(static_cast<wchar_t>(ext_cp));
|
||||
}
|
||||
else if constexpr (sizeof(wchar_t) == 2) {
|
||||
if (ext_cp <= 0xFFFF) {
|
||||
result.push_back(static_cast<wchar_t>(ext_cp));
|
||||
}
|
||||
else {
|
||||
result.push_back(static_cast<wchar_t>(hi_cp));
|
||||
result.push_back(static_cast<wchar_t>(lo_cp));
|
||||
}
|
||||
}
|
||||
else {
|
||||
static_assert(!sizeof(typename string_t::value_type), "Unsupported wchar");
|
||||
}
|
||||
}
|
||||
else {
|
||||
static_assert(!sizeof(typename string_t::value_type), "Unsupported type");
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
template <typename string_t, typename parsing_t, typename accel_traits>
|
||||
inline bool parser<string_t, parsing_t, accel_traits>::skip_string_literal_with_accel()
|
||||
{
|
||||
@@ -456,8 +584,10 @@ inline bool parser<string_t, parsing_t, accel_traits>::skip_string_literal_with_
|
||||
while (_end - _cur >= accel_traits::step) {
|
||||
auto pack = accel_traits::load_unaligned(&(*_cur));
|
||||
auto result = accel_traits::less(pack, 32);
|
||||
result = accel_traits::bitwise_or(result, accel_traits::equal(pack, static_cast<uint8_t>('"')));
|
||||
result = accel_traits::bitwise_or(result, accel_traits::equal(pack, static_cast<uint8_t>('\\')));
|
||||
result =
|
||||
accel_traits::bitwise_or(result, accel_traits::equal(pack, static_cast<uint8_t>('"')));
|
||||
result =
|
||||
accel_traits::bitwise_or(result, accel_traits::equal(pack, static_cast<uint8_t>('\\')));
|
||||
|
||||
if (accel_traits::is_all_zero(result)) {
|
||||
_cur += accel_traits::step;
|
||||
@@ -551,8 +681,8 @@ auto parse(istream_t& ifs, bool check_bom)
|
||||
static constexpr uchar Bom_1 = 0xBB;
|
||||
static constexpr uchar Bom_2 = 0xBF;
|
||||
|
||||
if (str.size() >= 3 && static_cast<uchar>(str.at(0)) == Bom_0 && static_cast<uchar>(str.at(1)) == Bom_1 &&
|
||||
static_cast<uchar>(str.at(2)) == Bom_2) {
|
||||
if (str.size() >= 3 && static_cast<uchar>(str.at(0)) == Bom_0
|
||||
&& static_cast<uchar>(str.at(1)) == Bom_1 && static_cast<uchar>(str.at(2)) == Bom_2) {
|
||||
str.assign(str.begin() + 3, str.end());
|
||||
}
|
||||
}
|
||||
@@ -578,50 +708,56 @@ auto open(const path_t& filepath, bool check_bom)
|
||||
|
||||
namespace literals
|
||||
{
|
||||
inline value operator""_json(const char* str, size_t len)
|
||||
{
|
||||
return operator""_jvalue(str, len);
|
||||
}
|
||||
inline wvalue operator""_json(const wchar_t* str, size_t len)
|
||||
{
|
||||
return operator""_jvalue(str, len);
|
||||
}
|
||||
inline value operator""_json(const char* str, size_t len)
|
||||
{
|
||||
return operator""_jvalue(str, len);
|
||||
}
|
||||
|
||||
inline value operator""_jvalue(const char* str, size_t len)
|
||||
{
|
||||
return parse(std::string_view(str, len)).value_or(value());
|
||||
}
|
||||
inline wvalue operator""_jvalue(const wchar_t* str, size_t len)
|
||||
{
|
||||
return parse(std::wstring_view(str, len)).value_or(wvalue());
|
||||
}
|
||||
inline wvalue operator""_json(const wchar_t* str, size_t len)
|
||||
{
|
||||
return operator""_jvalue(str, len);
|
||||
}
|
||||
|
||||
inline array operator""_jarray(const char* str, size_t len)
|
||||
{
|
||||
auto val = parse(std::string_view(str, len)).value_or(value());
|
||||
return val.is_array() ? val.as_array() : array();
|
||||
}
|
||||
inline warray operator""_jarray(const wchar_t* str, size_t len)
|
||||
{
|
||||
auto val = parse(std::wstring_view(str, len)).value_or(wvalue());
|
||||
return val.is_array() ? val.as_array() : warray();
|
||||
}
|
||||
inline value operator""_jvalue(const char* str, size_t len)
|
||||
{
|
||||
return parse(std::string_view(str, len)).value_or(value());
|
||||
}
|
||||
|
||||
inline object operator""_jobject(const char* str, size_t len)
|
||||
{
|
||||
auto val = parse(std::string_view(str, len)).value_or(value());
|
||||
return val.is_object() ? val.as_object() : object();
|
||||
}
|
||||
inline wobject operator""_jobject(const wchar_t* str, size_t len)
|
||||
{
|
||||
auto val = parse(std::wstring_view(str, len)).value_or(wvalue());
|
||||
return val.is_object() ? val.as_object() : wobject();
|
||||
}
|
||||
inline wvalue operator""_jvalue(const wchar_t* str, size_t len)
|
||||
{
|
||||
return parse(std::wstring_view(str, len)).value_or(wvalue());
|
||||
}
|
||||
|
||||
inline array operator""_jarray(const char* str, size_t len)
|
||||
{
|
||||
auto val = parse(std::string_view(str, len)).value_or(value());
|
||||
return val.is_array() ? val.as_array() : array();
|
||||
}
|
||||
|
||||
inline warray operator""_jarray(const wchar_t* str, size_t len)
|
||||
{
|
||||
auto val = parse(std::wstring_view(str, len)).value_or(wvalue());
|
||||
return val.is_array() ? val.as_array() : warray();
|
||||
}
|
||||
|
||||
inline object operator""_jobject(const char* str, size_t len)
|
||||
{
|
||||
auto val = parse(std::string_view(str, len)).value_or(value());
|
||||
return val.is_object() ? val.as_object() : object();
|
||||
}
|
||||
|
||||
inline wobject operator""_jobject(const wchar_t* str, size_t len)
|
||||
{
|
||||
auto val = parse(std::wstring_view(str, len)).value_or(wvalue());
|
||||
return val.is_object() ? val.as_object() : wobject();
|
||||
}
|
||||
} // namespace literals
|
||||
|
||||
template <typename string_t>
|
||||
const basic_value<string_t> invalid_value()
|
||||
{
|
||||
return basic_value<string_t>(basic_value<string_t>::value_type::invalid, typename basic_value<string_t>::var_t());
|
||||
return basic_value<string_t>(
|
||||
basic_value<string_t>::value_type::invalid,
|
||||
typename basic_value<string_t>::var_t());
|
||||
}
|
||||
} // namespace json
|
||||
|
||||
103
3rdparty/include/meojson/parser5/parser5.hpp
vendored
@@ -1,10 +1,11 @@
|
||||
// IWYU pragma: private, include <meojson/json5.hpp>
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <algorithm>
|
||||
#include <cctype>
|
||||
#include <cmath>
|
||||
#include <iomanip>
|
||||
#include <regex>
|
||||
#include <sstream>
|
||||
#include <stack>
|
||||
#include <vector>
|
||||
@@ -31,6 +32,7 @@ public:
|
||||
{
|
||||
public:
|
||||
exception() = default;
|
||||
|
||||
exception(const std::string& type, const std::string& msg, const std::string& detail)
|
||||
{
|
||||
std::stringstream ss;
|
||||
@@ -38,6 +40,7 @@ public:
|
||||
ss << detail << std::endl;
|
||||
_what = ss.str();
|
||||
}
|
||||
|
||||
exception(const exception&) = default;
|
||||
exception& operator=(const exception&) = default;
|
||||
exception(exception&&) = default;
|
||||
@@ -50,8 +53,12 @@ public:
|
||||
{
|
||||
public:
|
||||
InvalidChar(u8char ch = 0, const std::string& detail = "")
|
||||
: exception("Invalid Char", "Unexpected token \'" + StringFromCharCode(ch) + "\'", detail)
|
||||
{}
|
||||
: exception(
|
||||
"Invalid Char",
|
||||
"Unexpected token \'" + StringFromCharCode(ch) + "\'",
|
||||
detail)
|
||||
{
|
||||
}
|
||||
};
|
||||
|
||||
class InvalidIdentifier : public exception
|
||||
@@ -59,14 +66,17 @@ public:
|
||||
public:
|
||||
InvalidIdentifier(const std::string& msg = "", const std::string& detail = "")
|
||||
: exception("Invalid Identifier", msg, detail)
|
||||
{}
|
||||
{
|
||||
}
|
||||
};
|
||||
|
||||
class InvalidEOF : public exception
|
||||
{
|
||||
public:
|
||||
InvalidEOF(const std::string& msg = "", const std::string& detail = "") : exception("Invalid EOF", msg, detail)
|
||||
{}
|
||||
InvalidEOF(const std::string& msg = "", const std::string& detail = "")
|
||||
: exception("Invalid EOF", msg, detail)
|
||||
{
|
||||
}
|
||||
};
|
||||
|
||||
public:
|
||||
@@ -175,7 +185,13 @@ public:
|
||||
static std::optional<value> parse(const string_t& content, std::string* error = nullptr);
|
||||
|
||||
private:
|
||||
parser5(string_iter_t cbegin, string_iter_t cend) noexcept : _cur(cbegin), _end(cend), _line_begin_cur(cbegin) {}
|
||||
parser5(string_iter_t cbegin, string_iter_t cend) noexcept
|
||||
: _cur(cbegin)
|
||||
, _end(cend)
|
||||
, _line_begin_cur(cbegin)
|
||||
{
|
||||
}
|
||||
|
||||
std::optional<value> parse();
|
||||
|
||||
private:
|
||||
@@ -272,62 +288,68 @@ inline bool parser5<string_t>::unicode::isSpaceSeparator(u8char ch)
|
||||
template <typename string_t>
|
||||
inline bool parser5<string_t>::unicode::isIdStartChar(u8char ch)
|
||||
{
|
||||
return (ch >= 'a' && ch <= 'z') || (ch >= 'A' && ch <= 'Z') || (ch == '$') || (ch == '_') ||
|
||||
findInRange(json::unicode::id_start, toUnicode(ch));
|
||||
return (ch >= 'a' && ch <= 'z') || (ch >= 'A' && ch <= 'Z') || (ch == '$') || (ch == '_')
|
||||
|| findInRange(json::unicode::id_start, toUnicode(ch));
|
||||
}
|
||||
|
||||
template <typename string_t>
|
||||
inline bool parser5<string_t>::unicode::isIdContinueChar(u8char ch)
|
||||
{
|
||||
return (ch >= 'a' && ch <= 'z') || (ch >= 'A' && ch <= 'Z') || (ch >= '0' && ch <= '9') || (ch == '$') ||
|
||||
(ch == '_') || findInRange(json::unicode::id_continue, toUnicode(ch));
|
||||
return (ch >= 'a' && ch <= 'z') || (ch >= 'A' && ch <= 'Z') || (ch >= '0' && ch <= '9')
|
||||
|| (ch == '$') || (ch == '_') || findInRange(json::unicode::id_continue, toUnicode(ch));
|
||||
}
|
||||
|
||||
template <typename string_t>
|
||||
inline bool parser5<string_t>::unicode::isDigit(u8char ch)
|
||||
{
|
||||
auto str = StringFromCharCode(ch);
|
||||
return std::regex_search(str, std::regex(R"([0-9])"));
|
||||
return (ch >= '0' && ch <= '9');
|
||||
}
|
||||
|
||||
template <typename string_t>
|
||||
inline bool parser5<string_t>::unicode::isHexDigit(u8char ch)
|
||||
{
|
||||
auto str = StringFromCharCode(ch);
|
||||
return std::regex_search(str, std::regex(R"([0-9A-Fa-f])"));
|
||||
return (ch >= 'a' && ch <= 'f') || (ch >= 'A' && ch <= 'F') || (ch >= '0' && ch <= '9');
|
||||
}
|
||||
|
||||
template <typename string_t>
|
||||
inline uint64_t parser5<string_t>::unicode::toUnicode(u8char ch)
|
||||
{
|
||||
std::stack<uint8_t> coded;
|
||||
if (ch == 0) {
|
||||
return ch;
|
||||
}
|
||||
|
||||
std::stack<uint8_t> coded;
|
||||
while (ch > 0) {
|
||||
coded.push(ch & 0xff);
|
||||
ch = ch >> 8;
|
||||
ch >>= 8;
|
||||
}
|
||||
|
||||
u8char charcode = 0;
|
||||
uint8_t t = coded.top();
|
||||
coded.pop();
|
||||
if (t < 128) {
|
||||
return t;
|
||||
}
|
||||
uint8_t high_bit_mask = (1 << 6) - 1;
|
||||
|
||||
uint8_t high_bit_mask = 0b00111111;
|
||||
uint8_t high_bit_shift = 0;
|
||||
int total_bits = 0;
|
||||
const int other_bits = 6;
|
||||
|
||||
while ((t & 0xC0) == 0xC0) {
|
||||
t <<= 1;
|
||||
t &= 0xff;
|
||||
total_bits += 6;
|
||||
total_bits += other_bits;
|
||||
high_bit_mask >>= 1;
|
||||
high_bit_shift++;
|
||||
charcode <<= other_bits;
|
||||
charcode |= coded.top() & ((1 << other_bits) - 1);
|
||||
coded.pop();
|
||||
|
||||
if (!coded.empty()) {
|
||||
charcode <<= other_bits;
|
||||
charcode |= coded.top() & ((1 << other_bits) - 1);
|
||||
coded.pop();
|
||||
}
|
||||
}
|
||||
|
||||
charcode |= static_cast<uint64_t>((t >> high_bit_shift) & high_bit_mask) << total_bits;
|
||||
return charcode;
|
||||
}
|
||||
@@ -346,7 +368,8 @@ inline bool parser5<string_t>::unicode::findInRange(const array_t& range, u8char
|
||||
return false;
|
||||
}
|
||||
// set 中保存的是类似于 { start1, end1, start2, end2, ... } 的形式, 区间可表示为[start, end)
|
||||
// 判断lb是否位于start的位置, 如果是, 则表示codePoint在某个区间的内部, 如果不是, 则表示codePoint在两个区间中间
|
||||
// 判断lb是否位于start的位置, 如果是, 则表示codePoint在某个区间的内部, 如果不是,
|
||||
// 则表示codePoint在两个区间中间
|
||||
return std::distance(begin, lb) % 2 == 0;
|
||||
}
|
||||
|
||||
@@ -519,11 +542,13 @@ inline typename parser5<string_t>::u8char parser5<string_t>::unicodeEscape()
|
||||
|
||||
/* utf-8 reader */
|
||||
template <typename string_t>
|
||||
inline typename parser5<string_t>::u8char parser5<string_t>::peek(const string_iter_t& begin, const string_iter_t& end,
|
||||
size_t* plen)
|
||||
inline typename parser5<string_t>::u8char
|
||||
parser5<string_t>::peek(const string_iter_t& begin, const string_iter_t& end, size_t* plen)
|
||||
{
|
||||
if (begin == end) {
|
||||
if (plen) *plen = 0;
|
||||
if (plen) {
|
||||
*plen = 0;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
uint8_t head = *begin;
|
||||
@@ -549,10 +574,12 @@ inline typename parser5<string_t>::u8char parser5<string_t>::peek(const std::str
|
||||
{
|
||||
return peek(str.cbegin(), str.cend());
|
||||
}
|
||||
|
||||
inline constexpr size_t operator"" _sz(unsigned long long size)
|
||||
{
|
||||
return size;
|
||||
}
|
||||
|
||||
template <typename string_t>
|
||||
inline typename parser5<string_t>::u8char parser5<string_t>::read()
|
||||
{
|
||||
@@ -581,11 +608,15 @@ inline typename parser5<string_t>::u8char parser5<string_t>::read()
|
||||
template <typename string_t>
|
||||
inline std::string parser5<string_t>::StringFromCharCode(typename parser5<string_t>::u8char code)
|
||||
{
|
||||
if (code == 0) return "";
|
||||
if (code == 0) {
|
||||
return "";
|
||||
}
|
||||
std::string str;
|
||||
for (auto i = 0; i < 8; ++i) {
|
||||
auto ch = (0xff & code);
|
||||
if (ch) str.insert(0, 1, static_cast<char>(ch));
|
||||
if (ch) {
|
||||
str.insert(0, 1, static_cast<char>(ch));
|
||||
}
|
||||
code >>= 8;
|
||||
}
|
||||
return str;
|
||||
@@ -700,7 +731,8 @@ inline std::optional<typename parser5<string_t>::Token> parser5<string_t>::lex_m
|
||||
}
|
||||
|
||||
template <typename string_t>
|
||||
inline std::optional<typename parser5<string_t>::Token> parser5<string_t>::lex_multiLineCommentAsterisk()
|
||||
inline std::optional<typename parser5<string_t>::Token>
|
||||
parser5<string_t>::lex_multiLineCommentAsterisk()
|
||||
{
|
||||
switch (_current_char) {
|
||||
case '*':
|
||||
@@ -808,7 +840,8 @@ inline std::optional<typename parser5<string_t>::Token> parser5<string_t>::lex_v
|
||||
}
|
||||
|
||||
template <typename string_t>
|
||||
inline std::optional<typename parser5<string_t>::Token> parser5<string_t>::lex_identifierNameStartEscape()
|
||||
inline std::optional<typename parser5<string_t>::Token>
|
||||
parser5<string_t>::lex_identifierNameStartEscape()
|
||||
{
|
||||
if (_current_char != 'u') {
|
||||
throw InvalidChar(_current_char, exceptionDetailInfo());
|
||||
@@ -855,7 +888,8 @@ inline std::optional<typename parser5<string_t>::Token> parser5<string_t>::lex_i
|
||||
}
|
||||
|
||||
template <typename string_t>
|
||||
inline std::optional<typename parser5<string_t>::Token> parser5<string_t>::lex_identifierNameEscape()
|
||||
inline std::optional<typename parser5<string_t>::Token>
|
||||
parser5<string_t>::lex_identifierNameEscape()
|
||||
{
|
||||
if (_current_char != 'u') {
|
||||
throw InvalidChar(_current_char, exceptionDetailInfo());
|
||||
@@ -1047,7 +1081,8 @@ inline std::optional<typename parser5<string_t>::Token> parser5<string_t>::lex_d
|
||||
}
|
||||
|
||||
template <typename string_t>
|
||||
inline std::optional<typename parser5<string_t>::Token> parser5<string_t>::lex_decimalExponentInteger()
|
||||
inline std::optional<typename parser5<string_t>::Token>
|
||||
parser5<string_t>::lex_decimalExponentInteger()
|
||||
{
|
||||
if (unicode::isDigit(_current_char)) {
|
||||
_buffer += StringFromCharCode(read());
|
||||
@@ -1386,7 +1421,8 @@ inline void parser5<string_t>::parse_afterArrayValue()
|
||||
|
||||
template <typename string_t>
|
||||
inline void parser5<string_t>::parse_end()
|
||||
{}
|
||||
{
|
||||
}
|
||||
|
||||
template <typename string_t>
|
||||
inline void parser5<string_t>::parseStates(ParseState state)
|
||||
@@ -1417,6 +1453,7 @@ inline void parser5<string_t>::parseStates(ParseState state)
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/* stack operation */
|
||||
template <typename string_t>
|
||||
inline void parser5<string_t>::push()
|
||||
|
||||
2
3rdparty/include/meojson/parser5/unicode.h
vendored
@@ -1,3 +1,5 @@
|
||||
// IWYU pragma: private, include <meojson/json5.hpp>
|
||||
|
||||
// This is a generated file. Do not edit.
|
||||
#pragma once
|
||||
#include <array>
|
||||
|
||||
456
3rdparty/include/meojson/reflection/jsonization.hpp
vendored
@@ -1,3 +1,5 @@
|
||||
// IWYU pragma: private, include <meojson/json.hpp>
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <string>
|
||||
@@ -8,9 +10,12 @@
|
||||
namespace json::_jsonization_helper
|
||||
{
|
||||
struct next_is_optional_t
|
||||
{};
|
||||
{
|
||||
};
|
||||
|
||||
struct va_arg_end
|
||||
{};
|
||||
{
|
||||
};
|
||||
|
||||
struct dumper
|
||||
{
|
||||
@@ -21,19 +26,25 @@ struct dumper
|
||||
result.emplace(key, var);
|
||||
return result;
|
||||
}
|
||||
|
||||
template <typename... rest_t>
|
||||
json::value _to_json(const char*, next_is_optional_t, rest_t&&... rest) const
|
||||
{
|
||||
return _to_json(std::forward<rest_t>(rest)...);
|
||||
}
|
||||
|
||||
json::value _to_json(va_arg_end) const { return {}; }
|
||||
};
|
||||
|
||||
struct checker
|
||||
{
|
||||
template <typename var_t, typename... rest_t>
|
||||
bool _check_json(const json::value& in, std::string& error_key, const char* key, const var_t&,
|
||||
rest_t&&... rest) const
|
||||
bool _check_json(
|
||||
const json::value& in,
|
||||
std::string& error_key,
|
||||
const char* key,
|
||||
const var_t&,
|
||||
rest_t&&... rest) const
|
||||
{
|
||||
auto opt = in.find(key);
|
||||
if (!opt || !opt->is<var_t>()) {
|
||||
@@ -42,9 +53,16 @@ struct checker
|
||||
}
|
||||
return _check_json(in, error_key, std::forward<rest_t>(rest)...);
|
||||
}
|
||||
|
||||
template <typename var_t, typename... rest_t>
|
||||
bool _check_json(const json::value& in, std::string& error_key, const char*, next_is_optional_t, const char* key,
|
||||
const var_t&, rest_t&&... rest) const
|
||||
bool _check_json(
|
||||
const json::value& in,
|
||||
std::string& error_key,
|
||||
const char*,
|
||||
next_is_optional_t,
|
||||
const char* key,
|
||||
const var_t&,
|
||||
rest_t&&... rest) const
|
||||
{
|
||||
auto opt = in.find(key);
|
||||
if (opt) {
|
||||
@@ -56,13 +74,19 @@ struct checker
|
||||
|
||||
return _check_json(in, error_key, std::forward<rest_t>(rest)...);
|
||||
}
|
||||
|
||||
bool _check_json(const json::value&, std::string&, va_arg_end) const { return true; }
|
||||
};
|
||||
|
||||
struct loader
|
||||
{
|
||||
template <typename var_t, typename... rest_t>
|
||||
bool _from_json(const json::value& in, std::string& error_key, const char* key, var_t& var, rest_t&&... rest) const
|
||||
bool _from_json(
|
||||
const json::value& in,
|
||||
std::string& error_key,
|
||||
const char* key,
|
||||
var_t& var,
|
||||
rest_t&&... rest) const
|
||||
{
|
||||
auto opt = in.find(key);
|
||||
if (!opt || !opt->is<var_t>()) {
|
||||
@@ -73,9 +97,16 @@ struct loader
|
||||
|
||||
return _from_json(in, error_key, std::forward<rest_t>(rest)...);
|
||||
}
|
||||
|
||||
template <typename var_t, typename... rest_t>
|
||||
bool _from_json(const json::value& in, std::string& error_key, const char*, next_is_optional_t, const char* key,
|
||||
var_t& var, rest_t&&... rest) const
|
||||
bool _from_json(
|
||||
const json::value& in,
|
||||
std::string& error_key,
|
||||
const char*,
|
||||
next_is_optional_t,
|
||||
const char* key,
|
||||
var_t& var,
|
||||
rest_t&&... rest) const
|
||||
{
|
||||
auto opt = in.find(key);
|
||||
if (opt) {
|
||||
@@ -88,6 +119,7 @@ struct loader
|
||||
|
||||
return _from_json(in, error_key, std::forward<rest_t>(rest)...);
|
||||
}
|
||||
|
||||
bool _from_json(const json::value&, std::string&, va_arg_end) const { return true; }
|
||||
};
|
||||
} // namespace json::_jsonization_helper
|
||||
@@ -111,122 +143,322 @@ namespace json::_private_macro
|
||||
|
||||
#define _MEOJSON_FOR_EACH_0(pred, ...)
|
||||
#define _MEOJSON_FOR_EACH_1(pred, x, ...) pred(x)
|
||||
#define _MEOJSON_FOR_EACH_2(pred, x, ...) pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_1(pred, __VA_ARGS__))
|
||||
#define _MEOJSON_FOR_EACH_3(pred, x, ...) pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_2(pred, __VA_ARGS__))
|
||||
#define _MEOJSON_FOR_EACH_4(pred, x, ...) pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_3(pred, __VA_ARGS__))
|
||||
#define _MEOJSON_FOR_EACH_5(pred, x, ...) pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_4(pred, __VA_ARGS__))
|
||||
#define _MEOJSON_FOR_EACH_6(pred, x, ...) pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_5(pred, __VA_ARGS__))
|
||||
#define _MEOJSON_FOR_EACH_7(pred, x, ...) pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_6(pred, __VA_ARGS__))
|
||||
#define _MEOJSON_FOR_EACH_8(pred, x, ...) pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_7(pred, __VA_ARGS__))
|
||||
#define _MEOJSON_FOR_EACH_9(pred, x, ...) pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_8(pred, __VA_ARGS__))
|
||||
#define _MEOJSON_FOR_EACH_10(pred, x, ...) pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_9(pred, __VA_ARGS__))
|
||||
#define _MEOJSON_FOR_EACH_11(pred, x, ...) pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_10(pred, __VA_ARGS__))
|
||||
#define _MEOJSON_FOR_EACH_12(pred, x, ...) pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_11(pred, __VA_ARGS__))
|
||||
#define _MEOJSON_FOR_EACH_13(pred, x, ...) pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_12(pred, __VA_ARGS__))
|
||||
#define _MEOJSON_FOR_EACH_14(pred, x, ...) pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_13(pred, __VA_ARGS__))
|
||||
#define _MEOJSON_FOR_EACH_15(pred, x, ...) pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_14(pred, __VA_ARGS__))
|
||||
#define _MEOJSON_FOR_EACH_16(pred, x, ...) pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_15(pred, __VA_ARGS__))
|
||||
#define _MEOJSON_FOR_EACH_17(pred, x, ...) pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_16(pred, __VA_ARGS__))
|
||||
#define _MEOJSON_FOR_EACH_18(pred, x, ...) pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_17(pred, __VA_ARGS__))
|
||||
#define _MEOJSON_FOR_EACH_19(pred, x, ...) pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_18(pred, __VA_ARGS__))
|
||||
#define _MEOJSON_FOR_EACH_20(pred, x, ...) pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_19(pred, __VA_ARGS__))
|
||||
#define _MEOJSON_FOR_EACH_21(pred, x, ...) pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_20(pred, __VA_ARGS__))
|
||||
#define _MEOJSON_FOR_EACH_22(pred, x, ...) pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_21(pred, __VA_ARGS__))
|
||||
#define _MEOJSON_FOR_EACH_23(pred, x, ...) pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_22(pred, __VA_ARGS__))
|
||||
#define _MEOJSON_FOR_EACH_24(pred, x, ...) pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_23(pred, __VA_ARGS__))
|
||||
#define _MEOJSON_FOR_EACH_25(pred, x, ...) pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_24(pred, __VA_ARGS__))
|
||||
#define _MEOJSON_FOR_EACH_26(pred, x, ...) pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_25(pred, __VA_ARGS__))
|
||||
#define _MEOJSON_FOR_EACH_27(pred, x, ...) pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_26(pred, __VA_ARGS__))
|
||||
#define _MEOJSON_FOR_EACH_28(pred, x, ...) pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_27(pred, __VA_ARGS__))
|
||||
#define _MEOJSON_FOR_EACH_29(pred, x, ...) pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_28(pred, __VA_ARGS__))
|
||||
#define _MEOJSON_FOR_EACH_30(pred, x, ...) pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_29(pred, __VA_ARGS__))
|
||||
#define _MEOJSON_FOR_EACH_31(pred, x, ...) pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_30(pred, __VA_ARGS__))
|
||||
#define _MEOJSON_FOR_EACH_32(pred, x, ...) pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_31(pred, __VA_ARGS__))
|
||||
#define _MEOJSON_FOR_EACH_33(pred, x, ...) pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_32(pred, __VA_ARGS__))
|
||||
#define _MEOJSON_FOR_EACH_34(pred, x, ...) pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_33(pred, __VA_ARGS__))
|
||||
#define _MEOJSON_FOR_EACH_35(pred, x, ...) pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_34(pred, __VA_ARGS__))
|
||||
#define _MEOJSON_FOR_EACH_36(pred, x, ...) pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_35(pred, __VA_ARGS__))
|
||||
#define _MEOJSON_FOR_EACH_37(pred, x, ...) pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_36(pred, __VA_ARGS__))
|
||||
#define _MEOJSON_FOR_EACH_38(pred, x, ...) pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_37(pred, __VA_ARGS__))
|
||||
#define _MEOJSON_FOR_EACH_39(pred, x, ...) pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_38(pred, __VA_ARGS__))
|
||||
#define _MEOJSON_FOR_EACH_40(pred, x, ...) pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_39(pred, __VA_ARGS__))
|
||||
#define _MEOJSON_FOR_EACH_41(pred, x, ...) pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_40(pred, __VA_ARGS__))
|
||||
#define _MEOJSON_FOR_EACH_42(pred, x, ...) pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_41(pred, __VA_ARGS__))
|
||||
#define _MEOJSON_FOR_EACH_43(pred, x, ...) pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_42(pred, __VA_ARGS__))
|
||||
#define _MEOJSON_FOR_EACH_44(pred, x, ...) pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_43(pred, __VA_ARGS__))
|
||||
#define _MEOJSON_FOR_EACH_45(pred, x, ...) pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_44(pred, __VA_ARGS__))
|
||||
#define _MEOJSON_FOR_EACH_46(pred, x, ...) pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_45(pred, __VA_ARGS__))
|
||||
#define _MEOJSON_FOR_EACH_47(pred, x, ...) pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_46(pred, __VA_ARGS__))
|
||||
#define _MEOJSON_FOR_EACH_48(pred, x, ...) pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_47(pred, __VA_ARGS__))
|
||||
#define _MEOJSON_FOR_EACH_49(pred, x, ...) pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_48(pred, __VA_ARGS__))
|
||||
#define _MEOJSON_FOR_EACH_50(pred, x, ...) pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_49(pred, __VA_ARGS__))
|
||||
#define _MEOJSON_FOR_EACH_51(pred, x, ...) pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_50(pred, __VA_ARGS__))
|
||||
#define _MEOJSON_FOR_EACH_52(pred, x, ...) pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_51(pred, __VA_ARGS__))
|
||||
#define _MEOJSON_FOR_EACH_53(pred, x, ...) pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_52(pred, __VA_ARGS__))
|
||||
#define _MEOJSON_FOR_EACH_54(pred, x, ...) pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_53(pred, __VA_ARGS__))
|
||||
#define _MEOJSON_FOR_EACH_55(pred, x, ...) pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_54(pred, __VA_ARGS__))
|
||||
#define _MEOJSON_FOR_EACH_56(pred, x, ...) pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_55(pred, __VA_ARGS__))
|
||||
#define _MEOJSON_FOR_EACH_57(pred, x, ...) pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_56(pred, __VA_ARGS__))
|
||||
#define _MEOJSON_FOR_EACH_58(pred, x, ...) pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_57(pred, __VA_ARGS__))
|
||||
#define _MEOJSON_FOR_EACH_59(pred, x, ...) pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_58(pred, __VA_ARGS__))
|
||||
#define _MEOJSON_FOR_EACH_60(pred, x, ...) pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_59(pred, __VA_ARGS__))
|
||||
#define _MEOJSON_FOR_EACH_61(pred, x, ...) pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_60(pred, __VA_ARGS__))
|
||||
#define _MEOJSON_FOR_EACH_62(pred, x, ...) pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_61(pred, __VA_ARGS__))
|
||||
#define _MEOJSON_FOR_EACH_63(pred, x, ...) pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_62(pred, __VA_ARGS__))
|
||||
#define _MEOJSON_FOR_EACH_64(pred, x, ...) pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_63(pred, __VA_ARGS__))
|
||||
#define _MEOJSON_FOR_EACH_2(pred, x, ...) \
|
||||
pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_1(pred, __VA_ARGS__))
|
||||
#define _MEOJSON_FOR_EACH_3(pred, x, ...) \
|
||||
pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_2(pred, __VA_ARGS__))
|
||||
#define _MEOJSON_FOR_EACH_4(pred, x, ...) \
|
||||
pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_3(pred, __VA_ARGS__))
|
||||
#define _MEOJSON_FOR_EACH_5(pred, x, ...) \
|
||||
pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_4(pred, __VA_ARGS__))
|
||||
#define _MEOJSON_FOR_EACH_6(pred, x, ...) \
|
||||
pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_5(pred, __VA_ARGS__))
|
||||
#define _MEOJSON_FOR_EACH_7(pred, x, ...) \
|
||||
pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_6(pred, __VA_ARGS__))
|
||||
#define _MEOJSON_FOR_EACH_8(pred, x, ...) \
|
||||
pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_7(pred, __VA_ARGS__))
|
||||
#define _MEOJSON_FOR_EACH_9(pred, x, ...) \
|
||||
pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_8(pred, __VA_ARGS__))
|
||||
#define _MEOJSON_FOR_EACH_10(pred, x, ...) \
|
||||
pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_9(pred, __VA_ARGS__))
|
||||
#define _MEOJSON_FOR_EACH_11(pred, x, ...) \
|
||||
pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_10(pred, __VA_ARGS__))
|
||||
#define _MEOJSON_FOR_EACH_12(pred, x, ...) \
|
||||
pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_11(pred, __VA_ARGS__))
|
||||
#define _MEOJSON_FOR_EACH_13(pred, x, ...) \
|
||||
pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_12(pred, __VA_ARGS__))
|
||||
#define _MEOJSON_FOR_EACH_14(pred, x, ...) \
|
||||
pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_13(pred, __VA_ARGS__))
|
||||
#define _MEOJSON_FOR_EACH_15(pred, x, ...) \
|
||||
pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_14(pred, __VA_ARGS__))
|
||||
#define _MEOJSON_FOR_EACH_16(pred, x, ...) \
|
||||
pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_15(pred, __VA_ARGS__))
|
||||
#define _MEOJSON_FOR_EACH_17(pred, x, ...) \
|
||||
pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_16(pred, __VA_ARGS__))
|
||||
#define _MEOJSON_FOR_EACH_18(pred, x, ...) \
|
||||
pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_17(pred, __VA_ARGS__))
|
||||
#define _MEOJSON_FOR_EACH_19(pred, x, ...) \
|
||||
pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_18(pred, __VA_ARGS__))
|
||||
#define _MEOJSON_FOR_EACH_20(pred, x, ...) \
|
||||
pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_19(pred, __VA_ARGS__))
|
||||
#define _MEOJSON_FOR_EACH_21(pred, x, ...) \
|
||||
pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_20(pred, __VA_ARGS__))
|
||||
#define _MEOJSON_FOR_EACH_22(pred, x, ...) \
|
||||
pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_21(pred, __VA_ARGS__))
|
||||
#define _MEOJSON_FOR_EACH_23(pred, x, ...) \
|
||||
pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_22(pred, __VA_ARGS__))
|
||||
#define _MEOJSON_FOR_EACH_24(pred, x, ...) \
|
||||
pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_23(pred, __VA_ARGS__))
|
||||
#define _MEOJSON_FOR_EACH_25(pred, x, ...) \
|
||||
pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_24(pred, __VA_ARGS__))
|
||||
#define _MEOJSON_FOR_EACH_26(pred, x, ...) \
|
||||
pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_25(pred, __VA_ARGS__))
|
||||
#define _MEOJSON_FOR_EACH_27(pred, x, ...) \
|
||||
pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_26(pred, __VA_ARGS__))
|
||||
#define _MEOJSON_FOR_EACH_28(pred, x, ...) \
|
||||
pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_27(pred, __VA_ARGS__))
|
||||
#define _MEOJSON_FOR_EACH_29(pred, x, ...) \
|
||||
pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_28(pred, __VA_ARGS__))
|
||||
#define _MEOJSON_FOR_EACH_30(pred, x, ...) \
|
||||
pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_29(pred, __VA_ARGS__))
|
||||
#define _MEOJSON_FOR_EACH_31(pred, x, ...) \
|
||||
pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_30(pred, __VA_ARGS__))
|
||||
#define _MEOJSON_FOR_EACH_32(pred, x, ...) \
|
||||
pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_31(pred, __VA_ARGS__))
|
||||
#define _MEOJSON_FOR_EACH_33(pred, x, ...) \
|
||||
pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_32(pred, __VA_ARGS__))
|
||||
#define _MEOJSON_FOR_EACH_34(pred, x, ...) \
|
||||
pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_33(pred, __VA_ARGS__))
|
||||
#define _MEOJSON_FOR_EACH_35(pred, x, ...) \
|
||||
pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_34(pred, __VA_ARGS__))
|
||||
#define _MEOJSON_FOR_EACH_36(pred, x, ...) \
|
||||
pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_35(pred, __VA_ARGS__))
|
||||
#define _MEOJSON_FOR_EACH_37(pred, x, ...) \
|
||||
pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_36(pred, __VA_ARGS__))
|
||||
#define _MEOJSON_FOR_EACH_38(pred, x, ...) \
|
||||
pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_37(pred, __VA_ARGS__))
|
||||
#define _MEOJSON_FOR_EACH_39(pred, x, ...) \
|
||||
pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_38(pred, __VA_ARGS__))
|
||||
#define _MEOJSON_FOR_EACH_40(pred, x, ...) \
|
||||
pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_39(pred, __VA_ARGS__))
|
||||
#define _MEOJSON_FOR_EACH_41(pred, x, ...) \
|
||||
pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_40(pred, __VA_ARGS__))
|
||||
#define _MEOJSON_FOR_EACH_42(pred, x, ...) \
|
||||
pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_41(pred, __VA_ARGS__))
|
||||
#define _MEOJSON_FOR_EACH_43(pred, x, ...) \
|
||||
pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_42(pred, __VA_ARGS__))
|
||||
#define _MEOJSON_FOR_EACH_44(pred, x, ...) \
|
||||
pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_43(pred, __VA_ARGS__))
|
||||
#define _MEOJSON_FOR_EACH_45(pred, x, ...) \
|
||||
pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_44(pred, __VA_ARGS__))
|
||||
#define _MEOJSON_FOR_EACH_46(pred, x, ...) \
|
||||
pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_45(pred, __VA_ARGS__))
|
||||
#define _MEOJSON_FOR_EACH_47(pred, x, ...) \
|
||||
pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_46(pred, __VA_ARGS__))
|
||||
#define _MEOJSON_FOR_EACH_48(pred, x, ...) \
|
||||
pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_47(pred, __VA_ARGS__))
|
||||
#define _MEOJSON_FOR_EACH_49(pred, x, ...) \
|
||||
pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_48(pred, __VA_ARGS__))
|
||||
#define _MEOJSON_FOR_EACH_50(pred, x, ...) \
|
||||
pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_49(pred, __VA_ARGS__))
|
||||
#define _MEOJSON_FOR_EACH_51(pred, x, ...) \
|
||||
pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_50(pred, __VA_ARGS__))
|
||||
#define _MEOJSON_FOR_EACH_52(pred, x, ...) \
|
||||
pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_51(pred, __VA_ARGS__))
|
||||
#define _MEOJSON_FOR_EACH_53(pred, x, ...) \
|
||||
pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_52(pred, __VA_ARGS__))
|
||||
#define _MEOJSON_FOR_EACH_54(pred, x, ...) \
|
||||
pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_53(pred, __VA_ARGS__))
|
||||
#define _MEOJSON_FOR_EACH_55(pred, x, ...) \
|
||||
pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_54(pred, __VA_ARGS__))
|
||||
#define _MEOJSON_FOR_EACH_56(pred, x, ...) \
|
||||
pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_55(pred, __VA_ARGS__))
|
||||
#define _MEOJSON_FOR_EACH_57(pred, x, ...) \
|
||||
pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_56(pred, __VA_ARGS__))
|
||||
#define _MEOJSON_FOR_EACH_58(pred, x, ...) \
|
||||
pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_57(pred, __VA_ARGS__))
|
||||
#define _MEOJSON_FOR_EACH_59(pred, x, ...) \
|
||||
pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_58(pred, __VA_ARGS__))
|
||||
#define _MEOJSON_FOR_EACH_60(pred, x, ...) \
|
||||
pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_59(pred, __VA_ARGS__))
|
||||
#define _MEOJSON_FOR_EACH_61(pred, x, ...) \
|
||||
pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_60(pred, __VA_ARGS__))
|
||||
#define _MEOJSON_FOR_EACH_62(pred, x, ...) \
|
||||
pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_61(pred, __VA_ARGS__))
|
||||
#define _MEOJSON_FOR_EACH_63(pred, x, ...) \
|
||||
pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_62(pred, __VA_ARGS__))
|
||||
#define _MEOJSON_FOR_EACH_64(pred, x, ...) \
|
||||
pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_63(pred, __VA_ARGS__))
|
||||
|
||||
#define _MEOJSON_ARG_COUNT(...) \
|
||||
_MEOJSON_EXPAND(_MEOJSON_ARG_COUNT1(0, ##__VA_ARGS__, 64, 63, 62, 61, 60, 59, 58, 57, 56, 55, 54, 53, 52, 51, 50, \
|
||||
49, 48, 47, 46, 45, 44, 43, 42, 41, 40, 39, 38, 37, 36, 35, 34, 33, 32, 31, \
|
||||
30, 29, 28, 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15, 14, 13, 12, \
|
||||
11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0))
|
||||
#define _MEOJSON_ARG_COUNT1(_0, _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, N, ...) \
|
||||
#define _MEOJSON_ARG_COUNT(...) \
|
||||
_MEOJSON_EXPAND(_MEOJSON_ARG_COUNT1( \
|
||||
0, \
|
||||
##__VA_ARGS__, \
|
||||
64, \
|
||||
63, \
|
||||
62, \
|
||||
61, \
|
||||
60, \
|
||||
59, \
|
||||
58, \
|
||||
57, \
|
||||
56, \
|
||||
55, \
|
||||
54, \
|
||||
53, \
|
||||
52, \
|
||||
51, \
|
||||
50, \
|
||||
49, \
|
||||
48, \
|
||||
47, \
|
||||
46, \
|
||||
45, \
|
||||
44, \
|
||||
43, \
|
||||
42, \
|
||||
41, \
|
||||
40, \
|
||||
39, \
|
||||
38, \
|
||||
37, \
|
||||
36, \
|
||||
35, \
|
||||
34, \
|
||||
33, \
|
||||
32, \
|
||||
31, \
|
||||
30, \
|
||||
29, \
|
||||
28, \
|
||||
27, \
|
||||
26, \
|
||||
25, \
|
||||
24, \
|
||||
23, \
|
||||
22, \
|
||||
21, \
|
||||
20, \
|
||||
19, \
|
||||
18, \
|
||||
17, \
|
||||
16, \
|
||||
15, \
|
||||
14, \
|
||||
13, \
|
||||
12, \
|
||||
11, \
|
||||
10, \
|
||||
9, \
|
||||
8, \
|
||||
7, \
|
||||
6, \
|
||||
5, \
|
||||
4, \
|
||||
3, \
|
||||
2, \
|
||||
1, \
|
||||
0))
|
||||
#define _MEOJSON_ARG_COUNT1( \
|
||||
_0, \
|
||||
_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, \
|
||||
N, \
|
||||
...) \
|
||||
N
|
||||
|
||||
#define _MEOJSON_FOR_EACH_(N, pred, ...) _MEOJSON_EXPAND(_MEOJSON_CONCATENATE(_MEOJSON_FOR_EACH_, N)(pred, __VA_ARGS__))
|
||||
#define _MEOJSON_FOR_EACH_(N, pred, ...) \
|
||||
_MEOJSON_EXPAND(_MEOJSON_CONCATENATE(_MEOJSON_FOR_EACH_, N)(pred, __VA_ARGS__))
|
||||
#define _MEOJSON_FOR_EACH(pred, ...) \
|
||||
_MEOJSON_EXPAND(_MEOJSON_FOR_EACH_(_MEOJSON_EXPAND(_MEOJSON_ARG_COUNT(__VA_ARGS__)), pred, __VA_ARGS__))
|
||||
_MEOJSON_EXPAND( \
|
||||
_MEOJSON_FOR_EACH_(_MEOJSON_EXPAND(_MEOJSON_ARG_COUNT(__VA_ARGS__)), pred, __VA_ARGS__))
|
||||
|
||||
#define _MEOJSON_VARNAME(x) _MEOJSON_CONCATENATE(_meojson_jsonization_, x)
|
||||
#define _MEOJSON_KEY_VALUE(x) _MEOJSON_STRINGIZE(x), x,
|
||||
} // namespace json::_private_macro
|
||||
|
||||
#define MEO_TOJSON(...) \
|
||||
json::value to_json() const \
|
||||
{ \
|
||||
return json::_jsonization_helper::dumper()._to_json(_MEOJSON_EXPAND( \
|
||||
_MEOJSON_FOR_EACH(_MEOJSON_KEY_VALUE, __VA_ARGS__)) json::_jsonization_helper::va_arg_end {}); \
|
||||
#define MEO_TOJSON(...) \
|
||||
json::value to_json() const \
|
||||
{ \
|
||||
return json::_jsonization_helper::dumper()._to_json( \
|
||||
_MEOJSON_EXPAND(_MEOJSON_FOR_EACH(_MEOJSON_KEY_VALUE, __VA_ARGS__)) \
|
||||
json::_jsonization_helper::va_arg_end {}); \
|
||||
}
|
||||
|
||||
#define MEO_CHECKJSON(...) \
|
||||
bool check_json(const json::value& _MEOJSON_VARNAME(in)) const \
|
||||
{ \
|
||||
std::string _MEOJSON_VARNAME(error_key); \
|
||||
return check_json(_MEOJSON_VARNAME(in), _MEOJSON_VARNAME(error_key)); \
|
||||
} \
|
||||
bool check_json(const json::value& _MEOJSON_VARNAME(in), std::string& _MEOJSON_VARNAME(error_key)) const \
|
||||
{ \
|
||||
return json::_jsonization_helper::checker()._check_json( \
|
||||
_MEOJSON_VARNAME(in), _MEOJSON_VARNAME(error_key), \
|
||||
_MEOJSON_EXPAND(_MEOJSON_FOR_EACH(_MEOJSON_KEY_VALUE, __VA_ARGS__)) \
|
||||
json::_jsonization_helper::va_arg_end {}); \
|
||||
#define MEO_CHECKJSON(...) \
|
||||
bool check_json(const json::value& _MEOJSON_VARNAME(in)) const \
|
||||
{ \
|
||||
std::string _MEOJSON_VARNAME(error_key); \
|
||||
return check_json(_MEOJSON_VARNAME(in), _MEOJSON_VARNAME(error_key)); \
|
||||
} \
|
||||
bool check_json( \
|
||||
const json::value& _MEOJSON_VARNAME(in), \
|
||||
std::string& _MEOJSON_VARNAME(error_key)) const \
|
||||
{ \
|
||||
return json::_jsonization_helper::checker()._check_json( \
|
||||
_MEOJSON_VARNAME(in), \
|
||||
_MEOJSON_VARNAME(error_key), \
|
||||
_MEOJSON_EXPAND(_MEOJSON_FOR_EACH(_MEOJSON_KEY_VALUE, __VA_ARGS__)) \
|
||||
json::_jsonization_helper::va_arg_end {}); \
|
||||
}
|
||||
|
||||
#define MEO_FROMJSON(...) \
|
||||
bool from_json(const json::value& _MEOJSON_VARNAME(in)) \
|
||||
{ \
|
||||
std::string _MEOJSON_VARNAME(error_key); \
|
||||
return from_json(_MEOJSON_VARNAME(in), _MEOJSON_VARNAME(error_key)); \
|
||||
} \
|
||||
bool from_json(const json::value& _MEOJSON_VARNAME(in), std::string& _MEOJSON_VARNAME(error_key)) \
|
||||
{ \
|
||||
return json::_jsonization_helper::loader()._from_json( \
|
||||
_MEOJSON_VARNAME(in), _MEOJSON_VARNAME(error_key), \
|
||||
_MEOJSON_EXPAND(_MEOJSON_FOR_EACH(_MEOJSON_KEY_VALUE, __VA_ARGS__)) \
|
||||
json::_jsonization_helper::va_arg_end {}); \
|
||||
#define MEO_FROMJSON(...) \
|
||||
bool from_json(const json::value& _MEOJSON_VARNAME(in)) \
|
||||
{ \
|
||||
std::string _MEOJSON_VARNAME(error_key); \
|
||||
return from_json(_MEOJSON_VARNAME(in), _MEOJSON_VARNAME(error_key)); \
|
||||
} \
|
||||
bool from_json( \
|
||||
const json::value& _MEOJSON_VARNAME(in), \
|
||||
std::string& _MEOJSON_VARNAME(error_key)) \
|
||||
{ \
|
||||
return json::_jsonization_helper::loader()._from_json( \
|
||||
_MEOJSON_VARNAME(in), \
|
||||
_MEOJSON_VARNAME(error_key), \
|
||||
_MEOJSON_EXPAND(_MEOJSON_FOR_EACH(_MEOJSON_KEY_VALUE, __VA_ARGS__)) \
|
||||
json::_jsonization_helper::va_arg_end {}); \
|
||||
}
|
||||
|
||||
#define MEO_JSONIZATION(...) \
|
||||
|
||||
144
CHANGELOG.md
@@ -1,126 +1,48 @@
|
||||
## v5.8.0
|
||||
|
||||
### 演进之美,越进越美 | Highlight
|
||||
|
||||
本次版本更新可谓是大快所有人心的大好事,我们为你带来了以下新内容:
|
||||
|
||||
#### 重大变化 | BREAKING CHANGES
|
||||
|
||||
**如果你使用的是 MuMu 12 模拟器**,请检查你的【设置 - 连接设置】中的“连接地址”,如果使用的是 `7555` 端口,请参考 [文档](https://maa.plus/docs/zh-cn/manual/connection.html#%E6%A8%A1%E6%8B%9F%E5%99%A8%E7%9B%B8%E5%85%B3%E6%96%87%E6%A1%A3%E5%8F%8A%E5%8F%82%E8%80%83%E5%9C%B0%E5%9D%80) 修改成正确的端口。
|
||||
|
||||
如不这么做,可能会导致你从这个版本开始无法使用 MuMu 截图增强模式。
|
||||
|
||||
#### MuMu 截图增强模式优化
|
||||
|
||||
现在我们正式支持 MuMu 12 模拟器开启后台保活了,同时得益于此项和上面提到的优化,你也无需手动填写实例编号和屏幕编号了。
|
||||
|
||||
#### 自动检测连接设置
|
||||
|
||||
在这个版本,我们支持自动检测和填写连接设置:
|
||||
|
||||
1. MuMu 12 和雷电 9 模拟器支持自动检测模拟器安装路径;
|
||||
2. 蓝叠 5、MuMu 12、雷电 9、夜神、逍遥模拟器支持自动检测 ADB 路径、连接地址和连接配置(仅在只有单个模拟器运行时可用,多个模拟器同时运行时不可用)。
|
||||
|
||||
若检测失败,请尝试使用 UAC 管理员权限启动 MAA 并再次检测。若仍失败,则请参考[文档](https://maa.plus/docs/zh-cn/manual/connection.html)手动设置。
|
||||
|
||||
#### 资源版本可一键自行更新
|
||||
|
||||
还记得在不远的过去,我们禁用了自动更新资源版本。现在,我们为你实现了一键更新功能,在【设置 - 软件更新】处新增了“资源更新”按钮,只需一键即可更新资源版本,让你能在不更新 MAA 版本就能使用新活动的自动战斗功能。
|
||||
|
||||
至于为什么不恢复成自动更新呢,这绝对和该功能是通过下载 [MaaResource](https://github.com/MaaAssistantArknights/MaaResource) 仓库源代码压缩包再解压替换的本质无关。(对…对吗?)
|
||||
|
||||
如果你无法访问上面的仓库,那么这项功能可能与你无缘。如果你需要特殊的手法,建议查看【设置 - 软件更新】处的输入框。
|
||||
|
||||
顺带一提,本次版本,自带资源版本更新至 SideStory「追迹日落以西」。
|
||||
|
||||
#### 自动肉鸽优化
|
||||
|
||||
我们调整了相关逻辑,使得自动肉鸽功能更加好用,例如:适配了维娜 · 维多利亚、乌尔比安,调整了维什戴尔、维娜 · 维多利亚的优先级,优化了相关干员分组,等等。
|
||||
|
||||
----
|
||||
|
||||
以下是详细内容:
|
||||
## v5.16.5
|
||||
|
||||
### 新增 | New
|
||||
|
||||
* 新增server酱3的推送逻辑 (#10805) @ClozyA
|
||||
* GO 导航 @ABA2396
|
||||
* 自动战斗-战斗列表增加单任务作业查看 (#10764) @status102
|
||||
* 软件更新中添加手动更新资源版本 (#10877) @ABA2396
|
||||
* WpfGui限制单路径多实例 | restricted multi-instance under same MAA (#10869) @qwedc001
|
||||
* YostarEN BB navigation @Constrat
|
||||
* YostarKR BB navigation @HX3N
|
||||
* Mac新增基建配置 @hguandl
|
||||
* 特征匹配 (#10966) @status102
|
||||
* 绿票、黄票、活动商店 (#12586) @Daydreamer114 @status102 @ABA2396
|
||||
|
||||
### 改进 | Improved
|
||||
|
||||
* 支持mumu后台保活,通过包名获取display_id @ABA2396
|
||||
* IS Phantom Update 雕匠与石像.json (#10829) @Daydreamer114
|
||||
* 更新肉鸽 ew 优先级 (#10830) @Daydreamer114
|
||||
* 将萨米、萨卡兹肉鸽阵容完备度的 益达、玛恩纳、水陈 组调为2 (#10831) @Daydreamer114
|
||||
* RA加快开局教程对话 (#10824) @Daydreamer114
|
||||
* 降低萨米、萨卡兹肉鸽 维娜·维多利亚 招募优先级 (#10792) @Daydreamer114
|
||||
* 傀影肉鸽招募适配乌尔比安 (#10798) @Daydreamer114
|
||||
* 萨米、萨卡兹肉鸽招募适配维娜 · 维多利亚 (#10765) @Wangqiusu020820
|
||||
* 自动战斗自定义添加干员编队时按职业选择 @status102
|
||||
* 雷电截图增强支持自动检测模拟器安装路径 @ABA2396
|
||||
* 调整连战输出 @ABA2396
|
||||
* 肉鸽不期而遇退出检测加个重试 @status102
|
||||
|
||||
### 修复 | Fix
|
||||
|
||||
* b服支持多分辨率多 dpi 登录 (#10817) @ABA2396
|
||||
* 关卡导航失败 @ABA2396
|
||||
* 无法导航至关卡9-19刷理智 @ABA2396
|
||||
* 部分情况下信用购物因过度动画购买错误 (#10893) @Alan-Charred
|
||||
* 部分情况下信用购物因过度动画购买错误 @ABA2396
|
||||
* semicolon missing (#10892) @Alan-Charred
|
||||
* 部署/开技能后添加等待过度动画延迟,避免屏幕倾斜遇到的识别错误 @ABA2396
|
||||
* 获取信用及购物中不勾选访问好友也会执行 @ABA2396
|
||||
* 更换确认助战 roi 时填写值错误 (#10762) @Daydreamer114
|
||||
* 为随机借助战功能添加点击确认按钮的步骤 (#10757) @Alan-Charred
|
||||
* increase ROI size for Tales@RA@Craft fix #10742 @Constrat
|
||||
* 修复肉鸽阵容完备度中单个干员重复出现于多个干员组的问题 (#10806) @Daydreamer114
|
||||
* 公开招募检测 Tag 失败时尝试识别 <继续招募> 按钮 (#10846) @Alan-Charred @ABA2396 @Constrat @HX3N
|
||||
* 降低 肉鸽投资确认 模板匹配阈值 (#10864) @Daydreamer114
|
||||
* 自动编队无法选中特种标签页 @ABA2396
|
||||
* 官服切换账号识别问题 @ABA2396
|
||||
* b 服切换账号无法选择下拉列表中的中文名 @ABA2396
|
||||
* 维娜·维多利亚 OcrReplace (#10763, #10818) @Daydreamer114 @ABA2396
|
||||
* 修复维多利亚正则错误 (#10850) @Saratoga-Official
|
||||
* GO 识别错误 (#10844) @AnnAngela
|
||||
* 日服偶现无法开始行动 @ABA2396
|
||||
* update BB navigation for EX YostarEN @Constrat
|
||||
* YostarKR replaced StageFerociousPresageEnter.png to improve recognition score @HX3N
|
||||
* YostarJP ocr fix (#10780) @Manicsteiner
|
||||
* Update JP バベル (#10758) @wallsman
|
||||
* update YostarEN MallSiege template fix #10777 @Constrat
|
||||
* fix ROI box for babel EN OCR @swablueme
|
||||
* remove custom EnterInfrastSiege for YostarEN @Constrat
|
||||
* YostarKR tweak Sami StageEnterBattleAgain specificRect (#10767) @HX3N
|
||||
* YostarKR add ocrReplace on RecruitSupportConfirm (#10883) @HX3N
|
||||
* 修复MaaCore asst.log文件句柄泄露 (#12639) @status102
|
||||
* 修复了屎遇上手动覆盖文件的大聪明爆炸的问题 @ABA2396
|
||||
* 凹开局干员直升精二选项显示时机错误 @ABA2396
|
||||
* 连战次数乘号匹配失败 @status102
|
||||
* store underfunded ocr full match @Daydreamer114
|
||||
|
||||
### 文档 | Docs
|
||||
|
||||
* typo in[docs] 更新MuMu截图增强模式中端口的文本描述 (#10866) @lcebot
|
||||
* 更新 bug-issue 模板 (#10811) @Daydreamer114
|
||||
* 错误分类 changelog (#10887) @ABA2396
|
||||
* MuMu 截图增强适配后台保活&雷电截图增强文档 (#10783) @Rbqwow @HX3N @ABA2396
|
||||
* 明确文档中的 MacOS 称呼 (#10734) @Daydreamer114 @Rbqwow @Constrat
|
||||
* 修改文档匹配算法描述错误 @ABA2396
|
||||
* 更新文档(自动检测 雷电端口 截图增强) (#10753) @Rbqwow
|
||||
* 更新肉鸽文档 (#10807) @Daydreamer114
|
||||
* 更新MuMu截图增强模式中端口的文本描述 (#10851) @ClozyA
|
||||
* Mumu regex @status102
|
||||
* Issue 模板添加雷电截图增强相关 (#10754) @Rbqwow
|
||||
* fix issue-checker macGui regex (#10755) @Alan-Charred
|
||||
* Translated using Weblate (English (United States)) @weblate
|
||||
* 任务流color_scales注释优化 @status102
|
||||
|
||||
### 其他 | Other
|
||||
|
||||
* mumu display id error if startup ark manually (#10787) @MistEO
|
||||
* mumu display id error when ark not startup (#10786) @MistEO
|
||||
* 移除无效的try-catch @status102
|
||||
* 修复错误的`定时 7`分钟最大值 (#10804) @Rbqwow
|
||||
* 优化设置指引 @ABA2396
|
||||
* bump maa-cli to 0.5.1 (#10899) @wangl-cc
|
||||
* 添加日志 @ABA2396
|
||||
* 调整雷电自动检测支持端口 @ABA2396
|
||||
* Revert "ci: use runs/job instead of just runs for ResourceUpdater" @Constrat
|
||||
* yellow ticket items @Daydreamer114
|
||||
* ocrTask text @status102
|
||||
* Store@UnderfundedOCR @Daydreamer114
|
||||
* 再铲一屎 @status102
|
||||
* cache 移动逻辑 @ABA2396
|
||||
* ubuntu unused @status102
|
||||
* 铲屎 @status102
|
||||
* 指定类型 @status102
|
||||
* store loading @Daydreamer114
|
||||
* Revert "feat: 在肉鸽招募中增加m3作为群奶 (#12353)" @Saratoga-Official
|
||||
* 简化代码 @ABA2396
|
||||
* 提示补全 @status102
|
||||
* NumberReplace @status102
|
||||
* 再次调整官网细节 @MistEO
|
||||
* 调整官网标题 @MistEO
|
||||
* Revert "fix: github change string to int (#12574)" @Daydreamer114
|
||||
* 绿票、黄票、活动商店-国际服适配 (#12674) @Daydreamer114
|
||||
* mark @status102
|
||||
* 调整 UI 与 Core 版本不一致的解决方案提示 @ABA2396
|
||||
* 点击任意职业回正列表 @ABA2396
|
||||
* 基建先进行技能识别并返回列表首位,再清空选择 @ABA2396
|
||||
|
||||
@@ -44,10 +44,7 @@ if (MSVC)
|
||||
|
||||
set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>DLL")
|
||||
else ()
|
||||
target_compile_options(MaaCore PRIVATE "-Wall;-Werror;-Wextra;-Wpedantic;-Wno-missing-field-initializers")
|
||||
if (CMAKE_CXX_COMPILER_ID MATCHES "GNU" AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 13)
|
||||
target_compile_options(MaaCore PRIVATE "-Wno-restrict")
|
||||
endif()
|
||||
target_compile_options(MaaCore PRIVATE "-Wall;-Wextra;-Wpedantic")
|
||||
# LLVM clang 16 will failed with `error: no member named 'join' in namespace 'std::ranges::views'`, but Apple clang 16 won't
|
||||
# value defined in https://cmake.org/cmake/help/latest/variable/CMAKE_LANG_COMPILER_ID.html
|
||||
if ((CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang" AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 16)
|
||||
@@ -84,7 +81,8 @@ if (BUILD_TEST)
|
||||
target_link_libraries(test MaaCore)
|
||||
endif (BUILD_TEST)
|
||||
|
||||
find_package(OpenCV REQUIRED COMPONENTS core imgproc imgcodecs videoio)
|
||||
find_package(OpenCV REQUIRED COMPONENTS core imgproc imgcodecs videoio features2d)
|
||||
find_package(OpenCV QUIET COMPONENTS xfeatures2d)
|
||||
find_package(ZLIB REQUIRED)
|
||||
find_package(cpr CONFIG REQUIRED)
|
||||
|
||||
|
||||
77
DependencySetup_依赖库安装.bat
Normal file
@@ -0,0 +1,77 @@
|
||||
@echo off
|
||||
chcp 65001
|
||||
setlocal enabledelayedexpansion
|
||||
|
||||
:: 定义ANSI颜色代码
|
||||
for /f %%a in ('echo prompt $E^| cmd') do set "ESC=%%a"
|
||||
set "RESET=%ESC%[0m"
|
||||
set "GREEN=%ESC%[32m"
|
||||
set "RED=%ESC%[31m"
|
||||
set "YELLOW=%ESC%[33m"
|
||||
set "BLUE=%ESC%[34m"
|
||||
set "CYAN=%ESC%[36m"
|
||||
set "WHITE=%ESC%[37m"
|
||||
set "BOLD=%ESC%[1m"
|
||||
|
||||
:: 初始化错误标志
|
||||
set "ErrorOccurred=0"
|
||||
|
||||
openfiles >nul 2>&1
|
||||
if %errorlevel% neq 0 (
|
||||
echo %YELLOW%正在获取管理员权限...%RESET%
|
||||
echo %YELLOW%Obtaining administrator privileges...%RESET%
|
||||
powershell -Command "Start-Process cmd.exe -ArgumentList '/c %~dpnx0' -Verb RunAs"
|
||||
exit /b
|
||||
)
|
||||
|
||||
echo.
|
||||
echo %BLUE%========================================%RESET%
|
||||
echo %BOLD%%CYAN%正在安装 Microsoft Visual C++ Redistributable%RESET%
|
||||
echo %BOLD%%CYAN%Installing Microsoft Visual C++ Redistributable%RESET%
|
||||
echo %BLUE%========================================%RESET%
|
||||
echo.
|
||||
|
||||
winget install "Microsoft.VCRedist.2015+.x64" --override "/repair /passive /norestart" --uninstall-previous --accept-package-agreements --force
|
||||
if %errorlevel% neq 0 (
|
||||
echo.
|
||||
echo %BOLD%%RED%错误: Microsoft.VCRedist.2015+.x64 安装失败%RESET%
|
||||
echo %BOLD%%RED%Error: Microsoft.VCRedist.2015+.x64 installation failed%RESET%
|
||||
set "ErrorOccurred=1"
|
||||
)
|
||||
|
||||
echo.
|
||||
echo %BLUE%========================================%RESET%
|
||||
echo %BOLD%%CYAN%正在安装 .NET Desktop Runtime 8.0%RESET%
|
||||
echo %BOLD%%CYAN%Installing .NET Desktop Runtime 8.0%RESET%
|
||||
echo %BLUE%========================================%RESET%
|
||||
echo.
|
||||
|
||||
winget install "Microsoft.DotNet.DesktopRuntime.8" --override "/repair /passive /norestart" --uninstall-previous --accept-package-agreements --force
|
||||
if %errorlevel% neq 0 (
|
||||
echo.
|
||||
echo %BOLD%%RED%错误: Microsoft.DotNet.DesktopRuntime.8 安装失败%RESET%
|
||||
echo %BOLD%%RED%Error: Microsoft.DotNet.DesktopRuntime.8 installation failed%RESET%
|
||||
set "ErrorOccurred=1"
|
||||
)
|
||||
|
||||
echo.
|
||||
if %ErrorOccurred% equ 0 (
|
||||
echo %BOLD%%GREEN%运行库修复完成,请重启电脑后再次尝试运行 MAA。%RESET%
|
||||
echo %BOLD%%GREEN%The runtime library repair is complete. Please restart your computer and try running MAA again.%RESET%
|
||||
) else (
|
||||
echo %RED%========================================%RESET%
|
||||
echo %BOLD%%RED%运行库修复过程中出现错误%RESET%
|
||||
echo %BOLD%%RED%Errors occurred during runtime library repair%RESET%
|
||||
echo.
|
||||
echo %YELLOW%您可以尝试手动下载并安装以下组件:%RESET%
|
||||
echo %YELLOW%You can try to manually download and install the following components:%RESET%
|
||||
echo.
|
||||
echo %WHITE%Microsoft Visual C++ Redistributable:%RESET%
|
||||
echo %CYAN%https://aka.ms/vs/17/release/vc_redist.x64.exe%RESET%
|
||||
echo.
|
||||
echo %WHITE%.NET Desktop Runtime 8.0:%RESET%
|
||||
echo %CYAN%https://aka.ms/dotnet/8.0/windowsdesktop-runtime-win-x64.exe%RESET%
|
||||
echo %RED%========================================%RESET%
|
||||
)
|
||||
|
||||
pause
|
||||
@@ -1,4 +1,4 @@
|
||||
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
|
||||
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
|
||||
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=EN/@EntryIndexedValue">EN</s:String>
|
||||
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=KR/@EntryIndexedValue">KR</s:String>
|
||||
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=JP/@EntryIndexedValue">JP</s:String>
|
||||
@@ -30,7 +30,15 @@
|
||||
<s:String x:Key="/Default/CodeStyle/Naming/XamlNaming/Abbreviations/=SSS/@EntryIndexedValue">SSS</s:String>
|
||||
<s:String x:Key="/Default/CodeStyle/Naming/XamlNaming/Abbreviations/=WSA/@EntryIndexedValue">WSA</s:String>
|
||||
<s:String x:Key="/Default/CodeStyle/Naming/XamlNaming/Abbreviations/=XYAZ/@EntryIndexedValue">XYAZ</s:String>
|
||||
<s:Boolean x:Key="/Default/GrammarAndSpelling/GrammarChecking/Exceptions/=Github/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/GrammarAndSpelling/GrammarChecking/Exceptions/=_4E00_9375_8F2A/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/GrammarAndSpelling/GrammarChecking/Exceptions/=_591C_95F4_6A21_5F0F/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=acast/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=acfend/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=acguad/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=acpion/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=acspec/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=acsupo/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=advapi/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=Aero/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=Affero/@EntryIndexedValue">True</s:Boolean>
|
||||
@@ -46,11 +54,23 @@
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=Bilibili/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=Bluestacks/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=bsconsole/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=ccast/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=cdfend/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=cguard/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=Chayn/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=Chyan/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=cmedic/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=Collapsal/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=cpione/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=csnipe/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=cspec/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=csuppo/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=ctrler/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=desp/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=dnplayer/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=Ehem/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=esource/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=Eyjafjalla/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=Favourite/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=filetime/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=findstr/@EntryIndexedValue">True</s:Boolean>
|
||||
@@ -68,6 +88,7 @@
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=Infrast/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=Inited/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=iter/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=jsend/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=ldconsole/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=ldplayer/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=LD_0027s/@EntryIndexedValue">True</s:Boolean>
|
||||
@@ -77,8 +98,11 @@
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=ls_005B_0022sub/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=luestacks/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=maatouch/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=MAA_0027s/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=memuc/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=Minitouch/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=mirrorc/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=Mirrorchyan/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=Mizuki/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=Mumu/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=Nemu/@EntryIndexedValue">True</s:Boolean>
|
||||
@@ -87,6 +111,7 @@
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=netstat/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=Nonfriend/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=notstationed/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=objstr/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=oper/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=opers/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=Originite/@EntryIndexedValue">True</s:Boolean>
|
||||
@@ -102,32 +127,44 @@
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=ppidl/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=Prts/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=pwfi/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=qmsg/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=Raidian/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=rcast/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=rdfend/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=removelist/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=rguard/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=rmean/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=rmedic/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=Roguelike/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=rsnipe/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=Sami/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=Sarkaz/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=Screencap/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=sctp/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=serilog/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=Showminimized/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=Shownormal/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=Skland/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=specialaccess/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=spid/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=SSS/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=STGM/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=Stormeye/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=strlen/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=Stylet/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=subtask/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=Suppressions/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=Surtr/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=SWMINIMIZE/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=taskchain/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=Todays/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=txwy/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=ucrtbase/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=vmonitor/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=Webhook/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=XYAZ/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=Yahei/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=yituliu/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=Yostar/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=_0020_0020_0020wp_002ELength_0020/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=_0020_003D_0020stri/@EntryIndexedValue">True</s:Boolean></wpf:ResourceDictionary>
|
||||
|
||||
68
README.md
@@ -2,7 +2,7 @@
|
||||
|
||||
<div align="center">
|
||||
|
||||
<img alt="LOGO" src="./docs/.vuepress/public/image/maa-logo_512x512.png" width="256" height="256" />
|
||||
<img alt="LOGO" src="./docs/.vuepress/public/images/maa-logo_512x512.png" width="256" height="256" />
|
||||
|
||||
# MaaAssistantArknights
|
||||
|
||||
@@ -33,16 +33,20 @@ MAA 的意思是 MAA Assistant Arknights
|
||||
|
||||
基于图像识别技术,一键完成全部日常任务!
|
||||
|
||||
绝赞更新中 ✿✿ヽ(°▽°)ノ✿
|
||||
绝赞更新中 ✿✿ヽ(°▽°)ノ✿
|
||||
|
||||
</div>
|
||||
|
||||
## 下载与安装
|
||||
|
||||
请阅读 [文档](https://maa.plus/docs/zh-cn/manual/newbie.html) 后前往 [官网](https://maa.plus) 或 [Releases](https://github.com/MaaAssistantArknights/MaaAssistantArknights/releases) 下载,并参考 [新手上路](https://maa.plus/docs/zh-cn/manual/newbie.html) 进行安装。
|
||||
|
||||
## 亮点功能
|
||||
|
||||
- 刷理智,掉落识别及上传 [企鹅物流](https://penguin-stats.cn/),[一图流](https://ark.yituliu.cn/)
|
||||
- 智能基建换班,自动计算干员效率,单设施内最优解;同时也支持 [自定义排班](https://maa.plus/docs/zh-cn/protocol/base-scheduling-schema.html)
|
||||
- 自动公招,可选使用加急许可,一次全部刷完!公招数据自动上传 [企鹅物流](https://penguin-stats.cn/result/stage/recruit/recruit),[一图流](https://ark.yituliu.cn/survey/maarecruitdata)
|
||||
- 支持手动识别公招界面,方便对高星公招做出选择 ~~(你的这个高姿回费出的是推王呢还是推王呢)~~
|
||||
- 支持手动识别公招界面,方便对高星公招做出选择 ~~(你的这个高资回费出的是推王呢还是推王呢)~~
|
||||
- 支持识别干员列表,统计已有和未有干员及潜能,并在公招识别显示
|
||||
- 支持识别养成材料,并导出至 [企鹅物流刷图规划](https://penguin-stats.cn/planner)、[明日方舟工具箱](https://arkntools.app/#/material)、[ARK-NIGHTS 干员培养表](https://ark-nights.com/settings)
|
||||
- 访问好友、收取信用及购物、领取日常奖励等,一键全日常自动长草
|
||||
@@ -55,47 +59,31 @@ MAA 的意思是 MAA Assistant Arknights
|
||||
<details><summary>话不多说,看图!</summary>
|
||||
|
||||
<picture>
|
||||
<source media="(prefers-color-scheme: dark)" srcset="./docs/.vuepress/public/image/zh-cn/readme/1-dark.png">
|
||||
<img alt="zh1" src="./docs/.vuepress/public/image/zh-cn/readme/1-light.png">
|
||||
<source media="(prefers-color-scheme: dark)" srcset="./docs/.vuepress/public/images/zh-cn/readme/1-dark.png">
|
||||
<img alt="zh1" src="./docs/.vuepress/public/images/zh-cn/readme/1-light.png">
|
||||
</picture>
|
||||
<picture>
|
||||
<source media="(prefers-color-scheme: dark)" srcset="./docs/.vuepress/public/image/zh-cn/readme/2-dark.png">
|
||||
<img alt="zh2" src="./docs/.vuepress/public/image/zh-cn/readme/2-light.png">
|
||||
<source media="(prefers-color-scheme: dark)" srcset="./docs/.vuepress/public/images/zh-cn/readme/2-dark.png">
|
||||
<img alt="zh2" src="./docs/.vuepress/public/images/zh-cn/readme/2-light.png">
|
||||
</picture>
|
||||
<picture>
|
||||
<source media="(prefers-color-scheme: dark)" srcset="./docs/.vuepress/public/image/zh-cn/readme/3-dark.png">
|
||||
<img alt="zh3" src="./docs/.vuepress/public/image/zh-cn/readme/3-light.png">
|
||||
<source media="(prefers-color-scheme: dark)" srcset="./docs/.vuepress/public/images/zh-cn/readme/3-dark.png">
|
||||
<img alt="zh3" src="./docs/.vuepress/public/images/zh-cn/readme/3-light.png">
|
||||
</picture>
|
||||
<picture>
|
||||
<source media="(prefers-color-scheme: dark)" srcset="./docs/.vuepress/public/image/zh-cn/readme/4-dark.png">
|
||||
<img alt="zh4" src="./docs/.vuepress/public/image/zh-cn/readme/4-light.png">
|
||||
<source media="(prefers-color-scheme: dark)" srcset="./docs/.vuepress/public/images/zh-cn/readme/4-dark.png">
|
||||
<img alt="zh4" src="./docs/.vuepress/public/images/zh-cn/readme/4-light.png">
|
||||
</picture>
|
||||
|
||||
</details>
|
||||
|
||||
<!-- markdownlint-restore -->
|
||||
|
||||
## 下载地址
|
||||
|
||||
[官网](https://maa.plus) 或 [Releases](https://github.com/MaaAssistantArknights/MaaAssistantArknights/releases)
|
||||
|
||||
## 使用说明
|
||||
|
||||
### 基本说明
|
||||
### 功能介绍
|
||||
|
||||
请参阅 [新手上路](https://maa.plus/docs/zh-cn/manual/newbie.html) 与 [功能介绍](https://maa.plus/docs/zh-cn/manual/introduction/)。
|
||||
|
||||
### 常见问题
|
||||
|
||||
- 软件一打开就闪退;
|
||||
- 连接错误、不知道 ADB 路径怎么填写;
|
||||
- 连接成功了,但没反应;
|
||||
- 如何连接自定义端口;
|
||||
- 下载速度慢,且镜像站无法打开网页;
|
||||
- 下载到一半提示“登陆”/“鉴权”;
|
||||
- 连接正常,任务开始了,但是没反应。
|
||||
|
||||
请参阅 [常见问题](https://maa.plus/docs/zh-cn/manual/faq.html)。
|
||||
请参阅 [用户手册](https://maa.plus/docs/zh-cn/manual/)。
|
||||
|
||||
### 外服支持
|
||||
|
||||
@@ -113,10 +101,9 @@ MAA 支持命令行界面(CLI)操作,支持 Linux,macOS 和 Windows,
|
||||
**目前项目组非常缺前端大佬,若您有相关经验,欢迎加入我们!**
|
||||
|
||||
- 全新框架:[MaaFramework](https://github.com/MaaXYZ/MaaFramework)
|
||||
- 全新 GUI:[MaaX](https://github.com/MaaAssistantArknights/MaaX)
|
||||
- [作业站](https://prts.plus) 前端:[maa-copilot-frontend](https://github.com/MaaAssistantArknights/maa-copilot-frontend)
|
||||
- [作业站](https://prts.plus) 后端:[MaaBackendCenter](https://github.com/MaaAssistantArknights/MaaBackendCenter)
|
||||
- [官网](https://maa.plus):[前端](https://github.com/MaaAssistantArknights/maa-website)
|
||||
- [官网](https://maa.plus):[前端](website)
|
||||
- 深度学习:[MaaAI](https://github.com/MaaAssistantArknights/MaaAI)
|
||||
|
||||
### 多语言 (i18n)
|
||||
@@ -195,7 +182,7 @@ MAA 以中文(简体)为第一语言,翻译词条均以中文(简体)
|
||||
- ~~干员及基建数据:[PRTS Wiki](http://prts.wiki/)~~
|
||||
- 关卡数据:[企鹅物流数据统计](https://penguin-stats.cn/)
|
||||
- 游戏数据及资源:[明日方舟客户端素材](https://github.com/yuanyan3060/ArknightsGameResource)
|
||||
- 游戏数据:[《明日方舟》Yostar游戏数据](https://github.com/Kengxxiao/ArknightsGameData_YoStar)
|
||||
- 游戏数据:[《明日方舟》Yostar游戏数据](https://github.com/ArknightsAssets/ArknightsGamedata)
|
||||
|
||||
### 贡献/参与者
|
||||
|
||||
@@ -205,18 +192,23 @@ MAA 以中文(简体)为第一语言,翻译词条均以中文(简体)
|
||||
|
||||
## 声明
|
||||
|
||||
- 本软件使用 [GNU Affero General Public License v3.0 only](https://spdx.org/licenses/AGPL-3.0-only.html) 开源。
|
||||
- 本软件 logo 并非使用 AGPL 3.0 协议开源,[耗毛](https://weibo.com/u/3251357314)、vie 两位画师及软件全体开发者保留所有权利。不得以 AGPL 3.0 协议已授权为由在未经授权的情况下使用本软件 logo,不得在未经授权的情况下将本软件 logo 用于任何用途。
|
||||
- 本软件开源、免费,仅供学习交流使用。若您遇到商家使用本软件进行代练并收费,可能由于设备或时间等原因,产生的任何问题及后果与本软件无关。
|
||||
- 本软件使用 [GNU Affero General Public License v3.0 only](https://spdx.org/licenses/AGPL-3.0-only.html) 开源,并附带额外 [用户协议](https://github.com/MaaAssistantArknights/MaaAssistantArknights/blob/dev/terms-of-service.md)。
|
||||
- 本软件 logo 并非使用 AGPL 3.0 协议开源,[耗毛](https://weibo.com/u/3251357314)、vie 两位画师及软件全体开发者保留所有权利。不得以 AGPL 3.0 协议已授权为由在未经授权的情况下使用本软件 logo,不得在未经授权的情况下将本软件 logo 用于任何商业用途。
|
||||
- 本软件开源、免费,仅供学习交流使用。若您遇到商家使用本软件进行代练并收费,可能是设备与时间等费用,产生的问题及后果与本软件无关。
|
||||
|
||||
### DirectML 支持说明
|
||||
|
||||
本软件支持 GPU 加速功能,其在 Windows 平台上依赖于 Microsoft 提供的独立组件 [DirectML](https://learn.microsoft.com/en-us/windows/ai/directml/)。DirectML 并非本项目的开源部分,也不受 AGPL 3.0 的约束。为方便用户,我们随安装包附带了一个未经修改的 DirectML.dll 文件。如果您无需 GPU 加速功能,可安全删除该 DLL 文件,软件的核心功能仍可正常运行。
|
||||
|
||||
## 广告
|
||||
|
||||
用户交流 QQ 群:[MAA 使用 & 粥游交流 QQ 群](https://ota.maa.plus/MaaAssistantArknights/api/qqgroup/index.html)
|
||||
用户交流 QQ 群:[MAA 使用 & 粥游交流 QQ 群](https://api.maa.plus/MaaAssistantArknights/api/qqgroup/index.html)
|
||||
Discord 服务器: [邀请链接](https://discord.gg/23DfZ9uA4V)
|
||||
用户交流 TG 群:[Telegram 群](https://t.me/+Mgc2Zngr-hs3ZjU1)
|
||||
自动战斗 JSON 作业分享:[prts.plus](https://prts.plus)
|
||||
Bilibili 直播间:[直播间](https://live.bilibili.com/2808861) 每晚直播敲代码,近期很长一段时间应该都是在写本软件~
|
||||
Bilibili 直播间:[MrEO 直播间](https://live.bilibili.com/2808861) 直播敲代码 & [MAA-Official 直播间](https://live.bilibili.com/27548877) 游戏/杂谈
|
||||
|
||||
技术群(舟无关、禁水):[内卷地狱!(QQ 群)](https://jq.qq.com/?_wv=1027&k=ypbzXcA2)
|
||||
开发者群:[QQ 群](https://jq.qq.com/?_wv=1027&k=JM9oCk3C)
|
||||
开发者群:[QQ 群](https://jq.qq.com/?_wv=1027&k=JM9oCk3C)
|
||||
|
||||
如果觉得软件对你有帮助,帮忙点个 Star 吧!~(网页最上方右上角的小星星),这就是对我们最大的支持了!
|
||||
|
||||
@@ -7,12 +7,12 @@ if (BUILD_XCFRAMEWORK)
|
||||
|
||||
add_custom_command(OUTPUT OpenCV.xcframework
|
||||
COMMAND rm -rf OpenCV.xcframework
|
||||
COMMAND xcodebuild -create-xcframework -library "${PROJECT_SOURCE_DIR}/MaaDeps/runtime/${MAADEPS_TRIPLET}/libopencv_world4.407.dylib" -output OpenCV.xcframework
|
||||
COMMAND xcodebuild -create-xcframework -library "${PROJECT_SOURCE_DIR}/MaaDeps/runtime/${MAADEPS_TRIPLET}/libopencv_world4.408.dylib" -output OpenCV.xcframework
|
||||
)
|
||||
|
||||
add_custom_command(OUTPUT ONNXRuntime.xcframework
|
||||
COMMAND rm -rf ONNXRuntime.xcframework
|
||||
COMMAND xcodebuild -create-xcframework -library "${PROJECT_SOURCE_DIR}/MaaDeps/runtime/${MAADEPS_TRIPLET}/libonnxruntime.1.14.1.dylib" -output ONNXRuntime.xcframework
|
||||
COMMAND xcodebuild -create-xcframework -library "${PROJECT_SOURCE_DIR}/MaaDeps/runtime/${MAADEPS_TRIPLET}/libonnxruntime.1.18.0.dylib" -output ONNXRuntime.xcframework
|
||||
)
|
||||
|
||||
add_custom_command(OUTPUT fastdeploy_ppocr.xcframework
|
||||
|
||||
52
docs/.vuepress/components/LanguageDropdown.ts
Normal file
@@ -0,0 +1,52 @@
|
||||
import type { VNode } from "vue";
|
||||
import { defineComponent, h } from "vue";
|
||||
|
||||
import NavbarDropdown from "@theme-hope/modules/navbar/components/NavbarDropdown";
|
||||
import { I18nIcon } from "@theme-hope/modules/navbar/components/icons/index";
|
||||
import { useNavbarLanguageDropdown } from "@theme-hope/modules/navbar/composables/index";
|
||||
|
||||
export default defineComponent({
|
||||
name: "LanguageDropdown",
|
||||
|
||||
setup() {
|
||||
const dropdown = useNavbarLanguageDropdown();
|
||||
|
||||
const filteredDropdown = () => {
|
||||
if (!dropdown.value) return null;
|
||||
|
||||
const filteredConfig = { ...dropdown.value };
|
||||
|
||||
if (filteredConfig.children) {
|
||||
filteredConfig.children = filteredConfig.children.filter(item => item.link !== '/');
|
||||
}
|
||||
|
||||
return filteredConfig;
|
||||
};
|
||||
|
||||
//console.log("OldLanguageDropdown", dropdown.value);
|
||||
//console.log("NewLanguageDropdown", filteredDropdown());
|
||||
|
||||
return (): VNode | null =>
|
||||
dropdown.value
|
||||
? h(
|
||||
"div",
|
||||
{ class: "vp-nav-item" },
|
||||
h(
|
||||
NavbarDropdown,
|
||||
{ config: filteredDropdown() },
|
||||
{
|
||||
title: () =>
|
||||
h(I18nIcon, {
|
||||
"aria-label": filteredDropdown()?.ariaLabel,
|
||||
style: {
|
||||
width: "1rem",
|
||||
height: "1rem",
|
||||
verticalAlign: "middle",
|
||||
},
|
||||
}),
|
||||
},
|
||||
),
|
||||
)
|
||||
: null;
|
||||
},
|
||||
});
|
||||
@@ -1,8 +1,11 @@
|
||||
import { defineUserConfig } from "vuepress";
|
||||
import { getDirname, path } from "vuepress/utils";
|
||||
import { viteBundler } from "@vuepress/bundler-vite";
|
||||
import { googleAnalyticsPlugin } from "@vuepress/plugin-google-analytics";
|
||||
import Theme from "./theme";
|
||||
|
||||
const __dirname = getDirname(import.meta.url);
|
||||
|
||||
export default defineUserConfig({
|
||||
base: "/docs/",
|
||||
lang: "zh-CN",
|
||||
@@ -11,24 +14,29 @@ export default defineUserConfig({
|
||||
port: 3001,
|
||||
|
||||
locales: {
|
||||
"/": {
|
||||
lang: " ",
|
||||
title: " ",
|
||||
description: " ",
|
||||
},
|
||||
"/zh-cn/": {
|
||||
lang: "zh-CN",
|
||||
lang: "zh-cn",
|
||||
description: "文档",
|
||||
},
|
||||
"/zh-tw/": {
|
||||
lang: "zh-TW",
|
||||
lang: "zh-tw",
|
||||
description: "文件",
|
||||
},
|
||||
"/en-us/": {
|
||||
lang: "en-US",
|
||||
lang: "en-us",
|
||||
description: "Documentation",
|
||||
},
|
||||
"/ja-jp/": {
|
||||
lang: "ja-JP",
|
||||
lang: "ja-jp",
|
||||
description: "ドキュメンテーション",
|
||||
},
|
||||
"/ko-kr/": {
|
||||
lang: "ko-KR",
|
||||
lang: "ko-kr",
|
||||
description: "선적 서류 비치",
|
||||
},
|
||||
},
|
||||
@@ -41,6 +49,13 @@ export default defineUserConfig({
|
||||
|
||||
theme: Theme,
|
||||
|
||||
alias: {
|
||||
"@theme-hope/modules/navbar/components/LanguageDropdown": path.resolve(
|
||||
__dirname,
|
||||
"./components/LanguageDropdown.ts",
|
||||
),
|
||||
},
|
||||
|
||||
plugins: [
|
||||
googleAnalyticsPlugin({
|
||||
id: "G-FJQDKG394Z",
|
||||
|
||||
101
docs/.vuepress/public/files/MAA_Runtime_Fix_Pwsh.ps1
Normal file
@@ -0,0 +1,101 @@
|
||||
# This file MUST use GBK encoding, whatever the system language is.
|
||||
# You may do more testing, but at least it works like this for me.
|
||||
# Fuck Microsoft.
|
||||
# 修改请使用 GBK 编码保存。
|
||||
# 如果能用 UTF-8 保存而不乱码,那就去做,我实在是研究不明白微软的屎了。
|
||||
# 你或许想加一条 [Console]::OutputEncoding = [System.Text.Encoding]::UTF8 来解决问题。
|
||||
# 但很神奇的,这根本不管用,甚至还会让中文汉字渲染重叠在一起。
|
||||
# 我在 CMD 里面都能 chcp 65001 换成 UTF-8。
|
||||
# 微软什么时候能把 PowerShell 7 集成到系统里。
|
||||
# 我由衷的认为 Windows 中预装的 PowerShell 就是一坨屎,甚至不如 CMD。
|
||||
# 用 PowerShell 写这东西真成为了一盘醋包的饺子了。
|
||||
|
||||
# 检查 PowerShell 脚本运行策略
|
||||
# 我真理解不了这个运行策略的存在意义了,明明叫脚本运行策略,却可以用脚本修改。
|
||||
# 我既可以在不提权的情况下允许所有脚本运行,也可以直接启动一个运行所有脚本运行的会话。
|
||||
# 本脚本在测试时发现,在不修改策略且不提权的情况下也可以正常运行,只是在安装运行库时需要点安装程序的 UAC 弹窗。
|
||||
# 而不修改策略且提权时反而因为脚本策略运行不了了,这是什么品种的管理员权限。
|
||||
# $ExecutionPolicy = Get-ExecutionPolicy
|
||||
# if ($ExecutionPolicy -eq 'Restricted' -or $ExecutionPolicy -eq 'AllSigned') {
|
||||
# Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
|
||||
# Write-Host "已修改当前用户的 PowerShell 脚本运行策略为 RemoteSigned 以便运行此脚本。"
|
||||
# Write-Host "这只需运行一次,且理应不会产生较大的安全风险。"
|
||||
# Write-Host "如果您对此有疑虑,请在脚本运行结束后,在 PowerShell 中运行以下命令将策略值清空。"
|
||||
# Write-Host "Set-ExecutionPolicy -ExecutionPolicy Undefined -Scope CurrentUser"
|
||||
# Pause
|
||||
# }
|
||||
|
||||
# 获取 UAC 权限并启动一个 RemoteSigned 脚本策略会话
|
||||
If (-Not ([Security.Principal.WindowsPrincipal] [Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltinRole]::Administrator)) {
|
||||
Write-Host "正在获取管理员权限..."
|
||||
Start-Process powershell.exe "-ExecutionPolicy RemoteSigned -File `"$PSCommandPath`" -ArgumentList `"$PSCommandPath`"" -Verb RunAs
|
||||
Exit
|
||||
}
|
||||
|
||||
# 读取系统代理并应用
|
||||
$Internet_Settings = Get-ItemProperty -Path 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Internet Settings'
|
||||
if ($Internet_Settings.ProxyEnable -eq 1) {
|
||||
$env:HTTP_PROXY = "http://$($Internet_Settings.ProxyServer)"
|
||||
$env:HTTPS_PROXY = "http://$($Internet_Settings.ProxyServer)"
|
||||
Write-Host "已应用系统代理:$($Internet_Settings.ProxyServer)。"
|
||||
}
|
||||
# else {
|
||||
# Write-Host "未启用系统代理。"
|
||||
# }
|
||||
Remove-Variable -Name Internet_Settings
|
||||
|
||||
# 新建下载用临时文件夹
|
||||
New-Item -Path "$env:TEMP" -Name "MAA_Runtime_Fix_Pwsh" -ItemType "Directory" | Out-Null
|
||||
|
||||
# 使用 BITS 下载运行库安装包
|
||||
Write-Host "正在下载运行库安装包..."
|
||||
# Start-Sleep -Seconds 1
|
||||
Start-BitsTransfer -Source "https://aka.ms/vs/17/release/vc_redist.x64.exe" -Destination "$env:TEMP\MAA_Runtime_Fix_Pwsh\vc_redist.x64.exe"
|
||||
Start-BitsTransfer -Source "https://builds.dotnet.microsoft.com/dotnet/WindowsDesktop/8.0.11/windowsdesktop-runtime-8.0.11-win-x64.exe" -Destination "$env:TEMP\MAA_Runtime_Fix_Pwsh\windowsdesktop-runtime-8.0.11-win-x64.exe"
|
||||
|
||||
# 卸载 vc++ 和 dotnet8
|
||||
Write-Host ""
|
||||
Write-Host "尝试调用 WinGet 卸载已安装的运行库..."
|
||||
winget uninstall "Microsoft.VCRedist.2015+.x64" "Microsoft.DotNet.DesktopRuntime.8" --force --all-versions
|
||||
|
||||
# 安装 vc++
|
||||
Write-Host ""
|
||||
Write-Host "正在安装/修复 Microsoft Visual C++ 可再发行程序包..."
|
||||
$vcProcess = Start-Process "$env:TEMP\MAA_Runtime_Fix_Pwsh\vc_redist.x64.exe" -ArgumentList '/repair', '/passive', '/norestart' -PassThru
|
||||
$vcProcess.WaitForExit()
|
||||
|
||||
# 安装 dotnet8
|
||||
Write-Host "正在安装/修复 .NET 桌面运行时 8..."
|
||||
$dotnetProcess = Start-Process "$env:TEMP\MAA_Runtime_Fix_Pwsh\windowsdesktop-runtime-8.0.11-win-x64.exe" -ArgumentList '/repair', '/passive', '/norestart' -PassThru
|
||||
$dotnetProcess.WaitForExit()
|
||||
|
||||
# 删除临时文件夹
|
||||
Write-Host ""
|
||||
Write-Host "正在清理临时文件..."
|
||||
Remove-Item -Path "$env:TEMP\MAA_Runtime_Fix_Pwsh" -Recurse -Force
|
||||
|
||||
Write-Host "运行库修复完成,请再次尝试运行 MAA。"
|
||||
Write-Host ""
|
||||
Pause
|
||||
|
||||
# 使用 winget 安装/更新运行库并卸载旧版本
|
||||
# winget install "Microsoft.VCRedist.2015+.x64" "Microsoft.DotNet.DesktopRuntime.8" --uninstall-previous --accept-package-agreements
|
||||
|
||||
# 使用 winget 下载运行库安装包
|
||||
# winget download --id "Microsoft.VCRedist.2015+.x64" -d "$env:TEMP\MAA_Runtime_Fix_Pwsh\"
|
||||
# winget download --id "Microsoft.DotNet.DesktopRuntime.8" -d "$env:TEMP\MAA_Runtime_Fix_Pwsh\"
|
||||
|
||||
# 不使用 winget 卸载 vc++
|
||||
# 会进行卸载 但是卸不掉
|
||||
# Get-Package -Name "Microsoft Visual C++ 2015-2022 Redistributable (x64) - *" | Uninstall-Package -Force
|
||||
|
||||
# 不使用 winget 卸载 dotnet8
|
||||
# 会进行卸载 但是卸不掉
|
||||
# Get-Package -Name "Microsoft Windows Desktop Runtime - 8.* (x64)" | Uninstall-Package -Force
|
||||
|
||||
# 下载安装包那里注释了一个睡一秒是因为本来下载文件的那个进度条会把上面输出过的所有内容都覆盖掉,上来就只能看到个下载进度条,别的啥也看不到。
|
||||
# 但当我去掉新建文件夹时输出的一大坨东西之后,这行就能露出来了。
|
||||
# 我建议每个人都去看一下 PowerShell 的 New-Item 新建文件夹能输出多大一坨玩意。
|
||||
# 还有 PowerShell 弱智一样的进度条显示机制,非得搞个固定不透明一大坨的浮窗上去干什么,就不能和别人一样在命令底部显示吗。
|
||||
|
||||
# 再用 Pwsh 写脚本我就是傻逼。
|
||||
|
Before Width: | Height: | Size: 691 KiB After Width: | Height: | Size: 691 KiB |
|
Before Width: | Height: | Size: 46 KiB After Width: | Height: | Size: 46 KiB |
|
Before Width: | Height: | Size: 42 KiB After Width: | Height: | Size: 42 KiB |
|
Before Width: | Height: | Size: 42 KiB After Width: | Height: | Size: 42 KiB |
|
Before Width: | Height: | Size: 38 KiB After Width: | Height: | Size: 38 KiB |
|
Before Width: | Height: | Size: 42 KiB After Width: | Height: | Size: 42 KiB |
|
Before Width: | Height: | Size: 40 KiB After Width: | Height: | Size: 40 KiB |
|
Before Width: | Height: | Size: 71 KiB After Width: | Height: | Size: 71 KiB |
|
Before Width: | Height: | Size: 64 KiB After Width: | Height: | Size: 64 KiB |
|
Before Width: | Height: | Size: 420 KiB After Width: | Height: | Size: 420 KiB |
|
Before Width: | Height: | Size: 301 KiB After Width: | Height: | Size: 301 KiB |
|
Before Width: | Height: | Size: 34 KiB After Width: | Height: | Size: 34 KiB |
|
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 20 KiB |
|
Before Width: | Height: | Size: 643 KiB After Width: | Height: | Size: 643 KiB |
|
Before Width: | Height: | Size: 26 KiB After Width: | Height: | Size: 26 KiB |
|
Before Width: | Height: | Size: 29 KiB After Width: | Height: | Size: 29 KiB |
|
Before Width: | Height: | Size: 266 KiB After Width: | Height: | Size: 266 KiB |
|
Before Width: | Height: | Size: 429 KiB After Width: | Height: | Size: 429 KiB |
|
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 27 KiB After Width: | Height: | Size: 27 KiB |
|
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 1.0 KiB |
|
Before Width: | Height: | Size: 1018 B After Width: | Height: | Size: 1018 B |
|
Before Width: | Height: | Size: 59 KiB After Width: | Height: | Size: 59 KiB |
|
Before Width: | Height: | Size: 59 KiB After Width: | Height: | Size: 59 KiB |
|
Before Width: | Height: | Size: 63 KiB After Width: | Height: | Size: 63 KiB |
|
Before Width: | Height: | Size: 64 KiB After Width: | Height: | Size: 64 KiB |
|
Before Width: | Height: | Size: 83 KiB After Width: | Height: | Size: 83 KiB |
|
Before Width: | Height: | Size: 85 KiB After Width: | Height: | Size: 85 KiB |
|
Before Width: | Height: | Size: 86 KiB After Width: | Height: | Size: 86 KiB |
|
Before Width: | Height: | Size: 85 KiB After Width: | Height: | Size: 85 KiB |
|
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 15 KiB |
|
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 16 KiB |
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 13 KiB |
|
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 22 KiB |
|
Before Width: | Height: | Size: 23 KiB After Width: | Height: | Size: 23 KiB |
|
Before Width: | Height: | Size: 77 KiB After Width: | Height: | Size: 77 KiB |
|
Before Width: | Height: | Size: 79 KiB After Width: | Height: | Size: 79 KiB |
|
Before Width: | Height: | Size: 79 KiB After Width: | Height: | Size: 79 KiB |
|
Before Width: | Height: | Size: 81 KiB After Width: | Height: | Size: 81 KiB |
|
Before Width: | Height: | Size: 161 KiB After Width: | Height: | Size: 161 KiB |
|
Before Width: | Height: | Size: 161 KiB After Width: | Height: | Size: 161 KiB |
|
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |