mirror of
https://github.com/WarmUpTill/SceneSwitcher.git
synced 2026-03-22 01:44:49 -05:00
Compare commits
2097 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9301ead060 | ||
|
|
bc29ece526 | ||
|
|
4158c7a363 | ||
|
|
944d1059da | ||
|
|
bf18d8e106 | ||
|
|
bf216e0917 | ||
|
|
2405b6dbbf | ||
|
|
e64f2d195e | ||
|
|
f66bec8caf | ||
|
|
3eb79e3adb | ||
|
|
07e2ac3ca0 | ||
|
|
8e2c466c2d | ||
|
|
cc68e2366c | ||
|
|
7a0e08b0d8 | ||
|
|
be8744f0d0 | ||
|
|
d4425df694 | ||
|
|
70e5f6002d | ||
|
|
ff98ec36d6 | ||
|
|
4966802f14 | ||
|
|
b23a90557f | ||
|
|
d6ea815b85 | ||
|
|
f35ef558ee | ||
|
|
d7ff9088f8 | ||
|
|
7048925d6e | ||
|
|
fcb3ea50d3 | ||
|
|
87c45e2b32 | ||
|
|
eb5046a9d6 | ||
|
|
58c05f3f6e | ||
|
|
0b284da3de | ||
|
|
03fe7016e4 | ||
|
|
2ea89912a3 | ||
|
|
78d2efa083 | ||
|
|
149fce1c2b | ||
|
|
2dd9120265 | ||
|
|
3a9f315b67 | ||
|
|
6ba01dca39 | ||
|
|
ad1f1effeb | ||
|
|
0a53a8649f | ||
|
|
7ea721f9f1 | ||
|
|
718a899a98 | ||
|
|
4c493451f4 | ||
|
|
a8d483f5a7 | ||
|
|
dc786a5313 | ||
|
|
628a4d896c | ||
|
|
74a9681c8e | ||
|
|
faf52c38bb | ||
|
|
bad1a548fb | ||
|
|
f706416df5 | ||
|
|
c344c88acd | ||
|
|
2cd9e61717 | ||
|
|
6314de8f37 | ||
|
|
6bfcabc4af | ||
|
|
69711d973a | ||
|
|
225913b44d | ||
|
|
7c6d657fdd | ||
|
|
12e38274f5 | ||
|
|
5d49e8825b | ||
|
|
21c34356ed | ||
|
|
266e470509 | ||
|
|
de20c93b14 | ||
|
|
b0d877db8c | ||
|
|
caf9e59475 | ||
|
|
5f6982b5bb | ||
|
|
ce399cc647 | ||
|
|
03f67534c7 | ||
|
|
246667e65e | ||
|
|
68fe7716e7 | ||
|
|
98cc710b4a | ||
|
|
c602c30c54 | ||
|
|
cc1b89fe1d | ||
|
|
1de4ef7ec2 | ||
|
|
e29060fdea | ||
|
|
a0e6e6f528 | ||
|
|
e30d5845fa | ||
|
|
d12911cd02 | ||
|
|
b8ecc40e8c | ||
|
|
8ec4849b1d | ||
|
|
e6e9f3a831 | ||
|
|
555f7c1381 | ||
|
|
f0f8b0fd92 | ||
|
|
661e83162f | ||
|
|
4606f80a9d | ||
|
|
9c109742fb | ||
|
|
b8b0682aaf | ||
|
|
f93175db77 | ||
|
|
8f92ba3ffa | ||
|
|
0d56de11d1 | ||
|
|
e1020a1909 | ||
|
|
8b0bd4193b | ||
|
|
d55bb6bc86 | ||
|
|
0583331bfd | ||
|
|
6932de866d | ||
|
|
00db0cf7c4 | ||
|
|
e9baf27ca2 | ||
|
|
b1a5db0c9c | ||
|
|
8f3b868fd9 | ||
|
|
b3bf89840b | ||
|
|
84f7d0d214 | ||
|
|
e1164c4fa3 | ||
|
|
4534b23bad | ||
|
|
5d6a693f36 | ||
|
|
a82662c8f4 | ||
|
|
602675b3b3 | ||
|
|
9551519cb9 | ||
|
|
badce063eb | ||
|
|
10d45c67d6 | ||
|
|
0b77ef5081 | ||
|
|
8f54e71e61 | ||
|
|
16136b8741 | ||
|
|
02d5051974 | ||
|
|
078d62fa18 | ||
|
|
8aa6a7df2c | ||
|
|
1494b1db6c | ||
|
|
b4b3dc5a2b | ||
|
|
ee41a8d58b | ||
|
|
5f2237ac2a | ||
|
|
6fb76e7e07 | ||
|
|
ba094372a9 | ||
|
|
0c886c8679 | ||
|
|
d9f05d3f7b | ||
|
|
c99b5f1feb | ||
|
|
a3b3cf9818 | ||
|
|
ca3bbf5660 | ||
|
|
18524761a6 | ||
|
|
85222aed33 | ||
|
|
84132f7c37 | ||
|
|
ead664763f | ||
|
|
a2fa16f2d7 | ||
|
|
75edcffac9 | ||
|
|
dd5bcf425a | ||
|
|
de32e1b18e | ||
|
|
1d412a818d | ||
|
|
c8e5b561ef | ||
|
|
a1702dc798 | ||
|
|
ae571583fc | ||
|
|
c4f70657d9 | ||
|
|
7901a988af | ||
|
|
d2b70bbc6b | ||
|
|
4d22a539f0 | ||
|
|
4e561320f7 | ||
|
|
0dfa4fe2c0 | ||
|
|
4cac4584f3 | ||
|
|
d20a975c4f | ||
|
|
756d7bbd3c | ||
|
|
395a18fa4c | ||
|
|
2ea00d94c5 | ||
|
|
058e941a46 | ||
|
|
ea4a951554 | ||
|
|
3c355ac6fe | ||
|
|
37606e274c | ||
|
|
3e8d6e103a | ||
|
|
4cae420ade | ||
|
|
b27a11931a | ||
|
|
92616bed6b | ||
|
|
b3f38851b6 | ||
|
|
bf7fe71ae3 | ||
|
|
12a6b26d9a | ||
|
|
373e74c080 | ||
|
|
f3e7eaf212 | ||
|
|
b036736547 | ||
|
|
817de13e9d | ||
|
|
0b774c171d | ||
|
|
be8f7bd70f | ||
|
|
5f963b5b7d | ||
|
|
c6155c9fea | ||
|
|
be809dbfab | ||
|
|
7478c149b3 | ||
|
|
f4eaa9785d | ||
|
|
49c0de3f1b | ||
|
|
101ef4e973 | ||
|
|
82568b23e8 | ||
|
|
0cd7004f6a | ||
|
|
40c62ba700 | ||
|
|
f2c7b532d9 | ||
|
|
456a9c04c7 | ||
|
|
3e1fdbde45 | ||
|
|
874b9b86e2 | ||
|
|
98d1f83acc | ||
|
|
7e91f81957 | ||
|
|
20488afdd1 | ||
|
|
d9d387ad47 | ||
|
|
0736d673e1 | ||
|
|
34151e4bc6 | ||
|
|
1346c19bec | ||
|
|
be6bc48231 | ||
|
|
79a8ad57af | ||
|
|
daeb9275a3 | ||
|
|
73b542a4db | ||
|
|
e3471066e9 | ||
|
|
ec41c06b4d | ||
|
|
201e45d058 | ||
|
|
b17aa30432 | ||
|
|
93703c80bc | ||
|
|
d7951a7179 | ||
|
|
d42a3b584a | ||
|
|
becd1bd02a | ||
|
|
30422aecf3 | ||
|
|
c567e6ef7f | ||
|
|
1ca61f3ed4 | ||
|
|
1affe9dce3 | ||
|
|
406e3c1855 | ||
|
|
c05dd40c4c | ||
|
|
9a86ecac42 | ||
|
|
721a786e79 | ||
|
|
32d29875ed | ||
|
|
0e5f56b562 | ||
|
|
5490fabf92 | ||
|
|
5e3ab19940 | ||
|
|
1c94a1ab44 | ||
|
|
34baa56134 | ||
|
|
5ce4171773 | ||
|
|
c281c6db83 | ||
|
|
c43439ee64 | ||
|
|
a84731b8fe | ||
|
|
61fbff5821 | ||
|
|
1381654fed | ||
|
|
9805601c07 | ||
|
|
fcf57ee031 | ||
|
|
ba3e87a761 | ||
|
|
3dd3f576c3 | ||
|
|
7403a18e96 | ||
|
|
56494480ba | ||
|
|
cdc5d16e95 | ||
|
|
27aed79305 | ||
|
|
7ec95e33eb | ||
|
|
98260b25a1 | ||
|
|
45b37de9f7 | ||
|
|
027a3e9074 | ||
|
|
cab50e0922 | ||
|
|
88514e209d | ||
|
|
4ed7f13b72 | ||
|
|
0fb11ac274 | ||
|
|
942933290a | ||
|
|
f13beaead2 | ||
|
|
13dba6527d | ||
|
|
b78a6510a9 | ||
|
|
6c22f438b6 | ||
|
|
347abe6c84 | ||
|
|
230863adda | ||
|
|
f59478fac7 | ||
|
|
8adac79cd8 | ||
|
|
ea93c44db7 | ||
|
|
9e20b341d8 | ||
|
|
232cbb06f6 | ||
|
|
e9d57a0f4a | ||
|
|
9633a61a65 | ||
|
|
0643b250e1 | ||
|
|
b52738881f | ||
|
|
470d5ba3d7 | ||
|
|
8326e72047 | ||
|
|
12ab4d8cf9 | ||
|
|
295ec9eb81 | ||
|
|
4c5dbd4b7c | ||
|
|
5568f92ad0 | ||
|
|
7c4c0056ce | ||
|
|
d2b4b1cc07 | ||
|
|
a3ca22d238 | ||
|
|
c73542a3cc | ||
|
|
70bbc7cdac | ||
|
|
d892298995 | ||
|
|
0fe31432be | ||
|
|
aaa0113ccb | ||
|
|
b908954b46 | ||
|
|
b0eede8a85 | ||
|
|
aa87911b71 | ||
|
|
1b05019acc | ||
|
|
78a5a2629d | ||
|
|
634270a978 | ||
|
|
78ba22e1e4 | ||
|
|
aba5737a60 | ||
|
|
4315f7f621 | ||
|
|
53c535962f | ||
|
|
1e718b78c7 | ||
|
|
b1d2156228 | ||
|
|
9c3c953c6b | ||
|
|
ae74f68db7 | ||
|
|
213f1bba36 | ||
|
|
5a2cb0bd68 | ||
|
|
23b461828b | ||
|
|
9944a1b03b | ||
|
|
eaad4d1bbd | ||
|
|
17d9b73b9a | ||
|
|
d6185a6099 | ||
|
|
41c06b9edb | ||
|
|
d8807077da | ||
|
|
34e125f82d | ||
|
|
d670b6d07e | ||
|
|
7b0f985f18 | ||
|
|
212be923f6 | ||
|
|
88fcb57e9f | ||
|
|
9b609c118f | ||
|
|
37c398d37a | ||
|
|
a51b7f6b13 | ||
|
|
808fd84b83 | ||
|
|
57bcea15f5 | ||
|
|
4e51b56b9b | ||
|
|
ef5cf41d34 | ||
|
|
911e79ea6a | ||
|
|
d586177de0 | ||
|
|
202c36646c | ||
|
|
ab5102f5ca | ||
|
|
e612fb99f6 | ||
|
|
691e77a69a | ||
|
|
930118c61f | ||
|
|
1e05f2f2ce | ||
|
|
ae25b4d023 | ||
|
|
af055a12a1 | ||
|
|
7de28eedd3 | ||
|
|
8dfe81f522 | ||
|
|
a1d8ae291d | ||
|
|
eb6989527d | ||
|
|
2986a5dd96 | ||
|
|
816ee9b244 | ||
|
|
51b53bf948 | ||
|
|
2c5121ee94 | ||
|
|
6a58684854 | ||
|
|
0b622fdbed | ||
|
|
3bce8e075f | ||
|
|
f598d84ea1 | ||
|
|
d7a244e80e | ||
|
|
408002e96a | ||
|
|
50da3d3210 | ||
|
|
9e13067769 | ||
|
|
821e768e76 | ||
|
|
4d2179448b | ||
|
|
40d9002470 | ||
|
|
7f1e310ca6 | ||
|
|
66d02f4683 | ||
|
|
0aae1b9978 | ||
|
|
db50822b05 | ||
|
|
63a545b293 | ||
|
|
bc0497d2c9 | ||
|
|
37226a3a4c | ||
|
|
9f15fbe47c | ||
|
|
0ee6feb529 | ||
|
|
3b82b55090 | ||
|
|
071c3309c2 | ||
|
|
ee7ee7a846 | ||
|
|
d10300bd4b | ||
|
|
e262672876 | ||
|
|
392e775c7b | ||
|
|
f641c20564 | ||
|
|
39327be88e | ||
|
|
ed0963799c | ||
|
|
f9e73a2b8f | ||
|
|
dfaa704b71 | ||
|
|
d54edddde4 | ||
|
|
37cc289204 | ||
|
|
8d9519c849 | ||
|
|
0fd5f47982 | ||
|
|
62ce83a7f6 | ||
|
|
8ecee0070d | ||
|
|
a4970b1b07 | ||
|
|
140dc9c6f4 | ||
|
|
9a4d2935f8 | ||
|
|
335c964419 | ||
|
|
72b2a7a07a | ||
|
|
f863909f34 | ||
|
|
621ca201ef | ||
|
|
563ea1a5e7 | ||
|
|
2af6ee883b | ||
|
|
0e9875e6b5 | ||
|
|
c2d2e883c6 | ||
|
|
a196e56078 | ||
|
|
0536e4a60b | ||
|
|
55ab096e49 | ||
|
|
c39ea0854a | ||
|
|
aef080984e | ||
|
|
1aa2425e81 | ||
|
|
f5eadfa39c | ||
|
|
faa65facfe | ||
|
|
b60235d964 | ||
|
|
718b18248e | ||
|
|
4316e53039 | ||
|
|
790ac50385 | ||
|
|
3a87a8d155 | ||
|
|
91912f2aa5 | ||
|
|
624b841ca1 | ||
|
|
9eb4e90291 | ||
|
|
94263cc7a0 | ||
|
|
2d035758f4 | ||
|
|
86697002f7 | ||
|
|
2247152aa8 | ||
|
|
2528449c84 | ||
|
|
f2df3d18be | ||
|
|
c7c48d03e9 | ||
|
|
0906c6bb3f | ||
|
|
9f2daf1a15 | ||
|
|
6fb8619671 | ||
|
|
36fb83246b | ||
|
|
e729d15e97 | ||
|
|
7836298076 | ||
|
|
354880ad52 | ||
|
|
c1ac9bb890 | ||
|
|
49bf1ad379 | ||
|
|
a6e30a1e20 | ||
|
|
2f54c2ee62 | ||
|
|
6ccbaad41c | ||
|
|
57d78a996a | ||
|
|
2d3dada30e | ||
|
|
5bf20d155f | ||
|
|
2b95598958 | ||
|
|
b561a20dde | ||
|
|
835722af34 | ||
|
|
93efc7cab3 | ||
|
|
d69364ec19 | ||
|
|
d75066df5f | ||
|
|
863c84026e | ||
|
|
a523081d77 | ||
|
|
66534519d6 | ||
|
|
b3b2114c45 | ||
|
|
510f83246e | ||
|
|
c969b21f93 | ||
|
|
6ec40ef8e9 | ||
|
|
27859e83b3 | ||
|
|
263565700a | ||
|
|
5bb10a4aef | ||
|
|
ee72bb192c | ||
|
|
1a1028cbaa | ||
|
|
2f4f8bcc74 | ||
|
|
4113615cd6 | ||
|
|
9522d7c0b4 | ||
|
|
cc3ea79836 | ||
|
|
f72e802d00 | ||
|
|
36201cbfb4 | ||
|
|
685e28d161 | ||
|
|
82d23dcf0e | ||
|
|
ad322d54f0 | ||
|
|
8bac6fe829 | ||
|
|
ac7531decb | ||
|
|
7af4969ec6 | ||
|
|
a088325968 | ||
|
|
57bc58be8e | ||
|
|
f9730b1bc2 | ||
|
|
d4025214e5 | ||
|
|
c431e6c31d | ||
|
|
9941cfe9b5 | ||
|
|
15998012e5 | ||
|
|
bcb043f997 | ||
|
|
74116382b1 | ||
|
|
24f33fb0d2 | ||
|
|
d80df57ef8 | ||
|
|
240c47975c | ||
|
|
bedb3b8dc6 | ||
|
|
8032dde045 | ||
|
|
bfc51b2df5 | ||
|
|
2160da59f3 | ||
|
|
d3164e3ed6 | ||
|
|
17c72b772d | ||
|
|
3ff9a1f270 | ||
|
|
7d120d8b6a | ||
|
|
53cfe4b030 | ||
|
|
4dcd748a1f | ||
|
|
223ce0d0a0 | ||
|
|
5bd3341681 | ||
|
|
bb527d6910 | ||
|
|
dfedbcf31a | ||
|
|
1bbfd16b3f | ||
|
|
7f5737d03f | ||
|
|
7702541d81 | ||
|
|
3bc15e585c | ||
|
|
d77101b6aa | ||
|
|
c1e23f9c7a | ||
|
|
70415cd8f4 | ||
|
|
f50cd76493 | ||
|
|
e4af698881 | ||
|
|
33120a359c | ||
|
|
091a364097 | ||
|
|
e3ff6f34fc | ||
|
|
ed75a221fe | ||
|
|
7b48cb2b8d | ||
|
|
9d4c8ab475 | ||
|
|
3d61ea7d25 | ||
|
|
99c8a46296 | ||
|
|
7e1d20031c | ||
|
|
0e4b000fb1 | ||
|
|
fc2451ae08 | ||
|
|
be44577967 | ||
|
|
3480ff238e | ||
|
|
ee68427036 | ||
|
|
37c32dd1ed | ||
|
|
c05a92d417 | ||
|
|
d72a0c0d38 | ||
|
|
235b31fccc | ||
|
|
286f781f4d | ||
|
|
b7516cac5b | ||
|
|
45967a090f | ||
|
|
687fb4623e | ||
|
|
4157ae4ed2 | ||
|
|
5e1469b0d8 | ||
|
|
b3bde6c59f | ||
|
|
032f5e2fe9 | ||
|
|
91c053dfd8 | ||
|
|
1f1ef4ca03 | ||
|
|
7cc44b4470 | ||
|
|
54356d9410 | ||
|
|
defbdf8b7a | ||
|
|
a01af6cfc3 | ||
|
|
4d9c7f1054 | ||
|
|
ced36e2b5b | ||
|
|
d2749f29b0 | ||
|
|
b78c8bc1de | ||
|
|
cc4a3560d8 | ||
|
|
3ab2ea9e66 | ||
|
|
69b82ee2a3 | ||
|
|
f14e6bf252 | ||
|
|
e51ae79b4c | ||
|
|
8f55856fd5 | ||
|
|
a360d53419 | ||
|
|
d28164d02f | ||
|
|
f723212394 | ||
|
|
a0cb08d18f | ||
|
|
d18044b764 | ||
|
|
406b5d61f5 | ||
|
|
9a4eef4a83 | ||
|
|
efaf9a2ef3 | ||
|
|
edb2952fd6 | ||
|
|
088828a351 | ||
|
|
e359b7fa00 | ||
|
|
44fc5177d6 | ||
|
|
604a27141f | ||
|
|
fd65a84d7d | ||
|
|
966b389807 | ||
|
|
a6bcce5a63 | ||
|
|
530fbdd282 | ||
|
|
54f1051456 | ||
|
|
d136bf5561 | ||
|
|
5cba948e02 | ||
|
|
ab922f6735 | ||
|
|
d71c87535f | ||
|
|
ce501bd972 | ||
|
|
ec5944f53c | ||
|
|
5e64e0bbaa | ||
|
|
e16f1d732d | ||
|
|
cdacfc946c | ||
|
|
26e854f0a3 | ||
|
|
2bc89364b2 | ||
|
|
e080d2de9b | ||
|
|
ca1262aeb7 | ||
|
|
cbc95e2095 | ||
|
|
9c5051cbf8 | ||
|
|
e6ca3390a2 | ||
|
|
e74b531905 | ||
|
|
01437183ac | ||
|
|
e5ab2ceca3 | ||
|
|
e19f4ddf7c | ||
|
|
4e3a062084 | ||
|
|
96db0ad507 | ||
|
|
6b4bcc074a | ||
|
|
14dd390680 | ||
|
|
3fe8ea8961 | ||
|
|
3ee913ea98 | ||
|
|
d18277653c | ||
|
|
8c478cc330 | ||
|
|
003ffc161b | ||
|
|
74dc0c871b | ||
|
|
c8545dea4d | ||
|
|
e1b8edd444 | ||
|
|
f3996855c3 | ||
|
|
ea17e8ea08 | ||
|
|
00fc313609 | ||
|
|
c72f9abc2b | ||
|
|
6df818503e | ||
|
|
b17a6cc109 | ||
|
|
82d1aed472 | ||
|
|
eb6fc6c140 | ||
|
|
2710406f5f | ||
|
|
a634499423 | ||
|
|
71b3fbaa19 | ||
|
|
c656bb4571 | ||
|
|
6c4e4b8cd8 | ||
|
|
7b1a256f8a | ||
|
|
66f9eaf8c2 | ||
|
|
7fa0ba3355 | ||
|
|
eec9244e4c | ||
|
|
e265e4828e | ||
|
|
ad6e720912 | ||
|
|
70dad8ebb4 | ||
|
|
497b3b3e04 | ||
|
|
891811aa47 | ||
|
|
be9ddaa4c9 | ||
|
|
03494c2915 | ||
|
|
bcf7c247bf | ||
|
|
132d89b350 | ||
|
|
daf16357c9 | ||
|
|
8080abc93c | ||
|
|
902715bd3e | ||
|
|
8271a6e8db | ||
|
|
6c121a093b | ||
|
|
ab0cce9eaa | ||
|
|
9acbead87b | ||
|
|
03e71e9183 | ||
|
|
f8dadd38b4 | ||
|
|
2928775f5b | ||
|
|
673ac8078b | ||
|
|
234ae27205 | ||
|
|
a740a29798 | ||
|
|
341a58b8e4 | ||
|
|
ba9a16e718 | ||
|
|
2b2bab8fbc | ||
|
|
f50f31ec4c | ||
|
|
3a1c353ea3 | ||
|
|
8bf9b2d009 | ||
|
|
1e43ffef51 | ||
|
|
534c783bd8 | ||
|
|
14a12432e9 | ||
|
|
1be72218a9 | ||
|
|
cf97c1f60b | ||
|
|
782791b013 | ||
|
|
04631964d3 | ||
|
|
97983d5ac5 | ||
|
|
b1ae83e075 | ||
|
|
ecfd177d78 | ||
|
|
fb7bcd57cd | ||
|
|
01cf000cbe | ||
|
|
dcba7c535d | ||
|
|
b2fc560701 | ||
|
|
c3f207f93c | ||
|
|
583b559c78 | ||
|
|
bb1f19c0cb | ||
|
|
a62883153c | ||
|
|
41033f2230 | ||
|
|
394e2500e8 | ||
|
|
06fef08f56 | ||
|
|
a7da22b7e9 | ||
|
|
cb58eb9f04 | ||
|
|
b803c0ad75 | ||
|
|
b5426b398a | ||
|
|
c94863b0cb | ||
|
|
e13b9b0aa7 | ||
|
|
aa1b10425f | ||
|
|
6cbfc48736 | ||
|
|
87c18143a2 | ||
|
|
58144bf9a8 | ||
|
|
438d9bf220 | ||
|
|
d8d73f0cd4 | ||
|
|
dc91ee0cf1 | ||
|
|
84e01c0c9c | ||
|
|
ce262f0dad | ||
|
|
9e2a6a7760 | ||
|
|
a4e26a7a51 | ||
|
|
8e7955984e | ||
|
|
77eb5ed286 | ||
|
|
7a668d661b | ||
|
|
44733a4c91 | ||
|
|
9a0ffa9379 | ||
|
|
5cc5a3d412 | ||
|
|
9c4fdc9803 | ||
|
|
71a887db03 | ||
|
|
7f5d7325ba | ||
|
|
5aadca41d4 | ||
|
|
f5d072414f | ||
|
|
768356e11e | ||
|
|
8ba246a349 | ||
|
|
668bba16ea | ||
|
|
96809f76b9 | ||
|
|
62743afaa7 | ||
|
|
8ca5e76afb | ||
|
|
b22913a22c | ||
|
|
74a3bf0b12 | ||
|
|
88ad694d8c | ||
|
|
e36e4f61da | ||
|
|
8f77b6cbd7 | ||
|
|
184cbb6dd9 | ||
|
|
9eda8be954 | ||
|
|
19bc270d5c | ||
|
|
462c3445e3 | ||
|
|
d237e3fe4e | ||
|
|
458a1ec4c1 | ||
|
|
88bc87b367 | ||
|
|
aeb0e7f8ad | ||
|
|
0c97b3be4a | ||
|
|
9855f0c64a | ||
|
|
6d1c0dda91 | ||
|
|
8701ec807e | ||
|
|
9b34af98fd | ||
|
|
cf5f338902 | ||
|
|
8b9f3064ba | ||
|
|
b199b8bcff | ||
|
|
77528520d9 | ||
|
|
7d0332dd0e | ||
|
|
498bf31295 | ||
|
|
50c54a8341 | ||
|
|
cde4e24cc4 | ||
|
|
e37e35e318 | ||
|
|
d7dc9976c9 | ||
|
|
7690ae8684 | ||
|
|
b0e6279f53 | ||
|
|
b826f10372 | ||
|
|
a40f175af5 | ||
|
|
5e2bd84478 | ||
|
|
0317d45ea8 | ||
|
|
43a3ae9726 | ||
|
|
6a900623b0 | ||
|
|
35e243f0eb | ||
|
|
38423341c2 | ||
|
|
2da8a25ffd | ||
|
|
17c4eb4c72 | ||
|
|
321ec48510 | ||
|
|
777d52a167 | ||
|
|
6398f4a698 | ||
|
|
101ab26069 | ||
|
|
481da80d4c | ||
|
|
2cc8a15118 | ||
|
|
2defa06ba4 | ||
|
|
a113327476 | ||
|
|
c341d6ebd8 | ||
|
|
4e84866f17 | ||
|
|
a58950924c | ||
|
|
98f3f51ba9 | ||
|
|
f0df9ead3c | ||
|
|
7b1a57070d | ||
|
|
a412f2fd5e | ||
|
|
4f0c8c4ab5 | ||
|
|
946c90a749 | ||
|
|
7ba4eaab9c | ||
|
|
74553a82fc | ||
|
|
39fcb2d743 | ||
|
|
7041feaea3 | ||
|
|
9b1ffaeded | ||
|
|
07d397bdac | ||
|
|
a86ff4f1f0 | ||
|
|
953eca2732 | ||
|
|
d6c5fb149a | ||
|
|
12982708cf | ||
|
|
0cf9e1dd81 | ||
|
|
71e20c4983 | ||
|
|
2147f6d3bf | ||
|
|
23df42d2d3 | ||
|
|
bcf0a0b7fd | ||
|
|
dd78b03a28 | ||
|
|
84dd5e6930 | ||
|
|
dcee98fea7 | ||
|
|
9ffb982ae5 | ||
|
|
428850306f | ||
|
|
abfd6798e3 | ||
|
|
fffadd94de | ||
|
|
d0919776f3 | ||
|
|
267855fded | ||
|
|
4bdebb7feb | ||
|
|
ab5f69d2ef | ||
|
|
63ee36ddfe | ||
|
|
43967f5ded | ||
|
|
c043053b2b | ||
|
|
220f27bd0a | ||
|
|
83914d5378 | ||
|
|
57e4b1a3f1 | ||
|
|
c85e556924 | ||
|
|
8c0be8011d | ||
|
|
7914f75876 | ||
|
|
7d1253e14e | ||
|
|
d7c58b3eb3 | ||
|
|
fb664b6f08 | ||
|
|
258a6d076e | ||
|
|
32ab060153 | ||
|
|
91d3784f9b | ||
|
|
8a5aac3d31 | ||
|
|
06c6effb7d | ||
|
|
f3789c05bd | ||
|
|
c64e1f5e51 | ||
|
|
5d8e24c19a | ||
|
|
f756de05c3 | ||
|
|
574fdb496f | ||
|
|
5580da69eb | ||
|
|
35274863c9 | ||
|
|
1f31b81f0d | ||
|
|
cde111ddeb | ||
|
|
845c12c01c | ||
|
|
99a0118d31 | ||
|
|
bb7ee17362 | ||
|
|
70854ef012 | ||
|
|
053c14056d | ||
|
|
9397d50764 | ||
|
|
473e24cc42 | ||
|
|
d9394605f4 | ||
|
|
d2b9074852 | ||
|
|
b525eb7a0e | ||
|
|
3805aaeeec | ||
|
|
50dc404689 | ||
|
|
975eacbc7e | ||
|
|
7e56dc35b8 | ||
|
|
b3566d98bf | ||
|
|
15379a8e20 | ||
|
|
1e178f4223 | ||
|
|
c16a7b93ea | ||
|
|
f89bb1a750 | ||
|
|
79961aabe4 | ||
|
|
4686fc2b01 | ||
|
|
569b915c07 | ||
|
|
324d3fe7a5 | ||
|
|
ae8d0bf5cb | ||
|
|
17efa82057 | ||
|
|
c17523a476 | ||
|
|
33635d6991 | ||
|
|
d290dbe86b | ||
|
|
c1f5c49eda | ||
|
|
c3f4caa6f3 | ||
|
|
d4c7b0e455 | ||
|
|
b0cb52fe90 | ||
|
|
386f831cd4 | ||
|
|
449daa80cc | ||
|
|
3003547b83 | ||
|
|
1664eb672f | ||
|
|
0939dcacb6 | ||
|
|
54b81d1a42 | ||
|
|
626606100f | ||
|
|
53a0b76e8c | ||
|
|
e16ac9400a | ||
|
|
94060c236b | ||
|
|
890792c270 | ||
|
|
7bc1fc3d0d | ||
|
|
9ea90ed61b | ||
|
|
ce40b80d90 | ||
|
|
53fcd94c5a | ||
|
|
ecb6247959 | ||
|
|
3b4cb6934d | ||
|
|
babe93a6ce | ||
|
|
1e9173699c | ||
|
|
37ba7aa2ca | ||
|
|
a83d2d9910 | ||
|
|
0449064f5d | ||
|
|
6cf1073a3c | ||
|
|
9ac9171206 | ||
|
|
25ce8cd2e4 | ||
|
|
e50522ab89 | ||
|
|
4801502f32 | ||
|
|
e13e4b5ddd | ||
|
|
de8da553f1 | ||
|
|
6558792e73 | ||
|
|
ea5e92017e | ||
|
|
46199efb58 | ||
|
|
8a6eae6c97 | ||
|
|
67eef8a004 | ||
|
|
b5341e5cde | ||
|
|
ac6140b17a | ||
|
|
b1489d98f0 | ||
|
|
3b7119ec58 | ||
|
|
efa34d080e | ||
|
|
19a6277841 | ||
|
|
107e1413ed | ||
|
|
94416dd881 | ||
|
|
8efc39958f | ||
|
|
569f794e33 | ||
|
|
fc1460e592 | ||
|
|
d6e4ee0203 | ||
|
|
0c8135078d | ||
|
|
24f4b864c4 | ||
|
|
41e47f32b6 | ||
|
|
a73ccb15a1 | ||
|
|
36a78f49a5 | ||
|
|
cbd459b0a5 | ||
|
|
03bb1fd089 | ||
|
|
4e2c254717 | ||
|
|
fffb6c5f29 | ||
|
|
81f669e226 | ||
|
|
6484ae54c0 | ||
|
|
1c52caf5e9 | ||
|
|
ce1d4cce57 | ||
|
|
8246197ae6 | ||
|
|
8f90bf8846 | ||
|
|
b955e8a0ea | ||
|
|
81da32f7a2 | ||
|
|
5324fa9350 | ||
|
|
c375daa258 | ||
|
|
4f3bd699c8 | ||
|
|
f5024621c0 | ||
|
|
8308506d71 | ||
|
|
6605c19202 | ||
|
|
fdf1a94f97 | ||
|
|
6b6e37da92 | ||
|
|
0f0fc8ae4e | ||
|
|
4d7e2992e5 | ||
|
|
a5050d4810 | ||
|
|
9df6963f08 | ||
|
|
b833dd4576 | ||
|
|
39378ae20f | ||
|
|
5a2cb943f7 | ||
|
|
b88209f63d | ||
|
|
9c848938f8 | ||
|
|
07b86dda41 | ||
|
|
49e8bf7639 | ||
|
|
a2d0a7f544 | ||
|
|
1a8c894ddf | ||
|
|
3f51f63298 | ||
|
|
a0b4df574b | ||
|
|
68c6492c3f | ||
|
|
0ba7ba77d8 | ||
|
|
04b2b3474d | ||
|
|
ecbb5ebbd7 | ||
|
|
b62757b65d | ||
|
|
b1a3ab5493 | ||
|
|
abc3357180 | ||
|
|
29f9cba236 | ||
|
|
9a62522140 | ||
|
|
666c52556e | ||
|
|
1c0734d1cb | ||
|
|
1304ac7336 | ||
|
|
884fb1b637 | ||
|
|
a82bce947f | ||
|
|
d5241f0700 | ||
|
|
f24f258c9c | ||
|
|
eddd9fa8ab | ||
|
|
6cc224aeec | ||
|
|
4b0a631987 | ||
|
|
dcae0e8e8b | ||
|
|
29f810a2a0 | ||
|
|
719dfa7b72 | ||
|
|
259aac8fcd | ||
|
|
5be2cd278f | ||
|
|
211eac5313 | ||
|
|
f92ed3139d | ||
|
|
bdff84c605 | ||
|
|
08e430396a | ||
|
|
df7fc7ec01 | ||
|
|
9eef581161 | ||
|
|
52811e44f4 | ||
|
|
7b1c56877e | ||
|
|
78d73af589 | ||
|
|
d9c1ef4c22 | ||
|
|
93f96ee660 | ||
|
|
d25a8d4efb | ||
|
|
1f22278496 | ||
|
|
70b705e0fd | ||
|
|
9e1dfdc3f0 | ||
|
|
47d6d4ac06 | ||
|
|
fe3586b6f4 | ||
|
|
650881204f | ||
|
|
8c0ba112e2 | ||
|
|
a17d8f7e09 | ||
|
|
371b4ae05d | ||
|
|
1d7ce510f7 | ||
|
|
d759ded64d | ||
|
|
0b2e1b88cc | ||
|
|
72a11eedfc | ||
|
|
1f02226620 | ||
|
|
ad8c29997c | ||
|
|
2c7c40c3f0 | ||
|
|
c9c0e4db2e | ||
|
|
dd880b13c0 | ||
|
|
76c759c8f4 | ||
|
|
284c8020b2 | ||
|
|
f506600b8c | ||
|
|
339418b5f3 | ||
|
|
2eca2cc2e9 | ||
|
|
4315d309f2 | ||
|
|
8d18bb363a | ||
|
|
592f31f059 | ||
|
|
300ad15ad0 | ||
|
|
91f93169eb | ||
|
|
5d95069291 | ||
|
|
e5bb9162ef | ||
|
|
6869cc8a01 | ||
|
|
55c7ac8a32 | ||
|
|
101a85b063 | ||
|
|
e7c6afbc6a | ||
|
|
18e19fb6c8 | ||
|
|
a7ccfc3282 | ||
|
|
85eb2a4235 | ||
|
|
3e3805b542 | ||
|
|
c59acd836a | ||
|
|
1e81181312 | ||
|
|
8a796efdb3 | ||
|
|
1a07a93552 | ||
|
|
bd74629420 | ||
|
|
dabb293cc0 | ||
|
|
b6031bd29a | ||
|
|
05fa3af2ac | ||
|
|
c52166bfec | ||
|
|
6d3964fa5d | ||
|
|
65545d85ba | ||
|
|
dea4ff47cd | ||
|
|
258a5f6ab7 | ||
|
|
2048ca2816 | ||
|
|
eb9e2e8062 | ||
|
|
3229bf0150 | ||
|
|
dfa12f9807 | ||
|
|
e0917a35fd | ||
|
|
686b00ffd1 | ||
|
|
78402f6546 | ||
|
|
a1b5fbb1fe | ||
|
|
b71f633fac | ||
|
|
dbb674aa8e | ||
|
|
018daf7f09 | ||
|
|
a07a84a8b1 | ||
|
|
0f36f34a4f | ||
|
|
cf2cebd0fc | ||
|
|
90dd59abe6 | ||
|
|
5332ed6bef | ||
|
|
d45d4ded99 | ||
|
|
25b5590d2c | ||
|
|
d2b2ced5bf | ||
|
|
c551953283 | ||
|
|
5ae1f38ea8 | ||
|
|
372f12de95 | ||
|
|
9cfa88dd8c | ||
|
|
7b355ebc49 | ||
|
|
43a56c8ec8 | ||
|
|
3da90bfa97 | ||
|
|
dd572a7456 | ||
|
|
8cd818b80e | ||
|
|
530bbc07c5 | ||
|
|
a992f7a0e8 | ||
|
|
ca3718594d | ||
|
|
17a66853d5 | ||
|
|
8c317c1396 | ||
|
|
20f888b991 | ||
|
|
cd0d3862c7 | ||
|
|
443ffb7906 | ||
|
|
5967c83b03 | ||
|
|
66498a03ce | ||
|
|
9ec772f723 | ||
|
|
20eb56db2d | ||
|
|
e4d064aaa3 | ||
|
|
5602dfa09a | ||
|
|
0138b412b4 | ||
|
|
20a934c9ab | ||
|
|
09d2b397dc | ||
|
|
482a99cf15 | ||
|
|
81ac45a1d4 | ||
|
|
0b8078f3bf | ||
|
|
8b6ace902c | ||
|
|
1dead9fca5 | ||
|
|
524c4b71d7 | ||
|
|
e51318768d | ||
|
|
c821bb20d0 | ||
|
|
c6b693b4ac | ||
|
|
2c5caabab0 | ||
|
|
b7479e8342 | ||
|
|
ffca124762 | ||
|
|
9bedbf6fb8 | ||
|
|
853150e458 | ||
|
|
1ddd48e008 | ||
|
|
17d24d642e | ||
|
|
87a46684cd | ||
|
|
e4c5193945 | ||
|
|
2e969bf6dd | ||
|
|
6db26d9f7b | ||
|
|
4f02c9ec36 | ||
|
|
2fdd39fba5 | ||
|
|
fe1ddc3a94 | ||
|
|
cff2d805db | ||
|
|
34425d3e47 | ||
|
|
4ac4f00620 | ||
|
|
e30a4623c5 | ||
|
|
e2f4dcaaee | ||
|
|
ebbf64ddae | ||
|
|
8b105ad22b | ||
|
|
f3416c5b1d | ||
|
|
e194fc5ee4 | ||
|
|
e465c81bf1 | ||
|
|
9dce6a99fd | ||
|
|
6f2c53d14e | ||
|
|
9044ae4ade | ||
|
|
0a422174bc | ||
|
|
c2020fe77c | ||
|
|
8beca6fcc7 | ||
|
|
18769df2ca | ||
|
|
2806fd6cdb | ||
|
|
b607940c8c | ||
|
|
dff599df4c | ||
|
|
b3cd38e019 | ||
|
|
61975e1992 | ||
|
|
1a8ad69f23 | ||
|
|
f21e40151b | ||
|
|
4e58769648 | ||
|
|
f9d6001025 | ||
|
|
ae5f5f90ff | ||
|
|
89db21d734 | ||
|
|
0e4b072650 | ||
|
|
13b0e00b27 | ||
|
|
bf5d8ca19e | ||
|
|
4a3339c09c | ||
|
|
b28c2b28b2 | ||
|
|
fcb3e648d2 | ||
|
|
5d6f08e38f | ||
|
|
b932af1c97 | ||
|
|
8874eb2b1c | ||
|
|
dcf9816a72 | ||
|
|
c8722c9f62 | ||
|
|
a82a2ccffe | ||
|
|
0bf70e443e | ||
|
|
3d6d690583 | ||
|
|
783f76d55d | ||
|
|
1dd46fb777 | ||
|
|
22bbd3a4ca | ||
|
|
3cd4b2251f | ||
|
|
9e4b003608 | ||
|
|
e66d0bc6b8 | ||
|
|
9a4abd78ed | ||
|
|
826bee8b1e | ||
|
|
143020dc27 | ||
|
|
be23065988 | ||
|
|
2cb62eae96 | ||
|
|
76c411d1e2 | ||
|
|
16fa91c2a1 | ||
|
|
b77f8717fe | ||
|
|
59ecf43c5f | ||
|
|
1fd8546354 | ||
|
|
7cb95cb3f6 | ||
|
|
160d19d6c1 | ||
|
|
a0550ca141 | ||
|
|
ac68fc016d | ||
|
|
5170307f72 | ||
|
|
3af0e51bd2 | ||
|
|
f34d1fe081 | ||
|
|
83c72ebba5 | ||
|
|
6ca8e6b3ea | ||
|
|
ba24fc2fab | ||
|
|
7f28b22599 | ||
|
|
4345db0d2e | ||
|
|
eddc10c3e2 | ||
|
|
46eaada0c4 | ||
|
|
f8b2dea270 | ||
|
|
90ebf0e0f8 | ||
|
|
1a819c807e | ||
|
|
3220809c04 | ||
|
|
72d5255c9e | ||
|
|
5995563a80 | ||
|
|
347743d93a | ||
|
|
3c067ce723 | ||
|
|
8dd2170dfa | ||
|
|
5f3a3dd5cf | ||
|
|
8ad3563963 | ||
|
|
492128ef86 | ||
|
|
b4936274f2 | ||
|
|
64ccd5ba53 | ||
|
|
7ae88f7560 | ||
|
|
ae70af26d1 | ||
|
|
483bdc237c | ||
|
|
2c564b47f4 | ||
|
|
fc80d0b5f3 | ||
|
|
d094c189d3 | ||
|
|
40d8819e77 | ||
|
|
4a3d019f06 | ||
|
|
5366a4a6ed | ||
|
|
e8230d8e5b | ||
|
|
ebdbb9011f | ||
|
|
e43793354e | ||
|
|
438c54599e | ||
|
|
da42183177 | ||
|
|
295fa3f122 | ||
|
|
cb87f1cc36 | ||
|
|
19eb5074f2 | ||
|
|
828a69bbf7 | ||
|
|
c01d471b5f | ||
|
|
8751c0d296 | ||
|
|
334d173dc9 | ||
|
|
1c3ff927a5 | ||
|
|
b12c25fdf4 | ||
|
|
e9f4ac7ca7 | ||
|
|
f1cdab80a9 | ||
|
|
ae6f0bc470 | ||
|
|
3d4b69848c | ||
|
|
c4c4a27dcb | ||
|
|
87ed11d3bf | ||
|
|
23e2fb8d5a | ||
|
|
af5950748d | ||
|
|
df9dc1e002 | ||
|
|
5c7e0f292f | ||
|
|
a5f610b7b7 | ||
|
|
df8e84dd09 | ||
|
|
ee5038106a | ||
|
|
6617c08b89 | ||
|
|
42773790e4 | ||
|
|
1fd6f75ee1 | ||
|
|
8a2ccef8ec | ||
|
|
d30f389db7 | ||
|
|
a2906a534b | ||
|
|
30294842f2 | ||
|
|
eb478d2948 | ||
|
|
e4ee55cd3d | ||
|
|
9c4fe38c97 | ||
|
|
81e64382c9 | ||
|
|
b55db1a79a | ||
|
|
dcdcd23361 | ||
|
|
3ccc057547 | ||
|
|
d04884fe8b | ||
|
|
7ae490ca25 | ||
|
|
cd74534e4c | ||
|
|
e4f9ccec3f | ||
|
|
f106329892 | ||
|
|
14f0194372 | ||
|
|
632ad5085f | ||
|
|
fafaafd578 | ||
|
|
e01f28f2bf | ||
|
|
fd4476c0b3 | ||
|
|
c96c81cf1d | ||
|
|
3e4293f9b0 | ||
|
|
a80af327d7 | ||
|
|
2116bd7a78 | ||
|
|
11571751b9 | ||
|
|
f9de63bc88 | ||
|
|
378bf4dfd6 | ||
|
|
5444d6fd9e | ||
|
|
15d7e2f972 | ||
|
|
357d9447f2 | ||
|
|
6c9d6095c9 | ||
|
|
bba029e901 | ||
|
|
4eafbb8f18 | ||
|
|
e147402250 | ||
|
|
e0602f8de2 | ||
|
|
11f769cf09 | ||
|
|
4ab88ea218 | ||
|
|
20cbe636df | ||
|
|
601b035285 | ||
|
|
0027ae9bb8 | ||
|
|
ffccc435ca | ||
|
|
8d6b9e37d5 | ||
|
|
70c9a3bd83 | ||
|
|
b7c6deddde | ||
|
|
feab4fe744 | ||
|
|
b5ec9e7586 | ||
|
|
a901f59f0f | ||
|
|
ea826f1be0 | ||
|
|
f7afb9c446 | ||
|
|
42198a8773 | ||
|
|
368034ad5a | ||
|
|
0d1a3e5646 | ||
|
|
76be75474b | ||
|
|
cca32e59c2 | ||
|
|
85bb0e62dc | ||
|
|
0ce9c515af | ||
|
|
03854376ef | ||
|
|
88b7603ed1 | ||
|
|
c07ef3c699 | ||
|
|
f3e5fb59f3 | ||
|
|
ef0f6839e5 | ||
|
|
6a488316d8 | ||
|
|
8dc434f45e | ||
|
|
7b65286181 | ||
|
|
05fce566f4 | ||
|
|
cc3ce3f0e0 | ||
|
|
20ba02be8d | ||
|
|
e3d9bf11a4 | ||
|
|
31511851c9 | ||
|
|
4f71c55034 | ||
|
|
46fb63e960 | ||
|
|
034a5255a5 | ||
|
|
1be2764d7b | ||
|
|
34355379ca | ||
|
|
fd8e3c1e5c | ||
|
|
7407bc7d82 | ||
|
|
d636022576 | ||
|
|
ae9ef2bf3b | ||
|
|
624ff9f5c6 | ||
|
|
9bcced524b | ||
|
|
3bb2ddfaac | ||
|
|
50e26aba72 | ||
|
|
267ab6a7c1 | ||
|
|
65ea7987c7 | ||
|
|
a6839666ce | ||
|
|
e5843de4fc | ||
|
|
a330378c16 | ||
|
|
ddb7888e61 | ||
|
|
73aef4f0b2 | ||
|
|
67c3b73e10 | ||
|
|
9a3d381cf0 | ||
|
|
8b8829f7df | ||
|
|
6fff3b54e6 | ||
|
|
dd69ca1b35 | ||
|
|
66ddf3b4ef | ||
|
|
c9b5bbfc14 | ||
|
|
3e1e8d01b6 | ||
|
|
c22f40e333 | ||
|
|
b83acaca79 | ||
|
|
53bef18d15 | ||
|
|
ced1c7605a | ||
|
|
f78e91eec4 | ||
|
|
7fdff72a92 | ||
|
|
d2d042bae3 | ||
|
|
f70ae803a3 | ||
|
|
cdefbf383c | ||
|
|
5f8641b18a | ||
|
|
d107f653de | ||
|
|
22f4c11ee3 | ||
|
|
7683957267 | ||
|
|
e0d4c7244d | ||
|
|
b2ccd30f68 | ||
|
|
1dea2e5f5d | ||
|
|
c95fb6c2ea | ||
|
|
d779ced27f | ||
|
|
c84c1638bf | ||
|
|
3ac4e22600 | ||
|
|
a59d15a77a | ||
|
|
c2edc7c612 | ||
|
|
77fe75f738 | ||
|
|
fdb70a32c6 | ||
|
|
487db7302e | ||
|
|
12a74caf62 | ||
|
|
742996fc83 | ||
|
|
f5a0b2e91a | ||
|
|
114ca7b545 | ||
|
|
a8953f23f4 | ||
|
|
106be642aa | ||
|
|
4c20ac605d | ||
|
|
75cdd3c80d | ||
|
|
b2585ae176 | ||
|
|
d1e912cb24 | ||
|
|
bd5ecb3b3b | ||
|
|
1a8a4584c1 | ||
|
|
6d755ad570 | ||
|
|
99ceb6a42a | ||
|
|
7ddfdcf5be | ||
|
|
a243e026c8 | ||
|
|
f40f98c702 | ||
|
|
d99618d2f6 | ||
|
|
a93305e16e | ||
|
|
fa3ae607b5 | ||
|
|
bddbcebece | ||
|
|
aeaa13955c | ||
|
|
f99eb6c3c8 | ||
|
|
c16b97e5cd | ||
|
|
0d29fb2ee1 | ||
|
|
0169f6c445 | ||
|
|
886639fe24 | ||
|
|
7304fa349e | ||
|
|
7b44c28767 | ||
|
|
9bed6df2b5 | ||
|
|
ad4c41c1dd | ||
|
|
9e2ca1529c | ||
|
|
e62504968c | ||
|
|
97720a798c | ||
|
|
636630fdf3 | ||
|
|
602622c841 | ||
|
|
c3aa421bc5 | ||
|
|
c392004edf | ||
|
|
9e4893abc3 | ||
|
|
54f940be0d | ||
|
|
046de4118f | ||
|
|
c9177c4429 | ||
|
|
9704d5f1f4 | ||
|
|
5ce177bcd3 | ||
|
|
a7b6a4a67c | ||
|
|
1978b8f1a1 | ||
|
|
59cc37c90a | ||
|
|
866c49bffd | ||
|
|
c9370c8929 | ||
|
|
e97f41a356 | ||
|
|
6c7ba4225b | ||
|
|
b694598d16 | ||
|
|
954b634aa5 | ||
|
|
c9820e77d8 | ||
|
|
a268f98b73 | ||
|
|
700e75a2b5 | ||
|
|
19e79aff50 | ||
|
|
c8f684ce9f | ||
|
|
1027dda6f6 | ||
|
|
6f7bcc34af | ||
|
|
face0f7f3c | ||
|
|
7480e793b8 | ||
|
|
bcdcaed136 | ||
|
|
85e715dc75 | ||
|
|
9e8e1a6e4d | ||
|
|
7fbfb7806b | ||
|
|
1556334c0e | ||
|
|
53a5fa6ff4 | ||
|
|
5ae9e18044 | ||
|
|
aef29d7d82 | ||
|
|
f000758820 | ||
|
|
786c9592a1 | ||
|
|
5cb50821e0 | ||
|
|
bcdfe79831 | ||
|
|
ec93babed6 | ||
|
|
e075dcd4be | ||
|
|
4113f94528 | ||
|
|
db3affc43d | ||
|
|
e11d882e87 | ||
|
|
925729e6b8 | ||
|
|
4d2c3e0f80 | ||
|
|
1665841589 | ||
|
|
e89343b03e | ||
|
|
a9c79b02ff | ||
|
|
c6541825f8 | ||
|
|
003a1aa696 | ||
|
|
20767630c0 | ||
|
|
70fb972f84 | ||
|
|
4d65956f25 | ||
|
|
a2e4580970 | ||
|
|
8da1e3ad40 | ||
|
|
92b6a057f6 | ||
|
|
70a3ae0245 | ||
|
|
8cc7b65436 | ||
|
|
fd18e64e19 | ||
|
|
e4526c4e81 | ||
|
|
d6ef69a3d4 | ||
|
|
b5eb0b3f3e | ||
|
|
22a361f977 | ||
|
|
a0db023aae | ||
|
|
dc8a60a5e5 | ||
|
|
d47b878b56 | ||
|
|
9105087036 | ||
|
|
e26f41a1a8 | ||
|
|
ff513d8664 | ||
|
|
07f11c63f0 | ||
|
|
6685a1ccaa | ||
|
|
ecee919e0b | ||
|
|
e8c1b673c0 | ||
|
|
1a8b185f7d | ||
|
|
eb8a9df627 | ||
|
|
123d308a0d | ||
|
|
102b93d3b5 | ||
|
|
eeceb7cbd9 | ||
|
|
92add4f090 | ||
|
|
3ed7727c85 | ||
|
|
a922d6a73d | ||
|
|
9ba8a02a11 | ||
|
|
e61539a878 | ||
|
|
5a78c99703 | ||
|
|
dbbcf04b8a | ||
|
|
6a8066795b | ||
|
|
e0763a4957 | ||
|
|
1ab9a38914 | ||
|
|
a6ca266dab | ||
|
|
0a8f279e97 | ||
|
|
1b63978acb | ||
|
|
8487ef4716 | ||
|
|
ddc2ee4fa5 | ||
|
|
11fede6cc3 | ||
|
|
1d45072c58 | ||
|
|
d450210d39 | ||
|
|
5462334693 | ||
|
|
293d3dd16c | ||
|
|
71b6ae4d78 | ||
|
|
69d6d63dfd | ||
|
|
d693dbc844 | ||
|
|
428e114a0a | ||
|
|
001d8b4714 | ||
|
|
37734445e7 | ||
|
|
d1fe5beaeb | ||
|
|
036afb4a4f | ||
|
|
c87589d534 | ||
|
|
1df513585d | ||
|
|
e1bacd75b6 | ||
|
|
7095f4668c | ||
|
|
8131ad3c24 | ||
|
|
ac5b2c3f9e | ||
|
|
a86f7d0fd4 | ||
|
|
34736ffbda | ||
|
|
da28fea2e0 | ||
|
|
b6b0531dbc | ||
|
|
2de0a94756 | ||
|
|
d018740442 | ||
|
|
d89f8a7972 | ||
|
|
f7a2aa09cb | ||
|
|
04825e4b88 | ||
|
|
1cfd981245 | ||
|
|
6fb8297275 | ||
|
|
4253c99cf2 | ||
|
|
ae13a68cae | ||
|
|
4e5aae7e5f | ||
|
|
88dff37776 | ||
|
|
83df1ab658 | ||
|
|
5298b14803 | ||
|
|
eeedf11c6a | ||
|
|
89efb6d1c8 | ||
|
|
1054bce4a7 | ||
|
|
d3cbddf0a4 | ||
|
|
a91fed1583 | ||
|
|
c94a791d19 | ||
|
|
02e380a9f2 | ||
|
|
4349a98614 | ||
|
|
f294283306 | ||
|
|
cc9d5897da | ||
|
|
8e3eb8519b | ||
|
|
354ef56070 | ||
|
|
352dac5e32 | ||
|
|
584fe4b3b6 | ||
|
|
bdd489aea5 | ||
|
|
0b2e725471 | ||
|
|
45e8378021 | ||
|
|
955f308c59 | ||
|
|
2c25bb4dd4 | ||
|
|
d8dcd91ed9 | ||
|
|
03900e936b | ||
|
|
6d2360eb87 | ||
|
|
ab4a70a758 | ||
|
|
b48276bd5c | ||
|
|
34167366db | ||
|
|
bfa8f4d9d5 | ||
|
|
f8e3a3e275 | ||
|
|
1328896801 | ||
|
|
0effbd8ace | ||
|
|
08a8157f3a | ||
|
|
262bb3f1ee | ||
|
|
415f63c46c | ||
|
|
0771f939a6 | ||
|
|
a81ee605d6 | ||
|
|
1e7726bcfc | ||
|
|
dc698e426d | ||
|
|
a4f66dbbcd | ||
|
|
1516b9a939 | ||
|
|
e13f20c860 | ||
|
|
727992f1d0 | ||
|
|
4e75a15118 | ||
|
|
48368f4bd6 | ||
|
|
61d9031933 | ||
|
|
487c735e13 | ||
|
|
7a34c334bd | ||
|
|
4988683e22 | ||
|
|
cb681643c8 | ||
|
|
d79e10ec97 | ||
|
|
af188b55df | ||
|
|
f287a1041d | ||
|
|
fda9b1c3ea | ||
|
|
9eb7f58525 | ||
|
|
abd6fd6b7e | ||
|
|
2909b1300e | ||
|
|
d1331a60b9 | ||
|
|
d5fc3befb8 | ||
|
|
80f9c79907 | ||
|
|
e4bd1fc180 | ||
|
|
59c87ca027 | ||
|
|
eda161de39 | ||
|
|
6033426a6e | ||
|
|
caea16c6ad | ||
|
|
e3a39a5df7 | ||
|
|
38b7e08711 | ||
|
|
7349841758 | ||
|
|
5d58269b02 | ||
|
|
8a4aef0f50 | ||
|
|
4b877d865c | ||
|
|
82503286ea | ||
|
|
16ee789c82 | ||
|
|
d040a01016 | ||
|
|
eb952afe58 | ||
|
|
34cff925fc | ||
|
|
016d963598 | ||
|
|
d31ae77176 | ||
|
|
2c1b97e5cd | ||
|
|
c498d1509a | ||
|
|
2d61189655 | ||
|
|
82c20b871b | ||
|
|
bd52ef8e84 | ||
|
|
59e1ddd31e | ||
|
|
a320d78a08 | ||
|
|
ce5730428c | ||
|
|
f7b9795014 | ||
|
|
3417fc5407 | ||
|
|
2649efe8b3 | ||
|
|
3af5897427 | ||
|
|
92877a6b30 | ||
|
|
fbdaffcbf6 | ||
|
|
ba111c6caa | ||
|
|
5c8760ac0a | ||
|
|
e0cca2a0d4 | ||
|
|
d69aba8ab7 | ||
|
|
a2ba7adc56 | ||
|
|
0881146a25 | ||
|
|
5224d6589e | ||
|
|
15eeec8ebf | ||
|
|
ed7f375d64 | ||
|
|
82da6b3217 | ||
|
|
8d83df9034 | ||
|
|
0029977ae1 | ||
|
|
0a481b3e31 | ||
|
|
70b3c2e240 | ||
|
|
1785035b96 | ||
|
|
69ab101ba3 | ||
|
|
d1e752cda1 | ||
|
|
e9d366f2b9 | ||
|
|
b168518c60 | ||
|
|
845506f7e4 | ||
|
|
9dd47b811b | ||
|
|
eafad7fe7f | ||
|
|
f36062859d | ||
|
|
949e26781a | ||
|
|
2d70fbac36 | ||
|
|
bb954a2e9a | ||
|
|
631423a251 | ||
|
|
c527f15744 | ||
|
|
8fdacc3ef7 | ||
|
|
02918785ba | ||
|
|
2d9e6bcaa2 | ||
|
|
f2570e1deb | ||
|
|
f9afbcbc59 | ||
|
|
51b4ef326d | ||
|
|
ad08df3d2f | ||
|
|
4d32e921f9 | ||
|
|
5dfed8ac2a | ||
|
|
d7102d395e | ||
|
|
82a41694a1 | ||
|
|
a1cae263c1 | ||
|
|
cce6e240c2 | ||
|
|
9d04b4d1a0 | ||
|
|
fd7e48eff9 | ||
|
|
0350a46004 | ||
|
|
00fec4b573 | ||
|
|
c40a3af8ca | ||
|
|
e452d8cc8c | ||
|
|
fbc9818764 | ||
|
|
5ef09f661f | ||
|
|
2155a942f3 | ||
|
|
5af206da60 | ||
|
|
924f68df64 | ||
|
|
2f3c4a6dae | ||
|
|
f955c07bda | ||
|
|
6f1cd3cbcc | ||
|
|
95537f39e4 | ||
|
|
0490c97ad9 | ||
|
|
4b17314c66 | ||
|
|
7459793fe3 | ||
|
|
8a39a859be | ||
|
|
f8a592f17a | ||
|
|
f824ac8f4e | ||
|
|
8e9323173a | ||
|
|
9bc59c1082 | ||
|
|
8b9f03a349 | ||
|
|
093b0f9ec0 | ||
|
|
254eabfa8d | ||
|
|
b2da8faf37 | ||
|
|
3eba20e2d8 | ||
|
|
08841aa88e | ||
|
|
2e96c226b5 | ||
|
|
c34308f743 | ||
|
|
4af07d9d55 | ||
|
|
d743260ca8 | ||
|
|
8ff50056f0 | ||
|
|
b786831f3b | ||
|
|
32e2a5f44c | ||
|
|
e3f277c32a | ||
|
|
5a7d76061c | ||
|
|
39a8c34fa6 | ||
|
|
ead51e2f13 | ||
|
|
3b465e1fdc | ||
|
|
26fd26051b | ||
|
|
08933a3683 | ||
|
|
9be00ba3ca | ||
|
|
cce15529fe | ||
|
|
588f90f0b1 | ||
|
|
d3220c40dc | ||
|
|
79c659b4fa | ||
|
|
292adb990d | ||
|
|
b7a0f6c5d0 | ||
|
|
b3f1aff03c | ||
|
|
aea9d1b319 | ||
|
|
1fd724e4f4 | ||
|
|
3d1c613f1c | ||
|
|
9ca2f4470b | ||
|
|
34527b08a9 | ||
|
|
3ae1050488 | ||
|
|
d7ec7c6e40 | ||
|
|
e98ee64974 | ||
|
|
7c6428b27e | ||
|
|
aca9b84fc6 | ||
|
|
d397f5e406 | ||
|
|
97cbcd7e61 | ||
|
|
64fd8dd50d | ||
|
|
a0dd1cf3ef | ||
|
|
25cf51abea | ||
|
|
3c8f5088d3 | ||
|
|
66f3c74cf3 | ||
|
|
6c23110fb9 | ||
|
|
c9001df97c | ||
|
|
76fa1f8942 | ||
|
|
55ca146a82 | ||
|
|
a3625242de | ||
|
|
db4214c918 | ||
|
|
f024199e2d | ||
|
|
299e7bc868 | ||
|
|
0262e066bf | ||
|
|
bee75336d0 | ||
|
|
96b472776a | ||
|
|
fb457f723a | ||
|
|
eee3e05c10 | ||
|
|
ccc147a1b3 | ||
|
|
45a149f6df | ||
|
|
076be21d40 | ||
|
|
ab5bdb32f5 | ||
|
|
8cfed048cc | ||
|
|
c842595214 | ||
|
|
8fa3e8b038 | ||
|
|
174c17edea | ||
|
|
9d8fadda80 | ||
|
|
58028d3c3d | ||
|
|
3dcabe543f | ||
|
|
1a7ebc5569 | ||
|
|
522ab2963e | ||
|
|
d9bd98ce9c | ||
|
|
2af0735a2f | ||
|
|
556943c293 | ||
|
|
e3004184c4 | ||
|
|
7b2c2e91db | ||
|
|
06ea7bf1d9 | ||
|
|
1474509cb9 | ||
|
|
87aa8d3b40 | ||
|
|
d3e8b76fa6 | ||
|
|
99c9b1a4a2 | ||
|
|
8c0aad4c96 | ||
|
|
c964ed04d3 | ||
|
|
810235e0b7 | ||
|
|
e2b3563810 | ||
|
|
76c5ec480b | ||
|
|
84e4b740a8 | ||
|
|
95409dfa26 | ||
|
|
058af0d3bb | ||
|
|
fd789b476b | ||
|
|
3fc82df278 | ||
|
|
d541356fd3 | ||
|
|
5c2adacca1 | ||
|
|
7200668158 | ||
|
|
7cf7fd6112 | ||
|
|
41821cbeb2 | ||
|
|
9537579235 | ||
|
|
40a701a934 | ||
|
|
6c8556c66c | ||
|
|
a467dffd05 | ||
|
|
497dbd89d4 | ||
|
|
0fdbce25a1 | ||
|
|
7e3e621ae5 | ||
|
|
9dfbd266fc | ||
|
|
8d02f63c36 | ||
|
|
f31c54fd72 | ||
|
|
7719087065 | ||
|
|
0b175a41d1 | ||
|
|
0824abc4f5 | ||
|
|
efef29603b | ||
|
|
034a1b0c93 | ||
|
|
86fefe1e9e | ||
|
|
0bc15b4c2d | ||
|
|
7cfa956b80 | ||
|
|
9670a01e1a | ||
|
|
371f6daf5a | ||
|
|
1c141abd06 | ||
|
|
13788c2dfa | ||
|
|
daf36365a8 | ||
|
|
cea4df90b1 | ||
|
|
80b824e0a7 | ||
|
|
0bfdc3890b | ||
|
|
cc067de021 | ||
|
|
57c0734ba6 | ||
|
|
913682e128 | ||
|
|
92711c5798 | ||
|
|
80334088d0 | ||
|
|
bdd9d12257 | ||
|
|
decee4647b | ||
|
|
4991e74a72 | ||
|
|
baa158bb33 | ||
|
|
0975ffabfa | ||
|
|
beec7d5939 | ||
|
|
1bf2a154e2 | ||
|
|
aa691cf51c | ||
|
|
8fc12bee99 | ||
|
|
5e8a0f92ee | ||
|
|
86029e8e0e | ||
|
|
a86d6f1f76 | ||
|
|
8ef798c70c | ||
|
|
efc8726054 | ||
|
|
7b72abb100 | ||
|
|
311ee5d0a0 | ||
|
|
5e4258968a | ||
|
|
ae4e861f7f | ||
|
|
d692444687 | ||
|
|
6976c98fd8 | ||
|
|
75f8d0cb07 | ||
|
|
a7e03245bd | ||
|
|
056e7ef737 | ||
|
|
675c23d7cc | ||
|
|
c4b66ef7f6 | ||
|
|
5cae1bca41 | ||
|
|
407d338b8b | ||
|
|
edd9f18de0 | ||
|
|
c9769a799d | ||
|
|
047ca93486 | ||
|
|
bd00a3f97e | ||
|
|
72f67705ed | ||
|
|
38161f63a3 | ||
|
|
b9f6e47a49 | ||
|
|
c82c56dbb7 | ||
|
|
326cc0c46f | ||
|
|
d9997d374d | ||
|
|
c18d799f4a | ||
|
|
fdb72629db | ||
|
|
7fda5e3820 | ||
|
|
78966e456a | ||
|
|
49a042039e | ||
|
|
adb266927f | ||
|
|
703f24b8fc | ||
|
|
de6120c401 | ||
|
|
b1f7a255d5 | ||
|
|
d112e92d33 | ||
|
|
5c4dd6dae1 | ||
|
|
546a83ee07 | ||
|
|
09ab29b4ba | ||
|
|
86d4e59dc2 | ||
|
|
bf03edd391 | ||
|
|
aa7714210a | ||
|
|
2454ea8fa5 | ||
|
|
a5edbc8b88 | ||
|
|
ec6cffcd6a | ||
|
|
89849a0792 | ||
|
|
48e6bcbb7a | ||
|
|
6893d9539e | ||
|
|
4a84bede37 | ||
|
|
77642c54d8 | ||
|
|
069b0f89d0 | ||
|
|
e517fa7b39 | ||
|
|
9301713c49 | ||
|
|
66285a0d3d | ||
|
|
e83a9e8d94 | ||
|
|
881e197cb2 | ||
|
|
e7f031641f | ||
|
|
198a5dc1ec | ||
|
|
5496c256c0 | ||
|
|
a93cec2bb9 | ||
|
|
32101627a6 | ||
|
|
c2d2a27d44 | ||
|
|
5eb8378612 | ||
|
|
961ea655fd | ||
|
|
c1704f2164 | ||
|
|
e4b060976b | ||
|
|
186198bfd4 | ||
|
|
283025f1a8 | ||
|
|
5b4ddfa669 | ||
|
|
572b974b82 | ||
|
|
ae71b24c60 | ||
|
|
e803ba75f9 | ||
|
|
72bd905e7c | ||
|
|
51680adc20 | ||
|
|
4b84850f00 | ||
|
|
6a998934d0 | ||
|
|
b80c16a446 | ||
|
|
f4d11dd6e6 | ||
|
|
4248b86705 | ||
|
|
305ce96ad0 | ||
|
|
74dfd9af30 | ||
|
|
c911862d8c | ||
|
|
2a73583793 | ||
|
|
8f16d05a28 | ||
|
|
2ce0b35921 | ||
|
|
33d2def126 | ||
|
|
c44b0a2ac2 | ||
|
|
3abeb936b3 | ||
|
|
cef513f775 | ||
|
|
a66961eac1 | ||
|
|
92c8767e1a | ||
|
|
5b12468a46 | ||
|
|
675021c284 | ||
|
|
6bf122d0e8 | ||
|
|
8b8e479098 | ||
|
|
717d41a527 | ||
|
|
ad5587e084 | ||
|
|
f37f384b5a | ||
|
|
dad36689c4 | ||
|
|
0bd7d004ad | ||
|
|
f8c589c7a2 | ||
|
|
e714df7ad0 | ||
|
|
6277da1bbd | ||
|
|
1bef309264 | ||
|
|
2e1d660e17 | ||
|
|
3f492f468a | ||
|
|
c86bba84b3 | ||
|
|
c468b0698b | ||
|
|
2af82fe22a | ||
|
|
5d720219bf | ||
|
|
484e1aa191 | ||
|
|
0fdfe757b4 | ||
|
|
bc5a04651f | ||
|
|
d9dfc1913d | ||
|
|
1310d0b3f3 | ||
|
|
139df8a641 | ||
|
|
acf1ae63aa | ||
|
|
041a9e7f19 | ||
|
|
427ed34a1b | ||
|
|
45fa4dac8f | ||
|
|
e4bf5fa749 | ||
|
|
eb346da6f4 | ||
|
|
866480cde6 | ||
|
|
10e1c7b3a3 | ||
|
|
beb482bd5a | ||
|
|
e561d378dd | ||
|
|
73ce88e2f0 | ||
|
|
dfccc4b16d | ||
|
|
b0ef1fee71 | ||
|
|
1ef8ce4b4a | ||
|
|
1bf4bff014 | ||
|
|
4b6e00b2b2 | ||
|
|
c99cbb0c0f | ||
|
|
2a87334d38 | ||
|
|
1a4724ff21 | ||
|
|
59d8fb5d28 | ||
|
|
8823c05aeb | ||
|
|
2d0a52f8d1 | ||
|
|
1273446ce5 | ||
|
|
177ca4aea2 | ||
|
|
7526cbe1a3 | ||
|
|
e4bb034303 | ||
|
|
78e14df620 | ||
|
|
34f07bfb07 | ||
|
|
ee74d39424 | ||
|
|
33667a1f23 | ||
|
|
7947ad2608 | ||
|
|
920c188213 | ||
|
|
28fbff1adc | ||
|
|
326617aad7 | ||
|
|
499ba7dd21 | ||
|
|
f4902933ab | ||
|
|
9aa0b31bff | ||
|
|
6d5086b971 | ||
|
|
f32f47db4b | ||
|
|
74c0cd1736 | ||
|
|
a74a952b1d | ||
|
|
5bbfef81e0 | ||
|
|
c31d1cd975 | ||
|
|
81d91a9139 | ||
|
|
a354daa71d | ||
|
|
a84a205608 | ||
|
|
a5f0eb8da8 | ||
|
|
35151ea134 | ||
|
|
1510a2c2fa | ||
|
|
8e8cb4bf3e | ||
|
|
a480be3ea0 | ||
|
|
27ae5107cd | ||
|
|
69d452f978 | ||
|
|
fe9457427f | ||
|
|
d989c2b570 | ||
|
|
1f4679433e | ||
|
|
b42de8d5c8 | ||
|
|
0950d93828 | ||
|
|
5156c66b26 | ||
|
|
346240473a | ||
|
|
17c4fefb37 | ||
|
|
2b90493ae9 | ||
|
|
bf97975fa8 | ||
|
|
4e971f59a9 | ||
|
|
2f0b900745 | ||
|
|
c6a25f9d85 | ||
|
|
e78383d3ed | ||
|
|
281e9325dd | ||
|
|
caa2833272 | ||
|
|
fae50024ea | ||
|
|
a05e38d3cb | ||
|
|
d73749fc3a | ||
|
|
d20cdac5e4 | ||
|
|
e377be3999 | ||
|
|
80e2b3dd14 | ||
|
|
3a05e61814 | ||
|
|
dda44a2931 | ||
|
|
8ba78b12c1 | ||
|
|
07b95cb8ae | ||
|
|
faca5f8863 | ||
|
|
084c263260 | ||
|
|
a1c592f1ec | ||
|
|
41f34f8f40 | ||
|
|
9711390aac | ||
|
|
25f28b9796 | ||
|
|
a1484f9621 | ||
|
|
b54506c5ee | ||
|
|
4af7540497 | ||
|
|
ba15e6812f | ||
|
|
22a90c7d64 | ||
|
|
f6c3c65e26 | ||
|
|
4f6275619a | ||
|
|
d461342835 | ||
|
|
16c4a2d5a9 | ||
|
|
45a880d8f8 | ||
|
|
bcf132685b | ||
|
|
e5c1e81d81 | ||
|
|
2ae97cd90e | ||
|
|
e5fffa0b82 | ||
|
|
a0119426d6 | ||
|
|
45e5738d2c | ||
|
|
cdd1259f12 | ||
|
|
e5d6f2eef0 | ||
|
|
e026bd7420 | ||
|
|
4cc1a53244 | ||
|
|
8eb99a3fde | ||
|
|
bf30a058ee | ||
|
|
0c6a7b140e | ||
|
|
d279b35086 | ||
|
|
8e26148255 | ||
|
|
1a3ed0d09c | ||
|
|
214821b69f | ||
|
|
7edb6eb6c1 | ||
|
|
46916dc5d3 | ||
|
|
8aed15f3a8 | ||
|
|
1e6a022787 | ||
|
|
fb1eac5268 | ||
|
|
787b664d29 | ||
|
|
dd63ff846c | ||
|
|
1559d437ec | ||
|
|
8d023ee385 | ||
|
|
3fd3801e56 | ||
|
|
3ec1e99f4b | ||
|
|
21a788b48b | ||
|
|
a5c8d776f3 | ||
|
|
95261ce9bb | ||
|
|
255d10e603 | ||
|
|
ab3e93ab84 | ||
|
|
3b5f88c14f | ||
|
|
2f33b6bdc3 | ||
|
|
3c1e240722 | ||
|
|
91831a1075 | ||
|
|
ccc824abc1 | ||
|
|
6f39d4648b | ||
|
|
74cb400426 | ||
|
|
910b1dde99 | ||
|
|
e462d7f420 | ||
|
|
0cdd8bf1d0 | ||
|
|
f8ad8c31be | ||
|
|
93c889c215 | ||
|
|
f8b505fa4e | ||
|
|
1516263d2a | ||
|
|
79f5ec340d | ||
|
|
cd54cc17c0 | ||
|
|
098159dc0f | ||
|
|
a4418996f4 | ||
|
|
340cb559ee | ||
|
|
eeefd8279f | ||
|
|
e62dc91cd7 | ||
|
|
536041abd2 | ||
|
|
d3ab9e01c5 | ||
|
|
2113025877 | ||
|
|
6aaffeb5a4 | ||
|
|
2a92df4f3c | ||
|
|
560044bbbf | ||
|
|
4bd8cdf5a0 | ||
|
|
c17cbb66d9 | ||
|
|
8d23dd46b0 | ||
|
|
bf70bd7c60 | ||
|
|
1a144d84f5 | ||
|
|
6810ba71e8 | ||
|
|
bbe6a30506 | ||
|
|
08c668f90a | ||
|
|
3151a7542f | ||
|
|
7bfde0a39b | ||
|
|
7347be370e | ||
|
|
66d847c047 | ||
|
|
c9f1f9624b | ||
|
|
8e4a8b7e9d | ||
|
|
e693794549 | ||
|
|
7a924438bc | ||
|
|
7458e9f2d5 | ||
|
|
da2e11e35e | ||
|
|
9f7ca3e4c7 | ||
|
|
2f77d99161 | ||
|
|
acd2e2863a | ||
|
|
513fe0728c | ||
|
|
cba39633aa | ||
|
|
c6a26d862f | ||
|
|
9386109168 | ||
|
|
4b86849356 | ||
|
|
8fd263f44a | ||
|
|
5590e97f4f | ||
|
|
98c3131017 | ||
|
|
f03fca85aa | ||
|
|
7fef29dafb | ||
|
|
9f03264672 | ||
|
|
5082f5944e | ||
|
|
b981a446b6 | ||
|
|
5ab8199e03 | ||
|
|
e6a3f98ab7 | ||
|
|
5e60cefd1c | ||
|
|
fabb7406bd | ||
|
|
cfb0a44b1f | ||
|
|
78ed7415f5 | ||
|
|
d6380b865e | ||
|
|
80cc8ba06c | ||
|
|
f1d5b110b8 | ||
|
|
2e475b8059 | ||
|
|
99b5c16406 | ||
|
|
55d8303ecf | ||
|
|
23201100fa | ||
|
|
3959e41e88 | ||
|
|
f0cf5a5c19 | ||
|
|
87da123c19 | ||
|
|
2a0e9e9d9a | ||
|
|
9bedeedcb6 | ||
|
|
a88a5bb2da | ||
|
|
cfd6be2ba0 | ||
|
|
3658efff20 | ||
|
|
8331b50c5a | ||
|
|
7a343c2070 | ||
|
|
a7a8adb91b | ||
|
|
e61905d02f | ||
|
|
f00c244bfa | ||
|
|
463b54f1fb | ||
|
|
70894f9302 | ||
|
|
de5b6f8eb4 | ||
|
|
be83232caa | ||
|
|
e4b640903d | ||
|
|
a4de8c0c59 | ||
|
|
ac051a42a8 | ||
|
|
e33e93fd18 | ||
|
|
d5052c94ca | ||
|
|
f0aa76517a | ||
|
|
a2543f1b85 | ||
|
|
5f87a61177 | ||
|
|
451bb6518c | ||
|
|
318502d8d0 | ||
|
|
e9b1ef58ba | ||
|
|
26c24d4d53 | ||
|
|
3654f39247 | ||
|
|
b45b38cf6a | ||
|
|
228a18eb77 | ||
|
|
4ed12db12b | ||
|
|
b20b894b2f | ||
|
|
7c052f2633 |
208
.clang-format
Normal file
208
.clang-format
Normal file
|
|
@ -0,0 +1,208 @@
|
|||
# please use clang-format version 16 or later
|
||||
|
||||
Standard: c++17
|
||||
AccessModifierOffset: -8
|
||||
AlignAfterOpenBracket: Align
|
||||
AlignConsecutiveAssignments: false
|
||||
AlignConsecutiveDeclarations: false
|
||||
AlignEscapedNewlines: Left
|
||||
AlignOperands: true
|
||||
AlignTrailingComments: true
|
||||
AllowAllArgumentsOnNextLine: false
|
||||
AllowAllConstructorInitializersOnNextLine: false
|
||||
AllowAllParametersOfDeclarationOnNextLine: false
|
||||
AllowShortBlocksOnASingleLine: false
|
||||
AllowShortCaseLabelsOnASingleLine: false
|
||||
AllowShortFunctionsOnASingleLine: Inline
|
||||
AllowShortIfStatementsOnASingleLine: false
|
||||
AllowShortLambdasOnASingleLine: Inline
|
||||
AllowShortLoopsOnASingleLine: false
|
||||
AlwaysBreakAfterDefinitionReturnType: None
|
||||
AlwaysBreakAfterReturnType: None
|
||||
AlwaysBreakBeforeMultilineStrings: false
|
||||
AlwaysBreakTemplateDeclarations: false
|
||||
BinPackArguments: true
|
||||
BinPackParameters: true
|
||||
BraceWrapping:
|
||||
AfterClass: false
|
||||
AfterControlStatement: false
|
||||
AfterEnum: false
|
||||
AfterFunction: true
|
||||
AfterNamespace: false
|
||||
AfterObjCDeclaration: false
|
||||
AfterStruct: false
|
||||
AfterUnion: false
|
||||
AfterExternBlock: false
|
||||
BeforeCatch: false
|
||||
BeforeElse: false
|
||||
IndentBraces: false
|
||||
SplitEmptyFunction: true
|
||||
SplitEmptyRecord: true
|
||||
SplitEmptyNamespace: true
|
||||
BreakBeforeBinaryOperators: None
|
||||
BreakBeforeBraces: Custom
|
||||
BreakBeforeTernaryOperators: true
|
||||
BreakConstructorInitializers: BeforeColon
|
||||
BreakStringLiterals: false # apparently unpredictable
|
||||
ColumnLimit: 80
|
||||
CompactNamespaces: false
|
||||
ConstructorInitializerAllOnOneLineOrOnePerLine: true
|
||||
ConstructorInitializerIndentWidth: 8
|
||||
ContinuationIndentWidth: 8
|
||||
Cpp11BracedListStyle: true
|
||||
DerivePointerAlignment: false
|
||||
DisableFormat: false
|
||||
FixNamespaceComments: true
|
||||
ForEachMacros:
|
||||
- 'json_object_foreach'
|
||||
- 'json_object_foreach_safe'
|
||||
- 'json_array_foreach'
|
||||
- 'HASH_ITER'
|
||||
IncludeBlocks: Preserve
|
||||
IndentCaseLabels: false
|
||||
IndentPPDirectives: None
|
||||
IndentWidth: 8
|
||||
IndentWrappedFunctionNames: false
|
||||
KeepEmptyLinesAtTheStartOfBlocks: true
|
||||
MaxEmptyLinesToKeep: 1
|
||||
NamespaceIndentation: None
|
||||
ObjCBinPackProtocolList: Auto
|
||||
ObjCBlockIndentWidth: 8
|
||||
ObjCSpaceAfterProperty: true
|
||||
ObjCSpaceBeforeProtocolList: true
|
||||
|
||||
PenaltyBreakAssignment: 10
|
||||
PenaltyBreakBeforeFirstCallParameter: 30
|
||||
PenaltyBreakComment: 10
|
||||
PenaltyBreakFirstLessLess: 0
|
||||
PenaltyBreakString: 10
|
||||
PenaltyExcessCharacter: 100
|
||||
PenaltyReturnTypeOnItsOwnLine: 60
|
||||
|
||||
PointerAlignment: Right
|
||||
ReflowComments: false
|
||||
SortIncludes: false
|
||||
SortUsingDeclarations: false
|
||||
SpaceAfterCStyleCast: false
|
||||
SpaceAfterLogicalNot: false
|
||||
SpaceAfterTemplateKeyword: false
|
||||
SpaceBeforeAssignmentOperators: true
|
||||
SpaceBeforeCtorInitializerColon: true
|
||||
SpaceBeforeInheritanceColon: true
|
||||
SpaceBeforeParens: ControlStatements
|
||||
SpaceBeforeRangeBasedForLoopColon: true
|
||||
SpaceInEmptyParentheses: false
|
||||
SpacesBeforeTrailingComments: 1
|
||||
SpacesInAngles: false
|
||||
SpacesInCStyleCastParentheses: false
|
||||
SpacesInContainerLiterals: false
|
||||
SpacesInParentheses: false
|
||||
SpacesInSquareBrackets: false
|
||||
StatementMacros:
|
||||
- 'Q_OBJECT'
|
||||
TabWidth: 8
|
||||
TypenameMacros:
|
||||
- 'DARRAY'
|
||||
UseTab: ForContinuationAndIndentation
|
||||
---
|
||||
Language: ObjC
|
||||
AccessModifierOffset: 2
|
||||
AlignArrayOfStructures: Right
|
||||
AlignConsecutiveAssignments: None
|
||||
AlignConsecutiveBitFields: None
|
||||
AlignConsecutiveDeclarations: None
|
||||
AlignConsecutiveMacros:
|
||||
Enabled: true
|
||||
AcrossEmptyLines: false
|
||||
AcrossComments: true
|
||||
AllowShortBlocksOnASingleLine: Never
|
||||
AllowShortEnumsOnASingleLine: false
|
||||
AllowShortFunctionsOnASingleLine: Empty
|
||||
AllowShortIfStatementsOnASingleLine: Never
|
||||
AllowShortLambdasOnASingleLine: None
|
||||
AttributeMacros: ['__unused', '__autoreleasing', '_Nonnull', '__bridge']
|
||||
BitFieldColonSpacing: Both
|
||||
#BreakBeforeBraces: Webkit
|
||||
BreakBeforeBraces: Custom
|
||||
BraceWrapping:
|
||||
AfterCaseLabel: false
|
||||
AfterClass: true
|
||||
AfterControlStatement: Never
|
||||
AfterEnum: false
|
||||
AfterFunction: true
|
||||
AfterNamespace: false
|
||||
AfterObjCDeclaration: false
|
||||
AfterStruct: false
|
||||
AfterUnion: false
|
||||
AfterExternBlock: false
|
||||
BeforeCatch: false
|
||||
BeforeElse: false
|
||||
BeforeLambdaBody: false
|
||||
BeforeWhile: false
|
||||
IndentBraces: false
|
||||
SplitEmptyFunction: false
|
||||
SplitEmptyRecord: false
|
||||
SplitEmptyNamespace: true
|
||||
BreakAfterAttributes: Never
|
||||
BreakArrays: false
|
||||
BreakBeforeConceptDeclarations: Allowed
|
||||
BreakBeforeInlineASMColon: OnlyMultiline
|
||||
BreakConstructorInitializers: AfterColon
|
||||
BreakInheritanceList: AfterComma
|
||||
ColumnLimit: 120
|
||||
ConstructorInitializerIndentWidth: 4
|
||||
ContinuationIndentWidth: 4
|
||||
EmptyLineAfterAccessModifier: Never
|
||||
EmptyLineBeforeAccessModifier: LogicalBlock
|
||||
ExperimentalAutoDetectBinPacking: false
|
||||
FixNamespaceComments: true
|
||||
IndentAccessModifiers: false
|
||||
IndentCaseBlocks: false
|
||||
IndentCaseLabels: true
|
||||
IndentExternBlock: Indent
|
||||
IndentGotoLabels: false
|
||||
IndentRequiresClause: true
|
||||
IndentWidth: 4
|
||||
IndentWrappedFunctionNames: true
|
||||
InsertBraces: false
|
||||
InsertNewlineAtEOF: true
|
||||
KeepEmptyLinesAtTheStartOfBlocks: false
|
||||
LambdaBodyIndentation: Signature
|
||||
NamespaceIndentation: All
|
||||
ObjCBinPackProtocolList: Auto
|
||||
ObjCBlockIndentWidth: 4
|
||||
ObjCBreakBeforeNestedBlockParam: false
|
||||
ObjCSpaceAfterProperty: true
|
||||
ObjCSpaceBeforeProtocolList: true
|
||||
PPIndentWidth: -1
|
||||
PackConstructorInitializers: NextLine
|
||||
QualifierAlignment: Leave
|
||||
ReferenceAlignment: Right
|
||||
RemoveSemicolon: false
|
||||
RequiresClausePosition: WithPreceding
|
||||
RequiresExpressionIndentation: OuterScope
|
||||
SeparateDefinitionBlocks: Always
|
||||
ShortNamespaceLines: 1
|
||||
SortIncludes: false
|
||||
#SortUsingDeclarations: LexicographicNumeric
|
||||
SortUsingDeclarations: true
|
||||
SpaceAfterCStyleCast: true
|
||||
SpaceAfterLogicalNot: false
|
||||
SpaceAroundPointerQualifiers: Default
|
||||
SpaceBeforeCaseColon: false
|
||||
SpaceBeforeCpp11BracedList: true
|
||||
SpaceBeforeCtorInitializerColon: true
|
||||
SpaceBeforeInheritanceColon: true
|
||||
SpaceBeforeParens: ControlStatements
|
||||
SpaceBeforeRangeBasedForLoopColon: true
|
||||
SpaceBeforeSquareBrackets: false
|
||||
SpaceInEmptyBlock: false
|
||||
SpaceInEmptyParentheses: false
|
||||
SpacesBeforeTrailingComments: 2
|
||||
SpacesInConditionalStatement: false
|
||||
SpacesInLineCommentPrefix:
|
||||
Minimum: 1
|
||||
Maximum: -1
|
||||
Standard: c++17
|
||||
TabWidth: 4
|
||||
UseTab: Never
|
||||
31
.cmake-format.json
Normal file
31
.cmake-format.json
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
{
|
||||
"format": {
|
||||
"line_width": 80,
|
||||
"tab_size": 2,
|
||||
"enable_sort": true,
|
||||
"autosort": true
|
||||
},
|
||||
"additional_commands": {
|
||||
"set_target_properties_obs": {
|
||||
"pargs": 1,
|
||||
"flags": [],
|
||||
"kwargs": {
|
||||
"PROPERTIES": {
|
||||
"kwargs": {
|
||||
"PREFIX": 1,
|
||||
"OUTPUT_NAME": 1,
|
||||
"FOLDER": 1,
|
||||
"VERSION": 1,
|
||||
"SOVERSION": 1,
|
||||
"AUTOMOC": 1,
|
||||
"AUTOUIC": 1,
|
||||
"AUTORCC": 1,
|
||||
"AUTOUIC_SEARCH_PATHS": 1,
|
||||
"BUILD_RPATH": 1,
|
||||
"INSTALL_RPATH": 1
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
2
.gitattributes
vendored
Normal file
2
.gitattributes
vendored
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
/build-aux/*.zsh eol=lf
|
||||
/build-aux/.functions/* eol=lf
|
||||
112
.github/ISSUE_TEMPLATE/bug_report.yaml
vendored
Normal file
112
.github/ISSUE_TEMPLATE/bug_report.yaml
vendored
Normal file
|
|
@ -0,0 +1,112 @@
|
|||
# Based on the OBS issue templates
|
||||
# https://github.com/obsproject/.github/tree/master/.github/ISSUE_TEMPLATE
|
||||
|
||||
name: Bug Report
|
||||
description: Report a bug or crash
|
||||
body:
|
||||
- type: markdown
|
||||
id: md_welcome
|
||||
attributes:
|
||||
value: This form is for reporting bugs for Advanced Scene Switcher!
|
||||
- type: dropdown
|
||||
id: os_info
|
||||
attributes:
|
||||
label: Operating System Info
|
||||
description: What Operating System are you running?
|
||||
options:
|
||||
- Windows 11
|
||||
- Windows 10
|
||||
- macOS 14
|
||||
- macOS 13
|
||||
- macOS 12
|
||||
- macOS 11
|
||||
- Ubuntu 24.04
|
||||
- Ubuntu 23.10
|
||||
- Ubuntu 22.04
|
||||
- Other
|
||||
validations:
|
||||
required: true
|
||||
- type: input
|
||||
id: os_info_other
|
||||
attributes:
|
||||
label: Other OS
|
||||
description: "If \"Other\" was selected above, what OS are you using?"
|
||||
placeholder: "e.g., Arch Linux, FreeBSD"
|
||||
validations:
|
||||
required: false
|
||||
- type: input
|
||||
id: obs_version
|
||||
attributes:
|
||||
label: OBS Studio Version
|
||||
description: What version of OBS Studio are you using?
|
||||
placeholder: 30.2.2
|
||||
validations:
|
||||
required: true
|
||||
- type: input
|
||||
id: advss_version
|
||||
attributes:
|
||||
label: Advanced Scene Switcher Version
|
||||
description: What version of the Advanced Scene Switcher are you using?
|
||||
placeholder: 1.27.2
|
||||
validations:
|
||||
required: true
|
||||
- type: input
|
||||
id: settings
|
||||
attributes:
|
||||
label: Plugin settings
|
||||
description: |
|
||||
Please provide the plugin settings used.
|
||||
Either only [export the macros](https://github.com/WarmUpTill/SceneSwitcher/wiki/Exporting-and-importing-individual-macros) relevant to this issue or [export all settings](https://github.com/WarmUpTill/SceneSwitcher/wiki/Saving-and-loading-settings#how-to-create-and-import-a-backup-of-your-settings) on the General tab of the plugin.
|
||||
validations:
|
||||
required: false
|
||||
- type: input
|
||||
id: obs_log_url
|
||||
attributes:
|
||||
label: OBS Studio Log URL
|
||||
description: Please provide the obsproject.com URL (from Help menu > Log Files > Upload Current/Previous Log File) to the OBS log file where this issue occurred.
|
||||
validations:
|
||||
required: false
|
||||
- type: input
|
||||
id: obs_crash_log_url
|
||||
attributes:
|
||||
label: OBS Studio Crash Log URL
|
||||
description: If this is a crash report, please provide the obsproject.com URL to the OBS crash log file where this issue occurred.
|
||||
validations:
|
||||
required: false
|
||||
- type: textarea
|
||||
id: expected_behavior
|
||||
attributes:
|
||||
label: Expected Behavior
|
||||
description: "What did you expect to happen?"
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: current_behavior
|
||||
attributes:
|
||||
label: Current Behavior
|
||||
description: "What actually happened?"
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: steps_to_reproduce
|
||||
attributes:
|
||||
label: Steps to Reproduce
|
||||
description: "How do you trigger this bug? Please walk us through it step by step."
|
||||
placeholder: |
|
||||
1.
|
||||
2.
|
||||
3.
|
||||
...
|
||||
value: |
|
||||
1.
|
||||
2.
|
||||
3.
|
||||
...
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: additional_notes
|
||||
attributes:
|
||||
label: Anything else we should know?
|
||||
validations:
|
||||
required: false
|
||||
8
.github/ISSUE_TEMPLATE/config.yml
vendored
Normal file
8
.github/ISSUE_TEMPLATE/config.yml
vendored
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
blank_issues_enabled: true
|
||||
contact_links:
|
||||
- name: 📚 Wiki
|
||||
url: https://github.com/WarmUpTill/SceneSwitcher/wiki
|
||||
about: For explanations on how the plugin works or to see example guides, check out the wiki.
|
||||
- name: 💬 OBS Forum Thread
|
||||
url: https://obsproject.com/forum/threads/advanced-scene-switcher.48264
|
||||
about: To discuss the plugin or get assistance, feel free to use the OBS forum thread or the GitHub discussions page.
|
||||
37
.github/ISSUE_TEMPLATE/feature_request.yaml
vendored
Normal file
37
.github/ISSUE_TEMPLATE/feature_request.yaml
vendored
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
# Based on the OBS issue templates
|
||||
# https://github.com/obsproject/.github/tree/master/.github/ISSUE_TEMPLATE
|
||||
|
||||
name: Feature request
|
||||
description: Suggest an idea for this project
|
||||
body:
|
||||
- type: markdown
|
||||
id: md_welcome
|
||||
attributes:
|
||||
value: This form is for requesting new features for Advanced Scene Switcher!
|
||||
- type: textarea
|
||||
id: background
|
||||
attributes:
|
||||
label: Background
|
||||
description: "Is your feature request related to a problem? Please describe."
|
||||
validations:
|
||||
required: false
|
||||
- type: textarea
|
||||
id: solution
|
||||
attributes:
|
||||
label: Solution
|
||||
description: "Describe the solution you'd like."
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: alternatives
|
||||
attributes:
|
||||
label: Alternatives
|
||||
description: "Describe alternatives you've considered."
|
||||
validations:
|
||||
required: false
|
||||
- type: textarea
|
||||
id: additional_notes
|
||||
attributes:
|
||||
label: Anything else we should know?
|
||||
validations:
|
||||
required: false
|
||||
80
.github/actions/build-dependencies/action.yaml
vendored
Normal file
80
.github/actions/build-dependencies/action.yaml
vendored
Normal file
|
|
@ -0,0 +1,80 @@
|
|||
name: 'Setup plugin build dependencies'
|
||||
description: 'Builds the plugin build dependencies'
|
||||
inputs:
|
||||
target:
|
||||
description: 'Build target for dependencies'
|
||||
required: true
|
||||
config:
|
||||
description: 'Build configuration'
|
||||
required: false
|
||||
default: 'Release'
|
||||
visualStudio:
|
||||
description: 'Visual Studio version (Windows only)'
|
||||
required: false
|
||||
default: 'Visual Studio 16 2019'
|
||||
workingDirectory:
|
||||
description: 'Working directory for packaging'
|
||||
required: false
|
||||
default: ${{ github.workspace }}
|
||||
runs:
|
||||
using: 'composite'
|
||||
steps:
|
||||
- name: Setup cmake
|
||||
uses: jwlawson/actions-setup-cmake@v1.13
|
||||
with:
|
||||
cmake-version: '3.x.x'
|
||||
|
||||
- name: Restore cached dependencies
|
||||
id: restore-cache
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: ${{ env.DEP_DIR }}
|
||||
key: ${{ env.DEP_DIR }}-${{ runner.os }}-${{ inputs.target }}
|
||||
|
||||
- name: Run macOS Build
|
||||
if: ${{ runner.os == 'macOS' && steps.restore-cache.outputs.cache-hit != 'true' }}
|
||||
shell: zsh {0}
|
||||
run: |
|
||||
build_args=(
|
||||
-c ${{ inputs.config }}
|
||||
-t ${{ inputs.target }}
|
||||
-o ${{ env.DEP_DIR }}
|
||||
)
|
||||
|
||||
if (( ${+CI} && ${+RUNNER_DEBUG} )) build_args+=(--debug)
|
||||
|
||||
.github/scripts/build-deps-macos.zsh -o ${{ env.DEP_DIR }} ${build_args}
|
||||
|
||||
- name: Run Linux Build
|
||||
if: ${{ runner.os == 'Linux' && steps.restore-cache.outputs.cache-hit != 'true' }}
|
||||
shell: bash
|
||||
run: |
|
||||
build_args=(
|
||||
-c ${{ inputs.config }}
|
||||
-t linux-${{ inputs.target }}
|
||||
)
|
||||
|
||||
if [[ -n "${CI}" && -n "${RUNNER_DEBUG}" ]]; then
|
||||
build_args+=(--debug)
|
||||
fi
|
||||
|
||||
.github/scripts/build-deps-linux.sh -o ${{ env.DEP_DIR }} "${build_args[@]}"
|
||||
|
||||
- name: Run Windows Build
|
||||
if: ${{ runner.os == 'Windows' && steps.restore-cache.outputs.cache-hit != 'true' }}
|
||||
shell: pwsh
|
||||
run: |
|
||||
$BuildArgs = @{
|
||||
Target = '${{ inputs.target }}'
|
||||
Configuration = '${{ inputs.config }}'
|
||||
OutDirName = '${{ env.DEP_DIR }}'
|
||||
}
|
||||
|
||||
if ( ( Test-Path env:CI ) -and ( Test-Path env:RUNNER_DEBUG ) ) {
|
||||
$BuildArgs += @{
|
||||
Debug = $true
|
||||
}
|
||||
}
|
||||
|
||||
.github/scripts/Build-Deps-Windows.ps1 -OutDirName ${{ env.DEP_DIR }} @BuildArgs
|
||||
|
||||
110
.github/actions/build-plugin/action.yaml
vendored
Normal file
110
.github/actions/build-plugin/action.yaml
vendored
Normal file
|
|
@ -0,0 +1,110 @@
|
|||
name: 'Set up and build plugin'
|
||||
description: 'Builds the plugin for specified architecture and build config'
|
||||
inputs:
|
||||
target:
|
||||
description: 'Target architecture for dependencies'
|
||||
required: true
|
||||
config:
|
||||
description: 'Build configuration'
|
||||
required: false
|
||||
default: 'RelWithDebInfo'
|
||||
codesign:
|
||||
description: 'Enable codesigning (macOS only)'
|
||||
required: false
|
||||
default: 'false'
|
||||
codesignIdent:
|
||||
description: 'Developer ID for application codesigning (macOS only)'
|
||||
required: false
|
||||
default: '-'
|
||||
workingDirectory:
|
||||
description: 'Working directory for packaging'
|
||||
required: false
|
||||
default: ${{ github.workspace }}
|
||||
runs:
|
||||
using: composite
|
||||
steps:
|
||||
- name: Run macOS Build
|
||||
if: runner.os == 'macOS'
|
||||
shell: zsh --no-rcs --errexit --pipefail {0}
|
||||
working-directory: ${{ inputs.workingDirectory }}
|
||||
env:
|
||||
CODESIGN_IDENT: ${{ inputs.codesignIdent }}
|
||||
CODESIGN_TEAM: ${{ inputs.codesignTeam }}
|
||||
run: |
|
||||
: Run macOS Build
|
||||
|
||||
local -a build_args=(
|
||||
--config ${{ inputs.config }}
|
||||
--dep ${{ env.DEP_DIR }}
|
||||
)
|
||||
if (( ${+RUNNER_DEBUG} )) build_args+=(--debug)
|
||||
|
||||
if [[ '${{ inputs.codesign }}' == 'true' ]] build_args+=(--codesign)
|
||||
|
||||
.github/scripts/build-macos ${build_args}
|
||||
|
||||
- name: Install Dependencies 🛍️
|
||||
if: runner.os == 'Linux'
|
||||
shell: bash
|
||||
run: |
|
||||
: Install Dependencies 🛍️
|
||||
echo ::group::Install Dependencies
|
||||
eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
|
||||
echo "/home/linuxbrew/.linuxbrew/bin:/home/linuxbrew/.linuxbrew/sbin" >> $GITHUB_PATH
|
||||
brew install --quiet zsh
|
||||
echo ::endgroup::
|
||||
|
||||
- name: Run Ubuntu Build
|
||||
if: runner.os == 'Linux'
|
||||
shell: zsh --no-rcs --errexit --pipefail {0}
|
||||
working-directory: ${{ inputs.workingDirectory }}
|
||||
run: |
|
||||
: Run Ubuntu Build
|
||||
|
||||
local -a build_args=(
|
||||
--target linux-${{ inputs.target }}
|
||||
--config ${{ inputs.config }}
|
||||
)
|
||||
if (( ${+RUNNER_DEBUG} )) build_args+=(--debug)
|
||||
|
||||
.github/scripts/build-linux ${build_args}
|
||||
|
||||
- name: Run Windows Build
|
||||
if: runner.os == 'Windows'
|
||||
shell: pwsh
|
||||
run: |
|
||||
# Run Windows Build
|
||||
if ( $Env:RUNNER_DEBUG -ne $null ) {
|
||||
Set-PSDebug -Trace 1
|
||||
}
|
||||
|
||||
$BuildArgs = @{
|
||||
Target = '${{ inputs.target }}'
|
||||
Configuration = '${{ inputs.config }}'
|
||||
ADVSSDepName = '${{ env.DEP_DIR }}'
|
||||
}
|
||||
|
||||
.github/scripts/Build-Windows.ps1 @BuildArgs
|
||||
|
||||
- name: Create Summary 📊
|
||||
if: contains(fromJSON('["Linux", "macOS"]'),runner.os)
|
||||
shell: zsh --no-rcs --errexit --pipefail {0}
|
||||
env:
|
||||
CCACHE_CONFIGPATH: ${{ inputs.workingDirectory }}/.ccache.conf
|
||||
run: |
|
||||
: Create Summary 📊
|
||||
|
||||
local -a ccache_data
|
||||
if (( ${+RUNNER_DEBUG} )) {
|
||||
setopt XTRACE
|
||||
ccache_data=("${(fA)$(ccache -s -vv)}")
|
||||
} else {
|
||||
ccache_data=("${(fA)$(ccache -s)}")
|
||||
}
|
||||
|
||||
print '### ${{ runner.os }} Ccache Stats (${{ inputs.target }})' >> $GITHUB_STEP_SUMMARY
|
||||
print '```' >> $GITHUB_STEP_SUMMARY
|
||||
for line (${ccache_data}) {
|
||||
print ${line} >> $GITHUB_STEP_SUMMARY
|
||||
}
|
||||
print '```' >> $GITHUB_STEP_SUMMARY
|
||||
117
.github/actions/package-plugin/action.yaml
vendored
Normal file
117
.github/actions/package-plugin/action.yaml
vendored
Normal file
|
|
@ -0,0 +1,117 @@
|
|||
name: 'Package plugin'
|
||||
description: 'Packages the plugin for specified architecture and build config.'
|
||||
inputs:
|
||||
target:
|
||||
description: 'Build target for dependencies'
|
||||
required: true
|
||||
config:
|
||||
description: 'Build configuration'
|
||||
required: false
|
||||
default: 'RelWithDebInfo'
|
||||
codesign:
|
||||
description: 'Enable codesigning (macOS only)'
|
||||
required: false
|
||||
default: 'false'
|
||||
notarize:
|
||||
description: 'Enable notarization (macOS only)'
|
||||
required: false
|
||||
default: 'false'
|
||||
codesignIdent:
|
||||
description: 'Developer ID for application codesigning (macOS only)'
|
||||
required: false
|
||||
default: '-'
|
||||
installerIdent:
|
||||
description: 'Developer ID for installer package codesigning (macOS only)'
|
||||
required: false
|
||||
default: ''
|
||||
codesignTeam:
|
||||
description: 'Developer team for codesigning (macOS only)'
|
||||
required: false
|
||||
default: ''
|
||||
codesignUser:
|
||||
description: 'Apple ID username for notarization (macOS only)'
|
||||
required: false
|
||||
default: ''
|
||||
codesignPass:
|
||||
description: 'Apple ID password for notarization (macOS only)'
|
||||
required: false
|
||||
default: ''
|
||||
package:
|
||||
description: 'Create Windows or macOS installation package'
|
||||
required: false
|
||||
default: 'true'
|
||||
workingDirectory:
|
||||
description: 'Working directory for packaging'
|
||||
required: false
|
||||
default: ${{ github.workspace }}
|
||||
runs:
|
||||
using: composite
|
||||
steps:
|
||||
- name: Run macOS Packaging
|
||||
if: runner.os == 'macOS'
|
||||
shell: zsh --no-rcs --errexit --pipefail {0}
|
||||
working-directory: ${{ inputs.workingDirectory }}
|
||||
env:
|
||||
CODESIGN_IDENT: ${{ inputs.codesignIdent }}
|
||||
CODESIGN_IDENT_INSTALLER: ${{ inputs.installerIdent }}
|
||||
CODESIGN_TEAM: ${{ inputs.codesignTeam }}
|
||||
CODESIGN_IDENT_USER: ${{ inputs.codesignUser }}
|
||||
CODESIGN_IDENT_PASS: ${{ inputs.codesignPass }}
|
||||
run: |
|
||||
: Run macOS Packaging
|
||||
|
||||
local -a package_args=(--config ${{ inputs.config }})
|
||||
if (( ${+RUNNER_DEBUG} )) package_args+=(--debug)
|
||||
|
||||
if [[ '${{ inputs.codesign }}' == 'true' ]] package_args+=(--codesign)
|
||||
if [[ '${{ inputs.notarize }}' == 'true' ]] package_args+=(--notarize)
|
||||
if [[ '${{ inputs.package }}' == 'true' ]] package_args+=(--package)
|
||||
|
||||
.github/scripts/package-macos ${package_args}
|
||||
|
||||
- name: Install Dependencies 🛍️
|
||||
if: runner.os == 'Linux'
|
||||
shell: bash
|
||||
run: |
|
||||
: Install Dependencies 🛍️
|
||||
echo ::group::Install Dependencies
|
||||
eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
|
||||
echo "/home/linuxbrew/.linuxbrew/bin:/home/linuxbrew/.linuxbrew/sbin" >> $GITHUB_PATH
|
||||
brew install --quiet zsh
|
||||
echo ::endgroup::
|
||||
|
||||
- name: Run Ubuntu Packaging
|
||||
if: runner.os == 'Linux'
|
||||
shell: zsh --no-rcs --errexit --pipefail {0}
|
||||
working-directory: ${{ inputs.workingDirectory }}
|
||||
run: |
|
||||
: Run Ubuntu Packaging
|
||||
package_args=(
|
||||
--target linux-${{ inputs.target }}
|
||||
--config ${{ inputs.config }}
|
||||
)
|
||||
if (( ${+RUNNER_DEBUG} )) build_args+=(--debug)
|
||||
|
||||
if [[ '${{ inputs.package }}' == 'true' ]] package_args+=(--package)
|
||||
|
||||
.github/scripts/package-linux ${package_args}
|
||||
|
||||
- name: Run Windows Packaging
|
||||
if: runner.os == 'Windows'
|
||||
shell: pwsh
|
||||
run: |
|
||||
# Run Windows Packaging
|
||||
if ( $Env:RUNNER_DEBUG -ne $null ) {
|
||||
Set-PSDebug -Trace 1
|
||||
}
|
||||
|
||||
$PackageArgs = @{
|
||||
Target = '${{ inputs.target }}'
|
||||
Configuration = '${{ inputs.config }}'
|
||||
}
|
||||
|
||||
if ( '${{ inputs.package }}' -eq 'true' ) {
|
||||
$PackageArgs += @{BuildInstaller = $true}
|
||||
}
|
||||
|
||||
.github/scripts/Package-Windows.ps1 @PackageArgs
|
||||
61
.github/actions/run-clang-format/action.yaml
vendored
Normal file
61
.github/actions/run-clang-format/action.yaml
vendored
Normal file
|
|
@ -0,0 +1,61 @@
|
|||
name: Run clang-format
|
||||
description: Runs clang-format and checks for any changes introduced by it
|
||||
inputs:
|
||||
failCondition:
|
||||
description: Controls whether failed checks also fail the workflow run
|
||||
required: false
|
||||
default: 'never'
|
||||
workingDirectory:
|
||||
description: Working directory for checks
|
||||
required: false
|
||||
default: ${{ github.workspace }}
|
||||
runs:
|
||||
using: composite
|
||||
steps:
|
||||
- name: Check Runner Operating System 🏃♂️
|
||||
if: runner.os == 'Windows'
|
||||
shell: bash
|
||||
run: |
|
||||
: Check Runner Operating System 🏃♂️
|
||||
echo "::notice::run-clang-format action requires a macOS-based or Linux-based runner."
|
||||
exit 2
|
||||
|
||||
- name: Install Dependencies 🛍️
|
||||
if: runner.os == 'Linux'
|
||||
shell: bash
|
||||
run: |
|
||||
: Install Dependencies 🛍️
|
||||
echo ::group::Install Dependencies
|
||||
eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
|
||||
echo "/home/linuxbrew/.linuxbrew/bin:/home/linuxbrew/.linuxbrew/sbin" >> $GITHUB_PATH
|
||||
echo "/home/linuxbrew/.linuxbrew/opt/clang-format@16/bin" >> $GITHUB_PATH
|
||||
brew install --quiet zsh
|
||||
echo ::endgroup::
|
||||
|
||||
- name: Run clang-format 🐉
|
||||
id: result
|
||||
shell: zsh --no-rcs --errexit --pipefail {0}
|
||||
working-directory: ${{ inputs.workingDirectory }}
|
||||
env:
|
||||
GITHUB_EVENT_FORCED: ${{ github.event.forced }}
|
||||
GITHUB_REF_BEFORE: ${{ github.event.before }}
|
||||
run: |
|
||||
: Run clang-format 🐉
|
||||
if (( ${+RUNNER_DEBUG} )) setopt XTRACE
|
||||
|
||||
local -a changes=($(git diff --name-only HEAD~1 HEAD))
|
||||
case ${GITHUB_EVENT_NAME} {
|
||||
pull_request) changes=($(git diff --name-only origin/${GITHUB_BASE_REF} HEAD)) ;;
|
||||
push) if [[ ${GITHUB_EVENT_FORCED} != true ]] changes=($(git diff --name-only ${GITHUB_REF_BEFORE} HEAD)) ;;
|
||||
*) ;;
|
||||
}
|
||||
|
||||
if (( ${changes[(I)(*.c|*.h|*.cpp|*.hpp|*.m|*.mm)]} )) {
|
||||
echo ::group::Install clang-format-16
|
||||
brew install --quiet obsproject/tools/clang-format@16
|
||||
echo ::endgroup::
|
||||
|
||||
echo ::group::Run clang-format-16
|
||||
./build-aux/run-clang-format --fail-${{ inputs.failCondition }} --check
|
||||
echo ::endgroup::
|
||||
}
|
||||
59
.github/actions/run-cmake-format/action.yaml
vendored
Normal file
59
.github/actions/run-cmake-format/action.yaml
vendored
Normal file
|
|
@ -0,0 +1,59 @@
|
|||
name: Run cmake-format
|
||||
description: Runs cmake-format and checks for any changes introduced by it
|
||||
inputs:
|
||||
failCondition:
|
||||
description: Controls whether failed checks also fail the workflow run
|
||||
required: false
|
||||
default: 'never'
|
||||
workingDirectory:
|
||||
description: Working directory for checks
|
||||
required: false
|
||||
default: ${{ github.workspace }}
|
||||
runs:
|
||||
using: composite
|
||||
steps:
|
||||
- name: Check Runner Operating System 🏃♂️
|
||||
if: runner.os == 'Windows'
|
||||
shell: bash
|
||||
run: |
|
||||
: Check Runner Operating System 🏃♂️
|
||||
echo "::notice::run-cmake-format action requires a macOS-based or Linux-based runner."
|
||||
exit 2
|
||||
|
||||
- name: Install Dependencies 🛍️
|
||||
if: runner.os == 'Linux'
|
||||
shell: bash
|
||||
run: |
|
||||
: Install Dependencies 🛍️
|
||||
echo ::group::Install Dependencies
|
||||
eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
|
||||
echo "/home/linuxbrew/.linuxbrew/bin:/home/linuxbrew/.linuxbrew/sbin" >> $GITHUB_PATH
|
||||
brew install --quiet zsh
|
||||
echo ::endgroup::
|
||||
|
||||
- name: Run cmake-format 🎛️
|
||||
id: result
|
||||
shell: zsh --no-rcs --errexit --pipefail {0}
|
||||
working-directory: ${{ github.workspace }}
|
||||
env:
|
||||
GITHUB_EVENT_FORCED: ${{ github.event.forced }}
|
||||
GITHUB_REF_BEFORE: ${{ github.event.before }}
|
||||
run: |
|
||||
: Run cmake-format 🎛️
|
||||
if (( ${+RUNNER_DEBUG} )) setopt XTRACE
|
||||
|
||||
local -a changes=($(git diff --name-only HEAD~1 HEAD))
|
||||
case ${GITHUB_EVENT_NAME} {
|
||||
pull_request) changes=($(git diff --name-only origin/${GITHUB_BASE_REF} HEAD)) ;;
|
||||
push) if [[ ${GITHUB_EVENT_FORCED} != true ]] changes=($(git diff --name-only ${GITHUB_REF_BEFORE} HEAD)) ;;
|
||||
*) ;;
|
||||
}
|
||||
|
||||
if (( ${changes[(I)*.cmake|*CMakeLists.txt]} )) {
|
||||
echo ::group::Install cmakelang
|
||||
pip3 install cmakelang
|
||||
echo ::endgroup::
|
||||
echo ::group::Run cmake-format
|
||||
./build-aux/run-cmake-format --fail-${{ inputs.failCondition }} --check
|
||||
echo ::endgroup::
|
||||
}
|
||||
41
.github/actions/run-tests/action.yaml
vendored
Normal file
41
.github/actions/run-tests/action.yaml
vendored
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
name: "Run tests"
|
||||
description: "Run tests."
|
||||
inputs:
|
||||
target:
|
||||
description: "Build target"
|
||||
required: true
|
||||
workingDirectory:
|
||||
description: "Working directory"
|
||||
required: false
|
||||
default: ${{ github.workspace }}
|
||||
config:
|
||||
description: "Build config"
|
||||
required: false
|
||||
default: ""
|
||||
runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
- name: Run macOS tests
|
||||
if: ${{ runner.os == 'macOS' }}
|
||||
shell: zsh {0}
|
||||
run: |
|
||||
if [[ '${{ inputs.target }}' != 'macos-universal' ]]; then
|
||||
echo tests skipped!
|
||||
exit 0
|
||||
fi
|
||||
${{ inputs.workingDirectory }}/build_macos/tests/${{ inputs.config }}/advanced-scene-switcher-tests
|
||||
|
||||
- name: Run Linux packaging
|
||||
if: ${{ runner.os == 'Linux' }}
|
||||
shell: bash
|
||||
run: |
|
||||
if [[ '${{ inputs.target }}' != 'x86_64' ]]; then
|
||||
exit 0
|
||||
fi
|
||||
${{ inputs.workingDirectory }}/build_x86_64/tests/advanced-scene-switcher-tests
|
||||
|
||||
- name: Run Windows packaging
|
||||
if: ${{ runner.os == 'Windows' }}
|
||||
shell: pwsh
|
||||
run: |
|
||||
${{ inputs.workingDirectory }}/build_x64/tests/${{ inputs.config }}/advanced-scene-switcher-tests.exe
|
||||
154
.github/actions/setup-macos-codesigning/action.yaml
vendored
Normal file
154
.github/actions/setup-macos-codesigning/action.yaml
vendored
Normal file
|
|
@ -0,0 +1,154 @@
|
|||
name: Set up macOS codesigning
|
||||
description: Sets up code signing certificates, provisioning profiles, and notarization information
|
||||
inputs:
|
||||
codesignIdentity:
|
||||
description: Codesigning identity
|
||||
required: true
|
||||
installerIdentity:
|
||||
description: Codesigning identity for package installer
|
||||
required: false
|
||||
codesignCertificate:
|
||||
description: PKCS12 certificate in base64 format
|
||||
required: true
|
||||
certificatePassword:
|
||||
description: Password required to install PKCS12 certificate
|
||||
required: true
|
||||
keychainPassword:
|
||||
description: Password to use for temporary keychain
|
||||
required: false
|
||||
notarizationUser:
|
||||
description: Apple ID to use for notarization
|
||||
required: false
|
||||
notarizationPassword:
|
||||
description: Application password for notarization
|
||||
provisioningProfile:
|
||||
description: Provisioning profile in base64 format
|
||||
required: false
|
||||
outputs:
|
||||
haveCodesignIdent:
|
||||
description: True if necessary codesigning credentials were found
|
||||
value: ${{ steps.codesign.outputs.haveCodesignIdent }}
|
||||
haveProvisioningProfile:
|
||||
description: True if necessary provisioning profile credentials were found
|
||||
value: ${{ steps.provisioning.outputs.haveProvisioningProfile }}
|
||||
haveNotarizationUser:
|
||||
description: True if necessary notarization credentials were found
|
||||
value: ${{ steps.notarization.outputs.haveNotarizationUser }}
|
||||
codesignIdent:
|
||||
description: Codesigning identity
|
||||
value: ${{ steps.codesign.outputs.codesignIdent }}
|
||||
installerIdent:
|
||||
description: Codesigning identity for package installer
|
||||
value: ${{ steps.codesign.outputs.installerIdent }}
|
||||
codesignTeam:
|
||||
description: Codesigning team
|
||||
value: ${{ steps.codesign.outputs.codesignTeam }}
|
||||
runs:
|
||||
using: composite
|
||||
steps:
|
||||
- name: Check Runner Operating System 🏃♂️
|
||||
if: runner.os != 'macOS'
|
||||
shell: bash
|
||||
run: |
|
||||
: Check Runner Operating System 🏃♂️
|
||||
echo "setup-macos-codesigning action requires a macOS-based runner."
|
||||
exit 2
|
||||
|
||||
- name: macOS Codesigning ✍️
|
||||
shell: zsh --no-rcs --errexit --pipefail {0}
|
||||
id: codesign
|
||||
env:
|
||||
MACOS_SIGNING_IDENTITY: ${{ inputs.codesignIdentity }}
|
||||
MACOS_SIGNING_IDENTITY_INSTALLER: ${{ inputs.installerIdentity}}
|
||||
MACOS_SIGNING_CERT: ${{ inputs.codesignCertificate }}
|
||||
MAOCS_SIGNING_CERT_PASSWORD: ${{ inputs.certificatePassword }}
|
||||
MACOS_KEYCHAIN_PASSWORD: ${{ inputs.keychainPassword }}
|
||||
run: |
|
||||
: macOS Codesigning ✍️
|
||||
if (( ${+RUNNER_DEBUG} )) setopt XTRACE
|
||||
|
||||
if [[ ${MACOS_SIGNING_IDENTITY} && ${MACOS_SIGNING_IDENTITY_INSTALLER} && ${MACOS_SIGNING_CERT} ]] {
|
||||
print 'haveCodesignIdent=true' >> $GITHUB_OUTPUT
|
||||
|
||||
local -r certificate_path="${RUNNER_TEMP}/build_certificate.p12"
|
||||
local -r keychain_path="${RUNNER_TEMP}/app-signing.keychain-db"
|
||||
|
||||
print -n "${MACOS_SIGNING_CERT}" | base64 --decode --output="${certificate_path}"
|
||||
|
||||
: "${MACOS_KEYCHAIN_PASSWORD:="$(print ${RANDOM} | shasum | head -c 32)"}"
|
||||
|
||||
print '::group::Keychain setup'
|
||||
security create-keychain -p "${MACOS_KEYCHAIN_PASSWORD}" ${keychain_path}
|
||||
security set-keychain-settings -lut 21600 ${keychain_path}
|
||||
security unlock-keychain -p "${MACOS_KEYCHAIN_PASSWORD}" ${keychain_path}
|
||||
|
||||
security import "${certificate_path}" -P "${MAOCS_SIGNING_CERT_PASSWORD}" -A \
|
||||
-t cert -f pkcs12 -k ${keychain_path} \
|
||||
-T /usr/bin/codesign -T /usr/bin/security -T /usr/bin/xcrun
|
||||
|
||||
security set-key-partition-list -S 'apple-tool:,apple:' -k "${MACOS_KEYCHAIN_PASSWORD}" \
|
||||
${keychain_path} &> /dev/null
|
||||
|
||||
security list-keychain -d user -s ${keychain_path} 'login-keychain'
|
||||
print '::endgroup::'
|
||||
|
||||
local -r team_id="${${MACOS_SIGNING_IDENTITY##* }//(\(|\))/}"
|
||||
|
||||
print "codesignIdent=${MACOS_SIGNING_IDENTITY}" >> $GITHUB_OUTPUT
|
||||
print "installerIdent=${MACOS_SIGNING_IDENTITY_INSTALLER}" >> $GITHUB_OUTPUT
|
||||
print "MACOS_KEYCHAIN_PASSWORD=${MACOS_KEYCHAIN_PASSWORD}" >> $GITHUB_ENV
|
||||
print "codesignTeam=${team_id}" >> $GITHUB_OUTPUT
|
||||
} else {
|
||||
print 'haveCodesignIdent=false' >> $GITHUB_OUTPUT
|
||||
}
|
||||
|
||||
- name: Provisioning Profile 👤
|
||||
shell: zsh --no-rcs --errexit --pipefail {0}
|
||||
id: provisioning
|
||||
if: ${{ fromJSON(steps.codesign.outputs.haveCodesignIdent) }}
|
||||
env:
|
||||
MACOS_SIGNING_PROVISIONING_PROFILE: ${{ inputs.provisioningProfile }}
|
||||
run: |
|
||||
: Provisioning Profile 👤
|
||||
if (( ${+RUNNER_DEBUG} )) setopt XTRACE
|
||||
|
||||
if [[ ${MACOS_SIGNING_PROVISIONING_PROFILE} ]] {
|
||||
print 'haveProvisioningProfile=true' >> $GITHUB_OUTPUT
|
||||
|
||||
local -r profile_path="${RUNNER_TEMP}/build_profile.provisionprofile"
|
||||
print -n "${MACOS_SIGNING_PROVISIONING_PROFILE}" \
|
||||
| base64 --decode --output ${profile_path}
|
||||
|
||||
print '::group::Provisioning Profile Setup'
|
||||
mkdir -p ~/Library/MobileDevice/Provisioning\ Profiles
|
||||
security cms -D -i ${profile_path} -o ${RUNNER_TEMP}/build_profile.plist
|
||||
local -r uuid="$(plutil -extract UUID raw ${RUNNER_TEMP}/build_profile.plist)"
|
||||
local -r team_id="$(plutil -extract TeamIdentifier.0 raw -expect string ${RUNNER_TEMP}/build_profile.plist)"
|
||||
|
||||
if [[ ${team_id} != '${{ steps.codesign.codesignTeam }}' ]] {
|
||||
print '::notice::Code Signing team in provisioning profile does not match certificate.'
|
||||
}
|
||||
|
||||
cp ${profile_path} ~/Library/MobileDevice/Provisioning\ Profiles/${uuid}.provisionprofile
|
||||
print "provisioningProfileUUID=${uuid}" >> $GITHUB_OUTPUT
|
||||
print '::endgroup::'
|
||||
} else {
|
||||
print 'haveProvisioningProfile=false' >> $GITHUB_OUTPUT
|
||||
}
|
||||
|
||||
- name: Notarization 🧑💼
|
||||
shell: zsh --no-rcs --errexit --pipefail {0}
|
||||
id: notarization
|
||||
if: ${{ fromJSON(steps.codesign.outputs.haveCodesignIdent) }}
|
||||
env:
|
||||
MACOS_NOTARIZATION_USERNAME: ${{ inputs.notarizationUser }}
|
||||
MACOS_NOTARIZATION_PASSWORD: ${{ inputs.notarizationPassword }}
|
||||
run: |
|
||||
: Notarization 🧑💼
|
||||
if (( ${+RUNNER_DEBUG} )) setopt XTRACE
|
||||
|
||||
if [[ ${MACOS_NOTARIZATION_USERNAME} && ${MACOS_NOTARIZATION_PASSWORD} ]] {
|
||||
print 'haveNotarizationUser=true' >> $GITHUB_OUTPUT
|
||||
} else {
|
||||
print 'haveNotarizationUser=false' >> $GITHUB_OUTPUT
|
||||
}
|
||||
18
.github/scripts/.Aptfile
vendored
Normal file
18
.github/scripts/.Aptfile
vendored
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
package 'cmake'
|
||||
package 'ccache'
|
||||
package 'git'
|
||||
package 'jq'
|
||||
package 'ninja-build', bin: 'ninja'
|
||||
package 'pkg-config'
|
||||
package 'libcurl4-openssl-dev'
|
||||
package 'libxtst-dev'
|
||||
package 'libxss-dev'
|
||||
package 'libopencv-dev'
|
||||
package 'libtesseract-dev'
|
||||
package 'libproc2-dev'
|
||||
package 'libusb-1.0-0-dev'
|
||||
package 'libpaho-mqttpp-dev'
|
||||
package 'libpaho-mqtt-dev'
|
||||
package 'libpaho-mqtt-dev'
|
||||
package 'libasound2-dev'
|
||||
package 'libpipewire-0.3-dev'
|
||||
7
.github/scripts/.Brewfile
vendored
Normal file
7
.github/scripts/.Brewfile
vendored
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
brew "ccache"
|
||||
brew "coreutils"
|
||||
brew "cmake"
|
||||
brew "jq"
|
||||
brew "xcbeautify"
|
||||
brew "automake"
|
||||
brew "libtool"
|
||||
4
.github/scripts/.Wingetfile
vendored
Normal file
4
.github/scripts/.Wingetfile
vendored
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
package 'cmake', path: 'Cmake\bin', bin: 'cmake'
|
||||
package 'innosetup', path: 'Inno Setup 6', bin: 'iscc'
|
||||
package 'OpenSSL', path: 'OpenSSL', bin: 'openssl'
|
||||
package 'Microsoft.VisualStudio.Locator', path: 'vswhere', bin: 'vswhere'
|
||||
523
.github/scripts/.build-deps.zsh
vendored
Executable file
523
.github/scripts/.build-deps.zsh
vendored
Executable file
|
|
@ -0,0 +1,523 @@
|
|||
#!/usr/bin/env zsh
|
||||
|
||||
builtin emulate -L zsh
|
||||
setopt EXTENDED_GLOB
|
||||
setopt PUSHD_SILENT
|
||||
setopt ERR_EXIT
|
||||
setopt ERR_RETURN
|
||||
setopt NO_UNSET
|
||||
setopt PIPE_FAIL
|
||||
setopt NO_AUTO_PUSHD
|
||||
setopt NO_PUSHD_IGNORE_DUPS
|
||||
setopt FUNCTION_ARGZERO
|
||||
|
||||
## Enable for script debugging
|
||||
# setopt WARN_CREATE_GLOBAL
|
||||
# setopt WARN_NESTED_VAR
|
||||
# setopt XTRACE
|
||||
|
||||
autoload -Uz is-at-least && if ! is-at-least 5.2; then
|
||||
print -u2 -PR "%F{1}${funcstack[1]##*/}:%f Running on Zsh version %B${ZSH_VERSION}%b, but Zsh %B5.2%b is the minimum supported version. Upgrade Zsh to fix this issue."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
_trap_error() {
|
||||
print -u2 -PR '%F{1} ✖︎ script execution error%f'
|
||||
print -PR -e "
|
||||
Callstack:
|
||||
${(j:\n :)funcfiletrace}
|
||||
"
|
||||
exit 2
|
||||
}
|
||||
|
||||
build() {
|
||||
if (( ! ${+SCRIPT_HOME} )) typeset -g SCRIPT_HOME=${ZSH_ARGZERO:A:h}
|
||||
local host_os=${${(s:-:)ZSH_ARGZERO:t:r}[3]}
|
||||
local project_root=${SCRIPT_HOME:A:h:h}
|
||||
local buildspec_file="${project_root}/buildspec.json"
|
||||
|
||||
trap '_trap_error' ZERR
|
||||
|
||||
fpath=("${SCRIPT_HOME}/utils.zsh" ${fpath})
|
||||
autoload -Uz log_info log_error log_output set_loglevel check_${host_os} setup_${host_os} setup_obs setup_ccache
|
||||
|
||||
if [[ ! -r ${buildspec_file} ]] {
|
||||
log_error \
|
||||
'No buildspec.json found. Please create a build specification for your project.' \
|
||||
'A buildspec.json.template file is provided in the repository to get you started.'
|
||||
return 2
|
||||
}
|
||||
|
||||
typeset -g -a skips=()
|
||||
local -i _verbosity=1
|
||||
local -r _version='1.0.0'
|
||||
local -r -a _valid_targets=(
|
||||
macos-universal
|
||||
linux-x86_64
|
||||
)
|
||||
local -r -a _valid_configs=(Debug RelWithDebInfo Release MinSizeRel)
|
||||
if [[ ${host_os} == 'macos' ]] {
|
||||
local -r -a _valid_generators=(Xcode Ninja 'Unix Makefiles')
|
||||
local generator="${${CI:+Ninja}:-Xcode}"
|
||||
} else {
|
||||
local -r -a _valid_generators=(Ninja 'Unix Makefiles')
|
||||
local generator='Ninja'
|
||||
}
|
||||
local -r _usage="
|
||||
Usage: %B${functrace[1]%:*}%b <option> [<options>]
|
||||
|
||||
%BOptions%b:
|
||||
|
||||
%F{yellow} Build configuration options%f
|
||||
-----------------------------------------------------------------------------
|
||||
%B-t | --target%b Specify target - default: %B%F{green}${host_os}-${CPUTYPE}%f%b
|
||||
%B-c | --config%b Build configuration - default: %B%F{green}RelWithDebInfo%f%b
|
||||
%B-o | --out%b Output directory - default: %B%F{green}RelWithDebInfo%f%b
|
||||
%B--generator%b Specify build system to generate - default: %B%F{green}Ninja%f%b
|
||||
Available generators:
|
||||
- Ninja
|
||||
- Unix Makefiles
|
||||
- Xcode (macOS only)
|
||||
|
||||
%F{yellow} Output options%f
|
||||
-----------------------------------------------------------------------------
|
||||
%B-q | --quiet%b Quiet (error output only)
|
||||
%B-v | --verbose%b Verbose (more detailed output)
|
||||
%B--skip-[all|build|deps|unpack]%b Skip all|building OBS|checking for dependencies|unpacking dependencies
|
||||
%B--debug%b Debug (very detailed and added output)
|
||||
|
||||
%F{yellow} General options%f
|
||||
-----------------------------------------------------------------------------
|
||||
%B-h | --help%b Print this usage help
|
||||
%B-V | --version%b Print script version information"
|
||||
|
||||
local -a args
|
||||
while (( # )) {
|
||||
case ${1} {
|
||||
-t|--target|-c|--config|--generator)
|
||||
if (( # == 1 )) || [[ ${2:0:1} == '-' ]] {
|
||||
log_error "Missing value for option %B${1}%b"
|
||||
log_output ${_usage}
|
||||
exit 2
|
||||
}
|
||||
;;
|
||||
}
|
||||
case ${1} {
|
||||
--)
|
||||
shift
|
||||
args+=($@)
|
||||
break
|
||||
;;
|
||||
-t|--target)
|
||||
if (( ! ${_valid_targets[(Ie)${2}]} )) {
|
||||
log_error "Invalid value %B${2}%b for option %B${1}%b"
|
||||
log_output ${_usage}
|
||||
exit 2
|
||||
}
|
||||
target=${2}
|
||||
shift 2
|
||||
;;
|
||||
-c|--config)
|
||||
if (( ! ${_valid_configs[(Ie)${2}]} )) {
|
||||
log_error "Invalid value %B${2}%b for option %B${1}%b"
|
||||
log_output ${_usage}
|
||||
exit 2
|
||||
}
|
||||
config=${2}
|
||||
shift 2
|
||||
;;
|
||||
-o|--out)
|
||||
OUT_DIR="${2}"
|
||||
shift 2
|
||||
;;
|
||||
-q|--quiet) (( _verbosity -= 1 )) || true; shift ;;
|
||||
-v|--verbose) (( _verbosity += 1 )); shift ;;
|
||||
-h|--help) log_output ${_usage}; exit 0 ;;
|
||||
-V|--version) print -Pr "${_version}"; exit 0 ;;
|
||||
--debug) _verbosity=3; shift ;;
|
||||
--generator)
|
||||
if (( ! ${_valid_generators[(Ie)${2}]} )) {
|
||||
log_error "Invalid value %B${2}%b for option %B${1}%b"
|
||||
log_output ${_usage}
|
||||
exit 2
|
||||
}
|
||||
generator=${2}
|
||||
shift 2
|
||||
;;
|
||||
--skip-*)
|
||||
local _skip="${${(s:-:)1}[-1]}"
|
||||
local _check=(all deps unpack build)
|
||||
(( ${_check[(Ie)${_skip}]} )) || log_warning "Invalid skip mode %B${_skip}%b supplied"
|
||||
typeset -g -a skips=(${skips} ${_skip})
|
||||
shift
|
||||
;;
|
||||
*) log_error "Unknown option: %B${1}%b"; log_output ${_usage}; exit 2 ;;
|
||||
}
|
||||
}
|
||||
|
||||
set -- ${(@)args}
|
||||
set_loglevel ${_verbosity}
|
||||
|
||||
check_${host_os}
|
||||
setup_ccache
|
||||
|
||||
local product_name
|
||||
local product_version
|
||||
local git_tag="$(git describe --tags)"
|
||||
|
||||
read -r product_name product_version <<< \
|
||||
"$(jq -r '. | {name, version} | join(" ")' ${buildspec_file})"
|
||||
|
||||
if [[ "${git_tag}" =~ '^([0-9]+\.){0,2}(\*|[0-9]+)$' ]] {
|
||||
log_info "Using git tag as version identifier '${git_tag}'"
|
||||
product_version="${git_tag}"
|
||||
} else {
|
||||
log_info "Using buildspec.json version identifier '${product_version}'"
|
||||
}
|
||||
|
||||
case ${host_os} {
|
||||
macos)
|
||||
sed -i '' \
|
||||
"s/project(\(.*\) VERSION \(.*\))/project(${product_name} VERSION ${product_version})/" \
|
||||
"${project_root}/CMakeLists.txt"
|
||||
;;
|
||||
linux)
|
||||
sed -i'' \
|
||||
"s/project(\(.*\) VERSION \(.*\))/project(${product_name} VERSION ${product_version})/"\
|
||||
"${project_root}/CMakeLists.txt"
|
||||
;;
|
||||
}
|
||||
|
||||
log_info "Run plugin configure step to download OBS deps ..."
|
||||
pushd ${project_root}
|
||||
if (( ! (${skips[(Ie)all]} + ${skips[(Ie)build]}) )) {
|
||||
log_group "Configuring ${product_name}..."
|
||||
|
||||
local -a cmake_args=()
|
||||
local -a cmake_build_args=(--build)
|
||||
local -a cmake_install_args=(--install)
|
||||
|
||||
case ${_loglevel} {
|
||||
0) cmake_args+=(-Wno_deprecated -Wno-dev --log-level=ERROR) ;;
|
||||
1) ;;
|
||||
2) cmake_build_args+=(--verbose) ;;
|
||||
*) cmake_args+=(--debug-output) ;;
|
||||
}
|
||||
|
||||
local -r _preset="${target%%-*}${CI:+-ci}"
|
||||
case ${target} {
|
||||
macos-*)
|
||||
if (( ${+CI} )) typeset -gx NSUnbufferedIO=YES
|
||||
|
||||
cmake_args+=(
|
||||
-DENABLE_TWITCH_PLUGIN=OFF
|
||||
--preset ${_preset}
|
||||
)
|
||||
|
||||
if (( codesign )) {
|
||||
autoload -Uz read_codesign_team && read_codesign_team
|
||||
|
||||
if [[ -z ${CODESIGN_TEAM} ]] {
|
||||
autoload -Uz read_codesign && read_codesign
|
||||
}
|
||||
}
|
||||
|
||||
cmake_args+=(
|
||||
-DCODESIGN_TEAM=${CODESIGN_TEAM:-}
|
||||
-DCODESIGN_IDENTITY=${CODESIGN_IDENT:--}
|
||||
)
|
||||
|
||||
cmake_build_args+=(--preset ${_preset} --parallel --config ${config} -- ONLY_ACTIVE_ARCH=NO -arch arm64 -arch x86_64)
|
||||
cmake_install_args+=(build_macos --config ${config} --prefix "${project_root}/release/${config}")
|
||||
|
||||
local -a xcbeautify_opts=()
|
||||
if (( _loglevel == 0 )) xcbeautify_opts+=(--quiet)
|
||||
;;
|
||||
linux-*)
|
||||
cmake_args+=(
|
||||
--preset ${_preset}-${target##*-}
|
||||
-G "${generator}"
|
||||
-DQT_VERSION=${QT_VERSION:-6}
|
||||
-DCMAKE_BUILD_TYPE=${config}
|
||||
)
|
||||
|
||||
local cmake_version
|
||||
read -r _ _ cmake_version <<< "$(cmake --version)"
|
||||
|
||||
if [[ ${CPUTYPE} != ${target##*-} ]] {
|
||||
if is-at-least 3.21.0 ${cmake_version}; then
|
||||
cmake_args+=(--toolchain "${project_root}/cmake/linux/toolchains/${target##*-}-linux-gcc.cmake")
|
||||
else
|
||||
cmake_args+=(-D"CMAKE_TOOLCHAIN_FILE=${project_root}/cmake/linux/toolchains/${target##*-}-linux-gcc.cmake")
|
||||
fi
|
||||
}
|
||||
|
||||
cmake_build_args+=(--preset ${_preset}-${target##*-} --config ${config})
|
||||
if [[ ${generator} == 'Unix Makefiles' ]] {
|
||||
cmake_build_args+=(--parallel $(( $(nproc) + 1 )))
|
||||
} else {
|
||||
cmake_build_args+=(--parallel)
|
||||
}
|
||||
|
||||
cmake_install_args+=(build_${target##*-} --prefix ${project_root}/release/${config})
|
||||
;;
|
||||
}
|
||||
|
||||
log_debug "Attempting to configure with CMake arguments: ${cmake_args}"
|
||||
|
||||
cmake ${cmake_args}
|
||||
|
||||
}
|
||||
|
||||
popd
|
||||
log_group
|
||||
|
||||
if [[ -z "${OUT_DIR}" ]] {
|
||||
OUT_DIR=".deps/advss-build-dependencies"
|
||||
}
|
||||
mkdir -p "${project_root}/${OUT_DIR}"
|
||||
local advss_dep_path="$(realpath ${project_root}/${OUT_DIR})"
|
||||
local deps_version=$(jq -r '.dependencies.prebuilt.version' ${buildspec_file})
|
||||
local qt_deps_version=$(jq -r '.dependencies.qt6.version' ${buildspec_file})
|
||||
local _plugin_deps="${project_root:h}/.deps/obs-deps-${deps_version}-${target##*-};${project_root:h}/.deps/obs-deps-qt6-${qt_deps_version}-${target##*-}"
|
||||
|
||||
case ${host_os} {
|
||||
macos)
|
||||
local opencv_dir="${project_root}/deps/opencv"
|
||||
local opencv_build_dir="${opencv_dir}/build_${target##*-}"
|
||||
|
||||
local -a opencv_cmake_args=(
|
||||
-DCMAKE_BUILD_TYPE=Release
|
||||
-DBUILD_LIST=core,imgproc,objdetect
|
||||
-DCMAKE_OSX_ARCHITECTURES=${${target##*-}//universal/x86_64;arm64}
|
||||
-DCMAKE_OSX_DEPLOYMENT_TARGET=${DEPLOYMENT_TARGET:-10.15}
|
||||
-DCMAKE_PREFIX_PATH="${advss_dep_path};${_plugin_deps}"
|
||||
-DCMAKE_INSTALL_PREFIX="${advss_dep_path}"
|
||||
)
|
||||
|
||||
if [ "${target}" != "macos-x86_64" ]; then
|
||||
opencv_cmake_args+=(-DWITH_IPP=OFF)
|
||||
fi
|
||||
|
||||
pushd ${opencv_dir}
|
||||
log_info "Configure OpenCV ..."
|
||||
cmake -S . -B ${opencv_build_dir} ${opencv_cmake_args}
|
||||
|
||||
log_info "Building OpenCV ..."
|
||||
cmake --build ${opencv_build_dir} --config Release
|
||||
|
||||
log_info "Installing OpenCV ..."
|
||||
cmake --install ${opencv_build_dir} --prefix "${advss_dep_path}" --config Release || true
|
||||
popd
|
||||
|
||||
local leptonica_dir="${project_root}/deps/leptonica"
|
||||
local leptonica_build_dir="${leptonica_dir}/build_${target##*-}"
|
||||
|
||||
local -a leptonica_cmake_args=(
|
||||
-DCMAKE_BUILD_TYPE=Release
|
||||
-DCMAKE_OSX_ARCHITECTURES=${${target##*-}//universal/x86_64;arm64}
|
||||
-DCMAKE_OSX_DEPLOYMENT_TARGET=${DEPLOYMENT_TARGET:-10.15}
|
||||
-DSW_BUILD=OFF
|
||||
-DOPENJPEG_SUPPORT=OFF
|
||||
-DLIBWEBP_SUPPORT=OFF
|
||||
-DCMAKE_DISABLE_FIND_PACKAGE_GIF=TRUE
|
||||
-DCMAKE_DISABLE_FIND_PACKAGE_JPEG=TRUE
|
||||
-DCMAKE_DISABLE_FIND_PACKAGE_TIFF=TRUE
|
||||
-DCMAKE_DISABLE_FIND_PACKAGE_PNG=TRUE
|
||||
-DCMAKE_PREFIX_PATH="${advss_dep_path};${_plugin_deps}"
|
||||
-DCMAKE_INSTALL_PREFIX="${advss_dep_path}"
|
||||
)
|
||||
|
||||
pushd ${leptonica_dir}
|
||||
log_info "Configure Leptonica ..."
|
||||
cmake -S . -B ${leptonica_build_dir} ${leptonica_cmake_args}
|
||||
|
||||
log_info "Building Leptonica ..."
|
||||
cmake --build ${leptonica_build_dir} --config Release
|
||||
|
||||
log_info "Installing Leptonica ..."
|
||||
# Workaround for "unknown file attribute: H" errors when running install
|
||||
cmake --install ${leptonica_build_dir} --prefix "${advss_dep_path}" --config Release || :
|
||||
popd
|
||||
|
||||
local tesseract_dir="${project_root}/deps/tesseract"
|
||||
local tesseract_build_dir_x86_64="${tesseract_dir}/build_x86_64"
|
||||
|
||||
pushd ${tesseract_dir}
|
||||
log_info "Configure Tesseract (x86_64) ..."
|
||||
|
||||
local -a tesseract_cmake_args=(
|
||||
-DCMAKE_BUILD_TYPE=Release
|
||||
-DCMAKE_SYSTEM_NAME="Darwin"
|
||||
-DCMAKE_OSX_ARCHITECTURES=x86_64
|
||||
-DCMAKE_SYSTEM_PROCESSOR=x86_64
|
||||
-DCMAKE_OSX_DEPLOYMENT_TARGET=${DEPLOYMENT_TARGET:-10.15}
|
||||
-DSW_BUILD=OFF
|
||||
-DBUILD_TRAINING_TOOLS=OFF
|
||||
-DCMAKE_PREFIX_PATH="${advss_dep_path};${_plugin_deps}"
|
||||
-DCMAKE_INSTALL_PREFIX="${advss_dep_path}"
|
||||
)
|
||||
|
||||
cmake -S . -B ${tesseract_build_dir_x86_64} ${tesseract_cmake_args}
|
||||
|
||||
log_info "Building Tesseract (x86_64) ..."
|
||||
cmake --build ${tesseract_build_dir_x86_64} --config Release
|
||||
|
||||
log_info "Configure Tesseract (arm64) ..."
|
||||
|
||||
git checkout .
|
||||
|
||||
local tesseract_build_dir_arm64="${tesseract_dir}/build_arm64"
|
||||
local -a tesseract_cmake_args=(
|
||||
-DCMAKE_BUILD_TYPE=Release
|
||||
-DCMAKE_SYSTEM_NAME="Darwin"
|
||||
-DCMAKE_OSX_ARCHITECTURES=arm64
|
||||
-DCMAKE_SYSTEM_PROCESSOR=arm64
|
||||
-DCMAKE_OSX_DEPLOYMENT_TARGET=${DEPLOYMENT_TARGET:-10.15}
|
||||
-DSW_BUILD=OFF
|
||||
-DBUILD_TRAINING_TOOLS=OFF
|
||||
-DCMAKE_PREFIX_PATH="${advss_dep_path};${_plugin_deps}"
|
||||
-DCMAKE_INSTALL_PREFIX="${advss_dep_path}"
|
||||
)
|
||||
|
||||
cmake -S . -B ${tesseract_build_dir_arm64} ${tesseract_cmake_args}
|
||||
|
||||
log_info "Building Tesseract (arm64) ..."
|
||||
cmake --build ${tesseract_build_dir_arm64} --config Release
|
||||
|
||||
log_info "Combine arm and x86 libtesseract binaries ..."
|
||||
mv ${tesseract_build_dir_arm64}/libtesseract.a ${tesseract_build_dir_arm64}/libtesseract_arm.a
|
||||
lipo -create ${tesseract_build_dir_x86_64}/libtesseract.a ${tesseract_build_dir_arm64}/libtesseract_arm.a -output ${tesseract_build_dir_arm64}/libtesseract.a
|
||||
|
||||
log_info "Installing Tesseract..."
|
||||
cmake --install ${tesseract_build_dir_arm64} --prefix "${advss_dep_path}" --config Release
|
||||
|
||||
popd
|
||||
|
||||
log_info "Prepare openssl ..."
|
||||
rm -rf ${advss_dep_path}/openssl ${advss_dep_path}/openssl_build
|
||||
mkdir ${advss_dep_path}/openssl_build
|
||||
pushd ${advss_dep_path}/openssl_build
|
||||
|
||||
rm -rf openssl
|
||||
git clone https://github.com/openssl/openssl.git --branch openssl-3.1.2 --depth 1
|
||||
mv openssl openssl_x86
|
||||
cp -r openssl_x86 openssl_arm
|
||||
|
||||
log_info "Building openssl x86 ..."
|
||||
export MACOSX_DEPLOYMENT_TARGET=10.9
|
||||
pushd openssl_x86
|
||||
./Configure darwin64-x86_64-cc no-shared no-module no-zlib --prefix=${advss_dep_path}
|
||||
make -j$(nproc)
|
||||
popd
|
||||
|
||||
log_info "Building openssl arm ..."
|
||||
export MACOSX_DEPLOYMENT_TARGET=10.15
|
||||
pushd openssl_arm
|
||||
./Configure enable-rc5 darwin64-arm64-cc no-shared no-module no-asm no-zlib --prefix=${advss_dep_path}
|
||||
make -j$(nproc)
|
||||
|
||||
log_info "Install openssl ..."
|
||||
make install
|
||||
popd
|
||||
|
||||
log_info "Combine arm and x86 openssl binaries ..."
|
||||
lipo -create openssl_x86/libcrypto.a openssl_arm/libcrypto.a -output ${advss_dep_path}/lib/libcrypto.a
|
||||
lipo -create openssl_x86/libssl.a openssl_arm/libssl.a -output ${advss_dep_path}/lib/libssl.a
|
||||
|
||||
log_info "Clean up openssl dir ..."
|
||||
rm -rf openssl_x86 openssl_arm
|
||||
popd
|
||||
|
||||
pushd ${project_root}/deps/libusb
|
||||
|
||||
log_info "Configure libusb x86 ..."
|
||||
export SDKROOT=$(xcrun --sdk macosx --show-sdk-path)
|
||||
export CC=$(xcrun --sdk macosx --find clang)
|
||||
export CXX=$(xcrun --sdk macosx --find clang++)
|
||||
export CFLAGS="-arch x86_64 -isysroot $SDKROOT"
|
||||
export CXXFLAGS="-arch x86_64 -isysroot $SDKROOT"
|
||||
export LDFLAGS="-arch x86_64 -isysroot $SDKROOT"
|
||||
export MACOSX_DEPLOYMENT_TARGET=10.15
|
||||
|
||||
log_info "Building libusb x86 ..."
|
||||
mkdir ${project_root}/deps/libusb/out_x86
|
||||
./autogen.sh
|
||||
./configure --host=x86_64-apple-darwin --prefix=${advss_dep_path}
|
||||
make -j$(nproc)
|
||||
make install
|
||||
|
||||
log_info "Configure libusb arm ..."
|
||||
make clean
|
||||
rm -r ${project_root}/deps/libusb/out_x86
|
||||
mkdir ${project_root}/deps/libusb/out_x86
|
||||
./configure --host=aarch64-apple-darwin --prefix=${project_root}/deps/libusb/out_x86
|
||||
make -j$(nproc)
|
||||
make install
|
||||
|
||||
log_info "Building libusb arm ..."
|
||||
make clean
|
||||
export SDKROOT=$(xcrun --sdk macosx --show-sdk-path)
|
||||
export CC=$(xcrun --sdk macosx --find clang)
|
||||
export CXX=$(xcrun --sdk macosx --find clang++)
|
||||
export CFLAGS="-arch arm64 -isysroot $SDKROOT"
|
||||
export CXXFLAGS="-arch arm64 -isysroot $SDKROOT"
|
||||
export LDFLAGS="-arch arm64 -isysroot $SDKROOT"
|
||||
export MACOSX_DEPLOYMENT_TARGET=10.15
|
||||
mkdir ${project_root}/deps/libusb/out_arm
|
||||
./configure --host=aarch64-apple-darwin --prefix=${project_root}/deps/libusb/out_arm
|
||||
make -j$(nproc)
|
||||
make install
|
||||
|
||||
log_info "Combine arm and x86 libusb binaries ..."
|
||||
lipo -create ${project_root}/deps/libusb/out_x86/lib/libusb-1.0.0.dylib \
|
||||
${project_root}/deps/libusb/out_arm/lib/libusb-1.0.0.dylib \
|
||||
-output ${advss_dep_path}/lib/temp-libusb-1.0.0.dylib
|
||||
mv ${advss_dep_path}/lib/temp-libusb-1.0.0.dylib ${advss_dep_path}/lib/libusb-1.0.0.dylib
|
||||
install_name_tool -id @rpath/libusb-1.0.0.dylib ${advss_dep_path}/lib/libusb-1.0.0.dylib
|
||||
log_info "Clean up libusb ..."
|
||||
|
||||
unset SDKROOT
|
||||
unset CC
|
||||
unset CXX
|
||||
unset CFLAGS
|
||||
unset CXXFLAGS
|
||||
unset LDFLAGS
|
||||
unset MACOSX_DEPLOYMENT_TARGET
|
||||
|
||||
popd
|
||||
|
||||
local mqtt_dir="${project_root}/deps/paho.mqtt.cpp"
|
||||
local mqtt_build_dir="${mqtt_dir}/build_${target##*-}"
|
||||
|
||||
local -a mqtt_cmake_args=(
|
||||
-DCMAKE_BUILD_TYPE=Release
|
||||
-DCMAKE_OSX_ARCHITECTURES=${${target##*-}//universal/x86_64;arm64}
|
||||
-DCMAKE_OSX_DEPLOYMENT_TARGET=${DEPLOYMENT_TARGET:-10.15}
|
||||
-DCMAKE_PREFIX_PATH="${advss_dep_path};${_plugin_deps}"
|
||||
-DCMAKE_INSTALL_PREFIX="${advss_dep_path}"
|
||||
-DPAHO_BUILD_SHARED=OFF
|
||||
-DPAHO_BUILD_STATIC=ON
|
||||
-DPAHO_WITH_MQTT_C=ON
|
||||
-DPAHO_WITH_SSL=ON
|
||||
-DOPENSSL_USE_STATIC_LIBS=ON
|
||||
)
|
||||
|
||||
pushd ${mqtt_dir}
|
||||
log_info "Configure paho.mqtt.cpp ..."
|
||||
cmake -S . -B ${mqtt_build_dir} ${mqtt_cmake_args}
|
||||
|
||||
log_info "Building paho.mqtt.cpp ..."
|
||||
cmake --build ${mqtt_build_dir} --config Release
|
||||
|
||||
log_info "Installing paho.mqtt.cpp ..."
|
||||
cmake --install ${mqtt_build_dir} --prefix "${advss_dep_path}" --config Release
|
||||
popd
|
||||
;;
|
||||
linux)
|
||||
# Nothing to do for now
|
||||
;;
|
||||
}
|
||||
}
|
||||
|
||||
build ${@}
|
||||
334
.github/scripts/.build.zsh
vendored
Executable file
334
.github/scripts/.build.zsh
vendored
Executable file
|
|
@ -0,0 +1,334 @@
|
|||
#!/usr/bin/env zsh
|
||||
|
||||
builtin emulate -L zsh
|
||||
setopt EXTENDED_GLOB
|
||||
setopt PUSHD_SILENT
|
||||
setopt ERR_EXIT
|
||||
setopt ERR_RETURN
|
||||
setopt NO_UNSET
|
||||
setopt PIPE_FAIL
|
||||
setopt NO_AUTO_PUSHD
|
||||
setopt NO_PUSHD_IGNORE_DUPS
|
||||
setopt FUNCTION_ARGZERO
|
||||
|
||||
## Enable for script debugging
|
||||
# setopt WARN_CREATE_GLOBAL
|
||||
# setopt WARN_NESTED_VAR
|
||||
# setopt XTRACE
|
||||
|
||||
autoload -Uz is-at-least && if ! is-at-least 5.2; then
|
||||
print -u2 -PR "${CI:+::error::}%F{1}${funcstack[1]##*/}:%f Running on Zsh version %B${ZSH_VERSION}%b, but Zsh %B5.2%b is the minimum supported version. Upgrade Zsh to fix this issue."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
TRAPEXIT() {
|
||||
local return_value=$?
|
||||
|
||||
if (( ${+CI} )) unset NSUnbufferedIO
|
||||
|
||||
return ${return_value}
|
||||
}
|
||||
|
||||
TRAPZERR() {
|
||||
if (( ${_loglevel:-3} > 2 )) {
|
||||
print -u2 -PR "${CI:+::error::}%F{1} ✖︎ script execution error%f"
|
||||
print -PR -e "
|
||||
Callstack:
|
||||
${(j:\n :)funcfiletrace}
|
||||
"
|
||||
}
|
||||
|
||||
exit 2
|
||||
}
|
||||
|
||||
build() {
|
||||
if (( ! ${+SCRIPT_HOME} )) typeset -g SCRIPT_HOME=${ZSH_ARGZERO:A:h}
|
||||
local host_os=${${(s:-:)ZSH_ARGZERO:t:r}[2]}
|
||||
local project_root=${SCRIPT_HOME:A:h:h}
|
||||
local buildspec_file=${project_root}/buildspec.json
|
||||
local dep_dir=""
|
||||
|
||||
fpath=("${SCRIPT_HOME}/utils.zsh" ${fpath})
|
||||
autoload -Uz log_group log_info log_error log_output set_loglevel check_${host_os} setup_ccache
|
||||
|
||||
if [[ ! -r ${buildspec_file} ]] {
|
||||
log_error \
|
||||
'No buildspec.json found. Please create a build specification for your project.'
|
||||
return 2
|
||||
}
|
||||
|
||||
typeset -g -a skips=()
|
||||
local -i verbosity=1
|
||||
local -r _version='2.0.0'
|
||||
local -r -a _valid_targets=(
|
||||
macos-universal
|
||||
linux-x86_64
|
||||
linux-aarch64
|
||||
)
|
||||
local target
|
||||
local config='RelWithDebInfo'
|
||||
local -r -a _valid_configs=(Debug RelWithDebInfo Release MinSizeRel)
|
||||
local -i codesign=0
|
||||
|
||||
if [[ ${host_os} == linux ]] {
|
||||
local -r -a _valid_generators=(Ninja 'Unix Makefiles')
|
||||
local generator='Ninja'
|
||||
local -r _usage_host="
|
||||
%F{yellow} Additional options for Linux builds%f
|
||||
-----------------------------------------------------------------------------
|
||||
%B--generator%b Specify build system to generate
|
||||
Available generators:
|
||||
- Ninja
|
||||
- Unix Makefiles"
|
||||
} elif [[ ${host_os} == macos ]] {
|
||||
local -r _usage_host="
|
||||
%F{yellow} Additional options for macOS builds%f
|
||||
-----------------------------------------------------------------------------
|
||||
%B-s | --codesign%b Enable codesigning (macOS only)"
|
||||
}
|
||||
|
||||
local -i print_config=0
|
||||
local -r _usage="
|
||||
Usage: %B${functrace[1]%:*}%b <option> [<options>]
|
||||
|
||||
%BOptions%b:
|
||||
|
||||
%F{yellow} Build configuration options%f
|
||||
-----------------------------------------------------------------------------
|
||||
%B-t | --target%b Specify target
|
||||
%B-c | --config%b Build configuration
|
||||
%B-p | --portable%b Enable portable mode (Linux only)
|
||||
%B-d | --dep%b Dependency directory name - default: %B%F{green}advss-build-dependencies%f%b
|
||||
%B--skip-[all|build|deps]%b Skip all|building|checking for dependencies
|
||||
|
||||
%F{yellow} Output options%f
|
||||
-----------------------------------------------------------------------------
|
||||
%B-q | --quiet%b Quiet (error output only)
|
||||
%B-v | --verbose%b Verbose (more detailed output)
|
||||
%B--debug%b Debug (very detailed and added output)
|
||||
|
||||
%F{yellow} General options%f
|
||||
-----------------------------------------------------------------------------
|
||||
%B-h | --help%b Print this usage help
|
||||
%B-V | --version%b Print script version information
|
||||
${_usage_host:-}"
|
||||
|
||||
local -a args
|
||||
while (( # )) {
|
||||
case ${1} {
|
||||
-t|--target|-c|--config|--generator)
|
||||
if (( # == 1 )) || [[ ${2:0:1} == '-' ]] {
|
||||
log_error "Missing value for option %B${1}%b"
|
||||
log_output ${_usage}
|
||||
exit 2
|
||||
}
|
||||
;;
|
||||
}
|
||||
case ${1} {
|
||||
--)
|
||||
shift
|
||||
args+=($@)
|
||||
break
|
||||
;;
|
||||
-t|--target)
|
||||
if (( ! ${_valid_targets[(Ie)${2}]} )) {
|
||||
log_error "Invalid value %B${2}%b for option %B${1}%b"
|
||||
log_output ${_usage}
|
||||
exit 2
|
||||
}
|
||||
target=${2}
|
||||
shift 2
|
||||
;;
|
||||
-c|--config)
|
||||
if (( ! ${_valid_configs[(Ie)${2}]} )) {
|
||||
log_error "Invalid value %B${2}%b for option %B${1}%b"
|
||||
log_output ${_usage}
|
||||
exit 2
|
||||
}
|
||||
config=${2}
|
||||
shift 2
|
||||
;;
|
||||
-s|--codesign) codesign=1; shift ;;
|
||||
-d|--dep)
|
||||
dep_dir="${2}"
|
||||
shift 2
|
||||
;;
|
||||
-p|--portable) typeset -g PORTABLE=1; shift ;;
|
||||
-q|--quiet) (( verbosity -= 1 )) || true; shift ;;
|
||||
-v|--verbose) (( verbosity += 1 )); shift ;;
|
||||
-h|--help) log_output ${_usage}; exit 0 ;;
|
||||
-V|--version) print -Pr "${_version}"; exit 0 ;;
|
||||
--debug) verbosity=3; shift ;;
|
||||
--generator)
|
||||
if [[ ${host_os} == linux ]] {
|
||||
if (( ! ${_valid_generators[(Ie)${2}]} )) {
|
||||
log_error "Invalid value %B${2}%b for option %B${1}%b"
|
||||
log_output ${_usage}
|
||||
exit 2
|
||||
}
|
||||
generator=${2}
|
||||
}
|
||||
shift 2
|
||||
;;
|
||||
--print-config) print_config=1; skips+=(deps); shift ;;
|
||||
--skip-*)
|
||||
local -r _skip="${${(s:-:)1}[-1]}"
|
||||
local -r -a _check=(all build deps)
|
||||
(( ${_check[(Ie)${_skip}]} )) || log_warning "Invalid skip mode %B${_skip}%b supplied"
|
||||
typeset -g -a skips=(${skips} ${_skip})
|
||||
shift
|
||||
;;
|
||||
*) log_error "Unknown option: %B${1}%b"; log_output ${_usage}; exit 2 ;;
|
||||
}
|
||||
}
|
||||
|
||||
: "${target:="${host_os}-${CPUTYPE}"}"
|
||||
|
||||
set -- ${(@)args}
|
||||
set_loglevel ${verbosity}
|
||||
|
||||
if (( ! (${skips[(Ie)all]} + ${skips[(Ie)deps]}) )) {
|
||||
check_${host_os}
|
||||
setup_ccache
|
||||
}
|
||||
|
||||
if [[ ${host_os} == linux ]] {
|
||||
autoload -Uz setup_linux && setup_linux
|
||||
}
|
||||
|
||||
local advss_deps_path
|
||||
if [[ -z "${dep_dir}" ]] {
|
||||
log_info "Building advss deps ..."
|
||||
dep_dir=".deps/advss-build-dependencies"
|
||||
${SCRIPT_HOME}/build-deps-${host_os}.zsh -c "${BUILD_CONFIG:-RelWithDebInfo}" -t "${target}" --generator "${generator}" -o "${dep_dir}"
|
||||
}
|
||||
advss_deps_path=$(realpath ${project_root}/${dep_dir})
|
||||
log_info "Using advss deps at $advss_deps_path ..."
|
||||
|
||||
local product_name
|
||||
local product_version
|
||||
local git_tag="$(git describe --tags)"
|
||||
read -r product_name product_version <<< \
|
||||
"$(jq -r '. | {name, version} | join(" ")' ${buildspec_file})"
|
||||
|
||||
if [[ "${git_tag}" =~ '^([0-9]+\.){0,2}(\*|[0-9]+)$' ]] {
|
||||
log_info "Using git tag as version identifier '${git_tag}'"
|
||||
product_version="${git_tag}"
|
||||
} else {
|
||||
log_info "Using buildspec.json version identifier '${product_version}'"
|
||||
}
|
||||
|
||||
case ${host_os} {
|
||||
macos)
|
||||
sed -i '' \
|
||||
"s/project(\(.*\) VERSION \(.*\))/project(${product_name} VERSION ${product_version})/" \
|
||||
"${project_root}/CMakeLists.txt"
|
||||
;;
|
||||
linux)
|
||||
sed -i'' \
|
||||
"s/project(\(.*\) VERSION \(.*\))/project(${product_name} VERSION ${product_version})/"\
|
||||
"${project_root}/CMakeLists.txt"
|
||||
;;
|
||||
}
|
||||
|
||||
pushd ${project_root}
|
||||
if (( ! (${skips[(Ie)all]} + ${skips[(Ie)build]}) )) {
|
||||
log_group "Configuring ${product_name}..."
|
||||
|
||||
local -a cmake_args=(
|
||||
-DCMAKE_PREFIX_PATH="${advss_deps_path}"
|
||||
)
|
||||
local -a cmake_build_args=(--build)
|
||||
local -a cmake_install_args=(--install)
|
||||
|
||||
case ${_loglevel} {
|
||||
0) cmake_args+=(-Wno_deprecated -Wno-dev --log-level=ERROR) ;;
|
||||
1) ;;
|
||||
2) cmake_build_args+=(--verbose) ;;
|
||||
*) cmake_args+=(--debug-output) ;;
|
||||
}
|
||||
|
||||
local -r _preset="${target%%-*}${CI:+-ci}"
|
||||
case ${target} {
|
||||
macos-*)
|
||||
if (( ${+CI} )) typeset -gx NSUnbufferedIO=YES
|
||||
|
||||
cmake_args+=(
|
||||
-DCMAKE_PREFIX_PATH="${advss_deps_path}"
|
||||
--preset ${_preset}
|
||||
)
|
||||
|
||||
if (( codesign )) {
|
||||
autoload -Uz read_codesign_team && read_codesign_team
|
||||
|
||||
if [[ -z ${CODESIGN_TEAM} ]] {
|
||||
autoload -Uz read_codesign && read_codesign
|
||||
}
|
||||
}
|
||||
|
||||
cmake_args+=(
|
||||
-DCODESIGN_TEAM=${CODESIGN_TEAM:-}
|
||||
-DCODESIGN_IDENTITY=${CODESIGN_IDENT:--}
|
||||
)
|
||||
|
||||
cmake_build_args+=(--preset ${_preset} --parallel --config ${config} -- ONLY_ACTIVE_ARCH=NO -arch arm64 -arch x86_64)
|
||||
cmake_install_args+=(build_macos --config ${config} --prefix "${project_root}/release/${config}")
|
||||
|
||||
local -a xcbeautify_opts=()
|
||||
if (( _loglevel == 0 )) xcbeautify_opts+=(--quiet)
|
||||
;;
|
||||
linux-*)
|
||||
cmake_args+=(
|
||||
--preset ${_preset}-${target##*-}
|
||||
-G "${generator}"
|
||||
-DQT_VERSION=${QT_VERSION:-6}
|
||||
-DCMAKE_BUILD_TYPE=${config}
|
||||
-DCMAKE_INSTALL_PREFIX=/usr
|
||||
)
|
||||
|
||||
local cmake_version
|
||||
read -r _ _ cmake_version <<< "$(cmake --version)"
|
||||
|
||||
if [[ ${CPUTYPE} != ${target##*-} ]] {
|
||||
if is-at-least 3.21.0 ${cmake_version}; then
|
||||
cmake_args+=(--toolchain "${project_root}/cmake/linux/toolchains/${target##*-}-linux-gcc.cmake")
|
||||
else
|
||||
cmake_args+=(-D"CMAKE_TOOLCHAIN_FILE=${project_root}/cmake/linux/toolchains/${target##*-}-linux-gcc.cmake")
|
||||
fi
|
||||
}
|
||||
|
||||
cmake_build_args+=(--preset ${_preset}-${target##*-} --config ${config})
|
||||
if [[ ${generator} == 'Unix Makefiles' ]] {
|
||||
cmake_build_args+=(--parallel $(( $(nproc) + 1 )))
|
||||
} else {
|
||||
cmake_build_args+=(--parallel)
|
||||
}
|
||||
|
||||
cmake_install_args+=(build_${target##*-} --prefix ${project_root}/release/${config})
|
||||
;;
|
||||
}
|
||||
|
||||
log_debug "Attempting to configure with CMake arguments: ${cmake_args}"
|
||||
|
||||
cmake ${cmake_args}
|
||||
|
||||
log_group "Building ${product_name}..."
|
||||
if [[ ${host_os} == macos ]] {
|
||||
if (( _loglevel > 1 )) {
|
||||
cmake ${cmake_build_args}
|
||||
} else {
|
||||
cmake ${cmake_build_args} 2>&1 | xcbeautify ${xcbeautify_opts}
|
||||
}
|
||||
} else {
|
||||
cmake ${cmake_build_args}
|
||||
}
|
||||
}
|
||||
|
||||
log_group "Installing ${product_name}..."
|
||||
if (( _loglevel > 1 )) cmake_install_args+=(--verbose)
|
||||
cmake ${cmake_install_args}
|
||||
popd
|
||||
log_group
|
||||
}
|
||||
|
||||
build ${@}
|
||||
283
.github/scripts/.package.zsh
vendored
Executable file
283
.github/scripts/.package.zsh
vendored
Executable file
|
|
@ -0,0 +1,283 @@
|
|||
#!/usr/bin/env zsh
|
||||
|
||||
builtin emulate -L zsh
|
||||
setopt EXTENDED_GLOB
|
||||
setopt PUSHD_SILENT
|
||||
setopt ERR_EXIT
|
||||
setopt ERR_RETURN
|
||||
setopt NO_UNSET
|
||||
setopt PIPE_FAIL
|
||||
setopt NO_AUTO_PUSHD
|
||||
setopt NO_PUSHD_IGNORE_DUPS
|
||||
setopt FUNCTION_ARGZERO
|
||||
|
||||
## Enable for script debugging
|
||||
# setopt WARN_CREATE_GLOBAL
|
||||
# setopt WARN_NESTED_VAR
|
||||
# setopt XTRACE
|
||||
|
||||
autoload -Uz is-at-least && if ! is-at-least 5.2; then
|
||||
print -u2 -PR "${CI:+::error::}%F{1}${funcstack[1]##*/}:%f Running on Zsh version %B${ZSH_VERSION}%b, but Zsh %B5.2%b is the minimum supported version. Upgrade Zsh to fix this issue."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
TRAPEXIT() {
|
||||
local return_value=$?
|
||||
|
||||
if (( ${+CI} )) {
|
||||
unset NSUnbufferedIO
|
||||
}
|
||||
|
||||
return ${return_value}
|
||||
}
|
||||
|
||||
TRAPZERR() {
|
||||
if (( ${_loglevel:-3} > 2 )) {
|
||||
print -u2 -PR "${CI:+::error::}%F{1} ✖︎ script execution error%f"
|
||||
print -PR -e "
|
||||
Callstack:
|
||||
${(j:\n :)funcfiletrace}
|
||||
"
|
||||
}
|
||||
|
||||
exit 2
|
||||
}
|
||||
|
||||
package() {
|
||||
if (( ! ${+SCRIPT_HOME} )) typeset -g SCRIPT_HOME=${ZSH_ARGZERO:A:h}
|
||||
local host_os=${${(s:-:)ZSH_ARGZERO:t:r}[2]}
|
||||
local project_root=${SCRIPT_HOME:A:h:h}
|
||||
local buildspec_file=${project_root}/buildspec.json
|
||||
|
||||
fpath=("${SCRIPT_HOME}/utils.zsh" ${fpath})
|
||||
autoload -Uz set_loglevel log_info log_group log_error log_output check_${host_os}
|
||||
|
||||
if [[ ! -r ${buildspec_file} ]] {
|
||||
log_error \
|
||||
'No buildspec.json found. Please create a build specification for your project.'
|
||||
return 2
|
||||
}
|
||||
|
||||
local -i verbosity=1
|
||||
local -r _version='2.0.0'
|
||||
local -r -a _valid_targets=(
|
||||
macos-universal
|
||||
linux-x86_64
|
||||
)
|
||||
local target
|
||||
local config='RelWithDebInfo'
|
||||
local -r -a _valid_configs=(Debug RelWithDebInfo Release MinSizeRel)
|
||||
local -i codesign=0
|
||||
local -i notarize=0
|
||||
local -i package=0
|
||||
local -i skip_deps=0
|
||||
|
||||
if [[ ${host_os} == macos ]] {
|
||||
local -r _usage_host="
|
||||
%F{yellow} Additional options for macOS builds%f
|
||||
-----------------------------------------------------------------------------
|
||||
%B-s | --codesign%b Enable codesigning (macOS only)
|
||||
%B-n | --notarize%b Enable notarization (macOS only)
|
||||
%B-p | --package%b Create package installer (macOS only)"
|
||||
}
|
||||
|
||||
local -r _usage="
|
||||
Usage: %B${functrace[1]%:*}%b <option> [<options>]
|
||||
|
||||
%BOptions%b:
|
||||
|
||||
%F{yellow} Package configuration options%f
|
||||
-----------------------------------------------------------------------------
|
||||
%B-t | --target%b Specify target
|
||||
%B-c | --config%b Build configuration
|
||||
%B--skip-deps%b Skip checking for dependencies
|
||||
|
||||
%F{yellow} Output options%f
|
||||
-----------------------------------------------------------------------------
|
||||
%B-q | --quiet%b Quiet (error output only)
|
||||
%B-v | --verbose%b Verbose (more detailed output)
|
||||
%B--debug%b Debug (very detailed and added output)
|
||||
|
||||
%F{yellow} General options%f
|
||||
-----------------------------------------------------------------------------
|
||||
%B-h | --help%b Print this usage help
|
||||
%B-V | --version%b Print script version information
|
||||
${_usage_host:-}"
|
||||
|
||||
local -a args
|
||||
while (( # )) {
|
||||
case ${1} {
|
||||
-t|--target|-c|--config)
|
||||
if (( # == 1 )) || [[ ${2:0:1} == '-' ]] {
|
||||
log_error "Missing value for option %B${1}%b"
|
||||
log_output ${_usage}
|
||||
exit 2
|
||||
}
|
||||
;;
|
||||
}
|
||||
case ${1} {
|
||||
--)
|
||||
shift
|
||||
args+=($@)
|
||||
break
|
||||
;;
|
||||
-t|--target)
|
||||
if (( ! ${_valid_targets[(Ie)${2}]} )) {
|
||||
log_error "Invalid value %B${2}%b for option %B${1}%b"
|
||||
log_output ${_usage}
|
||||
exit 2
|
||||
}
|
||||
target=${2}
|
||||
shift 2
|
||||
;;
|
||||
-c|--config)
|
||||
if (( !${_valid_configs[(Ie)${2}]} )) {
|
||||
log_error "Invalid value %B${2}%b for option %B${1}%b"
|
||||
log_output ${_usage}
|
||||
exit 2
|
||||
}
|
||||
config=${2}
|
||||
shift 2
|
||||
;;
|
||||
-s|--codesign) typeset -g codesign=1; shift ;;
|
||||
-n|--notarize) typeset -g notarize=1; typeset -g codesign=1; shift ;;
|
||||
-p|--package) typeset -g package=1; shift ;;
|
||||
--skip-deps) typeset -g skip_deps=1; shift ;;
|
||||
-q|--quiet) (( verbosity -= 1 )) || true; shift ;;
|
||||
-v|--verbose) (( verbosity += 1 )); shift ;;
|
||||
-h|--help) log_output ${_usage}; exit 0 ;;
|
||||
-V|--version) print -Pr "${_version}"; exit 0 ;;
|
||||
--debug) verbosity=3; shift ;;
|
||||
*) log_error "Unknown option: %B${1}%b"; log_output ${_usage}; exit 2 ;;
|
||||
}
|
||||
}
|
||||
|
||||
: "${target:="${host_os}-${CPUTYPE}"}"
|
||||
|
||||
set -- ${(@)args}
|
||||
set_loglevel ${verbosity}
|
||||
|
||||
if (( ! skip_deps )) {
|
||||
check_${host_os}
|
||||
}
|
||||
|
||||
local product_name
|
||||
local product_version
|
||||
local git_tag="$(git describe --tags)"
|
||||
read -r product_name product_version <<< \
|
||||
"$(jq -r '. | {name, version} | join(" ")' ${buildspec_file})"
|
||||
|
||||
log_info "Using git tag as version identifier '${git_tag}'"
|
||||
product_version="${git_tag}"
|
||||
|
||||
if [[ ${host_os} == macos ]] {
|
||||
autoload -Uz check_packages read_codesign read_codesign_installer read_codesign_pass
|
||||
|
||||
local output_name="${product_name}-${product_version}-${host_os}-universal"
|
||||
|
||||
if [[ ! -d ${project_root}/release/${config}/${product_name}.plugin ]] {
|
||||
log_error 'No release artifact found. Run the build script or the CMake install procedure first.'
|
||||
return 2
|
||||
}
|
||||
|
||||
local _tarflags='cJf'
|
||||
if (( _loglevel > 1 || ${+CI} )) _tarflags="v${_tarflags}"
|
||||
|
||||
if (( package )) {
|
||||
if [[ ! -f ${project_root}/release/${config}/${product_name}.pkg ]] {
|
||||
log_error 'Installer Package not found. Run the build script or the CMake build and install procedures first.'
|
||||
return 2
|
||||
}
|
||||
|
||||
log_group "Packaging ${product_name}..."
|
||||
pushd ${project_root}
|
||||
|
||||
if (( codesign )) {
|
||||
read_codesign_installer
|
||||
productsign \
|
||||
--sign "${CODESIGN_IDENT_INSTALLER}" \
|
||||
${project_root}/release/${config}/${product_name}.pkg \
|
||||
${project_root}/release/${output_name}.pkg
|
||||
|
||||
rm ${project_root}/release/${config}/${product_name}.pkg
|
||||
} else {
|
||||
mv ${project_root}/release/${config}/${product_name}.pkg \
|
||||
${project_root}/release/${output_name}.pkg
|
||||
}
|
||||
|
||||
if (( codesign && notarize )) {
|
||||
if [[ ! -f ${project_root}/release/${output_name}.pkg ]] {
|
||||
log_error "No package for notarization found."
|
||||
return 2
|
||||
}
|
||||
|
||||
read_codesign_installer
|
||||
read_codesign_pass
|
||||
|
||||
xcrun notarytool submit ${project_root}/release/${output_name}.pkg \
|
||||
--keychain-profile "OBS-Codesign-Password" --wait
|
||||
|
||||
local -i _status=0
|
||||
|
||||
xcrun stapler staple ${project_root}/release/${output_name}.pkg || _status=1
|
||||
|
||||
if (( _status )) {
|
||||
log_error "Notarization failed. Use 'xcrun notarytool log <submission ID>' to check for errors."
|
||||
return 2
|
||||
}
|
||||
}
|
||||
popd
|
||||
}
|
||||
|
||||
log_group "Archiving ${product_name}..."
|
||||
pushd ${project_root}/release/${config}
|
||||
XZ_OPT=-T0 tar "-${_tarflags}" ${project_root}/release/${output_name}.tar.xz ${product_name}.plugin
|
||||
popd
|
||||
|
||||
if [[ ${config} == Release ]] {
|
||||
log_group "Archiving ${product_name} Debug Symbols..."
|
||||
pushd ${project_root}/release/${config}
|
||||
XZ_OPT=-T0 tar "-${_tarflags}" ${project_root}/release/${output_name}-dSYMs.tar.xz ${product_name}.plugin.dSYM
|
||||
popd
|
||||
}
|
||||
|
||||
log_group
|
||||
} elif [[ ${host_os} == linux ]] {
|
||||
local -a cmake_args=()
|
||||
if (( _loglevel > 1 )) cmake_args+=(--verbose)
|
||||
|
||||
log_group "Creating source tarball for ${product_name}..."
|
||||
pushd ${project_root}
|
||||
cmake --build build_${target##*-} --config ${config} -t package_source ${cmake_args}
|
||||
popd
|
||||
|
||||
local output_name="${product_name}-${product_version}-${target##*-}-linux-gnu"
|
||||
|
||||
if (( package )) {
|
||||
log_group "Packaging ${product_name}..."
|
||||
pushd ${project_root}
|
||||
cmake --build build_${target##*-} --config ${config} -t package ${cmake_args}
|
||||
|
||||
# Mark certain deps as optional
|
||||
build-aux/CI/linux/demote-deps.sh ${project_root}/release/*.deb Recommends '(mqtt)|(opencv)|(tesseract)|(usb)|(x11)'
|
||||
|
||||
if [ ! -e ${project_root}/release/${output_name}.deb ]; then
|
||||
mv ${project_root}/release/*.deb ${project_root}/release/${output_name}.deb
|
||||
mv ${project_root}/release/*.ddeb ${project_root}/release/${output_name}.ddeb
|
||||
fi
|
||||
popd
|
||||
}
|
||||
|
||||
log_group "Archiving ${product_name}..."
|
||||
local _tarflags='cJf'
|
||||
if (( _loglevel > 1 || ${+CI} )) _tarflags="v${_tarflags}"
|
||||
|
||||
pushd ${project_root}/release/${config}
|
||||
XZ_OPT=-T0 tar "-${_tarflags}" ${project_root}/release/${output_name}.tar.xz (lib|share)
|
||||
popd
|
||||
|
||||
log_group
|
||||
}
|
||||
}
|
||||
|
||||
package ${@}
|
||||
273
.github/scripts/Build-Deps-Windows.ps1
vendored
Normal file
273
.github/scripts/Build-Deps-Windows.ps1
vendored
Normal file
|
|
@ -0,0 +1,273 @@
|
|||
[CmdletBinding()]
|
||||
param(
|
||||
[ValidateSet('Debug', 'RelWithDebInfo', 'Release', 'MinSizeRel')]
|
||||
[string] $Configuration = 'RelWithDebInfo',
|
||||
[ValidateSet('x86', 'x64')]
|
||||
[string] $Target,
|
||||
[ValidateSet('Visual Studio 17 2022', 'Visual Studio 16 2019')]
|
||||
[string] $CMakeGenerator,
|
||||
[string] $OutDirName,
|
||||
[switch] $SkipDeps,
|
||||
[switch] $SkipUnpack
|
||||
)
|
||||
|
||||
$ErrorActionPreference = 'Stop'
|
||||
|
||||
if (-not $Target) {
|
||||
$Target = "x64"
|
||||
}
|
||||
|
||||
if ( $DebugPreference -eq 'Continue' ) {
|
||||
$VerbosePreference = 'Continue'
|
||||
$InformationPreference = 'Continue'
|
||||
}
|
||||
|
||||
if ( $PSVersionTable.PSVersion -lt '7.0.0' ) {
|
||||
Write-Warning 'The obs-deps PowerShell build script requires PowerShell Core 7. Install or upgrade your PowerShell version: https://aka.ms/pscore6'
|
||||
exit 2
|
||||
}
|
||||
|
||||
function Build {
|
||||
trap {
|
||||
Pop-Location -Stack BuildTemp -ErrorAction 'SilentlyContinue'
|
||||
Write-Error $_
|
||||
exit 2
|
||||
}
|
||||
|
||||
$ScriptHome = $PSScriptRoot
|
||||
$ProjectRoot = Resolve-Path -Path "$PSScriptRoot/../.."
|
||||
$BuildSpecFile = "${ProjectRoot}/buildspec.json"
|
||||
|
||||
$UtilityFunctions = Get-ChildItem -Path $PSScriptRoot/utils.pwsh/*.ps1 -Recurse
|
||||
|
||||
foreach ($Utility in $UtilityFunctions) {
|
||||
Write-Debug "Loading $($Utility.FullName)"
|
||||
. $Utility.FullName
|
||||
}
|
||||
|
||||
if ( ! $SkipDeps ) {
|
||||
Install-BuildDependencies -WingetFile "${ScriptHome}/.Wingetfile"
|
||||
}
|
||||
|
||||
Log-Information "Run plugin configure step to download OBS deps ..."
|
||||
Push-Location -Stack BuildTemp
|
||||
if ( ! ( ( $SkipAll ) -or ( $SkipBuild ) ) ) {
|
||||
Ensure-Location $ProjectRoot
|
||||
|
||||
$CmakeArgs = @(
|
||||
"-DCMAKE_PREFIX_PATH:PATH=${ADVSSDepPath}"
|
||||
)
|
||||
$CmakeBuildArgs = @()
|
||||
$CmakeInstallArgs = @()
|
||||
|
||||
if ( $VerbosePreference -eq 'Continue' ) {
|
||||
$CmakeBuildArgs += ('--verbose')
|
||||
$CmakeInstallArgs += ('--verbose')
|
||||
}
|
||||
|
||||
if ( $DebugPreference -eq 'Continue' ) {
|
||||
$CmakeArgs += ('--debug-output')
|
||||
}
|
||||
|
||||
$Preset = "windows-$(if ( $Env:CI -ne $null ) { 'ci-' })${Target}"
|
||||
|
||||
$CmakeArgs += @(
|
||||
'--preset', $Preset
|
||||
)
|
||||
|
||||
$CmakeBuildArgs += @(
|
||||
'--build'
|
||||
'--preset', $Preset
|
||||
'--config', $Configuration
|
||||
'--parallel'
|
||||
'--', '/consoleLoggerParameters:Summary', '/noLogo'
|
||||
)
|
||||
|
||||
$CmakeInstallArgs += @(
|
||||
'--install', "build_${Target}"
|
||||
'--prefix', "${ProjectRoot}/release/${Configuration}"
|
||||
'--config', $Configuration
|
||||
)
|
||||
|
||||
Log-Group "Configuring ${ProductName}..."
|
||||
Invoke-External cmake @CmakeArgs
|
||||
}
|
||||
|
||||
$BuildSpec = Get-Content -Path ${BuildSpecFile} -Raw | ConvertFrom-Json
|
||||
$depsVersion = $BuildSpec.dependencies.prebuilt.version
|
||||
$qtDepsVersion = $BuildSpec.dependencies.qt6.version
|
||||
$OBSDepPath = "$(Resolve-Path -Path ${ProjectRoot}/.deps/obs-deps-${depsVersion}-${Target});$(Resolve-Path -Path ${ProjectRoot}/.deps/obs-deps-qt6-${qtDepsVersion}-${Target})"
|
||||
|
||||
if ( $OutDirName -eq '' ) {
|
||||
$OutDirName = ".deps/advss-build-dependencies"
|
||||
}
|
||||
New-Item -ItemType Directory -Force -Path ${ProjectRoot}/${OutDirName}
|
||||
|
||||
$ADVSSDepPath = "$(Resolve-Path -Path ${ProjectRoot}/${OutDirName})"
|
||||
|
||||
$OpenCVPath = "${ProjectRoot}/deps/opencv"
|
||||
$OpenCVBuildPath = "${OpenCVPath}/build"
|
||||
|
||||
Push-Location -Stack BuildOpenCVTemp
|
||||
Ensure-Location $ProjectRoot
|
||||
|
||||
$OpenCVCmakeArgs = @(
|
||||
"-DCMAKE_BUILD_TYPE=Release"
|
||||
"-DCMAKE_PREFIX_PATH:PATH=${OBSDepPath}"
|
||||
"-DCMAKE_INSTALL_PREFIX:PATH=${ADVSSDepPath}"
|
||||
"-DBUILD_LIST=core,imgproc,objdetect"
|
||||
)
|
||||
|
||||
Log-Information "Configuring OpenCV..."
|
||||
Invoke-External cmake -S ${OpenCVPath} -B ${OpenCVBuildPath} @OpenCVCmakeArgs
|
||||
|
||||
$OpenCVCmakeArgs = @(
|
||||
'--config', "Release"
|
||||
)
|
||||
|
||||
if ( $VerbosePreference -eq 'Continue' ) {
|
||||
$OpenCVCmakeArgs += ('--verbose')
|
||||
}
|
||||
|
||||
Log-Information "Building OpenCV..."
|
||||
Invoke-External cmake --build "${OpenCVBuildPath}" @OpenCVCmakeArgs
|
||||
Log-Information "Install OpenCV}..."
|
||||
Invoke-External cmake --install "${OpenCVBuildPath}" --prefix "${ADVSSDepPath}" @OpenCVCmakeArgs
|
||||
|
||||
$LeptonicaPath = "${ProjectRoot}/deps/leptonica"
|
||||
$LeptonicaBuildPath = "${LeptonicaPath}/build"
|
||||
|
||||
Push-Location -Stack BuildLeptonicaTemp
|
||||
Ensure-Location $ProjectRoot
|
||||
|
||||
$LeptonicaCmakeArgs = @(
|
||||
"-DCMAKE_BUILD_TYPE=${Configuration}"
|
||||
"-DCMAKE_PREFIX_PATH:PATH=${OBSDepPath}"
|
||||
"-DCMAKE_INSTALL_PREFIX:PATH=${ADVSSDepPath}"
|
||||
"-DSW_BUILD=OFF"
|
||||
"-DLIBWEBP_SUPPORT=OFF"
|
||||
)
|
||||
|
||||
Log-Information "Configuring leptonica..."
|
||||
Invoke-External cmake -S ${LeptonicaPath} -B ${LeptonicaBuildPath} @LeptonicaCmakeArgs
|
||||
|
||||
$LeptonicaCmakeArgs = @(
|
||||
'--config', "${Configuration}"
|
||||
)
|
||||
|
||||
if ( $VerbosePreference -eq 'Continue' ) {
|
||||
$LeptonicaCmakeArgs += ('--verbose')
|
||||
}
|
||||
|
||||
Log-Information "Building leptonica..."
|
||||
Invoke-External cmake --build "${LeptonicaBuildPath}" @LeptonicaCmakeArgs
|
||||
|
||||
Log-Information "Install leptonica..."
|
||||
Invoke-External cmake --install "${LeptonicaBuildPath}" --prefix "${ADVSSDepPath}" @LeptonicaCmakeArgs
|
||||
|
||||
Push-Location -Stack BuildTesseractTemp
|
||||
Ensure-Location $ProjectRoot
|
||||
|
||||
$TesseractPath = "${ProjectRoot}/deps/tesseract"
|
||||
$TesseractBuildPath = "${TesseractPath}/build"
|
||||
|
||||
# Explicitly disable PkgConfig and tiff as it will lead build errors
|
||||
$TesseractCmakeArgs = @(
|
||||
"-DCMAKE_BUILD_TYPE=${Configuration}"
|
||||
"-DCMAKE_PREFIX_PATH:PATH=${OBSDepPath}"
|
||||
"-DCMAKE_INSTALL_PREFIX:PATH=${ADVSSDepPath}"
|
||||
"-DSW_BUILD=OFF"
|
||||
"-DDISABLE_CURL=ON"
|
||||
"-DBUILD_TRAINING_TOOLS=OFF"
|
||||
"-DCMAKE_DISABLE_FIND_PACKAGE_TIFF=TRUE"
|
||||
"-DCMAKE_DISABLE_FIND_PACKAGE_PkgConfig=TRUE"
|
||||
)
|
||||
|
||||
Log-Information "Configuring tesseract..."
|
||||
Invoke-External cmake -S ${TesseractPath} -B ${TesseractBuildPath} @TesseractCmakeArgs
|
||||
|
||||
$TesseractCmakeArgs = @(
|
||||
'--config', "${Configuration}"
|
||||
)
|
||||
|
||||
if ( $VerbosePreference -eq 'Continue' ) {
|
||||
$TesseractCmakeArgs += ('--verbose')
|
||||
}
|
||||
|
||||
Log-Information "Building tesseract..."
|
||||
Invoke-External cmake --build "${TesseractBuildPath}" @TesseractCmakeArgs
|
||||
|
||||
Log-Information "Install tesseract..."
|
||||
Invoke-External cmake --install "${TesseractBuildPath}" --prefix "${ADVSSDepPath}" @TesseractCmakeArgs
|
||||
|
||||
Push-Location -Stack BuildLibusbTemp
|
||||
Ensure-Location $ProjectRoot
|
||||
|
||||
$LibusbPath = "${ProjectRoot}/deps/libusb"
|
||||
|
||||
Log-Information "Building libusb..."
|
||||
$msbuildExe = vswhere -latest -requires Microsoft.Component.MSBuild -find MSBuild\**\Bin\MSBuild.exe | select-object -first 1
|
||||
|
||||
if ($msbuildExe) {
|
||||
$env:CL="/wd5287"
|
||||
Invoke-External $msbuildExe "${LibusbPath}/msvc/libusb.sln" /property:Configuration=Release /property:Platform=x64
|
||||
Remove-Item Env:CL
|
||||
|
||||
$libusbBuildResultDirectory = "${LibusbPath}/build/v143/x64/Release"
|
||||
if (-not (Test-Path -Path $libusbBuildResultDirectory)) {
|
||||
$libusbBuildResultDirectory = "${LibusbPath}/x64/Release/dll"
|
||||
}
|
||||
Copy-Item -Path "${libusbBuildResultDirectory}/*" -Destination ${ADVSSDepPath} -Recurse -Force
|
||||
} else {
|
||||
Log-Information "Failed to locate msbuild.exe - skipping libusb build"
|
||||
}
|
||||
|
||||
Push-Location -Stack BuildMqttTemp
|
||||
Ensure-Location $ProjectRoot
|
||||
|
||||
$MqttPath = "${ProjectRoot}/deps/paho.mqtt.cpp"
|
||||
$MqttBuildPath = "${MqttPath}/build"
|
||||
|
||||
# Explicitly disable PkgConfig and tiff as it will lead build errors
|
||||
$MqttCmakeArgs = @(
|
||||
"-DCMAKE_BUILD_TYPE=${Configuration}"
|
||||
"-DCMAKE_PREFIX_PATH:PATH=${OBSDepPath}"
|
||||
"-DCMAKE_INSTALL_PREFIX:PATH=${ADVSSDepPath}"
|
||||
"-DPAHO_WITH_MQTT_C=ON"
|
||||
"-DPAHO_WITH_SSL=ON"
|
||||
)
|
||||
|
||||
# Try to find OpenSSL installed via winget
|
||||
$pf64 = Join-Path $Env:ProgramFiles "OpenSSL-Win64"
|
||||
$pf = Join-Path $Env:ProgramFiles "OpenSSL"
|
||||
$possibleDirs = @($pf64, $pf)
|
||||
$opensslDir = $possibleDirs | Where-Object { Test-Path (Join-Path $_ "include\openssl\ssl.h") } | Select-Object -First 1
|
||||
|
||||
if ($opensslDir) {
|
||||
Write-Host "Detected OpenSSL at: $opensslDir"
|
||||
$MqttCmakeArgs += "-DOPENSSL_ROOT_DIR=$opensslDir"
|
||||
$MqttCmakeArgs += "-DOPENSSL_CRYPTO_LIBRARY=$opensslDir\lib\VC\x64\MD\libcrypto.lib"
|
||||
$MqttCmakeArgs += "-DOPENSSL_SSL_LIBRARY=$opensslDir\lib\VC\x64\MD\libssl.lib"
|
||||
} else {
|
||||
Write-Warning "OpenSSL not found - maybe cmake will find it ..."
|
||||
}
|
||||
|
||||
Log-Information "Configuring paho.mqtt.cpp..."
|
||||
Invoke-External cmake -S ${MqttPath} -B ${MqttBuildPath} @MqttCmakeArgs
|
||||
|
||||
$MqttCmakeArgs = @(
|
||||
'--config', "${Configuration}"
|
||||
)
|
||||
|
||||
if ( $VerbosePreference -eq 'Continue' ) {
|
||||
$MqttCmakeArgs += ('--verbose')
|
||||
}
|
||||
|
||||
Log-Information "Building paho.mqtt.cpp..."
|
||||
Invoke-External cmake --build "${MqttBuildPath}" @MqttCmakeArgs
|
||||
|
||||
Log-Information "Install paho.mqtt.cpp..."
|
||||
Invoke-External cmake --install "${MqttBuildPath}" --prefix "${ADVSSDepPath}" @MqttCmakeArgs
|
||||
}
|
||||
|
||||
Build
|
||||
130
.github/scripts/Build-Windows.ps1
vendored
Normal file
130
.github/scripts/Build-Windows.ps1
vendored
Normal file
|
|
@ -0,0 +1,130 @@
|
|||
[CmdletBinding()]
|
||||
param(
|
||||
[ValidateSet('x64')]
|
||||
[string] $Target = 'x64',
|
||||
[ValidateSet('Debug', 'RelWithDebInfo', 'Release', 'MinSizeRel')]
|
||||
[string] $Configuration = 'RelWithDebInfo',
|
||||
[switch] $SkipAll,
|
||||
[switch] $SkipBuild,
|
||||
[switch] $SkipDeps,
|
||||
[string] $ADVSSDepName
|
||||
)
|
||||
|
||||
$ErrorActionPreference = 'Stop'
|
||||
|
||||
if ( $DebugPreference -eq 'Continue' ) {
|
||||
$VerbosePreference = 'Continue'
|
||||
$InformationPreference = 'Continue'
|
||||
}
|
||||
|
||||
if ( ! ( [System.Environment]::Is64BitOperatingSystem ) ) {
|
||||
throw "A 64-bit system is required to build the project."
|
||||
}
|
||||
|
||||
if ( $PSVersionTable.PSVersion -lt '7.0.0' ) {
|
||||
Write-Warning 'The obs-deps PowerShell build script requires PowerShell Core 7. Install or upgrade your PowerShell version: https://aka.ms/pscore6'
|
||||
exit 2
|
||||
}
|
||||
|
||||
function Build {
|
||||
trap {
|
||||
Pop-Location -Stack BuildTemp -ErrorAction 'SilentlyContinue'
|
||||
Write-Error $_
|
||||
Log-Group
|
||||
exit 2
|
||||
}
|
||||
|
||||
$ScriptHome = $PSScriptRoot
|
||||
$ProjectRoot = Resolve-Path -Path "$PSScriptRoot/../.."
|
||||
$BuildSpecFile = "${ProjectRoot}/buildspec.json"
|
||||
|
||||
$UtilityFunctions = Get-ChildItem -Path $PSScriptRoot/utils.pwsh/*.ps1 -Recurse
|
||||
|
||||
foreach($Utility in $UtilityFunctions) {
|
||||
Write-Debug "Loading $($Utility.FullName)"
|
||||
. $Utility.FullName
|
||||
}
|
||||
|
||||
$BuildSpec = Get-Content -Path ${BuildSpecFile} -Raw | ConvertFrom-Json
|
||||
$ProductName = $BuildSpec.name
|
||||
$ProductVersion = $BuildSpec.version
|
||||
|
||||
$GitOutput = git describe --tags
|
||||
if ($GitOutput -match '^([0-9]+\.){0,2}(\*|[0-9]+)$') {
|
||||
Log-Information "Using git tag as version identifier '${GitOutput}'"
|
||||
$ProductVersion = $GitOutput
|
||||
} else {
|
||||
Log-Information "Using buildspec.json version identifier '${ProductVersion}'"
|
||||
}
|
||||
|
||||
if ( ! $SkipDeps ) {
|
||||
Install-BuildDependencies -WingetFile "${ScriptHome}/.Wingetfile"
|
||||
}
|
||||
|
||||
if ( $ADVSSDepName -eq '' ) {
|
||||
$ADVSSDepName = ".deps/advss-build-dependencies"
|
||||
}
|
||||
|
||||
if ( -not (Test-Path -LiteralPath "${ProjectRoot}/${ADVSSDepName}") ) {
|
||||
Log-Information "Building advss deps ${ProjectRoot}/${ADVSSDepName} ..."
|
||||
invoke-expression -Command "$PSScriptRoot/Build-Deps-Windows.ps1 -Configuration $Configuration -Target $Target -OutDirName $ADVSSDepName"
|
||||
}
|
||||
$ADVSSDepPath = "$(Resolve-Path -Path ${ProjectRoot}/${ADVSSDepName})"
|
||||
Log-Information "Using advss deps at $ADVSSDepPath ..."
|
||||
|
||||
(Get-Content -Path ${ProjectRoot}/CMakeLists.txt -Raw) `
|
||||
-replace "project\((.*) VERSION (.*)\)", "project(${ProductName} VERSION ${ProductVersion})" `
|
||||
| Out-File -Path ${ProjectRoot}/CMakeLists.txt -NoNewline
|
||||
|
||||
Push-Location -Stack BuildTemp
|
||||
if ( ! ( ( $SkipAll ) -or ( $SkipBuild ) ) ) {
|
||||
Ensure-Location $ProjectRoot
|
||||
|
||||
$CmakeArgs = @()
|
||||
$CmakeBuildArgs = @()
|
||||
$CmakeInstallArgs = @()
|
||||
|
||||
if ( $VerbosePreference -eq 'Continue' ) {
|
||||
$CmakeBuildArgs += ('--verbose')
|
||||
$CmakeInstallArgs += ('--verbose')
|
||||
}
|
||||
|
||||
if ( $DebugPreference -eq 'Continue' ) {
|
||||
$CmakeArgs += ('--debug-output')
|
||||
}
|
||||
|
||||
$Preset = "windows-$(if ( $Env:CI -ne $null ) { 'ci-' })${Target}"
|
||||
|
||||
$CmakeArgs += @(
|
||||
'--preset', $Preset
|
||||
"-DCMAKE_PREFIX_PATH:PATH=${ADVSSDepPath}"
|
||||
)
|
||||
|
||||
$CmakeBuildArgs += @(
|
||||
'--build'
|
||||
'--preset', $Preset
|
||||
'--config', $Configuration
|
||||
'--parallel'
|
||||
'--', '/consoleLoggerParameters:Summary', '/noLogo'
|
||||
)
|
||||
|
||||
$CmakeInstallArgs += @(
|
||||
'--install', "build_${Target}"
|
||||
'--prefix', "${ProjectRoot}/release/${Configuration}"
|
||||
'--config', $Configuration
|
||||
)
|
||||
|
||||
Log-Group "Configuring ${ProductName}..."
|
||||
Invoke-External cmake @CmakeArgs
|
||||
|
||||
Log-Group "Building ${ProductName}..."
|
||||
Invoke-External cmake @CmakeBuildArgs
|
||||
}
|
||||
Log-Group "Install ${ProductName}..."
|
||||
Invoke-External cmake @CmakeInstallArgs
|
||||
|
||||
Pop-Location -Stack BuildTemp
|
||||
Log-Group
|
||||
}
|
||||
|
||||
Build
|
||||
101
.github/scripts/Package-Windows.ps1
vendored
Normal file
101
.github/scripts/Package-Windows.ps1
vendored
Normal file
|
|
@ -0,0 +1,101 @@
|
|||
[CmdletBinding()]
|
||||
param(
|
||||
[ValidateSet('x64')]
|
||||
[string] $Target = 'x64',
|
||||
[ValidateSet('Debug', 'RelWithDebInfo', 'Release', 'MinSizeRel')]
|
||||
[string] $Configuration = 'RelWithDebInfo',
|
||||
[switch] $BuildInstaller,
|
||||
[switch] $SkipDeps
|
||||
)
|
||||
|
||||
$ErrorActionPreference = 'Stop'
|
||||
|
||||
if ( $DebugPreference -eq 'Continue' ) {
|
||||
$VerbosePreference = 'Continue'
|
||||
$InformationPreference = 'Continue'
|
||||
}
|
||||
|
||||
if ( ! ( [System.Environment]::Is64BitOperatingSystem ) ) {
|
||||
throw "Packaging script requires a 64-bit system to build and run."
|
||||
}
|
||||
|
||||
|
||||
if ( $PSVersionTable.PSVersion -lt '7.0.0' ) {
|
||||
Write-Warning 'The packaging script requires PowerShell Core 7. Install or upgrade your PowerShell version: https://aka.ms/pscore6'
|
||||
exit 2
|
||||
}
|
||||
|
||||
function Package {
|
||||
trap {
|
||||
Pop-Location -Stack BuildTemp -ErrorAction 'SilentlyContinue'
|
||||
Write-Error $_
|
||||
Log-Group
|
||||
exit 2
|
||||
}
|
||||
|
||||
$ScriptHome = $PSScriptRoot
|
||||
$ProjectRoot = Resolve-Path -Path "$PSScriptRoot/../.."
|
||||
$BuildSpecFile = "${ProjectRoot}/buildspec.json"
|
||||
|
||||
$UtilityFunctions = Get-ChildItem -Path $PSScriptRoot/utils.pwsh/*.ps1 -Recurse
|
||||
|
||||
foreach( $Utility in $UtilityFunctions ) {
|
||||
Write-Debug "Loading $($Utility.FullName)"
|
||||
. $Utility.FullName
|
||||
}
|
||||
|
||||
$BuildSpec = Get-Content -Path ${BuildSpecFile} -Raw | ConvertFrom-Json
|
||||
$ProductName = $BuildSpec.name
|
||||
$ProductVersion = $BuildSpec.version
|
||||
|
||||
$GitOutput = git describe --tags
|
||||
Log-Information "Using git tag as version identifier '${GitOutput}'"
|
||||
$ProductVersion = $GitOutput
|
||||
|
||||
$OutputName = "${ProductName}-${ProductVersion}-windows-${Target}"
|
||||
|
||||
if ( ! $SkipDeps ) {
|
||||
Install-BuildDependencies -WingetFile "${ScriptHome}/.Wingetfile"
|
||||
}
|
||||
|
||||
$RemoveArgs = @{
|
||||
ErrorAction = 'SilentlyContinue'
|
||||
Path = @(
|
||||
"${ProjectRoot}/release/${ProductName}-*-windows-*.zip"
|
||||
"${ProjectRoot}/release/${ProductName}-*-windows-*.exe"
|
||||
)
|
||||
}
|
||||
|
||||
Remove-Item @RemoveArgs
|
||||
|
||||
Log-Group "Archiving ${ProductName}..."
|
||||
$CompressArgs = @{
|
||||
Path = (Get-ChildItem -Path "${ProjectRoot}/release/${Configuration}" -Exclude "${OutputName}*.*")
|
||||
CompressionLevel = 'Optimal'
|
||||
DestinationPath = "${ProjectRoot}/release/${OutputName}.zip"
|
||||
Verbose = ($Env:CI -ne $null)
|
||||
}
|
||||
Compress-Archive -Force @CompressArgs
|
||||
Log-Group
|
||||
|
||||
if ( ( $BuildInstaller ) ) {
|
||||
Log-Group "Packaging ${ProductName}..."
|
||||
|
||||
$IsccFile = "${ProjectRoot}/build_${Target}/installer-Windows.generated.iss"
|
||||
if ( ! ( Test-Path -Path $IsccFile ) ) {
|
||||
throw 'InnoSetup install script not found. Run the build script or the CMake build and install procedures first.'
|
||||
}
|
||||
|
||||
Log-Information 'Creating InnoSetup installer...'
|
||||
Push-Location -Stack BuildTemp
|
||||
Ensure-Location -Path "${ProjectRoot}/release"
|
||||
Copy-Item -Path ${Configuration} -Destination Package -Recurse
|
||||
Invoke-External iscc ${IsccFile} /O"${ProjectRoot}/release" /F"${OutputName}-Installer"
|
||||
Remove-Item -Path Package -Recurse
|
||||
Pop-Location -Stack BuildTemp
|
||||
|
||||
Log-Group
|
||||
}
|
||||
}
|
||||
|
||||
Package
|
||||
13
.github/scripts/build-deps-linux.sh
vendored
Executable file
13
.github/scripts/build-deps-linux.sh
vendored
Executable file
|
|
@ -0,0 +1,13 @@
|
|||
#!/bin/sh
|
||||
|
||||
if ! type zsh > /dev/null 2>&1; then
|
||||
echo ' => Installing script dependency Zsh.'
|
||||
|
||||
sudo apt-get -y update
|
||||
sudo apt-get -y install zsh
|
||||
fi
|
||||
|
||||
SCRIPT=$(readlink -f "${0}")
|
||||
SCRIPT_DIR=$(dirname "${SCRIPT}")
|
||||
|
||||
zsh ${SCRIPT_DIR}/build-deps-linux.zsh "${@}"
|
||||
1
.github/scripts/build-deps-linux.zsh
vendored
Symbolic link
1
.github/scripts/build-deps-linux.zsh
vendored
Symbolic link
|
|
@ -0,0 +1 @@
|
|||
.build-deps.zsh
|
||||
1
.github/scripts/build-deps-macos.zsh
vendored
Symbolic link
1
.github/scripts/build-deps-macos.zsh
vendored
Symbolic link
|
|
@ -0,0 +1 @@
|
|||
.build-deps.zsh
|
||||
1
.github/scripts/build-linux
vendored
Symbolic link
1
.github/scripts/build-linux
vendored
Symbolic link
|
|
@ -0,0 +1 @@
|
|||
.build.zsh
|
||||
1
.github/scripts/build-macos
vendored
Symbolic link
1
.github/scripts/build-macos
vendored
Symbolic link
|
|
@ -0,0 +1 @@
|
|||
.build.zsh
|
||||
1
.github/scripts/package-linux
vendored
Symbolic link
1
.github/scripts/package-linux
vendored
Symbolic link
|
|
@ -0,0 +1 @@
|
|||
.package.zsh
|
||||
1
.github/scripts/package-macos
vendored
Symbolic link
1
.github/scripts/package-macos
vendored
Symbolic link
|
|
@ -0,0 +1 @@
|
|||
.package.zsh
|
||||
29
.github/scripts/utils.pwsh/Ensure-Location.ps1
vendored
Normal file
29
.github/scripts/utils.pwsh/Ensure-Location.ps1
vendored
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
function Ensure-Location {
|
||||
<#
|
||||
.SYNOPSIS
|
||||
Ensures current location to be set to specified directory.
|
||||
.DESCRIPTION
|
||||
If specified directory exists, switch to it. Otherwise create it,
|
||||
then switch.
|
||||
.EXAMPLE
|
||||
Ensure-Location "My-Directory"
|
||||
Ensure-Location -Path "Path-To-My-Directory"
|
||||
#>
|
||||
|
||||
param(
|
||||
[Parameter(Mandatory)]
|
||||
[string] $Path
|
||||
)
|
||||
|
||||
if ( ! ( Test-Path $Path ) ) {
|
||||
$_Params = @{
|
||||
ItemType = "Directory"
|
||||
Path = ${Path}
|
||||
ErrorAction = "SilentlyContinue"
|
||||
}
|
||||
|
||||
New-Item @_Params | Set-Location
|
||||
} else {
|
||||
Set-Location -Path ${Path}
|
||||
}
|
||||
}
|
||||
70
.github/scripts/utils.pwsh/Expand-ArchiveExt.ps1
vendored
Normal file
70
.github/scripts/utils.pwsh/Expand-ArchiveExt.ps1
vendored
Normal file
|
|
@ -0,0 +1,70 @@
|
|||
function Expand-ArchiveExt {
|
||||
<#
|
||||
.SYNOPSIS
|
||||
Expands archive files.
|
||||
.DESCRIPTION
|
||||
Allows extraction of zip, 7z, gz, and xz archives.
|
||||
Requires tar and 7-zip to be available on the system.
|
||||
Archives ending with .zip but created using LZMA compression are
|
||||
expanded using 7-zip as a fallback.
|
||||
.EXAMPLE
|
||||
Expand-ArchiveExt -Path <Path-To-Your-Archive>
|
||||
Expand-ArchiveExt -Path <Path-To-Your-Archive> -DestinationPath <Expansion-Path>
|
||||
#>
|
||||
|
||||
param(
|
||||
[Parameter(Mandatory)]
|
||||
[string] $Path,
|
||||
[string] $DestinationPath = [System.IO.Path]::GetFileNameWithoutExtension($Path),
|
||||
[switch] $Force
|
||||
)
|
||||
|
||||
switch ( [System.IO.Path]::GetExtension($Path) ) {
|
||||
.zip {
|
||||
try {
|
||||
Expand-Archive -Path $Path -DestinationPath $DestinationPath -Force:$Force
|
||||
} catch {
|
||||
if ( Get-Command 7z ) {
|
||||
Invoke-External 7z x -y $Path "-o${DestinationPath}"
|
||||
} else {
|
||||
throw "Fallback utility 7-zip not found. Please install 7-zip first."
|
||||
}
|
||||
}
|
||||
break
|
||||
}
|
||||
{ ( $_ -eq ".7z" ) -or ( $_ -eq ".exe" ) } {
|
||||
if ( Get-Command 7z ) {
|
||||
Invoke-External 7z x -y $Path "-o${DestinationPath}"
|
||||
} else {
|
||||
throw "Extraction utility 7-zip not found. Please install 7-zip first."
|
||||
}
|
||||
break
|
||||
}
|
||||
.gz {
|
||||
try {
|
||||
Invoke-External tar -x -o $DestinationPath -f $Path
|
||||
} catch {
|
||||
if ( Get-Command 7z ) {
|
||||
Invoke-External 7z x -y $Path "-o${DestinationPath}"
|
||||
} else {
|
||||
throw "Fallback utility 7-zip not found. Please install 7-zip first."
|
||||
}
|
||||
}
|
||||
break
|
||||
}
|
||||
.xz {
|
||||
try {
|
||||
Invoke-External tar -x -o $DestinationPath -f $Path
|
||||
} catch {
|
||||
if ( Get-Command 7z ) {
|
||||
Invoke-External 7z x -y $Path "-o${DestinationPath}"
|
||||
} else {
|
||||
throw "Fallback utility 7-zip not found. Please install 7-zip first."
|
||||
}
|
||||
}
|
||||
}
|
||||
default {
|
||||
throw "Unsupported archive extension provided."
|
||||
}
|
||||
}
|
||||
}
|
||||
70
.github/scripts/utils.pwsh/Install-BuildDependencies.ps1
vendored
Normal file
70
.github/scripts/utils.pwsh/Install-BuildDependencies.ps1
vendored
Normal file
|
|
@ -0,0 +1,70 @@
|
|||
function Install-BuildDependencies {
|
||||
<#
|
||||
.SYNOPSIS
|
||||
Installs required build dependencies.
|
||||
.DESCRIPTION
|
||||
Additional packages might be needed for successful builds. This module contains additional
|
||||
dependencies available for installation via winget and, if possible, adds their locations
|
||||
to the environment path for future invocation.
|
||||
.EXAMPLE
|
||||
Install-BuildDependencies
|
||||
#>
|
||||
|
||||
param(
|
||||
[string] $WingetFile = "$PSScriptRoot/.Wingetfile"
|
||||
)
|
||||
|
||||
if ( ! ( Test-Path function:Log-Warning ) ) {
|
||||
. $PSScriptRoot/Logger.ps1
|
||||
}
|
||||
|
||||
$Prefixes = @{
|
||||
'x64' = ${Env:ProgramFiles}
|
||||
'x86' = ${Env:ProgramFiles(x86)}
|
||||
'arm64' = ${Env:ProgramFiles(arm)}
|
||||
}
|
||||
|
||||
$Paths = $Env:Path -split [System.IO.Path]::PathSeparator
|
||||
|
||||
$WingetOptions = @('install', '--accept-package-agreements', '--accept-source-agreements')
|
||||
|
||||
if ( $script:Quiet ) {
|
||||
$WingetOptions += '--silent'
|
||||
}
|
||||
|
||||
Log-Group 'Check Windows build requirements'
|
||||
Get-Content $WingetFile | ForEach-Object {
|
||||
$_, $Package, $_, $Path, $_, $Binary, $_, $Version = $_ -replace ',','' -split " +(?=(?:[^\']*\'[^\']*\')*[^\']*$)" -replace "'",''
|
||||
|
||||
$Prefixes.GetEnumerator() | ForEach-Object {
|
||||
$Prefix = $_.value
|
||||
$FullPath = "${Prefix}\${Path}"
|
||||
if ( ( Test-Path $FullPath ) -and ! ( $Paths -contains $FullPath ) ) {
|
||||
$Paths = @($FullPath) + $Paths
|
||||
$Env:Path = $Paths -join [System.IO.Path]::PathSeparator
|
||||
}
|
||||
}
|
||||
|
||||
Log-Debug "Checking for command ${Binary}"
|
||||
$Found = Get-Command -ErrorAction SilentlyContinue $Binary
|
||||
|
||||
if ( $Found ) {
|
||||
Log-Status "Found dependency ${Binary} as $($Found.Source)"
|
||||
} else {
|
||||
Log-Status "Installing package ${Package} $(if ( $Version -ne $null ) { "Version: ${Version}" } )"
|
||||
|
||||
if ( $Version -ne $null ) {
|
||||
$WingetOptions += @('--version', ${Version})
|
||||
}
|
||||
|
||||
try {
|
||||
$Params = $WingetOptions + $Package
|
||||
|
||||
winget @Params
|
||||
} catch {
|
||||
throw "Error while installing winget package ${Package}: $_"
|
||||
}
|
||||
}
|
||||
}
|
||||
Log-Group
|
||||
}
|
||||
40
.github/scripts/utils.pwsh/Invoke-External.ps1
vendored
Normal file
40
.github/scripts/utils.pwsh/Invoke-External.ps1
vendored
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
function Invoke-External {
|
||||
<#
|
||||
.SYNOPSIS
|
||||
Invokes a non-PowerShell command.
|
||||
.DESCRIPTION
|
||||
Runs a non-PowerShell command, and captures its return code.
|
||||
Throws an exception if the command returns non-zero.
|
||||
.EXAMPLE
|
||||
Invoke-External 7z x $MyArchive
|
||||
#>
|
||||
|
||||
if ( $args.Count -eq 0 ) {
|
||||
throw 'Invoke-External called without arguments.'
|
||||
}
|
||||
|
||||
if ( ! ( Test-Path function:Log-Information ) ) {
|
||||
. $PSScriptRoot/Logger.ps1
|
||||
}
|
||||
|
||||
$Command = $args[0]
|
||||
$CommandArgs = @()
|
||||
|
||||
if ( $args.Count -gt 1) {
|
||||
$CommandArgs = $args[1..($args.Count - 1)]
|
||||
}
|
||||
|
||||
$_EAP = $ErrorActionPreference
|
||||
$ErrorActionPreference = "Continue"
|
||||
|
||||
Log-Debug "Invoke-External: ${Command} ${CommandArgs}"
|
||||
|
||||
& $command $commandArgs
|
||||
$Result = $LASTEXITCODE
|
||||
|
||||
$ErrorActionPreference = $_EAP
|
||||
|
||||
if ( $Result -ne 0 ) {
|
||||
throw "${Command} ${CommandArgs} exited with non-zero code ${Result}."
|
||||
}
|
||||
}
|
||||
149
.github/scripts/utils.pwsh/Logger.ps1
vendored
Normal file
149
.github/scripts/utils.pwsh/Logger.ps1
vendored
Normal file
|
|
@ -0,0 +1,149 @@
|
|||
function Log-Debug {
|
||||
[CmdletBinding()]
|
||||
param(
|
||||
[Parameter(Mandatory,ValueFromPipeline)]
|
||||
[ValidateNotNullOrEmpty()]
|
||||
[string[]] $Message
|
||||
)
|
||||
|
||||
Process {
|
||||
foreach($m in $Message) {
|
||||
Write-Debug "$(if ( $env:CI -ne $null ) { '::debug::' })$m"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function Log-Verbose {
|
||||
[CmdletBinding()]
|
||||
param(
|
||||
[Parameter(Mandatory,ValueFromPipeline)]
|
||||
[ValidateNotNullOrEmpty()]
|
||||
[string[]] $Message
|
||||
)
|
||||
|
||||
Process {
|
||||
foreach($m in $Message) {
|
||||
Write-Verbose $m
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function Log-Warning {
|
||||
[CmdletBinding()]
|
||||
param(
|
||||
[Parameter(Mandatory,ValueFromPipeline)]
|
||||
[ValidateNotNullOrEmpty()]
|
||||
[string[]] $Message
|
||||
)
|
||||
|
||||
Process {
|
||||
foreach($m in $Message) {
|
||||
Write-Warning "$(if ( $env:CI -ne $null ) { '::warning::' })$m"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function Log-Error {
|
||||
[CmdletBinding()]
|
||||
param(
|
||||
[Parameter(Mandatory,ValueFromPipeline)]
|
||||
[ValidateNotNullOrEmpty()]
|
||||
[string[]] $Message
|
||||
)
|
||||
|
||||
Process {
|
||||
foreach($m in $Message) {
|
||||
Write-Error "$(if ( $env:CI -ne $null ) { '::error::' })$m"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function Log-Information {
|
||||
[CmdletBinding()]
|
||||
param(
|
||||
[Parameter(Mandatory,ValueFromPipeline)]
|
||||
[ValidateNotNullOrEmpty()]
|
||||
[string[]] $Message
|
||||
)
|
||||
|
||||
Process {
|
||||
if ( ! ( $script:Quiet ) ) {
|
||||
$StageName = $( if ( $script:StageName -ne $null ) { $script:StageName } else { '' })
|
||||
$Icon = ' =>'
|
||||
|
||||
foreach($m in $Message) {
|
||||
Write-Host -NoNewLine -ForegroundColor Blue " ${StageName} $($Icon.PadRight(5)) "
|
||||
Write-Host "${m}"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function Log-Group {
|
||||
[CmdletBinding()]
|
||||
param(
|
||||
[Parameter(ValueFromPipeline)]
|
||||
[string[]] $Message
|
||||
)
|
||||
|
||||
Process {
|
||||
if ( $Env:CI -ne $null ) {
|
||||
if ( $script:LogGroup ) {
|
||||
Write-Output '::endgroup::'
|
||||
$script:LogGroup = $false
|
||||
}
|
||||
|
||||
if ( $Message.count -ge 1 ) {
|
||||
Write-Output "::group::$($Message -join ' ')"
|
||||
$script:LogGroup = $true
|
||||
}
|
||||
} else {
|
||||
if ( $Message.count -ge 1 ) {
|
||||
Log-Information $Message
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function Log-Status {
|
||||
[CmdletBinding()]
|
||||
param(
|
||||
[Parameter(Mandatory,ValueFromPipeline)]
|
||||
[ValidateNotNullOrEmpty()]
|
||||
[string[]] $Message
|
||||
)
|
||||
|
||||
Process {
|
||||
if ( ! ( $script:Quiet ) ) {
|
||||
$StageName = $( if ( $StageName -ne $null ) { $StageName } else { '' })
|
||||
$Icon = ' >'
|
||||
|
||||
foreach($m in $Message) {
|
||||
Write-Host -NoNewLine -ForegroundColor Green " ${StageName} $($Icon.PadRight(5)) "
|
||||
Write-Host "${m}"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function Log-Output {
|
||||
[CmdletBinding()]
|
||||
param(
|
||||
[Parameter(Mandatory,ValueFromPipeline)]
|
||||
[ValidateNotNullOrEmpty()]
|
||||
[string[]] $Message
|
||||
)
|
||||
|
||||
Process {
|
||||
if ( ! ( $script:Quiet ) ) {
|
||||
$StageName = $( if ( $script:StageName -ne $null ) { $script:StageName } else { '' })
|
||||
$Icon = ''
|
||||
|
||||
foreach($m in $Message) {
|
||||
Write-Output " ${StageName} $($Icon.PadRight(5)) ${m}"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$Columns = (Get-Host).UI.RawUI.WindowSize.Width - 5
|
||||
61
.github/scripts/utils.zsh/check_linux
vendored
Normal file
61
.github/scripts/utils.zsh/check_linux
vendored
Normal file
|
|
@ -0,0 +1,61 @@
|
|||
autoload -Uz log_info log_status log_error log_debug log_warning log_group
|
||||
|
||||
log_group 'Check Linux build requirements'
|
||||
log_debug 'Checking Linux distribution name and version...'
|
||||
|
||||
# Check for Ubuntu version 22.10 or later, which have srt and librist available via apt-get
|
||||
typeset -g -i UBUNTU_2210_OR_LATER=0
|
||||
if [[ -f /etc/os_release ]] {
|
||||
local dist_name
|
||||
local dist_version
|
||||
read -r dist_name dist_version <<< "$(source /etc/os_release; print "${NAME} ${VERSION_ID}")"
|
||||
|
||||
autoload -Uz is-at-least
|
||||
if [[ ${dist_name} == Ubuntu ]] && is-at-least 22.10 ${dist_version}; then
|
||||
typeset -g -i UBUNTU_2210_OR_LATER=1
|
||||
fi
|
||||
}
|
||||
|
||||
log_debug 'Checking for apt-get...'
|
||||
if (( ! ${+commands[apt-get]} )) {
|
||||
log_error 'No apt-get command found. Please install apt'
|
||||
return 2
|
||||
} else {
|
||||
log_debug "Apt-get located at ${commands[apt-get]}"
|
||||
}
|
||||
|
||||
local -a dependencies=("${(fA)$(<${SCRIPT_HOME}/.Aptfile)}")
|
||||
local -a install_list
|
||||
local binary
|
||||
|
||||
sudo apt-get update -qq
|
||||
|
||||
for dependency (${dependencies}) {
|
||||
local -a tokens=(${=dependency//(,|:|\')/})
|
||||
|
||||
if [[ ! ${tokens[1]} == 'package' ]] continue
|
||||
|
||||
if [[ ${#tokens} -gt 2 && ${tokens[3]} == 'bin' ]] {
|
||||
binary=${tokens[4]}
|
||||
} else {
|
||||
binary=${tokens[2]}
|
||||
}
|
||||
|
||||
if (( ! ${+commands[${binary}]} )) install_list+=(${tokens[2]})
|
||||
}
|
||||
|
||||
log_debug "List of dependencies to install: ${install_list}"
|
||||
if (( ${#install_list} )) {
|
||||
if (( ! ${+CI} )) log_warning 'Dependency installation via apt may require elevated privileges'
|
||||
|
||||
local -a apt_args=(
|
||||
${CI:+-y}
|
||||
--no-install-recommends
|
||||
)
|
||||
if (( _loglevel == 0 )) apt_args+=(--quiet)
|
||||
|
||||
sudo apt-get ${apt_args} install ${install_list}
|
||||
}
|
||||
|
||||
rehash
|
||||
log_group
|
||||
24
.github/scripts/utils.zsh/check_macos
vendored
Normal file
24
.github/scripts/utils.zsh/check_macos
vendored
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
autoload -Uz is-at-least log_group log_info log_error log_status read_codesign
|
||||
|
||||
local macos_version=$(sw_vers -productVersion)
|
||||
|
||||
log_group 'Install macOS build requirements'
|
||||
log_info 'Checking macOS version...'
|
||||
if ! is-at-least 11.0 ${macos_version}; then
|
||||
log_error "Minimum required macOS version is 11.0, but running on macOS ${macos_version}"
|
||||
return 2
|
||||
else
|
||||
log_status "macOS ${macos_version} is recent"
|
||||
fi
|
||||
|
||||
log_info 'Checking for Homebrew...'
|
||||
if (( ! ${+commands[brew]} )) {
|
||||
log_error 'No Homebrew command found. Please install Homebrew (https://brew.sh)'
|
||||
return 2
|
||||
}
|
||||
|
||||
brew bundle --file ${SCRIPT_HOME}/.Brewfile
|
||||
# Workaround to make sure locally built openssl is picked up by cmake
|
||||
brew uninstall --ignore-dependencies openssl@3 || true
|
||||
rehash || true
|
||||
log_group
|
||||
3
.github/scripts/utils.zsh/log_debug
vendored
Normal file
3
.github/scripts/utils.zsh/log_debug
vendored
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
if (( ! ${+_loglevel} )) typeset -g _loglevel=1
|
||||
|
||||
if (( _loglevel > 2 )) print -PR -e -- "${CI:+::debug::}%F{220}DEBUG: ${@}%f"
|
||||
3
.github/scripts/utils.zsh/log_error
vendored
Normal file
3
.github/scripts/utils.zsh/log_error
vendored
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
local icon=' ✖︎ '
|
||||
|
||||
print -u2 -PR "${CI:+::error::}%F{1} ${icon} %f ${@}"
|
||||
16
.github/scripts/utils.zsh/log_group
vendored
Normal file
16
.github/scripts/utils.zsh/log_group
vendored
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
autoload -Uz log_info
|
||||
|
||||
if (( ! ${+_log_group} )) typeset -g _log_group=0
|
||||
|
||||
if (( ${+CI} )) {
|
||||
if (( _log_group )) {
|
||||
print "::endgroup::"
|
||||
typeset -g _log_group=0
|
||||
}
|
||||
if (( # )) {
|
||||
print "::group::${@}"
|
||||
typeset -g _log_group=1
|
||||
}
|
||||
} else {
|
||||
if (( # )) log_info ${@}
|
||||
}
|
||||
7
.github/scripts/utils.zsh/log_info
vendored
Normal file
7
.github/scripts/utils.zsh/log_info
vendored
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
if (( ! ${+_loglevel} )) typeset -g _loglevel=1
|
||||
|
||||
if (( _loglevel > 0 )) {
|
||||
local icon=' =>'
|
||||
|
||||
print -PR "%F{4} ${(r:5:)icon}%f %B${@}%b"
|
||||
}
|
||||
7
.github/scripts/utils.zsh/log_output
vendored
Normal file
7
.github/scripts/utils.zsh/log_output
vendored
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
if (( ! ${+_loglevel} )) typeset -g _loglevel=1
|
||||
|
||||
if (( _loglevel > 0 )) {
|
||||
local icon=''
|
||||
|
||||
print -PR " ${(r:5:)icon} ${@}"
|
||||
}
|
||||
7
.github/scripts/utils.zsh/log_status
vendored
Normal file
7
.github/scripts/utils.zsh/log_status
vendored
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
if (( ! ${+_loglevel} )) typeset -g _loglevel=1
|
||||
|
||||
if (( _loglevel > 0 )) {
|
||||
local icon=' >'
|
||||
|
||||
print -PR "%F{2} ${(r:5:)icon}%f ${@}"
|
||||
}
|
||||
5
.github/scripts/utils.zsh/log_warning
vendored
Normal file
5
.github/scripts/utils.zsh/log_warning
vendored
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
if (( _loglevel > 0 )) {
|
||||
local icon=' =>'
|
||||
|
||||
print -PR "${CI:+::warning::}%F{3} ${(r:5:)icon} ${@}%f"
|
||||
}
|
||||
1
.github/scripts/utils.zsh/mkcd
vendored
Normal file
1
.github/scripts/utils.zsh/mkcd
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
[[ -n ${1} ]] && mkdir -p ${1} && builtin cd ${1}
|
||||
9
.github/scripts/utils.zsh/read_codesign
vendored
Normal file
9
.github/scripts/utils.zsh/read_codesign
vendored
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
autoload -Uz log_info
|
||||
|
||||
if (( ! ${+CODESIGN_IDENT} )) {
|
||||
typeset -g CODESIGN_IDENT
|
||||
log_info 'Setting up Apple Developer ID for application codesigning...'
|
||||
read CODESIGN_IDENT'?Apple Developer Application ID: '
|
||||
}
|
||||
|
||||
typeset -g CODESIGN_TEAM=$(print "${CODESIGN_IDENT}" | /usr/bin/sed -En 's/.+\((.+)\)/\1/p')
|
||||
7
.github/scripts/utils.zsh/read_codesign_installer
vendored
Normal file
7
.github/scripts/utils.zsh/read_codesign_installer
vendored
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
autoload -Uz log_info
|
||||
|
||||
if (( ! ${+CODESIGN_IDENT_INSTALLER} )) {
|
||||
typeset -g CODESIGN_IDENT_INSTALLER
|
||||
log_info 'Setting up Apple Developer Installer ID for installer package codesigning...'
|
||||
read CODESIGN_IDENT_INSTALLER'?Apple Developer Installer ID: '
|
||||
}
|
||||
38
.github/scripts/utils.zsh/read_codesign_pass
vendored
Normal file
38
.github/scripts/utils.zsh/read_codesign_pass
vendored
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
##############################################################################
|
||||
# Apple Developer credentials necessary:
|
||||
#
|
||||
# + Signing for distribution and notarization require an active Apple
|
||||
# Developer membership
|
||||
# + An Apple Development identity is needed for code signing
|
||||
# (i.e. 'Apple Development: YOUR APPLE ID (PROVIDER)')
|
||||
# + Your Apple developer ID is needed for notarization
|
||||
# + An app-specific password is necessary for notarization from CLI
|
||||
# + This password will be stored in your macOS keychain under the identifier
|
||||
# 'OBS-Codesign-Password'with access Apple's 'altool' only.
|
||||
##############################################################################
|
||||
|
||||
autoload -Uz read_codesign read_codesign_user log_info log_warning
|
||||
|
||||
if (( ! ${+CODESIGN_IDENT} )) {
|
||||
read_codesign
|
||||
}
|
||||
|
||||
if (( ! ${+CODESIGN_IDENT_USER} )) {
|
||||
read_codesign_user
|
||||
}
|
||||
|
||||
log_info 'Setting up password for notarization keychain...'
|
||||
if (( ! ${+CODESIGN_IDENT_PASS} )) {
|
||||
read -s CODESIGN_IDENT_PASS'?Apple Developer ID password: '
|
||||
}
|
||||
|
||||
print ''
|
||||
log_info 'Setting up notarization keychain...'
|
||||
log_warning "
|
||||
+ Your Apple ID and an app-specific password is necessary for notarization from CLI
|
||||
+ This password will be stored in your macOS keychain under the identifier
|
||||
'OBS-Codesign-Password' with access Apple's 'altool' only.
|
||||
|
||||
"
|
||||
xcrun notarytool store-credentials 'OBS-Codesign-Password' --apple-id "${CODESIGN_IDENT_USER}" --team-id "${CODESIGN_TEAM}" --password "${CODESIGN_IDENT_PASS}"
|
||||
|
||||
7
.github/scripts/utils.zsh/read_codesign_team
vendored
Normal file
7
.github/scripts/utils.zsh/read_codesign_team
vendored
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
autoload -Uz log_info
|
||||
|
||||
if (( ! ${+CODESIGN_TEAM} )) {
|
||||
typeset -g CODESIGN_TEAM
|
||||
log_info 'Setting up Apple Developer Team ID for codesigning...'
|
||||
read CODESIGN_TEAM'?Apple Developer Team ID (leave empty to use Apple Developer ID instead): '
|
||||
}
|
||||
7
.github/scripts/utils.zsh/read_codesign_user
vendored
Normal file
7
.github/scripts/utils.zsh/read_codesign_user
vendored
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
autoload -Uz log_info
|
||||
|
||||
if (( ! ${+CODESIGN_IDENT_USER} )) {
|
||||
typeset -g CODESIGN_IDENT_USER
|
||||
log_info 'Setting up Apple ID for notarization...'
|
||||
read CODESIGN_IDENT_USER'?Apple ID: '
|
||||
}
|
||||
17
.github/scripts/utils.zsh/set_loglevel
vendored
Normal file
17
.github/scripts/utils.zsh/set_loglevel
vendored
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
autoload -Uz log_debug log_error
|
||||
|
||||
local -r _usage="Usage: %B${0}%b <loglevel>
|
||||
|
||||
Set log level, following levels are supported: 0 (quiet), 1 (normal), 2 (verbose), 3 (debug)"
|
||||
|
||||
if (( ! # )); then
|
||||
log_error 'Called without arguments.'
|
||||
log_output ${_usage}
|
||||
return 2
|
||||
elif (( ${1} >= 4 )); then
|
||||
log_error 'Called with loglevel > 3.'
|
||||
log_output ${_usage}
|
||||
fi
|
||||
|
||||
typeset -g -i -r _loglevel=${1}
|
||||
log_debug "Log level set to '${1}'"
|
||||
41
.github/scripts/utils.zsh/setup_ccache
vendored
Normal file
41
.github/scripts/utils.zsh/setup_ccache
vendored
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
autoload -Uz log_debug log_warning
|
||||
|
||||
if (( ! ${+project_root} )) {
|
||||
log_error "'project_root' not set. Please set before running ${0}."
|
||||
return 2
|
||||
}
|
||||
|
||||
if (( ${+commands[ccache]} )) {
|
||||
log_debug "Found ccache at ${commands[ccache]}"
|
||||
|
||||
typeset -gx CCACHE_CONFIGPATH="${project_root}/.ccache.conf"
|
||||
|
||||
ccache --set-config=direct_mode=true
|
||||
ccache --set-config=inode_cache=true
|
||||
ccache --set-config=compiler_check=content
|
||||
ccache --set-config=file_clone=true
|
||||
|
||||
local -a sloppiness=(
|
||||
include_file_mtime
|
||||
include_file_ctime
|
||||
file_stat_matches
|
||||
system_headers
|
||||
)
|
||||
|
||||
if [[ ${host_os} == macos ]] {
|
||||
sloppiness+=(
|
||||
modules
|
||||
clang_index_store
|
||||
)
|
||||
|
||||
ccache --set-config=sloppiness=${(j:,:)sloppiness}
|
||||
}
|
||||
|
||||
if (( ${+CI} )) {
|
||||
ccache --set-config=cache_dir="${GITHUB_WORKSPACE:-${HOME}}/.ccache"
|
||||
ccache --set-config=max_size="${CCACHE_SIZE:-1G}"
|
||||
ccache -z > /dev/null
|
||||
}
|
||||
} else {
|
||||
log_warning "No ccache found on the system"
|
||||
}
|
||||
66
.github/scripts/utils.zsh/setup_linux
vendored
Normal file
66
.github/scripts/utils.zsh/setup_linux
vendored
Normal file
|
|
@ -0,0 +1,66 @@
|
|||
autoload -Uz log_error log_status log_info mkcd
|
||||
|
||||
if (( ! ${+project_root} )) {
|
||||
log_error "'project_root' not set. Please set before running ${0}."
|
||||
return 2
|
||||
}
|
||||
|
||||
if (( ! ${+target} )) {
|
||||
log_error "'target' not set. Please set before running ${0}."
|
||||
return 2
|
||||
}
|
||||
|
||||
pushd ${project_root}
|
||||
|
||||
typeset -g QT_VERSION
|
||||
|
||||
local -a apt_args=(
|
||||
${CI:+-y}
|
||||
--no-install-recommends
|
||||
)
|
||||
if (( _loglevel == 0 )) apt_args+=(--quiet)
|
||||
|
||||
if (( ! (${skips[(Ie)all]} + ${skips[(Ie)deps]}) )) {
|
||||
log_group 'Installing obs-studio build dependencies...'
|
||||
|
||||
local suffix
|
||||
if [[ ${CPUTYPE} != "${target##*-}" ]] {
|
||||
local -A arch_mappings=(
|
||||
aarch64 arm64
|
||||
x86_64 amd64
|
||||
)
|
||||
|
||||
suffix=":${arch_mappings[${target##*-}]}"
|
||||
|
||||
sudo apt-get install ${apt_args} gcc-${${target##*-}//_/-}-linux-gnu g++-${${target##*-}//_/-}-linux-gnu
|
||||
}
|
||||
|
||||
sudo add-apt-repository --yes ppa:obsproject/obs-studio
|
||||
sudo apt update
|
||||
|
||||
sudo apt-get install ${apt_args} \
|
||||
build-essential \
|
||||
libgles2-mesa-dev \
|
||||
libsimde-dev \
|
||||
obs-studio
|
||||
|
||||
local -a _qt_packages=()
|
||||
|
||||
if (( QT_VERSION == 5 )) {
|
||||
_qt_packages+=(
|
||||
qtbase5-dev${suffix}
|
||||
libqt5svg5-dev${suffix}
|
||||
qtbase5-private-dev${suffix}
|
||||
libqt5x11extras5-dev${suffix}
|
||||
)
|
||||
} else {
|
||||
_qt_packages+=(
|
||||
qt6-base-dev${suffix}
|
||||
libqt6svg6-dev${suffix}
|
||||
qt6-base-private-dev${suffix}
|
||||
)
|
||||
}
|
||||
|
||||
sudo apt-get install ${apt_args} ${_qt_packages}
|
||||
log_group
|
||||
}
|
||||
56
.github/workflows/build-debian.yml
vendored
Normal file
56
.github/workflows/build-debian.yml
vendored
Normal file
|
|
@ -0,0 +1,56 @@
|
|||
name: debian-build
|
||||
|
||||
on:
|
||||
push:
|
||||
paths-ignore:
|
||||
- '**.md'
|
||||
- 'data/locale/**'
|
||||
branches:
|
||||
- master
|
||||
tags:
|
||||
- '*'
|
||||
pull_request:
|
||||
paths-ignore:
|
||||
- '**.md'
|
||||
- 'data/locale/**'
|
||||
branches:
|
||||
- master
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: "recursive"
|
||||
- name: check_libobs_revision
|
||||
run: |
|
||||
sudo apt update
|
||||
sudo apt install devscripts libobs-dev
|
||||
mkdir source
|
||||
cd source
|
||||
dpkg -l libobs-dev | tr -s " "| grep libobs | cut -d" " -f3 > libobs.rev
|
||||
- name: create_tarball
|
||||
run: |
|
||||
cd ..
|
||||
tar --exclude=.git -cvzf obs-scene-switcher_0.1+testonly.orig.tar.gz SceneSwitcher
|
||||
- name: create_debian_dir
|
||||
run: |
|
||||
cp -a build-aux/CI/linux/debian .
|
||||
- name: install_dependencies
|
||||
run: |
|
||||
# devscripts and libobs-dev are needed but they were already installed
|
||||
# from check_libobs_revision and install_frontend_header sections.
|
||||
sudo apt update
|
||||
sudo apt install build-essential cmake debhelper libcurl4-openssl-dev libxss-dev libxtst-dev qt6-base-dev libopencv-dev libproc2-dev
|
||||
- name: build
|
||||
run: |
|
||||
debuild --no-lintian --no-sign
|
||||
mv ../*.deb .
|
||||
- name: Publish
|
||||
if: success()
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: "obs-scene-switcher.deb"
|
||||
path: ${{ github.workspace }}/*.deb
|
||||
317
.github/workflows/build-project.yaml
vendored
Normal file
317
.github/workflows/build-project.yaml
vendored
Normal file
|
|
@ -0,0 +1,317 @@
|
|||
name: Build Project
|
||||
on:
|
||||
workflow_call:
|
||||
outputs:
|
||||
pluginName:
|
||||
description: "Project name detected by parsing build spec file"
|
||||
value: ${{ jobs.check-event.outputs.pluginName }}
|
||||
env:
|
||||
DEP_DIR: .deps/advss-build-dependencies-3
|
||||
jobs:
|
||||
check-event:
|
||||
name: Check GitHub Event Data 🔎
|
||||
runs-on: ubuntu-latest
|
||||
defaults:
|
||||
run:
|
||||
shell: bash
|
||||
outputs:
|
||||
package: ${{ steps.setup.outputs.package }}
|
||||
codesign: ${{ steps.setup.outputs.codesign }}
|
||||
notarize: ${{ steps.setup.outputs.notarize }}
|
||||
config: ${{ steps.setup.outputs.config }}
|
||||
commitHash: ${{ steps.setup.outputs.commitHash }}
|
||||
pluginName: ${{ steps.setup.outputs.pluginName }}
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: Check Event Data ☑️
|
||||
id: setup
|
||||
env:
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
run: |
|
||||
: Check Event Data ☑️
|
||||
if [[ "${RUNNER_DEBUG}" ]]; then set -x; fi
|
||||
|
||||
case "${GITHUB_EVENT_NAME}" in
|
||||
pull_request)
|
||||
config_data=('codesign:false' 'notarize:false' 'package:true' 'config:RelWithDebInfo')
|
||||
if gh pr view ${{ github.event.number }} --json labels \
|
||||
| jq -e -r '.labels[] | select(.name == "Seeking Testers")' > /dev/null; then
|
||||
config_data[0]='codesign:true'
|
||||
config_data[2]='package:true'
|
||||
fi
|
||||
;;
|
||||
push)
|
||||
config_data=('codesign:true' 'notarize:false' 'package:true' 'config:RelWithDebInfo')
|
||||
if [[ ${GITHUB_REF_NAME} =~ [0-9]+.[0-9]+.[0-9]+(-(rc|beta).+)? ]]; then
|
||||
config_data[1]='notarize:false'
|
||||
config_data[3]='config:RelWithDebInfo'
|
||||
fi
|
||||
;;
|
||||
workflow_dispatch)
|
||||
config_data=('codesign:true' 'notarize:false' 'package:true' 'config:RelWithDebInfo')
|
||||
;;
|
||||
schedule)
|
||||
config_data=('codesign:true' 'notarize:false' 'package:true' 'config:RelWithDebInfo')
|
||||
;;
|
||||
*) ;;
|
||||
esac
|
||||
|
||||
for config in "${config_data[@]}"; do
|
||||
IFS=':' read -r key value <<< "${config}"
|
||||
echo "${key}=${value}" >> $GITHUB_OUTPUT
|
||||
done
|
||||
echo "commitHash=${GITHUB_SHA:0:9}" >> $GITHUB_OUTPUT
|
||||
|
||||
plugin_name="$(grep 'name' buildspec.json | sed -E -e 's/^.+"name":[^"]+"(.+)",?$/\1/g')"
|
||||
plugin_display_name="$(grep 'displayName' buildspec.json | sed -E -e 's/^.+"displayName":[^"]+"(.+)",?$/\1/g' || echo "")"
|
||||
|
||||
if [[ "${plugin_display_name}" ]]; then
|
||||
echo "pluginName=${plugin_display_name}" >> $GITHUB_OUTPUT
|
||||
else
|
||||
echo "pluginName=${plugin_name}" >> $GITHUB_OUTPUT
|
||||
fi
|
||||
|
||||
macos-build:
|
||||
name: Build for macOS 🍏
|
||||
runs-on: macos-15
|
||||
needs: check-event
|
||||
defaults:
|
||||
run:
|
||||
shell: zsh --no-rcs --errexit --pipefail {0}
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: recursive
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Set Up Environment 🔧
|
||||
id: setup
|
||||
run: |
|
||||
: Set Up Environment 🔧
|
||||
if (( ${+RUNNER_DEBUG} )) setopt XTRACE
|
||||
|
||||
print '::group::Clean Homebrew Environment'
|
||||
local -a to_remove=()
|
||||
|
||||
if (( #to_remove )) brew uninstall --ignore-dependencies ${to_remove}
|
||||
print '::endgroup::'
|
||||
|
||||
local product_name
|
||||
local product_version
|
||||
read -r product_name product_version <<< \
|
||||
"$(jq -r '. | {name, version} | join(" ")' buildspec.json)"
|
||||
local git_tag="$(git describe --tags)"
|
||||
|
||||
print "pluginName=${product_name}" >> $GITHUB_OUTPUT
|
||||
print "pluginVersion=${git_tag}" >> $GITHUB_OUTPUT
|
||||
|
||||
print '::group::Enable Xcode 16.1'
|
||||
sudo xcode-select --switch /Applications/Xcode_16.1.0.app/Contents/Developer
|
||||
print '::endgroup::'
|
||||
|
||||
- uses: actions/cache@v4
|
||||
id: ccache-cache
|
||||
with:
|
||||
path: ${{ github.workspace }}/.ccache
|
||||
key: ${{ runner.os }}-ccache-${{ needs.check-event.outputs.config }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-ccache-
|
||||
|
||||
- name: Build Dependencies 🏗️
|
||||
uses: ./.github/actions/build-dependencies
|
||||
with:
|
||||
workingDirectory: ${{ github.workspace }}/plugin
|
||||
target: macos-universal
|
||||
config: ${{ needs.check-event.outputs.config }}
|
||||
|
||||
- name: Set Up Codesigning 🔑
|
||||
uses: ./.github/actions/setup-macos-codesigning
|
||||
if: fromJSON(needs.check-event.outputs.codesign)
|
||||
id: codesign
|
||||
with:
|
||||
codesignIdentity: ${{ secrets.MACOS_SIGNING_APPLICATION_IDENTITY }}
|
||||
installerIdentity: ${{ secrets.MACOS_SIGNING_INSTALLER_IDENTITY }}
|
||||
codesignCertificate: ${{ secrets.MACOS_SIGNING_CERT }}
|
||||
certificatePassword: ${{ secrets.MACOS_SIGNING_CERT_PASSWORD }}
|
||||
keychainPassword: ${{ secrets.MACOS_KEYCHAIN_PASSWORD }}
|
||||
provisioningProfile: ${{ secrets.MACOS_SIGNING_PROVISIONING_PROFILE }}
|
||||
notarizationUser: ${{ secrets.MACOS_NOTARIZATION_USERNAME }}
|
||||
notarizationPassword: ${{ secrets.MACOS_NOTARIZATION_PASSWORD }}
|
||||
|
||||
- name: Build Plugin 🧱
|
||||
uses: ./.github/actions/build-plugin
|
||||
with:
|
||||
target: macos-universal
|
||||
config: ${{ needs.check-event.outputs.config }}
|
||||
codesign: ${{ fromJSON(needs.check-event.outputs.codesign) }}
|
||||
codesignIdent: ${{ steps.codesign.outputs.codesignIdent }}
|
||||
|
||||
- name: Package Plugin 📀
|
||||
uses: ./.github/actions/package-plugin
|
||||
with:
|
||||
target: macos-universal
|
||||
config: ${{ needs.check-event.outputs.config }}
|
||||
package: ${{ fromJSON(needs.check-event.outputs.package) }}
|
||||
codesign: ${{ fromJSON(needs.check-event.outputs.codesign) && fromJSON(steps.codesign.outputs.haveCodesignIdent) }}
|
||||
codesignIdent: ${{ steps.codesign.outputs.codesignIdent }}
|
||||
installerIdent: ${{ steps.codesign.outputs.installerIdent }}
|
||||
codesignTeam: ${{ steps.codesign.outputs.codesignTeam }}
|
||||
notarize: ${{ fromJSON(needs.check-event.outputs.notarize) && fromJSON(steps.codesign.outputs.haveNotarizationUser) }}
|
||||
codesignUser: ${{ secrets.MACOS_NOTARIZATION_USERNAME }}
|
||||
codesignPass: ${{ secrets.MACOS_NOTARIZATION_PASSWORD }}
|
||||
|
||||
- name: Upload Artifacts 📡
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: ${{ steps.setup.outputs.pluginName }}-${{ steps.setup.outputs.pluginVersion }}-macos-universal-${{ needs.check-event.outputs.commitHash }}
|
||||
path: ${{ github.workspace }}/release/${{ steps.setup.outputs.pluginName }}-*-macos-universal.*
|
||||
|
||||
- name: Upload Debug Symbol Artifacts 🪲
|
||||
uses: actions/upload-artifact@v4
|
||||
if: ${{ needs.check-event.outputs.config == 'Release' }}
|
||||
with:
|
||||
name: ${{ steps.setup.outputs.pluginName }}-${{ steps.setup.outputs.pluginVersion }}-macos-universal-${{ needs.check-event.outputs.commitHash }}-dSYMs
|
||||
path: ${{ github.workspace }}/release/${{ steps.setup.outputs.pluginName }}-*-macos-universal-dSYMs.*
|
||||
|
||||
ubuntu-build:
|
||||
name: Build for Ubuntu 🐧
|
||||
runs-on: ubuntu-latest
|
||||
needs: check-event
|
||||
defaults:
|
||||
run:
|
||||
shell: bash
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: recursive
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Set Up Environment 🔧
|
||||
id: setup
|
||||
run: |
|
||||
: Set Up Environment 🔧
|
||||
if [[ "${RUNNER_DEBUG}" ]]; then set -x; fi
|
||||
|
||||
git_tag="$(git describe --tags)"
|
||||
|
||||
read -r product_name product_version <<< \
|
||||
"$(jq -r '. | {name, version} | join(" ")' buildspec.json)"
|
||||
|
||||
echo "pluginName=${product_name}" >> $GITHUB_OUTPUT
|
||||
echo "pluginVersion=${git_tag}" >> $GITHUB_OUTPUT
|
||||
|
||||
- uses: actions/cache@v4
|
||||
id: ccache-cache
|
||||
with:
|
||||
path: ${{ github.workspace }}/.ccache
|
||||
key: ${{ runner.os }}-ccache-x86_64-${{ needs.check-event.outputs.config }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-ccache-x86_64-
|
||||
|
||||
- name: Set up CMake 🏗️
|
||||
uses: jwlawson/actions-setup-cmake@v1.13
|
||||
with:
|
||||
cmake-version: '3.x.x'
|
||||
|
||||
- name: Set up Homebrew 🍺
|
||||
uses: Homebrew/actions/setup-homebrew@master
|
||||
|
||||
- name: Build Plugin 🧱
|
||||
uses: ./.github/actions/build-plugin
|
||||
with:
|
||||
target: x86_64
|
||||
config: ${{ needs.check-event.outputs.config }}
|
||||
|
||||
- name: Run tests
|
||||
uses: ./.github/actions/run-tests
|
||||
with:
|
||||
target: x86_64
|
||||
config: ${{ needs.check-event.outputs.config }}
|
||||
|
||||
- name: Package Plugin 📀
|
||||
uses: ./.github/actions/package-plugin
|
||||
with:
|
||||
package: ${{ fromJSON(needs.check-event.outputs.package) }}
|
||||
target: x86_64
|
||||
config: ${{ needs.check-event.outputs.config }}
|
||||
|
||||
- name: Upload Source Tarball 🗜️
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: ${{ steps.setup.outputs.pluginName }}-${{ steps.setup.outputs.pluginVersion }}-sources-${{ needs.check-event.outputs.commitHash }}
|
||||
path: ${{ github.workspace }}/release/${{ steps.setup.outputs.pluginName }}-*-source.*
|
||||
|
||||
- name: Upload Artifacts 📡
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: ${{ steps.setup.outputs.pluginName }}-${{ steps.setup.outputs.pluginVersion }}-ubuntu-24.04-x86_64-${{ needs.check-event.outputs.commitHash }}
|
||||
path: ${{ github.workspace }}/release/${{ steps.setup.outputs.pluginName }}-*-x86_64*.*
|
||||
|
||||
- name: Upload debug symbol artifacts 🪲
|
||||
uses: actions/upload-artifact@v4
|
||||
if: ${{ fromJSON(needs.check-event.outputs.package) }}
|
||||
with:
|
||||
name: ${{ steps.setup.outputs.pluginName }}-${{ steps.setup.outputs.pluginVersion }}-ubuntu-24.04-x86_64-${{ needs.check-event.outputs.commitHash }}-dbgsym
|
||||
path: ${{ github.workspace }}/release/${{ steps.setup.outputs.pluginName }}-*-x86_64*-dbgsym.ddeb
|
||||
|
||||
windows-build:
|
||||
name: Build for Windows 🪟
|
||||
runs-on: windows-2022
|
||||
needs: check-event
|
||||
defaults:
|
||||
run:
|
||||
shell: pwsh
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: recursive
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Set Up Environment 🔧
|
||||
id: setup
|
||||
run: |
|
||||
# Set Up Environment 🔧
|
||||
if ( $Env:RUNNER_DEBUG -ne $null ) {
|
||||
Set-PSDebug -Trace 1
|
||||
}
|
||||
|
||||
$BuildSpec = Get-Content -Path buildspec.json -Raw | ConvertFrom-Json
|
||||
$ProductName = $BuildSpec.name
|
||||
$GitOutput = git describe --tags
|
||||
|
||||
"pluginName=${ProductName}" >> $env:GITHUB_OUTPUT
|
||||
"pluginVersion=${GitOutput}" >> $env:GITHUB_OUTPUT
|
||||
|
||||
- name: Build Dependencies 🏗️
|
||||
uses: ./.github/actions/build-dependencies
|
||||
with:
|
||||
workingDirectory: ${{ github.workspace }}/plugin
|
||||
target: x64
|
||||
config: ${{ needs.check-event.outputs.config }}
|
||||
|
||||
- name: Build Plugin 🧱
|
||||
uses: ./.github/actions/build-plugin
|
||||
with:
|
||||
target: x64
|
||||
config: ${{ needs.check-event.outputs.config }}
|
||||
|
||||
- name: Run tests
|
||||
uses: ./.github/actions/run-tests
|
||||
with:
|
||||
target: x64
|
||||
config: ${{ needs.check-event.outputs.config }}
|
||||
|
||||
- name: Package Plugin 📀
|
||||
uses: ./.github/actions/package-plugin
|
||||
with:
|
||||
target: x64
|
||||
config: ${{ needs.check-event.outputs.config }}
|
||||
package: ${{ fromJSON(needs.check-event.outputs.package) }}
|
||||
|
||||
- name: Upload Artifacts 📡
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: ${{ steps.setup.outputs.pluginName }}-${{ steps.setup.outputs.pluginVersion }}-windows-x64-${{ needs.check-event.outputs.commitHash }}
|
||||
path: ${{ github.workspace }}/release/${{ steps.setup.outputs.pluginName }}-*-windows-x64*.*
|
||||
27
.github/workflows/check-format.yaml
vendored
Normal file
27
.github/workflows/check-format.yaml
vendored
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
name: Check Code Formatting 🛠️
|
||||
on:
|
||||
workflow_call:
|
||||
jobs:
|
||||
clang-format:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: clang-format check 🐉
|
||||
id: clang-format
|
||||
uses: ./.github/actions/run-clang-format
|
||||
with:
|
||||
failCondition: error
|
||||
|
||||
cmake-format:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: cmake-format check 🎛️
|
||||
id: cmake-format
|
||||
uses: ./.github/actions/run-cmake-format
|
||||
with:
|
||||
failCondition: error
|
||||
18
.github/workflows/dispatch.yaml
vendored
Normal file
18
.github/workflows/dispatch.yaml
vendored
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
name: Dispatch
|
||||
run-name: Dispatched Repository Actions - ${{ inputs.job }} ⌛️
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
job:
|
||||
description: Dispatch job to run
|
||||
required: true
|
||||
type: choice
|
||||
options:
|
||||
- build
|
||||
permissions:
|
||||
contents: write
|
||||
jobs:
|
||||
check-and-build:
|
||||
if: inputs.job == 'build'
|
||||
uses: ./.github/workflows/build-project.yaml
|
||||
secrets: inherit
|
||||
26
.github/workflows/locale-check.yml
vendored
Normal file
26
.github/workflows/locale-check.yml
vendored
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
name: Check locale
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
tags:
|
||||
- '*'
|
||||
paths:
|
||||
- 'data/locale/**'
|
||||
pull_request:
|
||||
branches:
|
||||
- master
|
||||
paths:
|
||||
- 'data/locale/**'
|
||||
|
||||
jobs:
|
||||
ubuntu64:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Check locale files
|
||||
run: |
|
||||
python3 ./build-aux/CI/check-locale.py -p data/locale/
|
||||
27
.github/workflows/pr-pull.yaml
vendored
Normal file
27
.github/workflows/pr-pull.yaml
vendored
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
name: Pull Request
|
||||
run-name: ${{ github.event.pull_request.title }} pull request run 🚀
|
||||
on:
|
||||
workflow_dispatch:
|
||||
pull_request:
|
||||
paths-ignore:
|
||||
- '**.md'
|
||||
branches: [master, main]
|
||||
types: [ opened, synchronize, reopened ]
|
||||
permissions:
|
||||
contents: read
|
||||
concurrency:
|
||||
group: '${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}'
|
||||
cancel-in-progress: true
|
||||
jobs:
|
||||
check-format:
|
||||
name: Check Formatting 🔍
|
||||
uses: ./.github/workflows/check-format.yaml
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
build-project:
|
||||
name: Build Project 🧱
|
||||
uses: ./.github/workflows/build-project.yaml
|
||||
secrets: inherit
|
||||
permissions:
|
||||
contents: read
|
||||
122
.github/workflows/push.yaml
vendored
Normal file
122
.github/workflows/push.yaml
vendored
Normal file
|
|
@ -0,0 +1,122 @@
|
|||
name: Push to master
|
||||
run-name: ${{ github.ref_name }} push run 🚀
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
- main
|
||||
- 'release/**'
|
||||
tags:
|
||||
- '*'
|
||||
permissions:
|
||||
contents: write
|
||||
concurrency:
|
||||
group: '${{ github.workflow }} @ ${{ github.ref }}'
|
||||
cancel-in-progress: ${{ github.ref_type == 'tag' }}
|
||||
jobs:
|
||||
check-format:
|
||||
name: Check Formatting 🔍
|
||||
if: github.ref_name == 'master'
|
||||
uses: ./.github/workflows/check-format.yaml
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
build-project:
|
||||
name: Build Project 🧱
|
||||
uses: ./.github/workflows/build-project.yaml
|
||||
secrets: inherit
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
create-release:
|
||||
name: Create Release 🛫
|
||||
if: github.ref_type == 'tag'
|
||||
runs-on: ubuntu-latest
|
||||
needs: build-project
|
||||
defaults:
|
||||
run:
|
||||
shell: bash
|
||||
steps:
|
||||
- name: Check Release Tag ☑️
|
||||
id: check
|
||||
run: |
|
||||
: Check Release Tag ☑️
|
||||
if [[ "${RUNNER_DEBUG}" ]]; then set -x; fi
|
||||
shopt -s extglob
|
||||
|
||||
case "${GITHUB_REF_NAME}" in
|
||||
+([0-9]).+([0-9]).+([0-9]) )
|
||||
echo 'validTag=true' >> $GITHUB_OUTPUT
|
||||
echo 'prerelease=false' >> $GITHUB_OUTPUT
|
||||
echo "version=${GITHUB_REF_NAME}" >> $GITHUB_OUTPUT
|
||||
;;
|
||||
+([0-9]).+([0-9]).+([0-9])-@(beta|rc)*([0-9]) )
|
||||
echo 'validTag=true' >> $GITHUB_OUTPUT
|
||||
echo 'prerelease=true' >> $GITHUB_OUTPUT
|
||||
echo "version=${GITHUB_REF_NAME}" >> $GITHUB_OUTPUT
|
||||
;;
|
||||
*) echo 'validTag=false' >> $GITHUB_OUTPUT ;;
|
||||
esac
|
||||
|
||||
- name: Download Build Artifacts 📥
|
||||
uses: actions/download-artifact@v4
|
||||
if: fromJSON(steps.check.outputs.validTag)
|
||||
id: download
|
||||
|
||||
- name: Rename Files 🏷️
|
||||
if: fromJSON(steps.check.outputs.validTag)
|
||||
run: |
|
||||
: Rename Files 🏷️
|
||||
if [[ "${RUNNER_DEBUG}" ]]; then set -x; fi
|
||||
shopt -s extglob
|
||||
shopt -s nullglob
|
||||
|
||||
root_dir="$(pwd)"
|
||||
commit_hash="${GITHUB_SHA:0:9}"
|
||||
|
||||
variants=(
|
||||
'windows-x64;zip|exe'
|
||||
'macos-universal;tar.xz|pkg'
|
||||
'ubuntu-24.04-x86_64;tar.xz|deb|ddeb'
|
||||
'sources;tar.xz'
|
||||
)
|
||||
|
||||
for variant_data in "${variants[@]}"; do
|
||||
IFS=';' read -r variant suffix <<< "${variant_data}"
|
||||
|
||||
candidates=(*-${variant}-${commit_hash}/@(*|*-dbgsym).@(${suffix}))
|
||||
|
||||
for candidate in "${candidates[@]}"; do
|
||||
mv "${candidate}" "${root_dir}"
|
||||
done
|
||||
done
|
||||
|
||||
- name: Generate Checksums 🪪
|
||||
if: fromJSON(steps.check.outputs.validTag)
|
||||
run: |
|
||||
: Generate Checksums 🪪
|
||||
if [[ "${RUNNER_DEBUG}" ]]; then set -x; fi
|
||||
shopt -s extglob
|
||||
|
||||
echo "### Checksums" > ${{ github.workspace }}/CHECKSUMS.txt
|
||||
for file in ${{ github.workspace }}/@(*.exe|*.deb|*.ddeb|*.pkg|*.tar.xz|*.zip); do
|
||||
echo " ${file##*/}: $(sha256sum "${file}" | cut -d " " -f 1)" >> ${{ github.workspace }}/CHECKSUMS.txt
|
||||
done
|
||||
|
||||
- name: Create Release 🛫
|
||||
if: fromJSON(steps.check.outputs.validTag)
|
||||
id: create_release
|
||||
uses: softprops/action-gh-release@d4e8205d7e959a9107da6396278b2f1f07af0f9b
|
||||
with:
|
||||
draft: true
|
||||
prerelease: ${{ fromJSON(steps.check.outputs.prerelease) }}
|
||||
tag_name: ${{ steps.check.outputs.version }}
|
||||
name: ${{ needs.build-project.outputs.pluginName }} ${{ steps.check.outputs.version }}
|
||||
body_path: ${{ github.workspace }}/CHECKSUMS.txt
|
||||
files: |
|
||||
${{ github.workspace }}/*.exe
|
||||
${{ github.workspace }}/*.zip
|
||||
${{ github.workspace }}/*.pkg
|
||||
${{ github.workspace }}/*.deb
|
||||
${{ github.workspace }}/*.ddeb
|
||||
${{ github.workspace }}/*.tar.xz
|
||||
125
.gitignore
vendored
125
.gitignore
vendored
|
|
@ -1,98 +1,41 @@
|
|||
# Prerequisites #
|
||||
#################
|
||||
*.d
|
||||
# Exclude everything
|
||||
/*
|
||||
|
||||
# Object files #
|
||||
################
|
||||
*.o
|
||||
*.ko
|
||||
*.obj
|
||||
*.elf
|
||||
*.slo
|
||||
*.lo
|
||||
*.obj
|
||||
# Except for default project files
|
||||
!/.github
|
||||
!/build-aux
|
||||
!/cmake
|
||||
!/data
|
||||
!/deps
|
||||
!/scripting
|
||||
!/forms
|
||||
!/lib
|
||||
!/module
|
||||
!/plugins
|
||||
!/tests
|
||||
!.clang-format
|
||||
!.cmake-format.json
|
||||
!.gitattributes
|
||||
!.gitignore
|
||||
!.pre-commit-config.yaml
|
||||
!BUILDING.md
|
||||
!buildspec.json
|
||||
!CMakeLists.txt
|
||||
!CMakePresets.json
|
||||
!LICENSE
|
||||
!README.md
|
||||
|
||||
# Linker output #
|
||||
#################
|
||||
*.ilk
|
||||
*.map
|
||||
*.exp
|
||||
# Exclude .orig leftovers
|
||||
*.orig
|
||||
|
||||
# Precompiled Headers #
|
||||
#######################
|
||||
*.gch
|
||||
*.pch
|
||||
# Exclude lock files
|
||||
*.lock.json
|
||||
|
||||
# Libraries #
|
||||
#############
|
||||
*.lib
|
||||
*.a
|
||||
*.la
|
||||
*.lo
|
||||
*.lai
|
||||
|
||||
# Shared objects (inc. Windows DLLs) #
|
||||
######################################
|
||||
*.dll
|
||||
*.so
|
||||
*.so.*
|
||||
*.dylib
|
||||
|
||||
# Executables #
|
||||
###############
|
||||
*.exe
|
||||
*.out
|
||||
*.app
|
||||
*.i*86
|
||||
*.x86_64
|
||||
*.hex
|
||||
|
||||
# Debug files #
|
||||
###############
|
||||
*.dSYM/
|
||||
*.su
|
||||
*.idb
|
||||
*.pdb
|
||||
|
||||
# CMake temp files #
|
||||
####################
|
||||
CMakeLists.txt.user
|
||||
CMakeCache.txt
|
||||
CMakeFiles
|
||||
CMakeScripts
|
||||
Testing
|
||||
Makefile
|
||||
cmake_install.cmake
|
||||
install_manifest.txt
|
||||
compile_commands.json
|
||||
CTestTestfile.cmake_install
|
||||
|
||||
# OS generated files #
|
||||
######################
|
||||
# Exclude macOS legacy resource forks
|
||||
.DS_Store
|
||||
.DS_Store?
|
||||
._*
|
||||
.Spotlight-V100
|
||||
.Trashes
|
||||
ehthumbs.db
|
||||
Thumbs.db
|
||||
*.directory
|
||||
|
||||
# backup text files generated by an editor #
|
||||
############################################
|
||||
**/*~
|
||||
# Exclude CMake build number cache
|
||||
/cmake/.CMakeBuildNumber
|
||||
|
||||
# Various IDE Files #
|
||||
#####################
|
||||
.classpath
|
||||
.project
|
||||
.settings
|
||||
.idea
|
||||
.metadata
|
||||
*.iml
|
||||
*.ipr
|
||||
*.sublime*
|
||||
|
||||
# Directories #
|
||||
###############
|
||||
build/
|
||||
# Exclude python caches
|
||||
/**/__pycache__
|
||||
|
|
|
|||
39
.gitmodules
vendored
Normal file
39
.gitmodules
vendored
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
[submodule "deps/asio"]
|
||||
path = deps/asio
|
||||
url = https://github.com/chriskohlhoff/asio.git
|
||||
[submodule "deps/websocketpp"]
|
||||
path = deps/websocketpp
|
||||
url = https://github.com/zaphoyd/websocketpp.git
|
||||
[submodule "deps/opencv"]
|
||||
path = deps/opencv
|
||||
url = https://github.com/opencv/opencv.git
|
||||
[submodule "deps/openvr"]
|
||||
path = deps/openvr
|
||||
url = https://github.com/ValveSoftware/openvr.git
|
||||
[submodule "deps/leptonica"]
|
||||
path = deps/leptonica
|
||||
url = https://github.com/DanBloomberg/leptonica.git
|
||||
[submodule "deps/tesseract"]
|
||||
path = deps/tesseract
|
||||
url = https://github.com/tesseract-ocr/tesseract.git
|
||||
[submodule "deps/libremidi"]
|
||||
path = deps/libremidi
|
||||
url = https://github.com/jcelerier/libremidi.git
|
||||
[submodule "deps/cpp-httplib"]
|
||||
path = deps/cpp-httplib
|
||||
url = https://github.com/yhirose/cpp-httplib.git
|
||||
[submodule "deps/json"]
|
||||
path = deps/json
|
||||
url = https://github.com/nlohmann/json.git
|
||||
[submodule "deps/libusb"]
|
||||
path = deps/libusb
|
||||
url = https://github.com/libusb/libusb.git
|
||||
[submodule "deps/date"]
|
||||
path = deps/date
|
||||
url = https://github.com/HowardHinnant/date.git
|
||||
[submodule "deps/jsoncons"]
|
||||
path = deps/jsoncons
|
||||
url = https://github.com/danielaparker/jsoncons.git
|
||||
[submodule "deps/paho.mqtt.cpp"]
|
||||
path = deps/paho.mqtt.cpp
|
||||
url = https://github.com/eclipse-paho/paho.mqtt.cpp.git
|
||||
24
.pre-commit-config.yaml
Normal file
24
.pre-commit-config.yaml
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
repos:
|
||||
- repo: https://github.com/pre-commit/mirrors-clang-format
|
||||
rev: v16.0.6
|
||||
hooks:
|
||||
- id: clang-format
|
||||
args: [-fallback-style=none]
|
||||
types_or: [c++, c]
|
||||
exclude: |
|
||||
(?x)^(
|
||||
deps/.*|
|
||||
tests/catch\.hpp|
|
||||
.*\.mm
|
||||
)$
|
||||
|
||||
- repo: https://github.com/cheshirekow/cmake-format-precommit
|
||||
rev: v0.6.13
|
||||
hooks:
|
||||
- id: cmake-format
|
||||
|
||||
- repo: https://github.com/astral-sh/ruff-pre-commit
|
||||
rev: v0.3.2
|
||||
hooks:
|
||||
- id: ruff-format
|
||||
types_or: [python]
|
||||
221
BUILDING.md
Normal file
221
BUILDING.md
Normal file
|
|
@ -0,0 +1,221 @@
|
|||
# Compiling the plugin
|
||||
|
||||
You have the option to ...
|
||||
- either add the plugin to the OBS source tree directly and build the plugin while building OBS itself. (**in tree**)
|
||||
- or you can move the sources of this plugin outside of the OBS source tree and build it separately from OBS. (**out of tree**)
|
||||
|
||||
Both methods require [CMake](https://cmake.org/download/).
|
||||
|
||||
The plugin can be compiled for OBS 31 and above, although using the latest version of OBS is recommended to support all features.
|
||||
|
||||
## Compiling in tree (recommended for development)
|
||||
This section assumes that you have a working [OBS Studio development environment](https://obsproject.com/wiki/Building-OBS-Studio).
|
||||
|
||||
Add the "SceneSwitcher" source directory to your obs-studio source directory under obs-studio/plugins:
|
||||
```
|
||||
cd obs-studio/plugins
|
||||
git clone --recursive https://github.com/WarmUpTill/SceneSwitcher.git
|
||||
```
|
||||
|
||||
Then modify the obs-studio/plugins/CMakeLists.txt and add an entry for the scene switcher:
|
||||
```
|
||||
add_subdirectory(SceneSwitcher)
|
||||
```
|
||||
|
||||
Now follow the [build instructions for obs-studio](https://obsproject.com/wiki/Building-OBS-Studio) for your particular platform.
|
||||
|
||||
### Dependencies for plugins
|
||||
|
||||
Note that on Linux systems it might be necessary to additionally install the following packages to fulfill the dependencies to `XTest`, `XScreensaver` and `OpenCV` - exact command may differ:
|
||||
```
|
||||
sudo apt-get install \
|
||||
libxtst-dev \
|
||||
libxss-dev \
|
||||
libprocps-dev \
|
||||
libopencv-dev
|
||||
```
|
||||
|
||||
If you have decided to build some dependencies of the plugin yourself (e.g. `OpenCV` for the video condition) you will have to pass the corresponding arguments to the cmake command used to configure OBS.
|
||||
|
||||
Here is an example of what the adjusted command might look like on a Windows machine:
|
||||
```
|
||||
cd obs-studio
|
||||
cmake -DOpenCV_DIR="C:/Users/BuildUser/Documents/OBS/opencv/build/" -DLeptonica_DIR="C:/Users/BuildUser/Documents/OBS/leptonica/build" -DTesseract_DIR="C:/Users/BuildUser/Documents/OBS/tesseract/build/lib/cmake/tesseract" --preset windows-x64
|
||||
```
|
||||
|
||||
## Compiling out of tree
|
||||
|
||||
First you will need to clone the plugin sources by running the following command:
|
||||
```
|
||||
git clone --recursive https://github.com/WarmUpTill/SceneSwitcher.git
|
||||
```
|
||||
|
||||
Next you will need [CMake](https://cmake.org/download/) and run it with suitable arguments for your particular platform.
|
||||
For example, on Windows you might want to run this command:
|
||||
```
|
||||
cd SceneSwitcher
|
||||
cmake --preset windows-x64
|
||||
```
|
||||
Next, you can build the plugin and install the files into a folder named release using the following commands:
|
||||
```
|
||||
cmake --build build_x64 --preset windows-x64 --config RelWithDebInfo
|
||||
cmake --install build_x64 --prefix release --config RelWithDebInfo
|
||||
```
|
||||
You can of course also build the plugin in an IDE depending on which generator you chose. (E.g. a Visual Studio solution on Windows)
|
||||
|
||||
### Dependencies for plugins
|
||||
|
||||
If you also want to include plugins which depend on external libraries you will have to adjust the cmake call in the configuration phase accordingly.
|
||||
For example, to include the "Video" condition in your build you will have to supply the paths to `OpenCV`, `tesseract`, and `leptonica` binaries.
|
||||
|
||||
On a Window system the command might look something like this:
|
||||
```
|
||||
cd SceneSwitcher
|
||||
cmake -DOpenCV_DIR="C:/Users/BuildUser/Documents/OBS/opencv/build/" -DLeptonica_DIR="C:/Users/BuildUser/Documents/OBS/leptonica/build" -DTesseract_DIR="C:/Users/BuildUser/Documents/OBS/tesseract/build/lib/cmake/tesseract" --preset windows-x64
|
||||
```
|
||||
|
||||
You can rely on the CI scripts to build the dependencies for you, although it is not guaranteed that they will function in every environment:
|
||||
|
||||
| Platform | Command |
|
||||
| ----------- | ----------- |
|
||||
| Windows | `.\.github\scripts\Build-Deps-Windows.ps1` |
|
||||
| Linux | `./.github/scripts/build-deps-linux.sh` |
|
||||
| MacOS | `./.github/scripts/build-deps-macos.zsh` |
|
||||
|
||||
|
||||
# Contributing
|
||||
|
||||
Contributions to the plugin are always welcome and if you need any assistance do not hesitate to reach out!
|
||||
|
||||
If you would like to expand upon the macro system by adding a new condition or action type have a look at the examples in `plugins/base`.
|
||||
In general changes in the `lib/legacy` folder should be avoided, if possible.
|
||||
|
||||
## Macro condition
|
||||
Macro conditions should inherit from the `MacroCondition` class and must implement the following functions:
|
||||
|
||||
```
|
||||
class MacroConditionExample : public MacroCondition {
|
||||
public:
|
||||
MacroConditionExample(Macro *m) : MacroCondition(m) {}
|
||||
// This function should perform the condition check
|
||||
bool CheckCondition();
|
||||
// This function should store the required condition data to "data"
|
||||
// For example called on OBS shutdown
|
||||
bool Save(obs_data_t *data);
|
||||
// This function should load the condition data from "data"
|
||||
// For example called on OBS startup
|
||||
bool Load(obs_data_t *data);
|
||||
// This function should return a unique id for this condition type
|
||||
// The _id is defined below
|
||||
std::string GetId() { return _id; };
|
||||
// Helper function called when new conditions are created
|
||||
// Will be used later when registering the new condition type
|
||||
static std::shared_ptr<MacroCondition> Create(Macro *m)
|
||||
{
|
||||
return std::make_shared<MacroConditionExample>(m);
|
||||
}
|
||||
|
||||
private:
|
||||
// Used to register new condition type
|
||||
static bool _registered;
|
||||
// Unique id identifying this condition type
|
||||
static const std::string _id;
|
||||
};
|
||||
```
|
||||
When defining the widget used to control the settings of the condition type, a static `Create()` method is required.
|
||||
It will be called whenever a new condition MacroConditionExample is created. (See `MacroConditionFactory::Register()`)
|
||||
```
|
||||
class MacroConditionExampleEdit : public QWidget {
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
// ...
|
||||
MacroConditionExampleEdit(
|
||||
QWidget *parent,
|
||||
std::shared_ptr<MacroConditionExample> cond = nullptr);
|
||||
|
||||
// Function will be used to create the widget for editing the settings of the condition
|
||||
static QWidget *Create(QWidget *parent,
|
||||
std::shared_ptr<MacroCondition> cond)
|
||||
{
|
||||
return new MacroConditionExampleEdit(
|
||||
parent,
|
||||
std::dynamic_pointer_cast<MacroConditionExample>(cond));
|
||||
}
|
||||
// ...
|
||||
};
|
||||
```
|
||||
|
||||
To finally register the new condition type you will have to add the following call to `MacroConditionFactory::Register()`.
|
||||
|
||||
```
|
||||
bool MacroConditionExample::_registered = MacroConditionFactory::Register(
|
||||
MacroConditionExample::id, // Unique string identifying this condition type
|
||||
{
|
||||
MacroConditionExample::Create, // Function called to create the object performing the condition
|
||||
MacroConditionExampleEdit::Create, // Function called to create the widget to configure the settings
|
||||
"AdvSceneSwitcher.condition.example", // User facing name of the condition type (will be translated)
|
||||
true // Condition type supports duration modifiers (default true)
|
||||
}
|
||||
);
|
||||
```
|
||||
|
||||
## Macro action
|
||||
|
||||
The process of adding a new action type is very similar to adding a new condition.
|
||||
The differences are highlighted in the comments below.
|
||||
|
||||
```
|
||||
class MacroActionExample : public MacroAction {
|
||||
public:
|
||||
MacroActionExample(Macro *m) : MacroAction(m) {}
|
||||
static std::shared_ptr<MacroAction> Create(Macro *m);
|
||||
// Used to create a copy of the action (used for action queues)
|
||||
std::shared_ptr<MacroAction> Copy() const;
|
||||
// This function should perform the action
|
||||
// If false is returned the macro will aborted
|
||||
bool PerformAction();
|
||||
bool Save(obs_data_t *data);
|
||||
bool Load(obs_data_t *data);
|
||||
std::string GetId() { return _id; };
|
||||
// Optional:
|
||||
// Might be called when action is inserted to action queue
|
||||
void ResolveVariablesToFixedValues();
|
||||
|
||||
private:
|
||||
static bool _registered;
|
||||
static const std::string _id;
|
||||
};
|
||||
```
|
||||
```
|
||||
class MacroActionExampleEdit : public QWidget {
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
// ...
|
||||
MacroActionExampleEdit(
|
||||
QWidget *parent,
|
||||
std::shared_ptr<MacroActionExample> entryData = nullptr);
|
||||
static QWidget *Create(QWidget *parent,
|
||||
std::shared_ptr<MacroAction> action)
|
||||
{
|
||||
return new MacroActionExampleEdit(
|
||||
parent,
|
||||
std::dynamic_pointer_cast<MacroActionExample>(action));
|
||||
}
|
||||
// ...
|
||||
};
|
||||
```
|
||||
```
|
||||
MacroActionFactory::Register(
|
||||
MacroActionExample::id, // Unique string identifying this action type
|
||||
{
|
||||
MacroActionExample::Create, // Function called to create the object performing the action
|
||||
MacroActionExampleEdit::Create, // Function called to create the widget to configure the settings
|
||||
"AdvSceneSwitcher.action.example" // User facing name of the action type
|
||||
}
|
||||
);
|
||||
```
|
||||
## External dependencies
|
||||
If your intention is to add macro functionality which depends on external libraries, which might not exist on all user environments, have a look at the folders in the `plugins/` directory, which are not named `base`.
|
||||
For example, `plugins/video` will only be loaded if the `OpenCV` dependencies are met.
|
||||
692
CMakeLists.txt
692
CMakeLists.txt
|
|
@ -1,227 +1,535 @@
|
|||
cmake_minimum_required(VERSION 3.5)
|
||||
cmake_minimum_required(VERSION 3.21...3.26)
|
||||
|
||||
project(advanced-scene-switcher)
|
||||
project(advanced-scene-switcher VERSION 1.0.0)
|
||||
|
||||
message(STATUS "CMAKE_PROJECT_NAME is ${CMAKE_PROJECT_NAME}")
|
||||
if(${CMAKE_PROJECT_NAME} STREQUAL "obs-studio")
|
||||
if(NOT DEFINED BUILD_OUT_OF_TREE)
|
||||
message(STATUS "${PROJECT_NAME} configured for in-tree build")
|
||||
endif()
|
||||
else()
|
||||
set(BUILD_OUT_OF_TREE ON)
|
||||
message(STATUS "${PROJECT_NAME} configured for out-of-tree build")
|
||||
endif()
|
||||
|
||||
if(BUILD_OUT_OF_TREE)
|
||||
# out of tree builds
|
||||
# credits to c3r1c3
|
||||
set(CMAKE_PREFIX_PATH "${QTDIR}")
|
||||
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
||||
list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/external")
|
||||
set(CMAKE_AUTOMOC ON)
|
||||
set(CMAKE_AUTOUIC ON)
|
||||
include("${CMAKE_CURRENT_SOURCE_DIR}/cmake/common/bootstrap.cmake"
|
||||
NO_POLICY_SCOPE)
|
||||
include(compilerconfig)
|
||||
include(defaults)
|
||||
include(helpers)
|
||||
endif()
|
||||
|
||||
# OBS 31 no longer defines find_qt so check if we need to include it for in-tree
|
||||
# builds
|
||||
if(NOT COMMAND find_qt)
|
||||
include("${CMAKE_CURRENT_SOURCE_DIR}/cmake/common/helpers_common.cmake")
|
||||
endif()
|
||||
|
||||
include(external/FindLibObs.cmake)
|
||||
find_package(LibObs REQUIRED)
|
||||
find_package(Qt5Core REQUIRED)
|
||||
find_package(Qt5Widgets REQUIRED)
|
||||
find_path(LIBOBS_FRONTEND_INCLUDE_DIR HINTS ${LIBOBS_INCLUDE_DIRS})
|
||||
find_file(LIBOBS_FRONTEND_API_LIB NAMES libobs-frontend-api.* HINTS ${LIBOBS_LIB} )
|
||||
set(LIB_NAME "${PROJECT_NAME}-lib")
|
||||
add_library(${PROJECT_NAME} MODULE)
|
||||
add_library(${LIB_NAME} SHARED)
|
||||
|
||||
if(APPLE)
|
||||
find_library(COCOA Cocoa)
|
||||
find_package(Qt5MacExtras REQUIRED)
|
||||
include_directories(${COCOA})
|
||||
add_link_options("-v")
|
||||
endif()
|
||||
include(cmake/common/get_git_revision_description.cmake)
|
||||
get_git_head_revision(GIT_REFSPEC GIT_SHA1)
|
||||
git_describe(GIT_TAG)
|
||||
|
||||
if(UNIX AND NOT APPLE)
|
||||
find_package(X11 REQUIRED)
|
||||
link_libraries(${X11_LIBRARIES})
|
||||
include_directories(${X11_INCLUDE_DIR})
|
||||
endif()
|
||||
# Helper for OpenSSL
|
||||
if(OS_WINDOWS)
|
||||
include(cmake/windows/wingetssl.cmake)
|
||||
endif()
|
||||
|
||||
set(advanced-scene-switcher_HEADERS
|
||||
${advanced-scene-switcher_HEADERS}
|
||||
src/headers/advanced-scene-switcher.hpp
|
||||
src/headers/switcher-data-structs.hpp
|
||||
src/headers/utility.hpp
|
||||
)
|
||||
if(${GIT_TAG} STREQUAL "GIT-NOTFOUND")
|
||||
set(GIT_TAG ${PROJECT_VERSION})
|
||||
endif()
|
||||
message(STATUS "${PROJECT_NAME} version: ${GIT_TAG}")
|
||||
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/cmake/common/version.cpp.in"
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/lib/version.cpp" @ONLY)
|
||||
|
||||
set(advanced-scene-switcher_SOURCES
|
||||
${advanced-scene-switcher_SOURCES}
|
||||
src/advanced-scene-switcher.cpp
|
||||
src/advanced-scene-switcher-module.c
|
||||
src/scene-transitions.cpp
|
||||
src/screen-region-switch.cpp
|
||||
src/priority.cpp
|
||||
src/executable-switch.cpp
|
||||
src/idle-switch.cpp
|
||||
src/scene-round-trip.cpp
|
||||
src/file-switch.cpp
|
||||
src/window-title-switch.cpp
|
||||
src/media-switch.cpp
|
||||
src/hotkey.cpp
|
||||
src/general.cpp
|
||||
src/pause-switch.cpp
|
||||
src/random.cpp
|
||||
)
|
||||
# --- Set target sources ---
|
||||
|
||||
set(advanced-scene-switcher_UI
|
||||
${advanced-scene-switcher_UI}
|
||||
forms/advanced-scene-switcher.ui
|
||||
)
|
||||
# Module sources
|
||||
target_sources(${PROJECT_NAME} PRIVATE module/advanced-scene-switcher-module.c)
|
||||
|
||||
if(WIN32)
|
||||
set(advanced-scene-switcher_PLATFORM_SOURCES
|
||||
src/win/advanced-scene-switcher-win.cpp)
|
||||
# Generic sources
|
||||
target_sources(
|
||||
${LIB_NAME}
|
||||
PRIVATE lib/advanced-scene-switcher.cpp
|
||||
lib/advanced-scene-switcher.hpp
|
||||
lib/general.cpp
|
||||
lib/platform-funcs.hpp
|
||||
lib/switcher-data.cpp
|
||||
lib/switcher-data.hpp
|
||||
lib/version.cpp
|
||||
lib/version.h)
|
||||
|
||||
elseif(APPLE)
|
||||
set(advanced-scene-switcher_PLATFORM_SOURCES
|
||||
src/osx/advanced-scene-switcher-osx.mm)
|
||||
set_source_files_properties(advanced-scene-switcher-osx.mm
|
||||
PROPERTIES COMPILE_FLAGS "-fobjc-arc")
|
||||
set(advanced-scene-switcher_PLATFORM_LIBS
|
||||
${COCOA})
|
||||
# Legacy function sources
|
||||
target_sources(
|
||||
${LIB_NAME}
|
||||
PRIVATE lib/legacy/scene-group.cpp
|
||||
lib/legacy/scene-group.hpp
|
||||
lib/legacy/switch-audio.cpp
|
||||
lib/legacy/switch-audio.hpp
|
||||
lib/legacy/switch-executable.cpp
|
||||
lib/legacy/switch-executable.hpp
|
||||
lib/legacy/switch-file.cpp
|
||||
lib/legacy/switch-file.hpp
|
||||
lib/legacy/switch-generic.cpp
|
||||
lib/legacy/switch-generic.hpp
|
||||
lib/legacy/switch-idle.cpp
|
||||
lib/legacy/switch-idle.hpp
|
||||
lib/legacy/switch-media.cpp
|
||||
lib/legacy/switch-media.hpp
|
||||
lib/legacy/switch-pause.cpp
|
||||
lib/legacy/switch-pause.hpp
|
||||
lib/legacy/switch-random.cpp
|
||||
lib/legacy/switch-random.hpp
|
||||
lib/legacy/switch-screen-region.cpp
|
||||
lib/legacy/switch-screen-region.hpp
|
||||
lib/legacy/switch-sequence.cpp
|
||||
lib/legacy/switch-sequence.hpp
|
||||
lib/legacy/switch-time.cpp
|
||||
lib/legacy/switch-time.hpp
|
||||
lib/legacy/switch-transitions.cpp
|
||||
lib/legacy/switch-transitions.hpp
|
||||
lib/legacy/switch-video.cpp
|
||||
lib/legacy/switch-video.hpp
|
||||
lib/legacy/switch-window.cpp
|
||||
lib/legacy/switch-window.hpp)
|
||||
|
||||
elseif("${CMAKE_SYSTEM_NAME}" MATCHES "Linux")
|
||||
set(advanced-scene-switcher_PLATFORM_SOURCES
|
||||
src/linux/advanced-scene-switcher-nix.cpp)
|
||||
set(advanced-scene-switcher_PLATFORM_LIBS
|
||||
Xss)
|
||||
endif()
|
||||
# Maro sources
|
||||
target_sources(
|
||||
${LIB_NAME}
|
||||
PRIVATE lib/macro/macro-action-edit.cpp
|
||||
lib/macro/macro-action-edit.hpp
|
||||
lib/macro/macro-action-factory.cpp
|
||||
lib/macro/macro-action-factory.hpp
|
||||
lib/macro/macro-action-macro.cpp
|
||||
lib/macro/macro-action-macro.hpp
|
||||
lib/macro/macro-action-queue.cpp
|
||||
lib/macro/macro-action-queue.hpp
|
||||
lib/macro/macro-action-variable.cpp
|
||||
lib/macro/macro-action-variable.hpp
|
||||
lib/macro/macro-action.cpp
|
||||
lib/macro/macro-action.hpp
|
||||
lib/macro/macro-condition-edit.cpp
|
||||
lib/macro/macro-condition-edit.hpp
|
||||
lib/macro/macro-condition-factory.cpp
|
||||
lib/macro/macro-condition-factory.hpp
|
||||
lib/macro/macro-condition-macro.cpp
|
||||
lib/macro/macro-condition-macro.hpp
|
||||
lib/macro/macro-condition-queue.cpp
|
||||
lib/macro/macro-condition-queue.hpp
|
||||
lib/macro/macro-condition-tempvar.cpp
|
||||
lib/macro/macro-condition-tempvar.hpp
|
||||
lib/macro/macro-condition-variable.cpp
|
||||
lib/macro/macro-condition-variable.hpp
|
||||
lib/macro/macro-condition.cpp
|
||||
lib/macro/macro-condition.hpp
|
||||
lib/macro/macro-dock.cpp
|
||||
lib/macro/macro-dock.hpp
|
||||
lib/macro/macro-dock-settings.hpp
|
||||
lib/macro/macro-dock-settings.cpp
|
||||
lib/macro/macro-dock-window.cpp
|
||||
lib/macro/macro-dock-window.hpp
|
||||
lib/macro/macro-edit.cpp
|
||||
lib/macro/macro-edit.hpp
|
||||
lib/macro/macro-export-import-dialog.cpp
|
||||
lib/macro/macro-export-import-dialog.hpp
|
||||
lib/macro/macro-helpers.cpp
|
||||
lib/macro/macro-helpers.hpp
|
||||
lib/macro/macro-input.cpp
|
||||
lib/macro/macro-input.hpp
|
||||
lib/macro/macro-list.cpp
|
||||
lib/macro/macro-list.hpp
|
||||
lib/macro/macro-ref.cpp
|
||||
lib/macro/macro-ref.hpp
|
||||
lib/macro/macro-run-button.cpp
|
||||
lib/macro/macro-run-button.hpp
|
||||
lib/macro/macro-search.cpp
|
||||
lib/macro/macro-search.hpp
|
||||
lib/macro/macro-segment-copy-paste.cpp
|
||||
lib/macro/macro-segment-copy-paste.hpp
|
||||
lib/macro/macro-segment-list.cpp
|
||||
lib/macro/macro-segment-list.hpp
|
||||
lib/macro/macro-segment-selection.cpp
|
||||
lib/macro/macro-segment-selection.hpp
|
||||
lib/macro/macro-segment-unknown.hpp
|
||||
lib/macro/macro-segment.cpp
|
||||
lib/macro/macro-segment.hpp
|
||||
lib/macro/macro-selection.cpp
|
||||
lib/macro/macro-selection.hpp
|
||||
lib/macro/macro-settings.cpp
|
||||
lib/macro/macro-settings.hpp
|
||||
lib/macro/macro-signals.cpp
|
||||
lib/macro/macro-signals.hpp
|
||||
lib/macro/macro-tab.cpp
|
||||
lib/macro/macro-tree.cpp
|
||||
lib/macro/macro-tree.hpp
|
||||
lib/macro/macro-websocket-trigger.cpp
|
||||
lib/macro/macro.cpp
|
||||
lib/macro/macro.hpp)
|
||||
|
||||
add_library(advanced-scene-switcher MODULE
|
||||
${advanced-scene-switcher_HEADERS}
|
||||
${advanced-scene-switcher_SOURCES}
|
||||
${advanced-scene-switcher_UI_HEADERS}
|
||||
${advanced-scene-switcher_PLATFORM_SOURCES}
|
||||
${advanced-scene-switcher_PLATFORM_HEADERS}
|
||||
)
|
||||
# Utility function sources
|
||||
target_sources(
|
||||
${LIB_NAME}
|
||||
PRIVATE lib/queue/action-queue.cpp
|
||||
lib/queue/action-queue.hpp
|
||||
lib/queue/action-queue-tab.cpp
|
||||
lib/queue/action-queue-tab.hpp
|
||||
lib/utils/auto-update-tooltip-label.cpp
|
||||
lib/utils/auto-update-tooltip-label.hpp
|
||||
lib/utils/backup.cpp
|
||||
lib/utils/backup.hpp
|
||||
lib/utils/canvas-helpers.cpp
|
||||
lib/utils/canvas-helpers.hpp
|
||||
lib/utils/condition-logic.cpp
|
||||
lib/utils/condition-logic.hpp
|
||||
lib/utils/crash-handler.cpp
|
||||
lib/utils/crash-handler.hpp
|
||||
lib/utils/curl-helper.cpp
|
||||
lib/utils/curl-helper.hpp
|
||||
lib/utils/cursor-shape-changer.cpp
|
||||
lib/utils/cursor-shape-changer.hpp
|
||||
lib/utils/double-slider.cpp
|
||||
lib/utils/double-slider.hpp
|
||||
lib/utils/duration-control.cpp
|
||||
lib/utils/duration-control.hpp
|
||||
lib/utils/duration-modifier.cpp
|
||||
lib/utils/duration-modifier.hpp
|
||||
lib/utils/duration.cpp
|
||||
lib/utils/duration.hpp
|
||||
lib/utils/export-symbol-helper.hpp
|
||||
lib/utils/file-selection.cpp
|
||||
lib/utils/file-selection.hpp
|
||||
lib/utils/filter-combo-box.cpp
|
||||
lib/utils/filter-combo-box.hpp
|
||||
lib/utils/first-run-wizard.cpp
|
||||
lib/utils/first-run-wizard.hpp
|
||||
lib/utils/help-icon.hpp
|
||||
lib/utils/help-icon.cpp
|
||||
lib/utils/item-selection-helpers.cpp
|
||||
lib/utils/item-selection-helpers.hpp
|
||||
lib/utils/json-helpers.cpp
|
||||
lib/utils/json-helpers.hpp
|
||||
lib/utils/layout-helpers.cpp
|
||||
lib/utils/layout-helpers.hpp
|
||||
lib/utils/list-controls.cpp
|
||||
lib/utils/list-controls.hpp
|
||||
lib/utils/list-editor.cpp
|
||||
lib/utils/list-editor.hpp
|
||||
lib/utils/log-helper.cpp
|
||||
lib/utils/log-helper.hpp
|
||||
lib/utils/math-helpers.cpp
|
||||
lib/utils/math-helpers.hpp
|
||||
lib/utils/message-buffer.hpp
|
||||
lib/utils/message-dispatcher.hpp
|
||||
lib/utils/mouse-wheel-guard.cpp
|
||||
lib/utils/mouse-wheel-guard.hpp
|
||||
lib/utils/name-dialog.cpp
|
||||
lib/utils/name-dialog.hpp
|
||||
lib/utils/non-modal-dialog.cpp
|
||||
lib/utils/non-modal-dialog.hpp
|
||||
lib/utils/obs-module-helper.cpp
|
||||
lib/utils/obs-module-helper.hpp
|
||||
lib/utils/path-helpers.cpp
|
||||
lib/utils/path-helpers.hpp
|
||||
lib/utils/plugin-state-helpers.cpp
|
||||
lib/utils/plugin-state-helpers.hpp
|
||||
lib/utils/priority-helper.cpp
|
||||
lib/utils/priority-helper.hpp
|
||||
lib/utils/regex-config.cpp
|
||||
lib/utils/regex-config.hpp
|
||||
lib/utils/resizable-widget.cpp
|
||||
lib/utils/resizable-widget.hpp
|
||||
lib/utils/resizing-text-edit.cpp
|
||||
lib/utils/resizing-text-edit.hpp
|
||||
lib/utils/resource-table.cpp
|
||||
lib/utils/resource-table.hpp
|
||||
lib/utils/scene-selection.cpp
|
||||
lib/utils/scene-selection.hpp
|
||||
lib/utils/scene-switch-helpers.cpp
|
||||
lib/utils/scene-switch-helpers.hpp
|
||||
lib/utils/screenshot-helper.cpp
|
||||
lib/utils/screenshot-helper.hpp
|
||||
lib/utils/section.cpp
|
||||
lib/utils/section.hpp
|
||||
lib/utils/selection-helpers.cpp
|
||||
lib/utils/selection-helpers.hpp
|
||||
lib/utils/single-char-selection.cpp
|
||||
lib/utils/single-char-selection.hpp
|
||||
lib/utils/slider-spinbox.cpp
|
||||
lib/utils/slider-spinbox.hpp
|
||||
lib/utils/source-helpers.cpp
|
||||
lib/utils/source-helpers.hpp
|
||||
lib/utils/source-selection.cpp
|
||||
lib/utils/source-selection.hpp
|
||||
lib/utils/splitter-helpers.cpp
|
||||
lib/utils/splitter-helpers.hpp
|
||||
lib/utils/status-control.cpp
|
||||
lib/utils/status-control.hpp
|
||||
lib/utils/string-list.cpp
|
||||
lib/utils/string-list.hpp
|
||||
lib/utils/switch-button.cpp
|
||||
lib/utils/switch-button.hpp
|
||||
lib/utils/sync-helpers.cpp
|
||||
lib/utils/sync-helpers.hpp
|
||||
lib/utils/tab-helpers.cpp
|
||||
lib/utils/tab-helpers.hpp
|
||||
lib/utils/temp-variable.cpp
|
||||
lib/utils/temp-variable.hpp
|
||||
lib/utils/time-helpers.cpp
|
||||
lib/utils/time-helpers.hpp
|
||||
lib/utils/ui-helpers.cpp
|
||||
lib/utils/ui-helpers.hpp
|
||||
lib/utils/utility.cpp
|
||||
lib/utils/utility.hpp
|
||||
lib/utils/volume-control.cpp
|
||||
lib/utils/volume-control.hpp
|
||||
lib/utils/websocket-api.cpp
|
||||
lib/utils/websocket-api.hpp
|
||||
lib/variables/variable-line-edit.cpp
|
||||
lib/variables/variable-line-edit.hpp
|
||||
lib/variables/variable-number.hpp
|
||||
lib/variables/variable-number.tpp
|
||||
lib/variables/variable-spinbox.cpp
|
||||
lib/variables/variable-spinbox.hpp
|
||||
lib/variables/variable-string.cpp
|
||||
lib/variables/variable-string.hpp
|
||||
lib/variables/variable-tab.cpp
|
||||
lib/variables/variable-tab.hpp
|
||||
lib/variables/variable-text-edit.cpp
|
||||
lib/variables/variable-text-edit.hpp
|
||||
lib/variables/variable.cpp
|
||||
lib/variables/variable.hpp)
|
||||
|
||||
include_directories(
|
||||
"${LIBOBS_INCLUDE_DIRS}"
|
||||
"${LIBOBS_FRONTEND_INCLUDE_DIR}"
|
||||
${Qt5Core_INCLUDES}
|
||||
${Qt5Widgets_INCLUDES})
|
||||
# --- End of section ---
|
||||
|
||||
target_link_libraries(advanced-scene-switcher
|
||||
${advanced-scene-switcher_PLATFORM_LIBS}
|
||||
${LIBOBS_LIB}
|
||||
${LIBOBS_FRONTEND_API_LIB}
|
||||
Qt5::Core
|
||||
Qt5::Widgets)
|
||||
# Subfolder for advanced scene switcher plugins
|
||||
set(ADVSS_PLUGIN_FOLDER "advanced-scene-switcher-plugins")
|
||||
target_compile_definitions(
|
||||
${LIB_NAME} PRIVATE ADVSS_PLUGIN_FOLDER=\"${ADVSS_PLUGIN_FOLDER}\")
|
||||
|
||||
# Additional commands to install the module in the correct place.
|
||||
# Find all the translation files so we can copy them to the correct
|
||||
# place later on.
|
||||
file(GLOB ASS_TRANSLATION_FILES
|
||||
"data/locale/*.ini"
|
||||
)
|
||||
include(cmake/common/advss_helpers.cmake)
|
||||
setup_obs_lib_dependency(${LIB_NAME})
|
||||
setup_obs_lib_dependency(${PROJECT_NAME})
|
||||
|
||||
# Windows
|
||||
if(WIN32)
|
||||
string(REGEX REPLACE "/RTC(su|[1su])" "" CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG}")
|
||||
message("${CMAKE_CXX_FLAGS_RELEASE}")
|
||||
find_package(Qt6 REQUIRED COMPONENTS Widgets Core)
|
||||
target_link_libraries(${PROJECT_NAME} PRIVATE Qt6::Core Qt6::Widgets)
|
||||
target_link_libraries(${LIB_NAME} PRIVATE Qt6::Core Qt6::Widgets)
|
||||
|
||||
find_package(w32-pthreads REQUIRED)
|
||||
# Ignore QCheckBox::stateChanged deprecation warning until minimum supported Qt
|
||||
# version is at least Qt 6.7, which introduces QCheckBox::checkStateChanged
|
||||
if(Qt6_VERSION VERSION_GREATER "6.0.0")
|
||||
target_compile_definitions(${LIB_NAME} PRIVATE QT_NO_DEPRECATED_WARNINGS)
|
||||
endif()
|
||||
|
||||
target_link_libraries(advanced-scene-switcher
|
||||
w32-pthreads)
|
||||
endif()
|
||||
target_compile_options(
|
||||
${PROJECT_NAME}
|
||||
PRIVATE
|
||||
$<$<C_COMPILER_ID:Clang,AppleClang>:-Wno-quoted-include-in-framework-header
|
||||
-Wno-comma>)
|
||||
set_target_properties(
|
||||
${PROJECT_NAME}
|
||||
PROPERTIES AUTOMOC ON
|
||||
AUTOUIC ON
|
||||
AUTORCC ON)
|
||||
|
||||
# OSX
|
||||
if(APPLE)
|
||||
set_target_properties(advanced-scene-switcher PROPERTIES PREFIX "")
|
||||
target_link_libraries(${PROJECT_NAME} PUBLIC ${LIB_NAME})
|
||||
|
||||
endif()
|
||||
# --- Platform-independent build settings ---
|
||||
|
||||
# Linux
|
||||
if(UNIX AND NOT APPLE)
|
||||
set(CMAKE_C_FLAGS "-Wall -Wextra -Wvla -Wno-unused-function -Werror-implicit-function-declaration -Wno-missing-braces -Wno-missing-field-initializers ${CMAKE_C_FLAGS} -std=c99 -fno-strict-aliasing")
|
||||
target_include_directories(
|
||||
${LIB_NAME}
|
||||
PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/lib"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/lib/legacy"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/lib/macro"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/lib/queue"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/lib/utils"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/lib/variables"
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/forms")
|
||||
|
||||
if(ARCH EQUAL 64)
|
||||
set(ARCH_NAME "x86_64")
|
||||
else()
|
||||
set(ARCH_NAME "i686")
|
||||
endif()
|
||||
set_target_properties(
|
||||
${LIB_NAME}
|
||||
PROPERTIES AUTOMOC ON
|
||||
AUTOUIC ON
|
||||
AUTORCC ON
|
||||
AUTOUIC_SEARCH_PATHS "${CMAKE_CURRENT_SOURCE_DIR}/forms")
|
||||
set_target_properties(${LIB_NAME} PROPERTIES CXX_VISIBILITY_PRESET hidden)
|
||||
|
||||
set_target_properties(advanced-scene-switcher PROPERTIES PREFIX "")
|
||||
target_compile_features(${PROJECT_NAME} PUBLIC cxx_std_17)
|
||||
target_compile_features(${LIB_NAME} PUBLIC cxx_std_17)
|
||||
|
||||
install(TARGETS advanced-scene-switcher
|
||||
LIBRARY DESTINATION ${CMAKE_INSTALL_PREFIX}/lib/obs-plugins)
|
||||
install(FILES ${ASS_TRANSLATION_FILES}
|
||||
DESTINATION "${CMAKE_INSTALL_PREFIX}/share/obs/obs-plugins/advanced-scene-switcher/locale")
|
||||
endif()
|
||||
else ()
|
||||
# in-tree build
|
||||
if(APPLE)
|
||||
find_library(COCOA Cocoa)
|
||||
include_directories(${COCOA})
|
||||
endif()
|
||||
target_include_directories(
|
||||
${LIB_NAME} PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/deps/obs-websocket/lib"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/deps/exprtk")
|
||||
|
||||
if(UNIX)
|
||||
find_package(X11 REQUIRED)
|
||||
link_libraries(${X11_LIBRARIES})
|
||||
include_directories(${X11_INCLUDE_DIR})
|
||||
endif()
|
||||
if(NOT nlohmann_json_DIR
|
||||
AND EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/deps/json/CMakeLists.txt")
|
||||
add_subdirectory(deps/json)
|
||||
else()
|
||||
find_package(nlohmann_json REQUIRED)
|
||||
endif()
|
||||
target_link_libraries(${LIB_NAME} PUBLIC nlohmann_json::nlohmann_json)
|
||||
|
||||
set(advanced-scene-switcher_HEADERS
|
||||
${advanced-scene-switcher_HEADERS}
|
||||
src/headers/advanced-scene-switcher.hpp
|
||||
src/headers/switcher-data-structs.hpp
|
||||
src/headers/utility.hpp
|
||||
)
|
||||
if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/deps/jsoncons/CMakeLists.txt")
|
||||
# Don't build jsoncons unit tests as they are causing compilation issues and
|
||||
# won't be executed either way
|
||||
if(OS_MACOS)
|
||||
cmake_policy(SET CMP0077 NEW)
|
||||
endif()
|
||||
set(JSONCONS_BUILD_TESTS
|
||||
OFF
|
||||
CACHE BOOL "" FORCE)
|
||||
|
||||
set(advanced-scene-switcher_SOURCES
|
||||
${advanced-scene-switcher_SOURCES}
|
||||
src/advanced-scene-switcher.cpp
|
||||
src/advanced-scene-switcher-module.c
|
||||
src/scene-transitions.cpp
|
||||
src/screen-region-switch.cpp
|
||||
src/priority.cpp
|
||||
src/executable-switch.cpp
|
||||
src/idle-switch.cpp
|
||||
src/scene-round-trip.cpp
|
||||
src/file-switch.cpp
|
||||
src/window-title-switch.cpp
|
||||
src/media-switch.cpp
|
||||
src/hotkey.cpp
|
||||
src/general.cpp
|
||||
src/pause-switch.cpp
|
||||
src/random.cpp
|
||||
)
|
||||
set(advanced-scene-switcher_UI
|
||||
${advanced-scene-switcher_UI}
|
||||
forms/advanced-scene-switcher.ui
|
||||
)
|
||||
add_subdirectory(deps/jsoncons EXCLUDE_FROM_ALL)
|
||||
target_link_libraries(${LIB_NAME} PRIVATE jsoncons)
|
||||
target_compile_definitions(${LIB_NAME} PRIVATE JSONPATH_SUPPORT=1)
|
||||
endif()
|
||||
|
||||
if(WIN32)
|
||||
set(advanced-scene-switcher_PLATFORM_SOURCES
|
||||
src/win/advanced-scene-switcher-win.cpp)
|
||||
find_package(CURL QUIET)
|
||||
find_package(Libcurl QUIET)
|
||||
if(CURL_FOUND)
|
||||
if(NOT DEFINED CURL_INCLUDE_DIRS AND TARGET CURL::libcurl)
|
||||
get_target_property(CURL_INCLUDE_DIR CURL::libcurl
|
||||
INTERFACE_INCLUDE_DIRECTORIES)
|
||||
target_include_directories(${LIB_NAME} PUBLIC "${CURL_INCLUDE_DIR}")
|
||||
else()
|
||||
target_include_directories(${LIB_NAME} PUBLIC "${CURL_INCLUDE_DIRS}")
|
||||
endif()
|
||||
elseif(Libcurl_FOUND)
|
||||
target_include_directories(${LIB_NAME} PUBLIC "${LIBCURL_INCLUDE_DIRS}")
|
||||
else()
|
||||
message(FATAL_ERROR "Couldn't find CURL or Libcurl - abort")
|
||||
endif()
|
||||
|
||||
elseif(APPLE)
|
||||
set(advanced-scene-switcher_PLATFORM_SOURCES
|
||||
src/osx/advanced-scene-switcher-osx.mm)
|
||||
set_source_files_properties(advanced-scene-switcher-osx.mm
|
||||
PROPERTIES COMPILE_FLAGS "-fobjc-arc")
|
||||
target_compile_definitions(${LIB_NAME} PRIVATE ADVSS_EXPORT_SYMBOLS=1)
|
||||
|
||||
set(advanced-scene-switcher_PLATFORM_LIBS
|
||||
${COCOA})
|
||||
else()
|
||||
set(advanced-scene-switcher_PLATFORM_SOURCES
|
||||
src/linux/advanced-scene-switcher-nix.cpp)
|
||||
set(advanced-scene-switcher_PLATFORM_LIBS
|
||||
Xss)
|
||||
endif()
|
||||
# --- End of section ---
|
||||
|
||||
qt5_wrap_ui(advanced-scene-switcher_UI_HEADERS
|
||||
${advanced-scene-switcher_UI}
|
||||
${advanced-scene-switcher_PLATFORM_UI})
|
||||
# --- Windows-specific build settings and tasks ---
|
||||
if(OS_WINDOWS)
|
||||
target_compile_definitions(${LIB_NAME} PRIVATE UNICODE _UNICODE)
|
||||
if(MSVC)
|
||||
target_compile_options(${LIB_NAME} PUBLIC /MP /d2FH4- /wd4267 /wd4267
|
||||
/bigobj)
|
||||
|
||||
add_library(advanced-scene-switcher MODULE
|
||||
${advanced-scene-switcher_HEADERS}
|
||||
${advanced-scene-switcher_SOURCES}
|
||||
${advanced-scene-switcher_UI_HEADERS}
|
||||
${advanced-scene-switcher_PLATFORM_SOURCES}
|
||||
${advanced-scene-switcher_PLATFORM_HEADERS}
|
||||
)
|
||||
target_link_libraries(advanced-scene-switcher
|
||||
${advanced-scene-switcher_PLATFORM_LIBS}
|
||||
obs-frontend-api
|
||||
Qt5::Widgets
|
||||
libobs)
|
||||
# Workaround for MSVC incompatibility in CI environment
|
||||
add_compile_definitions(${target_name} _DISABLE_CONSTEXPR_MUTEX_CONSTRUCTOR)
|
||||
endif()
|
||||
target_sources(${LIB_NAME} PRIVATE lib/win/advanced-scene-switcher-win.cpp)
|
||||
add_definitions(-D_WEBSOCKETPP_CPP11_STL_)
|
||||
# --- End of section ---
|
||||
|
||||
install_obs_plugin(advanced-scene-switcher data)
|
||||
endif()
|
||||
# -- macOS specific build settings and tasks --
|
||||
elseif(OS_MACOS)
|
||||
set_target_properties(${LIB_NAME} PROPERTIES PREFIX "" SUFFIX ".so")
|
||||
|
||||
find_library(COCOA Cocoa)
|
||||
target_include_directories(${LIB_NAME} PRIVATE ${COCOA})
|
||||
target_link_libraries(${LIB_NAME} PRIVATE ${COCOA})
|
||||
|
||||
target_sources(${LIB_NAME} PRIVATE lib/osx/advanced-scene-switcher-osx.mm)
|
||||
set_source_files_properties(advanced-scene-switcher-osx.mm
|
||||
PROPERTIES COMPILE_FLAGS "-fobjc-arc")
|
||||
# --- End of section ---
|
||||
|
||||
# --- Linux-specific build settings and tasks ---
|
||||
else()
|
||||
set_target_properties(${PROJECT_NAME} PROPERTIES INSTALL_RPATH "$ORIGIN")
|
||||
set_target_properties(${LIB_NAME} PROPERTIES PREFIX "")
|
||||
set_target_properties(${LIB_NAME} PROPERTIES SOVERSION 1)
|
||||
|
||||
find_package(Qt6 REQUIRED COMPONENTS DBus)
|
||||
find_package(X11 REQUIRED COMPONENTS Xss)
|
||||
target_include_directories(${LIB_NAME} PRIVATE "${X11_INCLUDE_DIR}"
|
||||
"${X11_Xss_INCLUDE_PATH}")
|
||||
target_link_libraries(${LIB_NAME} PRIVATE ${X11_LIBRARIES})
|
||||
|
||||
find_path(PROCPS_INCLUDE_DIR NAMES proc/procps.h)
|
||||
find_path(PROCPS2_INCLUDE_DIR NAMES libproc2/pids.h)
|
||||
if(PROCPS_INCLUDE_DIR)
|
||||
message(STATUS "${PROJECT_NAME} using procps")
|
||||
set(PROC_INCLUDE_DIR "${PROCPS_INCLUDE_DIR}")
|
||||
target_compile_definitions(${LIB_NAME} PRIVATE PROCPS_AVAILABLE)
|
||||
set(PROCESS_CONDITION_SUPPORTED 1)
|
||||
endif()
|
||||
if(PROCPS2_INCLUDE_DIR)
|
||||
find_package(PkgConfig REQUIRED)
|
||||
pkg_check_modules(libproc2 REQUIRED IMPORTED_TARGET libproc2)
|
||||
set(PROC_INCLUDE_DIR "${PROCPS2_INCLUDE_DIR}")
|
||||
target_compile_definitions(${LIB_NAME} PRIVATE PROCPS2_AVAILABLE)
|
||||
set(PROCESS_CONDITION_SUPPORTED 1)
|
||||
|
||||
# Check if PIDS_VAL takes 4 arguments (old API, pre-4.0.5) or 3 (new API)
|
||||
include(CheckCSourceCompiles)
|
||||
set(CMAKE_REQUIRED_INCLUDES "${PROCPS2_INCLUDE_DIR}")
|
||||
set(CMAKE_REQUIRED_LIBRARIES proc2)
|
||||
check_c_source_compiles(
|
||||
"
|
||||
#include <libproc2/pids.h>
|
||||
int main(void) {
|
||||
struct pids_stack *s = 0;
|
||||
struct pids_info *i = 0;
|
||||
(void)PIDS_VAL(0, str, s, i);
|
||||
return 0;
|
||||
}
|
||||
"
|
||||
PROCPS2_PIDS_VAL_TAKES_INFO)
|
||||
if(PROCPS2_PIDS_VAL_TAKES_INFO)
|
||||
target_compile_definitions(${LIB_NAME} PRIVATE PROCPS2_USE_INFO)
|
||||
endif()
|
||||
endif()
|
||||
if(NOT DEFINED PROCESS_CONDITION_SUPPORTED)
|
||||
message(
|
||||
WARNING
|
||||
"found neither procps nor libproc2! Process condition will not be functional!"
|
||||
)
|
||||
endif()
|
||||
target_include_directories(${LIB_NAME} PRIVATE "${PROC_INCLUDE_DIR}")
|
||||
target_sources(${LIB_NAME} PRIVATE lib/linux/advanced-scene-switcher-nix.cpp
|
||||
lib/linux/kwin-helpers.cpp)
|
||||
|
||||
# Don't include irrelevant folders into sources archive
|
||||
list(APPEND CPACK_SOURCE_IGNORE_FILES "\\.deps/.*")
|
||||
endif()
|
||||
|
||||
if(NOT OS_WINDOWS)
|
||||
target_compile_options(
|
||||
${LIB_NAME}
|
||||
PUBLIC -Wno-error=unused-parameter -Wno-error=conversion -Wno-error=shadow
|
||||
-Wno-error=float-conversion -Wno-error=enum-conversion)
|
||||
endif()
|
||||
|
||||
# --- End of section ---
|
||||
|
||||
add_subdirectory(plugins)
|
||||
add_subdirectory(tests)
|
||||
|
||||
# --- Install ---
|
||||
|
||||
if(DEB_INSTALL)
|
||||
file(GLOB ASS_TRANSLATION_FILES "data/locale/*.ini")
|
||||
if(NOT LIB_OUT_DIR)
|
||||
set(LIB_OUT_DIR "/lib/obs-plugins")
|
||||
endif()
|
||||
if(NOT DATA_OUT_DIR)
|
||||
set(DATA_OUT_DIR "/share/obs/obs-plugins/${PROJECT_NAME}")
|
||||
endif()
|
||||
install(TARGETS ${PROJECT_NAME}
|
||||
LIBRARY DESTINATION ${CMAKE_INSTALL_PREFIX}/${LIB_OUT_DIR})
|
||||
install(TARGETS ${LIB_NAME}
|
||||
LIBRARY DESTINATION ${CMAKE_INSTALL_PREFIX}/${LIB_OUT_DIR})
|
||||
install(DIRECTORY data/locale
|
||||
DESTINATION ${CMAKE_INSTALL_PREFIX}/${DATA_OUT_DIR})
|
||||
install(DIRECTORY data/res
|
||||
DESTINATION ${CMAKE_INSTALL_PREFIX}/${DATA_OUT_DIR})
|
||||
else()
|
||||
install_advss_lib(${LIB_NAME})
|
||||
if(BUILD_OUT_OF_TREE)
|
||||
set_target_properties_plugin(${PROJECT_NAME} PROPERTIES OUTPUT_NAME
|
||||
${_name})
|
||||
else()
|
||||
set_target_properties_obs(${PROJECT_NAME} PROPERTIES PREFIX "")
|
||||
endif()
|
||||
endif()
|
||||
|
|
|
|||
190
CMakePresets.json
Normal file
190
CMakePresets.json
Normal file
|
|
@ -0,0 +1,190 @@
|
|||
{
|
||||
"version": 3,
|
||||
"cmakeMinimumRequired": {
|
||||
"major": 3,
|
||||
"minor": 22,
|
||||
"patch": 0
|
||||
},
|
||||
"configurePresets": [
|
||||
{
|
||||
"name": "template",
|
||||
"hidden": true,
|
||||
"cacheVariables": {
|
||||
"ENABLE_FRONTEND_API": true,
|
||||
"ENABLE_QT": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "macos",
|
||||
"displayName": "macOS Universal",
|
||||
"description": "Build for macOS 11.0+ (Universal binary)",
|
||||
"inherits": ["template"],
|
||||
"binaryDir": "${sourceDir}/build_macos",
|
||||
"condition": {
|
||||
"type": "equals",
|
||||
"lhs": "${hostSystemName}",
|
||||
"rhs": "Darwin"
|
||||
},
|
||||
"generator": "Xcode",
|
||||
"warnings": {"dev": true, "deprecated": true},
|
||||
"cacheVariables": {
|
||||
"QT_VERSION": "6",
|
||||
"CMAKE_OSX_DEPLOYMENT_TARGET": "11.0",
|
||||
"CODESIGN_IDENTITY": "$penv{CODESIGN_IDENT}",
|
||||
"CODESIGN_TEAM": "$penv{CODESIGN_TEAM}"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "macos-ci",
|
||||
"inherits": ["macos"],
|
||||
"displayName": "macOS Universal CI build",
|
||||
"description": "Build for macOS 11.0+ (Universal binary) for CI",
|
||||
"generator": "Xcode",
|
||||
"cacheVariables": {
|
||||
"CMAKE_COMPILE_WARNING_AS_ERROR": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "windows-x64",
|
||||
"displayName": "Windows x64",
|
||||
"description": "Build for Windows x64",
|
||||
"inherits": ["template"],
|
||||
"binaryDir": "${sourceDir}/build_x64",
|
||||
"condition": {
|
||||
"type": "equals",
|
||||
"lhs": "${hostSystemName}",
|
||||
"rhs": "Windows"
|
||||
},
|
||||
"generator": "Visual Studio 17 2022",
|
||||
"architecture": "x64",
|
||||
"warnings": {"dev": true, "deprecated": true},
|
||||
"cacheVariables": {
|
||||
"QT_VERSION": "6",
|
||||
"CMAKE_SYSTEM_VERSION": "10.0.18363.657"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "windows-ci-x64",
|
||||
"inherits": ["windows-x64"],
|
||||
"displayName": "Windows x64 CI build",
|
||||
"description": "Build for Windows x64 on CI",
|
||||
"cacheVariables": {
|
||||
"CMAKE_COMPILE_WARNING_AS_ERROR": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "linux-x86_64",
|
||||
"displayName": "Linux x86_64",
|
||||
"description": "Build for Linux x86_64",
|
||||
"inherits": ["template"],
|
||||
"binaryDir": "${sourceDir}/build_x86_64",
|
||||
"condition": {
|
||||
"type": "equals",
|
||||
"lhs": "${hostSystemName}",
|
||||
"rhs": "Linux"
|
||||
},
|
||||
"generator": "Ninja",
|
||||
"warnings": {"dev": true, "deprecated": true},
|
||||
"cacheVariables": {
|
||||
"QT_VERSION": "6",
|
||||
"CMAKE_BUILD_TYPE": "RelWithDebInfo"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "linux-ci-x86_64",
|
||||
"inherits": ["linux-x86_64"],
|
||||
"displayName": "Linux x86_64 CI build",
|
||||
"description": "Build for Linux x86_64 on CI",
|
||||
"cacheVariables": {
|
||||
"CMAKE_BUILD_TYPE": "RelWithDebInfo",
|
||||
"CMAKE_COMPILE_WARNING_AS_ERROR": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "linux-aarch64",
|
||||
"displayName": "Linux aarch64",
|
||||
"description": "Build for Linux aarch64",
|
||||
"inherits": ["template"],
|
||||
"binaryDir": "${sourceDir}/build_aarch64",
|
||||
"condition": {
|
||||
"type": "equals",
|
||||
"lhs": "${hostSystemName}",
|
||||
"rhs": "Linux"
|
||||
},
|
||||
"generator": "Ninja",
|
||||
"warnings": {"dev": true, "deprecated": true},
|
||||
"cacheVariables": {
|
||||
"QT_VERSION": "6",
|
||||
"CMAKE_BUILD_TYPE": "RelWithDebInfo"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "linux-ci-aarch64",
|
||||
"inherits": ["linux-aarch64"],
|
||||
"displayName": "Linux aarch64 CI build",
|
||||
"description": "Build for Linux aarch64 on CI",
|
||||
"cacheVariables": {
|
||||
"CMAKE_BUILD_TYPE": "RelWithDebInfo",
|
||||
"CMAKE_COMPILE_WARNING_AS_ERROR": true
|
||||
}
|
||||
}
|
||||
],
|
||||
"buildPresets": [
|
||||
{
|
||||
"name": "macos",
|
||||
"configurePreset": "macos",
|
||||
"displayName": "macOS Universal",
|
||||
"description": "macOS build for Universal architectures",
|
||||
"configuration": "Release"
|
||||
},
|
||||
{
|
||||
"name": "macos-ci",
|
||||
"configurePreset": "macos-ci",
|
||||
"displayName": "macOS Universal CI",
|
||||
"description": "macOS CI build for Universal architectures",
|
||||
"configuration": "RelWithDebInfo"
|
||||
},
|
||||
{
|
||||
"name": "windows-x64",
|
||||
"configurePreset": "windows-x64",
|
||||
"displayName": "Windows x64",
|
||||
"description": "Windows build for x64",
|
||||
"configuration": "RelWithDebInfo"
|
||||
},
|
||||
{
|
||||
"name": "windows-ci-x64",
|
||||
"configurePreset": "windows-ci-x64",
|
||||
"displayName": "Windows x64 CI",
|
||||
"description": "Windows CI build for x64 (RelWithDebInfo configuration)",
|
||||
"configuration": "RelWithDebInfo"
|
||||
},
|
||||
{
|
||||
"name": "linux-x86_64",
|
||||
"configurePreset": "linux-x86_64",
|
||||
"displayName": "Linux x86_64",
|
||||
"description": "Linux build for x86_64",
|
||||
"configuration": "RelWithDebInfo"
|
||||
},
|
||||
{
|
||||
"name": "linux-ci-x86_64",
|
||||
"configurePreset": "linux-ci-x86_64",
|
||||
"displayName": "Linux x86_64 CI",
|
||||
"description": "Linux CI build for x86_64",
|
||||
"configuration": "RelWithDebInfo"
|
||||
},
|
||||
{
|
||||
"name": "linux-aarch64",
|
||||
"configurePreset": "linux-aarch64",
|
||||
"displayName": "Linux aarch64",
|
||||
"description": "Linux build for aarch64",
|
||||
"configuration": "RelWithDebInfo"
|
||||
},
|
||||
{
|
||||
"name": "linux-ci-aarch64",
|
||||
"configurePreset": "linux-ci-aarch64",
|
||||
"displayName": "Linux aarch64 CI",
|
||||
"description": "Linux CI build for aarch64",
|
||||
"configuration": "RelWithDebInfo"
|
||||
}
|
||||
]
|
||||
}
|
||||
118
README.md
118
README.md
|
|
@ -1,109 +1,29 @@
|
|||
# SceneSwitcher
|
||||
An automated scene switcher for OBS Studio
|
||||
An automation plugin for OBS Studio.
|
||||
More information can be found in the [OBS forums](https://obsproject.com/forum/resources/automatic-scene-switching.395/) or the plugin's [wiki](https://github.com/WarmUpTill/SceneSwitcher/wiki).
|
||||
|
||||
More information can be found on https://obsproject.com/forum/resources/automatic-scene-switching.395/
|
||||
## Downloads
|
||||
|
||||
## Compiling in tree
|
||||
Add the "SceneSwitcher" source directory to your obs-studio source directory under obs-studio/UI/frontend-plugins/:
|
||||
Binaries for Windows, MacOS, and Linux are available in the [Releases](https://github.com/WarmUpTill/SceneSwitcher/releases) section.
|
||||
|
||||
## Installing the plugin
|
||||
|
||||
For the **Windows** and **MacOS** platforms, it is recommended to run the provided installers.
|
||||
|
||||
On Linux the plugin is available via the **Flatpak** package manager for users who installed OBS via Flatpak:
|
||||
```
|
||||
cd obs-studio/UI/frontend-plugins/
|
||||
git clone https://github.com/WarmUpTill/SceneSwitcher.git
|
||||
flatpak install com.obsproject.Studio.Plugin.SceneSwitcher
|
||||
```
|
||||
|
||||
Then modify the obs-studio/UI/frontend-plugins/CMakeLists.txt file and add an entry for the scene switcher:
|
||||
add_subdirectory(SceneSwitcher)
|
||||
|
||||
## Compiling out of tree
|
||||
### Prerequisites
|
||||
You'll need CMake and a working development environment for OBS Studio installed
|
||||
on your computer. Once you've done that, do the following:
|
||||
The **Snap** package manager offers an OBS Studio installation which is bundled with the plugin:
|
||||
```
|
||||
git clone https://github.com/WarmUpTill/SceneSwitcher.git
|
||||
cd SceneSwitcher
|
||||
mkdir build && cd build
|
||||
sudo snap install obs-studio
|
||||
```
|
||||
|
||||
### Windows
|
||||
In cmake-gui, you'll have to set these CMake variables :
|
||||
- **BUILD_OUT_OF_TREE** (bool) : true
|
||||
- **LIBOBS_INCLUDE_DIR** (path) : location of the libobs subfolder in the source
|
||||
code of OBS Studio, located at [source_directory]/libobs/.
|
||||
- **LIBOBS_LIB** (filepath) : location of the obs.dll file (usually set to
|
||||
C:\Program Files\obs-studio\bin\64bit\obs.dll)
|
||||
More information can be found [here](https://github.com/WarmUpTill/SceneSwitcher/wiki/Installation).
|
||||
|
||||
Assuming that you installed Qt via the regular Qt App way:
|
||||
- **Qt5Core_DIR** (path) : C:/Qt/5.10.1/msvc2017_64/lib/cmake/Qt5Core
|
||||
- **Qt5Gui_DIR** (path): C:/Qt/5.10.1/msvc2017_64/lib/cmake/Qt5Gui
|
||||
- **Qt5Widgets_DIR** (path) : C:/Qt/5.10.1/msvc2017_64/lib/cmake/Qt5Widgets
|
||||
## Contributing
|
||||
|
||||
- **LIBOBS_FRONTEND_API_LIB** (filepath) : location of the libobs-frontend-api.dll
|
||||
file, usually C:/Program Files/obs-studio/bin/64bit/obs-frontend-api.dll
|
||||
(usually in the same place as LIBOBS_LIB)
|
||||
- **LIBOBS_FRONTEND_INCLUDE_DIR** (path) : location of the obs-frontend-api
|
||||
subfolder in the source code of OBS Studio, located at [source_directory]/UI/obs-frontend-api.
|
||||
|
||||
Just keep hitting configure until all the vars are filled out. Then hit generate.
|
||||
|
||||
### Linux
|
||||
Most versions of Linux you can use cmake-gui or the command line.
|
||||
|
||||
**For the command line:**
|
||||
```
|
||||
cmake -DBUILD_OUT_OF_TREE=1 -DLIBOBS_INCLUDE_DIR="<path to the libobs/ sub-folder in obs-studio's source code>"
|
||||
-DLIBOBS_FRONTEND_INCLUDE_DIR="<path to the UI/obs-frontend-api/ sub-folder in obs-studio's source code>"
|
||||
-DLIBOBS_FRONTEND_API_LIB="< path to the libobs-frontend-api.so file (usually in the same place as LIBOBS_LIB)>"
|
||||
-DCMAKE_INSTALL_PREFIX=/usr ..
|
||||
make -j4
|
||||
sudo make install
|
||||
```
|
||||
|
||||
For cmake-gui you'll have to set the following variables:
|
||||
- **BUILD_OUT_OF_TREE** (bool) : true
|
||||
- **LIBOBS_INCLUDE_DIR** (path) : location of the libobs subfolder in the source
|
||||
code of OBS Studio, located at [source_directory]/libobs/.
|
||||
- **LIBOBS_LIB** (filepath) : location of the libobs.so file (usually CMake finds
|
||||
this, but if not it'll usually be in /usr/lib/libobs.so)
|
||||
|
||||
Assuming that you installed Qt via your system package manager, it should be
|
||||
found automatically. If not, then usually you'll find it in something like:
|
||||
- **Qt5Core_DIR** (path) : /usr/lib64/cmake/Qt5Core
|
||||
- **Qt5Gui_DIR** (path): /usr/lib64/cmake/Qt5Gui
|
||||
- **Qt5Widgets_DIR** (path) : /usr/lib64/cmake/Qt5Widgets
|
||||
|
||||
- **LIBOBS_FRONTEND_API_LIB** (filepath) : location of the libobs-frontend-api.so
|
||||
file (usually in the same place as LIBOBS_LIB)
|
||||
- **LIBOBS_FRONTEND_INCLUDE_DIR** (path) : location of the obs-frontend-api
|
||||
subfolder in the source code of OBS Studio, located at
|
||||
[source_directory]/UI/obs-frontend-api.
|
||||
|
||||
Just keep hitting configure until all the vars are filled out. Then hit generate.
|
||||
|
||||
Then open a terminal in the build folder and type:
|
||||
```
|
||||
make -j4
|
||||
sudo make install
|
||||
```
|
||||
NOTE: The Linux version of this plugin is dependent on libXScrnSaver.
|
||||
|
||||
### OS X
|
||||
In cmake-gui, you'll have to set these CMake variables :
|
||||
- **BUILD_OUT_OF_TREE** (bool) : true
|
||||
- **LIBOBS_INCLUDE_DIR** (path) : location of the libobs subfolder in the source
|
||||
code of OBS Studio, located at [source_directory]/libobs/.
|
||||
- **LIBOBS_LIB** (filepath) : location of the libobs.0.dylib file (usually
|
||||
in /Applications/OBS.app/Contents/Resources/bin/libobs.0.dylib)
|
||||
|
||||
Assuming that you installed Qt via the regular Qt App way:
|
||||
- **Qt5Core_DIR** (path) : Usually /Applications/Qt/5.10.1/clang_64/lib/cmake/Qt5Core
|
||||
- **Qt5Widgets_DIR** (path) : Usually /Applications/Qt/5.10.1/clang_64/lib/cmake/Qt5Widgets
|
||||
- **Qt5MacExtras_DIR** (path) : Usually /Applications/Qt/5.10.1/clang_64/lib/cmake/Qt5MacExtras
|
||||
|
||||
- **LIBOBS_FRONTEND_API_LIB** (filepath) : location of the libobs-frontend-api.0.dylib
|
||||
file (usually in usually in /Applications/OBS.app/Contents/Resources/bin/libobs-frontend-api.0.dylib)
|
||||
- **LIBOBS_FRONTEND_INCLUDE_DIR** (path) : location of the obs-frontend-api subfolder
|
||||
in the source code of OBS Studio, located at [source_directory]/UI/obs-frontend-api.
|
||||
|
||||
Just keep hitting configure until all the vars are filled out. Then hit generate.
|
||||
|
||||
Open xcode (or a terminal, depending on the build type you chose), build and copy
|
||||
the advanced-scene-switcher.so file to /Applications/OBS.app/Contents/Resources/obs-plugins/
|
||||
- If you wish to contribute code to the project, have a look at this [section](BUILDING.md) describing how to compile the plugin.
|
||||
- You can add custom conditions and actions at runtime using the API described [here](https://github.com/WarmUpTill/SceneSwitcher/wiki/Scripting).
|
||||
- You can optionally use [pre-commit](https://pre-commit.com) to automatically handle formatting.
|
||||
- If you wish to contribute translations, feel free to submit pull requests for the corresponding files under `data/locale`.
|
||||
|
|
|
|||
3
build-aux/.functions/log_debug
Normal file
3
build-aux/.functions/log_debug
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
if (( ! ${+_loglevel} )) typeset -g _loglevel=1
|
||||
|
||||
if (( _loglevel > 2 )) print -PR -e -- "${CI:+::debug::}%F{220}DEBUG: ${@}%f"
|
||||
3
build-aux/.functions/log_error
Normal file
3
build-aux/.functions/log_error
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
local icon=' ✖︎ '
|
||||
|
||||
print -u2 -PR "${CI:+::error::}%F{1} ${icon} %f ${@}"
|
||||
16
build-aux/.functions/log_group
Normal file
16
build-aux/.functions/log_group
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
autoload -Uz log_info
|
||||
|
||||
if (( ! ${+_log_group} )) typeset -g _log_group=0
|
||||
|
||||
if (( ${+CI} )) {
|
||||
if (( _log_group )) {
|
||||
print "::endgroup::"
|
||||
typeset -g _log_group=0
|
||||
}
|
||||
if (( # )) {
|
||||
print "::group::${@}"
|
||||
typeset -g _log_group=1
|
||||
}
|
||||
} else {
|
||||
if (( # )) log_info ${@}
|
||||
}
|
||||
7
build-aux/.functions/log_info
Normal file
7
build-aux/.functions/log_info
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
if (( ! ${+_loglevel} )) typeset -g _loglevel=1
|
||||
|
||||
if (( _loglevel > 0 )) {
|
||||
local icon=' =>'
|
||||
|
||||
print -PR "%F{4} ${(r:5:)icon}%f %B${@}%b"
|
||||
}
|
||||
7
build-aux/.functions/log_output
Normal file
7
build-aux/.functions/log_output
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
if (( ! ${+_loglevel} )) typeset -g _loglevel=1
|
||||
|
||||
if (( _loglevel > 0 )) {
|
||||
local icon=''
|
||||
|
||||
print -PR " ${(r:5:)icon} ${@}"
|
||||
}
|
||||
7
build-aux/.functions/log_status
Normal file
7
build-aux/.functions/log_status
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
if (( ! ${+_loglevel} )) typeset -g _loglevel=1
|
||||
|
||||
if (( _loglevel > 0 )) {
|
||||
local icon=' >'
|
||||
|
||||
print -PR "%F{2} ${(r:5:)icon}%f ${@}"
|
||||
}
|
||||
7
build-aux/.functions/log_warning
Normal file
7
build-aux/.functions/log_warning
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
if (( ! ${+_loglevel} )) typeset -g _loglevel=1
|
||||
|
||||
if (( _loglevel > 0 )) {
|
||||
local icon=' =>'
|
||||
|
||||
print -PR "${CI:+::warning::}%F{3} ${(r:5:)icon} ${@}%f"
|
||||
}
|
||||
17
build-aux/.functions/set_loglevel
Normal file
17
build-aux/.functions/set_loglevel
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
autoload -Uz log_debug log_error
|
||||
|
||||
local -r _usage="Usage: %B${0}%b <loglevel>
|
||||
|
||||
Set log level, following levels are supported: 0 (quiet), 1 (normal), 2 (verbose), 3 (debug)"
|
||||
|
||||
if (( ! # )); then
|
||||
log_error 'Called without arguments.'
|
||||
log_output ${_usage}
|
||||
return 2
|
||||
elif (( ${1} >= 4 )); then
|
||||
log_error 'Called with loglevel > 3.'
|
||||
log_output ${_usage}
|
||||
fi
|
||||
|
||||
typeset -g -i -r _loglevel=${1}
|
||||
log_debug "Log level set to '${1}'"
|
||||
197
build-aux/.run-format.zsh
Executable file
197
build-aux/.run-format.zsh
Executable file
|
|
@ -0,0 +1,197 @@
|
|||
#!/usr/bin/env zsh
|
||||
|
||||
builtin emulate -L zsh
|
||||
setopt EXTENDED_GLOB
|
||||
setopt PUSHD_SILENT
|
||||
setopt ERR_EXIT
|
||||
setopt ERR_RETURN
|
||||
setopt NO_UNSET
|
||||
setopt PIPE_FAIL
|
||||
setopt NO_AUTO_PUSHD
|
||||
setopt NO_PUSHD_IGNORE_DUPS
|
||||
setopt FUNCTION_ARGZERO
|
||||
|
||||
## Enable for script debugging
|
||||
# setopt WARN_CREATE_GLOBAL
|
||||
# setopt WARN_NESTED_VAR
|
||||
# setopt XTRACE
|
||||
|
||||
autoload -Uz is-at-least && if ! is-at-least 5.2; then
|
||||
print -u2 -PR "%F{1}${funcstack[1]##*/}:%f Running on Zsh version %B${ZSH_VERSION}%b, but Zsh %B5.2%b is the minimum supported version. Upgrade zsh to fix this issue."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
invoke_formatter() {
|
||||
if (( # < 1 )) {
|
||||
log_error "Usage invoke_formatter [formatter_name]"
|
||||
exit 2
|
||||
}
|
||||
|
||||
case ${1} {
|
||||
clang)
|
||||
if (( ${+commands[clang-format-16]} )) {
|
||||
local formatter=clang-format-16
|
||||
} elif (( ${+commands[clang-format]} )) {
|
||||
local formatter=clang-format
|
||||
local -a formatter_version=($(clang-format --version))
|
||||
|
||||
if ! is-at-least 16.0.5 ${formatter_version[-1]}; then
|
||||
log_error "clang-format is not version 16.0.5 or above (found ${formatter_version[-1]}."
|
||||
exit 2
|
||||
fi
|
||||
|
||||
if ! is-at-least ${formatter_version[-1]} 16.0.5; then
|
||||
log_error "clang-format is more recent than version 16.0.5 (found ${formatter_version[-1]})."
|
||||
exit 2
|
||||
fi
|
||||
} else {
|
||||
log_error "No viable clang-format version found (required 16.0.5)"
|
||||
exit 2
|
||||
}
|
||||
|
||||
local -a source_files=()
|
||||
for folder ("lib" "module" "plugins" "tests") {
|
||||
source_files+=(${folder}/**/*.(c|cpp|h|hpp)(.N))
|
||||
}
|
||||
|
||||
for file (${source_files}) {
|
||||
if [[ $file == *"catch.hpp" ]]; then
|
||||
source_files=("${source_files[@]/$file}")
|
||||
fi
|
||||
}
|
||||
|
||||
local -a format_args=(-style=file -fallback-style=none)
|
||||
if (( _loglevel > 2 )) format_args+=(--verbose)
|
||||
;;
|
||||
cmake)
|
||||
local formatter=cmake-format
|
||||
if (( ${+commands[cmake-format]} )) {
|
||||
local cmake_format_version=$(cmake-format --version)
|
||||
|
||||
if ! is-at-least 0.6.13 ${cmake_format_version}; then
|
||||
log_error "cmake-format is not version 0.6.13 or above (found ${cmake_format_version})."
|
||||
exit 2
|
||||
fi
|
||||
} else {
|
||||
log_error "No viable cmake-format version found (required 0.6.13)"
|
||||
exit 2
|
||||
}
|
||||
|
||||
local -a source_files=(**/(CMakeLists.txt|*.cmake)(.N))
|
||||
source_files=(${source_files:#(build_*)/*})
|
||||
|
||||
local -a format_args=()
|
||||
if (( _loglevel > 2 )) format_args+=(--log-level debug)
|
||||
;;
|
||||
swift)
|
||||
local formatter=swift-format
|
||||
if (( ${+commands[swift-format]} )) {
|
||||
local swift_format_version=$(swift-format --version)
|
||||
|
||||
if ! is-at-least 508.0.0 ${swift_format_version}; then
|
||||
log_error "swift-format is not version 508.0.0 or above (found ${swift_format_version})."
|
||||
exit 2
|
||||
fi
|
||||
} else {
|
||||
log_error "No viable swift-format version found (required 508.0.0)"
|
||||
exit 2
|
||||
}
|
||||
|
||||
local -a source_files=(**/*.swift(.N))
|
||||
|
||||
local -a format_args=()
|
||||
;;
|
||||
*) log_error "Invalid formatter specified: ${1}. Valid options are clang-format, cmake-format, and swift-format."; exit 2 ;;
|
||||
}
|
||||
|
||||
local file
|
||||
local -i num_failures=0
|
||||
if (( check_only )) {
|
||||
for file (${source_files}) {
|
||||
if (( _loglevel > 1 )) log_info "Checking format of ${file}..."
|
||||
|
||||
if ! "${formatter}" ${format_args} "${file}" | diff -q "${file}" - &> /dev/null; then
|
||||
log_error "${file} requires formatting changes."
|
||||
|
||||
if (( fail_on_error == 2 )) return 2;
|
||||
num_failures=$(( num_failures + 1 ))
|
||||
else
|
||||
if (( _loglevel > 1 )) log_status "${file} requires no formatting changes."
|
||||
fi
|
||||
}
|
||||
if (( fail_on_error && num_failures )) return 2;
|
||||
} elif (( ${#source_files} )) {
|
||||
format_args+=(-i)
|
||||
"${formatter}" ${format_args} ${source_files}
|
||||
}
|
||||
}
|
||||
|
||||
run_format() {
|
||||
if (( ! ${+SCRIPT_HOME} )) typeset -g SCRIPT_HOME=${ZSH_ARGZERO:A:h}
|
||||
if (( ! ${+FORMATTER_NAME} )) typeset -g FORMATTER_NAME=${${(s:-:)ZSH_ARGZERO:t:r}[2]}
|
||||
|
||||
typeset -g host_os=${${(L)$(uname -s)}//darwin/macos}
|
||||
local -i fail_on_error=0
|
||||
local -i check_only=0
|
||||
local -i verbosity=1
|
||||
local -r _version='1.0.0'
|
||||
|
||||
fpath=("${SCRIPT_HOME}/.functions" ${fpath})
|
||||
autoload -Uz log_info log_error log_output set_loglevel log_status log_warning
|
||||
|
||||
local -r _usage="
|
||||
Usage: %B${functrace[1]%:*}%b <option>
|
||||
|
||||
%BOptions%b:
|
||||
|
||||
%F{yellow} Formatting options%f
|
||||
-----------------------------------------------------------------------------
|
||||
%B-c | --check%b Check only, no actual formatting takes place
|
||||
|
||||
%F{yellow} Output options%f
|
||||
-----------------------------------------------------------------------------
|
||||
%B-v | --verbose%b Verbose (more detailed output)
|
||||
%B--fail-[never|error] Fail script never/on formatting change - default: %B%F{green}never%f%b
|
||||
%B--debug%b Debug (very detailed and added output)
|
||||
|
||||
%F{yellow} General options%f
|
||||
-----------------------------------------------------------------------------
|
||||
%B-h | --help%b Print this usage help
|
||||
%B-V | --version%b Print script version information"
|
||||
|
||||
local -a args
|
||||
while (( # )) {
|
||||
case ${1} {
|
||||
--)
|
||||
shift
|
||||
args+=($@)
|
||||
break
|
||||
;;
|
||||
-c|--check) check_only=1; shift ;;
|
||||
-v|--verbose) (( _verbosity += 1 )); shift ;;
|
||||
-h|--help) log_output ${_usage}; exit 0 ;;
|
||||
-V|--version) print -Pr "${_version}"; exit 0 ;;
|
||||
--debug) verbosity=3; shift ;;
|
||||
--fail-never)
|
||||
fail_on_error=0
|
||||
shift
|
||||
;;
|
||||
--fail-error)
|
||||
fail_on_error=1
|
||||
shift
|
||||
;;
|
||||
--fail-fast)
|
||||
fail_on_error=2
|
||||
shift
|
||||
;;
|
||||
*) log_error "Unknown option: %B${1}%b"; log_output ${_usage}; exit 2 ;;
|
||||
}
|
||||
}
|
||||
|
||||
set -- ${(@)args}
|
||||
set_loglevel ${verbosity}
|
||||
|
||||
invoke_formatter ${FORMATTER_NAME}
|
||||
}
|
||||
|
||||
run_format ${@}
|
||||
168
build-aux/CI/check-locale.py
Normal file
168
build-aux/CI/check-locale.py
Normal file
|
|
@ -0,0 +1,168 @@
|
|||
#!/usr/bin/env python3
|
||||
|
||||
import argparse
|
||||
import os
|
||||
import re
|
||||
import sys
|
||||
|
||||
defaultLocaleFile = "en-US.ini"
|
||||
commentChars = ";#"
|
||||
|
||||
|
||||
class localeEntry:
|
||||
locale = ""
|
||||
widgetPlaceholders = []
|
||||
qStringArgs = []
|
||||
lineNum = -1
|
||||
|
||||
def __init__(self, locale, widgetPlaceholders, qStringArgs, lineNum) -> None:
|
||||
self.locale = locale
|
||||
self.widgetPlaceholders = widgetPlaceholders
|
||||
self.qStringArgs = qStringArgs
|
||||
self.lineNum = lineNum
|
||||
|
||||
|
||||
def isCommentLine(line):
|
||||
for char in commentChars:
|
||||
if line.startswith(char):
|
||||
return True
|
||||
return False
|
||||
|
||||
|
||||
def getNonDefaultLocales(dir):
|
||||
files = []
|
||||
for filename in os.listdir(dir):
|
||||
f = os.path.join(dir, filename)
|
||||
if os.path.isfile(f) and not f.endswith(defaultLocaleFile):
|
||||
files.append(f)
|
||||
|
||||
return files
|
||||
|
||||
|
||||
def getAllLocaleEntries(file):
|
||||
localeEntries = []
|
||||
with open(file, "r", encoding="UTF-8") as f:
|
||||
for lineNum, line in enumerate(f):
|
||||
widgetPlaceholders = []
|
||||
qStringArgs = []
|
||||
|
||||
if isCommentLine(line):
|
||||
continue
|
||||
|
||||
for word in line.split("{{"):
|
||||
if not "}}" in word:
|
||||
continue
|
||||
placeholder = "{{" + word[: word.rfind("}}")] + "}}"
|
||||
widgetPlaceholders.append(placeholder)
|
||||
|
||||
for match in re.finditer(r"%\d+", line):
|
||||
qStringArgs.append(match.group(0))
|
||||
|
||||
localeEntries.append(
|
||||
localeEntry(
|
||||
line.split("=")[0], widgetPlaceholders, qStringArgs, lineNum + 1
|
||||
)
|
||||
)
|
||||
|
||||
return localeEntries
|
||||
|
||||
|
||||
def getLocaleEntryFrom(entry, list):
|
||||
for element in list:
|
||||
if element.locale == entry.locale:
|
||||
return element
|
||||
|
||||
return None
|
||||
|
||||
|
||||
def checkLocaleEntries(file, expectedLocaleEntries):
|
||||
localeEntries = getAllLocaleEntries(file)
|
||||
result = True
|
||||
|
||||
for localeEntry in localeEntries:
|
||||
expectedLocaleEntry = getLocaleEntryFrom(localeEntry, expectedLocaleEntries)
|
||||
|
||||
if expectedLocaleEntry is None:
|
||||
result = False
|
||||
print(
|
||||
'ERROR: Locale entry "{}" from "{}:{}" not found in "{}"'.format(
|
||||
localeEntry.locale, file, localeEntry.lineNum, defaultLocaleFile
|
||||
)
|
||||
)
|
||||
continue
|
||||
|
||||
for placeholder in localeEntry.widgetPlaceholders:
|
||||
if placeholder not in expectedLocaleEntry.widgetPlaceholders:
|
||||
result = False
|
||||
print(
|
||||
'ERROR: Locale entry "{}" from "{}:{}" does contain "{}" widget placeholder while "{}:{}" does not'.format(
|
||||
localeEntry.locale,
|
||||
file,
|
||||
localeEntry.lineNum,
|
||||
placeholder,
|
||||
defaultLocaleFile,
|
||||
expectedLocaleEntry.lineNum,
|
||||
)
|
||||
)
|
||||
|
||||
for placeholder in expectedLocaleEntry.widgetPlaceholders:
|
||||
if placeholder not in localeEntry.widgetPlaceholders:
|
||||
result = False
|
||||
print(
|
||||
'ERROR: Locale entry "{}" from "{}:{}" does not contain "{}" widget placeholder'.format(
|
||||
localeEntry.locale, file, localeEntry.lineNum, placeholder
|
||||
)
|
||||
)
|
||||
|
||||
for arg in localeEntry.qStringArgs:
|
||||
if arg not in expectedLocaleEntry.qStringArgs:
|
||||
result = False
|
||||
print(
|
||||
'ERROR: Locale entry "{}" from "{}:{}" does contain "{}" QString arg while "{}:{}" does not'.format(
|
||||
localeEntry.locale,
|
||||
file,
|
||||
localeEntry.lineNum,
|
||||
arg,
|
||||
defaultLocaleFile,
|
||||
expectedLocaleEntry.lineNum,
|
||||
)
|
||||
)
|
||||
|
||||
for arg in expectedLocaleEntry.qStringArgs:
|
||||
if arg not in localeEntry.qStringArgs:
|
||||
result = False
|
||||
print(
|
||||
'ERROR: Locale entry "{}" from "{}:{}" does not contain "{}" QString arg'.format(
|
||||
localeEntry.locale, file, localeEntry.lineNum, arg
|
||||
)
|
||||
)
|
||||
|
||||
return result
|
||||
|
||||
|
||||
def main():
|
||||
parser = argparse.ArgumentParser(
|
||||
description="Checks for inconsistencies regarding widget placeholders in the different locale files."
|
||||
)
|
||||
parser.add_argument("-p", "--path", help="Path to locale folder", required=True)
|
||||
args = parser.parse_args()
|
||||
|
||||
defaultLocaleEntries = getAllLocaleEntries(
|
||||
os.path.join(args.path, defaultLocaleFile)
|
||||
)
|
||||
nonDefaultLocales = getNonDefaultLocales(args.path)
|
||||
|
||||
result = True
|
||||
for file in nonDefaultLocales:
|
||||
if checkLocaleEntries(file, defaultLocaleEntries) == False:
|
||||
result = False
|
||||
|
||||
if result == False:
|
||||
sys.exit(1)
|
||||
|
||||
print("SUCCESS: No issues found!")
|
||||
sys.exit(0)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
5
build-aux/CI/linux/debian/changelog
Normal file
5
build-aux/CI/linux/debian/changelog
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
obs-scene-switcher (0.1+testonly) focal; urgency=medium
|
||||
|
||||
* Initial release (Closes: #123456)
|
||||
|
||||
-- Joao Eriberto Mota Filho <eriberto@debian.org> Fri, 03 Sep 2021 11:39:52 -0300
|
||||
22
build-aux/CI/linux/debian/control
Normal file
22
build-aux/CI/linux/debian/control
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
Source: obs-scene-switcher
|
||||
Section: video
|
||||
Priority: optional
|
||||
Maintainer: Joao Eriberto Mota Filho <eriberto@debian.org>
|
||||
Build-Depends: cmake,
|
||||
debhelper-compat (= 12),
|
||||
libcurl4-openssl-dev,
|
||||
libobs-dev,
|
||||
libxtst-dev,
|
||||
qt6-base-dev,
|
||||
libxss-dev,
|
||||
libopencv-dev
|
||||
Standards-Version: 4.6.0
|
||||
Homepage: https://obsproject.com/forum/resources/advanced-scene-switcher.395/
|
||||
Rules-Requires-Root: no
|
||||
|
||||
Package: obs-scene-switcher
|
||||
Architecture: any
|
||||
Depends: ${misc:Depends}, ${shlibs:Depends}
|
||||
Description: automated scene switcher for OBS Studio (plugin)
|
||||
Advanced Scene Switcher is based on the built in scene switcher. It extends
|
||||
its functionality by adding several features.
|
||||
60
build-aux/CI/linux/debian/copyright
Normal file
60
build-aux/CI/linux/debian/copyright
Normal file
|
|
@ -0,0 +1,60 @@
|
|||
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
|
||||
Upstream-Name: SceneSwitcher
|
||||
Upstream-Contact: https://github.com/WarmUpTill/SceneSwitcher/issues
|
||||
Source: https://github.com/WarmUpTill/SceneSwitcher
|
||||
|
||||
Files: *
|
||||
Copyright: 2016-2021 WarmUpTill <WarmUpTill@web.de>
|
||||
License: GPL-2
|
||||
|
||||
Files: cmake/GetGitRevisionDescription.cmake
|
||||
cmake/GetGitRevisionDescription.cmake.in
|
||||
Copyright: 2009-2013 Iowa State University
|
||||
2013-2020 Contributors
|
||||
2013-2020 Ryan Pavlik
|
||||
License: BSL-1.0
|
||||
|
||||
Files: debian/*
|
||||
Copyright: 2021 Joao Eriberto Mota Filho <eriberto@debian.org>
|
||||
License: BSL-1.0
|
||||
|
||||
License: GPL-2
|
||||
This package is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; version 2.
|
||||
.
|
||||
This package is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
.
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>
|
||||
.
|
||||
On Debian systems, the complete text of the GNU General
|
||||
Public License version 2 can be found in "/usr/share/common-licenses/GPL-2".
|
||||
|
||||
License: BSL-1.0
|
||||
Boost Software License - Version 1.0 - August 17th, 2003
|
||||
.
|
||||
Permission is hereby granted, free of charge, to any person or organization
|
||||
obtaining a copy of the software and accompanying documentation covered by
|
||||
this license (the "Software") to use, reproduce, display, distribute,
|
||||
execute, and transmit the Software, and to prepare derivative works of the
|
||||
Software, and to permit third-parties to whom the Software is furnished to
|
||||
do so, all subject to the following:
|
||||
.
|
||||
The copyright notices in the Software and this entire statement, including
|
||||
the above license grant, this restriction and the following disclaimer,
|
||||
must be included in all copies of the Software, in whole or in part, and
|
||||
all derivative works of the Software, unless such copies or derivative
|
||||
works are solely in the form of machine-executable object code generated by
|
||||
a source language processor.
|
||||
.
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
|
||||
SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
|
||||
FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
|
||||
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
DEALINGS IN THE SOFTWARE.
|
||||
16
build-aux/CI/linux/debian/rules
Normal file
16
build-aux/CI/linux/debian/rules
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
#!/usr/bin/make -f
|
||||
#export DH_VERBOSE = 1
|
||||
|
||||
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
|
||||
|
||||
export QT_SELECT = qt6
|
||||
|
||||
%:
|
||||
dh $@
|
||||
|
||||
|
||||
dh_auto_configure -- -DBUILD_OUT_OF_TREE=1 \
|
||||
-DLIBOBS_INCLUDE_DIR=/usr/include/obs \
|
||||
-DLIBOBS_LIB=/usr/lib/${DEB_TARGET_MULTIARCH}/libobs.so \
|
||||
-DLIBOBS_FRONTEND_INCLUDE_DIR=/usr/include/obs \
|
||||
-DLIBOBS_FRONTEND_API_LIB=/usr/lib/${DEB_TARGET_MULTIARCH}/libobs-frontend-api.so
|
||||
1
build-aux/CI/linux/debian/source/format
Normal file
1
build-aux/CI/linux/debian/source/format
Normal file
|
|
@ -0,0 +1 @@
|
|||
3.0 (native)
|
||||
126
build-aux/CI/linux/demote-deps.sh
Executable file
126
build-aux/CI/linux/demote-deps.sh
Executable file
|
|
@ -0,0 +1,126 @@
|
|||
#!/usr/bin/env bash
|
||||
# Usage: demote_deps.sh <in.deb> [Recommends|Suggests] [regex]
|
||||
# Example: demote_deps.sh build/advanced-scene-switcher_1.31.0_amd64.deb Recommends 'opencv'
|
||||
set -euo pipefail
|
||||
|
||||
if [[ $# -lt 1 ]]; then
|
||||
echo "Usage: $0 <in.deb> [Recommends|Suggests] [regex]" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
IN_DEB="$1"
|
||||
DEST_FIELD="${2:-Recommends}" # Recommends or Suggests
|
||||
MATCH_REGEX="${3:-opencv}" # regex to match packages to demote
|
||||
|
||||
echo "Demoting dependencies matching '${MATCH_REGEX}' to ${DEST_FIELD}"
|
||||
|
||||
TMPDIR="$(mktemp -d)"
|
||||
trap 'rm -rf "$TMPDIR"' EXIT
|
||||
|
||||
dpkg-deb -R "$IN_DEB" "$TMPDIR"
|
||||
CONTROL="$TMPDIR/DEBIAN/control"
|
||||
|
||||
# Read a field (single line value), handling continuation lines starting with a space.
|
||||
get_field() {
|
||||
local key="$1"
|
||||
awk -v key="$key" '
|
||||
BEGIN { val=""; collecting=0 }
|
||||
$0 ~ "^" key ":" {
|
||||
collecting=1
|
||||
sub("^" key ":[[:space:]]*", "", $0)
|
||||
val=$0
|
||||
next
|
||||
}
|
||||
collecting==1 {
|
||||
if ($0 ~ "^[[:space:]]") {
|
||||
sub("^[[:space:]]+", "", $0)
|
||||
val = val " " $0
|
||||
next
|
||||
} else {
|
||||
collecting=0
|
||||
}
|
||||
}
|
||||
END { print val }
|
||||
' "$CONTROL"
|
||||
}
|
||||
|
||||
# Split a comma-separated list into lines, trimming whitespace
|
||||
split_csv() {
|
||||
tr ',' '\n' | sed -E 's/^[[:space:]]+//; s/[[:space:]]+$//' | sed '/^$/d'
|
||||
}
|
||||
|
||||
# Join with ", "
|
||||
join_csv() {
|
||||
awk 'BEGIN{first=1}{ if(!first) printf(", "); printf("%s",$0); first=0 } END{print ""}'
|
||||
}
|
||||
|
||||
# Deduplicate while preserving order
|
||||
dedup() {
|
||||
awk '!seen[$0]++'
|
||||
}
|
||||
|
||||
DEPENDS_VAL="$(get_field Depends)"
|
||||
EXIST_DEST_VAL="$(get_field "$DEST_FIELD")"
|
||||
|
||||
# Separate opencv-matching vs the rest (preserve tokens exactly)
|
||||
mapfile -t DEPENDS_ARR < <(printf "%s\n" "$DEPENDS_VAL" | split_csv)
|
||||
declare -a MOVED=()
|
||||
declare -a KEPT=()
|
||||
for item in "${DEPENDS_ARR[@]}"; do
|
||||
# Skip empty just in case
|
||||
[[ -z "$item" ]] && continue
|
||||
if [[ "$item" =~ $MATCH_REGEX ]]; then
|
||||
MOVED+=("$item")
|
||||
else
|
||||
KEPT+=("$item")
|
||||
fi
|
||||
done
|
||||
|
||||
# Merge with existing dest field
|
||||
if [[ -n "$EXIST_DEST_VAL" ]]; then
|
||||
mapfile -t EXIST_DEST_ARR < <(printf "%s\n" "$EXIST_DEST_VAL" | split_csv)
|
||||
MOVED+=("${EXIST_DEST_ARR[@]}")
|
||||
fi
|
||||
|
||||
# De-duplicate
|
||||
mapfile -t MOVED < <(printf "%s\n" "${MOVED[@]:-}" | sed '/^$/d' | dedup)
|
||||
mapfile -t KEPT < <(printf "%s\n" "${KEPT[@]:-}" | sed '/^$/d' | dedup)
|
||||
|
||||
# Rebuild values
|
||||
NEW_DEPENDS="$(printf "%s\n" "${KEPT[@]:-}" | join_csv || true)"
|
||||
NEW_DEST="$(printf "%s\n" "${MOVED[@]:-}" | join_csv || true)"
|
||||
|
||||
# Write a cleaned control (remove existing Depends/Recommends/Suggests incl. continuations)
|
||||
awk '
|
||||
BEGIN { skip=0 }
|
||||
{
|
||||
if ($0 ~ "^(Depends|Recommends|Suggests):") { skip=1; next }
|
||||
if (skip==1) {
|
||||
if ($0 ~ "^[[:space:]]") { next } else { skip=0 }
|
||||
}
|
||||
print
|
||||
}
|
||||
' "$CONTROL" > "$CONTROL.clean"
|
||||
|
||||
# Append the rebuilt fields
|
||||
{
|
||||
cat "$CONTROL.clean"
|
||||
if [[ -n "$NEW_DEPENDS" ]]; then
|
||||
echo "Depends: $NEW_DEPENDS"
|
||||
fi
|
||||
if [[ -n "$NEW_DEST" ]]; then
|
||||
echo "$DEST_FIELD: $NEW_DEST"
|
||||
fi
|
||||
} > "$CONTROL.new"
|
||||
|
||||
# Clean up empty lines
|
||||
sed -i '/^[[:space:]]*$/d' "$CONTROL.new"
|
||||
|
||||
mv "$CONTROL.new" "$CONTROL"
|
||||
rm -f "$CONTROL.clean"
|
||||
|
||||
# Repack
|
||||
rm -f "${IN_DEB}"
|
||||
OUT_DEB="${IN_DEB}"
|
||||
dpkg-deb -b "$TMPDIR" "$OUT_DEB" >/dev/null
|
||||
echo "$OUT_DEB"
|
||||
1
build-aux/run-clang-format
Symbolic link
1
build-aux/run-clang-format
Symbolic link
|
|
@ -0,0 +1 @@
|
|||
.run-format.zsh
|
||||
1
build-aux/run-cmake-format
Symbolic link
1
build-aux/run-cmake-format
Symbolic link
|
|
@ -0,0 +1 @@
|
|||
.run-format.zsh
|
||||
1
build-aux/run-swift-format
Symbolic link
1
build-aux/run-swift-format
Symbolic link
|
|
@ -0,0 +1 @@
|
|||
.run-format.zsh
|
||||
48
buildspec.json
Normal file
48
buildspec.json
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
{
|
||||
"dependencies": {
|
||||
"obs-studio": {
|
||||
"version": "31.1.1",
|
||||
"baseUrl": "https://github.com/obsproject/obs-studio/archive/refs/tags",
|
||||
"label": "OBS sources",
|
||||
"hashes": {
|
||||
"macos": "39751f067bacc13d44b116c5138491b5f1391f91516d3d590d874edd21292291",
|
||||
"windows-x64": "2c8427c10b55ac6d68008df2e9a3e82f4647aaad18f105e30d4713c2de678ccf"
|
||||
}
|
||||
},
|
||||
"prebuilt": {
|
||||
"version": "2025-07-11",
|
||||
"baseUrl": "https://github.com/obsproject/obs-deps/releases/download",
|
||||
"label": "Pre-Built obs-deps",
|
||||
"hashes": {
|
||||
"macos": "495687e63383d1a287684b6e2e9bfe246bb8f156fe265926afb1a325af1edd2a",
|
||||
"windows-x64": "c8c642c1070dc31ce9a0f1e4cef5bb992f4bff4882255788b5da12129e85caa7"
|
||||
}
|
||||
},
|
||||
"qt6": {
|
||||
"version": "2025-07-11",
|
||||
"baseUrl": "https://github.com/obsproject/obs-deps/releases/download",
|
||||
"label": "Pre-Built Qt6",
|
||||
"hashes": {
|
||||
"macos": "d3f5f04b6ea486e032530bdf0187cbda9a54e0a49621a4c8ba984c5023998867",
|
||||
"windows-x64": "0e76bf0555dd5382838850b748d3dcfab44a1e1058441309ab54e1a65b156d0a"
|
||||
},
|
||||
"debugSymbols": {
|
||||
"windows-x64": "11b7be92cf66a273299b8f3515c07a5cfb61614b59a4e67f7fc5ecba5e2bdf21"
|
||||
}
|
||||
}
|
||||
},
|
||||
"platformConfig": {
|
||||
"macos": {
|
||||
"bundleId": "com.warmuptill.advanced-scene-switcher"
|
||||
}
|
||||
},
|
||||
"name": "advanced-scene-switcher",
|
||||
"displayName": "Advanced Scene Switcher",
|
||||
"version": "1.0.0",
|
||||
"author": "WarmUpTill",
|
||||
"website": "https://github.com/WarmUpTill/SceneSwitcher",
|
||||
"email": "noone@nothing.com",
|
||||
"uuids": {
|
||||
"windowsApp": "A4ADDF26-4426-4D2E-B26A-C7C878DA8FC9"
|
||||
}
|
||||
}
|
||||
349
cmake/common/advss_helpers.cmake
Normal file
349
cmake/common/advss_helpers.cmake
Normal file
|
|
@ -0,0 +1,349 @@
|
|||
# --- Helper functions ---#
|
||||
|
||||
if(BUILD_OUT_OF_TREE)
|
||||
if(OS_WINDOWS)
|
||||
set(OBS_PLUGIN_DESTINATION "obs-plugins/64bit")
|
||||
else()
|
||||
set(OBS_PLUGIN_DESTINATION "${CMAKE_INSTALL_LIBDIR}/obs-plugins")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# --- MACOS section ---
|
||||
if(OS_MACOS)
|
||||
set(ADVSS_BUNDLE_DIR "advanced-scene-switcher.plugin")
|
||||
set(ADVSS_BUNDLE_MODULE_DIR "${ADVSS_BUNDLE_DIR}/Contents/MacOS")
|
||||
set(ADVSS_BUNDLE_PLUGIN_DIR ${ADVSS_BUNDLE_MODULE_DIR}/${ADVSS_PLUGIN_FOLDER})
|
||||
|
||||
function(install_advss_lib_helper target where)
|
||||
install(
|
||||
TARGETS ${target}
|
||||
RUNTIME DESTINATION "${where}" COMPONENT advss_plugins
|
||||
LIBRARY DESTINATION "${where}" COMPONENT advss_plugins
|
||||
FRAMEWORK DESTINATION "${where}" COMPONENT advss_plugins)
|
||||
endfunction()
|
||||
|
||||
function(install_advss_lib target)
|
||||
install_advss_lib_helper(${target} "${ADVSS_BUNDLE_MODULE_DIR}")
|
||||
|
||||
# Tell the advanced scene switcher plugin where to find the lib
|
||||
string(JSON _name GET ${buildspec} name)
|
||||
add_custom_command(
|
||||
TARGET ${_name}
|
||||
POST_BUILD
|
||||
COMMAND
|
||||
${CMAKE_INSTALL_NAME_TOOL} -change @rpath/$<TARGET_FILE_NAME:${target}>
|
||||
@loader_path/$<TARGET_FILE_NAME:${target}> $<TARGET_FILE:${_name}>)
|
||||
endfunction()
|
||||
|
||||
function(install_advss_plugin target)
|
||||
install_advss_lib_helper(${target} "${ADVSS_BUNDLE_PLUGIN_DIR}")
|
||||
endfunction()
|
||||
|
||||
function(install_advss_plugin_dependency_target target dep)
|
||||
install(
|
||||
IMPORTED_RUNTIME_ARTIFACTS
|
||||
${dep}
|
||||
RUNTIME
|
||||
DESTINATION
|
||||
"${ADVSS_BUNDLE_PLUGIN_DIR}"
|
||||
COMPONENT
|
||||
${dep}_Runtime
|
||||
LIBRARY
|
||||
DESTINATION
|
||||
"${ADVSS_BUNDLE_PLUGIN_DIR}"
|
||||
COMPONENT
|
||||
${dep}_Runtime
|
||||
NAMELINK_COMPONENT
|
||||
${dep}_Development)
|
||||
endfunction()
|
||||
|
||||
function(install_advss_plugin_dependency_file target dep)
|
||||
get_filename_component(_FILENAME ${dep} NAME)
|
||||
string(REGEX REPLACE "\\.[^.]*$" "" _FILENAMENOEXT ${_FILENAME})
|
||||
set(_DEP_NAME "${target}-${_FILENAMENOEXT}")
|
||||
|
||||
install(
|
||||
FILES "${dep}"
|
||||
DESTINATION "${ADVSS_BUNDLE_PLUGIN_DIR}"
|
||||
COMPONENT ${_DEP_NAME}_Runtime
|
||||
DESTINATION "${ADVSS_BUNDLE_PLUGIN_DIR}"
|
||||
COMPONENT ${_DEP_NAME}_Runtime
|
||||
NAMELINK_COMPONENT ${_DEP_NAME}_Development)
|
||||
|
||||
install(
|
||||
FILES "${dep}"
|
||||
DESTINATION "${ADVSS_BUNDLE_PLUGIN_DIR}"
|
||||
COMPONENT obs_${_DEP_NAME}
|
||||
EXCLUDE_FROM_ALL
|
||||
DESTINATION "${ADVSS_BUNDLE_PLUGIN_DIR}"
|
||||
COMPONENT obs_${_DEP_NAME}
|
||||
EXCLUDE_FROM_ALL)
|
||||
|
||||
add_custom_command(
|
||||
TARGET ${target}
|
||||
POST_BUILD
|
||||
COMMAND
|
||||
"${CMAKE_COMMAND}" --install ${CMAKE_CURRENT_BINARY_DIR} --config
|
||||
$<CONFIG> --prefix ${CMAKE_INSTALL_PREFIX} --component obs_${_DEP_NAME}
|
||||
COMMENT "Installing ${_DEP_NAME} to OBS rundir\n"
|
||||
VERBATIM)
|
||||
endfunction()
|
||||
|
||||
# --- End of section ---
|
||||
else()
|
||||
# --- Windows / Linux section ---
|
||||
function(plugin_install_helper what where where_deb)
|
||||
if(DEB_INSTALL)
|
||||
if(NOT LIB_OUT_DIR)
|
||||
set(LIB_OUT_DIR "/lib/obs-plugins")
|
||||
endif()
|
||||
install(
|
||||
TARGETS ${what}
|
||||
LIBRARY DESTINATION ${CMAKE_INSTALL_PREFIX}/${LIB_OUT_DIR}/${where_deb})
|
||||
else()
|
||||
install(
|
||||
TARGETS ${what}
|
||||
LIBRARY DESTINATION "${where}"
|
||||
COMPONENT ${what}_Runtime
|
||||
NAMELINK_COMPONENT ${what}_Development
|
||||
RUNTIME DESTINATION "${where}")
|
||||
install(
|
||||
FILES $<TARGET_FILE:${what}>
|
||||
DESTINATION $<CONFIG>/${where}
|
||||
COMPONENT ${what}_rundir
|
||||
EXCLUDE_FROM_ALL)
|
||||
endif()
|
||||
if(OS_WINDOWS)
|
||||
install(
|
||||
FILES $<TARGET_PDB_FILE:${what}>
|
||||
CONFIGURATIONS "RelWithDebInfo" "Debug"
|
||||
DESTINATION ${where}
|
||||
COMPONENT ${what}_Runtime
|
||||
OPTIONAL)
|
||||
install(
|
||||
FILES $<TARGET_PDB_FILE:${what}>
|
||||
CONFIGURATIONS "RelWithDebInfo" "Debug"
|
||||
DESTINATION $<CONFIG>/${where}
|
||||
COMPONENT ${what}_rundir
|
||||
OPTIONAL EXCLUDE_FROM_ALL)
|
||||
endif()
|
||||
if(OBS_OUTPUT_DIR)
|
||||
add_custom_command(
|
||||
TARGET ${what}
|
||||
POST_BUILD
|
||||
COMMAND
|
||||
"${CMAKE_COMMAND}" -DCMAKE_INSTALL_PREFIX=${OBS_OUTPUT_DIR}
|
||||
-DCMAKE_INSTALL_COMPONENT=${what}_rundir
|
||||
-DCMAKE_INSTALL_CONFIG_NAME=$<CONFIG> -P
|
||||
${CMAKE_CURRENT_BINARY_DIR}/cmake_install.cmake
|
||||
COMMENT
|
||||
"Installing ${what} to plugin rundir ${OBS_OUTPUT_DIR}/${where}\n"
|
||||
VERBATIM)
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
function(install_advss_lib target)
|
||||
plugin_install_helper("${target}" "${OBS_PLUGIN_DESTINATION}" "")
|
||||
if(NOT OS_WINDOWS)
|
||||
set_target_properties(${target} PROPERTIES INSTALL_RPATH "$ORIGIN")
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
function(install_advss_plugin target)
|
||||
plugin_install_helper(
|
||||
"${target}" "${OBS_PLUGIN_DESTINATION}/${ADVSS_PLUGIN_FOLDER}"
|
||||
"${ADVSS_PLUGIN_FOLDER}")
|
||||
if(NOT OS_WINDOWS)
|
||||
set_target_properties(${target} PROPERTIES INSTALL_RPATH
|
||||
"$ORIGIN:$ORIGIN/..")
|
||||
endif()
|
||||
message(STATUS "ADVSS: ENABLED PLUGIN ${target}")
|
||||
endfunction()
|
||||
|
||||
function(install_advss_plugin_dependency_target target dep)
|
||||
install(
|
||||
IMPORTED_RUNTIME_ARTIFACTS
|
||||
${dep}
|
||||
RUNTIME
|
||||
DESTINATION
|
||||
"${OBS_PLUGIN_DESTINATION}/${ADVSS_PLUGIN_FOLDER}"
|
||||
COMPONENT
|
||||
${dep}_Runtime
|
||||
LIBRARY
|
||||
DESTINATION
|
||||
"${OBS_PLUGIN_DESTINATION}/${ADVSS_PLUGIN_FOLDER}"
|
||||
COMPONENT
|
||||
${dep}_Runtime
|
||||
NAMELINK_COMPONENT
|
||||
${dep}_Development)
|
||||
|
||||
install(
|
||||
IMPORTED_RUNTIME_ARTIFACTS
|
||||
${dep}
|
||||
RUNTIME
|
||||
DESTINATION
|
||||
"${OBS_PLUGIN_DESTINATION}/${ADVSS_PLUGIN_FOLDER}"
|
||||
COMPONENT
|
||||
obs_${dep}
|
||||
EXCLUDE_FROM_ALL
|
||||
LIBRARY
|
||||
DESTINATION
|
||||
"${OBS_PLUGIN_DESTINATION}/${ADVSS_PLUGIN_FOLDER}"
|
||||
COMPONENT
|
||||
obs_${dep}
|
||||
EXCLUDE_FROM_ALL)
|
||||
|
||||
add_custom_command(
|
||||
TARGET ${target}
|
||||
POST_BUILD
|
||||
COMMAND
|
||||
"${CMAKE_COMMAND}" --install .. --config $<CONFIG> --prefix
|
||||
${OBS_OUTPUT_DIR}/$<CONFIG> --component obs_${dep} >
|
||||
"$<IF:$<PLATFORM_ID:Windows>,nul,/dev/null>"
|
||||
COMMENT "Installing ${dep} to OBS rundir\n"
|
||||
VERBATIM)
|
||||
endfunction()
|
||||
|
||||
function(install_advss_plugin_dependency_file target dep)
|
||||
get_filename_component(_FILENAME ${dep} NAME)
|
||||
string(REGEX REPLACE "\\.[^.]*$" "" _FILENAMENOEXT ${_FILENAME})
|
||||
set(_DEP_NAME "${target}-${_FILENAMENOEXT}")
|
||||
|
||||
install(
|
||||
FILES "${dep}"
|
||||
DESTINATION "${OBS_PLUGIN_DESTINATION}/${ADVSS_PLUGIN_FOLDER}"
|
||||
COMPONENT ${_DEP_NAME}_Runtime
|
||||
DESTINATION "${OBS_PLUGIN_DESTINATION}/${ADVSS_PLUGIN_FOLDER}"
|
||||
COMPONENT ${_DEP_NAME}_Runtime
|
||||
NAMELINK_COMPONENT ${_DEP_NAME}_Development)
|
||||
|
||||
install(
|
||||
FILES "${dep}"
|
||||
DESTINATION "${OBS_PLUGIN_DESTINATION}/${ADVSS_PLUGIN_FOLDER}"
|
||||
COMPONENT obs_${_DEP_NAME}
|
||||
EXCLUDE_FROM_ALL
|
||||
DESTINATION "${OBS_PLUGIN_DESTINATION}/${ADVSS_PLUGIN_FOLDER}"
|
||||
COMPONENT obs_${_DEP_NAME}
|
||||
EXCLUDE_FROM_ALL)
|
||||
|
||||
add_custom_command(
|
||||
TARGET ${target}
|
||||
POST_BUILD
|
||||
COMMAND
|
||||
"${CMAKE_COMMAND}" --install .. --config $<CONFIG> --prefix
|
||||
${OBS_OUTPUT_DIR}/$<CONFIG> --component obs_${_DEP_NAME} >
|
||||
"$<IF:$<PLATFORM_ID:Windows>,nul,/dev/null>"
|
||||
COMMENT "Installing ${_DEP_NAME} to OBS rundir\n"
|
||||
VERBATIM)
|
||||
endfunction()
|
||||
endif()
|
||||
|
||||
# --- End of section ---
|
||||
function(setup_obs_lib_dependency target)
|
||||
if(BUILD_OUT_OF_TREE)
|
||||
find_package(libobs)
|
||||
if(libobs_FOUND AND NOT LIBOBS_LIB)
|
||||
target_link_libraries(${target} PUBLIC OBS::libobs)
|
||||
else()
|
||||
if(NOT LIBOBS_LIB)
|
||||
message(FATAL_ERROR "obs library not found - please set LIBOBS_LIB")
|
||||
endif()
|
||||
target_link_libraries(${target} PUBLIC ${LIBOBS_LIB})
|
||||
if(NOT LIBOBS_INCLUDE_DIR)
|
||||
message(
|
||||
FATAL_ERROR "obs.hpp header not found - please set LIBOBS_INCLUDE_DIR"
|
||||
)
|
||||
endif()
|
||||
target_include_directories(${target} PRIVATE ${LIBOBS_INCLUDE_DIR})
|
||||
endif()
|
||||
find_package(obs-frontend-api)
|
||||
if(obs-frontend-api_FOUND AND NOT LIBOBS_FRONTEND_API_LIB)
|
||||
target_link_libraries(${target} PUBLIC OBS::obs-frontend-api)
|
||||
else()
|
||||
if(NOT LIBOBS_FRONTEND_API_LIB)
|
||||
message(
|
||||
FATAL_ERROR
|
||||
"libobs frontend-api library not found - please set LIBOBS_FRONTEND_API_LIB"
|
||||
)
|
||||
endif()
|
||||
target_link_libraries(${target} PUBLIC ${LIBOBS_FRONTEND_API_LIB})
|
||||
if(NOT LIBOBS_FRONTEND_INCLUDE_DIR)
|
||||
message(
|
||||
FATAL_ERROR
|
||||
" obs-frontend-api.h not found - please set LIBOBS_FRONTEND_INCLUDE_DIR"
|
||||
)
|
||||
endif()
|
||||
target_include_directories(${target}
|
||||
PRIVATE ${LIBOBS_FRONTEND_INCLUDE_DIR})
|
||||
endif()
|
||||
else()
|
||||
target_link_libraries(${target} PUBLIC OBS::libobs OBS::frontend-api)
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
function(setup_advss_plugin target)
|
||||
setup_obs_lib_dependency(${target})
|
||||
find_package(Qt6 REQUIRED COMPONENTS Widgets Core)
|
||||
target_link_libraries(${target} PRIVATE Qt6::Core Qt6::Widgets)
|
||||
|
||||
# Ignore QCheckBox::stateChanged deprecation warning until minimum supported
|
||||
# Qt version is at least Qt 6.7, which introduces QCheckBox::checkStateChanged
|
||||
if(Qt6_VERSION VERSION_GREATER "6.7.0")
|
||||
target_compile_definitions(${target} PRIVATE QT_NO_DEPRECATED_WARNINGS)
|
||||
endif()
|
||||
|
||||
set_target_properties(
|
||||
${target}
|
||||
PROPERTIES AUTOMOC ON
|
||||
AUTOUIC ON
|
||||
AUTORCC ON)
|
||||
|
||||
target_compile_features(${target} PUBLIC cxx_std_17)
|
||||
set_target_properties(${target} PROPERTIES CXX_VISIBILITY_PRESET hidden)
|
||||
|
||||
target_link_libraries(${target} PRIVATE advanced-scene-switcher-lib)
|
||||
|
||||
get_target_property(ADVSS_SOURCE_DIR advanced-scene-switcher-lib SOURCE_DIR)
|
||||
get_target_property(ADVSS_BINARY_DIR advanced-scene-switcher-lib BINARY_DIR)
|
||||
|
||||
if(OS_MACOS)
|
||||
set(_COMMAND
|
||||
"${CMAKE_INSTALL_NAME_TOOL} -add_rpath @loader_path \\\"$<TARGET_FILE:${target}>\\\""
|
||||
)
|
||||
install(CODE "execute_process(COMMAND /bin/sh -c \"${_COMMAND}\")")
|
||||
endif()
|
||||
|
||||
# Set up include directories for headers generated by Qt
|
||||
target_include_directories(
|
||||
${target}
|
||||
PRIVATE "${ADVSS_BINARY_DIR}/advanced-scene-switcher-lib_autogen/include")
|
||||
foreach(_CONF Release RelWithDebInfo Debug MinSizeRe)
|
||||
target_include_directories(
|
||||
${target}
|
||||
PRIVATE
|
||||
"${ADVSS_BINARY_DIR}/advanced-scene-switcher-lib_autogen/include_${_CONF}"
|
||||
)
|
||||
endforeach()
|
||||
|
||||
# General includes
|
||||
target_include_directories(
|
||||
${target}
|
||||
PRIVATE "${ADVSS_SOURCE_DIR}/lib" "${ADVSS_SOURCE_DIR}/lib/legacy"
|
||||
"${ADVSS_SOURCE_DIR}/lib/macro" "${ADVSS_SOURCE_DIR}/lib/utils"
|
||||
"${ADVSS_SOURCE_DIR}/lib/variables" "${ADVSS_SOURCE_DIR}/forms")
|
||||
endfunction()
|
||||
|
||||
function(install_advss_plugin_dependency)
|
||||
cmake_parse_arguments(PARSED_ARGS "" "TARGET" "DEPENDENCIES" ${ARGN})
|
||||
if(NOT PARSED_ARGS_TARGET)
|
||||
message(FATAL_ERROR "You must provide a target")
|
||||
endif()
|
||||
foreach(_DEPENDENCY ${PARSED_ARGS_DEPENDENCIES})
|
||||
if(EXISTS ${_DEPENDENCY})
|
||||
install_advss_plugin_dependency_file(${PARSED_ARGS_TARGET} ${_DEPENDENCY})
|
||||
else()
|
||||
install_advss_plugin_dependency_target(${PARSED_ARGS_TARGET}
|
||||
${_DEPENDENCY})
|
||||
endif()
|
||||
endforeach()
|
||||
endfunction()
|
||||
83
cmake/common/bootstrap.cmake
Normal file
83
cmake/common/bootstrap.cmake
Normal file
|
|
@ -0,0 +1,83 @@
|
|||
cmake_minimum_required(VERSION 3.16...3.26)
|
||||
|
||||
include_guard(GLOBAL)
|
||||
|
||||
# Enable automatic PUSH and POP of policies to parent scope
|
||||
if(POLICY CMP0011)
|
||||
cmake_policy(SET CMP0011 NEW)
|
||||
endif()
|
||||
|
||||
# Enable distinction between Clang and AppleClang
|
||||
if(POLICY CMP0025)
|
||||
cmake_policy(SET CMP0025 NEW)
|
||||
endif()
|
||||
|
||||
# Enable strict checking of "break()" usage
|
||||
if(POLICY CMP0055)
|
||||
cmake_policy(SET CMP0055 NEW)
|
||||
endif()
|
||||
|
||||
# Honor visibility presets for all target types (executable, shared, module,
|
||||
# static)
|
||||
if(POLICY CMP0063)
|
||||
cmake_policy(SET CMP0063 NEW)
|
||||
endif()
|
||||
|
||||
# Disable export function calls to populate package registry by default
|
||||
if(POLICY CMP0090)
|
||||
cmake_policy(SET CMP0090 NEW)
|
||||
endif()
|
||||
|
||||
# Prohibit in-source builds
|
||||
if("${CMAKE_CURRENT_BINARY_DIR}" STREQUAL "${CMAKE_CURRENT_SOURCE_DIR}")
|
||||
message(
|
||||
FATAL_ERROR
|
||||
"In-source builds are not supported. "
|
||||
"Specify a build directory via 'cmake -S <SOURCE DIRECTORY> -B <BUILD_DIRECTORY>' instead."
|
||||
)
|
||||
file(REMOVE_RECURSE "${CMAKE_CURRENT_SOURCE_DIR}/CMakeCache.txt"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/CMakeFiles")
|
||||
endif()
|
||||
|
||||
# Use folders for source file organization with IDE generators (Visual
|
||||
# Studio/Xcode)
|
||||
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
|
||||
|
||||
# Add common module directories to default search path
|
||||
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/common")
|
||||
|
||||
file(READ "${CMAKE_CURRENT_SOURCE_DIR}/buildspec.json" buildspec)
|
||||
|
||||
# cmake-format: off
|
||||
string(JSON _name GET ${buildspec} name)
|
||||
string(JSON _website GET ${buildspec} website)
|
||||
string(JSON _author GET ${buildspec} author)
|
||||
string(JSON _email GET ${buildspec} email)
|
||||
string(JSON _version GET ${buildspec} version)
|
||||
string(JSON _bundleId GET ${buildspec} platformConfig macos bundleId)
|
||||
string(JSON _windowsAppUUID GET ${buildspec} uuids windowsApp)
|
||||
# cmake-format: on
|
||||
|
||||
set(PLUGIN_AUTHOR ${_author})
|
||||
set(PLUGIN_WEBSITE ${_website})
|
||||
set(PLUGIN_EMAIL ${_email})
|
||||
set(PLUGIN_VERSION ${_version})
|
||||
set(MACOS_BUNDLEID ${_bundleId})
|
||||
|
||||
include(buildnumber)
|
||||
include(osconfig)
|
||||
|
||||
# Allow selection of common build types via UI
|
||||
if(NOT CMAKE_BUILD_TYPE)
|
||||
set(CMAKE_BUILD_TYPE
|
||||
"RelWithDebInfo"
|
||||
CACHE STRING
|
||||
"OBS build type [Release, RelWithDebInfo, Debug, MinSizeRel]" FORCE)
|
||||
set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS Release RelWithDebInfo
|
||||
Debug MinSizeRel)
|
||||
endif()
|
||||
|
||||
# Disable exports automatically going into the CMake package registry
|
||||
set(CMAKE_EXPORT_PACKAGE_REGISTRY FALSE)
|
||||
# Enable default inclusion of targets' source and binary directory
|
||||
set(CMAKE_INCLUDE_CURRENT_DIR TRUE)
|
||||
27
cmake/common/buildnumber.cmake
Normal file
27
cmake/common/buildnumber.cmake
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
# CMake build number module
|
||||
|
||||
include_guard(GLOBAL)
|
||||
|
||||
# Define build number cache file
|
||||
set(_BUILD_NUMBER_CACHE
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/cmake/.CMakeBuildNumber"
|
||||
CACHE INTERNAL "OBS build number cache file")
|
||||
|
||||
# Read build number from cache file or manual override
|
||||
if(NOT DEFINED PLUGIN_BUILD_NUMBER AND EXISTS "${_BUILD_NUMBER_CACHE}")
|
||||
file(READ "${_BUILD_NUMBER_CACHE}" PLUGIN_BUILD_NUMBER)
|
||||
math(EXPR PLUGIN_BUILD_NUMBER "${PLUGIN_BUILD_NUMBER}+1")
|
||||
elseif(NOT DEFINED PLUGIN_BUILD_NUMBER)
|
||||
if($ENV{CI})
|
||||
if($ENV{GITHUB_RUN_ID})
|
||||
set(PLUGIN_BUILD_NUMBER "$ENV{GITHUB_RUN_ID}")
|
||||
elseif($ENV{GITLAB_RUN_ID})
|
||||
set(PLUGIN_BUILD_NUMBER "$ENV{GITLAB_RUN_ID}")
|
||||
else()
|
||||
set(PLUGIN_BUILD_NUMBER "1")
|
||||
endif()
|
||||
else()
|
||||
set(PLUGIN_BUILD_NUMBER "1")
|
||||
endif()
|
||||
endif()
|
||||
file(WRITE "${_BUILD_NUMBER_CACHE}" "${PLUGIN_BUILD_NUMBER}")
|
||||
257
cmake/common/buildspec_common.cmake
Normal file
257
cmake/common/buildspec_common.cmake
Normal file
|
|
@ -0,0 +1,257 @@
|
|||
# Common build dependencies module
|
||||
|
||||
# cmake-format: off
|
||||
# cmake-lint: disable=C0103
|
||||
# cmake-lint: disable=E1126
|
||||
# cmake-lint: disable=R0912
|
||||
# cmake-lint: disable=R0915
|
||||
# cmake-format: on
|
||||
|
||||
include_guard(GLOBAL)
|
||||
|
||||
# _check_deps_version: Checks for obs-deps VERSION file in prefix paths
|
||||
function(_check_deps_version version)
|
||||
# cmake-format: off
|
||||
set(found FALSE PARENT_SCOPE)
|
||||
# cmake-format: on
|
||||
|
||||
foreach(path IN LISTS CMAKE_PREFIX_PATH)
|
||||
if(EXISTS "${path}/share/obs-deps/VERSION")
|
||||
if(dependency STREQUAL qt6 AND NOT EXISTS
|
||||
"${path}/lib/cmake/Qt6/Qt6Config.cmake")
|
||||
# cmake-format: off
|
||||
set(found FALSE PARENT_SCOPE)
|
||||
# cmake-format: on
|
||||
continue()
|
||||
endif()
|
||||
|
||||
file(READ "${path}/share/obs-deps/VERSION" _check_version)
|
||||
string(REPLACE "\n" "" _check_version "${_check_version}")
|
||||
string(REPLACE "-" "." _check_version "${_check_version}")
|
||||
string(REPLACE "-" "." version "${version}")
|
||||
|
||||
if(_check_version VERSION_EQUAL version)
|
||||
# cmake-format: off
|
||||
set(found TRUE PARENT_SCOPE)
|
||||
# cmake-format: on
|
||||
break()
|
||||
elseif(_check_version VERSION_LESS version)
|
||||
message(AUTHOR_WARNING "Older ${label} version detected in ${path}: \n"
|
||||
"Found ${_check_version}, require ${version}")
|
||||
list(REMOVE_ITEM CMAKE_PREFIX_PATH "${path}")
|
||||
list(APPEND CMAKE_PREFIX_PATH "${path}")
|
||||
# cmake-format: off
|
||||
set(CMAKE_PREFIX_PATH ${CMAKE_PREFIX_PATH} PARENT_SCOPE)
|
||||
# cmake-format: on
|
||||
continue()
|
||||
else()
|
||||
message(AUTHOR_WARNING "Newer ${label} version detected in ${path}: \n"
|
||||
"Found ${_check_version}, require ${version}")
|
||||
# cmake-format: off
|
||||
set(found TRUE PARENT_SCOPE)
|
||||
# cmake-format: on
|
||||
break()
|
||||
endif()
|
||||
endif()
|
||||
endforeach()
|
||||
endfunction()
|
||||
|
||||
# _setup_obs_studio: Create obs-studio build project, then build libobs and
|
||||
# obs-frontend-api
|
||||
function(_setup_obs_studio)
|
||||
if(NOT libobs_DIR)
|
||||
set(_is_fresh --fresh)
|
||||
endif()
|
||||
|
||||
if(OS_WINDOWS)
|
||||
set(_cmake_generator "${CMAKE_GENERATOR}")
|
||||
set(_cmake_arch
|
||||
"-A ${arch},version=${CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION}")
|
||||
set(_cmake_extra
|
||||
"-DCMAKE_SYSTEM_VERSION=${CMAKE_SYSTEM_VERSION} -DCMAKE_ENABLE_SCRIPTING=OFF"
|
||||
)
|
||||
elseif(OS_MACOS)
|
||||
set(_cmake_generator "Xcode")
|
||||
set(_cmake_arch "-DCMAKE_OSX_ARCHITECTURES:STRING='arm64;x86_64'")
|
||||
set(_cmake_extra
|
||||
"-DCMAKE_OSX_DEPLOYMENT_TARGET=${CMAKE_OSX_DEPLOYMENT_TARGET}")
|
||||
endif()
|
||||
|
||||
message(STATUS "Configure ${label} (${arch})")
|
||||
execute_process(
|
||||
COMMAND
|
||||
"${CMAKE_COMMAND}" -S "${dependencies_dir}/${_obs_destination}" -B
|
||||
"${dependencies_dir}/${_obs_destination}/build_${arch}" -G
|
||||
${_cmake_generator} "${_cmake_arch}" -DOBS_CMAKE_VERSION:STRING=3.0.0
|
||||
-DENABLE_PLUGINS:BOOL=OFF -DENABLE_FRONTEND:BOOL=OFF
|
||||
-DOBS_VERSION_OVERRIDE:STRING=${_obs_version}
|
||||
"-DCMAKE_PREFIX_PATH='${CMAKE_PREFIX_PATH}'" ${_is_fresh} ${_cmake_extra}
|
||||
RESULT_VARIABLE _process_result COMMAND_ERROR_IS_FATAL ANY
|
||||
OUTPUT_QUIET)
|
||||
message(STATUS "Configure ${label} (${arch}) - done")
|
||||
|
||||
message(STATUS "Build ${label} (Debug - ${arch})")
|
||||
execute_process(
|
||||
COMMAND "${CMAKE_COMMAND}" --build build_${arch} --target obs-frontend-api
|
||||
--config Debug --parallel
|
||||
WORKING_DIRECTORY "${dependencies_dir}/${_obs_destination}"
|
||||
RESULT_VARIABLE _process_result COMMAND_ERROR_IS_FATAL ANY
|
||||
OUTPUT_QUIET)
|
||||
message(STATUS "Build ${label} (Debug - ${arch}) - done")
|
||||
|
||||
message(STATUS "Build ${label} (Release - ${arch})")
|
||||
execute_process(
|
||||
COMMAND "${CMAKE_COMMAND}" --build build_${arch} --target obs-frontend-api
|
||||
--config Release --parallel
|
||||
WORKING_DIRECTORY "${dependencies_dir}/${_obs_destination}"
|
||||
RESULT_VARIABLE _process_result COMMAND_ERROR_IS_FATAL ANY
|
||||
OUTPUT_QUIET)
|
||||
message(STATUS "Build ${label} (Reelase - ${arch}) - done")
|
||||
|
||||
message(STATUS "Install ${label} (${arch})")
|
||||
execute_process(
|
||||
COMMAND "${CMAKE_COMMAND}" --install build_${arch} --component Development
|
||||
--config Debug --prefix "${dependencies_dir}"
|
||||
WORKING_DIRECTORY "${dependencies_dir}/${_obs_destination}"
|
||||
RESULT_VARIABLE _process_result COMMAND_ERROR_IS_FATAL ANY
|
||||
OUTPUT_QUIET)
|
||||
execute_process(
|
||||
COMMAND "${CMAKE_COMMAND}" --install build_${arch} --component Development
|
||||
--config Release --prefix "${dependencies_dir}"
|
||||
WORKING_DIRECTORY "${dependencies_dir}/${_obs_destination}"
|
||||
RESULT_VARIABLE _process_result COMMAND_ERROR_IS_FATAL ANY
|
||||
OUTPUT_QUIET)
|
||||
message(STATUS "Install ${label} (${arch}) - done")
|
||||
endfunction()
|
||||
|
||||
# _check_dependencies: Fetch and extract pre-built OBS build dependencies
|
||||
function(_check_dependencies)
|
||||
if(NOT buildspec)
|
||||
file(READ "${CMAKE_CURRENT_SOURCE_DIR}/buildspec.json" buildspec)
|
||||
endif()
|
||||
|
||||
# cmake-format: off
|
||||
string(JSON dependency_data GET ${buildspec} dependencies)
|
||||
# cmake-format: on
|
||||
|
||||
foreach(dependency IN LISTS dependencies_list)
|
||||
# cmake-format: off
|
||||
string(JSON data GET ${dependency_data} ${dependency})
|
||||
string(JSON version GET ${data} version)
|
||||
string(JSON hash GET ${data} hashes ${platform})
|
||||
string(JSON url GET ${data} baseUrl)
|
||||
string(JSON label GET ${data} label)
|
||||
string(JSON revision ERROR_VARIABLE error GET ${data} revision ${platform})
|
||||
# cmake-format: on
|
||||
|
||||
message(STATUS "Setting up ${label} (${arch})")
|
||||
|
||||
set(file "${${dependency}_filename}")
|
||||
set(destination "${${dependency}_destination}")
|
||||
string(REPLACE "VERSION" "${version}" file "${file}")
|
||||
string(REPLACE "VERSION" "${version}" destination "${destination}")
|
||||
string(REPLACE "ARCH" "${arch}" file "${file}")
|
||||
string(REPLACE "ARCH" "${arch}" destination "${destination}")
|
||||
if(revision)
|
||||
string(REPLACE "_REVISION" "_v${revision}" file "${file}")
|
||||
string(REPLACE "-REVISION" "-v${revision}" file "${file}")
|
||||
else()
|
||||
string(REPLACE "_REVISION" "" file "${file}")
|
||||
string(REPLACE "-REVISION" "" file "${file}")
|
||||
endif()
|
||||
|
||||
set(skip FALSE)
|
||||
if(dependency STREQUAL prebuilt OR dependency STREQUAL qt6)
|
||||
_check_deps_version(${version})
|
||||
|
||||
if(found)
|
||||
set(skip TRUE)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(skip)
|
||||
message(STATUS "Setting up ${label} (${arch}) - skipped")
|
||||
continue()
|
||||
endif()
|
||||
|
||||
if(dependency STREQUAL obs-studio)
|
||||
set(url ${url}/${file})
|
||||
else()
|
||||
set(url ${url}/${version}/${file})
|
||||
endif()
|
||||
|
||||
set(MAX_DOWNLOAD_RETRIES 3)
|
||||
set(RETRY_DELAY 60) # seconds
|
||||
|
||||
if(NOT EXISTS "${dependencies_dir}/${file}")
|
||||
message(STATUS "Downloading ${url}")
|
||||
|
||||
set(download_success FALSE)
|
||||
|
||||
foreach(i RANGE 1 ${MAX_DOWNLOAD_RETRIES})
|
||||
message(STATUS "Attempt ${i}/${MAX_DOWNLOAD_RETRIES} for ${url}")
|
||||
|
||||
file(
|
||||
DOWNLOAD "${url}" "${dependencies_dir}/${file}"
|
||||
STATUS download_status
|
||||
EXPECTED_HASH SHA256=${hash})
|
||||
|
||||
list(GET download_status 0 error_code)
|
||||
list(GET download_status 1 error_message)
|
||||
|
||||
if(error_code EQUAL 0)
|
||||
message(STATUS "Downloading ${url} - success on attempt ${i}")
|
||||
set(download_success TRUE)
|
||||
break()
|
||||
else()
|
||||
message(WARNING "Download failed (attempt ${i}): ${error_message}")
|
||||
file(REMOVE "${dependencies_dir}/${file}")
|
||||
|
||||
if(NOT i EQUAL MAX_DOWNLOAD_RETRIES)
|
||||
message(STATUS "Retrying in ${RETRY_DELAY} seconds...")
|
||||
execute_process(COMMAND ${CMAKE_COMMAND} -E sleep ${RETRY_DELAY})
|
||||
endif()
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
if(NOT download_success)
|
||||
message(
|
||||
FATAL_ERROR
|
||||
"Unable to download ${url} after ${MAX_DOWNLOAD_RETRIES} attempts")
|
||||
endif()
|
||||
message(STATUS "Downloading ${url} - done")
|
||||
endif()
|
||||
|
||||
if(NOT EXISTS "${dependencies_dir}/${destination}")
|
||||
file(MAKE_DIRECTORY "${dependencies_dir}/${destination}")
|
||||
if(dependency STREQUAL obs-studio)
|
||||
file(ARCHIVE_EXTRACT INPUT "${dependencies_dir}/${file}" DESTINATION
|
||||
"${dependencies_dir}")
|
||||
else()
|
||||
file(ARCHIVE_EXTRACT INPUT "${dependencies_dir}/${file}" DESTINATION
|
||||
"${dependencies_dir}/${destination}")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(dependency STREQUAL prebuilt)
|
||||
list(APPEND CMAKE_PREFIX_PATH "${dependencies_dir}/${destination}")
|
||||
elseif(dependency STREQUAL qt6)
|
||||
list(APPEND CMAKE_PREFIX_PATH "${dependencies_dir}/${destination}")
|
||||
elseif(dependency STREQUAL obs-studio)
|
||||
set(_obs_version ${version})
|
||||
set(_obs_destination "${destination}")
|
||||
list(APPEND CMAKE_PREFIX_PATH "${dependencies_dir}")
|
||||
|
||||
endif()
|
||||
|
||||
message(STATUS "Setting up ${label} (${arch}) - done")
|
||||
endforeach()
|
||||
|
||||
list(REMOVE_DUPLICATES CMAKE_PREFIX_PATH)
|
||||
|
||||
# cmake-format: off
|
||||
set(CMAKE_PREFIX_PATH ${CMAKE_PREFIX_PATH} CACHE PATH "CMake prefix search path" FORCE)
|
||||
# cmake-format: on
|
||||
|
||||
_setup_obs_studio()
|
||||
endfunction()
|
||||
22
cmake/common/ccache.cmake
Normal file
22
cmake/common/ccache.cmake
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
# CMake ccache module
|
||||
|
||||
include_guard(GLOBAL)
|
||||
|
||||
if(NOT DEFINED CCACHE_PROGRAM)
|
||||
message(DEBUG "Trying to find ccache on build host...")
|
||||
find_program(CCACHE_PROGRAM "ccache")
|
||||
mark_as_advanced(CCACHE_PROGRAM)
|
||||
endif()
|
||||
|
||||
if(CCACHE_PROGRAM)
|
||||
message(DEBUG "Ccache found as ${CCACHE_PROGRAM}...")
|
||||
option(ENABLE_CCACHE "Enable compiler acceleration with ccache" ON)
|
||||
|
||||
if(ENABLE_CCACHE)
|
||||
set(CMAKE_C_COMPILER_LAUNCHER "${CCACHE_PROGRAM}")
|
||||
set(CMAKE_CXX_COMPILER_LAUNCHER "${CCACHE_PROGRAM}")
|
||||
set(CMAKE_OBJC_COMPILER_LAUNCHER "${CCACHE_PROGRAM}")
|
||||
set(CMAKE_OBJCXX_COMPILER_LAUNCHER "${CCACHE_PROGRAM}")
|
||||
set(CMAKE_CUDA_COMPILER_LAUNCHER "${CCACHE_PROGRAM}")
|
||||
endif()
|
||||
endif()
|
||||
87
cmake/common/compiler_common.cmake
Normal file
87
cmake/common/compiler_common.cmake
Normal file
|
|
@ -0,0 +1,87 @@
|
|||
# CMake common compiler options module
|
||||
|
||||
include_guard(GLOBAL)
|
||||
|
||||
# Set C and C++ language standards to C17 and C++17
|
||||
if(CMAKE_VERSION VERSION_GREATER_EQUAL 3.21)
|
||||
set(CMAKE_C_STANDARD 17)
|
||||
else()
|
||||
set(CMAKE_C_STANDARD 11)
|
||||
endif()
|
||||
set(CMAKE_C_STANDARD_REQUIRED TRUE)
|
||||
set(CMAKE_CXX_STANDARD 17)
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED TRUE)
|
||||
|
||||
# Set symbols to be hidden by default for C and C++
|
||||
set(CMAKE_C_VISIBILITY_PRESET hidden)
|
||||
set(CMAKE_CXX_VISIBILITY_PRESET hidden)
|
||||
set(CMAKE_VISIBILITY_INLINES_HIDDEN TRUE)
|
||||
|
||||
# clang options for C
|
||||
set(_obs_clang_c_options
|
||||
# cmake-format: sortable
|
||||
-fno-strict-aliasing
|
||||
-Wbool-conversion
|
||||
-Wcomma
|
||||
-Wconstant-conversion
|
||||
-Wdeprecated-declarations
|
||||
-Wempty-body
|
||||
-Wenum-conversion
|
||||
-Werror=return-type
|
||||
-Wextra
|
||||
-Wformat
|
||||
-Wformat-security
|
||||
-Wfour-char-constants
|
||||
-Winfinite-recursion
|
||||
-Wint-conversion
|
||||
-Wnewline-eof
|
||||
-Wno-conversion
|
||||
-Wno-float-conversion
|
||||
-Wno-implicit-fallthrough
|
||||
-Wno-missing-braces
|
||||
-Wno-missing-field-initializers
|
||||
-Wno-missing-prototypes
|
||||
-Wno-semicolon-before-method-body
|
||||
-Wno-shadow
|
||||
-Wno-sign-conversion
|
||||
-Wno-strict-prototypes
|
||||
-Wno-trigraphs
|
||||
-Wno-unknown-pragmas
|
||||
-Wno-unused-function
|
||||
-Wno-unused-label
|
||||
-Wnon-literal-null-conversion
|
||||
-Wobjc-literal-conversion
|
||||
-Wparentheses
|
||||
-Wpointer-sign
|
||||
-Wquoted-include-in-framework-header
|
||||
-Wshadow
|
||||
-Wshorten-64-to-32
|
||||
-Wuninitialized
|
||||
-Wunreachable-code
|
||||
-Wunused-parameter
|
||||
-Wunused-value
|
||||
-Wunused-variable
|
||||
-Wvla)
|
||||
|
||||
# clang options for C++
|
||||
set(_obs_clang_cxx_options
|
||||
# cmake-format: sortable
|
||||
${_obs_clang_c_options}
|
||||
-Wconversion
|
||||
-Wdeprecated-implementations
|
||||
-Wduplicate-method-match
|
||||
-Wfloat-conversion
|
||||
-Wfour-char-constants
|
||||
-Wimplicit-retain-self
|
||||
-Winvalid-offsetof
|
||||
-Wmove
|
||||
-Wno-c++11-extensions
|
||||
-Wno-exit-time-destructors
|
||||
-Wno-implicit-atomic-properties
|
||||
-Wno-objc-interface-ivars
|
||||
-Wno-overloaded-virtual
|
||||
-Wrange-loop-analysis)
|
||||
|
||||
if(NOT DEFINED CMAKE_COMPILE_WARNING_AS_ERROR)
|
||||
set(CMAKE_COMPILE_WARNING_AS_ERROR ON)
|
||||
endif()
|
||||
269
cmake/common/get_git_revision_description.cmake
Normal file
269
cmake/common/get_git_revision_description.cmake
Normal file
|
|
@ -0,0 +1,269 @@
|
|||
# * Returns a version string from Git
|
||||
#
|
||||
# These functions force a re-configure on each git commit so that you can trust
|
||||
# the values of the variables in your build system.
|
||||
#
|
||||
# get_git_head_revision(<refspecvar> <hashvar> [<additional arguments to git
|
||||
# describe> ...])
|
||||
#
|
||||
# Returns the refspec and sha hash of the current head revision
|
||||
#
|
||||
# git_describe(<var> [<additional arguments to git describe> ...])
|
||||
#
|
||||
# Returns the results of git describe on the source tree, and adjusting the
|
||||
# output so that it tests false if an error occurs.
|
||||
#
|
||||
# git_describe_working_tree(<var> [<additional arguments to git describe> ...])
|
||||
#
|
||||
# Returns the results of git describe on the working tree (--dirty option), and
|
||||
# adjusting the output so that it tests false if an error occurs.
|
||||
#
|
||||
# git_get_exact_tag(<var> [<additional arguments to git describe> ...])
|
||||
#
|
||||
# Returns the results of git describe --exact-match on the source tree, and
|
||||
# adjusting the output so that it tests false if there was no exact matching
|
||||
# tag.
|
||||
#
|
||||
# git_local_changes(<var>)
|
||||
#
|
||||
# Returns either "CLEAN" or "DIRTY" with respect to uncommitted changes. Uses
|
||||
# the return code of "git diff-index --quiet HEAD --". Does not regard untracked
|
||||
# files.
|
||||
#
|
||||
# Requires CMake 2.6 or newer (uses the 'function' command)
|
||||
#
|
||||
# Original Author: 2009-2020 Ryan Pavlik <ryan.pavlik@gmail.com>
|
||||
# <abiryan@ryand.net> http://academic.cleardefinition.com
|
||||
#
|
||||
# Copyright 2009-2013, Iowa State University. Copyright 2013-2020, Ryan Pavlik
|
||||
# Copyright 2013-2020, Contributors SPDX-License-Identifier: BSL-1.0 Distributed
|
||||
# under the Boost Software License, Version 1.0. (See accompanying file
|
||||
# LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
if(__get_git_revision_description)
|
||||
return()
|
||||
endif()
|
||||
set(__get_git_revision_description YES)
|
||||
|
||||
# We must run the following at "include" time, not at function call time, to
|
||||
# find the path to this module rather than the path to a calling list file
|
||||
get_filename_component(_gitdescmoddir ${CMAKE_CURRENT_LIST_FILE} PATH)
|
||||
|
||||
# Function _git_find_closest_git_dir finds the next closest .git directory that
|
||||
# is part of any directory in the path defined by _start_dir. The result is
|
||||
# returned in the parent scope variable whose name is passed as variable
|
||||
# _git_dir_var. If no .git directory can be found, the function returns an empty
|
||||
# string via _git_dir_var.
|
||||
#
|
||||
# Example: Given a path C:/bla/foo/bar and assuming C:/bla/.git exists and
|
||||
# neither foo nor bar contain a file/directory .git. This wil return C:/bla/.git
|
||||
#
|
||||
function(_git_find_closest_git_dir _start_dir _git_dir_var)
|
||||
set(cur_dir "${_start_dir}")
|
||||
set(git_dir "${_start_dir}/.git")
|
||||
while(NOT EXISTS "${git_dir}")
|
||||
# .git dir not found, search parent directories
|
||||
set(git_previous_parent "${cur_dir}")
|
||||
get_filename_component(cur_dir "${cur_dir}" DIRECTORY)
|
||||
if(cur_dir STREQUAL git_previous_parent)
|
||||
# We have reached the root directory, we are not in git
|
||||
set(${_git_dir_var}
|
||||
""
|
||||
PARENT_SCOPE)
|
||||
return()
|
||||
endif()
|
||||
set(git_dir "${cur_dir}/.git")
|
||||
endwhile()
|
||||
set(${_git_dir_var}
|
||||
"${git_dir}"
|
||||
PARENT_SCOPE)
|
||||
endfunction()
|
||||
|
||||
function(get_git_head_revision _refspecvar _hashvar)
|
||||
_git_find_closest_git_dir("${CMAKE_CURRENT_SOURCE_DIR}" GIT_DIR)
|
||||
|
||||
if(NOT "${GIT_DIR}" STREQUAL "")
|
||||
file(RELATIVE_PATH _relative_to_source_dir "${CMAKE_SOURCE_DIR}"
|
||||
"${GIT_DIR}")
|
||||
if("${_relative_to_source_dir}" MATCHES "[.][.]")
|
||||
# We've gone above the CMake root dir.
|
||||
set(GIT_DIR "")
|
||||
endif()
|
||||
endif()
|
||||
if("${GIT_DIR}" STREQUAL "")
|
||||
set(${_refspecvar}
|
||||
"GITDIR-NOTFOUND"
|
||||
PARENT_SCOPE)
|
||||
set(${_hashvar}
|
||||
"GITDIR-NOTFOUND"
|
||||
PARENT_SCOPE)
|
||||
return()
|
||||
endif()
|
||||
|
||||
# Check if the current source dir is a git submodule or a worktree. In both
|
||||
# cases .git is a file instead of a directory.
|
||||
#
|
||||
if(NOT IS_DIRECTORY ${GIT_DIR})
|
||||
# The following git command will return a non empty string that points to
|
||||
# the super project working tree if the current source dir is inside a git
|
||||
# submodule. Otherwise the command will return an empty string.
|
||||
#
|
||||
execute_process(
|
||||
COMMAND "${GIT_EXECUTABLE}" rev-parse --show-superproject-working-tree
|
||||
WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
|
||||
OUTPUT_VARIABLE out
|
||||
ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
if(NOT "${out}" STREQUAL "")
|
||||
# If out is empty, GIT_DIR/CMAKE_CURRENT_SOURCE_DIR is in a submodule
|
||||
file(READ ${GIT_DIR} submodule)
|
||||
string(REGEX REPLACE "gitdir: (.*)$" "\\1" GIT_DIR_RELATIVE ${submodule})
|
||||
string(STRIP ${GIT_DIR_RELATIVE} GIT_DIR_RELATIVE)
|
||||
get_filename_component(SUBMODULE_DIR ${GIT_DIR} PATH)
|
||||
get_filename_component(GIT_DIR ${SUBMODULE_DIR}/${GIT_DIR_RELATIVE}
|
||||
ABSOLUTE)
|
||||
set(HEAD_SOURCE_FILE "${GIT_DIR}/HEAD")
|
||||
else()
|
||||
# GIT_DIR/CMAKE_CURRENT_SOURCE_DIR is in a worktree
|
||||
file(READ ${GIT_DIR} worktree_ref)
|
||||
# The .git directory contains a path to the worktree information directory
|
||||
# inside the parent git repo of the worktree.
|
||||
#
|
||||
string(REGEX REPLACE "gitdir: (.*)$" "\\1" git_worktree_dir
|
||||
${worktree_ref})
|
||||
string(STRIP ${git_worktree_dir} git_worktree_dir)
|
||||
_git_find_closest_git_dir("${git_worktree_dir}" GIT_DIR)
|
||||
set(HEAD_SOURCE_FILE "${git_worktree_dir}/HEAD")
|
||||
endif()
|
||||
else()
|
||||
set(HEAD_SOURCE_FILE "${GIT_DIR}/HEAD")
|
||||
endif()
|
||||
set(GIT_DATA "${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/git-data")
|
||||
if(NOT EXISTS "${GIT_DATA}")
|
||||
file(MAKE_DIRECTORY "${GIT_DATA}")
|
||||
endif()
|
||||
|
||||
if(NOT EXISTS "${HEAD_SOURCE_FILE}")
|
||||
return()
|
||||
endif()
|
||||
set(HEAD_FILE "${GIT_DATA}/HEAD")
|
||||
configure_file("${HEAD_SOURCE_FILE}" "${HEAD_FILE}" COPYONLY)
|
||||
|
||||
configure_file("${_gitdescmoddir}/get_git_revision_description.cmake.in"
|
||||
"${GIT_DATA}/grabRef.cmake" @ONLY)
|
||||
include("${GIT_DATA}/grabRef.cmake")
|
||||
|
||||
set(${_refspecvar}
|
||||
"${HEAD_REF}"
|
||||
PARENT_SCOPE)
|
||||
set(${_hashvar}
|
||||
"${HEAD_HASH}"
|
||||
PARENT_SCOPE)
|
||||
endfunction()
|
||||
|
||||
function(git_describe _var)
|
||||
if(NOT GIT_FOUND)
|
||||
find_package(Git QUIET)
|
||||
endif()
|
||||
get_git_head_revision(refspec hash)
|
||||
if(NOT GIT_FOUND)
|
||||
set(${_var}
|
||||
"GIT-NOTFOUND"
|
||||
PARENT_SCOPE)
|
||||
return()
|
||||
endif()
|
||||
if(NOT hash)
|
||||
set(${_var}
|
||||
"HEAD-HASH-NOTFOUND"
|
||||
PARENT_SCOPE)
|
||||
return()
|
||||
endif()
|
||||
|
||||
# TODO sanitize if((${ARGN}" MATCHES "&&") OR (ARGN MATCHES "||") OR (ARGN
|
||||
# MATCHES "\\;")) message("Please report the following error to the project!")
|
||||
# message(FATAL_ERROR "Looks like someone's doing something nefarious with
|
||||
# git_describe! Passed arguments ${ARGN}") endif()
|
||||
|
||||
# message(STATUS "Arguments to execute_process: ${ARGN}")
|
||||
|
||||
execute_process(
|
||||
COMMAND "${GIT_EXECUTABLE}" describe --tags --always ${hash} ${ARGN}
|
||||
WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
|
||||
RESULT_VARIABLE res
|
||||
OUTPUT_VARIABLE out
|
||||
ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
if(NOT res EQUAL 0)
|
||||
set(out "${out}-${res}-NOTFOUND")
|
||||
endif()
|
||||
|
||||
set(${_var}
|
||||
"${out}"
|
||||
PARENT_SCOPE)
|
||||
endfunction()
|
||||
|
||||
function(git_describe_working_tree _var)
|
||||
if(NOT GIT_FOUND)
|
||||
find_package(Git QUIET)
|
||||
endif()
|
||||
if(NOT GIT_FOUND)
|
||||
set(${_var}
|
||||
"GIT-NOTFOUND"
|
||||
PARENT_SCOPE)
|
||||
return()
|
||||
endif()
|
||||
|
||||
execute_process(
|
||||
COMMAND "${GIT_EXECUTABLE}" describe --dirty ${ARGN}
|
||||
WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
|
||||
RESULT_VARIABLE res
|
||||
OUTPUT_VARIABLE out
|
||||
ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
if(NOT res EQUAL 0)
|
||||
set(out "${out}-${res}-NOTFOUND")
|
||||
endif()
|
||||
|
||||
set(${_var}
|
||||
"${out}"
|
||||
PARENT_SCOPE)
|
||||
endfunction()
|
||||
|
||||
function(git_get_exact_tag _var)
|
||||
git_describe(out --exact-match ${ARGN})
|
||||
set(${_var}
|
||||
"${out}"
|
||||
PARENT_SCOPE)
|
||||
endfunction()
|
||||
|
||||
function(git_local_changes _var)
|
||||
if(NOT GIT_FOUND)
|
||||
find_package(Git QUIET)
|
||||
endif()
|
||||
get_git_head_revision(refspec hash)
|
||||
if(NOT GIT_FOUND)
|
||||
set(${_var}
|
||||
"GIT-NOTFOUND"
|
||||
PARENT_SCOPE)
|
||||
return()
|
||||
endif()
|
||||
if(NOT hash)
|
||||
set(${_var}
|
||||
"HEAD-HASH-NOTFOUND"
|
||||
PARENT_SCOPE)
|
||||
return()
|
||||
endif()
|
||||
|
||||
execute_process(
|
||||
COMMAND "${GIT_EXECUTABLE}" diff-index --quiet HEAD --
|
||||
WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
|
||||
RESULT_VARIABLE res
|
||||
OUTPUT_VARIABLE out
|
||||
ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
if(res EQUAL 0)
|
||||
set(${_var}
|
||||
"CLEAN"
|
||||
PARENT_SCOPE)
|
||||
else()
|
||||
set(${_var}
|
||||
"DIRTY"
|
||||
PARENT_SCOPE)
|
||||
endif()
|
||||
endfunction()
|
||||
41
cmake/common/get_git_revision_description.cmake.in
Normal file
41
cmake/common/get_git_revision_description.cmake.in
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
#
|
||||
# Internal file for get_git_revision_description.cmake.in
|
||||
#
|
||||
# Requires CMake 2.6 or newer (uses the 'function' command)
|
||||
#
|
||||
# Original Author:
|
||||
# 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net>
|
||||
# http://academic.cleardefinition.com
|
||||
# Iowa State University HCI Graduate Program/VRAC
|
||||
#
|
||||
# Copyright Iowa State University 2009-2010.
|
||||
# Distributed under the Boost Software License, Version 1.0.
|
||||
# (See accompanying file LICENSE_1_0.txt or copy at
|
||||
# http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
set(HEAD_HASH)
|
||||
|
||||
file(READ "@HEAD_FILE@" HEAD_CONTENTS LIMIT 1024)
|
||||
|
||||
string(STRIP "${HEAD_CONTENTS}" HEAD_CONTENTS)
|
||||
if(HEAD_CONTENTS MATCHES "ref")
|
||||
# named branch
|
||||
string(REPLACE "ref: " "" HEAD_REF "${HEAD_CONTENTS}")
|
||||
if(EXISTS "@GIT_DIR@/${HEAD_REF}")
|
||||
configure_file("@GIT_DIR@/${HEAD_REF}" "@GIT_DATA@/head-ref" COPYONLY)
|
||||
else()
|
||||
configure_file("@GIT_DIR@/packed-refs" "@GIT_DATA@/packed-refs" COPYONLY)
|
||||
file(READ "@GIT_DATA@/packed-refs" PACKED_REFS)
|
||||
if(${PACKED_REFS} MATCHES "([0-9a-z]*) ${HEAD_REF}")
|
||||
set(HEAD_HASH "${CMAKE_MATCH_1}")
|
||||
endif()
|
||||
endif()
|
||||
else()
|
||||
# detached HEAD
|
||||
configure_file("@GIT_DIR@/HEAD" "@GIT_DATA@/head-ref" COPYONLY)
|
||||
endif()
|
||||
|
||||
if(NOT HEAD_HASH)
|
||||
file(READ "@GIT_DATA@/head-ref" HEAD_HASH LIMIT 1024)
|
||||
string(STRIP "${HEAD_HASH}" HEAD_HASH)
|
||||
endif()
|
||||
70
cmake/common/helpers_common.cmake
Normal file
70
cmake/common/helpers_common.cmake
Normal file
|
|
@ -0,0 +1,70 @@
|
|||
# CMake common helper functions module
|
||||
|
||||
# cmake-format: off
|
||||
# cmake-lint: disable=C0103
|
||||
# cmake-format: on
|
||||
|
||||
include_guard(GLOBAL)
|
||||
|
||||
# * Use QT_VERSION value as a hint for desired Qt version
|
||||
# * If "AUTO" was specified, prefer Qt6 over Qt5
|
||||
# * Creates versionless targets of desired component if none had been created by
|
||||
# Qt itself (Qt versions < 5.15)
|
||||
if(NOT QT_VERSION)
|
||||
set(QT_VERSION
|
||||
AUTO
|
||||
CACHE STRING "OBS Qt version [AUTO, 5, 6]" FORCE)
|
||||
set_property(CACHE QT_VERSION PROPERTY STRINGS AUTO 5 6)
|
||||
endif()
|
||||
|
||||
# check_uuid: Helper function to check for valid UUID
|
||||
function(check_uuid uuid_string return_value)
|
||||
set(valid_uuid TRUE)
|
||||
set(uuid_token_lengths 8 4 4 4 12)
|
||||
set(token_num 0)
|
||||
|
||||
string(REPLACE "-" ";" uuid_tokens ${uuid_string})
|
||||
list(LENGTH uuid_tokens uuid_num_tokens)
|
||||
|
||||
if(uuid_num_tokens EQUAL 5)
|
||||
message(DEBUG "UUID ${uuid_string} is valid with 5 tokens.")
|
||||
foreach(uuid_token IN LISTS uuid_tokens)
|
||||
list(GET uuid_token_lengths ${token_num} uuid_target_length)
|
||||
string(LENGTH "${uuid_token}" uuid_actual_length)
|
||||
if(uuid_actual_length EQUAL uuid_target_length)
|
||||
string(REGEX MATCH "[0-9a-fA-F]+" uuid_hex_match ${uuid_token})
|
||||
if(NOT uuid_hex_match STREQUAL uuid_token)
|
||||
set(valid_uuid FALSE)
|
||||
break()
|
||||
endif()
|
||||
else()
|
||||
set(valid_uuid FALSE)
|
||||
break()
|
||||
endif()
|
||||
math(EXPR token_num "${token_num}+1")
|
||||
endforeach()
|
||||
else()
|
||||
set(valid_uuid FALSE)
|
||||
endif()
|
||||
message(DEBUG "UUID ${uuid_string} valid: ${valid_uuid}")
|
||||
set(${return_value}
|
||||
${valid_uuid}
|
||||
PARENT_SCOPE)
|
||||
endfunction()
|
||||
|
||||
if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/src/plugin-support.c.in")
|
||||
configure_file(src/plugin-support.c.in plugin-support.c @ONLY)
|
||||
add_library(plugin-support STATIC)
|
||||
target_sources(
|
||||
plugin-support
|
||||
PRIVATE plugin-support.c
|
||||
PUBLIC src/plugin-support.h)
|
||||
target_include_directories(plugin-support
|
||||
PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/src")
|
||||
if(OS_LINUX
|
||||
OR OS_FREEBSD
|
||||
OR OS_OPENBSD)
|
||||
# add fPIC on Linux to prevent shared object errors
|
||||
set_property(TARGET plugin-support PROPERTY POSITION_INDEPENDENT_CODE ON)
|
||||
endif()
|
||||
endif()
|
||||
23
cmake/common/osconfig.cmake
Normal file
23
cmake/common/osconfig.cmake
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
# CMake operating system bootstrap module
|
||||
|
||||
include_guard(GLOBAL)
|
||||
|
||||
# Set minimum CMake version specific to host operating system, add OS-specific
|
||||
# module directory to default search paths, and set helper variables for OS
|
||||
# detection in other CMake list files.
|
||||
if(CMAKE_HOST_SYSTEM_NAME STREQUAL "Windows")
|
||||
set(CMAKE_C_EXTENSIONS FALSE)
|
||||
set(CMAKE_CXX_EXTENSIONS FALSE)
|
||||
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/windows")
|
||||
set(OS_WINDOWS TRUE)
|
||||
elseif(CMAKE_HOST_SYSTEM_NAME STREQUAL "Darwin")
|
||||
set(CMAKE_C_EXTENSIONS FALSE)
|
||||
set(CMAKE_CXX_EXTENSIONS FALSE)
|
||||
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/macos")
|
||||
set(OS_MACOS TRUE)
|
||||
elseif(CMAKE_HOST_SYSTEM_NAME MATCHES "Linux|FreeBSD|OpenBSD")
|
||||
set(CMAKE_CXX_EXTENSIONS FALSE)
|
||||
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/linux")
|
||||
string(TOUPPER "${CMAKE_HOST_SYSTEM_NAME}" _SYSTEM_NAME_U)
|
||||
set(OS_${_SYSTEM_NAME_U} TRUE)
|
||||
endif()
|
||||
5
cmake/common/version.cpp.in
Normal file
5
cmake/common/version.cpp.in
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
#include "version.h"
|
||||
#define GIT_SHA1 "@GIT_SHA1@"
|
||||
#define GIT_TAG "@GIT_TAG@"
|
||||
const char g_GIT_SHA1[] = GIT_SHA1;
|
||||
const char g_GIT_TAG[] = GIT_TAG;
|
||||
99
cmake/linux/compilerconfig.cmake
Normal file
99
cmake/linux/compilerconfig.cmake
Normal file
|
|
@ -0,0 +1,99 @@
|
|||
# CMake Linux compiler configuration module
|
||||
|
||||
include_guard(GLOBAL)
|
||||
|
||||
include(ccache)
|
||||
include(compiler_common)
|
||||
|
||||
option(ENABLE_COMPILER_TRACE
|
||||
"Enable Clang time-trace (required Clang and Ninja)" OFF)
|
||||
mark_as_advanced(ENABLE_COMPILER_TRACE)
|
||||
|
||||
# gcc options for C
|
||||
set(_obs_gcc_c_options
|
||||
# cmake-format: sortable
|
||||
-fno-strict-aliasing
|
||||
-fopenmp-simd
|
||||
-Wdeprecated-declarations
|
||||
-Wempty-body
|
||||
-Wenum-conversion
|
||||
-Werror=return-type
|
||||
-Wextra
|
||||
-Wformat
|
||||
-Wformat-security
|
||||
-Wno-conversion
|
||||
-Wno-float-conversion
|
||||
-Wno-implicit-fallthrough
|
||||
-Wno-missing-braces
|
||||
-Wno-missing-field-initializers
|
||||
-Wno-shadow
|
||||
-Wno-sign-conversion
|
||||
-Wno-trigraphs
|
||||
-Wno-unknown-pragmas
|
||||
-Wno-unused-function
|
||||
-Wno-unused-label
|
||||
-Wparentheses
|
||||
-Wshadow
|
||||
-Wuninitialized
|
||||
-Wunreachable-code
|
||||
-Wunused-parameter
|
||||
-Wunused-value
|
||||
-Wunused-variable
|
||||
-Wvla)
|
||||
|
||||
# gcc options for C++
|
||||
set(_obs_gcc_cxx_options
|
||||
# cmake-format: sortable
|
||||
${_obs_gcc_c_options} -Wconversion -Wfloat-conversion -Winvalid-offsetof
|
||||
-Wno-overloaded-virtual)
|
||||
|
||||
add_compile_options(
|
||||
-fopenmp-simd
|
||||
"$<$<COMPILE_LANG_AND_ID:C,GNU>:${_obs_gcc_c_options}>"
|
||||
"$<$<COMPILE_LANG_AND_ID:C,GNU>:-Wint-conversion;-Wno-missing-prototypes;-Wno-strict-prototypes;-Wpointer-sign>"
|
||||
"$<$<COMPILE_LANG_AND_ID:CXX,GNU>:${_obs_gcc_cxx_options}>"
|
||||
"$<$<COMPILE_LANG_AND_ID:C,Clang>:${_obs_clang_c_options}>"
|
||||
"$<$<COMPILE_LANG_AND_ID:CXX,Clang>:${_obs_clang_cxx_options}>")
|
||||
|
||||
# Add support for color diagnostics and CMake switch for warnings as errors to
|
||||
# CMake < 3.24
|
||||
if(CMAKE_VERSION VERSION_LESS 3.24.0)
|
||||
add_compile_options($<$<C_COMPILER_ID:Clang>:-fcolor-diagnostics>
|
||||
$<$<CXX_COMPILER_ID:Clang>:-fcolor-diagnostics>)
|
||||
if(CMAKE_COMPILE_WARNING_AS_ERROR)
|
||||
add_compile_options(-Werror)
|
||||
endif()
|
||||
else()
|
||||
set(CMAKE_COLOR_DIAGNOSTICS ON)
|
||||
endif()
|
||||
|
||||
if(CMAKE_CXX_COMPILER_ID STREQUAL GNU)
|
||||
# Disable warning for https://github.com/WarmUpTill/SceneSwitcher/issues/1091
|
||||
add_compile_options(-Wno-error=psabi)
|
||||
|
||||
# Disable false-positive warning in GCC 12.1.0 and later
|
||||
if(CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL 12.1.0)
|
||||
add_compile_options(-Wno-error=maybe-uninitialized)
|
||||
add_compile_options(-Wno-error=stringop-overflow)
|
||||
endif()
|
||||
|
||||
# Add warning for infinite recursion (added in GCC 12)
|
||||
if(CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL 12.0.0)
|
||||
add_compile_options(-Winfinite-recursion)
|
||||
endif()
|
||||
elseif(CMAKE_CXX_COMPILER_ID STREQUAL Clang)
|
||||
add_compile_options(-Wno-error=null-pointer-subtraction)
|
||||
endif()
|
||||
|
||||
# Enable compiler and build tracing (requires Ninja generator)
|
||||
if(ENABLE_COMPILER_TRACE AND CMAKE_GENERATOR STREQUAL "Ninja")
|
||||
add_compile_options($<$<COMPILE_LANG_AND_ID:C,Clang>:-ftime-trace>
|
||||
$<$<COMPILE_LANG_AND_ID:CXX,Clang>:-ftime-trace>)
|
||||
else()
|
||||
set(ENABLE_COMPILER_TRACE
|
||||
OFF
|
||||
CACHE STRING "Enable Clang time-trace (required Clang and Ninja)" FORCE)
|
||||
endif()
|
||||
|
||||
add_compile_definitions($<$<CONFIG:DEBUG>:DEBUG> $<$<CONFIG:DEBUG>:_DEBUG>
|
||||
SIMDE_ENABLE_OPENMP)
|
||||
93
cmake/linux/defaults.cmake
Normal file
93
cmake/linux/defaults.cmake
Normal file
|
|
@ -0,0 +1,93 @@
|
|||
# CMake Linux defaults module
|
||||
|
||||
# cmake-format: off
|
||||
# cmake-lint: disable=C0103
|
||||
# cmake-lint: disable=C0111
|
||||
# cmake-format: on
|
||||
|
||||
include_guard(GLOBAL)
|
||||
|
||||
include(GNUInstallDirs)
|
||||
|
||||
# Enable find_package targets to become globally available targets
|
||||
set(CMAKE_FIND_PACKAGE_TARGETS_GLOBAL TRUE)
|
||||
|
||||
set(CPACK_PACKAGE_NAME "${CMAKE_PROJECT_NAME}")
|
||||
set(CPACK_PACKAGE_VERSION "${CMAKE_PROJECT_VERSION}")
|
||||
set(CPACK_PACKAGE_FILE_NAME
|
||||
"${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}-${CMAKE_C_LIBRARY_ARCHITECTURE}"
|
||||
)
|
||||
|
||||
set(CPACK_GENERATOR "DEB")
|
||||
set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS ON)
|
||||
set(CPACK_DEBIAN_PACKAGE_MAINTAINER "${PLUGIN_EMAIL}")
|
||||
set(CPACK_SET_DESTDIR ON)
|
||||
|
||||
if(CMAKE_VERSION VERSION_GREATER_EQUAL 3.25.0 OR NOT CMAKE_CROSSCOMPILING)
|
||||
set(CPACK_DEBIAN_DEBUGINFO_PACKAGE ON)
|
||||
endif()
|
||||
|
||||
set(CPACK_OUTPUT_FILE_PREFIX "${CMAKE_CURRENT_SOURCE_DIR}/release")
|
||||
|
||||
set(CPACK_SOURCE_GENERATOR "TXZ")
|
||||
set(CPACK_SOURCE_IGNORE_FILES
|
||||
# cmake-format: sortable
|
||||
".*~$"
|
||||
\\.git/
|
||||
\\.github/
|
||||
\\.gitignore
|
||||
build_.*
|
||||
cmake/\\.CMakeBuildNumber
|
||||
release/)
|
||||
|
||||
set(CPACK_VERBATIM_VARIABLES YES)
|
||||
set(CPACK_SOURCE_PACKAGE_FILE_NAME
|
||||
"${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}-source")
|
||||
set(CPACK_ARCHIVE_THREADS 0)
|
||||
|
||||
include(CPack)
|
||||
|
||||
find_package(libobs QUIET)
|
||||
|
||||
if(NOT TARGET OBS::libobs)
|
||||
find_package(LibObs REQUIRED)
|
||||
add_library(OBS::libobs ALIAS libobs)
|
||||
|
||||
if(ENABLE_FRONTEND_API)
|
||||
find_path(
|
||||
obs-frontend-api_INCLUDE_DIR
|
||||
NAMES obs-frontend-api.h
|
||||
PATHS /usr/include /usr/local/include
|
||||
PATH_SUFFIXES obs)
|
||||
|
||||
find_library(
|
||||
obs-frontend-api_LIBRARY
|
||||
NAMES obs-frontend-api
|
||||
PATHS /usr/lib /usr/local/lib)
|
||||
|
||||
if(obs-frontend-api_LIBRARY)
|
||||
if(NOT TARGET OBS::obs-frontend-api)
|
||||
if(IS_ABSOLUTE "${obs-frontend-api_LIBRARY}")
|
||||
add_library(OBS::obs-frontend-api UNKNOWN IMPORTED)
|
||||
set_property(TARGET OBS::obs-frontend-api
|
||||
PROPERTY IMPORTED_LOCATION "${obs-frontend-api_LIBRARY}")
|
||||
else()
|
||||
add_library(OBS::obs-frontend-api INTERFACE IMPORTED)
|
||||
set_property(TARGET OBS::obs-frontend-api
|
||||
PROPERTY IMPORTED_LIBNAME "${obs-frontend-api_LIBRARY}")
|
||||
endif()
|
||||
|
||||
set_target_properties(
|
||||
OBS::obs-frontend-api PROPERTIES INTERFACE_INCLUDE_DIRECTORIES
|
||||
"${obs-frontend-api_INCLUDE_DIR}")
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
macro(find_package)
|
||||
if(NOT "${ARGV0}" STREQUAL libobs AND NOT "${ARGV0}" STREQUAL
|
||||
obs-frontend-api)
|
||||
_find_package(${ARGV})
|
||||
endif()
|
||||
endmacro()
|
||||
endif()
|
||||
80
cmake/linux/helpers.cmake
Normal file
80
cmake/linux/helpers.cmake
Normal file
|
|
@ -0,0 +1,80 @@
|
|||
# CMake Linux helper functions module
|
||||
|
||||
include_guard(GLOBAL)
|
||||
|
||||
include(helpers_common)
|
||||
|
||||
# set_target_properties_plugin: Set target properties for use in obs-studio
|
||||
function(set_target_properties_plugin target)
|
||||
set(options "")
|
||||
set(oneValueArgs "")
|
||||
set(multiValueArgs PROPERTIES)
|
||||
cmake_parse_arguments(PARSE_ARGV 0 _STPO "${options}" "${oneValueArgs}"
|
||||
"${multiValueArgs}")
|
||||
|
||||
message(DEBUG "Setting additional properties for target ${target}...")
|
||||
|
||||
while(_STPO_PROPERTIES)
|
||||
list(POP_FRONT _STPO_PROPERTIES key value)
|
||||
set_property(TARGET ${target} PROPERTY ${key} "${value}")
|
||||
endwhile()
|
||||
|
||||
set_target_properties(
|
||||
${target}
|
||||
PROPERTIES VERSION 0
|
||||
SOVERSION ${PLUGIN_VERSION}
|
||||
PREFIX "")
|
||||
|
||||
install(
|
||||
TARGETS ${target}
|
||||
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
||||
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}/obs-plugins)
|
||||
|
||||
if(TARGET plugin-support)
|
||||
target_link_libraries(${target} PRIVATE plugin-support)
|
||||
endif()
|
||||
|
||||
target_install_resources(${target})
|
||||
|
||||
get_target_property(target_sources ${target} SOURCES)
|
||||
set(target_ui_files ${target_sources})
|
||||
list(FILTER target_ui_files INCLUDE REGEX ".+\\.(ui|qrc)")
|
||||
source_group(
|
||||
TREE "${CMAKE_CURRENT_SOURCE_DIR}"
|
||||
PREFIX "UI Files"
|
||||
FILES ${target_ui_files})
|
||||
endfunction()
|
||||
|
||||
# Helper function to add resources into bundle
|
||||
function(target_install_resources target)
|
||||
message(DEBUG "Installing resources for target ${target}...")
|
||||
if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/data")
|
||||
file(GLOB_RECURSE data_files "${CMAKE_CURRENT_SOURCE_DIR}/data/*")
|
||||
foreach(data_file IN LISTS data_files)
|
||||
cmake_path(
|
||||
RELATIVE_PATH data_file BASE_DIRECTORY
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/data/" OUTPUT_VARIABLE relative_path)
|
||||
cmake_path(GET relative_path PARENT_PATH relative_path)
|
||||
target_sources(${target} PRIVATE "${data_file}")
|
||||
source_group("Resources/${relative_path}" FILES "${data_file}")
|
||||
endforeach()
|
||||
|
||||
install(
|
||||
DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/data/"
|
||||
DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/obs/obs-plugins/${target}
|
||||
USE_SOURCE_PERMISSIONS)
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
# Helper function to add a specific resource to a bundle
|
||||
function(target_add_resource target resource)
|
||||
message(
|
||||
DEBUG
|
||||
"Add resource '${resource}' to target ${target} at destination '${target_destination}'..."
|
||||
)
|
||||
|
||||
install(FILES "${resource}"
|
||||
DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/obs/obs-plugins/${target})
|
||||
|
||||
source_group("Resources" FILES "${resource}")
|
||||
endfunction()
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user