mirror of
https://github.com/LizardByte/Sunshine.git
synced 2025-08-10 00:52:16 +00:00
Compare commits
707 Commits
v0.21.0
...
feat/api/a
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5b863f760b | ||
|
|
257a102127 | ||
|
|
5b36357133 | ||
|
|
ce28e36a47 | ||
|
|
23e131439f | ||
|
|
24cce3a666 | ||
|
|
0631472533 | ||
|
|
a5c791658e | ||
|
|
a513acc16b | ||
|
|
64544e7960 | ||
|
|
2a31ee5422 | ||
|
|
8263d8976f | ||
|
|
eb6916ef34 | ||
|
|
5af21bde88 | ||
|
|
31866fde35 | ||
|
|
299b12347f | ||
|
|
2ac87fdc36 | ||
|
|
a88c01f3b8 | ||
|
|
f5b923c406 | ||
|
|
3048e6fe20 | ||
|
|
c2420427b1 | ||
|
|
f57aee9025 | ||
|
|
26566cc04d | ||
|
|
89f097ae65 | ||
|
|
80fa04c330 | ||
|
|
9d3a3826c7 | ||
|
|
bc22cca59b | ||
|
|
1c2d7ec830 | ||
|
|
fb557df270 | ||
|
|
7f0351d125 | ||
|
|
d4052dc72c | ||
|
|
f4d937c0a6 | ||
|
|
53b9be1001 | ||
|
|
820180c9e7 | ||
|
|
a7f64118a8 | ||
|
|
1f2b541df6 | ||
|
|
8392bdc98f | ||
|
|
c369e8e5b6 | ||
|
|
1b94e9339a | ||
|
|
012a99c26d | ||
|
|
40ac718691 | ||
|
|
80ecf19d40 | ||
|
|
6a233cbcbf | ||
|
|
9b9767be0c | ||
|
|
76bea8acb9 | ||
|
|
df0bc3f82f | ||
|
|
b662b8e7c2 | ||
|
|
2e5c291233 | ||
|
|
65878af8ea | ||
|
|
151ff8f2b9 | ||
|
|
d50611c79b | ||
|
|
bb79557a25 | ||
|
|
5793ff74eb | ||
|
|
3b81d0fd19 | ||
|
|
3e47cd3cc8 | ||
|
|
2b6a453174 | ||
|
|
a4a1bc48cd | ||
|
|
60bfcfe211 | ||
|
|
129abd8c26 | ||
|
|
85c3114bf6 | ||
|
|
6cd0cd9e91 | ||
|
|
e47aa9ff37 | ||
|
|
364ef93801 | ||
|
|
43fab08c6a | ||
|
|
e00c45865b | ||
|
|
1e2fc2eb10 | ||
|
|
e062484b46 | ||
|
|
1543f584ab | ||
|
|
0cc98f113e | ||
|
|
f73eb88ba9 | ||
|
|
706e37719f | ||
|
|
5c3bad945a | ||
|
|
0bc3130edf | ||
|
|
af8ef237ad | ||
|
|
8d2e322e1a | ||
|
|
d5854ae224 | ||
|
|
ad7f356aa1 | ||
|
|
9abba8048a | ||
|
|
d1e7865f31 | ||
|
|
fb1f5b5a89 | ||
|
|
d552073eaf | ||
|
|
c40ac8dce9 | ||
|
|
1cab1a5a1e | ||
|
|
54ddf37584 | ||
|
|
738a079eb6 | ||
|
|
410f8c2e70 | ||
|
|
740bbb6609 | ||
|
|
4973448988 | ||
|
|
fc5314b1b6 | ||
|
|
dbf4fa218a | ||
|
|
2ab73869f6 | ||
|
|
39bab450de | ||
|
|
a06d4aefa6 | ||
|
|
c54664bbe0 | ||
|
|
03253fc114 | ||
|
|
9e52ac426d | ||
|
|
9662f0547f | ||
|
|
f418566b31 | ||
|
|
ec0cdcf0fa | ||
|
|
d8fbe2d709 | ||
|
|
ca40cfd268 | ||
|
|
79ada18b49 | ||
|
|
8810c5ccdd | ||
|
|
73d777fa0b | ||
|
|
d2be83fe20 | ||
|
|
d1edd35be2 | ||
|
|
1c2123650f | ||
|
|
de0d633089 | ||
|
|
60cf24225f | ||
|
|
a3ba700522 | ||
|
|
fc78f5a4e0 | ||
|
|
d80fe79f81 | ||
|
|
f429d34ef5 | ||
|
|
95a6e8ba50 | ||
|
|
6fa6a7d515 | ||
|
|
bd2e1dc8c0 | ||
|
|
7352e7277a | ||
|
|
67ab6e3c79 | ||
|
|
63dbf72ad6 | ||
|
|
53bbe3fc55 | ||
|
|
3744c43ea7 | ||
|
|
5b435fd0c1 | ||
|
|
1d80d3946e | ||
|
|
593883a13f | ||
|
|
25ed2d5b4a | ||
|
|
50261bf5ee | ||
|
|
7dd836dab6 | ||
|
|
e0743169be | ||
|
|
ee8cd11983 | ||
|
|
d378c18a81 | ||
|
|
d3ad63654a | ||
|
|
dff1cd48d4 | ||
|
|
b553f68d0f | ||
|
|
4c20355f04 | ||
|
|
319a92a582 | ||
|
|
11975274a3 | ||
|
|
011a872c88 | ||
|
|
756d2e19b2 | ||
|
|
15b91a1ad4 | ||
|
|
0107ca44d7 | ||
|
|
e90b71ce62 | ||
|
|
2c050d1cb0 | ||
|
|
024bd8f8b6 | ||
|
|
9cc8bc8f62 | ||
|
|
fa654c12ef | ||
|
|
fb712e30a0 | ||
|
|
1839d59492 | ||
|
|
434b7e06ce | ||
|
|
fceda35d44 | ||
|
|
5bc32cdeb3 | ||
|
|
ec506bbb2f | ||
|
|
b01ba38774 | ||
|
|
1071f13259 | ||
|
|
e03c598094 | ||
|
|
e10b24ae3f | ||
|
|
68eb8d2fbb | ||
|
|
60f5b10cee | ||
|
|
79446feae3 | ||
|
|
61f51501d0 | ||
|
|
ea871d2135 | ||
|
|
6171c9fbad | ||
|
|
698df6884d | ||
|
|
c63678ddcd | ||
|
|
6875fee479 | ||
|
|
c892026454 | ||
|
|
8098df6c38 | ||
|
|
fd7e68457a | ||
|
|
330ab76fcf | ||
|
|
8c218b576e | ||
|
|
49b2433301 | ||
|
|
e33dea7e3e | ||
|
|
cdc2d1ba00 | ||
|
|
87f0c27aeb | ||
|
|
972fbd2ffe | ||
|
|
a0dfdedbb6 | ||
|
|
3dc267141a | ||
|
|
08c706f6dc | ||
|
|
49319d7688 | ||
|
|
dce250d62d | ||
|
|
a87b44d37b | ||
|
|
d39a0a5fdd | ||
|
|
7ce8547d6e | ||
|
|
9d7e90ec2e | ||
|
|
697e877070 | ||
|
|
0f40a092de | ||
|
|
f6659e6641 | ||
|
|
b95309a244 | ||
|
|
34054a20e1 | ||
|
|
3976b63ee8 | ||
|
|
45265fb103 | ||
|
|
88ce5077b0 | ||
|
|
f048510ef7 | ||
|
|
e15fd551b7 | ||
|
|
bf92fda969 | ||
|
|
ddd67ce01d | ||
|
|
6593fa5d61 | ||
|
|
c9f853dc09 | ||
|
|
d86bff0bc5 | ||
|
|
1c82434345 | ||
|
|
82ad648281 | ||
|
|
764ce03520 | ||
|
|
3088823ffc | ||
|
|
0164be613e | ||
|
|
0a6abb76ab | ||
|
|
9d42b935ab | ||
|
|
8d994b980f | ||
|
|
17c4b26af0 | ||
|
|
170f4dd181 | ||
|
|
537e3e6935 | ||
|
|
c8d0d2b615 | ||
|
|
7c4c905f04 | ||
|
|
727ea9037e | ||
|
|
bfdfcebc80 | ||
|
|
e8c837f412 | ||
|
|
c246c78b13 | ||
|
|
a669b36c31 | ||
|
|
299672795c | ||
|
|
f9c885a414 | ||
|
|
0e153cf292 | ||
|
|
0b8468ca3e | ||
|
|
b6b8e681cb | ||
|
|
19250f13d6 | ||
|
|
6d91e680c5 | ||
|
|
04df80ff6b | ||
|
|
64083c1679 | ||
|
|
9bc09e9d39 | ||
|
|
4bd521bb43 | ||
|
|
adf068e44e | ||
|
|
c6ed640daa | ||
|
|
7737d6f10a | ||
|
|
081fbe0e18 | ||
|
|
4fd6c66edb | ||
|
|
ecc7f2a521 | ||
|
|
444ca98cbf | ||
|
|
459c604803 | ||
|
|
0009c63cc1 | ||
|
|
3d3a298734 | ||
|
|
0b70d46bef | ||
|
|
4afa0ee258 | ||
|
|
369158375f | ||
|
|
f4dda21248 | ||
|
|
aa2cf8e5a9 | ||
|
|
f694137aa4 | ||
|
|
0ca560ced8 | ||
|
|
3935d305ae | ||
|
|
16f62436a9 | ||
|
|
81c6e61594 | ||
|
|
b93756a804 | ||
|
|
1f4e10964f | ||
|
|
e99b178045 | ||
|
|
13a202498d | ||
|
|
aadd6eec19 | ||
|
|
e34f446210 | ||
|
|
3b95397381 | ||
|
|
07fc1063d9 | ||
|
|
5f715d66cd | ||
|
|
d57c66fa9c | ||
|
|
18e7dfb190 | ||
|
|
8187a28afc | ||
|
|
ba68caf6a8 | ||
|
|
df0ba13615 | ||
|
|
a1c6d2a85c | ||
|
|
f3a164e95e | ||
|
|
e7c420dd6e | ||
|
|
037c61dc99 | ||
|
|
6607a28a68 | ||
|
|
30748dd916 | ||
|
|
29410c6412 | ||
|
|
638a7020b7 | ||
|
|
49495a8da3 | ||
|
|
38c13c8fe1 | ||
|
|
c92ed6158a | ||
|
|
5cea1e1458 | ||
|
|
3cc12dfbe7 | ||
|
|
37b60fb2c1 | ||
|
|
acccacf861 | ||
|
|
c92e4f27cd | ||
|
|
0b2487d022 | ||
|
|
9b5a04634e | ||
|
|
3a8f32e9c9 | ||
|
|
defd98d3f5 | ||
|
|
4552f142d7 | ||
|
|
bc7282c000 | ||
|
|
29f01e1225 | ||
|
|
5b881025bb | ||
|
|
a940cdb394 | ||
|
|
90fd3712a8 | ||
|
|
59ff5dcb3c | ||
|
|
67b631ec66 | ||
|
|
070eb8c6b0 | ||
|
|
1dd4b68e1c | ||
|
|
49b6efcdfd | ||
|
|
5b3de5f508 | ||
|
|
761e7cc016 | ||
|
|
7e9a2dd621 | ||
|
|
cac1ca37aa | ||
|
|
4a0704d844 | ||
|
|
10666c0194 | ||
|
|
4683bcaf36 | ||
|
|
13f94f113a | ||
|
|
acd9ae606e | ||
|
|
f3abf59fbf | ||
|
|
429019e47b | ||
|
|
9a82b6810a | ||
|
|
722e5600c6 | ||
|
|
d6dd1ab42b | ||
|
|
ccd65591e9 | ||
|
|
fb18b38f68 | ||
|
|
0c02f8b2a4 | ||
|
|
334267807f | ||
|
|
0c0b4c4610 | ||
|
|
fe22c2f69c | ||
|
|
a5a1988cff | ||
|
|
750255ddc0 | ||
|
|
42aec26305 | ||
|
|
509576d616 | ||
|
|
5f1a17f77d | ||
|
|
7e4c59444e | ||
|
|
b82b4818a1 | ||
|
|
ac01996d0a | ||
|
|
ebc41acf98 | ||
|
|
5f6fe3319c | ||
|
|
2e1eb0c914 | ||
|
|
443be5d403 | ||
|
|
8c0435082d | ||
|
|
02ddbefd44 | ||
|
|
f68de7da93 | ||
|
|
e1f0ca829d | ||
|
|
8c10a0dc0a | ||
|
|
886d88bc5e | ||
|
|
b99047836f | ||
|
|
6e2065ceec | ||
|
|
2034fa5fe7 | ||
|
|
e3662033c0 | ||
|
|
539ca42f67 | ||
|
|
cd5c9ae33f | ||
|
|
add77d22d0 | ||
|
|
9afb1aea00 | ||
|
|
17e0f1a816 | ||
|
|
7371a206a4 | ||
|
|
80eb0517e6 | ||
|
|
1a1833cfba | ||
|
|
f0a00ae356 | ||
|
|
5fcd07ecb1 | ||
|
|
287ac4c0fb | ||
|
|
2d706d3104 | ||
|
|
6a88b83fda | ||
|
|
6d9857bd61 | ||
|
|
992bf9c23e | ||
|
|
8a0762d9f1 | ||
|
|
7702e55476 | ||
|
|
fed482caf0 | ||
|
|
3c341ead45 | ||
|
|
8ce4dc9513 | ||
|
|
348f092ddf | ||
|
|
4a9130126c | ||
|
|
2b18e4c73d | ||
|
|
dd8aee2159 | ||
|
|
c204b2cf5d | ||
|
|
e898be1b7e | ||
|
|
26ceec5f3c | ||
|
|
fdb443a7c6 | ||
|
|
373390e771 | ||
|
|
890b6fd18b | ||
|
|
e6e4dcf017 | ||
|
|
3adb934de3 | ||
|
|
2a1cb25d40 | ||
|
|
aff3b5657f | ||
|
|
1e59e28314 | ||
|
|
f4f343b0c3 | ||
|
|
80d1d94c74 | ||
|
|
d70a17a2fb | ||
|
|
ff54ab2852 | ||
|
|
c5d8e1b1a0 | ||
|
|
b87fd4218f | ||
|
|
786a9acde1 | ||
|
|
9ee6811fe5 | ||
|
|
2cadb815e6 | ||
|
|
542cc71076 | ||
|
|
d8e73cc6d1 | ||
|
|
4b6ff3797e | ||
|
|
81c2ecfc07 | ||
|
|
9c5239cdf8 | ||
|
|
a5bbf36d45 | ||
|
|
0a595dc7d2 | ||
|
|
659a426b03 | ||
|
|
6674090052 | ||
|
|
4e49db9fd5 | ||
|
|
b4c12cb77c | ||
|
|
26e0ff8a14 | ||
|
|
c6fc12a0a4 | ||
|
|
9d5ee2f57d | ||
|
|
7fb8c76590 | ||
|
|
9288775351 | ||
|
|
067efc7912 | ||
|
|
68c0f53bfc | ||
|
|
dc22e24744 | ||
|
|
8eead6597e | ||
|
|
6c0b01737f | ||
|
|
b4e6873649 | ||
|
|
24597178c7 | ||
|
|
05416bb9c2 | ||
|
|
15386f386a | ||
|
|
38fa794009 | ||
|
|
75fce21761 | ||
|
|
abe256144a | ||
|
|
ad2483416d | ||
|
|
87def6db85 | ||
|
|
9e0182be9c | ||
|
|
50a02dbce5 | ||
|
|
69191cafe9 | ||
|
|
c896dabb82 | ||
|
|
ec8170cb40 | ||
|
|
5db8af8a3f | ||
|
|
76d08eb883 | ||
|
|
fb4d4f50ec | ||
|
|
358bb30c3c | ||
|
|
25d8e2b478 | ||
|
|
a4d9ee3fa4 | ||
|
|
f87bc86b4a | ||
|
|
fcd4c07bd0 | ||
|
|
5c1bad7155 | ||
|
|
d14323244e | ||
|
|
6a01e58f61 | ||
|
|
ad66fcb243 | ||
|
|
ad5b816261 | ||
|
|
7602fa110c | ||
|
|
7e26d2fd30 | ||
|
|
116e59292a | ||
|
|
1a48244a0a | ||
|
|
33ba03c679 | ||
|
|
93e622342c | ||
|
|
7f795f0e19 | ||
|
|
b7aa8119f1 | ||
|
|
3c13027a61 | ||
|
|
1e77d0a509 | ||
|
|
59ce8deb97 | ||
|
|
1ed22ab3b2 | ||
|
|
42b4192a04 | ||
|
|
4fe3848d32 | ||
|
|
89207a13f2 | ||
|
|
cd465652f0 | ||
|
|
699b2c160e | ||
|
|
e1588787f0 | ||
|
|
73fe31dbd2 | ||
|
|
2da6fb050a | ||
|
|
a1edc246f5 | ||
|
|
bb7c2d50ef | ||
|
|
6d1805b3fa | ||
|
|
9020c2c229 | ||
|
|
b4739b05c6 | ||
|
|
1329c510b1 | ||
|
|
991fab9370 | ||
|
|
376a2822bd | ||
|
|
2b059c6797 | ||
|
|
ae71a6ad83 | ||
|
|
2af0ce364d | ||
|
|
3b6a59af05 | ||
|
|
526121d81d | ||
|
|
e5ef0375f3 | ||
|
|
de97eacd30 | ||
|
|
1bd75bbeb0 | ||
|
|
8f1692a5ac | ||
|
|
8eb3ea4fa3 | ||
|
|
13aea3cbd8 | ||
|
|
89e8b9628c | ||
|
|
934f81182a | ||
|
|
87774333f3 | ||
|
|
8316f44e10 | ||
|
|
7534fa1023 | ||
|
|
bd5c50041c | ||
|
|
15c5e76ed4 | ||
|
|
8c9e14e335 | ||
|
|
aa1985dec8 | ||
|
|
f66a7d5da6 | ||
|
|
b523945f48 | ||
|
|
476141d740 | ||
|
|
c43dd2489f | ||
|
|
22736c4ce9 | ||
|
|
3e49e25c63 | ||
|
|
0bfad20d4c | ||
|
|
1859e23cd5 | ||
|
|
c13a30db78 | ||
|
|
d8877982ff | ||
|
|
e383ab9956 | ||
|
|
97467ea355 | ||
|
|
3181d91edf | ||
|
|
3117fa57ec | ||
|
|
91744960c1 | ||
|
|
a2785baf0a | ||
|
|
bc0a4786f4 | ||
|
|
cb4bfaa2f4 | ||
|
|
74ce047a4b | ||
|
|
278567f72d | ||
|
|
9d5b01727e | ||
|
|
33e99e1feb | ||
|
|
ce3b625983 | ||
|
|
7cdd156bce | ||
|
|
f5dd0d4eaf | ||
|
|
06c0ed1d1c | ||
|
|
972e5d2b14 | ||
|
|
6aeaaf5ec9 | ||
|
|
3b3e6818f3 | ||
|
|
c86a4e112b | ||
|
|
9e299c295d | ||
|
|
3f215968ad | ||
|
|
b99a9e92be | ||
|
|
4ebc7b5cef | ||
|
|
9f94eebd32 | ||
|
|
cacadc4df4 | ||
|
|
529f1b84f8 | ||
|
|
8d5a9054ec | ||
|
|
5606840c89 | ||
|
|
1ab30aa70b | ||
|
|
75a97883e7 | ||
|
|
e430f51e2f | ||
|
|
cb57322190 | ||
|
|
8081f4167e | ||
|
|
2e97c55005 | ||
|
|
84316b5ccd | ||
|
|
dfb212cc3c | ||
|
|
e9bb5697b0 | ||
|
|
4252f5df7c | ||
|
|
15272fb47e | ||
|
|
a0d5973799 | ||
|
|
1020d0c133 | ||
|
|
83e3ea5aa7 | ||
|
|
53b2217a34 | ||
|
|
c605a4da2b | ||
|
|
11c5b64d39 | ||
|
|
8a7a6c48f8 | ||
|
|
c6f94e93e0 | ||
|
|
dde804f14b | ||
|
|
341fdaad77 | ||
|
|
8074bf8c8d | ||
|
|
d1a635809a | ||
|
|
56da68c863 | ||
|
|
6ddc4b7ba3 | ||
|
|
69a3edd9b0 | ||
|
|
8689469ea8 | ||
|
|
a420760d36 | ||
|
|
65493d09e8 | ||
|
|
78ed91af5c | ||
|
|
c0ad9639c4 | ||
|
|
11c8cf176c | ||
|
|
cd2153f340 | ||
|
|
1c50bc502b | ||
|
|
d91e2c9ecb | ||
|
|
358aac9277 | ||
|
|
aa76b2398b | ||
|
|
ee93890d86 | ||
|
|
0aa4f06c39 | ||
|
|
8373a8b947 | ||
|
|
aee88f336a | ||
|
|
38d45b39ae | ||
|
|
ff8c8ce3ab | ||
|
|
040c3a6916 | ||
|
|
76e160bb0a | ||
|
|
dea1155983 | ||
|
|
be6f856840 | ||
|
|
b7a3985807 | ||
|
|
71d88ef9c9 | ||
|
|
3578727ff9 | ||
|
|
f80b23750b | ||
|
|
ca29eac53a | ||
|
|
e62d6915db | ||
|
|
328a300550 | ||
|
|
2008bc0eaa | ||
|
|
bb3b7984f3 | ||
|
|
5c9533f6d7 | ||
|
|
c7700f96fc | ||
|
|
fe8b0bad92 | ||
|
|
190ea41b2e | ||
|
|
5e948dc835 | ||
|
|
f82c3cbc99 | ||
|
|
f70c3f1c0e | ||
|
|
cf416f55e1 | ||
|
|
8182f592e8 | ||
|
|
9a3553db04 | ||
|
|
3b11bc86b0 | ||
|
|
a15bd65391 | ||
|
|
9dfe97d405 | ||
|
|
65851407b1 | ||
|
|
3f31400e7f | ||
|
|
75b6e1f1d8 | ||
|
|
0d4dfcd708 | ||
|
|
52511f3ccb | ||
|
|
fe886632dc | ||
|
|
6ded2a9577 | ||
|
|
ede59e17d8 | ||
|
|
66150872b0 | ||
|
|
270716b862 | ||
|
|
bf1b9a20ec | ||
|
|
bed58cf8b9 | ||
|
|
a10ec3a98a | ||
|
|
c88fa655f5 | ||
|
|
23fb07d4a2 | ||
|
|
2f80145b8e | ||
|
|
6b5a712506 | ||
|
|
3d6e7f447a | ||
|
|
77b0bab374 | ||
|
|
6cdb7f7d03 | ||
|
|
2e995355dc | ||
|
|
21e4450ee1 | ||
|
|
404b434754 | ||
|
|
f64712f277 | ||
|
|
8a86678d62 | ||
|
|
b94f8c0b50 | ||
|
|
df2d728af7 | ||
|
|
35b785ebb8 | ||
|
|
701b7081b1 | ||
|
|
d0049da2df | ||
|
|
c1a3903d20 | ||
|
|
bc3ab8a000 | ||
|
|
ec1ae4a3fe | ||
|
|
1ccda51df9 | ||
|
|
937d0d810c | ||
|
|
545af98459 | ||
|
|
056281b745 | ||
|
|
3fb384f868 | ||
|
|
593e170da8 | ||
|
|
d05a67166e | ||
|
|
de7b81e3b4 | ||
|
|
d873c8b088 | ||
|
|
b5fae464b6 | ||
|
|
88d46914ca | ||
|
|
60c95d6385 | ||
|
|
f88df0f596 | ||
|
|
791ed48a3f | ||
|
|
7d751f050e | ||
|
|
c7e5df5976 | ||
|
|
bc6cc2078e | ||
|
|
0dff8b16fd | ||
|
|
ebe01ce20b | ||
|
|
3adf9e5967 | ||
|
|
e1771de37a | ||
|
|
0403ad147a | ||
|
|
1bd45ca803 | ||
|
|
556d9586e9 | ||
|
|
a01a15a54b | ||
|
|
43992e7e9b | ||
|
|
0f640b8dd9 | ||
|
|
a9b459cdb1 | ||
|
|
beb51cc925 | ||
|
|
52e5662dd9 | ||
|
|
e7a3c485ee | ||
|
|
9a3106fcef | ||
|
|
caf5e02d8b | ||
|
|
3ca75bee19 | ||
|
|
729922d2c0 | ||
|
|
6ea836c511 | ||
|
|
97c921629a | ||
|
|
852db4877d | ||
|
|
c0164caaaa | ||
|
|
a452402267 | ||
|
|
8d14e7c6f1 | ||
|
|
faeeb7ec57 | ||
|
|
44b34d1e23 | ||
|
|
fe3bf0ee6f | ||
|
|
64be0aa67a | ||
|
|
d97f724e3b | ||
|
|
8efc15b58f | ||
|
|
a6ffeb4b53 | ||
|
|
66e31a21fb | ||
|
|
7640c504fa | ||
|
|
081936879b | ||
|
|
a9f2679a49 | ||
|
|
11d472362c | ||
|
|
0d7811ad43 | ||
|
|
eca26e664b | ||
|
|
1540f2cd52 | ||
|
|
b215fe0cd9 | ||
|
|
c27725c73b | ||
|
|
0e479bd476 | ||
|
|
96e7443cab | ||
|
|
5bdbda90b5 | ||
|
|
6b7b5996cc | ||
|
|
068c3fa303 | ||
|
|
4c984cacb5 | ||
|
|
88fc8f845b | ||
|
|
ef9ec40509 | ||
|
|
09ab49a869 | ||
|
|
1dbfdbcf4f | ||
|
|
a932f6bee8 | ||
|
|
a851ef6068 | ||
|
|
a009d1314f | ||
|
|
47b5fc1fc0 | ||
|
|
4a2f7023ec | ||
|
|
6dcc5e7c0f | ||
|
|
bd03ef974c | ||
|
|
3b9e37e1dd | ||
|
|
336062d467 | ||
|
|
29a1b1539f | ||
|
|
0a563947ea | ||
|
|
ca41c9d6f4 | ||
|
|
df72135ea1 | ||
|
|
842a4cf7b2 | ||
|
|
ab3ff2d355 | ||
|
|
3212b036a1 | ||
|
|
5b052d7c2c | ||
|
|
8096364a0a | ||
|
|
f80251f172 | ||
|
|
2617241d7b | ||
|
|
48a6d2af6f | ||
|
|
e7fc2ed49a | ||
|
|
82d0ff6699 | ||
|
|
ff688d9235 |
@@ -6,27 +6,34 @@
|
||||
# Generated from CLion C/C++ Code Style settings
|
||||
BasedOnStyle: LLVM
|
||||
AccessModifierOffset: -2
|
||||
AlignAfterOpenBracket: DontAlign
|
||||
AlignConsecutiveAssignments: false
|
||||
AlignAfterOpenBracket: BlockIndent
|
||||
AlignConsecutiveAssignments: None
|
||||
AlignEscapedNewlines: DontAlign
|
||||
AlignOperands: Align
|
||||
AllowAllArgumentsOnNextLine: false
|
||||
AllowAllConstructorInitializersOnNextLine: false
|
||||
AllowAllParametersOfDeclarationOnNextLine: false
|
||||
AllowShortBlocksOnASingleLine: Always
|
||||
AllowShortBlocksOnASingleLine: Empty
|
||||
AllowShortCaseLabelsOnASingleLine: false
|
||||
AllowShortFunctionsOnASingleLine: All
|
||||
AllowShortIfStatementsOnASingleLine: WithoutElse
|
||||
AllowShortLambdasOnASingleLine: All
|
||||
AllowShortEnumsOnASingleLine: false
|
||||
AllowShortFunctionsOnASingleLine: Empty
|
||||
AllowShortIfStatementsOnASingleLine: Never
|
||||
AllowShortLambdasOnASingleLine: None
|
||||
AllowShortLoopsOnASingleLine: true
|
||||
AlignTrailingComments: false
|
||||
AlwaysBreakAfterReturnType: All
|
||||
AlwaysBreakAfterDefinitionReturnType: None
|
||||
AlwaysBreakAfterReturnType: None
|
||||
AlwaysBreakBeforeMultilineStrings: true
|
||||
AlwaysBreakTemplateDeclarations: MultiLine
|
||||
BreakBeforeBraces: Custom
|
||||
BinPackArguments: false
|
||||
BinPackParameters: false
|
||||
BracedInitializerIndentWidth: 2
|
||||
BraceWrapping:
|
||||
AfterCaseLabel: false
|
||||
AfterClass: false
|
||||
AfterControlStatement: Never
|
||||
AfterEnum: false
|
||||
AfterExternBlock: true
|
||||
AfterFunction: false
|
||||
AfterNamespace: false
|
||||
AfterObjCDeclaration: false
|
||||
@@ -36,39 +43,75 @@ BraceWrapping:
|
||||
IndentBraces: false
|
||||
SplitEmptyFunction: false
|
||||
SplitEmptyRecord: true
|
||||
BreakArrays: true
|
||||
BreakBeforeBinaryOperators: None
|
||||
BreakBeforeBraces: Attach
|
||||
BreakBeforeTernaryOperators: false
|
||||
BreakConstructorInitializers: AfterColon
|
||||
BreakInheritanceList: AfterColon
|
||||
ColumnLimit: 0
|
||||
CompactNamespaces: false
|
||||
ContinuationIndentWidth: 2
|
||||
Cpp11BracedListStyle: true
|
||||
EmptyLineAfterAccessModifier: Never
|
||||
EmptyLineBeforeAccessModifier: Always
|
||||
ExperimentalAutoDetectBinPacking: true
|
||||
FixNamespaceComments: true
|
||||
IncludeBlocks: Regroup
|
||||
IndentAccessModifiers: false
|
||||
IndentCaseBlocks: true
|
||||
IndentCaseLabels: true
|
||||
IndentExternBlock: Indent
|
||||
IndentGotoLabels: true
|
||||
IndentPPDirectives: BeforeHash
|
||||
IndentWidth: 2
|
||||
IndentWrappedFunctionNames: true
|
||||
InsertBraces: true
|
||||
InsertNewlineAtEOF: true
|
||||
KeepEmptyLinesAtTheStartOfBlocks: false
|
||||
LineEnding: LF
|
||||
MaxEmptyLinesToKeep: 1
|
||||
NamespaceIndentation: All
|
||||
ObjCBinPackProtocolList: Never
|
||||
ObjCSpaceAfterProperty: true
|
||||
ObjCSpaceBeforeProtocolList: true
|
||||
PackConstructorInitializers: Never
|
||||
PenaltyBreakBeforeFirstCallParameter: 1
|
||||
PenaltyBreakComment: 1
|
||||
PenaltyBreakString: 1
|
||||
PenaltyBreakFirstLessLess: 0
|
||||
PenaltyExcessCharacter: 1000000
|
||||
PenaltyReturnTypeOnItsOwnLine: 100000000
|
||||
PointerAlignment: Right
|
||||
ReferenceAlignment: Pointer
|
||||
ReflowComments: true
|
||||
RemoveBracesLLVM: false
|
||||
RemoveSemicolon: false
|
||||
SeparateDefinitionBlocks: Always
|
||||
SortIncludes: CaseInsensitive
|
||||
SortUsingDeclarations: Lexicographic
|
||||
SpaceAfterCStyleCast: true
|
||||
SpaceAfterLogicalNot: false
|
||||
SpaceAfterTemplateKeyword: true
|
||||
SpaceAfterTemplateKeyword: false
|
||||
SpaceBeforeAssignmentOperators: true
|
||||
SpaceBeforeCaseColon: false
|
||||
SpaceBeforeCpp11BracedList: true
|
||||
SpaceBeforeCtorInitializerColon: false
|
||||
SpaceBeforeInheritanceColon: false
|
||||
SpaceBeforeJsonColon: false
|
||||
SpaceBeforeParens: ControlStatements
|
||||
SpaceBeforeRangeBasedForLoopColon: true
|
||||
SpaceBeforeSquareBrackets: false
|
||||
SpaceInEmptyBlock: false
|
||||
SpaceInEmptyParentheses: false
|
||||
SpacesBeforeTrailingComments: 2
|
||||
SpacesInAngles: Never
|
||||
SpacesInCStyleCastParentheses: false
|
||||
SpacesInContainerLiterals: false
|
||||
SpacesInLineCommentPrefix:
|
||||
Maximum: 3
|
||||
Minimum: 1
|
||||
SpacesInParentheses: false
|
||||
SpacesInSquareBrackets: false
|
||||
TabWidth: 2
|
||||
Cpp11BracedListStyle: false
|
||||
UseTab: Never
|
||||
|
||||
11
.codeql-prebuild-cpp-Linux.sh
Normal file
11
.codeql-prebuild-cpp-Linux.sh
Normal file
@@ -0,0 +1,11 @@
|
||||
# install dependencies for C++ analysis
|
||||
set -e
|
||||
|
||||
chmod +x ./scripts/linux_build.sh
|
||||
./scripts/linux_build.sh --skip-package --ubuntu-test-repo
|
||||
|
||||
# Delete CUDA
|
||||
rm -rf ./build/cuda
|
||||
|
||||
# skip autobuild
|
||||
echo "skip_autobuild=true" >> "$GITHUB_OUTPUT"
|
||||
37
.codeql-prebuild-cpp-Windows.sh
Normal file
37
.codeql-prebuild-cpp-Windows.sh
Normal file
@@ -0,0 +1,37 @@
|
||||
# install dependencies for C++ analysis
|
||||
set -e
|
||||
|
||||
# update pacman
|
||||
pacman --noconfirm -Syu
|
||||
|
||||
# install dependencies
|
||||
dependencies=(
|
||||
"git"
|
||||
"mingw-w64-ucrt-x86_64-boost"
|
||||
"mingw-w64-ucrt-x86_64-cmake"
|
||||
"mingw-w64-ucrt-x86_64-cppwinrt"
|
||||
"mingw-w64-ucrt-x86_64-curl-winssl"
|
||||
"mingw-w64-ucrt-x86_64-MinHook"
|
||||
"mingw-w64-ucrt-x86_64-miniupnpc"
|
||||
"mingw-w64-ucrt-x86_64-nlohmann-json"
|
||||
"mingw-w64-ucrt-x86_64-nodejs"
|
||||
"mingw-w64-ucrt-x86_64-nsis"
|
||||
"mingw-w64-ucrt-x86_64-onevpl"
|
||||
"mingw-w64-ucrt-x86_64-openssl"
|
||||
"mingw-w64-ucrt-x86_64-opus"
|
||||
"mingw-w64-ucrt-x86_64-toolchain"
|
||||
)
|
||||
pacman -S --noconfirm "${dependencies[@]}"
|
||||
|
||||
# build
|
||||
mkdir -p build
|
||||
cmake \
|
||||
-B build \
|
||||
-G Ninja \
|
||||
-S . \
|
||||
-DBUILD_DOCS=OFF \
|
||||
-DBUILD_WERROR=ON
|
||||
ninja -C build
|
||||
|
||||
# skip autobuild
|
||||
echo "skip_autobuild=true" >> "$GITHUB_OUTPUT"
|
||||
29
.codeql-prebuild-cpp-macOS.sh
Normal file
29
.codeql-prebuild-cpp-macOS.sh
Normal file
@@ -0,0 +1,29 @@
|
||||
# install dependencies for C++ analysis
|
||||
set -e
|
||||
|
||||
# install dependencies
|
||||
dependencies=(
|
||||
"boost"
|
||||
"cmake"
|
||||
"miniupnpc"
|
||||
"ninja"
|
||||
"node"
|
||||
"openssl@3"
|
||||
"opus"
|
||||
"pkg-config"
|
||||
)
|
||||
brew install "${dependencies[@]}"
|
||||
|
||||
# build
|
||||
mkdir -p build
|
||||
cmake \
|
||||
-B build \
|
||||
-G Ninja \
|
||||
-S . \
|
||||
-DBOOST_USE_STATIC=OFF \
|
||||
-DBUILD_DOCS=OFF \
|
||||
-DBUILD_WERROR=ON
|
||||
ninja -C build
|
||||
|
||||
# skip autobuild
|
||||
echo "skip_autobuild=true" >> "$GITHUB_OUTPUT"
|
||||
@@ -1,55 +0,0 @@
|
||||
# install dependencies for C++ analysis
|
||||
|
||||
sudo apt-get update -y
|
||||
sudo apt-get install -y \
|
||||
build-essential \
|
||||
gcc-10 \
|
||||
g++-10 \
|
||||
libayatana-appindicator3-dev \
|
||||
libavdevice-dev \
|
||||
libboost-filesystem-dev \
|
||||
libboost-locale-dev \
|
||||
libboost-log-dev \
|
||||
libboost-program-options-dev \
|
||||
libcap-dev \
|
||||
libcurl4-openssl-dev \
|
||||
libdrm-dev \
|
||||
libevdev-dev \
|
||||
libmfx-dev \
|
||||
libnotify-dev \
|
||||
libnuma-dev \
|
||||
libopus-dev \
|
||||
libpulse-dev \
|
||||
libssl-dev \
|
||||
libva-dev \
|
||||
libvdpau-dev \
|
||||
libwayland-dev \
|
||||
libx11-dev \
|
||||
libxcb-shm0-dev \
|
||||
libxcb-xfixes0-dev \
|
||||
libxcb1-dev \
|
||||
libxfixes-dev \
|
||||
libxrandr-dev \
|
||||
libxtst-dev \
|
||||
wget
|
||||
|
||||
# clean apt cache
|
||||
sudo apt-get clean
|
||||
sudo rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Update gcc alias
|
||||
# https://stackoverflow.com/a/70653945/11214013
|
||||
sudo update-alternatives --install \
|
||||
/usr/bin/gcc gcc /usr/bin/gcc-10 100 \
|
||||
--slave /usr/bin/g++ g++ /usr/bin/g++-10 \
|
||||
--slave /usr/bin/gcov gcov /usr/bin/gcov-10 \
|
||||
--slave /usr/bin/gcc-ar gcc-ar /usr/bin/gcc-ar-10 \
|
||||
--slave /usr/bin/gcc-ranlib gcc-ranlib /usr/bin/gcc-ranlib-10
|
||||
|
||||
# Install CUDA
|
||||
sudo wget \
|
||||
https://developer.download.nvidia.com/compute/cuda/11.8.0/local_installers/cuda_11.8.0_520.61.05_linux.run \
|
||||
--progress=bar:force:noscroll -q --show-progress -O /root/cuda.run
|
||||
sudo chmod a+x /root/cuda.run
|
||||
sudo /root/cuda.run --silent --toolkit --toolkitpath=/usr --no-opengl-libs --no-man-page --no-drm
|
||||
sudo rm /root/cuda.run
|
||||
@@ -4,15 +4,22 @@
|
||||
# do not ignore .git, needed for versioning
|
||||
!/.git
|
||||
|
||||
# do not ignore .rstcheck.cfg, needed to test building docs
|
||||
!/.rstcheck.cfg
|
||||
|
||||
# ignore repo directories and files
|
||||
docs/
|
||||
docker/
|
||||
gh-pages-template/
|
||||
scripts/
|
||||
tools/
|
||||
crowdin.yml
|
||||
|
||||
# don't ignore linux build script
|
||||
!scripts/linux_build.sh
|
||||
|
||||
# ignore dev directories
|
||||
build/
|
||||
cmake-*/
|
||||
venv/
|
||||
|
||||
# ignore artifacts
|
||||
|
||||
3
.flake8
3
.flake8
@@ -1,7 +1,6 @@
|
||||
[flake8]
|
||||
filename =
|
||||
*.py,
|
||||
*.pys
|
||||
*.py
|
||||
max-line-length = 120
|
||||
extend-exclude =
|
||||
venv/
|
||||
|
||||
6
.gitattributes
vendored
Normal file
6
.gitattributes
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
# ensure dockerfiles are checked out with LF line endings
|
||||
Dockerfile text eol=lf
|
||||
*.dockerfile text eol=lf
|
||||
|
||||
# ensure flatpak lint json files are checked out with LF line endings
|
||||
*flatpak-lint-*.json text eol=lf
|
||||
64
.github/ISSUE_TEMPLATE/bug-report.yml
vendored
64
.github/ISSUE_TEMPLATE/bug-report.yml
vendored
@@ -7,33 +7,32 @@ body:
|
||||
value: >
|
||||
**THIS IS NOT THE PLACE TO ASK FOR SUPPORT!**
|
||||
Please use our [Support Center](https://app.lizardbyte.dev/support) for support issues.
|
||||
Non actionable bug reports will be locked and closed!
|
||||
Non actionable bug reports will be LOCKED and CLOSED!
|
||||
- type: checkboxes
|
||||
attributes:
|
||||
label: Is there an existing issue for this?
|
||||
description: Please search to see if an issue already exists for the bug you encountered.
|
||||
options:
|
||||
- label: I have searched the existing issues
|
||||
required: true
|
||||
- type: checkboxes
|
||||
attributes:
|
||||
label: Is your issue described in the documentation?
|
||||
description: Please read our [documentation](https://docs.lizardbyte.dev/projects/sunshine)
|
||||
options:
|
||||
- label: I have read the documentation
|
||||
required: true
|
||||
- type: checkboxes
|
||||
- type: dropdown
|
||||
attributes:
|
||||
label: Is your issue present in the nightly release?
|
||||
description: Please test the [nightly](https://github.com/LizardByte/Sunshine/releases/tag/nightly-dev) release
|
||||
label: Is your issue present in the latest beta/pre-release?
|
||||
description: Please test the latest [pre-release](https://github.com/LizardByte/Sunshine/releases).
|
||||
options:
|
||||
- label: This issue is present in the nightly release
|
||||
required: true
|
||||
- "I didn't read the issue template"
|
||||
- "I'm too lazy to test"
|
||||
- "This issue is present in the latest pre-release"
|
||||
- type: textarea
|
||||
id: description
|
||||
attributes:
|
||||
label: Describe the Bug
|
||||
description: A clear and concise description of the bug.
|
||||
description: A clear and concise description of the bug, list the reproduction steps.
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
@@ -71,9 +70,8 @@ body:
|
||||
attributes:
|
||||
label: Architecture
|
||||
options:
|
||||
- 32 bit
|
||||
- 64 bit
|
||||
- arm
|
||||
- amd64/x86_64
|
||||
- arm64/aarch64
|
||||
- other, n/a
|
||||
validations:
|
||||
required: true
|
||||
@@ -81,7 +79,9 @@ body:
|
||||
id: version
|
||||
attributes:
|
||||
label: Sunshine commit or version
|
||||
placeholder: eg. 0.18.0
|
||||
description: |
|
||||
Use `sunshine --verison` to get the version, or get the version from web UI.
|
||||
Please don't just copy the latest commit from our repo, if that's not the commit you're actually using.
|
||||
validations:
|
||||
required: true
|
||||
- type: dropdown
|
||||
@@ -94,19 +94,21 @@ body:
|
||||
- Linux - AUR (Third Party)
|
||||
- Linux - deb
|
||||
- Linux - Docker
|
||||
- Linux - flatpak
|
||||
- Linux - Fedora Copr
|
||||
- Linux - flathub/flatpak
|
||||
- Linux - Homebrew
|
||||
- Linux - LizardByte/pacman-repo
|
||||
- Linux - nixpkgs (Third Party)
|
||||
- Linux - PKGBUILD
|
||||
- Linux - pkg.tar.zst
|
||||
- Linux - rpm
|
||||
- Linux - solus (Third Party)
|
||||
- macOS - dmg
|
||||
- Linux - Unraid (Third Party)
|
||||
- macOS - Homebrew
|
||||
- macOS - Portfile
|
||||
- Windows - Chocolatey (Third Party)
|
||||
- Windows - installer
|
||||
- Windows - portable
|
||||
- Windows - installer (recommended)
|
||||
- Windows - portable (not recommended)
|
||||
- Windows - Scoop (Third Party)
|
||||
- Windows - Winget (Third Party)
|
||||
- Windows - Winget
|
||||
- other (not listed)
|
||||
- other (self built)
|
||||
- other (fork of this repo)
|
||||
@@ -120,8 +122,9 @@ body:
|
||||
description: The type of the installed graphics card.
|
||||
options:
|
||||
- AMD
|
||||
- Apple Silicon
|
||||
- Intel
|
||||
- Nvidia
|
||||
- NVIDIA
|
||||
- none (software encoding)
|
||||
- n/a
|
||||
validations:
|
||||
@@ -131,7 +134,6 @@ body:
|
||||
attributes:
|
||||
label: GPU Model
|
||||
description: The model of the installed graphics card.
|
||||
placeholder: e.g. GeForce RTX 2080 SUPER
|
||||
validations:
|
||||
required: true
|
||||
- type: input
|
||||
@@ -139,15 +141,21 @@ body:
|
||||
attributes:
|
||||
label: GPU Driver/Mesa Version
|
||||
description: The driver/mesa version of the installed graphics card.
|
||||
placeholder: e.g. 497.29
|
||||
validations:
|
||||
required: true
|
||||
- type: input
|
||||
- type: dropdown
|
||||
id: capture_method
|
||||
attributes:
|
||||
label: Capture Method (Linux Only)
|
||||
description: If on Linux, the capture method being used.
|
||||
placeholder: e.g. PipeWire/KVM/X11/KMS
|
||||
label: Capture Method
|
||||
description: The capture method being used.
|
||||
options:
|
||||
- AVCaptureScreen (macOS)
|
||||
- KMS (Linux)
|
||||
- NvFBC (Linux)
|
||||
- wlroots (Linux)
|
||||
- X11 (Linux)
|
||||
- Desktop Duplication API (Windows)
|
||||
- Windows.Graphics.Capture (Windows)
|
||||
validations:
|
||||
required: false
|
||||
- type: textarea
|
||||
@@ -158,7 +166,7 @@ body:
|
||||
Please copy and paste your config (`sunshine.conf`) file.
|
||||
render: Shell
|
||||
validations:
|
||||
required: true
|
||||
required: false
|
||||
- type: textarea
|
||||
id: apps
|
||||
attributes:
|
||||
|
||||
8
.github/ISSUE_TEMPLATE/config.yml
vendored
8
.github/ISSUE_TEMPLATE/config.yml
vendored
@@ -1,5 +1,5 @@
|
||||
---
|
||||
# This action is centrally managed in https://github.com/<organization>/.github/
|
||||
# This file is centrally managed in https://github.com/<organization>/.github/
|
||||
# Don't make changes to this file in this repo as they will be overwritten with changes made to the same file in
|
||||
# the above-mentioned repo.
|
||||
|
||||
@@ -8,6 +8,6 @@ contact_links:
|
||||
- name: Support Center
|
||||
url: https://app.lizardbyte.dev/support
|
||||
about: Official LizardByte support
|
||||
- name: Feature request
|
||||
url: https://ideas.moonlight-stream.org
|
||||
about: Share your suggestions or ideas to help Moonlight and Sunshine improve
|
||||
- name: Discussions
|
||||
url: https://github.com/orgs/LizardByte/discussions
|
||||
about: Community discussions, questions, and feature requests
|
||||
|
||||
32
.github/dependabot.yml
vendored
32
.github/dependabot.yml
vendored
@@ -1,10 +1,17 @@
|
||||
---
|
||||
# This action is centrally managed in https://github.com/<organization>/.github/
|
||||
# This file is centrally managed in https://github.com/<organization>/.github/
|
||||
# Don't make changes to this file in this repo as they will be overwritten with changes made to the same file in
|
||||
# the above-mentioned repo.
|
||||
|
||||
version: 2
|
||||
updates:
|
||||
- package-ecosystem: "cargo"
|
||||
directory: "/"
|
||||
schedule:
|
||||
interval: "daily"
|
||||
time: "07:30"
|
||||
open-pull-requests-limit: 10
|
||||
|
||||
- package-ecosystem: "docker"
|
||||
directory: "/"
|
||||
schedule:
|
||||
@@ -18,6 +25,20 @@ updates:
|
||||
interval: "daily"
|
||||
time: "08:30"
|
||||
open-pull-requests-limit: 10
|
||||
groups:
|
||||
docker-actions:
|
||||
applies-to: version-updates
|
||||
patterns:
|
||||
- "docker/*"
|
||||
github-actions:
|
||||
applies-to: version-updates
|
||||
patterns:
|
||||
- "actions/*"
|
||||
- "github/*"
|
||||
lizardbyte-actions:
|
||||
applies-to: version-updates
|
||||
patterns:
|
||||
- "LizardByte/*"
|
||||
|
||||
- package-ecosystem: "npm"
|
||||
directory: "/"
|
||||
@@ -25,6 +46,10 @@ updates:
|
||||
interval: "daily"
|
||||
time: "09:00"
|
||||
open-pull-requests-limit: 10
|
||||
groups:
|
||||
dev-dependencies:
|
||||
applies-to: version-updates
|
||||
dependency-type: "development"
|
||||
|
||||
- package-ecosystem: "nuget"
|
||||
directory: "/"
|
||||
@@ -39,6 +64,11 @@ updates:
|
||||
interval: "daily"
|
||||
time: "10:00"
|
||||
open-pull-requests-limit: 10
|
||||
groups:
|
||||
pytest-dependencies:
|
||||
applies-to: version-updates
|
||||
patterns:
|
||||
- "pytest*"
|
||||
|
||||
- package-ecosystem: "gitsubmodule"
|
||||
directory: "/"
|
||||
|
||||
2
.github/label-actions.yml
vendored
2
.github/label-actions.yml
vendored
@@ -1,5 +1,5 @@
|
||||
---
|
||||
# This action is centrally managed in https://github.com/<organization>/.github/
|
||||
# This file is centrally managed in https://github.com/<organization>/.github/
|
||||
# Don't make changes to this file in this repo as they will be overwritten with changes made to the same file in
|
||||
# the above-mentioned repo.
|
||||
|
||||
|
||||
28
.github/pr_release_template.md
vendored
28
.github/pr_release_template.md
vendored
@@ -1,28 +0,0 @@
|
||||
## Description
|
||||
<!--- Please include a summary of the changes. --->
|
||||
This PR was created automatically.
|
||||
|
||||
|
||||
### Screenshot
|
||||
<!--- Include screenshots if the changes are UI-related. --->
|
||||
|
||||
|
||||
### Issues Fixed or Closed
|
||||
<!--- Close issue example: `- Closes #1` --->
|
||||
<!--- Fix bug issue example: `- Fixes #2` --->
|
||||
<!--- Resolve issue example: `- Resolves #3` --->
|
||||
|
||||
|
||||
## Type of Change
|
||||
- [ ] Bug fix (non-breaking change which fixes an issue)
|
||||
- [ ] New feature (non-breaking change which adds functionality)
|
||||
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
|
||||
- [ ] Dependency update (updates to dependencies)
|
||||
- [ ] Documentation update (changes to documentation)
|
||||
- [ ] Repository update (changes to repository files, e.g. `.github/...`)
|
||||
|
||||
## Branch Updates
|
||||
- [x] I want maintainers to keep my branch updated
|
||||
|
||||
## Changelog Summary
|
||||
<!--- Summarize all the changes in a bulleted list. --->
|
||||
14
.github/semantic.yml
vendored
Normal file
14
.github/semantic.yml
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
---
|
||||
# This file is centrally managed in https://github.com/<organization>/.github/
|
||||
# Don't make changes to this file in this repo as they will be overwritten with changes made to the same file in
|
||||
# the above-mentioned repo.
|
||||
|
||||
# This is the configuration file for https://github.com/Ezard/semantic-prs
|
||||
|
||||
enabled: true
|
||||
titleOnly: true # We only use the PR title as we squash and merge
|
||||
commitsOnly: false
|
||||
titleAndCommits: false
|
||||
anyCommit: false
|
||||
allowMergeCommits: false
|
||||
allowRevertCommits: false
|
||||
1171
.github/workflows/CI.yml
vendored
1171
.github/workflows/CI.yml
vendored
File diff suppressed because it is too large
Load Diff
35
.github/workflows/auto-create-pr.yml
vendored
35
.github/workflows/auto-create-pr.yml
vendored
@@ -1,35 +0,0 @@
|
||||
---
|
||||
# This action is centrally managed in https://github.com/<organization>/.github/
|
||||
# Don't make changes to this file in this repo as they will be overwritten with changes made to the same file in
|
||||
# the above-mentioned repo.
|
||||
|
||||
# This workflow creates a PR automatically when anything is merged/pushed into the `nightly` branch. The PR is created
|
||||
# against the `master` (default) branch.
|
||||
|
||||
name: Auto create PR
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- 'nightly'
|
||||
|
||||
jobs:
|
||||
create_pr:
|
||||
if: startsWith(github.repository, 'LizardByte/')
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Create Pull Request
|
||||
uses: repo-sync/pull-request@v2
|
||||
with:
|
||||
source_branch: "" # should be "nightly" as it's the triggering branch
|
||||
destination_branch: "master"
|
||||
pr_title: "Pulling ${{ github.ref_name }} into master"
|
||||
pr_template: ".github/pr_release_template.md"
|
||||
pr_assignee: "${{ secrets.GH_BOT_NAME }}"
|
||||
pr_draft: true
|
||||
pr_allow_empty: false
|
||||
github_token: ${{ secrets.GH_BOT_TOKEN }}
|
||||
64
.github/workflows/automerge.yml
vendored
64
.github/workflows/automerge.yml
vendored
@@ -1,64 +0,0 @@
|
||||
---
|
||||
# This action is centrally managed in https://github.com/<organization>/.github/
|
||||
# Don't make changes to this file in this repo as they will be overwritten with changes made to the same file in
|
||||
# the above-mentioned repo.
|
||||
|
||||
# This workflow will, first, automatically approve PRs created by @LizardByte-bot. Then it will automerge relevant PRs.
|
||||
|
||||
name: Automerge PR
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
types:
|
||||
- opened
|
||||
- synchronize
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
autoapprove:
|
||||
if: >-
|
||||
contains(fromJson('["LizardByte-bot"]'), github.event.pull_request.user.login) &&
|
||||
contains(fromJson('["LizardByte-bot"]'), github.actor) &&
|
||||
startsWith(github.repository, 'LizardByte/')
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Autoapproving
|
||||
uses: hmarr/auto-approve-action@v3
|
||||
with:
|
||||
github-token: "${{ secrets.GITHUB_TOKEN }}"
|
||||
|
||||
- name: Label autoapproved
|
||||
uses: actions/github-script@v6
|
||||
with:
|
||||
github-token: ${{ secrets.GH_BOT_TOKEN }}
|
||||
script: |
|
||||
github.rest.issues.addLabels({
|
||||
issue_number: context.issue.number,
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
labels: ['autoapproved', 'autoupdate']
|
||||
})
|
||||
|
||||
automerge:
|
||||
if: startsWith(github.repository, 'LizardByte/')
|
||||
needs: [autoapprove]
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Automerging
|
||||
uses: pascalgn/automerge-action@v0.15.6
|
||||
env:
|
||||
BASE_BRANCHES: nightly
|
||||
GITHUB_TOKEN: ${{ secrets.GH_BOT_TOKEN }}
|
||||
GITHUB_LOGIN: ${{ secrets.GH_BOT_NAME }}
|
||||
MERGE_LABELS: "!dependencies"
|
||||
MERGE_METHOD: "squash"
|
||||
MERGE_COMMIT_MESSAGE: "{pullRequest.title} (#{pullRequest.number})"
|
||||
MERGE_DELETE_BRANCH: true
|
||||
MERGE_ERROR_FAIL: true
|
||||
MERGE_FILTER_AUTHOR: ${{ secrets.GH_BOT_NAME }}
|
||||
MERGE_RETRIES: "240" # 1 hour
|
||||
MERGE_RETRY_SLEEP: "15000" # 15 seconds
|
||||
33
.github/workflows/ci-copr.yml
vendored
Normal file
33
.github/workflows/ci-copr.yml
vendored
Normal file
@@ -0,0 +1,33 @@
|
||||
---
|
||||
name: CI Copr
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches:
|
||||
- master
|
||||
types:
|
||||
- opened
|
||||
- synchronize
|
||||
- reopened
|
||||
release:
|
||||
types:
|
||||
- prereleased
|
||||
- released
|
||||
|
||||
concurrency:
|
||||
group: "${{ github.workflow }}-${{ github.ref }}"
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
call-copr-ci:
|
||||
uses: LizardByte/copr-ci/.github/workflows/copr-ci.yml@master
|
||||
with:
|
||||
copr_pr_webhook_token: "05fc9b07-a19b-4f83-89b2-ae1e7e0b5282"
|
||||
github_org_owner: LizardByte
|
||||
copr_ownername: lizardbyte
|
||||
auto_update_package: true
|
||||
job_timeout: 60
|
||||
secrets:
|
||||
COPR_BETA_WEBHOOK_TOKEN: ${{ secrets.COPR_BETA_WEBHOOK_TOKEN }}
|
||||
COPR_STABLE_WEBHOOK_TOKEN: ${{ secrets.COPR_STABLE_WEBHOOK_TOKEN }}
|
||||
COPR_CLI_CONFIG: ${{ secrets.COPR_CLI_CONFIG }}
|
||||
209
.github/workflows/ci-docker.yml
vendored
209
.github/workflows/ci-docker.yml
vendored
@@ -22,14 +22,14 @@ name: CI Docker
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches: [master, nightly]
|
||||
branches: [master]
|
||||
types: [opened, synchronize, reopened]
|
||||
push:
|
||||
branches: [master, nightly]
|
||||
branches: [master]
|
||||
workflow_dispatch:
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
group: "${{ github.workflow }}-${{ github.ref }}"
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
@@ -74,113 +74,54 @@ jobs:
|
||||
echo $matrix | jq .
|
||||
echo "matrix=$matrix" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Find dotnet solution file
|
||||
id: find_dotnet
|
||||
run: |
|
||||
solution=$(find . -maxdepth 1 -type f -iname "*.sln")
|
||||
|
||||
echo "found solution: ${solution}"
|
||||
|
||||
# do not quote to keep this as a single line
|
||||
echo solution=${solution} >> $GITHUB_OUTPUT
|
||||
|
||||
if [[ $solution != "" ]]; then
|
||||
echo "dotnet=true" >> $GITHUB_OUTPUT
|
||||
else
|
||||
echo "dotnet=false" >> $GITHUB_OUTPUT
|
||||
fi
|
||||
|
||||
outputs:
|
||||
dockerfiles: ${{ steps.find.outputs.dockerfiles }}
|
||||
matrix: ${{ steps.find.outputs.matrix }}
|
||||
|
||||
check_changelog:
|
||||
name: Check Changelog
|
||||
needs: [check_dockerfiles]
|
||||
if: ${{ needs.check_dockerfiles.outputs.dockerfiles }}
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
if: ${{ github.ref == 'refs/heads/master' || github.base_ref == 'master' }}
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Verify Changelog
|
||||
id: verify_changelog
|
||||
if: ${{ github.ref == 'refs/heads/master' || github.base_ref == 'master' }}
|
||||
# base_ref for pull request check, ref for push
|
||||
uses: LizardByte/.github/actions/verify_changelog@master
|
||||
with:
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
outputs:
|
||||
next_version: ${{ steps.verify_changelog.outputs.changelog_parser_version }}
|
||||
next_version_bare: ${{ steps.verify_changelog.outputs.changelog_parser_version_bare }}
|
||||
last_version: ${{ steps.verify_changelog.outputs.latest_release_tag_name }}
|
||||
release_body: ${{ steps.verify_changelog.outputs.changelog_parser_description }}
|
||||
dotnet: ${{ steps.find_dotnet.outputs.dotnet }}
|
||||
solution: ${{ steps.find_dotnet.outputs.solution }}
|
||||
|
||||
setup_release:
|
||||
name: Setup Release
|
||||
needs: check_changelog
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Set release details
|
||||
id: release_details
|
||||
env:
|
||||
RELEASE_BODY: ${{ needs.check_changelog.outputs.release_body }}
|
||||
run: |
|
||||
# determine to create a release or not
|
||||
if [[ $GITHUB_EVENT_NAME == "push" ]]; then
|
||||
RELEASE=true
|
||||
else
|
||||
RELEASE=false
|
||||
fi
|
||||
|
||||
# set the release tag
|
||||
COMMIT=${{ github.sha }}
|
||||
if [[ $GITHUB_REF == refs/heads/master ]]; then
|
||||
TAG="${{ needs.check_changelog.outputs.next_version }}"
|
||||
RELEASE_NAME="${{ needs.check_changelog.outputs.next_version }}"
|
||||
RELEASE_BODY="$RELEASE_BODY"
|
||||
PRE_RELEASE="false"
|
||||
elif [[ $GITHUB_REF == refs/heads/nightly ]]; then
|
||||
TAG="nightly-dev"
|
||||
RELEASE_NAME="nightly"
|
||||
RELEASE_BODY="automated nightly release - $(date -u +'%Y-%m-%dT%H:%M:%SZ') - ${COMMIT}"
|
||||
PRE_RELEASE="true"
|
||||
fi
|
||||
|
||||
echo "create_release=${RELEASE}" >> $GITHUB_OUTPUT
|
||||
echo "release_tag=${TAG}" >> $GITHUB_OUTPUT
|
||||
echo "release_commit=${COMMIT}" >> $GITHUB_OUTPUT
|
||||
echo "release_name=${RELEASE_NAME}" >> $GITHUB_OUTPUT
|
||||
echo "pre_release=${PRE_RELEASE}" >> $GITHUB_OUTPUT
|
||||
|
||||
# this is stupid but works for multiline strings
|
||||
echo "RELEASE_BODY<<EOF" >> $GITHUB_ENV
|
||||
echo "$RELEASE_BODY" >> $GITHUB_ENV
|
||||
echo "EOF" >> $GITHUB_ENV
|
||||
|
||||
outputs:
|
||||
create_release: ${{ steps.release_details.outputs.create_release }}
|
||||
release_tag: ${{ steps.release_details.outputs.release_tag }}
|
||||
release_commit: ${{ steps.release_details.outputs.release_commit }}
|
||||
release_name: ${{ steps.release_details.outputs.release_name }}
|
||||
release_body: ${{ env.RELEASE_BODY }}
|
||||
pre_release: ${{ steps.release_details.outputs.pre_release }}
|
||||
|
||||
lint_dockerfile:
|
||||
needs: [check_dockerfiles]
|
||||
if: ${{ needs.check_dockerfiles.outputs.dockerfiles }}
|
||||
name: Setup Release
|
||||
needs:
|
||||
- check_dockerfiles
|
||||
outputs:
|
||||
publish_release: ${{ steps.setup_release.outputs.publish_release }}
|
||||
release_body: ${{ steps.setup_release.outputs.release_body }}
|
||||
release_commit: ${{ steps.setup_release.outputs.release_commit }}
|
||||
release_generate_release_notes: ${{ steps.setup_release.outputs.release_generate_release_notes }}
|
||||
release_tag: ${{ steps.setup_release.outputs.release_tag }}
|
||||
release_version: ${{ steps.setup_release.outputs.release_version }}
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix: ${{ fromJson(needs.check_dockerfiles.outputs.matrix) }}
|
||||
name: Lint Dockerfile${{ matrix.tag }}
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Hadolint
|
||||
id: hadolint
|
||||
uses: hadolint/hadolint-action@v3.1.0
|
||||
- name: Setup Release
|
||||
id: setup_release
|
||||
uses: LizardByte/setup-release-action@v2025.102.14715
|
||||
with:
|
||||
dockerfile: ${{ matrix.dockerfile }}
|
||||
ignore: DL3008,DL3013,DL3016,DL3018,DL3028,DL3059
|
||||
output-file: ./hadolint.log
|
||||
verbose: true
|
||||
|
||||
- name: Log
|
||||
if: failure()
|
||||
run: |
|
||||
echo "Hadolint outcome: ${{ steps.hadolint.outcome }}" >> $GITHUB_STEP_SUMMARY
|
||||
cat "./hadolint.log" >> $GITHUB_STEP_SUMMARY
|
||||
dotnet: ${{ needs.check_dockerfiles.outputs.dotnet }}
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
docker:
|
||||
needs: [check_dockerfiles, check_changelog, setup_release]
|
||||
needs: [check_dockerfiles, setup_release]
|
||||
if: ${{ needs.check_dockerfiles.outputs.dockerfiles }}
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
@@ -193,7 +134,7 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Maximize build space
|
||||
uses: easimon/maximize-build-space@v8
|
||||
uses: easimon/maximize-build-space@v10
|
||||
with:
|
||||
root-reserve-mb: 30720 # https://github.com/easimon/maximize-build-space#caveats
|
||||
remove-dotnet: 'true'
|
||||
@@ -210,24 +151,20 @@ jobs:
|
||||
- name: Prepare
|
||||
id: prepare
|
||||
env:
|
||||
NV: ${{ needs.check_changelog.outputs.next_version }}
|
||||
NV: ${{ needs.setup_release.outputs.release_tag }}
|
||||
run: |
|
||||
# get branch name
|
||||
BRANCH=${GITHUB_HEAD_REF}
|
||||
|
||||
RELEASE=false
|
||||
RELEASE=${{ needs.setup_release.outputs.publish_release }}
|
||||
COMMIT=${{ needs.setup_release.outputs.release_commit }}
|
||||
|
||||
if [ -z "$BRANCH" ]; then
|
||||
echo "This is a PUSH event"
|
||||
BRANCH=${{ github.ref_name }}
|
||||
COMMIT=${{ github.sha }}
|
||||
CLONE_URL=${{ github.event.repository.clone_url }}
|
||||
if [[ $BRANCH == "master" ]]; then
|
||||
RELEASE=true
|
||||
fi
|
||||
else
|
||||
echo "This is a PULL REQUEST event"
|
||||
COMMIT=${{ github.event.pull_request.head.sha }}
|
||||
CLONE_URL=${{ github.event.pull_request.head.repo.clone_url }}
|
||||
fi
|
||||
|
||||
@@ -247,8 +184,6 @@ jobs:
|
||||
if [[ $GITHUB_REF == refs/heads/master ]]; then
|
||||
TAGS="${TAGS},${BASE_TAG}:latest${{ matrix.tag }},ghcr.io/${BASE_TAG}:latest${{ matrix.tag }}"
|
||||
TAGS="${TAGS},${BASE_TAG}:master${{ matrix.tag }},ghcr.io/${BASE_TAG}:master${{ matrix.tag }}"
|
||||
elif [[ $GITHUB_REF == refs/heads/nightly ]]; then
|
||||
TAGS="${TAGS},${BASE_TAG}:nightly${{ matrix.tag }},ghcr.io/${BASE_TAG}:nightly${{ matrix.tag }}"
|
||||
else
|
||||
TAGS="${TAGS},${BASE_TAG}:test${{ matrix.tag }},ghcr.io/${BASE_TAG}:test${{ matrix.tag }}"
|
||||
fi
|
||||
@@ -260,7 +195,7 @@ jobs:
|
||||
# parse custom directives out of dockerfile
|
||||
# try to get the platforms from the dockerfile custom directive, i.e. `# platforms: xxx,yyy`
|
||||
# directives for PR event, i.e. not push event
|
||||
if [[ ${PUSH} == "false" ]]; then
|
||||
if [[ ${RELEASE} == "false" ]]; then
|
||||
while read -r line; do
|
||||
if [[ $line == "# platforms_pr: "* && $PLATFORMS == "" ]]; then
|
||||
# echo the line and use `sed` to remove the custom directive
|
||||
@@ -299,13 +234,10 @@ jobs:
|
||||
|
||||
echo "branch=${BRANCH}" >> $GITHUB_OUTPUT
|
||||
echo "build_date=$(date -u +'%Y-%m-%dT%H:%M:%SZ')" >> $GITHUB_OUTPUT
|
||||
echo "commit=${COMMIT}" >> $GITHUB_OUTPUT
|
||||
echo "clone_url=${CLONE_URL}" >> $GITHUB_OUTPUT
|
||||
echo "release=${RELEASE}" >> $GITHUB_OUTPUT
|
||||
echo "artifacts=${ARTIFACTS}" >> $GITHUB_OUTPUT
|
||||
echo "no_cache_filters=${NO_CACHE_FILTERS}" >> $GITHUB_OUTPUT
|
||||
echo "platforms=${PLATFORMS}" >> $GITHUB_OUTPUT
|
||||
echo "push=${PUSH}" >> $GITHUB_OUTPUT
|
||||
echo "tags=${TAGS}" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Set Up QEMU
|
||||
@@ -316,7 +248,7 @@ jobs:
|
||||
id: buildx
|
||||
|
||||
- name: Cache Docker Layers
|
||||
uses: actions/cache@v3
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: /tmp/.buildx-cache
|
||||
key: Docker-buildx${{ matrix.tag }}-${{ github.sha }}
|
||||
@@ -324,14 +256,14 @@ jobs:
|
||||
Docker-buildx${{ matrix.tag }}-
|
||||
|
||||
- name: Log in to Docker Hub
|
||||
if: ${{ steps.prepare.outputs.push == 'true' }} # PRs do not have access to secrets
|
||||
if: ${{ needs.setup_release.outputs.publish_release == 'true' }} # PRs do not have access to secrets
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
username: ${{ secrets.DOCKER_HUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
|
||||
|
||||
- name: Log in to the Container registry
|
||||
if: ${{ steps.prepare.outputs.push == 'true' }} # PRs do not have access to secrets
|
||||
if: ${{ needs.setup_release.outputs.publish_release == 'true' }} # PRs do not have access to secrets
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: ghcr.io
|
||||
@@ -341,7 +273,7 @@ jobs:
|
||||
- name: Build artifacts
|
||||
if: ${{ steps.prepare.outputs.artifacts == 'true' }}
|
||||
id: build_artifacts
|
||||
uses: docker/build-push-action@v5
|
||||
uses: docker/build-push-action@v6
|
||||
with:
|
||||
context: ./
|
||||
file: ${{ matrix.dockerfile }}
|
||||
@@ -352,10 +284,10 @@ jobs:
|
||||
build-args: |
|
||||
BRANCH=${{ steps.prepare.outputs.branch }}
|
||||
BUILD_DATE=${{ steps.prepare.outputs.build_date }}
|
||||
BUILD_VERSION=${{ needs.check_changelog.outputs.next_version }}
|
||||
COMMIT=${{ steps.prepare.outputs.commit }}
|
||||
BUILD_VERSION=${{ needs.setup_release.outputs.release_tag }}
|
||||
COMMIT=${{ needs.setup_release.outputs.release_commit }}
|
||||
CLONE_URL=${{ steps.prepare.outputs.clone_url }}
|
||||
RELEASE=${{ steps.prepare.outputs.release }}
|
||||
RELEASE=${{ needs.setup_release.outputs.publish_release }}
|
||||
tags: ${{ steps.prepare.outputs.tags }}
|
||||
cache-from: type=local,src=/tmp/.buildx-cache
|
||||
cache-to: type=local,dest=/tmp/.buildx-cache
|
||||
@@ -363,19 +295,19 @@ jobs:
|
||||
|
||||
- name: Build and push
|
||||
id: build
|
||||
uses: docker/build-push-action@v5
|
||||
uses: docker/build-push-action@v6
|
||||
with:
|
||||
context: ./
|
||||
file: ${{ matrix.dockerfile }}
|
||||
push: ${{ steps.prepare.outputs.push }}
|
||||
push: ${{ needs.setup_release.outputs.publish_release }}
|
||||
platforms: ${{ steps.prepare.outputs.platforms }}
|
||||
build-args: |
|
||||
BRANCH=${{ steps.prepare.outputs.branch }}
|
||||
BUILD_DATE=${{ steps.prepare.outputs.build_date }}
|
||||
BUILD_VERSION=${{ needs.check_changelog.outputs.next_version }}
|
||||
COMMIT=${{ steps.prepare.outputs.commit }}
|
||||
BUILD_VERSION=${{ needs.setup_release.outputs.release_tag }}
|
||||
COMMIT=${{ needs.setup_release.outputs.release_commit }}
|
||||
CLONE_URL=${{ steps.prepare.outputs.clone_url }}
|
||||
RELEASE=${{ steps.prepare.outputs.release }}
|
||||
RELEASE=${{ needs.setup_release.outputs.publish_release }}
|
||||
tags: ${{ steps.prepare.outputs.tags }}
|
||||
cache-from: type=local,src=/tmp/.buildx-cache
|
||||
cache-to: type=local,dest=/tmp/.buildx-cache
|
||||
@@ -385,38 +317,47 @@ jobs:
|
||||
if: ${{ steps.prepare.outputs.artifacts == 'true' }}
|
||||
working-directory: artifacts
|
||||
run: |
|
||||
# debug directory
|
||||
echo "Current directory: $(pwd)"
|
||||
echo "Directory contents: $(ls -Ra)"
|
||||
|
||||
# artifacts will be in sub directories named after the docker target platform, e.g. `linux_amd64`
|
||||
# so move files to the artifacts directory
|
||||
# https://unix.stackexchange.com/a/52816
|
||||
find ./ -type f -exec mv -t ./ -n '{}' +
|
||||
find \
|
||||
./ \
|
||||
-maxdepth 2 \
|
||||
-mindepth 2 \
|
||||
-type f \
|
||||
-not -name 'provenance.json' \
|
||||
-exec mv -t ./ -n '{}' +
|
||||
|
||||
# remove provenance file
|
||||
rm -f ./provenance.json
|
||||
|
||||
- name: Upload Artifacts
|
||||
if: ${{ steps.prepare.outputs.artifacts == 'true' }}
|
||||
uses: actions/upload-artifact@v3
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: Docker${{ matrix.tag }}
|
||||
path: artifacts/
|
||||
|
||||
- name: Create/Update GitHub Release
|
||||
if: ${{ needs.setup_release.outputs.create_release == 'true' && steps.prepare.outputs.artifacts == 'true' }}
|
||||
uses: ncipollo/release-action@v1
|
||||
if: ${{ needs.setup_release.outputs.publish_release == 'true' && steps.prepare.outputs.artifacts == 'true' }}
|
||||
uses: LizardByte/create-release-action@v2025.102.13208
|
||||
with:
|
||||
name: ${{ needs.setup_release.outputs.release_name }}
|
||||
tag: ${{ needs.setup_release.outputs.release_tag }}
|
||||
commit: ${{ needs.setup_release.outputs.release_commit }}
|
||||
artifacts: "*artifacts/*"
|
||||
token: ${{ secrets.GH_BOT_TOKEN }}
|
||||
allowUpdates: true
|
||||
artifacts: "*artifacts/*"
|
||||
body: ${{ needs.setup_release.outputs.release_body }}
|
||||
discussionCategory: announcements
|
||||
prerelease: ${{ needs.setup_release.outputs.pre_release }}
|
||||
generateReleaseNotes: ${{ needs.setup_release.outputs.release_generate_release_notes }}
|
||||
name: ${{ needs.setup_release.outputs.release_tag }}
|
||||
prerelease: true
|
||||
tag: ${{ needs.setup_release.outputs.release_tag }}
|
||||
token: ${{ secrets.GH_BOT_TOKEN }}
|
||||
|
||||
- name: Update Docker Hub Description
|
||||
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
|
||||
uses: peter-evans/dockerhub-description@v3
|
||||
uses: peter-evans/dockerhub-description@v4
|
||||
with:
|
||||
username: ${{ secrets.DOCKER_HUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKER_HUB_PASSWORD }} # token is not currently supported
|
||||
|
||||
292
.github/workflows/ci-qodana.yml
vendored
292
.github/workflows/ci-qodana.yml
vendored
@@ -1,292 +0,0 @@
|
||||
---
|
||||
# This action is centrally managed in https://github.com/<organization>/.github/
|
||||
# Don't make changes to this file in this repo as they will be overwritten with changes made to the same file in
|
||||
# the above-mentioned repo.
|
||||
|
||||
name: Qodana
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches: [master, nightly]
|
||||
types: [opened, synchronize, reopened]
|
||||
push:
|
||||
branches: [master, nightly]
|
||||
workflow_dispatch:
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
qodana_initial_check:
|
||||
name: Qodana Initial Check
|
||||
permissions:
|
||||
actions: write # required to use workflow dispatch on fork PRs
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Prepare
|
||||
id: prepare
|
||||
run: |
|
||||
# check the branch variable
|
||||
if [ "${{ github.event_name }}" == "push" ]
|
||||
then
|
||||
echo "This is a PUSH event"
|
||||
# use the branch name
|
||||
destination=${{ github.ref_name }}
|
||||
target=${{ github.ref_name }}
|
||||
else
|
||||
echo "This is a PR event"
|
||||
# use the PR number
|
||||
destination=${{ github.event.pull_request.number }}
|
||||
target=${{ github.event.pull_request.base.ref }}
|
||||
fi
|
||||
|
||||
echo "checkout_repo=$checkout_repo" >> $GITHUB_OUTPUT
|
||||
echo "checkout_ref=$checkout_ref" >> $GITHUB_OUTPUT
|
||||
echo "destination=$destination" >> $GITHUB_OUTPUT
|
||||
echo "target=$target" >> $GITHUB_OUTPUT
|
||||
|
||||
# prepare urls
|
||||
base=https://${{ github.repository_owner }}.github.io
|
||||
report_url=${base}/qodana-reports/${{ github.event.repository.name }}/${destination}
|
||||
echo "report_url=$report_url" >> $GITHUB_OUTPUT
|
||||
|
||||
# build matrix
|
||||
files=$(find . -type f -iname "qodana*.yaml")
|
||||
|
||||
echo "files: ${files}"
|
||||
|
||||
# do not quote to keep this as a single line
|
||||
echo files=${files} >> $GITHUB_OUTPUT
|
||||
|
||||
MATRIX_COMBINATIONS=""
|
||||
REPORTS_MARKDOWN=""
|
||||
for FILE in ${files}; do
|
||||
# extract the language from file name after `qodana-` and before `.yaml`
|
||||
language=$(echo $FILE | sed -r -z -e 's/(\.\/)*.*\/(qodana.yaml)/default/gm')
|
||||
if [[ $language != "default" ]]; then
|
||||
language=$(echo $FILE | sed -r -z -e 's/(\.\/)*.*qodana-(.*).yaml/\2/gm')
|
||||
fi
|
||||
MATRIX_COMBINATIONS="$MATRIX_COMBINATIONS {\"file\": \"$FILE\", \"language\": \"$language\"},"
|
||||
REPORTS_MARKDOWN="$REPORTS_MARKDOWN <br> - [${language}](${report_url}/${language})"
|
||||
done
|
||||
|
||||
# removes the last character (i.e. comma)
|
||||
MATRIX_COMBINATIONS=${MATRIX_COMBINATIONS::-1}
|
||||
|
||||
# setup matrix for later jobs
|
||||
matrix=$((
|
||||
echo "{ \"include\": [$MATRIX_COMBINATIONS] }"
|
||||
) | jq -c .)
|
||||
|
||||
echo $matrix
|
||||
echo $matrix | jq .
|
||||
echo "matrix=$matrix" >> $GITHUB_OUTPUT
|
||||
|
||||
echo "reports_markdown=$REPORTS_MARKDOWN" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Setup initial notification inputs
|
||||
id: inputs
|
||||
if: >-
|
||||
startsWith(github.event_name, 'pull_request') &&
|
||||
steps.prepare.outputs.files != ''
|
||||
run: |
|
||||
# workflow logs
|
||||
workflow_url_a=https://github.com/${{ github.repository_owner }}/${{ github.event.repository.name }}
|
||||
workflow_url=${workflow_url_a}/actions/runs/${{ github.run_id }}
|
||||
|
||||
# multiline message
|
||||
message=$(cat <<- EOF
|
||||
:warning: **Qodana is checking this PR** :warning:
|
||||
Live results available [here](${workflow_url})
|
||||
EOF
|
||||
)
|
||||
|
||||
# escape json control characters
|
||||
message=$(jq -n --arg message "$message" '$message' | sed -e 's/\\/\\\\/g' -e 's/"/\\"/g')
|
||||
|
||||
secondary_inputs=$(echo '{
|
||||
"issue_message": "'"${message}"'",
|
||||
"issue_message_id": "'"qodana"'",
|
||||
"issue_number": "'"${{ github.event.number }}"'",
|
||||
"issue_repo_owner": "'"${{ github.repository_owner }}"'",
|
||||
"issue_repo_name": "'"${{ github.event.repository.name }}"'"
|
||||
}' | jq -r .)
|
||||
|
||||
#escape json control characters
|
||||
secondary_inputs=$(jq -n --arg secondary_inputs "$secondary_inputs" '$secondary_inputs' \
|
||||
| sed -e 's/\\/\\\\/g' -e 's/"/\\"/g')
|
||||
|
||||
echo $secondary_inputs
|
||||
|
||||
# secondary input as string, not JSON
|
||||
# todo - change dispatch_ref to master instead of nightly
|
||||
primary_inputs=$(echo '{
|
||||
"dispatch_repository": "'"${{ github.repository_owner }}/.github"'",
|
||||
"dispatch_workflow": "'"dispatch-issue-comment.yml"'",
|
||||
"dispatch_ref": "'"nightly"'",
|
||||
"dispatch_inputs": "'"${secondary_inputs}"'"
|
||||
}' | jq -c .)
|
||||
|
||||
echo $primary_inputs
|
||||
echo $primary_inputs | jq .
|
||||
echo "primary_inputs=$primary_inputs" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Workflow Dispatch
|
||||
if: >-
|
||||
startsWith(github.event_name, 'pull_request') &&
|
||||
steps.prepare.outputs.files != ''
|
||||
uses: benc-uk/workflow-dispatch@v1.2.2
|
||||
continue-on-error: true # this might error if the workflow is not found, but we still want to run the next job
|
||||
with:
|
||||
ref: ${{ github.base_ref || github.ref_name }} # base ref for PR and branch name for push
|
||||
workflow: dispatcher.yml
|
||||
inputs: ${{ steps.inputs.outputs.primary_inputs }}
|
||||
token: ${{ github.token }}
|
||||
|
||||
outputs:
|
||||
destination: ${{ steps.prepare.outputs.destination }}
|
||||
target: ${{ steps.prepare.outputs.target }}
|
||||
files: ${{ steps.prepare.outputs.files }}
|
||||
reports_markdown: ${{ steps.prepare.outputs.reports_markdown }}
|
||||
matrix: ${{ steps.prepare.outputs.matrix }}
|
||||
|
||||
qodana:
|
||||
if: ${{ needs.qodana_initial_check.outputs.files != '' }}
|
||||
needs: [qodana_initial_check]
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix: ${{ fromJson(needs.qodana_initial_check.outputs.matrix) }}
|
||||
name: Qodana-Scan-${{ matrix.language }}
|
||||
continue-on-error: true
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: recursive
|
||||
|
||||
- name: Get baseline
|
||||
id: baseline
|
||||
run: |
|
||||
# check if destination is not an integer
|
||||
if ! [[ "${{ needs.qodana_initial_check.outputs.destination }}" =~ ^[0-9]+$ ]]
|
||||
then
|
||||
echo "Running for a branch update"
|
||||
echo "baseline_args=" >> $GITHUB_OUTPUT
|
||||
else
|
||||
echo "Running for a PR"
|
||||
|
||||
sarif_file=qodana.sarif.json
|
||||
repo=${{ github.event.repository.name }}
|
||||
target=${{ needs.qodana_initial_check.outputs.target }}
|
||||
language=${{ matrix.language }}
|
||||
|
||||
baseline_file="${repo}/${target}/${language}/results/${sarif_file}"
|
||||
baseline_file_url="https://lizardbyte.github.io/qodana-reports/${baseline_file}"
|
||||
|
||||
# don't fail if file does not exist
|
||||
wget ${baseline_file_url} || true
|
||||
|
||||
# check if file exists
|
||||
if [ -f ${sarif_file} ]
|
||||
then
|
||||
echo "baseline exists"
|
||||
echo "baseline_args=--baseline,${sarif_file}" >> $GITHUB_OUTPUT
|
||||
else
|
||||
echo "baseline does not exist"
|
||||
echo "baseline_args=" >> $GITHUB_OUTPUT
|
||||
fi
|
||||
fi
|
||||
|
||||
- name: Rename Qodana config file
|
||||
id: rename
|
||||
run: |
|
||||
# rename the file
|
||||
if [ "${{ matrix.file }}" != "./qodana.yaml" ]
|
||||
then
|
||||
mv -f ${{ matrix.file }} ./qodana.yaml
|
||||
fi
|
||||
|
||||
- name: Qodana
|
||||
id: qodana
|
||||
continue-on-error: true # ensure dispatch-qodana job is run
|
||||
uses: JetBrains/qodana-action@v2023.2.6
|
||||
with:
|
||||
additional-cache-hash: ${{ github.ref }}-${{ matrix.language }}
|
||||
artifact-name: qodana-${{ matrix.language }} # yamllint disable-line rule:line-length
|
||||
args: '--print-problems,${{ steps.baseline.outputs.baseline_args }}'
|
||||
pr-mode: false
|
||||
upload-result: true
|
||||
use-caches: true
|
||||
|
||||
- name: Set output status
|
||||
id: status
|
||||
run: |
|
||||
# check if qodana failed
|
||||
echo "qodana_status=${{ steps.qodana.outcome }}" >> $GITHUB_OUTPUT
|
||||
|
||||
outputs:
|
||||
qodana_status: ${{ steps.status.outputs.qodana_status }}
|
||||
|
||||
dispatch-qodana:
|
||||
# trigger qodana-reports to download artifacts from the matrix runs
|
||||
needs: [qodana_initial_check, qodana]
|
||||
runs-on: ubuntu-latest
|
||||
name: Dispatch Qodana
|
||||
permissions:
|
||||
actions: write # required to use workflow dispatch on fork PRs
|
||||
if: ${{ needs.qodana_initial_check.outputs.files != '' }}
|
||||
steps:
|
||||
- name: Setup qodana publish inputs
|
||||
id: inputs
|
||||
run: |
|
||||
# get the artifacts
|
||||
artifacts=${{ toJson(steps.artifacts.outputs.result) }}
|
||||
artifacts=$(echo $artifacts | jq -c .)
|
||||
|
||||
# get the target branch
|
||||
target=${{ needs.qodana_initial_check.outputs.target }}
|
||||
|
||||
# get the destination branch
|
||||
destination=${{ needs.qodana_initial_check.outputs.destination }}
|
||||
|
||||
# client payload
|
||||
secondary_inputs=$(echo '{
|
||||
"destination": "'"${destination}"'",
|
||||
"ref": "'"${{ github.ref }}"'",
|
||||
"repo": "'"${{ github.repository }}"'",
|
||||
"repo_name": "'"${{ github.event.repository.name }}"'",
|
||||
"run_id": "'"${{ github.run_id }}"'",
|
||||
"reports_markdown": "'"${{ needs.qodana_initial_check.outputs.reports_markdown }}"'",
|
||||
"status": "'"${{ needs.qodana.outputs.qodana_status }}"'"
|
||||
}' | jq -r .)
|
||||
|
||||
#escape json control characters
|
||||
secondary_inputs=$(jq -n --arg secondary_inputs "$secondary_inputs" '$secondary_inputs' \
|
||||
| sed -e 's/\\/\\\\/g' -e 's/"/\\"/g')
|
||||
|
||||
echo $secondary_inputs
|
||||
|
||||
primary_inputs=$(echo '{
|
||||
"dispatch_repository": "'"${{ github.repository_owner }}/qodana-reports"'",
|
||||
"dispatch_workflow": "'"dispatch-qodana.yml"'",
|
||||
"dispatch_ref": "'"master"'",
|
||||
"dispatch_inputs": "'"$secondary_inputs"'"
|
||||
}' | jq -c .)
|
||||
|
||||
echo $primary_inputs
|
||||
echo $primary_inputs | jq .
|
||||
echo "primary_inputs=$primary_inputs" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Workflow Dispatch
|
||||
uses: benc-uk/workflow-dispatch@v1.2.2
|
||||
continue-on-error: true # this might error if the workflow is not found, but we don't want to fail the workflow
|
||||
with:
|
||||
ref: ${{ github.base_ref || github.ref_name }} # base ref for PR and branch name for push
|
||||
workflow: dispatcher.yml
|
||||
inputs: ${{ steps.inputs.outputs.primary_inputs }}
|
||||
token: ${{ github.token }}
|
||||
105
.github/workflows/codeql.yml
vendored
105
.github/workflows/codeql.yml
vendored
@@ -9,14 +9,14 @@ name: "CodeQL"
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: ["master", "nightly"]
|
||||
branches: ["master"]
|
||||
pull_request:
|
||||
branches: ["master", "nightly"]
|
||||
branches: ["master"]
|
||||
schedule:
|
||||
- cron: '00 12 * * 0' # every Sunday at 12:00 UTC
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
group: "${{ github.workflow }}-${{ github.ref }}"
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
@@ -28,7 +28,7 @@ jobs:
|
||||
continue: ${{ steps.continue.outputs.result }}
|
||||
steps:
|
||||
- name: Get repo languages
|
||||
uses: actions/github-script@v6
|
||||
uses: actions/github-script@v7
|
||||
id: lang
|
||||
with:
|
||||
script: |
|
||||
@@ -57,10 +57,27 @@ jobs:
|
||||
console.log(`Remapping language: ${key} to ${remap_languages[key.toLowerCase()]}`)
|
||||
key = remap_languages[key.toLowerCase()]
|
||||
}
|
||||
if (supported_languages.includes(key.toLowerCase()) &&
|
||||
!matrix['include'].includes({"language": key.toLowerCase()})) {
|
||||
if (supported_languages.includes(key.toLowerCase())) {
|
||||
console.log(`Found supported language: ${key}`)
|
||||
matrix['include'].push({"language": key.toLowerCase()})
|
||||
let osList = ['ubuntu-latest'];
|
||||
if (key.toLowerCase() === 'swift') {
|
||||
osList = ['macos-latest'];
|
||||
} else if (key.toLowerCase() === 'cpp') {
|
||||
// TODO: update macos to latest after the below issue is resolved
|
||||
// https://github.com/github/codeql-action/issues/2266
|
||||
osList = ['macos-13', 'ubuntu-latest', 'windows-latest'];
|
||||
}
|
||||
for (let os of osList) {
|
||||
// set name for matrix
|
||||
if (osList.length == 1) {
|
||||
name = key.toLowerCase()
|
||||
} else {
|
||||
name = `${key.toLowerCase()}, ${os}`
|
||||
}
|
||||
|
||||
// add to matrix
|
||||
matrix['include'].push({"language": key.toLowerCase(), "os": os, "name": name})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -70,7 +87,7 @@ jobs:
|
||||
return matrix
|
||||
|
||||
- name: Continue
|
||||
uses: actions/github-script@v6
|
||||
uses: actions/github-script@v7
|
||||
id: continue
|
||||
with:
|
||||
script: |
|
||||
@@ -84,10 +101,15 @@ jobs:
|
||||
}
|
||||
|
||||
analyze:
|
||||
name: Analyze
|
||||
name: Analyze (${{ matrix.name }})
|
||||
if: ${{ needs.languages.outputs.continue == 'true' }}
|
||||
defaults:
|
||||
run:
|
||||
shell: ${{ matrix.os == 'windows-latest' && 'msys2 {0}' || 'bash' }}
|
||||
env:
|
||||
GITHUB_CODEQL_BUILD: true
|
||||
needs: [languages]
|
||||
runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }}
|
||||
runs-on: ${{ matrix.os || 'ubuntu-latest' }}
|
||||
timeout-minutes: ${{ (matrix.language == 'swift' && 120) || 360 }}
|
||||
permissions:
|
||||
actions: read
|
||||
@@ -100,9 +122,12 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Maximize build space
|
||||
uses: easimon/maximize-build-space@v8
|
||||
if: >-
|
||||
runner.os == 'Linux' &&
|
||||
matrix.language == 'cpp'
|
||||
uses: easimon/maximize-build-space@v10
|
||||
with:
|
||||
root-reserve-mb: 20480
|
||||
root-reserve-mb: 30720
|
||||
remove-dotnet: ${{ (matrix.language == 'csharp' && 'false') || 'true' }}
|
||||
remove-android: 'true'
|
||||
remove-haskell: 'true'
|
||||
@@ -114,9 +139,18 @@ jobs:
|
||||
with:
|
||||
submodules: recursive
|
||||
|
||||
- name: Setup msys2
|
||||
if: >-
|
||||
runner.os == 'Windows' &&
|
||||
matrix.language == 'cpp'
|
||||
uses: msys2/setup-msys2@v2
|
||||
with:
|
||||
msystem: ucrt64
|
||||
update: true
|
||||
|
||||
# Initializes the CodeQL tools for scanning.
|
||||
- name: Initialize CodeQL
|
||||
uses: github/codeql-action/init@v2
|
||||
uses: github/codeql-action/init@v3
|
||||
with:
|
||||
languages: ${{ matrix.language }}
|
||||
# If you wish to specify custom queries, you can do so here or in a config file.
|
||||
@@ -126,22 +160,55 @@ jobs:
|
||||
# yamllint disable-line rule:line-length
|
||||
# For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
|
||||
# queries: security-extended,security-and-quality
|
||||
config: |
|
||||
paths-ignore:
|
||||
- build
|
||||
- node_modules
|
||||
- third-party
|
||||
|
||||
# Pre autobuild
|
||||
# create a file named .codeql-prebuild-${{ matrix.language }}.sh in the root of your repository
|
||||
# create a file named .codeql-build-${{ matrix.language }}.sh in the root of your repository
|
||||
- name: Prebuild
|
||||
id: prebuild
|
||||
run: |
|
||||
# check if .qodeql-prebuild-${{ matrix.language }}.sh exists
|
||||
if [ -f "./.codeql-prebuild-${{ matrix.language }}.sh" ]; then
|
||||
echo "Running .codeql-prebuild-${{ matrix.language }}.sh"
|
||||
./.codeql-prebuild-${{ matrix.language }}.sh
|
||||
# check if prebuild script exists
|
||||
filename=".codeql-prebuild-${{ matrix.language }}-${{ runner.os }}.sh"
|
||||
if [ -f "./${filename}" ]; then
|
||||
echo "Running prebuild script: ${filename}"
|
||||
./${filename}
|
||||
fi
|
||||
|
||||
# Autobuild attempts to build any compiled languages (C/C++, C#, Go, Java, or Swift).
|
||||
- name: Autobuild
|
||||
uses: github/codeql-action/autobuild@v2
|
||||
if: steps.prebuild.outputs.skip_autobuild != 'true'
|
||||
uses: github/codeql-action/autobuild@v3
|
||||
|
||||
- name: Perform CodeQL Analysis
|
||||
uses: github/codeql-action/analyze@v2
|
||||
uses: github/codeql-action/analyze@v3
|
||||
with:
|
||||
category: "/language:${{matrix.language}}"
|
||||
output: sarif-results
|
||||
upload: failure-only
|
||||
|
||||
- name: filter-sarif
|
||||
uses: advanced-security/filter-sarif@v1
|
||||
with:
|
||||
input: sarif-results/${{ matrix.language }}.sarif
|
||||
output: sarif-results/${{ matrix.language }}.sarif
|
||||
patterns: |
|
||||
-build/**
|
||||
-node_modules/**
|
||||
-third\-party/**
|
||||
|
||||
- name: Upload SARIF
|
||||
uses: github/codeql-action/upload-sarif@v3
|
||||
with:
|
||||
sarif_file: sarif-results/${{ matrix.language }}.sarif
|
||||
|
||||
- name: Upload loc as a Build Artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: sarif-results-${{ matrix.language }}-${{ runner.os }}
|
||||
path: sarif-results
|
||||
retention-days: 1
|
||||
|
||||
267
.github/workflows/common-lint.yml
vendored
Normal file
267
.github/workflows/common-lint.yml
vendored
Normal file
@@ -0,0 +1,267 @@
|
||||
---
|
||||
# This action is centrally managed in https://github.com/<organization>/.github/
|
||||
# Don't make changes to this file in this repo as they will be overwritten with changes made to the same file in
|
||||
# the above-mentioned repo.
|
||||
|
||||
# Common linting.
|
||||
|
||||
name: common lint
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches: [master]
|
||||
types: [opened, synchronize, reopened]
|
||||
|
||||
concurrency:
|
||||
group: "${{ github.workflow }}-${{ github.ref }}"
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
lint:
|
||||
name: Common Lint
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: '3.12'
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
python -m pip install --upgrade \
|
||||
pip \
|
||||
setuptools \
|
||||
wheel \
|
||||
cmakelang \
|
||||
flake8 \
|
||||
nb-clean \
|
||||
nbqa[toolchain]
|
||||
|
||||
- name: C++ - find files
|
||||
id: cpp_files
|
||||
run: |
|
||||
# find files
|
||||
found_files=$(find . -type f \
|
||||
-iname "*.c" -o \
|
||||
-iname "*.cpp" -o \
|
||||
-iname "*.h" -o \
|
||||
-iname "*.hpp" -o \
|
||||
-iname "*.m" -o \
|
||||
-iname "*.mm" \
|
||||
)
|
||||
ignore_files=$(find . -type f -iname ".clang-format-ignore")
|
||||
|
||||
# Loop through each C++ file
|
||||
for file in $found_files; do
|
||||
for ignore_file in $ignore_files; do
|
||||
ignore_directory=$(dirname "$ignore_file")
|
||||
# if directory of ignore_file is beginning of file
|
||||
if [[ "$file" == "$ignore_directory"* ]]; then
|
||||
echo "ignoring file: ${file}"
|
||||
found_files="${found_files//${file}/}"
|
||||
break 1
|
||||
fi
|
||||
done
|
||||
done
|
||||
|
||||
# remove empty lines
|
||||
found_files=$(echo "$found_files" | sed '/^\s*$/d')
|
||||
|
||||
echo "found cpp files: ${found_files}"
|
||||
|
||||
# do not quote to keep this as a single line
|
||||
echo found_files=${found_files} >> $GITHUB_OUTPUT
|
||||
|
||||
- name: C++ - Clang format lint
|
||||
if: always() && steps.cpp_files.outputs.found_files
|
||||
uses: DoozyX/clang-format-lint-action@v0.18
|
||||
with:
|
||||
source: ${{ steps.cpp_files.outputs.found_files }}
|
||||
extensions: 'c,cpp,h,hpp,m,mm'
|
||||
style: file
|
||||
inplace: false
|
||||
|
||||
- name: CMake - find files
|
||||
id: cmake_files
|
||||
if: always()
|
||||
run: |
|
||||
# find files
|
||||
found_files=$(find . -type f -iname "CMakeLists.txt" -o -iname "*.cmake")
|
||||
ignore_files=$(find . -type f -iname ".cmake-lint-ignore")
|
||||
|
||||
# Loop through each C++ file
|
||||
for file in $found_files; do
|
||||
for ignore_file in $ignore_files; do
|
||||
ignore_directory=$(dirname "$ignore_file")
|
||||
# if directory of ignore_file is beginning of file
|
||||
if [[ "$file" == "$ignore_directory"* ]]; then
|
||||
echo "ignoring file: ${file}"
|
||||
found_files="${found_files//${file}/}"
|
||||
break 1
|
||||
fi
|
||||
done
|
||||
done
|
||||
|
||||
# remove empty lines
|
||||
found_files=$(echo "$found_files" | sed '/^\s*$/d')
|
||||
|
||||
echo "found cmake files: ${found_files}"
|
||||
|
||||
# do not quote to keep this as a single line
|
||||
echo found_files=${found_files} >> $GITHUB_OUTPUT
|
||||
|
||||
- name: CMake - cmake-lint
|
||||
if: always() && steps.cmake_files.outputs.found_files
|
||||
run: |
|
||||
cmake-lint --line-width 120 --tab-size 4 ${{ steps.cmake_files.outputs.found_files }}
|
||||
|
||||
- name: Docker - find files
|
||||
id: dokcer_files
|
||||
if: always()
|
||||
run: |
|
||||
found_files=$(find . -type f -iname "Dockerfile" -o -iname "*.dockerfile")
|
||||
|
||||
echo "found_files: ${found_files}"
|
||||
|
||||
# do not quote to keep this as a single line
|
||||
echo found_files=${found_files} >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Docker - hadolint
|
||||
if: always() && steps.dokcer_files.outputs.found_files
|
||||
run: |
|
||||
docker pull hadolint/hadolint
|
||||
|
||||
# create hadolint config file
|
||||
cat <<EOF > .hadolint.yaml
|
||||
---
|
||||
ignored:
|
||||
- DL3008
|
||||
- DL3013
|
||||
- DL3016
|
||||
- DL3018
|
||||
- DL3028
|
||||
- DL3059
|
||||
EOF
|
||||
|
||||
failed=0
|
||||
failed_files=""
|
||||
|
||||
for file in ${{ steps.dokcer_files.outputs.found_files }}; do
|
||||
echo "::group::${file}"
|
||||
docker run --rm -i \
|
||||
-e "NO_COLOR=0" \
|
||||
-e "HADOLINT_VERBOSE=1" \
|
||||
-v $(pwd)/.hadolint.yaml:/.config/hadolint.yaml \
|
||||
hadolint/hadolint < $file || {
|
||||
failed=1
|
||||
failed_files="$failed_files $file"
|
||||
}
|
||||
echo "::endgroup::"
|
||||
done
|
||||
|
||||
if [ $failed -ne 0 ]; then
|
||||
echo "::error:: hadolint failed for the following files: $failed_files"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
- name: Python - flake8
|
||||
if: always()
|
||||
run: |
|
||||
python -m flake8 \
|
||||
--color=always \
|
||||
--verbose
|
||||
|
||||
- name: Python - nbqa flake8
|
||||
if: always()
|
||||
run: |
|
||||
python -m nbqa flake8 \
|
||||
--color=always \
|
||||
--verbose \
|
||||
.
|
||||
|
||||
- name: Python - nb-clean
|
||||
if: always()
|
||||
run: |
|
||||
output=$(find . -name '*.ipynb' -exec nb-clean check {} \;)
|
||||
|
||||
# fail if there are any issues
|
||||
if [ -n "$output" ]; then
|
||||
echo "$output"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
- name: Rust - find Cargo.toml
|
||||
id: run_cargo
|
||||
if: always()
|
||||
run: |
|
||||
# check if Cargo.toml exists
|
||||
if [ -f "Cargo.toml" ]; then
|
||||
echo "found_cargo=true" >> $GITHUB_OUTPUT
|
||||
else
|
||||
echo "found_cargo=false" >> $GITHUB_OUTPUT
|
||||
fi
|
||||
|
||||
- name: Rust - setup toolchain
|
||||
if: always() && steps.run_cargo.outputs.found_cargo == 'true'
|
||||
uses: dtolnay/rust-toolchain@stable
|
||||
with:
|
||||
components: rustfmt
|
||||
|
||||
- name: Rust - cargo fmt
|
||||
if: always() && steps.run_cargo.outputs.found_cargo == 'true'
|
||||
run: |
|
||||
cargo fmt -- --check
|
||||
|
||||
- name: YAML - find files
|
||||
id: yaml_files
|
||||
if: always()
|
||||
run: |
|
||||
# space separated list of files
|
||||
FILES=.clang-format
|
||||
|
||||
# empty placeholder
|
||||
found_files=""
|
||||
|
||||
for FILE in ${FILES}; do
|
||||
if [ -f "$FILE" ]
|
||||
then
|
||||
found_files="$found_files $FILE"
|
||||
fi
|
||||
done
|
||||
|
||||
echo "found_files=${found_files}" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: YAML - yamllint
|
||||
id: yamllint
|
||||
if: always()
|
||||
uses: ibiqlik/action-yamllint@v3
|
||||
with:
|
||||
# https://yamllint.readthedocs.io/en/stable/configuration.html#default-configuration
|
||||
config_data: |
|
||||
extends: default
|
||||
rules:
|
||||
comments:
|
||||
level: error
|
||||
document-start:
|
||||
level: error
|
||||
line-length:
|
||||
max: 120
|
||||
new-line-at-end-of-file:
|
||||
level: error
|
||||
new-lines:
|
||||
type: unix
|
||||
truthy:
|
||||
# GitHub uses "on" for workflow event triggers
|
||||
# .clang-format file has options of "Yes" "No" that will be caught by this, so changed to "warning"
|
||||
allowed-values: ['true', 'false', 'on']
|
||||
check-keys: true
|
||||
level: warning
|
||||
file_or_dir: . ${{ steps.yaml_files.outputs.found_files }}
|
||||
|
||||
- name: YAML - log
|
||||
if: always() && steps.yamllint.outcome == 'failure'
|
||||
run: |
|
||||
cat "${{ steps.yamllint.outputs.logfile }}" >> $GITHUB_STEP_SUMMARY
|
||||
120
.github/workflows/cpp-lint.yml
vendored
120
.github/workflows/cpp-lint.yml
vendored
@@ -1,120 +0,0 @@
|
||||
---
|
||||
# This action is centrally managed in https://github.com/<organization>/.github/
|
||||
# Don't make changes to this file in this repo as they will be overwritten with changes made to the same file in
|
||||
# the above-mentioned repo.
|
||||
|
||||
# Lint c++ source files and cmake files.
|
||||
|
||||
name: C++ Lint
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches: [master, nightly]
|
||||
types: [opened, synchronize, reopened]
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
clang-format:
|
||||
name: Clang Format Lint
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Find cpp files
|
||||
id: find_files
|
||||
run: |
|
||||
# find files
|
||||
found_files=$(find . -type f -iname "*.cpp" -o -iname "*.h" -o -iname "*.m" -o -iname "*.mm")
|
||||
ignore_files=$(find . -type f -iname ".clang-format-ignore")
|
||||
|
||||
# Loop through each C++ file
|
||||
for file in $found_files; do
|
||||
for ignore_file in $ignore_files; do
|
||||
ignore_directory=$(dirname "$ignore_file")
|
||||
# if directory of ignore_file is beginning of file
|
||||
if [[ "$file" == "$ignore_directory"* ]]; then
|
||||
echo "ignoring file: ${file}"
|
||||
found_files="${found_files//${file}/}"
|
||||
break 1
|
||||
fi
|
||||
done
|
||||
done
|
||||
|
||||
# remove empty lines
|
||||
found_files=$(echo "$found_files" | sed '/^\s*$/d')
|
||||
|
||||
echo "found cpp files: ${found_files}"
|
||||
|
||||
# do not quote to keep this as a single line
|
||||
echo found_files=${found_files} >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Clang format lint
|
||||
if: ${{ steps.find_files.outputs.found_files }}
|
||||
uses: DoozyX/clang-format-lint-action@v0.16.2
|
||||
with:
|
||||
source: ${{ steps.find_files.outputs.found_files }}
|
||||
extensions: 'cpp,h,m,mm'
|
||||
clangFormatVersion: 16
|
||||
style: file
|
||||
inplace: false
|
||||
|
||||
- name: Upload Artifacts
|
||||
if: failure()
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: clang-format-fixes
|
||||
path: ${{ steps.find_files.outputs.found_files }}
|
||||
|
||||
cmake-lint:
|
||||
name: CMake Lint
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: '3.11'
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
python -m pip install --upgrade pip setuptools cmakelang
|
||||
|
||||
- name: Find cmake files
|
||||
id: find_files
|
||||
run: |
|
||||
# find files
|
||||
found_files=$(find . -type f -iname "CMakeLists.txt" -o -iname "*.cmake")
|
||||
ignore_files=$(find . -type f -iname ".cmake-lint-ignore")
|
||||
|
||||
# Loop through each C++ file
|
||||
for file in $found_files; do
|
||||
for ignore_file in $ignore_files; do
|
||||
ignore_directory=$(dirname "$ignore_file")
|
||||
# if directory of ignore_file is beginning of file
|
||||
if [[ "$file" == "$ignore_directory"* ]]; then
|
||||
echo "ignoring file: ${file}"
|
||||
found_files="${found_files//${file}/}"
|
||||
break 1
|
||||
fi
|
||||
done
|
||||
done
|
||||
|
||||
# remove empty lines
|
||||
found_files=$(echo "$found_files" | sed '/^\s*$/d')
|
||||
|
||||
echo "found cmake files: ${found_files}"
|
||||
|
||||
# do not quote to keep this as a single line
|
||||
echo found_files=${found_files} >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Test with cmake-lint
|
||||
run: |
|
||||
cmake-lint --line-width 120 --tab-size 4 ${{ steps.find_files.outputs.found_files }}
|
||||
69
.github/workflows/dispatcher.yml
vendored
69
.github/workflows/dispatcher.yml
vendored
@@ -1,69 +0,0 @@
|
||||
---
|
||||
# This action is centrally managed in https://github.com/<organization>/.github/
|
||||
# Don't make changes to this file in this repo as they will be overwritten with changes made to the same file in
|
||||
# the above-mentioned repo.
|
||||
|
||||
# This action receives a dispatch event and passes it through to another repo. This is a workaround to avoid issues
|
||||
# where fork PRs do not have access to secrets.
|
||||
|
||||
name: Dispatcher
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
dispatch_repository:
|
||||
description: 'Repository to dispatch to'
|
||||
required: true
|
||||
dispatch_workflow:
|
||||
description: 'Workflow to dispatch to'
|
||||
required: true
|
||||
dispatch_ref:
|
||||
description: 'Ref/branch to dispatch to'
|
||||
required: true
|
||||
dispatch_inputs:
|
||||
description: 'Inputs to send'
|
||||
required: true
|
||||
|
||||
jobs:
|
||||
dispatcher:
|
||||
name: Repository Dispatch
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Unescape JSON control characters
|
||||
id: inputs
|
||||
run: |
|
||||
# get the inputs
|
||||
dispatch_inputs=${{ github.event.inputs.dispatch_inputs }}
|
||||
echo "$dispatch_inputs"
|
||||
|
||||
# temporarily replace newlines with a placeholder
|
||||
dispatch_inputs=$(echo ${dispatch_inputs} | sed 's/\\\\n/_!new_line!_/g')
|
||||
|
||||
# remove newline characters
|
||||
dispatch_inputs=$(echo ${dispatch_inputs} | sed 's/\\n//g')
|
||||
|
||||
# replace placeholder with newline
|
||||
dispatch_inputs=$(echo ${dispatch_inputs} | sed 's/_!new_line!_/\\n/g')
|
||||
|
||||
# replace escaped quotes with unescaped quotes
|
||||
dispatch_inputs=$(echo ${dispatch_inputs} | sed 's/\\"//g')
|
||||
|
||||
# debug echo
|
||||
echo "$dispatch_inputs"
|
||||
|
||||
# parse as JSON
|
||||
dispatch_inputs=$(echo "$dispatch_inputs" | jq -c .)
|
||||
|
||||
# debug echo
|
||||
echo "$dispatch_inputs"
|
||||
|
||||
echo "dispatch_inputs=$dispatch_inputs" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Workflow Dispatch
|
||||
uses: benc-uk/workflow-dispatch@v1.2.2
|
||||
with:
|
||||
repo: ${{ github.event.inputs.dispatch_repository }}
|
||||
ref: ${{ github.event.inputs.dispatch_ref || 'master' }} # default to master if not specified
|
||||
workflow: ${{ github.event.inputs.dispatch_workflow }}
|
||||
inputs: ${{ steps.inputs.outputs.dispatch_inputs }}
|
||||
token: ${{ secrets.GH_BOT_TOKEN || github.token }} # fallback to default token if not specified
|
||||
61
.github/workflows/issues-stale.yml
vendored
61
.github/workflows/issues-stale.yml
vendored
@@ -1,61 +0,0 @@
|
||||
---
|
||||
# This action is centrally managed in https://github.com/<organization>/.github/
|
||||
# Don't make changes to this file in this repo as they will be overwritten with changes made to the same file in
|
||||
# the above-mentioned repo.
|
||||
|
||||
# Manage stale issues and PRs.
|
||||
|
||||
name: Stale Issues / PRs
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: '00 10 * * *'
|
||||
|
||||
jobs:
|
||||
stale:
|
||||
name: Check Stale Issues / PRs
|
||||
if: startsWith(github.repository, 'LizardByte/')
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Stale
|
||||
uses: actions/stale@v8
|
||||
with:
|
||||
close-issue-message: >
|
||||
This issue was closed because it has been stalled for 10 days with no activity.
|
||||
close-pr-message: >
|
||||
This PR was closed because it has been stalled for 10 days with no activity.
|
||||
days-before-stale: 90
|
||||
days-before-close: 10
|
||||
exempt-all-assignees: true
|
||||
exempt-issue-labels: 'added,fixed'
|
||||
exempt-pr-labels: 'dependencies,l10n'
|
||||
stale-issue-label: 'stale'
|
||||
stale-issue-message: >
|
||||
It seems this issue hasn't had any activity in the past 90 days.
|
||||
If it's still something you'd like addressed, please let us know by leaving a comment.
|
||||
Otherwise, to help keep our backlog tidy, we'll be closing this issue in 10 days. Thanks!
|
||||
stale-pr-label: 'stale'
|
||||
stale-pr-message: >
|
||||
It looks like this PR has been idle for 90 days.
|
||||
If it's still something you're working on or would like to pursue,
|
||||
please leave a comment or update your branch.
|
||||
Otherwise, we'll be closing this PR in 10 days to reduce our backlog. Thanks!
|
||||
repo-token: ${{ secrets.GH_BOT_TOKEN }}
|
||||
|
||||
- name: Invalid Template
|
||||
uses: actions/stale@v8
|
||||
with:
|
||||
close-issue-message: >
|
||||
This issue was closed because the the template was not completed after 5 days.
|
||||
close-pr-message: >
|
||||
This PR was closed because the the template was not completed after 5 days.
|
||||
days-before-stale: 0
|
||||
days-before-close: 5
|
||||
only-labels: 'invalid:template-incomplete'
|
||||
stale-issue-label: 'invalid:template-incomplete'
|
||||
stale-issue-message: >
|
||||
Invalid issues template.
|
||||
stale-pr-label: 'invalid:template-incomplete'
|
||||
stale-pr-message: >
|
||||
Invalid PR template.
|
||||
repo-token: ${{ secrets.GH_BOT_TOKEN }}
|
||||
2
.github/workflows/issues.yml
vendored
2
.github/workflows/issues.yml
vendored
@@ -20,6 +20,6 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Label Actions
|
||||
uses: dessant/label-actions@v3
|
||||
uses: dessant/label-actions@v4
|
||||
with:
|
||||
github-token: ${{ secrets.GH_BOT_TOKEN }}
|
||||
|
||||
12
.github/workflows/localize.yml
vendored
12
.github/workflows/localize.yml
vendored
@@ -3,7 +3,7 @@ name: localize
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [nightly]
|
||||
branches: [master]
|
||||
paths: # prevents workflow from running unless these files change
|
||||
- '.github/workflows/localize.yml'
|
||||
- 'src/**'
|
||||
@@ -23,7 +23,7 @@ jobs:
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Install Python 3.9
|
||||
uses: actions/setup-python@v4 # https://github.com/actions/setup-python
|
||||
uses: actions/setup-python@v5 # https://github.com/actions/setup-python
|
||||
with:
|
||||
python-version: '3.9'
|
||||
|
||||
@@ -77,16 +77,16 @@ jobs:
|
||||
run: echo "date=$(date +'%Y-%m-%d')" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Create/Update Pull Request
|
||||
uses: peter-evans/create-pull-request@v5
|
||||
uses: peter-evans/create-pull-request@v7
|
||||
with:
|
||||
add-paths: |
|
||||
locale/*.po
|
||||
token: ${{ secrets.GH_BOT_TOKEN }} # must trigger PR tests
|
||||
commit-message: New localization template
|
||||
commit-message: "chore(l10n): new babel updates"
|
||||
branch: localize/update
|
||||
delete-branch: true
|
||||
base: nightly
|
||||
title: New Babel Updates
|
||||
base: master
|
||||
title: "chore(l10n): new babel updates"
|
||||
body: |
|
||||
Update report
|
||||
- Updated ${{ steps.date.outputs.date }}
|
||||
|
||||
38
.github/workflows/python-flake8.yml
vendored
38
.github/workflows/python-flake8.yml
vendored
@@ -1,38 +0,0 @@
|
||||
---
|
||||
# This action is centrally managed in https://github.com/<organization>/.github/
|
||||
# Don't make changes to this file in this repo as they will be overwritten with changes made to the same file in
|
||||
# the above-mentioned repo.
|
||||
|
||||
# Lint python files with flake8.
|
||||
|
||||
name: flake8
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches: [master, nightly]
|
||||
types: [opened, synchronize, reopened]
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
flake8:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v4 # https://github.com/actions/setup-python
|
||||
with:
|
||||
python-version: '3.10'
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
# pin flake8 before v6.0.0 due to removal of support for type comments (required for Python 2.7 type hints)
|
||||
python -m pip install --upgrade pip setuptools "flake8<6"
|
||||
|
||||
- name: Test with flake8
|
||||
run: |
|
||||
python -m flake8 --verbose
|
||||
@@ -3,10 +3,15 @@ name: Release Notifications (Moonlight)
|
||||
|
||||
on:
|
||||
release:
|
||||
types: [published]
|
||||
types:
|
||||
- released # this triggers when a release is published, but does not include prereleases or drafts
|
||||
|
||||
jobs:
|
||||
discord:
|
||||
if: >-
|
||||
startsWith(github.repository, 'LizardByte/') &&
|
||||
!github.event.release.prerelease &&
|
||||
!github.event.release.draft
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: discord
|
||||
|
||||
199
.github/workflows/release-notifier.yml
vendored
199
.github/workflows/release-notifier.yml
vendored
@@ -3,101 +3,136 @@
|
||||
# Don't make changes to this file in this repo as they will be overwritten with changes made to the same file in
|
||||
# the above-mentioned repo.
|
||||
|
||||
# Send release notification to various platforms.
|
||||
# Create a blog post for a new release and open a PR to the blog repo
|
||||
|
||||
name: Release Notifications
|
||||
|
||||
on:
|
||||
release:
|
||||
types: [published]
|
||||
# https://docs.github.com/en/actions/learn-github-actions/workflow-syntax-for-github-actions#onevent_nametypes
|
||||
types:
|
||||
- released # this triggers when a release is published, but does not include pre-releases or drafts
|
||||
|
||||
jobs:
|
||||
discord:
|
||||
update-blog:
|
||||
if: >-
|
||||
(github.repository, 'LizardByte/') and
|
||||
not(github.event.release.prerelease) and
|
||||
not(github.event.release.draft)
|
||||
github.repository_owner == 'LizardByte'
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: discord
|
||||
uses: sarisia/actions-status-discord@v1
|
||||
- name: Check topics
|
||||
env:
|
||||
TOPIC: replicator-release-notifications
|
||||
id: check-label
|
||||
uses: actions/github-script@v7
|
||||
with:
|
||||
webhook: ${{ secrets.DISCORD_RELEASE_WEBHOOK }}
|
||||
nodetail: true
|
||||
nofail: false
|
||||
username: ${{ secrets.DISCORD_USERNAME }}
|
||||
avatar_url: ${{ secrets.ORG_LOGO_URL }}
|
||||
title: ${{ github.event.repository.name }} ${{ github.ref_name }} Released
|
||||
description: ${{ github.event.release.body }}
|
||||
color: 0xFF4500
|
||||
script: |
|
||||
const topic = process.env.TOPIC;
|
||||
console.log(`Checking if repo has topic: ${topic}`);
|
||||
|
||||
facebook_group:
|
||||
if: >-
|
||||
(github.repository, 'LizardByte/') and
|
||||
not(github.event.release.prerelease) and
|
||||
not(github.event.release.draft)
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: facebook-post-action
|
||||
uses: ReenigneArcher/facebook-post-action@v1
|
||||
with:
|
||||
page_id: ${{ secrets.FACEBOOK_GROUP_ID }}
|
||||
access_token: ${{ secrets.FACEBOOK_ACCESS_TOKEN }}
|
||||
message: |
|
||||
${{ github.event.repository.name }} ${{ github.ref_name }} Released
|
||||
${{ github.event.release.body }}
|
||||
url: ${{ github.event.release.html_url }}
|
||||
const repoTopics = await github.rest.repos.getAllTopics({
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo
|
||||
});
|
||||
console.log(`Repo topics: ${repoTopics.data.names}`);
|
||||
|
||||
facebook_page:
|
||||
if: >-
|
||||
(github.repository, 'LizardByte/') and
|
||||
not(github.event.release.prerelease) and
|
||||
not(github.event.release.draft)
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: facebook-post-action
|
||||
uses: ReenigneArcher/facebook-post-action@v1
|
||||
with:
|
||||
page_id: ${{ secrets.FACEBOOK_PAGE_ID }}
|
||||
access_token: ${{ secrets.FACEBOOK_ACCESS_TOKEN }}
|
||||
message: |
|
||||
${{ github.event.repository.name }} ${{ github.ref_name }} Released
|
||||
${{ github.event.release.body }}
|
||||
url: ${{ github.event.release.html_url }}
|
||||
const hasTopic = repoTopics.data.names.includes(topic);
|
||||
console.log(`Has topic: ${hasTopic}`);
|
||||
|
||||
reddit:
|
||||
if: >-
|
||||
(github.repository, 'LizardByte/') and
|
||||
not(github.event.release.prerelease) and
|
||||
not(github.event.release.draft)
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: reddit
|
||||
uses: bluwy/release-for-reddit-action@v2
|
||||
with:
|
||||
username: ${{ secrets.REDDIT_USERNAME }}
|
||||
password: ${{ secrets.REDDIT_PASSWORD }}
|
||||
app-id: ${{ secrets.REDDIT_CLIENT_ID }}
|
||||
app-secret: ${{ secrets.REDDIT_CLIENT_SECRET }}
|
||||
subreddit: ${{ secrets.REDDIT_SUBREDDIT }}
|
||||
title: ${{ github.event.repository.name }} ${{ github.ref_name }} Released
|
||||
url: ${{ github.event.release.html_url }}
|
||||
flair-id: ${{ secrets.REDDIT_FLAIR_ID }} # https://www.reddit.com/r/<subreddit>>/api/link_flair.json
|
||||
comment: ${{ github.event.release.body }}
|
||||
core.setOutput('hasTopic', hasTopic);
|
||||
|
||||
twitter:
|
||||
if: >-
|
||||
(github.repository, 'LizardByte/') and
|
||||
not(github.event.release.prerelease) and
|
||||
not(github.event.release.draft)
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: twitter
|
||||
uses: nearform-actions/github-action-notify-twitter@v1
|
||||
- name: Check if latest GitHub release
|
||||
id: check-release
|
||||
if: >-
|
||||
steps.check-label.outputs.hasTopic == 'true'
|
||||
uses: actions/github-script@v7
|
||||
with:
|
||||
message: ${{ github.event.release.html_url }}
|
||||
twitter-app-key: ${{ secrets.TWITTER_API_KEY }}
|
||||
twitter-app-secret: ${{ secrets.TWITTER_API_SECRET }}
|
||||
twitter-access-token: ${{ secrets.TWITTER_ACCESS_TOKEN }}
|
||||
twitter-access-token-secret: ${{ secrets.TWITTER_ACCESS_TOKEN_SECRET }}
|
||||
script: |
|
||||
const latestRelease = await github.rest.repos.getLatestRelease({
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo
|
||||
});
|
||||
|
||||
core.setOutput('isLatestRelease', latestRelease.data.tag_name === context.payload.release.tag_name);
|
||||
|
||||
- name: Checkout blog
|
||||
if: >-
|
||||
steps.check-label.outputs.hasTopic == 'true' &&
|
||||
steps.check-release.outputs.isLatestRelease == 'true'
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
repository: "LizardByte/LizardByte.github.io"
|
||||
|
||||
- name: Create blog post
|
||||
if: >-
|
||||
steps.check-label.outputs.hasTopic == 'true' &&
|
||||
steps.check-release.outputs.isLatestRelease == 'true'
|
||||
run: |
|
||||
# setup variables
|
||||
tag_name="${{ github.event.release.tag_name }}"
|
||||
semver="${tag_name#v}"
|
||||
repo_lower="$(echo "${{ github.event.repository.name }}" | tr '[:upper:]' '[:lower:]')"
|
||||
|
||||
# extract year, month, and day
|
||||
year="${semver%%.*}"
|
||||
month_day="${semver#*.}"
|
||||
month_day="${month_day%%.*}"
|
||||
|
||||
# ensure month_day is 4 digits
|
||||
month_day=$(printf "%04d" "$month_day")
|
||||
|
||||
# create the filename
|
||||
file_name="_posts/releases/${repo_lower}/${year}-${month_day:0:2}-${month_day:2:2}-v${semver}.md"
|
||||
mkdir -p "$(dirname "${file_name}")"
|
||||
|
||||
# create jekyll blog post
|
||||
echo "---" > "${file_name}"
|
||||
echo "layout: release" >> "${file_name}"
|
||||
echo "title: ${{ github.event.repository.name }} ${tag_name} Released" >> "${file_name}"
|
||||
echo "release-tag: ${tag_name}" >> "${file_name}"
|
||||
echo "gh-repo: ${{ github.repository }}" >> "${file_name}"
|
||||
echo "gh-badge: [follow, fork, star]" >> "${file_name}"
|
||||
echo "tags: [release, ${repo_lower}]" >> "${file_name}"
|
||||
echo "comments: true" >> "${file_name}"
|
||||
echo "author: LizardByte-bot" >> "${file_name}"
|
||||
echo "---" >> "${file_name}"
|
||||
echo "" >> "${file_name}"
|
||||
|
||||
release_body=$(cat <<EOF
|
||||
${{ github.event.release.body }}
|
||||
EOF
|
||||
)
|
||||
|
||||
echo "${release_body}" >> "${file_name}"
|
||||
|
||||
- name: Create/Update Pull Request
|
||||
id: create-pr
|
||||
if: >-
|
||||
steps.check-label.outputs.hasTopic == 'true' &&
|
||||
steps.check-release.outputs.isLatestRelease == 'true'
|
||||
uses: peter-evans/create-pull-request@v7
|
||||
with:
|
||||
token: ${{ secrets.GH_BOT_TOKEN }}
|
||||
commit-message: |
|
||||
chore: Add blog post for ${{ github.event.repository.name }} release ${{ github.event.release.tag_name }}
|
||||
branch: bot/add-${{ github.event.repository.name }}-${{ github.event.release.tag_name }}
|
||||
delete-branch: true
|
||||
title: |
|
||||
chore: Add blog post for ${{ github.event.repository.name }} release ${{ github.event.release.tag_name }}
|
||||
body: ${{ github.event.release.body }}
|
||||
labels:
|
||||
blog
|
||||
|
||||
- name: Automerge PR
|
||||
env:
|
||||
GH_TOKEN: ${{ secrets.GH_BOT_TOKEN }}
|
||||
if: >-
|
||||
steps.check-label.outputs.hasTopic == 'true' &&
|
||||
steps.check-release.outputs.isLatestRelease == 'true'
|
||||
run: |
|
||||
gh \
|
||||
pr \
|
||||
merge \
|
||||
--auto \
|
||||
--delete-branch \
|
||||
--repo "LizardByte/LizardByte.github.io" \
|
||||
--squash \
|
||||
"${{ steps.create-pr.outputs.pull-request-number }}"
|
||||
|
||||
31
.github/workflows/update-changelog.yml
vendored
Normal file
31
.github/workflows/update-changelog.yml
vendored
Normal file
@@ -0,0 +1,31 @@
|
||||
---
|
||||
# This action is centrally managed in https://github.com/<organization>/.github/
|
||||
# Don't make changes to this file in this repo as they will be overwritten with changes made to the same file in
|
||||
# the above-mentioned repo.
|
||||
|
||||
# Update changelog on release events.
|
||||
|
||||
name: Update changelog
|
||||
|
||||
on:
|
||||
release:
|
||||
types: [created, edited, deleted]
|
||||
workflow_dispatch:
|
||||
|
||||
concurrency:
|
||||
group: "${{ github.workflow }}"
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
update-changelog:
|
||||
if: >-
|
||||
github.event_name == 'workflow_dispatch' ||
|
||||
(!github.event.release.prerelease && !github.event.release.draft)
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Update Changelog
|
||||
uses: LizardByte/update-changelog-action@v2024.919.152649
|
||||
with:
|
||||
changelogBranch: changelog
|
||||
changelogFile: CHANGELOG.md
|
||||
token: ${{ secrets.GH_BOT_TOKEN }}
|
||||
96
.github/workflows/update-docs.yml
vendored
Normal file
96
.github/workflows/update-docs.yml
vendored
Normal file
@@ -0,0 +1,96 @@
|
||||
---
|
||||
# This action is centrally managed in https://github.com/<organization>/.github/
|
||||
# Don't make changes to this file in this repo as they will be overwritten with changes made to the same file in
|
||||
# the above-mentioned repo.
|
||||
|
||||
# Use the `rtd` repository label to identify repositories that should trigger have this workflow.
|
||||
# If the project slug is not the repository name, add a repository variable named `READTHEDOCS_SLUG` with the value of
|
||||
# the ReadTheDocs project slug.
|
||||
|
||||
# Update readthedocs on release events.
|
||||
|
||||
name: Update docs
|
||||
|
||||
on:
|
||||
release:
|
||||
types: [created, edited, deleted]
|
||||
|
||||
concurrency:
|
||||
group: "${{ github.workflow }}-${{ github.event.release.tag_name }}"
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
update-docs:
|
||||
env:
|
||||
RTD_SLUG: ${{ vars.READTHEDOCS_SLUG }}
|
||||
RTD_TOKEN: ${{ secrets.READTHEDOCS_TOKEN }}
|
||||
TAG: ${{ github.event.release.tag_name }}
|
||||
if: >-
|
||||
!github.event.release.draft
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Get RTD_SLUG
|
||||
run: |
|
||||
# if the RTD_SLUG is not set, use the repository name in lowercase
|
||||
if [ -z "${RTD_SLUG}" ]; then
|
||||
RTD_SLUG=$(echo "${{ github.event.repository.name }}" | tr '[:upper:]' '[:lower:]')
|
||||
fi
|
||||
echo "RTD_SLUG=${RTD_SLUG}" >> $GITHUB_ENV
|
||||
|
||||
- name: Deactivate deleted release
|
||||
if: >-
|
||||
github.event_name == 'release' &&
|
||||
github.event.action == 'deleted'
|
||||
run: |
|
||||
json_body=$(jq -n \
|
||||
--arg active "false" \
|
||||
--arg hidden "false" \
|
||||
--arg privacy_level "public" \
|
||||
'{active: $active, hidden: $hidden, privacy_level: $privacy_level}')
|
||||
|
||||
curl \
|
||||
-X PATCH \
|
||||
-H "Authorization: Token ${RTD_TOKEN}" \
|
||||
https://readthedocs.org/api/v3/projects/${RTD_SLUG}/versions/${TAG}/ \
|
||||
-H "Content-Type: application/json" \
|
||||
-d "$json_body"
|
||||
|
||||
- name: Check if edited release is latest GitHub release
|
||||
id: check
|
||||
if: >-
|
||||
github.event_name == 'release' &&
|
||||
github.event.action == 'edited'
|
||||
uses: actions/github-script@v7
|
||||
with:
|
||||
script: |
|
||||
const latestRelease = await github.rest.repos.getLatestRelease({
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo
|
||||
});
|
||||
|
||||
core.setOutput('isLatestRelease', latestRelease.data.tag_name === context.payload.release.tag_name);
|
||||
|
||||
- name: Update RTD project
|
||||
# changing the default branch in readthedocs makes "latest" point to that branch/tag
|
||||
# we can also update other properties like description, etc.
|
||||
if: >-
|
||||
steps.check.outputs.isLatestRelease == 'true'
|
||||
run: |
|
||||
json_body=$(jq -n \
|
||||
--arg default_branch "${TAG}" \
|
||||
--arg description "${{ github.event.repository.description }}" \
|
||||
'{default_branch: $default_branch}')
|
||||
|
||||
# change the default branch to the latest release
|
||||
curl \
|
||||
-X PATCH \
|
||||
-H "Authorization: Token ${RTD_TOKEN}" \
|
||||
-H "Content-Type: application/json" \
|
||||
https://readthedocs.org/api/v3/projects/${RTD_SLUG}/ \
|
||||
-d "$json_body"
|
||||
|
||||
# trigger a build for the latest version
|
||||
curl \
|
||||
-X POST \
|
||||
-H "Authorization: Token ${RTD_TOKEN}" \
|
||||
https://readthedocs.org/api/v3/projects/${RTD_SLUG}/versions/latest/builds/
|
||||
187
.github/workflows/update-flathub-repo.yml
vendored
Normal file
187
.github/workflows/update-flathub-repo.yml
vendored
Normal file
@@ -0,0 +1,187 @@
|
||||
---
|
||||
# This action is a candidate to centrally manage in https://github.com/<organization>/.github/
|
||||
# If more Flathub applications are developed, consider moving this action to the organization's .github repository,
|
||||
# using the `flathub-pkg` repository label to identify repositories that should trigger this workflow.
|
||||
|
||||
# Update Flathub on release events.
|
||||
|
||||
name: Update flathub repo
|
||||
|
||||
on:
|
||||
release:
|
||||
types: [released]
|
||||
|
||||
concurrency:
|
||||
group: "${{ github.workflow }}-${{ github.event.release.tag_name }}"
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
update-flathub-repo:
|
||||
env:
|
||||
FLATHUB_PKG: dev.lizardbyte.app.${{ github.event.repository.name }}
|
||||
if: >-
|
||||
github.repository_owner == 'LizardByte'
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Check if flathub repo
|
||||
env:
|
||||
TOPIC: flathub-pkg
|
||||
id: check-label
|
||||
uses: actions/github-script@v7
|
||||
with:
|
||||
script: |
|
||||
const topic = process.env.TOPIC;
|
||||
console.log(`Checking if repo has topic: ${topic}`);
|
||||
|
||||
const repoTopics = await github.rest.repos.getAllTopics({
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo
|
||||
});
|
||||
console.log(`Repo topics: ${repoTopics.data.names}`);
|
||||
|
||||
const hasTopic = repoTopics.data.names.includes(topic);
|
||||
console.log(`Has topic: ${hasTopic}`);
|
||||
|
||||
core.setOutput('hasTopic', hasTopic);
|
||||
|
||||
- name: Check if latest GitHub release
|
||||
id: check-release
|
||||
if: >-
|
||||
steps.check-label.outputs.hasTopic == 'true'
|
||||
uses: actions/github-script@v7
|
||||
with:
|
||||
script: |
|
||||
const latestRelease = await github.rest.repos.getLatestRelease({
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo
|
||||
});
|
||||
|
||||
core.setOutput('isLatestRelease', latestRelease.data.tag_name === context.payload.release.tag_name);
|
||||
|
||||
- name: Checkout
|
||||
if: >-
|
||||
steps.check-label.outputs.hasTopic == 'true' &&
|
||||
steps.check-release.outputs.isLatestRelease == 'true'
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Checkout flathub-repo
|
||||
if: >-
|
||||
steps.check-label.outputs.hasTopic == 'true' &&
|
||||
steps.check-release.outputs.isLatestRelease == 'true'
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
repository: "flathub/${{ env.FLATHUB_PKG }}"
|
||||
path: "flathub/${{ env.FLATHUB_PKG }}"
|
||||
|
||||
- name: Clean up legacy files
|
||||
if: >-
|
||||
steps.check-label.outputs.hasTopic == 'true' &&
|
||||
steps.check-release.outputs.isLatestRelease == 'true'
|
||||
working-directory: flathub/${{ env.FLATHUB_PKG }}
|
||||
run: |
|
||||
rm -rf ./*
|
||||
|
||||
- name: Copy github files
|
||||
if: >-
|
||||
steps.check-label.outputs.hasTopic == 'true' &&
|
||||
steps.check-release.outputs.isLatestRelease == 'true'
|
||||
working-directory: flathub/${{ env.FLATHUB_PKG }}
|
||||
run: |
|
||||
mkdir -p .github/ISSUE_TEMPLATE
|
||||
|
||||
# sponsors
|
||||
curl -sSL https://github.com/LizardByte/.github/raw/refs/heads/master/.github/FUNDING.yml \
|
||||
-o .github/FUNDING.yml
|
||||
# pull request template
|
||||
curl -sSL https://github.com/LizardByte/.github/raw/refs/heads/master/.github/pull_request_template.md \
|
||||
-o .github/pull_request_template.md
|
||||
# issue config
|
||||
curl -sSL https://github.com/LizardByte/.github/raw/refs/heads/master/.github/ISSUE_TEMPLATE/config.yml \
|
||||
-o .github/ISSUE_TEMPLATE/config.yml
|
||||
|
||||
- name: Download release asset
|
||||
id: download
|
||||
if: >-
|
||||
steps.check-label.outputs.hasTopic == 'true' &&
|
||||
steps.check-release.outputs.isLatestRelease == 'true'
|
||||
uses: robinraju/release-downloader@v1.11
|
||||
with:
|
||||
repository: "${{ github.repository }}"
|
||||
tag: "${{ github.event.release.tag_name }}"
|
||||
fileName: "flathub.tar.gz"
|
||||
tarBall: false
|
||||
zipBall: false
|
||||
out-file-path: "flathub/${{ env.FLATHUB_PKG }}"
|
||||
extract: true
|
||||
|
||||
- name: Delete arhive
|
||||
if: >-
|
||||
steps.check-label.outputs.hasTopic == 'true' &&
|
||||
steps.check-release.outputs.isLatestRelease == 'true'
|
||||
run: |
|
||||
rm -f flathub/${{ env.FLATHUB_PKG }}/flathub.tar.gz
|
||||
|
||||
- name: Update metainfo.xml
|
||||
id: update_metainfo
|
||||
if: >-
|
||||
steps.check-label.outputs.hasTopic == 'true' &&
|
||||
steps.check-release.outputs.isLatestRelease == 'true'
|
||||
run: |
|
||||
xml_file="flathub/${{ env.FLATHUB_PKG }}/${{ env.FLATHUB_PKG }}.metainfo.xml"
|
||||
|
||||
# Extract release information
|
||||
version="${{ github.event.release.tag_name }}" && version="${version#v}"
|
||||
date="${{ github.event.release.published_at }}" && date="${date%%T*}"
|
||||
changelog="${{ github.event.release.body }}" && changelog="${changelog//&/&}" && \
|
||||
changelog="${changelog//</<}" && changelog="${changelog//>/>}"
|
||||
|
||||
# Store the old release information into a temp file to be used for precise replacement
|
||||
tmpfile=$(mktemp)
|
||||
|
||||
# Match the existing <release> block, replace it with the new data
|
||||
awk -v version="$version" -v date="$date" -v changelog="$changelog" '
|
||||
BEGIN { replaced = 0 }
|
||||
/<release version=.*>/ {
|
||||
if (!replaced) {
|
||||
print " <release version=\"" version "\" date=\"" date "\">"
|
||||
print " <description><p>" changelog "</p></description>"
|
||||
print " </release>"
|
||||
replaced = 1
|
||||
}
|
||||
}
|
||||
!/<release version=.*>/ && !/<\/release>/ { print $0 }
|
||||
' "$xml_file" > "$tmpfile"
|
||||
|
||||
# Move the updated file back to the original location
|
||||
mv "$tmpfile" "$xml_file"
|
||||
|
||||
- name: Update submodule
|
||||
if: >-
|
||||
steps.check-label.outputs.hasTopic == 'true' &&
|
||||
steps.check-release.outputs.isLatestRelease == 'true'
|
||||
run: |
|
||||
# Get the current commit of the submodule in the main repository
|
||||
git submodule update --init packaging/linux/flatpak/deps/shared-modules
|
||||
cd ${{ github.workspace }}/packaging/linux/flatpak/deps/shared-modules
|
||||
main_commit=$(git rev-parse HEAD)
|
||||
|
||||
# update submodules
|
||||
cd ${{ github.workspace }}/flathub/${{ env.FLATHUB_PKG }}
|
||||
git submodule update --init shared-modules
|
||||
cd shared-modules
|
||||
git checkout $main_commit
|
||||
|
||||
- name: Create/Update Pull Request
|
||||
if: >-
|
||||
steps.check-label.outputs.hasTopic == 'true' &&
|
||||
steps.check-release.outputs.isLatestRelease == 'true' &&
|
||||
fromJson(steps.download.outputs.downloaded_files)[0]
|
||||
uses: peter-evans/create-pull-request@v7
|
||||
with:
|
||||
path: "flathub/${{ env.FLATHUB_PKG }}"
|
||||
token: ${{ secrets.GH_BOT_TOKEN }}
|
||||
commit-message: "chore: Update ${{ env.FLATHUB_PKG }} to ${{ github.event.release.tag_name }}"
|
||||
branch: bot/bump-${{ env.FLATHUB_PKG }}-${{ github.event.release.tag_name }}
|
||||
delete-branch: true
|
||||
title: "chore: Update ${{ env.FLATHUB_PKG }} to ${{ github.event.release.tag_name }}"
|
||||
body: ${{ github.event.release.body }}
|
||||
70
.github/workflows/update-homebrew-release.yml
vendored
Normal file
70
.github/workflows/update-homebrew-release.yml
vendored
Normal file
@@ -0,0 +1,70 @@
|
||||
---
|
||||
# This action is a candidate to centrally manage in https://github.com/<organization>/.github/
|
||||
# If more Homebrew applications are developed, consider moving this action to the organization's .github repository,
|
||||
# using the `homebrew-pkg` repository label to identify repositories that should trigger this workflow.
|
||||
|
||||
# Update Homebrew on release events.
|
||||
|
||||
name: Update Homebrew release
|
||||
|
||||
on:
|
||||
release:
|
||||
types: [released]
|
||||
|
||||
concurrency:
|
||||
group: "${{ github.workflow }}-${{ github.event.release.tag_name }}"
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
update-homebrew-release:
|
||||
if: >-
|
||||
github.repository_owner == 'LizardByte'
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Check if Homebrew repo
|
||||
env:
|
||||
TOPIC: homebrew-pkg
|
||||
id: check-label
|
||||
uses: actions/github-script@v7
|
||||
with:
|
||||
script: |
|
||||
const topic = process.env.TOPIC;
|
||||
console.log(`Checking if repo has topic: ${topic}`);
|
||||
|
||||
const repoTopics = await github.rest.repos.getAllTopics({
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo
|
||||
});
|
||||
console.log(`Repo topics: ${repoTopics.data.names}`);
|
||||
|
||||
const hasTopic = repoTopics.data.names.includes(topic);
|
||||
console.log(`Has topic: ${hasTopic}`);
|
||||
|
||||
core.setOutput('hasTopic', hasTopic);
|
||||
|
||||
- name: Download release asset
|
||||
id: download
|
||||
if: >-
|
||||
steps.check-label.outputs.hasTopic == 'true'
|
||||
uses: robinraju/release-downloader@v1.11
|
||||
with:
|
||||
repository: "${{ github.repository }}"
|
||||
tag: "${{ github.event.release.tag_name }}"
|
||||
fileName: "*.rb"
|
||||
tarBall: false
|
||||
zipBall: false
|
||||
out-file-path: "release_downloads"
|
||||
extract: false
|
||||
|
||||
- name: Publish Homebrew Formula
|
||||
if: >-
|
||||
steps.check-label.outputs.hasTopic == 'true' &&
|
||||
fromJson(steps.download.outputs.downloaded_files)[0]
|
||||
uses: LizardByte/homebrew-release-action@v2024.1115.14934
|
||||
with:
|
||||
formula_file: ${{ fromJson(steps.download.outputs.downloaded_files)[0] }}
|
||||
git_email: ${{ secrets.GH_BOT_EMAIL }}
|
||||
git_username: ${{ secrets.GH_BOT_NAME }}
|
||||
publish: true
|
||||
token: ${{ secrets.GH_BOT_TOKEN }}
|
||||
validate: false
|
||||
107
.github/workflows/update-pacman-repo.yml
vendored
Normal file
107
.github/workflows/update-pacman-repo.yml
vendored
Normal file
@@ -0,0 +1,107 @@
|
||||
---
|
||||
# This action is a candidate to centrally manage in https://github.com/<organization>/.github/
|
||||
# If more pacman packages are developed, consider moving this action to the organization's .github repository,
|
||||
# using the `pacman-pkg` repository label to identify repositories that should trigger have this workflow.
|
||||
|
||||
# Update pacman repo on release events.
|
||||
|
||||
name: Update pacman repo
|
||||
|
||||
on:
|
||||
release:
|
||||
types: [released]
|
||||
|
||||
concurrency:
|
||||
group: "${{ github.workflow }}-${{ github.event.release.tag_name }}"
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
update-homebrew-release:
|
||||
if: >-
|
||||
github.repository_owner == 'LizardByte'
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Check if pacman repo
|
||||
env:
|
||||
TOPIC: pacman-pkg
|
||||
id: check-label
|
||||
uses: actions/github-script@v7
|
||||
with:
|
||||
script: |
|
||||
const topic = process.env.TOPIC;
|
||||
console.log(`Checking if repo has topic: ${topic}`);
|
||||
|
||||
const repoTopics = await github.rest.repos.getAllTopics({
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo
|
||||
});
|
||||
console.log(`Repo topics: ${repoTopics.data.names}`);
|
||||
|
||||
const hasTopic = repoTopics.data.names.includes(topic);
|
||||
console.log(`Has topic: ${hasTopic}`);
|
||||
|
||||
core.setOutput('hasTopic', hasTopic);
|
||||
|
||||
- name: Check if latest GitHub release
|
||||
id: check-release
|
||||
if: >-
|
||||
steps.check-label.outputs.hasTopic == 'true'
|
||||
uses: actions/github-script@v7
|
||||
with:
|
||||
script: |
|
||||
const latestRelease = await github.rest.repos.getLatestRelease({
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo
|
||||
});
|
||||
|
||||
core.setOutput('isLatestRelease', latestRelease.data.tag_name === context.payload.release.tag_name);
|
||||
|
||||
- name: Checkout pacman-repo
|
||||
if: >-
|
||||
steps.check-label.outputs.hasTopic == 'true' &&
|
||||
steps.check-release.outputs.isLatestRelease == 'true'
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
repository: ${{ github.repository_owner }}/pacman-repo
|
||||
|
||||
- name: Prep
|
||||
id: prep
|
||||
if: >-
|
||||
steps.check-label.outputs.hasTopic == 'true' &&
|
||||
steps.check-release.outputs.isLatestRelease == 'true'
|
||||
run: |
|
||||
echo "pkg_name=$(echo ${{ github.event.repository.name }} | tr '[:upper:]' '[:lower:]')" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Download release asset
|
||||
id: download
|
||||
if: >-
|
||||
steps.check-label.outputs.hasTopic == 'true' &&
|
||||
steps.check-release.outputs.isLatestRelease == 'true'
|
||||
uses: robinraju/release-downloader@v1.11
|
||||
with:
|
||||
repository: "${{ github.repository }}"
|
||||
tag: "${{ github.event.release.tag_name }}"
|
||||
fileName: "*.pkg.tar.gz"
|
||||
tarBall: false
|
||||
zipBall: false
|
||||
out-file-path: "pkgbuilds/${{ steps.prep.outputs.pkg_name }}"
|
||||
extract: true
|
||||
|
||||
- name: Create/Update Pull Request
|
||||
if: >-
|
||||
steps.check-label.outputs.hasTopic == 'true' &&
|
||||
steps.check-release.outputs.isLatestRelease == 'true' &&
|
||||
fromJson(steps.download.outputs.downloaded_files)[0]
|
||||
uses: peter-evans/create-pull-request@v7
|
||||
with:
|
||||
add-paths: |
|
||||
pkgbuilds/*
|
||||
token: ${{ secrets.GH_BOT_TOKEN }}
|
||||
commit-message: "chore: Update ${{ github.repository }} to ${{ github.event.release.tag_name }}"
|
||||
branch: bot/bump-${{ github.repository }}-${{ github.event.release.tag_name }}
|
||||
delete-branch: true
|
||||
title: "chore: Update ${{ github.repository }} to ${{ github.event.release.tag_name }}"
|
||||
body: ${{ github.event.release.body }}
|
||||
labels: |
|
||||
auto-approve
|
||||
auto-merge
|
||||
71
.github/workflows/update-pages.yml
vendored
71
.github/workflows/update-pages.yml
vendored
@@ -3,60 +3,45 @@ name: Build GH-Pages
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches: [master, nightly]
|
||||
types: [opened, synchronize, reopened]
|
||||
branches:
|
||||
- master
|
||||
types:
|
||||
- opened
|
||||
- synchronize
|
||||
- reopened
|
||||
push:
|
||||
branches: [master]
|
||||
branches:
|
||||
- master
|
||||
workflow_dispatch:
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
group: "${{ github.workflow }}-${{ github.ref }}"
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
update_pages:
|
||||
prep:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Checkout gh-pages
|
||||
uses: actions/checkout@v4
|
||||
- name: Upload artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
ref: gh-pages
|
||||
path: gh-pages
|
||||
persist-credentials: false # otherwise, the token used is the GITHUB_TOKEN, instead of the personal token
|
||||
fetch-depth: 0 # otherwise, will fail to push refs to dest repo
|
||||
name: prep
|
||||
path: gh-pages-template/
|
||||
if-no-files-found: error
|
||||
include-hidden-files: true
|
||||
retention-days: 1
|
||||
|
||||
- name: Prepare gh-pages
|
||||
run: |
|
||||
# empty contents
|
||||
rm -f -r ./gh-pages/*
|
||||
|
||||
# copy template back to pages
|
||||
cp -f -r ./gh-pages-template/. ./gh-pages/
|
||||
|
||||
- name: Upload Artifacts
|
||||
if: ${{ github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch' }}
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: gh-pages
|
||||
if-no-files-found: error # 'warn' or 'ignore' are also available, defaults to `warn`
|
||||
path: |
|
||||
${{ github.workspace }}/gh-pages
|
||||
!**/*.git
|
||||
|
||||
- name: Deploy to gh-pages
|
||||
if: >-
|
||||
(github.event_name == 'push' && github.ref == 'refs/heads/master') ||
|
||||
(github.event_name == 'workflow_dispatch')
|
||||
uses: actions-js/push@v1.4
|
||||
with:
|
||||
github_token: ${{ secrets.GH_BOT_TOKEN }}
|
||||
author_email: ${{ secrets.GH_BOT_EMAIL }}
|
||||
author_name: ${{ secrets.GH_BOT_NAME }}
|
||||
directory: gh-pages
|
||||
branch: gh-pages
|
||||
force: false
|
||||
message: sync gh-pages to ${{ github.sha }}
|
||||
call-jekyll-build:
|
||||
needs: prep
|
||||
uses: LizardByte/LizardByte.github.io/.github/workflows/jekyll-build.yml@master
|
||||
with:
|
||||
site_artifact: 'prep'
|
||||
target_branch: 'gh-pages'
|
||||
clean_gh_pages: true
|
||||
secrets:
|
||||
GH_BOT_EMAIL: ${{ secrets.GH_BOT_EMAIL }}
|
||||
GH_BOT_NAME: ${{ secrets.GH_BOT_NAME }}
|
||||
GH_BOT_TOKEN: ${{ secrets.GH_BOT_TOKEN }}
|
||||
|
||||
68
.github/workflows/update-winget-release.yml
vendored
Normal file
68
.github/workflows/update-winget-release.yml
vendored
Normal file
@@ -0,0 +1,68 @@
|
||||
---
|
||||
# This action is a candidate to centrally manage in https://github.com/<organization>/.github/
|
||||
# If more Winget applications are developed, consider moving this action to the organization's .github repository,
|
||||
# using the `winget-pkg` repository label to identify repositories that should trigger this workflow.
|
||||
|
||||
# Update Winget on release events.
|
||||
|
||||
name: Update Winget release
|
||||
|
||||
on:
|
||||
release:
|
||||
types: [released]
|
||||
|
||||
concurrency:
|
||||
group: "${{ github.workflow }}-${{ github.event.release.tag_name }}"
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
update-winget-release:
|
||||
if: >-
|
||||
github.repository_owner == 'LizardByte'
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Check if Winget repo
|
||||
env:
|
||||
TOPIC: winget-pkg
|
||||
id: check-label
|
||||
uses: actions/github-script@v7
|
||||
with:
|
||||
script: |
|
||||
const topic = process.env.TOPIC;
|
||||
console.log(`Checking if repo has topic: ${topic}`);
|
||||
|
||||
const repoTopics = await github.rest.repos.getAllTopics({
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo
|
||||
});
|
||||
console.log(`Repo topics: ${repoTopics.data.names}`);
|
||||
|
||||
const hasTopic = repoTopics.data.names.includes(topic);
|
||||
console.log(`Has topic: ${hasTopic}`);
|
||||
|
||||
core.setOutput('hasTopic', hasTopic);
|
||||
|
||||
- name: Download release asset
|
||||
id: download
|
||||
if: >-
|
||||
steps.check-label.outputs.hasTopic == 'true'
|
||||
uses: robinraju/release-downloader@v1.11
|
||||
with:
|
||||
repository: "${{ github.repository }}"
|
||||
tag: "${{ github.event.release.tag_name }}"
|
||||
fileName: "*.exe"
|
||||
tarBall: false
|
||||
zipBall: false
|
||||
out-file-path: "release_downloads"
|
||||
extract: false
|
||||
|
||||
- name: Release to WinGet
|
||||
if: >-
|
||||
steps.check-label.outputs.hasTopic == 'true' &&
|
||||
fromJson(steps.download.outputs.downloaded_files)[0]
|
||||
uses: vedantmgoyal2009/winget-releaser@v2
|
||||
with:
|
||||
identifier: "${{ github.repository_owner }}.${{ github.event.repository.name }}"
|
||||
release-tag: ${{ github.event.release.tag_name }}
|
||||
installers-regex: '\.exe$'
|
||||
token: ${{ secrets.GH_BOT_TOKEN }}
|
||||
66
.github/workflows/yaml-lint.yml
vendored
66
.github/workflows/yaml-lint.yml
vendored
@@ -1,66 +0,0 @@
|
||||
---
|
||||
# This action is centrally managed in https://github.com/<organization>/.github/
|
||||
# Don't make changes to this file in this repo as they will be overwritten with changes made to the same file in
|
||||
# the above-mentioned repo.
|
||||
|
||||
# Lint yaml files.
|
||||
|
||||
name: yaml lint
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches: [master, nightly]
|
||||
types: [opened, synchronize, reopened]
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
yaml-lint:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Find additional files
|
||||
id: find-files
|
||||
run: |
|
||||
# space separated list of files
|
||||
FILES=.clang-format
|
||||
|
||||
# empty placeholder
|
||||
FOUND=""
|
||||
|
||||
for FILE in ${FILES}; do
|
||||
if [ -f "$FILE" ]
|
||||
then
|
||||
FOUND="$FOUND $FILE"
|
||||
fi
|
||||
done
|
||||
|
||||
echo "found=${FOUND}" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: yaml lint
|
||||
id: yaml-lint
|
||||
uses: ibiqlik/action-yamllint@v3
|
||||
with:
|
||||
# https://yamllint.readthedocs.io/en/stable/configuration.html#default-configuration
|
||||
config_data: |
|
||||
extends: default
|
||||
rules:
|
||||
comments:
|
||||
level: error
|
||||
line-length:
|
||||
max: 120
|
||||
truthy:
|
||||
# GitHub uses "on" for workflow event triggers
|
||||
# .clang-format file has options of "Yes" "No" that will be caught by this, so changed to "warning"
|
||||
allowed-values: ['true', 'false', 'on']
|
||||
check-keys: true
|
||||
level: warning
|
||||
file_or_dir: . ${{ steps.find-files.outputs.found }}
|
||||
|
||||
- name: Log
|
||||
run: |
|
||||
cat "${{ steps.yaml-lint.outputs.logfile }}" >> $GITHUB_STEP_SUMMARY
|
||||
58
.gitignore
vendored
58
.gitignore
vendored
@@ -1,13 +1,46 @@
|
||||
build
|
||||
cmake-build*
|
||||
.DS_Store
|
||||
.vscode
|
||||
.vs
|
||||
*.swp
|
||||
*.kdev4
|
||||
# Prerequisites
|
||||
*.d
|
||||
|
||||
.cache
|
||||
.idea
|
||||
# Compiled Object files
|
||||
*.slo
|
||||
*.lo
|
||||
*.o
|
||||
*.obj
|
||||
|
||||
# Precompiled Headers
|
||||
*.gch
|
||||
*.pch
|
||||
|
||||
# Compiled Dynamic libraries
|
||||
*.so
|
||||
*.dylib
|
||||
*.dll
|
||||
|
||||
# Fortran module files
|
||||
*.mod
|
||||
*.smod
|
||||
|
||||
# Compiled Static libraries
|
||||
*.lai
|
||||
*.la
|
||||
*.a
|
||||
*.lib
|
||||
|
||||
# Executables
|
||||
*.exe
|
||||
*.out
|
||||
*.app
|
||||
|
||||
# JetBrains IDE
|
||||
.idea/
|
||||
|
||||
# VSCode IDE
|
||||
.vscode/
|
||||
|
||||
# build directories
|
||||
build/
|
||||
cmake-*/
|
||||
docs/doxyconfig*
|
||||
|
||||
# npm
|
||||
node_modules/
|
||||
@@ -16,3 +49,10 @@ package-lock.json
|
||||
# Translations
|
||||
*.mo
|
||||
*.pot
|
||||
|
||||
# Dummy macOS files
|
||||
.DS_Store
|
||||
|
||||
# Python
|
||||
*.pyc
|
||||
venv/
|
||||
|
||||
102
.gitmodules
vendored
102
.gitmodules
vendored
@@ -1,68 +1,68 @@
|
||||
[submodule "packaging/linux/flatpak/deps/flatpak-builder-tools"]
|
||||
path = packaging/linux/flatpak/deps/flatpak-builder-tools
|
||||
url = https://github.com/flatpak/flatpak-builder-tools.git
|
||||
branch = master
|
||||
[submodule "packaging/linux/flatpak/deps/shared-modules"]
|
||||
path = packaging/linux/flatpak/deps/shared-modules
|
||||
url = https://github.com/flathub/shared-modules.git
|
||||
branch = master
|
||||
[submodule "third-party/build-deps"]
|
||||
path = third-party/build-deps
|
||||
url = https://github.com/LizardByte/build-deps.git
|
||||
branch = dist
|
||||
[submodule "third-party/doxyconfig"]
|
||||
path = third-party/doxyconfig
|
||||
url = https://github.com/LizardByte/doxyconfig.git
|
||||
branch = master
|
||||
[submodule "third-party/googletest"]
|
||||
path = third-party/googletest
|
||||
url = https://github.com/google/googletest.git
|
||||
branch = main
|
||||
[submodule "third-party/inputtino"]
|
||||
path = third-party/inputtino
|
||||
url = https://github.com/games-on-whales/inputtino.git
|
||||
branch = stable
|
||||
[submodule "third-party/libdisplaydevice"]
|
||||
path = third-party/libdisplaydevice
|
||||
url = https://github.com/LizardByte/libdisplaydevice.git
|
||||
branch = master
|
||||
[submodule "third-party/moonlight-common-c"]
|
||||
path = third-party/moonlight-common-c
|
||||
url = https://github.com/moonlight-stream/moonlight-common-c.git
|
||||
branch = master
|
||||
[submodule "third-party/Simple-Web-Server"]
|
||||
path = third-party/Simple-Web-Server
|
||||
url = https://gitlab.com/eidheim/Simple-Web-Server.git
|
||||
branch = master
|
||||
[submodule "third-party/ViGEmClient"]
|
||||
path = third-party/ViGEmClient
|
||||
url = https://github.com/nefarius/ViGEmClient
|
||||
branch = master
|
||||
[submodule "third-party/miniupnp"]
|
||||
path = third-party/miniupnp
|
||||
url = https://github.com/miniupnp/miniupnp
|
||||
branch = master
|
||||
[submodule "third-party/nv-codec-headers"]
|
||||
path = third-party/nv-codec-headers
|
||||
url = https://github.com/FFmpeg/nv-codec-headers
|
||||
branch = sdk/12.0
|
||||
[submodule "third-party/TPCircularBuffer"]
|
||||
path = third-party/TPCircularBuffer
|
||||
url = https://github.com/michaeltyson/TPCircularBuffer
|
||||
branch = master
|
||||
[submodule "third-party/ffmpeg-windows-x86_64"]
|
||||
path = third-party/ffmpeg-windows-x86_64
|
||||
url = https://github.com/LizardByte/build-deps
|
||||
branch = ffmpeg-windows-x86_64
|
||||
[submodule "third-party/ffmpeg-macos-x86_64"]
|
||||
path = third-party/ffmpeg-macos-x86_64
|
||||
url = https://github.com/LizardByte/build-deps
|
||||
branch = ffmpeg-macos-x86_64
|
||||
[submodule "third-party/ffmpeg-linux-x86_64"]
|
||||
path = third-party/ffmpeg-linux-x86_64
|
||||
url = https://github.com/LizardByte/build-deps
|
||||
branch = ffmpeg-linux-x86_64
|
||||
[submodule "third-party/ffmpeg-linux-aarch64"]
|
||||
path = third-party/ffmpeg-linux-aarch64
|
||||
url = https://github.com/LizardByte/build-deps
|
||||
branch = ffmpeg-linux-aarch64
|
||||
[submodule "third-party/ffmpeg-macos-aarch64"]
|
||||
path = third-party/ffmpeg-macos-aarch64
|
||||
url = https://github.com/LizardByte/build-deps
|
||||
branch = ffmpeg-macos-aarch64
|
||||
[submodule "third-party/nanors"]
|
||||
path = third-party/nanors
|
||||
url = https://github.com/sleepybishop/nanors.git
|
||||
branch = master
|
||||
[submodule "third-party/tray"]
|
||||
path = third-party/tray
|
||||
url = https://github.com/LizardByte/tray
|
||||
branch = master
|
||||
[submodule "third-party/nv-codec-headers"]
|
||||
path = third-party/nv-codec-headers
|
||||
url = https://github.com/FFmpeg/nv-codec-headers.git
|
||||
branch = sdk/12.0
|
||||
[submodule "third-party/nvapi-open-source-sdk"]
|
||||
path = third-party/nvapi-open-source-sdk
|
||||
url = https://github.com/LizardByte/nvapi-open-source-sdk
|
||||
url = https://github.com/LizardByte/nvapi-open-source-sdk.git
|
||||
branch = sdk
|
||||
[submodule "third-party/ffmpeg-linux-powerpc64le"]
|
||||
path = third-party/ffmpeg-linux-powerpc64le
|
||||
url = https://github.com/LizardByte/build-deps
|
||||
branch = ffmpeg-linux-powerpc64le
|
||||
[submodule "third-party/Simple-Web-Server"]
|
||||
path = third-party/Simple-Web-Server
|
||||
url = https://gitlab.com/eidheim/Simple-Web-Server.git
|
||||
branch = master
|
||||
[submodule "third-party/TPCircularBuffer"]
|
||||
path = third-party/TPCircularBuffer
|
||||
url = https://github.com/michaeltyson/TPCircularBuffer.git
|
||||
branch = master
|
||||
[submodule "third-party/tray"]
|
||||
path = third-party/tray
|
||||
url = https://github.com/LizardByte/tray.git
|
||||
branch = master
|
||||
[submodule "third-party/ViGEmClient"]
|
||||
path = third-party/ViGEmClient
|
||||
url = https://github.com/LizardByte/Virtual-Gamepad-Emulation-Client.git
|
||||
branch = master
|
||||
[submodule "third-party/wayland-protocols"]
|
||||
path = third-party/wayland-protocols
|
||||
url = https://gitlab.freedesktop.org/wayland/wayland-protocols
|
||||
url = https://gitlab.freedesktop.org/wayland/wayland-protocols.git
|
||||
branch = main
|
||||
[submodule "third-party/wlr-protocols"]
|
||||
path = third-party/wlr-protocols
|
||||
url = https://gitlab.freedesktop.org/wlroots/wlr-protocols
|
||||
url = https://gitlab.freedesktop.org/wlroots/wlr-protocols.git
|
||||
branch = master
|
||||
|
||||
@@ -3,37 +3,28 @@
|
||||
# Read the Docs configuration file
|
||||
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
|
||||
|
||||
# Required
|
||||
version: 2
|
||||
|
||||
# Set the version of Python
|
||||
build:
|
||||
os: ubuntu-22.04
|
||||
os: ubuntu-24.04
|
||||
tools:
|
||||
python: "3.11"
|
||||
apt_packages:
|
||||
- graphviz # required to build diagrams
|
||||
- libboost-locale-dev # required for rstcheck in cpp code block
|
||||
jobs:
|
||||
post_build:
|
||||
- find ./third-party -iname "*.rst" -type f -delete # find and delete rst files in third-party
|
||||
- rstcheck -r . # lint rst files
|
||||
# - rstfmt --check --diff -w 120 . # check rst formatting
|
||||
python: "miniconda-latest"
|
||||
commands:
|
||||
- |
|
||||
if [ -f readthedocs_build.sh ]; then
|
||||
doxyconfig_dir="."
|
||||
else
|
||||
doxyconfig_dir="./third-party/doxyconfig"
|
||||
fi
|
||||
chmod +x "${doxyconfig_dir}/readthedocs_build.sh"
|
||||
export DOXYCONFIG_DIR="${doxyconfig_dir}"
|
||||
"${doxyconfig_dir}/readthedocs_build.sh"
|
||||
|
||||
# using conda, we can get newer doxygen and graphviz than ubuntu provide
|
||||
# https://github.com/readthedocs/readthedocs.org/issues/8151#issuecomment-890359661
|
||||
conda:
|
||||
environment: third-party/doxyconfig/environment.yml
|
||||
|
||||
# submodules required for include statements
|
||||
submodules:
|
||||
include: all
|
||||
recursive: true
|
||||
|
||||
# Build documentation in the docs/ directory with Sphinx
|
||||
sphinx:
|
||||
builder: html
|
||||
configuration: docs/source/conf.py
|
||||
fail_on_warning: true
|
||||
|
||||
# Using Sphinx, build docs in additional formats
|
||||
formats: all
|
||||
|
||||
python:
|
||||
install:
|
||||
- requirements: ./docs/requirements.txt
|
||||
|
||||
594
CHANGELOG.md
594
CHANGELOG.md
@@ -1,594 +0,0 @@
|
||||
# Changelog
|
||||
|
||||
## [0.21.0] - 2023-10-15
|
||||
**Added**
|
||||
- (Input) Add support for automatically selecting the emulated controller type based on the physical controller connected to the client
|
||||
- (Input/Windows) Add support for Applications (context menu) key
|
||||
- (Input/Windows) Implement touchpad, motion sensors, battery state, and LED control for the emulated DualShock 4 controller
|
||||
- (Input) Advertise support for new input features to clients
|
||||
- (Linux/Debian) Added Debian Bookworm package
|
||||
- (Prep-Commands) Expose connection environment variables
|
||||
- (Input/Windows) Implement pen and touch support
|
||||
- (Capture/Windows) Add standalone NVENC encoder
|
||||
- (Capture) Implement AV1 encoding
|
||||
- (Network) Implement IPv6 support
|
||||
- (Capture/Windows) Add option to disable realtime hags
|
||||
- (Graphics/NVIDIA) Add an option to decrease GPU scheduling priority to workaround HAGS video hang
|
||||
- (Capture/Linux) Add FFmpeg powerpc64le architecture for self compiling Sunshine
|
||||
- (Capture/Windows) Add support for capturing rotated displays
|
||||
- (System Tray) Implement streaming event notifications
|
||||
- (UI) Add port configuration table
|
||||
- (Applications) Added option to automatically treat launcher type apps as detached commands
|
||||
- (Input/Gamepad) Allow the Misc button to work as Guide on emulated Xbox 360 controllers
|
||||
|
||||
**Changed**
|
||||
- (Input) Reduce latency by implementing input batching
|
||||
- (Logging) Move input packet debug prints off the control stream thread
|
||||
- (Input) Refactor gamepad emulation code to use DS4 extended report format
|
||||
- (Graphics/NVIDIA) Modify and restore NVIDIA control panel settings before and after stream, respectively
|
||||
- (Graphics/NVIDIA) New config page for NVENC
|
||||
- (Graphics/Windows) Refactor DX shaders
|
||||
- (Input/Windows) Use our own keycode mapping to avoid installing the US English keyboard layout
|
||||
|
||||
**Fixed**
|
||||
- (UI) Fix update notifications
|
||||
- (Dependencies/Linux) Replace libboost chrono and thread with standard chrono and thread
|
||||
- (Input) Increase maximum gamepad limit to 16
|
||||
- (Network) Allow use of multiple ENet channels
|
||||
- (Network) Consider link-local addresses on LAN
|
||||
- (Input) Fixed issue where button may sometimes stick on Windows
|
||||
- (Input) Fix "ControllerNumber not allocated" warning when a gamepad is removed
|
||||
- (Input) Fix handling of gamepad feedback with multiple clients connected
|
||||
- (Input) Fix clamping mouse position to aspect ratio adjusted viewport
|
||||
- (Graphics/AMD) Fix crash during startup on some older AMD GPUs
|
||||
- (Logging) Fix crash when non-ASCII characters are logged
|
||||
- (Prep-Commands) Fix resource exhaustion bug which could occur when many prep commands were used
|
||||
- (Subprocesses) Fix race condition when inserting new processes
|
||||
- (Logging) Log error if encoder doesn't produce IDR frame on demand
|
||||
- (Audio) Improve audio capture logic and logging
|
||||
- (Logging) Fix AMF logging to match configured log level
|
||||
- (Logging) Log FFmpeg to log file instead of stdout
|
||||
- (Capture) Reject codecs that are not supported by display device
|
||||
- (Capture) Add fallbacks for unsupported codec settings
|
||||
- (Capture) Avoid probing HEVC or AV1 codecs in some cases
|
||||
- (Caputre) Remove DwmFlush()
|
||||
- (Capture/Windows) Improvements to capture sleeps for better frame stability
|
||||
- (Capture/Windows) Adjust capture rate to better match with display
|
||||
- (Linux/ArchLinux) Fix package version in PKGBUILD and precompiled package
|
||||
- (UI) Highlight fatal log messages in web ui
|
||||
- (Commands) Allow stream if prep command fails
|
||||
- (Capture/Linux) Fix KMS grab VRAM capture with libva 2.20
|
||||
- (Capture/macOS) Fix video capture backend
|
||||
- (Misc/Windows) Don't start the session monitor window when launched in command mode
|
||||
- (Linux/AppImage) Use the linuxdeploy GTK plugin to correctly deploy GTK3 dependencies
|
||||
- (Input/Windows) Fix reWASD not recognizing emulated DualShock 4 input
|
||||
|
||||
**Dependencies**
|
||||
- Bump bootstrap from 5.2.3 to 5.3.2
|
||||
- Bump third-party/moonlight-common-c from c9426a6 to 7a6d12f
|
||||
- Bump gcc-10 in Ubuntu 20.04 docker image
|
||||
- Bump furo from 2023.5.20 to 2023.9.10
|
||||
- Bump sphinx from 7.0.1 to 7.2.6
|
||||
- Bump cmake from 3.26 to 3.27 in Fedora docker images
|
||||
- Move third-party/nv-codec-headers from sdk/11.1 branch to sdk/12.0 branch
|
||||
- Automatic bump ffmpeg
|
||||
- Bump actions/checkout from 3 to 4
|
||||
- Bump boost from 1.80 to 1.81 in Macport manifest
|
||||
- Bump @fortawesome/fontawesome-free from 6.4.0 to 6.4.2
|
||||
|
||||
**Misc**
|
||||
- (Docs) Force badges to use svg
|
||||
- (Docs) Add Linux SSH example
|
||||
- (Docs) Add information about mesa for Linux
|
||||
- (CI) Free additional space on Docker, Flatpak, and AppImage builds due to internal changes on GitHub runners
|
||||
- (Docs/Logging/UI) Corrected various typos
|
||||
- (Docs) Add blurb about Gamescope compatibility
|
||||
- (Installer/Windows) Use system proxy to download ViGEmBus
|
||||
- (CI) Ignore third-party directory for clang-format
|
||||
- (Docs/Linux) Add Plasma-Compatible resolution example
|
||||
- (Docs) Add Sunshine website available at https://app.lizardbyte.dev/Sunshine
|
||||
- (Build/Windows) Fix audio code build with new MinGW headers
|
||||
- (Build/Windows) Fix QoS code build with new MinGW headers
|
||||
- (CI/Windows) Prevent winget action from creating an update when running in a fork
|
||||
- (CI/Windows) Change winget job to ubuntu-latest runner
|
||||
- (CI) Add CodeQL analysis
|
||||
- (CI/Docker) Fix ArchLinux image caching issue
|
||||
- (Windows) Manifest improvements
|
||||
- (CI/macOS) Simplify macport build
|
||||
- (Docs) Remove deprecated options from readthedocs config
|
||||
- (CI/Docs) Lint rst files
|
||||
- (Docs) Update localization information (after consolidating Crowdin projects)
|
||||
- (Cmake) Split CMakelists into modules
|
||||
- (Docs) Add Linux Headless/SSH Guide
|
||||
|
||||
## [0.20.0] - 2023-05-28
|
||||
**Breaking**
|
||||
- (Windows) The Windows installer version of Sunshine is now always launched by the Sunshine Service. Manually launching Sunshine.exe from Program Files is no longer supported. This was necessary to address security issues caused by non-admin users having access to Sunshine's config data. If you have set up Task Scheduler or other mechanisms to launch Sunshine automatically, remove those from your system before updating.
|
||||
- (Windows) The Start Menu shortcut has been redesigned for use with the Sunshine Service. It now launches Sunshine in the background (if not already running) and opens the Web UI, avoiding the persistent Command Prompt window present in prior versions. The Start Menu shortcut is now the recommended method for opening the Web UI and launching Sunshine.
|
||||
- (Network/UPnP) If the Moonlight Internet Hosting Tool is installed alongside Sunshine, you must remove it or upgrade to v5.6 or later to prevent conflicts with Sunshine's UPnP support. As a reminder, the Moonlight Internet Hosting Tool is not required to stream over the Internet with Sunshine. Instead, simply enable UPnP in the Sunshine Web UI.
|
||||
- (Windows) If Steam is installed, the Steam Streaming Speakers driver will be automatically installed when starting a stream for the first time. This behavior can be disabled in the Audio/Video tab of the Web UI. This Steam driver enables support for surround sound and muting host audio without requiring any manual configuration.
|
||||
- (Input) The Back Button Timeout option has been renamed to Guide Button Emulation Timeout and has been disabled by default to ensure long presses on the Back button work by default. The previous behavior can be restored by setting the Guide Button Emulation Timeout to 2000.
|
||||
- (Windows) The service name of SunshineSvc has been changed to SunshineService to address a false positive in MalwareBytes. If you have any scripts or other logic on your system that is using the service name, you will need to update that for the new name.
|
||||
- (Windows) To support new installer features, install-service.bat no longer sets the service to auto-start by default. Users executing install-service.bat manually on the Sunshine portable build must also execute autostart-service.bat to start Sunshine on boot. However, installing the service manually like this is not recommended. Instead, use the Sunshine installer which handles service installation and configuration automatically.
|
||||
- (Linux/Fedora) Fedora 36 builds are removed due to upstream end of support
|
||||
|
||||
**Added**
|
||||
- (Windows) Added an option to launch apps and prep/undo commands as administrator
|
||||
- (Installer/Windows) Added an option to choose whether Sunshine launches on boot. If not configured to launch on boot, use the Start Menu shortcut to start Sunshine when desired.
|
||||
- (Input/Windows) Added option to send VK codes instead of scancodes for compatibility with iOS/Android devices using non-English keyboard layouts
|
||||
- (UI) The Apply/Restart option is now available in the Web UI for all platforms
|
||||
- (Systray) Added a Restart option to the system tray context menu
|
||||
- (Video/Windows) Added host latency data to video frames. This requires future updates to Moonlight to display in the on-screen overlay.
|
||||
- (Audio) Added support for matching Audio Sink and Virtual Sink values on device names
|
||||
- (Client) Added friendly error messages for clients when streaming fails to start
|
||||
- (Video/Windows) Added warning log messages when Windows is hiding DRM-protected content from display capture
|
||||
- (Interop/Windows) Added warning log messages when GeForce Experience is currently using the same ports as Sunshine
|
||||
- (Linux/Fedora) Fedora 38 builds are now available
|
||||
|
||||
**Changed**
|
||||
- (Video) Encoder selection now happens at each stream start for more reliable GPU detection
|
||||
- (Video/Windows) The host display now stays on while clients are actively streaming
|
||||
- (Audio) Streaming will no longer fail if audio capture is unavailable
|
||||
- (Audio/Windows) Sunshine will automatically switch back to the Virtual Sink if the default audio device is changed while streaming
|
||||
- (Audio) Changes to the host audio playback option will now take effect when resuming a session from Moonlight
|
||||
- (Audio/Windows) Sunshine will switch to a different default audio device if Steam Streaming Speakers are the default when Sunshine starts. This handles cases where Sunshine terminates unexpectedly without restoring the default audio device.
|
||||
- (Apps) The Connection Terminated dialog will no longer appear in Moonlight when the app on the host exits normally
|
||||
- (Systray/Windows) Quitting Sunshine via the system tray will now stop the Sunshine Service rather than leaving it running and allowing it to restart Sunshine
|
||||
- (UI) The 100.64.0.0/10 CGN IP address range is now treated as a LAN address range
|
||||
- (Video) Removed a workaround for some versions of Moonlight prior to mid-2022
|
||||
- (UI) The PIN field is now cleared after successfully pairing
|
||||
- (UI) User names are now treated as case-insensitive
|
||||
- (Linux) Changed udev rule to automatically grant access to virtual input devices
|
||||
- (UI) Several item descriptions were adjusted to reflect newer configuration recommendations
|
||||
- (UI) Placeholder text opacity has been reduced to improve contrast with non-placeholder text
|
||||
- (Video/Windows) Minor capture performance improvements
|
||||
|
||||
**Fixed**
|
||||
- (Video) VRAM usage while streaming is significantly reduced, particularly with higher display resolutions and HDR
|
||||
- (Network/UPnP) UPnP support was rewritten to fix several major issues handling router restarts, IP address changes, and port forwarding expiration
|
||||
- (Input) Fixed modifier keys from the software keyboard on Android clients
|
||||
- (Audio) Fixed handling of default audio device changes while streaming
|
||||
- (Windows) Fixed streaming after Microsoft Remote Desktop or Fast User Switching has been used
|
||||
- (Input) Fixed some games not recognizing emulated Guide button presses
|
||||
- (Video/Windows) Fixed incorrect gamma when using an Advanced Color SDR display on the host
|
||||
- (Installer/Windows) The installer is no longer blurry on High DPI systems
|
||||
- (Systray/Windows) Fixed multiple system tray icons appearing if Sunshine exits unexpectedly
|
||||
- (Systray/Windows) Fixed the system tray icon not appearing in several situations
|
||||
- (Windows) Fixed hang on shutdown/restart if mDNS registration fails
|
||||
- (UI) Fixed missing response headers
|
||||
- (Stability) Fixed several possible crashes in cases where the client did not successfully connect
|
||||
- (Stability) Fixed several memory leaks
|
||||
- (Input/Windows) Back/Select input now correctly generates the Share button when emulating DS4 controllers
|
||||
- (Audio/Windows) Fixed various bugs in audio-info.exe that led to inaccurate output on some systems
|
||||
- (Video/Windows) Fixed incorrect resolution values from dxgi-info.exe on High DPI systems
|
||||
- (Video/Linux) Fixed poor quality encoding from H.264 on Intel encoders
|
||||
- (Config) Fixed a couple of typos in predefined resolutions
|
||||
|
||||
**Dependencies**
|
||||
- Bump sphinx-copybutton from 0.5.1 to 0.5.2
|
||||
- Bump sphinx from 6.13 to 7.0.1
|
||||
- Bump third-party/nv-codec-headers from 2055784 to 2cd175b
|
||||
- Bump furo from 2023.3.27 to 2023.5.20
|
||||
|
||||
**Misc**
|
||||
- (Build/Linux) Add X11 to PLATFORM_LIBARIES when found
|
||||
- (Build/macOS) Fix compilation with Clang 14
|
||||
- (Docs) Fix nvlax URL
|
||||
- (Docs) Add diagrams using graphviz
|
||||
- (Docs) Improvements to source code documentation
|
||||
- (Build) Unpin docker dependencies
|
||||
- (Build/Linux) Honor install prefix for tray icon
|
||||
- (Build/Windows) Unstripped binaries are now provided as a debuginfo package to support crash dump debugging
|
||||
- (Config) Config directories are now created recursively
|
||||
|
||||
## [0.19.1] - 2023-03-30
|
||||
**Fixed**
|
||||
- (Audio) Fixed no audio issue introduced in v0.19.0
|
||||
|
||||
## [0.19.0] - 2023-03-29
|
||||
**Breaking**
|
||||
- (Linux/Flatpak) Moved Flatpak to org.freedesktop.Platform 22.08 and Cuda 12.0.0
|
||||
This will drop support for Nvidia GPUs with compute capability 3.5
|
||||
|
||||
**Added**
|
||||
- (Input) Added option to suppress input from gamepads, keyboards, or mice
|
||||
- (Input/Linux) Added unicode support for remote pasting (may not work on all DEs)
|
||||
- (Input/Linux) Added XTest input fallback
|
||||
- (UI) Added version notifications to web UI
|
||||
- (Linux/Windows) Add system tray icon
|
||||
- (Windows) Added ability to safely elevate commands that fail due to insufficient permissions when running as a service
|
||||
- (Config) Added global prep commands, and ability to exclude an app from using global prep commands
|
||||
- (Installer/Windows) Automatically install ViGEmBus if selected
|
||||
|
||||
**Changed**
|
||||
- (Logging) Changed client verified messages to debug to prevent spamming the log
|
||||
- (Config) Only save non default config values
|
||||
- (Service/Linux) Use xdg-desktop-autostart for systemd service
|
||||
- (Linux) Added config option to force capture method
|
||||
- (Windows) Execute prep command in context of current user
|
||||
- (Linux) Allow disconnected X11 outputs
|
||||
|
||||
**Fixed**
|
||||
- (Input/Windows) Fix issue where internation keys were not translated correct, and modifier keys appeared stuck
|
||||
- (Linux) Fixed startup when /dev/dri didn't exist
|
||||
- (UI) Changes software encoding settings to select menu instead of text input
|
||||
- (Initialization) Do not terminate upon failure, allowing access to the web UI
|
||||
|
||||
**Dependencies**
|
||||
- Bump third-party/moonlight-common-c from 07beb0f to c9426a6
|
||||
- Bump babel from 2.11.0 to 2.12.1
|
||||
- Bump @fortawesome/fontawesome-free from 6.2.1 to 6.4.0
|
||||
- Bump third-party/ViGEmClient from 9e842ba to 726404e
|
||||
- Bump ffmpeg
|
||||
- Bump third-party/miniupnp from 014c9df to e439318
|
||||
- Bump furo from 2022.12.7 to 2023.3.27
|
||||
- Bump third-party/nanors from 395e5ad to e9e242e
|
||||
|
||||
**Misc**
|
||||
- (GitHub) Shared feature request board with Moonlight
|
||||
- (Docs) Improved application examples
|
||||
- (Docs) Added WIP documentation for source code using Doxygen and Breathe
|
||||
- (Build) Fix linux clang build errors
|
||||
- (Build/Archlinux) Skip irrelevant submodules
|
||||
- (Build/Archlinux) Disable download timeout
|
||||
- (Build/macOS) Support compiling for earlier releases of macOS
|
||||
- (Docs) Add favicon
|
||||
- (Docs) Add missing config default values
|
||||
- (Build) Fix compiler warnings due to depreciated elements in C++17
|
||||
- (Build) Fix libcurl link errors
|
||||
- (Clang) Adjusted formatting rules
|
||||
|
||||
## [0.18.4] - 2023-02-20
|
||||
**Fixed**
|
||||
- (Linux/AUR) Drop support of AUR package
|
||||
- (Docker) General enhancements to docker images
|
||||
|
||||
## [0.18.3] - 2023-02-13
|
||||
**Added**
|
||||
- (Linux) Added PKGBUILD for Archlinux based distros to releases
|
||||
- (Linux) Added precompiled package for Archlinux based distros to releases
|
||||
- (Docker) Added archlinux docker image (x86_64 only)
|
||||
|
||||
## [0.18.2] - 2023-02-13
|
||||
**Fixed**
|
||||
- (Video/KMV/Linux) Fixed wayland capture on Nvidia for KMS
|
||||
- (Video/Linux) Implement vaSyncBuffer stuf for libva <2.9.0
|
||||
- (UI) Fix issue where mime type was not being set for node_modules when using a reverse proxy
|
||||
- (UI/macOS) Added missing audio sink config options
|
||||
- (Linux) Specify correct Boost dependency versions
|
||||
- (Video/AMF) Add missing encoder tunables
|
||||
|
||||
## [0.18.1] - 2023-01-31
|
||||
**Fixed**
|
||||
- (Linux) Fixed missing dependencies for deb and rpm packages
|
||||
- (Linux) Use dynamic boost
|
||||
|
||||
## [0.18.0] - 2023-01-29
|
||||
Attention, this release contains critical security fixes. Please update as soon as possible. Additionally, we are
|
||||
encouraging users to change your Sunshine password, especially if you expose the web UI (i.e. port 47790 by default)
|
||||
to the internet, or have ever uploaded your logs with verbose output to a public resource.
|
||||
|
||||
**Added**
|
||||
- (Windows) Add support for Intel QuickSync
|
||||
- (Linux) Added aarch64 deb and rpm packages
|
||||
- (Windows) Add support for hybrid graphics systems, such as laptops with both integrated and discrete GPUs
|
||||
- (Linux) Add support for streaming from Steam Deck Gaming Mode
|
||||
- (Windows) Add HDR support, see https://docs.lizardbyte.dev/projects/sunshine/en/latest/about/usage.html#hdr-support
|
||||
|
||||
**Fixed**
|
||||
- (Network) Refactor code for UPnP port forwarding
|
||||
- (Video) Enforce 10 FPS encoding frame rate minimum to improve static image quality
|
||||
- (Linux) deb and rpm packages are now specific to destination distro and version
|
||||
- (Docs) Add nvidia/nvenc preset migration guide
|
||||
- (Network) Performance optimizations
|
||||
- (Video/Windows) Fix streaming to multiple clients from hardware encoder
|
||||
- (Linux) Fix child process spawning
|
||||
- (Security) Fix security vulnerability in implementation of SimpleWebServer
|
||||
- (Misc) Rename "Steam BigPicture" to "Steam Big Picture" in default apps.json
|
||||
- (Security) Scrub basic authorization header from logs
|
||||
- (Linux) The systemd service will now restart in the event of a crash
|
||||
- (Video/KMS/Linux) Fixed error: `couldn't import RGB Image: 00003002 and 00003004`
|
||||
- (Video/Windows) Fix stream freezing triggered by the resolution changed
|
||||
- (Installer/Windows) Fixes silent installation and other miscellaneous improvements
|
||||
- (CPU) Significantly improved CPU usage
|
||||
|
||||
## [0.17.0] - 2023-01-08
|
||||
If you are running Sunshine as a service on Windows, we are strongly urging you to update to v0.17.0 as soon as
|
||||
possible. Older Windows versions of Sunshine had a security flaw in which the binary was located in a user-writable
|
||||
location which is problematic when running as a service or on a multi-user system. Additionally, when running Sunshine
|
||||
as a service, games and applications were launched as SYSTEM. This could lead to issues with save files and other game
|
||||
settings. In v0.17.0, games now run under your user account without elevated privileges.
|
||||
|
||||
**Breaking**
|
||||
- (Apps) Removed automatic desktop entry (Re-add by adding an empty application named "Desktop" with no commands, "desktop.png" can be added as the image.)
|
||||
- (Windows) Improved user upgrade experience (Suggest to manually uninstall existing Sunshine version before this upgrade. Do NOT select to remove everything, if prompted. Make a backup of config files before uninstall.)
|
||||
- (Windows) Move config files to specific directory (files will be migrated automatically if using Windows installer)
|
||||
- (Dependencies) Fix npm path (breaking change for package maintainers)
|
||||
|
||||
**Added**
|
||||
- (macOS) Added initial support for arm64 on macOS through Macports portfile
|
||||
- (Input) Added support for foreign keyboard input
|
||||
- (Misc) Logs inside the WebUI and log to file
|
||||
- (UI/Windows) Added an Apply button to configuration page when running as a service
|
||||
- (Input/Windows) Enable Mouse Keys while streaming for systems with no physical mouse
|
||||
|
||||
**Fixed**
|
||||
- (Video) Improved capture performance
|
||||
- (Audio) Improved audio bitrate and quality handling
|
||||
- (Apps/Windows) Fixed PATH environment variable handling
|
||||
- (Apps/Windows) Use the proper environment variable for the Program Files (x86) folder
|
||||
- (Service/Windows) Fix SunshineSvc hanging if an error occurs during startup
|
||||
- (Service/Windows) Spawn Sunshine.exe in a job object, so it is terminated if SunshineSvc.exe dies
|
||||
- (Video) windows/vram: fix fringing in NV12 colour conversion
|
||||
- (Apps/Windows) Launch games under the correct user account
|
||||
- (Video) nvenc, amdvce: rework all user presets/options
|
||||
- (Network) Generate certificates with unique serial numbers
|
||||
- (Service/Windows) Graceful termination on shutdown, logoff, and service stop
|
||||
- (Apps/Windows) Fix launching apps when Sunshine is running as admin
|
||||
- (Misc) Remove/fix calls to std::abort()
|
||||
- (Misc) Remove prompt to press enter after Sunshine exits
|
||||
- (Misc) Make log priority consistent for execution messages
|
||||
- (Apps) Applications in Moonlight clients are now updated automatically after editing
|
||||
- (Video/Linux) Fix wayland capture on nvidia
|
||||
- (Audio) Fix 7.1 surround channel mapping
|
||||
- (Video) Fix NVENC profile values not applying
|
||||
- (Network) Fix origin_web_ui_allowed binding
|
||||
- (Service/Windows) Self terminate/restart service if process hangs for 10 seconds
|
||||
- (Input/Windows) Fix Windows masked cursor blending with GPU encoders
|
||||
- (Video) Color conversion fixes and BT.2020 support
|
||||
|
||||
**Dependencies**
|
||||
- Bump ffmpeg from 4.4 to 5.1
|
||||
- ffmpeg_patches: add amfenc delay/buffering fix
|
||||
- CBS moved to ffmpeg submodules
|
||||
- Migrate to upstream Simple-Web-Server submodule
|
||||
- Bump third-party/TPCircularBuffer from `bce9170` to `8833b3a`
|
||||
- Bump third-party/moonlight-common-c from `8169a31` to `ef9ad52`
|
||||
- Bump third-party/miniupnp from `6f848ae` to `207cf44`
|
||||
- Bump third-party/ViGEmClient from `f719a1d` to `9e842ba`
|
||||
- Bump bootstrap from 5.0.0 to 5.2.3
|
||||
- Bump @fortawesome/fontawesome-free from 6.2.0 to 6.2.1
|
||||
|
||||
## [0.16.0] - 2022-12-13
|
||||
**Added**
|
||||
- Add cover finder
|
||||
- (Docker) Add arm64 docker image
|
||||
- (Flatpak) Add installation helper scripts
|
||||
- (Windows) Add support for Unicode input messages
|
||||
|
||||
**Fixed**
|
||||
- (Linux) Reintroduce Ubuntu 20.04 and 22.04 specific deb packages
|
||||
- (Linux) Fixed udev and systemd file locations
|
||||
|
||||
**Dependencies**
|
||||
- Bump babel from 2.10.3 to 2.11.0
|
||||
- Bump sphinx-copybutton from 0.5.0 to 0.5.1
|
||||
- Bump KSXGitHub/github-actions-deploy-aur from 2.5.0 to 2.6.0
|
||||
- Use npm for web dependencies (breaking change for third-party package maintainers)
|
||||
- Update moonlight-common-c
|
||||
- Use pre-built ffmpeg from LizardByte/build-deps for all sunshine builds (breaking change for third-party package maintainers)
|
||||
- Bump furo from 2022.9.29 to 2022.12.7
|
||||
|
||||
**Misc**
|
||||
- Misc org level workflow updates
|
||||
- Fix misc typos in docs
|
||||
- Fix winget release
|
||||
|
||||
## [0.15.0] - 2022-10-30
|
||||
**Added**
|
||||
- (Windows) Add firewall rules scripts
|
||||
- (Windows) Automatically add and remove firewall rules at install/uninstall
|
||||
- (Windows) Automatically add and remove service at install/uninstall
|
||||
- (Docker) Official image added
|
||||
- (Linux) Add aarch64 flatpak package
|
||||
|
||||
**Changed**
|
||||
- (Windows/Linux/MacOS) - Move default config and apps file to assets directory
|
||||
- (MacOS) Bump boost to 1.80 for macport builds
|
||||
- (Linux) Remove backup and restore of config files
|
||||
|
||||
**Fixed**
|
||||
- (Linux) - Create sunshine config directory if it doesn't exist
|
||||
- (Linux) Remove portable home and config directories for AppImage
|
||||
- (Windows) Include service install and uninstall scripts again
|
||||
- (Windows) Automatically delete start menu entry upon uninstall
|
||||
- (Windows) Automatically delete program install directory upon uninstall, with user prompt
|
||||
- (Linux) Handle the case of no default audio sink
|
||||
- (Windows/Linux/MacOS) Fix default image paths
|
||||
- (Linux) Fix CUDA RGBA to NV12 conversion
|
||||
|
||||
## [0.14.1] - 2022-08-09
|
||||
**Added**
|
||||
- (Linux) Flatpak package added
|
||||
- (Linux) AUR package automated updates
|
||||
- (Windows) Winget package automated updates
|
||||
|
||||
**Changed**
|
||||
- (General) Moved repo to @LizardByte GitHub org
|
||||
- (WebUI) Fixed button spacing on home page
|
||||
- (WebUI) Added Discord WidgetBot Crate
|
||||
|
||||
**Fixed**
|
||||
- (Linux/Mac) Default config and app files now copied to user home directory
|
||||
- (Windows) Default config and app files now copied to working directory
|
||||
|
||||
## [0.14.0] - 2022-06-15
|
||||
|
||||
**Added**
|
||||
- (Documentation) Added Sphinx documentation available at https://sunshinestream.readthedocs.io/en/latest/
|
||||
- (Development) Initial support for Localization
|
||||
- (Linux) Add rpm package as release asset
|
||||
- (macOS) Add Portfile as release asset
|
||||
- (Windows) Add DwmFlush() call to improve capture
|
||||
- (Windows) Add Windows installer
|
||||
|
||||
**Fixed**
|
||||
- (AMD) Fixed hwdevice being destroyed before context
|
||||
- (Linux) Added missing dependencies to AppImage
|
||||
- (Linux) Fixed rumble events causing game to freeze
|
||||
- (Linux) Improved Pulse/Pipewire compatibility
|
||||
- (Linux) Moved to single deb package
|
||||
- (macOS) Fixed missing TPCircularBuffer submodule
|
||||
- (Stream) Properly catch exceptions in stream broadcast handlers
|
||||
- (Stream/Video) AVPacket fix
|
||||
|
||||
## [0.13.0] - 2022-02-27
|
||||
**Added**
|
||||
- (macOS) Initial support for macOS (#40)
|
||||
|
||||
## [0.12.0] - 2022-02-13
|
||||
**Added**
|
||||
- New command line argument `--version`
|
||||
- Custom png poster support
|
||||
|
||||
**Changed**
|
||||
- Correct software bitrate calculation
|
||||
- Increase vbv-bufsize to 1/10 of requested bitrate
|
||||
- Improvements to Web UI
|
||||
|
||||
## [0.11.1] - 2021-10-04
|
||||
**Changed**
|
||||
- (Linux) Fix search path for config file and assets
|
||||
|
||||
## [0.11.0] - 2021-10-04
|
||||
**Added**
|
||||
- (Linux) Added support for wlroots based compositors on Wayland.
|
||||
- (Windows) Added an icon for the executable
|
||||
|
||||
**Changed**
|
||||
- Fixed a bug causing segfault when connecting multiple controllers.
|
||||
- (Linux) Improved NVENC, it now offloads converting images from RGB to NV12
|
||||
- (Linux) Fixed a bug causes stuttering
|
||||
|
||||
## [0.10.1] - 2021-08-21
|
||||
**Changed**
|
||||
- (Linux) Re-enabled KMS
|
||||
|
||||
## [0.10.0] - 2021-08-20
|
||||
**Added**
|
||||
- Added support for Rumble with gamepads.
|
||||
- Added support for keyboard shortcuts <--- See the README for details.
|
||||
- (Windows) A very basic script has been added in Sunshine-Windows\tools <-- This will start Sunshine at boot with the highest privileges which is needed to display the login prompt.
|
||||
|
||||
**Changed**
|
||||
- Some cosmetic changes to the WebUI.
|
||||
- The first time the WebUI is opened, it will request the creation of a username/password pair from the user.
|
||||
- Fixed audio crackling introduced in version 0.8.0
|
||||
- (Linux) VAAPI hardware encoding now works on Intel i7-6700 at least. <-- For the best experience, using ffmpeg version 4.3 or higher is recommended.
|
||||
- (Windows) Installing from debian package shouldn't overwrite your configuration files anymore. <-- It's recommended that you back up `/etc/sunshine/` before testing this.
|
||||
|
||||
## [0.9.0] - 2021-07-11
|
||||
**Added**
|
||||
- Added audio encryption
|
||||
- (Linux) Added basic NVENC support on Linux
|
||||
- (Windows) The Windows version can now capture the lock screen and the UAC prompt as long as it's run through `PsExec.exe` https://docs.microsoft.com/en-us/sysinternals/downloads/psexec
|
||||
|
||||
**Changed**
|
||||
- Sunshine will now accept expired or not-yet-valid certificates, as long as they are signed properly.
|
||||
- Fixed compatibility with iOS version of Moonlight
|
||||
- Drastically reduced chance of being forced to skip error correction due to video frame size
|
||||
- (Linux) sunshine.service will be installed automatically.
|
||||
|
||||
## [0.8.0] - 2021-06-30
|
||||
**Added**
|
||||
- Added mDNS support: Moonlight will automatically find Sunshine.
|
||||
- Added UPnP support. It's off by default.
|
||||
|
||||
## [0.7.7] - 2021-06-24
|
||||
**Added**
|
||||
- (Linux) Added installation package for Debian
|
||||
|
||||
**Changed**
|
||||
- Fixed incorrect scaling for absolute mouse coordinates when using multiple monitors.
|
||||
- Fixed incorrect colors when scaling for software encoder
|
||||
|
||||
## [0.7.1] - 2021-06-18
|
||||
**Changed**
|
||||
- (Linux) Fixed an issue where it was impossible to start sunshine on ubuntu 20.04
|
||||
|
||||
## [0.7.0] - 2021-06-16
|
||||
**Added**
|
||||
- Added a Web Manager. Accessible through: https://localhost:47990 or https://<ip of your pc>:47990
|
||||
- (Linux) Added hardware encoding support for AMD on Linux
|
||||
|
||||
**Changed**
|
||||
- (Linux) Moved certificates and saved pairings generated during runtime to .config/sunshine on Linux
|
||||
|
||||
## [0.6.0] - 2021-05-26
|
||||
**Added**
|
||||
- Added support for surround audio
|
||||
|
||||
**Changed**
|
||||
- Maintain aspect ratio when scaling video
|
||||
- Fix issue where Sunshine is forced to drop frames when they are too large
|
||||
|
||||
## [0.5.0] - 2021-05-13
|
||||
**Added**
|
||||
- Added support for absolute mouse coordinates
|
||||
- (Linux) Added support for streaming specific monitor on Linux
|
||||
- (Windows) Added support for AMF on Windows
|
||||
|
||||
## [0.4.0] - 2020-05-03
|
||||
**Changed**
|
||||
- prep-cmd is now optional in apps.json
|
||||
- Fixed bug causing video artifacts
|
||||
- Fixed bug preventing Moonlight from closing app on exit
|
||||
- Fixed bug causing preventing keyboard keys from repeating on latest version of Moonlight
|
||||
- Fixed bug causing segfault when another session of sunshine was already running
|
||||
- Fixed bug causing crash when monitor has resolution 1366x768
|
||||
|
||||
## [0.3.1] - 2020-04-24
|
||||
**Changed**
|
||||
- Fix a memory leak.
|
||||
|
||||
## [0.3.0] - 2020-04-23
|
||||
**Changed**
|
||||
- Hardware acceleration on NVidia GPU's for Video encoding on Windows
|
||||
|
||||
## [0.2.0] - 2020-03-21
|
||||
**Changed**
|
||||
- Multicasting is now supported: You can set the maximum simultaneous connections with the configurable option: channels
|
||||
- Configuration variables can be overwritten on the command line: "name=value" --> it can be useful to set min_log_level=debug without modifying the configuration file
|
||||
- Switches to make testing the pairing mechanism more convenient has been added, see "sunshine --help" for details
|
||||
|
||||
## [0.1.1] - 2020-01-30
|
||||
**Added**
|
||||
- (Linux) Added deb package and service for Linux
|
||||
|
||||
## [0.1.0] - 2020-01-27
|
||||
**Added**
|
||||
- The first official release for Sunshine!
|
||||
|
||||
[0.1.0]: https://github.com/LizardByte/Sunshine/releases/tag/v0.1.0
|
||||
[0.1.1]: https://github.com/LizardByte/Sunshine/releases/tag/v0.1.1
|
||||
[0.2.0]: https://github.com/LizardByte/Sunshine/releases/tag/v0.2.0
|
||||
[0.3.0]: https://github.com/LizardByte/Sunshine/releases/tag/v0.3.0
|
||||
[0.3.1]: https://github.com/LizardByte/Sunshine/releases/tag/v0.3.1
|
||||
[0.4.0]: https://github.com/LizardByte/Sunshine/releases/tag/v0.4.0
|
||||
[0.5.0]: https://github.com/LizardByte/Sunshine/releases/tag/0.5.0
|
||||
[0.6.0]: https://github.com/LizardByte/Sunshine/releases/tag/v0.6.0
|
||||
[0.7.0]: https://github.com/LizardByte/Sunshine/releases/tag/v0.7.0
|
||||
[0.7.1]: https://github.com/LizardByte/Sunshine/releases/tag/v0.7.1
|
||||
[0.7.7]: https://github.com/LizardByte/Sunshine/releases/tag/v0.7.7
|
||||
[0.8.0]: https://github.com/LizardByte/Sunshine/releases/tag/v0.8.0
|
||||
[0.9.0]: https://github.com/LizardByte/Sunshine/releases/tag/v0.9.0
|
||||
[0.10.0]: https://github.com/LizardByte/Sunshine/releases/tag/v0.10.0
|
||||
[0.10.1]: https://github.com/LizardByte/Sunshine/releases/tag/v0.10.1
|
||||
[0.11.0]: https://github.com/LizardByte/Sunshine/releases/tag/v0.11.0
|
||||
[0.11.1]: https://github.com/LizardByte/Sunshine/releases/tag/v0.11.1
|
||||
[0.12.0]: https://github.com/LizardByte/Sunshine/releases/tag/v0.12.0
|
||||
[0.13.0]: https://github.com/LizardByte/Sunshine/releases/tag/v0.13.0
|
||||
[0.14.0]: https://github.com/LizardByte/Sunshine/releases/tag/v0.14.0
|
||||
[0.14.1]: https://github.com/LizardByte/Sunshine/releases/tag/v0.14.1
|
||||
[0.15.0]: https://github.com/LizardByte/Sunshine/releases/tag/v0.15.0
|
||||
[0.16.0]: https://github.com/LizardByte/Sunshine/releases/tag/v0.16.0
|
||||
[0.17.0]: https://github.com/LizardByte/Sunshine/releases/tag/v0.17.0
|
||||
[0.18.0]: https://github.com/LizardByte/Sunshine/releases/tag/v0.18.0
|
||||
[0.18.1]: https://github.com/LizardByte/Sunshine/releases/tag/v0.18.1
|
||||
[0.18.2]: https://github.com/LizardByte/Sunshine/releases/tag/v0.18.2
|
||||
[0.18.3]: https://github.com/LizardByte/Sunshine/releases/tag/v0.18.3
|
||||
[0.18.4]: https://github.com/LizardByte/Sunshine/releases/tag/v0.18.4
|
||||
[0.19.0]: https://github.com/LizardByte/Sunshine/releases/tag/v0.19.0
|
||||
[0.19.1]: https://github.com/LizardByte/Sunshine/releases/tag/v0.19.1
|
||||
[0.20.0]: https://github.com/LizardByte/Sunshine/releases/tag/v0.20.0
|
||||
[0.21.0]: https://github.com/LizardByte/Sunshine/releases/tag/v0.21.0
|
||||
@@ -1,13 +1,18 @@
|
||||
cmake_minimum_required(VERSION 3.18)
|
||||
cmake_minimum_required(VERSION 3.20)
|
||||
# `CMAKE_CUDA_ARCHITECTURES` requires 3.18
|
||||
# `set_source_files_properties` requires 3.18
|
||||
# `cmake_path(CONVERT ... TO_NATIVE_PATH_LIST ...)` requires 3.20
|
||||
# todo - set this conditionally
|
||||
|
||||
# todo - set version to 0.0.0 once confident in automated versioning
|
||||
project(Sunshine VERSION 0.21.0
|
||||
DESCRIPTION "Sunshine is a self-hosted game stream host for Moonlight."
|
||||
project(Sunshine VERSION 0.0.0
|
||||
DESCRIPTION "Self-hosted game stream host for Moonlight"
|
||||
HOMEPAGE_URL "https://app.lizardbyte.dev/Sunshine")
|
||||
|
||||
set(PROJECT_LICENSE "GPL-3.0")
|
||||
set(PROJECT_LICENSE "GPL-3.0-only")
|
||||
|
||||
set(PROJECT_FQDN "dev.lizardbyte.app.Sunshine")
|
||||
|
||||
set(PROJECT_BRIEF_DESCRIPTION "GameStream host for Moonlight") # must be <= 35 characters
|
||||
|
||||
set(PROJECT_LONG_DESCRIPTION "Offering low latency, cloud gaming server capabilities with support for AMD, Intel, \
|
||||
and Nvidia GPUs for hardware encoding. Software encoding is also available. You can connect to Sunshine from any \
|
||||
@@ -20,7 +25,7 @@ if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
|
||||
endif()
|
||||
|
||||
# set the module path, used for includes
|
||||
set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
|
||||
set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake")
|
||||
|
||||
# set version info for this build
|
||||
include(${CMAKE_MODULE_PATH}/prep/build_version.cmake)
|
||||
@@ -28,6 +33,9 @@ include(${CMAKE_MODULE_PATH}/prep/build_version.cmake)
|
||||
# cmake build flags
|
||||
include(${CMAKE_MODULE_PATH}/prep/options.cmake)
|
||||
|
||||
# initial prep
|
||||
include(${CMAKE_MODULE_PATH}/prep/init.cmake)
|
||||
|
||||
# configure special package files, such as sunshine.desktop, Flatpak manifest, Portfile , etc.
|
||||
include(${CMAKE_MODULE_PATH}/prep/special_package_configuration.cmake)
|
||||
|
||||
|
||||
@@ -19,22 +19,19 @@ ENTRYPOINT steam && sunshine
|
||||
|
||||
### SUNSHINE_VERSION
|
||||
- `latest`, `master`, `vX.X.X`
|
||||
- `nightly`
|
||||
- commit hash
|
||||
|
||||
### SUNSHINE_OS
|
||||
Sunshine images are available with the following tag suffixes, based on their respective base images.
|
||||
|
||||
- `archlinux`
|
||||
- `debian-bullseye`
|
||||
- `fedora-36`
|
||||
- `fedora-37`
|
||||
- `ubuntu-20.04`
|
||||
- `debian-bookworm`
|
||||
- `ubuntu-22.04`
|
||||
- `ubuntu-24.04`
|
||||
|
||||
### Tags
|
||||
You must combine the `SUNSHINE_VERSION` and `SUNSHINE_OS` to determine the tag to pull. The format should be
|
||||
`<SUNSHINE_VERSION>-<SUNSHINE_OS>`. For example, `latest-ubuntu-22.04`.
|
||||
`<SUNSHINE_VERSION>-<SUNSHINE_OS>`. For example, `latest-ubuntu-24.04`.
|
||||
|
||||
See all our available tags on [docker hub](https://hub.docker.com/r/lizardbyte/sunshine/tags) or
|
||||
[ghcr](https://github.com/LizardByte/Sunshine/pkgs/container/sunshine/versions) for more info.
|
||||
@@ -52,8 +49,10 @@ Create and run the container (substitute your `<values>`):
|
||||
|
||||
```bash
|
||||
docker run -d \
|
||||
--device /dev/dri/ \
|
||||
--name=<image_name> \
|
||||
--restart=unless-stopped
|
||||
--restart=unless-stopped \
|
||||
--ipc=host \
|
||||
-e PUID=<uid> \
|
||||
-e PGID=<gid> \
|
||||
-e TZ=<timezone> \
|
||||
@@ -80,12 +79,32 @@ services:
|
||||
- PUID=<uid>
|
||||
- PGID=<gid>
|
||||
- TZ=<timezone>
|
||||
ipc: host
|
||||
ports:
|
||||
- "47984-47990:47984-47990/tcp"
|
||||
- "48010:48010"
|
||||
- "47998-48000:47998-48000/udp"
|
||||
```
|
||||
|
||||
### Using podman run
|
||||
Create and run the container (substitute your `<values>`):
|
||||
|
||||
```bash
|
||||
podman run -d \
|
||||
--device /dev/dri/ \
|
||||
--name=<image_name> \
|
||||
--restart=unless-stopped \
|
||||
--userns=keep-id \
|
||||
-e PUID=<uid> \
|
||||
-e PGID=<gid> \
|
||||
-e TZ=<timezone> \
|
||||
-v <path to data>:/config \
|
||||
-p 47984-47990:47984-47990/tcp \
|
||||
-p 48010:48010 \
|
||||
-p 47998-48000:47998-48000/udp \
|
||||
<image>
|
||||
```
|
||||
|
||||
### Parameters
|
||||
You must substitute the `<values>` with your own settings.
|
||||
|
||||
@@ -106,6 +125,9 @@ port `47990` (e.g. `http://<host_ip>:47990`). The internal port must be `47990`,
|
||||
| `-e PGID=<gid>` | Group ID | `1001` | False |
|
||||
| `-e TZ=<timezone>` | Lookup [TZ value][1] | `America/New_York` | False |
|
||||
|
||||
For additional configuration, it is recommended to reference the *Games on Whales*
|
||||
[sunshine config](https://github.com/games-on-whales/gow/blob/2e442292d79b9d996f886b8a03d22b6eb6bddf7b/compose/streamers/sunshine.yml).
|
||||
|
||||
[1]: https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
|
||||
|
||||
#### User / Group Identifiers:
|
||||
@@ -132,8 +154,19 @@ The architectures supported by these images are shown in the table below.
|
||||
| tag suffix | amd64/x86_64 | arm64/aarch64 |
|
||||
|-----------------|--------------|---------------|
|
||||
| archlinux | ✅ | ❌ |
|
||||
| debian-bullseye | ✅ | ✅ |
|
||||
| fedora-36 | ✅ | ✅ |
|
||||
| fedora-37 | ✅ | ✅ |
|
||||
| ubuntu-20.04 | ✅ | ✅ |
|
||||
| debian-bookworm | ✅ | ✅ |
|
||||
| ubuntu-22.04 | ✅ | ✅ |
|
||||
| ubuntu-24.04 | ✅ | ✅ |
|
||||
|
||||
<div class="section_buttons">
|
||||
|
||||
| Previous | Next |
|
||||
|:-------------------------------|-----------------------------------------------------:|
|
||||
| [Changelog](docs/changelog.md) | [Third-Party Packages](docs/third_party_packages.md) |
|
||||
|
||||
</div>
|
||||
|
||||
<details style="display: none;">
|
||||
<summary></summary>
|
||||
[TOC]
|
||||
</details>
|
||||
|
||||
202
README.md
Normal file
202
README.md
Normal file
@@ -0,0 +1,202 @@
|
||||
<div align="center">
|
||||
<img src="sunshine.png" />
|
||||
<h1 align="center">Sunshine</h1>
|
||||
<h4 align="center">Self-hosted game stream host for Moonlight.</h4>
|
||||
</div>
|
||||
|
||||
<div align="center">
|
||||
<a href="https://github.com/LizardByte/Sunshine">
|
||||
<img src="https://img.shields.io/github/stars/lizardbyte/sunshine.svg?logo=github&style=for-the-badge" alt="GitHub stars">
|
||||
</a>
|
||||
<a href="https://github.com/LizardByte/Sunshine/releases/latest">
|
||||
<img src="https://img.shields.io/github/downloads/lizardbyte/sunshine/total.svg?style=for-the-badge&logo=github" alt="GitHub Releases">
|
||||
</a>
|
||||
<a href="https://hub.docker.com/r/lizardbyte/sunshine">
|
||||
<img src="https://img.shields.io/docker/pulls/lizardbyte/sunshine.svg?style=for-the-badge&logo=docker" alt="Docker">
|
||||
</a>
|
||||
<a href="https://github.com/LizardByte/Sunshine/pkgs/container/sunshine">
|
||||
<img src="https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fipitio.github.io%2Fbackage%2FLizardByte%2FSunshine%2Fsunshine.json&query=%24.downloads&label=ghcr%20pulls&style=for-the-badge&logo=github" alt="GHCR">
|
||||
</a>
|
||||
<a href="https://flathub.org/apps/dev.lizardbyte.app.Sunshine">
|
||||
<img src="https://img.shields.io/flathub/downloads/dev.lizardbyte.app.Sunshine?style=for-the-badge&logo=flathub" alt="Flathub installs">
|
||||
</a>
|
||||
<a href="https://flathub.org/apps/dev.lizardbyte.app.Sunshine">
|
||||
<img src="https://img.shields.io/flathub/v/dev.lizardbyte.app.Sunshine?style=for-the-badge&logo=flathub" alt="Flathub Version">
|
||||
</a>
|
||||
<a href="https://github.com/microsoft/winget-pkgs/tree/master/manifests/l/LizardByte/Sunshine">
|
||||
<img src="https://img.shields.io/winget/v/LizardByte.Sunshine?style=for-the-badge&logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAHuSURBVFhH7ZfNTtRQGIYZiMDwN/IrCAqIhMSNKxcmymVwG+5dcDVsWHgDrtxwCYQVl+BChzDEwSnPY+eQ0sxoOz1mQuBNnpyvTdvz9jun5/SrjfxnJUkyQbMEz2ELduF1l0YUA3QyTrMAa2AnPtyOXsELeAYNyKtV2EC3k3lYgTOwg09ghy/BTp7CKBRV844BOpmmMV2+ySb4BmInG7AKY7AHH+EYqqhZo9PPBG/BVDlOizAD/XQFmnoPXzxRQX8M/CCYS48L6RIc4ygGHK9WGg9HZSZMUNRPVwNJGg5Hg2Qgqh4N3FsDsb6EmgYm07iwwvUxstdxJTwgmILf4CfZ6bb5OHANX8GN5x20IVxnG8ge94pt2xpwU3GnCwayF4Q2G2vgFLzHndFzQdk4q77nNfCdwL28qNyMtmEf3A1/QV5FjDiPWo5jrwf8TWZChTlgJvL4F9QL50/A43qVidTvLcuoM2wDQ1+IkgefgUpLcYwMVBqCKNJA2b0gKNocOIITOIef8C/F/CdMbh/GklynsSawKLHS8d9/B1x2LUqsfFyy3TMsWj5A1cLkotDbYO4JjWWZlZEGv8EbOIR1CAVN2eG8W5oNKgxaeC6DmTJjZs7ixUxpznLPLT+v4sXpoMLcLI3mzFSonDXIEI/M3QCIO4YuimBJ/gAAAABJRU5ErkJggg==" alt="Winget Version">
|
||||
</a>
|
||||
<a href="https://gurubase.io/g/sunshine">
|
||||
<img src="https://img.shields.io/badge/Gurubase-Ask%20Guru-ef1a1b?style=for-the-badge&logo=data:image/jpeg;base64,/9j/2wCEAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDIBCQkJDAsMGA0NGDIhHCEyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMv/AABEIABgAGAMBIgACEQEDEQH/xAGiAAABBQEBAQEBAQAAAAAAAAAAAQIDBAUGBwgJCgsQAAIBAwMCBAMFBQQEAAABfQECAwAEEQUSITFBBhNRYQcicRQygZGhCCNCscEVUtHwJDNicoIJChYXGBkaJSYnKCkqNDU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6g4SFhoeIiYqSk5SVlpeYmZqio6Slpqeoqaqys7S1tre4ubrCw8TFxsfIycrS09TV1tfY2drh4uPk5ebn6Onq8fLz9PX29/j5+gEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoLEQACAQIEBAMEBwUEBAABAncAAQIDEQQFITEGEkFRB2FxEyIygQgUQpGhscEJIzNS8BVictEKFiQ04SXxFxgZGiYnKCkqNTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqCg4SFhoeIiYqSk5SVlpeYmZqio6Slpqeoqaqys7S1tre4ubrCw8TFxsfIycrS09TV1tfY2dri4+Tl5ufo6ery8/T19vf4+fr/2gAMAwEAAhEDEQA/AOLqSO3mlilljido4QGkYDIQEgAn05IH41seFo7aS+uRKlrJci2Y2cd2QImlyOGyQPu7sA8ZxXapAlvpThbPRkv7nTQWhDoIZZRc/XaSAOmcZGOnFfP06XMr3P17F5iqE+Tl1uuvf9Lde55dRW74pit4r61EcdtFdG2U3kVqQY0lyeBgkD5duQOASawqykuV2O6jV9rTU0rXLNjf3Om3QubSXy5QCudoYEEYIIOQR7GnahqV3qk6zXk3mOqhFAUKqqOyqAAByeAKqUUXdrFezhz89lfv1+8KKKKRZ//Z" alt="Gurubase">
|
||||
</a>
|
||||
<a href="https://github.com/LizardByte/Sunshine/actions/workflows/CI.yml?query=branch%3Amaster">
|
||||
<img src="https://img.shields.io/github/actions/workflow/status/lizardbyte/sunshine/CI.yml.svg?branch=master&label=CI%20build&logo=github&style=for-the-badge" alt="GitHub Workflow Status (CI)">
|
||||
</a>
|
||||
<a href="https://github.com/LizardByte/Sunshine/actions/workflows/localize.yml?query=branch%3Amaster">
|
||||
<img src="https://img.shields.io/github/actions/workflow/status/lizardbyte/sunshine/localize.yml.svg?branch=master&label=localize%20build&logo=github&style=for-the-badge" alt="GitHub Workflow Status (localize)">
|
||||
</a>
|
||||
<a href="https://docs.lizardbyte.dev/projects/sunshine">
|
||||
<img src="https://img.shields.io/readthedocs/sunshinestream.svg?label=Docs&style=for-the-badge&logo=readthedocs" alt="Read the Docs">
|
||||
</a>
|
||||
<a href="https://codecov.io/gh/LizardByte/Sunshine">
|
||||
<img src="https://img.shields.io/codecov/c/gh/LizardByte/Sunshine?token=SMGXQ5NVMJ&style=for-the-badge&logo=codecov&label=codecov" alt="Codecov">
|
||||
</a>
|
||||
</div>
|
||||
|
||||
## ℹ️ About
|
||||
|
||||
Sunshine is a self-hosted game stream host for Moonlight.
|
||||
Offering low latency, cloud gaming server capabilities with support for AMD, Intel, and Nvidia GPUs for hardware
|
||||
encoding. Software encoding is also available. You can connect to Sunshine from any Moonlight client on a variety of
|
||||
devices. A web UI is provided to allow configuration, and client pairing, from your favorite web browser. Pair from
|
||||
the local server or any mobile device.
|
||||
|
||||
LizardByte has the full documentation hosted on [Read the Docs](https://docs.lizardbyte.dev/projects/sunshine)
|
||||
|
||||
* [Stable](https://docs.lizardbyte.dev/projects/sunshine/latest/)
|
||||
* [Beta](https://docs.lizardbyte.dev/projects/sunshine/master/)
|
||||
|
||||
## 🖥️ System Requirements
|
||||
|
||||
@warning{These tables are a work in progress. Do not purchase hardware based on this information.}
|
||||
|
||||
<table>
|
||||
<caption id="minimum_requirements">Minimum Requirements</caption>
|
||||
<tr>
|
||||
<th>Component</th>
|
||||
<th>Requirement</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td rowspan="3">GPU</td>
|
||||
<td>AMD: VCE 1.0 or higher, see: <a href="https://github.com/obsproject/obs-amd-encoder/wiki/Hardware-Support">obs-amd hardware support</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
Intel:<br>
|
||||
Linux: VAAPI-compatible, see: <a href="https://www.intel.com/content/www/us/en/developer/articles/technical/linuxmedia-vaapi.html">VAAPI hardware support</a><br>
|
||||
Windows: Skylake or newer with QuickSync encoding support
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Nvidia: NVENC enabled cards, see: <a href="https://developer.nvidia.com/video-encode-and-decode-gpu-support-matrix-new">nvenc support matrix</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td rowspan="2">CPU</td>
|
||||
<td>AMD: Ryzen 3 or higher</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Intel: Core i3 or higher</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>RAM</td>
|
||||
<td>4GB or more</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td rowspan="5">OS</td>
|
||||
<td>Windows: 10+ (Windows Server does not support virtual gamepads)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>macOS: 13+</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Linux/Debian: 12+ (bookworm)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Linux/Fedora: 40+</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Linux/Ubuntu: 22.04+ (jammy)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td rowspan="2">Network</td>
|
||||
<td>Host: 5GHz, 802.11ac</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Client: 5GHz, 802.11ac</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<table>
|
||||
<caption id="4k_suggestions">4k Suggestions</caption>
|
||||
<tr>
|
||||
<th>Component</th>
|
||||
<th>Requirement</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td rowspan="3">GPU</td>
|
||||
<td>AMD: Video Coding Engine 3.1 or higher</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
Intel:<br>
|
||||
Linux: HD Graphics 510 or higher<br>
|
||||
Windows: Skylake or newer with QuickSync encoding support
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Nvidia: GeForce GTX 1080 or higher</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td rowspan="2">CPU</td>
|
||||
<td>AMD: Ryzen 5 or higher</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Intel: Core i5 or higher</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td rowspan="2">Network</td>
|
||||
<td>Host: CAT5e ethernet or better</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Client: CAT5e ethernet or better</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<table>
|
||||
<caption id="hdr_suggestions">HDR Suggestions</caption>
|
||||
<tr>
|
||||
<th>Component</th>
|
||||
<th>Requirement</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td rowspan="3">GPU</td>
|
||||
<td>AMD: Video Coding Engine 3.4 or higher</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Intel: HD Graphics 730 or higher</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Nvidia: Pascal-based GPU (GTX 10-series) or higher</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td rowspan="2">CPU</td>
|
||||
<td>AMD: Ryzen 5 or higher</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Intel: Core i5 or higher</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td rowspan="2">Network</td>
|
||||
<td>Host: CAT5e ethernet or better</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Client: CAT5e ethernet or better</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
## ❓ Support
|
||||
|
||||
Our support methods are listed in our [LizardByte Docs](https://docs.lizardbyte.dev/latest/about/support.html).
|
||||
|
||||
<div class="section_buttons">
|
||||
|
||||
| Previous | Next |
|
||||
|:---------|-------------------------------------------:|
|
||||
| | [Getting Started](docs/getting_started.md) |
|
||||
|
||||
</div>
|
||||
|
||||
<details style="display: none;">
|
||||
<summary></summary>
|
||||
[TOC]
|
||||
</details>
|
||||
128
README.rst
128
README.rst
@@ -1,128 +0,0 @@
|
||||
Overview
|
||||
========
|
||||
LizardByte has the full documentation hosted on `Read the Docs <https://sunshinestream.readthedocs.io/>`__.
|
||||
|
||||
About
|
||||
-----
|
||||
Sunshine is a self-hosted game stream host for Moonlight.
|
||||
Offering low latency, cloud gaming server capabilities with support for AMD, Intel, and Nvidia GPUs for hardware
|
||||
encoding. Software encoding is also available. You can connect to Sunshine from any Moonlight client on a variety of
|
||||
devices. A web UI is provided to allow configuration, and client pairing, from your favorite web browser. Pair from
|
||||
the local server or any mobile device.
|
||||
|
||||
System Requirements
|
||||
-------------------
|
||||
|
||||
.. warning:: This table is a work in progress. Do not purchase hardware based on this.
|
||||
|
||||
**Minimum Requirements**
|
||||
|
||||
+------------+------------------------------------------------------------+
|
||||
| GPU | AMD: VCE 1.0 or higher, see `obs-amd hardware support`_ |
|
||||
| +------------------------------------------------------------+
|
||||
| | Intel: VAAPI-compatible, see: `VAAPI hardware support`_ |
|
||||
| +------------------------------------------------------------+
|
||||
| | Nvidia: NVENC enabled cards, see `nvenc support matrix`_ |
|
||||
+------------+------------------------------------------------------------+
|
||||
| CPU | AMD: Ryzen 3 or higher |
|
||||
| +------------------------------------------------------------+
|
||||
| | Intel: Core i3 or higher |
|
||||
+------------+------------------------------------------------------------+
|
||||
| RAM | 4GB or more |
|
||||
+------------+------------------------------------------------------------+
|
||||
| OS | Windows: 10+ (Windows Server not supported) |
|
||||
| +------------------------------------------------------------+
|
||||
| | macOS: 11.7+ |
|
||||
| +------------------------------------------------------------+
|
||||
| | Linux/Debian: 11 (bullseye) |
|
||||
| +------------------------------------------------------------+
|
||||
| | Linux/Fedora: 36+ |
|
||||
| +------------------------------------------------------------+
|
||||
| | Linux/Ubuntu: 20.04+ (focal) |
|
||||
+------------+------------------------------------------------------------+
|
||||
| Network | Host: 5GHz, 802.11ac |
|
||||
| +------------------------------------------------------------+
|
||||
| | Client: 5GHz, 802.11ac |
|
||||
+------------+------------------------------------------------------------+
|
||||
|
||||
**4k Suggestions**
|
||||
|
||||
+------------+------------------------------------------------------------+
|
||||
| GPU | AMD: Video Coding Engine 3.1 or higher |
|
||||
| +------------------------------------------------------------+
|
||||
| | Intel: HD Graphics 510 or higher |
|
||||
| +------------------------------------------------------------+
|
||||
| | Nvidia: GeForce GTX 1080 or higher |
|
||||
+------------+------------------------------------------------------------+
|
||||
| CPU | AMD: Ryzen 5 or higher |
|
||||
| +------------------------------------------------------------+
|
||||
| | Intel: Core i5 or higher |
|
||||
+------------+------------------------------------------------------------+
|
||||
| Network | Host: CAT5e ethernet or better |
|
||||
| +------------------------------------------------------------+
|
||||
| | Client: CAT5e ethernet or better |
|
||||
+------------+------------------------------------------------------------+
|
||||
|
||||
**HDR Suggestions**
|
||||
|
||||
+------------+------------------------------------------------------------+
|
||||
| GPU | AMD: Video Coding Engine 3.4 or higher |
|
||||
| +------------------------------------------------------------+
|
||||
| | Intel: UHD Graphics 730 or higher |
|
||||
| +------------------------------------------------------------+
|
||||
| | Nvidia: Pascal-based GPU (GTX 10-series) or higher |
|
||||
+------------+------------------------------------------------------------+
|
||||
| CPU | AMD: todo |
|
||||
| +------------------------------------------------------------+
|
||||
| | Intel: todo |
|
||||
+------------+------------------------------------------------------------+
|
||||
| Network | Host: CAT5e ethernet or better |
|
||||
| +------------------------------------------------------------+
|
||||
| | Client: CAT5e ethernet or better |
|
||||
+------------+------------------------------------------------------------+
|
||||
|
||||
Integrations
|
||||
------------
|
||||
|
||||
.. image:: https://img.shields.io/github/actions/workflow/status/lizardbyte/sunshine/CI.yml.svg?branch=master&label=CI%20build&logo=github&style=for-the-badge
|
||||
:alt: GitHub Workflow Status (CI)
|
||||
:target: https://github.com/LizardByte/Sunshine/actions/workflows/CI.yml?query=branch%3Amaster
|
||||
|
||||
.. image:: https://img.shields.io/github/actions/workflow/status/lizardbyte/sunshine/localize.yml.svg?branch=nightly&label=localize%20build&logo=github&style=for-the-badge
|
||||
:alt: GitHub Workflow Status (localize)
|
||||
:target: https://github.com/LizardByte/Sunshine/actions/workflows/localize.yml?query=branch%3Anightly
|
||||
|
||||
.. image:: https://img.shields.io/readthedocs/sunshinestream.svg?label=Docs&style=for-the-badge&logo=readthedocs
|
||||
:alt: Read the Docs
|
||||
:target: http://sunshinestream.readthedocs.io/
|
||||
|
||||
Support
|
||||
-------
|
||||
|
||||
Our support methods are listed in our
|
||||
`LizardByte Docs <https://lizardbyte.readthedocs.io/en/latest/about/support.html>`__.
|
||||
|
||||
Downloads
|
||||
---------
|
||||
|
||||
.. image:: https://img.shields.io/github/downloads/lizardbyte/sunshine/total.svg?style=for-the-badge&logo=github
|
||||
:alt: GitHub Releases
|
||||
:target: https://github.com/LizardByte/Sunshine/releases/latest
|
||||
|
||||
.. image:: https://img.shields.io/docker/pulls/lizardbyte/sunshine.svg?style=for-the-badge&logo=docker
|
||||
:alt: Docker
|
||||
:target: https://hub.docker.com/r/lizardbyte/sunshine
|
||||
|
||||
.. image:: https://img.shields.io/badge/dynamic/xml.svg?color=orange&label=Winget&style=for-the-badge&prefix=v&query=%2F%2Ftr%5B%40id%3D%27winget%27%5D%2Ftd%5B3%5D%2Fspan%2Fa&url=https%3A%2F%2Frepology.org%2Fproject%2Fsunshine%2Fversions&logo=microsoft
|
||||
:alt: Winget Version
|
||||
:target: https://github.com/microsoft/winget-pkgs/tree/master/manifests/l/LizardByte/Sunshine
|
||||
|
||||
Stats
|
||||
------
|
||||
.. image:: https://img.shields.io/github/stars/lizardbyte/sunshine.svg?logo=github&style=for-the-badge
|
||||
:alt: GitHub stars
|
||||
:target: https://github.com/LizardByte/Sunshine
|
||||
|
||||
.. _nvenc support matrix: https://developer.nvidia.com/video-encode-and-decode-gpu-support-matrix-new
|
||||
.. _obs-amd hardware support: https://github.com/obsproject/obs-amd-encoder/wiki/Hardware-Support
|
||||
.. _VAAPI hardware support: https://www.intel.com/content/www/us/en/developer/articles/technical/linuxmedia-vaapi.html
|
||||
17
api/components/responses/400.yml
Normal file
17
api/components/responses/400.yml
Normal file
@@ -0,0 +1,17 @@
|
||||
---
|
||||
description: Bad Request - A parameter was not specified, or was specified incorrectly.
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
status_code:
|
||||
type: string
|
||||
status:
|
||||
type: string
|
||||
error:
|
||||
type: string
|
||||
example:
|
||||
status_code: 400
|
||||
status: false
|
||||
error: "Bad Request"
|
||||
17
api/components/responses/401.yml
Normal file
17
api/components/responses/401.yml
Normal file
@@ -0,0 +1,17 @@
|
||||
---
|
||||
description: Unauthorized - The request requires user authentication.
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
status_code:
|
||||
type: string
|
||||
status:
|
||||
type: string
|
||||
error:
|
||||
type: string
|
||||
example:
|
||||
status_code: 401
|
||||
status: false
|
||||
error: "Unauthorized"
|
||||
7
api/components/responses/403.yml
Normal file
7
api/components/responses/403.yml
Normal file
@@ -0,0 +1,7 @@
|
||||
---
|
||||
description: Forbidden - The server understood the request, but is refusing to fulfill it.
|
||||
content:
|
||||
# TODO: return JSON response.
|
||||
text/plain:
|
||||
schema:
|
||||
type: string
|
||||
15
api/components/responses/404.yml
Normal file
15
api/components/responses/404.yml
Normal file
@@ -0,0 +1,15 @@
|
||||
---
|
||||
description: Not Found - The requested resource could not be found.
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
status_code:
|
||||
type: integer
|
||||
format: int32
|
||||
error:
|
||||
type: string
|
||||
example:
|
||||
status_code: 404
|
||||
error: "Not Found"
|
||||
48
api/components/schemas/app.yml
Normal file
48
api/components/schemas/app.yml
Normal file
@@ -0,0 +1,48 @@
|
||||
---
|
||||
type: object
|
||||
required:
|
||||
- name
|
||||
properties:
|
||||
name:
|
||||
type: string
|
||||
description: Application Name, as shown on Moonlight
|
||||
output:
|
||||
type: string
|
||||
description: The file where the output of the command is stored, if it is not specified, the output is ignored
|
||||
cmd:
|
||||
$ref: "./cmd.yml"
|
||||
description: The main application to start. If blank, no application will be started.
|
||||
exclude-global-prep-cmd:
|
||||
type: boolean
|
||||
description: Enable/Disable the execution of Global Prep Commands for this application.
|
||||
elevated:
|
||||
type: boolean
|
||||
description: Run the application as an elevated process.
|
||||
auto-detach:
|
||||
type: boolean
|
||||
description: Continue streaming if the application exits quickly
|
||||
wait-all:
|
||||
type: boolean
|
||||
description: Continue streaming until all app processes exit
|
||||
exit-timeout:
|
||||
type: integer
|
||||
description: Number of seconds to wait for all app processes to gracefully exit when requested to quit.
|
||||
image-path:
|
||||
type: string
|
||||
description: |
|
||||
Application icon/picture/image path that will be sent to client. Image must be a PNG file.
|
||||
If not set, Sunshine will send default box image.
|
||||
working-dir:
|
||||
type: string
|
||||
description: |
|
||||
The working directory that should be passed to the process.
|
||||
For example, some applications use the working directory to search for configuration files.
|
||||
If not set, Sunshine will default to the parent directory of the command
|
||||
prep-cmd:
|
||||
type: array
|
||||
items:
|
||||
$ref: "./prep-cmd.yml"
|
||||
detached:
|
||||
type: array
|
||||
items:
|
||||
$ref: "./cmd.yml"
|
||||
3
api/components/schemas/cmd.yml
Normal file
3
api/components/schemas/cmd.yml
Normal file
@@ -0,0 +1,3 @@
|
||||
---
|
||||
type: string
|
||||
description: Command to execute
|
||||
16
api/components/schemas/prep-cmd.yml
Normal file
16
api/components/schemas/prep-cmd.yml
Normal file
@@ -0,0 +1,16 @@
|
||||
---
|
||||
type: object
|
||||
required:
|
||||
- do
|
||||
- undo
|
||||
- elevated
|
||||
properties:
|
||||
do:
|
||||
$ref: "./cmd.yml"
|
||||
description: Command to run before the application starts.
|
||||
undo:
|
||||
$ref: "./cmd.yml"
|
||||
description: Command to run after the application exits.
|
||||
elevated:
|
||||
type: boolean
|
||||
description: Run the command as an elevated process.
|
||||
44
api/openapi.yml
Normal file
44
api/openapi.yml
Normal file
@@ -0,0 +1,44 @@
|
||||
---
|
||||
# https://openapi.tools
|
||||
|
||||
openapi: 3.1.0
|
||||
|
||||
info:
|
||||
title: Sunshine
|
||||
summary: Self-hosted game stream host for Moonlight.
|
||||
version: 0.0.0
|
||||
contact:
|
||||
name: LizardByte
|
||||
url: https://app.lizardbyte.dev/support
|
||||
license:
|
||||
name: GNU General Public License v3.0 only
|
||||
url: https://github.com/LizardByte/Sunshine/blob/master/LICENSE
|
||||
|
||||
servers:
|
||||
- url: "https://{host}:{ui-port}"
|
||||
description: Sunshine server
|
||||
variables:
|
||||
host:
|
||||
default: "localhost"
|
||||
ui-port:
|
||||
default: 47990
|
||||
|
||||
security:
|
||||
- basicAuth: []
|
||||
|
||||
components:
|
||||
securitySchemes:
|
||||
# TODO: update when JWT is implemented (https://github.com/LizardByte/Sunshine/pull/2995)
|
||||
# https://swagger.io/specification/#security-scheme-object-examples
|
||||
basicAuth:
|
||||
description: HTTP Basic authentication
|
||||
type: http
|
||||
scheme: basic
|
||||
|
||||
paths:
|
||||
/api/apps:
|
||||
$ref: "./paths/confighttp/apps/apps.yml"
|
||||
/api/apps/{index}:
|
||||
$ref: "./paths/confighttp/apps/apps-by-index.yml"
|
||||
/api/logs:
|
||||
$ref: "./paths/confighttp/logs/logs.yml"
|
||||
37
api/paths/confighttp/apps/apps-by-index.yml
Normal file
37
api/paths/confighttp/apps/apps-by-index.yml
Normal file
@@ -0,0 +1,37 @@
|
||||
---
|
||||
delete:
|
||||
summary: Delete an application.
|
||||
description: |
|
||||
Delete an application.
|
||||
operationId: deleteApps
|
||||
tags:
|
||||
- Apps
|
||||
parameters:
|
||||
- name: index
|
||||
in: path
|
||||
description: The index of the application to delete.
|
||||
required: true
|
||||
schema:
|
||||
type: integer
|
||||
format: int32
|
||||
responses:
|
||||
'200':
|
||||
description: The application was deleted successfully.
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
status:
|
||||
type: string
|
||||
result:
|
||||
type: string
|
||||
example:
|
||||
status: true
|
||||
result: "application 9999 deleted"
|
||||
'400':
|
||||
$ref: "../../../components/responses/400.yml"
|
||||
'401':
|
||||
$ref: "../../../components/responses/401.yml"
|
||||
'403':
|
||||
$ref: "../../../components/responses/403.yml"
|
||||
151
api/paths/confighttp/apps/apps.yml
Normal file
151
api/paths/confighttp/apps/apps.yml
Normal file
@@ -0,0 +1,151 @@
|
||||
---
|
||||
get:
|
||||
summary: Get the list of available applications.
|
||||
description: |
|
||||
Get the list of available applications.
|
||||
operationId: getApps
|
||||
tags:
|
||||
- Apps
|
||||
responses:
|
||||
'200':
|
||||
description: A list of available applications.
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: array
|
||||
items:
|
||||
$ref: "../../../components/schemas/app.yml"
|
||||
example:
|
||||
- name: "Example App"
|
||||
output: "/path/to/output.log"
|
||||
cmd: "example-command"
|
||||
exclude-global-prep-cmd: false
|
||||
elevated: false
|
||||
auto-detach: true
|
||||
wait-all: false
|
||||
exit-timeout: 30
|
||||
image-path: "/path/to/image.png"
|
||||
working-dir: "/path/to/working-dir"
|
||||
prep-cmd:
|
||||
- do: "prep-command-1"
|
||||
undo: "undo-command-1"
|
||||
elevated: false
|
||||
detached:
|
||||
- "detached-command-1"
|
||||
'401':
|
||||
$ref: "../../../components/responses/401.yml"
|
||||
'403':
|
||||
$ref: "../../../components/responses/403.yml"
|
||||
|
||||
post:
|
||||
summary: Save an application.
|
||||
description: |
|
||||
Save an application.
|
||||
To save a new application the index must be `-1`.
|
||||
To update an existing application, you must provide the current index of the application.
|
||||
operationId: postApps
|
||||
tags:
|
||||
- Apps
|
||||
parameters:
|
||||
- name: index
|
||||
in: query
|
||||
description: The index of the application to update. If the index is -1, a new application will be created.
|
||||
required: true
|
||||
schema:
|
||||
type: integer
|
||||
format: int32
|
||||
- name: name
|
||||
in: query
|
||||
description: Application Name
|
||||
required: false
|
||||
schema:
|
||||
type: string
|
||||
- name: output
|
||||
in: query
|
||||
description: Log Output Path
|
||||
required: false
|
||||
schema:
|
||||
type: string
|
||||
- name: cmd
|
||||
in: query
|
||||
description: Command to run the application
|
||||
required: false
|
||||
schema:
|
||||
$ref: "../../../components/schemas/cmd.yml"
|
||||
- name: exclude-global-prep-cmd
|
||||
in: query
|
||||
description: Enable/Disable the execution of Global Prep Commands for this application.
|
||||
required: false
|
||||
schema:
|
||||
type: boolean
|
||||
- name: elevated
|
||||
in: query
|
||||
description: Run the application as an elevated process.
|
||||
required: false
|
||||
schema:
|
||||
type: boolean
|
||||
- name: auto-detach
|
||||
in: query
|
||||
description: Continue streaming if the application exits quickly
|
||||
required: false
|
||||
schema:
|
||||
type: boolean
|
||||
- name: wait-all
|
||||
in: query
|
||||
description: Continue streaming until all app processes exit
|
||||
required: false
|
||||
schema:
|
||||
type: boolean
|
||||
- name: exit-timeout
|
||||
in: query
|
||||
description: Number of seconds to wait for all app processes to gracefully exit when requested to quit.
|
||||
required: false
|
||||
schema:
|
||||
type: integer
|
||||
format: int32
|
||||
- name: prep-cmd
|
||||
in: query
|
||||
description: Commands to run before the main application
|
||||
required: false
|
||||
schema:
|
||||
type: array
|
||||
items:
|
||||
$ref: "../../../components/schemas/prep-cmd.yml"
|
||||
- name: detached
|
||||
in: query
|
||||
description: Commands to run in detached processes
|
||||
required: false
|
||||
schema:
|
||||
type: array
|
||||
items:
|
||||
$ref: "../../../components/schemas/cmd.yml"
|
||||
- name: image-path
|
||||
in: query
|
||||
description: Full path to the application image. Must be a png file.
|
||||
required: false
|
||||
schema:
|
||||
type: string
|
||||
- name: working-dir
|
||||
in: query
|
||||
description: The working directory that should be passed to the process.
|
||||
required: false
|
||||
schema:
|
||||
type: string
|
||||
responses:
|
||||
'200':
|
||||
description: The application was saved successfully.
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
status:
|
||||
type: string
|
||||
example:
|
||||
status: true
|
||||
'400':
|
||||
$ref: "../../../components/responses/400.yml"
|
||||
'401':
|
||||
$ref: "../../../components/responses/401.yml"
|
||||
'403':
|
||||
$ref: "../../../components/responses/403.yml"
|
||||
20
api/paths/confighttp/logs/logs.yml
Normal file
20
api/paths/confighttp/logs/logs.yml
Normal file
@@ -0,0 +1,20 @@
|
||||
---
|
||||
get:
|
||||
summary: Get the logs from the log file.
|
||||
description: |
|
||||
Get the logs from the log file.
|
||||
operationId: getLogs
|
||||
tags:
|
||||
- Logs
|
||||
responses:
|
||||
'200':
|
||||
description: The contents of the log file.
|
||||
content:
|
||||
text/plain:
|
||||
schema:
|
||||
type: string
|
||||
example: '[2025-01-15 17:07:58.131]: Info: Sunshine version: v...'
|
||||
'401':
|
||||
$ref: "../../../components/responses/401.yml"
|
||||
'403':
|
||||
$ref: "../../../components/responses/403.yml"
|
||||
70
cmake/FindLibva.cmake
Normal file
70
cmake/FindLibva.cmake
Normal file
@@ -0,0 +1,70 @@
|
||||
# - Try to find Libva
|
||||
# This module defines the following variables:
|
||||
#
|
||||
# * LIBVA_FOUND - The component was found
|
||||
# * LIBVA_INCLUDE_DIRS - The component include directory
|
||||
# * LIBVA_LIBRARIES - The component library Libva
|
||||
# * LIBVA_DRM_LIBRARIES - The component library Libva DRM
|
||||
|
||||
# Use pkg-config to get the directories and then use these values in the
|
||||
# find_path() and find_library() calls
|
||||
# cmake-format: on
|
||||
|
||||
find_package(PkgConfig QUIET)
|
||||
if(PKG_CONFIG_FOUND)
|
||||
pkg_check_modules(_LIBVA libva)
|
||||
pkg_check_modules(_LIBVA_DRM libva-drm)
|
||||
endif()
|
||||
|
||||
find_path(
|
||||
LIBVA_INCLUDE_DIR
|
||||
NAMES va/va.h va/va_drm.h
|
||||
HINTS ${_LIBVA_INCLUDE_DIRS}
|
||||
PATHS /usr/include /usr/local/include /opt/local/include)
|
||||
|
||||
find_library(
|
||||
LIBVA_LIB
|
||||
NAMES ${_LIBVA_LIBRARIES} libva
|
||||
HINTS ${_LIBVA_LIBRARY_DIRS}
|
||||
PATHS /usr/lib /usr/local/lib /opt/local/lib)
|
||||
|
||||
find_library(
|
||||
LIBVA_DRM_LIB
|
||||
NAMES ${_LIBVA_DRM_LIBRARIES} libva-drm
|
||||
HINTS ${_LIBVA_DRM_LIBRARY_DIRS}
|
||||
PATHS /usr/lib /usr/local/lib /opt/local/lib)
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(Libva REQUIRED_VARS LIBVA_INCLUDE_DIR LIBVA_LIB LIBVA_DRM_LIB)
|
||||
mark_as_advanced(LIBVA_INCLUDE_DIR LIBVA_LIB LIBVA_DRM_LIB)
|
||||
|
||||
if(LIBVA_FOUND)
|
||||
set(LIBVA_INCLUDE_DIRS ${LIBVA_INCLUDE_DIR})
|
||||
set(LIBVA_LIBRARIES ${LIBVA_LIB})
|
||||
set(LIBVA_DRM_LIBRARIES ${LIBVA_DRM_LIB})
|
||||
|
||||
if(NOT TARGET Libva::va)
|
||||
if(IS_ABSOLUTE "${LIBVA_LIBRARIES}")
|
||||
add_library(Libva::va UNKNOWN IMPORTED)
|
||||
set_target_properties(Libva::va PROPERTIES IMPORTED_LOCATION "${LIBVA_LIBRARIES}")
|
||||
else()
|
||||
add_library(Libva::va INTERFACE IMPORTED)
|
||||
set_target_properties(Libva::va PROPERTIES IMPORTED_LIBNAME "${LIBVA_LIBRARIES}")
|
||||
endif()
|
||||
|
||||
set_target_properties(Libva::va PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${LIBVA_INCLUDE_DIRS}")
|
||||
endif()
|
||||
|
||||
if(NOT TARGET Libva::drm)
|
||||
if(IS_ABSOLUTE "${LIBVA_DRM_LIBRARIES}")
|
||||
add_library(Libva::drm UNKNOWN IMPORTED)
|
||||
set_target_properties(Libva::drm PROPERTIES IMPORTED_LOCATION "${LIBVA_DRM_LIBRARIES}")
|
||||
else()
|
||||
add_library(Libva::drm INTERFACE IMPORTED)
|
||||
set_target_properties(Libva::drm PROPERTIES IMPORTED_LIBNAME "${LIBVA_DRM_LIBRARIES}")
|
||||
endif()
|
||||
|
||||
set_target_properties(Libva::drm PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${LIBVA_INCLUDE_DIRS}")
|
||||
endif()
|
||||
|
||||
endif()
|
||||
34
cmake/FindSystemd.cmake
Normal file
34
cmake/FindSystemd.cmake
Normal file
@@ -0,0 +1,34 @@
|
||||
# - Try to find Systemd
|
||||
# Once done this will define
|
||||
#
|
||||
# SYSTEMD_FOUND - system has systemd
|
||||
# SYSTEMD_USER_UNIT_INSTALL_DIR - the systemd system unit install directory
|
||||
# SYSTEMD_SYSTEM_UNIT_INSTALL_DIR - the systemd user unit install directory
|
||||
|
||||
IF (NOT WIN32)
|
||||
|
||||
find_package(PkgConfig QUIET)
|
||||
if(PKG_CONFIG_FOUND)
|
||||
pkg_check_modules(SYSTEMD "systemd")
|
||||
endif()
|
||||
|
||||
if (SYSTEMD_FOUND)
|
||||
execute_process(COMMAND ${PKG_CONFIG_EXECUTABLE}
|
||||
--variable=systemduserunitdir systemd
|
||||
OUTPUT_VARIABLE SYSTEMD_USER_UNIT_INSTALL_DIR)
|
||||
|
||||
string(REGEX REPLACE "[ \t\n]+" "" SYSTEMD_USER_UNIT_INSTALL_DIR
|
||||
"${SYSTEMD_USER_UNIT_INSTALL_DIR}")
|
||||
|
||||
execute_process(COMMAND ${PKG_CONFIG_EXECUTABLE}
|
||||
--variable=systemdsystemunitdir systemd
|
||||
OUTPUT_VARIABLE SYSTEMD_SYSTEM_UNIT_INSTALL_DIR)
|
||||
|
||||
string(REGEX REPLACE "[ \t\n]+" "" SYSTEMD_SYSTEM_UNIT_INSTALL_DIR
|
||||
"${SYSTEMD_SYSTEM_UNIT_INSTALL_DIR}")
|
||||
|
||||
mark_as_advanced(SYSTEMD_USER_UNIT_INSTALL_DIR SYSTEMD_SYSTEM_UNIT_INSTALL_DIR)
|
||||
|
||||
endif ()
|
||||
|
||||
ENDIF ()
|
||||
28
cmake/FindUdev.cmake
Normal file
28
cmake/FindUdev.cmake
Normal file
@@ -0,0 +1,28 @@
|
||||
# - Try to find Udev
|
||||
# Once done this will define
|
||||
#
|
||||
# UDEV_FOUND - system has udev
|
||||
# UDEV_RULES_INSTALL_DIR - the udev rules install directory
|
||||
|
||||
IF (NOT WIN32)
|
||||
|
||||
find_package(PkgConfig QUIET)
|
||||
if(PKG_CONFIG_FOUND)
|
||||
pkg_check_modules(UDEV "udev")
|
||||
endif()
|
||||
|
||||
if (UDEV_FOUND)
|
||||
execute_process(COMMAND ${PKG_CONFIG_EXECUTABLE}
|
||||
--variable=udevdir udev
|
||||
OUTPUT_VARIABLE UDEV_RULES_INSTALL_DIR)
|
||||
|
||||
string(REGEX REPLACE "[ \t\n]+" "" UDEV_RULES_INSTALL_DIR
|
||||
"${UDEV_RULES_INSTALL_DIR}")
|
||||
|
||||
set(UDEV_RULES_INSTALL_DIR "${UDEV_RULES_INSTALL_DIR}/rules.d")
|
||||
|
||||
mark_as_advanced(UDEV_RULES_INSTALL_DIR)
|
||||
|
||||
endif ()
|
||||
|
||||
ENDIF ()
|
||||
@@ -3,7 +3,32 @@
|
||||
|
||||
list(APPEND SUNSHINE_COMPILE_OPTIONS -Wall -Wno-sign-compare)
|
||||
# Wall - enable all warnings
|
||||
# Werror - treat warnings as errors
|
||||
# Wno-maybe-uninitialized/Wno-uninitialized - disable warnings for maybe uninitialized variables
|
||||
# Wno-sign-compare - disable warnings for signed/unsigned comparisons
|
||||
# Wno-restrict - disable warnings for memory overlap
|
||||
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
|
||||
# GCC specific compile options
|
||||
|
||||
# GCC 12 and higher will complain about maybe-uninitialized
|
||||
if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 12)
|
||||
list(APPEND SUNSHINE_COMPILE_OPTIONS -Wno-maybe-uninitialized)
|
||||
|
||||
# Disable the bogus warning that may prevent compilation (only for GCC 12).
|
||||
# See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105651.
|
||||
if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS 13)
|
||||
list(APPEND SUNSHINE_COMPILE_OPTIONS -Wno-restrict)
|
||||
endif()
|
||||
endif()
|
||||
elseif(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
|
||||
# Clang specific compile options
|
||||
|
||||
# Clang doesn't actually complain about this this, so disabling for now
|
||||
# list(APPEND SUNSHINE_COMPILE_OPTIONS -Wno-uninitialized)
|
||||
endif()
|
||||
if(BUILD_WERROR)
|
||||
list(APPEND SUNSHINE_COMPILE_OPTIONS -Werror)
|
||||
endif()
|
||||
|
||||
# setup assets directory
|
||||
if(NOT SUNSHINE_ASSETS_DIR)
|
||||
@@ -23,72 +48,77 @@ elseif(UNIX)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
include_directories(SYSTEM third-party/nv-codec-headers/include)
|
||||
include_directories(BEFORE SYSTEM "${CMAKE_SOURCE_DIR}/third-party/nv-codec-headers/include")
|
||||
file(GLOB NVENC_SOURCES CONFIGURE_DEPENDS "src/nvenc/*.cpp" "src/nvenc/*.h")
|
||||
list(APPEND PLATFORM_TARGET_FILES ${NVENC_SOURCES})
|
||||
|
||||
configure_file(src/version.h.in version.h @ONLY)
|
||||
include_directories(${CMAKE_CURRENT_BINARY_DIR})
|
||||
configure_file("${CMAKE_SOURCE_DIR}/src/version.h.in" version.h @ONLY)
|
||||
include_directories(BEFORE "${CMAKE_CURRENT_BINARY_DIR}") # required for importing version.h
|
||||
|
||||
set(SUNSHINE_TARGET_FILES
|
||||
third-party/nanors/rs.c
|
||||
third-party/nanors/rs.h
|
||||
third-party/moonlight-common-c/src/Input.h
|
||||
third-party/moonlight-common-c/src/Rtsp.h
|
||||
third-party/moonlight-common-c/src/RtspParser.c
|
||||
third-party/moonlight-common-c/src/Video.h
|
||||
third-party/tray/tray.h
|
||||
src/upnp.cpp
|
||||
src/upnp.h
|
||||
src/cbs.cpp
|
||||
src/utility.h
|
||||
src/uuid.h
|
||||
src/config.h
|
||||
src/config.cpp
|
||||
src/main.cpp
|
||||
src/main.h
|
||||
src/crypto.cpp
|
||||
src/crypto.h
|
||||
src/nvhttp.cpp
|
||||
src/nvhttp.h
|
||||
src/httpcommon.cpp
|
||||
src/httpcommon.h
|
||||
src/confighttp.cpp
|
||||
src/confighttp.h
|
||||
src/rtsp.cpp
|
||||
src/rtsp.h
|
||||
src/stream.cpp
|
||||
src/stream.h
|
||||
src/video.cpp
|
||||
src/video.h
|
||||
src/video_colorspace.cpp
|
||||
src/video_colorspace.h
|
||||
src/input.cpp
|
||||
src/input.h
|
||||
src/audio.cpp
|
||||
src/audio.h
|
||||
src/platform/common.h
|
||||
src/process.cpp
|
||||
src/process.h
|
||||
src/network.cpp
|
||||
src/network.h
|
||||
src/move_by_copy.h
|
||||
src/system_tray.cpp
|
||||
src/system_tray.h
|
||||
src/task_pool.h
|
||||
src/thread_pool.h
|
||||
src/thread_safe.h
|
||||
src/sync.h
|
||||
src/round_robin.h
|
||||
src/stat_trackers.h
|
||||
src/stat_trackers.cpp
|
||||
"${CMAKE_SOURCE_DIR}/third-party/moonlight-common-c/src/Input.h"
|
||||
"${CMAKE_SOURCE_DIR}/third-party/moonlight-common-c/src/Rtsp.h"
|
||||
"${CMAKE_SOURCE_DIR}/third-party/moonlight-common-c/src/RtspParser.c"
|
||||
"${CMAKE_SOURCE_DIR}/third-party/moonlight-common-c/src/Video.h"
|
||||
"${CMAKE_SOURCE_DIR}/third-party/tray/src/tray.h"
|
||||
"${CMAKE_SOURCE_DIR}/src/upnp.cpp"
|
||||
"${CMAKE_SOURCE_DIR}/src/upnp.h"
|
||||
"${CMAKE_SOURCE_DIR}/src/cbs.cpp"
|
||||
"${CMAKE_SOURCE_DIR}/src/utility.h"
|
||||
"${CMAKE_SOURCE_DIR}/src/uuid.h"
|
||||
"${CMAKE_SOURCE_DIR}/src/config.h"
|
||||
"${CMAKE_SOURCE_DIR}/src/config.cpp"
|
||||
"${CMAKE_SOURCE_DIR}/src/display_device.h"
|
||||
"${CMAKE_SOURCE_DIR}/src/display_device.cpp"
|
||||
"${CMAKE_SOURCE_DIR}/src/entry_handler.cpp"
|
||||
"${CMAKE_SOURCE_DIR}/src/entry_handler.h"
|
||||
"${CMAKE_SOURCE_DIR}/src/file_handler.cpp"
|
||||
"${CMAKE_SOURCE_DIR}/src/file_handler.h"
|
||||
"${CMAKE_SOURCE_DIR}/src/globals.cpp"
|
||||
"${CMAKE_SOURCE_DIR}/src/globals.h"
|
||||
"${CMAKE_SOURCE_DIR}/src/logging.cpp"
|
||||
"${CMAKE_SOURCE_DIR}/src/logging.h"
|
||||
"${CMAKE_SOURCE_DIR}/src/main.cpp"
|
||||
"${CMAKE_SOURCE_DIR}/src/main.h"
|
||||
"${CMAKE_SOURCE_DIR}/src/crypto.cpp"
|
||||
"${CMAKE_SOURCE_DIR}/src/crypto.h"
|
||||
"${CMAKE_SOURCE_DIR}/src/nvhttp.cpp"
|
||||
"${CMAKE_SOURCE_DIR}/src/nvhttp.h"
|
||||
"${CMAKE_SOURCE_DIR}/src/httpcommon.cpp"
|
||||
"${CMAKE_SOURCE_DIR}/src/httpcommon.h"
|
||||
"${CMAKE_SOURCE_DIR}/src/confighttp.cpp"
|
||||
"${CMAKE_SOURCE_DIR}/src/confighttp.h"
|
||||
"${CMAKE_SOURCE_DIR}/src/rtsp.cpp"
|
||||
"${CMAKE_SOURCE_DIR}/src/rtsp.h"
|
||||
"${CMAKE_SOURCE_DIR}/src/stream.cpp"
|
||||
"${CMAKE_SOURCE_DIR}/src/stream.h"
|
||||
"${CMAKE_SOURCE_DIR}/src/video.cpp"
|
||||
"${CMAKE_SOURCE_DIR}/src/video.h"
|
||||
"${CMAKE_SOURCE_DIR}/src/video_colorspace.cpp"
|
||||
"${CMAKE_SOURCE_DIR}/src/video_colorspace.h"
|
||||
"${CMAKE_SOURCE_DIR}/src/input.cpp"
|
||||
"${CMAKE_SOURCE_DIR}/src/input.h"
|
||||
"${CMAKE_SOURCE_DIR}/src/audio.cpp"
|
||||
"${CMAKE_SOURCE_DIR}/src/audio.h"
|
||||
"${CMAKE_SOURCE_DIR}/src/platform/common.h"
|
||||
"${CMAKE_SOURCE_DIR}/src/process.cpp"
|
||||
"${CMAKE_SOURCE_DIR}/src/process.h"
|
||||
"${CMAKE_SOURCE_DIR}/src/network.cpp"
|
||||
"${CMAKE_SOURCE_DIR}/src/network.h"
|
||||
"${CMAKE_SOURCE_DIR}/src/move_by_copy.h"
|
||||
"${CMAKE_SOURCE_DIR}/src/system_tray.cpp"
|
||||
"${CMAKE_SOURCE_DIR}/src/system_tray.h"
|
||||
"${CMAKE_SOURCE_DIR}/src/task_pool.h"
|
||||
"${CMAKE_SOURCE_DIR}/src/thread_pool.h"
|
||||
"${CMAKE_SOURCE_DIR}/src/thread_safe.h"
|
||||
"${CMAKE_SOURCE_DIR}/src/sync.h"
|
||||
"${CMAKE_SOURCE_DIR}/src/round_robin.h"
|
||||
"${CMAKE_SOURCE_DIR}/src/stat_trackers.h"
|
||||
"${CMAKE_SOURCE_DIR}/src/stat_trackers.cpp"
|
||||
"${CMAKE_SOURCE_DIR}/src/rswrapper.h"
|
||||
"${CMAKE_SOURCE_DIR}/src/rswrapper.c"
|
||||
${PLATFORM_TARGET_FILES})
|
||||
|
||||
set_source_files_properties(src/upnp.cpp PROPERTIES COMPILE_FLAGS -Wno-pedantic)
|
||||
|
||||
set_source_files_properties(third-party/nanors/rs.c
|
||||
PROPERTIES COMPILE_FLAGS "-include deps/obl/autoshim.h -ftree-vectorize")
|
||||
|
||||
if(NOT SUNSHINE_ASSETS_DIR_DEF)
|
||||
set(SUNSHINE_ASSETS_DIR_DEF "${SUNSHINE_ASSETS_DIR}")
|
||||
endif()
|
||||
@@ -96,34 +126,32 @@ list(APPEND SUNSHINE_DEFINITIONS SUNSHINE_ASSETS_DIR="${SUNSHINE_ASSETS_DIR_DEF}
|
||||
|
||||
list(APPEND SUNSHINE_DEFINITIONS SUNSHINE_TRAY=${SUNSHINE_TRAY})
|
||||
|
||||
include_directories(${CMAKE_CURRENT_SOURCE_DIR})
|
||||
# Publisher metadata
|
||||
list(APPEND SUNSHINE_DEFINITIONS SUNSHINE_PUBLISHER_NAME="${SUNSHINE_PUBLISHER_NAME}")
|
||||
list(APPEND SUNSHINE_DEFINITIONS SUNSHINE_PUBLISHER_WEBSITE="${SUNSHINE_PUBLISHER_WEBSITE}")
|
||||
list(APPEND SUNSHINE_DEFINITIONS SUNSHINE_PUBLISHER_ISSUE_URL="${SUNSHINE_PUBLISHER_ISSUE_URL}")
|
||||
|
||||
include_directories(BEFORE "${CMAKE_SOURCE_DIR}")
|
||||
|
||||
include_directories(
|
||||
BEFORE
|
||||
SYSTEM
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/third-party
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/third-party/moonlight-common-c/enet/include
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/third-party/nanors
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/third-party/nanors/deps/obl
|
||||
"${CMAKE_SOURCE_DIR}/third-party"
|
||||
"${CMAKE_SOURCE_DIR}/third-party/moonlight-common-c/enet/include"
|
||||
"${CMAKE_SOURCE_DIR}/third-party/nanors"
|
||||
"${CMAKE_SOURCE_DIR}/third-party/nanors/deps/obl"
|
||||
${FFMPEG_INCLUDE_DIRS}
|
||||
${PLATFORM_INCLUDE_DIRS}
|
||||
${Boost_INCLUDE_DIRS} # has to be the last, or we get runtime error on macOS ffmpeg encoder
|
||||
)
|
||||
|
||||
string(TOUPPER "x${CMAKE_BUILD_TYPE}" BUILD_TYPE)
|
||||
if("${BUILD_TYPE}" STREQUAL "XDEBUG")
|
||||
if(WIN32)
|
||||
set_source_files_properties(src/nvhttp.cpp PROPERTIES COMPILE_FLAGS -O2)
|
||||
endif()
|
||||
else()
|
||||
add_definitions(-DNDEBUG)
|
||||
endif()
|
||||
|
||||
list(APPEND SUNSHINE_EXTERNAL_LIBRARIES
|
||||
libminiupnpc-static
|
||||
${MINIUPNP_LIBRARIES}
|
||||
${CMAKE_THREAD_LIBS_INIT}
|
||||
enet
|
||||
libdisplaydevice::display_device
|
||||
nlohmann_json::nlohmann_json
|
||||
opus
|
||||
${FFMPEG_LIBRARIES}
|
||||
${Boost_LIBRARIES}
|
||||
${OPENSSL_LIBRARIES}
|
||||
${CURL_LIBRARIES}
|
||||
${PLATFORM_LIBRARIES})
|
||||
|
||||
@@ -8,10 +8,6 @@ if(${SUNSHINE_BUILD_APPIMAGE})
|
||||
string(REPLACE "${CMAKE_INSTALL_PREFIX}" ".${CMAKE_INSTALL_PREFIX}" SUNSHINE_ASSETS_DIR_DEF ${SUNSHINE_ASSETS_DIR})
|
||||
endif()
|
||||
|
||||
if(NOT DEFINED SUNSHINE_EXECUTABLE_PATH)
|
||||
set(SUNSHINE_EXECUTABLE_PATH "sunshine")
|
||||
endif()
|
||||
|
||||
# cuda
|
||||
set(CUDA_FOUND OFF)
|
||||
if(${SUNSHINE_ENABLE_CUDA})
|
||||
@@ -28,57 +24,42 @@ if(${SUNSHINE_ENABLE_CUDA})
|
||||
# https://tech.amikelive.com/node-930/cuda-compatibility-of-nvidia-display-gpu-drivers/
|
||||
if(CMAKE_CUDA_COMPILER_VERSION VERSION_LESS 6.5)
|
||||
list(APPEND CMAKE_CUDA_ARCHITECTURES 10)
|
||||
# set(CUDA_NVCC_FLAGS "${CUDA_NVCC_FLAGS} -gencode arch=compute_10,code=sm_10")
|
||||
elseif(CMAKE_CUDA_COMPILER_VERSION VERSION_GREATER_EQUAL 6.5)
|
||||
list(APPEND CMAKE_CUDA_ARCHITECTURES 50 52)
|
||||
# set(CUDA_NVCC_FLAGS "${CUDA_NVCC_FLAGS} -gencode arch=compute_50,code=sm_50")
|
||||
# set(CUDA_NVCC_FLAGS "${CUDA_NVCC_FLAGS} -gencode arch=compute_52,code=sm_52")
|
||||
endif()
|
||||
|
||||
if(CMAKE_CUDA_COMPILER_VERSION VERSION_LESS 7.0)
|
||||
list(APPEND CMAKE_CUDA_ARCHITECTURES 11)
|
||||
# set(CUDA_NVCC_FLAGS "${CUDA_NVCC_FLAGS} -gencode arch=compute_11,code=sm_11")
|
||||
elseif(CMAKE_CUDA_COMPILER_VERSION VERSION_GREATER 7.6)
|
||||
list(APPEND CMAKE_CUDA_ARCHITECTURES 60 61 62)
|
||||
# set(CUDA_NVCC_FLAGS "${CUDA_NVCC_FLAGS} -gencode arch=compute_60,code=sm_60")
|
||||
# set(CUDA_NVCC_FLAGS "${CUDA_NVCC_FLAGS} -gencode arch=compute_61,code=sm_61")
|
||||
# set(CUDA_NVCC_FLAGS "${CUDA_NVCC_FLAGS} -gencode arch=compute_62,code=sm_62")
|
||||
endif()
|
||||
|
||||
# https://docs.nvidia.com/cuda/archive/9.2/cuda-compiler-driver-nvcc/index.html
|
||||
if(CMAKE_CUDA_COMPILER_VERSION VERSION_LESS 9.0)
|
||||
list(APPEND CMAKE_CUDA_ARCHITECTURES 20)
|
||||
# set(CUDA_NVCC_FLAGS "${CUDA_NVCC_FLAGS} -gencode arch=compute_20,code=sm_20")
|
||||
elseif(CMAKE_CUDA_COMPILER_VERSION VERSION_GREATER_EQUAL 9.0)
|
||||
list(APPEND CMAKE_CUDA_ARCHITECTURES 70)
|
||||
# set(CUDA_NVCC_FLAGS "${CUDA_NVCC_FLAGS} -gencode arch=compute_70,code=sm_70")
|
||||
endif()
|
||||
|
||||
# https://docs.nvidia.com/cuda/archive/10.0/cuda-compiler-driver-nvcc/index.html
|
||||
if(CMAKE_CUDA_COMPILER_VERSION VERSION_GREATER_EQUAL 10.0)
|
||||
list(APPEND CMAKE_CUDA_ARCHITECTURES 75)
|
||||
# set(CUDA_NVCC_FLAGS "${CUDA_NVCC_FLAGS} -gencode arch=compute_75,code=sm_75")
|
||||
list(APPEND CMAKE_CUDA_ARCHITECTURES 72 75)
|
||||
endif()
|
||||
|
||||
# https://docs.nvidia.com/cuda/archive/11.0/cuda-compiler-driver-nvcc/index.html
|
||||
if(CMAKE_CUDA_COMPILER_VERSION VERSION_LESS 11.0)
|
||||
list(APPEND CMAKE_CUDA_ARCHITECTURES 30)
|
||||
# set(CUDA_NVCC_FLAGS "${CUDA_NVCC_FLAGS} -gencode arch=compute_30,code=sm_30")
|
||||
elseif(CMAKE_CUDA_COMPILER_VERSION VERSION_GREATER_EQUAL 11.0)
|
||||
list(APPEND CMAKE_CUDA_ARCHITECTURES 80)
|
||||
# set(CUDA_NVCC_FLAGS "${CUDA_NVCC_FLAGS} -gencode arch=compute_80,code=sm_80")
|
||||
endif()
|
||||
|
||||
if(CMAKE_CUDA_COMPILER_VERSION VERSION_GREATER_EQUAL 11.1)
|
||||
list(APPEND CMAKE_CUDA_ARCHITECTURES 86)
|
||||
# set(CUDA_NVCC_FLAGS "${CUDA_NVCC_FLAGS} -gencode arch=compute_86,code=sm_86")
|
||||
endif()
|
||||
|
||||
# https://docs.nvidia.com/cuda/archive/11.8.0/cuda-compiler-driver-nvcc/index.html
|
||||
if(CMAKE_CUDA_COMPILER_VERSION VERSION_GREATER_EQUAL 11.8)
|
||||
list(APPEND CMAKE_CUDA_ARCHITECTURES 90)
|
||||
# set(CUDA_NVCC_FLAGS "${CUDA_NVCC_FLAGS} -gencode arch=compute_90,code=sm_90")
|
||||
list(APPEND CMAKE_CUDA_ARCHITECTURES 86 87 89 90)
|
||||
endif()
|
||||
|
||||
if(CMAKE_CUDA_COMPILER_VERSION VERSION_LESS 12.0)
|
||||
list(APPEND CMAKE_CUDA_ARCHITECTURES 35)
|
||||
# set(CUDA_NVCC_FLAGS "${CUDA_NVCC_FLAGS} -gencode arch=compute_35,code=sm_35")
|
||||
endif()
|
||||
|
||||
# sort the architectures
|
||||
@@ -86,22 +67,28 @@ if(${SUNSHINE_ENABLE_CUDA})
|
||||
|
||||
# message(STATUS "CUDA NVCC Flags: ${CUDA_NVCC_FLAGS}")
|
||||
message(STATUS "CUDA Architectures: ${CMAKE_CUDA_ARCHITECTURES}")
|
||||
elseif(${CUDA_FAIL_ON_MISSING})
|
||||
message(FATAL_ERROR
|
||||
"CUDA not found.
|
||||
If this is intentional, set '-DSUNSHINE_ENABLE_CUDA=OFF' or '-DCUDA_FAIL_ON_MISSING=OFF'"
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
if(CUDA_FOUND)
|
||||
include_directories(SYSTEM third-party/nvfbc)
|
||||
include_directories(SYSTEM "${CMAKE_SOURCE_DIR}/third-party/nvfbc")
|
||||
list(APPEND PLATFORM_TARGET_FILES
|
||||
src/platform/linux/cuda.cu
|
||||
src/platform/linux/cuda.cpp
|
||||
third-party/nvfbc/NvFBC.h)
|
||||
"${CMAKE_SOURCE_DIR}/src/platform/linux/cuda.h"
|
||||
"${CMAKE_SOURCE_DIR}/src/platform/linux/cuda.cu"
|
||||
"${CMAKE_SOURCE_DIR}/src/platform/linux/cuda.cpp"
|
||||
"${CMAKE_SOURCE_DIR}/third-party/nvfbc/NvFBC.h")
|
||||
|
||||
add_compile_definitions(SUNSHINE_BUILD_CUDA)
|
||||
endif()
|
||||
|
||||
# drm
|
||||
if(${SUNSHINE_ENABLE_DRM})
|
||||
find_package(LIBDRM)
|
||||
find_package(LIBCAP)
|
||||
find_package(LIBDRM REQUIRED)
|
||||
find_package(LIBCAP REQUIRED)
|
||||
else()
|
||||
set(LIBDRM_FOUND OFF)
|
||||
set(LIBCAP_FOUND OFF)
|
||||
@@ -110,25 +97,47 @@ if(LIBDRM_FOUND AND LIBCAP_FOUND)
|
||||
add_compile_definitions(SUNSHINE_BUILD_DRM)
|
||||
include_directories(SYSTEM ${LIBDRM_INCLUDE_DIRS} ${LIBCAP_INCLUDE_DIRS})
|
||||
list(APPEND PLATFORM_LIBRARIES ${LIBDRM_LIBRARIES} ${LIBCAP_LIBRARIES})
|
||||
list(APPEND PLATFORM_TARGET_FILES src/platform/linux/kmsgrab.cpp)
|
||||
list(APPEND PLATFORM_TARGET_FILES
|
||||
"${CMAKE_SOURCE_DIR}/src/platform/linux/kmsgrab.cpp")
|
||||
list(APPEND SUNSHINE_DEFINITIONS EGL_NO_X11=1)
|
||||
elseif(NOT LIBDRM_FOUND)
|
||||
message(WARNING "Missing libdrm")
|
||||
elseif(NOT LIBDRM_FOUND)
|
||||
message(WARNING "Missing libcap")
|
||||
endif()
|
||||
|
||||
# evdev
|
||||
include(dependencies/libevdev_Sunshine)
|
||||
|
||||
# vaapi
|
||||
if(${SUNSHINE_ENABLE_VAAPI})
|
||||
find_package(Libva REQUIRED)
|
||||
else()
|
||||
set(LIBVA_FOUND OFF)
|
||||
endif()
|
||||
if(LIBVA_FOUND)
|
||||
add_compile_definitions(SUNSHINE_BUILD_VAAPI)
|
||||
include_directories(SYSTEM ${LIBVA_INCLUDE_DIR})
|
||||
list(APPEND PLATFORM_LIBRARIES ${LIBVA_LIBRARIES} ${LIBVA_DRM_LIBRARIES})
|
||||
list(APPEND PLATFORM_TARGET_FILES
|
||||
"${CMAKE_SOURCE_DIR}/src/platform/linux/vaapi.h"
|
||||
"${CMAKE_SOURCE_DIR}/src/platform/linux/vaapi.cpp")
|
||||
endif()
|
||||
|
||||
# wayland
|
||||
if(${SUNSHINE_ENABLE_WAYLAND})
|
||||
find_package(Wayland)
|
||||
find_package(Wayland REQUIRED)
|
||||
else()
|
||||
set(WAYLAND_FOUND OFF)
|
||||
endif()
|
||||
if(WAYLAND_FOUND)
|
||||
add_compile_definitions(SUNSHINE_BUILD_WAYLAND)
|
||||
|
||||
GEN_WAYLAND("wayland-protocols" "unstable/xdg-output" xdg-output-unstable-v1)
|
||||
GEN_WAYLAND("wlr-protocols" "unstable" wlr-export-dmabuf-unstable-v1)
|
||||
if(NOT SUNSHINE_SYSTEM_WAYLAND_PROTOCOLS)
|
||||
set(WAYLAND_PROTOCOLS_DIR "${CMAKE_SOURCE_DIR}/third-party/wayland-protocols")
|
||||
else()
|
||||
pkg_get_variable(WAYLAND_PROTOCOLS_DIR wayland-protocols pkgdatadir)
|
||||
pkg_check_modules(WAYLAND_PROTOCOLS wayland-protocols REQUIRED)
|
||||
endif()
|
||||
|
||||
GEN_WAYLAND("${WAYLAND_PROTOCOLS_DIR}" "unstable/xdg-output" xdg-output-unstable-v1)
|
||||
GEN_WAYLAND("${CMAKE_SOURCE_DIR}/third-party/wlr-protocols" "unstable" wlr-export-dmabuf-unstable-v1)
|
||||
|
||||
include_directories(
|
||||
SYSTEM
|
||||
@@ -138,13 +147,14 @@ if(WAYLAND_FOUND)
|
||||
|
||||
list(APPEND PLATFORM_LIBRARIES ${WAYLAND_LIBRARIES})
|
||||
list(APPEND PLATFORM_TARGET_FILES
|
||||
src/platform/linux/wlgrab.cpp
|
||||
src/platform/linux/wayland.cpp)
|
||||
"${CMAKE_SOURCE_DIR}/src/platform/linux/wlgrab.cpp"
|
||||
"${CMAKE_SOURCE_DIR}/src/platform/linux/wayland.h"
|
||||
"${CMAKE_SOURCE_DIR}/src/platform/linux/wayland.cpp")
|
||||
endif()
|
||||
|
||||
# x11
|
||||
if(${SUNSHINE_ENABLE_X11})
|
||||
find_package(X11)
|
||||
find_package(X11 REQUIRED)
|
||||
else()
|
||||
set(X11_FOUND OFF)
|
||||
endif()
|
||||
@@ -152,76 +162,98 @@ if(X11_FOUND)
|
||||
add_compile_definitions(SUNSHINE_BUILD_X11)
|
||||
include_directories(SYSTEM ${X11_INCLUDE_DIR})
|
||||
list(APPEND PLATFORM_LIBRARIES ${X11_LIBRARIES})
|
||||
list(APPEND PLATFORM_TARGET_FILES src/platform/linux/x11grab.cpp)
|
||||
list(APPEND PLATFORM_TARGET_FILES
|
||||
"${CMAKE_SOURCE_DIR}/src/platform/linux/x11grab.h"
|
||||
"${CMAKE_SOURCE_DIR}/src/platform/linux/x11grab.cpp")
|
||||
endif()
|
||||
|
||||
if(NOT ${CUDA_FOUND} AND NOT ${WAYLAND_FOUND} AND NOT ${X11_FOUND} AND NOT (${LIBDRM_FOUND} AND ${LIBCAP_FOUND}))
|
||||
message(FATAL_ERROR "Couldn't find either x11, wayland, cuda or (libdrm and libcap)")
|
||||
if(NOT ${CUDA_FOUND}
|
||||
AND NOT ${WAYLAND_FOUND}
|
||||
AND NOT ${X11_FOUND}
|
||||
AND NOT (${LIBDRM_FOUND} AND ${LIBCAP_FOUND})
|
||||
AND NOT ${LIBVA_FOUND})
|
||||
message(FATAL_ERROR "Couldn't find either cuda, wayland, x11, (libdrm and libcap), or libva")
|
||||
endif()
|
||||
|
||||
# tray icon
|
||||
if(${SUNSHINE_ENABLE_TRAY})
|
||||
pkg_check_modules(APPINDICATOR appindicator3-0.1)
|
||||
pkg_check_modules(APPINDICATOR ayatana-appindicator3-0.1)
|
||||
if(APPINDICATOR_FOUND)
|
||||
list(APPEND SUNSHINE_DEFINITIONS TRAY_LEGACY_APPINDICATOR=1)
|
||||
list(APPEND SUNSHINE_DEFINITIONS TRAY_AYATANA_APPINDICATOR=1)
|
||||
else()
|
||||
pkg_check_modules(APPINDICATOR ayatana-appindicator3-0.1)
|
||||
pkg_check_modules(APPINDICATOR appindicator3-0.1)
|
||||
if(APPINDICATOR_FOUND)
|
||||
list(APPEND SUNSHINE_DEFINITIONS TRAY_AYATANA_APPINDICATOR=1)
|
||||
list(APPEND SUNSHINE_DEFINITIONS TRAY_LEGACY_APPINDICATOR=1)
|
||||
endif ()
|
||||
endif()
|
||||
pkg_check_modules(LIBNOTIFY libnotify)
|
||||
if(NOT APPINDICATOR_FOUND OR NOT LIBNOTIFY_FOUND)
|
||||
set(SUNSHINE_TRAY 0)
|
||||
message(WARNING "Missing appindicator or libnotify, disabling tray icon")
|
||||
message(STATUS "APPINDICATOR_FOUND: ${APPINDICATOR_FOUND}")
|
||||
message(STATUS "LIBNOTIFY_FOUND: ${LIBNOTIFY_FOUND}")
|
||||
message(FATAL_ERROR "Couldn't find either appindicator or libnotify")
|
||||
else()
|
||||
include_directories(SYSTEM ${APPINDICATOR_INCLUDE_DIRS} ${LIBNOTIFY_INCLUDE_DIRS})
|
||||
link_directories(${APPINDICATOR_LIBRARY_DIRS} ${LIBNOTIFY_LIBRARY_DIRS})
|
||||
|
||||
list(APPEND PLATFORM_TARGET_FILES third-party/tray/tray_linux.c)
|
||||
list(APPEND PLATFORM_TARGET_FILES "${CMAKE_SOURCE_DIR}/third-party/tray/src/tray_linux.c")
|
||||
list(APPEND SUNSHINE_EXTERNAL_LIBRARIES ${APPINDICATOR_LIBRARIES} ${LIBNOTIFY_LIBRARIES})
|
||||
endif()
|
||||
|
||||
# flatpak icons must be prefixed with the app id or they will not be included in the flatpak
|
||||
if(${SUNSHINE_BUILD_FLATPAK})
|
||||
set(SUNSHINE_TRAY_PREFIX "${PROJECT_FQDN}")
|
||||
else()
|
||||
set(SUNSHINE_TRAY_PREFIX "sunshine")
|
||||
endif()
|
||||
list(APPEND SUNSHINE_DEFINITIONS SUNSHINE_TRAY_PREFIX="${SUNSHINE_TRAY_PREFIX}")
|
||||
else()
|
||||
set(SUNSHINE_TRAY 0)
|
||||
message(STATUS "Tray icon disabled")
|
||||
endif()
|
||||
|
||||
if (${SUNSHINE_TRAY} EQUAL 0 AND SUNSHINE_REQUIRE_TRAY)
|
||||
message(FATAL_ERROR "Tray icon is required")
|
||||
# These need to be set before adding the inputtino subdirectory in order for them to be picked up
|
||||
set(LIBEVDEV_CUSTOM_INCLUDE_DIR "${EVDEV_INCLUDE_DIR}")
|
||||
set(LIBEVDEV_CUSTOM_LIBRARY "${EVDEV_LIBRARY}")
|
||||
|
||||
add_subdirectory("${CMAKE_SOURCE_DIR}/third-party/inputtino")
|
||||
list(APPEND SUNSHINE_EXTERNAL_LIBRARIES inputtino::libinputtino)
|
||||
file(GLOB_RECURSE INPUTTINO_SOURCES
|
||||
${CMAKE_SOURCE_DIR}/src/platform/linux/input/inputtino*.h
|
||||
${CMAKE_SOURCE_DIR}/src/platform/linux/input/inputtino*.cpp)
|
||||
list(APPEND PLATFORM_TARGET_FILES ${INPUTTINO_SOURCES})
|
||||
|
||||
# build libevdev before the libinputtino target
|
||||
if(EXTERNAL_PROJECT_LIBEVDEV_USED)
|
||||
add_dependencies(libinputtino libevdev)
|
||||
endif()
|
||||
|
||||
# AppImage and Flatpak
|
||||
if (${SUNSHINE_BUILD_APPIMAGE})
|
||||
list(APPEND SUNSHINE_DEFINITIONS SUNSHINE_BUILD_APPIMAGE=1)
|
||||
endif ()
|
||||
if (${SUNSHINE_BUILD_FLATPAK})
|
||||
list(APPEND SUNSHINE_DEFINITIONS SUNSHINE_BUILD_FLATPAK=1)
|
||||
endif ()
|
||||
|
||||
list(APPEND PLATFORM_TARGET_FILES
|
||||
src/platform/linux/publish.cpp
|
||||
src/platform/linux/vaapi.h
|
||||
src/platform/linux/vaapi.cpp
|
||||
src/platform/linux/cuda.h
|
||||
src/platform/linux/graphics.h
|
||||
src/platform/linux/graphics.cpp
|
||||
src/platform/linux/misc.h
|
||||
src/platform/linux/misc.cpp
|
||||
src/platform/linux/audio.cpp
|
||||
src/platform/linux/input.cpp
|
||||
src/platform/linux/x11grab.h
|
||||
src/platform/linux/wayland.h
|
||||
third-party/glad/src/egl.c
|
||||
third-party/glad/src/gl.c
|
||||
third-party/glad/include/EGL/eglplatform.h
|
||||
third-party/glad/include/KHR/khrplatform.h
|
||||
third-party/glad/include/glad/gl.h
|
||||
third-party/glad/include/glad/egl.h)
|
||||
"${CMAKE_SOURCE_DIR}/src/platform/linux/publish.cpp"
|
||||
"${CMAKE_SOURCE_DIR}/src/platform/linux/graphics.h"
|
||||
"${CMAKE_SOURCE_DIR}/src/platform/linux/graphics.cpp"
|
||||
"${CMAKE_SOURCE_DIR}/src/platform/linux/misc.h"
|
||||
"${CMAKE_SOURCE_DIR}/src/platform/linux/misc.cpp"
|
||||
"${CMAKE_SOURCE_DIR}/src/platform/linux/audio.cpp"
|
||||
"${CMAKE_SOURCE_DIR}/third-party/glad/src/egl.c"
|
||||
"${CMAKE_SOURCE_DIR}/third-party/glad/src/gl.c"
|
||||
"${CMAKE_SOURCE_DIR}/third-party/glad/include/EGL/eglplatform.h"
|
||||
"${CMAKE_SOURCE_DIR}/third-party/glad/include/KHR/khrplatform.h"
|
||||
"${CMAKE_SOURCE_DIR}/third-party/glad/include/glad/gl.h"
|
||||
"${CMAKE_SOURCE_DIR}/third-party/glad/include/glad/egl.h")
|
||||
|
||||
list(APPEND PLATFORM_LIBRARIES
|
||||
Boost::dynamic_linking
|
||||
dl
|
||||
evdev
|
||||
numa
|
||||
pulse
|
||||
pulse-simple)
|
||||
|
||||
include_directories(
|
||||
SYSTEM
|
||||
/usr/include/libevdev-1.0
|
||||
third-party/nv-codec-headers/include
|
||||
third-party/glad/include)
|
||||
"${CMAKE_SOURCE_DIR}/third-party/glad/include")
|
||||
|
||||
@@ -2,48 +2,56 @@
|
||||
|
||||
add_compile_definitions(SUNSHINE_PLATFORM="macos")
|
||||
|
||||
link_directories(/opt/local/lib)
|
||||
link_directories(/usr/local/lib)
|
||||
link_directories(/opt/homebrew/lib)
|
||||
ADD_DEFINITIONS(-DBOOST_LOG_DYN_LINK)
|
||||
set(MACOS_LINK_DIRECTORIES
|
||||
/opt/homebrew/lib
|
||||
/opt/local/lib
|
||||
/usr/local/lib)
|
||||
|
||||
foreach(dir ${MACOS_LINK_DIRECTORIES})
|
||||
if(EXISTS ${dir})
|
||||
link_directories(${dir})
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
if(NOT BOOST_USE_STATIC AND NOT FETCH_CONTENT_BOOST_USED)
|
||||
ADD_DEFINITIONS(-DBOOST_LOG_DYN_LINK)
|
||||
endif()
|
||||
|
||||
list(APPEND SUNSHINE_EXTERNAL_LIBRARIES
|
||||
${APP_KIT_LIBRARY}
|
||||
${APP_SERVICES_LIBRARY}
|
||||
${AV_FOUNDATION_LIBRARY}
|
||||
${CORE_MEDIA_LIBRARY}
|
||||
${CORE_VIDEO_LIBRARY}
|
||||
${VIDEO_TOOLBOX_LIBRARY}
|
||||
${FOUNDATION_LIBRARY})
|
||||
${FOUNDATION_LIBRARY}
|
||||
${VIDEO_TOOLBOX_LIBRARY})
|
||||
|
||||
set(PLATFORM_INCLUDE_DIRS
|
||||
${Boost_INCLUDE_DIR})
|
||||
|
||||
set(APPLE_PLIST_FILE ${SUNSHINE_SOURCE_ASSETS_DIR}/macos/assets/Info.plist)
|
||||
set(APPLE_PLIST_FILE "${SUNSHINE_SOURCE_ASSETS_DIR}/macos/assets/Info.plist")
|
||||
|
||||
# todo - tray is not working on macos
|
||||
set(SUNSHINE_TRAY 0)
|
||||
|
||||
set(PLATFORM_TARGET_FILES
|
||||
src/platform/macos/av_audio.h
|
||||
src/platform/macos/av_audio.m
|
||||
src/platform/macos/av_img_t.h
|
||||
src/platform/macos/av_video.h
|
||||
src/platform/macos/av_video.m
|
||||
src/platform/macos/display.mm
|
||||
src/platform/macos/input.cpp
|
||||
src/platform/macos/microphone.mm
|
||||
src/platform/macos/misc.mm
|
||||
src/platform/macos/misc.h
|
||||
src/platform/macos/nv12_zero_device.cpp
|
||||
src/platform/macos/nv12_zero_device.h
|
||||
src/platform/macos/publish.cpp
|
||||
third-party/TPCircularBuffer/TPCircularBuffer.c
|
||||
third-party/TPCircularBuffer/TPCircularBuffer.h
|
||||
"${CMAKE_SOURCE_DIR}/src/platform/macos/av_audio.h"
|
||||
"${CMAKE_SOURCE_DIR}/src/platform/macos/av_audio.m"
|
||||
"${CMAKE_SOURCE_DIR}/src/platform/macos/av_img_t.h"
|
||||
"${CMAKE_SOURCE_DIR}/src/platform/macos/av_video.h"
|
||||
"${CMAKE_SOURCE_DIR}/src/platform/macos/av_video.m"
|
||||
"${CMAKE_SOURCE_DIR}/src/platform/macos/display.mm"
|
||||
"${CMAKE_SOURCE_DIR}/src/platform/macos/input.cpp"
|
||||
"${CMAKE_SOURCE_DIR}/src/platform/macos/microphone.mm"
|
||||
"${CMAKE_SOURCE_DIR}/src/platform/macos/misc.mm"
|
||||
"${CMAKE_SOURCE_DIR}/src/platform/macos/misc.h"
|
||||
"${CMAKE_SOURCE_DIR}/src/platform/macos/nv12_zero_device.cpp"
|
||||
"${CMAKE_SOURCE_DIR}/src/platform/macos/nv12_zero_device.h"
|
||||
"${CMAKE_SOURCE_DIR}/src/platform/macos/publish.cpp"
|
||||
"${CMAKE_SOURCE_DIR}/third-party/TPCircularBuffer/TPCircularBuffer.c"
|
||||
"${CMAKE_SOURCE_DIR}/third-party/TPCircularBuffer/TPCircularBuffer.h"
|
||||
${APPLE_PLIST_FILE})
|
||||
|
||||
if(SUNSHINE_ENABLE_TRAY)
|
||||
list(APPEND SUNSHINE_EXTERNAL_LIBRARIES
|
||||
${COCOA})
|
||||
list(APPEND PLATFORM_TARGET_FILES
|
||||
third-party/tray/tray_darwin.m)
|
||||
"${CMAKE_SOURCE_DIR}/third-party/tray/src/tray_darwin.m")
|
||||
endif()
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
# unix specific compile definitions
|
||||
# put anything here that applies to both linux and macos
|
||||
|
||||
list(APPEND SUNSHINE_EXTERNAL_LIBRARIES Boost::log)
|
||||
list(APPEND SUNSHINE_EXTERNAL_LIBRARIES
|
||||
${CURL_LIBRARIES})
|
||||
|
||||
# add install prefix to assets path if not already there
|
||||
if(NOT SUNSHINE_ASSETS_DIR MATCHES "^${CMAKE_INSTALL_PREFIX}")
|
||||
|
||||
@@ -6,51 +6,57 @@ enable_language(RC)
|
||||
set(CMAKE_RC_COMPILER windres)
|
||||
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -static")
|
||||
|
||||
# gcc complains about misleading indentation in some mingw includes
|
||||
list(APPEND SUNSHINE_COMPILE_OPTIONS -Wno-misleading-indentation)
|
||||
|
||||
# see gcc bug 98723
|
||||
add_definitions(-DUSE_BOOST_REGEX)
|
||||
|
||||
# curl
|
||||
add_definitions(-DCURL_STATICLIB)
|
||||
include_directories(SYSTEM ${CURL_STATIC_INCLUDE_DIRS})
|
||||
link_directories(${CURL_STATIC_LIBRARY_DIRS})
|
||||
|
||||
# miniupnpc
|
||||
add_definitions(-DMINIUPNP_STATICLIB)
|
||||
|
||||
# extra tools/binaries for audio/display devices
|
||||
add_subdirectory(tools) # todo - this is temporary, only tools for Windows are needed, for now
|
||||
|
||||
# nvidia
|
||||
include_directories(SYSTEM third-party/nvapi-open-source-sdk)
|
||||
include_directories(SYSTEM "${CMAKE_SOURCE_DIR}/third-party/nvapi-open-source-sdk")
|
||||
file(GLOB NVPREFS_FILES CONFIGURE_DEPENDS
|
||||
"third-party/nvapi-open-source-sdk/*.h"
|
||||
"src/platform/windows/nvprefs/*.cpp"
|
||||
"src/platform/windows/nvprefs/*.h")
|
||||
"${CMAKE_SOURCE_DIR}/third-party/nvapi-open-source-sdk/*.h"
|
||||
"${CMAKE_SOURCE_DIR}/src/platform/windows/nvprefs/*.cpp"
|
||||
"${CMAKE_SOURCE_DIR}/src/platform/windows/nvprefs/*.h")
|
||||
|
||||
# vigem
|
||||
include_directories(SYSTEM third-party/ViGEmClient/include)
|
||||
set_source_files_properties(third-party/ViGEmClient/src/ViGEmClient.cpp
|
||||
PROPERTIES COMPILE_DEFINITIONS "UNICODE=1;ERROR_INVALID_DEVICE_OBJECT_PARAMETER=650")
|
||||
set_source_files_properties(third-party/ViGEmClient/src/ViGEmClient.cpp
|
||||
PROPERTIES COMPILE_FLAGS "-Wno-unknown-pragmas -Wno-misleading-indentation -Wno-class-memaccess")
|
||||
include_directories(SYSTEM "${CMAKE_SOURCE_DIR}/third-party/ViGEmClient/include")
|
||||
|
||||
# sunshine icon
|
||||
if(NOT DEFINED SUNSHINE_ICON_PATH)
|
||||
set(SUNSHINE_ICON_PATH "${CMAKE_CURRENT_SOURCE_DIR}/sunshine.ico")
|
||||
set(SUNSHINE_ICON_PATH "${CMAKE_SOURCE_DIR}/sunshine.ico")
|
||||
endif()
|
||||
|
||||
configure_file(src/platform/windows/windows.rs.in windows.rc @ONLY)
|
||||
configure_file("${CMAKE_SOURCE_DIR}/src/platform/windows/windows.rs.in" windows.rc @ONLY)
|
||||
|
||||
set(PLATFORM_TARGET_FILES
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/windows.rc"
|
||||
src/platform/windows/publish.cpp
|
||||
src/platform/windows/misc.h
|
||||
src/platform/windows/misc.cpp
|
||||
src/platform/windows/input.cpp
|
||||
src/platform/windows/display.h
|
||||
src/platform/windows/display_base.cpp
|
||||
src/platform/windows/display_vram.cpp
|
||||
src/platform/windows/display_ram.cpp
|
||||
src/platform/windows/audio.cpp
|
||||
third-party/ViGEmClient/src/ViGEmClient.cpp
|
||||
third-party/ViGEmClient/include/ViGEm/Client.h
|
||||
third-party/ViGEmClient/include/ViGEm/Common.h
|
||||
third-party/ViGEmClient/include/ViGEm/Util.h
|
||||
third-party/ViGEmClient/include/ViGEm/km/BusShared.h
|
||||
"${CMAKE_SOURCE_DIR}/src/platform/windows/publish.cpp"
|
||||
"${CMAKE_SOURCE_DIR}/src/platform/windows/misc.h"
|
||||
"${CMAKE_SOURCE_DIR}/src/platform/windows/misc.cpp"
|
||||
"${CMAKE_SOURCE_DIR}/src/platform/windows/input.cpp"
|
||||
"${CMAKE_SOURCE_DIR}/src/platform/windows/display.h"
|
||||
"${CMAKE_SOURCE_DIR}/src/platform/windows/display_base.cpp"
|
||||
"${CMAKE_SOURCE_DIR}/src/platform/windows/display_vram.cpp"
|
||||
"${CMAKE_SOURCE_DIR}/src/platform/windows/display_ram.cpp"
|
||||
"${CMAKE_SOURCE_DIR}/src/platform/windows/display_wgc.cpp"
|
||||
"${CMAKE_SOURCE_DIR}/src/platform/windows/audio.cpp"
|
||||
"${CMAKE_SOURCE_DIR}/third-party/ViGEmClient/src/ViGEmClient.cpp"
|
||||
"${CMAKE_SOURCE_DIR}/third-party/ViGEmClient/include/ViGEm/Client.h"
|
||||
"${CMAKE_SOURCE_DIR}/third-party/ViGEmClient/include/ViGEm/Common.h"
|
||||
"${CMAKE_SOURCE_DIR}/third-party/ViGEmClient/include/ViGEm/Util.h"
|
||||
"${CMAKE_SOURCE_DIR}/third-party/ViGEmClient/include/ViGEm/km/BusShared.h"
|
||||
${NVPREFS_FILES})
|
||||
|
||||
set(OPENSSL_LIBRARIES
|
||||
@@ -58,21 +64,28 @@ set(OPENSSL_LIBRARIES
|
||||
libcrypto.a)
|
||||
|
||||
list(PREPEND PLATFORM_LIBRARIES
|
||||
${CURL_STATIC_LIBRARIES}
|
||||
avrt
|
||||
d3d11
|
||||
D3DCompiler
|
||||
dwmapi
|
||||
dxgi
|
||||
iphlpapi
|
||||
ksuser
|
||||
libssp.a
|
||||
libstdc++.a
|
||||
libwinpthread.a
|
||||
libssp.a
|
||||
ksuser
|
||||
wsock32
|
||||
ws2_32
|
||||
d3d11 dxgi D3DCompiler
|
||||
minhook::minhook
|
||||
ntdll
|
||||
setupapi
|
||||
dwmapi
|
||||
userenv
|
||||
shlwapi
|
||||
synchronization.lib
|
||||
avrt
|
||||
${CURL_STATIC_LIBRARIES})
|
||||
userenv
|
||||
ws2_32
|
||||
wsock32
|
||||
)
|
||||
|
||||
if(SUNSHINE_ENABLE_TRAY)
|
||||
list(APPEND PLATFORM_TARGET_FILES
|
||||
third-party/tray/tray_windows.c)
|
||||
"${CMAKE_SOURCE_DIR}/third-party/tray/src/tray_windows.c")
|
||||
endif()
|
||||
|
||||
89
cmake/dependencies/Boost_Sunshine.cmake
Normal file
89
cmake/dependencies/Boost_Sunshine.cmake
Normal file
@@ -0,0 +1,89 @@
|
||||
#
|
||||
# Loads the boost library giving the priority to the system package first, with a fallback to FetchContent.
|
||||
#
|
||||
include_guard(GLOBAL)
|
||||
|
||||
set(BOOST_VERSION 1.86)
|
||||
set(BOOST_COMPONENTS
|
||||
filesystem
|
||||
locale
|
||||
log
|
||||
program_options
|
||||
system) # system is not used by Sunshine, but by Simple-Web-Server, added here for convenience
|
||||
|
||||
if(BOOST_USE_STATIC)
|
||||
set(Boost_USE_STATIC_LIBS ON) # cmake-lint: disable=C0103
|
||||
endif()
|
||||
|
||||
find_package(Boost CONFIG ${BOOST_VERSION} COMPONENTS ${BOOST_COMPONENTS})
|
||||
if(NOT Boost_FOUND)
|
||||
message(STATUS "Boost v${BOOST_VERSION}.x package not found in the system. Falling back to FetchContent.")
|
||||
include(FetchContent)
|
||||
|
||||
# Avoid warning about DOWNLOAD_EXTRACT_TIMESTAMP in CMake 3.24:
|
||||
if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.24.0")
|
||||
cmake_policy(SET CMP0135 NEW)
|
||||
endif()
|
||||
|
||||
# more components required for compiling boost targets
|
||||
list(APPEND BOOST_COMPONENTS
|
||||
asio
|
||||
crc
|
||||
format
|
||||
process
|
||||
property_tree)
|
||||
|
||||
set(BOOST_ENABLE_CMAKE ON)
|
||||
|
||||
# Limit boost to the required libraries only
|
||||
set(BOOST_INCLUDE_LIBRARIES
|
||||
${BOOST_COMPONENTS})
|
||||
set(BOOST_URL
|
||||
"https://github.com/boostorg/boost/releases/download/boost-1.86.0/boost-1.86.0-cmake.tar.xz")
|
||||
set(BOOST_HASH
|
||||
"MD5=D02759931CEDC02ADED80402906C5EB6")
|
||||
|
||||
if(CMAKE_VERSION VERSION_LESS "3.24.0")
|
||||
FetchContent_Declare(
|
||||
Boost
|
||||
URL ${BOOST_URL}
|
||||
URL_HASH ${BOOST_HASH}
|
||||
)
|
||||
elseif(APPLE AND CMAKE_VERSION VERSION_GREATER_EQUAL "3.25.0")
|
||||
# add SYSTEM to FetchContent_Declare, this fails on debian bookworm
|
||||
FetchContent_Declare(
|
||||
Boost
|
||||
URL ${BOOST_URL}
|
||||
URL_HASH ${BOOST_HASH}
|
||||
SYSTEM # requires CMake 3.25+
|
||||
OVERRIDE_FIND_PACKAGE # requires CMake 3.24+, but we have a macro to handle it for other versions
|
||||
)
|
||||
elseif(CMAKE_VERSION VERSION_GREATER_EQUAL "3.24.0")
|
||||
FetchContent_Declare(
|
||||
Boost
|
||||
URL ${BOOST_URL}
|
||||
URL_HASH ${BOOST_HASH}
|
||||
OVERRIDE_FIND_PACKAGE # requires CMake 3.24+, but we have a macro to handle it for other versions
|
||||
)
|
||||
endif()
|
||||
|
||||
FetchContent_MakeAvailable(Boost)
|
||||
set(FETCH_CONTENT_BOOST_USED TRUE)
|
||||
|
||||
set(Boost_FOUND TRUE) # cmake-lint: disable=C0103
|
||||
set(Boost_INCLUDE_DIRS # cmake-lint: disable=C0103
|
||||
"$<BUILD_INTERFACE:${Boost_SOURCE_DIR}/libs/headers/include>;$<INSTALL_INTERFACE:include/boost-1_85>")
|
||||
|
||||
if(WIN32)
|
||||
# Windows build is failing to create .h file in this directory
|
||||
file(MAKE_DIRECTORY ${Boost_BINARY_DIR}/libs/log/src/windows)
|
||||
endif()
|
||||
|
||||
set(Boost_LIBRARIES "") # cmake-lint: disable=C0103
|
||||
foreach(component ${BOOST_COMPONENTS})
|
||||
list(APPEND Boost_LIBRARIES "Boost::${component}")
|
||||
endforeach()
|
||||
endif()
|
||||
|
||||
message(STATUS "Boost include dirs: ${Boost_INCLUDE_DIRS}")
|
||||
message(STATUS "Boost libraries: ${Boost_LIBRARIES}")
|
||||
@@ -1,86 +1,85 @@
|
||||
# load common dependencies
|
||||
# this file will also load platform specific dependencies
|
||||
|
||||
# boost, this should be before Simple-Web-Server as it also depends on boost
|
||||
include(dependencies/Boost_Sunshine)
|
||||
|
||||
# submodules
|
||||
# moonlight common library
|
||||
set(ENET_NO_INSTALL ON CACHE BOOL "Don't install any libraries build for enet")
|
||||
add_subdirectory(third-party/moonlight-common-c/enet)
|
||||
set(ENET_NO_INSTALL ON CACHE BOOL "Don't install any libraries built for enet")
|
||||
add_subdirectory("${CMAKE_SOURCE_DIR}/third-party/moonlight-common-c/enet")
|
||||
|
||||
# web server
|
||||
add_subdirectory(third-party/Simple-Web-Server)
|
||||
add_subdirectory("${CMAKE_SOURCE_DIR}/third-party/Simple-Web-Server")
|
||||
|
||||
# miniupnp
|
||||
set(UPNPC_BUILD_SHARED OFF CACHE BOOL "No shared libraries")
|
||||
set(UPNPC_BUILD_TESTS OFF CACHE BOOL "Don't build tests for miniupnpc")
|
||||
set(UPNPC_BUILD_SAMPLE OFF CACHE BOOL "Don't build samples for miniupnpc")
|
||||
set(UPNPC_NO_INSTALL ON CACHE BOOL "Don't install any libraries build for miniupnpc")
|
||||
add_subdirectory(third-party/miniupnp/miniupnpc)
|
||||
include_directories(SYSTEM third-party/miniupnp/miniupnpc/include)
|
||||
|
||||
# ffmpeg pre-compiled binaries
|
||||
if(WIN32)
|
||||
if(NOT CMAKE_SYSTEM_PROCESSOR STREQUAL "AMD64")
|
||||
message(FATAL_ERROR "Unsupported system processor:" ${CMAKE_SYSTEM_PROCESSOR})
|
||||
endif()
|
||||
set(FFMPEG_PLATFORM_LIBRARIES mfplat ole32 strmiids mfuuid vpl)
|
||||
set(FFMPEG_PREPARED_BINARIES "${CMAKE_CURRENT_SOURCE_DIR}/third-party/ffmpeg-windows-x86_64")
|
||||
elseif(APPLE)
|
||||
if(CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64")
|
||||
set(FFMPEG_PREPARED_BINARIES "${CMAKE_CURRENT_SOURCE_DIR}/third-party/ffmpeg-macos-x86_64")
|
||||
elseif(CMAKE_SYSTEM_PROCESSOR STREQUAL "arm64")
|
||||
set(FFMPEG_PREPARED_BINARIES "${CMAKE_CURRENT_SOURCE_DIR}/third-party/ffmpeg-macos-aarch64")
|
||||
elseif(CMAKE_SYSTEM_PROCESSOR STREQUAL "powerpc")
|
||||
message(FATAL_ERROR "PowerPC is not supported on macOS")
|
||||
else()
|
||||
message(FATAL_ERROR "Unsupported system processor:" ${CMAKE_SYSTEM_PROCESSOR})
|
||||
endif()
|
||||
elseif(UNIX)
|
||||
set(FFMPEG_PLATFORM_LIBRARIES va va-drm va-x11 vdpau X11)
|
||||
if(CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64")
|
||||
list(APPEND FFMPEG_PLATFORM_LIBRARIES mfx)
|
||||
set(FFMPEG_PREPARED_BINARIES "${CMAKE_CURRENT_SOURCE_DIR}/third-party/ffmpeg-linux-x86_64")
|
||||
set(CPACK_DEB_PLATFORM_PACKAGE_DEPENDS "libmfx1,")
|
||||
set(CPACK_RPM_PLATFORM_PACKAGE_REQUIRES "intel-mediasdk >= 22.3.0,")
|
||||
elseif(CMAKE_SYSTEM_PROCESSOR STREQUAL "aarch64")
|
||||
set(FFMPEG_PREPARED_BINARIES "${CMAKE_CURRENT_SOURCE_DIR}/third-party/ffmpeg-linux-aarch64")
|
||||
elseif(CMAKE_SYSTEM_PROCESSOR STREQUAL "ppc64le" OR CMAKE_SYSTEM_PROCESSOR STREQUAL "ppc64")
|
||||
set(FFMPEG_PREPARED_BINARIES "${CMAKE_CURRENT_SOURCE_DIR}/third-party/ffmpeg-linux-powerpc64le")
|
||||
else()
|
||||
message(FATAL_ERROR "Unsupported system processor:" ${CMAKE_SYSTEM_PROCESSOR})
|
||||
endif()
|
||||
endif()
|
||||
set(FFMPEG_INCLUDE_DIRS
|
||||
${FFMPEG_PREPARED_BINARIES}/include)
|
||||
if(EXISTS ${FFMPEG_PREPARED_BINARIES}/lib/libhdr10plus.a)
|
||||
set(HDR10_PLUS_LIBRARY
|
||||
${FFMPEG_PREPARED_BINARIES}/lib/libhdr10plus.a)
|
||||
endif()
|
||||
set(FFMPEG_LIBRARIES
|
||||
${FFMPEG_PREPARED_BINARIES}/lib/libavcodec.a
|
||||
${FFMPEG_PREPARED_BINARIES}/lib/libavutil.a
|
||||
${FFMPEG_PREPARED_BINARIES}/lib/libcbs.a
|
||||
${FFMPEG_PREPARED_BINARIES}/lib/libSvtAv1Enc.a
|
||||
${FFMPEG_PREPARED_BINARIES}/lib/libswscale.a
|
||||
${FFMPEG_PREPARED_BINARIES}/lib/libx264.a
|
||||
${FFMPEG_PREPARED_BINARIES}/lib/libx265.a
|
||||
${HDR10_PLUS_LIBRARY}
|
||||
${FFMPEG_PLATFORM_LIBRARIES})
|
||||
# libdisplaydevice
|
||||
add_subdirectory("${CMAKE_SOURCE_DIR}/third-party/libdisplaydevice")
|
||||
|
||||
# common dependencies
|
||||
include("${CMAKE_MODULE_PATH}/dependencies/nlohmann_json.cmake")
|
||||
find_package(OpenSSL REQUIRED)
|
||||
find_package(PkgConfig REQUIRED)
|
||||
find_package(Threads REQUIRED)
|
||||
pkg_check_modules(CURL REQUIRED libcurl)
|
||||
|
||||
# miniupnp
|
||||
pkg_check_modules(MINIUPNP miniupnpc REQUIRED)
|
||||
include_directories(SYSTEM ${MINIUPNP_INCLUDE_DIRS})
|
||||
|
||||
# ffmpeg pre-compiled binaries
|
||||
if(NOT DEFINED FFMPEG_PREPARED_BINARIES)
|
||||
if(WIN32)
|
||||
set(FFMPEG_PLATFORM_LIBRARIES mfplat ole32 strmiids mfuuid vpl)
|
||||
elseif(UNIX AND NOT APPLE)
|
||||
set(FFMPEG_PLATFORM_LIBRARIES numa va va-drm va-x11 X11)
|
||||
endif()
|
||||
set(FFMPEG_PREPARED_BINARIES
|
||||
"${CMAKE_SOURCE_DIR}/third-party/build-deps/dist/${CMAKE_SYSTEM_NAME}-${CMAKE_SYSTEM_PROCESSOR}")
|
||||
|
||||
# check if the directory exists
|
||||
if(NOT EXISTS "${FFMPEG_PREPARED_BINARIES}")
|
||||
message(FATAL_ERROR
|
||||
"FFmpeg pre-compiled binaries not found at ${FFMPEG_PREPARED_BINARIES}. \
|
||||
Please consider contributing to the LizardByte/build-deps repository. \
|
||||
Optionally, you can use the FFMPEG_PREPARED_BINARIES option to specify the path to the \
|
||||
system-installed FFmpeg libraries")
|
||||
endif()
|
||||
|
||||
if(EXISTS "${FFMPEG_PREPARED_BINARIES}/lib/libhdr10plus.a")
|
||||
set(HDR10_PLUS_LIBRARY
|
||||
"${FFMPEG_PREPARED_BINARIES}/lib/libhdr10plus.a")
|
||||
endif()
|
||||
set(FFMPEG_LIBRARIES
|
||||
"${FFMPEG_PREPARED_BINARIES}/lib/libavcodec.a"
|
||||
"${FFMPEG_PREPARED_BINARIES}/lib/libavutil.a"
|
||||
"${FFMPEG_PREPARED_BINARIES}/lib/libcbs.a"
|
||||
"${FFMPEG_PREPARED_BINARIES}/lib/libSvtAv1Enc.a"
|
||||
"${FFMPEG_PREPARED_BINARIES}/lib/libswscale.a"
|
||||
"${FFMPEG_PREPARED_BINARIES}/lib/libx264.a"
|
||||
"${FFMPEG_PREPARED_BINARIES}/lib/libx265.a"
|
||||
${HDR10_PLUS_LIBRARY}
|
||||
${FFMPEG_PLATFORM_LIBRARIES})
|
||||
else()
|
||||
set(FFMPEG_LIBRARIES
|
||||
"${FFMPEG_PREPARED_BINARIES}/lib/libavcodec.a"
|
||||
"${FFMPEG_PREPARED_BINARIES}/lib/libavutil.a"
|
||||
"${FFMPEG_PREPARED_BINARIES}/lib/libcbs.a"
|
||||
"${FFMPEG_PREPARED_BINARIES}/lib/libswscale.a"
|
||||
${FFMPEG_PLATFORM_LIBRARIES})
|
||||
endif()
|
||||
|
||||
set(FFMPEG_INCLUDE_DIRS
|
||||
"${FFMPEG_PREPARED_BINARIES}/include")
|
||||
|
||||
# platform specific dependencies
|
||||
if(WIN32)
|
||||
include(${CMAKE_MODULE_PATH}/dependencies/windows.cmake)
|
||||
include("${CMAKE_MODULE_PATH}/dependencies/windows.cmake")
|
||||
elseif(UNIX)
|
||||
include(${CMAKE_MODULE_PATH}/dependencies/unix.cmake)
|
||||
include("${CMAKE_MODULE_PATH}/dependencies/unix.cmake")
|
||||
|
||||
if(APPLE)
|
||||
include(${CMAKE_MODULE_PATH}/dependencies/macos.cmake)
|
||||
include("${CMAKE_MODULE_PATH}/dependencies/macos.cmake")
|
||||
else()
|
||||
include(${CMAKE_MODULE_PATH}/dependencies/linux.cmake)
|
||||
include("${CMAKE_MODULE_PATH}/dependencies/linux.cmake")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
47
cmake/dependencies/libevdev_Sunshine.cmake
Normal file
47
cmake/dependencies/libevdev_Sunshine.cmake
Normal file
@@ -0,0 +1,47 @@
|
||||
#
|
||||
# Loads the libevdev library giving the priority to the system package first, with a fallback to ExternalProject
|
||||
#
|
||||
include_guard(GLOBAL)
|
||||
|
||||
set(LIBEVDEV_VERSION libevdev-1.13.2)
|
||||
|
||||
pkg_check_modules(PC_EVDEV libevdev)
|
||||
if(PC_EVDEV_FOUND)
|
||||
find_path(EVDEV_INCLUDE_DIR libevdev/libevdev.h
|
||||
HINTS ${PC_EVDEV_INCLUDE_DIRS} ${PC_EVDEV_INCLUDEDIR})
|
||||
find_library(EVDEV_LIBRARY
|
||||
NAMES evdev libevdev)
|
||||
else()
|
||||
include(ExternalProject)
|
||||
|
||||
ExternalProject_Add(libevdev
|
||||
URL http://www.freedesktop.org/software/libevdev/${LIBEVDEV_VERSION}.tar.xz
|
||||
PREFIX ${LIBEVDEV_VERSION}
|
||||
CONFIGURE_COMMAND <SOURCE_DIR>/configure --prefix=<INSTALL_DIR>
|
||||
BUILD_COMMAND "make"
|
||||
INSTALL_COMMAND ""
|
||||
)
|
||||
|
||||
ExternalProject_Get_Property(libevdev SOURCE_DIR)
|
||||
message(STATUS "libevdev source dir: ${SOURCE_DIR}")
|
||||
set(EVDEV_INCLUDE_DIR "${SOURCE_DIR}")
|
||||
|
||||
ExternalProject_Get_Property(libevdev BINARY_DIR)
|
||||
message(STATUS "libevdev binary dir: ${BINARY_DIR}")
|
||||
set(EVDEV_LIBRARY "${BINARY_DIR}/libevdev/.libs/libevdev.a")
|
||||
|
||||
# compile libevdev before sunshine
|
||||
set(SUNSHINE_TARGET_DEPENDENCIES ${SUNSHINE_TARGET_DEPENDENCIES} libevdev)
|
||||
|
||||
set(EXTERNAL_PROJECT_LIBEVDEV_USED TRUE)
|
||||
endif()
|
||||
|
||||
if(EVDEV_INCLUDE_DIR AND EVDEV_LIBRARY)
|
||||
message(STATUS "Found libevdev library: ${EVDEV_LIBRARY}")
|
||||
message(STATUS "Found libevdev include directory: ${EVDEV_INCLUDE_DIR}")
|
||||
|
||||
include_directories(SYSTEM ${EVDEV_INCLUDE_DIR})
|
||||
list(APPEND PLATFORM_LIBRARIES ${EVDEV_LIBRARY})
|
||||
else()
|
||||
message(FATAL_ERROR "Couldn't find or fetch libevdev")
|
||||
endif()
|
||||
@@ -1,5 +1,6 @@
|
||||
# macos specific dependencies
|
||||
|
||||
FIND_LIBRARY(APP_KIT_LIBRARY AppKit)
|
||||
FIND_LIBRARY(APP_SERVICES_LIBRARY ApplicationServices)
|
||||
FIND_LIBRARY(AV_FOUNDATION_LIBRARY AVFoundation)
|
||||
FIND_LIBRARY(CORE_MEDIA_LIBRARY CoreMedia)
|
||||
|
||||
18
cmake/dependencies/nlohmann_json.cmake
Normal file
18
cmake/dependencies/nlohmann_json.cmake
Normal file
@@ -0,0 +1,18 @@
|
||||
#
|
||||
# Loads the nlohmann_json library giving the priority to the system package first, with a fallback to FetchContent.
|
||||
#
|
||||
include_guard(GLOBAL)
|
||||
|
||||
find_package(nlohmann_json 3.11 QUIET GLOBAL)
|
||||
if(NOT nlohmann_json_FOUND)
|
||||
message(STATUS "nlohmann_json v3.11.x package not found in the system. Falling back to FetchContent.")
|
||||
include(FetchContent)
|
||||
|
||||
FetchContent_Declare(
|
||||
json
|
||||
URL https://github.com/nlohmann/json/releases/download/v3.11.3/json.tar.xz
|
||||
URL_HASH MD5=c23a33f04786d85c29fda8d16b5f0efd
|
||||
DOWNLOAD_EXTRACT_TIMESTAMP
|
||||
)
|
||||
FetchContent_MakeAvailable(json)
|
||||
endif()
|
||||
@@ -1,4 +1,2 @@
|
||||
# unix specific dependencies
|
||||
# put anything here that applies to both linux and macos
|
||||
|
||||
find_package(Boost COMPONENTS locale log filesystem program_options REQUIRED)
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
# windows specific dependencies
|
||||
|
||||
set(Boost_USE_STATIC_LIBS ON) # cmake-lint: disable=C0103
|
||||
# Boost >= 1.82.0 is required for boost::json::value::set_at_pointer() support
|
||||
# todo - are we actually using json? I think this was attempted to be used in a PR, but we ended up not using json
|
||||
find_package(Boost 1.82.0 COMPONENTS locale log filesystem program_options json REQUIRED)
|
||||
# Make sure MinHook is installed
|
||||
find_library(MINHOOK_LIBRARY libMinHook.a REQUIRED)
|
||||
find_path(MINHOOK_INCLUDE_DIR MinHook.h PATH_SUFFIXES include REQUIRED)
|
||||
|
||||
add_library(minhook::minhook STATIC IMPORTED)
|
||||
set_property(TARGET minhook::minhook PROPERTY IMPORTED_LOCATION ${MINHOOK_LIBRARY})
|
||||
target_include_directories(minhook::minhook INTERFACE ${MINHOOK_INCLUDE_DIR})
|
||||
|
||||
@@ -13,3 +13,17 @@ elseif(UNIX)
|
||||
include(${CMAKE_MODULE_PATH}/macros/linux.cmake)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# override find_package function
|
||||
macro(find_package) # cmake-lint: disable=C0103
|
||||
string(TOLOWER "${ARGV0}" ARGV0_LOWER)
|
||||
if(
|
||||
(("${ARGV0_LOWER}" STREQUAL "boost") AND DEFINED FETCH_CONTENT_BOOST_USED) OR
|
||||
(("${ARGV0_LOWER}" STREQUAL "libevdev") AND DEFINED EXTERNAL_PROJECT_LIBEVDEV_USED)
|
||||
)
|
||||
# Do nothing, as the package has already been fetched
|
||||
else()
|
||||
# Call the original find_package function
|
||||
_find_package(${ARGV})
|
||||
endif()
|
||||
endmacro()
|
||||
|
||||
@@ -5,17 +5,17 @@ macro(GEN_WAYLAND wayland_directory subdirectory filename)
|
||||
file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/generated-src)
|
||||
|
||||
message("wayland-scanner private-code \
|
||||
${CMAKE_SOURCE_DIR}/third-party/${wayland_directory}/${subdirectory}/${filename}.xml \
|
||||
${wayland_directory}/${subdirectory}/${filename}.xml \
|
||||
${CMAKE_BINARY_DIR}/generated-src/${filename}.c")
|
||||
message("wayland-scanner client-header \
|
||||
${CMAKE_SOURCE_DIR}/third-party/${wayland_directory}/${subdirectory}/${filename}.xml \
|
||||
${wayland_directory}/${subdirectory}/${filename}.xml \
|
||||
${CMAKE_BINARY_DIR}/generated-src/${filename}.h")
|
||||
execute_process(
|
||||
COMMAND wayland-scanner private-code
|
||||
${CMAKE_SOURCE_DIR}/third-party/${wayland_directory}/${subdirectory}/${filename}.xml
|
||||
${wayland_directory}/${subdirectory}/${filename}.xml
|
||||
${CMAKE_BINARY_DIR}/generated-src/${filename}.c
|
||||
COMMAND wayland-scanner client-header
|
||||
${CMAKE_SOURCE_DIR}/third-party/${wayland_directory}/${subdirectory}/${filename}.xml
|
||||
${wayland_directory}/${subdirectory}/${filename}.xml
|
||||
${CMAKE_BINARY_DIR}/generated-src/${filename}.h
|
||||
|
||||
RESULT_VARIABLE EXIT_INT
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
# common cpack options
|
||||
set(CPACK_PACKAGE_NAME ${CMAKE_PROJECT_NAME})
|
||||
set(CPACK_PACKAGE_VENDOR "LizardByte")
|
||||
string(REGEX REPLACE "^v" "" CPACK_PACKAGE_VERSION ${PROJECT_VERSION}) # remove the v prefix if it exists
|
||||
set(CPACK_PACKAGE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/cpack_artifacts)
|
||||
set(CPACK_PACKAGE_CONTACT "https://app.lizardbyte.dev")
|
||||
set(CPACK_PACKAGE_DESCRIPTION ${CMAKE_PROJECT_DESCRIPTION})
|
||||
@@ -12,9 +13,22 @@ set(CPACK_PACKAGE_ICON ${PROJECT_SOURCE_DIR}/sunshine.png)
|
||||
set(CPACK_PACKAGE_FILE_NAME "${CMAKE_PROJECT_NAME}")
|
||||
set(CPACK_STRIP_FILES YES)
|
||||
|
||||
# install npm modules
|
||||
install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/node_modules"
|
||||
DESTINATION "${SUNSHINE_ASSETS_DIR}/web")
|
||||
# install common assets
|
||||
install(DIRECTORY "${SUNSHINE_SOURCE_ASSETS_DIR}/common/assets/"
|
||||
DESTINATION "${SUNSHINE_ASSETS_DIR}"
|
||||
PATTERN "web" EXCLUDE)
|
||||
# copy assets to build directory, for running without install
|
||||
file(GLOB_RECURSE ALL_ASSETS
|
||||
RELATIVE "${SUNSHINE_SOURCE_ASSETS_DIR}/common/assets/" "${SUNSHINE_SOURCE_ASSETS_DIR}/common/assets/*")
|
||||
list(FILTER ALL_ASSETS EXCLUDE REGEX "^web/.*$") # Filter out the web directory
|
||||
foreach(asset ${ALL_ASSETS}) # Copy assets to build directory, excluding the web directory
|
||||
file(COPY "${SUNSHINE_SOURCE_ASSETS_DIR}/common/assets/${asset}"
|
||||
DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/assets")
|
||||
endforeach()
|
||||
|
||||
# install built vite assets
|
||||
install(DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/assets/web"
|
||||
DESTINATION "${SUNSHINE_ASSETS_DIR}")
|
||||
|
||||
# platform specific packaging
|
||||
if(WIN32)
|
||||
|
||||
@@ -2,30 +2,46 @@
|
||||
|
||||
install(DIRECTORY "${SUNSHINE_SOURCE_ASSETS_DIR}/linux/assets/"
|
||||
DESTINATION "${SUNSHINE_ASSETS_DIR}")
|
||||
|
||||
# copy assets (excluding shaders) to build directory, for running without install
|
||||
file(COPY "${SUNSHINE_SOURCE_ASSETS_DIR}/linux/assets/"
|
||||
DESTINATION "${CMAKE_BINARY_DIR}/assets"
|
||||
PATTERN "shaders" EXCLUDE)
|
||||
# use symbolic link for shaders directory
|
||||
file(CREATE_LINK "${SUNSHINE_SOURCE_ASSETS_DIR}/linux/assets/shaders"
|
||||
"${CMAKE_BINARY_DIR}/assets/shaders" COPY_ON_ERROR SYMBOLIC)
|
||||
|
||||
if(${SUNSHINE_BUILD_APPIMAGE} OR ${SUNSHINE_BUILD_FLATPAK})
|
||||
install(FILES "${SUNSHINE_SOURCE_ASSETS_DIR}/linux/misc/85-sunshine.rules"
|
||||
install(FILES "${SUNSHINE_SOURCE_ASSETS_DIR}/linux/misc/60-sunshine.rules"
|
||||
DESTINATION "${SUNSHINE_ASSETS_DIR}/udev/rules.d")
|
||||
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/sunshine.service"
|
||||
DESTINATION "${SUNSHINE_ASSETS_DIR}/systemd/user")
|
||||
else()
|
||||
install(FILES "${SUNSHINE_SOURCE_ASSETS_DIR}/linux/misc/85-sunshine.rules"
|
||||
DESTINATION "${CMAKE_INSTALL_PREFIX}/lib/udev/rules.d")
|
||||
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/sunshine.service"
|
||||
DESTINATION "${CMAKE_INSTALL_PREFIX}/lib/systemd/user")
|
||||
find_package(Systemd)
|
||||
find_package(Udev)
|
||||
|
||||
if(UDEV_FOUND)
|
||||
install(FILES "${SUNSHINE_SOURCE_ASSETS_DIR}/linux/misc/60-sunshine.rules"
|
||||
DESTINATION "${UDEV_RULES_INSTALL_DIR}")
|
||||
endif()
|
||||
if(SYSTEMD_FOUND)
|
||||
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/sunshine.service"
|
||||
DESTINATION "${SYSTEMD_USER_UNIT_INSTALL_DIR}")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Post install
|
||||
set(CPACK_DEBIAN_PACKAGE_CONTROL_EXTRA "${SUNSHINE_SOURCE_ASSETS_DIR}/linux/misc/postinst")
|
||||
set(CPACK_RPM_POST_INSTALL_SCRIPT_FILE "${SUNSHINE_SOURCE_ASSETS_DIR}/linux/misc/postinst")
|
||||
|
||||
# Apply setcap for RPM
|
||||
# https://github.com/coreos/rpm-ostree/discussions/5036#discussioncomment-10291071
|
||||
set(CPACK_RPM_USER_FILELIST "%caps(cap_sys_admin+p) ${SUNSHINE_EXECUTABLE_PATH}")
|
||||
|
||||
# Dependencies
|
||||
set(CPACK_DEB_COMPONENT_INSTALL ON)
|
||||
set(CPACK_DEBIAN_PACKAGE_DEPENDS "\
|
||||
${CPACK_DEB_PLATFORM_PACKAGE_DEPENDS} \
|
||||
libboost-filesystem${Boost_VERSION}, \
|
||||
libboost-locale${Boost_VERSION}, \
|
||||
libboost-log${Boost_VERSION}, \
|
||||
libboost-program-options${Boost_VERSION}, \
|
||||
libcap2, \
|
||||
libcurl4, \
|
||||
libdrm2, \
|
||||
@@ -35,47 +51,80 @@ set(CPACK_DEBIAN_PACKAGE_DEPENDS "\
|
||||
libpulse0, \
|
||||
libva2, \
|
||||
libva-drm2, \
|
||||
libvdpau1, \
|
||||
libwayland-client0, \
|
||||
libx11-6, \
|
||||
miniupnpc, \
|
||||
openssl | libssl3")
|
||||
set(CPACK_RPM_PACKAGE_REQUIRES "\
|
||||
${CPACK_RPM_PLATFORM_PACKAGE_REQUIRES} \
|
||||
boost-filesystem >= ${Boost_VERSION}, \
|
||||
boost-locale >= ${Boost_VERSION}, \
|
||||
boost-log >= ${Boost_VERSION}, \
|
||||
boost-program-options >= ${Boost_VERSION}, \
|
||||
libcap >= 2.22, \
|
||||
libcurl >= 7.0, \
|
||||
libdrm >= 2.4.97, \
|
||||
libevdev >= 1.5.6, \
|
||||
libopusenc >= 0.2.1, \
|
||||
libva >= 2.14.0, \
|
||||
libvdpau >= 1.5, \
|
||||
libwayland-client >= 1.20.0, \
|
||||
libX11 >= 1.7.3.1, \
|
||||
miniupnpc >= 2.2.4, \
|
||||
numactl-libs >= 2.0.14, \
|
||||
openssl >= 3.0.2, \
|
||||
pulseaudio-libs >= 10.0")
|
||||
|
||||
if(NOT BOOST_USE_STATIC)
|
||||
set(CPACK_DEBIAN_PACKAGE_DEPENDS "\
|
||||
${CPACK_DEBIAN_PACKAGE_DEPENDS}, \
|
||||
libboost-filesystem${Boost_VERSION}, \
|
||||
libboost-locale${Boost_VERSION}, \
|
||||
libboost-log${Boost_VERSION}, \
|
||||
libboost-program-options${Boost_VERSION}")
|
||||
set(CPACK_RPM_PACKAGE_REQUIRES "\
|
||||
${CPACK_RPM_PACKAGE_REQUIRES}, \
|
||||
boost-filesystem >= ${Boost_VERSION}, \
|
||||
boost-locale >= ${Boost_VERSION}, \
|
||||
boost-log >= ${Boost_VERSION}, \
|
||||
boost-program-options >= ${Boost_VERSION}")
|
||||
endif()
|
||||
|
||||
# This should automatically figure out dependencies, doesn't work with the current config
|
||||
set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS OFF)
|
||||
|
||||
# application icon
|
||||
install(FILES "${CMAKE_SOURCE_DIR}/sunshine.svg"
|
||||
DESTINATION "${CMAKE_INSTALL_PREFIX}/share/icons/hicolor/scalable/apps")
|
||||
if(NOT ${SUNSHINE_BUILD_FLATPAK})
|
||||
install(FILES "${CMAKE_SOURCE_DIR}/sunshine.svg"
|
||||
DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/scalable/apps")
|
||||
else()
|
||||
install(FILES "${CMAKE_SOURCE_DIR}/sunshine.svg"
|
||||
DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/scalable/apps"
|
||||
RENAME "${PROJECT_FQDN}.svg")
|
||||
endif()
|
||||
|
||||
# tray icon
|
||||
if(${SUNSHINE_TRAY} STREQUAL 1)
|
||||
install(FILES "${CMAKE_SOURCE_DIR}/sunshine.svg"
|
||||
DESTINATION "${CMAKE_INSTALL_PREFIX}/share/icons/hicolor/scalable/status"
|
||||
RENAME "sunshine-tray.svg")
|
||||
install(FILES "${SUNSHINE_SOURCE_ASSETS_DIR}/common/assets/web/images/sunshine-playing.svg"
|
||||
DESTINATION "${CMAKE_INSTALL_PREFIX}/share/icons/hicolor/scalable/status")
|
||||
install(FILES "${SUNSHINE_SOURCE_ASSETS_DIR}/common/assets/web/images/sunshine-pausing.svg"
|
||||
DESTINATION "${CMAKE_INSTALL_PREFIX}/share/icons/hicolor/scalable/status")
|
||||
install(FILES "${SUNSHINE_SOURCE_ASSETS_DIR}/common/assets/web/images/sunshine-locked.svg"
|
||||
DESTINATION "${CMAKE_INSTALL_PREFIX}/share/icons/hicolor/scalable/status")
|
||||
if(NOT ${SUNSHINE_BUILD_FLATPAK})
|
||||
install(FILES "${CMAKE_SOURCE_DIR}/sunshine.svg"
|
||||
DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/scalable/status"
|
||||
RENAME "sunshine-tray.svg")
|
||||
install(FILES "${SUNSHINE_SOURCE_ASSETS_DIR}/common/assets/web/public/images/sunshine-playing.svg"
|
||||
DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/scalable/status")
|
||||
install(FILES "${SUNSHINE_SOURCE_ASSETS_DIR}/common/assets/web/public/images/sunshine-pausing.svg"
|
||||
DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/scalable/status")
|
||||
install(FILES "${SUNSHINE_SOURCE_ASSETS_DIR}/common/assets/web/public/images/sunshine-locked.svg"
|
||||
DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/scalable/status")
|
||||
else()
|
||||
# flatpak icons must be prefixed with the app id or they will not be included in the flatpak
|
||||
install(FILES "${CMAKE_SOURCE_DIR}/sunshine.svg"
|
||||
DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/scalable/status"
|
||||
RENAME "${PROJECT_FQDN}-tray.svg")
|
||||
install(FILES "${SUNSHINE_SOURCE_ASSETS_DIR}/common/assets/web/public/images/sunshine-playing.svg"
|
||||
DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/scalable/status"
|
||||
RENAME "${PROJECT_FQDN}-playing.svg")
|
||||
install(FILES "${SUNSHINE_SOURCE_ASSETS_DIR}/common/assets/web/public/images/sunshine-pausing.svg"
|
||||
DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/scalable/status"
|
||||
RENAME "${PROJECT_FQDN}-pausing.svg")
|
||||
install(FILES "${SUNSHINE_SOURCE_ASSETS_DIR}/common/assets/web/public/images/sunshine-locked.svg"
|
||||
DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/scalable/status"
|
||||
RENAME "${PROJECT_FQDN}-locked.svg")
|
||||
endif()
|
||||
|
||||
set(CPACK_DEBIAN_PACKAGE_DEPENDS "\
|
||||
${CPACK_DEBIAN_PACKAGE_DEPENDS}, \
|
||||
@@ -88,13 +137,25 @@ endif()
|
||||
|
||||
# desktop file
|
||||
# todo - validate desktop files with `desktop-file-validate`
|
||||
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/sunshine.desktop" DESTINATION "${CMAKE_INSTALL_PREFIX}/share/applications")
|
||||
if(${SUNSHINE_BUILD_FLATPAK})
|
||||
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/sunshine_kms.desktop"
|
||||
DESTINATION "${CMAKE_INSTALL_PREFIX}/share/applications")
|
||||
if(NOT ${SUNSHINE_BUILD_FLATPAK})
|
||||
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/sunshine.desktop"
|
||||
DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/applications")
|
||||
else()
|
||||
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/sunshine.desktop"
|
||||
DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/applications"
|
||||
RENAME "${PROJECT_FQDN}.desktop")
|
||||
endif()
|
||||
if(NOT ${SUNSHINE_BUILD_APPIMAGE} AND NOT ${SUNSHINE_BUILD_FLATPAK})
|
||||
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/sunshine_terminal.desktop"
|
||||
DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/applications")
|
||||
endif()
|
||||
|
||||
# metadata file
|
||||
# todo - validate file with `appstream-util validate-relax`
|
||||
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/sunshine.appdata.xml"
|
||||
DESTINATION "${CMAKE_INSTALL_PREFIX}/share/metainfo")
|
||||
if(NOT ${SUNSHINE_BUILD_FLATPAK})
|
||||
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/sunshine.appdata.xml"
|
||||
DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/metainfo")
|
||||
else()
|
||||
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_FQDN}.metainfo.xml"
|
||||
DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/metainfo")
|
||||
endif()
|
||||
|
||||
@@ -10,17 +10,16 @@ if(SUNSHINE_PACKAGE_MACOS) # todo
|
||||
set(MAC_PREFIX "${CMAKE_PROJECT_NAME}.app/Contents")
|
||||
set(INSTALL_RUNTIME_DIR "${MAC_PREFIX}/MacOS")
|
||||
|
||||
install(DIRECTORY "${SUNSHINE_SOURCE_ASSETS_DIR}/common/assets/"
|
||||
DESTINATION "${SUNSHINE_ASSETS_DIR}")
|
||||
install(DIRECTORY "${SUNSHINE_SOURCE_ASSETS_DIR}/macos/assets/"
|
||||
DESTINATION "${SUNSHINE_ASSETS_DIR}")
|
||||
|
||||
install(TARGETS sunshine
|
||||
BUNDLE DESTINATION . COMPONENT Runtime
|
||||
RUNTIME DESTINATION ${INSTALL_RUNTIME_DIR} COMPONENT Runtime)
|
||||
else()
|
||||
install(DIRECTORY "${SUNSHINE_SOURCE_ASSETS_DIR}/macos/assets/"
|
||||
DESTINATION "${SUNSHINE_ASSETS_DIR}")
|
||||
install(FILES "${SUNSHINE_SOURCE_ASSETS_DIR}/macos/misc/uninstall_pkg.sh"
|
||||
DESTINATION "${SUNSHINE_ASSETS_DIR}")
|
||||
endif()
|
||||
|
||||
install(DIRECTORY "${SUNSHINE_SOURCE_ASSETS_DIR}/macos/assets/"
|
||||
DESTINATION "${SUNSHINE_ASSETS_DIR}")
|
||||
# copy assets to build directory, for running without install
|
||||
file(COPY "${SUNSHINE_SOURCE_ASSETS_DIR}/macos/assets/"
|
||||
DESTINATION "${CMAKE_BINARY_DIR}/assets")
|
||||
|
||||
@@ -13,6 +13,3 @@ if(NOT CMAKE_INSTALL_PREFIX)
|
||||
endif()
|
||||
|
||||
install(TARGETS sunshine RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}")
|
||||
|
||||
install(DIRECTORY "${SUNSHINE_SOURCE_ASSETS_DIR}/common/assets/"
|
||||
DESTINATION "${SUNSHINE_ASSETS_DIR}")
|
||||
|
||||
@@ -11,7 +11,6 @@ install(TARGETS dxgi-info RUNTIME DESTINATION "tools" COMPONENT dxgi)
|
||||
install(TARGETS audio-info RUNTIME DESTINATION "tools" COMPONENT audio)
|
||||
|
||||
# Mandatory tools
|
||||
install(TARGETS ddprobe RUNTIME DESTINATION "tools" COMPONENT application)
|
||||
install(TARGETS sunshinesvc RUNTIME DESTINATION "tools" COMPONENT application)
|
||||
|
||||
# Mandatory scripts
|
||||
@@ -36,15 +35,22 @@ install(DIRECTORY "${SUNSHINE_SOURCE_ASSETS_DIR}/windows/misc/gamepad/"
|
||||
COMPONENT gamepad)
|
||||
|
||||
# Sunshine assets
|
||||
install(DIRECTORY "${SUNSHINE_SOURCE_ASSETS_DIR}/common/assets/"
|
||||
DESTINATION "${SUNSHINE_ASSETS_DIR}"
|
||||
COMPONENT assets)
|
||||
install(DIRECTORY "${SUNSHINE_SOURCE_ASSETS_DIR}/windows/assets/"
|
||||
DESTINATION "${SUNSHINE_ASSETS_DIR}"
|
||||
COMPONENT assets)
|
||||
|
||||
# copy assets (excluding shaders) to build directory, for running without install
|
||||
file(COPY "${SUNSHINE_SOURCE_ASSETS_DIR}/windows/assets/"
|
||||
DESTINATION "${CMAKE_BINARY_DIR}/assets"
|
||||
PATTERN "shaders" EXCLUDE)
|
||||
# use junction for shaders directory
|
||||
cmake_path(CONVERT "${SUNSHINE_SOURCE_ASSETS_DIR}/windows/assets/shaders"
|
||||
TO_NATIVE_PATH_LIST shaders_in_build_src_native)
|
||||
cmake_path(CONVERT "${CMAKE_BINARY_DIR}/assets/shaders" TO_NATIVE_PATH_LIST shaders_in_build_dest_native)
|
||||
execute_process(COMMAND cmd.exe /c mklink /J "${shaders_in_build_dest_native}" "${shaders_in_build_src_native}")
|
||||
|
||||
# set(CPACK_NSIS_MUI_HEADERIMAGE "") # TODO: image should be 150x57 bmp
|
||||
set(CPACK_PACKAGE_ICON "${CMAKE_CURRENT_SOURCE_DIR}\\\\sunshine.ico")
|
||||
set(CPACK_PACKAGE_ICON "${CMAKE_SOURCE_DIR}\\\\sunshine.ico")
|
||||
set(CPACK_NSIS_INSTALLED_ICON_NAME "${PROJECT__DIR}\\\\${PROJECT_EXE}")
|
||||
# The name of the directory that will be created in C:/Program files/
|
||||
set(CPACK_PACKAGE_INSTALL_DIRECTORY "${CPACK_PACKAGE_NAME}")
|
||||
@@ -56,12 +62,12 @@ set(CPACK_PACKAGE_INSTALL_DIRECTORY "${CPACK_PACKAGE_NAME}")
|
||||
SET(CPACK_NSIS_EXTRA_INSTALL_COMMANDS
|
||||
"${CPACK_NSIS_EXTRA_INSTALL_COMMANDS}
|
||||
IfSilent +2 0
|
||||
ExecShell 'open' 'https://sunshinestream.readthedocs.io/'
|
||||
ExecShell 'open' 'https://docs.lizardbyte.dev/projects/sunshine'
|
||||
nsExec::ExecToLog 'icacls \\\"$INSTDIR\\\" /reset'
|
||||
nsExec::ExecToLog '\\\"$INSTDIR\\\\scripts\\\\migrate-config.bat\\\"'
|
||||
nsExec::ExecToLog '\\\"$INSTDIR\\\\scripts\\\\add-firewall-rule.bat\\\"'
|
||||
nsExec::ExecToLog '\\\"$INSTDIR\\\\scripts\\\\install-service.bat\\\"'
|
||||
nsExec::ExecToLog '\\\"$INSTDIR\\\\scripts\\\\install-gamepad.bat\\\"'
|
||||
nsExec::ExecToLog '\\\"$INSTDIR\\\\scripts\\\\install-service.bat\\\"'
|
||||
nsExec::ExecToLog '\\\"$INSTDIR\\\\scripts\\\\autostart-service.bat\\\"'
|
||||
NoController:
|
||||
")
|
||||
@@ -74,7 +80,7 @@ set(CPACK_NSIS_EXTRA_UNINSTALL_COMMANDS
|
||||
nsExec::ExecToLog '\\\"$INSTDIR\\\\scripts\\\\uninstall-service.bat\\\"'
|
||||
nsExec::ExecToLog '\\\"$INSTDIR\\\\sunshine.exe\\\" --restore-nvprefs-undo'
|
||||
MessageBox MB_YESNO|MB_ICONQUESTION \
|
||||
'Do you want to remove Virtual Gamepad)?' \
|
||||
'Do you want to remove Virtual Gamepad?' \
|
||||
/SD IDNO IDNO NoGamepad
|
||||
nsExec::ExecToLog '\\\"$INSTDIR\\\\scripts\\\\uninstall-gamepad.bat\\\"'; skipped if no
|
||||
NoGamepad:
|
||||
@@ -103,12 +109,12 @@ set(CPACK_NSIS_DELETE_ICONS_EXTRA
|
||||
# Checking for previous installed versions
|
||||
set(CPACK_NSIS_ENABLE_UNINSTALL_BEFORE_INSTALL "ON")
|
||||
|
||||
set(CPACK_NSIS_HELP_LINK "https://sunshinestream.readthedocs.io/about/installation.html")
|
||||
set(CPACK_NSIS_HELP_LINK "https://docs.lizardbyte.dev/projects/sunshine/latest/md_docs_2getting__started.html")
|
||||
set(CPACK_NSIS_URL_INFO_ABOUT "${CMAKE_PROJECT_HOMEPAGE_URL}")
|
||||
set(CPACK_NSIS_CONTACT "${CMAKE_PROJECT_HOMEPAGE_URL}/support")
|
||||
|
||||
set(CPACK_NSIS_MENU_LINKS
|
||||
"https://sunshinestream.readthedocs.io" "Sunshine documentation"
|
||||
"https://docs.lizardbyte.dev/projects/sunshine" "Sunshine documentation"
|
||||
"https://app.lizardbyte.dev" "LizardByte Web Site"
|
||||
"https://app.lizardbyte.dev/support" "LizardByte Support")
|
||||
set(CPACK_NSIS_MANIFEST_DPI_AWARE true)
|
||||
|
||||
@@ -4,8 +4,9 @@ if((DEFINED ENV{BRANCH}) AND (DEFINED ENV{BUILD_VERSION}) AND (DEFINED ENV{COMMI
|
||||
# If BRANCH is "master" and BUILD_VERSION is not empty, then we are building a master branch
|
||||
MESSAGE("Got from CI master branch and version $ENV{BUILD_VERSION}")
|
||||
set(PROJECT_VERSION $ENV{BUILD_VERSION})
|
||||
set(CMAKE_PROJECT_VERSION ${PROJECT_VERSION}) # cpack will use this to set the binary versions
|
||||
elseif((DEFINED ENV{BRANCH}) AND (DEFINED ENV{COMMIT}))
|
||||
# If BRANCH is set but not BUILD_VERSION we are building nightly, we gather only the commit hash
|
||||
# If BRANCH is set but not BUILD_VERSION we are building a PR, we gather only the commit hash
|
||||
MESSAGE("Got from CI $ENV{BRANCH} branch and commit $ENV{COMMIT}")
|
||||
set(PROJECT_VERSION ${PROJECT_VERSION}.$ENV{COMMIT})
|
||||
endif()
|
||||
@@ -14,12 +15,11 @@ if((DEFINED ENV{BRANCH}) AND (DEFINED ENV{BUILD_VERSION}) AND (DEFINED ENV{COMMI
|
||||
else()
|
||||
find_package(Git)
|
||||
if(GIT_EXECUTABLE)
|
||||
MESSAGE("${CMAKE_CURRENT_SOURCE_DIR}")
|
||||
get_filename_component(SRC_DIR ${CMAKE_CURRENT_SOURCE_DIR} DIRECTORY)
|
||||
MESSAGE("${CMAKE_SOURCE_DIR}")
|
||||
get_filename_component(SRC_DIR "${CMAKE_SOURCE_DIR}" DIRECTORY)
|
||||
#Get current Branch
|
||||
execute_process(
|
||||
COMMAND ${GIT_EXECUTABLE} rev-parse --abbrev-ref HEAD
|
||||
#WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
OUTPUT_VARIABLE GIT_DESCRIBE_BRANCH
|
||||
RESULT_VARIABLE GIT_DESCRIBE_ERROR_CODE
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
@@ -27,7 +27,6 @@ else()
|
||||
# Gather current commit
|
||||
execute_process(
|
||||
COMMAND ${GIT_EXECUTABLE} rev-parse --short HEAD
|
||||
#WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
OUTPUT_VARIABLE GIT_DESCRIBE_VERSION
|
||||
RESULT_VARIABLE GIT_DESCRIBE_ERROR_CODE
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
@@ -35,7 +34,6 @@ else()
|
||||
# Check if Dirty
|
||||
execute_process(
|
||||
COMMAND ${GIT_EXECUTABLE} diff --quiet --exit-code
|
||||
#WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
RESULT_VARIABLE GIT_IS_DIRTY
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# source assets will be installed from this directory
|
||||
set(SUNSHINE_SOURCE_ASSETS_DIR "${CMAKE_CURRENT_SOURCE_DIR}/src_assets")
|
||||
set(SUNSHINE_SOURCE_ASSETS_DIR "${CMAKE_SOURCE_DIR}/src_assets")
|
||||
|
||||
# enable system tray, we will disable this later if we cannot find the required package config on linux
|
||||
set(SUNSHINE_TRAY 1)
|
||||
|
||||
17
cmake/prep/init.cmake
Normal file
17
cmake/prep/init.cmake
Normal file
@@ -0,0 +1,17 @@
|
||||
if (WIN32)
|
||||
elseif (APPLE)
|
||||
elseif (UNIX)
|
||||
include(GNUInstallDirs)
|
||||
|
||||
if(NOT DEFINED SUNSHINE_EXECUTABLE_PATH)
|
||||
set(SUNSHINE_EXECUTABLE_PATH "sunshine")
|
||||
endif()
|
||||
|
||||
if(SUNSHINE_BUILD_FLATPAK)
|
||||
set(SUNSHINE_SERVICE_START_COMMAND "ExecStart=flatpak run --command=sunshine ${PROJECT_FQDN}")
|
||||
set(SUNSHINE_SERVICE_STOP_COMMAND "ExecStop=flatpak kill ${PROJECT_FQDN}")
|
||||
else()
|
||||
set(SUNSHINE_SERVICE_START_COMMAND "ExecStart=${SUNSHINE_EXECUTABLE_PATH}")
|
||||
set(SUNSHINE_SERVICE_STOP_COMMAND "")
|
||||
endif()
|
||||
endif()
|
||||
@@ -1,8 +1,43 @@
|
||||
# Publisher Metadata
|
||||
set(SUNSHINE_PUBLISHER_NAME "Third Party Publisher"
|
||||
CACHE STRING "The name of the publisher (not developer) of the application.")
|
||||
set(SUNSHINE_PUBLISHER_WEBSITE ""
|
||||
CACHE STRING "The URL of the publisher's website.")
|
||||
set(SUNSHINE_PUBLISHER_ISSUE_URL "https://app.lizardbyte.dev/support"
|
||||
CACHE STRING "The URL of the publisher's support site or issue tracker.
|
||||
If you provide a modified version of Sunshine, we kindly request that you use your own url.")
|
||||
|
||||
option(BUILD_DOCS "Build documentation" ON)
|
||||
option(BUILD_TESTS "Build tests" ON)
|
||||
option(NPM_OFFLINE "Use offline npm packages. You must ensure packages are in your npm cache." OFF)
|
||||
option(TESTS_ENABLE_PYTHON_TESTS "Enable Python tests" ON)
|
||||
|
||||
option(BUILD_WERROR "Enable -Werror flag." OFF)
|
||||
|
||||
# if this option is set, the build will exit after configuring special package configuration files
|
||||
option(SUNSHINE_CONFIGURE_ONLY "Configure special files only, then exit." OFF)
|
||||
|
||||
option(SUNSHINE_ENABLE_TRAY "Enable system tray icon. This option will be ignored on macOS." ON)
|
||||
option(SUNSHINE_REQUIRE_TRAY "Require system tray icon. Fail the build if tray requirements are not met." ON)
|
||||
|
||||
option(SUNSHINE_SYSTEM_WAYLAND_PROTOCOLS "Use system installation of wayland-protocols rather than the submodule." OFF)
|
||||
|
||||
if(APPLE)
|
||||
option(BOOST_USE_STATIC "Use static boost libraries." OFF)
|
||||
else()
|
||||
option(BOOST_USE_STATIC "Use static boost libraries." ON)
|
||||
endif()
|
||||
|
||||
option(CUDA_FAIL_ON_MISSING "Fail the build if CUDA is not found." ON)
|
||||
option(CUDA_INHERIT_COMPILE_OPTIONS
|
||||
"When building CUDA code, inherit compile options from the the main project. You may want to disable this if
|
||||
your IDE throws errors about unknown flags after running cmake." ON)
|
||||
|
||||
if(UNIX)
|
||||
option(SUNSHINE_BUILD_HOMEBREW
|
||||
"Enable a Homebrew build." OFF)
|
||||
option(SUNSHINE_CONFIGURE_HOMEBREW
|
||||
"Configure Homebrew formula. Recommended to use with SUNSHINE_CONFIGURE_ONLY" OFF)
|
||||
endif()
|
||||
|
||||
if(APPLE)
|
||||
option(SUNSHINE_CONFIGURE_PORTFILE
|
||||
@@ -24,6 +59,8 @@ elseif(UNIX) # Linux
|
||||
"Enable cuda specific code." ON)
|
||||
option(SUNSHINE_ENABLE_DRM
|
||||
"Enable KMS grab if available." ON)
|
||||
option(SUNSHINE_ENABLE_VAAPI
|
||||
"Enable building vaapi specific code." ON)
|
||||
option(SUNSHINE_ENABLE_WAYLAND
|
||||
"Enable building wayland specific code." ON)
|
||||
option(SUNSHINE_ENABLE_X11
|
||||
|
||||
@@ -1,16 +1,26 @@
|
||||
if (APPLE)
|
||||
if(UNIX)
|
||||
if(${SUNSHINE_CONFIGURE_HOMEBREW})
|
||||
configure_file(packaging/sunshine.rb sunshine.rb @ONLY)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(APPLE)
|
||||
if(${SUNSHINE_CONFIGURE_PORTFILE})
|
||||
configure_file(packaging/macos/Portfile Portfile @ONLY)
|
||||
endif()
|
||||
elseif (UNIX)
|
||||
elseif(UNIX)
|
||||
# configure the .desktop file
|
||||
set(SUNSHINE_DESKTOP_ICON "sunshine")
|
||||
if(${SUNSHINE_BUILD_APPIMAGE})
|
||||
configure_file(packaging/linux/AppImage/sunshine.desktop sunshine.desktop @ONLY)
|
||||
elseif(${SUNSHINE_BUILD_FLATPAK})
|
||||
set(SUNSHINE_DESKTOP_ICON "${PROJECT_FQDN}")
|
||||
configure_file(packaging/linux/flatpak/sunshine.desktop sunshine.desktop @ONLY)
|
||||
configure_file(packaging/linux/flatpak/sunshine_kms.desktop sunshine_kms.desktop @ONLY)
|
||||
configure_file(packaging/linux/flatpak/${PROJECT_FQDN}.metainfo.xml
|
||||
${PROJECT_FQDN}.metainfo.xml @ONLY)
|
||||
else()
|
||||
configure_file(packaging/linux/sunshine.desktop sunshine.desktop @ONLY)
|
||||
configure_file(packaging/linux/sunshine_terminal.desktop sunshine_terminal.desktop @ONLY)
|
||||
endif()
|
||||
|
||||
# configure metadata file
|
||||
@@ -22,11 +32,18 @@ elseif (UNIX)
|
||||
# configure the arch linux pkgbuild
|
||||
if(${SUNSHINE_CONFIGURE_PKGBUILD})
|
||||
configure_file(packaging/linux/Arch/PKGBUILD PKGBUILD @ONLY)
|
||||
configure_file(packaging/linux/Arch/sunshine.install sunshine.install @ONLY)
|
||||
endif()
|
||||
|
||||
# configure the flatpak manifest
|
||||
if(${SUNSHINE_CONFIGURE_FLATPAK_MAN})
|
||||
configure_file(packaging/linux/flatpak/dev.lizardbyte.sunshine.yml dev.lizardbyte.sunshine.yml @ONLY)
|
||||
configure_file(packaging/linux/flatpak/${PROJECT_FQDN}.yml ${PROJECT_FQDN}.yml @ONLY)
|
||||
configure_file(packaging/linux/flatpak/${PROJECT_FQDN}.metainfo.xml
|
||||
${PROJECT_FQDN}.metainfo.xml @ONLY)
|
||||
file(COPY packaging/linux/flatpak/deps/ DESTINATION ${CMAKE_BINARY_DIR})
|
||||
file(COPY packaging/linux/flatpak/modules DESTINATION ${CMAKE_BINARY_DIR})
|
||||
file(COPY generated-sources.json DESTINATION ${CMAKE_BINARY_DIR})
|
||||
file(COPY package-lock.json DESTINATION ${CMAKE_BINARY_DIR})
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
||||
@@ -2,6 +2,9 @@
|
||||
# this file will also load platform specific macros
|
||||
|
||||
add_executable(sunshine ${SUNSHINE_TARGET_FILES})
|
||||
foreach(dep ${SUNSHINE_TARGET_DEPENDENCIES})
|
||||
add_dependencies(sunshine ${dep}) # compile these before sunshine
|
||||
endforeach()
|
||||
|
||||
# platform specific target definitions
|
||||
if(WIN32)
|
||||
@@ -24,12 +27,102 @@ endif()
|
||||
|
||||
target_link_libraries(sunshine ${SUNSHINE_EXTERNAL_LIBRARIES} ${EXTRA_LIBS})
|
||||
target_compile_definitions(sunshine PUBLIC ${SUNSHINE_DEFINITIONS})
|
||||
set_target_properties(sunshine PROPERTIES CXX_STANDARD 17
|
||||
set_target_properties(sunshine PROPERTIES CXX_STANDARD 20
|
||||
VERSION ${PROJECT_VERSION}
|
||||
SOVERSION ${PROJECT_VERSION_MAJOR})
|
||||
|
||||
foreach(flag IN LISTS SUNSHINE_COMPILE_OPTIONS)
|
||||
list(APPEND SUNSHINE_COMPILE_OPTIONS_CUDA "$<$<COMPILE_LANGUAGE:CUDA>:--compiler-options=${flag}>")
|
||||
endforeach()
|
||||
# CLion complains about unknown flags after running cmake, and cannot add symbols to the index for cuda files
|
||||
if(CUDA_INHERIT_COMPILE_OPTIONS)
|
||||
foreach(flag IN LISTS SUNSHINE_COMPILE_OPTIONS)
|
||||
list(APPEND SUNSHINE_COMPILE_OPTIONS_CUDA "$<$<COMPILE_LANGUAGE:CUDA>:--compiler-options=${flag}>")
|
||||
endforeach()
|
||||
endif()
|
||||
|
||||
target_compile_options(sunshine PRIVATE $<$<COMPILE_LANGUAGE:CXX>:${SUNSHINE_COMPILE_OPTIONS}>;$<$<COMPILE_LANGUAGE:CUDA>:${SUNSHINE_COMPILE_OPTIONS_CUDA};-std=c++17>) # cmake-lint: disable=C0301
|
||||
|
||||
# Homebrew build fails the vite build if we set these environment variables
|
||||
if(${SUNSHINE_BUILD_HOMEBREW})
|
||||
set(NPM_SOURCE_ASSETS_DIR "")
|
||||
set(NPM_ASSETS_DIR "")
|
||||
set(NPM_BUILD_HOMEBREW "true")
|
||||
else()
|
||||
set(NPM_SOURCE_ASSETS_DIR ${SUNSHINE_SOURCE_ASSETS_DIR})
|
||||
set(NPM_ASSETS_DIR ${CMAKE_BINARY_DIR})
|
||||
set(NPM_BUILD_HOMEBREW "")
|
||||
endif()
|
||||
|
||||
#WebUI build
|
||||
find_program(NPM npm REQUIRED)
|
||||
|
||||
if (NPM_OFFLINE)
|
||||
set(NPM_INSTALL_FLAGS "--offline")
|
||||
else()
|
||||
set(NPM_INSTALL_FLAGS "")
|
||||
endif()
|
||||
|
||||
add_custom_target(web-ui ALL
|
||||
WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}"
|
||||
COMMENT "Installing NPM Dependencies and Building the Web UI"
|
||||
COMMAND "$<$<BOOL:${WIN32}>:cmd;/C>" "${NPM}" install ${NPM_INSTALL_FLAGS}
|
||||
COMMAND "${CMAKE_COMMAND}" -E env "SUNSHINE_BUILD_HOMEBREW=${NPM_BUILD_HOMEBREW}" "SUNSHINE_SOURCE_ASSETS_DIR=${NPM_SOURCE_ASSETS_DIR}" "SUNSHINE_ASSETS_DIR=${NPM_ASSETS_DIR}" "$<$<BOOL:${WIN32}>:cmd;/C>" "${NPM}" run build # cmake-lint: disable=C0301
|
||||
COMMAND_EXPAND_LISTS
|
||||
VERBATIM)
|
||||
|
||||
# docs
|
||||
if(BUILD_DOCS)
|
||||
add_subdirectory(third-party/doxyconfig docs)
|
||||
endif()
|
||||
|
||||
# tests
|
||||
if(BUILD_TESTS)
|
||||
add_subdirectory(tests)
|
||||
endif()
|
||||
|
||||
# custom compile flags, must be after adding tests
|
||||
|
||||
if (NOT BUILD_TESTS)
|
||||
set(TEST_DIR "")
|
||||
else()
|
||||
set(TEST_DIR "${CMAKE_SOURCE_DIR}/tests")
|
||||
endif()
|
||||
|
||||
# src/upnp
|
||||
set_source_files_properties("${CMAKE_SOURCE_DIR}/src/upnp.cpp"
|
||||
DIRECTORY "${CMAKE_SOURCE_DIR}" "${TEST_DIR}"
|
||||
PROPERTIES COMPILE_FLAGS -Wno-pedantic)
|
||||
|
||||
# third-party/nanors
|
||||
set_source_files_properties("${CMAKE_SOURCE_DIR}/src/rswrapper.c"
|
||||
DIRECTORY "${CMAKE_SOURCE_DIR}" "${TEST_DIR}"
|
||||
PROPERTIES COMPILE_FLAGS "-ftree-vectorize -funroll-loops")
|
||||
|
||||
# third-party/ViGEmClient
|
||||
set(VIGEM_COMPILE_FLAGS "")
|
||||
string(APPEND VIGEM_COMPILE_FLAGS "-Wno-unknown-pragmas ")
|
||||
string(APPEND VIGEM_COMPILE_FLAGS "-Wno-misleading-indentation ")
|
||||
string(APPEND VIGEM_COMPILE_FLAGS "-Wno-class-memaccess ")
|
||||
string(APPEND VIGEM_COMPILE_FLAGS "-Wno-unused-function ")
|
||||
string(APPEND VIGEM_COMPILE_FLAGS "-Wno-unused-variable ")
|
||||
set_source_files_properties("${CMAKE_SOURCE_DIR}/third-party/ViGEmClient/src/ViGEmClient.cpp"
|
||||
DIRECTORY "${CMAKE_SOURCE_DIR}" "${TEST_DIR}"
|
||||
PROPERTIES
|
||||
COMPILE_DEFINITIONS "UNICODE=1;ERROR_INVALID_DEVICE_OBJECT_PARAMETER=650"
|
||||
COMPILE_FLAGS ${VIGEM_COMPILE_FLAGS})
|
||||
|
||||
# src/nvhttp
|
||||
string(TOUPPER "x${CMAKE_BUILD_TYPE}" BUILD_TYPE)
|
||||
if("${BUILD_TYPE}" STREQUAL "XDEBUG")
|
||||
if(WIN32)
|
||||
if (NOT BUILD_TESTS)
|
||||
set_source_files_properties("${CMAKE_SOURCE_DIR}/src/nvhttp.cpp"
|
||||
DIRECTORY "${CMAKE_SOURCE_DIR}"
|
||||
PROPERTIES COMPILE_FLAGS -O2)
|
||||
else()
|
||||
set_source_files_properties("${CMAKE_SOURCE_DIR}/src/nvhttp.cpp"
|
||||
DIRECTORY "${CMAKE_SOURCE_DIR}" "${CMAKE_SOURCE_DIR}/tests"
|
||||
PROPERTIES COMPILE_FLAGS -O2)
|
||||
endif()
|
||||
endif()
|
||||
else()
|
||||
add_definitions(-DNDEBUG)
|
||||
endif()
|
||||
|
||||
@@ -3,4 +3,5 @@ set_target_properties(sunshine PROPERTIES LINK_SEARCH_START_STATIC 1)
|
||||
set(CMAKE_FIND_LIBRARY_SUFFIXES ".dll")
|
||||
find_library(ZLIB ZLIB1)
|
||||
list(APPEND SUNSHINE_EXTERNAL_LIBRARIES
|
||||
Windowsapp.lib
|
||||
Wtsapi32.lib)
|
||||
|
||||
19
codecov.yml
Normal file
19
codecov.yml
Normal file
@@ -0,0 +1,19 @@
|
||||
---
|
||||
codecov:
|
||||
branch: master
|
||||
|
||||
coverage:
|
||||
status:
|
||||
project:
|
||||
default:
|
||||
target: auto
|
||||
threshold: 10%
|
||||
|
||||
comment:
|
||||
layout: "diff, flags, files"
|
||||
behavior: default
|
||||
require_changes: false # if true: only post the comment if coverage changes
|
||||
|
||||
ignore:
|
||||
- "tests"
|
||||
- "third-party"
|
||||
13
crowdin.yml
13
crowdin.yml
@@ -1,7 +1,8 @@
|
||||
---
|
||||
"base_path": "."
|
||||
"base_url": "https://api.crowdin.com" # optional (for Crowdin Enterprise only)
|
||||
"preserve_hierarchy": false # flatten tree on crowdin
|
||||
"preserve_hierarchy": true # false will flatten tree on crowdin, but doesn't work with dest option
|
||||
"pull_request_title": "chore(l10n): update translations"
|
||||
"pull_request_labels": [
|
||||
"crowdin",
|
||||
"l10n"
|
||||
@@ -10,6 +11,7 @@
|
||||
"files": [
|
||||
{
|
||||
"source": "/locale/*.po",
|
||||
"dest": "/%original_file_name%",
|
||||
"translation": "/locale/%two_letters_code%/LC_MESSAGES/%original_file_name%",
|
||||
"languages_mapping": {
|
||||
"two_letters_code": {
|
||||
@@ -17,6 +19,13 @@
|
||||
"en-GB": "en_GB",
|
||||
"en-US": "en_US"
|
||||
}
|
||||
}
|
||||
},
|
||||
"update_option": "update_as_unapproved"
|
||||
},
|
||||
{
|
||||
"source": "/src_assets/common/assets/web/public/assets/locale/en.json",
|
||||
"dest": "/sunshine.json",
|
||||
"translation": "/src_assets/common/assets/web/public/assets/locale/%two_letters_code%.%file_extension%",
|
||||
"update_option": "update_as_unapproved"
|
||||
}
|
||||
]
|
||||
|
||||
@@ -1,26 +1,23 @@
|
||||
# syntax=docker/dockerfile:1.4
|
||||
# syntax=docker/dockerfile:1
|
||||
# artifacts: true
|
||||
# platforms: linux/amd64
|
||||
# archlinux does not have an arm64 base image
|
||||
# no-cache-filters: artifacts,sunshine
|
||||
ARG BASE=archlinux
|
||||
ARG BASE=archlinux/archlinux
|
||||
ARG TAG=base-devel
|
||||
FROM ${BASE}:${TAG} AS sunshine-base
|
||||
|
||||
# install dependencies
|
||||
# Update keyring to avoid signature errors, and update system
|
||||
RUN <<_DEPS
|
||||
#!/bin/bash
|
||||
set -e
|
||||
pacman -Syu --disable-download-timeout --needed --noconfirm \
|
||||
pacman -Syy --disable-download-timeout --needed --noconfirm \
|
||||
archlinux-keyring
|
||||
pacman -Syu --disable-download-timeout --noconfirm
|
||||
pacman -Scc --noconfirm
|
||||
_DEPS
|
||||
|
||||
# Setup builder user, arch prevents running makepkg as root
|
||||
RUN useradd -m builder && \
|
||||
echo 'builder ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers
|
||||
# makepkg is used in sunshine-build and uploader build stages
|
||||
|
||||
FROM sunshine-base as sunshine-build
|
||||
FROM sunshine-base AS sunshine-build
|
||||
|
||||
ARG BRANCH
|
||||
ARG BUILD_VERSION
|
||||
@@ -33,20 +30,29 @@ ENV BUILD_VERSION=${BUILD_VERSION}
|
||||
ENV COMMIT=${COMMIT}
|
||||
|
||||
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
|
||||
# install dependencies
|
||||
# cuda, libcap, and libdrm are optional dependencies for PKGBUILD
|
||||
RUN <<_DEPS
|
||||
|
||||
# hadolint ignore=SC2016
|
||||
RUN <<_SETUP
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
# Setup builder user, arch prevents running makepkg as root
|
||||
useradd -m builder
|
||||
echo 'builder ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers
|
||||
|
||||
# patch the build flags
|
||||
sed -i 's,#MAKEFLAGS="-j2",MAKEFLAGS="-j$(nproc)",g' /etc/makepkg.conf
|
||||
|
||||
# install dependencies
|
||||
pacman -Syu --disable-download-timeout --needed --noconfirm \
|
||||
base-devel \
|
||||
cmake \
|
||||
cuda \
|
||||
git \
|
||||
libcap \
|
||||
libdrm \
|
||||
namcap
|
||||
_DEPS
|
||||
namcap \
|
||||
xorg-server-xvfb
|
||||
pacman -Scc --noconfirm
|
||||
_SETUP
|
||||
|
||||
# Setup builder user
|
||||
USER builder
|
||||
@@ -79,36 +85,51 @@ cmake \
|
||||
_MAKE
|
||||
|
||||
WORKDIR /build/sunshine/pkg
|
||||
RUN mv /build/sunshine/build/PKGBUILD .
|
||||
RUN <<_PACKAGE
|
||||
mv /build/sunshine/build/PKGBUILD .
|
||||
mv /build/sunshine/build/sunshine.install .
|
||||
makepkg --printsrcinfo > .SRCINFO
|
||||
_PACKAGE
|
||||
|
||||
# create a PKGBUILD archive
|
||||
USER root
|
||||
RUN <<_REPO
|
||||
#!/bin/bash
|
||||
set -e
|
||||
tar -czf /build/sunshine/sunshine.pkg.tar.gz .
|
||||
_REPO
|
||||
|
||||
# namcap and build PKGBUILD file
|
||||
USER builder
|
||||
RUN <<_PKGBUILD
|
||||
#!/bin/bash
|
||||
set -e
|
||||
# shellcheck source=/dev/null
|
||||
source /etc/profile # ensure cuda is in the PATH
|
||||
export DISPLAY=:1
|
||||
Xvfb ${DISPLAY} -screen 0 1024x768x24 &
|
||||
namcap -i PKGBUILD
|
||||
makepkg -si --noconfirm
|
||||
rm -f /build/sunshine/pkg/sunshine-debug*.pkg.tar.zst
|
||||
ls -a
|
||||
_PKGBUILD
|
||||
|
||||
FROM scratch as artifacts
|
||||
FROM scratch AS artifacts
|
||||
|
||||
COPY --link --from=sunshine-build /build/sunshine/pkg/PKGBUILD /PKGBUILD
|
||||
COPY --link --from=sunshine-build /build/sunshine/pkg/sunshine*.pkg.tar.zst /sunshine.pkg.tar.zst
|
||||
COPY --link --from=sunshine-build /build/sunshine/sunshine.pkg.tar.gz /sunshine.pkg.tar.gz
|
||||
|
||||
FROM sunshine-base as sunshine
|
||||
FROM sunshine-base AS sunshine
|
||||
|
||||
# copy from uploader instead of artifacts or uploader stage will not run
|
||||
COPY --link --from=artifacts /sunshine.pkg.tar.zst /
|
||||
|
||||
# install sunshine
|
||||
RUN <<_INSTALL_SUNSHINE
|
||||
#!/bin/bash
|
||||
set -e
|
||||
# update keyring to prevent cached keyring errors
|
||||
pacman -Syu --disable-download-timeout --needed --noconfirm \
|
||||
archlinux-keyring
|
||||
pacman -U --disable-download-timeout --needed --noconfirm \
|
||||
/sunshine.pkg.tar.zst
|
||||
pacman -Scc --noconfirm
|
||||
_INSTALL_SUNSHINE
|
||||
|
||||
# network setup
|
||||
@@ -131,10 +152,6 @@ ENV HOME=/home/$UNAME
|
||||
RUN <<_SETUP_USER
|
||||
#!/bin/bash
|
||||
set -e
|
||||
# first delete the builder user
|
||||
userdel -r builder
|
||||
|
||||
# then create the lizard user
|
||||
groupadd -f -g "${PGID}" "${UNAME}"
|
||||
useradd -lm -d ${HOME} -s /bin/bash -g "${PGID}" -u "${PUID}" "${UNAME}"
|
||||
mkdir -p ${HOME}/.config/sunshine
|
||||
|
||||
117
docker/clion-toolchain.dockerfile
Normal file
117
docker/clion-toolchain.dockerfile
Normal file
@@ -0,0 +1,117 @@
|
||||
# syntax=docker/dockerfile:1
|
||||
# artifacts: false
|
||||
# platforms: linux/amd64
|
||||
# platforms_pr: linux/amd64
|
||||
# no-cache-filters: toolchain-base,toolchain
|
||||
ARG BASE=ubuntu
|
||||
ARG TAG=22.04
|
||||
FROM ${BASE}:${TAG} AS toolchain-base
|
||||
|
||||
ENV DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
FROM toolchain-base AS toolchain
|
||||
|
||||
ARG TARGETPLATFORM
|
||||
RUN echo "target_platform: ${TARGETPLATFORM}"
|
||||
|
||||
ENV DISPLAY=:0
|
||||
|
||||
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
|
||||
|
||||
# install dependencies
|
||||
# hadolint ignore=SC1091
|
||||
RUN <<_DEPS
|
||||
#!/bin/bash
|
||||
set -e
|
||||
apt-get update -y
|
||||
apt-get install -y --no-install-recommends \
|
||||
build-essential \
|
||||
cmake=3.22.* \
|
||||
ca-certificates \
|
||||
doxygen \
|
||||
gcc=4:11.2.* \
|
||||
g++=4:11.2.* \
|
||||
gdb \
|
||||
git \
|
||||
graphviz \
|
||||
libayatana-appindicator3-dev \
|
||||
libcap-dev \
|
||||
libcurl4-openssl-dev \
|
||||
libdrm-dev \
|
||||
libevdev-dev \
|
||||
libminiupnpc-dev \
|
||||
libnotify-dev \
|
||||
libnuma-dev \
|
||||
libopus-dev \
|
||||
libpulse-dev \
|
||||
libssl-dev \
|
||||
libva-dev \
|
||||
libwayland-dev \
|
||||
libx11-dev \
|
||||
libxcb-shm0-dev \
|
||||
libxcb-xfixes0-dev \
|
||||
libxcb1-dev \
|
||||
libxfixes-dev \
|
||||
libxrandr-dev \
|
||||
libxtst-dev \
|
||||
udev \
|
||||
wget \
|
||||
x11-xserver-utils \
|
||||
xvfb
|
||||
apt-get clean
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Install Node
|
||||
wget --max-redirect=0 -qO- https://raw.githubusercontent.com/nvm-sh/nvm/master/install.sh | bash
|
||||
source "$HOME/.nvm/nvm.sh"
|
||||
nvm install node
|
||||
nvm use node
|
||||
nvm alias default node
|
||||
_DEPS
|
||||
|
||||
# install cuda
|
||||
WORKDIR /build/cuda
|
||||
# versions: https://developer.nvidia.com/cuda-toolkit-archive
|
||||
ENV CUDA_VERSION="11.8.0"
|
||||
ENV CUDA_BUILD="520.61.05"
|
||||
# hadolint ignore=SC3010
|
||||
RUN <<_INSTALL_CUDA
|
||||
#!/bin/bash
|
||||
set -e
|
||||
cuda_prefix="https://developer.download.nvidia.com/compute/cuda/"
|
||||
cuda_suffix=""
|
||||
if [[ "${TARGETPLATFORM}" == 'linux/arm64' ]]; then
|
||||
cuda_suffix="_sbsa"
|
||||
fi
|
||||
url="${cuda_prefix}${CUDA_VERSION}/local_installers/cuda_${CUDA_VERSION}_${CUDA_BUILD}_linux${cuda_suffix}.run"
|
||||
echo "cuda url: ${url}"
|
||||
wget "$url" --progress=bar:force:noscroll -q --show-progress -O ./cuda.run
|
||||
chmod a+x ./cuda.run
|
||||
./cuda.run --silent --toolkit --toolkitpath=/usr/local --no-opengl-libs --no-man-page --no-drm
|
||||
rm ./cuda.run
|
||||
_INSTALL_CUDA
|
||||
|
||||
WORKDIR /
|
||||
# Write a shell script that starts Xvfb and then runs a shell
|
||||
RUN <<_ENTRYPOINT
|
||||
#!/bin/bash
|
||||
set -e
|
||||
cat <<EOF > /entrypoint.sh
|
||||
#!/bin/bash
|
||||
Xvfb ${DISPLAY} -screen 0 1024x768x24 &
|
||||
if [ "\$#" -eq 0 ]; then
|
||||
exec "/bin/bash"
|
||||
else
|
||||
exec "\$@"
|
||||
fi
|
||||
EOF
|
||||
|
||||
# Make the script executable
|
||||
chmod +x /entrypoint.sh
|
||||
|
||||
# Note about CLion
|
||||
echo "ATTENTION: CLion will override the entrypoint, you can disable this in the toolchain settings"
|
||||
_ENTRYPOINT
|
||||
|
||||
# Use the shell script as the entrypoint
|
||||
ENTRYPOINT ["/entrypoint.sh"]
|
||||
@@ -1,4 +1,4 @@
|
||||
# syntax=docker/dockerfile:1.4
|
||||
# syntax=docker/dockerfile:1
|
||||
# artifacts: true
|
||||
# platforms: linux/amd64,linux/arm64/v8
|
||||
# platforms_pr: linux/amd64
|
||||
@@ -9,10 +9,7 @@ FROM ${BASE}:${TAG} AS sunshine-base
|
||||
|
||||
ENV DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
FROM sunshine-base as sunshine-build
|
||||
|
||||
ARG TARGETPLATFORM
|
||||
RUN echo "target_platform: ${TARGETPLATFORM}"
|
||||
FROM sunshine-base AS sunshine-build
|
||||
|
||||
ARG BRANCH
|
||||
ARG BUILD_VERSION
|
||||
@@ -24,101 +21,35 @@ ENV BUILD_VERSION=${BUILD_VERSION}
|
||||
ENV COMMIT=${COMMIT}
|
||||
|
||||
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
|
||||
# install dependencies
|
||||
RUN <<_DEPS
|
||||
#!/bin/bash
|
||||
set -e
|
||||
apt-get update -y
|
||||
apt-get install -y --no-install-recommends \
|
||||
build-essential \
|
||||
cmake=3.25.* \
|
||||
git \
|
||||
libavdevice-dev \
|
||||
libayatana-appindicator3-dev \
|
||||
libboost-filesystem-dev=1.74.* \
|
||||
libboost-locale-dev=1.74.* \
|
||||
libboost-log-dev=1.74.* \
|
||||
libboost-program-options-dev=1.74.* \
|
||||
libcap-dev \
|
||||
libcurl4-openssl-dev \
|
||||
libdrm-dev \
|
||||
libevdev-dev \
|
||||
libnotify-dev \
|
||||
libnuma-dev \
|
||||
libopus-dev \
|
||||
libpulse-dev \
|
||||
libssl-dev \
|
||||
libva-dev \
|
||||
libvdpau-dev \
|
||||
libwayland-dev \
|
||||
libx11-dev \
|
||||
libxcb-shm0-dev \
|
||||
libxcb-xfixes0-dev \
|
||||
libxcb1-dev \
|
||||
libxfixes-dev \
|
||||
libxrandr-dev \
|
||||
libxtst-dev \
|
||||
nodejs \
|
||||
npm \
|
||||
wget
|
||||
if [[ "${TARGETPLATFORM}" == 'linux/amd64' ]]; then
|
||||
apt-get install -y --no-install-recommends \
|
||||
libmfx-dev
|
||||
fi
|
||||
apt-get clean
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
_DEPS
|
||||
|
||||
# install cuda
|
||||
WORKDIR /build/cuda
|
||||
# versions: https://developer.nvidia.com/cuda-toolkit-archive
|
||||
ENV CUDA_VERSION="12.0.0"
|
||||
ENV CUDA_BUILD="525.60.13"
|
||||
# hadolint ignore=SC3010
|
||||
RUN <<_INSTALL_CUDA
|
||||
#!/bin/bash
|
||||
set -e
|
||||
cuda_prefix="https://developer.download.nvidia.com/compute/cuda/"
|
||||
cuda_suffix=""
|
||||
if [[ "${TARGETPLATFORM}" == 'linux/arm64' ]]; then
|
||||
cuda_suffix="_sbsa"
|
||||
fi
|
||||
url="${cuda_prefix}${CUDA_VERSION}/local_installers/cuda_${CUDA_VERSION}_${CUDA_BUILD}_linux${cuda_suffix}.run"
|
||||
echo "cuda url: ${url}"
|
||||
wget "$url" --progress=bar:force:noscroll -q --show-progress -O ./cuda.run
|
||||
chmod a+x ./cuda.run
|
||||
./cuda.run --silent --toolkit --toolkitpath=/build/cuda --no-opengl-libs --no-man-page --no-drm
|
||||
rm ./cuda.run
|
||||
_INSTALL_CUDA
|
||||
|
||||
# copy repository
|
||||
WORKDIR /build/sunshine/
|
||||
COPY --link .. .
|
||||
|
||||
# setup npm dependencies
|
||||
RUN npm install
|
||||
|
||||
# setup build directory
|
||||
WORKDIR /build/sunshine/build
|
||||
|
||||
# cmake and cpack
|
||||
RUN <<_MAKE
|
||||
RUN <<_BUILD
|
||||
#!/bin/bash
|
||||
set -e
|
||||
cmake \
|
||||
-DCMAKE_CUDA_COMPILER:PATH=/build/cuda/bin/nvcc \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DCMAKE_INSTALL_PREFIX=/usr \
|
||||
-DSUNSHINE_ASSETS_DIR=share/sunshine \
|
||||
-DSUNSHINE_EXECUTABLE_PATH=/usr/bin/sunshine \
|
||||
-DSUNSHINE_ENABLE_WAYLAND=ON \
|
||||
-DSUNSHINE_ENABLE_X11=ON \
|
||||
-DSUNSHINE_ENABLE_DRM=ON \
|
||||
-DSUNSHINE_ENABLE_CUDA=ON \
|
||||
/build/sunshine
|
||||
make -j "$(nproc)"
|
||||
cpack -G DEB
|
||||
_MAKE
|
||||
chmod +x ./scripts/linux_build.sh
|
||||
./scripts/linux_build.sh \
|
||||
--publisher-name='LizardByte' \
|
||||
--publisher-website='https://app.lizardbyte.dev' \
|
||||
--publisher-issue-url='https://app.lizardbyte.dev/support' \
|
||||
--sudo-off
|
||||
apt-get clean
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
_BUILD
|
||||
|
||||
# run tests
|
||||
WORKDIR /build/sunshine/build/tests
|
||||
# hadolint ignore=SC1091
|
||||
RUN <<_TEST
|
||||
#!/bin/bash
|
||||
set -e
|
||||
export DISPLAY=:1
|
||||
Xvfb ${DISPLAY} -screen 0 1024x768x24 &
|
||||
./test_sunshine --gtest_color=yes
|
||||
_TEST
|
||||
|
||||
FROM scratch AS artifacts
|
||||
ARG BASE
|
||||
@@ -126,7 +57,7 @@ ARG TAG
|
||||
ARG TARGETARCH
|
||||
COPY --link --from=sunshine-build /build/sunshine/build/cpack_artifacts/Sunshine.deb /sunshine-${BASE}-${TAG}-${TARGETARCH}.deb
|
||||
|
||||
FROM sunshine-base as sunshine
|
||||
FROM sunshine-base AS sunshine
|
||||
|
||||
# copy deb from builder
|
||||
COPY --link --from=artifacts /sunshine*.deb /sunshine.deb
|
||||
|
||||
@@ -1,175 +0,0 @@
|
||||
# syntax=docker/dockerfile:1.4
|
||||
# artifacts: true
|
||||
# platforms: linux/amd64,linux/arm64/v8
|
||||
# platforms_pr: linux/amd64
|
||||
# no-cache-filters: sunshine-base,artifacts,sunshine
|
||||
ARG BASE=debian
|
||||
ARG TAG=bullseye
|
||||
FROM ${BASE}:${TAG} AS sunshine-base
|
||||
|
||||
ENV DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
FROM sunshine-base as sunshine-build
|
||||
|
||||
ARG TARGETPLATFORM
|
||||
RUN echo "target_platform: ${TARGETPLATFORM}"
|
||||
|
||||
ARG BRANCH
|
||||
ARG BUILD_VERSION
|
||||
ARG COMMIT
|
||||
# note: BUILD_VERSION may be blank
|
||||
|
||||
ENV BRANCH=${BRANCH}
|
||||
ENV BUILD_VERSION=${BUILD_VERSION}
|
||||
ENV COMMIT=${COMMIT}
|
||||
|
||||
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
|
||||
# install dependencies
|
||||
RUN <<_DEPS
|
||||
#!/bin/bash
|
||||
set -e
|
||||
apt-get update -y
|
||||
apt-get install -y --no-install-recommends \
|
||||
build-essential \
|
||||
cmake=3.18.* \
|
||||
git \
|
||||
libavdevice-dev \
|
||||
libayatana-appindicator3-dev \
|
||||
libboost-filesystem-dev=1.74.* \
|
||||
libboost-locale-dev=1.74.* \
|
||||
libboost-log-dev=1.74.* \
|
||||
libboost-program-options-dev=1.74.* \
|
||||
libcap-dev \
|
||||
libcurl4-openssl-dev \
|
||||
libdrm-dev \
|
||||
libevdev-dev \
|
||||
libnotify-dev \
|
||||
libnuma-dev \
|
||||
libopus-dev \
|
||||
libpulse-dev \
|
||||
libssl-dev \
|
||||
libva-dev \
|
||||
libvdpau-dev \
|
||||
libwayland-dev \
|
||||
libx11-dev \
|
||||
libxcb-shm0-dev \
|
||||
libxcb-xfixes0-dev \
|
||||
libxcb1-dev \
|
||||
libxfixes-dev \
|
||||
libxrandr-dev \
|
||||
libxtst-dev \
|
||||
nodejs \
|
||||
npm \
|
||||
wget
|
||||
if [[ "${TARGETPLATFORM}" == 'linux/amd64' ]]; then
|
||||
apt-get install -y --no-install-recommends \
|
||||
libmfx-dev
|
||||
fi
|
||||
apt-get clean
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
_DEPS
|
||||
|
||||
# install cuda
|
||||
WORKDIR /build/cuda
|
||||
# versions: https://developer.nvidia.com/cuda-toolkit-archive
|
||||
ENV CUDA_VERSION="11.8.0"
|
||||
ENV CUDA_BUILD="520.61.05"
|
||||
# hadolint ignore=SC3010
|
||||
RUN <<_INSTALL_CUDA
|
||||
#!/bin/bash
|
||||
set -e
|
||||
cuda_prefix="https://developer.download.nvidia.com/compute/cuda/"
|
||||
cuda_suffix=""
|
||||
if [[ "${TARGETPLATFORM}" == 'linux/arm64' ]]; then
|
||||
cuda_suffix="_sbsa"
|
||||
fi
|
||||
url="${cuda_prefix}${CUDA_VERSION}/local_installers/cuda_${CUDA_VERSION}_${CUDA_BUILD}_linux${cuda_suffix}.run"
|
||||
echo "cuda url: ${url}"
|
||||
wget "$url" --progress=bar:force:noscroll -q --show-progress -O ./cuda.run
|
||||
chmod a+x ./cuda.run
|
||||
./cuda.run --silent --toolkit --toolkitpath=/build/cuda --no-opengl-libs --no-man-page --no-drm
|
||||
rm ./cuda.run
|
||||
_INSTALL_CUDA
|
||||
|
||||
# copy repository
|
||||
WORKDIR /build/sunshine/
|
||||
COPY --link .. .
|
||||
|
||||
# setup npm dependencies
|
||||
RUN npm install
|
||||
|
||||
# setup build directory
|
||||
WORKDIR /build/sunshine/build
|
||||
|
||||
# cmake and cpack
|
||||
RUN <<_MAKE
|
||||
#!/bin/bash
|
||||
set -e
|
||||
cmake \
|
||||
-DCMAKE_CUDA_COMPILER:PATH=/build/cuda/bin/nvcc \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DCMAKE_INSTALL_PREFIX=/usr \
|
||||
-DSUNSHINE_ASSETS_DIR=share/sunshine \
|
||||
-DSUNSHINE_EXECUTABLE_PATH=/usr/bin/sunshine \
|
||||
-DSUNSHINE_ENABLE_WAYLAND=ON \
|
||||
-DSUNSHINE_ENABLE_X11=ON \
|
||||
-DSUNSHINE_ENABLE_DRM=ON \
|
||||
-DSUNSHINE_ENABLE_CUDA=ON \
|
||||
/build/sunshine
|
||||
make -j "$(nproc)"
|
||||
cpack -G DEB
|
||||
_MAKE
|
||||
|
||||
FROM scratch AS artifacts
|
||||
ARG BASE
|
||||
ARG TAG
|
||||
ARG TARGETARCH
|
||||
COPY --link --from=sunshine-build /build/sunshine/build/cpack_artifacts/Sunshine.deb /sunshine-${BASE}-${TAG}-${TARGETARCH}.deb
|
||||
|
||||
FROM sunshine-base as sunshine
|
||||
|
||||
# copy deb from builder
|
||||
COPY --link --from=artifacts /sunshine*.deb /sunshine.deb
|
||||
|
||||
# install sunshine
|
||||
RUN <<_INSTALL_SUNSHINE
|
||||
#!/bin/bash
|
||||
set -e
|
||||
apt-get update -y
|
||||
apt-get install -y --no-install-recommends /sunshine.deb
|
||||
apt-get clean
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
_INSTALL_SUNSHINE
|
||||
|
||||
# network setup
|
||||
EXPOSE 47984-47990/tcp
|
||||
EXPOSE 48010
|
||||
EXPOSE 47998-48000/udp
|
||||
|
||||
# setup user
|
||||
ARG PGID=1000
|
||||
ENV PGID=${PGID}
|
||||
ARG PUID=1000
|
||||
ENV PUID=${PUID}
|
||||
ENV TZ="UTC"
|
||||
ARG UNAME=lizard
|
||||
ENV UNAME=${UNAME}
|
||||
|
||||
ENV HOME=/home/$UNAME
|
||||
|
||||
# setup user
|
||||
RUN <<_SETUP_USER
|
||||
#!/bin/bash
|
||||
set -e
|
||||
groupadd -f -g "${PGID}" "${UNAME}"
|
||||
useradd -lm -d ${HOME} -s /bin/bash -g "${PGID}" -u "${PUID}" "${UNAME}"
|
||||
mkdir -p ${HOME}/.config/sunshine
|
||||
ln -s ${HOME}/.config/sunshine /config
|
||||
chown -R ${UNAME} ${HOME}
|
||||
_SETUP_USER
|
||||
|
||||
USER ${UNAME}
|
||||
WORKDIR ${HOME}
|
||||
|
||||
# entrypoint
|
||||
ENTRYPOINT ["/usr/bin/sunshine"]
|
||||
@@ -1,173 +0,0 @@
|
||||
# syntax=docker/dockerfile:1.4
|
||||
# artifacts: true
|
||||
# platforms: linux/amd64,linux/arm64/v8
|
||||
# platforms_pr: linux/amd64
|
||||
# no-cache-filters: sunshine-base,artifacts,sunshine
|
||||
ARG BASE=fedora
|
||||
ARG TAG=37
|
||||
FROM ${BASE}:${TAG} AS sunshine-base
|
||||
|
||||
FROM sunshine-base as sunshine-build
|
||||
|
||||
ARG TARGETPLATFORM
|
||||
RUN echo "target_platform: ${TARGETPLATFORM}"
|
||||
|
||||
ARG BRANCH
|
||||
ARG BUILD_VERSION
|
||||
ARG COMMIT
|
||||
# note: BUILD_VERSION may be blank
|
||||
|
||||
ENV BRANCH=${BRANCH}
|
||||
ENV BUILD_VERSION=${BUILD_VERSION}
|
||||
ENV COMMIT=${COMMIT}
|
||||
|
||||
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
|
||||
# install dependencies
|
||||
# hadolint ignore=DL3041
|
||||
RUN <<_DEPS
|
||||
#!/bin/bash
|
||||
set -e
|
||||
dnf -y update
|
||||
dnf -y group install "Development Tools"
|
||||
dnf -y install \
|
||||
boost-devel-1.78.* \
|
||||
cmake-3.27.* \
|
||||
gcc-12.2.* \
|
||||
gcc-c++-12.2.* \
|
||||
git \
|
||||
libappindicator-gtk3-devel \
|
||||
libcap-devel \
|
||||
libcurl-devel \
|
||||
libdrm-devel \
|
||||
libevdev-devel \
|
||||
libnotify-devel \
|
||||
libva-devel \
|
||||
libvdpau-devel \
|
||||
libX11-devel \
|
||||
libxcb-devel \
|
||||
libXcursor-devel \
|
||||
libXfixes-devel \
|
||||
libXi-devel \
|
||||
libXinerama-devel \
|
||||
libXrandr-devel \
|
||||
libXtst-devel \
|
||||
mesa-libGL-devel \
|
||||
nodejs-npm \
|
||||
numactl-devel \
|
||||
openssl-devel \
|
||||
opus-devel \
|
||||
pulseaudio-libs-devel \
|
||||
rpm-build \
|
||||
wget \
|
||||
which
|
||||
if [[ "${TARGETPLATFORM}" == 'linux/amd64' ]]; then
|
||||
dnf -y install intel-mediasdk-devel
|
||||
fi
|
||||
dnf clean all
|
||||
rm -rf /var/cache/yum
|
||||
_DEPS
|
||||
|
||||
# install cuda
|
||||
WORKDIR /build/cuda
|
||||
# versions: https://developer.nvidia.com/cuda-toolkit-archive
|
||||
ENV CUDA_VERSION="12.0.0"
|
||||
ENV CUDA_BUILD="525.60.13"
|
||||
# hadolint ignore=SC3010
|
||||
RUN <<_INSTALL_CUDA
|
||||
#!/bin/bash
|
||||
set -e
|
||||
cuda_prefix="https://developer.download.nvidia.com/compute/cuda/"
|
||||
cuda_suffix=""
|
||||
if [[ "${TARGETPLATFORM}" == 'linux/arm64' ]]; then
|
||||
cuda_suffix="_sbsa"
|
||||
fi
|
||||
url="${cuda_prefix}${CUDA_VERSION}/local_installers/cuda_${CUDA_VERSION}_${CUDA_BUILD}_linux${cuda_suffix}.run"
|
||||
echo "cuda url: ${url}"
|
||||
wget "$url" --progress=bar:force:noscroll -q --show-progress -O ./cuda.run
|
||||
chmod a+x ./cuda.run
|
||||
./cuda.run --silent --toolkit --toolkitpath=/build/cuda --no-opengl-libs --no-man-page --no-drm
|
||||
rm ./cuda.run
|
||||
_INSTALL_CUDA
|
||||
|
||||
# copy repository
|
||||
WORKDIR /build/sunshine/
|
||||
COPY --link .. .
|
||||
|
||||
# setup npm dependencies
|
||||
RUN npm install
|
||||
|
||||
# setup build directory
|
||||
WORKDIR /build/sunshine/build
|
||||
|
||||
# cmake and cpack
|
||||
RUN <<_MAKE
|
||||
#!/bin/bash
|
||||
set -e
|
||||
cmake \
|
||||
-DCMAKE_CUDA_COMPILER:PATH=/build/cuda/bin/nvcc \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DCMAKE_INSTALL_PREFIX=/usr \
|
||||
-DSUNSHINE_ASSETS_DIR=share/sunshine \
|
||||
-DSUNSHINE_EXECUTABLE_PATH=/usr/bin/sunshine \
|
||||
-DSUNSHINE_ENABLE_WAYLAND=ON \
|
||||
-DSUNSHINE_ENABLE_X11=ON \
|
||||
-DSUNSHINE_ENABLE_DRM=ON \
|
||||
-DSUNSHINE_ENABLE_CUDA=ON \
|
||||
/build/sunshine
|
||||
make -j "$(nproc)"
|
||||
cpack -G RPM
|
||||
_MAKE
|
||||
|
||||
FROM scratch AS artifacts
|
||||
ARG BASE
|
||||
ARG TAG
|
||||
ARG TARGETARCH
|
||||
COPY --link --from=sunshine-build /build/sunshine/build/cpack_artifacts/Sunshine.rpm /sunshine-${BASE}-${TAG}-${TARGETARCH}.rpm
|
||||
|
||||
FROM sunshine-base as sunshine
|
||||
|
||||
# copy deb from builder
|
||||
COPY --link --from=artifacts /sunshine*.rpm /sunshine.rpm
|
||||
|
||||
# install sunshine
|
||||
RUN <<_INSTALL_SUNSHINE
|
||||
#!/bin/bash
|
||||
set -e
|
||||
dnf -y update
|
||||
dnf -y install /sunshine.rpm
|
||||
dnf clean all
|
||||
rm -rf /var/cache/yum
|
||||
_INSTALL_SUNSHINE
|
||||
|
||||
# network setup
|
||||
EXPOSE 47984-47990/tcp
|
||||
EXPOSE 48010
|
||||
EXPOSE 47998-48000/udp
|
||||
|
||||
# setup user
|
||||
ARG PGID=1000
|
||||
ENV PGID=${PGID}
|
||||
ARG PUID=1000
|
||||
ENV PUID=${PUID}
|
||||
ENV TZ="UTC"
|
||||
ARG UNAME=lizard
|
||||
ENV UNAME=${UNAME}
|
||||
|
||||
ENV HOME=/home/$UNAME
|
||||
|
||||
# setup user
|
||||
RUN <<_SETUP_USER
|
||||
#!/bin/bash
|
||||
set -e
|
||||
groupadd -f -g "${PGID}" "${UNAME}"
|
||||
useradd -lm -d ${HOME} -s /bin/bash -g "${PGID}" -u "${PUID}" "${UNAME}"
|
||||
mkdir -p ${HOME}/.config/sunshine
|
||||
ln -s ${HOME}/.config/sunshine /config
|
||||
chown -R ${UNAME} ${HOME}
|
||||
_SETUP_USER
|
||||
|
||||
USER ${UNAME}
|
||||
WORKDIR ${HOME}
|
||||
|
||||
# entrypoint
|
||||
ENTRYPOINT ["/usr/bin/sunshine"]
|
||||
@@ -1,175 +0,0 @@
|
||||
# syntax=docker/dockerfile:1.4
|
||||
# artifacts: true
|
||||
# platforms: linux/amd64,linux/arm64/v8
|
||||
# platforms_pr: linux/amd64
|
||||
# no-cache-filters: sunshine-base,artifacts,sunshine
|
||||
ARG BASE=fedora
|
||||
ARG TAG=38
|
||||
FROM ${BASE}:${TAG} AS sunshine-base
|
||||
|
||||
FROM sunshine-base as sunshine-build
|
||||
|
||||
ARG TARGETPLATFORM
|
||||
RUN echo "target_platform: ${TARGETPLATFORM}"
|
||||
|
||||
ARG BRANCH
|
||||
ARG BUILD_VERSION
|
||||
ARG COMMIT
|
||||
# note: BUILD_VERSION may be blank
|
||||
|
||||
ENV BRANCH=${BRANCH}
|
||||
ENV BUILD_VERSION=${BUILD_VERSION}
|
||||
ENV COMMIT=${COMMIT}
|
||||
|
||||
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
|
||||
# install dependencies
|
||||
# hadolint ignore=DL3041
|
||||
RUN <<_DEPS
|
||||
#!/bin/bash
|
||||
set -e
|
||||
dnf -y update
|
||||
dnf -y group install "Development Tools"
|
||||
dnf -y install \
|
||||
boost-devel-1.78.0* \
|
||||
cmake-3.27.* \
|
||||
gcc-13.2.* \
|
||||
gcc-c++-13.2.* \
|
||||
git \
|
||||
libappindicator-gtk3-devel \
|
||||
libcap-devel \
|
||||
libcurl-devel \
|
||||
libdrm-devel \
|
||||
libevdev-devel \
|
||||
libnotify-devel \
|
||||
libva-devel \
|
||||
libvdpau-devel \
|
||||
libX11-devel \
|
||||
libxcb-devel \
|
||||
libXcursor-devel \
|
||||
libXfixes-devel \
|
||||
libXi-devel \
|
||||
libXinerama-devel \
|
||||
libXrandr-devel \
|
||||
libXtst-devel \
|
||||
mesa-libGL-devel \
|
||||
nodejs-npm \
|
||||
numactl-devel \
|
||||
openssl-devel \
|
||||
opus-devel \
|
||||
pulseaudio-libs-devel \
|
||||
rpm-build \
|
||||
wget \
|
||||
which
|
||||
if [[ "${TARGETPLATFORM}" == 'linux/amd64' ]]; then
|
||||
dnf -y install intel-mediasdk-devel
|
||||
fi
|
||||
dnf clean all
|
||||
rm -rf /var/cache/yum
|
||||
_DEPS
|
||||
|
||||
# todo - enable cuda once it's supported for gcc 13 and fedora 38
|
||||
## install cuda
|
||||
#WORKDIR /build/cuda
|
||||
## versions: https://developer.nvidia.com/cuda-toolkit-archive
|
||||
#ENV CUDA_VERSION="12.0.0"
|
||||
#ENV CUDA_BUILD="525.60.13"
|
||||
## hadolint ignore=SC3010
|
||||
#RUN <<_INSTALL_CUDA
|
||||
##!/bin/bash
|
||||
#set -e
|
||||
#cuda_prefix="https://developer.download.nvidia.com/compute/cuda/"
|
||||
#cuda_suffix=""
|
||||
#if [[ "${TARGETPLATFORM}" == 'linux/arm64' ]]; then
|
||||
# cuda_suffix="_sbsa"
|
||||
#fi
|
||||
#url="${cuda_prefix}${CUDA_VERSION}/local_installers/cuda_${CUDA_VERSION}_${CUDA_BUILD}_linux${cuda_suffix}.run"
|
||||
#echo "cuda url: ${url}"
|
||||
#wget "$url" --progress=bar:force:noscroll -q --show-progress -O ./cuda.run
|
||||
#chmod a+x ./cuda.run
|
||||
#./cuda.run --silent --toolkit --toolkitpath=/build/cuda --no-opengl-libs --no-man-page --no-drm
|
||||
#rm ./cuda.run
|
||||
#_INSTALL_CUDA
|
||||
|
||||
# copy repository
|
||||
WORKDIR /build/sunshine/
|
||||
COPY --link .. .
|
||||
|
||||
# setup npm dependencies
|
||||
RUN npm install
|
||||
|
||||
# setup build directory
|
||||
WORKDIR /build/sunshine/build
|
||||
|
||||
# cmake and cpack
|
||||
# todo - add cmake argument back in for cuda support "-DCMAKE_CUDA_COMPILER:PATH=/build/cuda/bin/nvcc \"
|
||||
# todo - re-enable "DSUNSHINE_ENABLE_CUDA"
|
||||
RUN <<_MAKE
|
||||
#!/bin/bash
|
||||
set -e
|
||||
cmake \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DCMAKE_INSTALL_PREFIX=/usr \
|
||||
-DSUNSHINE_ASSETS_DIR=share/sunshine \
|
||||
-DSUNSHINE_EXECUTABLE_PATH=/usr/bin/sunshine \
|
||||
-DSUNSHINE_ENABLE_WAYLAND=ON \
|
||||
-DSUNSHINE_ENABLE_X11=ON \
|
||||
-DSUNSHINE_ENABLE_DRM=ON \
|
||||
-DSUNSHINE_ENABLE_CUDA=OFF \
|
||||
/build/sunshine
|
||||
make -j "$(nproc)"
|
||||
cpack -G RPM
|
||||
_MAKE
|
||||
|
||||
FROM scratch AS artifacts
|
||||
ARG BASE
|
||||
ARG TAG
|
||||
ARG TARGETARCH
|
||||
COPY --link --from=sunshine-build /build/sunshine/build/cpack_artifacts/Sunshine.rpm /sunshine-${BASE}-${TAG}-${TARGETARCH}.rpm
|
||||
|
||||
FROM sunshine-base as sunshine
|
||||
|
||||
# copy deb from builder
|
||||
COPY --link --from=artifacts /sunshine*.rpm /sunshine.rpm
|
||||
|
||||
# install sunshine
|
||||
RUN <<_INSTALL_SUNSHINE
|
||||
#!/bin/bash
|
||||
set -e
|
||||
dnf -y update
|
||||
dnf -y install /sunshine.rpm
|
||||
dnf clean all
|
||||
rm -rf /var/cache/yum
|
||||
_INSTALL_SUNSHINE
|
||||
|
||||
# network setup
|
||||
EXPOSE 47984-47990/tcp
|
||||
EXPOSE 48010
|
||||
EXPOSE 47998-48000/udp
|
||||
|
||||
# setup user
|
||||
ARG PGID=1000
|
||||
ENV PGID=${PGID}
|
||||
ARG PUID=1000
|
||||
ENV PUID=${PUID}
|
||||
ENV TZ="UTC"
|
||||
ARG UNAME=lizard
|
||||
ENV UNAME=${UNAME}
|
||||
|
||||
ENV HOME=/home/$UNAME
|
||||
|
||||
# setup user
|
||||
RUN <<_SETUP_USER
|
||||
#!/bin/bash
|
||||
set -e
|
||||
groupadd -f -g "${PGID}" "${UNAME}"
|
||||
useradd -lm -d ${HOME} -s /bin/bash -g "${PGID}" -u "${PUID}" "${UNAME}"
|
||||
mkdir -p ${HOME}/.config/sunshine
|
||||
ln -s ${HOME}/.config/sunshine /config
|
||||
chown -R ${UNAME} ${HOME}
|
||||
_SETUP_USER
|
||||
|
||||
USER ${UNAME}
|
||||
WORKDIR ${HOME}
|
||||
|
||||
# entrypoint
|
||||
ENTRYPOINT ["/usr/bin/sunshine"]
|
||||
@@ -1,211 +0,0 @@
|
||||
# syntax=docker/dockerfile:1.4
|
||||
# artifacts: true
|
||||
# platforms: linux/amd64,linux/arm64/v8
|
||||
# platforms_pr: linux/amd64
|
||||
# no-cache-filters: sunshine-base,artifacts,sunshine
|
||||
ARG BASE=ubuntu
|
||||
ARG TAG=20.04
|
||||
FROM ${BASE}:${TAG} AS sunshine-base
|
||||
|
||||
ENV DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
FROM sunshine-base as sunshine-build
|
||||
|
||||
ARG TARGETPLATFORM
|
||||
RUN echo "target_platform: ${TARGETPLATFORM}"
|
||||
|
||||
ARG BRANCH
|
||||
ARG BUILD_VERSION
|
||||
ARG COMMIT
|
||||
# note: BUILD_VERSION may be blank
|
||||
|
||||
ENV BRANCH=${BRANCH}
|
||||
ENV BUILD_VERSION=${BUILD_VERSION}
|
||||
ENV COMMIT=${COMMIT}
|
||||
|
||||
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
|
||||
# install dependencies
|
||||
RUN <<_DEPS
|
||||
#!/bin/bash
|
||||
set -e
|
||||
apt-get update -y
|
||||
apt-get install -y --no-install-recommends \
|
||||
build-essential \
|
||||
gcc-10=10.5.* \
|
||||
g++-10=10.5.* \
|
||||
git \
|
||||
libayatana-appindicator3-dev \
|
||||
libavdevice-dev \
|
||||
libboost-filesystem-dev=1.71.* \
|
||||
libboost-locale-dev=1.71.* \
|
||||
libboost-log-dev=1.71.* \
|
||||
libboost-program-options-dev=1.71.* \
|
||||
libcap-dev \
|
||||
libcurl4-openssl-dev \
|
||||
libdrm-dev \
|
||||
libevdev-dev \
|
||||
libnotify-dev \
|
||||
libnuma-dev \
|
||||
libopus-dev \
|
||||
libpulse-dev \
|
||||
libssl-dev \
|
||||
libva-dev \
|
||||
libvdpau-dev \
|
||||
libwayland-dev \
|
||||
libx11-dev \
|
||||
libxcb-shm0-dev \
|
||||
libxcb-xfixes0-dev \
|
||||
libxcb1-dev \
|
||||
libxfixes-dev \
|
||||
libxrandr-dev \
|
||||
libxtst-dev \
|
||||
nodejs \
|
||||
npm \
|
||||
wget
|
||||
if [[ "${TARGETPLATFORM}" == 'linux/amd64' ]]; then
|
||||
apt-get install -y --no-install-recommends \
|
||||
libmfx-dev
|
||||
fi
|
||||
apt-get clean
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
_DEPS
|
||||
|
||||
# Update gcc alias
|
||||
# https://stackoverflow.com/a/70653945/11214013
|
||||
RUN <<_GCC_ALIAS
|
||||
#!/bin/bash
|
||||
set -e
|
||||
update-alternatives --install \
|
||||
/usr/bin/gcc gcc /usr/bin/gcc-10 100 \
|
||||
--slave /usr/bin/g++ g++ /usr/bin/g++-10 \
|
||||
--slave /usr/bin/gcov gcov /usr/bin/gcov-10 \
|
||||
--slave /usr/bin/gcc-ar gcc-ar /usr/bin/gcc-ar-10 \
|
||||
--slave /usr/bin/gcc-ranlib gcc-ranlib /usr/bin/gcc-ranlib-10
|
||||
_GCC_ALIAS
|
||||
|
||||
# install cmake
|
||||
# sunshine requires cmake >= 3.18
|
||||
WORKDIR /build/cmake
|
||||
# https://cmake.org/download/
|
||||
ENV CMAKE_VERSION="3.25.1"
|
||||
# hadolint ignore=SC3010
|
||||
RUN <<_INSTALL_CMAKE
|
||||
#!/bin/bash
|
||||
set -e
|
||||
cmake_prefix="https://github.com/Kitware/CMake/releases/download/v"
|
||||
if [[ "${TARGETPLATFORM}" == 'linux/amd64' ]]; then
|
||||
cmake_arch="x86_64"
|
||||
elif [[ "${TARGETPLATFORM}" == 'linux/arm64' ]]; then
|
||||
cmake_arch="aarch64"
|
||||
fi
|
||||
url="${cmake_prefix}${CMAKE_VERSION}/cmake-${CMAKE_VERSION}-linux-${cmake_arch}.sh"
|
||||
echo "cmake url: ${url}"
|
||||
wget "$url" --progress=bar:force:noscroll -q --show-progress -O ./cmake.sh
|
||||
sh ./cmake.sh --prefix=/usr/local --skip-license
|
||||
rm ./cmake.sh
|
||||
_INSTALL_CMAKE
|
||||
|
||||
# install cuda
|
||||
WORKDIR /build/cuda
|
||||
# versions: https://developer.nvidia.com/cuda-toolkit-archive
|
||||
ENV CUDA_VERSION="11.8.0"
|
||||
ENV CUDA_BUILD="520.61.05"
|
||||
# hadolint ignore=SC3010
|
||||
RUN <<_INSTALL_CUDA
|
||||
#!/bin/bash
|
||||
set -e
|
||||
cuda_prefix="https://developer.download.nvidia.com/compute/cuda/"
|
||||
cuda_suffix=""
|
||||
if [[ "${TARGETPLATFORM}" == 'linux/arm64' ]]; then
|
||||
cuda_suffix="_sbsa"
|
||||
fi
|
||||
url="${cuda_prefix}${CUDA_VERSION}/local_installers/cuda_${CUDA_VERSION}_${CUDA_BUILD}_linux${cuda_suffix}.run"
|
||||
echo "cuda url: ${url}"
|
||||
wget "$url" --progress=bar:force:noscroll -q --show-progress -O ./cuda.run
|
||||
chmod a+x ./cuda.run
|
||||
./cuda.run --silent --toolkit --toolkitpath=/build/cuda --no-opengl-libs --no-man-page --no-drm
|
||||
rm ./cuda.run
|
||||
_INSTALL_CUDA
|
||||
|
||||
# copy repository
|
||||
WORKDIR /build/sunshine/
|
||||
COPY --link .. .
|
||||
|
||||
# setup npm dependencies
|
||||
RUN npm install
|
||||
|
||||
# setup build directory
|
||||
WORKDIR /build/sunshine/build
|
||||
|
||||
# cmake and cpack
|
||||
RUN <<_MAKE
|
||||
#!/bin/bash
|
||||
set -e
|
||||
cmake \
|
||||
-DCMAKE_CUDA_COMPILER:PATH=/build/cuda/bin/nvcc \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DCMAKE_INSTALL_PREFIX=/usr \
|
||||
-DSUNSHINE_ASSETS_DIR=share/sunshine \
|
||||
-DSUNSHINE_EXECUTABLE_PATH=/usr/bin/sunshine \
|
||||
-DSUNSHINE_ENABLE_WAYLAND=ON \
|
||||
-DSUNSHINE_ENABLE_X11=ON \
|
||||
-DSUNSHINE_ENABLE_DRM=ON \
|
||||
-DSUNSHINE_ENABLE_CUDA=ON \
|
||||
/build/sunshine
|
||||
make -j "$(nproc)"
|
||||
cpack -G DEB
|
||||
_MAKE
|
||||
|
||||
FROM scratch AS artifacts
|
||||
ARG BASE
|
||||
ARG TAG
|
||||
ARG TARGETARCH
|
||||
COPY --link --from=sunshine-build /build/sunshine/build/cpack_artifacts/Sunshine.deb /sunshine-${BASE}-${TAG}-${TARGETARCH}.deb
|
||||
|
||||
FROM sunshine-base as sunshine
|
||||
|
||||
# copy deb from builder
|
||||
COPY --link --from=artifacts /sunshine*.deb /sunshine.deb
|
||||
|
||||
# install sunshine
|
||||
RUN <<_INSTALL_SUNSHINE
|
||||
#!/bin/bash
|
||||
set -e
|
||||
apt-get update -y
|
||||
apt-get install -y --no-install-recommends /sunshine.deb
|
||||
apt-get clean
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
_INSTALL_SUNSHINE
|
||||
|
||||
# network setup
|
||||
EXPOSE 47984-47990/tcp
|
||||
EXPOSE 48010
|
||||
EXPOSE 47998-48000/udp
|
||||
|
||||
# setup user
|
||||
ARG PGID=1000
|
||||
ENV PGID=${PGID}
|
||||
ARG PUID=1000
|
||||
ENV PUID=${PUID}
|
||||
ENV TZ="UTC"
|
||||
ARG UNAME=lizard
|
||||
ENV UNAME=${UNAME}
|
||||
|
||||
ENV HOME=/home/$UNAME
|
||||
|
||||
# setup user
|
||||
RUN <<_SETUP_USER
|
||||
#!/bin/bash
|
||||
set -e
|
||||
groupadd -f -g "${PGID}" "${UNAME}"
|
||||
useradd -lm -d ${HOME} -s /bin/bash -g "${PGID}" -u "${PUID}" "${UNAME}"
|
||||
mkdir -p ${HOME}/.config/sunshine
|
||||
ln -s ${HOME}/.config/sunshine /config
|
||||
chown -R ${UNAME} ${HOME}
|
||||
_SETUP_USER
|
||||
|
||||
USER ${UNAME}
|
||||
WORKDIR ${HOME}
|
||||
|
||||
# entrypoint
|
||||
ENTRYPOINT ["/usr/bin/sunshine"]
|
||||
@@ -1,4 +1,4 @@
|
||||
# syntax=docker/dockerfile:1.4
|
||||
# syntax=docker/dockerfile:1
|
||||
# artifacts: true
|
||||
# platforms: linux/amd64,linux/arm64/v8
|
||||
# platforms_pr: linux/amd64
|
||||
@@ -9,10 +9,7 @@ FROM ${BASE}:${TAG} AS sunshine-base
|
||||
|
||||
ENV DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
FROM sunshine-base as sunshine-build
|
||||
|
||||
ARG TARGETPLATFORM
|
||||
RUN echo "target_platform: ${TARGETPLATFORM}"
|
||||
FROM sunshine-base AS sunshine-build
|
||||
|
||||
ARG BRANCH
|
||||
ARG BUILD_VERSION
|
||||
@@ -24,101 +21,35 @@ ENV BUILD_VERSION=${BUILD_VERSION}
|
||||
ENV COMMIT=${COMMIT}
|
||||
|
||||
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
|
||||
# install dependencies
|
||||
RUN <<_DEPS
|
||||
#!/bin/bash
|
||||
set -e
|
||||
apt-get update -y
|
||||
apt-get install -y --no-install-recommends \
|
||||
build-essential \
|
||||
cmake=3.22.* \
|
||||
git \
|
||||
libayatana-appindicator3-dev \
|
||||
libavdevice-dev \
|
||||
libboost-filesystem-dev=1.74.* \
|
||||
libboost-locale-dev=1.74.* \
|
||||
libboost-log-dev=1.74.* \
|
||||
libboost-program-options-dev=1.74.* \
|
||||
libcap-dev \
|
||||
libcurl4-openssl-dev \
|
||||
libdrm-dev \
|
||||
libevdev-dev \
|
||||
libnotify-dev \
|
||||
libnuma-dev \
|
||||
libopus-dev \
|
||||
libpulse-dev \
|
||||
libssl-dev \
|
||||
libva-dev \
|
||||
libvdpau-dev \
|
||||
libwayland-dev \
|
||||
libx11-dev \
|
||||
libxcb-shm0-dev \
|
||||
libxcb-xfixes0-dev \
|
||||
libxcb1-dev \
|
||||
libxfixes-dev \
|
||||
libxrandr-dev \
|
||||
libxtst-dev \
|
||||
nodejs \
|
||||
npm \
|
||||
wget
|
||||
if [[ "${TARGETPLATFORM}" == 'linux/amd64' ]]; then
|
||||
apt-get install -y --no-install-recommends \
|
||||
libmfx-dev
|
||||
fi
|
||||
apt-get clean
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
_DEPS
|
||||
|
||||
# install cuda
|
||||
WORKDIR /build/cuda
|
||||
# versions: https://developer.nvidia.com/cuda-toolkit-archive
|
||||
ENV CUDA_VERSION="11.8.0"
|
||||
ENV CUDA_BUILD="520.61.05"
|
||||
# hadolint ignore=SC3010
|
||||
RUN <<_INSTALL_CUDA
|
||||
#!/bin/bash
|
||||
set -e
|
||||
cuda_prefix="https://developer.download.nvidia.com/compute/cuda/"
|
||||
cuda_suffix=""
|
||||
if [[ "${TARGETPLATFORM}" == 'linux/arm64' ]]; then
|
||||
cuda_suffix="_sbsa"
|
||||
fi
|
||||
url="${cuda_prefix}${CUDA_VERSION}/local_installers/cuda_${CUDA_VERSION}_${CUDA_BUILD}_linux${cuda_suffix}.run"
|
||||
echo "cuda url: ${url}"
|
||||
wget "$url" --progress=bar:force:noscroll -q --show-progress -O ./cuda.run
|
||||
chmod a+x ./cuda.run
|
||||
./cuda.run --silent --toolkit --toolkitpath=/build/cuda --no-opengl-libs --no-man-page --no-drm
|
||||
rm ./cuda.run
|
||||
_INSTALL_CUDA
|
||||
|
||||
# copy repository
|
||||
WORKDIR /build/sunshine/
|
||||
COPY --link .. .
|
||||
|
||||
# setup npm dependencies
|
||||
RUN npm install
|
||||
|
||||
# setup build directory
|
||||
WORKDIR /build/sunshine/build
|
||||
|
||||
# cmake and cpack
|
||||
RUN <<_MAKE
|
||||
RUN <<_BUILD
|
||||
#!/bin/bash
|
||||
set -e
|
||||
cmake \
|
||||
-DCMAKE_CUDA_COMPILER:PATH=/build/cuda/bin/nvcc \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DCMAKE_INSTALL_PREFIX=/usr \
|
||||
-DSUNSHINE_ASSETS_DIR=share/sunshine \
|
||||
-DSUNSHINE_EXECUTABLE_PATH=/usr/bin/sunshine \
|
||||
-DSUNSHINE_ENABLE_WAYLAND=ON \
|
||||
-DSUNSHINE_ENABLE_X11=ON \
|
||||
-DSUNSHINE_ENABLE_DRM=ON \
|
||||
-DSUNSHINE_ENABLE_CUDA=ON \
|
||||
/build/sunshine
|
||||
make -j "$(nproc)"
|
||||
cpack -G DEB
|
||||
_MAKE
|
||||
chmod +x ./scripts/linux_build.sh
|
||||
./scripts/linux_build.sh \
|
||||
--publisher-name='LizardByte' \
|
||||
--publisher-website='https://app.lizardbyte.dev' \
|
||||
--publisher-issue-url='https://app.lizardbyte.dev/support' \
|
||||
--sudo-off
|
||||
apt-get clean
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
_BUILD
|
||||
|
||||
# run tests
|
||||
WORKDIR /build/sunshine/build/tests
|
||||
# hadolint ignore=SC1091
|
||||
RUN <<_TEST
|
||||
#!/bin/bash
|
||||
set -e
|
||||
export DISPLAY=:1
|
||||
Xvfb ${DISPLAY} -screen 0 1024x768x24 &
|
||||
./test_sunshine --gtest_color=yes
|
||||
_TEST
|
||||
|
||||
FROM scratch AS artifacts
|
||||
ARG BASE
|
||||
@@ -126,7 +57,7 @@ ARG TAG
|
||||
ARG TARGETARCH
|
||||
COPY --link --from=sunshine-build /build/sunshine/build/cpack_artifacts/Sunshine.deb /sunshine-${BASE}-${TAG}-${TARGETARCH}.deb
|
||||
|
||||
FROM sunshine-base as sunshine
|
||||
FROM sunshine-base AS sunshine
|
||||
|
||||
# copy deb from builder
|
||||
COPY --link --from=artifacts /sunshine*.deb /sunshine.deb
|
||||
|
||||
106
docker/ubuntu-24.04.dockerfile
Normal file
106
docker/ubuntu-24.04.dockerfile
Normal file
@@ -0,0 +1,106 @@
|
||||
# syntax=docker/dockerfile:1
|
||||
# artifacts: true
|
||||
# platforms: linux/amd64,linux/arm64/v8
|
||||
# platforms_pr: linux/amd64
|
||||
# no-cache-filters: sunshine-base,artifacts,sunshine
|
||||
ARG BASE=ubuntu
|
||||
ARG TAG=24.04
|
||||
FROM ${BASE}:${TAG} AS sunshine-base
|
||||
|
||||
ENV DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
FROM sunshine-base AS sunshine-build
|
||||
|
||||
ARG BRANCH
|
||||
ARG BUILD_VERSION
|
||||
ARG COMMIT
|
||||
# note: BUILD_VERSION may be blank
|
||||
|
||||
ENV BRANCH=${BRANCH}
|
||||
ENV BUILD_VERSION=${BUILD_VERSION}
|
||||
ENV COMMIT=${COMMIT}
|
||||
|
||||
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
|
||||
|
||||
# copy repository
|
||||
WORKDIR /build/sunshine/
|
||||
COPY --link .. .
|
||||
|
||||
# cmake and cpack
|
||||
RUN <<_BUILD
|
||||
#!/bin/bash
|
||||
set -e
|
||||
chmod +x ./scripts/linux_build.sh
|
||||
./scripts/linux_build.sh \
|
||||
--publisher-name='LizardByte' \
|
||||
--publisher-website='https://app.lizardbyte.dev' \
|
||||
--publisher-issue-url='https://app.lizardbyte.dev/support' \
|
||||
--sudo-off
|
||||
apt-get clean
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
_BUILD
|
||||
|
||||
# run tests
|
||||
WORKDIR /build/sunshine/build/tests
|
||||
# hadolint ignore=SC1091
|
||||
RUN <<_TEST
|
||||
#!/bin/bash
|
||||
set -e
|
||||
export DISPLAY=:1
|
||||
Xvfb ${DISPLAY} -screen 0 1024x768x24 &
|
||||
./test_sunshine --gtest_color=yes
|
||||
_TEST
|
||||
|
||||
FROM scratch AS artifacts
|
||||
ARG BASE
|
||||
ARG TAG
|
||||
ARG TARGETARCH
|
||||
COPY --link --from=sunshine-build /build/sunshine/build/cpack_artifacts/Sunshine.deb /sunshine-${BASE}-${TAG}-${TARGETARCH}.deb
|
||||
|
||||
FROM sunshine-base AS sunshine
|
||||
|
||||
# copy deb from builder
|
||||
COPY --link --from=artifacts /sunshine*.deb /sunshine.deb
|
||||
|
||||
# install sunshine
|
||||
RUN <<_INSTALL_SUNSHINE
|
||||
#!/bin/bash
|
||||
set -e
|
||||
apt-get update -y
|
||||
apt-get install -y --no-install-recommends /sunshine.deb
|
||||
apt-get clean
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
_INSTALL_SUNSHINE
|
||||
|
||||
# network setup
|
||||
EXPOSE 47984-47990/tcp
|
||||
EXPOSE 48010
|
||||
EXPOSE 47998-48000/udp
|
||||
|
||||
# setup user
|
||||
ARG PGID=1001
|
||||
ENV PGID=${PGID}
|
||||
ARG PUID=1001
|
||||
ENV PUID=${PUID}
|
||||
ENV TZ="UTC"
|
||||
ARG UNAME=lizard
|
||||
ENV UNAME=${UNAME}
|
||||
|
||||
ENV HOME=/home/$UNAME
|
||||
|
||||
# setup user
|
||||
RUN <<_SETUP_USER
|
||||
#!/bin/bash
|
||||
set -e
|
||||
groupadd -f -g "${PGID}" "${UNAME}"
|
||||
useradd -lm -d ${HOME} -s /bin/bash -g "${PGID}" -u "${PUID}" "${UNAME}"
|
||||
mkdir -p ${HOME}/.config/sunshine
|
||||
ln -s ${HOME}/.config/sunshine /config
|
||||
chown -R ${UNAME} ${HOME}
|
||||
_SETUP_USER
|
||||
|
||||
USER ${UNAME}
|
||||
WORKDIR ${HOME}
|
||||
|
||||
# entrypoint
|
||||
ENTRYPOINT ["/usr/bin/sunshine"]
|
||||
2802
docs/Doxyfile
2802
docs/Doxyfile
File diff suppressed because it is too large
Load Diff
@@ -1,20 +0,0 @@
|
||||
# Minimal makefile for Sphinx documentation
|
||||
#
|
||||
|
||||
# You can set these variables from the command line, and also
|
||||
# from the environment for the first two.
|
||||
SPHINXOPTS ?=
|
||||
SPHINXBUILD ?= sphinx-build
|
||||
SOURCEDIR = source
|
||||
BUILDDIR = build
|
||||
|
||||
# Put it first so that "make" without argument is like "make help".
|
||||
help:
|
||||
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
|
||||
|
||||
.PHONY: help Makefile
|
||||
|
||||
# Catch-all target: route all unknown targets to Sphinx using the new
|
||||
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
|
||||
%: Makefile
|
||||
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
|
||||
130
docs/api.js
Normal file
130
docs/api.js
Normal file
@@ -0,0 +1,130 @@
|
||||
function generateExamples(endpoint, method, body = null) {
|
||||
let curlBodyString = '';
|
||||
let psBodyString = '';
|
||||
|
||||
if (body) {
|
||||
const curlJsonString = JSON.stringify(body).replace(/"/g, '\\"');
|
||||
curlBodyString = ` -d "${curlJsonString}"`;
|
||||
psBodyString = `-Body (ConvertTo-Json ${JSON.stringify(body)})`;
|
||||
}
|
||||
|
||||
return {
|
||||
cURL: `curl -u user:pass -X ${method.trim()} -k https://localhost:47990${endpoint.trim()}${curlBodyString}`,
|
||||
Python: `import json
|
||||
import requests
|
||||
from requests.auth import HTTPBasicAuth
|
||||
|
||||
requests.${method.trim().toLowerCase()}(
|
||||
auth=HTTPBasicAuth('user', 'pass'),
|
||||
url='https://localhost:47990${endpoint.trim()}',
|
||||
verify=False,${body ? `\n json=${JSON.stringify(body)},` : ''}
|
||||
).json()`,
|
||||
JavaScript: `fetch('https://localhost:47990${endpoint.trim()}', {
|
||||
method: '${method.trim()}',
|
||||
headers: {
|
||||
'Authorization': 'Basic ' + btoa('user:pass'),
|
||||
'Content-Type': 'application/json',
|
||||
}${body ? `,\n body: JSON.stringify(${JSON.stringify(body)}),` : ''}
|
||||
})
|
||||
.then(response => response.json())
|
||||
.then(data => console.log(data));`,
|
||||
PowerShell: `Invoke-RestMethod \`
|
||||
-SkipCertificateCheck \`
|
||||
-Uri 'https://localhost:47990${endpoint.trim()}' \`
|
||||
-Method ${method.trim()} \`
|
||||
-Headers @{Authorization = 'Basic ' + [Convert]::ToBase64String([Text.Encoding]::ASCII.GetBytes('user:pass'))}
|
||||
${psBodyString}`
|
||||
};
|
||||
}
|
||||
|
||||
function hashString(str) {
|
||||
let hash = 0;
|
||||
for (let i = 0; i < str.length; i++) {
|
||||
const char = str.charCodeAt(i);
|
||||
hash = (hash << 5) - hash + char;
|
||||
hash |= 0; // Convert to 32bit integer
|
||||
}
|
||||
return hash;
|
||||
}
|
||||
|
||||
function createTabs(examples) {
|
||||
const languages = Object.keys(examples);
|
||||
let tabs = '<div class="tabs-overview-container"><div class="tabs-overview">';
|
||||
let content = '<div class="tab-content">';
|
||||
|
||||
languages.forEach((lang, index) => {
|
||||
const hash = hashString(examples[lang]);
|
||||
tabs += `<button class="tab-button ${index === 0 ? 'active' : ''}" onclick="openTab(event, '${lang}')"><b class="tab-title" title=" ${lang} "> ${lang} </b></button>`;
|
||||
content += `<div id="${lang}" class="tabcontent" style="display: ${index === 0 ? 'block' : 'none'};">
|
||||
<div class="doxygen-awesome-fragment-wrapper">
|
||||
<div class="fragment">
|
||||
${examples[lang].split('\n').map(line => `<div class="line">${line}</div>`).join('')}
|
||||
</div>
|
||||
<doxygen-awesome-fragment-copy-button id="copy-button-${lang}-${hash}" title="Copy to clipboard">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24">
|
||||
<path d="M0 0h24v24H0V0z" fill="none"></path>
|
||||
<path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"></path>
|
||||
</svg>
|
||||
</doxygen-awesome-fragment-copy-button>
|
||||
</div>
|
||||
</div>`;
|
||||
});
|
||||
|
||||
tabs += '</div></div>';
|
||||
content += '</div>';
|
||||
|
||||
setTimeout(() => {
|
||||
languages.forEach((lang, index) => {
|
||||
const hash = hashString(examples[lang]);
|
||||
const copyButton = document.getElementById(`copy-button-${lang}-${hash}`);
|
||||
copyButton.addEventListener('click', copyContent);
|
||||
});
|
||||
}, 0);
|
||||
|
||||
return tabs + content;
|
||||
}
|
||||
|
||||
function copyContent() {
|
||||
const content = this.previousElementSibling.cloneNode(true);
|
||||
if (content instanceof Element) {
|
||||
// filter out line number from file listings
|
||||
content.querySelectorAll(".lineno, .ttc").forEach((node) => {
|
||||
node.remove();
|
||||
});
|
||||
let textContent = Array.from(content.querySelectorAll('.line'))
|
||||
.map(line => line.innerText)
|
||||
.join('\n')
|
||||
.trim(); // Join lines with newline characters and trim leading/trailing whitespace
|
||||
navigator.clipboard.writeText(textContent);
|
||||
this.classList.add("success");
|
||||
this.innerHTML = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24"><path d="M0 0h24v24H0V0z" fill="none"/><path d="M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41L9 16.17z"/></svg>`;
|
||||
window.setTimeout(() => {
|
||||
this.classList.remove("success");
|
||||
this.innerHTML = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24"><path d="M0 0h24v24H0V0z" fill="none"/><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"/></svg>`;
|
||||
}, 980);
|
||||
} else {
|
||||
console.error('Failed to copy: content is not a DOM element');
|
||||
}
|
||||
}
|
||||
|
||||
function openTab(evt, lang) {
|
||||
const tabcontent = document.getElementsByClassName("tabcontent");
|
||||
for (const content of tabcontent) {
|
||||
content.style.display = "none";
|
||||
}
|
||||
|
||||
const tablinks = document.getElementsByClassName("tab-button");
|
||||
for (const link of tablinks) {
|
||||
link.className = link.className.replace(" active", "");
|
||||
}
|
||||
|
||||
const selectedTabs = document.querySelectorAll(`#${lang}`);
|
||||
for (const tab of selectedTabs) {
|
||||
tab.style.display = "block";
|
||||
}
|
||||
|
||||
const selectedButtons = document.querySelectorAll(`.tab-button[onclick*="${lang}"]`);
|
||||
for (const button of selectedButtons) {
|
||||
button.className += " active";
|
||||
}
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user