Compare commits
591 Commits
2022-05-09
...
2025-02-02
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4535a70b57 | ||
|
|
6c1b7c83ec | ||
|
|
f0adafb275 | ||
|
|
9dd60d74d1 | ||
|
|
1de09deb59 | ||
|
|
a0b52ce450 | ||
|
|
95cea0f191 | ||
|
|
0fc05e15cd | ||
|
|
26c0cdc072 | ||
|
|
b1b48d50f3 | ||
|
|
349c18aa6a | ||
|
|
b956fd4bac | ||
|
|
34e0130b90 | ||
|
|
33d8edeb9a | ||
|
|
5d1e905255 | ||
|
|
51c542aa04 | ||
|
|
4d791f4d7a | ||
|
|
aee68f8b00 | ||
|
|
b911ea6e28 | ||
|
|
a41e7c75c1 | ||
|
|
9f729bf636 | ||
|
|
42e4c14a82 | ||
|
|
37a0c00b3f | ||
|
|
f6c31bf901 | ||
|
|
b48fe8b99c | ||
|
|
19b758591b | ||
|
|
ec6a23de56 | ||
|
|
ce416df3fb | ||
|
|
4e96157091 | ||
|
|
f428148f64 | ||
|
|
e8b1e3ef0c | ||
|
|
085f0dd26c | ||
|
|
1d2ab8d3d3 | ||
|
|
66e2e7a473 | ||
|
|
af161f00b7 | ||
|
|
420cca2402 | ||
|
|
97fdf11c8f | ||
|
|
aeb1b9fb4f | ||
|
|
b004e91aa4 | ||
|
|
090cc8c144 | ||
|
|
0467fae51b | ||
|
|
aa24502129 | ||
|
|
e752578d15 | ||
|
|
724db755af | ||
|
|
ec0caaf421 | ||
|
|
55b490ade0 | ||
|
|
1392bdd258 | ||
|
|
648c96ac3d | ||
|
|
d3a1538af3 | ||
|
|
2bc71095dd | ||
|
|
92a903b035 | ||
|
|
cd373edf3d | ||
|
|
ca2d438cda | ||
|
|
c148c8df7f | ||
|
|
0cbad25385 | ||
|
|
7b94d5d501 | ||
|
|
ee938342f3 | ||
|
|
cb64a5eea0 | ||
|
|
80165c28a9 | ||
|
|
315c224f24 | ||
|
|
55f624b634 | ||
|
|
82b257b589 | ||
|
|
a51ca9f9cb | ||
|
|
7e19b52926 | ||
|
|
2d02955f8b | ||
|
|
3a740f0bde | ||
|
|
455d68f9ea | ||
|
|
2def02e140 | ||
|
|
23bd18a04c | ||
|
|
d09b9eb533 | ||
|
|
25caae6d0f | ||
|
|
a717e715b6 | ||
|
|
c079715c46 | ||
|
|
f6c1253e84 | ||
|
|
8462b6e906 | ||
|
|
cca82f59eb | ||
|
|
81662b7fec | ||
|
|
d2c2128e9b | ||
|
|
686645c1e4 | ||
|
|
9df71fe1e8 | ||
|
|
6309e7e318 | ||
|
|
767e83c879 | ||
|
|
78d54b0ef2 | ||
|
|
497e4f1be0 | ||
|
|
6072df3522 | ||
|
|
ba89495dc0 | ||
|
|
a417b049da | ||
|
|
883f1a5c11 | ||
|
|
dd8ac14f99 | ||
|
|
9bd024d39f | ||
|
|
e4611a8616 | ||
|
|
3f41e5dd77 | ||
|
|
a6fc88c79a | ||
|
|
3a4ec1062b | ||
|
|
7347ba88ac | ||
|
|
3b544a36a8 | ||
|
|
2851d0c7e6 | ||
|
|
2b296badea | ||
|
|
a12c4ee909 | ||
|
|
7db9c9115e | ||
|
|
503985a080 | ||
|
|
9f466162b0 | ||
|
|
8bea3f8997 | ||
|
|
1a3df84f0a | ||
|
|
2b3c47148e | ||
|
|
59ca4397e2 | ||
|
|
98266b0739 | ||
|
|
5a82ff106d | ||
|
|
2194430019 | ||
|
|
1f11015a2f | ||
|
|
c3421669d5 | ||
|
|
6e8adddc6d | ||
|
|
22a6ded4f0 | ||
|
|
0d7669db2c | ||
|
|
9526bca168 | ||
|
|
0683431f35 | ||
|
|
70790264b8 | ||
|
|
c8a68c83e3 | ||
|
|
23171f79d0 | ||
|
|
b7f05a12a3 | ||
|
|
6078dd092a | ||
|
|
81b85e97df | ||
|
|
cc16b8779c | ||
|
|
62f7c7f9ce | ||
|
|
7496e79e8c | ||
|
|
b8cf3e2cab | ||
|
|
93fab3d78f | ||
|
|
9c38c9ed1b | ||
|
|
38e99f2e87 | ||
|
|
68226786a2 | ||
|
|
455cd9717a | ||
|
|
fa79c5c36a | ||
|
|
0402d4b853 | ||
|
|
8a427955e7 | ||
|
|
bb4214e28a | ||
|
|
f924b04efd | ||
|
|
62f60867a9 | ||
|
|
b5844f1244 | ||
|
|
8c0093d453 | ||
|
|
34df4cd060 | ||
|
|
99eea3a662 | ||
|
|
6e1047032d | ||
|
|
b2a8748bc6 | ||
|
|
ded6d5b8eb | ||
|
|
832842c20c | ||
|
|
b43e4ae469 | ||
|
|
026afeb885 | ||
|
|
b6793a5e01 | ||
|
|
d231264a16 | ||
|
|
6e02bdec2e | ||
|
|
cfaadc40b1 | ||
|
|
93475b43a5 | ||
|
|
3348e051a1 | ||
|
|
dad1aea128 | ||
|
|
dec001114a | ||
|
|
1ce7b9f7de | ||
|
|
2ff99f12d8 | ||
|
|
6679705254 | ||
|
|
7eafac5b1a | ||
|
|
ac3aa949ad | ||
|
|
b4036c8671 | ||
|
|
4e0de1c066 | ||
|
|
f32890916d | ||
|
|
24a0dac420 | ||
|
|
716bc00533 | ||
|
|
32dd18998d | ||
|
|
5e62069444 | ||
|
|
bf63dc4ab7 | ||
|
|
7679546e30 | ||
|
|
45b11dc984 | ||
|
|
25d21a3da6 | ||
|
|
c8d49b5bf9 | ||
|
|
f737d9a794 | ||
|
|
df9c5ae53c | ||
|
|
e0829a75d2 | ||
|
|
1f58f7e93d | ||
|
|
14807ba036 | ||
|
|
75fb3894a6 | ||
|
|
18119bd11b | ||
|
|
4c7796537f | ||
|
|
3452cb01d0 | ||
|
|
6a151ef97a | ||
|
|
e3d651668c | ||
|
|
7a5704beaa | ||
|
|
37b78a9a4c | ||
|
|
8bc5a9d581 | ||
|
|
57ed162b79 | ||
|
|
3524231500 | ||
|
|
5cfe2b4762 | ||
|
|
a8bac1e468 | ||
|
|
4f798286af | ||
|
|
8a04b2d69d | ||
|
|
17893d9747 | ||
|
|
8af49406cd | ||
|
|
3b068b79fe | ||
|
|
ce14e83e78 | ||
|
|
f213d6fda7 | ||
|
|
83db00d7a3 | ||
|
|
7e9bd88eb4 | ||
|
|
ea716ca440 | ||
|
|
3cd7a04002 | ||
|
|
914002f846 | ||
|
|
17b82a186f | ||
|
|
7a8e957476 | ||
|
|
6dfd354973 | ||
|
|
956c12eb32 | ||
|
|
d5ae4eed26 | ||
|
|
ca486e5ed9 | ||
|
|
de63066b0b | ||
|
|
c7ca55ceb5 | ||
|
|
024bef7ded | ||
|
|
34d3d60f95 | ||
|
|
ed907d7c6f | ||
|
|
9d7fd66546 | ||
|
|
9934841950 | ||
|
|
432fe1100b | ||
|
|
d987628935 | ||
|
|
4c3ceae0e4 | ||
|
|
2b9d7538bf | ||
|
|
4ca1fc083d | ||
|
|
e7585271fb | ||
|
|
6e6824117d | ||
|
|
3e5f2fd8b2 | ||
|
|
6e470d788e | ||
|
|
a40d8092ce | ||
|
|
0234a70bfd | ||
|
|
705b1e0c2b | ||
|
|
69379334f9 | ||
|
|
12e50a1f2f | ||
|
|
ec17a477be | ||
|
|
205e1c7a59 | ||
|
|
ffb60c06cb | ||
|
|
2280f59ee6 | ||
|
|
0d4dd63edc | ||
|
|
69f1f4c1a5 | ||
|
|
d930d9c237 | ||
|
|
9c782d130f | ||
|
|
f12053f39d | ||
|
|
bcf6ca4f87 | ||
|
|
46619bb425 | ||
|
|
cdd870a129 | ||
|
|
7a1b7b9438 | ||
|
|
2183ada1f2 | ||
|
|
1d9e64ec73 | ||
|
|
5339be318e | ||
|
|
e1ba39c437 | ||
|
|
07ee271478 | ||
|
|
4823cce622 | ||
|
|
23099f7e8b | ||
|
|
5bdbd51fa8 | ||
|
|
a0e5871c6e | ||
|
|
3cf0904651 | ||
|
|
2bd06ff0fd | ||
|
|
6ea333d0f1 | ||
|
|
91d2485940 | ||
|
|
0d99b2bcf4 | ||
|
|
a54a424f84 | ||
|
|
3514699f5b | ||
|
|
d196988cab | ||
|
|
03aff83135 | ||
|
|
17e6bfaca6 | ||
|
|
90281262be | ||
|
|
5bbc118920 | ||
|
|
dde2f8b9ad | ||
|
|
d41aa30e10 | ||
|
|
231d0380a7 | ||
|
|
a5c509981b | ||
|
|
71b01e6110 | ||
|
|
c716f85962 | ||
|
|
245d51caea | ||
|
|
e588917f6c | ||
|
|
27e5d21b6b | ||
|
|
b894b75e6a | ||
|
|
116397cdb3 | ||
|
|
a6b5abf271 | ||
|
|
fd5a649246 | ||
|
|
e8e57989ba | ||
|
|
03db4ccce6 | ||
|
|
c9d5d5609c | ||
|
|
ac16206ddb | ||
|
|
5f8bcbd02d | ||
|
|
a0f74134bb | ||
|
|
0463a6fd70 | ||
|
|
a5de633c64 | ||
|
|
b2ad2acff3 | ||
|
|
4ee6ff73e0 | ||
|
|
628bdde939 | ||
|
|
e9b78c1c59 | ||
|
|
315cbc0925 | ||
|
|
69741d858c | ||
|
|
20d99a78b6 | ||
|
|
2d68393e07 | ||
|
|
8cb1470643 | ||
|
|
8d9b27bf47 | ||
|
|
0c5d9f1a7d | ||
|
|
a7d88c06c1 | ||
|
|
2735000fcf | ||
|
|
a39de270cd | ||
|
|
10f11213d3 | ||
|
|
3b49cbf73b | ||
|
|
e4cfe08113 | ||
|
|
fa02cb885c | ||
|
|
69b864fa02 | ||
|
|
b9ed9a6c0b | ||
|
|
5156495b47 | ||
|
|
b92047bc3f | ||
|
|
70559d32df | ||
|
|
bb84b75db9 | ||
|
|
f634177973 | ||
|
|
e33ff37c82 | ||
|
|
d2bc7f6ac0 | ||
|
|
5ef1ca06f5 | ||
|
|
1d8651bc00 | ||
|
|
17eabf2004 | ||
|
|
37bb1367db | ||
|
|
24b5dab456 | ||
|
|
c6bfc8b8ea | ||
|
|
f2b0fa164e | ||
|
|
0ca8bdb3a8 | ||
|
|
a8471f62bc | ||
|
|
5f1c03682f | ||
|
|
3255ed3ffb | ||
|
|
c51b54c0c5 | ||
|
|
a3f0807d47 | ||
|
|
27055944df | ||
|
|
7b1653034b | ||
|
|
39d8ca050f | ||
|
|
50274cb66d | ||
|
|
bd60a9fd2e | ||
|
|
83409c32c4 | ||
|
|
1bc92623dc | ||
|
|
f73196841a | ||
|
|
86a4b130ff | ||
|
|
f4e2f117c3 | ||
|
|
8ef92d26c5 | ||
|
|
c8336df49d | ||
|
|
c2fe3cda35 | ||
|
|
c54f47efbf | ||
|
|
3c40cc4b7d | ||
|
|
f0fb77bade | ||
|
|
e894e78346 | ||
|
|
dd04c610ec | ||
|
|
2e674efe50 | ||
|
|
4d394c31f9 | ||
|
|
11d58abbc3 | ||
|
|
5f4ad87a47 | ||
|
|
e43a21866c | ||
|
|
6652012f4c | ||
|
|
0c4e8ca290 | ||
|
|
230a2c5c62 | ||
|
|
590fb7f533 | ||
|
|
e8b88248f2 | ||
|
|
c6ba1b6a4e | ||
|
|
c4c52bd8c0 | ||
|
|
c633a792f5 | ||
|
|
8d5421d9da | ||
|
|
b041f4ace2 | ||
|
|
d26f96db9e | ||
|
|
fa999880ee | ||
|
|
d1e0f9dfc5 | ||
|
|
2d86938375 | ||
|
|
4865269a73 | ||
|
|
038ce3dcec | ||
|
|
43b997fe40 | ||
|
|
44e92f61ca | ||
|
|
b4bfa17cee | ||
|
|
500b694cc6 | ||
|
|
b998282304 | ||
|
|
b704216553 | ||
|
|
03ec02a749 | ||
|
|
248ea82573 | ||
|
|
bbe125beee | ||
|
|
95cd1c6f87 | ||
|
|
1c2107ae8f | ||
|
|
e826e17c6c | ||
|
|
b111f0921c | ||
|
|
090a48515c | ||
|
|
b8555d8c42 | ||
|
|
cf1f4f12a9 | ||
|
|
ef4413633a | ||
|
|
c5bb38e907 | ||
|
|
9f515fc804 | ||
|
|
245edcefdd | ||
|
|
153f73c308 | ||
|
|
315837b267 | ||
|
|
ea8da24215 | ||
|
|
1ab723ca64 | ||
|
|
f8bc6cf998 | ||
|
|
8687163cca | ||
|
|
e261e16d99 | ||
|
|
bdcd083eea | ||
|
|
c4bf9eb61c | ||
|
|
0994d10410 | ||
|
|
291c535edb | ||
|
|
f04702fdd1 | ||
|
|
b7fbc12ac0 | ||
|
|
e2ab8db958 | ||
|
|
34d70980e8 | ||
|
|
e45c4042fe | ||
|
|
ce8092318e | ||
|
|
c95cc1dd9d | ||
|
|
1f72877728 | ||
|
|
93b40343d9 | ||
|
|
ba10108207 | ||
|
|
c28f66d673 | ||
|
|
59f327f97a | ||
|
|
872c92a244 | ||
|
|
2303880b87 | ||
|
|
0e97cc1712 | ||
|
|
d550e42441 | ||
|
|
4279753030 | ||
|
|
2f6c018b7a | ||
|
|
be5d42baba | ||
|
|
f174614496 | ||
|
|
e8c7fba8b0 | ||
|
|
5c49283023 | ||
|
|
ad56b431a3 | ||
|
|
b0d8a33d5f | ||
|
|
1715bcb216 | ||
|
|
96caeaca72 | ||
|
|
c8723ae935 | ||
|
|
94e39c044c | ||
|
|
9776ea53c9 | ||
|
|
675d07dac0 | ||
|
|
1217820288 | ||
|
|
90e1a3cb76 | ||
|
|
7c1095ea50 | ||
|
|
203e916a07 | ||
|
|
7201e34b38 | ||
|
|
6d032c378f | ||
|
|
badd8952f5 | ||
|
|
7209eddb2d | ||
|
|
a7ffd43b29 | ||
|
|
724ba69483 | ||
|
|
1716801437 | ||
|
|
fa727524dc | ||
|
|
28f80e18a0 | ||
|
|
4acc8bfe80 | ||
|
|
9f86ed7887 | ||
|
|
cb18a55338 | ||
|
|
78a928464c | ||
|
|
07a8cd0a5f | ||
|
|
b73ef58567 | ||
|
|
519531f3a0 | ||
|
|
4b8e47d079 | ||
|
|
ed170f7e07 | ||
|
|
6bb559874c | ||
|
|
9cd68e25b3 | ||
|
|
72ac441598 | ||
|
|
f5fe56c85d | ||
|
|
d4fc1be2cc | ||
|
|
7b3617a273 | ||
|
|
3e8adae3de | ||
|
|
9943133d6d | ||
|
|
a5706a47af | ||
|
|
b3b911c64d | ||
|
|
05beb4fcaf | ||
|
|
324b50e381 | ||
|
|
186f4289e9 | ||
|
|
cb90a8356b | ||
|
|
e9c502ab32 | ||
|
|
f728520e97 | ||
|
|
c1b0d50237 | ||
|
|
b9cfc29059 | ||
|
|
6bf7c79891 | ||
|
|
2bd0e58354 | ||
|
|
ee674cb0cf | ||
|
|
dd1b354d48 | ||
|
|
d3e96f4a99 | ||
|
|
90e2eb3db9 | ||
|
|
102be6a350 | ||
|
|
be6152948c | ||
|
|
f14bf4b205 | ||
|
|
123ac2ca25 | ||
|
|
7216b976ec | ||
|
|
7fb698cfbf | ||
|
|
b0470ab678 | ||
|
|
0deb037035 | ||
|
|
064b362d60 | ||
|
|
6bbe228a84 | ||
|
|
a8ba8b6ab5 | ||
|
|
e850f6c2a5 | ||
|
|
e9eb7d6db1 | ||
|
|
56d21321d0 | ||
|
|
3888a74212 | ||
|
|
0035e29f9e | ||
|
|
90679d5669 | ||
|
|
ac5dc2578a | ||
|
|
671e6823be | ||
|
|
0d76662311 | ||
|
|
8dd59cf3cf | ||
|
|
332d25dc00 | ||
|
|
0fa81a77dc | ||
|
|
9a74d8f72d | ||
|
|
8c539351e3 | ||
|
|
e3552fc0ae | ||
|
|
ca308636c3 | ||
|
|
244cb847fb | ||
|
|
176c52daf2 | ||
|
|
ee3525ec64 | ||
|
|
adce921be7 | ||
|
|
20ceb1c284 | ||
|
|
db4364b8f8 | ||
|
|
48d6435e09 | ||
|
|
7c20e9ab34 | ||
|
|
cb52605928 | ||
|
|
bd3100dcda | ||
|
|
afb7c35cfd | ||
|
|
5b694a55d2 | ||
|
|
f750a4cd72 | ||
|
|
eddeaaf52a | ||
|
|
2b42bee424 | ||
|
|
b9706c0cc1 | ||
|
|
800b21b000 | ||
|
|
d1736a25bb | ||
|
|
f269e5fe58 | ||
|
|
45a5296013 | ||
|
|
5f0ab2a177 | ||
|
|
70ab02987a | ||
|
|
421da882d8 | ||
|
|
1a40102f71 | ||
|
|
1fbc10cd77 | ||
|
|
87462398d8 | ||
|
|
b33246b29f | ||
|
|
dbffe30f63 | ||
|
|
9ce450d0b0 | ||
|
|
f5f8acf1fd | ||
|
|
304ed3cd60 | ||
|
|
07248692ce | ||
|
|
cef99cba71 | ||
|
|
cab5f29b57 | ||
|
|
55a2f75d16 | ||
|
|
a416ee8f2b | ||
|
|
c14936c63c | ||
|
|
42e7a8b423 | ||
|
|
4558b1c7ef | ||
|
|
f444ba9665 | ||
|
|
787c8d740b | ||
|
|
ef38a8bb2b | ||
|
|
b5d35d346a | ||
|
|
9a7b15d19b | ||
|
|
ba35a11e82 | ||
|
|
00c9efe541 | ||
|
|
44d1ab348b | ||
|
|
f25e4785ae | ||
|
|
4c290aec57 | ||
|
|
42d1d66d9b | ||
|
|
06c25301a5 | ||
|
|
43dbb45cc6 | ||
|
|
9fb62de5cb | ||
|
|
b282df2e27 | ||
|
|
da8f57f397 | ||
|
|
e9f1992c7f | ||
|
|
2c94a6a64e | ||
|
|
6a5e0a8501 | ||
|
|
26d7fe2ff0 | ||
|
|
5854a635ca | ||
|
|
3d4858b840 | ||
|
|
dec2a252fa | ||
|
|
f619ef23fd | ||
|
|
72743e834e | ||
|
|
8e4ddf366c | ||
|
|
b99bd0176a | ||
|
|
a68b98b245 | ||
|
|
a69d6ff1b4 | ||
|
|
ec679e95fd | ||
|
|
3f78235a74 | ||
|
|
c8a2fd78b0 | ||
|
|
45cf08111a | ||
|
|
527ac36129 | ||
|
|
a7232513a7 | ||
|
|
90f187e885 | ||
|
|
235adbbdf1 | ||
|
|
40c88fe385 | ||
|
|
54b7943d17 | ||
|
|
2f100f2ba3 | ||
|
|
b5305aa5e4 | ||
|
|
a2624e36f3 | ||
|
|
540511befd | ||
|
|
014e73d569 | ||
|
|
e2c256db5b | ||
|
|
28aa473362 | ||
|
|
b79506fbcf | ||
|
|
afbd7252ac | ||
|
|
3e5b7cd392 | ||
|
|
77622095d5 | ||
|
|
8ee71300a2 | ||
|
|
d79971edbc | ||
|
|
273ebb22e4 | ||
|
|
6b86e4d463 | ||
|
|
a8e1dc3b18 |
@@ -8,9 +8,11 @@ RUN pacman --sync --refresh --sysupgrade --needed --noconfirm \
|
|||||||
gtest \
|
gtest \
|
||||||
mariadb-libs \
|
mariadb-libs \
|
||||||
protobuf \
|
protobuf \
|
||||||
qt5-base \
|
qt6-base \
|
||||||
qt5-multimedia \
|
qt6-imageformats \
|
||||||
qt5-svg \
|
qt6-multimedia \
|
||||||
qt5-tools \
|
qt6-svg \
|
||||||
qt5-websockets \
|
qt6-tools \
|
||||||
|
qt6-translations \
|
||||||
|
qt6-websockets \
|
||||||
&& pacman --sync --clean --clean --noconfirm
|
&& pacman --sync --clean --clean --noconfirm
|
||||||
@@ -1,25 +0,0 @@
|
|||||||
FROM debian:10
|
|
||||||
|
|
||||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
|
||||||
build-essential \
|
|
||||||
ccache \
|
|
||||||
clang-format \
|
|
||||||
cmake \
|
|
||||||
file \
|
|
||||||
g++ \
|
|
||||||
git \
|
|
||||||
liblzma-dev \
|
|
||||||
libmariadb-dev-compat \
|
|
||||||
libprotobuf-dev \
|
|
||||||
libqt5multimedia5-plugins \
|
|
||||||
libqt5sql5-mysql \
|
|
||||||
libqt5svg5-dev \
|
|
||||||
libqt5websockets5-dev \
|
|
||||||
protobuf-compiler \
|
|
||||||
qt5-default \
|
|
||||||
qtbase5-dev \
|
|
||||||
qtmultimedia5-dev \
|
|
||||||
qttools5-dev \
|
|
||||||
qttools5-dev-tools \
|
|
||||||
&& apt-get clean \
|
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
|
||||||
@@ -17,6 +17,7 @@ RUN apt-get update && \
|
|||||||
libqt5svg5-dev \
|
libqt5svg5-dev \
|
||||||
libqt5websockets5-dev \
|
libqt5websockets5-dev \
|
||||||
protobuf-compiler \
|
protobuf-compiler \
|
||||||
|
qt5-image-formats-plugins \
|
||||||
qtmultimedia5-dev \
|
qtmultimedia5-dev \
|
||||||
qttools5-dev \
|
qttools5-dev \
|
||||||
qttools5-dev-tools \
|
qttools5-dev-tools \
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
FROM ubuntu:impish
|
FROM debian:12
|
||||||
|
|
||||||
RUN apt-get update && \
|
RUN apt-get update && \
|
||||||
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
|
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
|
||||||
@@ -9,16 +9,19 @@ RUN apt-get update && \
|
|||||||
file \
|
file \
|
||||||
g++ \
|
g++ \
|
||||||
git \
|
git \
|
||||||
|
libgl-dev \
|
||||||
liblzma-dev \
|
liblzma-dev \
|
||||||
libmariadb-dev-compat \
|
libmariadb-dev-compat \
|
||||||
libprotobuf-dev \
|
libprotobuf-dev \
|
||||||
libqt5multimedia5-plugins \
|
libqt6multimedia6 \
|
||||||
libqt5sql5-mysql \
|
libqt6sql6-mysql \
|
||||||
libqt5svg5-dev \
|
qt6-svg-dev \
|
||||||
libqt5websockets5-dev \
|
qt6-websockets-dev \
|
||||||
protobuf-compiler \
|
protobuf-compiler \
|
||||||
qtmultimedia5-dev \
|
qt6-image-formats-plugins \
|
||||||
qttools5-dev \
|
qt6-l10n-tools \
|
||||||
qttools5-dev-tools \
|
qt6-multimedia-dev \
|
||||||
|
qt6-tools-dev \
|
||||||
|
qt6-tools-dev-tools \
|
||||||
&& apt-get clean \
|
&& apt-get clean \
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
@@ -1,21 +0,0 @@
|
|||||||
FROM fedora:34
|
|
||||||
|
|
||||||
RUN dnf install -y \
|
|
||||||
@development-tools \
|
|
||||||
ccache \
|
|
||||||
cmake \
|
|
||||||
desktop-file-utils \
|
|
||||||
file \
|
|
||||||
gcc-c++ \
|
|
||||||
git \
|
|
||||||
hicolor-icon-theme \
|
|
||||||
libappstream-glib \
|
|
||||||
mariadb-devel \
|
|
||||||
protobuf-devel \
|
|
||||||
qt5-{qttools,qtsvg,qtmultimedia,qtwebsockets}-devel \
|
|
||||||
rpm-build \
|
|
||||||
sqlite-devel \
|
|
||||||
wget \
|
|
||||||
xz-devel \
|
|
||||||
zlib-devel \
|
|
||||||
&& dnf clean all
|
|
||||||
@@ -1,21 +0,0 @@
|
|||||||
FROM fedora:35
|
|
||||||
|
|
||||||
RUN dnf install -y \
|
|
||||||
@development-tools \
|
|
||||||
ccache \
|
|
||||||
cmake \
|
|
||||||
desktop-file-utils \
|
|
||||||
file \
|
|
||||||
gcc-c++ \
|
|
||||||
git \
|
|
||||||
hicolor-icon-theme \
|
|
||||||
libappstream-glib \
|
|
||||||
mariadb-devel \
|
|
||||||
protobuf-devel \
|
|
||||||
qt5-{qttools,qtsvg,qtmultimedia,qtwebsockets}-devel \
|
|
||||||
rpm-build \
|
|
||||||
sqlite-devel \
|
|
||||||
wget \
|
|
||||||
xz-devel \
|
|
||||||
zlib-devel \
|
|
||||||
&& dnf clean all
|
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
FROM fedora:36
|
FROM fedora:40
|
||||||
|
|
||||||
RUN dnf install -y \
|
RUN dnf install -y \
|
||||||
ccache \
|
ccache \
|
||||||
@@ -7,7 +7,8 @@ RUN dnf install -y \
|
|||||||
git \
|
git \
|
||||||
mariadb-devel \
|
mariadb-devel \
|
||||||
protobuf-devel \
|
protobuf-devel \
|
||||||
qt6-{qttools,qtsvg,qtmultimedia,qtwebsockets,qt5compat}-devel \
|
qt6-{qttools,qtsvg,qtmultimedia,qtwebsockets}-devel \
|
||||||
|
qt6-qtimageformats \
|
||||||
rpm-build \
|
rpm-build \
|
||||||
xz-devel \
|
xz-devel \
|
||||||
zlib-devel \
|
zlib-devel \
|
||||||
15
.ci/Fedora41/Dockerfile
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
FROM fedora:41
|
||||||
|
|
||||||
|
RUN dnf install -y \
|
||||||
|
ccache \
|
||||||
|
cmake \
|
||||||
|
gcc-c++ \
|
||||||
|
git \
|
||||||
|
mariadb-devel \
|
||||||
|
protobuf-devel \
|
||||||
|
qt6-{qttools,qtsvg,qtmultimedia,qtwebsockets}-devel \
|
||||||
|
qt6-qtimageformats \
|
||||||
|
rpm-build \
|
||||||
|
xz-devel \
|
||||||
|
zlib-devel \
|
||||||
|
&& dnf clean all
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
FROM ubuntu:focal
|
FROM ubuntu:20.04
|
||||||
|
|
||||||
RUN apt-get update && \
|
RUN apt-get update && \
|
||||||
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
|
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
|
||||||
@@ -18,6 +18,7 @@ RUN apt-get update && \
|
|||||||
libqt5websockets5-dev \
|
libqt5websockets5-dev \
|
||||||
protobuf-compiler \
|
protobuf-compiler \
|
||||||
qt5-default \
|
qt5-default \
|
||||||
|
qt5-image-formats-plugins \
|
||||||
qtmultimedia5-dev \
|
qtmultimedia5-dev \
|
||||||
qttools5-dev \
|
qttools5-dev \
|
||||||
qttools5-dev-tools \
|
qttools5-dev-tools \
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
FROM ubuntu:jammy
|
FROM ubuntu:22.04
|
||||||
|
|
||||||
RUN apt-get update && \
|
RUN apt-get update && \
|
||||||
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
|
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
|
||||||
@@ -13,12 +13,12 @@ RUN apt-get update && \
|
|||||||
liblzma-dev \
|
liblzma-dev \
|
||||||
libmariadb-dev-compat \
|
libmariadb-dev-compat \
|
||||||
libprotobuf-dev \
|
libprotobuf-dev \
|
||||||
libqt6core5compat6-dev \
|
|
||||||
libqt6multimedia6 \
|
libqt6multimedia6 \
|
||||||
libqt6sql6-mysql \
|
libqt6sql6-mysql \
|
||||||
libqt6svg6-dev \
|
libqt6svg6-dev \
|
||||||
libqt6websockets6-dev \
|
libqt6websockets6-dev \
|
||||||
protobuf-compiler \
|
protobuf-compiler \
|
||||||
|
qt6-image-formats-plugins \
|
||||||
qt6-l10n-tools \
|
qt6-l10n-tools \
|
||||||
qt6-multimedia-dev \
|
qt6-multimedia-dev \
|
||||||
qt6-tools-dev \
|
qt6-tools-dev \
|
||||||
27
.ci/Ubuntu24.04/Dockerfile
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
FROM ubuntu:24.04
|
||||||
|
|
||||||
|
RUN apt-get update && \
|
||||||
|
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
|
||||||
|
build-essential \
|
||||||
|
ccache \
|
||||||
|
clang-format \
|
||||||
|
cmake \
|
||||||
|
file \
|
||||||
|
g++ \
|
||||||
|
git \
|
||||||
|
libgl-dev \
|
||||||
|
liblzma-dev \
|
||||||
|
libmariadb-dev-compat \
|
||||||
|
libprotobuf-dev \
|
||||||
|
libqt6multimedia6 \
|
||||||
|
libqt6sql6-mysql \
|
||||||
|
qt6-svg-dev \
|
||||||
|
qt6-websockets-dev \
|
||||||
|
protobuf-compiler \
|
||||||
|
qt6-image-formats-plugins \
|
||||||
|
qt6-l10n-tools \
|
||||||
|
qt6-multimedia-dev \
|
||||||
|
qt6-tools-dev \
|
||||||
|
qt6-tools-dev-tools \
|
||||||
|
&& apt-get clean \
|
||||||
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
@@ -1,24 +0,0 @@
|
|||||||
FROM ubuntu:bionic
|
|
||||||
|
|
||||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
|
||||||
build-essential \
|
|
||||||
ccache \
|
|
||||||
clang-format \
|
|
||||||
cmake \
|
|
||||||
file \
|
|
||||||
g++ \
|
|
||||||
git \
|
|
||||||
liblzma-dev \
|
|
||||||
libmariadb-dev-compat \
|
|
||||||
libprotobuf-dev \
|
|
||||||
libqt5multimedia5-plugins \
|
|
||||||
libqt5sql5-mysql \
|
|
||||||
libqt5svg5-dev \
|
|
||||||
libqt5websockets5-dev \
|
|
||||||
protobuf-compiler \
|
|
||||||
qt5-default \
|
|
||||||
qtmultimedia5-dev \
|
|
||||||
qttools5-dev \
|
|
||||||
qttools5-dev-tools \
|
|
||||||
&& apt-get clean \
|
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
|
||||||
@@ -127,7 +127,7 @@ fi
|
|||||||
# Add cmake --build flags
|
# Add cmake --build flags
|
||||||
buildflags=(--config "$BUILDTYPE")
|
buildflags=(--config "$BUILDTYPE")
|
||||||
if [[ $PARALLEL_COUNT ]]; then
|
if [[ $PARALLEL_COUNT ]]; then
|
||||||
if [[ $(cmake --build /not_a_dir --parallel |& head -1) =~ parallel ]]; then
|
if [[ $(cmake --build /not_a_dir --parallel 2>&1 | head -1) =~ parallel ]]; then
|
||||||
# workaround for bionic having an old cmake
|
# workaround for bionic having an old cmake
|
||||||
echo "this version of cmake does not support --parallel, using native build tool -j instead"
|
echo "this version of cmake does not support --parallel, using native build tool -j instead"
|
||||||
buildflags+=(-- -j "$PARALLEL_COUNT")
|
buildflags+=(-- -j "$PARALLEL_COUNT")
|
||||||
@@ -160,7 +160,13 @@ cmake .. "${flags[@]}"
|
|||||||
echo "::endgroup::"
|
echo "::endgroup::"
|
||||||
|
|
||||||
echo "::group::Build project"
|
echo "::group::Build project"
|
||||||
cmake --build . "${buildflags[@]}"
|
if [[ $RUNNER_OS == Windows ]]; then
|
||||||
|
# Enable MTT, see https://devblogs.microsoft.com/cppblog/improved-parallelism-in-msbuild/
|
||||||
|
# and https://devblogs.microsoft.com/cppblog/cpp-build-throughput-investigation-and-tune-up/#multitooltask-mtt
|
||||||
|
cmake --build . "${buildflags[@]}" -- -p:UseMultiToolTask=true -p:EnableClServerMode=true
|
||||||
|
else
|
||||||
|
cmake --build . "${buildflags[@]}"
|
||||||
|
fi
|
||||||
echo "::endgroup::"
|
echo "::endgroup::"
|
||||||
|
|
||||||
if [[ $USE_CCACHE ]]; then
|
if [[ $USE_CCACHE ]]; then
|
||||||
@@ -171,7 +177,7 @@ fi
|
|||||||
|
|
||||||
if [[ $MAKE_TEST ]]; then
|
if [[ $MAKE_TEST ]]; then
|
||||||
echo "::group::Run tests"
|
echo "::group::Run tests"
|
||||||
ctest -C "$BUILDTYPE"
|
ctest -C "$BUILDTYPE" --output-on-failure
|
||||||
echo "::endgroup::"
|
echo "::endgroup::"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -183,6 +189,12 @@ fi
|
|||||||
|
|
||||||
if [[ $MAKE_PACKAGE ]]; then
|
if [[ $MAKE_PACKAGE ]]; then
|
||||||
echo "::group::Create package"
|
echo "::group::Create package"
|
||||||
|
|
||||||
|
if [[ $RUNNER_OS == macOS ]]; then
|
||||||
|
# Workaround https://github.com/actions/runner-images/issues/7522
|
||||||
|
echo "killing XProtectBehaviorService"; sudo pkill -9 XProtect >/dev/null || true;
|
||||||
|
echo "waiting for XProtectBehaviorService kill"; while pgrep "XProtect"; do sleep 3; done;
|
||||||
|
fi
|
||||||
cmake --build . --target package --config "$BUILDTYPE"
|
cmake --build . --target package --config "$BUILDTYPE"
|
||||||
echo "::endgroup::"
|
echo "::endgroup::"
|
||||||
|
|
||||||
|
|||||||
@@ -1,35 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
# Read arguments
|
|
||||||
while [[ $# != 0 ]]; do
|
|
||||||
case "$1" in
|
|
||||||
'--')
|
|
||||||
shift
|
|
||||||
;;
|
|
||||||
'--arch')
|
|
||||||
shift
|
|
||||||
if [[ $# == 0 ]]; then
|
|
||||||
echo "::error file=$0::--arch expects an argument"
|
|
||||||
exit 3
|
|
||||||
fi
|
|
||||||
OS_ARCH="$1"
|
|
||||||
shift
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
echo "::error file=$0::unrecognized option: $1"
|
|
||||||
exit 3
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
done
|
|
||||||
|
|
||||||
set -e
|
|
||||||
|
|
||||||
OPEN_SSL_VERSION="1.1.1n"
|
|
||||||
DEST_PATH="C:\OpenSSL-Win$OS_ARCH"
|
|
||||||
|
|
||||||
curl -JLSs "https://github.com/CristiFati/Prebuilt-Binaries/raw/master/OpenSSL/v1.1.1/OpenSSL-$OPEN_SSL_VERSION-Win-pc0$OS_ARCH.zip" -o OpenSSL.zip
|
|
||||||
unzip -q "OpenSSL.zip"
|
|
||||||
rm "OpenSSL.zip"
|
|
||||||
mv "OpenSSL\OpenSSL\\$OPEN_SSL_VERSION" "$DEST_PATH"
|
|
||||||
rm -r "OpenSSL"
|
|
||||||
echo "Installed OpenSSL v$OPEN_SSL_VERSION to $DEST_PATH"
|
|
||||||
@@ -10,10 +10,10 @@ if ! git merge-base origin/master HEAD; then
|
|||||||
git fetch --unshallow
|
git fetch --unshallow
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Check formatting using clangify
|
# Check formatting using format.sh
|
||||||
echo "Checking your code using clang-format..."
|
echo "Checking your code using clang-format/cmake-format..."
|
||||||
|
|
||||||
diff="$(./clangify.sh --diff --cf-version --branch origin/master)"
|
diff="$(./format.sh --diff --cmake --cf-version --branch origin/master)"
|
||||||
err=$?
|
err=$?
|
||||||
|
|
||||||
case $err in
|
case $err in
|
||||||
@@ -24,7 +24,7 @@ case $err in
|
|||||||
*** ***
|
*** ***
|
||||||
*** Your code does not comply with our style guide. ***
|
*** Your code does not comply with our style guide. ***
|
||||||
*** ***
|
*** ***
|
||||||
*** Please correct it or run the "clangify.sh" script. ***
|
*** Please correct it or run the "format.sh" script. ***
|
||||||
*** Then commit and push those changes to this branch. ***
|
*** Then commit and push those changes to this branch. ***
|
||||||
*** Check our CONTRIBUTING.md file for more details. ***
|
*** Check our CONTRIBUTING.md file for more details. ***
|
||||||
*** ***
|
*** ***
|
||||||
@@ -32,12 +32,14 @@ case $err in
|
|||||||
*** ***
|
*** ***
|
||||||
***********************************************************
|
***********************************************************
|
||||||
|
|
||||||
Used clang-format version:
|
Used version:
|
||||||
${diff%%
|
${diff%%
|
||||||
|
----------
|
||||||
*}
|
*}
|
||||||
|
|
||||||
The following changes should be made:
|
The following changes should be made:
|
||||||
${diff#*
|
${diff#*
|
||||||
|
----------
|
||||||
}
|
}
|
||||||
|
|
||||||
Exiting...
|
Exiting...
|
||||||
@@ -62,8 +64,6 @@ EOM
|
|||||||
;;
|
;;
|
||||||
|
|
||||||
*)
|
*)
|
||||||
echo ""
|
echo "Something went wrong in our formatting checks: format.sh returned $err" >&2
|
||||||
echo "Something went wrong in our formatting checks: clangify returned $err" >&2
|
|
||||||
echo ""
|
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|||||||
17
.ci/macos.entitlements
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||||
|
<plist version="1.0">
|
||||||
|
<dict>
|
||||||
|
<key>com.apple.security.app-sandbox</key>
|
||||||
|
<false/>
|
||||||
|
|
||||||
|
<key>com.apple.security.cs.disable-library-validation</key>
|
||||||
|
<true/>
|
||||||
|
|
||||||
|
<key>com.apple.security.cs.disable-executable-page-protection</key>
|
||||||
|
<true/>
|
||||||
|
|
||||||
|
<key>com.apple.security.cs.allow-unsigned-executable-memory</key>
|
||||||
|
<true/>
|
||||||
|
</dict>
|
||||||
|
</plist>
|
||||||
@@ -4,6 +4,7 @@
|
|||||||
# where SUFFIX is either available in the environment or as the first arg
|
# where SUFFIX is either available in the environment or as the first arg
|
||||||
# if MAKE_ZIP is set instead a zip is made
|
# if MAKE_ZIP is set instead a zip is made
|
||||||
# expected to be run in the build directory unless BUILD_DIR is set
|
# expected to be run in the build directory unless BUILD_DIR is set
|
||||||
|
# adds output to GITHUB_OUTPUT
|
||||||
builddir="${BUILD_DIR:=.}"
|
builddir="${BUILD_DIR:=.}"
|
||||||
findrx="Cockatrice-*.*"
|
findrx="Cockatrice-*.*"
|
||||||
|
|
||||||
@@ -50,5 +51,5 @@ fi
|
|||||||
cd "$oldpwd"
|
cd "$oldpwd"
|
||||||
relative_path="$path/$filename"
|
relative_path="$path/$filename"
|
||||||
ls -l "$relative_path"
|
ls -l "$relative_path"
|
||||||
echo "::set-output name=path::$relative_path"
|
echo "path=$relative_path" >>"$GITHUB_OUTPUT"
|
||||||
echo "::set-output name=name::$filename"
|
echo "name=$filename" >>"$GITHUB_OUTPUT"
|
||||||
|
|||||||
@@ -4,6 +4,7 @@
|
|||||||
# the releases are first made as drafts and will be vetted by a human
|
# the releases are first made as drafts and will be vetted by a human
|
||||||
# it just has to provide a template
|
# it just has to provide a template
|
||||||
# this requires the repo to be unshallowed
|
# this requires the repo to be unshallowed
|
||||||
|
# adds output to GITHUB_OUTPUT
|
||||||
template_path=".ci/release_template.md"
|
template_path=".ci/release_template.md"
|
||||||
body_path="/tmp/release.md"
|
body_path="/tmp/release.md"
|
||||||
beta_regex='beta'
|
beta_regex='beta'
|
||||||
@@ -22,22 +23,22 @@ fi
|
|||||||
|
|
||||||
# create title
|
# create title
|
||||||
if [[ $TAG =~ $beta_regex ]]; then
|
if [[ $TAG =~ $beta_regex ]]; then
|
||||||
echo "::set-output name=is_beta::yes"
|
echo "is_beta=yes" >>"$GITHUB_OUTPUT"
|
||||||
title="$TAG"
|
title="$TAG"
|
||||||
echo "creating beta release '$title'"
|
echo "creating beta release '$title'"
|
||||||
elif [[ ! $(cat CMakeLists.txt) =~ $name_regex ]]; then
|
elif [[ ! $(cat CMakeLists.txt) =~ $name_regex ]]; then
|
||||||
echo "::error file=$0::could not find releasename in CMakeLists.txt"
|
echo "::error file=$0::could not find releasename in CMakeLists.txt"
|
||||||
exit 1
|
exit 1
|
||||||
else
|
else
|
||||||
echo "::set-output name=is_beta::no"
|
echo "is_beta=no" >>"$GITHUB_OUTPUT"
|
||||||
name="${BASH_REMATCH[1]}"
|
name="${BASH_REMATCH[1]}"
|
||||||
version="${TAG##*-}"
|
version="${TAG##*-}"
|
||||||
title="Cockatrice $version: $name"
|
title="Cockatrice $version: $name"
|
||||||
no_beta=1
|
no_beta=1
|
||||||
echo "::set-output name=friendly_name::$name"
|
echo "friendly_name=$name" >>"$GITHUB_OUTPUT"
|
||||||
echo "creating full release '$title'"
|
echo "creating full release '$title'"
|
||||||
fi
|
fi
|
||||||
echo "::set-output name=title::$title"
|
echo "title=$title" >>"$GITHUB_OUTPUT"
|
||||||
|
|
||||||
# add release notes template
|
# add release notes template
|
||||||
if [[ $no_beta ]]; then
|
if [[ $no_beta ]]; then
|
||||||
@@ -60,9 +61,9 @@ fi
|
|||||||
all_tags="
|
all_tags="
|
||||||
$(git tag)" # tags are ordered alphabetically
|
$(git tag)" # tags are ordered alphabetically
|
||||||
before="${all_tags%%
|
before="${all_tags%%
|
||||||
$TAG*}" # strip line with current tag an all lines after it
|
"$TAG"*}" # strip line with current tag an all lines after it
|
||||||
# note the extra newlines are needed to always have a last line
|
# note the extra newlines are needed to always have a last line
|
||||||
if [[ $all_tags == $before ]]; then
|
if [[ $all_tags == "$before" ]]; then
|
||||||
echo "::warning file=$0::could not find current tag"
|
echo "::warning file=$0::could not find current tag"
|
||||||
else
|
else
|
||||||
while
|
while
|
||||||
@@ -74,7 +75,7 @@ else
|
|||||||
beta_list+=" $previous" # add to list of skipped betas
|
beta_list+=" $previous" # add to list of skipped betas
|
||||||
next_before="${before%
|
next_before="${before%
|
||||||
*}" # strip the last line
|
*}" # strip the last line
|
||||||
if [[ $next_before == $before ]]; then
|
if [[ $next_before == "$before" ]]; then
|
||||||
unset previous
|
unset previous
|
||||||
break
|
break
|
||||||
fi
|
fi
|
||||||
@@ -108,5 +109,5 @@ else
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# write to file
|
# write to file
|
||||||
echo "::set-output name=body_path::$body_path"
|
echo "body_path=$body_path" >>"$GITHUB_OUTPUT"
|
||||||
echo "$body" >"$body_path"
|
echo "$body" >"$body_path"
|
||||||
|
|||||||
@@ -4,50 +4,49 @@
|
|||||||
git push -d origin --REPLACE-WITH-BETA-LIST--
|
git push -d origin --REPLACE-WITH-BETA-LIST--
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<!-- This list of binaries should be updated every time the ci is changed to
|
<!-- This list of binaries should be updated every time the CI is changed to
|
||||||
include different targets -->
|
include different targets -->
|
||||||
<pre>
|
<pre>
|
||||||
<b>Pre-compiled binaries we serve:</b>
|
<b>Pre-compiled binaries we serve:</b>
|
||||||
- <kbd>Windows 7/8/10/11 (32-bit)</kbd>
|
- <kbd>Windows 10+</kbd>
|
||||||
- <kbd>Windows 7/8/10/11 (64-bit)</kbd>
|
- <kbd>Windows 7+</kbd>
|
||||||
- <kbd>macOS 10.14</kbd> ("Mojave")
|
- <kbd>macOS 14+</kbd> ("Sonoma") / Apple M
|
||||||
- <kbd>macOS 10.15</kbd> ("Catalina")
|
- <kbd>macOS 13+</kbd> ("Ventura") / Intel
|
||||||
- <kbd>macOS 11.0</kbd> ("Big Sur")
|
- <kbd>Ubuntu 24.04 LTS</kbd> ("Noble Numbat")
|
||||||
- <kbd>Ubuntu 18.04</kbd> ("Bionic Beaver")
|
- <kbd>Ubuntu 22.04 LTS</kbd> ("Jammy Jellyfish")
|
||||||
- <kbd>Ubuntu 20.04</kbd> ("Focal Fossa")
|
- <kbd>Ubuntu 20.04 LTS</kbd> ("Focal Fossa")
|
||||||
- <kbd>Ubuntu 21.10</kbd> ("Impish Indri")
|
- <kbd>Debian 12</kbd> ("Bookworm")
|
||||||
- <kbd>Ubuntu 22.04</kbd> ("Jammy Jellyfish")
|
|
||||||
- <kbd>Debian 10</kbd> ("Buster")
|
|
||||||
- <kbd>Debian 11</kbd> ("Bullseye")
|
- <kbd>Debian 11</kbd> ("Bullseye")
|
||||||
- <kbd>Fedora 34</kbd>
|
- <kbd>Fedora 41</kbd>
|
||||||
- <kbd>Fedora 35</kbd>
|
- <kbd>Fedora 40</kbd>
|
||||||
- <kbd>Fedora 36</kbd>
|
|
||||||
<kbd>We are also packaged in Arch Linux's official community repository, courtesy of @FFY00</kbd></i>
|
<i>We are also packaged in <kbd>Arch Linux</kbd>'s official "extra" repository, courtesy of @FFY00</i>
|
||||||
<kbd>General linux support is available via a flatpak package (Flathub)</kbd></i>
|
<i>General Linux support is available via a <kbd>flatpak</kbd> package (Flathub)</i>
|
||||||
</pre>
|
</pre>
|
||||||
|
|
||||||
|
|
||||||
## General Notes
|
## General Notes
|
||||||
|
|
||||||
<!-- --REPLACE-WITH-RELEASE-TITLE-- should be placed here by the ci -->
|
|
||||||
We're pleased to announce the newest official release: <kbd>--REPLACE-WITH-RELEASE-TITLE--</kbd>
|
We're pleased to announce the newest official release: <kbd>--REPLACE-WITH-RELEASE-TITLE--</kbd>
|
||||||
|
|
||||||
We hope you enjoy the changes made and we have listed all changes, with their corresponding tickets, since the last version of Cockatrice was released for your convenience.
|
We hope you enjoy the changes made! All improvements with their corresponding tickets since the last version of Cockatrice are listed in the changelog below.
|
||||||
|
|
||||||
If you ever encounter a bug, have a suggestion or idea, or feel a need for a developer to look into something, please feel free to [open a ticket](https://github.com/Cockatrice/Cockatrice/issues). ([How to create a GitHub Ticket for Cockatrice](https://github.com/Cockatrice/Cockatrice/wiki/How-to-Create-a-GitHub-Ticket-Regarding-Cockatrice))
|
If you ever encounter a bug, have a suggestion or idea, or feel a need for a developer to look into something, please feel free to [open a ticket](https://github.com/Cockatrice/Cockatrice/issues). ([How to create a Ticket for Cockatrice](https://github.com/Cockatrice/Cockatrice/wiki/How-to-Create-a-GitHub-Ticket-Regarding-Cockatrice))
|
||||||
|
|
||||||
For any information relating to Cockatrice, please take a look at our official site: **https://cockatrice.github.io**
|
For basic information related to the app and getting started, please take a look at our official site: **https://cockatrice.github.io**
|
||||||
|
|
||||||
If you'd like to help contribute to Cockatrice in any way, check out our [README](https://github.com/Cockatrice/Cockatrice#get-involved-). We're always available to answer questions you may have on how the program works and how you can provide a meaningful contribution.
|
If you'd like to help and contribute to Cockatrice in any way, check out our [README](https://github.com/Cockatrice/Cockatrice#get-involved-).
|
||||||
|
We're always available to answer questions you may have on how the program works and how you can provide a meaningful contribution.
|
||||||
|
|
||||||
|
|
||||||
## Upgrading Cockatrice
|
## Upgrading Cockatrice
|
||||||
<!-- this optional section puts a warning banner for problems with updating
|
<!-- this optional section puts a warning banner for problems with updating
|
||||||
> ⚠️ **With this release, we no longer provide a ready-to-install binary for:**
|
> [!IMPORTANT]
|
||||||
|
> **With this release, we no longer provide a ready-to-install binary for:**
|
||||||
> --DEPRECATED-OS-HERE--
|
> --DEPRECATED-OS-HERE--
|
||||||
-->
|
-->
|
||||||
|
|
||||||
- Run the internal software updater: <kbd>Help → Check for Client Updates</kbd>
|
Run the internal software updater: <kbd>Help → Check for Client Updates</kbd>
|
||||||
|
|
||||||
Don't forget to update your card database right after! (<kbd>Help → Check for Card Updates...</kbd>)
|
Don't forget to update your card database right after! (<kbd>Help → Check for Card Updates...</kbd>)
|
||||||
|
|
||||||
@@ -64,14 +63,14 @@ Remove empty headers when done.
|
|||||||
-->
|
-->
|
||||||
|
|
||||||
<!-- Highlights of the release -->
|
<!-- Highlights of the release -->
|
||||||
### ⚠️ Important:
|
### 🔖 Highlights:
|
||||||
### ✨ New Features:
|
### ✨ New Features:
|
||||||
### 🐛 Fixed Bugs / Resolved issues:
|
### 🐛 Fixed Bugs / Resolved Issues:
|
||||||
|
|
||||||
<!-- Complete list of changes (foldable) -->
|
<!-- Complete list of changes (foldable) -->
|
||||||
<details>
|
<details>
|
||||||
<summary>
|
<summary>
|
||||||
📘 <b>Show all changes</b> (--REPLACE-WITH-COMMIT-COUNT-- commits)
|
<b>Show all changes</b> (--REPLACE-WITH-COMMIT-COUNT-- commits)
|
||||||
</summary>
|
</summary>
|
||||||
|
|
||||||
### User Interface
|
### User Interface
|
||||||
@@ -92,5 +91,6 @@ Remove empty headers when done.
|
|||||||
|
|
||||||
## Special Thanks
|
## Special Thanks
|
||||||
<!-- Personalise this a bit! -->
|
<!-- Personalise this a bit! -->
|
||||||
We continue to find it amazing that so many people contribute their time, knowledge, code, testing and more to the project. We'd like to thank the entire Cockatrice community for their efforts.
|
It's amazing that so many people contribute their time, knowledge, code, testing and more to the project.
|
||||||
|
We'd like to thank the entire Cockatrice community for their efforts! 🙏
|
||||||
<!-- We'd like to especially recognize @ZeldaZach, --ADD-CONTRIBUTORS-HERE-- for their help in preparing so many amazing new features for the user base. -->
|
<!-- We'd like to especially recognize @ZeldaZach, --ADD-CONTRIBUTORS-HERE-- for their help in preparing so many amazing new features for the user base. -->
|
||||||
|
|||||||
58
.ci/update_translation_source_strings.sh
Executable file
@@ -0,0 +1,58 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# ci script to update translation files
|
||||||
|
# usage:
|
||||||
|
# $0 cockatrice/cockatrice_en@source.ts cockatrice/src common
|
||||||
|
# or
|
||||||
|
# FILE="cockatrice/cockatrice_en@source.ts"
|
||||||
|
# DIRS="cockatrice/src common"
|
||||||
|
# $0
|
||||||
|
# note: directories can't contain spaces
|
||||||
|
|
||||||
|
# check parameters
|
||||||
|
if [[ ! $FILE ]]; then
|
||||||
|
FILE="$1"
|
||||||
|
shift
|
||||||
|
fi
|
||||||
|
if [[ ! $FILE ]]; then
|
||||||
|
echo "no output file selected" >&2
|
||||||
|
exit 2;
|
||||||
|
fi
|
||||||
|
if [[ ! $DIRS ]]; then
|
||||||
|
DIRS="$*"
|
||||||
|
fi
|
||||||
|
if [[ ! $DIRS ]]; then
|
||||||
|
echo "no source directories selected to translate" >&2
|
||||||
|
exit 2;
|
||||||
|
fi
|
||||||
|
if [[ ! -e $FILE ]]; then
|
||||||
|
echo "output file does not exist at: $FILE" >&2
|
||||||
|
exit 3;
|
||||||
|
fi
|
||||||
|
|
||||||
|
# print version
|
||||||
|
if ! lupdate -version; then
|
||||||
|
echo "failed to run lupdate" >&2
|
||||||
|
exit 4;
|
||||||
|
fi
|
||||||
|
|
||||||
|
# run lupdate, duplicating the output in stderr and saving it
|
||||||
|
# for convenience we ignore that $DIRS will be split on spaces
|
||||||
|
# shellcheck disable=SC2086
|
||||||
|
if ! got="$(lupdate $DIRS -ts "$FILE" | tee /dev/stderr)"; then
|
||||||
|
echo "failed to update $FILE with $DIRS" >&2
|
||||||
|
exit 4;
|
||||||
|
fi
|
||||||
|
|
||||||
|
# trim output
|
||||||
|
# the line we are interested in is:
|
||||||
|
# Found xxx source text(s) (x new and xxx already existing)
|
||||||
|
output="${got##* source text(s) (}" # get stuff in between brackets
|
||||||
|
output="${output%%)*}" # trim everything after first )
|
||||||
|
if [[ $output == "$got" ]]; then
|
||||||
|
echo "could not parse generated output" >&2
|
||||||
|
exit 4;
|
||||||
|
fi
|
||||||
|
|
||||||
|
# write output to ci environment file
|
||||||
|
echo "output=$output" >> "$GITHUB_OUTPUT"
|
||||||
14
.ci/update_translation_source_strings_template.md
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
Updated source strings for translations:
|
||||||
|
- {{ .cockatrice_output }} (Cockatrice)
|
||||||
|
- {{ .oracle_output }} (Oracle)
|
||||||
|
|
||||||
|
<br>
|
||||||
|
|
||||||
|
Last changes are based on commit {{ .commit }}.
|
||||||
|
|
||||||
|
---
|
||||||
|
*This PR is automatically generated and updated by the workflow at `.github/workflows/translations-push.yml`. Review [action runs][2].*<br>
|
||||||
|
*After merging, all changes to the source language are available for translation at [Transifex][1] shortly.*
|
||||||
|
|
||||||
|
[1]: https://app.transifex.com/cockatrice/cockatrice/
|
||||||
|
[2]: https://github.com/Cockatrice/Cockatrice/actions/workflows/translations-push.yml?query=branch%3Amaster
|
||||||
@@ -102,5 +102,8 @@
|
|||||||
"decisions. See the documentation for more information."
|
"decisions. See the documentation for more information."
|
||||||
],
|
],
|
||||||
"layout_passes": {}
|
"layout_passes": {}
|
||||||
|
},
|
||||||
|
"markup": {
|
||||||
|
"enable_markup": false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
85
.github/CONTRIBUTING.md
vendored
@@ -41,8 +41,8 @@ albeit slightly less active.
|
|||||||
|
|
||||||
We use a separate job on the CI to check your code for formatting issues. If
|
We use a separate job on the CI to check your code for formatting issues. If
|
||||||
your pull request failed the test, you can check the output on the checks tab.
|
your pull request failed the test, you can check the output on the checks tab.
|
||||||
It's the first job called "linter", you can click the "Run clangify" step to
|
It's the first job called "linter", you can click the "Check code formatting"
|
||||||
see the output of the test.
|
step to see the output of the test.
|
||||||
|
|
||||||
The message will look like this:
|
The message will look like this:
|
||||||
```
|
```
|
||||||
@@ -50,7 +50,7 @@ The message will look like this:
|
|||||||
*** ***
|
*** ***
|
||||||
*** Your code does not comply with our style guide. ***
|
*** Your code does not comply with our style guide. ***
|
||||||
*** ***
|
*** ***
|
||||||
*** Please correct it or run the "clangify.sh" script. ***
|
*** Please correct it or run the "format.sh" script. ***
|
||||||
*** Then commit and push those changes to this branch. ***
|
*** Then commit and push those changes to this branch. ***
|
||||||
*** Check our CONTRIBUTING.md file for more details. ***
|
*** Check our CONTRIBUTING.md file for more details. ***
|
||||||
*** ***
|
*** ***
|
||||||
@@ -81,9 +81,9 @@ The handy tool `clang-format` can format your code for you, it is available for
|
|||||||
almost any environment. A special `.clang-format` configuration file is
|
almost any environment. A special `.clang-format` configuration file is
|
||||||
included in the project and is used to format your code.
|
included in the project and is used to format your code.
|
||||||
|
|
||||||
We've also included a bash script, `clangify.sh`, that will use clang-format to
|
We've also included a bash script, `format.sh`, that will use clang-format to
|
||||||
format all files in your pr in one go. Use `./clangify.sh --help` to show a
|
format all files in your pr in one go. Use `./format.sh --help` to show a full
|
||||||
full help page.
|
help page.
|
||||||
|
|
||||||
To run clang-format on a single source file simply use the command
|
To run clang-format on a single source file simply use the command
|
||||||
`clang-format -i <filename>` to format it in place. (Some systems install
|
`clang-format -i <filename>` to format it in place. (Some systems install
|
||||||
@@ -290,20 +290,21 @@ be included in the next release 👍
|
|||||||
|
|
||||||
Basic workflow for translations:
|
Basic workflow for translations:
|
||||||
1. Developer adds a `tr("foo")` string in the code;
|
1. Developer adds a `tr("foo")` string in the code;
|
||||||
2. Every few days, a maintainer updates the `*_en@source.ts files` with the new strings;
|
2. CI updates the `*_en@source.ts files` regularly and creates a PR automatically;
|
||||||
3. Transifex picks up the new files from GitHub every 24 hours;
|
3. Maintainer verifies and merges the change;
|
||||||
4. Translators translate the new untranslated strings on Transifex;
|
4. Transifex picks up the new files from GitHub automatically;
|
||||||
5. Before a release, a maintainer fetches the updated translations from Transifex.
|
5. Translators translate the new untranslated strings on Transifex;
|
||||||
|
6. Before a release, a maintainer fetches the updated translations from Transifex.
|
||||||
|
|
||||||
### Using Translations (for developers) ###
|
### Using Translations (for developers) ###
|
||||||
|
|
||||||
All the user-interface strings inside Cockatrice's source code must be written
|
All user interface strings inside Cockatrice's source code must be written
|
||||||
in English(US).
|
in English (US).
|
||||||
Translations to other languages are managed using [Transifex](
|
Translations to other languages are managed using [Transifex](
|
||||||
https://www.transifex.com/projects/p/cockatrice/).
|
https://www.transifex.com/projects/p/cockatrice/).
|
||||||
|
|
||||||
Adding a new string to translate is as easy as adding the string in the
|
Adding a new string to translate is as easy as adding the string in the
|
||||||
'tr("")' function, the string will be picked up as translatable automatically
|
`tr("")` function, the string will be picked up as translatable automatically
|
||||||
and translated as needed.
|
and translated as needed.
|
||||||
For example, setting the text of a label in the way that the string
|
For example, setting the text of a label in the way that the string
|
||||||
`"My name is:"` can be translated:
|
`"My name is:"` can be translated:
|
||||||
@@ -312,7 +313,7 @@ nameLabel.setText(tr("My name is:"));
|
|||||||
```
|
```
|
||||||
|
|
||||||
To translate a string that would have plural forms you can add the amount to
|
To translate a string that would have plural forms you can add the amount to
|
||||||
the tr call, also you can add an extra string as a hint for translators:
|
the tr() call, also you can add an extra string as a hint for translators:
|
||||||
```c++
|
```c++
|
||||||
QString message = tr("Everyone draws %n cards", "pop up message", amount);
|
QString message = tr("Everyone draws %n cards", "pop up message", amount);
|
||||||
```
|
```
|
||||||
@@ -321,20 +322,46 @@ https://doc.qt.io/qt-5/i18n-source-translation.html#handling-plurals)
|
|||||||
|
|
||||||
If you're about to propose a change that adds or modifies any translatable
|
If you're about to propose a change that adds or modifies any translatable
|
||||||
string in the code, you don't need to take care of adding the new strings to
|
string in the code, you don't need to take care of adding the new strings to
|
||||||
the translation files.
|
the translation files.<br>
|
||||||
Every few days, or when a lot of new strings have been added, someone from the
|
We have an automated process to update our language source files on a schedule
|
||||||
development team will take care of extracting all the new strings and adding
|
and provide the translators on Transifex with the new contents.<br>
|
||||||
them to the english translation files and making them available to translators
|
Maintainers can also manually trigger this on demand.
|
||||||
on Transifex.
|
|
||||||
|
|
||||||
### Maintaining Translations (for maintainers) ###
|
### Maintaining Translations (for maintainers) ###
|
||||||
|
|
||||||
When new translatable strings have been added to the code, a maintainer should
|
When new translatable strings have been added to the code, a maintainer has to
|
||||||
make them available to translators on Transifex. Every few days, or when a lot
|
make them available to translators on Transifex.
|
||||||
of new strings have been added, a maintainer should take care of extracting all
|
|
||||||
the new strings and add them to the english translation files.
|
|
||||||
|
|
||||||
To update the english translation files, re-run cmake enabling the appropriate
|
To help with that, we have an automated CI workflow, that regularly looks at the
|
||||||
|
code in the master branch, extracts all strings and updates dedicated source string
|
||||||
|
files with any changes. These updates are not commited right away, the CI creates a
|
||||||
|
PR for reviewing instead.<br>
|
||||||
|
After approval, our translation tool automatically picks the changes up and deploys
|
||||||
|
them to our translators. Be mindful when merging only a few changes!
|
||||||
|
|
||||||
|
Once a release is planned, or when a lot of strings have been added or changed, a
|
||||||
|
maintainer can manually trigger a CI run to extract all strings on demand.
|
||||||
|
|
||||||
|
<details>
|
||||||
|
<summary><b>Manually trigger CI run (Workflow Dispatch)</b></summary>
|
||||||
|
|
||||||
|
Maintainers can always request the CI to run on demand if it's required.
|
||||||
|
|
||||||
|
Go to the `Actions` tab and select our dedicated translation workflow:
|
||||||
|
https://github.com/Cockatrice/Cockatrice/actions/workflows/translations.yml
|
||||||
|
|
||||||
|
You see a "This workflow has a workflow_dispatch event trigger." hint at the top of
|
||||||
|
the list.<br>
|
||||||
|
Select `Run workflow` on the right and trigger a run from master branch.
|
||||||
|
|
||||||
|
The CI will now check for changed strings and create a PR if there are any updates.
|
||||||
|
|
||||||
|
</details>
|
||||||
|
|
||||||
|
<details>
|
||||||
|
<summary><b>Manually update source strings locally</b></summary>
|
||||||
|
|
||||||
|
To update the english source files for translation, re-run cmake enabling the appropriate
|
||||||
parameter and then run make:
|
parameter and then run make:
|
||||||
```sh
|
```sh
|
||||||
cd cockatrice/build
|
cd cockatrice/build
|
||||||
@@ -357,11 +384,13 @@ It is recommended to disable the parameter afterwards using:
|
|||||||
```sh
|
```sh
|
||||||
cmake .. -DUPDATE_TRANSLATIONS=OFF
|
cmake .. -DUPDATE_TRANSLATIONS=OFF
|
||||||
```
|
```
|
||||||
Now you are ready to propose your change.
|
Now you are ready to commit your changes and open a PR.
|
||||||
|
|
||||||
Once your change gets merged, Transifex will pick up the modified files
|
</details>
|
||||||
automatically (checked every 24 hours) and update the interface where
|
|
||||||
translators will be able to translate the new strings.
|
Once the changes get merged, Transifex will pick up the modified files
|
||||||
|
automatically (checked every few hours) and update their online editor where
|
||||||
|
translators will be able to translate the new strings right in the browser.
|
||||||
|
|
||||||
### Releasing Translations (for maintainers) ###
|
### Releasing Translations (for maintainers) ###
|
||||||
|
|
||||||
|
|||||||
49
.github/dependabot.yml
vendored
Normal file
@@ -0,0 +1,49 @@
|
|||||||
|
# Configuration options: https://docs.github.com/en/github/administering-a-repository/configuration-options-for-dependency-updates
|
||||||
|
|
||||||
|
version: 2
|
||||||
|
updates:
|
||||||
|
# # Enable version updates for git submodules
|
||||||
|
# Not yet possible to bump only on tags or releases, see:
|
||||||
|
# https://github.com/dependabot/dependabot-core/issues/1639
|
||||||
|
# https://github.com/dependabot/dependabot-core/issues/2192
|
||||||
|
# Alternative: Action that updates submodule and can be manually run on demand (workflow_dispatch)
|
||||||
|
# - package-ecosystem: "gitsubmodule"
|
||||||
|
# # Look for `.gitmodules` in the `root` directory
|
||||||
|
# directory: "/"
|
||||||
|
# # Check for updates once a month
|
||||||
|
# schedule:
|
||||||
|
# interval: "monthly"
|
||||||
|
# # Limit the amout of open PR's (default = 5, disabled = 0, security updates are not impacted)
|
||||||
|
# open-pull-requests-limit: 1
|
||||||
|
|
||||||
|
# # Enable version updates for Docker
|
||||||
|
# Not yet possible to bump from one LTS version to the next and skip others, see:
|
||||||
|
# https://github.com/dependabot/dependabot-core/issues/2247
|
||||||
|
# - package-ecosystem: "docker"
|
||||||
|
# # Look for a `Dockerfile` in the `root` directory
|
||||||
|
# directory: "/"
|
||||||
|
# # Check for updates once a week
|
||||||
|
# schedule:
|
||||||
|
# interval: "weekly"
|
||||||
|
# # Limit the amout of open PR's (default = 5, disabled = 0, security updates are not impacted)
|
||||||
|
# open-pull-requests-limit: 1
|
||||||
|
|
||||||
|
# Enable version updates for GitHub Actions
|
||||||
|
- package-ecosystem: "github-actions"
|
||||||
|
# Directory must be set to "/" to check for workflow files in .github/workflows
|
||||||
|
directory: "/"
|
||||||
|
# Check for updates to GitHub Actions once a week
|
||||||
|
schedule:
|
||||||
|
interval: "weekly"
|
||||||
|
# Limit the amout of open PR's (default = 5, disabled = 0, security updates are not impacted)
|
||||||
|
open-pull-requests-limit: 2
|
||||||
|
|
||||||
|
# # Enable version updates for npm
|
||||||
|
# - package-ecosystem: "npm"
|
||||||
|
# # Look for `package.json` and `lock` files in the `webclient` subdirectory
|
||||||
|
# directory: "/webclient"
|
||||||
|
# # Check the npm registry for updates once a week
|
||||||
|
# schedule:
|
||||||
|
# interval: "weekly"
|
||||||
|
# # Limit the amout of open PR's (default = 5, disabled = 0, security updates are not impacted)
|
||||||
|
# open-pull-requests-limit: 5
|
||||||
410
.github/workflows/desktop-build.yml
vendored
@@ -8,6 +8,7 @@ on:
|
|||||||
- '**.md'
|
- '**.md'
|
||||||
- 'webclient/**'
|
- 'webclient/**'
|
||||||
- '.github/workflows/web-*.yml'
|
- '.github/workflows/web-*.yml'
|
||||||
|
- '.github/workflows/translations-*.yml'
|
||||||
tags:
|
tags:
|
||||||
- '*'
|
- '*'
|
||||||
pull_request:
|
pull_request:
|
||||||
@@ -15,6 +16,12 @@ on:
|
|||||||
- '**.md'
|
- '**.md'
|
||||||
- 'webclient/**'
|
- 'webclient/**'
|
||||||
- '.github/workflows/web-*.yml'
|
- '.github/workflows/web-*.yml'
|
||||||
|
- '.github/workflows/translations-*.yml'
|
||||||
|
|
||||||
|
# Cancel earlier, unfinished runs of this workflow on the same branch (unless on master)
|
||||||
|
concurrency:
|
||||||
|
group: "${{ github.workflow }} @ ${{ github.ref_name }}"
|
||||||
|
cancel-in-progress: ${{ github.ref_name != 'master' }}
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
configure:
|
configure:
|
||||||
@@ -23,14 +30,8 @@ jobs:
|
|||||||
outputs:
|
outputs:
|
||||||
tag: ${{steps.configure.outputs.tag}}
|
tag: ${{steps.configure.outputs.tag}}
|
||||||
sha: ${{steps.configure.outputs.sha}}
|
sha: ${{steps.configure.outputs.sha}}
|
||||||
upload_url: ${{steps.create_release.outputs.upload_url}}
|
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Cancel previous runs
|
|
||||||
uses: styfle/cancel-workflow-action@0.6.0
|
|
||||||
with:
|
|
||||||
access_token: ${{github.token}} # needs other token https://github.com/styfle/cancel-workflow-action/issues/7
|
|
||||||
|
|
||||||
- name: Configure
|
- name: Configure
|
||||||
id: configure
|
id: configure
|
||||||
shell: bash
|
shell: bash
|
||||||
@@ -41,15 +42,15 @@ jobs:
|
|||||||
elif [[ $GITHUB_REF =~ $tag_regex ]]; then # release
|
elif [[ $GITHUB_REF =~ $tag_regex ]]; then # release
|
||||||
sha="$GITHUB_SHA"
|
sha="$GITHUB_SHA"
|
||||||
tag="${GITHUB_REF/refs\/tags\//}"
|
tag="${GITHUB_REF/refs\/tags\//}"
|
||||||
echo "::set-output name=tag::$tag"
|
echo "tag=$tag" >>"$GITHUB_OUTPUT"
|
||||||
else # push to branch
|
else # push to branch
|
||||||
sha="$GITHUB_SHA"
|
sha="$GITHUB_SHA"
|
||||||
fi
|
fi
|
||||||
echo "::set-output name=sha::$sha"
|
echo "sha=$sha" >>"$GITHUB_OUTPUT"
|
||||||
|
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
if: steps.configure.outputs.tag != null
|
if: steps.configure.outputs.tag != null
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
|
||||||
@@ -64,178 +65,174 @@ jobs:
|
|||||||
- name: Create release
|
- name: Create release
|
||||||
if: steps.configure.outputs.tag != null
|
if: steps.configure.outputs.tag != null
|
||||||
id: create_release
|
id: create_release
|
||||||
uses: actions/create-release@v1
|
shell: bash
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{github.token}}
|
GH_TOKEN: ${{github.token}}
|
||||||
with:
|
tag_name: ${{steps.configure.outputs.tag}}
|
||||||
tag_name: ${{github.ref}}
|
target: ${{steps.configure.outputs.sha}}
|
||||||
release_name: ${{steps.prepare.outputs.title}}
|
release_name: ${{steps.prepare.outputs.title}}
|
||||||
body_path: ${{steps.prepare.outputs.body_path}}
|
body_path: ${{steps.prepare.outputs.body_path}}
|
||||||
draft: true
|
prerelease: ${{steps.prepare.outputs.is_beta}}
|
||||||
prerelease: ${{steps.prepare.outputs.is_beta == 'yes'}}
|
run: |
|
||||||
|
if [[ $prerelease == yes ]]; then
|
||||||
|
args="--prerelease"
|
||||||
|
fi
|
||||||
|
gh release create "$tag_name" --draft --verify-tag $args \
|
||||||
|
--target "$target" --title "$release_name" \
|
||||||
|
--notes-file "$body_path"
|
||||||
|
|
||||||
build-linux:
|
build-linux:
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
# these names correspond to the files in .ci/$distro
|
# These names correspond to the files in ".ci/$distro$version"
|
||||||
include:
|
include:
|
||||||
- distro: ArchLinux
|
- distro: Arch
|
||||||
package: skip # we are packaged in arch already
|
package: skip # We are packaged in Arch already
|
||||||
allow-failure: yes
|
allow-failure: yes
|
||||||
|
|
||||||
- distro: Debian10
|
- distro: Debian
|
||||||
|
version: 11
|
||||||
package: DEB
|
package: DEB
|
||||||
test: skip # running tests on all distros is superfluous
|
test: skip # Running tests on all distros is superfluous
|
||||||
|
|
||||||
- distro: Debian11
|
- distro: Debian
|
||||||
|
version: 12
|
||||||
package: DEB
|
package: DEB
|
||||||
|
|
||||||
- distro: Fedora34
|
- distro: Fedora
|
||||||
|
version: 40
|
||||||
package: RPM
|
package: RPM
|
||||||
test: skip # gtest does not compile for some reason
|
test: skip # Running tests on all distros is superfluous
|
||||||
|
|
||||||
- distro: Fedora35
|
- distro: Fedora
|
||||||
package: RPM
|
version: 41
|
||||||
test: skip
|
|
||||||
|
|
||||||
- distro: Fedora36
|
|
||||||
package: RPM
|
package: RPM
|
||||||
|
|
||||||
- distro: UbuntuBionic
|
- distro: Ubuntu
|
||||||
|
version: 20.04
|
||||||
|
package: DEB
|
||||||
|
test: skip # Ubuntu 20.04 has a broken Qt for debug builds
|
||||||
|
|
||||||
|
- distro: Ubuntu
|
||||||
|
version: 22.04
|
||||||
|
package: DEB
|
||||||
|
test: skip # Running tests on all distros is superfluous
|
||||||
|
|
||||||
|
- distro: Ubuntu
|
||||||
|
version: 24.04
|
||||||
package: DEB
|
package: DEB
|
||||||
|
|
||||||
- distro: UbuntuFocal
|
name: ${{matrix.distro}} ${{matrix.version}}
|
||||||
package: DEB
|
|
||||||
test: skip # UbuntuFocal has a broken qt for debug builds
|
|
||||||
|
|
||||||
- distro: UbuntuImpish
|
|
||||||
package: DEB
|
|
||||||
test: skip
|
|
||||||
|
|
||||||
- distro: UbuntuJammy
|
|
||||||
package: DEB
|
|
||||||
|
|
||||||
name: ${{matrix.distro}}
|
|
||||||
needs: configure
|
needs: configure
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
continue-on-error: ${{matrix.allow-failure == 'yes'}}
|
continue-on-error: ${{matrix.allow-failure == 'yes'}}
|
||||||
env:
|
env:
|
||||||
NAME: ${{matrix.distro}}
|
NAME: ${{matrix.distro}}${{matrix.version}}
|
||||||
CACHE: /tmp/${{matrix.distro}}-cache # ${{runner.temp}} does not work?
|
CACHE: /tmp/${{matrix.distro}}${{matrix.version}}-cache # ${{runner.temp}} does not work?
|
||||||
# cache size over the entire repo is 10Gi link:
|
# Cache size over the entire repo is 10Gi:
|
||||||
# https://docs.github.com/en/actions/using-workflows/caching-dependencies-to-speed-up-workflows#usage-limits-and-eviction-policy
|
# https://docs.github.com/en/actions/using-workflows/caching-dependencies-to-speed-up-workflows#usage-limits-and-eviction-policy
|
||||||
CCACHE_SIZE: 200M
|
CCACHE_SIZE: 200M
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Get cache timestamp
|
- name: Generate cache timestamp
|
||||||
id: cache_timestamp
|
id: cache_timestamp
|
||||||
shell: bash
|
shell: bash
|
||||||
run: echo "::set-output name=timestamp::$(date -u '+%Y%m%d%H%M%S')"
|
run: echo "timestamp=$(date -u '+%Y%m%d%H%M%S')" >>"$GITHUB_OUTPUT"
|
||||||
|
|
||||||
- name: Restore cache
|
- name: Restore cache
|
||||||
uses: actions/cache@v2
|
uses: actions/cache@v4
|
||||||
env:
|
env:
|
||||||
timestamp: ${{steps.cache_timestamp.outputs.timestamp}}
|
timestamp: ${{steps.cache_timestamp.outputs.timestamp}}
|
||||||
with:
|
with:
|
||||||
path: ${{env.CACHE}}
|
path: ${{env.CACHE}}
|
||||||
key: docker-${{matrix.distro}}-cache-${{env.timestamp}}
|
key: docker-${{matrix.distro}}${{matrix.version}}-cache-${{env.timestamp}}
|
||||||
restore-keys: |
|
restore-keys: |
|
||||||
docker-${{matrix.distro}}-cache-
|
docker-${{matrix.distro}}${{matrix.version}}-cache-
|
||||||
|
|
||||||
- name: Build ${{matrix.distro}} Docker image
|
- name: Build ${{matrix.distro}} ${{matrix.version}} Docker image
|
||||||
shell: bash
|
shell: bash
|
||||||
run: source .ci/docker.sh --build
|
run: source .ci/docker.sh --build
|
||||||
|
|
||||||
- name: Build debug and test
|
- name: Build debug and test
|
||||||
if: matrix.test != 'skip'
|
if: matrix.test != 'skip'
|
||||||
shell: bash
|
shell: bash
|
||||||
env:
|
|
||||||
distro: '${{matrix.distro}}'
|
|
||||||
run: |
|
run: |
|
||||||
source .ci/docker.sh
|
source .ci/docker.sh
|
||||||
RUN --server --debug --test --ccache "$CCACHE_SIZE" --parallel 2
|
RUN --server --debug --test --ccache "$CCACHE_SIZE" --parallel 4
|
||||||
|
|
||||||
- name: Build release package
|
- name: Build release package
|
||||||
id: package
|
id: build
|
||||||
if: matrix.package != 'skip'
|
if: matrix.package != 'skip'
|
||||||
shell: bash
|
shell: bash
|
||||||
env:
|
env:
|
||||||
suffix: '-${{matrix.distro}}'
|
BUILD_DIR: build
|
||||||
|
SUFFIX: '-${{matrix.distro}}${{matrix.version}}'
|
||||||
type: '${{matrix.package}}'
|
type: '${{matrix.package}}'
|
||||||
distro: '${{matrix.distro}}'
|
|
||||||
run: |
|
run: |
|
||||||
source .ci/docker.sh
|
source .ci/docker.sh
|
||||||
RUN --server --release --package "$type" --suffix "$suffix" \
|
RUN --server --release --package "$type" --dir "$BUILD_DIR" \
|
||||||
--ccache "$CCACHE_SIZE" --parallel 2
|
--ccache "$CCACHE_SIZE" --parallel 4
|
||||||
|
.ci/name_build.sh
|
||||||
|
|
||||||
- name: Upload artifact
|
- name: Upload artifact
|
||||||
if: matrix.package != 'skip'
|
if: matrix.package != 'skip'
|
||||||
uses: actions/upload-artifact@v2
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: ${{matrix.distro}}-package
|
name: ${{matrix.distro}}${{matrix.version}}-package
|
||||||
path: ${{steps.package.outputs.path}}
|
path: ${{steps.build.outputs.path}}
|
||||||
if-no-files-found: error
|
if-no-files-found: error
|
||||||
|
|
||||||
- name: Upload to release
|
- name: Upload to release
|
||||||
if: matrix.package != 'skip' && needs.configure.outputs.tag != null
|
if: matrix.package != 'skip' && needs.configure.outputs.tag != null
|
||||||
uses: actions/upload-release-asset@v1
|
shell: bash
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{github.token}}
|
GH_TOKEN: ${{github.token}}
|
||||||
with:
|
tag_name: ${{needs.configure.outputs.tag}}
|
||||||
upload_url: ${{needs.configure.outputs.upload_url}}
|
asset_path: ${{steps.build.outputs.path}}
|
||||||
asset_path: ${{steps.package.outputs.path}}
|
asset_name: ${{steps.build.outputs.name}}
|
||||||
asset_name: ${{steps.package.outputs.name}}
|
run: gh release upload "$tag_name" "$asset_path#$asset_name"
|
||||||
asset_content_type: application/octet-stream
|
|
||||||
|
|
||||||
build-macos:
|
build-macos:
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
- target: Debug # tests only
|
- target: 13
|
||||||
os: macos-latest
|
soc: Intel
|
||||||
xcode: 12.5.1
|
os: macos-13
|
||||||
qt_version: 6
|
xcode: "14.3.1"
|
||||||
|
type: Release
|
||||||
|
core_count: 4
|
||||||
|
make_package: 1
|
||||||
|
|
||||||
|
- target: 14
|
||||||
|
soc: Apple
|
||||||
|
os: macos-14
|
||||||
|
xcode: "15.4"
|
||||||
|
type: Release
|
||||||
|
core_count: 3
|
||||||
|
make_package: 1
|
||||||
|
|
||||||
|
- target: 15
|
||||||
|
soc: Apple
|
||||||
|
os: macos-15
|
||||||
|
xcode: "16.2"
|
||||||
|
type: Release
|
||||||
|
core_count: 3
|
||||||
|
make_package: 1
|
||||||
|
|
||||||
|
- target: 15
|
||||||
|
soc: Apple
|
||||||
|
os: macos-15
|
||||||
|
xcode: "16.2"
|
||||||
type: Debug
|
type: Debug
|
||||||
do_tests: 1
|
core_count: 3
|
||||||
|
|
||||||
- target: 10.14_Mojave
|
name: macOS ${{matrix.target}}${{ matrix.soc == 'Intel' && ' Intel' || '' }}${{ matrix.type == 'Debug' && ' Debug' || '' }}
|
||||||
os: macos-10.15 # runs on Catalina
|
|
||||||
xcode: 10.3 # allows compatibility with macOS 10.14
|
|
||||||
qt_version: 5
|
|
||||||
type: Release
|
|
||||||
# do_tests: 1 # tests do not work on qt5?
|
|
||||||
make_package: 1
|
|
||||||
|
|
||||||
- target: 10.15_Catalina
|
|
||||||
os: macos-10.15
|
|
||||||
xcode: 12.4
|
|
||||||
qt_version: 6
|
|
||||||
type: Release
|
|
||||||
do_tests: 1
|
|
||||||
make_package: 1
|
|
||||||
|
|
||||||
- target: 11_Big_Sur
|
|
||||||
os: macos-11
|
|
||||||
xcode: 13.2
|
|
||||||
qt_version: 6
|
|
||||||
type: Release
|
|
||||||
do_tests: 1
|
|
||||||
make_package: 1
|
|
||||||
|
|
||||||
# - target: 12_Monterey
|
|
||||||
# os: macos-12
|
|
||||||
# xcode: 13.3
|
|
||||||
# qt_version: 6
|
|
||||||
# type: Release
|
|
||||||
# do_tests: 1
|
|
||||||
# make_package: 1
|
|
||||||
|
|
||||||
name: macOS ${{matrix.target}}
|
|
||||||
needs: configure
|
needs: configure
|
||||||
runs-on: ${{matrix.os}}
|
runs-on: ${{matrix.os}}
|
||||||
continue-on-error: ${{matrix.allow-failure == 'yes'}}
|
continue-on-error: ${{matrix.allow-failure == 'yes'}}
|
||||||
@@ -245,140 +242,193 @@ jobs:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Install dependencies using homebrew
|
- name: Install dependencies using Homebrew
|
||||||
shell: bash
|
shell: bash
|
||||||
# cmake cannot find the mysql connector
|
# CMake cannot find the MySQL connector
|
||||||
# neither of these works: mariadb-connector-c mysql-connector-c++
|
# Neither of these works: mariadb-connector-c mysql-connector-c++
|
||||||
env:
|
env:
|
||||||
qt_version: 'qt@${{matrix.qt_version}}'
|
HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK: 1
|
||||||
run: |
|
run: |
|
||||||
brew update
|
brew update
|
||||||
brew install protobuf
|
brew install protobuf qt --force-bottle
|
||||||
brew install "$qt_version" --force-bottle
|
|
||||||
|
|
||||||
- name: Build on Xcode ${{matrix.xcode}}
|
- name: Build & Sign on Xcode ${{matrix.xcode}}
|
||||||
shell: bash
|
shell: bash
|
||||||
id: build
|
id: build
|
||||||
env:
|
env:
|
||||||
BUILDTYPE: '${{matrix.type}}'
|
BUILDTYPE: '${{matrix.type}}'
|
||||||
MAKE_TEST: '${{matrix.do_tests}}'
|
MAKE_TEST: 1
|
||||||
MAKE_PACKAGE: '${{matrix.make_package}}'
|
MAKE_PACKAGE: '${{matrix.make_package}}'
|
||||||
PACKAGE_SUFFIX: '-macOS-${{matrix.target}}'
|
PACKAGE_SUFFIX: '-macOS${{matrix.target}}_${{matrix.soc}}'
|
||||||
# set QTDIR to find qt5, qt6 can be found without this
|
MACOS_CERTIFICATE: ${{ secrets.PROD_MACOS_CERTIFICATE }}
|
||||||
QTDIR: '/usr/local/opt/qt5'
|
MACOS_CERTIFICATE_PWD: ${{ secrets.PROD_MACOS_CERTIFICATE_PWD }}
|
||||||
# Mac machines actually have 3 cores
|
MACOS_CERTIFICATE_NAME: ${{ secrets.PROD_MACOS_CERTIFICATE_NAME }}
|
||||||
run: .ci/compile.sh --server --parallel 3
|
MACOS_CI_KEYCHAIN_PWD: ${{ secrets.PROD_MACOS_CI_KEYCHAIN_PWD }}
|
||||||
|
# macOS runner have 3 cores usually - only the macos-13 image has 4:
|
||||||
|
# https://docs.github.com/en/actions/using-github-hosted-runners/using-github-hosted-runners/about-github-hosted-runners#standard-github-hosted-runners-for-public-repositories
|
||||||
|
# https://github.com/actions/runner-images?tab=readme-ov-file#available-images
|
||||||
|
run: |
|
||||||
|
if [[ -n "$MACOS_CERTIFICATE_NAME" ]]
|
||||||
|
then
|
||||||
|
echo $MACOS_CERTIFICATE | base64 --decode > certificate.p12
|
||||||
|
security create-keychain -p "$MACOS_CI_KEYCHAIN_PWD" build.keychain
|
||||||
|
security default-keychain -s build.keychain
|
||||||
|
security set-keychain-settings -t 3600 -l build.keychain
|
||||||
|
security unlock-keychain -p "$MACOS_CI_KEYCHAIN_PWD" build.keychain
|
||||||
|
security import certificate.p12 -k build.keychain -P "$MACOS_CERTIFICATE_PWD" -T /usr/bin/codesign
|
||||||
|
security set-key-partition-list -S apple-tool:,apple:,codesign: -s -k "$MACOS_CI_KEYCHAIN_PWD" build.keychain
|
||||||
|
fi
|
||||||
|
.ci/compile.sh --server --parallel ${{matrix.core_count}}
|
||||||
|
|
||||||
|
- name: Sign app bundle
|
||||||
|
if: matrix.make_package
|
||||||
|
env:
|
||||||
|
MACOS_CERTIFICATE_NAME: ${{ secrets.PROD_MACOS_CERTIFICATE_NAME }}
|
||||||
|
MACOS_CI_KEYCHAIN_PWD: ${{ secrets.PROD_MACOS_CI_KEYCHAIN_PWD }}
|
||||||
|
run: |
|
||||||
|
if [[ -n "$MACOS_CERTIFICATE_NAME" ]]
|
||||||
|
then
|
||||||
|
security unlock-keychain -p "$MACOS_CI_KEYCHAIN_PWD" build.keychain
|
||||||
|
/usr/bin/codesign --sign="$MACOS_CERTIFICATE_NAME" --entitlements=".ci/macos.entitlements" --options=runtime --force --deep --timestamp --verbose ${{steps.build.outputs.path}}
|
||||||
|
fi
|
||||||
|
|
||||||
|
- name: Notarize app bundle
|
||||||
|
if: matrix.make_package
|
||||||
|
env:
|
||||||
|
MACOS_NOTARIZATION_APPLE_ID: ${{ secrets.PROD_MACOS_NOTARIZATION_APPLE_ID }}
|
||||||
|
MACOS_NOTARIZATION_TEAM_ID: ${{ secrets.PROD_MACOS_NOTARIZATION_TEAM_ID }}
|
||||||
|
MACOS_NOTARIZATION_PWD: ${{ secrets.PROD_MACOS_NOTARIZATION_PWD }}
|
||||||
|
run: |
|
||||||
|
if [[ -n "$MACOS_NOTARIZATION_APPLE_ID" ]]
|
||||||
|
then
|
||||||
|
# Store the notarization credentials so that we can prevent a UI password dialog from blocking the CI
|
||||||
|
echo "Create keychain profile"
|
||||||
|
xcrun notarytool store-credentials "notarytool-profile" --apple-id "$MACOS_NOTARIZATION_APPLE_ID" --team-id "$MACOS_NOTARIZATION_TEAM_ID" --password "$MACOS_NOTARIZATION_PWD"
|
||||||
|
|
||||||
|
# We can't notarize an app bundle directly, but we need to compress it as an archive.
|
||||||
|
# Therefore, we create a zip file containing our app bundle, so that we can send it to the
|
||||||
|
# notarization service
|
||||||
|
echo "Creating temp notarization archive"
|
||||||
|
ditto -c -k --keepParent ${{steps.build.outputs.path}} "notarization.zip"
|
||||||
|
|
||||||
|
# Here we send the notarization request to the Apple's Notarization service, waiting for the result.
|
||||||
|
# This typically takes a few seconds inside a CI environment, but it might take more depending on the App
|
||||||
|
# characteristics. Visit the Notarization docs for more information and strategies on how to optimize it if
|
||||||
|
# you're curious
|
||||||
|
echo "Notarize app"
|
||||||
|
xcrun notarytool submit "notarization.zip" --keychain-profile "notarytool-profile" --wait
|
||||||
|
|
||||||
|
# Finally, we need to "attach the staple" to our executable, which will allow our app to be
|
||||||
|
# validated by macOS even when an internet connection is not available.
|
||||||
|
echo "Attach staple"
|
||||||
|
xcrun stapler staple ${{steps.build.outputs.path}}
|
||||||
|
fi
|
||||||
|
|
||||||
- name: Upload artifact
|
- name: Upload artifact
|
||||||
if: matrix.make_package
|
if: matrix.make_package
|
||||||
uses: actions/upload-artifact@v2
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: macOS-${{matrix.target}}-dmg
|
name: macOS${{matrix.target}}${{ matrix.soc == 'Intel' && '_Intel' || '' }}${{ matrix.type == 'Debug' && '_Debug' || '' }}-dmg
|
||||||
path: ${{steps.build.outputs.path}}
|
path: ${{steps.build.outputs.path}}
|
||||||
if-no-files-found: error
|
if-no-files-found: error
|
||||||
|
|
||||||
- name: Upload to release
|
- name: Upload to release
|
||||||
if: matrix.make_package && needs.configure.outputs.tag != null
|
if: matrix.package != 'skip' && needs.configure.outputs.tag != null
|
||||||
uses: actions/upload-release-asset@v1
|
shell: bash
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{github.token}}
|
GH_TOKEN: ${{github.token}}
|
||||||
with:
|
tag_name: ${{needs.configure.outputs.tag}}
|
||||||
upload_url: ${{needs.configure.outputs.upload_url}}
|
|
||||||
asset_path: ${{steps.build.outputs.path}}
|
asset_path: ${{steps.build.outputs.path}}
|
||||||
asset_name: ${{steps.build.outputs.name}}
|
asset_name: ${{steps.build.outputs.name}}
|
||||||
asset_content_type: application/octet-stream
|
run: gh release upload "$tag_name" "$asset_path#$asset_name"
|
||||||
|
|
||||||
build-windows:
|
build-windows:
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
- arch: 32
|
- target: 7
|
||||||
vcpkg_default_triplet: x86
|
qt_version: 5.15.*
|
||||||
qt_version: '5.15.2'
|
|
||||||
cmake_generator_platform: Win32
|
|
||||||
qt_arch: msvc2019
|
|
||||||
- arch: 64
|
|
||||||
vcpkg_default_triplet: x64
|
|
||||||
qt_version: '6.3.0'
|
|
||||||
cmake_generator_platform: x64
|
|
||||||
qt_arch: msvc2019_64
|
qt_arch: msvc2019_64
|
||||||
qt_modules: "qt5compat qtmultimedia qtwebsockets"
|
|
||||||
|
|
||||||
name: Windows (${{matrix.arch}}-bit)
|
- target: 10
|
||||||
|
qt_version: 6.6.*
|
||||||
|
qt_arch: msvc2019_64
|
||||||
|
qt_modules: "qtimageformats qtmultimedia qtwebsockets"
|
||||||
|
|
||||||
|
name: Windows ${{matrix.target}}
|
||||||
needs: configure
|
needs: configure
|
||||||
runs-on: windows-2019
|
runs-on: windows-2022
|
||||||
env:
|
env:
|
||||||
CMAKE_GENERATOR: 'Visual Studio 16 2019'
|
CMAKE_GENERATOR: 'Visual Studio 17 2022'
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Add msbuild to PATH
|
- name: Add msbuild to PATH
|
||||||
id: add-msbuild
|
id: add-msbuild
|
||||||
uses: microsoft/setup-msbuild@v1.1
|
uses: microsoft/setup-msbuild@v2
|
||||||
|
with:
|
||||||
|
msbuild-architecture: x64
|
||||||
|
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
submodules: recursive
|
submodules: recursive
|
||||||
|
|
||||||
- name: Restore Qt ${{matrix.qt_version}} (${{matrix.arch}}-bit) from cache
|
- name: Install Qt ${{matrix.qt_version}}
|
||||||
id: cache-qt
|
uses: jurplel/install-qt-action@v4
|
||||||
uses: actions/cache@v1 # Intentionally v1, based on jurplel documentation
|
|
||||||
with:
|
with:
|
||||||
key: ${{runner.os}}-QtCache-${{matrix.qt_version}}-${{matrix.arch}}
|
cache: true
|
||||||
path: '${{github.workspace}}/../Qt'
|
setup-python: false
|
||||||
|
|
||||||
- name: Install Qt ${{matrix.qt_version}} (${{matrix.arch}}-bit)
|
|
||||||
uses: jurplel/install-qt-action@v3
|
|
||||||
with:
|
|
||||||
cached: ${{steps.cache-qt.outputs.cache-hit}}
|
|
||||||
version: ${{matrix.qt_version}}
|
version: ${{matrix.qt_version}}
|
||||||
arch: win${{matrix.arch}}_${{matrix.qt_arch}}
|
arch: win64_${{matrix.qt_arch}}
|
||||||
|
tools: ${{matrix.qt_tools}}
|
||||||
modules: ${{matrix.qt_modules}}
|
modules: ${{matrix.qt_modules}}
|
||||||
|
|
||||||
- name: Run vcpkg
|
- name: Run vcpkg
|
||||||
uses: lukka/run-vcpkg@v10.2
|
uses: lukka/run-vcpkg@v11
|
||||||
with:
|
with:
|
||||||
runVcpkgInstall: true
|
runVcpkgInstall: true
|
||||||
appendedCacheKey: ${{matrix.arch}}-bit
|
doNotCache: false
|
||||||
env:
|
env:
|
||||||
VCPKG_DEFAULT_TRIPLET: '${{matrix.vcpkg_default_triplet}}-windows'
|
VCPKG_DEFAULT_TRIPLET: 'x64-windows'
|
||||||
VCPKG_DISABLE_METRICS: 1
|
VCPKG_DISABLE_METRICS: 1
|
||||||
|
|
||||||
- name: Install OpenSSL (${{matrix.arch}}-bit)
|
- name: Build Cockatrice
|
||||||
shell: bash
|
|
||||||
run: .ci/download_openssl.sh --arch ${{matrix.arch}}
|
|
||||||
|
|
||||||
- name: Build Cockatrice (${{matrix.arch}}-bit)
|
|
||||||
id: build
|
id: build
|
||||||
shell: bash
|
shell: bash
|
||||||
env:
|
env:
|
||||||
PACKAGE_SUFFIX: '-win${{matrix.arch}}'
|
PACKAGE_SUFFIX: '-Win${{matrix.target}}'
|
||||||
CMAKE_GENERATOR: '${{env.CMAKE_GENERATOR}}'
|
CMAKE_GENERATOR: '${{env.CMAKE_GENERATOR}}'
|
||||||
CMAKE_GENERATOR_PLATFORM: '${{matrix.cmake_generator_platform}}'
|
CMAKE_GENERATOR_PLATFORM: 'x64'
|
||||||
QTDIR: '${{github.workspace}}\Qt\${{matrix.qt_version}}\win${{matrix.arch}}_${{matrix.qt_arch}}'
|
QTDIR: '${{github.workspace}}\Qt\${{matrix.qt_version}}\win64_${{matrix.qt_arch}}'
|
||||||
run: .ci/compile.sh --server --release --test --package --parallel 2
|
# No need for --parallel flag, MTT is added in the compile script to let cmake/msbuild manage core count,
|
||||||
|
# project and process parallelism: https://devblogs.microsoft.com/cppblog/improved-parallelism-in-msbuild/
|
||||||
- name: Setup tmate session
|
run: .ci/compile.sh --server --release --test --package
|
||||||
if: ${{ failure() }}
|
|
||||||
uses: mxschmitt/action-tmate@v3
|
|
||||||
|
|
||||||
- name: Upload artifact
|
- name: Upload artifact
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: Windows-${{matrix.arch}}bit-installer
|
name: Windows${{matrix.target}}-installer
|
||||||
path: ${{steps.build.outputs.path}}
|
path: ${{steps.build.outputs.path}}
|
||||||
if-no-files-found: error
|
if-no-files-found: error
|
||||||
|
|
||||||
- name: Upload to release
|
- name: Upload pdb database
|
||||||
if: needs.configure.outputs.tag != null
|
uses: actions/upload-artifact@v4
|
||||||
uses: actions/upload-release-asset@v1
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{github.token}}
|
|
||||||
with:
|
with:
|
||||||
upload_url: ${{needs.configure.outputs.upload_url}}
|
name: Windows${{matrix.target}}-debug-pdbs
|
||||||
|
path: |
|
||||||
|
build/cockatrice/Release/*.pdb
|
||||||
|
build/servatrice/Release/*.pdb
|
||||||
|
if-no-files-found: error
|
||||||
|
|
||||||
|
- name: Upload to release
|
||||||
|
if: matrix.package != 'skip' && needs.configure.outputs.tag != null
|
||||||
|
shell: bash
|
||||||
|
env:
|
||||||
|
GH_TOKEN: ${{github.token}}
|
||||||
|
tag_name: ${{needs.configure.outputs.tag}}
|
||||||
asset_path: ${{steps.build.outputs.path}}
|
asset_path: ${{steps.build.outputs.path}}
|
||||||
asset_name: ${{steps.build.outputs.name}}
|
asset_name: ${{steps.build.outputs.name}}
|
||||||
asset_content_type: application/octet-stream
|
run: gh release upload "$tag_name" "$asset_path#$asset_name"
|
||||||
|
|||||||
13
.github/workflows/desktop-lint.yml
vendored
@@ -6,23 +6,24 @@ on:
|
|||||||
- '**.md'
|
- '**.md'
|
||||||
- 'webclient/**'
|
- 'webclient/**'
|
||||||
- '.github/workflows/web-*.yml'
|
- '.github/workflows/web-*.yml'
|
||||||
|
- '.github/workflows/translations-*.yml'
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
clang-format:
|
format:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-22.04
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
fetch-depth: 20 # should be enough to find merge base
|
fetch-depth: 20 # should be enough to find merge base
|
||||||
|
|
||||||
- name: Install clang-format
|
- name: Install dependencies
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
sudo apt-get update
|
sudo apt-get update
|
||||||
sudo apt-get install -y --no-install-recommends clang-format
|
sudo apt-get install -y --no-install-recommends clang-format cmake-format
|
||||||
|
|
||||||
- name: Run clangify
|
- name: Check code formatting
|
||||||
shell: bash
|
shell: bash
|
||||||
run: ./.ci/lint_cpp.sh
|
run: ./.ci/lint_cpp.sh
|
||||||
|
|||||||
72
.github/workflows/translations-pull.yml
vendored
Normal file
@@ -0,0 +1,72 @@
|
|||||||
|
name: Update Translations
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
schedule:
|
||||||
|
# runs in the middle of each month starting a quarter (UTC) = two weeks after new strings are built
|
||||||
|
- cron: '0 0 15 1,4,7,10 *'
|
||||||
|
pull_request:
|
||||||
|
paths:
|
||||||
|
- '.github/workflows/translations-pull.yml'
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
translations:
|
||||||
|
# Do not run the scheduled workflow on forks
|
||||||
|
if: github.event_name != 'schedule' || github.repository_owner == 'Cockatrice'
|
||||||
|
|
||||||
|
name: Pull languages
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout repo
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Pull translated strings from Transifex
|
||||||
|
uses: transifex/cli-action@v2
|
||||||
|
with:
|
||||||
|
# used config file: https://github.com/Cockatrice/Cockatrice/blob/master/.tx/config
|
||||||
|
# https://github.com/transifex/cli#pulling-files-from-transifex
|
||||||
|
token: ${{ secrets.TX_TOKEN }}
|
||||||
|
args: pull --force --all
|
||||||
|
|
||||||
|
- name: Create pull request
|
||||||
|
if: github.event_name != 'pull_request'
|
||||||
|
id: create_pr
|
||||||
|
uses: peter-evans/create-pull-request@v7
|
||||||
|
with:
|
||||||
|
add-paths: |
|
||||||
|
cockatrice/translations/*.ts
|
||||||
|
oracle/translations/*.ts
|
||||||
|
webclient/public/locales/*/translation.json
|
||||||
|
commit-message: Update translation files
|
||||||
|
# author is the owner of the commit
|
||||||
|
author: github-actions <github-actions@github.com>
|
||||||
|
branch: ci-update_translations
|
||||||
|
delete-branch: true
|
||||||
|
title: 'Update translations'
|
||||||
|
body: |
|
||||||
|
Pulled all translated strings from [Transifex][1].
|
||||||
|
|
||||||
|
---
|
||||||
|
*This PR is automatically generated and updated by the workflow at `.github/workflows/translations-pull.yml`. Review [action runs][2].*<br>
|
||||||
|
*After merging, all new languages and translations are available in the next build.*
|
||||||
|
|
||||||
|
[1]: https://app.transifex.com/cockatrice/cockatrice/
|
||||||
|
[2]: https://github.com/Cockatrice/Cockatrice/actions/workflows/translations-pull.yml?query=branch%3Amaster
|
||||||
|
labels: |
|
||||||
|
CI
|
||||||
|
Translation
|
||||||
|
draft: false
|
||||||
|
|
||||||
|
- name: PR Status
|
||||||
|
if: github.event_name != 'pull_request'
|
||||||
|
shell: bash
|
||||||
|
env:
|
||||||
|
STATUS: ${{ steps.create_pr.outputs.pull-request-operation }}
|
||||||
|
run: |
|
||||||
|
if [[ "$STATUS" == "none" ]]; then
|
||||||
|
echo "PR #${{ steps.create_pr.outputs.pull-request-number }} unchanged!" >> $GITHUB_STEP_SUMMARY
|
||||||
|
else
|
||||||
|
echo "PR #${{ steps.create_pr.outputs.pull-request-number }} $STATUS!" >> $GITHUB_STEP_SUMMARY
|
||||||
|
fi
|
||||||
|
echo "URL: ${{ steps.create_pr.outputs.pull-request-url }}" >> $GITHUB_STEP_SUMMARY
|
||||||
87
.github/workflows/translations-push.yml
vendored
Normal file
@@ -0,0 +1,87 @@
|
|||||||
|
name: Update Translation Source
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
schedule:
|
||||||
|
# runs at the start of each quarter (UTC)
|
||||||
|
- cron: '0 0 1 1,4,7,10 *'
|
||||||
|
pull_request:
|
||||||
|
paths:
|
||||||
|
- '.github/workflows/translations-push.yml'
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
translations:
|
||||||
|
# Do not run the scheduled workflow on forks
|
||||||
|
if: github.event_name != 'schedule' || github.repository_owner == 'Cockatrice'
|
||||||
|
|
||||||
|
name: Push strings
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout repo
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Install lupdate
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
sudo apt-get update
|
||||||
|
sudo apt-get install -y --no-install-recommends qttools5-dev-tools
|
||||||
|
|
||||||
|
- name: Update Cockatrice translation source
|
||||||
|
id: cockatrice
|
||||||
|
shell: bash
|
||||||
|
env:
|
||||||
|
FILE: 'cockatrice/cockatrice_en@source.ts'
|
||||||
|
DIRS: 'cockatrice/src common'
|
||||||
|
run: .ci/update_translation_source_strings.sh
|
||||||
|
|
||||||
|
- name: Update Oracle translation source
|
||||||
|
id: oracle
|
||||||
|
shell: bash
|
||||||
|
env:
|
||||||
|
FILE: 'oracle/oracle_en@source.ts'
|
||||||
|
DIRS: 'oracle/src'
|
||||||
|
run: .ci/update_translation_source_strings.sh
|
||||||
|
|
||||||
|
- name: Render template
|
||||||
|
id: template
|
||||||
|
uses: chuhlomin/render-template@v1
|
||||||
|
with:
|
||||||
|
template: .ci/update_translation_source_strings_template.md
|
||||||
|
vars: |
|
||||||
|
cockatrice_output: ${{ steps.cockatrice.outputs.output }}
|
||||||
|
oracle_output: ${{ steps.oracle.outputs.output }}
|
||||||
|
commit: ${{ github.sha }}
|
||||||
|
|
||||||
|
- name: Create pull request
|
||||||
|
if: github.event_name != 'pull_request'
|
||||||
|
id: create_pr
|
||||||
|
uses: peter-evans/create-pull-request@v7
|
||||||
|
with:
|
||||||
|
add-paths: |
|
||||||
|
cockatrice/cockatrice_en@source.ts
|
||||||
|
oracle/oracle_en@source.ts
|
||||||
|
commit-message: Update translation source strings
|
||||||
|
# author is the owner of the commit
|
||||||
|
author: github-actions <github-actions@github.com>
|
||||||
|
branch: ci-update_translation_source
|
||||||
|
delete-branch: true
|
||||||
|
title: 'Update source strings'
|
||||||
|
body: ${{ steps.template.outputs.result }}
|
||||||
|
labels: |
|
||||||
|
CI
|
||||||
|
Translation
|
||||||
|
draft: false
|
||||||
|
|
||||||
|
- name: PR Status
|
||||||
|
if: github.event_name != 'pull_request'
|
||||||
|
shell: bash
|
||||||
|
env:
|
||||||
|
STATUS: ${{ steps.create_pr.outputs.pull-request-operation }}
|
||||||
|
run: |
|
||||||
|
if [[ "$STATUS" == "none" ]]; then
|
||||||
|
echo "PR #${{ steps.create_pr.outputs.pull-request-number }} unchanged!" >> $GITHUB_STEP_SUMMARY
|
||||||
|
else
|
||||||
|
echo "PR #${{ steps.create_pr.outputs.pull-request-number }} $STATUS!" >> $GITHUB_STEP_SUMMARY
|
||||||
|
fi
|
||||||
|
echo "URL: ${{ steps.create_pr.outputs.pull-request-url }}" >> $GITHUB_STEP_SUMMARY
|
||||||
66
.github/workflows/translations.yml
vendored
@@ -1,66 +0,0 @@
|
|||||||
name: Update translation source
|
|
||||||
|
|
||||||
on:
|
|
||||||
workflow_dispatch:
|
|
||||||
schedule:
|
|
||||||
# runs once per month
|
|
||||||
- cron: '0 0 1 * *'
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
translations:
|
|
||||||
# Do not run the scheduled workflow on forks
|
|
||||||
if: github.event_name != 'schedule' || github.repository_owner == 'Cockatrice'
|
|
||||||
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Install lupdate
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
sudo apt-get update
|
|
||||||
sudo apt-get install -y --no-install-recommends qttools5-dev-tools
|
|
||||||
|
|
||||||
- name: Checkout repo
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
|
|
||||||
- name: Update cockatrice translations
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
shopt -s globstar # globstar is needed for recursive **
|
|
||||||
lupdate -version
|
|
||||||
echo "reading the following source files:"
|
|
||||||
# note: there are three strings to translate in common right now
|
|
||||||
echo {cockatrice,common}/**/*.{cpp,h}
|
|
||||||
echo "$(echo {cockatrice,common}/**/*.{cpp,h} | wc -w) files total"
|
|
||||||
lupdate {cockatrice,common}/**/*.{cpp,h} -ts cockatrice/translations/cockatrice_en@source.ts
|
|
||||||
|
|
||||||
- name: Update oracle translations
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
shopt -s globstar # globstar is needed for recursive **
|
|
||||||
lupdate -version
|
|
||||||
echo "reading the following source files:"
|
|
||||||
echo oracle/**/*.{cpp,h}
|
|
||||||
echo "$(echo oracle/**/*.{cpp,h} | wc -w) files total"
|
|
||||||
lupdate oracle/**/*.{cpp,h} -ts oracle/translations/oracle_en@source.ts
|
|
||||||
|
|
||||||
- name: Check for updates
|
|
||||||
id: check
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
set +e # do not fail, just save the exit state
|
|
||||||
git diff --exit-code
|
|
||||||
echo "::set-output name=deploy::$?"
|
|
||||||
|
|
||||||
- name: Commit changes
|
|
||||||
if: steps.check.outputs.deploy == '1'
|
|
||||||
shell: bash
|
|
||||||
working-directory: ${{env.OUTPUT_PATH}}
|
|
||||||
run: |
|
|
||||||
git config user.name github-actions
|
|
||||||
git config user.email github-actions@github.com
|
|
||||||
git add cockatrice/translations/cockatrice_en@source.ts oracle/translations/oracle_en@source.ts
|
|
||||||
git commit -m "Automated translation update ( $GITHUB_SHA )"
|
|
||||||
git push
|
|
||||||
deploy_commit=$(git rev-parse HEAD)
|
|
||||||
echo "Created commit: $GITHUB_SERVER_URL/$GITHUB_REPOSITORY/commit/$deploy_commit"
|
|
||||||
7
.github/workflows/web-build.yml
vendored
@@ -28,15 +28,15 @@ jobs:
|
|||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
node_version:
|
node_version:
|
||||||
- 12
|
- 16
|
||||||
- lts/*
|
- lts/*
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Setup Node.js
|
- name: Setup Node.js
|
||||||
uses: actions/setup-node@v2
|
uses: actions/setup-node@v4
|
||||||
with:
|
with:
|
||||||
node-version: ${{matrix.node_version}}
|
node-version: ${{matrix.node_version}}
|
||||||
cache: 'npm'
|
cache: 'npm'
|
||||||
@@ -50,4 +50,3 @@ jobs:
|
|||||||
|
|
||||||
- name: Test app
|
- name: Test app
|
||||||
run: npm run test
|
run: npm run test
|
||||||
|
|
||||||
|
|||||||
4
.github/workflows/web-lint.yml
vendored
@@ -17,10 +17,10 @@ jobs:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Setup Node.js
|
- name: Setup Node.js
|
||||||
uses: actions/setup-node@v2
|
uses: actions/setup-node@v4
|
||||||
with:
|
with:
|
||||||
cache: 'npm'
|
cache: 'npm'
|
||||||
cache-dependency-path: 'webclient/package-lock.json'
|
cache-dependency-path: 'webclient/package-lock.json'
|
||||||
|
|||||||
5
.gitignore
vendored
@@ -6,8 +6,11 @@ mysql.cnf
|
|||||||
.DS_Store
|
.DS_Store
|
||||||
.idea/
|
.idea/
|
||||||
*.aps
|
*.aps
|
||||||
cmake-build-debug*
|
cmake-build*
|
||||||
preferences
|
preferences
|
||||||
compile_commands.json
|
compile_commands.json
|
||||||
.vs/
|
.vs/
|
||||||
.vscode/
|
.vscode/
|
||||||
|
.cache
|
||||||
|
.gdb_history
|
||||||
|
cockatrice/resources/config/qtlogging.ini
|
||||||
|
|||||||
27
.tx/config
@@ -1,13 +1,26 @@
|
|||||||
[main]
|
[main]
|
||||||
host = https://www.transifex.com
|
host = https://app.transifex.com
|
||||||
|
|
||||||
[cockatrice.cockatrice-translations-cockatrice-en-source-ts--master]
|
[o:cockatrice:p:cockatrice:r:cockatrice-cockatrice-en-source-ts--master]
|
||||||
|
resource_name = Cockatrice
|
||||||
|
source_lang = en
|
||||||
|
source_file = cockatrice/cockatrice_en@source.ts
|
||||||
file_filter = cockatrice/translations/cockatrice_<lang>.ts
|
file_filter = cockatrice/translations/cockatrice_<lang>.ts
|
||||||
source_file = cockatrice/translations/cockatrice_en@source.ts
|
type = QT
|
||||||
source_lang = en
|
minimum_perc = 10
|
||||||
|
|
||||||
[cockatrice.oracle-translations-oracle-en-source-ts--master]
|
[o:cockatrice:p:cockatrice:r:oracle-oracle-en-source-ts--master]
|
||||||
|
resource_name = Oracle
|
||||||
|
source_lang = en
|
||||||
|
source_file = oracle/oracle_en@source.ts
|
||||||
file_filter = oracle/translations/oracle_<lang>.ts
|
file_filter = oracle/translations/oracle_<lang>.ts
|
||||||
source_file = oracle/translations/oracle_en@source.ts
|
type = QT
|
||||||
source_lang = en
|
minimum_perc = 10
|
||||||
|
|
||||||
|
[o:cockatrice:p:cockatrice:r:webclient-src-i18n-default-json--master]
|
||||||
|
resource_name = Webclient
|
||||||
|
source_lang = en
|
||||||
|
source_file = webclient/src/i18n-default.json
|
||||||
|
file_filter = webclient/public/locales/<lang>/translation.json
|
||||||
|
type = KEYVALUEJSON
|
||||||
|
minimum_perc = 10
|
||||||
|
|||||||
201
CMakeLists.txt
@@ -27,44 +27,65 @@ option(TEST "build tests" OFF)
|
|||||||
|
|
||||||
# Default to "Release" build type
|
# Default to "Release" build type
|
||||||
# User-provided value for CMAKE_BUILD_TYPE must be checked before the PROJECT() call
|
# User-provided value for CMAKE_BUILD_TYPE must be checked before the PROJECT() call
|
||||||
IF(DEFINED CMAKE_BUILD_TYPE)
|
if(DEFINED CMAKE_BUILD_TYPE)
|
||||||
SET(CMAKE_BUILD_TYPE ${CMAKE_BUILD_TYPE} CACHE STRING "Type of build")
|
set(CMAKE_BUILD_TYPE
|
||||||
ELSE()
|
${CMAKE_BUILD_TYPE}
|
||||||
SET(CMAKE_BUILD_TYPE Release CACHE STRING "Type of build")
|
CACHE STRING "Type of build"
|
||||||
ENDIF()
|
)
|
||||||
|
else()
|
||||||
|
set(CMAKE_BUILD_TYPE
|
||||||
|
Release
|
||||||
|
CACHE STRING "Type of build"
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
|
||||||
if(USE_CCACHE)
|
if(USE_CCACHE)
|
||||||
find_program(CCACHE_PROGRAM ccache)
|
find_program(CCACHE_PROGRAM ccache)
|
||||||
if(CCACHE_PROGRAM)
|
if(CCACHE_PROGRAM)
|
||||||
# Support Unix Makefiles and Ninja
|
# Support Unix Makefiles and Ninja
|
||||||
set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE "${CCACHE_PROGRAM}")
|
set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE "${CCACHE_PROGRAM}")
|
||||||
MESSAGE(STATUS "Found CCache ${CCACHE_PROGRAM}")
|
message(STATUS "Found CCache ${CCACHE_PROGRAM}")
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(WIN32)
|
if(WIN32)
|
||||||
# Use vcpkg toolchain on Windows
|
# Use vcpkg toolchain on Windows
|
||||||
set(CMAKE_TOOLCHAIN_FILE ${CMAKE_CURRENT_SOURCE_DIR}/vcpkg/scripts/buildsystems/vcpkg.cmake
|
set(CMAKE_TOOLCHAIN_FILE
|
||||||
CACHE STRING "Vcpkg toolchain file")
|
${CMAKE_CURRENT_SOURCE_DIR}/vcpkg/scripts/buildsystems/vcpkg.cmake
|
||||||
|
CACHE STRING "Vcpkg toolchain file"
|
||||||
|
)
|
||||||
# Qt path set by user or env var
|
# Qt path set by user or env var
|
||||||
if (QTDIR OR DEFINED ENV{QTDIR} OR DEFINED ENV{QTDIR32} OR DEFINED ENV{QTDIR64})
|
if(QTDIR
|
||||||
|
OR DEFINED ENV{QTDIR}
|
||||||
|
OR DEFINED ENV{QTDIR32}
|
||||||
|
OR DEFINED ENV{QTDIR64}
|
||||||
|
)
|
||||||
|
|
||||||
else()
|
else()
|
||||||
set(QTDIR "" CACHE PATH "Path to Qt (e.g. C:/Qt/5.7/msvc2015_64)")
|
set(QTDIR
|
||||||
message(WARNING "QTDIR variable is missing. Please set this variable to specify path to Qt (e.g. C:/Qt/5.7/msvc2015_64)")
|
""
|
||||||
|
CACHE PATH "Path to Qt (e.g. C:/Qt/5.7/msvc2015_64)"
|
||||||
|
)
|
||||||
|
message(
|
||||||
|
WARNING "QTDIR variable is missing. Please set this variable to specify path to Qt (e.g. C:/Qt/5.7/msvc2015_64)"
|
||||||
|
)
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# A project name is needed for CPack
|
# A project name is needed for CPack
|
||||||
# Version can be overriden by git tags, see cmake/getversion.cmake
|
# Version can be overriden by git tags, see cmake/getversion.cmake
|
||||||
project("Cockatrice" VERSION 2.8.1)
|
project("Cockatrice" VERSION 2.10.0)
|
||||||
|
|
||||||
# Set release name if not provided via env/cmake var
|
# Set release name if not provided via env/cmake var
|
||||||
if(NOT DEFINED GIT_TAG_RELEASENAME)
|
if(NOT DEFINED GIT_TAG_RELEASENAME)
|
||||||
set(GIT_TAG_RELEASENAME "Prismatic Bridge")
|
set(GIT_TAG_RELEASENAME "Rings of the Wild")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# Use c++17 for all targets
|
# Use c++20 for all targets
|
||||||
set(CMAKE_CXX_STANDARD 17 CACHE STRING "C++ ISO Standard")
|
set(CMAKE_CXX_STANDARD
|
||||||
|
20
|
||||||
|
CACHE STRING "C++ ISO Standard"
|
||||||
|
)
|
||||||
set(CMAKE_CXX_STANDARD_REQUIRED True)
|
set(CMAKE_CXX_STANDARD_REQUIRED True)
|
||||||
|
|
||||||
# Set conventional loops
|
# Set conventional loops
|
||||||
@@ -90,13 +111,11 @@ if(UNIX)
|
|||||||
# Force ccache usage if available
|
# Force ccache usage if available
|
||||||
get_property(RULE_LAUNCH_COMPILE GLOBAL PROPERTY RULE_LAUNCH_COMPILE)
|
get_property(RULE_LAUNCH_COMPILE GLOBAL PROPERTY RULE_LAUNCH_COMPILE)
|
||||||
if(RULE_LAUNCH_COMPILE)
|
if(RULE_LAUNCH_COMPILE)
|
||||||
MESSAGE(STATUS "Force enabling CCache usage under macOS")
|
message(STATUS "Force enabling CCache usage under macOS")
|
||||||
# Set up wrapper scripts
|
# Set up wrapper scripts
|
||||||
configure_file("${COCKATRICE_CMAKE_PATH}/launch-c.in" launch-c)
|
configure_file("${COCKATRICE_CMAKE_PATH}/launch-c.in" launch-c)
|
||||||
configure_file("${COCKATRICE_CMAKE_PATH}/launch-cxx.in" launch-cxx)
|
configure_file("${COCKATRICE_CMAKE_PATH}/launch-cxx.in" launch-cxx)
|
||||||
execute_process(COMMAND chmod a+rx
|
execute_process(COMMAND chmod a+rx "${CMAKE_BINARY_DIR}/launch-c" "${CMAKE_BINARY_DIR}/launch-cxx")
|
||||||
"${CMAKE_BINARY_DIR}/launch-c"
|
|
||||||
"${CMAKE_BINARY_DIR}/launch-cxx")
|
|
||||||
|
|
||||||
# Set Xcode project attributes to route compilation through our scripts
|
# Set Xcode project attributes to route compilation through our scripts
|
||||||
set(CMAKE_XCODE_ATTRIBUTE_CC "${CMAKE_BINARY_DIR}/launch-c")
|
set(CMAKE_XCODE_ATTRIBUTE_CC "${CMAKE_BINARY_DIR}/launch-c")
|
||||||
@@ -120,12 +139,19 @@ elseif(WIN32)
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
# Define proper compilation flags
|
# Define proper compilation flags
|
||||||
IF(MSVC)
|
if(MSVC)
|
||||||
# Visual Studio: Maximum optimization, disable warning C4251, establish C++17 compatibility
|
# Disable Warning C4251, C++20 compatibility, Multi-threaded Builds, Warn Detection, Unwind Semantics, Debug Symbols
|
||||||
SET(CMAKE_CXX_FLAGS_RELEASE "/Ox /MD /wd4251 /Zc:__cplusplus /std:c++17 /permissive-")
|
set(CMAKE_CXX_FLAGS "/wd4251 /Zc:__cplusplus /std:c++20 /permissive- /W4 /MP /EHsc /Zi")
|
||||||
# Generate complete debugging information
|
# Visual Studio: Maximum Optimization, Multi-threaded DLL
|
||||||
#set(CMAKE_CXX_FLAGS_DEBUG "/Zi")
|
set(CMAKE_CXX_FLAGS_RELEASE "/Ox /MD")
|
||||||
ELSEIF (CMAKE_COMPILER_IS_GNUCXX)
|
# Visual Studio: No Optimization, Multi-threaded Debug DLL
|
||||||
|
set(CMAKE_CXX_FLAGS_DEBUG "/Od /MDd")
|
||||||
|
|
||||||
|
# Generate PDB, even when in release (So developers can better analyze crash logs)
|
||||||
|
set(CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS_RELEASE} /DEBUG /OPT:REF /OPT:ICF")
|
||||||
|
|
||||||
|
add_compile_definitions(_SILENCE_STDEXT_ARR_ITERS_DEPRECATION_WARNING)
|
||||||
|
elseif(CMAKE_COMPILER_IS_GNUCXX)
|
||||||
# linux/gcc, bsd/gcc, windows/mingw
|
# linux/gcc, bsd/gcc, windows/mingw
|
||||||
include(CheckCXXCompilerFlag)
|
include(CheckCXXCompilerFlag)
|
||||||
|
|
||||||
@@ -136,34 +162,42 @@ ELSEIF (CMAKE_COMPILER_IS_GNUCXX)
|
|||||||
set(CMAKE_CXX_FLAGS_DEBUG "-ggdb -O0 -Wall -Wextra")
|
set(CMAKE_CXX_FLAGS_DEBUG "-ggdb -O0 -Wall -Wextra")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
IF(APPLE)
|
if(APPLE)
|
||||||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++17")
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++20")
|
||||||
ENDIF()
|
endif()
|
||||||
|
|
||||||
set(ADDITIONAL_DEBUG_FLAGS -Wcast-align -Wmissing-declarations -Wno-long-long -Wno-error=extra -Wno-error=delete-non-virtual-dtor -Wno-error=sign-compare -Wno-error=missing-declarations)
|
set(ADDITIONAL_DEBUG_FLAGS
|
||||||
|
-Wcast-align
|
||||||
|
-Wmissing-declarations
|
||||||
|
-Wno-long-long
|
||||||
|
-Wno-error=extra
|
||||||
|
-Wno-error=delete-non-virtual-dtor
|
||||||
|
-Wno-error=sign-compare
|
||||||
|
-Wno-error=missing-declarations
|
||||||
|
)
|
||||||
|
|
||||||
FOREACH(FLAG ${ADDITIONAL_DEBUG_FLAGS})
|
foreach(FLAG ${ADDITIONAL_DEBUG_FLAGS})
|
||||||
CHECK_CXX_COMPILER_FLAG("${FLAG}" CXX_HAS_WARNING_${FLAG})
|
check_cxx_compiler_flag("${FLAG}" CXX_HAS_WARNING_${FLAG})
|
||||||
IF(CXX_HAS_WARNING_${FLAG})
|
if(CXX_HAS_WARNING_${FLAG})
|
||||||
SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} ${FLAG}")
|
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} ${FLAG}")
|
||||||
ENDIF()
|
endif()
|
||||||
ENDFOREACH()
|
endforeach()
|
||||||
ELSE()
|
else()
|
||||||
# other: osx/llvm, bsd/llvm
|
# other: osx/llvm, bsd/llvm
|
||||||
set(CMAKE_CXX_FLAGS_RELEASE "-O2")
|
set(CMAKE_CXX_FLAGS_RELEASE "-O2")
|
||||||
if(WARNING_AS_ERROR)
|
if(WARNING_AS_ERROR)
|
||||||
set(CMAKE_CXX_FLAGS_DEBUG "-g -O0 -Wall -Wextra -Werror")
|
set(CMAKE_CXX_FLAGS_DEBUG "-g -O0 -Wall -Wextra -Werror -Wno-unused-parameter")
|
||||||
else()
|
else()
|
||||||
set(CMAKE_CXX_FLAGS_DEBUG "-g -O0 -Wall -Wextra")
|
set(CMAKE_CXX_FLAGS_DEBUG "-g -O0 -Wall -Wextra")
|
||||||
endif()
|
endif()
|
||||||
ENDIF()
|
endif()
|
||||||
|
|
||||||
# GNU systems need to define the Mersenne exponent for the RNG to compile w/o warning
|
# GNU systems need to define the Mersenne exponent for the RNG to compile w/o warning
|
||||||
IF(CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang")
|
if(CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang")
|
||||||
ADD_DEFINITIONS("-DSFMT_MEXP=19937")
|
add_definitions("-DSFMT_MEXP=19937")
|
||||||
ENDIF()
|
endif()
|
||||||
|
|
||||||
FIND_PACKAGE(Threads REQUIRED)
|
find_package(Threads REQUIRED)
|
||||||
|
|
||||||
# Determine 32 or 64 bit build
|
# Determine 32 or 64 bit build
|
||||||
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
|
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
|
||||||
@@ -182,29 +216,39 @@ elseif(DEFINED ENV{QTDIR})
|
|||||||
list(APPEND CMAKE_PREFIX_PATH "$ENV{QTDIR}")
|
list(APPEND CMAKE_PREFIX_PATH "$ENV{QTDIR}")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
MESSAGE(STATUS "Update Translations: ${UPDATE_TRANSLATIONS}")
|
message(STATUS "Update Translations: ${UPDATE_TRANSLATIONS}")
|
||||||
|
|
||||||
include(FindQtRuntime)
|
include(FindQtRuntime)
|
||||||
|
|
||||||
set(CMAKE_AUTOMOC TRUE)
|
set(CMAKE_AUTOMOC TRUE)
|
||||||
|
|
||||||
# Find other needed libraries
|
# Find other needed libraries
|
||||||
FIND_PACKAGE(Protobuf REQUIRED)
|
find_package(Protobuf CONFIG)
|
||||||
IF(NOT EXISTS "${Protobuf_PROTOC_EXECUTABLE}")
|
if(NOT Protobuf_FOUND)
|
||||||
MESSAGE(FATAL_ERROR "No protoc command found!")
|
find_package(Protobuf REQUIRED)
|
||||||
ELSE()
|
endif()
|
||||||
MESSAGE(STATUS "Found Protobuf ${Protobuf_VERSION} at: ${Protobuf_LIBRARIES}")
|
|
||||||
ENDIF()
|
if(${Protobuf_VERSION} VERSION_LESS "3.21.0.0" AND NOT EXISTS "${Protobuf_PROTOC_EXECUTABLE}")
|
||||||
|
message(FATAL_ERROR "No protoc command found!")
|
||||||
|
endif()
|
||||||
|
|
||||||
#Find OpenSSL
|
#Find OpenSSL
|
||||||
IF(WIN32)
|
if(WIN32)
|
||||||
FIND_PACKAGE(Win32SslRuntime)
|
find_package(OpenSSL REQUIRED)
|
||||||
ENDIF()
|
if(OPENSSL_FOUND)
|
||||||
|
include_directories(${OPENSSL_INCLUDE_DIRS})
|
||||||
|
else()
|
||||||
|
message(
|
||||||
|
WARNING
|
||||||
|
"Could not find OpenSSL runtime libraries. They are not required for compiling, but needs to be available at runtime."
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
#Find VCredist
|
#Find VCredist
|
||||||
IF(MSVC)
|
if(MSVC)
|
||||||
FIND_PACKAGE(VCredistRuntime)
|
find_package(VCredistRuntime)
|
||||||
ENDIF()
|
endif()
|
||||||
|
|
||||||
# Package builder
|
# Package builder
|
||||||
set(CPACK_PACKAGE_CONTACT "Zach Halpern <zach@cockatrice.us>")
|
set(CPACK_PACKAGE_CONTACT "Zach Halpern <zach@cockatrice.us>")
|
||||||
@@ -225,16 +269,19 @@ if(UNIX)
|
|||||||
set(CPACK_DMG_VOLUME_NAME "${PROJECT_NAME}")
|
set(CPACK_DMG_VOLUME_NAME "${PROJECT_NAME}")
|
||||||
set(CPACK_SYSTEM_NAME "OSX")
|
set(CPACK_SYSTEM_NAME "OSX")
|
||||||
set(CPACK_PACKAGE_ICON "${CMAKE_CURRENT_SOURCE_DIR}/cockatrice/resources/appicon.icns")
|
set(CPACK_PACKAGE_ICON "${CMAKE_CURRENT_SOURCE_DIR}/cockatrice/resources/appicon.icns")
|
||||||
|
set(CPACK_DMG_DS_STORE_SETUP_SCRIPT "${CMAKE_CURRENT_SOURCE_DIR}/cmake/CMakeDMGSetup.script")
|
||||||
|
set(CPACK_DMG_BACKGROUND_IMAGE "${CMAKE_CURRENT_SOURCE_DIR}/cmake/dmgBackground.tif")
|
||||||
|
set(CPACK_PRE_BUILD_SCRIPTS "${CMAKE_CURRENT_SOURCE_DIR}/cmake/SignMacApplications.cmake")
|
||||||
else()
|
else()
|
||||||
# linux
|
# linux
|
||||||
IF(CPACK_GENERATOR STREQUAL "RPM")
|
if(CPACK_GENERATOR STREQUAL "RPM")
|
||||||
set(CPACK_RPM_PACKAGE_LICENSE "GPLv2")
|
set(CPACK_RPM_PACKAGE_LICENSE "GPLv2")
|
||||||
set(CPACK_RPM_MAIN_COMPONENT "cockatrice")
|
set(CPACK_RPM_MAIN_COMPONENT "cockatrice")
|
||||||
IF(Qt6_FOUND)
|
if(Qt6_FOUND)
|
||||||
SET(CPACK_RPM_PACKAGE_REQUIRES "protobuf, qt6-qttools, qt6-qtsvg, qt6-qtmultimedia")
|
set(CPACK_RPM_PACKAGE_REQUIRES "protobuf, qt6-qttools, qt6-qtsvg, qt6-qtmultimedia, qt6-qtimageformats")
|
||||||
ELSEIF(Qt5_FOUND)
|
elseif(Qt5_FOUND)
|
||||||
SET(CPACK_RPM_PACKAGE_REQUIRES "protobuf, qt5-qttools, qt5-qtsvg, qt5-qtmultimedia")
|
set(CPACK_RPM_PACKAGE_REQUIRES "protobuf, qt5-qttools, qt5-qtsvg, qt5-qtmultimedia")
|
||||||
ENDIF()
|
endif()
|
||||||
set(CPACK_RPM_PACKAGE_GROUP "Amusements/Games")
|
set(CPACK_RPM_PACKAGE_GROUP "Amusements/Games")
|
||||||
set(CPACK_RPM_PACKAGE_URL "http://github.com/Cockatrice/Cockatrice")
|
set(CPACK_RPM_PACKAGE_URL "http://github.com/Cockatrice/Cockatrice")
|
||||||
# stop directories from making package conflicts
|
# stop directories from making package conflicts
|
||||||
@@ -245,18 +292,19 @@ if(UNIX)
|
|||||||
/usr/share/icons/hicolor/48x48
|
/usr/share/icons/hicolor/48x48
|
||||||
/usr/share/icons/hicolor/48x48/apps
|
/usr/share/icons/hicolor/48x48/apps
|
||||||
/usr/share/icons/hicolor/scalable
|
/usr/share/icons/hicolor/scalable
|
||||||
/usr/share/icons/hicolor/scalable/apps)
|
/usr/share/icons/hicolor/scalable/apps
|
||||||
ELSE()
|
)
|
||||||
|
else()
|
||||||
set(CPACK_GENERATOR DEB)
|
set(CPACK_GENERATOR DEB)
|
||||||
set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS ON)
|
set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS ON)
|
||||||
set(CPACK_DEBIAN_PACKAGE_SECTION "games")
|
set(CPACK_DEBIAN_PACKAGE_SECTION "games")
|
||||||
set(CPACK_DEBIAN_PACKAGE_HOMEPAGE "http://github.com/Cockatrice/Cockatrice")
|
set(CPACK_DEBIAN_PACKAGE_HOMEPAGE "http://github.com/Cockatrice/Cockatrice")
|
||||||
IF(Qt6_FOUND)
|
if(Qt6_FOUND)
|
||||||
set(CPACK_DEBIAN_PACKAGE_DEPENDS "libqt6multimedia6, libqt6svg6, qt6-qpa-plugins")
|
set(CPACK_DEBIAN_PACKAGE_DEPENDS "libqt6multimedia6, libqt6svg6, qt6-qpa-plugins, qt6-image-formats-plugins")
|
||||||
ELSEIF(Qt5_FOUND)
|
elseif(Qt5_FOUND)
|
||||||
set(CPACK_DEBIAN_PACKAGE_DEPENDS "libqt5multimedia5-plugins, libqt5svg5")
|
set(CPACK_DEBIAN_PACKAGE_DEPENDS "libqt5multimedia5-plugins, libqt5svg5")
|
||||||
ENDIF()
|
endif()
|
||||||
ENDIF()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
elseif(WIN32)
|
elseif(WIN32)
|
||||||
set(CPACK_GENERATOR NSIS ${CPACK_GENERATOR})
|
set(CPACK_GENERATOR NSIS ${CPACK_GENERATOR})
|
||||||
@@ -267,14 +315,11 @@ elseif(WIN32)
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
# Configure file with custom definitions for NSIS.
|
# Configure file with custom definitions for NSIS.
|
||||||
configure_file(
|
configure_file("${COCKATRICE_CMAKE_PATH}/NSIS.definitions.nsh.in" "${PROJECT_BINARY_DIR}/NSIS.definitions.nsh")
|
||||||
"${COCKATRICE_CMAKE_PATH}/NSIS.definitions.nsh.in"
|
|
||||||
"${PROJECT_BINARY_DIR}/NSIS.definitions.nsh"
|
|
||||||
)
|
|
||||||
|
|
||||||
# include vcredist into the package; NSIS will take care of running it
|
# include vcredist into the package; NSIS will take care of running it
|
||||||
if(VCREDISTRUNTIME_FOUND)
|
if(VCREDISTRUNTIME_FOUND)
|
||||||
INSTALL(FILES "${VCREDISTRUNTIME_FILE}" DESTINATION ./)
|
install(FILES "${VCREDISTRUNTIME_FILE}" DESTINATION ./)
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
@@ -283,22 +328,22 @@ include(CPack)
|
|||||||
add_subdirectory(common)
|
add_subdirectory(common)
|
||||||
if(WITH_SERVER)
|
if(WITH_SERVER)
|
||||||
add_subdirectory(servatrice)
|
add_subdirectory(servatrice)
|
||||||
SET(CPACK_INSTALL_CMAKE_PROJECTS "Servatrice;Servatrice;ALL;/" ${CPACK_INSTALL_CMAKE_PROJECTS})
|
set(CPACK_INSTALL_CMAKE_PROJECTS "Servatrice;Servatrice;ALL;/" ${CPACK_INSTALL_CMAKE_PROJECTS})
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(WITH_CLIENT)
|
if(WITH_CLIENT)
|
||||||
add_subdirectory(cockatrice)
|
add_subdirectory(cockatrice)
|
||||||
SET(CPACK_INSTALL_CMAKE_PROJECTS "Cockatrice;Cockatrice;ALL;/" ${CPACK_INSTALL_CMAKE_PROJECTS})
|
set(CPACK_INSTALL_CMAKE_PROJECTS "Cockatrice;Cockatrice;ALL;/" ${CPACK_INSTALL_CMAKE_PROJECTS})
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(WITH_ORACLE)
|
if(WITH_ORACLE)
|
||||||
add_subdirectory(oracle)
|
add_subdirectory(oracle)
|
||||||
SET(CPACK_INSTALL_CMAKE_PROJECTS "Oracle;Oracle;ALL;/" ${CPACK_INSTALL_CMAKE_PROJECTS})
|
set(CPACK_INSTALL_CMAKE_PROJECTS "Oracle;Oracle;ALL;/" ${CPACK_INSTALL_CMAKE_PROJECTS})
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(WITH_DBCONVERTER)
|
if(WITH_DBCONVERTER)
|
||||||
add_subdirectory(dbconverter)
|
add_subdirectory(dbconverter)
|
||||||
SET(CPACK_INSTALL_CMAKE_PROJECTS "Dbconverter;Dbconverter;ALL;/" ${CPACK_INSTALL_CMAKE_PROJECTS})
|
set(CPACK_INSTALL_CMAKE_PROJECTS "Dbconverter;Dbconverter;ALL;/" ${CPACK_INSTALL_CMAKE_PROJECTS})
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(TEST)
|
if(TEST)
|
||||||
@@ -306,7 +351,7 @@ if(TEST)
|
|||||||
add_subdirectory(tests)
|
add_subdirectory(tests)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(Qt6Found AND Qt6_VERSION_MINOR GREATER_EQUAL 3)
|
if(Qt6_FOUND AND Qt6_VERSION_MINOR GREATER_EQUAL 3)
|
||||||
# Qt6.3+ requires project finalization to support translations
|
# Qt6.3+ requires project finalization to support translations
|
||||||
qt6_finalize_project()
|
qt6_finalize_project()
|
||||||
endif()
|
endif()
|
||||||
|
|||||||
32
Dockerfile
@@ -1,19 +1,20 @@
|
|||||||
FROM ubuntu:bionic
|
FROM ubuntu:24.04
|
||||||
MAINTAINER Zach Halpern <zahalpern+github@gmail.com>
|
|
||||||
|
ARG DEBIAN_FRONTEND=noninteractive
|
||||||
|
|
||||||
RUN apt-get update && apt-get install -y\
|
RUN apt-get update && apt-get install -y\
|
||||||
build-essential\
|
build-essential \
|
||||||
cmake\
|
cmake \
|
||||||
git\
|
file \
|
||||||
libprotobuf-dev\
|
g++ \
|
||||||
libqt5sql5-mysql\
|
git \
|
||||||
libmysqlclient-dev\
|
libmariadb-dev-compat \
|
||||||
libqt5websockets5-dev\
|
libprotobuf-dev \
|
||||||
protobuf-compiler\
|
libqt6sql6-mysql \
|
||||||
qt5-default\
|
qt6-websockets-dev \
|
||||||
qtbase5-dev\
|
protobuf-compiler \
|
||||||
qttools5-dev-tools\
|
qt6-tools-dev \
|
||||||
qttools5-dev
|
qt6-tools-dev-tools
|
||||||
|
|
||||||
COPY . /home/servatrice/code/
|
COPY . /home/servatrice/code/
|
||||||
WORKDIR /home/servatrice/code
|
WORKDIR /home/servatrice/code
|
||||||
@@ -25,7 +26,6 @@ RUN cmake .. -DWITH_SERVER=1 -DWITH_CLIENT=0 -DWITH_ORACLE=0 -DWITH_DBCONVERTER=
|
|||||||
|
|
||||||
WORKDIR /home/servatrice
|
WORKDIR /home/servatrice
|
||||||
|
|
||||||
EXPOSE 4747
|
EXPOSE 4747 4748
|
||||||
|
|
||||||
ENTRYPOINT [ "servatrice", "--log-to-console" ]
|
ENTRYPOINT [ "servatrice", "--log-to-console" ]
|
||||||
|
|
||||||
|
|||||||
16
README.md
@@ -5,7 +5,7 @@
|
|||||||
<p align='center'>
|
<p align='center'>
|
||||||
<a href="#cockatrice"><b>Cockatrice</b></a> <b>|</b>
|
<a href="#cockatrice"><b>Cockatrice</b></a> <b>|</b>
|
||||||
<a href="#download-">Download</a> <b>|</b>
|
<a href="#download-">Download</a> <b>|</b>
|
||||||
<a href="#get-involved--">Get Involved</a> <b>|</b>
|
<a href="#get-involved-">Get Involved</a> <b>|</b>
|
||||||
<a href="#community-resources">Community</a> <b>|</b>
|
<a href="#community-resources">Community</a> <b>|</b>
|
||||||
<a href="#translations-">Translations</a> <b>|</b>
|
<a href="#translations-">Translations</a> <b>|</b>
|
||||||
<a href="#build--">Build</a> <b>|</b>
|
<a href="#build--">Build</a> <b>|</b>
|
||||||
@@ -40,9 +40,9 @@ Downloads are available for full releases and the current beta version in develo
|
|||||||
- To be a Cockatrice Beta Tester, use this version. Find more information [here](https://github.com/Cockatrice/Cockatrice/wiki/Release-Channels)!
|
- To be a Cockatrice Beta Tester, use this version. Find more information [here](https://github.com/Cockatrice/Cockatrice/wiki/Release-Channels)!
|
||||||
|
|
||||||
|
|
||||||
# Get Involved [](https://discord.gg/3Z9yzmA) [](https://gitter.im/Cockatrice/Cockatrice)
|
# Get Involved [](https://discord.gg/3Z9yzmA)
|
||||||
|
|
||||||
Join our [Discord community](https://discord.gg/3Z9yzmA) to connect with the project or fellow users of the app. The Cockatrice developers are also available on [Gitter](https://gitter.im/Cockatrice/Cockatrice). Come here to talk about the application, features, or just to hang out.<br>
|
Join our [Discord community](https://discord.gg/3Z9yzmA) to connect with the project, contributors or fellow users of the app. Come here to talk about the application, features, or just to hang out.<br>
|
||||||
For support regarding specific servers, please contact that server's admin or forum for support rather than asking here.<br>
|
For support regarding specific servers, please contact that server's admin or forum for support rather than asking here.<br>
|
||||||
|
|
||||||
To contribute code to the project, please review [the guidelines](https://github.com/Cockatrice/Cockatrice/blob/master/.github/CONTRIBUTING.md).
|
To contribute code to the project, please review [the guidelines](https://github.com/Cockatrice/Cockatrice/blob/master/.github/CONTRIBUTING.md).
|
||||||
@@ -52,8 +52,6 @@ We maintain two tags for contributors to find issues to work on:
|
|||||||
|
|
||||||
For both tags, we're willing to provide help to contributors in showing them where and how they can make changes, as well as code review for changes they submit.
|
For both tags, we're willing to provide help to contributors in showing them where and how they can make changes, as well as code review for changes they submit.
|
||||||
|
|
||||||
Read the long-term project **roadmap** to see planned edits and milestones [here](https://docs.google.com/document/d/1Ewe5uSaRE2nR2pNPMaGmP6gVZdqgFbBgwSscGqIr4W0/edit).
|
|
||||||
|
|
||||||
We try to be responsive to new issues. We'll provide advice on how best to implement a feature; alternately, we can show you where the codebase is doing something similar before you get too far along.
|
We try to be responsive to new issues. We'll provide advice on how best to implement a feature; alternately, we can show you where the codebase is doing something similar before you get too far along.
|
||||||
|
|
||||||
Cockatrice uses the [Google Developer Documentation Style Guide](https://developers.google.com/style/) to ensure consistent documentation. We encourage you to improve the documentation by suggesting edits based on this guide.
|
Cockatrice uses the [Google Developer Documentation Style Guide](https://developers.google.com/style/) to ensure consistent documentation. We encourage you to improve the documentation by suggesting edits based on this guide.
|
||||||
@@ -67,13 +65,9 @@ Cockatrice uses the [Google Developer Documentation Style Guide](https://develop
|
|||||||
- [reddit r/Cockatrice](https://reddit.com/r/cockatrice)
|
- [reddit r/Cockatrice](https://reddit.com/r/cockatrice)
|
||||||
|
|
||||||
|
|
||||||
# Translations [](https://www.transifex.com/projects/p/cockatrice/)
|
# Translations [](https://transifex.com/cockatrice/cockatrice/)
|
||||||
|
|
||||||
Cockatrice uses Transifex for translations. You can help us bring Cockatrice and Oracle to your language or just edit single wordings right from within your browser by visiting our [Transifex project page](https://www.transifex.com/projects/p/cockatrice/).<br>
|
Cockatrice uses Transifex for translations. You can help us bring Cockatrice, Oracle and Webatrice to your language or just adjust single wordings right from within your browser by visiting our [Transifex project page](https://transifex.com/cockatrice/cockatrice/).<br>
|
||||||
|
|
||||||
| Cockatrice | Oracle |
|
|
||||||
|:-:|:-:|
|
|
||||||
| [](https://www.transifex.com/projects/p/cockatrice/) | [](https://www.transifex.com/projects/p/cockatrice/) |
|
|
||||||
|
|
||||||
Check out our [Translator FAQ](https://github.com/Cockatrice/Cockatrice/wiki/Translation-FAQ) for more information about contributing!<br>
|
Check out our [Translator FAQ](https://github.com/Cockatrice/Cockatrice/wiki/Translation-FAQ) for more information about contributing!<br>
|
||||||
|
|
||||||
|
|||||||
55
cmake/CMakeDMGSetup.script
Normal file
@@ -0,0 +1,55 @@
|
|||||||
|
on run argv
|
||||||
|
set image_name to item 1 of argv
|
||||||
|
|
||||||
|
tell application "Finder"
|
||||||
|
tell disk image_name
|
||||||
|
|
||||||
|
-- wait for the image to finish mounting
|
||||||
|
set open_attempts to 0
|
||||||
|
repeat while open_attempts < 4
|
||||||
|
try
|
||||||
|
open
|
||||||
|
delay 1
|
||||||
|
set open_attempts to 5
|
||||||
|
close
|
||||||
|
on error errStr number errorNumber
|
||||||
|
set open_attempts to open_attempts + 1
|
||||||
|
delay 10
|
||||||
|
end try
|
||||||
|
end repeat
|
||||||
|
delay 5
|
||||||
|
|
||||||
|
-- open the image the first time and save a DS_Store with just
|
||||||
|
-- background and icon setup
|
||||||
|
open
|
||||||
|
set current view of container window to icon view
|
||||||
|
set theViewOptions to the icon view options of container window
|
||||||
|
set background picture of theViewOptions to file ".background:background.tif"
|
||||||
|
set arrangement of theViewOptions to not arranged
|
||||||
|
set icon size of theViewOptions to 128
|
||||||
|
delay 5
|
||||||
|
close
|
||||||
|
|
||||||
|
-- next setup the position of the app and Applications symlink
|
||||||
|
-- plus hide all the window decoration
|
||||||
|
open
|
||||||
|
update without registering applications
|
||||||
|
tell container window
|
||||||
|
set sidebar width to 0
|
||||||
|
set statusbar visible to false
|
||||||
|
set toolbar visible to false
|
||||||
|
set the bounds to { 400, 100, 1400, 922 }
|
||||||
|
set position of item "Cockatrice.app" to { 139, 214 }
|
||||||
|
set position of item "Oracle.app" to { 139, 414 }
|
||||||
|
set position of item "Servatrice.app" to { 139, 614 }
|
||||||
|
set position of item "dbconverter.app" to { 1400, 1400 }
|
||||||
|
set position of item "Applications" to { 861, 414 }
|
||||||
|
end tell
|
||||||
|
update without registering applications
|
||||||
|
delay 5
|
||||||
|
close
|
||||||
|
|
||||||
|
end tell
|
||||||
|
delay 1
|
||||||
|
end tell
|
||||||
|
end run
|
||||||
@@ -1,7 +1,13 @@
|
|||||||
# Find a compatible Qt version Inputs: WITH_SERVER, WITH_CLIENT, WITH_ORACLE, WITH_DBCONVERTER, FORCE_USE_QT5 Optional
|
# Find a compatible Qt version
|
||||||
# Input: QT6_DIR -- Hint as to where Qt6 lives on the system Optional Input: QT5_DIR -- Hint as to where Qt5 lives on
|
# Inputs: WITH_SERVER, WITH_CLIENT, WITH_ORACLE, WITH_DBCONVERTER, FORCE_USE_QT5
|
||||||
# the system Output: COCKATRICE_QT_VERSION_NAME -- Example values: Qt5, Qt6 Outputs: SERVATRICE_QT_MODULES,
|
# Optional Input: QT6_DIR -- Hint as to where Qt6 lives on the system
|
||||||
# COCKATRICE_QT_MODULES, ORACLE_QT_MODULES, DBCONVERTER_QT_MODULES, TEST_QT_MODULES
|
# Optional Input: QT5_DIR -- Hint as to where Qt5 lives on the system
|
||||||
|
# Output: COCKATRICE_QT_VERSION_NAME -- Example values: Qt5, Qt6
|
||||||
|
# Output: SERVATRICE_QT_MODULES
|
||||||
|
# Output: COCKATRICE_QT_MODULES
|
||||||
|
# Output: ORACLE_QT_MODULES
|
||||||
|
# Output: DBCONVERTER_QT_MODULES
|
||||||
|
# Output: TEST_QT_MODULES
|
||||||
|
|
||||||
set(REQUIRED_QT_COMPONENTS Core)
|
set(REQUIRED_QT_COMPONENTS Core)
|
||||||
if(WITH_SERVER)
|
if(WITH_SERVER)
|
||||||
@@ -15,8 +21,9 @@ if(WITH_CLIENT)
|
|||||||
Network
|
Network
|
||||||
PrintSupport
|
PrintSupport
|
||||||
Svg
|
Svg
|
||||||
Widgets
|
|
||||||
WebSockets
|
WebSockets
|
||||||
|
Widgets
|
||||||
|
Xml
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
if(WITH_ORACLE)
|
if(WITH_ORACLE)
|
||||||
@@ -35,18 +42,16 @@ set(REQUIRED_QT_COMPONENTS ${REQUIRED_QT_COMPONENTS} ${_SERVATRICE_NEEDED} ${_CO
|
|||||||
list(REMOVE_DUPLICATES REQUIRED_QT_COMPONENTS)
|
list(REMOVE_DUPLICATES REQUIRED_QT_COMPONENTS)
|
||||||
|
|
||||||
if(NOT FORCE_USE_QT5)
|
if(NOT FORCE_USE_QT5)
|
||||||
# Core5Compat is Qt6 Only, Linguist is now a component in Qt6 instead of an external package
|
# Linguist is now a component in Qt6 instead of an external package
|
||||||
find_package(
|
find_package(
|
||||||
Qt6 6.2.3
|
Qt6 6.2.3
|
||||||
COMPONENTS Core5Compat ${REQUIRED_QT_COMPONENTS}
|
COMPONENTS ${REQUIRED_QT_COMPONENTS} Linguist
|
||||||
OPTIONAL_COMPONENTS Linguist
|
|
||||||
QUIET HINTS ${Qt6_DIR}
|
QUIET HINTS ${Qt6_DIR}
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
if(Qt6_FOUND)
|
if(Qt6_FOUND)
|
||||||
set(COCKATRICE_QT_VERSION_NAME Qt6)
|
set(COCKATRICE_QT_VERSION_NAME Qt6)
|
||||||
|
|
||||||
if(Qt6LinguistTools_FOUND)
|
|
||||||
list(FIND Qt6LinguistTools_TARGETS Qt6::lrelease QT6_LRELEASE_INDEX)
|
list(FIND Qt6LinguistTools_TARGETS Qt6::lrelease QT6_LRELEASE_INDEX)
|
||||||
if(QT6_LRELEASE_INDEX EQUAL -1)
|
if(QT6_LRELEASE_INDEX EQUAL -1)
|
||||||
message(WARNING "Qt6 lrelease not found.")
|
message(WARNING "Qt6 lrelease not found.")
|
||||||
@@ -56,7 +61,6 @@ if(Qt6_FOUND)
|
|||||||
if(QT6_LUPDATE_INDEX EQUAL -1)
|
if(QT6_LUPDATE_INDEX EQUAL -1)
|
||||||
message(WARNING "Qt6 lupdate not found.")
|
message(WARNING "Qt6 lupdate not found.")
|
||||||
endif()
|
endif()
|
||||||
endif()
|
|
||||||
else()
|
else()
|
||||||
find_package(
|
find_package(
|
||||||
Qt5 5.8.0
|
Qt5 5.8.0
|
||||||
@@ -110,10 +114,5 @@ string(REGEX REPLACE "([^;]+)" "${COCKATRICE_QT_VERSION_NAME}::\\1" COCKATRICE_Q
|
|||||||
string(REGEX REPLACE "([^;]+)" "${COCKATRICE_QT_VERSION_NAME}::\\1" ORACLE_QT_MODULES "${_ORACLE_NEEDED}")
|
string(REGEX REPLACE "([^;]+)" "${COCKATRICE_QT_VERSION_NAME}::\\1" ORACLE_QT_MODULES "${_ORACLE_NEEDED}")
|
||||||
string(REGEX REPLACE "([^;]+)" "${COCKATRICE_QT_VERSION_NAME}::\\1" DB_CONVERTER_QT_MODULES "${_DBCONVERTER_NEEDED}")
|
string(REGEX REPLACE "([^;]+)" "${COCKATRICE_QT_VERSION_NAME}::\\1" DB_CONVERTER_QT_MODULES "${_DBCONVERTER_NEEDED}")
|
||||||
string(REGEX REPLACE "([^;]+)" "${COCKATRICE_QT_VERSION_NAME}::\\1" TEST_QT_MODULES "${_TEST_NEEDED}")
|
string(REGEX REPLACE "([^;]+)" "${COCKATRICE_QT_VERSION_NAME}::\\1" TEST_QT_MODULES "${_TEST_NEEDED}")
|
||||||
if(Qt6_FOUND)
|
|
||||||
list(APPEND SERVATRICE_QT_MODULES ${COCKATRICE_QT_VERSION_NAME}::Core5Compat)
|
|
||||||
list(APPEND COCKATRICE_QT_MODULES ${COCKATRICE_QT_VERSION_NAME}::Core5Compat)
|
|
||||||
list(APPEND ORACLE_QT_MODULES ${COCKATRICE_QT_VERSION_NAME}::Core5Compat)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
message(STATUS "Found Qt ${${COCKATRICE_QT_VERSION_NAME}_VERSION} at: ${${COCKATRICE_QT_VERSION_NAME}_DIR}")
|
message(STATUS "Found Qt ${${COCKATRICE_QT_VERSION_NAME}_VERSION} at: ${${COCKATRICE_QT_VERSION_NAME}_DIR}")
|
||||||
|
|||||||
@@ -9,7 +9,8 @@ if(WIN32)
|
|||||||
set(REDIST_ARCH x86)
|
set(REDIST_ARCH x86)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
set(REDIST_FILE vcredist_${REDIST_ARCH}.exe)
|
# VS 2017 uses vcredist_ARCH.exe, VS 2022 uses vc_redist.ARCH.exe
|
||||||
|
set(REDIST_FILE_NAMES vcredist_${REDIST_ARCH}.exe vcredist.${REDIST_ARCH}.exe vc_redist.${REDIST_ARCH}.exe)
|
||||||
|
|
||||||
set(CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP TRUE)
|
set(CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP TRUE)
|
||||||
include(InstallRequiredSystemLibraries)
|
include(InstallRequiredSystemLibraries)
|
||||||
@@ -22,10 +23,13 @@ if(WIN32)
|
|||||||
get_filename_component(_path ${_path} DIRECTORY)
|
get_filename_component(_path ${_path} DIRECTORY)
|
||||||
get_filename_component(_path ${_path}/../../ ABSOLUTE)
|
get_filename_component(_path ${_path}/../../ ABSOLUTE)
|
||||||
|
|
||||||
if(EXISTS "${_path}/${REDIST_FILE}") # VS 2017
|
foreach(redist_file ${REDIST_FILE_NAMES})
|
||||||
|
if(EXISTS "${_path}/${redist_file}")
|
||||||
set(VCREDISTRUNTIME_FOUND "YES")
|
set(VCREDISTRUNTIME_FOUND "YES")
|
||||||
set(VCREDISTRUNTIME_FILE ${_path}/${REDIST_FILE})
|
set(VCREDISTRUNTIME_FILE ${_path}/${redist_file})
|
||||||
|
break()
|
||||||
endif()
|
endif()
|
||||||
|
endforeach()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(VCREDISTRUNTIME_FOUND)
|
if(VCREDISTRUNTIME_FOUND)
|
||||||
|
|||||||
@@ -1,70 +0,0 @@
|
|||||||
# Find the OpenSSL runtime libraries (.dll) for Windows that will be needed by Qt in order to access https urls.
|
|
||||||
if(NOT DEFINED WIN32 OR NOT ${WIN32})
|
|
||||||
message(STATUS "Non-Windows device trying to execute FindWin32SslRuntime, skipping")
|
|
||||||
return()
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if("${CMAKE_GENERATOR_PLATFORM}" STREQUAL "x64")
|
|
||||||
message(STATUS "Looking for OpenSSL for ${CMAKE_GENERATOR_PLATFORM}")
|
|
||||||
file(TO_CMAKE_PATH "$ENV{PROGRAMFILES}" _programfiles)
|
|
||||||
set(_OPENSSL_ROOT_PATHS "$ENV{VCPKG_PACKAGES_DIR}/x64-windows/bin" "C:/OpenSSL-Win64/bin" "C:/OpenSSL-Win64"
|
|
||||||
"C:/Tools/vcpkg/installed/x64-windows/bin" "${_programfiles}/OpenSSL-Win64"
|
|
||||||
)
|
|
||||||
unset(_programfiles)
|
|
||||||
elseif("${CMAKE_GENERATOR_PLATFORM}" STREQUAL "Win32")
|
|
||||||
message(STATUS "Looking for OpenSSL for ${CMAKE_GENERATOR_PLATFORM}")
|
|
||||||
file(TO_CMAKE_PATH "$ENV{PROGRAMFILES}" _programfiles)
|
|
||||||
set(_OPENSSL_ROOT_PATHS
|
|
||||||
"$ENV{VCPKG_PACKAGES_DIR}/x86-windows/bin"
|
|
||||||
"C:/OpenSSL-Win32/bin"
|
|
||||||
"C:/OpenSSL-Win32"
|
|
||||||
"C:/OpenSSL"
|
|
||||||
"C:/Tools/vcpkg/installed/x86-windows/bin"
|
|
||||||
"${_programfiles}/OpenSSL"
|
|
||||||
"${_programfiles}/OpenSSL-Win32"
|
|
||||||
)
|
|
||||||
unset(_programfiles)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
message(STATUS "Looking for OpenSSL @ $ENV{CMAKE_GENERATOR_PLATFORM} in ${_OPENSSL_ROOT_PATHS}")
|
|
||||||
if("$ENV{CMAKE_GENERATOR_PLATFORM}" STREQUAL "x64")
|
|
||||||
find_file(
|
|
||||||
WIN32SSLRUNTIME_LIBEAY
|
|
||||||
NAMES libcrypto-1_1-x64.dll libcrypto.dll
|
|
||||||
PATHS ${_OPENSSL_ROOT_PATHS}
|
|
||||||
NO_DEFAULT_PATH
|
|
||||||
)
|
|
||||||
find_file(
|
|
||||||
WIN32SSLRUNTIME_SSLEAY
|
|
||||||
NAMES libssl-1_1-x64.dll libssl.dll
|
|
||||||
PATHS ${_OPENSSL_ROOT_PATHS}
|
|
||||||
NO_DEFAULT_PATH
|
|
||||||
)
|
|
||||||
elseif("$ENV{CMAKE_GENERATOR_PLATFORM}" STREQUAL "Win32")
|
|
||||||
find_file(
|
|
||||||
WIN32SSLRUNTIME_LIBEAY
|
|
||||||
NAMES libcrypto-1_1.dll libcrypto.dll
|
|
||||||
PATHS ${_OPENSSL_ROOT_PATHS}
|
|
||||||
NO_DEFAULT_PATH
|
|
||||||
)
|
|
||||||
find_file(
|
|
||||||
WIN32SSLRUNTIME_SSLEAY
|
|
||||||
NAMES libssl-1_1.dll libssl.dll
|
|
||||||
PATHS ${_OPENSSL_ROOT_PATHS}
|
|
||||||
NO_DEFAULT_PATH
|
|
||||||
)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if(WIN32SSLRUNTIME_LIBEAY AND WIN32SSLRUNTIME_SSLEAY)
|
|
||||||
set(WIN32SSLRUNTIME_LIBRARIES "${WIN32SSLRUNTIME_LIBEAY}" "${WIN32SSLRUNTIME_SSLEAY}")
|
|
||||||
set(WIN32SSLRUNTIME_FOUND "YES")
|
|
||||||
message(STATUS "Found OpenSSL ${WIN32SSLRUNTIME_LIBRARIES}")
|
|
||||||
else()
|
|
||||||
set(WIN32SSLRUNTIME_FOUND "NO")
|
|
||||||
message(
|
|
||||||
WARNING
|
|
||||||
"Could not find OpenSSL runtime libraries. They are not required for compiling, but needs to be available at runtime."
|
|
||||||
)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
mark_as_advanced(WIN32SSLRUNTIME_LIBEAY WIN32SSLRUNTIME_SSLEAY)
|
|
||||||
@@ -5,7 +5,7 @@ OutFile "@CPACK_TOPLEVEL_DIRECTORY@/@CPACK_OUTPUT_FILE_NAME@"
|
|||||||
|
|
||||||
!define INST_DIR "@CPACK_TEMPORARY_DIRECTORY@"
|
!define INST_DIR "@CPACK_TEMPORARY_DIRECTORY@"
|
||||||
|
|
||||||
RequestExecutionlevel highest
|
RequestExecutionlevel admin
|
||||||
SetCompressor LZMA
|
SetCompressor LZMA
|
||||||
|
|
||||||
Var NormalDestDir
|
Var NormalDestDir
|
||||||
@@ -235,6 +235,13 @@ ${If} $PortableMode = 0
|
|||||||
WriteUninstaller "$INSTDIR\uninstall.exe"
|
WriteUninstaller "$INSTDIR\uninstall.exe"
|
||||||
${GetSize} "$INSTDIR" "/S=0K" $0 $1 $2
|
${GetSize} "$INSTDIR" "/S=0K" $0 $1 $2
|
||||||
IntFmt $0 "0x%08X" $0
|
IntFmt $0 "0x%08X" $0
|
||||||
|
|
||||||
|
; Enable Windows User-Mode Dumps
|
||||||
|
; https://learn.microsoft.com/en-us/windows/win32/wer/collecting-user-mode-dumps
|
||||||
|
WriteRegExpandStr HKLM "Software\Microsoft\Windows\Windows Error Reporting\LocalDumps\cockatrice.exe" "DumpFolder" "%LOCALAPPDATA%\CrashDumps\Cockatrice"
|
||||||
|
WriteRegDWORD HKLM "Software\Microsoft\Windows\Windows Error Reporting\LocalDumps\cockatrice.exe" "DumpCount" "5"
|
||||||
|
WriteRegDWORD HKLM "Software\Microsoft\Windows\Windows Error Reporting\LocalDumps\cockatrice.exe" "DumpType" "2"
|
||||||
|
|
||||||
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Cockatrice" "DisplayIcon" "$INSTDIR\cockatrice.exe"
|
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Cockatrice" "DisplayIcon" "$INSTDIR\cockatrice.exe"
|
||||||
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Cockatrice" "DisplayName" "Cockatrice"
|
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Cockatrice" "DisplayName" "Cockatrice"
|
||||||
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Cockatrice" "DisplayVersion" "@CPACK_PACKAGE_VERSION_MAJOR@.@CPACK_PACKAGE_VERSION_MINOR@.@CPACK_PACKAGE_VERSION_PATCH@"
|
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Cockatrice" "DisplayVersion" "@CPACK_PACKAGE_VERSION_MAJOR@.@CPACK_PACKAGE_VERSION_MINOR@.@CPACK_PACKAGE_VERSION_PATCH@"
|
||||||
@@ -248,20 +255,20 @@ ${If} $PortableMode = 0
|
|||||||
WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Cockatrice" "VersionMajor" "@CPACK_PACKAGE_VERSION_MAJOR@"
|
WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Cockatrice" "VersionMajor" "@CPACK_PACKAGE_VERSION_MAJOR@"
|
||||||
WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Cockatrice" "VersionMinor" "@CPACK_PACKAGE_VERSION_MINOR@"
|
WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Cockatrice" "VersionMinor" "@CPACK_PACKAGE_VERSION_MINOR@"
|
||||||
|
|
||||||
IfFileExists "$INSTDIR\vcredist_x86.exe" VcRedist86Exists PastVcRedist86Check
|
IfFileExists "$INSTDIR\vc_redist.x86.exe" VcRedist86Exists PastVcRedist86Check
|
||||||
VcRedist86Exists:
|
VcRedist86Exists:
|
||||||
ExecWait '"$INSTDIR\vcredist_x86.exe" /passive /norestart'
|
ExecWait '"$INSTDIR\vc_redist.x86.exe" /passive /norestart'
|
||||||
DetailPrint "Wait to ensure unlock of vc_redist file after installation..."
|
DetailPrint "Wait to ensure unlock of vc_redist file after installation..."
|
||||||
Sleep 3000
|
Sleep 3000
|
||||||
Delete "$INSTDIR\vcredist_x86.exe"
|
Delete "$INSTDIR\vc_redist.x86.exe"
|
||||||
PastVcRedist86Check:
|
PastVcRedist86Check:
|
||||||
|
|
||||||
IfFileExists "$INSTDIR\vcredist_x64.exe" VcRedist64Exists PastVcRedist64Check
|
IfFileExists "$INSTDIR\vc_redist.x64.exe" VcRedist64Exists PastVcRedist64Check
|
||||||
VcRedist64Exists:
|
VcRedist64Exists:
|
||||||
ExecWait '"$INSTDIR\vcredist_x64.exe" /passive /norestart'
|
ExecWait '"$INSTDIR\vc_redist.x64.exe" /passive /norestart'
|
||||||
DetailPrint "Sleep to ensure unlock of vc_redist file after installation..."
|
DetailPrint "Sleep to ensure unlock of vc_redist file after installation..."
|
||||||
Sleep 3000
|
Sleep 3000
|
||||||
Delete "$INSTDIR\vcredist_x64.exe"
|
Delete "$INSTDIR\vc_redist.x64.exe"
|
||||||
PastVcRedist64Check:
|
PastVcRedist64Check:
|
||||||
|
|
||||||
${Else}
|
${Else}
|
||||||
|
|||||||
27
cmake/SignMacApplications.cmake
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
# This script re-signs all apps after CPack packages them. This is necessary because CPack modifies
|
||||||
|
# the library references used by Cockatrice to App relative paths, invalidating the code signature.
|
||||||
|
string(LENGTH "$ENV{MACOS_CERTIFICATE_NAME}" MACOS_CERTIFICATE_NAME_LEN)
|
||||||
|
|
||||||
|
if(APPLE AND MACOS_CERTIFICATE_NAME_LEN GREATER 0)
|
||||||
|
set(APPLICATIONS "cockatrice" "servatrice" "oracle" "dbconverter")
|
||||||
|
foreach(app_name IN LISTS APPLICATIONS)
|
||||||
|
set(FULL_APP_PATH "${CPACK_TEMPORARY_INSTALL_DIRECTORY}/${app_name}.app")
|
||||||
|
|
||||||
|
message(STATUS "Signing Interior Dynamically Loaded Libraries for ${app_name}.app")
|
||||||
|
execute_process(COMMAND "find" "${FULL_APP_PATH}" "-name" "*.dylib" OUTPUT_VARIABLE INTERIOR_DLLS)
|
||||||
|
string(REPLACE "\n" ";" INTERIOR_DLLS_LIST ${INTERIOR_DLLS})
|
||||||
|
|
||||||
|
foreach(INTERIOR_DLL IN LISTS INTERIOR_DLLS_LIST)
|
||||||
|
execute_process(
|
||||||
|
COMMAND "codesign" "--sign" "$ENV{MACOS_CERTIFICATE_NAME}" "--entitlements" "../.ci/macos.entitlements"
|
||||||
|
"--options" "runtime" "--force" "--deep" "--timestamp" "--verbose" "${INTERIOR_DLL}"
|
||||||
|
)
|
||||||
|
endforeach()
|
||||||
|
|
||||||
|
message(STATUS "Signing Exterior Applications ${app_name}.app")
|
||||||
|
execute_process(
|
||||||
|
COMMAND "codesign" "--sign" "$ENV{MACOS_CERTIFICATE_NAME}" "--entitlements" "../.ci/macos.entitlements"
|
||||||
|
"--options" "runtime" "--force" "--deep" "--timestamp" "--verbose" "${FULL_APP_PATH}"
|
||||||
|
)
|
||||||
|
endforeach()
|
||||||
|
endif()
|
||||||
BIN
cmake/dmgBackground.tif
Normal file
@@ -19,7 +19,7 @@ function(get_commit_id)
|
|||||||
PARENT_SCOPE
|
PARENT_SCOPE
|
||||||
)
|
)
|
||||||
set(PROJECT_VERSION_LABEL
|
set(PROJECT_VERSION_LABEL
|
||||||
"custom(${GIT_COM_ID})"
|
"custom-${GIT_COM_ID}"
|
||||||
PARENT_SCOPE
|
PARENT_SCOPE
|
||||||
)
|
)
|
||||||
endfunction()
|
endfunction()
|
||||||
@@ -71,7 +71,9 @@ function(get_tag_name commit)
|
|||||||
string(REPLACE "\n" "" GIT_TAG "${GIT_TAG}")
|
string(REPLACE "\n" "" GIT_TAG "${GIT_TAG}")
|
||||||
message(STATUS "Commit is a release or prerelease, git tag: ${GIT_TAG}")
|
message(STATUS "Commit is a release or prerelease, git tag: ${GIT_TAG}")
|
||||||
|
|
||||||
# Extract information from tag: YYYY-MM-DD-Release-MAJ.MIN.PATCH YYYY-MM-DD-Development-MAJ.MIN.PATCH-beta.X
|
# Extract information from tag:
|
||||||
|
# YYYY-MM-DD-Release-MAJ.MIN.PATCH
|
||||||
|
# YYYY-MM-DD-Development-MAJ.MIN.PATCH-beta.X
|
||||||
string(REPLACE "-" ";" GIT_TAG_EXPLODED "${GIT_TAG}")
|
string(REPLACE "-" ";" GIT_TAG_EXPLODED "${GIT_TAG}")
|
||||||
string(REPLACE "." ";" GIT_TAG_EXPLODED "${GIT_TAG_EXPLODED}")
|
string(REPLACE "." ";" GIT_TAG_EXPLODED "${GIT_TAG_EXPLODED}")
|
||||||
|
|
||||||
@@ -131,8 +133,10 @@ function(get_tag_name commit)
|
|||||||
return()
|
return()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# Label 7 = Stable release 8 = Dev release, first beta so only "beta" attached 9 = Dev release, subsequent beta so
|
# Label
|
||||||
# "beta.N" attached (N>=2)
|
# 7 = Stable release
|
||||||
|
# 8 = Dev release, first beta so only "beta" attached
|
||||||
|
# 9 = Dev release, subsequent beta so "beta.N" attached (N>=2)
|
||||||
if(${GIT_TAG_LISTCOUNT} EQUAL 8)
|
if(${GIT_TAG_LISTCOUNT} EQUAL 8)
|
||||||
list(GET GIT_TAG_EXPLODED 7 GIT_TAG_LABEL)
|
list(GET GIT_TAG_EXPLODED 7 GIT_TAG_LABEL)
|
||||||
elseif(${GIT_TAG_LISTCOUNT} EQUAL 9)
|
elseif(${GIT_TAG_LISTCOUNT} EQUAL 9)
|
||||||
|
|||||||
14
cmakeify.sh
@@ -1,14 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
# go to the project root directory, this file should be located in the project root directory
|
|
||||||
cd "${BASH_SOURCE%/*}/" || exit 2 # could not find path, this could happen with special links etc.
|
|
||||||
|
|
||||||
# CMake-Format
|
|
||||||
cmake_format_cmd="cmake-format"
|
|
||||||
|
|
||||||
if ! hash $cmake_format_cmd 2>/dev/null; then
|
|
||||||
echo "could not find $cmake_format_cmd, skipping" >&2
|
|
||||||
return
|
|
||||||
fi
|
|
||||||
|
|
||||||
$cmake_format_cmd -i cmake/*.cmake */CMakeLists.txt CMakeLists.txt
|
|
||||||
@@ -5,132 +5,201 @@
|
|||||||
project(Cockatrice VERSION "${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH}")
|
project(Cockatrice VERSION "${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH}")
|
||||||
|
|
||||||
set(cockatrice_SOURCES
|
set(cockatrice_SOURCES
|
||||||
src/abstractcarddragitem.cpp
|
src/game/cards/abstract_card_drag_item.cpp
|
||||||
src/abstractcarditem.cpp
|
src/game/cards/abstract_card_item.cpp
|
||||||
src/abstractclient.cpp
|
src/client/game_logic/abstract_client.cpp
|
||||||
src/abstractcounter.cpp
|
src/game/board/abstract_counter.cpp
|
||||||
src/abstractgraphicsitem.cpp
|
src/game/board/abstract_graphics_item.cpp
|
||||||
src/arrowitem.cpp
|
src/game/board/arrow_item.cpp
|
||||||
src/arrowtarget.cpp
|
src/game/board/arrow_target.cpp
|
||||||
src/carddatabase.cpp
|
src/game/cards/card_database.cpp
|
||||||
src/carddatabasemodel.cpp
|
src/game/cards/card_database_manager.cpp
|
||||||
src/carddbparser/carddatabaseparser.cpp
|
src/game/cards/card_database_model.cpp
|
||||||
src/carddbparser/cockatricexml3.cpp
|
src/game/cards/card_database_parser/card_database_parser.cpp
|
||||||
src/carddbparser/cockatricexml4.cpp
|
src/game/cards/card_database_parser/cockatrice_xml_3.cpp
|
||||||
src/carddragitem.cpp
|
src/game/cards/card_database_parser/cockatrice_xml_4.cpp
|
||||||
src/cardfilter.cpp
|
src/game/cards/card_drag_item.cpp
|
||||||
src/cardframe.cpp
|
src/game/filters/filter_card.cpp
|
||||||
src/cardinfopicture.cpp
|
src/client/ui/widgets/cards/card_info_frame_widget.cpp
|
||||||
src/cardinfotext.cpp
|
src/client/ui/widgets/cards/card_info_picture_widget.cpp
|
||||||
src/cardinfowidget.cpp
|
src/client/ui/widgets/cards/card_info_text_widget.cpp
|
||||||
src/carditem.cpp
|
src/client/ui/widgets/cards/card_info_display_widget.cpp
|
||||||
src/cardlist.cpp
|
src/client/ui/widgets/cards/card_size_widget.cpp
|
||||||
src/cardzone.cpp
|
src/game/cards/card_item.cpp
|
||||||
src/chatview/chatview.cpp
|
src/game/cards/card_list.cpp
|
||||||
src/counter_general.cpp
|
src/game/zones/card_zone.cpp
|
||||||
src/customlineedit.cpp
|
src/server/chat_view/chat_view.cpp
|
||||||
src/deck_loader.cpp
|
src/game/board/counter_general.cpp
|
||||||
src/decklistmodel.cpp
|
src/deck/custom_line_edit.cpp
|
||||||
src/deckstats_interface.cpp
|
src/deck/deck_loader.cpp
|
||||||
src/deckview.cpp
|
src/deck/deck_list_model.cpp
|
||||||
src/dlg_connect.cpp
|
src/deck/deck_stats_interface.cpp
|
||||||
src/dlg_create_token.cpp
|
src/dialogs/dlg_connect.cpp
|
||||||
src/dlg_creategame.cpp
|
src/dialogs/dlg_convert_deck_to_cod_format.cpp
|
||||||
src/dlg_edit_avatar.cpp
|
src/dialogs/dlg_create_token.cpp
|
||||||
src/dlg_edit_password.cpp
|
src/dialogs/dlg_create_game.cpp
|
||||||
src/dlg_edit_tokens.cpp
|
src/dialogs/dlg_edit_avatar.cpp
|
||||||
src/dlg_edit_user.cpp
|
src/dialogs/dlg_edit_password.cpp
|
||||||
src/dlg_filter_games.cpp
|
src/dialogs/dlg_edit_tokens.cpp
|
||||||
src/dlg_forgotpasswordchallenge.cpp
|
src/dialogs/dlg_edit_user.cpp
|
||||||
src/dlg_forgotpasswordrequest.cpp
|
src/dialogs/dlg_filter_games.cpp
|
||||||
src/dlg_forgotpasswordreset.cpp
|
src/dialogs/dlg_forgot_password_challenge.cpp
|
||||||
src/dlg_load_deck_from_clipboard.cpp
|
src/dialogs/dlg_forgot_password_request.cpp
|
||||||
src/dlg_load_remote_deck.cpp
|
src/dialogs/dlg_forgot_password_reset.cpp
|
||||||
src/dlg_manage_sets.cpp
|
src/dialogs/dlg_load_deck_from_clipboard.cpp
|
||||||
src/dlg_register.cpp
|
src/dialogs/dlg_load_remote_deck.cpp
|
||||||
src/dlg_settings.cpp
|
src/dialogs/dlg_manage_sets.cpp
|
||||||
src/dlg_tip_of_the_day.cpp
|
src/dialogs/dlg_move_top_cards_until.cpp
|
||||||
src/dlg_update.cpp
|
src/dialogs/dlg_register.cpp
|
||||||
src/dlg_viewlog.cpp
|
src/dialogs/dlg_roll_dice.cpp
|
||||||
src/filter_string.cpp
|
src/dialogs/dlg_settings.cpp
|
||||||
src/filterbuilder.cpp
|
src/dialogs/dlg_tip_of_the_day.cpp
|
||||||
src/filtertree.cpp
|
src/dialogs/dlg_update.cpp
|
||||||
src/filtertreemodel.cpp
|
src/dialogs/dlg_view_log.cpp
|
||||||
src/gamescene.cpp
|
src/dialogs/dlg_load_deck.cpp
|
||||||
src/gameselector.cpp
|
src/game/deckview/deck_view.cpp
|
||||||
src/gamesmodel.cpp
|
src/game/deckview/deck_view_container.cpp
|
||||||
src/gameview.cpp
|
src/game/filters/filter_string.cpp
|
||||||
src/gettextwithmax.cpp
|
src/game/filters/filter_builder.cpp
|
||||||
src/handcounter.cpp
|
src/game/filters/filter_tree.cpp
|
||||||
src/handle_public_servers.cpp
|
src/game/filters/filter_tree_model.cpp
|
||||||
src/handzone.cpp
|
src/client/ui/layouts/flow_layout.cpp
|
||||||
src/keysignals.cpp
|
src/client/ui/widgets/general/layout_containers/flow_widget.cpp
|
||||||
src/lineeditcompleter.cpp
|
src/game/game_scene.cpp
|
||||||
src/localclient.cpp
|
src/game/game_selector.cpp
|
||||||
src/localserver.cpp
|
src/game/games_model.cpp
|
||||||
src/localserverinterface.cpp
|
src/game/game_view.cpp
|
||||||
src/logger.cpp
|
src/client/get_text_with_max.cpp
|
||||||
|
src/game/hand_counter.cpp
|
||||||
|
src/server/handle_public_servers.cpp
|
||||||
|
src/game/zones/hand_zone.cpp
|
||||||
|
src/client/game_logic/key_signals.cpp
|
||||||
|
src/client/ui/line_edit_completer.cpp
|
||||||
|
src/server/local_client.cpp
|
||||||
|
src/server/local_server.cpp
|
||||||
|
src/server/local_server_interface.cpp
|
||||||
|
src/utility/logger.cpp
|
||||||
|
src/client/ui/widgets/cards/card_info_picture_enlarged_widget.cpp
|
||||||
|
src/client/ui/widgets/cards/card_info_picture_with_text_overlay_widget.cpp
|
||||||
|
src/client/ui/widgets/general/display/banner_widget.cpp
|
||||||
|
src/client/ui/widgets/general/display/labeled_input.cpp
|
||||||
|
src/client/ui/widgets/general/display/dynamic_font_size_label.cpp
|
||||||
|
src/client/ui/widgets/general/display/dynamic_font_size_push_button.cpp
|
||||||
|
src/client/ui/widgets/general/display/shadow_background_label.cpp
|
||||||
src/main.cpp
|
src/main.cpp
|
||||||
src/messagelogwidget.cpp
|
src/server/message_log_widget.cpp
|
||||||
src/pending_command.cpp
|
src/client/ui/layouts/overlap_layout.cpp
|
||||||
src/phase.cpp
|
src/client/ui/widgets/general/layout_containers/overlap_widget.cpp
|
||||||
src/phasestoolbar.cpp
|
src/client/ui/widgets/general/layout_containers/overlap_control_widget.cpp
|
||||||
src/pictureloader.cpp
|
src/server/pending_command.cpp
|
||||||
src/pilezone.cpp
|
src/game/phase.cpp
|
||||||
src/pixmapgenerator.cpp
|
src/client/ui/phases_toolbar.cpp
|
||||||
src/player.cpp
|
src/client/ui/picture_loader/picture_loader.cpp
|
||||||
src/playerlistwidget.cpp
|
src/client/ui/picture_loader/picture_loader_worker.cpp
|
||||||
src/playertarget.cpp
|
src/client/ui/picture_loader/picture_to_load.cpp
|
||||||
src/releasechannel.cpp
|
src/game/zones/pile_zone.cpp
|
||||||
src/remoteclient.cpp
|
src/client/ui/pixel_map_generator.cpp
|
||||||
src/remotedecklist_treewidget.cpp
|
src/game/player/player.cpp
|
||||||
src/remotereplaylist_treewidget.cpp
|
src/game/player/player_list_widget.cpp
|
||||||
src/replay_timeline_widget.cpp
|
src/game/player/player_target.cpp
|
||||||
src/selectzone.cpp
|
src/client/ui/widgets/printing_selector/all_zones_card_amount_widget.cpp
|
||||||
src/sequenceEdit/sequenceedit.cpp
|
src/client/ui/widgets/printing_selector/card_amount_widget.cpp
|
||||||
src/setsmodel.cpp
|
src/client/ui/widgets/printing_selector/printing_selector.cpp
|
||||||
src/settings/carddatabasesettings.cpp
|
src/client/ui/widgets/printing_selector/printing_selector_card_display_widget.cpp
|
||||||
src/settings/downloadsettings.cpp
|
src/client/ui/widgets/printing_selector/printing_selector_card_overlay_widget.cpp
|
||||||
src/settings/gamefilterssettings.cpp
|
src/client/ui/widgets/printing_selector/printing_selector_card_search_widget.cpp
|
||||||
src/settings/layoutssettings.cpp
|
src/client/ui/widgets/printing_selector/printing_selector_card_selection_widget.cpp
|
||||||
src/settings/messagesettings.cpp
|
src/client/ui/widgets/printing_selector/printing_selector_card_sorting_widget.cpp
|
||||||
src/settings/serverssettings.cpp
|
src/client/ui/widgets/printing_selector/printing_selector_view_options_toolbar_widget.cpp
|
||||||
src/settings/settingsmanager.cpp
|
src/client/ui/widgets/printing_selector/printing_selector_view_options_widget.cpp
|
||||||
src/settingscache.cpp
|
src/client/ui/widgets/printing_selector/set_name_and_collectors_number_display_widget.cpp
|
||||||
src/shortcutssettings.cpp
|
src/client/network/release_channel.cpp
|
||||||
src/soundengine.cpp
|
src/client/network/client_update_checker.cpp
|
||||||
src/spoilerbackgroundupdater.cpp
|
src/server/remote/remote_client.cpp
|
||||||
src/stackzone.cpp
|
src/server/remote/remote_decklist_tree_widget.cpp
|
||||||
src/tab.cpp
|
src/server/remote/remote_replay_list_tree_widget.cpp
|
||||||
src/tab_account.cpp
|
src/client/network/replay_timeline_widget.cpp
|
||||||
src/tab_admin.cpp
|
src/game/zones/select_zone.cpp
|
||||||
src/tab_deck_editor.cpp
|
src/utility/sequence_edit.cpp
|
||||||
src/tab_deck_storage.cpp
|
src/client/network/sets_model.cpp
|
||||||
src/tab_game.cpp
|
src/settings/card_database_settings.cpp
|
||||||
src/tab_logs.cpp
|
src/settings/download_settings.cpp
|
||||||
src/tab_message.cpp
|
src/settings/game_filters_settings.cpp
|
||||||
src/tab_replays.cpp
|
src/settings/layouts_settings.cpp
|
||||||
src/tab_room.cpp
|
src/settings/message_settings.cpp
|
||||||
src/tab_server.cpp
|
src/settings/recents_settings.cpp
|
||||||
src/tab_supervisor.cpp
|
src/settings/servers_settings.cpp
|
||||||
src/tablezone.cpp
|
src/settings/settings_manager.cpp
|
||||||
src/tappedout_interface.cpp
|
src/settings/cache_settings.cpp
|
||||||
src/thememanager.cpp
|
src/settings/shortcuts_settings.cpp
|
||||||
src/tip_of_the_day.cpp
|
src/settings/shortcut_treeview.cpp
|
||||||
src/translatecountername.cpp
|
src/settings/card_override_settings.cpp
|
||||||
src/update_downloader.cpp
|
src/settings/debug_settings.cpp
|
||||||
src/user_context_menu.cpp
|
src/client/sound_engine.cpp
|
||||||
src/userconnection_information.cpp
|
src/client/network/spoiler_background_updater.cpp
|
||||||
src/userinfobox.cpp
|
src/game/zones/stack_zone.cpp
|
||||||
src/userlist.cpp
|
src/client/tabs/tab.cpp
|
||||||
src/window_main.cpp
|
src/client/tabs/tab_account.cpp
|
||||||
src/zoneviewwidget.cpp
|
src/client/tabs/tab_admin.cpp
|
||||||
src/zoneviewzone.cpp
|
src/client/tabs/tab_deck_editor.cpp
|
||||||
|
src/client/tabs/tab_deck_storage.cpp
|
||||||
|
src/client/tabs/tab_game.cpp
|
||||||
|
src/client/tabs/tab_logs.cpp
|
||||||
|
src/client/tabs/tab_message.cpp
|
||||||
|
src/client/tabs/tab_replays.cpp
|
||||||
|
src/client/tabs/tab_room.cpp
|
||||||
|
src/client/tabs/tab_server.cpp
|
||||||
|
src/client/tabs/tab_supervisor.cpp
|
||||||
|
src/client/tabs/api/edhrec/tab_edhrec.cpp
|
||||||
|
src/client/tabs/api/edhrec/edhrec_commander_api_response_display_widget.cpp
|
||||||
|
src/client/tabs/api/edhrec/edhrec_commander_api_response_card_details_display_widget.cpp
|
||||||
|
src/client/tabs/api/edhrec/edhrec_commander_api_response_card_list_display_widget.cpp
|
||||||
|
src/client/tabs/api/edhrec/edhrec_commander_api_response_commander_details_display_widget.cpp
|
||||||
|
src/client/tabs/api/edhrec/api_response/edhrec_commander_api_response_archidekt_links.cpp
|
||||||
|
src/client/tabs/api/edhrec/api_response/edhrec_commander_api_response_average_deck_statistics.cpp
|
||||||
|
src/client/tabs/api/edhrec/api_response/edhrec_commander_api_response_card_details.cpp
|
||||||
|
src/client/tabs/api/edhrec/api_response/edhrec_commander_api_response_card_list.cpp
|
||||||
|
src/client/tabs/api/edhrec/api_response/edhrec_commander_api_response_card_container.cpp
|
||||||
|
src/client/tabs/api/edhrec/api_response/edhrec_commander_api_response_card_prices.cpp
|
||||||
|
src/client/tabs/api/edhrec/api_response/edhrec_commander_api_response_commander_details.cpp
|
||||||
|
src/client/tabs/api/edhrec/api_response/edhrec_commander_api_response.cpp
|
||||||
|
src/game/zones/table_zone.cpp
|
||||||
|
src/client/tapped_out_interface.cpp
|
||||||
|
src/client/ui/theme_manager.cpp
|
||||||
|
src/client/ui/tip_of_the_day.cpp
|
||||||
|
src/client/translate_counter_name.cpp
|
||||||
|
src/client/update_downloader.cpp
|
||||||
|
src/server/user/user_context_menu.cpp
|
||||||
|
src/server/user/user_info_connection.cpp
|
||||||
|
src/server/user/user_info_box.cpp
|
||||||
|
src/server/user/user_list_manager.cpp
|
||||||
|
src/server/user/user_list_widget.cpp
|
||||||
|
src/client/ui/window_main.cpp
|
||||||
|
src/game/zones/view_zone_widget.cpp
|
||||||
|
src/game/zones/view_zone.cpp
|
||||||
|
src/client/tabs/visual_deck_storage/tab_deck_storage_visual.cpp
|
||||||
|
src/client/ui/widgets/cards/deck_preview_card_picture_widget.cpp
|
||||||
|
src/client/ui/widgets/visual_deck_storage/deck_preview/deck_preview_color_identity_widget.cpp
|
||||||
|
src/client/ui/widgets/visual_deck_storage/deck_preview/deck_preview_color_identity_filter_widget.cpp
|
||||||
|
src/client/ui/widgets/visual_deck_storage/deck_preview/deck_preview_tag_addition_widget.cpp
|
||||||
|
src/client/ui/widgets/visual_deck_storage/deck_preview/deck_preview_tag_display_widget.cpp
|
||||||
|
src/client/ui/widgets/visual_deck_storage/deck_preview/deck_preview_tag_dialog.cpp
|
||||||
|
src/client/ui/widgets/visual_deck_storage/deck_preview/deck_preview_tag_item_widget.cpp
|
||||||
|
src/client/ui/widgets/visual_deck_storage/deck_preview/deck_preview_deck_tags_display_widget.cpp
|
||||||
|
src/client/ui/widgets/visual_deck_storage/deck_preview/deck_preview_widget.cpp
|
||||||
|
src/client/ui/widgets/visual_deck_storage/visual_deck_storage_widget.cpp
|
||||||
|
src/client/ui/widgets/visual_deck_storage/visual_deck_storage_folder_display_widget.cpp
|
||||||
|
src/client/ui/widgets/visual_deck_storage/visual_deck_storage_search_widget.cpp
|
||||||
|
src/client/ui/widgets/visual_deck_storage/visual_deck_storage_sort_widget.cpp
|
||||||
|
src/client/ui/widgets/visual_deck_storage/visual_deck_storage_tag_filter_widget.cpp
|
||||||
${VERSION_STRING_CPP}
|
${VERSION_STRING_CPP}
|
||||||
)
|
)
|
||||||
|
|
||||||
add_subdirectory(sounds)
|
add_subdirectory(sounds)
|
||||||
add_subdirectory(themes)
|
add_subdirectory(themes)
|
||||||
|
configure_file(
|
||||||
|
${CMAKE_SOURCE_DIR}/cockatrice/resources/config/qtlogging.ini ${CMAKE_BINARY_DIR}/cockatrice/qtlogging.ini COPYONLY
|
||||||
|
)
|
||||||
|
|
||||||
set(cockatrice_RESOURCES cockatrice.qrc)
|
set(cockatrice_RESOURCES cockatrice.qrc)
|
||||||
|
|
||||||
@@ -251,7 +320,7 @@ if(APPLE)
|
|||||||
set(plugin_dest_dir cockatrice.app/Contents/Plugins)
|
set(plugin_dest_dir cockatrice.app/Contents/Plugins)
|
||||||
set(qtconf_dest_dir cockatrice.app/Contents/Resources)
|
set(qtconf_dest_dir cockatrice.app/Contents/Resources)
|
||||||
|
|
||||||
# Qt plugins: audio (Qt5), iconengines, imageformats, platforms, printsupport (Qt5), styles, tls (Qt6)
|
# Qt plugins: audio (Qt5), iconengines, imageformats, multimedia (Qt6), platforms, printsupport (Qt5), styles, tls (Qt6)
|
||||||
install(
|
install(
|
||||||
DIRECTORY "${QT_PLUGINS_DIR}/"
|
DIRECTORY "${QT_PLUGINS_DIR}/"
|
||||||
DESTINATION ${plugin_dest_dir}
|
DESTINATION ${plugin_dest_dir}
|
||||||
@@ -262,6 +331,7 @@ if(APPLE)
|
|||||||
PATTERN "audio/*.dylib"
|
PATTERN "audio/*.dylib"
|
||||||
PATTERN "iconengines/*.dylib"
|
PATTERN "iconengines/*.dylib"
|
||||||
PATTERN "imageformats/*.dylib"
|
PATTERN "imageformats/*.dylib"
|
||||||
|
PATTERN "multimedia/*.dylib"
|
||||||
PATTERN "platforms/*.dylib"
|
PATTERN "platforms/*.dylib"
|
||||||
PATTERN "printsupport/*.dylib"
|
PATTERN "printsupport/*.dylib"
|
||||||
PATTERN "styles/*.dylib"
|
PATTERN "styles/*.dylib"
|
||||||
@@ -302,7 +372,7 @@ if(WIN32)
|
|||||||
PATTERN "*.dll"
|
PATTERN "*.dll"
|
||||||
)
|
)
|
||||||
|
|
||||||
# Qt plugins: audio (Qt5), iconengines, imageformats, platforms, printsupport (Qt5), styles, tls (Qt6)
|
# Qt plugins: audio (Qt5), iconengines, imageformats, multimedia (Qt6) platforms, printsupport (Qt5), styles, tls (Qt6)
|
||||||
install(
|
install(
|
||||||
DIRECTORY "${QT_PLUGINS_DIR}/"
|
DIRECTORY "${QT_PLUGINS_DIR}/"
|
||||||
DESTINATION ${plugin_dest_dir}
|
DESTINATION ${plugin_dest_dir}
|
||||||
@@ -311,15 +381,10 @@ if(WIN32)
|
|||||||
PATTERN "audio/qtaudio_wasapi.dll"
|
PATTERN "audio/qtaudio_wasapi.dll"
|
||||||
PATTERN "audio/qtaudio_windows.dll"
|
PATTERN "audio/qtaudio_windows.dll"
|
||||||
PATTERN "iconengines/qsvgicon.dll"
|
PATTERN "iconengines/qsvgicon.dll"
|
||||||
PATTERN "imageformats/qgif.dll"
|
PATTERN "imageformats/*.dll"
|
||||||
PATTERN "imageformats/qicns.dll"
|
PATTERN "mediaservice/dsengine.dll"
|
||||||
PATTERN "imageformats/qico.dll"
|
PATTERN "mediaservice/wmfengine.dll"
|
||||||
PATTERN "imageformats/qjpeg.dll"
|
PATTERN "multimedia/*.dll"
|
||||||
PATTERN "imageformats/qsvg.dll"
|
|
||||||
PATTERN "imageformats/qtga.dll"
|
|
||||||
PATTERN "imageformats/qtiff.dll"
|
|
||||||
PATTERN "imageformats/qwbmp.dll"
|
|
||||||
PATTERN "imageformats/qwebp.dll"
|
|
||||||
PATTERN "platforms/qdirect2d.dll"
|
PATTERN "platforms/qdirect2d.dll"
|
||||||
PATTERN "platforms/qminimal.dll"
|
PATTERN "platforms/qminimal.dll"
|
||||||
PATTERN "platforms/qoffscreen.dll"
|
PATTERN "platforms/qoffscreen.dll"
|
||||||
@@ -355,13 +420,13 @@ Data = Resources\")
|
|||||||
COMPONENT Runtime
|
COMPONENT Runtime
|
||||||
)
|
)
|
||||||
|
|
||||||
if(WIN32SSLRUNTIME_FOUND)
|
if(OPENSSL_FOUND)
|
||||||
install(FILES ${WIN32SSLRUNTIME_LIBRARIES} DESTINATION ./)
|
install(FILES ${OPENSSL_INCLUDE_DIRS} DESTINATION ./)
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(Qt6LinguistTools_FOUND)
|
if(Qt6_FOUND AND Qt6LinguistTools_FOUND)
|
||||||
# Qt6 Translations happen after the executable is built up
|
#Qt6 Translations happen after the executable is built up
|
||||||
if(UPDATE_TRANSLATIONS)
|
if(UPDATE_TRANSLATIONS)
|
||||||
qt6_add_translations(
|
qt6_add_translations(
|
||||||
cockatrice
|
cockatrice
|
||||||
|
|||||||
@@ -29,6 +29,7 @@
|
|||||||
<file>resources/icons/search.svg</file>
|
<file>resources/icons/search.svg</file>
|
||||||
<file>resources/icons/settings.svg</file>
|
<file>resources/icons/settings.svg</file>
|
||||||
<file>resources/icons/spectator.svg</file>
|
<file>resources/icons/spectator.svg</file>
|
||||||
|
<file>resources/icons/swap.svg</file>
|
||||||
<file>resources/icons/sync.svg</file>
|
<file>resources/icons/sync.svg</file>
|
||||||
<file>resources/icons/tab_changed.svg</file>
|
<file>resources/icons/tab_changed.svg</file>
|
||||||
<file>resources/icons/update.png</file>
|
<file>resources/icons/update.png</file>
|
||||||
@@ -41,6 +42,8 @@
|
|||||||
<file>resources/config/deckeditor.svg</file>
|
<file>resources/config/deckeditor.svg</file>
|
||||||
<file>resources/config/shorcuts.svg</file>
|
<file>resources/config/shorcuts.svg</file>
|
||||||
<file>resources/config/sound.svg</file>
|
<file>resources/config/sound.svg</file>
|
||||||
|
<file>resources/config/debug.ini</file>
|
||||||
|
<file>resources/config/qtlogging.ini</file>
|
||||||
|
|
||||||
<file>resources/counters/w.svg</file>
|
<file>resources/counters/w.svg</file>
|
||||||
<file>resources/counters/w_highlight.svg</file>
|
<file>resources/counters/w_highlight.svg</file>
|
||||||
@@ -326,6 +329,13 @@
|
|||||||
<file>resources/replay/fastforward.svg</file>
|
<file>resources/replay/fastforward.svg</file>
|
||||||
<file>resources/replay/pause.svg</file>
|
<file>resources/replay/pause.svg</file>
|
||||||
|
|
||||||
|
<file>resources/usericons/pawn_single.svg</file>
|
||||||
|
<file>resources/usericons/pawn_double.svg</file>
|
||||||
|
<file>resources/usericons/pawn_vip_single.svg</file>
|
||||||
|
<file>resources/usericons/pawn_vip_double.svg</file>
|
||||||
|
<file>resources/usericons/star_single.svg</file>
|
||||||
|
<file>resources/usericons/star_double.svg</file>
|
||||||
|
|
||||||
<file>resources/userlevels/normal.svg</file>
|
<file>resources/userlevels/normal.svg</file>
|
||||||
<file>resources/userlevels/registered.svg</file>
|
<file>resources/userlevels/registered.svg</file>
|
||||||
<file>resources/userlevels/registered_buddy.svg</file>
|
<file>resources/userlevels/registered_buddy.svg</file>
|
||||||
@@ -351,10 +361,10 @@
|
|||||||
<file>resources/tips/images/cockatrice_wiki.png</file>
|
<file>resources/tips/images/cockatrice_wiki.png</file>
|
||||||
<file>resources/tips/images/coin_flip.png</file>
|
<file>resources/tips/images/coin_flip.png</file>
|
||||||
<file>resources/tips/images/counter_expression.png</file>
|
<file>resources/tips/images/counter_expression.png</file>
|
||||||
|
<file>resources/tips/images/discord.png</file>
|
||||||
<file>resources/tips/images/face_down.png</file>
|
<file>resources/tips/images/face_down.png</file>
|
||||||
<file>resources/tips/images/filter_games.png</file>
|
<file>resources/tips/images/filter_games.png</file>
|
||||||
<file>resources/tips/images/github_logo.png</file>
|
<file>resources/tips/images/github_logo.png</file>
|
||||||
<file>resources/tips/images/gitter.png</file>
|
|
||||||
<file>resources/tips/images/setpt.png</file>
|
<file>resources/tips/images/setpt.png</file>
|
||||||
<file>resources/tips/images/shortcuts.png</file>
|
<file>resources/tips/images/shortcuts.png</file>
|
||||||
<file>resources/tips/images/themes.png</file>
|
<file>resources/tips/images/themes.png</file>
|
||||||
|
|||||||
11
cockatrice/resources/config/debug.ini
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
[debug]
|
||||||
|
showCardId=false
|
||||||
|
|
||||||
|
[localgame]
|
||||||
|
onStartup=false
|
||||||
|
playerCount=1
|
||||||
|
;deck\Player 1=path/to/deck
|
||||||
|
;deck\Player 2=path/to/deck
|
||||||
|
|
||||||
|
; Fun Fact: You can assign a deck to your username and it will auto load and ready when you join a server game
|
||||||
|
;deck\Your Username Here=path/to/deck
|
||||||
49
cockatrice/resources/config/qtlogging.ini
Normal file
@@ -0,0 +1,49 @@
|
|||||||
|
[Rules]
|
||||||
|
# Uncomment a rule to disable logging for that category
|
||||||
|
|
||||||
|
# main = false
|
||||||
|
# qt_translator = false
|
||||||
|
# window_main.* = false
|
||||||
|
# release_channel = false
|
||||||
|
# spoiler_background_updater = false
|
||||||
|
# theme_manager = false
|
||||||
|
# sound_engine = false
|
||||||
|
# tapped_out_interface = false
|
||||||
|
|
||||||
|
# tab_game = false
|
||||||
|
# tab_message = false
|
||||||
|
# tab_supervisor = false
|
||||||
|
|
||||||
|
# dlg_edit_avatar = false
|
||||||
|
# dlg_settings = false
|
||||||
|
# dlg_tip_of_the_day = false
|
||||||
|
# dlg_update = false
|
||||||
|
|
||||||
|
# settings_cache = false
|
||||||
|
# servers_settings = false
|
||||||
|
# shortcuts_settings = false
|
||||||
|
|
||||||
|
# player = false
|
||||||
|
# game_scene = false
|
||||||
|
# game_scene.player_addition_removal = false
|
||||||
|
# card_zone = false
|
||||||
|
# view_zone = false
|
||||||
|
|
||||||
|
# user_info_connection = false
|
||||||
|
|
||||||
|
# picture_loader = false
|
||||||
|
# picture_loader.worker = false
|
||||||
|
# picture_loader.card_back_cache_fail = false
|
||||||
|
# picture_loader.picture_to_load = false
|
||||||
|
# deck_loader = false
|
||||||
|
# card_database = false
|
||||||
|
# card_database.loading = false
|
||||||
|
# card_database.loading.success_or_failure = false
|
||||||
|
# cockatrice_xml.* = false
|
||||||
|
# cockatrice_xml.xml_3_parser = false
|
||||||
|
# cockatrice_xml.xml_4_parser = false
|
||||||
|
# card_list = false
|
||||||
|
|
||||||
|
# pixel_map_generator = false
|
||||||
|
|
||||||
|
# filter_string = false
|
||||||
@@ -1,6 +1,7 @@
|
|||||||
## Syntax Help
|
## Search Syntax Help
|
||||||
-----
|
-----
|
||||||
The search bar recognizes a set of special commands similar to some other card databases. Here is a list with examples. Each entry can be clicked to test the query and has a small explanation. Note that all searches are case insensitive.
|
The search bar recognizes a set of special commands similar to some other card databases.<br>
|
||||||
|
In this list of examples below, each entry has an explanation and can be clicked to test the query. Note that all searches are case insensitive.
|
||||||
<dl>
|
<dl>
|
||||||
<dt>Name:</dt>
|
<dt>Name:</dt>
|
||||||
<dd>[birds of paradise](#birds of paradise) <small>(Any card name containing the words birds, of, and paradise)</small></dd>
|
<dd>[birds of paradise](#birds of paradise) <small>(Any card name containing the words birds, of, and paradise)</small></dd>
|
||||||
@@ -46,8 +47,7 @@ The search bar recognizes a set of special commands similar to some other card d
|
|||||||
|
|
||||||
<dt><u>E</u>dition:</dt>
|
<dt><u>E</u>dition:</dt>
|
||||||
<dd>[set:lea](#set:lea) <small>(Cards that appear in Alpha, which has the set code LEA)</small></dd>
|
<dd>[set:lea](#set:lea) <small>(Cards that appear in Alpha, which has the set code LEA)</small></dd>
|
||||||
<dd>[e:lea,leb](#e:lea,leb) <small>(Cards that appear in Alpha or Beta)</small></dd>
|
<dd>[e:lea or e:leb](#e:lea or e:leb) <small>(Cards that appear in Alpha or Beta)</small></dd>
|
||||||
<dd><a href="#e:lea,leb -(e:lea e:leb)">e:lea,leb -(e:lea e:leb)</a> <small>(Cards that appear in Alpha or Beta but not in both editions)</small></dd>
|
|
||||||
|
|
||||||
<dt>Negate:</dt>
|
<dt>Negate:</dt>
|
||||||
<dd>[c:wu -c:m](#c:wu -c:m) <small>(Any card that is white or blue, but not multicolored)</small></dd>
|
<dd>[c:wu -c:m](#c:wu -c:m) <small>(Any card that is white or blue, but not multicolored)</small></dd>
|
||||||
|
|||||||
12
cockatrice/resources/icons/swap.svg
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||||
|
<!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools -->
|
||||||
|
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||||
|
<svg xmlns:xlink="http://www.w3.org/1999/xlink" fill="#000000" version="1.1" id="Capa_1"
|
||||||
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
width="800px" height="800px" viewBox="0 0 71.753 71.753"
|
||||||
|
xml:space="preserve">
|
||||||
|
<g>
|
||||||
|
<path d="M39.798,20.736H28.172v20.738L11.625,41.47V20.736H0L19.899,0.839L39.798,20.736z M51.855,70.914l19.897-19.896H60.129
|
||||||
|
V30.282l-16.547-0.004v20.74H31.957L51.855,70.914z"/>
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 648 B |
BIN
cockatrice/resources/tips/images/discord.png
Normal file
|
After Width: | Height: | Size: 30 KiB |
|
Before Width: | Height: | Size: 5.9 KiB |
@@ -7,9 +7,9 @@
|
|||||||
</tip>
|
</tip>
|
||||||
<tip>
|
<tip>
|
||||||
<title>Suggesting New Tips</title>
|
<title>Suggesting New Tips</title>
|
||||||
<text>You can suggest new Tips of the Day by reaching out to the development team on <a href="https://gitter.im/cockatrice/cockatrice">Gitter</a>!</text>
|
<text>You can suggest new Tips of the Day by reaching out to the development team on <a href="https://discord.gg/3Z9yzmA">Discord</a>!</text>
|
||||||
<image>gitter.png</image>
|
<image>discord.png</image>
|
||||||
<date>2018-03-01</date>
|
<date>2023-10-18</date>
|
||||||
</tip>
|
</tip>
|
||||||
<tip>
|
<tip>
|
||||||
<title>Reporting Bugs</title>
|
<title>Reporting Bugs</title>
|
||||||
|
|||||||
268
cockatrice/resources/usericons/pawn_double.svg
Normal file
@@ -0,0 +1,268 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||||
|
|
||||||
|
<svg
|
||||||
|
width="100"
|
||||||
|
height="100"
|
||||||
|
id="svg5322"
|
||||||
|
version="1.1"
|
||||||
|
inkscape:version="1.4 (86a8ad7, 2024-10-11)"
|
||||||
|
sodipodi:docname="pawn_double.svg"
|
||||||
|
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||||
|
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||||
|
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||||
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
xmlns:svg="http://www.w3.org/2000/svg"
|
||||||
|
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||||
|
xmlns:cc="http://creativecommons.org/ns#"
|
||||||
|
xmlns:dc="http://purl.org/dc/elements/1.1/">
|
||||||
|
<defs
|
||||||
|
id="defs3">
|
||||||
|
<inkscape:perspective
|
||||||
|
sodipodi:type="inkscape:persp3d"
|
||||||
|
inkscape:vp_x="0 : 526.18109 : 1"
|
||||||
|
inkscape:vp_y="0 : 1000 : 0"
|
||||||
|
inkscape:vp_z="744.09448 : 526.18109 : 1"
|
||||||
|
inkscape:persp3d-origin="372.04724 : 350.78739 : 1"
|
||||||
|
id="perspective5328" />
|
||||||
|
<inkscape:perspective
|
||||||
|
id="perspective5305"
|
||||||
|
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
|
||||||
|
inkscape:vp_z="1 : 0.5 : 1"
|
||||||
|
inkscape:vp_y="0 : 1000 : 0"
|
||||||
|
inkscape:vp_x="0 : 0.5 : 1"
|
||||||
|
sodipodi:type="inkscape:persp3d" />
|
||||||
|
<linearGradient
|
||||||
|
id="linearGradient5181">
|
||||||
|
<stop
|
||||||
|
style="stop-color:#0fbb00;stop-opacity:1;"
|
||||||
|
offset="0"
|
||||||
|
id="stop5183" />
|
||||||
|
<stop
|
||||||
|
style="stop-color:#064400;stop-opacity:1;"
|
||||||
|
offset="1"
|
||||||
|
id="stop5185" />
|
||||||
|
</linearGradient>
|
||||||
|
<radialGradient
|
||||||
|
inkscape:collect="always"
|
||||||
|
xlink:href="#linearGradient3600-2"
|
||||||
|
id="radialGradient3606-7"
|
||||||
|
cx="324.32715"
|
||||||
|
cy="131.40274"
|
||||||
|
fx="324.32715"
|
||||||
|
fy="131.40274"
|
||||||
|
r="25.501276"
|
||||||
|
gradientUnits="userSpaceOnUse"
|
||||||
|
gradientTransform="matrix(0.92332021,0.38403097,-0.41592401,1.0000002,78.192026,-120.05314)" />
|
||||||
|
<linearGradient
|
||||||
|
id="linearGradient3600-2">
|
||||||
|
<stop
|
||||||
|
style="stop-color:#ffc33d;stop-opacity:1;"
|
||||||
|
offset="0"
|
||||||
|
id="stop3602-4" />
|
||||||
|
<stop
|
||||||
|
style="stop-color:#e09900;stop-opacity:1;"
|
||||||
|
offset="1"
|
||||||
|
id="stop3604-9" />
|
||||||
|
</linearGradient>
|
||||||
|
<inkscape:perspective
|
||||||
|
id="perspective5478"
|
||||||
|
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
|
||||||
|
inkscape:vp_z="1 : 0.5 : 1"
|
||||||
|
inkscape:vp_y="0 : 1000 : 0"
|
||||||
|
inkscape:vp_x="0 : 0.5 : 1"
|
||||||
|
sodipodi:type="inkscape:persp3d" />
|
||||||
|
<linearGradient
|
||||||
|
id="linearGradient5189">
|
||||||
|
<stop
|
||||||
|
style="stop-color:#000ec9;stop-opacity:1;"
|
||||||
|
offset="0"
|
||||||
|
id="stop5191" />
|
||||||
|
<stop
|
||||||
|
style="stop-color:#000657;stop-opacity:1;"
|
||||||
|
offset="1"
|
||||||
|
id="stop5193" />
|
||||||
|
</linearGradient>
|
||||||
|
<radialGradient
|
||||||
|
inkscape:collect="always"
|
||||||
|
xlink:href="#linearGradient3600-4"
|
||||||
|
id="radialGradient3606-1"
|
||||||
|
cx="324.32715"
|
||||||
|
cy="131.40274"
|
||||||
|
fx="324.32715"
|
||||||
|
fy="131.40274"
|
||||||
|
r="25.501276"
|
||||||
|
gradientUnits="userSpaceOnUse"
|
||||||
|
gradientTransform="matrix(0.92332021,0.38403097,-0.41592401,1.0000002,78.192026,-120.05314)" />
|
||||||
|
<linearGradient
|
||||||
|
id="linearGradient3600-4">
|
||||||
|
<stop
|
||||||
|
style="stop-color:#ffc33d;stop-opacity:1;"
|
||||||
|
offset="0"
|
||||||
|
id="stop3602-3" />
|
||||||
|
<stop
|
||||||
|
style="stop-color:#e09900;stop-opacity:1;"
|
||||||
|
offset="1"
|
||||||
|
id="stop3604-5" />
|
||||||
|
</linearGradient>
|
||||||
|
<inkscape:perspective
|
||||||
|
id="perspective5559"
|
||||||
|
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
|
||||||
|
inkscape:vp_z="1 : 0.5 : 1"
|
||||||
|
inkscape:vp_y="0 : 1000 : 0"
|
||||||
|
inkscape:vp_x="0 : 0.5 : 1"
|
||||||
|
sodipodi:type="inkscape:persp3d" />
|
||||||
|
<linearGradient
|
||||||
|
inkscape:collect="always"
|
||||||
|
xlink:href="#linearGradient5173"
|
||||||
|
id="linearGradient5179"
|
||||||
|
x1="167.33386"
|
||||||
|
y1="178.83276"
|
||||||
|
x2="244.78181"
|
||||||
|
y2="178.83276"
|
||||||
|
gradientUnits="userSpaceOnUse" />
|
||||||
|
<linearGradient
|
||||||
|
id="linearGradient5173">
|
||||||
|
<stop
|
||||||
|
style="stop-color:#f50000;stop-opacity:1;"
|
||||||
|
offset="0"
|
||||||
|
id="stop5175" />
|
||||||
|
<stop
|
||||||
|
style="stop-color:#950000;stop-opacity:1;"
|
||||||
|
offset="1"
|
||||||
|
id="stop5177" />
|
||||||
|
</linearGradient>
|
||||||
|
<radialGradient
|
||||||
|
inkscape:collect="always"
|
||||||
|
xlink:href="#linearGradient3600"
|
||||||
|
id="radialGradient5169"
|
||||||
|
gradientUnits="userSpaceOnUse"
|
||||||
|
gradientTransform="matrix(0.92332021,0.38403097,-0.41592401,1.0000002,78.192026,-120.05314)"
|
||||||
|
cx="324.32715"
|
||||||
|
cy="131.40274"
|
||||||
|
fx="324.32715"
|
||||||
|
fy="131.40274"
|
||||||
|
r="25.501276" />
|
||||||
|
<linearGradient
|
||||||
|
id="linearGradient3600">
|
||||||
|
<stop
|
||||||
|
style="stop-color:#ffc13d;stop-opacity:1;"
|
||||||
|
offset="0"
|
||||||
|
id="stop3602" />
|
||||||
|
<stop
|
||||||
|
style="stop-color:#e09900;stop-opacity:1;"
|
||||||
|
offset="1"
|
||||||
|
id="stop3604" />
|
||||||
|
</linearGradient>
|
||||||
|
<radialGradient
|
||||||
|
r="25.501276"
|
||||||
|
fy="131.40274"
|
||||||
|
fx="324.32715"
|
||||||
|
cy="131.40274"
|
||||||
|
cx="324.32715"
|
||||||
|
gradientTransform="matrix(0.92332021,0.38403097,-0.41592401,1.0000002,78.192026,-120.05314)"
|
||||||
|
gradientUnits="userSpaceOnUse"
|
||||||
|
id="radialGradient5574"
|
||||||
|
xlink:href="#linearGradient3600"
|
||||||
|
inkscape:collect="always" />
|
||||||
|
<inkscape:perspective
|
||||||
|
id="perspective5663"
|
||||||
|
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
|
||||||
|
inkscape:vp_z="1 : 0.5 : 1"
|
||||||
|
inkscape:vp_y="0 : 1000 : 0"
|
||||||
|
inkscape:vp_x="0 : 0.5 : 1"
|
||||||
|
sodipodi:type="inkscape:persp3d" />
|
||||||
|
<radialGradient
|
||||||
|
inkscape:collect="always"
|
||||||
|
xlink:href="#linearGradient3600-7"
|
||||||
|
id="radialGradient3606-8"
|
||||||
|
cx="324.32715"
|
||||||
|
cy="131.40274"
|
||||||
|
fx="324.32715"
|
||||||
|
fy="131.40274"
|
||||||
|
r="25.501276"
|
||||||
|
gradientUnits="userSpaceOnUse"
|
||||||
|
gradientTransform="matrix(0.92332021,0.38403097,-0.41592401,1.0000002,78.192026,-120.05314)" />
|
||||||
|
<linearGradient
|
||||||
|
id="linearGradient3600-7">
|
||||||
|
<stop
|
||||||
|
style="stop-color:#ffc13d;stop-opacity:1;"
|
||||||
|
offset="0"
|
||||||
|
id="stop3602-7" />
|
||||||
|
<stop
|
||||||
|
style="stop-color:#e09900;stop-opacity:1;"
|
||||||
|
offset="1"
|
||||||
|
id="stop3604-6" />
|
||||||
|
</linearGradient>
|
||||||
|
<radialGradient
|
||||||
|
r="25.501276"
|
||||||
|
fy="131.40274"
|
||||||
|
fx="324.32715"
|
||||||
|
cy="131.40274"
|
||||||
|
cx="324.32715"
|
||||||
|
gradientTransform="matrix(0.92332021,0.38403097,-0.41592401,1.0000002,78.192026,-120.05314)"
|
||||||
|
gradientUnits="userSpaceOnUse"
|
||||||
|
id="radialGradient5676"
|
||||||
|
xlink:href="#linearGradient3600-7"
|
||||||
|
inkscape:collect="always" />
|
||||||
|
</defs>
|
||||||
|
<sodipodi:namedview
|
||||||
|
inkscape:document-units="mm"
|
||||||
|
id="base"
|
||||||
|
pagecolor="#ffffff"
|
||||||
|
bordercolor="#666666"
|
||||||
|
borderopacity="1.0"
|
||||||
|
inkscape:pageopacity="0.0"
|
||||||
|
inkscape:pageshadow="2"
|
||||||
|
inkscape:zoom="5.6"
|
||||||
|
inkscape:cx="63.214286"
|
||||||
|
inkscape:cy="46.160714"
|
||||||
|
inkscape:current-layer="g5249"
|
||||||
|
showgrid="false"
|
||||||
|
inkscape:window-width="1147"
|
||||||
|
inkscape:window-height="1211"
|
||||||
|
inkscape:window-x="2842"
|
||||||
|
inkscape:window-y="58"
|
||||||
|
inkscape:window-maximized="0"
|
||||||
|
inkscape:showpageshadow="2"
|
||||||
|
inkscape:pagecheckerboard="0"
|
||||||
|
inkscape:deskcolor="#d1d1d1" />
|
||||||
|
<metadata
|
||||||
|
id="metadata4">
|
||||||
|
<rdf:RDF>
|
||||||
|
<cc:Work
|
||||||
|
rdf:about="">
|
||||||
|
<dc:format>image/svg+xml</dc:format>
|
||||||
|
<dc:type
|
||||||
|
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||||
|
<dc:title />
|
||||||
|
</cc:Work>
|
||||||
|
</rdf:RDF>
|
||||||
|
</metadata>
|
||||||
|
<g
|
||||||
|
inkscape:label="Layer 1"
|
||||||
|
inkscape:groupmode="layer"
|
||||||
|
id="layer1"
|
||||||
|
transform="translate(0,-952.36218)">
|
||||||
|
<g
|
||||||
|
id="g5249"
|
||||||
|
transform="translate(0.53874115,0.90502985)">
|
||||||
|
<path
|
||||||
|
style="stroke:#000000;stroke-width:4.45809746000000030;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;fill-opacity:1"
|
||||||
|
d="m 49.582319,954.34642 c -12.850034,0 -23.284789,10.43476 -23.284789,23.28479 0,7.32135 3.403263,13.81811 8.689724,18.08319 -10.278401,5.8502 -16.663073,17.8469 -20.19443,31.0259 -5.1178053,19.1 15.207096,22.0401 34.269334,22.0915 l 0,0.031 c 0.290839,0 0.566498,0.031 0.856734,0.031 19.210152,0 39.855802,-3.1837 34.789494,-22.0914 -3.636192,-13.5705 -10.027831,-25.4711 -20.378015,-31.17899 5.208701,-4.26694 8.506139,-10.73278 8.506139,-17.9914 0,-12.85003 -10.404159,-23.28479 -23.254191,-23.28479 z"
|
||||||
|
id="left"
|
||||||
|
inkscape:connector-curvature="0" />
|
||||||
|
<path
|
||||||
|
fill="none"
|
||||||
|
style="stroke:#000000;stroke-width:1.97203517px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||||
|
d="m 50.522358,952.70715 0,95.71425"
|
||||||
|
id="center"
|
||||||
|
inkscape:connector-curvature="0" />
|
||||||
|
<path
|
||||||
|
style="opacity:1;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:1.71966;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||||
|
d="m 51.054254,1001.4773 v -45.77683 l 1.097241,0.005 c 3.642211,0.0172 9.170661,2.46935 12.395732,5.49816 4.897489,4.59945 7.421654,10.97001 6.981907,17.62114 -0.389167,5.88609 -2.631878,10.66609 -6.951818,14.81672 l -2.05562,1.97506 2.959813,2.0746 c 3.467097,2.43015 7.403677,6.55065 9.666109,10.11765 3.325898,5.2437 6.79289,13.8355 8.153827,20.2065 2.584451,12.0989 -5.997953,18.2384 -26.592174,19.0232 l -5.655017,0.2154 v -45.7768 z"
|
||||||
|
id="right"
|
||||||
|
inkscape:connector-curvature="0" />
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 9.2 KiB |
253
cockatrice/resources/usericons/pawn_single.svg
Normal file
@@ -0,0 +1,253 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||||
|
|
||||||
|
<svg
|
||||||
|
width="100"
|
||||||
|
height="100"
|
||||||
|
id="svg5322"
|
||||||
|
version="1.1"
|
||||||
|
inkscape:version="1.4 (86a8ad7, 2024-10-11)"
|
||||||
|
sodipodi:docname="pawn_single.svg"
|
||||||
|
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||||
|
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||||
|
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||||
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
xmlns:svg="http://www.w3.org/2000/svg"
|
||||||
|
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||||
|
xmlns:cc="http://creativecommons.org/ns#"
|
||||||
|
xmlns:dc="http://purl.org/dc/elements/1.1/">
|
||||||
|
<defs
|
||||||
|
id="defs3">
|
||||||
|
<inkscape:perspective
|
||||||
|
sodipodi:type="inkscape:persp3d"
|
||||||
|
inkscape:vp_x="0 : 526.18109 : 1"
|
||||||
|
inkscape:vp_y="0 : 1000 : 0"
|
||||||
|
inkscape:vp_z="744.09448 : 526.18109 : 1"
|
||||||
|
inkscape:persp3d-origin="372.04724 : 350.78739 : 1"
|
||||||
|
id="perspective5328" />
|
||||||
|
<inkscape:perspective
|
||||||
|
id="perspective5305"
|
||||||
|
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
|
||||||
|
inkscape:vp_z="1 : 0.5 : 1"
|
||||||
|
inkscape:vp_y="0 : 1000 : 0"
|
||||||
|
inkscape:vp_x="0 : 0.5 : 1"
|
||||||
|
sodipodi:type="inkscape:persp3d" />
|
||||||
|
<linearGradient
|
||||||
|
id="linearGradient5181">
|
||||||
|
<stop
|
||||||
|
style="stop-color:#0fbb00;stop-opacity:1;"
|
||||||
|
offset="0"
|
||||||
|
id="stop5183" />
|
||||||
|
<stop
|
||||||
|
style="stop-color:#064400;stop-opacity:1;"
|
||||||
|
offset="1"
|
||||||
|
id="stop5185" />
|
||||||
|
</linearGradient>
|
||||||
|
<radialGradient
|
||||||
|
inkscape:collect="always"
|
||||||
|
xlink:href="#linearGradient3600-2"
|
||||||
|
id="radialGradient3606-7"
|
||||||
|
cx="324.32715"
|
||||||
|
cy="131.40274"
|
||||||
|
fx="324.32715"
|
||||||
|
fy="131.40274"
|
||||||
|
r="25.501276"
|
||||||
|
gradientUnits="userSpaceOnUse"
|
||||||
|
gradientTransform="matrix(0.92332021,0.38403097,-0.41592401,1.0000002,78.192026,-120.05314)" />
|
||||||
|
<linearGradient
|
||||||
|
id="linearGradient3600-2">
|
||||||
|
<stop
|
||||||
|
style="stop-color:#ffc33d;stop-opacity:1;"
|
||||||
|
offset="0"
|
||||||
|
id="stop3602-4" />
|
||||||
|
<stop
|
||||||
|
style="stop-color:#e09900;stop-opacity:1;"
|
||||||
|
offset="1"
|
||||||
|
id="stop3604-9" />
|
||||||
|
</linearGradient>
|
||||||
|
<inkscape:perspective
|
||||||
|
id="perspective5478"
|
||||||
|
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
|
||||||
|
inkscape:vp_z="1 : 0.5 : 1"
|
||||||
|
inkscape:vp_y="0 : 1000 : 0"
|
||||||
|
inkscape:vp_x="0 : 0.5 : 1"
|
||||||
|
sodipodi:type="inkscape:persp3d" />
|
||||||
|
<linearGradient
|
||||||
|
id="linearGradient5189">
|
||||||
|
<stop
|
||||||
|
style="stop-color:#000ec9;stop-opacity:1;"
|
||||||
|
offset="0"
|
||||||
|
id="stop5191" />
|
||||||
|
<stop
|
||||||
|
style="stop-color:#000657;stop-opacity:1;"
|
||||||
|
offset="1"
|
||||||
|
id="stop5193" />
|
||||||
|
</linearGradient>
|
||||||
|
<radialGradient
|
||||||
|
inkscape:collect="always"
|
||||||
|
xlink:href="#linearGradient3600-4"
|
||||||
|
id="radialGradient3606-1"
|
||||||
|
cx="324.32715"
|
||||||
|
cy="131.40274"
|
||||||
|
fx="324.32715"
|
||||||
|
fy="131.40274"
|
||||||
|
r="25.501276"
|
||||||
|
gradientUnits="userSpaceOnUse"
|
||||||
|
gradientTransform="matrix(0.92332021,0.38403097,-0.41592401,1.0000002,78.192026,-120.05314)" />
|
||||||
|
<linearGradient
|
||||||
|
id="linearGradient3600-4">
|
||||||
|
<stop
|
||||||
|
style="stop-color:#ffc33d;stop-opacity:1;"
|
||||||
|
offset="0"
|
||||||
|
id="stop3602-3" />
|
||||||
|
<stop
|
||||||
|
style="stop-color:#e09900;stop-opacity:1;"
|
||||||
|
offset="1"
|
||||||
|
id="stop3604-5" />
|
||||||
|
</linearGradient>
|
||||||
|
<inkscape:perspective
|
||||||
|
id="perspective5559"
|
||||||
|
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
|
||||||
|
inkscape:vp_z="1 : 0.5 : 1"
|
||||||
|
inkscape:vp_y="0 : 1000 : 0"
|
||||||
|
inkscape:vp_x="0 : 0.5 : 1"
|
||||||
|
sodipodi:type="inkscape:persp3d" />
|
||||||
|
<linearGradient
|
||||||
|
inkscape:collect="always"
|
||||||
|
xlink:href="#linearGradient5173"
|
||||||
|
id="linearGradient5179"
|
||||||
|
x1="167.33386"
|
||||||
|
y1="178.83276"
|
||||||
|
x2="244.78181"
|
||||||
|
y2="178.83276"
|
||||||
|
gradientUnits="userSpaceOnUse" />
|
||||||
|
<linearGradient
|
||||||
|
id="linearGradient5173">
|
||||||
|
<stop
|
||||||
|
style="stop-color:#f50000;stop-opacity:1;"
|
||||||
|
offset="0"
|
||||||
|
id="stop5175" />
|
||||||
|
<stop
|
||||||
|
style="stop-color:#950000;stop-opacity:1;"
|
||||||
|
offset="1"
|
||||||
|
id="stop5177" />
|
||||||
|
</linearGradient>
|
||||||
|
<radialGradient
|
||||||
|
inkscape:collect="always"
|
||||||
|
xlink:href="#linearGradient3600"
|
||||||
|
id="radialGradient5169"
|
||||||
|
gradientUnits="userSpaceOnUse"
|
||||||
|
gradientTransform="matrix(0.92332021,0.38403097,-0.41592401,1.0000002,78.192026,-120.05314)"
|
||||||
|
cx="324.32715"
|
||||||
|
cy="131.40274"
|
||||||
|
fx="324.32715"
|
||||||
|
fy="131.40274"
|
||||||
|
r="25.501276" />
|
||||||
|
<linearGradient
|
||||||
|
id="linearGradient3600">
|
||||||
|
<stop
|
||||||
|
style="stop-color:#ffc13d;stop-opacity:1;"
|
||||||
|
offset="0"
|
||||||
|
id="stop3602" />
|
||||||
|
<stop
|
||||||
|
style="stop-color:#e09900;stop-opacity:1;"
|
||||||
|
offset="1"
|
||||||
|
id="stop3604" />
|
||||||
|
</linearGradient>
|
||||||
|
<radialGradient
|
||||||
|
r="25.501276"
|
||||||
|
fy="131.40274"
|
||||||
|
fx="324.32715"
|
||||||
|
cy="131.40274"
|
||||||
|
cx="324.32715"
|
||||||
|
gradientTransform="matrix(0.92332021,0.38403097,-0.41592401,1.0000002,78.192026,-120.05314)"
|
||||||
|
gradientUnits="userSpaceOnUse"
|
||||||
|
id="radialGradient5574"
|
||||||
|
xlink:href="#linearGradient3600"
|
||||||
|
inkscape:collect="always" />
|
||||||
|
<inkscape:perspective
|
||||||
|
id="perspective5663"
|
||||||
|
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
|
||||||
|
inkscape:vp_z="1 : 0.5 : 1"
|
||||||
|
inkscape:vp_y="0 : 1000 : 0"
|
||||||
|
inkscape:vp_x="0 : 0.5 : 1"
|
||||||
|
sodipodi:type="inkscape:persp3d" />
|
||||||
|
<radialGradient
|
||||||
|
inkscape:collect="always"
|
||||||
|
xlink:href="#linearGradient3600-7"
|
||||||
|
id="radialGradient3606-8"
|
||||||
|
cx="324.32715"
|
||||||
|
cy="131.40274"
|
||||||
|
fx="324.32715"
|
||||||
|
fy="131.40274"
|
||||||
|
r="25.501276"
|
||||||
|
gradientUnits="userSpaceOnUse"
|
||||||
|
gradientTransform="matrix(0.92332021,0.38403097,-0.41592401,1.0000002,78.192026,-120.05314)" />
|
||||||
|
<linearGradient
|
||||||
|
id="linearGradient3600-7">
|
||||||
|
<stop
|
||||||
|
style="stop-color:#ffc13d;stop-opacity:1;"
|
||||||
|
offset="0"
|
||||||
|
id="stop3602-7" />
|
||||||
|
<stop
|
||||||
|
style="stop-color:#e09900;stop-opacity:1;"
|
||||||
|
offset="1"
|
||||||
|
id="stop3604-6" />
|
||||||
|
</linearGradient>
|
||||||
|
<radialGradient
|
||||||
|
r="25.501276"
|
||||||
|
fy="131.40274"
|
||||||
|
fx="324.32715"
|
||||||
|
cy="131.40274"
|
||||||
|
cx="324.32715"
|
||||||
|
gradientTransform="matrix(0.92332021,0.38403097,-0.41592401,1.0000002,78.192026,-120.05314)"
|
||||||
|
gradientUnits="userSpaceOnUse"
|
||||||
|
id="radialGradient5676"
|
||||||
|
xlink:href="#linearGradient3600-7"
|
||||||
|
inkscape:collect="always" />
|
||||||
|
</defs>
|
||||||
|
<sodipodi:namedview
|
||||||
|
inkscape:document-units="mm"
|
||||||
|
id="base"
|
||||||
|
pagecolor="#ffffff"
|
||||||
|
bordercolor="#666666"
|
||||||
|
borderopacity="1.0"
|
||||||
|
inkscape:pageopacity="0.0"
|
||||||
|
inkscape:pageshadow="2"
|
||||||
|
inkscape:zoom="5.6"
|
||||||
|
inkscape:cx="63.214286"
|
||||||
|
inkscape:cy="46.160714"
|
||||||
|
inkscape:current-layer="layer1"
|
||||||
|
showgrid="false"
|
||||||
|
inkscape:window-width="1147"
|
||||||
|
inkscape:window-height="1211"
|
||||||
|
inkscape:window-x="3185"
|
||||||
|
inkscape:window-y="44"
|
||||||
|
inkscape:window-maximized="0"
|
||||||
|
inkscape:showpageshadow="2"
|
||||||
|
inkscape:pagecheckerboard="0"
|
||||||
|
inkscape:deskcolor="#d1d1d1" />
|
||||||
|
<metadata
|
||||||
|
id="metadata4">
|
||||||
|
<rdf:RDF>
|
||||||
|
<cc:Work
|
||||||
|
rdf:about="">
|
||||||
|
<dc:format>image/svg+xml</dc:format>
|
||||||
|
<dc:type
|
||||||
|
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||||
|
<dc:title />
|
||||||
|
</cc:Work>
|
||||||
|
</rdf:RDF>
|
||||||
|
</metadata>
|
||||||
|
<g
|
||||||
|
inkscape:label="Layer 1"
|
||||||
|
inkscape:groupmode="layer"
|
||||||
|
id="layer1"
|
||||||
|
transform="translate(0,-952.36218)">
|
||||||
|
<path
|
||||||
|
style="fill-opacity:1;stroke:black;stroke-width:2.78220296;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;opacity:1"
|
||||||
|
d="M 49.84375 1.71875 C 36.719738 1.71875 26.0625 12.375988 26.0625 25.5 C 26.0625 32.977454 29.538325 39.612734 34.9375 43.96875 C 24.439951 49.943698 17.919149 62.196126 14.3125 75.65625 C 9.0380874 95.34065 30.224013 98.21875 49.84375 98.21875 C 69.463486 98.21875 90.549327 94.96715 85.375 75.65625 C 81.693381 61.916246 75.224585 49.827177 64.8125 43.9375 C 70.181573 39.580662 73.59375 32.953205 73.59375 25.5 C 73.59375 12.375988 62.967762 1.71875 49.84375 1.71875 z "
|
||||||
|
id="left"
|
||||||
|
transform="translate(0,952.36218)" />
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 8.1 KiB |
368
cockatrice/resources/usericons/pawn_vip_double.svg
Normal file
@@ -0,0 +1,368 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||||
|
|
||||||
|
<svg
|
||||||
|
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||||
|
xmlns:cc="http://creativecommons.org/ns#"
|
||||||
|
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||||
|
xmlns:svg="http://www.w3.org/2000/svg"
|
||||||
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||||
|
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||||
|
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||||
|
width="100"
|
||||||
|
height="100"
|
||||||
|
id="svg5322"
|
||||||
|
version="1.1"
|
||||||
|
inkscape:version="0.91 r13725"
|
||||||
|
sodipodi:docname="moderator_vip.svg">
|
||||||
|
<defs
|
||||||
|
id="defs3">
|
||||||
|
<inkscape:perspective
|
||||||
|
sodipodi:type="inkscape:persp3d"
|
||||||
|
inkscape:vp_x="0 : 526.18109 : 1"
|
||||||
|
inkscape:vp_y="0 : 1000 : 0"
|
||||||
|
inkscape:vp_z="744.09448 : 526.18109 : 1"
|
||||||
|
inkscape:persp3d-origin="372.04724 : 350.78739 : 1"
|
||||||
|
id="perspective5328" />
|
||||||
|
<inkscape:perspective
|
||||||
|
id="perspective5305"
|
||||||
|
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
|
||||||
|
inkscape:vp_z="1 : 0.5 : 1"
|
||||||
|
inkscape:vp_y="0 : 1000 : 0"
|
||||||
|
inkscape:vp_x="0 : 0.5 : 1"
|
||||||
|
sodipodi:type="inkscape:persp3d" />
|
||||||
|
<linearGradient
|
||||||
|
id="linearGradient5181">
|
||||||
|
<stop
|
||||||
|
style="stop-color:#0fbb00;stop-opacity:1;"
|
||||||
|
offset="0"
|
||||||
|
id="stop5183" />
|
||||||
|
<stop
|
||||||
|
style="stop-color:#064400;stop-opacity:1;"
|
||||||
|
offset="1"
|
||||||
|
id="stop5185" />
|
||||||
|
</linearGradient>
|
||||||
|
<radialGradient
|
||||||
|
inkscape:collect="always"
|
||||||
|
xlink:href="#linearGradient3600-2"
|
||||||
|
id="radialGradient3606-7"
|
||||||
|
cx="324.32715"
|
||||||
|
cy="131.40274"
|
||||||
|
fx="324.32715"
|
||||||
|
fy="131.40274"
|
||||||
|
r="25.501276"
|
||||||
|
gradientUnits="userSpaceOnUse"
|
||||||
|
gradientTransform="matrix(0.92332021,0.38403097,-0.41592401,1.0000002,78.192026,-120.05314)" />
|
||||||
|
<linearGradient
|
||||||
|
id="linearGradient3600-2">
|
||||||
|
<stop
|
||||||
|
style="stop-color:#ffc33d;stop-opacity:1;"
|
||||||
|
offset="0"
|
||||||
|
id="stop3602-4" />
|
||||||
|
<stop
|
||||||
|
style="stop-color:#e09900;stop-opacity:1;"
|
||||||
|
offset="1"
|
||||||
|
id="stop3604-9" />
|
||||||
|
</linearGradient>
|
||||||
|
<inkscape:perspective
|
||||||
|
id="perspective5478"
|
||||||
|
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
|
||||||
|
inkscape:vp_z="1 : 0.5 : 1"
|
||||||
|
inkscape:vp_y="0 : 1000 : 0"
|
||||||
|
inkscape:vp_x="0 : 0.5 : 1"
|
||||||
|
sodipodi:type="inkscape:persp3d" />
|
||||||
|
<linearGradient
|
||||||
|
id="linearGradient5189">
|
||||||
|
<stop
|
||||||
|
style="stop-color:#000ec9;stop-opacity:1;"
|
||||||
|
offset="0"
|
||||||
|
id="stop5191" />
|
||||||
|
<stop
|
||||||
|
style="stop-color:#000657;stop-opacity:1;"
|
||||||
|
offset="1"
|
||||||
|
id="stop5193" />
|
||||||
|
</linearGradient>
|
||||||
|
<radialGradient
|
||||||
|
inkscape:collect="always"
|
||||||
|
xlink:href="#linearGradient3600-4"
|
||||||
|
id="radialGradient3606-1"
|
||||||
|
cx="324.32715"
|
||||||
|
cy="131.40274"
|
||||||
|
fx="324.32715"
|
||||||
|
fy="131.40274"
|
||||||
|
r="25.501276"
|
||||||
|
gradientUnits="userSpaceOnUse"
|
||||||
|
gradientTransform="matrix(0.92332021,0.38403097,-0.41592401,1.0000002,78.192026,-120.05314)" />
|
||||||
|
<linearGradient
|
||||||
|
id="linearGradient3600-4">
|
||||||
|
<stop
|
||||||
|
style="stop-color:#ffc33d;stop-opacity:1;"
|
||||||
|
offset="0"
|
||||||
|
id="stop3602-3" />
|
||||||
|
<stop
|
||||||
|
style="stop-color:#e09900;stop-opacity:1;"
|
||||||
|
offset="1"
|
||||||
|
id="stop3604-5" />
|
||||||
|
</linearGradient>
|
||||||
|
<inkscape:perspective
|
||||||
|
id="perspective5559"
|
||||||
|
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
|
||||||
|
inkscape:vp_z="1 : 0.5 : 1"
|
||||||
|
inkscape:vp_y="0 : 1000 : 0"
|
||||||
|
inkscape:vp_x="0 : 0.5 : 1"
|
||||||
|
sodipodi:type="inkscape:persp3d" />
|
||||||
|
<linearGradient
|
||||||
|
inkscape:collect="always"
|
||||||
|
xlink:href="#linearGradient5173"
|
||||||
|
id="linearGradient5179"
|
||||||
|
x1="167.33386"
|
||||||
|
y1="178.83276"
|
||||||
|
x2="244.78181"
|
||||||
|
y2="178.83276"
|
||||||
|
gradientUnits="userSpaceOnUse" />
|
||||||
|
<linearGradient
|
||||||
|
id="linearGradient5173">
|
||||||
|
<stop
|
||||||
|
style="stop-color:#f50000;stop-opacity:1;"
|
||||||
|
offset="0"
|
||||||
|
id="stop5175" />
|
||||||
|
<stop
|
||||||
|
style="stop-color:#950000;stop-opacity:1;"
|
||||||
|
offset="1"
|
||||||
|
id="stop5177" />
|
||||||
|
</linearGradient>
|
||||||
|
<radialGradient
|
||||||
|
inkscape:collect="always"
|
||||||
|
xlink:href="#linearGradient3600"
|
||||||
|
id="radialGradient5169"
|
||||||
|
gradientUnits="userSpaceOnUse"
|
||||||
|
gradientTransform="matrix(0.92332021,0.38403097,-0.41592401,1.0000002,78.192026,-120.05314)"
|
||||||
|
cx="324.32715"
|
||||||
|
cy="131.40274"
|
||||||
|
fx="324.32715"
|
||||||
|
fy="131.40274"
|
||||||
|
r="25.501276" />
|
||||||
|
<linearGradient
|
||||||
|
id="linearGradient3600">
|
||||||
|
<stop
|
||||||
|
style="stop-color:#ffc13d;stop-opacity:1;"
|
||||||
|
offset="0"
|
||||||
|
id="stop3602" />
|
||||||
|
<stop
|
||||||
|
style="stop-color:#e09900;stop-opacity:1;"
|
||||||
|
offset="1"
|
||||||
|
id="stop3604" />
|
||||||
|
</linearGradient>
|
||||||
|
<radialGradient
|
||||||
|
r="25.501276"
|
||||||
|
fy="131.40274"
|
||||||
|
fx="324.32715"
|
||||||
|
cy="131.40274"
|
||||||
|
cx="324.32715"
|
||||||
|
gradientTransform="matrix(0.92332021,0.38403097,-0.41592401,1.0000002,78.192026,-120.05314)"
|
||||||
|
gradientUnits="userSpaceOnUse"
|
||||||
|
id="radialGradient5574"
|
||||||
|
xlink:href="#linearGradient3600"
|
||||||
|
inkscape:collect="always" />
|
||||||
|
<inkscape:perspective
|
||||||
|
id="perspective5663"
|
||||||
|
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
|
||||||
|
inkscape:vp_z="1 : 0.5 : 1"
|
||||||
|
inkscape:vp_y="0 : 1000 : 0"
|
||||||
|
inkscape:vp_x="0 : 0.5 : 1"
|
||||||
|
sodipodi:type="inkscape:persp3d" />
|
||||||
|
<radialGradient
|
||||||
|
inkscape:collect="always"
|
||||||
|
xlink:href="#linearGradient3600-7"
|
||||||
|
id="radialGradient3606-8"
|
||||||
|
cx="324.32715"
|
||||||
|
cy="131.40274"
|
||||||
|
fx="324.32715"
|
||||||
|
fy="131.40274"
|
||||||
|
r="25.501276"
|
||||||
|
gradientUnits="userSpaceOnUse"
|
||||||
|
gradientTransform="matrix(0.92332021,0.38403097,-0.41592401,1.0000002,78.192026,-120.05314)" />
|
||||||
|
<linearGradient
|
||||||
|
id="linearGradient3600-7">
|
||||||
|
<stop
|
||||||
|
style="stop-color:#ffc13d;stop-opacity:1;"
|
||||||
|
offset="0"
|
||||||
|
id="stop3602-7" />
|
||||||
|
<stop
|
||||||
|
style="stop-color:#e09900;stop-opacity:1;"
|
||||||
|
offset="1"
|
||||||
|
id="stop3604-6" />
|
||||||
|
</linearGradient>
|
||||||
|
<radialGradient
|
||||||
|
inkscape:collect="always"
|
||||||
|
xlink:href="#linearGradient3600-7"
|
||||||
|
id="radialGradient5254"
|
||||||
|
gradientUnits="userSpaceOnUse"
|
||||||
|
gradientTransform="matrix(0.92332021,0.38403097,-0.41592401,1.0000002,78.192026,-120.05314)"
|
||||||
|
cx="324.32715"
|
||||||
|
cy="131.40274"
|
||||||
|
fx="324.32715"
|
||||||
|
fy="131.40274"
|
||||||
|
r="25.501276" />
|
||||||
|
<linearGradient
|
||||||
|
inkscape:collect="always"
|
||||||
|
xlink:href="#linearGradient5189-1"
|
||||||
|
id="linearGradient5394"
|
||||||
|
gradientUnits="userSpaceOnUse"
|
||||||
|
x1="385.03503"
|
||||||
|
y1="180.09546"
|
||||||
|
x2="462.48297"
|
||||||
|
y2="180.09546"
|
||||||
|
gradientTransform="matrix(0.96839241,0,0,0.96839241,-360.365,847.52359)" />
|
||||||
|
<linearGradient
|
||||||
|
id="linearGradient5189-1">
|
||||||
|
<stop
|
||||||
|
style="stop-color:#000ec9;stop-opacity:1;"
|
||||||
|
offset="0"
|
||||||
|
id="stop5191-0" />
|
||||||
|
<stop
|
||||||
|
style="stop-color:#000657;stop-opacity:1;"
|
||||||
|
offset="1"
|
||||||
|
id="stop5193-4" />
|
||||||
|
</linearGradient>
|
||||||
|
<linearGradient
|
||||||
|
inkscape:collect="always"
|
||||||
|
xlink:href="#linearGradient5173-1"
|
||||||
|
id="linearGradient5581"
|
||||||
|
gradientUnits="userSpaceOnUse"
|
||||||
|
x1="167.33386"
|
||||||
|
y1="178.83276"
|
||||||
|
x2="244.78181"
|
||||||
|
y2="178.83276"
|
||||||
|
gradientTransform="matrix(0.96839241,0,0,0.96839241,-149.54484,848.74636)" />
|
||||||
|
<linearGradient
|
||||||
|
id="linearGradient5173-1">
|
||||||
|
<stop
|
||||||
|
style="stop-color:#f50000;stop-opacity:1;"
|
||||||
|
offset="0"
|
||||||
|
id="stop5175-5" />
|
||||||
|
<stop
|
||||||
|
style="stop-color:#950000;stop-opacity:1;"
|
||||||
|
offset="1"
|
||||||
|
id="stop5177-3" />
|
||||||
|
</linearGradient>
|
||||||
|
<linearGradient
|
||||||
|
inkscape:collect="always"
|
||||||
|
xlink:href="#linearGradient5181-9"
|
||||||
|
id="linearGradient5782"
|
||||||
|
gradientUnits="userSpaceOnUse"
|
||||||
|
x1="282.50455"
|
||||||
|
y1="181.61069"
|
||||||
|
x2="359.95248"
|
||||||
|
y2="181.61069"
|
||||||
|
gradientTransform="matrix(0.96839241,0,0,0.96839241,-261.07526,846.05625)" />
|
||||||
|
<linearGradient
|
||||||
|
id="linearGradient5181-9">
|
||||||
|
<stop
|
||||||
|
style="stop-color:#80d600;stop-opacity:1;"
|
||||||
|
offset="0"
|
||||||
|
id="stop5183-3" />
|
||||||
|
<stop
|
||||||
|
style="stop-color:#80d600;stop-opacity:1;"
|
||||||
|
offset="1"
|
||||||
|
id="stop5185-0" />
|
||||||
|
</linearGradient>
|
||||||
|
<linearGradient
|
||||||
|
y2="181.61069"
|
||||||
|
x2="359.95248"
|
||||||
|
y1="181.61069"
|
||||||
|
x1="282.50455"
|
||||||
|
gradientTransform="matrix(0.96839241,0,0,0.96839241,-175.71812,893.2775)"
|
||||||
|
gradientUnits="userSpaceOnUse"
|
||||||
|
id="linearGradient5799"
|
||||||
|
xlink:href="#linearGradient5181-9"
|
||||||
|
inkscape:collect="always" />
|
||||||
|
<linearGradient
|
||||||
|
inkscape:collect="always"
|
||||||
|
id="linearGradient3419">
|
||||||
|
<stop
|
||||||
|
style="stop-color:#ffec79;stop-opacity:1"
|
||||||
|
offset="0"
|
||||||
|
id="stop3421" />
|
||||||
|
<stop
|
||||||
|
style="stop-color:#f2c15b;stop-opacity:1"
|
||||||
|
offset="1"
|
||||||
|
id="stop3423" />
|
||||||
|
</linearGradient>
|
||||||
|
<linearGradient
|
||||||
|
inkscape:collect="always"
|
||||||
|
xlink:href="#linearGradient3419"
|
||||||
|
id="linearGradient3425-5"
|
||||||
|
x1="-126.90256"
|
||||||
|
y1="941.52618"
|
||||||
|
x2="-125.73831"
|
||||||
|
y2="984.13751"
|
||||||
|
gradientUnits="userSpaceOnUse"
|
||||||
|
gradientTransform="translate(154.2532,0.90556908)" />
|
||||||
|
</defs>
|
||||||
|
<sodipodi:namedview
|
||||||
|
inkscape:document-units="mm"
|
||||||
|
id="base"
|
||||||
|
pagecolor="#ffffff"
|
||||||
|
bordercolor="#666666"
|
||||||
|
borderopacity="1.0"
|
||||||
|
inkscape:pageopacity="0.0"
|
||||||
|
inkscape:pageshadow="2"
|
||||||
|
inkscape:zoom="4.2946338"
|
||||||
|
inkscape:cx="34.155294"
|
||||||
|
inkscape:cy="65.175571"
|
||||||
|
inkscape:current-layer="layer1"
|
||||||
|
showgrid="false"
|
||||||
|
inkscape:window-width="1440"
|
||||||
|
inkscape:window-height="792"
|
||||||
|
inkscape:window-x="11"
|
||||||
|
inkscape:window-y="0"
|
||||||
|
inkscape:window-maximized="0" />
|
||||||
|
<metadata
|
||||||
|
id="metadata4">
|
||||||
|
<rdf:RDF>
|
||||||
|
<cc:Work
|
||||||
|
rdf:about="">
|
||||||
|
<dc:format>image/svg+xml</dc:format>
|
||||||
|
<dc:type
|
||||||
|
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||||
|
<dc:title></dc:title>
|
||||||
|
</cc:Work>
|
||||||
|
</rdf:RDF>
|
||||||
|
</metadata>
|
||||||
|
<g
|
||||||
|
inkscape:label="Layer 1"
|
||||||
|
inkscape:groupmode="layer"
|
||||||
|
id="layer1"
|
||||||
|
transform="translate(0,-952.36218)">
|
||||||
|
<path
|
||||||
|
style="fill-opacity:1;stroke:black;stroke-width:2.78220296;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
|
||||||
|
d="M 49.84375 1.71875 C 36.719738 1.71875 26.0625 12.375988 26.0625 25.5 C 26.0625 32.977454 29.538325 39.612734 34.9375 43.96875 C 24.439951 49.943698 17.919149 62.196126 14.3125 75.65625 C 9.0380874 95.34065 30.224013 98.21875 49.84375 98.21875 C 69.463486 98.21875 90.549327 94.96715 85.375 75.65625 C 81.693381 61.916246 75.224585 49.827177 64.8125 43.9375 C 70.181573 39.580662 73.59375 32.953205 73.59375 25.5 C 73.59375 12.375988 62.967762 1.71875 49.84375 1.71875 z "
|
||||||
|
transform="translate(0,952.36218)"
|
||||||
|
id="right" />
|
||||||
|
<path
|
||||||
|
style="opacity:1;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:1.73577702;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||||
|
d="m 51.28696,1001.834 0,-46.98372 1.434151,0.16768 c 5.155008,0.60274 9.462857,2.72154 12.938257,6.36366 4.74393,4.9715 6.87913,11.35611 6.16464,18.43328 -0.53702,5.31935 -3.09008,10.59498 -6.83833,14.13074 l -1.94072,1.83069 3.04083,2.20427 c 3.58084,2.5957 7.18975,6.4912 9.55296,10.3116 4.89572,7.9144 9.23593,21.4918 8.50487,26.6055 -0.81312,5.6877 -5.43872,9.6977 -13.62216,11.8093 -3.80822,0.9826 -7.68056,1.4713 -14.763321,1.8633 l -4.471177,0.2474 0,-46.9837 z"
|
||||||
|
id="left"
|
||||||
|
inkscape:connector-curvature="0" />
|
||||||
|
<path
|
||||||
|
sodipodi:type="star"
|
||||||
|
style="fill:url(#linearGradient3425-5);fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||||
|
id="star"
|
||||||
|
sodipodi:sides="5"
|
||||||
|
sodipodi:cx="27.80283"
|
||||||
|
sodipodi:cy="970.9433"
|
||||||
|
sodipodi:r1="17.189852"
|
||||||
|
sodipodi:r2="8.5949249"
|
||||||
|
sodipodi:arg1="0.9349579"
|
||||||
|
sodipodi:arg2="1.5632764"
|
||||||
|
inkscape:flatsided="false"
|
||||||
|
inkscape:rounded="0"
|
||||||
|
inkscape:randomized="0"
|
||||||
|
d="m 38.011063,984.77381 -10.143601,-5.23583 -10.063711,5.38779 1.845023,-11.2651 -8.233948,-7.90624 11.283888,-1.72639 4.974851,-10.27411 5.128803,10.19813 11.308575,1.55649 -8.114112,8.02918 z"
|
||||||
|
inkscape:transform-center-x="0.094945927"
|
||||||
|
inkscape:transform-center-y="-3.9764964"
|
||||||
|
transform="matrix(2.3768784,0,0,2.4799382,-15.920285,-1400.1716)" />
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 12 KiB |
363
cockatrice/resources/usericons/pawn_vip_single.svg
Normal file
@@ -0,0 +1,363 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||||
|
|
||||||
|
<svg
|
||||||
|
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||||
|
xmlns:cc="http://creativecommons.org/ns#"
|
||||||
|
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||||
|
xmlns:svg="http://www.w3.org/2000/svg"
|
||||||
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||||
|
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||||
|
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||||
|
width="100"
|
||||||
|
height="100"
|
||||||
|
id="svg5322"
|
||||||
|
version="1.1"
|
||||||
|
inkscape:version="0.91 r13725"
|
||||||
|
sodipodi:docname="admin_vip.svg">
|
||||||
|
<defs
|
||||||
|
id="defs3">
|
||||||
|
<linearGradient
|
||||||
|
inkscape:collect="always"
|
||||||
|
id="linearGradient3419">
|
||||||
|
<stop
|
||||||
|
style="stop-color:#ffec79;stop-opacity:1"
|
||||||
|
offset="0"
|
||||||
|
id="stop3421" />
|
||||||
|
<stop
|
||||||
|
style="stop-color:#f2c15b;stop-opacity:1"
|
||||||
|
offset="1"
|
||||||
|
id="stop3423" />
|
||||||
|
</linearGradient>
|
||||||
|
<inkscape:perspective
|
||||||
|
sodipodi:type="inkscape:persp3d"
|
||||||
|
inkscape:vp_x="0 : 526.18109 : 1"
|
||||||
|
inkscape:vp_y="0 : 1000 : 0"
|
||||||
|
inkscape:vp_z="744.09448 : 526.18109 : 1"
|
||||||
|
inkscape:persp3d-origin="372.04724 : 350.78739 : 1"
|
||||||
|
id="perspective5328" />
|
||||||
|
<inkscape:perspective
|
||||||
|
id="perspective5305"
|
||||||
|
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
|
||||||
|
inkscape:vp_z="1 : 0.5 : 1"
|
||||||
|
inkscape:vp_y="0 : 1000 : 0"
|
||||||
|
inkscape:vp_x="0 : 0.5 : 1"
|
||||||
|
sodipodi:type="inkscape:persp3d" />
|
||||||
|
<linearGradient
|
||||||
|
id="linearGradient5181">
|
||||||
|
<stop
|
||||||
|
style="stop-color:#0fbb00;stop-opacity:1;"
|
||||||
|
offset="0"
|
||||||
|
id="stop5183" />
|
||||||
|
<stop
|
||||||
|
style="stop-color:#064400;stop-opacity:1;"
|
||||||
|
offset="1"
|
||||||
|
id="stop5185" />
|
||||||
|
</linearGradient>
|
||||||
|
<radialGradient
|
||||||
|
inkscape:collect="always"
|
||||||
|
xlink:href="#linearGradient3600-2"
|
||||||
|
id="radialGradient3606-7"
|
||||||
|
cx="324.32715"
|
||||||
|
cy="131.40274"
|
||||||
|
fx="324.32715"
|
||||||
|
fy="131.40274"
|
||||||
|
r="25.501276"
|
||||||
|
gradientUnits="userSpaceOnUse"
|
||||||
|
gradientTransform="matrix(0.92332021,0.38403097,-0.41592401,1.0000002,78.192026,-120.05314)" />
|
||||||
|
<linearGradient
|
||||||
|
id="linearGradient3600-2">
|
||||||
|
<stop
|
||||||
|
style="stop-color:#ffc33d;stop-opacity:1;"
|
||||||
|
offset="0"
|
||||||
|
id="stop3602-4" />
|
||||||
|
<stop
|
||||||
|
style="stop-color:#e09900;stop-opacity:1;"
|
||||||
|
offset="1"
|
||||||
|
id="stop3604-9" />
|
||||||
|
</linearGradient>
|
||||||
|
<inkscape:perspective
|
||||||
|
id="perspective5478"
|
||||||
|
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
|
||||||
|
inkscape:vp_z="1 : 0.5 : 1"
|
||||||
|
inkscape:vp_y="0 : 1000 : 0"
|
||||||
|
inkscape:vp_x="0 : 0.5 : 1"
|
||||||
|
sodipodi:type="inkscape:persp3d" />
|
||||||
|
<linearGradient
|
||||||
|
id="linearGradient5189">
|
||||||
|
<stop
|
||||||
|
style="stop-color:#000ec9;stop-opacity:1;"
|
||||||
|
offset="0"
|
||||||
|
id="stop5191" />
|
||||||
|
<stop
|
||||||
|
style="stop-color:#000657;stop-opacity:1;"
|
||||||
|
offset="1"
|
||||||
|
id="stop5193" />
|
||||||
|
</linearGradient>
|
||||||
|
<radialGradient
|
||||||
|
inkscape:collect="always"
|
||||||
|
xlink:href="#linearGradient3600-4"
|
||||||
|
id="radialGradient3606-1"
|
||||||
|
cx="324.32715"
|
||||||
|
cy="131.40274"
|
||||||
|
fx="324.32715"
|
||||||
|
fy="131.40274"
|
||||||
|
r="25.501276"
|
||||||
|
gradientUnits="userSpaceOnUse"
|
||||||
|
gradientTransform="matrix(0.92332021,0.38403097,-0.41592401,1.0000002,78.192026,-120.05314)" />
|
||||||
|
<linearGradient
|
||||||
|
id="linearGradient3600-4">
|
||||||
|
<stop
|
||||||
|
style="stop-color:#ffc33d;stop-opacity:1;"
|
||||||
|
offset="0"
|
||||||
|
id="stop3602-3" />
|
||||||
|
<stop
|
||||||
|
style="stop-color:#e09900;stop-opacity:1;"
|
||||||
|
offset="1"
|
||||||
|
id="stop3604-5" />
|
||||||
|
</linearGradient>
|
||||||
|
<inkscape:perspective
|
||||||
|
id="perspective5559"
|
||||||
|
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
|
||||||
|
inkscape:vp_z="1 : 0.5 : 1"
|
||||||
|
inkscape:vp_y="0 : 1000 : 0"
|
||||||
|
inkscape:vp_x="0 : 0.5 : 1"
|
||||||
|
sodipodi:type="inkscape:persp3d" />
|
||||||
|
<linearGradient
|
||||||
|
inkscape:collect="always"
|
||||||
|
xlink:href="#linearGradient5173"
|
||||||
|
id="linearGradient5179"
|
||||||
|
x1="167.33386"
|
||||||
|
y1="178.83276"
|
||||||
|
x2="244.78181"
|
||||||
|
y2="178.83276"
|
||||||
|
gradientUnits="userSpaceOnUse" />
|
||||||
|
<linearGradient
|
||||||
|
id="linearGradient5173">
|
||||||
|
<stop
|
||||||
|
style="stop-color:#f50000;stop-opacity:1;"
|
||||||
|
offset="0"
|
||||||
|
id="stop5175" />
|
||||||
|
<stop
|
||||||
|
style="stop-color:#950000;stop-opacity:1;"
|
||||||
|
offset="1"
|
||||||
|
id="stop5177" />
|
||||||
|
</linearGradient>
|
||||||
|
<radialGradient
|
||||||
|
inkscape:collect="always"
|
||||||
|
xlink:href="#linearGradient3600"
|
||||||
|
id="radialGradient5169"
|
||||||
|
gradientUnits="userSpaceOnUse"
|
||||||
|
gradientTransform="matrix(0.92332021,0.38403097,-0.41592401,1.0000002,78.192026,-120.05314)"
|
||||||
|
cx="324.32715"
|
||||||
|
cy="131.40274"
|
||||||
|
fx="324.32715"
|
||||||
|
fy="131.40274"
|
||||||
|
r="25.501276" />
|
||||||
|
<linearGradient
|
||||||
|
id="linearGradient3600">
|
||||||
|
<stop
|
||||||
|
style="stop-color:#ffc13d;stop-opacity:1;"
|
||||||
|
offset="0"
|
||||||
|
id="stop3602" />
|
||||||
|
<stop
|
||||||
|
style="stop-color:#e09900;stop-opacity:1;"
|
||||||
|
offset="1"
|
||||||
|
id="stop3604" />
|
||||||
|
</linearGradient>
|
||||||
|
<radialGradient
|
||||||
|
r="25.501276"
|
||||||
|
fy="131.40274"
|
||||||
|
fx="324.32715"
|
||||||
|
cy="131.40274"
|
||||||
|
cx="324.32715"
|
||||||
|
gradientTransform="matrix(0.92332021,0.38403097,-0.41592401,1.0000002,78.192026,-120.05314)"
|
||||||
|
gradientUnits="userSpaceOnUse"
|
||||||
|
id="radialGradient5574"
|
||||||
|
xlink:href="#linearGradient3600"
|
||||||
|
inkscape:collect="always" />
|
||||||
|
<inkscape:perspective
|
||||||
|
id="perspective5663"
|
||||||
|
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
|
||||||
|
inkscape:vp_z="1 : 0.5 : 1"
|
||||||
|
inkscape:vp_y="0 : 1000 : 0"
|
||||||
|
inkscape:vp_x="0 : 0.5 : 1"
|
||||||
|
sodipodi:type="inkscape:persp3d" />
|
||||||
|
<radialGradient
|
||||||
|
inkscape:collect="always"
|
||||||
|
xlink:href="#linearGradient3600-7"
|
||||||
|
id="radialGradient3606-8"
|
||||||
|
cx="324.32715"
|
||||||
|
cy="131.40274"
|
||||||
|
fx="324.32715"
|
||||||
|
fy="131.40274"
|
||||||
|
r="25.501276"
|
||||||
|
gradientUnits="userSpaceOnUse"
|
||||||
|
gradientTransform="matrix(0.92332021,0.38403097,-0.41592401,1.0000002,78.192026,-120.05314)" />
|
||||||
|
<linearGradient
|
||||||
|
id="linearGradient3600-7">
|
||||||
|
<stop
|
||||||
|
style="stop-color:#ffc13d;stop-opacity:1;"
|
||||||
|
offset="0"
|
||||||
|
id="stop3602-7" />
|
||||||
|
<stop
|
||||||
|
style="stop-color:#e09900;stop-opacity:1;"
|
||||||
|
offset="1"
|
||||||
|
id="stop3604-6" />
|
||||||
|
</linearGradient>
|
||||||
|
<radialGradient
|
||||||
|
inkscape:collect="always"
|
||||||
|
xlink:href="#linearGradient3600-7"
|
||||||
|
id="radialGradient5254"
|
||||||
|
gradientUnits="userSpaceOnUse"
|
||||||
|
gradientTransform="matrix(0.92332021,0.38403097,-0.41592401,1.0000002,78.192026,-120.05314)"
|
||||||
|
cx="324.32715"
|
||||||
|
cy="131.40274"
|
||||||
|
fx="324.32715"
|
||||||
|
fy="131.40274"
|
||||||
|
r="25.501276" />
|
||||||
|
<linearGradient
|
||||||
|
inkscape:collect="always"
|
||||||
|
xlink:href="#linearGradient5189-1"
|
||||||
|
id="linearGradient5394"
|
||||||
|
gradientUnits="userSpaceOnUse"
|
||||||
|
x1="385.03503"
|
||||||
|
y1="180.09546"
|
||||||
|
x2="462.48297"
|
||||||
|
y2="180.09546"
|
||||||
|
gradientTransform="matrix(0.96839241,0,0,0.96839241,-360.365,847.52359)" />
|
||||||
|
<linearGradient
|
||||||
|
id="linearGradient5189-1">
|
||||||
|
<stop
|
||||||
|
style="stop-color:#000ec9;stop-opacity:1;"
|
||||||
|
offset="0"
|
||||||
|
id="stop5191-0" />
|
||||||
|
<stop
|
||||||
|
style="stop-color:#000657;stop-opacity:1;"
|
||||||
|
offset="1"
|
||||||
|
id="stop5193-4" />
|
||||||
|
</linearGradient>
|
||||||
|
<linearGradient
|
||||||
|
inkscape:collect="always"
|
||||||
|
xlink:href="#linearGradient5173-1"
|
||||||
|
id="linearGradient5581"
|
||||||
|
gradientUnits="userSpaceOnUse"
|
||||||
|
x1="167.33386"
|
||||||
|
y1="178.83276"
|
||||||
|
x2="244.78181"
|
||||||
|
y2="178.83276"
|
||||||
|
gradientTransform="matrix(0.96839241,0,0,0.96839241,-149.54484,848.74636)" />
|
||||||
|
<linearGradient
|
||||||
|
id="linearGradient5173-1">
|
||||||
|
<stop
|
||||||
|
style="stop-color:#f50000;stop-opacity:1;"
|
||||||
|
offset="0"
|
||||||
|
id="stop5175-5" />
|
||||||
|
<stop
|
||||||
|
style="stop-color:#950000;stop-opacity:1;"
|
||||||
|
offset="1"
|
||||||
|
id="stop5177-3" />
|
||||||
|
</linearGradient>
|
||||||
|
<linearGradient
|
||||||
|
inkscape:collect="always"
|
||||||
|
xlink:href="#linearGradient5181-9"
|
||||||
|
id="linearGradient5782"
|
||||||
|
gradientUnits="userSpaceOnUse"
|
||||||
|
x1="282.50455"
|
||||||
|
y1="181.61069"
|
||||||
|
x2="359.95248"
|
||||||
|
y2="181.61069"
|
||||||
|
gradientTransform="matrix(0.96839241,0,0,0.96839241,-261.07526,846.05625)" />
|
||||||
|
<linearGradient
|
||||||
|
id="linearGradient5181-9">
|
||||||
|
<stop
|
||||||
|
style="stop-color:#80d600;stop-opacity:1;"
|
||||||
|
offset="0"
|
||||||
|
id="stop5183-3" />
|
||||||
|
<stop
|
||||||
|
style="stop-color:#80d600;stop-opacity:1;"
|
||||||
|
offset="1"
|
||||||
|
id="stop5185-0" />
|
||||||
|
</linearGradient>
|
||||||
|
<linearGradient
|
||||||
|
y2="181.61069"
|
||||||
|
x2="359.95248"
|
||||||
|
y1="181.61069"
|
||||||
|
x1="282.50455"
|
||||||
|
gradientTransform="matrix(0.96839241,0,0,0.96839241,-175.71812,893.2775)"
|
||||||
|
gradientUnits="userSpaceOnUse"
|
||||||
|
id="linearGradient5799"
|
||||||
|
xlink:href="#linearGradient5181-9"
|
||||||
|
inkscape:collect="always" />
|
||||||
|
<linearGradient
|
||||||
|
inkscape:collect="always"
|
||||||
|
xlink:href="#linearGradient3419"
|
||||||
|
id="linearGradient3425"
|
||||||
|
x1="-126.90256"
|
||||||
|
y1="941.52618"
|
||||||
|
x2="-125.73831"
|
||||||
|
y2="984.13751"
|
||||||
|
gradientUnits="userSpaceOnUse"
|
||||||
|
gradientTransform="translate(154.2532,0.90556908)" />
|
||||||
|
</defs>
|
||||||
|
<sodipodi:namedview
|
||||||
|
inkscape:document-units="mm"
|
||||||
|
id="base"
|
||||||
|
pagecolor="#ffffff"
|
||||||
|
bordercolor="#666666"
|
||||||
|
borderopacity="1.0"
|
||||||
|
inkscape:pageopacity="0.0"
|
||||||
|
inkscape:pageshadow="2"
|
||||||
|
inkscape:zoom="4.2946338"
|
||||||
|
inkscape:cx="0.39222903"
|
||||||
|
inkscape:cy="65.175571"
|
||||||
|
inkscape:current-layer="layer1"
|
||||||
|
showgrid="false"
|
||||||
|
inkscape:window-width="1440"
|
||||||
|
inkscape:window-height="792"
|
||||||
|
inkscape:window-x="11"
|
||||||
|
inkscape:window-y="0"
|
||||||
|
inkscape:window-maximized="0" />
|
||||||
|
<metadata
|
||||||
|
id="metadata4">
|
||||||
|
<rdf:RDF>
|
||||||
|
<cc:Work
|
||||||
|
rdf:about="">
|
||||||
|
<dc:format>image/svg+xml</dc:format>
|
||||||
|
<dc:type
|
||||||
|
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||||
|
<dc:title></dc:title>
|
||||||
|
</cc:Work>
|
||||||
|
</rdf:RDF>
|
||||||
|
</metadata>
|
||||||
|
<g
|
||||||
|
inkscape:label="Layer 1"
|
||||||
|
inkscape:groupmode="layer"
|
||||||
|
id="layer1"
|
||||||
|
transform="translate(0,-952.36218)">
|
||||||
|
<path
|
||||||
|
style="fill-opacity:1;stroke:black;stroke-width:2.78220296;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
|
||||||
|
d="M 49.84375 1.71875 C 36.719738 1.71875 26.0625 12.375988 26.0625 25.5 C 26.0625 32.977454 29.538325 39.612734 34.9375 43.96875 C 24.439951 49.943698 17.919149 62.196126 14.3125 75.65625 C 9.0380874 95.34065 30.224013 98.21875 49.84375 98.21875 C 69.463486 98.21875 90.549327 94.96715 85.375 75.65625 C 81.693381 61.916246 75.224585 49.827177 64.8125 43.9375 C 70.181573 39.580662 73.59375 32.953205 73.59375 25.5 C 73.59375 12.375988 62.967762 1.71875 49.84375 1.71875 z "
|
||||||
|
transform="translate(0,952.36218)"
|
||||||
|
id="left" />
|
||||||
|
<path
|
||||||
|
sodipodi:type="star"
|
||||||
|
style="fill:url(#linearGradient3425);fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||||
|
id="star"
|
||||||
|
sodipodi:sides="5"
|
||||||
|
sodipodi:cx="27.80283"
|
||||||
|
sodipodi:cy="970.9433"
|
||||||
|
sodipodi:r1="17.189852"
|
||||||
|
sodipodi:r2="8.5949249"
|
||||||
|
sodipodi:arg1="0.9349579"
|
||||||
|
sodipodi:arg2="1.5632764"
|
||||||
|
inkscape:flatsided="false"
|
||||||
|
inkscape:rounded="0"
|
||||||
|
inkscape:randomized="0"
|
||||||
|
d="m 38.011063,984.77381 -10.143601,-5.23583 -10.063711,5.38779 1.845023,-11.2651 -8.233948,-7.90624 11.283888,-1.72639 4.974851,-10.27411 5.128803,10.19813 11.308575,1.55649 -8.114112,8.02918 z"
|
||||||
|
inkscape:transform-center-x="0.094945927"
|
||||||
|
inkscape:transform-center-y="-3.9764964"
|
||||||
|
transform="matrix(2.3768784,0,0,2.4799382,-16.393468,-1400.3733)" />
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 12 KiB |
131
cockatrice/resources/usericons/star_double.svg
Normal file
@@ -0,0 +1,131 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<svg
|
||||||
|
xmlns:osb="http://www.openswatchbook.org/uri/2009/osb"
|
||||||
|
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||||
|
xmlns:cc="http://creativecommons.org/ns#"
|
||||||
|
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||||
|
xmlns:svg="http://www.w3.org/2000/svg"
|
||||||
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||||
|
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||||
|
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||||
|
viewBox="0 0 64 64"
|
||||||
|
enable-background="new 0 0 64 64"
|
||||||
|
id="svg2"
|
||||||
|
version="1.1"
|
||||||
|
inkscape:version="0.48.5 r10040"
|
||||||
|
width="100%"
|
||||||
|
height="100%"
|
||||||
|
sodipodi:docname="moderator_buddy.svg">
|
||||||
|
<metadata
|
||||||
|
id="metadata12">
|
||||||
|
<rdf:RDF>
|
||||||
|
<cc:Work
|
||||||
|
rdf:about="">
|
||||||
|
<dc:format>image/svg+xml</dc:format>
|
||||||
|
<dc:type
|
||||||
|
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||||
|
</cc:Work>
|
||||||
|
</rdf:RDF>
|
||||||
|
</metadata>
|
||||||
|
<defs
|
||||||
|
id="defs10">
|
||||||
|
<linearGradient
|
||||||
|
id="linearGradient5225">
|
||||||
|
<stop
|
||||||
|
style="stop-color:#ffffff;stop-opacity:1;"
|
||||||
|
offset="0"
|
||||||
|
id="stop5227" />
|
||||||
|
<stop
|
||||||
|
style="stop-color:#ffffff;stop-opacity:0;"
|
||||||
|
offset="1"
|
||||||
|
id="stop5229" />
|
||||||
|
</linearGradient>
|
||||||
|
<linearGradient
|
||||||
|
id="linearGradient5219"
|
||||||
|
osb:paint="solid">
|
||||||
|
<stop
|
||||||
|
style="stop-color:#ffffff;stop-opacity:1;"
|
||||||
|
offset="0"
|
||||||
|
id="stop5221" />
|
||||||
|
</linearGradient>
|
||||||
|
<linearGradient
|
||||||
|
id="linearGradient3758">
|
||||||
|
<stop
|
||||||
|
id="stop3760"
|
||||||
|
offset="0"
|
||||||
|
style="stop-color:#0fbb00;stop-opacity:1;" />
|
||||||
|
<stop
|
||||||
|
id="stop3762"
|
||||||
|
offset="1"
|
||||||
|
style="stop-color:#064400;stop-opacity:1;" />
|
||||||
|
</linearGradient>
|
||||||
|
<linearGradient
|
||||||
|
id="linearGradient3750">
|
||||||
|
<stop
|
||||||
|
style="stop-color:#ece400;stop-opacity:1;"
|
||||||
|
offset="0"
|
||||||
|
id="stop3752" />
|
||||||
|
<stop
|
||||||
|
style="stop-color:#ece400;stop-opacity:0;"
|
||||||
|
offset="1"
|
||||||
|
id="stop3754" />
|
||||||
|
</linearGradient>
|
||||||
|
<linearGradient
|
||||||
|
inkscape:collect="always"
|
||||||
|
xlink:href="#linearGradient3758-7"
|
||||||
|
id="linearGradient3756-1"
|
||||||
|
x1="1.960216"
|
||||||
|
y1="31.261461"
|
||||||
|
x2="60.456024"
|
||||||
|
y2="31.261461"
|
||||||
|
gradientUnits="userSpaceOnUse" />
|
||||||
|
<linearGradient
|
||||||
|
id="linearGradient3758-7">
|
||||||
|
<stop
|
||||||
|
id="stop3760-4"
|
||||||
|
offset="0"
|
||||||
|
style="stop-color:#ece400;stop-opacity:1;" />
|
||||||
|
<stop
|
||||||
|
id="stop3762-0"
|
||||||
|
offset="1"
|
||||||
|
style="stop-color:#ec8b00;stop-opacity:1;" />
|
||||||
|
</linearGradient>
|
||||||
|
</defs>
|
||||||
|
<sodipodi:namedview
|
||||||
|
pagecolor="#ffffff"
|
||||||
|
bordercolor="#666666"
|
||||||
|
borderopacity="1"
|
||||||
|
objecttolerance="10"
|
||||||
|
gridtolerance="10"
|
||||||
|
guidetolerance="10"
|
||||||
|
inkscape:pageopacity="0"
|
||||||
|
inkscape:pageshadow="2"
|
||||||
|
inkscape:window-width="1920"
|
||||||
|
inkscape:window-height="1028"
|
||||||
|
id="namedview8"
|
||||||
|
showgrid="false"
|
||||||
|
inkscape:zoom="5.2149125"
|
||||||
|
inkscape:cx="-26.445493"
|
||||||
|
inkscape:cy="31.598459"
|
||||||
|
inkscape:window-x="-8"
|
||||||
|
inkscape:window-y="-8"
|
||||||
|
inkscape:window-maximized="1"
|
||||||
|
inkscape:current-layer="svg2" />
|
||||||
|
<path
|
||||||
|
d="M 61.442826,23.621762 38.532402,23.515555 31.556101,0.331013 24.578789,23.515555 1.6673502,23.621765 20.267785,38.422001 10.863888,63.668987 31.556101,47.626631 52.258426,63.668987 42.843404,38.422001 z"
|
||||||
|
id="outline"
|
||||||
|
style="fill:#000000;fill-opacity:1"
|
||||||
|
inkscape:connector-curvature="0" />
|
||||||
|
<path
|
||||||
|
d="M 55.041981,25.814432 36.921945,25.730432 31.404334,7.3935963 25.885923,25.730432 7.7650846,25.814434 22.476316,37.520057 15.0387,57.488097 31.404334,44.800071 47.777965,57.488097 40.331551,37.520057 z"
|
||||||
|
id="left"
|
||||||
|
style="fill-opacity:1;fill-rule:nonzero"
|
||||||
|
inkscape:connector-curvature="0" />
|
||||||
|
<path
|
||||||
|
d="M 56.276895,25.211993 37.3433,24.856806 31.486705,5.7742084 c 0.04705,37.4359336 -0.01851,2.6744908 -0.0678,40.1841446 L 48.19932,58.580578 40.956295,37.527792 z"
|
||||||
|
id="right"
|
||||||
|
style="fill-opacity:1;fill-rule:nonzero"
|
||||||
|
inkscape:connector-curvature="0"
|
||||||
|
sodipodi:nodetypes="ccccccc" />
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 4.1 KiB |
115
cockatrice/resources/usericons/star_single.svg
Normal file
@@ -0,0 +1,115 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<svg
|
||||||
|
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||||
|
xmlns:cc="http://creativecommons.org/ns#"
|
||||||
|
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||||
|
xmlns:svg="http://www.w3.org/2000/svg"
|
||||||
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||||
|
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||||
|
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||||
|
viewBox="0 0 64 64"
|
||||||
|
enable-background="new 0 0 64 64"
|
||||||
|
id="svg2"
|
||||||
|
version="1.1"
|
||||||
|
inkscape:version="0.48.5 r10040"
|
||||||
|
width="100%"
|
||||||
|
height="100%"
|
||||||
|
sodipodi:docname="registered_buddy.svg">
|
||||||
|
<metadata
|
||||||
|
id="metadata12">
|
||||||
|
<rdf:RDF>
|
||||||
|
<cc:Work
|
||||||
|
rdf:about="">
|
||||||
|
<dc:format>image/svg+xml</dc:format>
|
||||||
|
<dc:type
|
||||||
|
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||||
|
</cc:Work>
|
||||||
|
</rdf:RDF>
|
||||||
|
</metadata>
|
||||||
|
<defs
|
||||||
|
id="defs10">
|
||||||
|
<linearGradient
|
||||||
|
id="linearGradient3758">
|
||||||
|
<stop
|
||||||
|
id="stop3760"
|
||||||
|
offset="0"
|
||||||
|
style="stop-color:#80d600;stop-opacity:1;" />
|
||||||
|
<stop
|
||||||
|
id="stop3762"
|
||||||
|
offset="1"
|
||||||
|
style="stop-color:#80d600;stop-opacity:1;" />
|
||||||
|
</linearGradient>
|
||||||
|
<linearGradient
|
||||||
|
id="linearGradient3750">
|
||||||
|
<stop
|
||||||
|
style="stop-color:#ece400;stop-opacity:1;"
|
||||||
|
offset="0"
|
||||||
|
id="stop3752" />
|
||||||
|
<stop
|
||||||
|
style="stop-color:#ece400;stop-opacity:0;"
|
||||||
|
offset="1"
|
||||||
|
id="stop3754" />
|
||||||
|
</linearGradient>
|
||||||
|
<linearGradient
|
||||||
|
inkscape:collect="always"
|
||||||
|
xlink:href="#linearGradient3758"
|
||||||
|
id="linearGradient3756"
|
||||||
|
x1="1.960216"
|
||||||
|
y1="31.261461"
|
||||||
|
x2="60.456024"
|
||||||
|
y2="31.261461"
|
||||||
|
gradientUnits="userSpaceOnUse"
|
||||||
|
gradientTransform="matrix(0.87626222,0,0,0.87626222,4.174756,4.8555263)" />
|
||||||
|
<linearGradient
|
||||||
|
inkscape:collect="always"
|
||||||
|
xlink:href="#linearGradient3758-7"
|
||||||
|
id="linearGradient3756-1"
|
||||||
|
x1="1.960216"
|
||||||
|
y1="31.261461"
|
||||||
|
x2="60.456024"
|
||||||
|
y2="31.261461"
|
||||||
|
gradientUnits="userSpaceOnUse" />
|
||||||
|
<linearGradient
|
||||||
|
id="linearGradient3758-7">
|
||||||
|
<stop
|
||||||
|
id="stop3760-4"
|
||||||
|
offset="0"
|
||||||
|
style="stop-color:#ece400;stop-opacity:1;" />
|
||||||
|
<stop
|
||||||
|
id="stop3762-0"
|
||||||
|
offset="1"
|
||||||
|
style="stop-color:#ec8b00;stop-opacity:1;" />
|
||||||
|
</linearGradient>
|
||||||
|
</defs>
|
||||||
|
<sodipodi:namedview
|
||||||
|
pagecolor="#ffffff"
|
||||||
|
bordercolor="#666666"
|
||||||
|
borderopacity="1"
|
||||||
|
objecttolerance="10"
|
||||||
|
gridtolerance="10"
|
||||||
|
guidetolerance="10"
|
||||||
|
inkscape:pageopacity="0"
|
||||||
|
inkscape:pageshadow="2"
|
||||||
|
inkscape:window-width="1600"
|
||||||
|
inkscape:window-height="1178"
|
||||||
|
id="namedview8"
|
||||||
|
showgrid="false"
|
||||||
|
inkscape:zoom="7.375"
|
||||||
|
inkscape:cx="-11.596718"
|
||||||
|
inkscape:cy="34.975297"
|
||||||
|
inkscape:window-x="1912"
|
||||||
|
inkscape:window-y="-8"
|
||||||
|
inkscape:window-maximized="1"
|
||||||
|
inkscape:current-layer="svg2" />
|
||||||
|
<path
|
||||||
|
d="M 61.442826,23.621762 38.532402,23.515555 31.556101,0.331013 24.578789,23.515555 1.6673502,23.621765 20.267785,38.422001 10.863888,63.668987 31.556101,47.626631 52.258426,63.668987 42.843404,38.422001 z"
|
||||||
|
id="path4-9"
|
||||||
|
style="fill:#000000;fill-opacity:1"
|
||||||
|
inkscape:connector-curvature="0" />
|
||||||
|
<path
|
||||||
|
d="M 57.150089,25.064396 37.504323,24.973324 31.522122,5.092503 25.539054,24.973324 5.8924192,25.064399 21.842354,37.75565 13.778482,59.405024 31.522122,45.64865 49.274434,59.405024 41.201022,37.75565 z"
|
||||||
|
id="left"
|
||||||
|
style="fill-opacity:1"
|
||||||
|
inkscape:connector-curvature="0" />
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 3.6 KiB |
@@ -1,123 +0,0 @@
|
|||||||
#include "cardframe.h"
|
|
||||||
|
|
||||||
#include "cardinfopicture.h"
|
|
||||||
#include "cardinfotext.h"
|
|
||||||
#include "carditem.h"
|
|
||||||
#include "main.h"
|
|
||||||
#include "settingscache.h"
|
|
||||||
|
|
||||||
#include <QSplitter>
|
|
||||||
#include <QVBoxLayout>
|
|
||||||
#include <utility>
|
|
||||||
|
|
||||||
CardFrame::CardFrame(const QString &cardName, QWidget *parent) : QTabWidget(parent), info(nullptr), cardTextOnly(false)
|
|
||||||
{
|
|
||||||
setContentsMargins(3, 3, 3, 3);
|
|
||||||
pic = new CardInfoPicture();
|
|
||||||
pic->setObjectName("pic");
|
|
||||||
text = new CardInfoText();
|
|
||||||
text->setObjectName("text");
|
|
||||||
connect(text, SIGNAL(linkActivated(const QString &)), this, SLOT(setCard(const QString &)));
|
|
||||||
|
|
||||||
tab1 = new QWidget(this);
|
|
||||||
tab2 = new QWidget(this);
|
|
||||||
tab3 = new QWidget(this);
|
|
||||||
|
|
||||||
tab1->setObjectName("tab1");
|
|
||||||
tab2->setObjectName("tab2");
|
|
||||||
tab3->setObjectName("tab3");
|
|
||||||
|
|
||||||
insertTab(ImageOnlyView, tab1, QString());
|
|
||||||
insertTab(TextOnlyView, tab2, QString());
|
|
||||||
insertTab(ImageAndTextView, tab3, QString());
|
|
||||||
connect(this, SIGNAL(currentChanged(int)), this, SLOT(setViewMode(int)));
|
|
||||||
|
|
||||||
tab1Layout = new QVBoxLayout();
|
|
||||||
tab1Layout->setObjectName("tab1Layout");
|
|
||||||
tab1Layout->setContentsMargins(0, 0, 0, 0);
|
|
||||||
tab1Layout->setSpacing(0);
|
|
||||||
tab1->setLayout(tab1Layout);
|
|
||||||
|
|
||||||
tab2Layout = new QVBoxLayout();
|
|
||||||
tab2Layout->setObjectName("tab2Layout");
|
|
||||||
tab2Layout->setContentsMargins(0, 0, 0, 0);
|
|
||||||
tab2Layout->setSpacing(0);
|
|
||||||
tab2->setLayout(tab2Layout);
|
|
||||||
|
|
||||||
splitter = new QSplitter();
|
|
||||||
splitter->setObjectName("splitter");
|
|
||||||
splitter->setOrientation(Qt::Vertical);
|
|
||||||
|
|
||||||
tab3Layout = new QVBoxLayout();
|
|
||||||
tab3Layout->setObjectName("tab3Layout");
|
|
||||||
tab3Layout->setContentsMargins(0, 0, 0, 0);
|
|
||||||
tab3Layout->setSpacing(0);
|
|
||||||
tab3Layout->addWidget(splitter);
|
|
||||||
tab3->setLayout(tab3Layout);
|
|
||||||
|
|
||||||
setViewMode(SettingsCache::instance().getCardInfoViewMode());
|
|
||||||
|
|
||||||
setCard(db->getCard(cardName));
|
|
||||||
}
|
|
||||||
|
|
||||||
void CardFrame::retranslateUi()
|
|
||||||
{
|
|
||||||
setTabText(ImageOnlyView, tr("Image"));
|
|
||||||
setTabText(TextOnlyView, tr("Description"));
|
|
||||||
setTabText(ImageAndTextView, tr("Both"));
|
|
||||||
}
|
|
||||||
|
|
||||||
void CardFrame::setViewMode(int mode)
|
|
||||||
{
|
|
||||||
if (currentIndex() != mode)
|
|
||||||
setCurrentIndex(mode);
|
|
||||||
|
|
||||||
switch (mode) {
|
|
||||||
case ImageOnlyView:
|
|
||||||
case TextOnlyView:
|
|
||||||
tab1Layout->addWidget(pic);
|
|
||||||
tab2Layout->addWidget(text);
|
|
||||||
break;
|
|
||||||
case ImageAndTextView:
|
|
||||||
splitter->addWidget(pic);
|
|
||||||
splitter->addWidget(text);
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
SettingsCache::instance().setCardInfoViewMode(mode);
|
|
||||||
}
|
|
||||||
|
|
||||||
void CardFrame::setCard(CardInfoPtr card)
|
|
||||||
{
|
|
||||||
if (info) {
|
|
||||||
disconnect(info.data(), nullptr, this, nullptr);
|
|
||||||
}
|
|
||||||
|
|
||||||
info = std::move(card);
|
|
||||||
|
|
||||||
if (info) {
|
|
||||||
connect(info.data(), SIGNAL(destroyed()), this, SLOT(clearCard()));
|
|
||||||
}
|
|
||||||
|
|
||||||
text->setCard(info);
|
|
||||||
pic->setCard(info);
|
|
||||||
}
|
|
||||||
|
|
||||||
void CardFrame::setCard(const QString &cardName)
|
|
||||||
{
|
|
||||||
setCard(db->guessCard(cardName));
|
|
||||||
}
|
|
||||||
|
|
||||||
void CardFrame::setCard(AbstractCardItem *card)
|
|
||||||
{
|
|
||||||
if (card) {
|
|
||||||
setCard(card->getInfo());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void CardFrame::clearCard()
|
|
||||||
{
|
|
||||||
setCard((CardInfoPtr) nullptr);
|
|
||||||
}
|
|
||||||
@@ -1,60 +0,0 @@
|
|||||||
#include "cardinfopicture.h"
|
|
||||||
|
|
||||||
#include "carditem.h"
|
|
||||||
#include "main.h"
|
|
||||||
#include "pictureloader.h"
|
|
||||||
|
|
||||||
#include <QPainter>
|
|
||||||
#include <QStyle>
|
|
||||||
#include <QWidget>
|
|
||||||
|
|
||||||
CardInfoPicture::CardInfoPicture(QWidget *parent) : QWidget(parent), info(nullptr), pixmapDirty(true)
|
|
||||||
{
|
|
||||||
setMinimumHeight(100);
|
|
||||||
}
|
|
||||||
|
|
||||||
void CardInfoPicture::setCard(CardInfoPtr card)
|
|
||||||
{
|
|
||||||
if (info) {
|
|
||||||
disconnect(info.data(), nullptr, this, nullptr);
|
|
||||||
}
|
|
||||||
|
|
||||||
info = card;
|
|
||||||
|
|
||||||
if (info) {
|
|
||||||
connect(info.data(), SIGNAL(pixmapUpdated()), this, SLOT(updatePixmap()));
|
|
||||||
}
|
|
||||||
|
|
||||||
updatePixmap();
|
|
||||||
}
|
|
||||||
|
|
||||||
void CardInfoPicture::resizeEvent(QResizeEvent *)
|
|
||||||
{
|
|
||||||
updatePixmap();
|
|
||||||
}
|
|
||||||
|
|
||||||
void CardInfoPicture::updatePixmap()
|
|
||||||
{
|
|
||||||
pixmapDirty = true;
|
|
||||||
update();
|
|
||||||
}
|
|
||||||
|
|
||||||
void CardInfoPicture::loadPixmap()
|
|
||||||
{
|
|
||||||
if (info)
|
|
||||||
PictureLoader::getPixmap(resizedPixmap, info, size());
|
|
||||||
else
|
|
||||||
PictureLoader::getCardBackPixmap(resizedPixmap, size());
|
|
||||||
}
|
|
||||||
|
|
||||||
void CardInfoPicture::paintEvent(QPaintEvent *)
|
|
||||||
{
|
|
||||||
if (width() == 0 || height() == 0)
|
|
||||||
return;
|
|
||||||
|
|
||||||
if (pixmapDirty)
|
|
||||||
loadPixmap();
|
|
||||||
|
|
||||||
QPainter painter(this);
|
|
||||||
style()->drawItemPixmap(&painter, rect(), Qt::AlignHCenter, resizedPixmap);
|
|
||||||
}
|
|
||||||
@@ -1,31 +0,0 @@
|
|||||||
#ifndef CARDINFOPICTURE_H
|
|
||||||
#define CARDINFOPICTURE_H
|
|
||||||
|
|
||||||
#include "carddatabase.h"
|
|
||||||
|
|
||||||
#include <QWidget>
|
|
||||||
|
|
||||||
class AbstractCardItem;
|
|
||||||
|
|
||||||
class CardInfoPicture : public QWidget
|
|
||||||
{
|
|
||||||
Q_OBJECT
|
|
||||||
|
|
||||||
private:
|
|
||||||
CardInfoPtr info;
|
|
||||||
QPixmap resizedPixmap;
|
|
||||||
bool pixmapDirty;
|
|
||||||
|
|
||||||
public:
|
|
||||||
CardInfoPicture(QWidget *parent = nullptr);
|
|
||||||
|
|
||||||
protected:
|
|
||||||
void resizeEvent(QResizeEvent *event);
|
|
||||||
void paintEvent(QPaintEvent *);
|
|
||||||
void loadPixmap();
|
|
||||||
public slots:
|
|
||||||
void setCard(CardInfoPtr card);
|
|
||||||
void updatePixmap();
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif
|
|
||||||
@@ -1,36 +0,0 @@
|
|||||||
#ifndef CARDINFOWIDGET_H
|
|
||||||
#define CARDINFOWIDGET_H
|
|
||||||
|
|
||||||
#include "carddatabase.h"
|
|
||||||
|
|
||||||
#include <QComboBox>
|
|
||||||
#include <QFrame>
|
|
||||||
#include <QStringList>
|
|
||||||
|
|
||||||
class CardInfoPicture;
|
|
||||||
class CardInfoText;
|
|
||||||
class AbstractCardItem;
|
|
||||||
|
|
||||||
class CardInfoWidget : public QFrame
|
|
||||||
{
|
|
||||||
Q_OBJECT
|
|
||||||
|
|
||||||
private:
|
|
||||||
qreal aspectRatio;
|
|
||||||
CardInfoPtr info;
|
|
||||||
CardInfoPicture *pic;
|
|
||||||
CardInfoText *text;
|
|
||||||
|
|
||||||
public:
|
|
||||||
explicit CardInfoWidget(const QString &cardName, QWidget *parent = nullptr, Qt::WindowFlags f = {});
|
|
||||||
|
|
||||||
public slots:
|
|
||||||
void setCard(CardInfoPtr card);
|
|
||||||
void setCard(const QString &cardName);
|
|
||||||
void setCard(AbstractCardItem *card);
|
|
||||||
|
|
||||||
private slots:
|
|
||||||
void clear();
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif
|
|
||||||
@@ -1,63 +0,0 @@
|
|||||||
#include "cardlist.h"
|
|
||||||
|
|
||||||
#include "carddatabase.h"
|
|
||||||
#include "carditem.h"
|
|
||||||
|
|
||||||
#include <algorithm>
|
|
||||||
|
|
||||||
CardList::CardList(bool _contentsKnown) : QList<CardItem *>(), contentsKnown(_contentsKnown)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
CardItem *CardList::findCard(const int id, const bool remove, int *position)
|
|
||||||
{
|
|
||||||
if (!contentsKnown) {
|
|
||||||
if (empty())
|
|
||||||
return 0;
|
|
||||||
CardItem *temp = at(0);
|
|
||||||
if (remove)
|
|
||||||
removeAt(0);
|
|
||||||
if (position)
|
|
||||||
*position = id;
|
|
||||||
return temp;
|
|
||||||
} else
|
|
||||||
for (int i = 0; i < size(); i++) {
|
|
||||||
CardItem *temp = at(i);
|
|
||||||
if (temp->getId() == id) {
|
|
||||||
if (remove)
|
|
||||||
removeAt(i);
|
|
||||||
if (position)
|
|
||||||
*position = i;
|
|
||||||
return temp;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
class CardList::compareFunctor
|
|
||||||
{
|
|
||||||
private:
|
|
||||||
int flags;
|
|
||||||
|
|
||||||
public:
|
|
||||||
explicit compareFunctor(int _flags) : flags(_flags)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
inline bool operator()(CardItem *a, CardItem *b) const
|
|
||||||
{
|
|
||||||
if (flags & SortByType) {
|
|
||||||
QString t1 = a->getInfo() ? a->getInfo()->getMainCardType() : QString();
|
|
||||||
QString t2 = b->getInfo() ? b->getInfo()->getMainCardType() : QString();
|
|
||||||
if ((t1 == t2) && (flags & SortByName))
|
|
||||||
return a->getName() < b->getName();
|
|
||||||
return t1 < t2;
|
|
||||||
} else
|
|
||||||
return a->getName() < b->getName();
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
void CardList::sort(int flags)
|
|
||||||
{
|
|
||||||
compareFunctor cf(flags);
|
|
||||||
std::sort(begin(), end(), cf);
|
|
||||||
}
|
|
||||||
@@ -1,31 +0,0 @@
|
|||||||
#ifndef CARDLIST_H
|
|
||||||
#define CARDLIST_H
|
|
||||||
|
|
||||||
#include <QList>
|
|
||||||
|
|
||||||
class CardItem;
|
|
||||||
|
|
||||||
class CardList : public QList<CardItem *>
|
|
||||||
{
|
|
||||||
private:
|
|
||||||
class compareFunctor;
|
|
||||||
|
|
||||||
protected:
|
|
||||||
bool contentsKnown;
|
|
||||||
|
|
||||||
public:
|
|
||||||
enum SortFlags
|
|
||||||
{
|
|
||||||
SortByName = 1,
|
|
||||||
SortByType = 2
|
|
||||||
};
|
|
||||||
CardList(bool _contentsKnown);
|
|
||||||
CardItem *findCard(const int id, const bool remove, int *position = NULL);
|
|
||||||
bool getContentsKnown() const
|
|
||||||
{
|
|
||||||
return contentsKnown;
|
|
||||||
}
|
|
||||||
void sort(int flags = SortByName);
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif
|
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
#include "abstractclient.h"
|
#include "abstract_client.h"
|
||||||
|
|
||||||
#include "client_metatypes.h"
|
#include "../../server/pending_command.h"
|
||||||
#include "featureset.h"
|
#include "featureset.h"
|
||||||
#include "get_pb_extension.h"
|
#include "get_pb_extension.h"
|
||||||
#include "pb/commands.pb.h"
|
#include "pb/commands.pb.h"
|
||||||
@@ -18,7 +18,6 @@
|
|||||||
#include "pb/event_user_left.pb.h"
|
#include "pb/event_user_left.pb.h"
|
||||||
#include "pb/event_user_message.pb.h"
|
#include "pb/event_user_message.pb.h"
|
||||||
#include "pb/server_message.pb.h"
|
#include "pb/server_message.pb.h"
|
||||||
#include "pending_command.h"
|
|
||||||
|
|
||||||
#include <google/protobuf/descriptor.h>
|
#include <google/protobuf/descriptor.h>
|
||||||
|
|
||||||
@@ -53,7 +52,7 @@ AbstractClient::AbstractClient(QObject *parent)
|
|||||||
FeatureSet features;
|
FeatureSet features;
|
||||||
features.initalizeFeatureList(clientFeatures);
|
features.initalizeFeatureList(clientFeatures);
|
||||||
|
|
||||||
connect(this, SIGNAL(sigQueuePendingCommand(PendingCommand *)), this, SLOT(queuePendingCommand(PendingCommand *)));
|
connect(this, &AbstractClient::sigQueuePendingCommand, this, &AbstractClient::queuePendingCommand);
|
||||||
}
|
}
|
||||||
|
|
||||||
AbstractClient::~AbstractClient()
|
AbstractClient::~AbstractClient()
|
||||||
@@ -48,6 +48,7 @@ class AbstractClient : public QObject
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
signals:
|
signals:
|
||||||
void statusChanged(ClientStatus _status);
|
void statusChanged(ClientStatus _status);
|
||||||
|
void maxPingTime(int seconds, int maxSeconds);
|
||||||
|
|
||||||
// Room events
|
// Room events
|
||||||
void roomEventReceived(const RoomEvent &event);
|
void roomEventReceived(const RoomEvent &event);
|
||||||
@@ -97,8 +98,8 @@ protected:
|
|||||||
virtual void sendCommandContainer(const CommandContainer &cont) = 0;
|
virtual void sendCommandContainer(const CommandContainer &cont) = 0;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
AbstractClient(QObject *parent = nullptr);
|
explicit AbstractClient(QObject *parent = nullptr);
|
||||||
~AbstractClient();
|
~AbstractClient() override;
|
||||||
|
|
||||||
ClientStatus getStatus() const
|
ClientStatus getStatus() const
|
||||||
{
|
{
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
#include "keysignals.h"
|
#include "key_signals.h"
|
||||||
|
|
||||||
#include <QKeyEvent>
|
#include <QKeyEvent>
|
||||||
|
|
||||||
@@ -60,6 +60,11 @@ bool KeySignals::eventFilter(QObject * /*object*/, QEvent *event)
|
|||||||
if (kevent->modifiers() & Qt::ShiftModifier)
|
if (kevent->modifiers() & Qt::ShiftModifier)
|
||||||
emit onShiftS();
|
emit onShiftS();
|
||||||
|
|
||||||
|
break;
|
||||||
|
case Qt::Key_C:
|
||||||
|
if (kevent->modifiers() & Qt::ControlModifier)
|
||||||
|
emit onCtrlC();
|
||||||
|
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
return false;
|
return false;
|
||||||
@@ -20,9 +20,10 @@ signals:
|
|||||||
void onCtrlAltLBracket();
|
void onCtrlAltLBracket();
|
||||||
void onCtrlAltRBracket();
|
void onCtrlAltRBracket();
|
||||||
void onShiftS();
|
void onShiftS();
|
||||||
|
void onCtrlC();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual bool eventFilter(QObject *, QEvent *event);
|
bool eventFilter(QObject *, QEvent *event) override;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
#include "gettextwithmax.h"
|
#include "get_text_with_max.h"
|
||||||
|
|
||||||
QString getTextWithMax(QWidget *parent,
|
QString getTextWithMax(QWidget *parent,
|
||||||
const QString &title,
|
const QString &title,
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
#ifndef GETTEXTWITHMAX_H
|
#ifndef GETTEXTWITHMAX_H
|
||||||
#define GETTEXTWITHMAX_H
|
#define GETTEXTWITHMAX_H
|
||||||
|
|
||||||
#include "stringsizes.h"
|
#include "trice_limits.h"
|
||||||
|
|
||||||
#include <QInputDialog>
|
#include <QInputDialog>
|
||||||
|
|
||||||
35
cockatrice/src/client/network/client_update_checker.cpp
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
#include "client_update_checker.h"
|
||||||
|
|
||||||
|
#include "../../settings/cache_settings.h"
|
||||||
|
#include "release_channel.h"
|
||||||
|
|
||||||
|
ClientUpdateChecker::ClientUpdateChecker(QObject *parent) : QObject(parent)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
void ClientUpdateChecker::check()
|
||||||
|
{
|
||||||
|
auto releaseChannel = SettingsCache::instance().getUpdateReleaseChannel();
|
||||||
|
|
||||||
|
finishedCheckConnection =
|
||||||
|
connect(releaseChannel, &ReleaseChannel::finishedCheck, this, &ClientUpdateChecker::actFinishedCheck);
|
||||||
|
errorConnection = connect(releaseChannel, &ReleaseChannel::error, this, &ClientUpdateChecker::actError);
|
||||||
|
|
||||||
|
releaseChannel->checkForUpdates();
|
||||||
|
}
|
||||||
|
|
||||||
|
void ClientUpdateChecker::actFinishedCheck(bool needToUpdate, bool isCompatible, Release *release)
|
||||||
|
{
|
||||||
|
disconnect(finishedCheckConnection);
|
||||||
|
disconnect(errorConnection);
|
||||||
|
|
||||||
|
emit finishedCheck(needToUpdate, isCompatible, release);
|
||||||
|
}
|
||||||
|
|
||||||
|
void ClientUpdateChecker::actError(const QString &errorString)
|
||||||
|
{
|
||||||
|
disconnect(finishedCheckConnection);
|
||||||
|
disconnect(errorConnection);
|
||||||
|
|
||||||
|
emit error(errorString);
|
||||||
|
}
|
||||||
45
cockatrice/src/client/network/client_update_checker.h
Normal file
@@ -0,0 +1,45 @@
|
|||||||
|
#ifndef CLIENT_UPDATE_CHECKER_H
|
||||||
|
#define CLIENT_UPDATE_CHECKER_H
|
||||||
|
#include <QObject>
|
||||||
|
|
||||||
|
class Release;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* We use a singleton instance of UpdateChannel, which can cause interference and feedback loops when multiple objects
|
||||||
|
* connect to it.
|
||||||
|
*
|
||||||
|
* This class encapsulates the usage of that UpdateChannel to ensure that the check only happens once per connection and
|
||||||
|
* the connection is destroyed after it's been used.
|
||||||
|
*/
|
||||||
|
class ClientUpdateChecker : public QObject
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
|
||||||
|
QMetaObject::Connection finishedCheckConnection;
|
||||||
|
QMetaObject::Connection errorConnection;
|
||||||
|
|
||||||
|
void actFinishedCheck(bool needToUpdate, bool isCompatible, Release *release);
|
||||||
|
void actError(const QString &errorString);
|
||||||
|
|
||||||
|
public:
|
||||||
|
explicit ClientUpdateChecker(QObject *parent = nullptr);
|
||||||
|
/**
|
||||||
|
* Actually performs the check, using the currently selected update channel in the settings.
|
||||||
|
* Any resulting signals will only be sent once.
|
||||||
|
* This method should only be called ONCE per instance.
|
||||||
|
*/
|
||||||
|
void check();
|
||||||
|
|
||||||
|
signals:
|
||||||
|
/**
|
||||||
|
* Forwarded from UpdateChannel::finishedCheck
|
||||||
|
*/
|
||||||
|
void finishedCheck(bool needToUpdate, bool isCompatible, Release *release);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Forwarded from UpdateChannel::error
|
||||||
|
*/
|
||||||
|
void error(const QString &errorString);
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // CLIENT_UPDATE_CHECKER_H
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
#include "releasechannel.h"
|
#include "release_channel.h"
|
||||||
|
|
||||||
#include "version_string.h"
|
#include "version_string.h"
|
||||||
|
|
||||||
@@ -21,11 +21,8 @@
|
|||||||
|
|
||||||
#define GIT_SHORT_HASH_LEN 7
|
#define GIT_SHORT_HASH_LEN 7
|
||||||
|
|
||||||
int ReleaseChannel::sharedIndex = 0;
|
|
||||||
|
|
||||||
ReleaseChannel::ReleaseChannel() : netMan(new QNetworkAccessManager(this)), response(nullptr), lastRelease(nullptr)
|
ReleaseChannel::ReleaseChannel() : netMan(new QNetworkAccessManager(this)), response(nullptr), lastRelease(nullptr)
|
||||||
{
|
{
|
||||||
index = sharedIndex++;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ReleaseChannel::~ReleaseChannel()
|
ReleaseChannel::~ReleaseChannel()
|
||||||
@@ -36,13 +33,13 @@ ReleaseChannel::~ReleaseChannel()
|
|||||||
void ReleaseChannel::checkForUpdates()
|
void ReleaseChannel::checkForUpdates()
|
||||||
{
|
{
|
||||||
QString releaseChannelUrl = getReleaseChannelUrl();
|
QString releaseChannelUrl = getReleaseChannelUrl();
|
||||||
qDebug() << "Searching for updates on the channel: " << releaseChannelUrl;
|
qCDebug(ReleaseChannelLog) << "Searching for updates on the channel: " << releaseChannelUrl;
|
||||||
response = netMan->get(QNetworkRequest(releaseChannelUrl));
|
response = netMan->get(QNetworkRequest(releaseChannelUrl));
|
||||||
connect(response, SIGNAL(finished()), this, SLOT(releaseListFinished()));
|
connect(response, &QNetworkReply::finished, this, &ReleaseChannel::releaseListFinished);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Different release channel checking functions for different operating systems
|
// Different release channel checking functions for different operating systems
|
||||||
#if defined(Q_OS_OSX)
|
#if defined(Q_OS_MACOS)
|
||||||
bool ReleaseChannel::downloadMatchesCurrentOS(const QString &fileName)
|
bool ReleaseChannel::downloadMatchesCurrentOS(const QString &fileName)
|
||||||
{
|
{
|
||||||
static QRegularExpression version_regex("macOS-(\\d+)\\.(\\d+)");
|
static QRegularExpression version_regex("macOS-(\\d+)\\.(\\d+)");
|
||||||
@@ -62,9 +59,14 @@ bool ReleaseChannel::downloadMatchesCurrentOS(const QString &fileName)
|
|||||||
bool ReleaseChannel::downloadMatchesCurrentOS(const QString &fileName)
|
bool ReleaseChannel::downloadMatchesCurrentOS(const QString &fileName)
|
||||||
{
|
{
|
||||||
#if Q_PROCESSOR_WORDSIZE == 4
|
#if Q_PROCESSOR_WORDSIZE == 4
|
||||||
return fileName.contains("win32");
|
return fileName.contains("32bit");
|
||||||
#elif Q_PROCESSOR_WORDSIZE == 8
|
#elif Q_PROCESSOR_WORDSIZE == 8
|
||||||
return fileName.contains("win64");
|
const QString &version = QSysInfo::productVersion();
|
||||||
|
if (version.startsWith("7") || version.startsWith("8")) {
|
||||||
|
return fileName.contains("Win7");
|
||||||
|
} else {
|
||||||
|
return fileName.contains("Win10");
|
||||||
|
}
|
||||||
#else
|
#else
|
||||||
return false;
|
return false;
|
||||||
#endif
|
#endif
|
||||||
@@ -84,7 +86,7 @@ QString StableReleaseChannel::getManualDownloadUrl() const
|
|||||||
|
|
||||||
QString StableReleaseChannel::getName() const
|
QString StableReleaseChannel::getName() const
|
||||||
{
|
{
|
||||||
return tr("Stable Releases");
|
return tr("Default");
|
||||||
}
|
}
|
||||||
|
|
||||||
QString StableReleaseChannel::getReleaseChannelUrl() const
|
QString StableReleaseChannel::getReleaseChannelUrl() const
|
||||||
@@ -107,7 +109,7 @@ void StableReleaseChannel::releaseListFinished()
|
|||||||
QVariantMap resultMap = jsonResponse.toVariant().toMap();
|
QVariantMap resultMap = jsonResponse.toVariant().toMap();
|
||||||
if (!(resultMap.contains("name") && resultMap.contains("html_url") && resultMap.contains("tag_name") &&
|
if (!(resultMap.contains("name") && resultMap.contains("html_url") && resultMap.contains("tag_name") &&
|
||||||
resultMap.contains("published_at"))) {
|
resultMap.contains("published_at"))) {
|
||||||
qWarning() << "Invalid received from the release update server.";
|
qWarning() << "Invalid received from the release update server:" << resultMap;
|
||||||
emit error(tr("Invalid reply received from the release update server."));
|
emit error(tr("Invalid reply received from the release update server."));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -143,17 +145,17 @@ void StableReleaseChannel::releaseListFinished()
|
|||||||
|
|
||||||
QString shortHash = lastRelease->getCommitHash().left(GIT_SHORT_HASH_LEN);
|
QString shortHash = lastRelease->getCommitHash().left(GIT_SHORT_HASH_LEN);
|
||||||
QString myHash = QString(VERSION_COMMIT);
|
QString myHash = QString(VERSION_COMMIT);
|
||||||
qDebug() << "Current hash=" << myHash << "update hash=" << shortHash;
|
qCDebug(ReleaseChannelLog) << "Current hash=" << myHash << "update hash=" << shortHash;
|
||||||
|
|
||||||
qDebug() << "Got reply from release server, name=" << lastRelease->getName()
|
qCDebug(ReleaseChannelLog) << "Got reply from release server, name=" << lastRelease->getName()
|
||||||
<< "desc=" << lastRelease->getDescriptionUrl() << "date=" << lastRelease->getPublishDate()
|
<< "desc=" << lastRelease->getDescriptionUrl()
|
||||||
<< "url=" << lastRelease->getDownloadUrl();
|
<< "date=" << lastRelease->getPublishDate() << "url=" << lastRelease->getDownloadUrl();
|
||||||
|
|
||||||
const QString &tagName = resultMap["tag_name"].toString();
|
const QString &tagName = resultMap["tag_name"].toString();
|
||||||
QString url = QString(STABLETAG_URL) + tagName;
|
QString url = QString(STABLETAG_URL) + tagName;
|
||||||
qDebug() << "Searching for commit hash corresponding to stable channel tag: " << tagName;
|
qCDebug(ReleaseChannelLog) << "Searching for commit hash corresponding to stable channel tag: " << tagName;
|
||||||
response = netMan->get(QNetworkRequest(url));
|
response = netMan->get(QNetworkRequest(url));
|
||||||
connect(response, SIGNAL(finished()), this, SLOT(tagListFinished()));
|
connect(response, &QNetworkReply::finished, this, &StableReleaseChannel::tagListFinished);
|
||||||
}
|
}
|
||||||
|
|
||||||
void StableReleaseChannel::tagListFinished()
|
void StableReleaseChannel::tagListFinished()
|
||||||
@@ -176,11 +178,11 @@ void StableReleaseChannel::tagListFinished()
|
|||||||
}
|
}
|
||||||
|
|
||||||
lastRelease->setCommitHash(resultMap["object"].toMap()["sha"].toString());
|
lastRelease->setCommitHash(resultMap["object"].toMap()["sha"].toString());
|
||||||
qDebug() << "Got reply from tag server, commit=" << lastRelease->getCommitHash();
|
qCDebug(ReleaseChannelLog) << "Got reply from tag server, commit=" << lastRelease->getCommitHash();
|
||||||
|
|
||||||
QString shortHash = lastRelease->getCommitHash().left(GIT_SHORT_HASH_LEN);
|
QString shortHash = lastRelease->getCommitHash().left(GIT_SHORT_HASH_LEN);
|
||||||
QString myHash = QString(VERSION_COMMIT);
|
QString myHash = QString(VERSION_COMMIT);
|
||||||
qDebug() << "Current hash=" << myHash << "update hash=" << shortHash;
|
qCDebug(ReleaseChannelLog) << "Current hash=" << myHash << "update hash=" << shortHash;
|
||||||
const bool needToUpdate = (QString::compare(shortHash, myHash, Qt::CaseInsensitive) != 0);
|
const bool needToUpdate = (QString::compare(shortHash, myHash, Qt::CaseInsensitive) != 0);
|
||||||
|
|
||||||
emit finishedCheck(needToUpdate, lastRelease->isCompatibleVersionFound(), lastRelease);
|
emit finishedCheck(needToUpdate, lastRelease->isCompatibleVersionFound(), lastRelease);
|
||||||
@@ -198,7 +200,7 @@ QString BetaReleaseChannel::getManualDownloadUrl() const
|
|||||||
|
|
||||||
QString BetaReleaseChannel::getName() const
|
QString BetaReleaseChannel::getName() const
|
||||||
{
|
{
|
||||||
return tr("Beta Releases");
|
return tr("Beta");
|
||||||
}
|
}
|
||||||
|
|
||||||
QString BetaReleaseChannel::getReleaseChannelUrl() const
|
QString BetaReleaseChannel::getReleaseChannelUrl() const
|
||||||
@@ -247,15 +249,15 @@ void BetaReleaseChannel::releaseListFinished()
|
|||||||
lastRelease->setName(QString("%1 (%2)").arg(resultMap["tag_name"].toString()).arg(shortHash));
|
lastRelease->setName(QString("%1 (%2)").arg(resultMap["tag_name"].toString()).arg(shortHash));
|
||||||
lastRelease->setDescriptionUrl(QString(BETARELEASE_CHANGESURL).arg(VERSION_COMMIT, shortHash));
|
lastRelease->setDescriptionUrl(QString(BETARELEASE_CHANGESURL).arg(VERSION_COMMIT, shortHash));
|
||||||
|
|
||||||
qDebug() << "Got reply from release server, size=" << resultMap.size() << "name=" << lastRelease->getName()
|
qCDebug(ReleaseChannelLog) << "Got reply from release server, size=" << resultMap.size()
|
||||||
<< "desc=" << lastRelease->getDescriptionUrl() << "commit=" << lastRelease->getCommitHash()
|
<< "name=" << lastRelease->getName() << "desc=" << lastRelease->getDescriptionUrl()
|
||||||
<< "date=" << lastRelease->getPublishDate();
|
<< "commit=" << lastRelease->getCommitHash() << "date=" << lastRelease->getPublishDate();
|
||||||
|
|
||||||
QString betaBuildDownloadUrl = resultMap["assets_url"].toString();
|
QString betaBuildDownloadUrl = resultMap["assets_url"].toString();
|
||||||
|
|
||||||
qDebug() << "Searching for a corresponding file on the beta channel: " << betaBuildDownloadUrl;
|
qCDebug(ReleaseChannelLog) << "Searching for a corresponding file on the beta channel: " << betaBuildDownloadUrl;
|
||||||
response = netMan->get(QNetworkRequest(betaBuildDownloadUrl));
|
response = netMan->get(QNetworkRequest(betaBuildDownloadUrl));
|
||||||
connect(response, SIGNAL(finished()), this, SLOT(fileListFinished()));
|
connect(response, &QNetworkReply::finished, this, &BetaReleaseChannel::fileListFinished);
|
||||||
}
|
}
|
||||||
|
|
||||||
void BetaReleaseChannel::fileListFinished()
|
void BetaReleaseChannel::fileListFinished()
|
||||||
@@ -273,7 +275,7 @@ void BetaReleaseChannel::fileListFinished()
|
|||||||
QVariantList resultList = jsonResponse.toVariant().toList();
|
QVariantList resultList = jsonResponse.toVariant().toList();
|
||||||
QString shortHash = lastRelease->getCommitHash().left(GIT_SHORT_HASH_LEN);
|
QString shortHash = lastRelease->getCommitHash().left(GIT_SHORT_HASH_LEN);
|
||||||
QString myHash = QString(VERSION_COMMIT);
|
QString myHash = QString(VERSION_COMMIT);
|
||||||
qDebug() << "Current hash=" << myHash << "update hash=" << shortHash;
|
qCDebug(ReleaseChannelLog) << "Current hash=" << myHash << "update hash=" << shortHash;
|
||||||
|
|
||||||
bool needToUpdate = (QString::compare(shortHash, myHash, Qt::CaseInsensitive) != 0);
|
bool needToUpdate = (QString::compare(shortHash, myHash, Qt::CaseInsensitive) != 0);
|
||||||
bool compatibleVersion = false;
|
bool compatibleVersion = false;
|
||||||
@@ -290,7 +292,7 @@ void BetaReleaseChannel::fileListFinished()
|
|||||||
if (downloadMatchesCurrentOS(*url)) {
|
if (downloadMatchesCurrentOS(*url)) {
|
||||||
compatibleVersion = true;
|
compatibleVersion = true;
|
||||||
lastRelease->setDownloadUrl(*url);
|
lastRelease->setDownloadUrl(*url);
|
||||||
qDebug() << "Found compatible version url=" << *url;
|
qCDebug(ReleaseChannelLog) << "Found compatible version url=" << *url;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -2,11 +2,14 @@
|
|||||||
#define RELEASECHANNEL_H
|
#define RELEASECHANNEL_H
|
||||||
|
|
||||||
#include <QDate>
|
#include <QDate>
|
||||||
|
#include <QLoggingCategory>
|
||||||
#include <QObject>
|
#include <QObject>
|
||||||
#include <QString>
|
#include <QString>
|
||||||
#include <QVariantMap>
|
#include <QVariantMap>
|
||||||
#include <utility>
|
#include <utility>
|
||||||
|
|
||||||
|
inline Q_LOGGING_CATEGORY(ReleaseChannelLog, "release_channel");
|
||||||
|
|
||||||
class QNetworkReply;
|
class QNetworkReply;
|
||||||
class QNetworkAccessManager;
|
class QNetworkAccessManager;
|
||||||
|
|
||||||
@@ -82,9 +85,6 @@ public:
|
|||||||
~ReleaseChannel() override;
|
~ReleaseChannel() override;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
// shared by all instances
|
|
||||||
static int sharedIndex;
|
|
||||||
int index;
|
|
||||||
QNetworkAccessManager *netMan;
|
QNetworkAccessManager *netMan;
|
||||||
QNetworkReply *response;
|
QNetworkReply *response;
|
||||||
Release *lastRelease;
|
Release *lastRelease;
|
||||||
@@ -94,10 +94,6 @@ protected:
|
|||||||
virtual QString getReleaseChannelUrl() const = 0;
|
virtual QString getReleaseChannelUrl() const = 0;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
int getIndex() const
|
|
||||||
{
|
|
||||||
return index;
|
|
||||||
}
|
|
||||||
Release *getLastRelease()
|
Release *getLastRelease()
|
||||||
{
|
{
|
||||||
return lastRelease;
|
return lastRelease;
|
||||||
193
cockatrice/src/client/network/replay_timeline_widget.cpp
Normal file
@@ -0,0 +1,193 @@
|
|||||||
|
#include "replay_timeline_widget.h"
|
||||||
|
|
||||||
|
#include <QPainter>
|
||||||
|
#include <QPainterPath>
|
||||||
|
#include <QPalette>
|
||||||
|
#include <QTimer>
|
||||||
|
|
||||||
|
ReplayTimelineWidget::ReplayTimelineWidget(QWidget *parent)
|
||||||
|
: QWidget(parent), maxBinValue(1), maxTime(1), timeScaleFactor(1.0), currentVisualTime(0), currentProcessedTime(0),
|
||||||
|
currentEvent(0)
|
||||||
|
{
|
||||||
|
replayTimer = new QTimer(this);
|
||||||
|
connect(replayTimer, &QTimer::timeout, this, &ReplayTimelineWidget::replayTimerTimeout);
|
||||||
|
|
||||||
|
rewindBufferingTimer = new QTimer(this);
|
||||||
|
rewindBufferingTimer->setSingleShot(true);
|
||||||
|
connect(rewindBufferingTimer, &QTimer::timeout, this, &ReplayTimelineWidget::processRewind);
|
||||||
|
}
|
||||||
|
|
||||||
|
void ReplayTimelineWidget::setTimeline(const QList<int> &_replayTimeline)
|
||||||
|
{
|
||||||
|
replayTimeline = _replayTimeline;
|
||||||
|
histogram.clear();
|
||||||
|
int binEndTime = BIN_LENGTH - 1;
|
||||||
|
int binValue = 0;
|
||||||
|
for (int i : replayTimeline) {
|
||||||
|
if (i > binEndTime) {
|
||||||
|
histogram.append(binValue);
|
||||||
|
if (binValue > maxBinValue)
|
||||||
|
maxBinValue = binValue;
|
||||||
|
while (i > binEndTime + BIN_LENGTH) {
|
||||||
|
histogram.append(0);
|
||||||
|
binEndTime += BIN_LENGTH;
|
||||||
|
}
|
||||||
|
binValue = 1;
|
||||||
|
binEndTime += BIN_LENGTH;
|
||||||
|
} else
|
||||||
|
++binValue;
|
||||||
|
}
|
||||||
|
histogram.append(binValue);
|
||||||
|
if (!replayTimeline.isEmpty())
|
||||||
|
maxTime = replayTimeline.last();
|
||||||
|
|
||||||
|
update();
|
||||||
|
}
|
||||||
|
|
||||||
|
void ReplayTimelineWidget::paintEvent(QPaintEvent * /* event */)
|
||||||
|
{
|
||||||
|
QPainter painter(this);
|
||||||
|
painter.drawRect(0, 0, width() - 1, height() - 1);
|
||||||
|
|
||||||
|
qreal binWidth = (qreal)width() / histogram.size();
|
||||||
|
QPainterPath path;
|
||||||
|
path.moveTo(0, height() - 1);
|
||||||
|
for (int i = 0; i < histogram.size(); ++i)
|
||||||
|
path.lineTo(qRound(i * binWidth), (height() - 1) * (1.0 - (qreal)histogram[i] / maxBinValue));
|
||||||
|
path.lineTo(width() - 1, height() - 1);
|
||||||
|
path.lineTo(0, height() - 1);
|
||||||
|
painter.fillPath(path, Qt::black);
|
||||||
|
|
||||||
|
const QColor barColor = QColor::fromHsv(120, 255, 255, 100);
|
||||||
|
quint64 w = (quint64)(width() - 1) * (quint64)currentVisualTime / maxTime;
|
||||||
|
painter.fillRect(0, 0, static_cast<int>(w), height() - 1, barColor);
|
||||||
|
}
|
||||||
|
|
||||||
|
void ReplayTimelineWidget::mousePressEvent(QMouseEvent *event)
|
||||||
|
{
|
||||||
|
#if (QT_VERSION >= QT_VERSION_CHECK(6, 0, 0))
|
||||||
|
int newTime = static_cast<int>((qint64)maxTime * (qint64)event->position().x() / width());
|
||||||
|
#else
|
||||||
|
int newTime = static_cast<int>((qint64)maxTime * (qint64)event->x() / width());
|
||||||
|
#endif
|
||||||
|
// don't buffer rewinds from clicks, since clicks usually don't happen fast enough to require buffering
|
||||||
|
skipToTime(newTime, false);
|
||||||
|
}
|
||||||
|
|
||||||
|
void ReplayTimelineWidget::skipToTime(int newTime, bool doRewindBuffering)
|
||||||
|
{
|
||||||
|
// check boundary conditions
|
||||||
|
if (newTime < 0) {
|
||||||
|
newTime = 0;
|
||||||
|
}
|
||||||
|
if (newTime > maxTime) {
|
||||||
|
newTime = maxTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
newTime -= newTime % TIMER_INTERVAL_MS; // Time should always be a multiple of the interval
|
||||||
|
|
||||||
|
const bool isBackwardsSkip = newTime < currentProcessedTime;
|
||||||
|
currentVisualTime = newTime;
|
||||||
|
|
||||||
|
if (isBackwardsSkip) {
|
||||||
|
handleBackwardsSkip(doRewindBuffering);
|
||||||
|
} else {
|
||||||
|
processNewEvents(FORWARD_SKIP);
|
||||||
|
}
|
||||||
|
|
||||||
|
update();
|
||||||
|
}
|
||||||
|
|
||||||
|
/// @param doRewindBuffering When true, if multiple backward skips are made in quick succession, only a single rewind
|
||||||
|
/// is processed at the end. When false, the backwards skip will always cause an immediate rewind
|
||||||
|
void ReplayTimelineWidget::handleBackwardsSkip(bool doRewindBuffering)
|
||||||
|
{
|
||||||
|
if (doRewindBuffering) {
|
||||||
|
// We use a one-shot timer to implement the rewind buffering.
|
||||||
|
// The rewind only happens once the timer runs out.
|
||||||
|
// If another backwards skip happens, the timer will just get reset instead of rewinding.
|
||||||
|
rewindBufferingTimer->stop();
|
||||||
|
rewindBufferingTimer->start(SettingsCache::instance().getRewindBufferingMs());
|
||||||
|
} else {
|
||||||
|
// otherwise, process the rewind immediately
|
||||||
|
processRewind();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void ReplayTimelineWidget::processRewind()
|
||||||
|
{
|
||||||
|
// stop any queued-up rewinds
|
||||||
|
rewindBufferingTimer->stop();
|
||||||
|
|
||||||
|
// process the rewind
|
||||||
|
currentEvent = 0;
|
||||||
|
emit rewound();
|
||||||
|
processNewEvents(BACKWARD_SKIP);
|
||||||
|
}
|
||||||
|
|
||||||
|
QSize ReplayTimelineWidget::sizeHint() const
|
||||||
|
{
|
||||||
|
return {-1, 50};
|
||||||
|
}
|
||||||
|
|
||||||
|
QSize ReplayTimelineWidget::minimumSizeHint() const
|
||||||
|
{
|
||||||
|
return {400, 50};
|
||||||
|
}
|
||||||
|
|
||||||
|
void ReplayTimelineWidget::replayTimerTimeout()
|
||||||
|
{
|
||||||
|
currentVisualTime += TIMER_INTERVAL_MS;
|
||||||
|
|
||||||
|
processNewEvents(NORMAL_PLAYBACK);
|
||||||
|
|
||||||
|
if (!(currentVisualTime % 1000))
|
||||||
|
update();
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Processes all unprocessed events up to the current time.
|
||||||
|
void ReplayTimelineWidget::processNewEvents(PlaybackMode playbackMode)
|
||||||
|
{
|
||||||
|
currentProcessedTime = currentVisualTime;
|
||||||
|
|
||||||
|
while ((currentEvent < replayTimeline.size()) && (replayTimeline[currentEvent] < currentProcessedTime)) {
|
||||||
|
Player::EventProcessingOptions options;
|
||||||
|
|
||||||
|
// backwards skip => always skip reveal windows
|
||||||
|
// forwards skip => skip reveal windows that don't happen within a big skip of the target
|
||||||
|
if (playbackMode == BACKWARD_SKIP || currentProcessedTime - replayTimeline[currentEvent] > BIG_SKIP_MS)
|
||||||
|
options |= Player::EventProcessingOption::SKIP_REVEAL_WINDOW;
|
||||||
|
|
||||||
|
// backwards skip => always skip tap animation
|
||||||
|
if (playbackMode == BACKWARD_SKIP)
|
||||||
|
options |= Player::EventProcessingOption::SKIP_TAP_ANIMATION;
|
||||||
|
|
||||||
|
emit processNextEvent(options);
|
||||||
|
++currentEvent;
|
||||||
|
}
|
||||||
|
if (currentEvent == replayTimeline.size()) {
|
||||||
|
emit replayFinished();
|
||||||
|
replayTimer->stop();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void ReplayTimelineWidget::setTimeScaleFactor(qreal _timeScaleFactor)
|
||||||
|
{
|
||||||
|
timeScaleFactor = _timeScaleFactor;
|
||||||
|
replayTimer->setInterval(static_cast<int>(TIMER_INTERVAL_MS / timeScaleFactor));
|
||||||
|
}
|
||||||
|
|
||||||
|
void ReplayTimelineWidget::startReplay()
|
||||||
|
{
|
||||||
|
replayTimer->start(static_cast<int>(TIMER_INTERVAL_MS / timeScaleFactor));
|
||||||
|
}
|
||||||
|
|
||||||
|
void ReplayTimelineWidget::stopReplay()
|
||||||
|
{
|
||||||
|
replayTimer->stop();
|
||||||
|
}
|
||||||
|
|
||||||
|
void ReplayTimelineWidget::skipByAmount(int amount)
|
||||||
|
{
|
||||||
|
skipToTime(currentVisualTime + amount, amount < 0);
|
||||||
|
}
|
||||||
@@ -1,6 +1,8 @@
|
|||||||
#ifndef REPLAY_TIMELINE_WIDGET
|
#ifndef REPLAY_TIMELINE_WIDGET
|
||||||
#define REPLAY_TIMELINE_WIDGET
|
#define REPLAY_TIMELINE_WIDGET
|
||||||
|
|
||||||
|
#include "../../game/player/player.h"
|
||||||
|
|
||||||
#include <QList>
|
#include <QList>
|
||||||
#include <QMouseEvent>
|
#include <QMouseEvent>
|
||||||
#include <QWidget>
|
#include <QWidget>
|
||||||
@@ -12,23 +14,44 @@ class ReplayTimelineWidget : public QWidget
|
|||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
signals:
|
signals:
|
||||||
void processNextEvent();
|
void processNextEvent(Player::EventProcessingOptions options);
|
||||||
void replayFinished();
|
void replayFinished();
|
||||||
void rewound();
|
void rewound();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
enum PlaybackMode
|
||||||
|
{
|
||||||
|
NORMAL_PLAYBACK,
|
||||||
|
FORWARD_SKIP,
|
||||||
|
BACKWARD_SKIP
|
||||||
|
};
|
||||||
|
|
||||||
|
static constexpr int TIMER_INTERVAL_MS = 200;
|
||||||
|
static constexpr int BIN_LENGTH = 5000;
|
||||||
|
|
||||||
QTimer *replayTimer;
|
QTimer *replayTimer;
|
||||||
|
QTimer *rewindBufferingTimer;
|
||||||
QList<int> replayTimeline;
|
QList<int> replayTimeline;
|
||||||
QList<int> histogram;
|
QList<int> histogram;
|
||||||
static const int binLength;
|
|
||||||
int maxBinValue, maxTime;
|
int maxBinValue, maxTime;
|
||||||
qreal timeScaleFactor;
|
qreal timeScaleFactor;
|
||||||
int currentTime;
|
int currentVisualTime; // time currently displayed by the timeline
|
||||||
|
int currentProcessedTime; // time that events are currently processed up to. Could differ from visual time due to
|
||||||
|
// rewind buffering
|
||||||
int currentEvent;
|
int currentEvent;
|
||||||
|
|
||||||
|
void skipToTime(int newTime, bool doRewindBuffering);
|
||||||
|
void handleBackwardsSkip(bool doRewindBuffering);
|
||||||
|
void processRewind();
|
||||||
|
void processNewEvents(PlaybackMode playbackMode);
|
||||||
private slots:
|
private slots:
|
||||||
void replayTimerTimeout();
|
void replayTimerTimeout();
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
static constexpr int SMALL_SKIP_MS = 1000;
|
||||||
|
static constexpr int BIG_SKIP_MS = 10000;
|
||||||
|
static constexpr qreal FAST_FORWARD_SCALE_FACTOR = 10.0;
|
||||||
|
|
||||||
explicit ReplayTimelineWidget(QWidget *parent = nullptr);
|
explicit ReplayTimelineWidget(QWidget *parent = nullptr);
|
||||||
void setTimeline(const QList<int> &_replayTimeline);
|
void setTimeline(const QList<int> &_replayTimeline);
|
||||||
QSize sizeHint() const override;
|
QSize sizeHint() const override;
|
||||||
@@ -41,6 +64,7 @@ public:
|
|||||||
public slots:
|
public slots:
|
||||||
void startReplay();
|
void startReplay();
|
||||||
void stopReplay();
|
void stopReplay();
|
||||||
|
void skipByAmount(int amount); // use a negative amount to skip backwards
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void paintEvent(QPaintEvent *event) override;
|
void paintEvent(QPaintEvent *event) override;
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
#include "setsmodel.h"
|
#include "sets_model.h"
|
||||||
|
|
||||||
#include <QSortFilterProxyModel>
|
#include <QSortFilterProxyModel>
|
||||||
|
|
||||||
@@ -195,6 +195,13 @@ void SetsModel::swapRows(int oldRow, int newRow)
|
|||||||
emit dataChanged(index(0, 0), index(rowCount() - 1, columnCount() - 1));
|
emit dataChanged(index(0, 0), index(rowCount() - 1, columnCount() - 1));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void SetsModel::restoreOriginalOrder()
|
||||||
|
{
|
||||||
|
int numRows = rowCount();
|
||||||
|
sets.defaultSort();
|
||||||
|
emit dataChanged(index(0, 0), index(numRows - 1, columnCount() - 1));
|
||||||
|
}
|
||||||
|
|
||||||
void SetsModel::sort(int column, Qt::SortOrder order)
|
void SetsModel::sort(int column, Qt::SortOrder order)
|
||||||
{
|
{
|
||||||
QMultiMap<QString, CardSetPtr> setMap;
|
QMultiMap<QString, CardSetPtr> setMap;
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
#ifndef SETSMODEL_H
|
#ifndef SETSMODEL_H
|
||||||
#define SETSMODEL_H
|
#define SETSMODEL_H
|
||||||
|
|
||||||
#include "carddatabase.h"
|
#include "../../game/cards/card_database.h"
|
||||||
|
|
||||||
#include <QAbstractTableModel>
|
#include <QAbstractTableModel>
|
||||||
#include <QMimeData>
|
#include <QMimeData>
|
||||||
@@ -49,44 +49,47 @@ public:
|
|||||||
LongNameCol,
|
LongNameCol,
|
||||||
ShortNameCol,
|
ShortNameCol,
|
||||||
SetTypeCol,
|
SetTypeCol,
|
||||||
ReleaseDateCol
|
ReleaseDateCol,
|
||||||
|
PriorityCol
|
||||||
};
|
};
|
||||||
enum Role
|
enum Role
|
||||||
{
|
{
|
||||||
SortRole = Qt::UserRole
|
SortRole = Qt::UserRole
|
||||||
};
|
};
|
||||||
|
|
||||||
SetsModel(CardDatabase *_db, QObject *parent = nullptr);
|
explicit SetsModel(CardDatabase *_db, QObject *parent = nullptr);
|
||||||
~SetsModel();
|
~SetsModel() override;
|
||||||
int rowCount(const QModelIndex &parent = QModelIndex()) const;
|
int rowCount(const QModelIndex &parent = QModelIndex()) const override;
|
||||||
int columnCount(const QModelIndex &parent = QModelIndex()) const
|
int columnCount(const QModelIndex &parent = QModelIndex()) const override
|
||||||
{
|
{
|
||||||
Q_UNUSED(parent);
|
Q_UNUSED(parent);
|
||||||
return NUM_COLS;
|
return NUM_COLS;
|
||||||
}
|
}
|
||||||
QVariant data(const QModelIndex &index, int role) const;
|
QVariant data(const QModelIndex &index, int role) const override;
|
||||||
bool setData(const QModelIndex &index, const QVariant &value, int role);
|
bool setData(const QModelIndex &index, const QVariant &value, int role) override;
|
||||||
QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const;
|
QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const override;
|
||||||
Qt::ItemFlags flags(const QModelIndex &index) const;
|
Qt::ItemFlags flags(const QModelIndex &index) const override;
|
||||||
Qt::DropActions supportedDropActions() const;
|
Qt::DropActions supportedDropActions() const override;
|
||||||
|
|
||||||
QMimeData *mimeData(const QModelIndexList &indexes) const;
|
QMimeData *mimeData(const QModelIndexList &indexes) const override;
|
||||||
bool dropMimeData(const QMimeData *data, Qt::DropAction action, int row, int column, const QModelIndex &parent);
|
bool
|
||||||
QStringList mimeTypes() const;
|
dropMimeData(const QMimeData *data, Qt::DropAction action, int row, int column, const QModelIndex &parent) override;
|
||||||
|
QStringList mimeTypes() const override;
|
||||||
void swapRows(int oldRow, int newRow);
|
void swapRows(int oldRow, int newRow);
|
||||||
void toggleRow(int row, bool enable);
|
void toggleRow(int row, bool enable);
|
||||||
void toggleRow(int row);
|
void toggleRow(int row);
|
||||||
void toggleAll(bool);
|
void toggleAll(bool);
|
||||||
void sort(int column, Qt::SortOrder order = Qt::AscendingOrder);
|
void sort(int column, Qt::SortOrder order = Qt::AscendingOrder) override;
|
||||||
void save(CardDatabase *db);
|
void save(CardDatabase *db);
|
||||||
void restore(CardDatabase *db);
|
void restore(CardDatabase *db);
|
||||||
|
void restoreOriginalOrder();
|
||||||
};
|
};
|
||||||
|
|
||||||
class SetsDisplayModel : public QSortFilterProxyModel
|
class SetsDisplayModel : public QSortFilterProxyModel
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
SetsDisplayModel(QObject *parent = NULL);
|
explicit SetsDisplayModel(QObject *parent = nullptr);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
bool lessThan(const QModelIndex &left, const QModelIndex &right) const override;
|
bool lessThan(const QModelIndex &left, const QModelIndex &right) const override;
|
||||||
@@ -1,9 +1,10 @@
|
|||||||
#include "spoilerbackgroundupdater.h"
|
#include "spoiler_background_updater.h"
|
||||||
|
|
||||||
#include "carddatabase.h"
|
#include "../../game/cards/card_database.h"
|
||||||
#include "main.h"
|
#include "../../game/cards/card_database_manager.h"
|
||||||
#include "settingscache.h"
|
#include "../../main.h"
|
||||||
#include "window_main.h"
|
#include "../../settings/cache_settings.h"
|
||||||
|
#include "../ui/window_main.h"
|
||||||
|
|
||||||
#include <QApplication>
|
#include <QApplication>
|
||||||
#include <QCryptographicHash>
|
#include <QCryptographicHash>
|
||||||
@@ -27,7 +28,7 @@ SpoilerBackgroundUpdater::SpoilerBackgroundUpdater(QObject *apParent) : QObject(
|
|||||||
// File exists means we're in spoiler season
|
// File exists means we're in spoiler season
|
||||||
startSpoilerDownloadProcess(SPOILERS_STATUS_URL, false);
|
startSpoilerDownloadProcess(SPOILERS_STATUS_URL, false);
|
||||||
} else {
|
} else {
|
||||||
qDebug() << "Spoilers Disabled";
|
qCDebug(SpoilerBackgroundUpdaterLog) << "Spoilers Disabled";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -44,10 +45,10 @@ void SpoilerBackgroundUpdater::downloadFromURL(QUrl url, bool saveResults)
|
|||||||
|
|
||||||
if (saveResults) {
|
if (saveResults) {
|
||||||
// This will write out to the file (used for spoiler.xml)
|
// This will write out to the file (used for spoiler.xml)
|
||||||
connect(reply, SIGNAL(finished()), this, SLOT(actDownloadFinishedSpoilersFile()));
|
connect(reply, &QNetworkReply::finished, this, &SpoilerBackgroundUpdater::actDownloadFinishedSpoilersFile);
|
||||||
} else {
|
} else {
|
||||||
// This will check the status (used to see if we're in spoiler season or not)
|
// This will check the status (used to see if we're in spoiler season or not)
|
||||||
connect(reply, SIGNAL(finished()), this, SLOT(actCheckIfSpoilerSeasonEnabled()));
|
connect(reply, &QNetworkReply::finished, this, &SpoilerBackgroundUpdater::actCheckIfSpoilerSeasonEnabled);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -66,7 +67,7 @@ void SpoilerBackgroundUpdater::actDownloadFinishedSpoilersFile()
|
|||||||
reply->deleteLater();
|
reply->deleteLater();
|
||||||
emit spoilerCheckerDone();
|
emit spoilerCheckerDone();
|
||||||
} else {
|
} else {
|
||||||
qDebug() << "Error downloading spoilers file" << errorCode;
|
qCDebug(SpoilerBackgroundUpdaterLog) << "Error downloading spoilers file" << errorCode;
|
||||||
emit spoilerCheckerDone();
|
emit spoilerCheckerDone();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -80,11 +81,11 @@ bool SpoilerBackgroundUpdater::deleteSpoilerFile()
|
|||||||
|
|
||||||
// Delete the spoiler.xml file
|
// Delete the spoiler.xml file
|
||||||
if (file.exists() && file.remove()) {
|
if (file.exists() && file.remove()) {
|
||||||
qDebug() << "Deleting spoiler.xml";
|
qCDebug(SpoilerBackgroundUpdaterLog) << "Deleting spoiler.xml";
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
qDebug() << "Error: Spoiler.xml not found or not deleted";
|
qCDebug(SpoilerBackgroundUpdaterLog) << "Error: Spoiler.xml not found or not deleted";
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -100,24 +101,24 @@ void SpoilerBackgroundUpdater::actCheckIfSpoilerSeasonEnabled()
|
|||||||
trayIcon->showMessage(tr("Spoilers season has ended"), tr("Deleting spoiler.xml. Please run Oracle"));
|
trayIcon->showMessage(tr("Spoilers season has ended"), tr("Deleting spoiler.xml. Please run Oracle"));
|
||||||
}
|
}
|
||||||
|
|
||||||
qDebug() << "Spoiler Season Offline";
|
qCDebug(SpoilerBackgroundUpdaterLog) << "Spoiler Season Offline";
|
||||||
emit spoilerCheckerDone();
|
emit spoilerCheckerDone();
|
||||||
} else if (errorCode == QNetworkReply::NoError) {
|
} else if (errorCode == QNetworkReply::NoError) {
|
||||||
qDebug() << "Spoiler Service Online";
|
qCDebug(SpoilerBackgroundUpdaterLog) << "Spoiler Service Online";
|
||||||
startSpoilerDownloadProcess(SPOILERS_URL, true);
|
startSpoilerDownloadProcess(SPOILERS_URL, true);
|
||||||
} else if (errorCode == QNetworkReply::HostNotFoundError) {
|
} else if (errorCode == QNetworkReply::HostNotFoundError) {
|
||||||
if (trayIcon) {
|
if (trayIcon) {
|
||||||
trayIcon->showMessage(tr("Spoilers download failed"), tr("No internet connection"));
|
trayIcon->showMessage(tr("Spoilers download failed"), tr("No internet connection"));
|
||||||
}
|
}
|
||||||
|
|
||||||
qDebug() << "Spoiler download failed due to no internet connection";
|
qCDebug(SpoilerBackgroundUpdaterLog) << "Spoiler download failed due to no internet connection";
|
||||||
emit spoilerCheckerDone();
|
emit spoilerCheckerDone();
|
||||||
} else {
|
} else {
|
||||||
if (trayIcon) {
|
if (trayIcon) {
|
||||||
trayIcon->showMessage(tr("Spoilers download failed"), tr("Error") + " " + (short)errorCode);
|
trayIcon->showMessage(tr("Spoilers download failed"), tr("Error") + " " + (short)errorCode);
|
||||||
}
|
}
|
||||||
|
|
||||||
qDebug() << "Spoiler download failed with reason" << errorCode;
|
qCDebug(SpoilerBackgroundUpdaterLog) << "Spoiler download failed with reason" << errorCode;
|
||||||
emit spoilerCheckerDone();
|
emit spoilerCheckerDone();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -138,19 +139,19 @@ bool SpoilerBackgroundUpdater::saveDownloadedFile(QByteArray data)
|
|||||||
trayIcon->showMessage(tr("Spoilers already up to date"), tr("No new spoilers added"));
|
trayIcon->showMessage(tr("Spoilers already up to date"), tr("No new spoilers added"));
|
||||||
}
|
}
|
||||||
|
|
||||||
qDebug() << "Spoilers Up to Date";
|
qCDebug(SpoilerBackgroundUpdaterLog) << "Spoilers Up to Date";
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
QFile file(fileName);
|
QFile file(fileName);
|
||||||
if (!file.open(QIODevice::WriteOnly)) {
|
if (!file.open(QIODevice::WriteOnly)) {
|
||||||
qDebug() << "Spoiler Service Error: File open (w) failed for" << fileName;
|
qCDebug(SpoilerBackgroundUpdaterLog) << "Spoiler Service Error: File open (w) failed for" << fileName;
|
||||||
file.close();
|
file.close();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (file.write(data) == -1) {
|
if (file.write(data) == -1) {
|
||||||
qDebug() << "Spoiler Service Error: File write (w) failed for" << fileName;
|
qCDebug(SpoilerBackgroundUpdaterLog) << "Spoiler Service Error: File write (w) failed for" << fileName;
|
||||||
file.close();
|
file.close();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -158,21 +159,25 @@ bool SpoilerBackgroundUpdater::saveDownloadedFile(QByteArray data)
|
|||||||
file.close();
|
file.close();
|
||||||
|
|
||||||
// Data written, so reload the card database
|
// Data written, so reload the card database
|
||||||
qDebug() << "Spoiler Service Data Written";
|
qCDebug(SpoilerBackgroundUpdaterLog) << "Spoiler Service Data Written";
|
||||||
const auto reloadOk = QtConcurrent::run([] { db->loadCardDatabases(); });
|
const auto reloadOk = QtConcurrent::run([] { CardDatabaseManager::getInstance()->loadCardDatabases(); });
|
||||||
|
|
||||||
// If the user has notifications enabled, let them know
|
// If the user has notifications enabled, let them know
|
||||||
// when the database was last updated
|
// when the database was last updated
|
||||||
if (trayIcon) {
|
if (trayIcon) {
|
||||||
QList<QByteArray> lines = data.split('\n');
|
QList<QByteArray> lines = data.split('\n');
|
||||||
|
|
||||||
foreach (QByteArray line, lines) {
|
for (const QByteArray &line : lines) {
|
||||||
if (line.contains("Created At:")) {
|
if (line.contains("Created At:")) {
|
||||||
QString timeStamp = QString(line).replace("Created At:", "").trimmed();
|
QString timeStamp = QString(line).replace("Created At:", "").trimmed();
|
||||||
timeStamp.chop(6); // Remove " (UTC)"
|
timeStamp.chop(6); // Remove " (UTC)"
|
||||||
|
|
||||||
auto utcTime = QLocale().toDateTime(timeStamp, "ddd, MMM dd yyyy, hh:mm:ss");
|
auto utcTime = QLocale().toDateTime(timeStamp, "ddd, MMM dd yyyy, hh:mm:ss");
|
||||||
|
#if QT_VERSION >= QT_VERSION_CHECK(6, 7, 0)
|
||||||
|
utcTime.setTimeZone(QTimeZone::UTC);
|
||||||
|
#else
|
||||||
utcTime.setTimeSpec(Qt::UTC);
|
utcTime.setTimeSpec(Qt::UTC);
|
||||||
|
#endif
|
||||||
|
|
||||||
QString localTime = utcTime.toLocalTime().toString("MMM d, hh:mm");
|
QString localTime = utcTime.toLocalTime().toString("MMM d, hh:mm");
|
||||||
|
|
||||||
@@ -197,12 +202,12 @@ QByteArray SpoilerBackgroundUpdater::getHash(const QString fileName)
|
|||||||
QCryptographicHash hash(QCryptographicHash::Algorithm::Md5);
|
QCryptographicHash hash(QCryptographicHash::Algorithm::Md5);
|
||||||
hash.addData(bytes);
|
hash.addData(bytes);
|
||||||
|
|
||||||
qDebug() << "File Hash =" << hash.result();
|
qCDebug(SpoilerBackgroundUpdaterLog) << "File Hash =" << hash.result();
|
||||||
|
|
||||||
file.close();
|
file.close();
|
||||||
return hash.result();
|
return hash.result();
|
||||||
} else {
|
} else {
|
||||||
qDebug() << "getHash ReadOnly failed!";
|
qCDebug(SpoilerBackgroundUpdaterLog) << "getHash ReadOnly failed!";
|
||||||
file.close();
|
file.close();
|
||||||
return QByteArray();
|
return QByteArray();
|
||||||
}
|
}
|
||||||
@@ -216,7 +221,7 @@ QByteArray SpoilerBackgroundUpdater::getHash(QByteArray data)
|
|||||||
QCryptographicHash hash(QCryptographicHash::Algorithm::Md5);
|
QCryptographicHash hash(QCryptographicHash::Algorithm::Md5);
|
||||||
hash.addData(bytes);
|
hash.addData(bytes);
|
||||||
|
|
||||||
qDebug() << "Data Hash =" << hash.result();
|
qCDebug(SpoilerBackgroundUpdaterLog) << "Data Hash =" << hash.result();
|
||||||
|
|
||||||
return hash.result();
|
return hash.result();
|
||||||
}
|
}
|
||||||
@@ -2,9 +2,12 @@
|
|||||||
#define COCKATRICE_SPOILER_DOWNLOADER_H
|
#define COCKATRICE_SPOILER_DOWNLOADER_H
|
||||||
|
|
||||||
#include <QByteArray>
|
#include <QByteArray>
|
||||||
|
#include <QLoggingCategory>
|
||||||
#include <QObject>
|
#include <QObject>
|
||||||
#include <QProcess>
|
#include <QProcess>
|
||||||
|
|
||||||
|
inline Q_LOGGING_CATEGORY(SpoilerBackgroundUpdaterLog, "spoiler_background_updater");
|
||||||
|
|
||||||
class SpoilerBackgroundUpdater : public QObject
|
class SpoilerBackgroundUpdater : public QObject
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
166
cockatrice/src/client/sound_engine.cpp
Normal file
@@ -0,0 +1,166 @@
|
|||||||
|
#include "sound_engine.h"
|
||||||
|
|
||||||
|
#include "../settings/cache_settings.h"
|
||||||
|
|
||||||
|
#include <QDir>
|
||||||
|
#include <QMediaPlayer>
|
||||||
|
|
||||||
|
#if (QT_VERSION >= QT_VERSION_CHECK(6, 0, 0))
|
||||||
|
#include <QAudioOutput>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#define DEFAULT_THEME_NAME "Default"
|
||||||
|
#define TEST_SOUND_FILENAME "player_join"
|
||||||
|
|
||||||
|
SoundEngine::SoundEngine(QObject *parent) : QObject(parent), audioOutput(nullptr), player(nullptr)
|
||||||
|
{
|
||||||
|
ensureThemeDirectoryExists();
|
||||||
|
connect(&SettingsCache::instance(), &SettingsCache::soundThemeChanged, this, &SoundEngine::themeChangedSlot);
|
||||||
|
connect(&SettingsCache::instance(), &SettingsCache::soundEnabledChanged, this, &SoundEngine::soundEnabledChanged);
|
||||||
|
|
||||||
|
soundEnabledChanged();
|
||||||
|
themeChangedSlot();
|
||||||
|
}
|
||||||
|
|
||||||
|
SoundEngine::~SoundEngine()
|
||||||
|
{
|
||||||
|
if (player) {
|
||||||
|
player->deleteLater();
|
||||||
|
player = nullptr;
|
||||||
|
}
|
||||||
|
if (audioOutput) {
|
||||||
|
audioOutput->deleteLater();
|
||||||
|
audioOutput = nullptr;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void SoundEngine::soundEnabledChanged()
|
||||||
|
{
|
||||||
|
if (SettingsCache::instance().getSoundEnabled()) {
|
||||||
|
qCDebug(SoundEngineLog) << "SoundEngine: enabling sound with" << audioData.size() << "sounds";
|
||||||
|
if (!player) {
|
||||||
|
player = new QMediaPlayer;
|
||||||
|
#if (QT_VERSION >= QT_VERSION_CHECK(6, 0, 0))
|
||||||
|
audioOutput = new QAudioOutput(player);
|
||||||
|
player->setAudioOutput(audioOutput);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
qCDebug(SoundEngineLog) << "SoundEngine: disabling sound";
|
||||||
|
if (player) {
|
||||||
|
player->stop();
|
||||||
|
player->deleteLater();
|
||||||
|
player = nullptr;
|
||||||
|
}
|
||||||
|
if (audioOutput) {
|
||||||
|
audioOutput->deleteLater();
|
||||||
|
audioOutput = nullptr;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void SoundEngine::playSound(const QString &fileName)
|
||||||
|
{
|
||||||
|
if (!player) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!audioData.contains(fileName)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
player->stop();
|
||||||
|
int volumeSliderValue = SettingsCache::instance().getMasterVolume();
|
||||||
|
#if (QT_VERSION >= QT_VERSION_CHECK(6, 0, 0))
|
||||||
|
player->audioOutput()->setVolume(qreal(volumeSliderValue) / 100);
|
||||||
|
player->setSource(QUrl::fromLocalFile(audioData[fileName]));
|
||||||
|
#else
|
||||||
|
player->setVolume(volumeSliderValue);
|
||||||
|
player->setMedia(QUrl::fromLocalFile(audioData[fileName]));
|
||||||
|
#endif
|
||||||
|
player->play();
|
||||||
|
}
|
||||||
|
|
||||||
|
void SoundEngine::testSound()
|
||||||
|
{
|
||||||
|
playSound(TEST_SOUND_FILENAME);
|
||||||
|
}
|
||||||
|
|
||||||
|
void SoundEngine::ensureThemeDirectoryExists()
|
||||||
|
{
|
||||||
|
if (SettingsCache::instance().getSoundThemeName().isEmpty() ||
|
||||||
|
!getAvailableThemes().contains(SettingsCache::instance().getSoundThemeName())) {
|
||||||
|
qCDebug(SoundEngineLog) << "Sounds theme name not set, setting default value";
|
||||||
|
SettingsCache::instance().setSoundThemeName(DEFAULT_THEME_NAME);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
QStringMap &SoundEngine::getAvailableThemes()
|
||||||
|
{
|
||||||
|
QDir dir;
|
||||||
|
availableThemes.clear();
|
||||||
|
|
||||||
|
// load themes from user profile dir
|
||||||
|
|
||||||
|
dir.setPath(SettingsCache::instance().getDataPath() + "/sounds");
|
||||||
|
|
||||||
|
for (const QString &themeName : dir.entryList(QDir::AllDirs | QDir::NoDotAndDotDot, QDir::Name)) {
|
||||||
|
if (!availableThemes.contains(themeName))
|
||||||
|
availableThemes.insert(themeName, dir.absoluteFilePath(themeName));
|
||||||
|
}
|
||||||
|
|
||||||
|
// load themes from cockatrice system dir
|
||||||
|
dir.setPath(qApp->applicationDirPath() +
|
||||||
|
#ifdef Q_OS_MAC
|
||||||
|
"/../Resources/sounds"
|
||||||
|
#elif defined(Q_OS_WIN)
|
||||||
|
"/sounds"
|
||||||
|
#else // linux
|
||||||
|
"/../share/cockatrice/sounds"
|
||||||
|
#endif
|
||||||
|
);
|
||||||
|
|
||||||
|
for (const QString &themeName : dir.entryList(QDir::AllDirs | QDir::NoDotAndDotDot, QDir::Name)) {
|
||||||
|
if (!availableThemes.contains(themeName))
|
||||||
|
availableThemes.insert(themeName, dir.absoluteFilePath(themeName));
|
||||||
|
}
|
||||||
|
|
||||||
|
return availableThemes;
|
||||||
|
}
|
||||||
|
|
||||||
|
void SoundEngine::themeChangedSlot()
|
||||||
|
{
|
||||||
|
QString themeName = SettingsCache::instance().getSoundThemeName();
|
||||||
|
qCDebug(SoundEngineLog) << "Sound theme changed:" << themeName;
|
||||||
|
|
||||||
|
QDir dir = getAvailableThemes().value(themeName);
|
||||||
|
|
||||||
|
audioData.clear();
|
||||||
|
|
||||||
|
static const QStringList extensions = {".wav", ".mp3", ".ogg"};
|
||||||
|
static const QStringList fileNames = {
|
||||||
|
// Phases
|
||||||
|
"untap_step", "upkeep_step", "draw_step", "main_1", "start_combat", "attack_step", "block_step", "damage_step",
|
||||||
|
"end_combat", "main_2", "end_step",
|
||||||
|
// Game Actions
|
||||||
|
"draw_card", "play_card", "tap_card", "untap_card", "shuffle", "roll_dice", "life_change",
|
||||||
|
// Player
|
||||||
|
"player_join", "player_leave", "player_disconnect", "player_reconnect", "player_concede",
|
||||||
|
// Spectator
|
||||||
|
"spectator_join", "spectator_leave",
|
||||||
|
// Buddy
|
||||||
|
"buddy_join", "buddy_leave",
|
||||||
|
// Chat & UI
|
||||||
|
"chat_mention", "all_mention", "private_message"};
|
||||||
|
|
||||||
|
for (const QString &extension : extensions) {
|
||||||
|
for (const QString &name : fileNames) {
|
||||||
|
QFile file(dir.filePath(name + extension));
|
||||||
|
if (file.exists()) {
|
||||||
|
audioData.insert(name, file.fileName());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
soundEnabledChanged();
|
||||||
|
}
|
||||||
@@ -1,12 +1,15 @@
|
|||||||
#ifndef SOUNDENGINE_H
|
#ifndef SOUNDENGINE_H
|
||||||
#define SOUNDENGINE_H
|
#define SOUNDENGINE_H
|
||||||
|
|
||||||
|
#include <QAudioOutput>
|
||||||
|
#include <QLoggingCategory>
|
||||||
#include <QMap>
|
#include <QMap>
|
||||||
#include <QMediaPlayer>
|
#include <QMediaPlayer>
|
||||||
#include <QObject>
|
#include <QObject>
|
||||||
#include <QString>
|
#include <QString>
|
||||||
|
|
||||||
class QAudioOutput;
|
inline Q_LOGGING_CATEGORY(SoundEngineLog, "sound_engine");
|
||||||
|
|
||||||
class QBuffer;
|
class QBuffer;
|
||||||
|
|
||||||
typedef QMap<QString, QString> QStringMap;
|
typedef QMap<QString, QString> QStringMap;
|
||||||
@@ -15,14 +18,15 @@ class SoundEngine : public QObject
|
|||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
SoundEngine(QObject *parent = nullptr);
|
explicit SoundEngine(QObject *parent = nullptr);
|
||||||
~SoundEngine();
|
~SoundEngine() override;
|
||||||
void playSound(QString fileName);
|
void playSound(const QString &fileName);
|
||||||
QStringMap &getAvailableThemes();
|
QStringMap &getAvailableThemes();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QStringMap availableThemes;
|
QStringMap availableThemes;
|
||||||
QMap<QString, QString> audioData;
|
QMap<QString, QString> audioData;
|
||||||
|
QAudioOutput *audioOutput;
|
||||||
QMediaPlayer *player;
|
QMediaPlayer *player;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
@@ -0,0 +1,45 @@
|
|||||||
|
#include "edhrec_commander_api_response.h"
|
||||||
|
|
||||||
|
#include <QDebug>
|
||||||
|
#include <QJsonArray>
|
||||||
|
|
||||||
|
void EdhrecCommanderApiResponse::fromJson(const QJsonObject &json)
|
||||||
|
{
|
||||||
|
// Parse the collapsed DeckStatistics
|
||||||
|
deckStats.fromJson(json);
|
||||||
|
|
||||||
|
// Parse Archidekt section
|
||||||
|
QJsonArray archidektJson = json.value("archidekt").toArray();
|
||||||
|
archidekt.fromJson(archidektJson);
|
||||||
|
|
||||||
|
// Parse other fields
|
||||||
|
similar = json.value("similar").toObject();
|
||||||
|
header = json.value("header").toString();
|
||||||
|
panels = json.value("panels").toObject();
|
||||||
|
description = json.value("description").toString();
|
||||||
|
QJsonObject containerJson = json.value("container").toObject();
|
||||||
|
container.fromJson(containerJson);
|
||||||
|
}
|
||||||
|
|
||||||
|
void EdhrecCommanderApiResponse::debugPrint() const
|
||||||
|
{
|
||||||
|
qDebug() << "Deck Statistics:";
|
||||||
|
qDebug() << " Creature:" << deckStats.creature;
|
||||||
|
qDebug() << " Instant:" << deckStats.instant;
|
||||||
|
qDebug() << " Sorcery:" << deckStats.sorcery;
|
||||||
|
qDebug() << " Artifact:" << deckStats.artifact;
|
||||||
|
qDebug() << " Enchantment:" << deckStats.enchantment;
|
||||||
|
qDebug() << " Battle:" << deckStats.battle;
|
||||||
|
qDebug() << " Planeswalker:" << deckStats.planeswalker;
|
||||||
|
qDebug() << " Land:" << deckStats.land;
|
||||||
|
qDebug() << " Basic:" << deckStats.basic;
|
||||||
|
qDebug() << " Nonbasic:" << deckStats.nonbasic;
|
||||||
|
|
||||||
|
archidekt.debugPrint();
|
||||||
|
|
||||||
|
qDebug() << "Similar:" << similar;
|
||||||
|
qDebug() << "Header:" << header;
|
||||||
|
qDebug() << "Panels:" << panels;
|
||||||
|
qDebug() << "Description:" << description;
|
||||||
|
container.debugPrint();
|
||||||
|
}
|
||||||
@@ -0,0 +1,28 @@
|
|||||||
|
#ifndef DECKDATA_H
|
||||||
|
#define DECKDATA_H
|
||||||
|
|
||||||
|
#include "edhrec_commander_api_response_archidekt_links.h"
|
||||||
|
#include "edhrec_commander_api_response_average_deck_statistics.h"
|
||||||
|
#include "edhrec_commander_api_response_card_container.h"
|
||||||
|
|
||||||
|
#include <QDebug>
|
||||||
|
#include <QJsonObject>
|
||||||
|
#include <QString>
|
||||||
|
|
||||||
|
// Represents the main structure of the JSON
|
||||||
|
class EdhrecCommanderApiResponse
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
EdhrecCommanderApiResponseAverageDeckStatistics deckStats;
|
||||||
|
EdhrecCommanderApiResponseArchidektLinks archidekt;
|
||||||
|
QJsonObject similar;
|
||||||
|
QString header;
|
||||||
|
QJsonObject panels;
|
||||||
|
QString description;
|
||||||
|
EdhrecCommanderApiResponseCardContainer container;
|
||||||
|
|
||||||
|
void fromJson(const QJsonObject &json);
|
||||||
|
void debugPrint() const;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // DECKDATA_H
|
||||||
@@ -0,0 +1,43 @@
|
|||||||
|
#include "edhrec_commander_api_response_archidekt_links.h"
|
||||||
|
|
||||||
|
#include <QDebug>
|
||||||
|
#include <QJsonArray>
|
||||||
|
#include <QJsonDocument>
|
||||||
|
#include <QJsonObject>
|
||||||
|
|
||||||
|
void EdhrecCommanderApiResponseArchidektLink::fromJson(const QJsonObject &json)
|
||||||
|
{
|
||||||
|
c = json.value("c").toString();
|
||||||
|
f = json.value("f").toInt(0);
|
||||||
|
q = json.value("q").toInt(0);
|
||||||
|
u = json.value("u").toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
void EdhrecCommanderApiResponseArchidektLink::debugPrint() const
|
||||||
|
{
|
||||||
|
qDebug() << " C:" << c;
|
||||||
|
qDebug() << " F:" << f;
|
||||||
|
qDebug() << " Q:" << q;
|
||||||
|
qDebug() << " U:" << u;
|
||||||
|
}
|
||||||
|
|
||||||
|
void EdhrecCommanderApiResponseArchidektLinks::fromJson(const QJsonArray &json)
|
||||||
|
{
|
||||||
|
entries.clear();
|
||||||
|
for (const QJsonValue &value : json) {
|
||||||
|
if (value.isObject()) {
|
||||||
|
QJsonObject entryJson = value.toObject();
|
||||||
|
EdhrecCommanderApiResponseArchidektLink entry;
|
||||||
|
entry.fromJson(entryJson);
|
||||||
|
entries.append(entry);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void EdhrecCommanderApiResponseArchidektLinks::debugPrint() const
|
||||||
|
{
|
||||||
|
qDebug() << "Archidekt Entries:";
|
||||||
|
for (const auto &entry : entries) {
|
||||||
|
entry.debugPrint();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,32 @@
|
|||||||
|
#ifndef ARCHIDEKTENTRY_H
|
||||||
|
#define ARCHIDEKTENTRY_H
|
||||||
|
|
||||||
|
#include <QDebug>
|
||||||
|
#include <QJsonObject>
|
||||||
|
#include <QString>
|
||||||
|
#include <QVector>
|
||||||
|
|
||||||
|
// Represents a single Archidekt entry
|
||||||
|
class EdhrecCommanderApiResponseArchidektLink
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
QString c;
|
||||||
|
int f = 0;
|
||||||
|
int q = 0;
|
||||||
|
QString u;
|
||||||
|
|
||||||
|
void fromJson(const QJsonObject &json);
|
||||||
|
void debugPrint() const;
|
||||||
|
};
|
||||||
|
|
||||||
|
// Represents the Archidekt section as a list of entries
|
||||||
|
class EdhrecCommanderApiResponseArchidektLinks
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
QVector<EdhrecCommanderApiResponseArchidektLink> entries;
|
||||||
|
|
||||||
|
void fromJson(const QJsonArray &json);
|
||||||
|
void debugPrint() const;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // ARCHIDEKTENTRY_H
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
#include "edhrec_commander_api_response_average_deck_statistics.h"
|
||||||
|
|
||||||
|
void EdhrecCommanderApiResponseAverageDeckStatistics::fromJson(const QJsonObject &json)
|
||||||
|
{
|
||||||
|
creature = json.value("creature").toInt(0);
|
||||||
|
instant = json.value("instant").toInt(0);
|
||||||
|
sorcery = json.value("sorcery").toInt(0);
|
||||||
|
artifact = json.value("artifact").toInt(0);
|
||||||
|
enchantment = json.value("enchantment").toInt(0);
|
||||||
|
battle = json.value("battle").toInt(0);
|
||||||
|
planeswalker = json.value("planeswalker").toInt(0);
|
||||||
|
land = json.value("land").toInt(0);
|
||||||
|
basic = json.value("basic").toInt(0);
|
||||||
|
nonbasic = json.value("nonbasic").toInt(0);
|
||||||
|
}
|
||||||
@@ -0,0 +1,22 @@
|
|||||||
|
#ifndef AVERAGE_DECK_STATISTICS_H
|
||||||
|
#define AVERAGE_DECK_STATISTICS_H
|
||||||
|
|
||||||
|
#include <QJsonObject>
|
||||||
|
|
||||||
|
// Represents the typical deck statistics (collapsed section)
|
||||||
|
struct EdhrecCommanderApiResponseAverageDeckStatistics
|
||||||
|
{
|
||||||
|
int creature = 0;
|
||||||
|
int instant = 0;
|
||||||
|
int sorcery = 0;
|
||||||
|
int artifact = 0;
|
||||||
|
int enchantment = 0;
|
||||||
|
int battle = 0;
|
||||||
|
int planeswalker = 0;
|
||||||
|
int land = 0;
|
||||||
|
int basic = 0;
|
||||||
|
int nonbasic = 0;
|
||||||
|
|
||||||
|
void fromJson(const QJsonObject &json);
|
||||||
|
};
|
||||||
|
#endif // AVERAGE_DECK_STATISTICS_H
|
||||||
@@ -0,0 +1,49 @@
|
|||||||
|
#include "edhrec_commander_api_response_card_container.h"
|
||||||
|
|
||||||
|
#include <QDebug>
|
||||||
|
#include <QJsonArray>
|
||||||
|
#include <QJsonObject>
|
||||||
|
|
||||||
|
void EdhrecCommanderApiResponseCardContainer::fromJson(const QJsonObject &json)
|
||||||
|
{
|
||||||
|
// Parse breadcrumb
|
||||||
|
QJsonArray breadcrumbArray = json.value("breadcrumb").toArray();
|
||||||
|
for (const QJsonValue &breadcrumbValue : breadcrumbArray) {
|
||||||
|
breadcrumb.push_back(breadcrumbValue.toObject());
|
||||||
|
}
|
||||||
|
|
||||||
|
description = json.value("description").toString();
|
||||||
|
QJsonObject jsonDict = json.value("json_dict").toObject();
|
||||||
|
card.fromJson(jsonDict.value("card").toObject());
|
||||||
|
QJsonArray cardlistsArray = jsonDict.value("cardlists").toArray();
|
||||||
|
|
||||||
|
for (const QJsonValue &cardlistValue : cardlistsArray) {
|
||||||
|
QJsonObject cardlistObj = cardlistValue.toObject();
|
||||||
|
QJsonArray cardviewsArray = cardlistObj.value("cardviews").toArray();
|
||||||
|
EdhrecCommanderApiResponseCardList cardView;
|
||||||
|
cardView.fromJson(cardlistValue.toObject());
|
||||||
|
cardlists.push_back(cardView);
|
||||||
|
}
|
||||||
|
|
||||||
|
keywords = json.value("keywords").toString();
|
||||||
|
title = json.value("title").toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
void EdhrecCommanderApiResponseCardContainer::debugPrint() const
|
||||||
|
{
|
||||||
|
qDebug() << "Breadcrumb:";
|
||||||
|
for (const auto &breadcrumbEntry : breadcrumb) {
|
||||||
|
qDebug() << breadcrumbEntry;
|
||||||
|
}
|
||||||
|
|
||||||
|
qDebug() << "Description:" << description;
|
||||||
|
card.debugPrint();
|
||||||
|
|
||||||
|
qDebug() << "Cardlists:";
|
||||||
|
for (const auto &cardlist : cardlists) {
|
||||||
|
cardlist.debugPrint();
|
||||||
|
}
|
||||||
|
|
||||||
|
qDebug() << "Keywords:" << keywords;
|
||||||
|
qDebug() << "Title:" << title;
|
||||||
|
}
|
||||||
@@ -0,0 +1,60 @@
|
|||||||
|
#ifndef CONTAINER_ENTRY_H
|
||||||
|
#define CONTAINER_ENTRY_H
|
||||||
|
|
||||||
|
#include "edhrec_commander_api_response_card_list.h"
|
||||||
|
#include "edhrec_commander_api_response_commander_details.h"
|
||||||
|
|
||||||
|
#include <QDebug>
|
||||||
|
#include <QJsonArray>
|
||||||
|
#include <QJsonObject>
|
||||||
|
#include <QString>
|
||||||
|
#include <QVector>
|
||||||
|
|
||||||
|
class EdhrecCommanderApiResponseCardContainer
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
// Constructor
|
||||||
|
EdhrecCommanderApiResponseCardContainer() = default;
|
||||||
|
|
||||||
|
// Parse deck-related data from JSON
|
||||||
|
void fromJson(const QJsonObject &json);
|
||||||
|
|
||||||
|
// Debug method for logging
|
||||||
|
void debugPrint() const;
|
||||||
|
|
||||||
|
// Getter methods for deck container
|
||||||
|
const QString &getDescription() const
|
||||||
|
{
|
||||||
|
return description;
|
||||||
|
}
|
||||||
|
const QVector<QJsonObject> &getBreadcrumb() const
|
||||||
|
{
|
||||||
|
return breadcrumb;
|
||||||
|
}
|
||||||
|
const EdhrecCommanderApiResponseCommanderDetails &getCommanderDetails() const
|
||||||
|
{
|
||||||
|
return card;
|
||||||
|
}
|
||||||
|
const QVector<EdhrecCommanderApiResponseCardList> &getCardlists() const
|
||||||
|
{
|
||||||
|
return cardlists;
|
||||||
|
}
|
||||||
|
const QString &getKeywords() const
|
||||||
|
{
|
||||||
|
return keywords;
|
||||||
|
}
|
||||||
|
const QString &getTitle() const
|
||||||
|
{
|
||||||
|
return title;
|
||||||
|
}
|
||||||
|
|
||||||
|
private:
|
||||||
|
QString description;
|
||||||
|
QVector<QJsonObject> breadcrumb;
|
||||||
|
EdhrecCommanderApiResponseCommanderDetails card;
|
||||||
|
QVector<EdhrecCommanderApiResponseCardList> cardlists;
|
||||||
|
QString keywords;
|
||||||
|
QString title;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // CONTAINER_ENTRY_H
|
||||||
@@ -0,0 +1,36 @@
|
|||||||
|
#include "edhrec_commander_api_response_card_details.h"
|
||||||
|
|
||||||
|
#include <QDebug>
|
||||||
|
|
||||||
|
EdhrecCommanderApiResponseCardDetails::EdhrecCommanderApiResponseCardDetails()
|
||||||
|
: synergy(0.0), inclusion(0), numDecks(0), potentialDecks(0)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
void EdhrecCommanderApiResponseCardDetails::fromJson(const QJsonObject &json)
|
||||||
|
{
|
||||||
|
// Parse the fields from the JSON object
|
||||||
|
name = json.value("name").toString();
|
||||||
|
sanitized = json.value("sanitized").toString();
|
||||||
|
sanitizedWo = json.value("sanitized_wo").toString();
|
||||||
|
url = json.value("url").toString();
|
||||||
|
synergy = json.value("synergy").toDouble(0.0);
|
||||||
|
inclusion = json.value("inclusion").toInt(0);
|
||||||
|
label = json.value("label").toString();
|
||||||
|
numDecks = json.value("num_decks").toInt(0);
|
||||||
|
potentialDecks = json.value("potential_decks").toInt(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
void EdhrecCommanderApiResponseCardDetails::debugPrint() const
|
||||||
|
{
|
||||||
|
// Print out all the fields for debugging
|
||||||
|
qDebug() << "Name:" << name;
|
||||||
|
qDebug() << "Sanitized:" << sanitized;
|
||||||
|
qDebug() << "Sanitized Wo:" << sanitizedWo;
|
||||||
|
qDebug() << "URL:" << url;
|
||||||
|
qDebug() << "Synergy:" << synergy;
|
||||||
|
qDebug() << "Inclusion:" << inclusion;
|
||||||
|
qDebug() << "Label:" << label;
|
||||||
|
qDebug() << "Num Decks:" << numDecks;
|
||||||
|
qDebug() << "Potential Decks:" << potentialDecks;
|
||||||
|
}
|
||||||
@@ -0,0 +1,29 @@
|
|||||||
|
#ifndef CARD_VIEW_H
|
||||||
|
#define CARD_VIEW_H
|
||||||
|
|
||||||
|
#include <QJsonObject>
|
||||||
|
#include <QString>
|
||||||
|
|
||||||
|
class EdhrecCommanderApiResponseCardDetails
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
QString name;
|
||||||
|
QString sanitized;
|
||||||
|
QString sanitizedWo;
|
||||||
|
QString url;
|
||||||
|
double synergy;
|
||||||
|
int inclusion;
|
||||||
|
QString label;
|
||||||
|
int numDecks;
|
||||||
|
int potentialDecks;
|
||||||
|
|
||||||
|
EdhrecCommanderApiResponseCardDetails();
|
||||||
|
|
||||||
|
// Method to populate the object from a JSON object
|
||||||
|
void fromJson(const QJsonObject &json);
|
||||||
|
|
||||||
|
// Debug method to print out the data
|
||||||
|
void debugPrint() const;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // CARD_VIEW_H
|
||||||
@@ -0,0 +1,33 @@
|
|||||||
|
#include "edhrec_commander_api_response_card_list.h"
|
||||||
|
|
||||||
|
#include <QDebug>
|
||||||
|
|
||||||
|
EdhrecCommanderApiResponseCardList::EdhrecCommanderApiResponseCardList()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
void EdhrecCommanderApiResponseCardList::fromJson(const QJsonObject &json)
|
||||||
|
{
|
||||||
|
// Parse the header from the JSON object
|
||||||
|
header = json.value("header").toString();
|
||||||
|
|
||||||
|
// Parse the cardviews array and populate cardViews
|
||||||
|
QJsonArray cardviewsArray = json.value("cardviews").toArray();
|
||||||
|
for (const QJsonValue &value : cardviewsArray) {
|
||||||
|
QJsonObject cardviewObj = value.toObject();
|
||||||
|
EdhrecCommanderApiResponseCardDetails cardView;
|
||||||
|
cardView.fromJson(cardviewObj);
|
||||||
|
cardViews.append(cardView);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void EdhrecCommanderApiResponseCardList::debugPrint() const
|
||||||
|
{
|
||||||
|
// Print out the header
|
||||||
|
qDebug() << "Header:" << header;
|
||||||
|
|
||||||
|
// Print out all the CardView objects
|
||||||
|
for (const EdhrecCommanderApiResponseCardDetails &cardView : cardViews) {
|
||||||
|
cardView.debugPrint();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,27 @@
|
|||||||
|
#ifndef CARD_LIST_H
|
||||||
|
#define CARD_LIST_H
|
||||||
|
|
||||||
|
#include "edhrec_commander_api_response_card_details.h"
|
||||||
|
|
||||||
|
#include <QJsonArray>
|
||||||
|
#include <QJsonObject>
|
||||||
|
#include <QList>
|
||||||
|
#include <QString>
|
||||||
|
|
||||||
|
class EdhrecCommanderApiResponseCardList
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
QString header;
|
||||||
|
QList<EdhrecCommanderApiResponseCardDetails> cardViews;
|
||||||
|
|
||||||
|
// Default constructor
|
||||||
|
EdhrecCommanderApiResponseCardList();
|
||||||
|
|
||||||
|
// Method to populate the object from a JSON object
|
||||||
|
void fromJson(const QJsonObject &json);
|
||||||
|
|
||||||
|
// Debug method to print out the data
|
||||||
|
void debugPrint() const;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // CARD_LIST_H
|
||||||
@@ -0,0 +1,31 @@
|
|||||||
|
#include "edhrec_commander_api_response_card_prices.h"
|
||||||
|
|
||||||
|
#include <QDebug>
|
||||||
|
|
||||||
|
void CardPrices::fromJson(const QJsonObject &json)
|
||||||
|
{
|
||||||
|
// Parse prices from various sources
|
||||||
|
cardhoarder = json.value("cardhoarder").toObject();
|
||||||
|
cardkingdom = json.value("cardkingdom").toObject();
|
||||||
|
cardmarket = json.value("cardmarket").toObject();
|
||||||
|
face2face = json.value("face2face").toObject();
|
||||||
|
manapool = json.value("manapool").toObject();
|
||||||
|
mtgstocks = json.value("mtgstocks").toObject();
|
||||||
|
scg = json.value("scg").toObject();
|
||||||
|
tcgl = json.value("tcgl").toObject();
|
||||||
|
tcgplayer = json.value("tcgplayer").toObject();
|
||||||
|
}
|
||||||
|
|
||||||
|
void CardPrices::debugPrint() const
|
||||||
|
{
|
||||||
|
qDebug() << "Card Prices:";
|
||||||
|
qDebug() << "Cardhoarder:" << cardhoarder;
|
||||||
|
qDebug() << "Cardkingdom:" << cardkingdom;
|
||||||
|
qDebug() << "Cardmarket:" << cardmarket;
|
||||||
|
qDebug() << "Face2Face:" << face2face;
|
||||||
|
qDebug() << "Manapool:" << manapool;
|
||||||
|
qDebug() << "Mtgstocks:" << mtgstocks;
|
||||||
|
qDebug() << "SCG:" << scg;
|
||||||
|
qDebug() << "TCGL:" << tcgl;
|
||||||
|
qDebug() << "Tcgplayer:" << tcgplayer;
|
||||||
|
}
|
||||||
@@ -0,0 +1,66 @@
|
|||||||
|
#ifndef EDHREC_COMMANDER_API_RESPONSE_CARD_PRICES_H
|
||||||
|
#define EDHREC_COMMANDER_API_RESPONSE_CARD_PRICES_H
|
||||||
|
|
||||||
|
#include <QJsonObject>
|
||||||
|
|
||||||
|
class CardPrices
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
// Constructor
|
||||||
|
CardPrices() = default;
|
||||||
|
|
||||||
|
// Parse prices from JSON
|
||||||
|
void fromJson(const QJsonObject &json);
|
||||||
|
void debugPrint() const;
|
||||||
|
|
||||||
|
// Getter methods for card prices
|
||||||
|
const QJsonObject &getCardhoarder() const
|
||||||
|
{
|
||||||
|
return cardhoarder;
|
||||||
|
}
|
||||||
|
const QJsonObject &getCardkingdom() const
|
||||||
|
{
|
||||||
|
return cardkingdom;
|
||||||
|
}
|
||||||
|
const QJsonObject &getCardmarket() const
|
||||||
|
{
|
||||||
|
return cardmarket;
|
||||||
|
}
|
||||||
|
const QJsonObject &getFace2face() const
|
||||||
|
{
|
||||||
|
return face2face;
|
||||||
|
}
|
||||||
|
const QJsonObject &getManapool() const
|
||||||
|
{
|
||||||
|
return manapool;
|
||||||
|
}
|
||||||
|
const QJsonObject &getMtgstocks() const
|
||||||
|
{
|
||||||
|
return mtgstocks;
|
||||||
|
}
|
||||||
|
const QJsonObject &getScg() const
|
||||||
|
{
|
||||||
|
return scg;
|
||||||
|
}
|
||||||
|
const QJsonObject &getTcgl() const
|
||||||
|
{
|
||||||
|
return tcgl;
|
||||||
|
}
|
||||||
|
const QJsonObject &getTcgplayer() const
|
||||||
|
{
|
||||||
|
return tcgplayer;
|
||||||
|
}
|
||||||
|
|
||||||
|
private:
|
||||||
|
QJsonObject cardhoarder;
|
||||||
|
QJsonObject cardkingdom;
|
||||||
|
QJsonObject cardmarket;
|
||||||
|
QJsonObject face2face;
|
||||||
|
QJsonObject manapool;
|
||||||
|
QJsonObject mtgstocks;
|
||||||
|
QJsonObject scg;
|
||||||
|
QJsonObject tcgl;
|
||||||
|
QJsonObject tcgplayer;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // EDHREC_COMMANDER_API_RESPONSE_CARD_PRICES_H
|
||||||