mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-09-05 19:08:12 +00:00
Compare commits
988 Commits
release-2.
...
release-2.
Author | SHA1 | Date | |
---|---|---|---|
![]() |
98d1f3a45a | ||
![]() |
1226e6b2bc | ||
![]() |
213b074697 | ||
![]() |
4177e06c09 | ||
![]() |
4318013777 | ||
![]() |
3364486f56 | ||
![]() |
dc69988fdf | ||
![]() |
4ed1fc5bff | ||
![]() |
84081d884b | ||
![]() |
a5fad8b0cb | ||
![]() |
6510d6ccbf | ||
![]() |
b0b50da4b6 | ||
![]() |
8b7a088efc | ||
![]() |
7fc5edab8e | ||
![]() |
24ccde693e | ||
![]() |
f46ef5d76d | ||
![]() |
5696677558 | ||
![]() |
093307f1f4 | ||
![]() |
f54014e173 | ||
![]() |
64ad33884d | ||
![]() |
2359383fc1 | ||
![]() |
b2a95b2482 | ||
![]() |
2708e08f40 | ||
![]() |
3f6efbf2df | ||
![]() |
9b048e73a2 | ||
![]() |
d3bb91522f | ||
![]() |
c8c4c97727 | ||
![]() |
f08a5cfcab | ||
![]() |
e9d2f60e1c | ||
![]() |
9e079fe9c7 | ||
![]() |
53c022c880 | ||
![]() |
e11183ea6c | ||
![]() |
024c27645a | ||
![]() |
c2047f0496 | ||
![]() |
220895d4d2 | ||
![]() |
282f7a84fc | ||
![]() |
9be8c2a899 | ||
![]() |
51e20f1666 | ||
![]() |
a34c8403e7 | ||
![]() |
dc74448014 | ||
![]() |
155f99a4e6 | ||
![]() |
63bb1a8583 | ||
![]() |
8b0c9e1dce | ||
![]() |
7f74c1ed63 | ||
![]() |
7a44b1ab00 | ||
![]() |
3e97d41da4 | ||
![]() |
dab0205174 | ||
![]() |
d2693d4c7d | ||
![]() |
ed7e7edb70 | ||
![]() |
466cedc0da | ||
![]() |
b84adb3720 | ||
![]() |
2847273885 | ||
![]() |
799ede831e | ||
![]() |
482d964733 | ||
![]() |
da0cf3f634 | ||
![]() |
55a75875f0 | ||
![]() |
934d6954e2 | ||
![]() |
0efe8892d6 | ||
![]() |
d3a4d62fc2 | ||
![]() |
3f02118264 | ||
![]() |
5bf8955b25 | ||
![]() |
529ed102fc | ||
![]() |
4b19f7e012 | ||
![]() |
878ea48b60 | ||
![]() |
ab8bd0ef86 | ||
![]() |
9f25821ffd | ||
![]() |
780ec8fac0 | ||
![]() |
220a23dad2 | ||
![]() |
d7825af4de | ||
![]() |
91b76f5c29 | ||
![]() |
aa9b4ec894 | ||
![]() |
0efeb82a28 | ||
![]() |
e5a3fcd071 | ||
![]() |
ebe561f916 | ||
![]() |
f804293a27 | ||
![]() |
793103ef52 | ||
![]() |
db2997548c | ||
![]() |
fe5468799b | ||
![]() |
c9c991b559 | ||
![]() |
20574c016a | ||
![]() |
1fa217434b | ||
![]() |
9dc8c82082 | ||
![]() |
6024c2731f | ||
![]() |
d58f026827 | ||
![]() |
ed0eb7714a | ||
![]() |
123b967a99 | ||
![]() |
840638404a | ||
![]() |
adb51845af | ||
![]() |
5a25183b39 | ||
![]() |
a326ebce61 | ||
![]() |
2b5b8fdbd5 | ||
![]() |
0efb7c7829 | ||
![]() |
89977d0d16 | ||
![]() |
fc608ffb5f | ||
![]() |
5ac94b519c | ||
![]() |
e02f651c05 | ||
![]() |
96b4535cc7 | ||
![]() |
e55a23050e | ||
![]() |
c6e1806ba9 | ||
![]() |
ddfdb0ca7b | ||
![]() |
348bb53cc1 | ||
![]() |
e79b0ce2e4 | ||
![]() |
884c8b684a | ||
![]() |
9491389baf | ||
![]() |
974098464f | ||
![]() |
7f880c9121 | ||
![]() |
ad93f50ee6 | ||
![]() |
bc88a43d97 | ||
![]() |
9791069d78 | ||
![]() |
3c142abcb2 | ||
![]() |
d890d2594a | ||
![]() |
af94954161 | ||
![]() |
c46bec009b | ||
![]() |
91bb1bb6fd | ||
![]() |
e539135104 | ||
![]() |
8d00ca02f1 | ||
![]() |
a4ec0b1531 | ||
![]() |
6428cee892 | ||
![]() |
b64540dd66 | ||
![]() |
a5da9be5e6 | ||
![]() |
9f07ac8bba | ||
![]() |
ba433e4a5d | ||
![]() |
dface78331 | ||
![]() |
f39c5cf989 | ||
![]() |
f9c50e1bf7 | ||
![]() |
e924f12a7b | ||
![]() |
c672c0e80f | ||
![]() |
51570d9257 | ||
![]() |
d1af211010 | ||
![]() |
6dcf75710c | ||
![]() |
17b9ed7d82 | ||
![]() |
f1a3a18c1e | ||
![]() |
b308172862 | ||
![]() |
761ea32b74 | ||
![]() |
74ff82f4a2 | ||
![]() |
67b537cef4 | ||
![]() |
48aa1cccf7 | ||
![]() |
15bc3f25ee | ||
![]() |
7cbb131c75 | ||
![]() |
3b7a45853c | ||
![]() |
d2b9ecd281 | ||
![]() |
478dff3585 | ||
![]() |
5b0e838a74 | ||
![]() |
96e7306a7a | ||
![]() |
a22baafcf4 | ||
![]() |
e5348c611d | ||
![]() |
5cb87ff99f | ||
![]() |
00f15dd215 | ||
![]() |
52714d5063 | ||
![]() |
bcf1397e33 | ||
![]() |
1af0b39833 | ||
![]() |
4ca7a19348 | ||
![]() |
86fd4ed83c | ||
![]() |
b6fa4dc794 | ||
![]() |
cfb3db01dc | ||
![]() |
a976f7f71b | ||
![]() |
378234437f | ||
![]() |
23d456e146 | ||
![]() |
d7bb56f163 | ||
![]() |
084dbb6410 | ||
![]() |
90f792f83c | ||
![]() |
e2f27362cb | ||
![]() |
da4608ed03 | ||
![]() |
5fe010270a | ||
![]() |
3deb07ea39 | ||
![]() |
da19244f7f | ||
![]() |
bb33eb409e | ||
![]() |
a86f8dedb9 | ||
![]() |
ea77d1d385 | ||
![]() |
e4126d8d6f | ||
![]() |
2c60d95ee2 | ||
![]() |
ef05f66c08 | ||
![]() |
9f7ccbe8d4 | ||
![]() |
643437f5b0 | ||
![]() |
2b2907db18 | ||
![]() |
8291b1be36 | ||
![]() |
1edaad1721 | ||
![]() |
c9f3cbe02f | ||
![]() |
656b599828 | ||
![]() |
7eb85b07e0 | ||
![]() |
dab4f856c1 | ||
![]() |
a4a8a29075 | ||
![]() |
c43b976e5b | ||
![]() |
055ce096f5 | ||
![]() |
ec9a9fee58 | ||
![]() |
e239295491 | ||
![]() |
46ee6a3848 | ||
![]() |
d6b7be8abd | ||
![]() |
1b26b54402 | ||
![]() |
bc9d12e560 | ||
![]() |
d9b4b7d0e0 | ||
![]() |
58f2586b44 | ||
![]() |
ea820edc62 | ||
![]() |
8fa99993af | ||
![]() |
54757c29dd | ||
![]() |
f5ed158d1f | ||
![]() |
5aadfd4eaf | ||
![]() |
224a37faab | ||
![]() |
a75227aaeb | ||
![]() |
37d3eea939 | ||
![]() |
2834d8b3b7 | ||
![]() |
10b4a79379 | ||
![]() |
57f1ea71ab | ||
![]() |
2ae8b4c651 | ||
![]() |
47a525610c | ||
![]() |
510eda22f1 | ||
![]() |
877c19da41 | ||
![]() |
622b511613 | ||
![]() |
564765d22b | ||
![]() |
1260ada519 | ||
![]() |
4eac44bed4 | ||
![]() |
1b8d5631ef | ||
![]() |
0de601dc64 | ||
![]() |
a3546e5069 | ||
![]() |
4bd07ea9a4 | ||
![]() |
e52e68d160 | ||
![]() |
30972d7e7f | ||
![]() |
2824d138b9 | ||
![]() |
8fcbf972c6 | ||
![]() |
5b57573439 | ||
![]() |
b360214950 | ||
![]() |
dd6c663918 | ||
![]() |
764c44db02 | ||
![]() |
52090046fe | ||
![]() |
3d7007fb2d | ||
![]() |
248cb3ca9c | ||
![]() |
354a35c1d7 | ||
![]() |
70890b175e | ||
![]() |
586a2dc721 | ||
![]() |
155c3bb0a3 | ||
![]() |
5ecbc00f36 | ||
![]() |
a5bff78d81 | ||
![]() |
5ca0639a42 | ||
![]() |
81252eb06d | ||
![]() |
1512013320 | ||
![]() |
8f5d3ca57d | ||
![]() |
2efbe7fa3f | ||
![]() |
5c013a4f0d | ||
![]() |
7cf3234efe | ||
![]() |
230f1debd0 | ||
![]() |
0b6eff4167 | ||
![]() |
7fdf794377 | ||
![]() |
15c73f5bfe | ||
![]() |
eee439debe | ||
![]() |
0ba3d9862d | ||
![]() |
e306cbcbee | ||
![]() |
2cb2897e50 | ||
![]() |
5d1ca1c8c7 | ||
![]() |
50a6a39dd6 | ||
![]() |
73066492f6 | ||
![]() |
86b4d035db | ||
![]() |
5d606eaae2 | ||
![]() |
6e931bee01 | ||
![]() |
fd32342ced | ||
![]() |
ab4370c247 | ||
![]() |
7fb8b62a4d | ||
![]() |
11c0dfbdfe | ||
![]() |
5ab1151508 | ||
![]() |
9e6b8d56e3 | ||
![]() |
ccade50587 | ||
![]() |
3f9591babe | ||
![]() |
256269afb3 | ||
![]() |
2eeb39298e | ||
![]() |
3b7eafedb3 | ||
![]() |
bc39952b23 | ||
![]() |
a25f94c9a8 | ||
![]() |
bba51871a8 | ||
![]() |
b057159db7 | ||
![]() |
b378bc5c83 | ||
![]() |
b13dcf24d6 | ||
![]() |
551164812a | ||
![]() |
956a8bf6c0 | ||
![]() |
663411ff77 | ||
![]() |
a2215ff81c | ||
![]() |
b80f6ec05c | ||
![]() |
3899cb1696 | ||
![]() |
026dfc6305 | ||
![]() |
e22c89536a | ||
![]() |
849c905d8c | ||
![]() |
58e179c8b5 | ||
![]() |
4c44450258 | ||
![]() |
6a10309568 | ||
![]() |
22770e6496 | ||
![]() |
a4cbba1276 | ||
![]() |
b47deb58a2 | ||
![]() |
2c32fd254c | ||
![]() |
5f0f337d33 | ||
![]() |
1413d67748 | ||
![]() |
944dc4701c | ||
![]() |
845ebbbe96 | ||
![]() |
cd8ea5e3f1 | ||
![]() |
288aea3b40 | ||
![]() |
0d9e54237c | ||
![]() |
a3f0c373d3 | ||
![]() |
a0ec7c0906 | ||
![]() |
98ec8b88c1 | ||
![]() |
3bf2b90da0 | ||
![]() |
14183f8eca | ||
![]() |
d96f1d5360 | ||
![]() |
3e4bb5acd0 | ||
![]() |
498cbffd89 | ||
![]() |
b23343b7cd | ||
![]() |
ee3b2b7de1 | ||
![]() |
88bbab275f | ||
![]() |
ecde0ca6b6 | ||
![]() |
64d4baccb5 | ||
![]() |
10c14e78b6 | ||
![]() |
4d82ceae0c | ||
![]() |
20f1061cc8 | ||
![]() |
3b88d4f46f | ||
![]() |
6589287ed6 | ||
![]() |
8ae7841d91 | ||
![]() |
99d7b9e626 | ||
![]() |
b9f005505b | ||
![]() |
ab5740bde2 | ||
![]() |
6a2dd96ac7 | ||
![]() |
b444e656cd | ||
![]() |
c1d10c36e7 | ||
![]() |
194d72bb29 | ||
![]() |
4800edfa0c | ||
![]() |
5a26b26880 | ||
![]() |
a6fdd155fb | ||
![]() |
77285b6c3f | ||
![]() |
744eb00b04 | ||
![]() |
177dfddaf7 | ||
![]() |
510f413bb8 | ||
![]() |
a9da8dd22d | ||
![]() |
a4d240d295 | ||
![]() |
9422c57201 | ||
![]() |
ac253956b9 | ||
![]() |
948b926d47 | ||
![]() |
143d5d779c | ||
![]() |
169f77ed5e | ||
![]() |
6b9bf71133 | ||
![]() |
f1b19aa744 | ||
![]() |
ce6d3c5cc1 | ||
![]() |
b2b2369414 | ||
![]() |
477c718744 | ||
![]() |
1c3090a1ac | ||
![]() |
7fce9f3fd0 | ||
![]() |
2e8bd8f1f3 | ||
![]() |
22c14442e2 | ||
![]() |
0f9191a643 | ||
![]() |
fc6bbde525 | ||
![]() |
f520062ad1 | ||
![]() |
e2f597de84 | ||
![]() |
70faef84aa | ||
![]() |
997ef88605 | ||
![]() |
f725ce492c | ||
![]() |
e1bb00cdc9 | ||
![]() |
6da5242535 | ||
![]() |
018f2791c7 | ||
![]() |
2cb1a2d0a7 | ||
![]() |
295266c708 | ||
![]() |
1803e6555f | ||
![]() |
863670c0a8 | ||
![]() |
35d719ef25 | ||
![]() |
1568501dd6 | ||
![]() |
d5e5d4a802 | ||
![]() |
51ba036e64 | ||
![]() |
5e876db89f | ||
![]() |
0439fc6007 | ||
![]() |
6825a4aabb | ||
![]() |
8bc47dc3f1 | ||
![]() |
b3081bbbd2 | ||
![]() |
65d8c07c7d | ||
![]() |
6c29778826 | ||
![]() |
6c10201e58 | ||
![]() |
c79e616806 | ||
![]() |
54c435409b | ||
![]() |
964e0c9b47 | ||
![]() |
01314ff1d4 | ||
![]() |
f88e8da176 | ||
![]() |
0466c45605 | ||
![]() |
a26d2e705d | ||
![]() |
fdf28471c0 | ||
![]() |
e4fc07cad0 | ||
![]() |
c419c4ce99 | ||
![]() |
a25a5a243c | ||
![]() |
3794e3dc90 | ||
![]() |
62f35ab1b6 | ||
![]() |
67bea86b10 | ||
![]() |
1c3a1e1139 | ||
![]() |
96e3799495 | ||
![]() |
1f54ee1da6 | ||
![]() |
0c7a83ecd5 | ||
![]() |
0805990668 | ||
![]() |
efaa58732a | ||
![]() |
b6899f82fb | ||
![]() |
312a8a19d7 | ||
![]() |
b8b1ebf57b | ||
![]() |
62175552e9 | ||
![]() |
f23cc950f5 | ||
![]() |
ed0eb7ee06 | ||
![]() |
7d0ea2a881 | ||
![]() |
dd48b6f8cf | ||
![]() |
17ad4fdf4b | ||
![]() |
1b7c2c9e41 | ||
![]() |
7d60ff9965 | ||
![]() |
d499b25a3f | ||
![]() |
06f437e1b6 | ||
![]() |
8c92af5e54 | ||
![]() |
d8fbeec096 | ||
![]() |
8b4e389ad0 | ||
![]() |
63ea838db6 | ||
![]() |
78391e6530 | ||
![]() |
9ecdcd8bb6 | ||
![]() |
8f6a5c9ad2 | ||
![]() |
59937e0fd5 | ||
![]() |
2f54d8a458 | ||
![]() |
1caa427035 | ||
![]() |
7554e82ec3 | ||
![]() |
75340b827d | ||
![]() |
67c60e0b9c | ||
![]() |
45b804c158 | ||
![]() |
0963c11af8 | ||
![]() |
863d4a0f2a | ||
![]() |
59cc43ccbb | ||
![]() |
33af02ae68 | ||
![]() |
ab10bf54f2 | ||
![]() |
26e3d65ea8 | ||
![]() |
e03ad30a57 | ||
![]() |
a96196c958 | ||
![]() |
623a83f2b5 | ||
![]() |
e69d0e516b | ||
![]() |
8f18e2f52d | ||
![]() |
4e29be814e | ||
![]() |
effc16954f | ||
![]() |
59a0416819 | ||
![]() |
154ec5c57a | ||
![]() |
4df852cbbf | ||
![]() |
6c6b497f89 | ||
![]() |
596096a86a | ||
![]() |
4c3b8b2b93 | ||
![]() |
e75d72670f | ||
![]() |
9216b7a5ee | ||
![]() |
1fa6142903 | ||
![]() |
906ad64d7b | ||
![]() |
f1690e265e | ||
![]() |
02246aaeb9 | ||
![]() |
4d91f0e796 | ||
![]() |
0d8ce4a761 | ||
![]() |
5fff9bc1e3 | ||
![]() |
358a80a473 | ||
![]() |
eb185e8d88 | ||
![]() |
cbc9bd9804 | ||
![]() |
5d80179954 | ||
![]() |
6e1611cc77 | ||
![]() |
6ba3e56538 | ||
![]() |
7b6695f4d4 | ||
![]() |
37c664a13d | ||
![]() |
763d768f7d | ||
![]() |
82b449611a | ||
![]() |
fa18c9bf4a | ||
![]() |
5df737bb3c | ||
![]() |
a9ac349846 | ||
![]() |
4a79fe44ff | ||
![]() |
43f0ae1e54 | ||
![]() |
c17d2246fb | ||
![]() |
86f223d664 | ||
![]() |
2d6c100058 | ||
![]() |
07f04bb35e | ||
![]() |
24aedc1439 | ||
![]() |
b8daf14fe5 | ||
![]() |
525c317ed9 | ||
![]() |
59d4a39456 | ||
![]() |
88bdc028ec | ||
![]() |
d3c89bb479 | ||
![]() |
e54774faca | ||
![]() |
3184936950 | ||
![]() |
66054a6515 | ||
![]() |
cd197be53b | ||
![]() |
528b71284f | ||
![]() |
26054d9934 | ||
![]() |
da9bfc43e7 | ||
![]() |
177a836653 | ||
![]() |
bdc7ad8f56 | ||
![]() |
75c5cff0bf | ||
![]() |
a842bc29fa | ||
![]() |
d35dee76c7 | ||
![]() |
9e1e0fb92f | ||
![]() |
627e15871a | ||
![]() |
b87116ff03 | ||
![]() |
05f6709617 | ||
![]() |
9eaf7d8cc8 | ||
![]() |
9a65d123a7 | ||
![]() |
fdbf233cfb | ||
![]() |
54faea8b89 | ||
![]() |
69fb802a90 | ||
![]() |
4316c5ec02 | ||
![]() |
903d888cc3 | ||
![]() |
f24216c2ba | ||
![]() |
df00a7dd4c | ||
![]() |
827917ea60 | ||
![]() |
271df2fdd8 | ||
![]() |
aa6c390bbd | ||
![]() |
67827c0b00 | ||
![]() |
e2535ba547 | ||
![]() |
6c0e3532fa | ||
![]() |
bc30fb295d | ||
![]() |
d0731ab9a3 | ||
![]() |
699cec1a8d | ||
![]() |
120b8d4189 | ||
![]() |
6669d04ea6 | ||
![]() |
971c5c2610 | ||
![]() |
de0cb94e72 | ||
![]() |
4ae87e215e | ||
![]() |
646cccede7 | ||
![]() |
93d7b6e50c | ||
![]() |
40b61b81f1 | ||
![]() |
d2a3347c19 | ||
![]() |
a09b0b05eb | ||
![]() |
a29f37c14a | ||
![]() |
ca01016577 | ||
![]() |
c53c351921 | ||
![]() |
fc787a41dc | ||
![]() |
05bb182a53 | ||
![]() |
58907d2c27 | ||
![]() |
a7bd18c0d5 | ||
![]() |
f73abd49c3 | ||
![]() |
8eed915dfa | ||
![]() |
8ce6fb2513 | ||
![]() |
d34a7c5ed2 | ||
![]() |
36b8438280 | ||
![]() |
faa8fc2917 | ||
![]() |
971508c0d7 | ||
![]() |
c55bd24827 | ||
![]() |
ec25d6b1e8 | ||
![]() |
bb30a35364 | ||
![]() |
11c932bf1d | ||
![]() |
f0b8fee88f | ||
![]() |
6ec3f5a28e | ||
![]() |
2c11068569 | ||
![]() |
fcd1c155cc | ||
![]() |
230ae797a7 | ||
![]() |
5297596132 | ||
![]() |
332213163c | ||
![]() |
4ff3b28273 | ||
![]() |
f931b25f4c | ||
![]() |
1e06a3614f | ||
![]() |
7aab3f0db6 | ||
![]() |
08caafe2f1 | ||
![]() |
138fe3d43d | ||
![]() |
b16ef14c7c | ||
![]() |
0f5a815657 | ||
![]() |
9196584773 | ||
![]() |
48b62e2e57 | ||
![]() |
9e352e61db | ||
![]() |
c5c0b2cb34 | ||
![]() |
1e016fd5ea | ||
![]() |
aaf426e280 | ||
![]() |
a8eeb181b6 | ||
![]() |
4845027cad | ||
![]() |
ef7261bc41 | ||
![]() |
12bab1c981 | ||
![]() |
61821bd876 | ||
![]() |
0f9422a6a5 | ||
![]() |
55ba686530 | ||
![]() |
4cb43db1a9 | ||
![]() |
237535b23a | ||
![]() |
ed5d3d9f82 | ||
![]() |
f569cc56a9 | ||
![]() |
06dd70bc8b | ||
![]() |
a420eb79bb | ||
![]() |
41fc398114 | ||
![]() |
1737340978 | ||
![]() |
69a6efcd1b | ||
![]() |
fbee0b86bf | ||
![]() |
880c69392a | ||
![]() |
811adaa342 | ||
![]() |
5368f45567 | ||
![]() |
3d5679bb8e | ||
![]() |
e3203278f4 | ||
![]() |
b5aec14d43 | ||
![]() |
8eb2ec6a8d | ||
![]() |
83f3045ee8 | ||
![]() |
f1bc5f305c | ||
![]() |
c3a3f18076 | ||
![]() |
5d6eb4a5a5 | ||
![]() |
cfc22ac7d7 | ||
![]() |
b4f99deb9e | ||
![]() |
1e13aa2c98 | ||
![]() |
109bb2f17e | ||
![]() |
f7ab765b84 | ||
![]() |
910e040e9e | ||
![]() |
bb969ac747 | ||
![]() |
87b5bb5840 | ||
![]() |
11b111e1f8 | ||
![]() |
be576c5fe7 | ||
![]() |
472a415c8f | ||
![]() |
0d9719964f | ||
![]() |
e8075179e0 | ||
![]() |
62d063f735 | ||
![]() |
cc7fe8c255 | ||
![]() |
f52a12a8fe | ||
![]() |
3d6cf2b5c0 | ||
![]() |
f7f9478caf | ||
![]() |
9db80adfba | ||
![]() |
f3b0dc5007 | ||
![]() |
c69e858e7a | ||
![]() |
1e2f311811 | ||
![]() |
eae81ec80e | ||
![]() |
f641d91f67 | ||
![]() |
38d11e5cc6 | ||
![]() |
bbe4d693eb | ||
![]() |
b6e97d9ff0 | ||
![]() |
5db6eb7742 | ||
![]() |
347b6cdcb6 | ||
![]() |
66209135df | ||
![]() |
01fa4dd9d1 | ||
![]() |
9fe09950f1 | ||
![]() |
71cd1fa595 | ||
![]() |
4f2c7328d6 | ||
![]() |
1634a4cc30 | ||
![]() |
feaf52dba6 | ||
![]() |
970ed36de5 | ||
![]() |
bd2f1e9ea6 | ||
![]() |
2afd04d09b | ||
![]() |
69f3bb2e34 | ||
![]() |
d1c5038f16 | ||
![]() |
f62d1220ac | ||
![]() |
4c11307a4e | ||
![]() |
b1a82b5772 | ||
![]() |
3ff56fda1a | ||
![]() |
64754f3a2a | ||
![]() |
d3c21666de | ||
![]() |
5e12e4b813 | ||
![]() |
8c4e4d57b3 | ||
![]() |
ca3b8fe91d | ||
![]() |
e1c3dcb403 | ||
![]() |
c309546e8c | ||
![]() |
0e913a22db | ||
![]() |
be29ca0189 | ||
![]() |
f892ae10d6 | ||
![]() |
674e894574 | ||
![]() |
b1ad45acdd | ||
![]() |
eb1b9b418c | ||
![]() |
7b4f1ef01b | ||
![]() |
41bf6b5a51 | ||
![]() |
0fc3574464 | ||
![]() |
d649f95723 | ||
![]() |
4f8dd2d39d | ||
![]() |
b02c8267f9 | ||
![]() |
0f8f4f6764 | ||
![]() |
8030e7546a | ||
![]() |
5dfb0c19c8 | ||
![]() |
2afbb5713c | ||
![]() |
3b1e0e163b | ||
![]() |
857e5b08c3 | ||
![]() |
49eb375a59 | ||
![]() |
aeda6a8e6f | ||
![]() |
fe76c40716 | ||
![]() |
884c21c565 | ||
![]() |
557d8e2f24 | ||
![]() |
3a8032f491 | ||
![]() |
e7c4575719 | ||
![]() |
39a0013900 | ||
![]() |
ca26cde4e1 | ||
![]() |
eba591a910 | ||
![]() |
919cd56b20 | ||
![]() |
d76097dc5e | ||
![]() |
2fecefce19 | ||
![]() |
7bb0e839a6 | ||
![]() |
9720672374 | ||
![]() |
5240071b1c | ||
![]() |
5773c347d5 | ||
![]() |
3ac69c6210 | ||
![]() |
91f8b4dea2 | ||
![]() |
2aadef022e | ||
![]() |
7391cd34da | ||
![]() |
d622c3c9cc | ||
![]() |
cfecc569b5 | ||
![]() |
867d8643d7 | ||
![]() |
239b5278bf | ||
![]() |
cc6d8eb72b | ||
![]() |
a78cdbd7e3 | ||
![]() |
33588662ef | ||
![]() |
b620788b4c | ||
![]() |
20cc644833 | ||
![]() |
bed789794d | ||
![]() |
0dbe9022fc | ||
![]() |
a6b9d987e9 | ||
![]() |
5718ba253f | ||
![]() |
e7f03de468 | ||
![]() |
33843b0933 | ||
![]() |
7d94121606 | ||
![]() |
79a8e8cf04 | ||
![]() |
6526c4d0fc | ||
![]() |
f0e7f3e7e5 | ||
![]() |
10c292b055 | ||
![]() |
ddac844034 | ||
![]() |
dd28637947 | ||
![]() |
5b26d4e0ca | ||
![]() |
757c984ddb | ||
![]() |
61cd57d378 | ||
![]() |
0134672345 | ||
![]() |
8f14dc6998 | ||
![]() |
3381828cc6 | ||
![]() |
be0e303ec8 | ||
![]() |
546bab0a8c | ||
![]() |
98ee4a5292 | ||
![]() |
d42fa25a9e | ||
![]() |
7d25a443c4 | ||
![]() |
3fbaf737ef | ||
![]() |
258849c9bc | ||
![]() |
594a79c2f9 | ||
![]() |
8d47e3bb82 | ||
![]() |
bbcf40e811 | ||
![]() |
0fb36f29a8 | ||
![]() |
4339647d90 | ||
![]() |
a391dd5fef | ||
![]() |
657f5f791c | ||
![]() |
e9b4869372 | ||
![]() |
0a6b5abf45 | ||
![]() |
d8102bf660 | ||
![]() |
489e9b69df | ||
![]() |
baaac5cca3 | ||
![]() |
5abcfdb93e | ||
![]() |
8cf7e9e7da | ||
![]() |
0e9d050296 | ||
![]() |
87875a49b4 | ||
![]() |
17e62abb6d | ||
![]() |
4940b5dbc2 | ||
![]() |
3fb5124174 | ||
![]() |
59b0a2d711 | ||
![]() |
dcd21d042f | ||
![]() |
2d81beb819 | ||
![]() |
4de4b1e7a0 | ||
![]() |
f33ab44f84 | ||
![]() |
67eb03400a | ||
![]() |
cb5b8c9747 | ||
![]() |
c331b64d79 | ||
![]() |
e51760e111 | ||
![]() |
c67ff82377 | ||
![]() |
42d979a231 | ||
![]() |
1bb5448fe8 | ||
![]() |
2222f44c94 | ||
![]() |
d81d986858 | ||
![]() |
cc7c0a2dab | ||
![]() |
76cc24e34a | ||
![]() |
0ec1209eab | ||
![]() |
925362a2fc | ||
![]() |
1de85491e1 | ||
![]() |
cc20d0147e | ||
![]() |
8c82b73027 | ||
![]() |
92d70f4167 | ||
![]() |
63e9827b90 | ||
![]() |
f3419d8c04 | ||
![]() |
c29df1699e | ||
![]() |
4a0bd06d58 | ||
![]() |
03f29c19dc | ||
![]() |
a14b948b6c | ||
![]() |
4a3a9f3ad8 | ||
![]() |
d38ccfa88f | ||
![]() |
f0d65436fb | ||
![]() |
dfc38ef460 | ||
![]() |
adc0880520 | ||
![]() |
509c70c698 | ||
![]() |
3900fca304 | ||
![]() |
76ff25eedf | ||
![]() |
5d29f22808 | ||
![]() |
87bb0f5bcb | ||
![]() |
f9baa30270 | ||
![]() |
7e11bd1ac1 | ||
![]() |
af7fe2cf9b | ||
![]() |
524ccf033f | ||
![]() |
b1807797a3 | ||
![]() |
b07e5d38a2 | ||
![]() |
624905a7f1 | ||
![]() |
4ace02df5f | ||
![]() |
70adacf08a | ||
![]() |
fb92d150d9 | ||
![]() |
d9559ce1d4 | ||
![]() |
7526a87ff2 | ||
![]() |
171e306dbf | ||
![]() |
d6c725d522 | ||
![]() |
0c85173d5b | ||
![]() |
7555701def | ||
![]() |
065d80716b | ||
![]() |
9d7feaaf9e | ||
![]() |
d5896f9010 | ||
![]() |
64a7e75dd3 | ||
![]() |
93e51dd33e | ||
![]() |
e8f4045d0b | ||
![]() |
aa129c9257 | ||
![]() |
4c2eb6b95d | ||
![]() |
e226008d83 | ||
![]() |
8b1b6734f6 | ||
![]() |
97c2bdf256 | ||
![]() |
20ecd2afcb | ||
![]() |
517db6d887 | ||
![]() |
20630b2e6c | ||
![]() |
7774de0fe3 | ||
![]() |
60e8ff16dc | ||
![]() |
19c3e125ba | ||
![]() |
832afa81a1 | ||
![]() |
b29128994e | ||
![]() |
1db0bd3fc0 | ||
![]() |
cba6090398 | ||
![]() |
4194a902e8 | ||
![]() |
3823ba1ded | ||
![]() |
301ee21f33 | ||
![]() |
6623c87d0b | ||
![]() |
070f57820f | ||
![]() |
62266dbd4f | ||
![]() |
d47c286b12 | ||
![]() |
259009a7ea | ||
![]() |
90255914a8 | ||
![]() |
e3e41b69a1 | ||
![]() |
44d8721087 | ||
![]() |
4aab2342e9 | ||
![]() |
df6db90dd4 | ||
![]() |
d8b34b0993 | ||
![]() |
2849ca404e | ||
![]() |
e417c6cffe | ||
![]() |
32587bd7de | ||
![]() |
b7a0ef6bdf | ||
![]() |
7010452062 | ||
![]() |
e8c915dacc | ||
![]() |
25b0081367 | ||
![]() |
c4a169a6fc | ||
![]() |
1d8dbb2896 | ||
![]() |
43c57e3239 | ||
![]() |
2d5c05a69c | ||
![]() |
321c2f8f24 | ||
![]() |
f9dc49c21c | ||
![]() |
71b7790be8 | ||
![]() |
933ec9e978 | ||
![]() |
a263cc2369 | ||
![]() |
6b5eadb10f | ||
![]() |
9772d0512c | ||
![]() |
27f2df2292 | ||
![]() |
834e8898b9 | ||
![]() |
60070d0b3d | ||
![]() |
330d420afc | ||
![]() |
2fcbf321fa | ||
![]() |
a683ce4153 | ||
![]() |
95a6f986a0 | ||
![]() |
37dee79b74 | ||
![]() |
62e7049a4f | ||
![]() |
fff3c2573a | ||
![]() |
70a2ac2f1c | ||
![]() |
a8b9414697 | ||
![]() |
92dc226018 | ||
![]() |
2adebcd6cc | ||
![]() |
ce32c44b54 | ||
![]() |
818a26f21b | ||
![]() |
5e6a851d6c | ||
![]() |
f788a671e4 | ||
![]() |
bd77b9a0ce | ||
![]() |
8ad043fc38 | ||
![]() |
b388f6e32d | ||
![]() |
25eca09c7e | ||
![]() |
88299502b4 | ||
![]() |
1d495351a0 | ||
![]() |
365a36386a | ||
![]() |
242b25aba4 | ||
![]() |
aa7ba62978 | ||
![]() |
0b995f21e7 | ||
![]() |
bb1fe302cf | ||
![]() |
f032e8c191 | ||
![]() |
24fcb61470 | ||
![]() |
6ff48dddcb | ||
![]() |
862a654b70 | ||
![]() |
8e27a69370 | ||
![]() |
9237f8edc1 | ||
![]() |
1f4e86d61c | ||
![]() |
04ff593bf5 | ||
![]() |
ddbbef88e3 | ||
![]() |
ae7f54f514 | ||
![]() |
0b9d8e679a | ||
![]() |
4a0f56b679 | ||
![]() |
10135b2d7b | ||
![]() |
f348370e1b | ||
![]() |
951657c99b | ||
![]() |
7df721d4e9 | ||
![]() |
0465224616 | ||
![]() |
9d6b028e01 | ||
![]() |
fcae9cd210 | ||
![]() |
e5f3b22d63 | ||
![]() |
64f17314a2 | ||
![]() |
1d8806b0fc | ||
![]() |
e56dc9c30e | ||
![]() |
4bceea70c5 | ||
![]() |
8087c0a5d2 | ||
![]() |
53d818e31c | ||
![]() |
f522c5380c | ||
![]() |
2304b4e86a | ||
![]() |
0f753d9794 | ||
![]() |
805fc29ae8 | ||
![]() |
57f3c41b97 | ||
![]() |
b58557a3a6 | ||
![]() |
6a787b8004 | ||
![]() |
0deed07b3e | ||
![]() |
ebf2c49b50 | ||
![]() |
38c63afd64 | ||
![]() |
030bb7282a | ||
![]() |
335e9c769a | ||
![]() |
5e9320f6b5 | ||
![]() |
e2afc1f37a | ||
![]() |
2468fccf7f | ||
![]() |
dc5dda0f31 | ||
![]() |
3030fd815c | ||
![]() |
5c3df60ec9 | ||
![]() |
8825fbf713 | ||
![]() |
82cd3bfe1c | ||
![]() |
7cc3248044 | ||
![]() |
3e341021c3 | ||
![]() |
1ecf77d630 | ||
![]() |
507be6c3f8 | ||
![]() |
f4561db69a | ||
![]() |
2b0ca87119 | ||
![]() |
37d1ab83c5 | ||
![]() |
e7761aec37 | ||
![]() |
890bee64a4 | ||
![]() |
ba0c270c7a | ||
![]() |
322dbdde4e | ||
![]() |
64294e4560 | ||
![]() |
c4c034ca4b | ||
![]() |
f7dc8c0eaa | ||
![]() |
bb036ef544 | ||
![]() |
910dad505a | ||
![]() |
4b2b475ac2 | ||
![]() |
a4ad293d4a | ||
![]() |
6089b35706 | ||
![]() |
a999100858 | ||
![]() |
57e9a9eee6 | ||
![]() |
b9d16dac4e | ||
![]() |
776a5e0d25 | ||
![]() |
376c6a9dd1 | ||
![]() |
3aba9d4473 | ||
![]() |
832b524180 | ||
![]() |
29d461b628 | ||
![]() |
e8b6edd5a0 | ||
![]() |
34c5bde355 | ||
![]() |
9117b2e300 | ||
![]() |
6bf5f5a221 | ||
![]() |
92fd2938e7 | ||
![]() |
9cd7cbe134 | ||
![]() |
8231278817 | ||
![]() |
0ad822eb70 | ||
![]() |
156c7badf5 | ||
![]() |
547c8c288b | ||
![]() |
4b1dd54a56 | ||
![]() |
acdde129bb | ||
![]() |
f8a0135edf | ||
![]() |
1f7bc08884 | ||
![]() |
de849d5e6f | ||
![]() |
a6228e7aaf | ||
![]() |
e16a83d393 | ||
![]() |
a0a3957eb6 | ||
![]() |
b90343e512 | ||
![]() |
042243471f | ||
![]() |
3054c0dc50 | ||
![]() |
52d63ba26c | ||
![]() |
bad5431a14 | ||
![]() |
1ab452fc57 | ||
![]() |
2a946832ba | ||
![]() |
488a91eb40 | ||
![]() |
f75c0e3204 | ||
![]() |
4d4c81d438 | ||
![]() |
1e6c128c4c | ||
![]() |
1c6a649362 | ||
![]() |
0262f757e1 | ||
![]() |
8908d16285 | ||
![]() |
61808b03b5 | ||
![]() |
d65185a6a7 | ||
![]() |
bf277eb808 | ||
![]() |
825b0324cf | ||
![]() |
7e8be3f280 | ||
![]() |
a6ba8a1585 | ||
![]() |
e65ca61957 | ||
![]() |
e42a3a3233 | ||
![]() |
769bf2ebcc | ||
![]() |
fc0854651b | ||
![]() |
e6f635ca17 | ||
![]() |
099e53f3a5 | ||
![]() |
0f940cb6ce | ||
![]() |
1453cfa4e9 | ||
![]() |
0ba93e4aac | ||
![]() |
170428b107 | ||
![]() |
950ff0056a | ||
![]() |
38619bb28d | ||
![]() |
c6660afe44 | ||
![]() |
8acf729650 | ||
![]() |
dfbdaca2b8 | ||
![]() |
657c346556 | ||
![]() |
ceece918e4 |
82
.github/actions/setup-gdk-desktop/action.yml
vendored
Normal file
82
.github/actions/setup-gdk-desktop/action.yml
vendored
Normal file
@@ -0,0 +1,82 @@
|
||||
name: 'Setup GDK (Game Development Kit) for Windows Desktop'
|
||||
description: 'Download GDK and install into MSBuild'
|
||||
inputs:
|
||||
# Keep edition and ref in sync!
|
||||
edition:
|
||||
description: 'GDK edition'
|
||||
default: '240601' # YYMMUU (Year Month Update)
|
||||
ref:
|
||||
description: 'Git reference'
|
||||
default: 'June_2024_Update_1'
|
||||
folder:
|
||||
description: 'Folder where to create Directory.Build.props'
|
||||
required: true
|
||||
default: '${{ github.workspace }}'
|
||||
runs:
|
||||
using: 'composite'
|
||||
steps:
|
||||
- uses: actions/setup-python@main
|
||||
with:
|
||||
python-version: 3.x
|
||||
- name: 'Calculate variables'
|
||||
id: calc
|
||||
shell: pwsh
|
||||
run: |
|
||||
$vs_folder=@(vswhere -latest -property installationPath)
|
||||
echo "vs-folder=${vs_folder}" >> $Env:GITHUB_OUTPUT
|
||||
|
||||
echo "gdk-path=${{ runner.temp }}\GDK-${{ inputs.edition }}" >> $Env:GITHUB_OUTPUT
|
||||
|
||||
echo "cache-key=gdk-${{ inputs.ref }}-${{ inputs.edition }}" >> $Env:GITHUB_OUTPUT
|
||||
- name: 'Restore cached GDK'
|
||||
id: cache-restore
|
||||
uses: actions/cache/restore@v4
|
||||
with:
|
||||
path: '${{ steps.calc.outputs.gdk-path }}'
|
||||
key: ${{ steps.calc.outputs.cache-key }}
|
||||
- name: 'Download GDK'
|
||||
if: ${{ !steps.cache-restore.outputs.cache-hit }}
|
||||
shell: pwsh
|
||||
run: |
|
||||
python build-scripts/setup-gdk-desktop.py `
|
||||
--download `
|
||||
--temp-folder "${{ runner.temp }}" `
|
||||
--gdk-path="${{ steps.calc.outputs.gdk-path }}" `
|
||||
--ref-edition "${{ inputs.ref }},${{ inputs.edition }}" `
|
||||
--vs-folder="${{ steps.calc.outputs.vs-folder }}" `
|
||||
--no-user-props
|
||||
- name: 'Extract GDK'
|
||||
if: ${{ !steps.cache-restore.outputs.cache-hit }}
|
||||
shell: pwsh
|
||||
run: |
|
||||
python build-scripts/setup-gdk-desktop.py `
|
||||
--extract `
|
||||
--ref-edition "${{ inputs.ref }},${{ inputs.edition }}" `
|
||||
--temp-folder "${{ runner.temp }}" `
|
||||
--gdk-path="${{ steps.calc.outputs.gdk-path }}" `
|
||||
--vs-folder="${{ steps.calc.outputs.vs-folder }}" `
|
||||
--no-user-props
|
||||
- name: 'Cache GDK'
|
||||
if: ${{ !steps.cache-restore.outputs.cache-hit }}
|
||||
uses: actions/cache/save@v4
|
||||
with:
|
||||
path: '${{ steps.calc.outputs.gdk-path }}'
|
||||
key: ${{ steps.calc.outputs.cache-key }}
|
||||
- name: 'Copy MSBuild files into GDK'
|
||||
shell: pwsh
|
||||
run: |
|
||||
python build-scripts/setup-gdk-desktop.py `
|
||||
--ref-edition "${{ inputs.ref }},${{ inputs.edition }}" `
|
||||
--gdk-path="${{ steps.calc.outputs.gdk-path }}" `
|
||||
--vs-folder="${{ steps.calc.outputs.vs-folder }}" `
|
||||
--copy-msbuild `
|
||||
--no-user-props
|
||||
- name: 'Write user props'
|
||||
shell: pwsh
|
||||
run: |
|
||||
python build-scripts/setup-gdk-desktop.py `
|
||||
--ref-edition "${{ inputs.ref }},${{ inputs.edition }}" `
|
||||
--temp-folder "${{ runner.temp }}" `
|
||||
--vs-folder="${{ steps.calc.outputs.vs-folder }}" `
|
||||
--gdk-path="${{ steps.calc.outputs.gdk-path }}" `
|
||||
"--props-folder=${{ inputs.folder }}"
|
62
.github/actions/setup-ninja/action.yml
vendored
Normal file
62
.github/actions/setup-ninja/action.yml
vendored
Normal file
@@ -0,0 +1,62 @@
|
||||
name: 'Setup ninja'
|
||||
description: 'Download ninja and add it to the PATH environment variable'
|
||||
inputs:
|
||||
version:
|
||||
description: 'Ninja version'
|
||||
default: '1.12.1'
|
||||
runs:
|
||||
using: 'composite'
|
||||
steps:
|
||||
- name: 'Calculate variables'
|
||||
id: calc
|
||||
shell: sh
|
||||
run: |
|
||||
case "${{ runner.os }}-${{ runner.arch }}" in
|
||||
"Linux-X86" | "Linux-X64")
|
||||
archive="ninja-linux.zip"
|
||||
;;
|
||||
"Linux-ARM64")
|
||||
archive="ninja-linux-aarch64.zip"
|
||||
;;
|
||||
"macOS-X86" | "macOS-X64" | "macOS-ARM64")
|
||||
archive="ninja-mac.zip"
|
||||
;;
|
||||
"Windows-X86" | "Windows-X64")
|
||||
archive="ninja-win.zip"
|
||||
;;
|
||||
"Windows-ARM64")
|
||||
archive="ninja-winarm64.zip"
|
||||
;;
|
||||
*)
|
||||
echo "Unsupported ${{ runner.os }}-${{ runner.arch }}"
|
||||
exit 1;
|
||||
;;
|
||||
esac
|
||||
echo "archive=${archive}" >> ${GITHUB_OUTPUT}
|
||||
echo "cache-key=${archive}-${{ inputs.version }}-${{ runner.os }}-${{ runner.arch }}" >> ${GITHUB_OUTPUT}
|
||||
- name: 'Restore cached ${{ steps.calc.outputs.archive }}'
|
||||
id: cache-restore
|
||||
uses: actions/cache/restore@v4
|
||||
with:
|
||||
path: '${{ runner.temp }}/${{ steps.calc.outputs.archive }}'
|
||||
key: ${{ steps.calc.outputs.cache-key }}
|
||||
- name: 'Download ninja ${{ inputs.version }} for ${{ runner.os }} (${{ runner.arch }})'
|
||||
if: ${{ !steps.cache-restore.outputs.cache-hit }}
|
||||
shell: pwsh
|
||||
run: |
|
||||
Invoke-WebRequest "https://github.com/ninja-build/ninja/releases/download/v${{ inputs.version }}/${{ steps.calc.outputs.archive }}" -OutFile "${{ runner.temp }}/${{ steps.calc.outputs.archive }}"
|
||||
- name: 'Cache ${{ steps.calc.outputs.archive }}'
|
||||
if: ${{ !steps.cache-restore.outputs.cache-hit }}
|
||||
uses: actions/cache/save@v4
|
||||
with:
|
||||
path: '${{ runner.temp }}/${{ steps.calc.outputs.archive }}'
|
||||
key: ${{ steps.calc.outputs.cache-key }}
|
||||
- name: 'Extract libusb'
|
||||
shell: pwsh
|
||||
run: |
|
||||
7z "-o${{ runner.temp }}/ninja-${{ inputs.version }}-${{ runner.arch }}" x "${{ runner.temp }}/${{ steps.calc.outputs.archive }}"
|
||||
- name: 'Set output variables'
|
||||
id: final
|
||||
shell: pwsh
|
||||
run: |
|
||||
echo "${{ runner.temp }}/ninja-${{ inputs.version }}-${{ runner.arch }}" >> $env:GITHUB_PATH
|
93
.github/actions/setup-vita-gles/action.yml
vendored
Normal file
93
.github/actions/setup-vita-gles/action.yml
vendored
Normal file
@@ -0,0 +1,93 @@
|
||||
name: 'Setup GLES for PlayStation Vita'
|
||||
description: 'Download GLES for VITA (PVR or PIB), and copy it into the vita sdk'
|
||||
inputs:
|
||||
pib-version:
|
||||
description: 'PIB version'
|
||||
default: '1.1.4'
|
||||
pvr-version:
|
||||
description: 'PVR_PSP2 version'
|
||||
default: '3.9'
|
||||
type:
|
||||
description: '"pib" or "pvr"'
|
||||
default: ''
|
||||
runs:
|
||||
using: 'composite'
|
||||
steps:
|
||||
- name: 'Calculate variables'
|
||||
id: calc
|
||||
shell: sh
|
||||
run: |
|
||||
if test "x${VITASDK}" = "x"; then
|
||||
echo "VITASDK must be defined"
|
||||
exit 1;
|
||||
fi
|
||||
case "x${{ inputs.type }}" in
|
||||
"xpvr")
|
||||
echo "cache-key=SDL-vita-gles-pvr-${{ inputs.pvr-version}}" >> ${GITHUB_OUTPUT}
|
||||
;;
|
||||
"xpib")
|
||||
echo "cache-key=SDL-vita-gles-pib-${{ inputs.pib-version}}" >> ${GITHUB_OUTPUT}
|
||||
;;
|
||||
*)
|
||||
echo "Invalid type. Must be 'pib' or 'pvr'."
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
- uses: actions/cache/restore@v4
|
||||
id: restore-cache
|
||||
with:
|
||||
path: /vita/dependencies
|
||||
key: '${{ steps.calc.outputs.cache-key }}'
|
||||
- name: 'Download PVR_PSP2 (GLES)'
|
||||
if: ${{ !steps.restore-cache.outputs.cache-hit && inputs.type == 'pvr' }}
|
||||
shell: sh
|
||||
run: |
|
||||
pvr_psp2_version=${{ inputs.pvr-version }}
|
||||
|
||||
mkdir -p /vita/dependencies/include
|
||||
mkdir -p /vita/dependencies/lib
|
||||
|
||||
# Configure PVR_PSP2 headers
|
||||
wget https://github.com/GrapheneCt/PVR_PSP2/archive/refs/tags/v$pvr_psp2_version.zip -P/tmp
|
||||
unzip /tmp/v$pvr_psp2_version.zip -d/tmp
|
||||
cp -r /tmp/PVR_PSP2-$pvr_psp2_version/include/* /vita/dependencies/include
|
||||
rm /tmp/v$pvr_psp2_version.zip
|
||||
|
||||
# include guard of PVR_PSP2's khrplatform.h does not match the usual one
|
||||
sed -i -e s/__drvkhrplatform_h_/__khrplatform_h_/ /vita/dependencies/include/KHR/khrplatform.h
|
||||
|
||||
# Configure PVR_PSP2 stub libraries
|
||||
wget https://github.com/GrapheneCt/PVR_PSP2/releases/download/v$pvr_psp2_version/vitasdk_stubs.zip -P/tmp
|
||||
unzip /tmp/vitasdk_stubs.zip -d/tmp/pvr_psp2_stubs
|
||||
find /tmp/pvr_psp2_stubs -type f -name "*.a" -exec cp {} /vita/dependencies/lib \;
|
||||
rm /tmp/vitasdk_stubs.zip
|
||||
rm -rf /tmp/pvr_psp2_stubs
|
||||
|
||||
- name: 'Download gl4es4vita (OpenGL)'
|
||||
if: ${{ !steps.restore-cache.outputs.cache-hit && inputs.type == 'pib' }}
|
||||
shell: sh
|
||||
run: |
|
||||
gl4es4vita_version=${{ inputs.pib-version }}
|
||||
|
||||
mkdir -p /vita/dependencies/include
|
||||
mkdir -p /vita/dependencies/lib
|
||||
|
||||
# Configure gl4es4vita headers
|
||||
wget https://github.com/SonicMastr/gl4es4vita/releases/download/v$gl4es4vita_version-vita/include.zip -P/tmp
|
||||
unzip -o /tmp/include.zip -d/vita/dependencies/include
|
||||
rm /tmp/include.zip
|
||||
|
||||
# Configure gl4es4vita stub libraries
|
||||
wget https://github.com/SonicMastr/gl4es4vita/releases/download/v$gl4es4vita_version-vita/vitasdk_stubs.zip -P/tmp
|
||||
unzip /tmp/vitasdk_stubs.zip -d/vita/dependencies/lib
|
||||
|
||||
- uses: actions/cache/save@v4
|
||||
if: ${{ !steps.restore-cache.outputs.cache-hit }}
|
||||
with:
|
||||
path: /vita/dependencies
|
||||
key: '${{ steps.calc.outputs.cache-key }}'
|
||||
|
||||
- name: Copy PVR_PSP2 (GLES) or gl4es4vita (OpenGL) to vita toolchain dir
|
||||
shell: sh
|
||||
run: |
|
||||
cp -rv /vita/dependencies/* ${VITASDK}/arm-vita-eabi
|
2
.github/cmake/CMakeLists.txt
vendored
2
.github/cmake/CMakeLists.txt
vendored
@@ -1,4 +1,4 @@
|
||||
cmake_minimum_required(VERSION 3.0)
|
||||
cmake_minimum_required(VERSION 3.0...3.5)
|
||||
project(ci_utils C CXX)
|
||||
|
||||
set(txt "CC=${CMAKE_C_COMPILER}
|
||||
|
81
.github/workflows/android.yml
vendored
81
.github/workflows/android.yml
vendored
@@ -1,81 +0,0 @@
|
||||
name: Build (Android)
|
||||
|
||||
on: [push, pull_request]
|
||||
|
||||
jobs:
|
||||
android:
|
||||
name: ${{ matrix.platform.name }}
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
platform:
|
||||
- { name: Android.mk }
|
||||
- { name: CMake, cmake: 1, android_abi: "arm64-v8a", android_platform: 23, arch: "aarch64" }
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: nttld/setup-ndk@v1
|
||||
id: setup_ndk
|
||||
with:
|
||||
ndk-version: r21e
|
||||
- name: Build (Android.mk)
|
||||
if: ${{ matrix.platform.name == 'Android.mk' }}
|
||||
run: |
|
||||
./build-scripts/androidbuildlibs.sh
|
||||
- name: Setup (CMake)
|
||||
if: ${{ matrix.platform.name == 'CMake' }}
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install ninja-build pkg-config
|
||||
- name: Configure (CMake)
|
||||
if: ${{ matrix.platform.name == 'CMake' }}
|
||||
run: |
|
||||
cmake -B build \
|
||||
-DCMAKE_TOOLCHAIN_FILE=${{ steps.setup_ndk.outputs.ndk-path }}/build/cmake/android.toolchain.cmake \
|
||||
-DSDL_WERROR=ON \
|
||||
-DANDROID_PLATFORM=${{ matrix.platform.android_platform }} \
|
||||
-DANDROID_ABI=${{ matrix.platform.android_abi }} \
|
||||
-DSDL_STATIC_PIC=ON \
|
||||
-DSDL_VENDOR_INFO="Github Workflow" \
|
||||
-DCMAKE_INSTALL_PREFIX=prefix \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-GNinja
|
||||
- name: Build (CMake)
|
||||
if: ${{ matrix.platform.name == 'CMake' }}
|
||||
run: |
|
||||
cmake --build build --config Release --parallel --verbose
|
||||
- name: Install (CMake)
|
||||
if: ${{ matrix.platform.name == 'CMake' }}
|
||||
run: |
|
||||
cmake --install build --config Release
|
||||
echo "SDL2_DIR=$(pwd)/prefix" >> $GITHUB_ENV
|
||||
( cd prefix; find ) | LC_ALL=C sort -u
|
||||
- name: Verify CMake configuration files
|
||||
if: ${{ matrix.platform.name == 'CMake' }}
|
||||
run: |
|
||||
cmake -S cmake/test -B cmake_config_build -G Ninja \
|
||||
-DCMAKE_TOOLCHAIN_FILE=${{ steps.setup_ndk.outputs.ndk-path }}/build/cmake/android.toolchain.cmake \
|
||||
-DANDROID_PLATFORM=${{ matrix.platform.android_platform }} \
|
||||
-DANDROID_ABI=${{ matrix.platform.android_abi }} \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DCMAKE_PREFIX_PATH=${{ env.SDL2_DIR }}
|
||||
cmake --build cmake_config_build --verbose
|
||||
- name: Verify sdl2-config
|
||||
if: ${{ matrix.platform.name == 'CMake' }}
|
||||
run: |
|
||||
export CC="${{ steps.setup_ndk.outputs.ndk-path }}/toolchains/llvm/prebuilt/linux-x86_64/bin/clang --target=${{ matrix.platform.arch }}-none-linux-androideabi${{ matrix.platform.android_platform }}"
|
||||
export PATH=${{ env.SDL2_DIR }}/bin:$PATH
|
||||
cmake/test/test_sdlconfig.sh
|
||||
- name: Verify sdl2.pc
|
||||
if: ${{ matrix.platform.name == 'CMake' }}
|
||||
run: |
|
||||
export CC="${{ steps.setup_ndk.outputs.ndk-path }}/toolchains/llvm/prebuilt/linux-x86_64/bin/clang --target=${{ matrix.platform.arch }}-none-linux-androideabi${{ matrix.platform.android_platform }}"
|
||||
export PKG_CONFIG_PATH=${{ env.SDL2_DIR }}/lib/pkgconfig
|
||||
cmake/test/test_pkgconfig.sh
|
||||
- name: Verify Android.mk
|
||||
if: ${{ matrix.platform.name == 'CMake' }}
|
||||
run: |
|
||||
export NDK_MODULE_PATH=${{ env.SDL2_DIR }}/share/ndk-modules
|
||||
ndk-build -C ${{ github.workspace }}/cmake/test APP_PLATFORM=android-${{ matrix.platform.android_platform }} APP_ABI=${{ matrix.platform.android_abi }} NDK_OUT=$PWD NDK_LIBS_OUT=$PWD V=1
|
48
.github/workflows/build.yml
vendored
Normal file
48
.github/workflows/build.yml
vendored
Normal file
@@ -0,0 +1,48 @@
|
||||
name: 'Build (All)'
|
||||
|
||||
on: [push, pull_request]
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.run_id }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
controller:
|
||||
name: 'Create test plan'
|
||||
runs-on: 'ubuntu-latest'
|
||||
outputs:
|
||||
platforms-level1: ${{ steps.plan.outputs.platforms-level1 }}
|
||||
platforms-others: ${{ steps.plan.outputs.platforms-others }}
|
||||
steps:
|
||||
- uses: actions/setup-python@main
|
||||
with:
|
||||
python-version: 3.x
|
||||
- uses: actions/checkout@main
|
||||
with:
|
||||
sparse-checkout: '.github/workflows/create-test-plan.py'
|
||||
- name: 'Create plan'
|
||||
id: plan
|
||||
run: |
|
||||
# Adding [sdl-ci-filter GLOB] to the commit message will limit the jobs
|
||||
# e.g. [sdl-ci-filter msvc-*]
|
||||
EOF=$(openssl rand -hex 32)
|
||||
cat >/tmp/commit_message.txt <<$EOF
|
||||
${{ github.event.head_commit.message }}
|
||||
$EOF
|
||||
|
||||
python .github/workflows/create-test-plan.py \
|
||||
--github-variable-prefix platforms \
|
||||
--github-ci \
|
||||
--verbose \
|
||||
${{ (github.repository_owner != 'libsdl-org' && '--no-artifact') || '' }} \
|
||||
--commit-message-file /tmp/commit_message.txt
|
||||
level1:
|
||||
needs: [controller]
|
||||
uses: './.github/workflows/generic.yml'
|
||||
with:
|
||||
platforms: ${{ needs.controller.outputs.platforms-level1 }}
|
||||
level2:
|
||||
needs: [controller, level1]
|
||||
uses: './.github/workflows/generic.yml'
|
||||
with:
|
||||
platforms: ${{ needs.controller.outputs.platforms-others }}
|
791
.github/workflows/create-test-plan.py
vendored
Executable file
791
.github/workflows/create-test-plan.py
vendored
Executable file
@@ -0,0 +1,791 @@
|
||||
#!/usr/bin/env python
|
||||
import argparse
|
||||
import dataclasses
|
||||
import fnmatch
|
||||
from enum import Enum
|
||||
import json
|
||||
import logging
|
||||
import os
|
||||
import re
|
||||
from typing import Optional
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
class AppleArch(Enum):
|
||||
ARM64 = "arm64"
|
||||
X86_64 = "x86_64"
|
||||
|
||||
|
||||
class MsvcArch(Enum):
|
||||
X86 = "x86"
|
||||
X64 = "x64"
|
||||
Arm32 = "arm"
|
||||
Arm64 = "arm64"
|
||||
|
||||
|
||||
class JobOs(Enum):
|
||||
WindowsLatest = "windows-latest"
|
||||
UbuntuLatest = "ubuntu-latest"
|
||||
MacosLatest = "macos-latest"
|
||||
Ubuntu22_04 = "ubuntu-22.04"
|
||||
Ubuntu24_04 = "ubuntu-24.04"
|
||||
Macos13 = "macos-13"
|
||||
|
||||
|
||||
class SdlPlatform(Enum):
|
||||
Android = "android"
|
||||
Emscripten = "emscripten"
|
||||
Haiku = "haiku"
|
||||
Msys2 = "msys2"
|
||||
Linux = "linux"
|
||||
MacOS = "macos"
|
||||
Ios = "ios"
|
||||
Tvos = "tvos"
|
||||
Msvc = "msvc"
|
||||
N3ds = "n3ds"
|
||||
Ps2 = "ps2"
|
||||
Psp = "psp"
|
||||
Vita = "vita"
|
||||
Riscos = "riscos"
|
||||
FreeBSD = "freebsd"
|
||||
NetBSD = "netbsd"
|
||||
Watcom = "watcom"
|
||||
|
||||
|
||||
class Msys2Platform(Enum):
|
||||
Mingw32 = "mingw32"
|
||||
Mingw64 = "mingw64"
|
||||
Clang64 = "clang64"
|
||||
Ucrt64 = "ucrt64"
|
||||
|
||||
|
||||
class IntelCompiler(Enum):
|
||||
Icx = "icx"
|
||||
|
||||
|
||||
class VitaGLES(Enum):
|
||||
Pib = "pib"
|
||||
Pvr = "pvr"
|
||||
|
||||
class WatcomPlatform(Enum):
|
||||
Windows = "windows"
|
||||
OS2 = "OS/2"
|
||||
|
||||
|
||||
@dataclasses.dataclass(slots=True)
|
||||
class JobSpec:
|
||||
name: str
|
||||
os: JobOs
|
||||
platform: SdlPlatform
|
||||
artifact: Optional[str]
|
||||
container: Optional[str] = None
|
||||
autotools: bool = False
|
||||
no_cmake: bool = False
|
||||
xcode: bool = False
|
||||
android_mk: bool = False
|
||||
lean: bool = False
|
||||
android_arch: Optional[str] = None
|
||||
android_abi: Optional[str] = None
|
||||
android_platform: Optional[int] = None
|
||||
msys2_platform: Optional[Msys2Platform] = None
|
||||
intel: Optional[IntelCompiler] = None
|
||||
apple_archs: Optional[set[AppleArch]] = None
|
||||
msvc_project: Optional[str] = None
|
||||
msvc_arch: Optional[MsvcArch] = None
|
||||
msvc_static_crt: bool = False
|
||||
clang_cl: bool = False
|
||||
gdk: bool = False
|
||||
uwp: bool = False
|
||||
vita_gles: Optional[VitaGLES] = None
|
||||
watcom_platform: Optional[WatcomPlatform] = None
|
||||
|
||||
|
||||
JOB_SPECS = {
|
||||
"msys2-mingw32": JobSpec(name="Windows (msys2, mingw32)", os=JobOs.WindowsLatest, platform=SdlPlatform.Msys2, artifact="SDL-mingw32", msys2_platform=Msys2Platform.Mingw32, ),
|
||||
"msys2-mingw64": JobSpec(name="Windows (msys2, mingw64)", os=JobOs.WindowsLatest, platform=SdlPlatform.Msys2, artifact="SDL-mingw64", msys2_platform=Msys2Platform.Mingw64, ),
|
||||
"msys2-clang64": JobSpec(name="Windows (msys2, clang64)", os=JobOs.WindowsLatest, platform=SdlPlatform.Msys2, artifact="SDL-mingw64-clang", msys2_platform=Msys2Platform.Clang64, ),
|
||||
"msys2-ucrt64": JobSpec(name="Windows (msys2, ucrt64)", os=JobOs.WindowsLatest, platform=SdlPlatform.Msys2, artifact="SDL-mingw64-ucrt", msys2_platform=Msys2Platform.Ucrt64, ),
|
||||
"msvc-x64": JobSpec(name="Windows (MSVC, x64)", os=JobOs.WindowsLatest, platform=SdlPlatform.Msvc, artifact="SDL-VC-x64", msvc_arch=MsvcArch.X64, msvc_project="VisualC/SDL.sln", ),
|
||||
"msvc-x86": JobSpec(name="Windows (MSVC, x86)", os=JobOs.WindowsLatest, platform=SdlPlatform.Msvc, artifact="SDL-VC-x86", msvc_arch=MsvcArch.X86, msvc_project="VisualC/SDL.sln", ),
|
||||
"msvc-static-x86": JobSpec(name="Windows (MSVC, static VCRT, x86)", os=JobOs.WindowsLatest, platform=SdlPlatform.Msvc, artifact="SDL-VC-x86", msvc_arch=MsvcArch.X86, msvc_static_crt=True, ),
|
||||
"msvc-static-x64": JobSpec(name="Windows (MSVC, static VCRT, x64)", os=JobOs.WindowsLatest, platform=SdlPlatform.Msvc, artifact="SDL-VC-x64", msvc_arch=MsvcArch.X64, msvc_static_crt=True, ),
|
||||
"msvc-clang-x64": JobSpec(name="Windows (MSVC, clang-cl x64)", os=JobOs.WindowsLatest, platform=SdlPlatform.Msvc, artifact="SDL-clang-cl-x64", msvc_arch=MsvcArch.X64, clang_cl=True, ),
|
||||
"msvc-clang-x86": JobSpec(name="Windows (MSVC, clang-cl x86)", os=JobOs.WindowsLatest, platform=SdlPlatform.Msvc, artifact="SDL-clang-cl-x86", msvc_arch=MsvcArch.X86, clang_cl=True, ),
|
||||
"msvc-arm32": JobSpec(name="Windows (MSVC, ARM)", os=JobOs.WindowsLatest, platform=SdlPlatform.Msvc, artifact="SDL-VC-arm32", msvc_arch=MsvcArch.Arm32, ),
|
||||
"msvc-arm64": JobSpec(name="Windows (MSVC, ARM64)", os=JobOs.WindowsLatest, platform=SdlPlatform.Msvc, artifact="SDL-VC-arm64", msvc_arch=MsvcArch.Arm64, ),
|
||||
"msvc-uwp-x64": JobSpec(name="UWP (MSVC, x64)", os=JobOs.WindowsLatest, platform=SdlPlatform.Msvc, artifact="SDL-VC-UWP", msvc_arch=MsvcArch.X64, msvc_project="VisualC-WinRT/SDL-UWP.sln", uwp=True, ),
|
||||
"msvc-gdk-x64": JobSpec(name="GDK (MSVC, x64)", os=JobOs.WindowsLatest, platform=SdlPlatform.Msvc, artifact="SDL-VC-GDK", msvc_arch=MsvcArch.X64, msvc_project="VisualC-GDK/SDL.sln", gdk=True, no_cmake=True, ),
|
||||
"ubuntu-22.04": JobSpec(name="Ubuntu 22.04", os=JobOs.Ubuntu22_04, platform=SdlPlatform.Linux, artifact="SDL-ubuntu22.04", autotools=True),
|
||||
"steamrt-sniper": JobSpec(name="Steam Linux Runtime (Sniper)", os=JobOs.UbuntuLatest, platform=SdlPlatform.Linux, artifact="SDL-slrsniper", container="registry.gitlab.steamos.cloud/steamrt/sniper/sdk:beta", ),
|
||||
"ubuntu-intel-icx": JobSpec(name="Ubuntu 22.04 (Intel oneAPI)", os=JobOs.Ubuntu22_04, platform=SdlPlatform.Linux, artifact="SDL-ubuntu22.04-oneapi", intel=IntelCompiler.Icx, ),
|
||||
"macos-gnu-arm64-x64": JobSpec(name="MacOS (GNU prefix)", os=JobOs.MacosLatest, platform=SdlPlatform.MacOS, artifact="SDL-macos-arm64-x64-gnu",autotools=True, apple_archs={AppleArch.X86_64, AppleArch.ARM64, }, ),
|
||||
"ios": JobSpec(name="iOS (CMake & xcode)", os=JobOs.MacosLatest, platform=SdlPlatform.Ios, artifact="SDL-ios-arm64", xcode=True, ),
|
||||
"tvos": JobSpec(name="tvOS (CMake & xcode)", os=JobOs.MacosLatest, platform=SdlPlatform.Tvos, artifact="SDL-tvos-arm64", xcode=True, ),
|
||||
"android-cmake": JobSpec(name="Android (CMake)", os=JobOs.UbuntuLatest, platform=SdlPlatform.Android, artifact="SDL-android-arm64", android_abi="arm64-v8a", android_arch="aarch64", android_platform=23, ),
|
||||
"android-mk": JobSpec(name="Android (Android.mk)", os=JobOs.UbuntuLatest, platform=SdlPlatform.Android, artifact=None, no_cmake=True, android_mk=True, ),
|
||||
"emscripten": JobSpec(name="Emscripten", os=JobOs.UbuntuLatest, platform=SdlPlatform.Emscripten, artifact="SDL-emscripten", ),
|
||||
"haiku": JobSpec(name="Haiku", os=JobOs.UbuntuLatest, platform=SdlPlatform.Haiku, artifact="SDL-haiku-x64", container="ghcr.io/haiku/cross-compiler:x86_64-r1beta5", ),
|
||||
"n3ds": JobSpec(name="Nintendo 3DS", os=JobOs.UbuntuLatest, platform=SdlPlatform.N3ds, artifact="SDL-n3ds", container="devkitpro/devkitarm:latest", ),
|
||||
"ps2": JobSpec(name="Sony PlayStation 2", os=JobOs.UbuntuLatest, platform=SdlPlatform.Ps2, artifact="SDL-ps2", container="ps2dev/ps2dev:latest", ),
|
||||
"psp": JobSpec(name="Sony PlayStation Portable", os=JobOs.UbuntuLatest, platform=SdlPlatform.Psp, artifact="SDL-psp", container="pspdev/pspdev:latest", ),
|
||||
"vita-pib": JobSpec(name="Sony PlayStation Vita (GLES w/ pib)", os=JobOs.UbuntuLatest, platform=SdlPlatform.Vita, artifact="SDL-vita-pib", container="vitasdk/vitasdk:latest", vita_gles=VitaGLES.Pib, ),
|
||||
"vita-pvr": JobSpec(name="Sony PlayStation Vita (GLES w/ PVR_PSP2)", os=JobOs.UbuntuLatest, platform=SdlPlatform.Vita, artifact="SDL-vita-pvr", container="vitasdk/vitasdk:latest", vita_gles=VitaGLES.Pvr, ),
|
||||
"riscos": JobSpec(name="RISC OS", os=JobOs.UbuntuLatest, platform=SdlPlatform.Riscos, artifact="SDL-riscos", container="riscosdotinfo/riscos-gccsdk-4.7:latest", ),
|
||||
"netbsd": JobSpec(name="NetBSD", os=JobOs.UbuntuLatest, platform=SdlPlatform.NetBSD, artifact="SDL-netbsd-x64", autotools=True, ),
|
||||
"freebsd": JobSpec(name="FreeBSD", os=JobOs.UbuntuLatest, platform=SdlPlatform.FreeBSD, artifact="SDL-freebsd-x64", autotools=True, ),
|
||||
"watcom-win32": JobSpec(name="Watcom (Windows)", os=JobOs.WindowsLatest, platform=SdlPlatform.Watcom, artifact="SDL-watcom-win32", no_cmake=True, watcom_platform=WatcomPlatform.Windows ),
|
||||
"watcom-os2": JobSpec(name="Watcom (OS/2)", os=JobOs.WindowsLatest, platform=SdlPlatform.Watcom, artifact="SDL-watcom-win32", no_cmake=True, watcom_platform=WatcomPlatform.OS2 ),
|
||||
# "watcom-win32"
|
||||
# "watcom-os2"
|
||||
}
|
||||
|
||||
|
||||
class StaticLibType(Enum):
|
||||
MSVC = "SDL2-static.lib"
|
||||
A = "libSDL2.a"
|
||||
|
||||
|
||||
class SharedLibType(Enum):
|
||||
WIN32 = "SDL2.dll"
|
||||
SO_0 = "libSDL2-2.0.so.0"
|
||||
SO = "libSDL2.so"
|
||||
DYLIB = "libSDL2-2.0.0.dylib"
|
||||
FRAMEWORK = "SDL2.framework/Versions/A/SDL2"
|
||||
|
||||
|
||||
@dataclasses.dataclass(slots=True)
|
||||
class JobDetails:
|
||||
name: str
|
||||
key: str
|
||||
os: str
|
||||
platform: str
|
||||
artifact: str
|
||||
no_autotools: bool
|
||||
no_cmake: bool
|
||||
build_autotools_tests: bool = True
|
||||
build_tests: bool = True
|
||||
container: str = ""
|
||||
cmake_build_type: str = "RelWithDebInfo"
|
||||
shell: str = "sh"
|
||||
sudo: str = "sudo"
|
||||
cmake_config_emulator: str = ""
|
||||
apk_packages: list[str] = dataclasses.field(default_factory=list)
|
||||
apt_packages: list[str] = dataclasses.field(default_factory=list)
|
||||
brew_packages: list[str] = dataclasses.field(default_factory=list)
|
||||
cmake_toolchain_file: str = ""
|
||||
cmake_arguments: list[str] = dataclasses.field(default_factory=list)
|
||||
cmake_build_arguments: list[str] = dataclasses.field(default_factory=list)
|
||||
cppflags: list[str] = dataclasses.field(default_factory=list)
|
||||
cc: str = ""
|
||||
cxx: str = ""
|
||||
cflags: list[str] = dataclasses.field(default_factory=list)
|
||||
cxxflags: list[str] = dataclasses.field(default_factory=list)
|
||||
ldflags: list[str] = dataclasses.field(default_factory=list)
|
||||
pollute_directories: list[str] = dataclasses.field(default_factory=list)
|
||||
use_cmake: bool = True
|
||||
shared: bool = True
|
||||
static: bool = True
|
||||
shared_lib: Optional[SharedLibType] = None
|
||||
static_lib: Optional[StaticLibType] = None
|
||||
run_tests: bool = True
|
||||
test_pkg_config: bool = True
|
||||
cc_from_cmake: bool = False
|
||||
source_cmd: str = ""
|
||||
pretest_cmd: str = ""
|
||||
android_apks: list[str] = dataclasses.field(default_factory=list)
|
||||
android_ndk: bool = False
|
||||
android_mk: bool = False
|
||||
minidump: bool = False
|
||||
intel: bool = False
|
||||
msys2_msystem: str = ""
|
||||
msys2_env: str = ""
|
||||
msys2_no_perl: bool = False
|
||||
werror: bool = True
|
||||
msvc_vcvars_arch: str = ""
|
||||
msvc_vcvars_sdk: str = ""
|
||||
msvc_project: str = ""
|
||||
msvc_project_flags: list[str] = dataclasses.field(default_factory=list)
|
||||
setup_ninja: bool = False
|
||||
setup_libusb_arch: str = ""
|
||||
xcode_sdk: str = ""
|
||||
xcode_target: str = ""
|
||||
setup_gdk_folder: str = ""
|
||||
cpactions: bool = False
|
||||
cpactions_os: str = ""
|
||||
cpactions_version: str = ""
|
||||
cpactions_arch: str = ""
|
||||
cpactions_setup_cmd: str = ""
|
||||
cpactions_install_cmd: str = ""
|
||||
setup_vita_gles_type: str = ""
|
||||
check_sources: bool = False
|
||||
watcom_makefile: str = ""
|
||||
|
||||
def to_workflow(self, enable_artifacts: bool) -> dict[str, str|bool]:
|
||||
data = {
|
||||
"name": self.name,
|
||||
"key": self.key,
|
||||
"os": self.os,
|
||||
"container": self.container if self.container else "",
|
||||
"platform": self.platform,
|
||||
"artifact": self.artifact,
|
||||
"enable-artifacts": enable_artifacts,
|
||||
"shell": self.shell,
|
||||
"msys2-msystem": self.msys2_msystem,
|
||||
"msys2-env": self.msys2_env,
|
||||
"msys2-no-perl": self.msys2_no_perl,
|
||||
"android-ndk": self.android_ndk,
|
||||
"intel": self.intel,
|
||||
"apk-packages": my_shlex_join(self.apk_packages),
|
||||
"apt-packages": my_shlex_join(self.apt_packages),
|
||||
"test-pkg-config": self.test_pkg_config,
|
||||
"brew-packages": my_shlex_join(self.brew_packages),
|
||||
"pollute-directories": my_shlex_join(self.pollute_directories),
|
||||
"no-autotools": self.no_autotools,
|
||||
"no-cmake": self.no_cmake,
|
||||
"build-autotools-tests": self.build_autotools_tests,
|
||||
"build-tests": self.build_tests,
|
||||
"source-cmd": self.source_cmd,
|
||||
"pretest-cmd": self.pretest_cmd,
|
||||
"cmake-config-emulator": self.cmake_config_emulator,
|
||||
"cc": self.cc,
|
||||
"cxx": self.cxx,
|
||||
"cflags": my_shlex_join(self.cppflags + self.cflags),
|
||||
"cxxflags": my_shlex_join(self.cppflags + self.cxxflags),
|
||||
"ldflags": my_shlex_join(self.ldflags),
|
||||
"cmake-toolchain-file": self.cmake_toolchain_file,
|
||||
"cmake-arguments": my_shlex_join(self.cmake_arguments),
|
||||
"cmake-build-arguments": my_shlex_join(self.cmake_build_arguments),
|
||||
"shared": self.shared,
|
||||
"static": self.static,
|
||||
"shared-lib": self.shared_lib.value if self.shared_lib else None,
|
||||
"static-lib": self.static_lib.value if self.static_lib else None,
|
||||
"cmake-build-type": self.cmake_build_type,
|
||||
"run-tests": self.run_tests,
|
||||
"android-apks": my_shlex_join(self.android_apks),
|
||||
"android-mk": self.android_mk,
|
||||
"werror": self.werror,
|
||||
"sudo": self.sudo,
|
||||
"msvc-vcvars-arch": self.msvc_vcvars_arch,
|
||||
"msvc-vcvars-sdk": self.msvc_vcvars_sdk,
|
||||
"msvc-project": self.msvc_project,
|
||||
"msvc-project-flags": my_shlex_join(self.msvc_project_flags),
|
||||
"setup-ninja": self.setup_ninja,
|
||||
"setup-libusb-arch": self.setup_libusb_arch,
|
||||
"cc-from-cmake": self.cc_from_cmake,
|
||||
"xcode-sdk": self.xcode_sdk,
|
||||
"xcode-target": self.xcode_target,
|
||||
"cpactions": self.cpactions,
|
||||
"cpactions-os": self.cpactions_os,
|
||||
"cpactions-version": self.cpactions_version,
|
||||
"cpactions-arch": self.cpactions_arch,
|
||||
"cpactions-setup-cmd": self.cpactions_setup_cmd,
|
||||
"cpactions-install-cmd": self.cpactions_install_cmd,
|
||||
"setup-vita-gles-type": self.setup_vita_gles_type,
|
||||
"setup-gdk-folder": self.setup_gdk_folder,
|
||||
"check-sources": self.check_sources,
|
||||
"watcom-makefile": self.watcom_makefile,
|
||||
}
|
||||
return {k: v for k, v in data.items() if v != ""}
|
||||
|
||||
|
||||
def my_shlex_join(s):
|
||||
def escape(s):
|
||||
if s[:1] == "'" and s[-1:] == "'":
|
||||
return s
|
||||
if set(s).intersection(set("; \t")):
|
||||
s = s.replace("\\", "\\\\").replace("\"", "\\\"")
|
||||
return f'"{s}"'
|
||||
return s
|
||||
|
||||
return " ".join(escape(e) for e in s)
|
||||
|
||||
|
||||
def spec_to_job(spec: JobSpec, key: str, trackmem_symbol_names: bool) -> JobDetails:
|
||||
job = JobDetails(
|
||||
name=spec.name,
|
||||
key=key,
|
||||
os=spec.os.value,
|
||||
artifact=spec.artifact or "",
|
||||
container=spec.container or "",
|
||||
platform=spec.platform.value,
|
||||
sudo="sudo",
|
||||
no_autotools=not spec.autotools,
|
||||
no_cmake=spec.no_cmake,
|
||||
)
|
||||
if job.os.startswith("ubuntu"):
|
||||
job.apt_packages.extend([
|
||||
"ninja-build",
|
||||
"pkg-config",
|
||||
])
|
||||
if spec.msvc_static_crt:
|
||||
job.cmake_arguments.append("-DSDL_FORCE_STATIC_VCRT=ON")
|
||||
pretest_cmd = []
|
||||
if trackmem_symbol_names:
|
||||
pretest_cmd.append("export SDL_TRACKMEM_SYMBOL_NAMES=1")
|
||||
else:
|
||||
pretest_cmd.append("export SDL_TRACKMEM_SYMBOL_NAMES=0")
|
||||
win32 = spec.platform in (SdlPlatform.Msys2, SdlPlatform.Msvc)
|
||||
fpic = None
|
||||
build_parallel = True
|
||||
if spec.lean:
|
||||
job.cppflags.append("-DSDL_LEAN_AND_MEAN=1")
|
||||
if win32:
|
||||
job.cmake_arguments.append("-DSDLTEST_PROCDUMP=ON")
|
||||
job.minidump = True
|
||||
if spec.intel is not None:
|
||||
match spec.intel:
|
||||
case IntelCompiler.Icx:
|
||||
job.cc = "icx"
|
||||
job.cxx = "icpx"
|
||||
case _:
|
||||
raise ValueError(f"Invalid intel={spec.intel}")
|
||||
job.source_cmd = f"source /opt/intel/oneapi/setvars.sh;"
|
||||
job.intel = True
|
||||
job.shell = "bash"
|
||||
job.cmake_arguments.extend((
|
||||
f"-DCMAKE_C_COMPILER={job.cc}",
|
||||
f"-DCMAKE_CXX_COMPILER={job.cxx}",
|
||||
"-DCMAKE_SYSTEM_NAME=Linux",
|
||||
))
|
||||
match spec.platform:
|
||||
case SdlPlatform.Msvc:
|
||||
job.setup_ninja = not spec.gdk
|
||||
job.msvc_project = spec.msvc_project if spec.msvc_project else ""
|
||||
job.msvc_project_flags.append("-p:TreatWarningsAsError=true")
|
||||
job.test_pkg_config = False
|
||||
job.shared_lib = SharedLibType.WIN32
|
||||
job.static_lib = StaticLibType.MSVC
|
||||
job.cmake_arguments.extend((
|
||||
"-DCMAKE_MSVC_DEBUG_INFORMATION_FORMAT=ProgramDatabase",
|
||||
"-DCMAKE_EXE_LINKER_FLAGS=-DEBUG",
|
||||
"-DCMAKE_SHARED_LINKER_FLAGS=-DEBUG",
|
||||
))
|
||||
if spec.uwp:
|
||||
job.cmake_arguments.append("'-DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreaded$<$<CONFIG:Debug>:Debug>DLL'")
|
||||
else:
|
||||
job.cmake_arguments.append("'-DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreaded$<$<CONFIG:Debug>:Debug>'")
|
||||
|
||||
if spec.clang_cl:
|
||||
job.cmake_arguments.extend((
|
||||
"-DCMAKE_C_COMPILER=clang-cl",
|
||||
"-DCMAKE_CXX_COMPILER=clang-cl",
|
||||
))
|
||||
match spec.msvc_arch:
|
||||
case MsvcArch.X86:
|
||||
job.cflags.append("/clang:-m32")
|
||||
job.ldflags.append("/MACHINE:X86")
|
||||
case MsvcArch.X64:
|
||||
job.cflags.append("/clang:-m64")
|
||||
job.ldflags.append("/MACHINE:X64")
|
||||
case _:
|
||||
raise ValueError(f"Unsupported clang-cl architecture (arch={spec.msvc_arch})")
|
||||
if spec.msvc_project:
|
||||
match spec.msvc_arch:
|
||||
case MsvcArch.X86:
|
||||
msvc_platform = "Win32"
|
||||
case MsvcArch.X64:
|
||||
msvc_platform = "x64"
|
||||
case _:
|
||||
raise ValueError(f"Unsupported vcxproj architecture (arch={spec.msvc_arch})")
|
||||
if spec.gdk:
|
||||
msvc_platform = f"Gaming.Desktop.{msvc_platform}"
|
||||
job.msvc_project_flags.append(f"-p:Platform={msvc_platform}")
|
||||
match spec.msvc_arch:
|
||||
case MsvcArch.X86:
|
||||
job.msvc_vcvars_arch = "x64_x86"
|
||||
case MsvcArch.X64:
|
||||
job.msvc_vcvars_arch = "x64"
|
||||
case MsvcArch.Arm32:
|
||||
job.msvc_vcvars_arch = "x64_arm"
|
||||
job.msvc_vcvars_sdk = "10.0.22621.0" # 10.0.26100.0 dropped ARM32 um and ucrt libraries
|
||||
job.run_tests = False
|
||||
case MsvcArch.Arm64:
|
||||
job.msvc_vcvars_arch = "x64_arm64"
|
||||
job.run_tests = False
|
||||
if spec.uwp:
|
||||
job.build_tests = False
|
||||
job.cmake_arguments.extend((
|
||||
"-DCMAKE_SYSTEM_NAME=WindowsStore",
|
||||
"-DCMAKE_SYSTEM_VERSION=10.0",
|
||||
))
|
||||
job.msvc_project_flags.append("-p:WindowsTargetPlatformVersion=10.0.17763.0")
|
||||
elif spec.gdk:
|
||||
job.setup_gdk_folder = "VisualC-GDK"
|
||||
else:
|
||||
match spec.msvc_arch:
|
||||
case MsvcArch.X86:
|
||||
job.setup_libusb_arch = "x86"
|
||||
case MsvcArch.X64:
|
||||
job.setup_libusb_arch = "x64"
|
||||
case SdlPlatform.Linux:
|
||||
if spec.name.startswith("Ubuntu"):
|
||||
assert spec.os.value.startswith("ubuntu-")
|
||||
job.apt_packages.extend((
|
||||
"gnome-desktop-testing",
|
||||
"libasound2-dev",
|
||||
"libpulse-dev",
|
||||
"libaudio-dev",
|
||||
"libjack-dev",
|
||||
"libsndio-dev",
|
||||
"libusb-1.0-0-dev",
|
||||
"libx11-dev",
|
||||
"libxext-dev",
|
||||
"libxrandr-dev",
|
||||
"libxcursor-dev",
|
||||
"libxfixes-dev",
|
||||
"libxi-dev",
|
||||
"libxss-dev",
|
||||
"libwayland-dev",
|
||||
"libxkbcommon-dev",
|
||||
"libdrm-dev",
|
||||
"libgbm-dev",
|
||||
"libgl1-mesa-dev",
|
||||
"libgles2-mesa-dev",
|
||||
"libegl1-mesa-dev",
|
||||
"libdbus-1-dev",
|
||||
"libibus-1.0-dev",
|
||||
"libudev-dev",
|
||||
"fcitx-libs-dev",
|
||||
))
|
||||
ubuntu_year, ubuntu_month = [int(v) for v in spec.os.value.removeprefix("ubuntu-").split(".", 1)]
|
||||
if ubuntu_year >= 22:
|
||||
job.apt_packages.extend(("libpipewire-0.3-dev", "libdecor-0-dev"))
|
||||
job.apt_packages.extend((
|
||||
"libunwind-dev", # For SDL_test memory tracking
|
||||
))
|
||||
if trackmem_symbol_names:
|
||||
# older libunwind is slow
|
||||
job.cmake_arguments.append("-DSDLTEST_TIMEOUT_MULTIPLIER=2")
|
||||
job.shared_lib = SharedLibType.SO_0
|
||||
job.static_lib = StaticLibType.A
|
||||
fpic = True
|
||||
case SdlPlatform.Ios | SdlPlatform.Tvos:
|
||||
job.brew_packages.extend([
|
||||
"ninja",
|
||||
])
|
||||
job.run_tests = False
|
||||
job.test_pkg_config = False
|
||||
job.shared_lib = SharedLibType.DYLIB
|
||||
job.static_lib = StaticLibType.A
|
||||
match spec.platform:
|
||||
case SdlPlatform.Ios:
|
||||
if spec.xcode:
|
||||
job.xcode_sdk = "iphoneos"
|
||||
job.xcode_target = "Static Library-iOS"
|
||||
job.cmake_arguments.extend([
|
||||
"-DCMAKE_SYSTEM_NAME=iOS",
|
||||
"-DCMAKE_OSX_ARCHITECTURES=\"arm64\"",
|
||||
"-DCMAKE_OSX_DEPLOYMENT_TARGET=9.0",
|
||||
])
|
||||
case SdlPlatform.Tvos:
|
||||
if spec.xcode:
|
||||
job.xcode_sdk = "appletvos"
|
||||
job.xcode_target = "Static Library-tvOS"
|
||||
job.cmake_arguments.extend([
|
||||
"-DCMAKE_SYSTEM_NAME=tvOS",
|
||||
"-DCMAKE_OSX_ARCHITECTURES=\"arm64\"",
|
||||
"-DCMAKE_OSX_DEPLOYMENT_TARGET=9.0",
|
||||
])
|
||||
case SdlPlatform.MacOS:
|
||||
osx_arch = ";".join(e.value for e in spec.apple_archs) if spec.apple_archs else "arm64"
|
||||
job.cmake_arguments.extend((
|
||||
f"'-DCMAKE_OSX_ARCHITECTURES={osx_arch}'",
|
||||
"-DCMAKE_OSX_DEPLOYMENT_TARGET=10.11",
|
||||
))
|
||||
job.build_autotools_tests = False
|
||||
job.shared_lib = SharedLibType.DYLIB
|
||||
job.static_lib = StaticLibType.A
|
||||
job.apt_packages = []
|
||||
job.brew_packages.extend((
|
||||
"autoconf",
|
||||
"ninja",
|
||||
))
|
||||
if spec.xcode:
|
||||
job.xcode_sdk = "macosx"
|
||||
case SdlPlatform.Android:
|
||||
job.android_mk = spec.android_mk
|
||||
job.run_tests = False
|
||||
job.shared_lib = SharedLibType.SO
|
||||
job.static_lib = StaticLibType.A
|
||||
if spec.android_mk or not spec.no_cmake:
|
||||
job.android_ndk = True
|
||||
if spec.android_mk:
|
||||
job.apt_packages = []
|
||||
if not spec.no_cmake:
|
||||
job.cmake_arguments.extend((
|
||||
f"-DANDROID_PLATFORM={spec.android_platform}",
|
||||
f"-DANDROID_ABI={spec.android_abi}",
|
||||
))
|
||||
job.cmake_toolchain_file = "${ANDROID_NDK_HOME}/build/cmake/android.toolchain.cmake"
|
||||
job.cc = f"${{ANDROID_NDK_HOME}}/toolchains/llvm/prebuilt/linux-x86_64/bin/clang --target={spec.android_arch}-none-linux-androideabi{spec.android_platform}"
|
||||
|
||||
job.android_apks = [
|
||||
"testaudiorecording-apk",
|
||||
"testautomation-apk",
|
||||
"testcontroller-apk",
|
||||
"testmultiaudio-apk",
|
||||
"testsprite-apk",
|
||||
]
|
||||
case SdlPlatform.Emscripten:
|
||||
job.run_tests = False
|
||||
job.shared = False
|
||||
job.cmake_config_emulator = "emcmake"
|
||||
job.cmake_build_type = "Debug"
|
||||
job.test_pkg_config = False
|
||||
job.cmake_arguments.extend((
|
||||
"-DSDLTEST_BROWSER=chrome",
|
||||
"-DSDLTEST_TIMEOUT_MULTIPLIER=4",
|
||||
"-DSDLTEST_CHROME_BINARY=${CHROME_BINARY}",
|
||||
))
|
||||
job.static_lib = StaticLibType.A
|
||||
case SdlPlatform.Ps2:
|
||||
build_parallel = False
|
||||
job.shared = False
|
||||
job.sudo = ""
|
||||
job.apt_packages = []
|
||||
job.apk_packages = ["cmake", "gmp", "mpc1", "mpfr4", "ninja", "pkgconf", "git", ]
|
||||
job.cmake_toolchain_file = "${PS2DEV}/ps2sdk/ps2dev.cmake"
|
||||
job.run_tests = False
|
||||
job.shared = False
|
||||
job.cc = "mips64r5900el-ps2-elf-gcc"
|
||||
job.ldflags = ["-L${PS2DEV}/ps2sdk/ee/lib", "-L${PS2DEV}/gsKit/lib", "-L${PS2DEV}/ps2sdk/ports/lib", ]
|
||||
job.static_lib = StaticLibType.A
|
||||
case SdlPlatform.Psp:
|
||||
build_parallel = False
|
||||
job.sudo = ""
|
||||
job.apt_packages = []
|
||||
job.apk_packages = ["cmake", "gmp", "mpc1", "mpfr4", "ninja", "pkgconf", ]
|
||||
job.cmake_toolchain_file = "${PSPDEV}/psp/share/pspdev.cmake"
|
||||
job.run_tests = False
|
||||
job.shared = False
|
||||
job.cc = "psp-gcc"
|
||||
job.ldflags = ["-L${PSPDEV}/lib", "-L${PSPDEV}/psp/lib", "-L${PSPDEV}/psp/sdk/lib", ]
|
||||
job.pollute_directories = ["${PSPDEV}/include", "${PSPDEV}/psp/include", "${PSPDEV}/psp/sdk/include", ]
|
||||
job.static_lib = StaticLibType.A
|
||||
case SdlPlatform.Vita:
|
||||
job.sudo = ""
|
||||
job.apt_packages = []
|
||||
job.apk_packages = ["cmake", "ninja", "pkgconf", "bash", "tar"]
|
||||
job.cmake_toolchain_file = "${VITASDK}/share/vita.toolchain.cmake"
|
||||
assert spec.vita_gles is not None
|
||||
job.setup_vita_gles_type = {
|
||||
VitaGLES.Pib: "pib",
|
||||
VitaGLES.Pvr: "pvr",
|
||||
}[spec.vita_gles]
|
||||
job.cmake_arguments.extend((
|
||||
f"-DVIDEO_VITA_PIB={ 'true' if spec.vita_gles == VitaGLES.Pib else 'false' }",
|
||||
f"-DVIDEO_VITA_PVR={ 'true' if spec.vita_gles == VitaGLES.Pvr else 'false' }",
|
||||
"-DSDL_ARMNEON=ON",
|
||||
"-DSDL_ARMSIMD=ON",
|
||||
))
|
||||
# Fix vita.toolchain.cmake (https://github.com/vitasdk/vita-toolchain/pull/253)
|
||||
job.source_cmd = r"""sed -i -E "s#set\\( PKG_CONFIG_EXECUTABLE \"\\$\\{VITASDK}/bin/arm-vita-eabi-pkg-config\" \\)#set\\( PKG_CONFIG_EXECUTABLE \"${VITASDK}/bin/arm-vita-eabi-pkg-config\" CACHE PATH \"Path of pkg-config executable\" \\)#" ${VITASDK}/share/vita.toolchain.cmake"""
|
||||
job.run_tests = False
|
||||
job.shared = False
|
||||
job.cc = "arm-vita-eabi-gcc"
|
||||
job.static_lib = StaticLibType.A
|
||||
case SdlPlatform.Haiku:
|
||||
fpic = False
|
||||
job.build_autotools_tests = False
|
||||
job.run_tests = False
|
||||
job.cc = "x86_64-unknown-haiku-gcc"
|
||||
job.cxx = "x86_64-unknown-haiku-g++"
|
||||
job.sudo = ""
|
||||
job.cmake_arguments.extend((
|
||||
f"-DCMAKE_C_COMPILER={job.cc}",
|
||||
f"-DCMAKE_CXX_COMPILER={job.cxx}",
|
||||
"-DSDL_UNIX_CONSOLE_BUILD=ON",
|
||||
))
|
||||
job.shared_lib = SharedLibType.SO_0
|
||||
job.static_lib = StaticLibType.A
|
||||
case SdlPlatform.N3ds:
|
||||
job.shared = False
|
||||
job.apt_packages = ["ninja-build", "binutils"]
|
||||
job.run_tests = False
|
||||
job.cc_from_cmake = True
|
||||
job.cmake_toolchain_file = "${DEVKITPRO}/cmake/3DS.cmake"
|
||||
job.static_lib = StaticLibType.A
|
||||
case SdlPlatform.Msys2:
|
||||
job.shell = "msys2 {0}"
|
||||
assert spec.msys2_platform
|
||||
job.msys2_msystem = spec.msys2_platform.value
|
||||
job.msys2_env = {
|
||||
"mingw32": "mingw-w64-i686",
|
||||
"mingw64": "mingw-w64-x86_64",
|
||||
"clang32": "mingw-w64-clang-i686",
|
||||
"clang64": "mingw-w64-clang-x86_64",
|
||||
"ucrt64": "mingw-w64-ucrt-x86_64",
|
||||
}[spec.msys2_platform.value]
|
||||
job.msys2_no_perl = spec.msys2_platform in (Msys2Platform.Mingw32, )
|
||||
job.shared_lib = SharedLibType.WIN32
|
||||
job.static_lib = StaticLibType.A
|
||||
case SdlPlatform.Riscos:
|
||||
# FIXME: Enable SDL_WERROR
|
||||
job.werror = False
|
||||
job.build_autotools_tests = False
|
||||
job.apt_packages = ["cmake", "ninja-build"]
|
||||
job.test_pkg_config = False
|
||||
job.shared = False
|
||||
job.run_tests = False
|
||||
job.sudo = ""
|
||||
job.cmake_arguments.extend((
|
||||
"-DRISCOS:BOOL=ON",
|
||||
"-DCMAKE_DISABLE_PRECOMPILE_HEADERS:BOOL=ON",
|
||||
"-DSDL_GCC_ATOMICS:BOOL=OFF",
|
||||
))
|
||||
job.cmake_toolchain_file = "/home/riscos/env/toolchain-riscos.cmake"
|
||||
job.static_lib = StaticLibType.A
|
||||
case SdlPlatform.FreeBSD | SdlPlatform.NetBSD:
|
||||
job.build_autotools_tests = False
|
||||
job.cpactions = True
|
||||
job.no_cmake = True
|
||||
job.run_tests = False
|
||||
job.apt_packages = []
|
||||
job.shared_lib = SharedLibType.SO_0
|
||||
job.static_lib = StaticLibType.A
|
||||
match spec.platform:
|
||||
case SdlPlatform.FreeBSD:
|
||||
job.cpactions_os = "freebsd"
|
||||
job.cpactions_version = "14.2"
|
||||
job.cpactions_arch = "x86-64"
|
||||
job.cpactions_setup_cmd = "sudo pkg update"
|
||||
job.cpactions_install_cmd = "sudo pkg install -y cmake ninja pkgconf libXcursor libXext libXinerama libXi libXfixes libXrandr libXScrnSaver libXxf86vm wayland wayland-protocols libxkbcommon mesa-libs libglvnd evdev-proto libinotify alsa-lib jackit pipewire pulseaudio sndio dbus zh-fcitx ibus libudev-devd"
|
||||
job.cmake_arguments.extend((
|
||||
"-DSDL_CHECK_REQUIRED_INCLUDES=/usr/local/include",
|
||||
"-DSDL_CHECK_REQUIRED_LINK_OPTIONS=-L/usr/local/lib",
|
||||
))
|
||||
case SdlPlatform.NetBSD:
|
||||
job.cpactions_os = "netbsd"
|
||||
job.cpactions_version = "10.1"
|
||||
job.cpactions_arch = "x86-64"
|
||||
job.cpactions_setup_cmd = "export PATH=\"/usr/pkg/sbin:/usr/pkg/bin:/sbin:$PATH\"; export PKG_CONFIG_PATH=\"/usr/pkg/lib/pkgconfig\";export PKG_PATH=\"https://cdn.netBSD.org/pub/pkgsrc/packages/NetBSD/$(uname -p)/$(uname -r|cut -f \"1 2\" -d.)/All/\";echo \"PKG_PATH=$PKG_PATH\";echo \"uname -a -> \"$(uname -a)\"\";sudo -E sysctl -w security.pax.aslr.enabled=0;sudo -E sysctl -w security.pax.aslr.global=0;sudo -E pkgin clean;sudo -E pkgin update"
|
||||
job.cpactions_install_cmd = "sudo -E pkgin -y install cmake dbus pkgconf ninja-build pulseaudio libxkbcommon wayland wayland-protocols libinotify libusb1"
|
||||
case SdlPlatform.Watcom:
|
||||
match spec.watcom_platform:
|
||||
case WatcomPlatform.OS2:
|
||||
job.watcom_makefile = "Makefile.os2"
|
||||
job.run_tests = False
|
||||
case WatcomPlatform.Windows:
|
||||
job.watcom_makefile = "Makefile.w32"
|
||||
job.run_tests = True
|
||||
case _:
|
||||
raise ValueError(f"Unsupported watcom_platform=${spec.watcom_platform}")
|
||||
case _:
|
||||
raise ValueError(f"Unsupported platform={spec.platform}")
|
||||
|
||||
if "ubuntu" in spec.name.lower():
|
||||
job.check_sources = True
|
||||
|
||||
if not build_parallel:
|
||||
job.cmake_build_arguments.append("-j1")
|
||||
if job.cflags:
|
||||
job.cmake_arguments.append(f"-DCMAKE_C_FLAGS={my_shlex_join(job.cflags)}")
|
||||
if job.cxxflags:
|
||||
job.cmake_arguments.append(f"-DCMAKE_CXX_FLAGS={my_shlex_join(job.cxxflags)}")
|
||||
if job.ldflags:
|
||||
job.cmake_arguments.append(f"-DCMAKE_SHARED_LINKER_FLAGS={my_shlex_join(job.ldflags)}")
|
||||
job.cmake_arguments.append(f"-DCMAKE_EXE_LINKER_FLAGS={my_shlex_join(job.ldflags)}")
|
||||
job.pretest_cmd = "\n".join(pretest_cmd)
|
||||
def tf(b):
|
||||
return "ON" if b else "OFF"
|
||||
|
||||
if fpic is not None:
|
||||
job.cmake_arguments.append(f"-DCMAKE_POSITION_INDEPENDENT_CODE={tf(fpic)}")
|
||||
|
||||
if job.no_cmake:
|
||||
job.cmake_arguments = []
|
||||
|
||||
return job
|
||||
|
||||
|
||||
def spec_to_platform(spec: JobSpec, key: str, enable_artifacts: bool, trackmem_symbol_names: bool) -> dict[str, str|bool]:
|
||||
logger.info("spec=%r", spec)
|
||||
job = spec_to_job(spec, key=key, trackmem_symbol_names=trackmem_symbol_names)
|
||||
logger.info("job=%r", job)
|
||||
platform = job.to_workflow(enable_artifacts=enable_artifacts)
|
||||
logger.info("platform=%r", platform)
|
||||
return platform
|
||||
|
||||
|
||||
def main():
|
||||
parser = argparse.ArgumentParser(allow_abbrev=False)
|
||||
parser.add_argument("--github-variable-prefix", default="platforms")
|
||||
parser.add_argument("--github-ci", action="store_true")
|
||||
parser.add_argument("--verbose", action="store_true")
|
||||
parser.add_argument("--commit-message-file")
|
||||
parser.add_argument("--no-artifact", dest="enable_artifacts", action="store_false")
|
||||
parser.add_argument("--trackmem-symbol-names", dest="trackmem_symbol_names", action="store_true")
|
||||
args = parser.parse_args()
|
||||
|
||||
logging.basicConfig(level=logging.INFO if args.verbose else logging.WARNING)
|
||||
|
||||
remaining_keys = set(JOB_SPECS.keys())
|
||||
|
||||
all_level_keys = (
|
||||
# Level 1
|
||||
(
|
||||
"haiku",
|
||||
),
|
||||
)
|
||||
|
||||
filters = []
|
||||
if args.commit_message_file:
|
||||
with open(args.commit_message_file, "r") as f:
|
||||
commit_message = f.read()
|
||||
for m in re.finditer(r"\[sdl-ci-filter (.*)]", commit_message, flags=re.M):
|
||||
filters.append(m.group(1).strip(" \t\n\r\t'\""))
|
||||
|
||||
if re.search(r"\[sdl-ci-artifacts?]", commit_message, flags=re.M):
|
||||
args.enable_artifacts = True
|
||||
|
||||
if re.search(r"\[sdl-ci-(full-)?trackmem(-symbol-names)?]", commit_message, flags=re.M):
|
||||
args.trackmem_symbol_names = True
|
||||
|
||||
if not filters:
|
||||
filters.append("*")
|
||||
|
||||
logger.info("filters: %r", filters)
|
||||
|
||||
all_level_platforms = {}
|
||||
|
||||
all_platforms = {key: spec_to_platform(spec, key=key, enable_artifacts=args.enable_artifacts, trackmem_symbol_names=args.trackmem_symbol_names) for key, spec in JOB_SPECS.items()}
|
||||
|
||||
for level_i, level_keys in enumerate(all_level_keys, 1):
|
||||
level_key = f"level{level_i}"
|
||||
logger.info("Level %d: keys=%r", level_i, level_keys)
|
||||
assert all(k in remaining_keys for k in level_keys)
|
||||
level_platforms = tuple(all_platforms[key] for key in level_keys)
|
||||
remaining_keys.difference_update(level_keys)
|
||||
all_level_platforms[level_key] = level_platforms
|
||||
logger.info("=" * 80)
|
||||
|
||||
logger.info("Keys before filter: %r", remaining_keys)
|
||||
|
||||
filtered_remaining_keys = set()
|
||||
for filter in filters:
|
||||
filtered_remaining_keys.update(fnmatch.filter(remaining_keys, filter))
|
||||
|
||||
logger.info("Keys after filter: %r", filtered_remaining_keys)
|
||||
|
||||
remaining_keys = filtered_remaining_keys
|
||||
|
||||
logger.info("Remaining: %r", remaining_keys)
|
||||
all_level_platforms["others"] = tuple(all_platforms[key] for key in remaining_keys)
|
||||
|
||||
if args.github_ci:
|
||||
for level, platforms in all_level_platforms.items():
|
||||
platforms_json = json.dumps(platforms)
|
||||
txt = f"{args.github_variable_prefix}-{level}={platforms_json}"
|
||||
logger.info("%s", txt)
|
||||
if "GITHUB_OUTPUT" in os.environ:
|
||||
with open(os.environ["GITHUB_OUTPUT"], "a") as f:
|
||||
f.write(txt)
|
||||
f.write("\n")
|
||||
else:
|
||||
logger.warning("GITHUB_OUTPUT not defined")
|
||||
return 0
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
raise SystemExit(main())
|
45
.github/workflows/emscripten.yml
vendored
45
.github/workflows/emscripten.yml
vendored
@@ -1,45 +0,0 @@
|
||||
name: Build (Emscripten)
|
||||
|
||||
on: [push, pull_request]
|
||||
|
||||
jobs:
|
||||
emscripten:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: mymindstorm/setup-emsdk@v10
|
||||
with:
|
||||
version: 2.0.32
|
||||
- name: Install ninja
|
||||
run: |
|
||||
sudo apt-get -y update
|
||||
sudo apt-get install -y ninja-build
|
||||
- name: Configure CMake
|
||||
run: |
|
||||
emcmake cmake -S . -B build \
|
||||
-DSDL_WERROR=ON \
|
||||
-DSDL_TESTS=ON \
|
||||
-DSDL_INSTALL_TESTS=ON \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DCMAKE_INSTALL_PREFIX=prefix \
|
||||
-GNinja
|
||||
- name: Build
|
||||
run: cmake --build build/ --verbose
|
||||
- name: Run build-time tests
|
||||
run: |
|
||||
set -eu
|
||||
export SDL_TESTS_QUICK=1
|
||||
# FIXME: enable Emscripten build time tests
|
||||
# ctest -VV --test-dir build/
|
||||
- name: Install
|
||||
run: |
|
||||
echo "SDL2_DIR=$(pwd)/prefix" >> $GITHUB_ENV
|
||||
cmake --install build/
|
||||
- name: Verify CMake configuration files
|
||||
run: |
|
||||
emcmake cmake -S cmake/test -B cmake_config_build \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DSDL_VENDOR_INFO="Github Workflow" \
|
||||
-DTEST_SHARED=FALSE \
|
||||
-DCMAKE_PREFIX_PATH=${{ env.SDL2_DIR }}
|
||||
cmake --build cmake_config_build --verbose
|
352
.github/workflows/generic.yml
vendored
Normal file
352
.github/workflows/generic.yml
vendored
Normal file
@@ -0,0 +1,352 @@
|
||||
name: 'Build'
|
||||
run-name: 'Configure, Build and Test SDL'
|
||||
|
||||
on:
|
||||
workflow_call:
|
||||
inputs:
|
||||
platforms:
|
||||
description: 'JSON-encoded test properties'
|
||||
type: string
|
||||
required: true
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: ${{ matrix.platform.name }}
|
||||
runs-on: ${{ matrix.platform.os }}
|
||||
container: ${{ matrix.platform.container }}
|
||||
defaults:
|
||||
run:
|
||||
shell: ${{ matrix.platform.shell }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
platform: ${{ fromJSON(inputs.platforms) }}
|
||||
steps:
|
||||
- name: 'Set up MSYS2'
|
||||
if: ${{ matrix.platform.platform == 'msys2' }}
|
||||
uses: msys2/setup-msys2@v2
|
||||
with:
|
||||
msystem: ${{ matrix.platform.msys2-msystem }}
|
||||
install: >-
|
||||
${{ matrix.platform.msys2-env }}-cc
|
||||
${{ matrix.platform.msys2-env }}-cmake
|
||||
${{ matrix.platform.msys2-env }}-ninja
|
||||
${{ (!matrix.platform.msys2-no-perl && format('{0}-perl', matrix.platform.msys2-env)) || '' }}
|
||||
${{ matrix.platform.msys2-env }}-pkg-config
|
||||
${{ matrix.platform.msys2-env }}-clang-tools-extra
|
||||
- name: 'About this job'
|
||||
run: |
|
||||
echo "key=${{ matrix.platform.key }}"
|
||||
echo "name=${{ matrix.platform.name }}"
|
||||
echo "os=${{ matrix.platform.os }}"
|
||||
echo ""
|
||||
echo "Add [sdl-ci-filter ${{ matrix.platform.key }}] to your commit message to reduce the number of jobs."
|
||||
- uses: actions/checkout@v4
|
||||
- name: 'Set up ninja'
|
||||
if: ${{ matrix.platform.setup-ninja }}
|
||||
uses: ./.github/actions/setup-ninja
|
||||
- uses: mymindstorm/setup-emsdk@v14
|
||||
if: ${{ matrix.platform.platform == 'emscripten' }}
|
||||
with:
|
||||
version: 3.1.35
|
||||
- uses: nttld/setup-ndk@v1
|
||||
if: ${{ matrix.platform.android-ndk }}
|
||||
id: setup-ndk
|
||||
with:
|
||||
local-cache: true
|
||||
ndk-version: r21e
|
||||
- uses: ilammy/msvc-dev-cmd@v1
|
||||
if: ${{ matrix.platform.platform == 'msvc' }}
|
||||
with:
|
||||
arch: ${{ matrix.platform.msvc-vcvars-arch }}
|
||||
sdk: ${{ matrix.platform.msvc-vcvars-sdk }}
|
||||
- name: 'Set up Windows GDK Desktop'
|
||||
uses: ./.github/actions/setup-gdk-desktop
|
||||
if: ${{ matrix.platform.setup-gdk-folder != '' }}
|
||||
with:
|
||||
folder: '${{ matrix.platform.setup-gdk-folder }}'
|
||||
- name: 'Setup Intel oneAPI toolchain'
|
||||
id: intel
|
||||
if: ${{ matrix.platform.intel }}
|
||||
run: |
|
||||
# Download the key to system keyring
|
||||
wget -O- https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB \
|
||||
| gpg --dearmor | sudo tee /usr/share/keyrings/oneapi-archive-keyring.gpg > /dev/null
|
||||
|
||||
# Add signed entry to apt sources and configure the APT client to use Intel repository:
|
||||
echo "deb [signed-by=/usr/share/keyrings/oneapi-archive-keyring.gpg] https://apt.repos.intel.com/oneapi all main" | sudo tee /etc/apt/sources.list.d/oneAPI.list
|
||||
|
||||
# Update package list
|
||||
sudo apt-get update -y
|
||||
|
||||
# Install oneAPI
|
||||
sudo apt-get install -y intel-oneapi-compiler-dpcpp-cpp-and-cpp-classic
|
||||
- name: 'Install apk packages'
|
||||
if: ${{ matrix.platform.apk-packages != '' }}
|
||||
run: |
|
||||
${{ matrix.platform.sudo }} apk update
|
||||
${{ matrix.platform.sudo }} apk add ${{ matrix.platform.apk-packages }}
|
||||
- name: 'Install apt packages'
|
||||
if: ${{ matrix.platform.apt-packages != '' }}
|
||||
run: |
|
||||
${{ matrix.platform.sudo }} apt-get update
|
||||
${{ matrix.platform.sudo }} apt-get install -y ${{ matrix.platform.apt-packages }}
|
||||
- name: 'Install brew packages'
|
||||
if: ${{ matrix.platform.brew-packages != '' }}
|
||||
run: |
|
||||
export HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK=1
|
||||
brew update
|
||||
brew install ${{ matrix.platform.brew-packages }}
|
||||
- name: 'Set up GLES for VITA' # Must be after apk
|
||||
if: ${{ matrix.platform.setup-vita-gles-type != '' }}
|
||||
uses: ./.github/actions/setup-vita-gles
|
||||
with:
|
||||
type: ${{ matrix.platform.setup-vita-gles-type }}
|
||||
|
||||
- name: 'Configure (Autotools)'
|
||||
if: ${{ !matrix.platform.no-autotools }}
|
||||
run: |
|
||||
${{ matrix.platform.source_cmd }}
|
||||
set -eu
|
||||
rm -rf build-autotools
|
||||
mkdir build-autotools
|
||||
./autogen.sh
|
||||
(
|
||||
cd build-autotools
|
||||
../configure \
|
||||
--enable-vendor-info="Github Workflow" \
|
||||
--enable-werror \
|
||||
--prefix=${{ github.workspace }}/autotools_prefix \
|
||||
)
|
||||
if test "x${{ (matrix.platform.build-autotools-tests && 'yes') || 'no' }}" = "xyes" ; then
|
||||
curdir="$(pwd)"
|
||||
multiarch="$(dpkg-architecture -qDEB_HOST_MULTIARCH)"
|
||||
(
|
||||
mkdir -p build-autotools/test
|
||||
cd build-autotools/test
|
||||
../../test/configure \
|
||||
--enable-werror \
|
||||
--x-includes=/usr/include \
|
||||
--x-libraries="/usr/lib/${multiarch}" \
|
||||
--prefix=${{ github.workspace }}/autotools_prefix \
|
||||
SDL_CFLAGS="-I${curdir}/include" \
|
||||
SDL_LIBS="-L${curdir}/build-autotools/build/.libs -lSDL2" \
|
||||
ac_cv_lib_SDL2_ttf_TTF_Init=no \
|
||||
${NULL+}
|
||||
)
|
||||
fi
|
||||
- name: 'Build (Autotools)'
|
||||
if: ${{ !matrix.platform.no-autotools }}
|
||||
run: |
|
||||
${{ matrix.platform.source_cmd }}
|
||||
set -eu
|
||||
parallel="$(getconf _NPROCESSORS_ONLN)"
|
||||
make -j"${parallel}" -C build-autotools V=1
|
||||
if test "x${{ (matrix.platform.build-autotools-tests && 'yes') || 'no' }}" = "xyes" ; then
|
||||
make -j"${parallel}" -C build-autotools/test V=1
|
||||
fi
|
||||
- name: 'Run build-time tests (Autotools)'
|
||||
if: ${{ !matrix.platform.no-autotools && matrix.platform.build-autotools-tests && matrix.platform.run-tests }}
|
||||
run: |
|
||||
${{ matrix.platform.source_cmd }}
|
||||
set -eu
|
||||
curdir="$(pwd)"
|
||||
parallel="$(getconf _NPROCESSORS_ONLN)"
|
||||
export SDL_TESTS_QUICK=1
|
||||
make -j"${parallel}" -C build-autotools/test check LD_LIBRARY_PATH="${curdir}/build-autotools/build/.libs"
|
||||
if test "${{ runner.os }}" = "Linux"; then
|
||||
# This should show us the SDL_REVISION
|
||||
strings "${curdir}/build-autotools/build/.libs/libSDL2-2.0.so.0" | grep SDL-
|
||||
fi
|
||||
- name: 'Install (Autotools)'
|
||||
if: ${{ !matrix.platform.no-autotools }}
|
||||
run: |
|
||||
${{ matrix.platform.source_cmd }}
|
||||
set -eu
|
||||
curdir="$(pwd)"
|
||||
parallel="$(getconf _NPROCESSORS_ONLN)"
|
||||
make -j"${parallel}" -C build-autotools install V=1
|
||||
if test "x${{ (matrix.platform.build-autotools-tests && 'yes') || 'no' }}" = "xyes" ; then
|
||||
make -j"${parallel}" -C build-autotools/test install V=1
|
||||
fi
|
||||
( cd autotools_prefix; find . ) | LC_ALL=C sort -u
|
||||
echo "prefix=$(pwd)/autotools_prefix" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: 'Configure (CMake)'
|
||||
if: ${{ !matrix.platform.no-cmake }}
|
||||
#shell: ${{ matrix.platform.shell }}
|
||||
run: |
|
||||
${{ matrix.platform.source-cmd }}
|
||||
${{ matrix.platform.cmake-config-emulator }} cmake -S . -B build -GNinja \
|
||||
-Wdeprecated -Wdev -Werror \
|
||||
${{ matrix.platform.cmake-toolchain-file != '' && format('-DCMAKE_TOOLCHAIN_FILE={0}', matrix.platform.cmake-toolchain-file) || '' }} \
|
||||
-DSDL_WERROR=${{ matrix.platform.werror }} \
|
||||
-DSDL_TESTS=${{ matrix.platform.build-tests }} \
|
||||
-DSDLTEST_TRACKMEM=OFF \
|
||||
-DSDL_INSTALL_TESTS=${{ matrix.platform.build-tests }} \
|
||||
-DSDL_DISABLE_INSTALL_DOCS=OFF \
|
||||
-DSDL_DISABLE_INSTALL_DOCS=OFF \
|
||||
${{ matrix.platform.cmake-arguments }} \
|
||||
-DSDL_SHARED=${{ matrix.platform.shared }} \
|
||||
-DSDL_STATIC=${{ matrix.platform.static }} \
|
||||
-DSDL_TEST=ON \
|
||||
-DSDL_VENDOR_INFO="Github Workflow" \
|
||||
-DCMAKE_INSTALL_PREFIX=prefix \
|
||||
-DCMAKE_INSTALL_LIBDIR=lib \
|
||||
-DSDL_CMAKE_DEBUG_POSTFIX="" \
|
||||
-DCMAKE_BUILD_TYPE=${{ matrix.platform.cmake-build-type }}
|
||||
- name: 'Build (CMake)'
|
||||
id: cmake-build
|
||||
if: ${{ !matrix.platform.no-cmake }}
|
||||
# shell: ${{ matrix.platform.shell }}
|
||||
run: |
|
||||
${{ matrix.platform.source-cmd }}
|
||||
cmake --build build --config ${{ matrix.platform.cmake-build-type }} --verbose -- ${{ matrix.platform.cmake-build-arguments }}
|
||||
- name: 'Verify SDL_REVISION'
|
||||
if: ${{ !matrix.platform.no-cmake }}
|
||||
run: |
|
||||
echo "This should show us the SDL_REVISION"
|
||||
echo "Shared library:"
|
||||
${{ (matrix.platform.shared-lib && format('strings build/{0} | grep "Github Workflow"', matrix.platform.shared-lib)) || 'echo "<Shared library not supported by platform>"' }}
|
||||
echo "Static library:"
|
||||
${{ (matrix.platform.static-lib && format('strings build/{0} | grep "Github Workflow"', matrix.platform.static-lib)) || 'echo "<Static library not supported by platform>"' }}
|
||||
- name: 'Run build-time tests (CMake)'
|
||||
id: cmake-tests
|
||||
if: ${{ !matrix.platform.no-cmake && matrix.platform.run-tests }}
|
||||
# shell: ${{ matrix.platform.shell }}
|
||||
run: |
|
||||
${{ matrix.platform.source-cmd }}
|
||||
${{ matrix.platform.pretest-cmd }}
|
||||
set -eu
|
||||
export SDL_TESTS_QUICK=1
|
||||
ctest -VV --test-dir build/ -j2
|
||||
- name: 'Install (CMake)'
|
||||
id: cmake-install
|
||||
if: ${{ steps.build.outcome == 'success' }}
|
||||
# shell: ${{ matrix.platform.shell }}
|
||||
run: |
|
||||
${{ matrix.platform.source-cmd }}
|
||||
cmake --install build --config ${{ matrix.platform.cmake-build-type }}
|
||||
echo "prefix=$(pwd)/prefix" >> $GITHUB_OUTPUT
|
||||
( cd prefix; find . ) | LC_ALL=C sort -u
|
||||
- name: 'Verify CMake configuration files (CMake)'
|
||||
if: ${{ steps.cmake-install.outcome == 'success' }}
|
||||
# shell: ${{ matrix.platform.shell }}
|
||||
run: |
|
||||
${{ matrix.platform.source-cmd }}
|
||||
${{ matrix.platform.cmake-config-emulator }} cmake -S cmake/test -B cmake_test_build -GNinja \
|
||||
${{ matrix.platform.cmake-toolchain-file != '' && format('-DCMAKE_TOOLCHAIN_FILE={0}', matrix.platform.cmake-toolchain-file) || '' }} \
|
||||
-DTEST_SHARED=${{ matrix.platform.shared }} \
|
||||
-DTEST_STATIC=${{ matrix.platform.static }} \
|
||||
${{ matrix.platform.cmake-arguments }} \
|
||||
-DCMAKE_BUILD_TYPE=${{ matrix.platform.cmake-build-type }} \
|
||||
-DCMAKE_PREFIX_PATH="${{ steps.cmake-install.outputs.prefix }}"
|
||||
cmake --build cmake_test_build --verbose --config ${{ matrix.platform.cmake-build-type }} -- ${{ matrix.platform.cmake-build-arguments }}
|
||||
- name: 'Extract CC/CXX/CFLAGS/CXXFLAGS from CMake toolchain'
|
||||
if: ${{ steps.cmake-install.outcome == 'success' && matrix.platform.cc-from-cmake }}
|
||||
# shell: ${{ matrix.platform.shell }}
|
||||
run: |
|
||||
cmake -S .github/cmake -B /tmp/cmake_extract \
|
||||
${{ matrix.platform.cmake-toolchain-file != '' && format('-DCMAKE_TOOLCHAIN_FILE={0}', matrix.platform.cmake-toolchain-file) || '' }} \
|
||||
-DCMAKE_BUILD_TYPE=${{ matrix.platform.cmake-build-type }} \
|
||||
-DVAR_PATH=/tmp/env.txt
|
||||
cat /tmp/env.txt >> $GITHUB_ENV
|
||||
- name: 'Verify sdl2.pc (CMake)'
|
||||
# shell: ${{ matrix.platform.shell }}
|
||||
if: ${{ steps.cmake-install.outcome == 'success' && matrix.platform.test-pkg-config }}
|
||||
run: |
|
||||
${{ matrix.platform.source-cmd }}
|
||||
${{ matrix.platform.cc && format('export CC="{0}"', matrix.platform.cc) || '' }}
|
||||
${{ matrix.platform.cflags && format('export CFLAGS="{0}"', matrix.platform.cflags) || '' }}
|
||||
${{ matrix.platform.ldflags && format('export LDFLAGS="{0}"', matrix.platform.ldflags) || '' }}
|
||||
export PKG_CONFIG_PATH=${{ steps.cmake-install.outputs.prefix }}/lib/pkgconfig
|
||||
cmake/test/test_pkgconfig.sh
|
||||
- name: 'Build (cross-platform-actions, BSD)'
|
||||
id: cpactions
|
||||
if: ${{ matrix.platform.cpactions }}
|
||||
uses: cross-platform-actions/action@v0.27.0
|
||||
with:
|
||||
operating_system: '${{ matrix.platform.cpactions-os }}'
|
||||
architecture: '${{ matrix.platform.cpactions-arch }}'
|
||||
version: '${{ matrix.platform.cpactions-version }}'
|
||||
run: |
|
||||
${{ matrix.platform.cpactions-setup-cmd }}
|
||||
${{ matrix.platform.cpactions-install-cmd }}
|
||||
cmake -S . -B build -GNinja \
|
||||
${{ matrix.platform.cmake-toolchain-file != '' && format('-DCMAKE_TOOLCHAIN_FILE={0}', matrix.platform.cmake-toolchain-file) || '' }} \
|
||||
-Wdeprecated -Wdev -Werror \
|
||||
-DSDL_WERROR=${{ matrix.platform.werror }} \
|
||||
-DSDL_DISABLE_INSTALL_DOCS=OFF \
|
||||
${{ matrix.platform.cmake-arguments }} \
|
||||
-DSDL_SHARED=${{ matrix.platform.shared }} \
|
||||
-DSDL_STATIC=${{ matrix.platform.static }} \
|
||||
-DSDL_TEST=ON \
|
||||
-DSDL_VENDOR_INFO="Github Workflow" \
|
||||
-DCMAKE_INSTALL_PREFIX=prefix \
|
||||
-DCMAKE_INSTALL_LIBDIR=lib \
|
||||
-DCMAKE_BUILD_TYPE=${{ matrix.platform.cmake-build-type }}
|
||||
cmake --build build/ --config ${{ matrix.platform.cmake-build-type }} --verbose
|
||||
|
||||
cmake --build build/ --config ${{ matrix.platform.cmake-build-type }} --target clean
|
||||
rm -rf build/CMakeFiles
|
||||
rm -rf build/docs
|
||||
- name: 'Set up Watcom'
|
||||
uses: open-watcom/setup-watcom@v0
|
||||
if: ${{ matrix.platform.watcom-makefile != '' }}
|
||||
- name: 'Build (Watcom)'
|
||||
if: ${{ matrix.platform.watcom-makefile != '' }}
|
||||
run: |
|
||||
wmake -f ${{ matrix.platform.watcom-makefile }} ENABLE_WERROR=1
|
||||
- name: 'Build tests (Watcom)'
|
||||
if: ${{ matrix.platform.watcom-makefile != '' }}
|
||||
run: |
|
||||
cd test
|
||||
wmake -f ${{ matrix.platform.watcom-makefile }} ENABLE_WERROR=1
|
||||
- name: 'Run tests (Watcom)'
|
||||
if: ${{ matrix.platform.watcom-makefile != '' && matrix.platform.run-tests }}
|
||||
run: |
|
||||
cd test
|
||||
wmake -f ${{ matrix.platform.watcom-makefile }} check-quick
|
||||
- name: 'Distclean (Watcom)'
|
||||
if: ${{ matrix.platform.watcom-makefile != '' }}
|
||||
run: |
|
||||
wmake -f ${{ matrix.platform.watcom-makefile }} distclean
|
||||
cd test
|
||||
wmake -f ${{ matrix.platform.watcom-makefile }} distclean
|
||||
- name: 'Add msbuild to PATH'
|
||||
id: setup-msbuild
|
||||
if: ${{ matrix.platform.msvc-project != '' }}
|
||||
uses: microsoft/setup-msbuild@v2
|
||||
- name: Build msbuild
|
||||
if: ${{ matrix.platform.msvc-project != '' }}
|
||||
run: |
|
||||
"$(cygpath -u '${{ steps.setup-msbuild.outputs.msbuildPath }}\msbuild.exe')" ${{ matrix.platform.msvc-project }} -m -p:BuildInParallel=true -p:Configuration=Release ${{ matrix.platform.msvc-project-flags }}
|
||||
- name: 'Build (Android.mk)'
|
||||
if: ${{ matrix.platform.android-mk }}
|
||||
run: |
|
||||
./build-scripts/androidbuildlibs.sh
|
||||
- name: 'Build (xcode)'
|
||||
if: ${{ matrix.platform.xcode-sdk != '' }}
|
||||
run: |
|
||||
xcodebuild -project Xcode/SDL/SDL.xcodeproj -target "${{ matrix.platform.xcode-target }}" -configuration Release -sdk ${{ matrix.platform.xcode-sdk }} clean build
|
||||
- name: 'Setup Python'
|
||||
uses: 'actions/setup-python@main'
|
||||
if: ${{ matrix.platform.check-sources }}
|
||||
with:
|
||||
python-version: '3.x'
|
||||
- name: 'Check Sources'
|
||||
if: ${{ matrix.platform.check-sources }}
|
||||
run: |
|
||||
set -e
|
||||
build-scripts/test-versioning.sh
|
||||
- name: 'Upload binary package'
|
||||
uses: actions/upload-artifact@v4
|
||||
if: ${{ always() && steps.cmake-tests.outcome == 'failure' }}
|
||||
with:
|
||||
if-no-files-found: ignore
|
||||
name: '${{ matrix.platform.artifact }}-minidumps'
|
||||
path: |
|
||||
build/**/*.dmp
|
||||
build/**/*.exe
|
||||
build/**/*.dll
|
||||
build/**/*.pdb
|
20
.github/workflows/ios.yml
vendored
20
.github/workflows/ios.yml
vendored
@@ -1,20 +0,0 @@
|
||||
name: Build (iOS/tvOS)
|
||||
|
||||
on: [push, pull_request]
|
||||
|
||||
jobs:
|
||||
Build:
|
||||
name: ${{ matrix.platform.name }}
|
||||
runs-on: macos-latest
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
platform:
|
||||
- { name: iOS, target: Static Library-iOS, sdk: iphoneos }
|
||||
- { name: tvOS, target: Static Library-tvOS, sdk: appletvos }
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: Build
|
||||
run: xcodebuild -project Xcode/SDL/SDL.xcodeproj -target '${{ matrix.platform.target }}' -configuration Release -sdk ${{ matrix.platform.sdk }} clean build
|
236
.github/workflows/main.yml
vendored
236
.github/workflows/main.yml
vendored
@@ -1,236 +0,0 @@
|
||||
name: Build
|
||||
|
||||
on: [push, pull_request]
|
||||
|
||||
jobs:
|
||||
Build:
|
||||
name: ${{ matrix.platform.name }}
|
||||
runs-on: ${{ matrix.platform.os }}
|
||||
|
||||
defaults:
|
||||
run:
|
||||
shell: ${{ matrix.platform.shell }}
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
platform:
|
||||
- { name: Windows (mingw32), os: windows-latest, shell: 'msys2 {0}', msystem: mingw32, msys-env: mingw-w64-i686 }
|
||||
- { name: Windows (mingw64), os: windows-latest, shell: 'msys2 {0}', msystem: mingw64, msys-env: mingw-w64-x86_64 }
|
||||
- { name: Windows (clang32), os: windows-latest, shell: 'msys2 {0}', msystem: clang32, msys-env: mingw-w64-clang-i686 }
|
||||
- { name: Windows (clang64), os: windows-latest, shell: 'msys2 {0}', msystem: clang64, msys-env: mingw-w64-clang-x86_64 }
|
||||
- { name: Windows (ucrt64), os: windows-latest, shell: 'msys2 {0}', msystem: ucrt64, msys-env: mingw-w64-ucrt-x86_64 }
|
||||
- { name: Ubuntu 20.04 (CMake), os: ubuntu-20.04, shell: sh }
|
||||
- { name: Ubuntu 20.04 (autotools), os: ubuntu-20.04, shell: sh, autotools: true }
|
||||
- { name: Intel oneAPI (Ubuntu 20.04), os: ubuntu-20.04, shell: bash, artifact: 'SDL-ubuntu20.04-oneapi', intel: true,
|
||||
source_cmd: 'source /opt/intel/oneapi/setvars.sh; export CC=icx; export CXX=icx;'}
|
||||
- { name: Intel Compiler (Ubuntu 20.04), os: ubuntu-20.04, shell: bash, artifact: 'SDL-ubuntu20.04-icc', intel: true, cmake: '-DSDL_CLANG_TIDY=OFF',
|
||||
source_cmd: 'source /opt/intel/oneapi/setvars.sh; export CC=icc; export CXX=icpc; export CFLAGS=-diag-disable=10441; export CXXFLAGS=-diag-disable=10441; '}
|
||||
|
||||
- { name: Ubuntu 22.04 (CMake), os: ubuntu-22.04, shell: sh }
|
||||
- { name: Ubuntu 22.04 (autotools), os: ubuntu-22.04, shell: sh, autotools: true }
|
||||
- { name: MacOS (CMake), os: macos-latest, shell: sh, cmake: '-DCMAKE_OSX_ARCHITECTURES="x86_64;arm64"' }
|
||||
- { name: MacOS (autotools), os: macos-latest, shell: sh, autotools: true }
|
||||
|
||||
steps:
|
||||
- name: Set up MSYS2
|
||||
if: matrix.platform.shell == 'msys2 {0}'
|
||||
uses: msys2/setup-msys2@v2
|
||||
with:
|
||||
msystem: ${{ matrix.platform.msystem }}
|
||||
install: >-
|
||||
${{ matrix.platform.msys-env }}-cc
|
||||
${{ matrix.platform.msys-env }}-cmake
|
||||
${{ matrix.platform.msys-env }}-ninja
|
||||
${{ matrix.platform.msys-env }}-pkg-config
|
||||
|
||||
- name: Setup Linux dependencies
|
||||
if: runner.os == 'Linux'
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install build-essential git make autoconf automake libtool \
|
||||
pkg-config cmake ninja-build gnome-desktop-testing libasound2-dev libpulse-dev \
|
||||
libaudio-dev libjack-dev libsndio-dev libsamplerate0-dev libx11-dev libxext-dev \
|
||||
libxrandr-dev libxcursor-dev libxfixes-dev libxi-dev libxss-dev libwayland-dev \
|
||||
libxkbcommon-dev libdrm-dev libgbm-dev libgl1-mesa-dev libgles2-mesa-dev \
|
||||
libegl1-mesa-dev libdbus-1-dev libibus-1.0-dev libudev-dev fcitx-libs-dev
|
||||
|
||||
- name: Setup extra Ubuntu 22.04 dependencies
|
||||
if: matrix.platform.os == 'ubuntu-22.04'
|
||||
run: |
|
||||
sudo apt-get install libpipewire-0.3-dev libdecor-0-dev
|
||||
|
||||
- name: Setup Macos dependencies
|
||||
if: runner.os == 'macOS'
|
||||
run: |
|
||||
brew install \
|
||||
ninja \
|
||||
pkg-config
|
||||
|
||||
- name: Setup Intel oneAPI
|
||||
if: matrix.platform.intel
|
||||
run: |
|
||||
# Setup oneAPI repo
|
||||
wget https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS-2023.PUB
|
||||
sudo apt-key add GPG-PUB-KEY-INTEL-SW-PRODUCTS-2023.PUB
|
||||
sudo echo "deb https://apt.repos.intel.com/oneapi all main" | sudo tee /etc/apt/sources.list.d/oneAPI.list
|
||||
sudo apt-get update -y
|
||||
|
||||
# Install oneAPI
|
||||
sudo apt-get install -y intel-oneapi-compiler-dpcpp-cpp-and-cpp-classic
|
||||
|
||||
- uses: actions/checkout@v3
|
||||
- name: Check that versioning is consistent
|
||||
# We only need to run this once: arbitrarily use the Linux/CMake build
|
||||
if: "runner.os == 'Linux' && ! matrix.platform.autotools"
|
||||
run: ./build-scripts/test-versioning.sh
|
||||
- name: Configure (CMake)
|
||||
if: "! matrix.platform.autotools"
|
||||
run: |
|
||||
${{ matrix.platform.source_cmd }}
|
||||
cmake -S . -B build -G Ninja \
|
||||
-DSDL_TESTS=ON \
|
||||
-DSDL_WERROR=ON \
|
||||
-DSDL_INSTALL_TESTS=ON \
|
||||
-DSDL_VENDOR_INFO="Github Workflow" \
|
||||
-DCMAKE_INSTALL_PREFIX=cmake_prefix \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
${{ matrix.platform.cmake }}
|
||||
- name: Build (CMake)
|
||||
if: "! matrix.platform.autotools"
|
||||
run: |
|
||||
${{ matrix.platform.source_cmd }}
|
||||
cmake --build build/ --config Release --verbose --parallel
|
||||
- name: Run build-time tests (CMake)
|
||||
if: "! matrix.platform.autotools"
|
||||
run: |
|
||||
set -eu
|
||||
${{ matrix.platform.source_cmd }}
|
||||
export SDL_TESTS_QUICK=1
|
||||
ctest -VV --test-dir build/
|
||||
if test "${{ runner.os }}" = "Linux"; then
|
||||
# This should show us the SDL_REVISION
|
||||
strings build/libSDL2-2.0.so.0 | grep SDL-
|
||||
fi
|
||||
- name: Install (CMake)
|
||||
if: "! matrix.platform.autotools"
|
||||
run: |
|
||||
set -eu
|
||||
cmake --install build/ --config Release
|
||||
echo "SDL2_DIR=$(pwd)/cmake_prefix" >> $GITHUB_ENV
|
||||
( cd cmake_prefix; find ) | LC_ALL=C sort -u
|
||||
- name: Configure (Autotools)
|
||||
if: matrix.platform.autotools
|
||||
run: |
|
||||
set -eu
|
||||
${{ matrix.platform.source_cmd }}
|
||||
rm -fr build-autotools
|
||||
mkdir build-autotools
|
||||
./autogen.sh
|
||||
(
|
||||
cd build-autotools
|
||||
${{ github.workspace }}/configure \
|
||||
--enable-vendor-info="Github Workflow" \
|
||||
--enable-werror \
|
||||
--prefix=${{ github.workspace }}/autotools_prefix \
|
||||
)
|
||||
if test "${{ runner.os }}" != "macOS" ; then
|
||||
curdir="$(pwd)"
|
||||
multiarch="$(dpkg-architecture -qDEB_HOST_MULTIARCH)"
|
||||
(
|
||||
mkdir -p build-autotools/test
|
||||
cd build-autotools/test
|
||||
${{ github.workspace }}/test/configure \
|
||||
--enable-werror \
|
||||
--x-includes=/usr/include \
|
||||
--x-libraries="/usr/lib/${multiarch}" \
|
||||
--prefix=${{ github.workspace }}/autotools_prefix \
|
||||
SDL_CFLAGS="-I${curdir}/include" \
|
||||
SDL_LIBS="-L${curdir}/build-autotools/build/.libs -lSDL2" \
|
||||
ac_cv_lib_SDL2_ttf_TTF_Init=no \
|
||||
${NULL+}
|
||||
)
|
||||
fi
|
||||
- name: Build (Autotools)
|
||||
if: matrix.platform.autotools
|
||||
run: |
|
||||
set -eu
|
||||
${{ matrix.platform.source_cmd }}
|
||||
parallel="$(getconf _NPROCESSORS_ONLN)"
|
||||
make -j"${parallel}" -C build-autotools V=1
|
||||
if test "${{ runner.os }}" != "macOS" ; then
|
||||
make -j"${parallel}" -C build-autotools/test V=1
|
||||
fi
|
||||
- name: Run build-time tests (Autotools)
|
||||
if: ${{ matrix.platform.autotools && (runner.os != 'macOS') }}
|
||||
run: |
|
||||
set -eu
|
||||
${{ matrix.platform.source_cmd }}
|
||||
curdir="$(pwd)"
|
||||
parallel="$(getconf _NPROCESSORS_ONLN)"
|
||||
export SDL_TESTS_QUICK=1
|
||||
make -j"${parallel}" -C build-autotools/test check LD_LIBRARY_PATH="${curdir}/build-autotools/build/.libs"
|
||||
if test "${{ runner.os }}" = "Linux"; then
|
||||
# This should show us the SDL_REVISION
|
||||
strings "${curdir}/build-autotools/build/.libs/libSDL2-2.0.so.0" | grep SDL-
|
||||
fi
|
||||
- name: Install (Autotools)
|
||||
if: matrix.platform.autotools
|
||||
run: |
|
||||
set -eu
|
||||
${{ matrix.platform.source_cmd }}
|
||||
curdir="$(pwd)"
|
||||
parallel="$(getconf _NPROCESSORS_ONLN)"
|
||||
make -j"${parallel}" -C build-autotools install V=1
|
||||
if test "${{ runner.os }}" != "macOS" ; then
|
||||
make -j"${parallel}" -C build-autotools/test install V=1
|
||||
fi
|
||||
( cd autotools_prefix; find . ) | LC_ALL=C sort -u
|
||||
echo "SDL2_DIR=$(pwd)/autotools_prefix" >> $GITHUB_ENV
|
||||
- name: Verify CMake configuration files
|
||||
run: |
|
||||
${{ matrix.platform.source_cmd }}
|
||||
cmake -S cmake/test -B cmake_config_build -G Ninja \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DCMAKE_PREFIX_PATH=${{ env.SDL2_DIR }}
|
||||
cmake --build cmake_config_build --verbose
|
||||
- name: Verify sdl2-config
|
||||
run: |
|
||||
${{ matrix.platform.source_cmd }}
|
||||
export PATH=${{ env.SDL2_DIR }}/bin:$PATH
|
||||
cmake/test/test_sdlconfig.sh
|
||||
- name: Verify sdl2.pc
|
||||
run: |
|
||||
${{ matrix.platform.source_cmd }}
|
||||
export PKG_CONFIG_PATH=${{ env.SDL2_DIR }}/lib/pkgconfig
|
||||
cmake/test/test_pkgconfig.sh
|
||||
- name: Distcheck (Autotools)
|
||||
if: matrix.platform.autotools
|
||||
run: |
|
||||
set -eu
|
||||
parallel="$(getconf _NPROCESSORS_ONLN)"
|
||||
make -j"${parallel}" -C build-autotools dist V=1
|
||||
# Similar to Automake `make distcheck`: check that the tarball
|
||||
# release is sufficient to do a new build
|
||||
mkdir distcheck
|
||||
tar -C distcheck -zxf build-autotools/SDL2-*.tar.gz
|
||||
( cd distcheck/SDL2-* && ./configure )
|
||||
make -j"${parallel}" -C distcheck/SDL2-*
|
||||
- name: Run installed-tests (Autotools)
|
||||
if: "runner.os == 'Linux' && matrix.platform.autotools"
|
||||
run: |
|
||||
set -eu
|
||||
${{ matrix.platform.source_cmd }}
|
||||
parallel="$(getconf _NPROCESSORS_ONLN)"
|
||||
sudo make -j"${parallel}" -C build-autotools install
|
||||
sudo make -j"${parallel}" -C build-autotools/test install
|
||||
export SDL_TESTS_QUICK=1
|
||||
# We need to set LD_LIBRARY_PATH because it isn't in the default
|
||||
# linker search path. We don't need to set XDG_DATA_DIRS for
|
||||
# ginsttest-runner, because /usr/local/share *is* in the default
|
||||
# search path for that.
|
||||
env --chdir=/ \
|
||||
LD_LIBRARY_PATH=/usr/local/lib \
|
||||
SDL_AUDIODRIVER=dummy \
|
||||
SDL_VIDEODRIVER=dummy \
|
||||
ginsttest-runner --tap SDL2
|
74
.github/workflows/msvc.yml
vendored
74
.github/workflows/msvc.yml
vendored
@@ -1,74 +0,0 @@
|
||||
name: Build (MSVC)
|
||||
|
||||
on: [push, pull_request]
|
||||
|
||||
jobs:
|
||||
Build:
|
||||
name: ${{ matrix.platform.name }}
|
||||
runs-on: windows-latest
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
platform:
|
||||
- { name: Windows (x64), flags: -A x64, project: VisualC/SDL.sln, projectflags: '/p:Platform=x64' }
|
||||
- { name: Windows (x86), flags: -A Win32, project: VisualC/SDL.sln, projectflags: '/p:Platform=Win32' }
|
||||
- { name: Windows static VCRT (x64), flags: -A x64 -DSDL_FORCE_STATIC_VCRT=ON }
|
||||
- { name: Windows static VCRT (x86), flags: -A Win32 -DSDL_FORCE_STATIC_VCRT=ON }
|
||||
- { name: Windows (clang-cl x64), flags: -T ClangCL -A x64 }
|
||||
- { name: Windows (clang-cl x86), flags: -T ClangCL -A Win32 }
|
||||
- { name: Windows (ARM), flags: -A ARM }
|
||||
- { name: Windows (ARM64), flags: -A ARM64 }
|
||||
- { name: UWP (x64), flags: -A x64 -DCMAKE_SYSTEM_NAME=WindowsStore -DCMAKE_SYSTEM_VERSION="10.0" -DSDL_TESTS=OFF, nowerror: true,
|
||||
project: VisualC-WinRT/SDL-UWP.sln, projectflags: '/p:Platform=x64 /p:WindowsTargetPlatformVersion=10.0.17763.0' }
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: Create CMake project using SDL as a subproject
|
||||
shell: python
|
||||
run: |
|
||||
import os
|
||||
import textwrap
|
||||
srcdir = r"${{ github.workspace }}".replace("\\", "/")
|
||||
builddir = f"{ srcdir }/build"
|
||||
os.makedirs(builddir)
|
||||
with open(f"{ builddir }/CMakeLists.txt", "w") as f:
|
||||
f.write(textwrap.dedent(f"""\
|
||||
cmake_minimum_required(VERSION 3.0)
|
||||
project(sdl_user)
|
||||
add_subdirectory("{ srcdir }" SDL)
|
||||
"""))
|
||||
- name: Configure (CMake)
|
||||
run: cmake -S build -B build `
|
||||
-DSDL_WERROR=${{ !matrix.platform.nowerror }} `
|
||||
-DSDL_TESTS=ON `
|
||||
-DSDL_INSTALL_TESTS=ON `
|
||||
-DSDL_VENDOR_INFO="Github Workflow" `
|
||||
-DSDL2_DISABLE_INSTALL=OFF `
|
||||
${{ matrix.platform.flags }} `
|
||||
-DCMAKE_INSTALL_PREFIX=prefix
|
||||
- name: Build (CMake)
|
||||
run: cmake --build build/ --config Release --parallel
|
||||
- name: Run build-time tests
|
||||
if: "! contains(matrix.platform.name, 'ARM')"
|
||||
run: |
|
||||
$env:SDL_TESTS_QUICK=1
|
||||
ctest -VV --test-dir build/ -C Release
|
||||
- name: Install (CMake)
|
||||
run: |
|
||||
echo "SDL2_DIR=$Env:GITHUB_WORKSPACE/prefix" >> $Env:GITHUB_ENV
|
||||
cmake --install build/
|
||||
- name: Verify CMake configuration files
|
||||
if: ${{ !contains(matrix.platform.name, 'UWP') }} # FIXME: cmake/test/CMakeLists.txt should support UWP
|
||||
run: |
|
||||
cmake -S cmake/test -B cmake_config_build `
|
||||
-DCMAKE_PREFIX_PATH=${{ env.SDL2_DIR }} `
|
||||
${{ matrix.platform.flags }}
|
||||
cmake --build cmake_config_build --config Release
|
||||
|
||||
- name: Add msbuild to PATH
|
||||
if: ${{ matrix.platform.project != '' }}
|
||||
uses: microsoft/setup-msbuild@v1.1.3
|
||||
- name: Build msbuild
|
||||
if: ${{ matrix.platform.project != '' }}
|
||||
run: msbuild ${{ matrix.platform.project }} /m /p:BuildInParallel=true /p:Configuration=Release ${{ matrix.platform.projectflags }}
|
55
.github/workflows/n3ds.yml
vendored
55
.github/workflows/n3ds.yml
vendored
@@ -1,55 +0,0 @@
|
||||
name: Build (Nintendo 3DS)
|
||||
|
||||
on: [push, pull_request]
|
||||
|
||||
jobs:
|
||||
n3ds:
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: devkitpro/devkitarm:latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: Install build requirements
|
||||
run: |
|
||||
apt update
|
||||
apt install ninja-build
|
||||
- name: Configure CMake
|
||||
run: |
|
||||
cmake -S . -B build -G Ninja \
|
||||
-DCMAKE_TOOLCHAIN_FILE=${DEVKITPRO}/cmake/3DS.cmake \
|
||||
-DSDL_WERROR=ON \
|
||||
-DSDL_TESTS=ON \
|
||||
-DSDL_INSTALL_TESTS=ON \
|
||||
-DSDL_VENDOR_INFO="Github Workflow" \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DCMAKE_INSTALL_PREFIX=prefix
|
||||
- name: Build
|
||||
run: cmake --build build --verbose
|
||||
- name: Install CMake
|
||||
run: |
|
||||
echo "SDL2_DIR=$(pwd)/prefix" >> $GITHUB_ENV
|
||||
cmake --install build/
|
||||
( cd prefix; find ) | LC_ALL=C sort -u
|
||||
- name: Verify CMake configuration files
|
||||
run: |
|
||||
cmake -S cmake/test -B cmake_config_build -G Ninja \
|
||||
-DCMAKE_TOOLCHAIN_FILE=${DEVKITPRO}/cmake/3DS.cmake \
|
||||
-DTEST_SHARED=FALSE \
|
||||
-DCMAKE_PREFIX_PATH=${{ env.SDL2_DIR }} \
|
||||
-DCMAKE_BUILD_TYPE=Release
|
||||
cmake --build cmake_config_build --verbose
|
||||
- name: Extract CC/CXX/CFLAGS/CXXFLAGS from CMake toolchain
|
||||
run: |
|
||||
cmake -S .github/cmake -B /tmp/cmake_extract \
|
||||
-DCMAKE_TOOLCHAIN_FILE=${DEVKITPRO}/cmake/3DS.cmake \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DVAR_PATH=/tmp/n3ds_env.txt
|
||||
cat /tmp/n3ds_env.txt >> $GITHUB_ENV
|
||||
- name: Verify sdl2-config
|
||||
run: |
|
||||
export PATH=${{ env.SDL2_DIR }}/bin:$PATH
|
||||
cmake/test/test_sdlconfig.sh
|
||||
- name: Verify sdl2.pc
|
||||
run: |
|
||||
export PKG_CONFIG_PATH=${{ env.SDL2_DIR }}/lib/pkgconfig
|
||||
cmake/test/test_pkgconfig.sh
|
73
.github/workflows/ps2.yaml
vendored
73
.github/workflows/ps2.yaml
vendored
@@ -1,73 +0,0 @@
|
||||
name: Build (Sony Playstation 2)
|
||||
|
||||
on: [push, pull_request]
|
||||
|
||||
jobs:
|
||||
ps2:
|
||||
runs-on: ubuntu-latest
|
||||
container: ps2dev/ps2dev:latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: Setup dependencies
|
||||
run: |
|
||||
apk update
|
||||
apk add cmake gmp mpc1 mpfr4 ninja pkgconf make git
|
||||
|
||||
# To be removed once ps2_drivers is part of PS2DEV
|
||||
- name: Install ps2_drivers lib
|
||||
run: |
|
||||
git clone https://github.com/fjtrujy/ps2_drivers.git
|
||||
cd ps2_drivers
|
||||
make -j $(getconf _NPROCESSORS_ONLN) clean
|
||||
make -j $(getconf _NPROCESSORS_ONLN)
|
||||
make -j $(getconf _NPROCESSORS_ONLN) install
|
||||
|
||||
- name: Configure (CMake)
|
||||
run: |
|
||||
cmake -S . -B build -G Ninja \
|
||||
-DCMAKE_TOOLCHAIN_FILE=$PS2DEV/ps2sdk/ps2dev.cmake \
|
||||
-DSDL_WERROR=ON \
|
||||
-DSDL_TESTS=ON \
|
||||
-DCMAKE_INSTALL_PREFIX=cmake_prefix \
|
||||
-DCMAKE_BUILD_TYPE=Release
|
||||
- name: Build
|
||||
run: cmake --build build --config Release --verbose --parallel
|
||||
- name: Install (CMake)
|
||||
run: |
|
||||
set -eu
|
||||
cmake --install build/ --config Release
|
||||
echo "SDL2_DIR=$(pwd)/cmake_prefix" >> $GITHUB_ENV
|
||||
( cd cmake_prefix; find ) | LC_ALL=C sort -u
|
||||
|
||||
- name: Verify CMake configuration files
|
||||
run: |
|
||||
cmake -S cmake/test -B cmake_config_build -G Ninja \
|
||||
-DCMAKE_TOOLCHAIN_FILE=$PS2DEV/ps2sdk/ps2dev.cmake \
|
||||
-DTEST_SHARED=FALSE \
|
||||
-DCMAKE_PREFIX_PATH=${{ env.SDL2_DIR }} \
|
||||
-DCMAKE_BUILD_TYPE=Release
|
||||
cmake --build cmake_config_build --verbose
|
||||
- name: Verify sdl2-config
|
||||
run: |
|
||||
export CC=mips64r5900el-ps2-elf-gcc
|
||||
export LDFLAGS="-L$PS2DEV/ps2sdk/ee/lib -L$PS2DEV/gsKit/lib -L$PS2DEV/ps2sdk/ports/lib"
|
||||
export PATH=${{ env.SDL2_DIR }}/bin:$PATH
|
||||
cmake/test/test_sdlconfig.sh
|
||||
- name: Verify sdl2.pc
|
||||
run: |
|
||||
export CC=mips64r5900el-ps2-elf-gcc
|
||||
export LDFLAGS="-L$PS2DEV/ps2sdk/ee/lib -L$PS2DEV/gsKit/lib -L$PS2DEV/ps2sdk/ports/lib"
|
||||
export PKG_CONFIG_PATH=${{ env.SDL2_DIR }}/lib/pkgconfig
|
||||
cmake/test/test_pkgconfig.sh
|
||||
|
||||
- name: Get short SHA
|
||||
id: slug
|
||||
run: echo "::set-output name=sha8::$(echo ${GITHUB_SHA} | cut -c1-8)"
|
||||
|
||||
- name: Upload artifacts
|
||||
if: ${{ success() }}
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: tests-${{ steps.slug.outputs.sha8 }}
|
||||
path: |
|
||||
build/test
|
50
.github/workflows/psp.yaml
vendored
50
.github/workflows/psp.yaml
vendored
@@ -1,50 +0,0 @@
|
||||
name: Build (Sony Playstation Portable)
|
||||
|
||||
on: [push, pull_request]
|
||||
|
||||
jobs:
|
||||
psp:
|
||||
runs-on: ubuntu-latest
|
||||
container: pspdev/pspdev:latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: Setup dependencies
|
||||
run: |
|
||||
apk update
|
||||
apk add cmake gmp mpc1 mpfr4 make pkgconf
|
||||
- name: Configure CMake
|
||||
run: |
|
||||
cmake -S . -B build \
|
||||
-DCMAKE_TOOLCHAIN_FILE=$PSPDEV/psp/share/pspdev.cmake \
|
||||
-DSDL_WERROR=ON \
|
||||
-DSDL_TESTS=ON \
|
||||
-DSDL_INSTALL_TESTS=ON \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DCMAKE_INSTALL_PREFIX=prefix
|
||||
- name: Build
|
||||
run: cmake --build build --config Release
|
||||
- name: Install
|
||||
run: |
|
||||
echo "SDL2_DIR=$(pwd)/prefix" >> $GITHUB_ENV
|
||||
cmake --install build --config Release
|
||||
( cd prefix; find ) | LC_ALL=C sort -u
|
||||
- name: Verify CMake configuration files
|
||||
run: |
|
||||
cmake -S cmake/test -B cmake_config_build \
|
||||
-DCMAKE_TOOLCHAIN_FILE=$PSPDEV/psp/share/pspdev.cmake \
|
||||
-DCMAKE_PREFIX_PATH=${{ env.SDL2_DIR }} \
|
||||
-DTEST_SHARED=FALSE \
|
||||
-DCMAKE_BUILD_TYPE=Release
|
||||
cmake --build cmake_config_build --verbose
|
||||
- name: Verify sdl2-config
|
||||
run: |
|
||||
export CC=psp-gcc
|
||||
export LDFLAGS="-L$PSPDEV/lib -L$PSPDEV/psp/lib -L$PSPDEV/psp/sdk/lib"
|
||||
export PATH=${{ env.SDL2_DIR }}/bin:$PATH
|
||||
cmake/test/test_sdlconfig.sh
|
||||
- name: Verify sdl2.pc
|
||||
run: |
|
||||
export CC=psp-gcc
|
||||
export LDFLAGS="-L$PSPDEV/lib -L$PSPDEV/psp/lib -L$PSPDEV/psp/sdk/lib"
|
||||
export PKG_CONFIG_PATH=${{ env.SDL2_DIR }}/lib/pkgconfig
|
||||
cmake/test/test_pkgconfig.sh
|
403
.github/workflows/release.yml
vendored
Normal file
403
.github/workflows/release.yml
vendored
Normal file
@@ -0,0 +1,403 @@
|
||||
name: 'release'
|
||||
run-name: 'Create SDL release artifacts for ${{ inputs.commit }}'
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
commit:
|
||||
description: 'Commit of SDL'
|
||||
required: true
|
||||
|
||||
jobs:
|
||||
|
||||
src:
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
project: ${{ steps.releaser.outputs.project }}
|
||||
version: ${{ steps.releaser.outputs.version }}
|
||||
src-tar-gz: ${{ steps.releaser.outputs.src-tar-gz }}
|
||||
src-tar-xz: ${{ steps.releaser.outputs.src-tar-xz }}
|
||||
src-zip: ${{ steps.releaser.outputs.src-zip }}
|
||||
steps:
|
||||
- name: 'Set up Python'
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: '3.11'
|
||||
- name: 'Fetch build-release.py'
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
sparse-checkout: 'build-scripts/build-release.py'
|
||||
- name: 'Set up SDL sources'
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
path: 'SDL'
|
||||
fetch-depth: 0
|
||||
- name: 'Build Source archive'
|
||||
id: releaser
|
||||
shell: bash
|
||||
run: |
|
||||
python build-scripts/build-release.py \
|
||||
--actions source \
|
||||
--commit ${{ inputs.commit }} \
|
||||
--root "${{ github.workspace }}/SDL" \
|
||||
--github \
|
||||
--debug
|
||||
- name: 'Store source archives'
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: sources
|
||||
path: '${{ github.workspace}}/dist'
|
||||
|
||||
linux-verify:
|
||||
needs: [src]
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: 'Download source archives'
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: sources
|
||||
path: '${{ github.workspace }}'
|
||||
- name: 'Unzip ${{ needs.src.outputs.src-zip }}'
|
||||
id: zip
|
||||
run: |
|
||||
mkdir /tmp/zipdir
|
||||
cd /tmp/zipdir
|
||||
unzip "${{ github.workspace }}/${{ needs.src.outputs.src-zip }}"
|
||||
echo "path=/tmp/zipdir/${{ needs.src.outputs.project }}-${{ needs.src.outputs.version }}" >>$GITHUB_OUTPUT
|
||||
- name: 'Untar ${{ needs.src.outputs.src-tar-gz }}'
|
||||
id: tar
|
||||
run: |
|
||||
mkdir -p /tmp/tardir
|
||||
tar -C /tmp/tardir -v -x -f "${{ github.workspace }}/${{ needs.src.outputs.src-tar-gz }}"
|
||||
echo "path=/tmp/tardir/${{ needs.src.outputs.project }}-${{ needs.src.outputs.version }}" >>$GITHUB_OUTPUT
|
||||
- name: 'Compare contents of ${{ needs.src.outputs.src-zip }} and ${{ needs.src.outputs.src-tar-gz }}'
|
||||
run: |
|
||||
diff /tmp/zipdir /tmp/tardir
|
||||
- name: 'Test versioning'
|
||||
shell: bash
|
||||
run: |
|
||||
${{ steps.tar.outputs.path }}/build-scripts/test-versioning.sh
|
||||
- name: 'CMake (configure + build + tests + examples)'
|
||||
run: |
|
||||
cmake -S ${{ steps.tar.outputs.path }} -B /tmp/build -DSDL_TEST_LIBRARY=TRUE -DSDL_TESTS=TRUE -DSDL_EXAMPLES=TRUE
|
||||
cmake --build /tmp/build --verbose
|
||||
ctest --test-dir /tmp/build --no-tests=error --output-on-failure
|
||||
|
||||
dmg:
|
||||
needs: [src]
|
||||
runs-on: macos-latest
|
||||
outputs:
|
||||
dmg: ${{ steps.releaser.outputs.dmg }}
|
||||
steps:
|
||||
- name: 'Set up Python'
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: '3.11'
|
||||
- name: 'Fetch build-release.py'
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
sparse-checkout: 'build-scripts/build-release.py'
|
||||
- name: 'Download source archives'
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: sources
|
||||
path: '${{ github.workspace }}'
|
||||
- name: 'Untar ${{ needs.src.outputs.src-tar-gz }}'
|
||||
id: tar
|
||||
run: |
|
||||
mkdir -p "${{ github.workspace }}/tardir"
|
||||
tar -C "${{ github.workspace }}/tardir" -v -x -f "${{ github.workspace }}/${{ needs.src.outputs.src-tar-gz }}"
|
||||
echo "path=${{ github.workspace }}/tardir/${{ needs.src.outputs.project }}-${{ needs.src.outputs.version }}" >>$GITHUB_OUTPUT
|
||||
- name: 'Build SDL2.dmg'
|
||||
id: releaser
|
||||
shell: bash
|
||||
run: |
|
||||
python build-scripts/build-release.py \
|
||||
--actions dmg \
|
||||
--commit ${{ inputs.commit }} \
|
||||
--root "${{ steps.tar.outputs.path }}" \
|
||||
--github \
|
||||
--debug
|
||||
- name: 'Store DMG image file'
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: dmg
|
||||
path: '${{ github.workspace }}/dist'
|
||||
|
||||
dmg-verify:
|
||||
needs: [dmg, src]
|
||||
runs-on: macos-latest
|
||||
steps:
|
||||
- name: 'Download source archives'
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: sources
|
||||
path: '${{ github.workspace }}'
|
||||
- name: 'Download ${{ needs.dmg.outputs.dmg }}'
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: dmg
|
||||
path: '${{ github.workspace }}'
|
||||
- name: 'Untar ${{ needs.src.outputs.src-tar-gz }}'
|
||||
id: src
|
||||
run: |
|
||||
mkdir -p /tmp/tardir
|
||||
tar -C /tmp/tardir -v -x -f "${{ github.workspace }}/${{ needs.src.outputs.src-tar-gz }}"
|
||||
echo "path=/tmp/tardir/${{ needs.src.outputs.project }}-${{ needs.src.outputs.version }}" >>$GITHUB_OUTPUT
|
||||
- name: 'Mount ${{ needs.dmg.outputs.dmg }}'
|
||||
id: mount
|
||||
run: |
|
||||
hdiutil attach '${{ github.workspace }}/${{ needs.dmg.outputs.dmg }}'
|
||||
mount_point="/Volumes/${{ needs.src.outputs.project }}"
|
||||
if [ ! -d "$mount_point/${{ needs.src.outputs.project }}.framework" ]; then
|
||||
echo "Cannot find ${{ needs.src.outputs.project }}.framework!"
|
||||
exit 1
|
||||
fi
|
||||
echo "mount_point=$mount_point">>$GITHUB_OUTPUT
|
||||
- name: 'CMake (configure + build) Darwin'
|
||||
run: |
|
||||
set -e
|
||||
cmake -S "${{ steps.src.outputs.path }}/cmake/test" \
|
||||
-DTEST_FULL=FALSE \
|
||||
-DTEST_STATIC=FALSE \
|
||||
-DTEST_TEST=FALSE \
|
||||
-DCMAKE_PREFIX_PATH="${{ steps.mount.outputs.mount_point }}" \
|
||||
-DCMAKE_SYSTEM_NAME=Darwin \
|
||||
-DCMAKE_OSX_ARCHITECTURES="arm64;x86_64" \
|
||||
-Werror=dev \
|
||||
-B build_darwin
|
||||
cmake --build build_darwin --config Release --verbose
|
||||
|
||||
cmake -S "${{ steps.src.outputs.path }}/cmake/test" \
|
||||
-DTEST_FULL=FALSE \
|
||||
-DTEST_STATIC=FALSE \
|
||||
-DTEST_TEST=FALSE \
|
||||
-DCMAKE_PREFIX_PATH="${{ steps.mount.outputs.mount_point }}" \
|
||||
-DCMAKE_SYSTEM_NAME=Darwin \
|
||||
-DCMAKE_OSX_ARCHITECTURES="arm64;x86_64" \
|
||||
-Werror=dev \
|
||||
-B build_darwin_2
|
||||
cmake --build build_darwin --config Release --verbose
|
||||
|
||||
msvc:
|
||||
needs: [src]
|
||||
runs-on: windows-2019
|
||||
outputs:
|
||||
VC-x86: ${{ steps.releaser.outputs.VC-x86 }}
|
||||
VC-x64: ${{ steps.releaser.outputs.VC-x64 }}
|
||||
VC-devel: ${{ steps.releaser.outputs.VC-devel }}
|
||||
steps:
|
||||
- name: 'Set up Python'
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: '3.11'
|
||||
- name: 'Fetch build-release.py'
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
sparse-checkout: 'build-scripts/build-release.py'
|
||||
- name: 'Download source archives'
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: sources
|
||||
path: '${{ github.workspace }}'
|
||||
- name: 'Unzip ${{ needs.src.outputs.src-zip }}'
|
||||
id: zip
|
||||
run: |
|
||||
New-Item C:\temp -ItemType Directory -ErrorAction SilentlyContinue
|
||||
cd C:\temp
|
||||
unzip "${{ github.workspace }}/${{ needs.src.outputs.src-zip }}"
|
||||
echo "path=C:\temp\${{ needs.src.outputs.project }}-${{ needs.src.outputs.version }}" >>$Env:GITHUB_OUTPUT
|
||||
- name: 'Build MSVC binary archives'
|
||||
id: releaser
|
||||
run: |
|
||||
python build-scripts/build-release.py `
|
||||
--actions msvc `
|
||||
--commit ${{ inputs.commit }} `
|
||||
--root "${{ steps.zip.outputs.path }}" `
|
||||
--github `
|
||||
--debug
|
||||
- name: 'Store MSVC archives'
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: win32
|
||||
path: '${{ github.workspace }}/dist'
|
||||
|
||||
msvc-verify:
|
||||
needs: [msvc, src]
|
||||
runs-on: windows-latest
|
||||
steps:
|
||||
- name: 'Fetch .github/actions/setup-ninja/action.yml'
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
sparse-checkout: '.github/actions/setup-ninja/action.yml'
|
||||
- name: 'Download source archives'
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: sources
|
||||
path: '${{ github.workspace }}'
|
||||
- name: 'Download MSVC binaries'
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: win32
|
||||
path: '${{ github.workspace }}'
|
||||
- name: 'Unzip ${{ needs.src.outputs.src-zip }}'
|
||||
id: src
|
||||
run: |
|
||||
mkdir '${{ github.workspace }}/sources'
|
||||
cd '${{ github.workspace }}/sources'
|
||||
unzip "${{ github.workspace }}/${{ needs.src.outputs.src-zip }}"
|
||||
echo "path=${{ github.workspace }}/sources/${{ needs.src.outputs.project }}-${{ needs.src.outputs.version }}" >>$env:GITHUB_OUTPUT
|
||||
- name: 'Unzip ${{ needs.msvc.outputs.VC-devel }}'
|
||||
id: bin
|
||||
run: |
|
||||
mkdir '${{ github.workspace }}/vc'
|
||||
cd '${{ github.workspace }}/vc'
|
||||
unzip "${{ github.workspace }}/${{ needs.msvc.outputs.VC-devel }}"
|
||||
echo "path=${{ github.workspace }}/vc/${{ needs.src.outputs.project }}-${{ needs.src.outputs.version }}" >>$env:GITHUB_OUTPUT
|
||||
- name: Set up ninja
|
||||
uses: ./.github/actions/setup-ninja
|
||||
- name: 'Configure vcvars x86'
|
||||
uses: ilammy/msvc-dev-cmd@v1
|
||||
with:
|
||||
arch: x64_x86
|
||||
- name: 'CMake (configure + build + tests) x86'
|
||||
run: |
|
||||
cmake -S "${{ steps.src.outputs.path }}/cmake/test" `
|
||||
-B build_x86 `
|
||||
-GNinja `
|
||||
-DCMAKE_BUILD_TYPE=Debug `
|
||||
-Werror=dev `
|
||||
-DTEST_FULL=FALSE `
|
||||
-DTEST_STATIC=FALSE `
|
||||
-DTEST_SHARED=TRUE `
|
||||
-DTEST_TEST=TRUE `
|
||||
-DCMAKE_SUPPRESS_REGENERATION=TRUE `
|
||||
-DCMAKE_PREFIX_PATH="${{ steps.bin.outputs.path }}"
|
||||
Start-Sleep -Seconds 2
|
||||
cmake --build build_x86 --config Release --verbose
|
||||
#ctest --test-dir build_x86 --no-tests=error -C Release --output-on-failure
|
||||
- name: 'Configure vcvars x64'
|
||||
uses: ilammy/msvc-dev-cmd@v1
|
||||
with:
|
||||
arch: x64
|
||||
- name: 'CMake (configure + build + tests) x64'
|
||||
run: |
|
||||
cmake -S "${{ steps.src.outputs.path }}/cmake/test" `
|
||||
-B build_x64 `
|
||||
-GNinja `
|
||||
-DCMAKE_BUILD_TYPE=Debug `
|
||||
-Werror=dev `
|
||||
-DTEST_FULL=FALSE `
|
||||
-DTEST_STATIC=FALSE `
|
||||
-DTEST_SHARED=TRUE `
|
||||
-DTEST_TEST=TRUE `
|
||||
-DCMAKE_SUPPRESS_REGENERATION=TRUE `
|
||||
-DCMAKE_PREFIX_PATH="${{ steps.bin.outputs.path }}"
|
||||
Start-Sleep -Seconds 2
|
||||
cmake --build build_x64 --config Release --verbose
|
||||
#ctest --test-dir build_x64 --no-tests=error -C Release --output-on-failure
|
||||
|
||||
mingw:
|
||||
needs: [src]
|
||||
runs-on: ubuntu-24.04 # FIXME: current ubuntu-latest ships an outdated mingw, replace with ubuntu-latest once 24.04 becomes the new default
|
||||
outputs:
|
||||
mingw-devel-tar-gz: ${{ steps.releaser.outputs.mingw-devel-tar-gz }}
|
||||
mingw-devel-tar-xz: ${{ steps.releaser.outputs.mingw-devel-tar-xz }}
|
||||
steps:
|
||||
- name: 'Set up Python'
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: '3.11'
|
||||
- name: 'Fetch build-release.py'
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
sparse-checkout: 'build-scripts/build-release.py'
|
||||
- name: 'Install Mingw toolchain'
|
||||
run: |
|
||||
sudo apt-get update -y
|
||||
sudo apt-get install -y gcc-mingw-w64 g++-mingw-w64 ninja-build
|
||||
- name: 'Download source archives'
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: sources
|
||||
path: '${{ github.workspace }}'
|
||||
- name: 'Untar ${{ needs.src.outputs.src-tar-gz }}'
|
||||
id: tar
|
||||
run: |
|
||||
mkdir -p /tmp/tardir
|
||||
tar -C /tmp/tardir -v -x -f "${{ github.workspace }}/${{ needs.src.outputs.src-tar-gz }}"
|
||||
echo "path=/tmp/tardir/${{ needs.src.outputs.project }}-${{ needs.src.outputs.version }}" >>$GITHUB_OUTPUT
|
||||
- name: 'Build MinGW binary archives'
|
||||
id: releaser
|
||||
run: |
|
||||
python build-scripts/build-release.py \
|
||||
--actions mingw \
|
||||
--commit ${{ inputs.commit }} \
|
||||
--root "${{ steps.tar.outputs.path }}" \
|
||||
--github \
|
||||
--debug
|
||||
- name: 'Store MinGW archives'
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: mingw
|
||||
path: '${{ github.workspace }}/dist'
|
||||
|
||||
mingw-verify:
|
||||
needs: [mingw, src]
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: 'Install Mingw toolchain'
|
||||
run: |
|
||||
sudo apt-get update -y
|
||||
sudo apt-get install -y gcc-mingw-w64 g++-mingw-w64 ninja-build
|
||||
- name: 'Download source archives'
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: sources
|
||||
path: '${{ github.workspace }}'
|
||||
- name: 'Download MinGW binaries'
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: mingw
|
||||
path: '${{ github.workspace }}'
|
||||
- name: 'Untar ${{ needs.src.outputs.src-tar-gz }}'
|
||||
id: src
|
||||
run: |
|
||||
mkdir -p /tmp/tardir
|
||||
tar -C /tmp/tardir -v -x -f "${{ github.workspace }}/${{ needs.src.outputs.src-tar-gz }}"
|
||||
echo "path=/tmp/tardir/${{ needs.src.outputs.project }}-${{ needs.src.outputs.version }}" >>$GITHUB_OUTPUT
|
||||
- name: 'Untar and install ${{ needs.mingw.outputs.mingw-devel-tar-gz }}'
|
||||
id: bin
|
||||
run: |
|
||||
mkdir -p /tmp/mingw-tardir
|
||||
tar -C /tmp/mingw-tardir -v -x -f "${{ github.workspace }}/${{ needs.mingw.outputs.mingw-devel-tar-gz }}"
|
||||
make -C /tmp/mingw-tardir/${{ needs.src.outputs.project }}-${{ needs.src.outputs.version }} cross CROSS_PATH=/tmp/deps-mingw
|
||||
echo "path=/tmp/deps-mingw" >>$GITHUB_OUTPUT
|
||||
- name: 'CMake (configure + build) i686'
|
||||
run: |
|
||||
set -e
|
||||
cmake -S "${{ steps.src.outputs.path }}/cmake/test" \
|
||||
-DCMAKE_BUILD_TYPE="Release" \
|
||||
-DTEST_FULL=FALSE \
|
||||
-DTEST_STATIC=TRUE \
|
||||
-DTEST_TEST=TRUE \
|
||||
-DCMAKE_PREFIX_PATH="${{ steps.bin.outputs.path }}" \
|
||||
-DCMAKE_TOOLCHAIN_FILE="${{ steps.src.outputs.path }}/build-scripts/cmake-toolchain-mingw64-i686.cmake" \
|
||||
-DCMAKE_C_FLAGS="-DSDL_DISABLE_SSE4_2" \
|
||||
-Werror=dev \
|
||||
-B build_x86
|
||||
cmake --build build_x86 --config Release --verbose
|
||||
- name: 'CMake (configure + build) x86_64'
|
||||
run: |
|
||||
set -e
|
||||
cmake -S "${{ steps.src.outputs.path }}/cmake/test" \
|
||||
-DCMAKE_BUILD_TYPE="Release" \
|
||||
-DTEST_FULL=FALSE \
|
||||
-DTEST_STATIC=TRUE \
|
||||
-DTEST_TEST=TRUE \
|
||||
-DCMAKE_PREFIX_PATH="${{ steps.bin.outputs.path }}" \
|
||||
-DCMAKE_TOOLCHAIN_FILE="${{ steps.src.outputs.path }}/build-scripts/cmake-toolchain-mingw64-x86_64.cmake" \
|
||||
-DCMAKE_C_FLAGS="-DSDL_DISABLE_SSE4_2" \
|
||||
-Werror=dev \
|
||||
-B build_x64
|
||||
cmake --build build_x64 --config Release --verbose
|
68
.github/workflows/riscos.yml
vendored
68
.github/workflows/riscos.yml
vendored
@@ -1,68 +0,0 @@
|
||||
name: Build (RISC OS)
|
||||
|
||||
on: [push, pull_request]
|
||||
|
||||
jobs:
|
||||
Build:
|
||||
name: ${{ matrix.platform.name }}
|
||||
runs-on: ubuntu-latest
|
||||
container: riscosdotinfo/riscos-gccsdk-4.7:latest
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
platform:
|
||||
- { name: autotools, test_args: '-DTEST_SHARED=FALSE' } # FIXME: autotools should build and install shared libraries
|
||||
- { name: CMake }
|
||||
|
||||
steps:
|
||||
- name: Setup dependencies
|
||||
run: apt-get update && apt-get install -y cmake ninja-build
|
||||
- uses: actions/checkout@v3
|
||||
- name: Configure (autotools)
|
||||
if: ${{ contains(matrix.platform.name, 'autotools') }}
|
||||
run: |
|
||||
mkdir build_autotools
|
||||
cd build_autotools
|
||||
../configure \
|
||||
--host=arm-unknown-riscos \
|
||||
--disable-gcc-atomics \
|
||||
--prefix=${{ github.workspace }}/prefix_autotools
|
||||
- name: Build (autotools)
|
||||
if: ${{ contains(matrix.platform.name, 'autotools') }}
|
||||
run: make -C build_autotools -j`nproc` V=1
|
||||
- name: Install (autotools)
|
||||
if: ${{ contains(matrix.platform.name, 'autotools') }}
|
||||
run: |
|
||||
echo "SDL2_DIR=${{ github.workspace }}/prefix_autotools" >> $GITHUB_ENV
|
||||
make -C build_autotools install
|
||||
( cd ${{ github.workspace }}/prefix_autotools; find ) | LC_ALL=C sort -u
|
||||
- name: Configure (CMake)
|
||||
if: ${{ contains(matrix.platform.name, 'CMake') }}
|
||||
run: |
|
||||
cmake -S . -B build -G Ninja \
|
||||
-DCMAKE_TOOLCHAIN_FILE=/home/riscos/env/toolchain-riscos.cmake \
|
||||
-DRISCOS=ON \
|
||||
-DSDL_GCC_ATOMICS=OFF \
|
||||
-DSDL_TESTS=ON \
|
||||
-DSDL_INSTALL_TESTS=ON \
|
||||
-DSDL_VENDOR_INFO="Github Workflow" \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DCMAKE_INSTALL_PREFIX=${{ github.workspace }}/prefix_cmake
|
||||
- name: Build (CMake)
|
||||
if: ${{ contains(matrix.platform.name, 'CMake') }}
|
||||
run: cmake --build build --verbose
|
||||
- name: Install (CMake)
|
||||
if: ${{ contains(matrix.platform.name, 'CMake') }}
|
||||
run: |
|
||||
echo "SDL2_DIR=${{ github.workspace }}/prefix_cmake" >> $GITHUB_ENV
|
||||
cmake --install build/
|
||||
( cd ${{ github.workspace }}/prefix_cmake; find ) | LC_ALL=C sort -u
|
||||
- name: Verify CMake configuration files
|
||||
run: |
|
||||
cmake -S cmake/test -B cmake_config_build -G Ninja \
|
||||
-DCMAKE_TOOLCHAIN_FILE=/home/riscos/env/toolchain-riscos.cmake \
|
||||
-DCMAKE_PREFIX_PATH=${{ env.SDL2_DIR }} \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
${{ matrix.platform.test_args }}
|
||||
cmake --build cmake_config_build --verbose
|
95
.github/workflows/vita.yaml
vendored
95
.github/workflows/vita.yaml
vendored
@@ -1,95 +0,0 @@
|
||||
name: Build (Sony Playstation Vita)
|
||||
|
||||
on: [push, pull_request]
|
||||
|
||||
defaults:
|
||||
run:
|
||||
shell: sh
|
||||
|
||||
jobs:
|
||||
vita:
|
||||
name: ${{ matrix.platform.name }}
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: vitasdk/vitasdk:latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
platform:
|
||||
- { name: GLES (pib), os: windows-latest, pib: true }
|
||||
- { name: GLES (PVR_PSP2 + gl4es4vita), os: windows-latest, pvr: true }
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: Install build requirements
|
||||
run: |
|
||||
apk update
|
||||
apk add cmake ninja pkgconf bash
|
||||
|
||||
- name: Configure PVR_PSP2 (GLES)
|
||||
if: ${{ !!matrix.platform.pvr }}
|
||||
run: |
|
||||
pvr_psp2_version=3.9
|
||||
|
||||
# Configure PVR_PSP2 headers
|
||||
wget https://github.com/GrapheneCt/PVR_PSP2/archive/refs/tags/v$pvr_psp2_version.zip -P/tmp
|
||||
unzip /tmp/v$pvr_psp2_version.zip -d/tmp
|
||||
cp -r /tmp/PVR_PSP2-$pvr_psp2_version/include/* ${VITASDK}/arm-vita-eabi/include
|
||||
rm /tmp/v$pvr_psp2_version.zip
|
||||
|
||||
# Configure PVR_PSP2 stub libraries
|
||||
wget https://github.com/GrapheneCt/PVR_PSP2/releases/download/v$pvr_psp2_version/vitasdk_stubs.zip -P/tmp
|
||||
unzip /tmp/vitasdk_stubs.zip -d/tmp/pvr_psp2_stubs
|
||||
find /tmp/pvr_psp2_stubs -type f -name "*.a" -exec cp {} ${VITASDK}/arm-vita-eabi/lib \;
|
||||
rm /tmp/vitasdk_stubs.zip
|
||||
rm -rf /tmp/pvr_psp2_stubs
|
||||
|
||||
- name: Configure gl4es4vita (OpenGL)
|
||||
if: ${{ !!matrix.platform.pvr }}
|
||||
run: |
|
||||
gl4es4vita_version=1.1.4
|
||||
|
||||
# Configure gl4es4vita headers
|
||||
wget https://github.com/SonicMastr/gl4es4vita/releases/download/v$gl4es4vita_version-vita/include.zip -P/tmp
|
||||
unzip -o /tmp/include.zip -d${VITASDK}/arm-vita-eabi/include
|
||||
rm /tmp/include.zip
|
||||
|
||||
# Configure gl4es4vita stub libraries
|
||||
wget https://github.com/SonicMastr/gl4es4vita/releases/download/v$gl4es4vita_version-vita/vitasdk_stubs.zip -P/tmp
|
||||
unzip /tmp/vitasdk_stubs.zip -d${VITASDK}/arm-vita-eabi/lib
|
||||
|
||||
- name: Configure CMake
|
||||
run: |
|
||||
cmake -S . -B build -G Ninja \
|
||||
-DCMAKE_TOOLCHAIN_FILE=${VITASDK}/share/vita.toolchain.cmake \
|
||||
-DVIDEO_VITA_PIB=${{ !!matrix.platform.pib }} \
|
||||
-DVIDEO_VITA_PVR=${{ !!matrix.platform.pvr }} \
|
||||
-DSDL_WERROR=ON \
|
||||
-DSDL_TESTS=ON \
|
||||
-DSDL_INSTALL_TESTS=ON \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DCMAKE_INSTALL_PREFIX=prefix
|
||||
- name: Build
|
||||
run: cmake --build build --verbose
|
||||
- name: Install CMake
|
||||
run: |
|
||||
echo "SDL2_DIR=$(pwd)/prefix" >> $GITHUB_ENV
|
||||
cmake --install build/
|
||||
( cd prefix; find ) | LC_ALL=C sort -u
|
||||
- name: Verify CMake configuration files
|
||||
run: |
|
||||
cmake -S cmake/test -B cmake_config_build -G Ninja \
|
||||
-DCMAKE_TOOLCHAIN_FILE=${VITASDK}/share/vita.toolchain.cmake \
|
||||
-DTEST_SHARED=FALSE \
|
||||
-DCMAKE_PREFIX_PATH=${{ env.SDL2_DIR }} \
|
||||
-DCMAKE_BUILD_TYPE=Release
|
||||
cmake --build cmake_config_build --verbose
|
||||
- name: Verify sdl2-config
|
||||
run: |
|
||||
export CC=arm-vita-eabi-gcc
|
||||
export PATH=${{ env.SDL2_DIR }}/bin:$PATH
|
||||
cmake/test/test_sdlconfig.sh
|
||||
- name: Verify sdl2.pc
|
||||
run: |
|
||||
export CC=arm-vita-eabi-gcc
|
||||
export PKG_CONFIG_PATH=${{ env.SDL2_DIR }}/lib/pkgconfig
|
||||
cmake/test/test_pkgconfig.sh
|
49
.github/workflows/vmactions.yml
vendored
49
.github/workflows/vmactions.yml
vendored
@@ -1,49 +0,0 @@
|
||||
name: Build (VM Actions)
|
||||
|
||||
on: [push, pull_request]
|
||||
|
||||
jobs:
|
||||
freebsd:
|
||||
runs-on: macos-12
|
||||
name: FreeBSD
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: Build
|
||||
uses: vmactions/freebsd-vm@v0
|
||||
with:
|
||||
usesh: true
|
||||
prepare: |
|
||||
pkg install -y \
|
||||
gmake \
|
||||
pkgconf \
|
||||
libXcursor \
|
||||
libXext \
|
||||
libXinerama \
|
||||
libXi \
|
||||
libXfixes \
|
||||
libXrandr \
|
||||
libXScrnSaver \
|
||||
libXxf86vm \
|
||||
wayland \
|
||||
wayland-protocols \
|
||||
libxkbcommon \
|
||||
mesa-libs \
|
||||
libglvnd \
|
||||
evdev-proto \
|
||||
libinotify \
|
||||
alsa-lib \
|
||||
jackit \
|
||||
nas \
|
||||
pipewire \
|
||||
pulseaudio \
|
||||
sndio \
|
||||
dbus \
|
||||
zh-fcitx \
|
||||
ibus \
|
||||
libsamplerate \
|
||||
libudev-devd
|
||||
|
||||
run: |
|
||||
mkdir build_autotools
|
||||
(cd build_autotools && CFLAGS="-I/usr/local/include" LDFLAGS="-L/usr/local/lib" ../configure)
|
||||
gmake -C build_autotools -j`sysctl -n hw.ncpu` V=1
|
35
.github/workflows/watcom.yml
vendored
35
.github/workflows/watcom.yml
vendored
@@ -1,35 +0,0 @@
|
||||
name: Build (OpenWatcom)
|
||||
|
||||
on: [push, pull_request]
|
||||
|
||||
jobs:
|
||||
os2:
|
||||
name: ${{ matrix.platform.name }}
|
||||
runs-on: windows-latest
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
platform:
|
||||
- { name: Windows, makefile: Makefile.w32 }
|
||||
- { name: OS/2, makefile: Makefile.os2 }
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: open-watcom/setup-watcom@v0
|
||||
- name: Build SDL2
|
||||
run: |
|
||||
wmake -f ${{ matrix.platform.makefile }} ENABLE_WERROR=1
|
||||
- name: Build tests
|
||||
run: |
|
||||
cd test && wmake -f ${{ matrix.platform.makefile }} ENABLE_WERROR=1
|
||||
cd ..
|
||||
- name: Run tests
|
||||
if: "matrix.platform.makefile == 'Makefile.w32'"
|
||||
run: |
|
||||
cd test && wmake -f ${{ matrix.platform.makefile }} check-quick
|
||||
cd ..
|
||||
- name: distclean
|
||||
run: |
|
||||
wmake -f ${{ matrix.platform.makefile }} distclean
|
||||
cd test && wmake -f ${{ matrix.platform.makefile }} distclean
|
||||
cd ..
|
4
.gitignore
vendored
4
.gitignore
vendored
@@ -15,7 +15,8 @@ build
|
||||
gen
|
||||
Build
|
||||
buildbot
|
||||
/VERSION.txt
|
||||
/REVISION.txt
|
||||
dist
|
||||
|
||||
*.so
|
||||
*.so.*
|
||||
@@ -103,6 +104,7 @@ VisualC/visualtest/testsprite2_sample.actions
|
||||
VisualC/visualtest/testsprite2_sample.config
|
||||
VisualC/visualtest/testsprite2_sample.parameters
|
||||
VisualC-GDK/**/Layout
|
||||
VisualC-GDK/shaders/*.h
|
||||
|
||||
# for Android
|
||||
android-project/local.properties
|
||||
|
@@ -1,9 +1,9 @@
|
||||
projectfullname = SDL2
|
||||
projectshortname = SDL2
|
||||
projectfullname = Simple Directmedia Layer
|
||||
projectshortname = SDL
|
||||
incsubdir = include
|
||||
wikisubdir = SDL2
|
||||
readmesubdir = docs
|
||||
apiprefixregex = (SDL_|SDLK_|KMOD_|AUDIO_)
|
||||
apiprefixregex = (SDL_|SDLK_|KMOD_|AUDIO_|[US]int\d+)
|
||||
mainincludefname = SDL.h
|
||||
versionfname = include/SDL_version.h
|
||||
versionmajorregex = \A\#define\s+SDL_MAJOR_VERSION\s+(\d+)\Z
|
||||
@@ -14,4 +14,18 @@ projecturl = https://libsdl.org/
|
||||
wikiurl = https://wiki.libsdl.org/SDL2
|
||||
bugreporturl = https://github.com/libsdl-org/sdlwiki/issues/new
|
||||
warn_about_missing = 0
|
||||
wikipreamble = (This is the legacy documentation for stable SDL2, the current stable version; [SDL3](https://wiki.libsdl.org/SDL3/) is the current development version.)
|
||||
#wikipreamble = (This is the legacy documentation for SDL2, the previous stable version; [SDL3](https://wiki.libsdl.org/SDL3/) is the current stable version.)
|
||||
wikiheaderfiletext = Defined in [%fname%](https://github.com/libsdl-org/SDL/blob/SDL2/include/%fname%)
|
||||
manpageheaderfiletext = Defined in %fname%
|
||||
|
||||
# All SDL_config_*.h headers are uncategorized, in case something slips in from them.
|
||||
# All SDL_test_* headers become uncategorized, everything else just converts like SDL_audio.h -> Audio
|
||||
# A handful of others we fix up in the header itself with /* WIKI CATEGORY: x */ comments.
|
||||
headercategoryeval = s/\ASDL_config_.*?\.h\Z//; s/\ASDL_test_.*?\.h\Z//; s/\ASDL_?(.*?)\.h\Z/$1/; ucfirst();
|
||||
|
||||
quickrefenabled = 0 # !!! FIXME: maybe later, but there are probably documentation gaps to fix first.
|
||||
quickrefcategoryorder = Init,Hints,Error,Version,Properties,Log,Video,Events,Keyboard,Mouse,Touch,Gesture,GameController,Joystick,Haptic,Audio,Timer,Render,LoadSO,Thread,Mutex,Atomic,Filesystem,RWOPS,Pixels,Surface,Blendmode,Rect,Clipboard,Messagebox,Vulkan,Metal,Platform,Power,Sensor,Bits,Endian,Assert,CPUInfo,Locale,System,Misc,GUID,Main,Stdinc
|
||||
quickreftitle = SDL2 API Quick Reference
|
||||
quickrefurl = https://libsdl.org/
|
||||
quickrefdesc = The latest version of this document can be found at https://wiki.libsdl.org/SDL2/QuickReference
|
||||
quickrefmacroregex = \A(SDL_Atomic...Ref|SDL_assert.*?|SDL_arraysize|SDL_Swap[BL]E\d\d|SDL_[a-z]+_cast|SDL_Load...)\Z
|
||||
|
@@ -35,6 +35,7 @@ LOCAL_SRC_FILES := \
|
||||
$(wildcard $(LOCAL_PATH)/src/hidapi/android/*.cpp) \
|
||||
$(wildcard $(LOCAL_PATH)/src/joystick/*.c) \
|
||||
$(wildcard $(LOCAL_PATH)/src/joystick/android/*.c) \
|
||||
$(wildcard $(LOCAL_PATH)/src/joystick/dummy/*.c) \
|
||||
$(wildcard $(LOCAL_PATH)/src/joystick/hidapi/*.c) \
|
||||
$(wildcard $(LOCAL_PATH)/src/joystick/virtual/*.c) \
|
||||
$(wildcard $(LOCAL_PATH)/src/loadso/dlopen/*.c) \
|
||||
|
437
CMakeLists.txt
437
CMakeLists.txt
@@ -2,8 +2,11 @@ if(${CMAKE_CURRENT_SOURCE_DIR} STREQUAL ${CMAKE_CURRENT_BINARY_DIR})
|
||||
message(FATAL_ERROR "Prevented in-tree build. Please create a build directory outside of the SDL source code and run \"cmake -S ${CMAKE_SOURCE_DIR} -B .\" from there")
|
||||
endif()
|
||||
|
||||
cmake_minimum_required(VERSION 3.0.0...3.5)
|
||||
project(SDL2 C CXX)
|
||||
# MSVC runtime library flags are selected by an abstraction.
|
||||
set(CMAKE_POLICY_DEFAULT_CMP0091 NEW)
|
||||
|
||||
cmake_minimum_required(VERSION 3.0.0...3.10)
|
||||
project(SDL2 C)
|
||||
|
||||
if(CMAKE_SOURCE_DIR STREQUAL PROJECT_SOURCE_DIR)
|
||||
set(SDL2_SUBPROJECT OFF)
|
||||
@@ -12,13 +15,15 @@ else()
|
||||
endif()
|
||||
|
||||
if (HAIKU)
|
||||
enable_language(CXX)
|
||||
set(LINKER_LANGUAGE CXX)
|
||||
endif()
|
||||
|
||||
set(EXTRA_LIBS)
|
||||
set(EXTRA_LDFLAGS)
|
||||
|
||||
set(CMAKE_DEPENDS)
|
||||
set(CMAKE_LIBS)
|
||||
set(PKGCONFIG_LDFLAGS)
|
||||
set(PKGCONFIG_DEPENDS)
|
||||
|
||||
# This is a virtual "library" that just exists to collect up compiler and
|
||||
@@ -30,8 +35,8 @@ set(PKGCONFIG_DEPENDS)
|
||||
add_library(sdl-build-options INTERFACE)
|
||||
|
||||
if(WINDOWS_STORE)
|
||||
target_compile_definitions(sdl-build-options INTERFACE "-DSDL_BUILDING_WINRT=1")
|
||||
target_compile_options(sdl-build-options INTERFACE "-ZW")
|
||||
target_compile_definitions(sdl-build-options INTERFACE "-DSDL_BUILDING_WINRT=1" "WINAPI_FAMILY=WINAPI_FAMILY_APP")
|
||||
target_compile_options(sdl-build-options INTERFACE "$<$<COMPILE_LANGUAGE:CXX>:-ZW>" "$<$<COMPILE_LANGUAGE:CXX>:-EHsc>")
|
||||
endif()
|
||||
|
||||
# CMake 3.0 expands the "if(${A})" in "set(OFF 1);set(A OFF);if(${A})" to "if(1)"
|
||||
@@ -83,8 +88,8 @@ endif()
|
||||
|
||||
# See docs/release_checklist.md
|
||||
set(SDL_MAJOR_VERSION 2)
|
||||
set(SDL_MINOR_VERSION 28)
|
||||
set(SDL_MICRO_VERSION 0)
|
||||
set(SDL_MINOR_VERSION 32)
|
||||
set(SDL_MICRO_VERSION 8)
|
||||
set(SDL_VERSION "${SDL_MAJOR_VERSION}.${SDL_MINOR_VERSION}.${SDL_MICRO_VERSION}")
|
||||
|
||||
# Set defaults preventing destination file conflicts
|
||||
@@ -137,6 +142,7 @@ check_cpu_architecture(x86 SDL_CPU_X86)
|
||||
check_cpu_architecture(x64 SDL_CPU_X64)
|
||||
check_cpu_architecture(arm32 SDL_CPU_ARM32)
|
||||
check_cpu_architecture(arm64 SDL_CPU_ARM64)
|
||||
check_cpu_architecture(arm64ec SDL_CPU_ARM64EC)
|
||||
check_cpu_architecture(loongarch64 SDL_CPU_LOONGARCH64)
|
||||
|
||||
# Check for 64 or 32 bit
|
||||
@@ -192,7 +198,7 @@ endif()
|
||||
# so we'll just use libusb when it's available. libusb does not support iOS,
|
||||
# so we default to yes on iOS.
|
||||
# TODO: Windows can support libusb, the hid.c file just depends on Unix APIs
|
||||
if((WINDOWS AND NOT WINDOWS_STORE) OR IOS OR TVOS OR ANDROID)
|
||||
if((WINDOWS AND NOT WINDOWS_STORE) OR IOS OR TVOS OR VISIONOS OR WATCHOS OR ANDROID)
|
||||
set(HIDAPI_SKIP_LIBUSB TRUE)
|
||||
else()
|
||||
set(HIDAPI_SKIP_LIBUSB FALSE)
|
||||
@@ -224,18 +230,25 @@ elseif(MSVC_VERSION GREATER 1400) # VisualStudio 8.0+
|
||||
elseif(CMAKE_C_COMPILER_ID MATCHES "^Intel$")
|
||||
set(OPT_DEF_ASM TRUE)
|
||||
set(USE_INTELCC TRUE)
|
||||
elseif(CMAKE_C_COMPILER_ID MATCHES "QCC")
|
||||
set(USE_QCC TRUE)
|
||||
else()
|
||||
set(OPT_DEF_ASM FALSE)
|
||||
endif()
|
||||
|
||||
if(USE_GCC OR USE_CLANG OR USE_INTELCC)
|
||||
if(USE_GCC OR USE_CLANG OR USE_INTELCC OR USE_QCC)
|
||||
set(OPT_DEF_GCC_ATOMICS ON)
|
||||
endif()
|
||||
|
||||
# Default option knobs
|
||||
if(UNIX OR MINGW OR MSYS OR (USE_CLANG AND NOT WINDOWS) OR VITA OR PSP OR PS2 OR N3DS)
|
||||
if(UNIX OR MINGW OR MSYS OR (USE_CLANG AND NOT WINDOWS) OR VITA OR PSP OR PS2 OR N3DS OR SDL_CPU_ARM64EC)
|
||||
set(OPT_DEF_LIBC ON)
|
||||
endif()
|
||||
if(WINDOWS OR MACOS OR IOS OR TVOS OR VISIONOS OR WATCHOS)
|
||||
set(SDL_SYSTEM_ICONV_DEFAULT OFF)
|
||||
else()
|
||||
set(SDL_SYSTEM_ICONV_DEFAULT ON)
|
||||
endif()
|
||||
|
||||
if(NOT ("$ENV{CFLAGS}" STREQUAL ""))
|
||||
if(CMAKE_VERSION VERSION_LESS 3.11.0)
|
||||
@@ -253,6 +266,9 @@ endif()
|
||||
if(MSVC)
|
||||
option(SDL_FORCE_STATIC_VCRT "Force /MT for static VC runtimes" OFF)
|
||||
if(SDL_FORCE_STATIC_VCRT)
|
||||
if(NOT DEFINED CMAKE_MSVC_RUNTIME_LIBRARY)
|
||||
set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
|
||||
endif()
|
||||
foreach(flag_var
|
||||
CMAKE_C_FLAGS CMAKE_C_FLAGS_DEBUG CMAKE_C_FLAGS_RELEASE
|
||||
CMAKE_C_FLAGS_MINSIZEREL CMAKE_C_FLAGS_RELWITHDEBINFO)
|
||||
@@ -347,6 +363,11 @@ if(VITA OR PSP OR PS2 OR N3DS)
|
||||
set(SDL_LOADSO_ENABLED_BY_DEFAULT OFF)
|
||||
endif()
|
||||
|
||||
set(SDL_X11_XRANDR_DEFAULT ON)
|
||||
if(SOLARIS)
|
||||
set(SDL_X11_XRANDR_DEFAULT OFF)
|
||||
endif()
|
||||
|
||||
# When defined, respect CMake's BUILD_SHARED_LIBS setting:
|
||||
set(SDL_STATIC_ENABLED_BY_DEFAULT ON)
|
||||
if (NOT DEFINED SDL_SHARED_ENABLED_BY_DEFAULT)
|
||||
@@ -396,7 +417,7 @@ dep_option(SDL_SSE "Use SSE assembly routines" ON "SDL_ASSEMBLY;
|
||||
dep_option(SDL_SSE2 "Use SSE2 assembly routines" ON "SDL_ASSEMBLY;SDL_CPU_X86 OR SDL_CPU_X64" OFF)
|
||||
dep_option(SDL_SSE3 "Use SSE3 assembly routines" ON "SDL_ASSEMBLY;SDL_CPU_X86 OR SDL_CPU_X64" OFF)
|
||||
dep_option(SDL_MMX "Use MMX assembly routines" ON "SDL_ASSEMBLY;SDL_CPU_X86 OR SDL_CPU_X64" OFF)
|
||||
dep_option(SDL_3DNOW "Use 3Dnow! MMX assembly routines" ON "SDL_ASSEMBLY;SDL_CPU_X86 OR SDL_CPU_X64" OFF)
|
||||
dep_option(SDL_3DNOW "Use 3Dnow! MMX assembly routines" OFF "SDL_ASSEMBLY;SDL_CPU_X86 OR SDL_CPU_X64" OFF)
|
||||
dep_option(SDL_ALTIVEC "Use Altivec assembly routines" ON "SDL_ASSEMBLY" OFF)
|
||||
dep_option(SDL_ARMSIMD "Use SIMD assembly blitters on ARM" OFF "SDL_ASSEMBLY;SDL_CPU_ARM32" OFF)
|
||||
dep_option(SDL_ARMNEON "Use NEON assembly blitters on ARM" OFF "SDL_ASSEMBLY;SDL_CPU_ARM32" OFF)
|
||||
@@ -412,7 +433,8 @@ set_option(SDL_DIRECTFB "Use DirectFB video driver" OFF)
|
||||
dep_option(SDL_DIRECTFB_SHARED "Dynamically load directfb support" ON "SDL_DIRECTFB" OFF)
|
||||
set_option(SDL_DUMMYVIDEO "Use dummy video driver" ON)
|
||||
dep_option(SDL_IBUS "Enable IBus support" ON ${UNIX_SYS} OFF)
|
||||
set_option(SDL_SYSTEM_ICONV "Use iconv() from system-installed libraries" ON)
|
||||
set_option(SDL_SYSTEM_ICONV "Use iconv() from system-installed libraries" ${SDL_SYSTEM_ICONV_DEFAULT})
|
||||
set_option(SDL_LIBICONV "Prefer iconv() from libiconv, if available, over libc version" OFF)
|
||||
set_option(SDL_OPENGL "Include OpenGL support" ON)
|
||||
set_option(SDL_OPENGLES "Include OpenGL ES support" ON)
|
||||
set_option(SDL_PTHREADS "Use POSIX threads for multi-threading" ${SDL_PTHREADS_ENABLED_BY_DEFAULT})
|
||||
@@ -442,17 +464,19 @@ set_option(SDL_RPATH "Use an rpath when linking SDL" ${UNIX_SYS})
|
||||
set_option(SDL_CLOCK_GETTIME "Use clock_gettime() instead of gettimeofday()" ${SDL_CLOCK_GETTIME_ENABLED_BY_DEFAULT})
|
||||
set_option(SDL_X11 "Use X11 video driver" ${UNIX_SYS})
|
||||
dep_option(SDL_X11_SHARED "Dynamically load X11 support" ON "SDL_X11" OFF)
|
||||
set(SDL_X11_OPTIONS Xcursor Xdbe XInput Xfixes Xrandr Xscrnsaver XShape)
|
||||
foreach(_SUB ${SDL_X11_OPTIONS})
|
||||
string(TOUPPER "SDL_X11_${_SUB}" _OPT)
|
||||
dep_option(${_OPT} "Enable ${_SUB} support" ON "SDL_X11" OFF)
|
||||
endforeach()
|
||||
dep_option(SDL_X11_XCURSOR "Enable Xcursor support" ON SDL_X11 OFF)
|
||||
dep_option(SDL_X11_XDBE "Enable Xdbe support" ON SDL_X11 OFF)
|
||||
dep_option(SDL_X11_XINPUT "Enable XInput support" ON SDL_X11 OFF)
|
||||
dep_option(SDL_X11_XFIXES "Enable Xfixes support" ON SDL_X11 OFF)
|
||||
dep_option(SDL_X11_XRANDR "Enable Xrandr support" "${SDL_X11_XRANDR_DEFAULT}" SDL_X11 OFF)
|
||||
dep_option(SDL_X11_XSCRNSAVER "Enable Xscrnsaver support" ON SDL_X11 OFF)
|
||||
dep_option(SDL_X11_XSHAPE "Enable XShape support" ON SDL_X11 OFF)
|
||||
set_option(SDL_WAYLAND "Use Wayland video driver" ${UNIX_SYS})
|
||||
dep_option(SDL_WAYLAND_SHARED "Dynamically load Wayland support" ON "SDL_WAYLAND" OFF)
|
||||
dep_option(SDL_WAYLAND_LIBDECOR "Use client-side window decorations on Wayland" ON "SDL_WAYLAND" OFF)
|
||||
dep_option(SDL_WAYLAND_LIBDECOR_SHARED "Dynamically load libdecor support" ON "SDL_WAYLAND_LIBDECOR;SDL_WAYLAND_SHARED" OFF)
|
||||
dep_option(SDL_WAYLAND_QT_TOUCH "QtWayland server support for Wayland video driver" ON "SDL_WAYLAND" OFF)
|
||||
set_option(SDL_RPI "Use Raspberry Pi video driver" ${UNIX_SYS})
|
||||
set_option(SDL_RPI "Use Raspberry Pi 0-3 video driver" ${UNIX_SYS})
|
||||
set_option(SDL_COCOA "Use Cocoa video driver" ${APPLE})
|
||||
set_option(SDL_DIRECTX "Use DirectX for Windows audio/video" ${WINDOWS})
|
||||
set_option(SDL_XINPUT "Use Xinput for Windows" ${WINDOWS})
|
||||
@@ -563,7 +587,7 @@ if(NOT SDL_FOREGROUNDING_SIGNAL STREQUAL "OFF")
|
||||
endif()
|
||||
|
||||
# Compiler option evaluation
|
||||
if(USE_GCC OR USE_CLANG OR USE_INTELCC)
|
||||
if(USE_GCC OR USE_CLANG OR USE_INTELCC OR USE_QCC)
|
||||
# Check for -Wall first, so later things can override pieces of it.
|
||||
# Note: clang-cl treats -Wall as -Weverything (which is very loud),
|
||||
# /W3 as -Wall, and /W4 as -Wall -Wextra. So: /W3 is enough.
|
||||
@@ -577,11 +601,50 @@ if(USE_GCC OR USE_CLANG OR USE_INTELCC)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
check_c_compiler_flag(-Wundef HAVE_GCC_WUNDEF)
|
||||
if(HAVE_GCC_WUNDEF)
|
||||
list(APPEND EXTRA_CFLAGS "-Wundef")
|
||||
endif()
|
||||
|
||||
check_c_compiler_flag(-fno-strict-aliasing HAVE_GCC_NO_STRICT_ALIASING)
|
||||
if(HAVE_GCC_NO_STRICT_ALIASING)
|
||||
list(APPEND EXTRA_CFLAGS "-fno-strict-aliasing")
|
||||
endif()
|
||||
|
||||
check_c_compiler_flag(-Wdocumentation HAVE_GCC_WDOCUMENTATION)
|
||||
if(HAVE_GCC_WDOCUMENTATION)
|
||||
if(SDL_WERROR)
|
||||
check_c_compiler_flag(-Werror=documentation HAVE_GCC_WERROR_DOCUMENTATION)
|
||||
if(HAVE_GCC_WERROR_DOCUMENTATION)
|
||||
list(APPEND EXTRA_CFLAGS "-Werror=documentation")
|
||||
endif()
|
||||
endif()
|
||||
list(APPEND EXTRA_CFLAGS "-Wdocumentation")
|
||||
endif()
|
||||
|
||||
check_c_compiler_flag(-Wdocumentation-unknown-command HAVE_GCC_WDOCUMENTATION_UNKNOWN_COMMAND)
|
||||
if(HAVE_GCC_WDOCUMENTATION_UNKNOWN_COMMAND)
|
||||
if(SDL_WERROR)
|
||||
check_c_compiler_flag(-Werror=documentation-unknown-command HAVE_GCC_WERROR_DOCUMENTATION_UNKNOWN_COMMAND)
|
||||
if(HAVE_GCC_WERROR_DOCUMENTATION_UNKNOWN_COMMAND)
|
||||
list(APPEND EXTRA_CFLAGS "-Werror=documentation-unknown-command")
|
||||
endif()
|
||||
endif()
|
||||
list(APPEND EXTRA_CFLAGS "-Wdocumentation-unknown-command")
|
||||
endif()
|
||||
|
||||
check_c_compiler_flag(-fcomment-block-commands=threadsafety HAVE_GCC_COMMENT_BLOCK_COMMANDS)
|
||||
if(HAVE_GCC_COMMENT_BLOCK_COMMANDS)
|
||||
list(APPEND EXTRA_CFLAGS "-fcomment-block-commands=threadsafety")
|
||||
list(APPEND EXTRA_CFLAGS "-fcomment-block-commands=deprecated")
|
||||
else()
|
||||
check_c_compiler_flag(/clang:-fcomment-block-commands=threadsafety HAVE_CLANG_COMMENT_BLOCK_COMMANDS)
|
||||
if(HAVE_CLANG_COMMENT_BLOCK_COMMANDS)
|
||||
list(APPEND EXTRA_CFLAGS "/clang:-fcomment-block-commands=threadsafety")
|
||||
list(APPEND EXTRA_CFLAGS "/clang:-fcomment-block-commands=deprecated")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
check_c_compiler_flag(-Wdeclaration-after-statement HAVE_GCC_WDECLARATION_AFTER_STATEMENT)
|
||||
if(HAVE_GCC_WDECLARATION_AFTER_STATEMENT)
|
||||
if(SDL_WERROR)
|
||||
@@ -620,11 +683,6 @@ if(USE_GCC OR USE_CLANG OR USE_INTELCC)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
set(CMAKE_REQUIRED_FLAGS "-mpreferred-stack-boundary=2")
|
||||
check_c_source_compiles("int x = 0; int main(int argc, char **argv) { return 0; }"
|
||||
HAVE_GCC_PREFERRED_STACK_BOUNDARY)
|
||||
set(CMAKE_REQUIRED_FLAGS ${ORIG_CMAKE_REQUIRED_FLAGS})
|
||||
|
||||
set(CMAKE_REQUIRED_FLAGS "-fvisibility=hidden -Werror")
|
||||
check_c_source_compiles("
|
||||
#if !defined(__GNUC__) || __GNUC__ < 4
|
||||
@@ -863,7 +921,7 @@ if(SDL_ASSEMBLY)
|
||||
|
||||
if(SDL_LSX)
|
||||
cmake_push_check_state()
|
||||
list(APPEND CMAKE_REQUIRED_FLAGS "-mlsx")
|
||||
set(CMAKE_REQUIRED_FLAGS "-mlsx")
|
||||
check_c_source_compiles("
|
||||
#ifndef __loongarch_sx
|
||||
#error Assembler CPP flag not enabled
|
||||
@@ -878,22 +936,6 @@ if(SDL_ASSEMBLY)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(SDL_LASX)
|
||||
cmake_push_check_state()
|
||||
list(APPEND CMAKE_REQUIRED_FLAGS "-mlasx")
|
||||
check_c_source_compiles("
|
||||
#ifndef __loongarch_asx
|
||||
#error Assembler CPP flag not enabled
|
||||
#endif
|
||||
int main(int argc, char **argv) { return 0; }" CPU_SUPPORTS_LASX)
|
||||
check_include_file("lasxintrin.h" HAVE_LASXINTRIN_H)
|
||||
cmake_pop_check_state()
|
||||
if(CPU_SUPPORTS_LASX AND HAVE_LASXINTRIN_H)
|
||||
list(APPEND EXTRA_CFLAGS "-mlasx")
|
||||
set(HAVE_LASX TRUE)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(SDL_ARMSIMD)
|
||||
set(ORIG_CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS}")
|
||||
set(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} -x assembler-with-cpp")
|
||||
@@ -1023,15 +1065,11 @@ if(SDL_LIBC)
|
||||
sys/types.h
|
||||
wchar.h
|
||||
)
|
||||
if(NOT EMSCRIPTEN)
|
||||
list(APPEND headers_to_check libunwind.h)
|
||||
endif()
|
||||
foreach(_HEADER ${headers_to_check})
|
||||
string(TOUPPER "HAVE_${_HEADER}" _UPPER)
|
||||
string(REGEX REPLACE "[./]" "_" _HAVE_H ${_UPPER})
|
||||
check_include_file("${_HEADER}" ${_HAVE_H})
|
||||
endforeach()
|
||||
check_include_file(linux/input.h HAVE_LINUX_INPUT_H)
|
||||
|
||||
set(STDC_HEADER_NAMES "stddef.h;stdarg.h;stdlib.h;string.h;stdio.h;wchar.h;float.h")
|
||||
check_include_files("${STDC_HEADER_NAMES}" STDC_HEADERS)
|
||||
@@ -1063,6 +1101,8 @@ if(SDL_LIBC)
|
||||
check_symbol_exists(getauxval "sys/auxv.h" HAVE_GETAUXVAL)
|
||||
check_symbol_exists(elf_aux_info "sys/auxv.h" HAVE_ELF_AUX_INFO)
|
||||
check_symbol_exists(poll "poll.h" HAVE_POLL)
|
||||
check_symbol_exists(memfd_create "sys/mman.h" HAVE_MEMFD_CREATE)
|
||||
check_symbol_exists(posix_fallocate "fcntl.h" HAVE_POSIX_FALLOCATE)
|
||||
|
||||
check_library_exists(m pow "" HAVE_LIBM)
|
||||
if(HAVE_LIBM)
|
||||
@@ -1085,16 +1125,31 @@ if(SDL_LIBC)
|
||||
endif()
|
||||
|
||||
if(SDL_SYSTEM_ICONV)
|
||||
check_library_exists(iconv iconv_open "" HAVE_LIBICONV)
|
||||
if(HAVE_LIBICONV)
|
||||
list(APPEND EXTRA_LIBS iconv)
|
||||
check_c_source_compiles("
|
||||
#define LIBICONV_PLUG 1 /* in case libiconv header is in include path */
|
||||
#include <stddef.h>
|
||||
#include <iconv.h>
|
||||
int main(int argc, char **argv) {
|
||||
return !iconv_open(NULL,NULL);
|
||||
}" ICONV_IN_LIBC)
|
||||
|
||||
cmake_push_check_state()
|
||||
list(APPEND CMAKE_REQUIRED_LIBRARIES iconv)
|
||||
check_c_source_compiles("
|
||||
#include <stddef.h>
|
||||
#include <iconv.h>
|
||||
int main(int argc, char **argv) {
|
||||
return !iconv_open(NULL,NULL);
|
||||
}" ICONV_IN_LIBICONV)
|
||||
cmake_pop_check_state()
|
||||
|
||||
if(ICONV_IN_LIBC OR ICONV_IN_LIBICONV)
|
||||
set(HAVE_ICONV 1)
|
||||
set(HAVE_SYSTEM_ICONV TRUE)
|
||||
else()
|
||||
check_library_exists(c iconv_open "" HAVE_BUILTIN_ICONV)
|
||||
if(HAVE_BUILTIN_ICONV)
|
||||
set(HAVE_ICONV 1)
|
||||
set(HAVE_SYSTEM_ICONV TRUE)
|
||||
if(ICONV_IN_LIBICONV AND (SDL_LIBICONV OR (NOT ICONV_IN_LIBC)))
|
||||
set(SDL_USE_LIBICONV 1)
|
||||
set(HAVE_LIBICONV TRUE)
|
||||
list(APPEND EXTRA_LIBS iconv)
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
@@ -1405,10 +1460,7 @@ elseif(EMSCRIPTEN)
|
||||
endif()
|
||||
|
||||
CheckPTHREAD()
|
||||
|
||||
if(HAVE_LIBUNWIND_H)
|
||||
list(APPEND EXTRA_TEST_LIBS unwind)
|
||||
endif()
|
||||
CheckLibUnwind()
|
||||
|
||||
elseif(UNIX AND NOT APPLE AND NOT RISCOS AND NOT HAIKU)
|
||||
if(SDL_AUDIO)
|
||||
@@ -1427,6 +1479,12 @@ elseif(UNIX AND NOT APPLE AND NOT RISCOS AND NOT HAIKU)
|
||||
file(GLOB AIX_AUDIO_SOURCES ${SDL2_SOURCE_DIR}/src/audio/paudio/*.c)
|
||||
list(APPEND SOURCE_FILES ${AIX_AUDIO_SOURCES})
|
||||
set(HAVE_SDL_AUDIO TRUE)
|
||||
elseif(QNX)
|
||||
set(SDL_AUDIO_DRIVER_QSA 1)
|
||||
file(GLOB QSA_AUDIO_SOURCES ${SDL2_SOURCE_DIR}/src/audio/qsa/*.c)
|
||||
list(APPEND SOURCE_FILES ${QSA_AUDIO_SOURCES})
|
||||
list(APPEND EXTRA_LIBS asound)
|
||||
set(HAVE_SDL_AUDIO TRUE)
|
||||
endif()
|
||||
CheckOSS()
|
||||
CheckALSA()
|
||||
@@ -1458,6 +1516,7 @@ elseif(UNIX AND NOT APPLE AND NOT RISCOS AND NOT HAIKU)
|
||||
set(SDL_VIDEO_VULKAN 1)
|
||||
set(HAVE_VULKAN TRUE)
|
||||
endif()
|
||||
CheckQNXScreen()
|
||||
endif()
|
||||
|
||||
if(UNIX)
|
||||
@@ -1469,7 +1528,7 @@ elseif(UNIX AND NOT APPLE AND NOT RISCOS AND NOT HAIKU)
|
||||
#ifndef EVIOCGNAME
|
||||
#error EVIOCGNAME() ioctl not available
|
||||
#endif
|
||||
int main(int argc, char** argv) { return 0; }" HAVE_INPUT_EVENTS)
|
||||
int main(int argc, char** argv) { return 0; }" HAVE_LINUX_INPUT_H)
|
||||
|
||||
if(LINUX)
|
||||
check_c_source_compiles("
|
||||
@@ -1505,11 +1564,11 @@ elseif(UNIX AND NOT APPLE AND NOT RISCOS AND NOT HAIKU)
|
||||
}" HAVE_INPUT_WSCONS)
|
||||
endif()
|
||||
|
||||
if(HAVE_INPUT_EVENTS)
|
||||
if(HAVE_LINUX_INPUT_H)
|
||||
set(SDL_INPUT_LINUXEV 1)
|
||||
endif()
|
||||
|
||||
if(SDL_HAPTIC AND HAVE_INPUT_EVENTS)
|
||||
if(SDL_HAPTIC AND HAVE_LINUX_INPUT_H)
|
||||
set(SDL_HAPTIC_LINUX 1)
|
||||
file(GLOB HAPTIC_SOURCES ${SDL2_SOURCE_DIR}/src/haptic/linux/*.c)
|
||||
list(APPEND SOURCE_FILES ${HAPTIC_SOURCES})
|
||||
@@ -1572,15 +1631,8 @@ elseif(UNIX AND NOT APPLE AND NOT RISCOS AND NOT HAIKU)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(HAVE_LIBUNWIND_H)
|
||||
# We've already found the header, so link the lib if present.
|
||||
# NB: This .pc file is not present on FreeBSD where the implicitly
|
||||
# linked base system libgcc_s includes all libunwind ABI.
|
||||
pkg_search_module(UNWIND libunwind)
|
||||
pkg_search_module(UNWIND_GENERIC libunwind-generic)
|
||||
list(APPEND EXTRA_TEST_LIBS ${UNWIND_LIBRARIES} ${UNWIND_GENERIC_LIBRARIES})
|
||||
endif()
|
||||
endif()
|
||||
CheckLibUnwind()
|
||||
|
||||
if(HAVE_DBUS_DBUS_H)
|
||||
list(APPEND SOURCE_FILES "${SDL2_SOURCE_DIR}/src/core/linux/SDL_dbus.c")
|
||||
@@ -1602,7 +1654,7 @@ elseif(UNIX AND NOT APPLE AND NOT RISCOS AND NOT HAIKU)
|
||||
list(APPEND SOURCE_FILES "${SDL2_SOURCE_DIR}/src/core/linux/SDL_udev.c")
|
||||
endif()
|
||||
|
||||
if(HAVE_INPUT_EVENTS)
|
||||
if(HAVE_LINUX_INPUT_H)
|
||||
list(APPEND SOURCE_FILES "${SDL2_SOURCE_DIR}/src/core/linux/SDL_evdev.c")
|
||||
list(APPEND SOURCE_FILES "${SDL2_SOURCE_DIR}/src/core/linux/SDL_evdev_kbd.c")
|
||||
endif()
|
||||
@@ -1611,6 +1663,11 @@ elseif(UNIX AND NOT APPLE AND NOT RISCOS AND NOT HAIKU)
|
||||
list(APPEND SOURCE_FILES "${SDL2_SOURCE_DIR}/src/core/freebsd/SDL_evdev_kbd_freebsd.c")
|
||||
endif()
|
||||
|
||||
if(HAVE_INPUT_WSCONS)
|
||||
list(APPEND SOURCE_FILES "${SDL2_SOURCE_DIR}/src/core/openbsd/SDL_wscons_kbd.c")
|
||||
list(APPEND SOURCE_FILES "${SDL2_SOURCE_DIR}/src/core/openbsd/SDL_wscons_mouse.c")
|
||||
endif()
|
||||
|
||||
# Always compiled for Linux, unconditionally:
|
||||
list(APPEND SOURCE_FILES "${SDL2_SOURCE_DIR}/src/core/linux/SDL_evdev_capabilities.c")
|
||||
list(APPEND SOURCE_FILES "${SDL2_SOURCE_DIR}/src/core/linux/SDL_threadprio.c")
|
||||
@@ -1627,7 +1684,7 @@ elseif(UNIX AND NOT APPLE AND NOT RISCOS AND NOT HAIKU)
|
||||
if(FREEBSD OR NETBSD OR OPENBSD OR BSDI)
|
||||
CheckUSBHID()
|
||||
endif()
|
||||
if(LINUX AND HAVE_LINUX_INPUT_H AND NOT ANDROID)
|
||||
if((LINUX OR FREEBSD) AND HAVE_LINUX_INPUT_H AND NOT ANDROID)
|
||||
set(SDL_JOYSTICK_LINUX 1)
|
||||
file(GLOB JOYSTICK_SOURCES ${SDL2_SOURCE_DIR}/src/joystick/linux/*.c ${SDL2_SOURCE_DIR}/src/joystick/steam/*.c)
|
||||
list(APPEND SOURCE_FILES ${JOYSTICK_SOURCES})
|
||||
@@ -1708,6 +1765,13 @@ elseif(UNIX AND NOT APPLE AND NOT RISCOS AND NOT HAIKU)
|
||||
set(HAVE_RPATH TRUE)
|
||||
endif()
|
||||
|
||||
if(QNX)
|
||||
# QNX's *printf() family generates a SIGSEGV if NULL is passed for a string
|
||||
# specifier (on purpose), but SDL expects "(null)". Use the built-in
|
||||
# implementation.
|
||||
set(HAVE_VSNPRINTF 0)
|
||||
set(USE_POSIX_SPAWN 1)
|
||||
endif()
|
||||
elseif(WINDOWS)
|
||||
find_program(WINDRES windres)
|
||||
|
||||
@@ -1719,18 +1783,11 @@ elseif(WINDOWS)
|
||||
list(APPEND SOURCE_FILES ${CORE_SOURCES})
|
||||
|
||||
if(WINDOWS_STORE)
|
||||
enable_language(CXX)
|
||||
file(GLOB WINRT_SOURCE_FILES ${SDL2_SOURCE_DIR}/src/core/winrt/*.c ${SDL2_SOURCE_DIR}/src/core/winrt/*.cpp)
|
||||
list(APPEND SOURCE_FILES ${WINRT_SOURCE_FILES})
|
||||
endif()
|
||||
|
||||
if(MSVC AND NOT SDL_LIBC)
|
||||
# Prevent codegen that would use the VC runtime libraries.
|
||||
set_property(DIRECTORY . APPEND PROPERTY COMPILE_OPTIONS "/GS-;/Gs1048576")
|
||||
if(NOT ARCH_64 AND NOT CMAKE_GENERATOR_PLATFORM STREQUAL "ARM")
|
||||
set_property(DIRECTORY . APPEND PROPERTY COMPILE_OPTIONS "/arch:SSE")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(SDL_MISC)
|
||||
if(WINDOWS_STORE)
|
||||
file(GLOB MISC_SOURCES ${SDL2_SOURCE_DIR}/src/misc/winrt/*.cpp)
|
||||
@@ -1756,17 +1813,15 @@ elseif(WINDOWS)
|
||||
check_include_file(d3d9.h HAVE_D3D_H)
|
||||
check_include_file(d3d11_1.h HAVE_D3D11_H)
|
||||
check_c_source_compiles("
|
||||
#include <winsdkver.h>
|
||||
#include <sdkddkver.h>
|
||||
#include <d3d12.h>
|
||||
#include <d3d12sdklayers.h>
|
||||
ID3D12Device1 *device;
|
||||
#if WDK_NTDDI_VERSION > 0x0A000008
|
||||
int main(int argc, char **argv) { return 0; }
|
||||
#endif" HAVE_D3D12_H)
|
||||
int main(int argc, char **argv) {return 0; }
|
||||
" HAVE_D3D12_H)
|
||||
check_include_file(ddraw.h HAVE_DDRAW_H)
|
||||
check_include_file(dsound.h HAVE_DSOUND_H)
|
||||
check_include_file(dinput.h HAVE_DINPUT_H)
|
||||
if(WINDOWS_STORE OR CMAKE_GENERATOR_PLATFORM STREQUAL "ARM")
|
||||
if(WINDOWS_STORE OR SDL_CPU_ARM32)
|
||||
set(HAVE_DINPUT_H 0)
|
||||
endif()
|
||||
check_include_file(dxgi.h HAVE_DXGI_H)
|
||||
@@ -1774,8 +1829,10 @@ elseif(WINDOWS)
|
||||
set(HAVE_DIRECTX TRUE)
|
||||
if(NOT MINGW AND NOT USE_WINSDK_DIRECTX)
|
||||
# TODO: change $ENV{DXSDL_DIR} to get the path from the include checks
|
||||
target_link_directories(sdl-build-options INTERFACE "$$ENV{DXSDK_DIR}\\lib\\${PROCESSOR_ARCH}")
|
||||
target_include_directories(sdl-build-options INTERFACE "$ENV{DXSDK_DIR}\\Include")
|
||||
file(TO_CMAKE_PATH "$ENV{DXSDK_DIR}\\lib\\${PROCESSOR_ARCH}" SDL2_TMP_DXSDK_LIB_DIR)
|
||||
target_link_directories(sdl-build-options INTERFACE "${SDL2_TMP_DXSDK_LIB_DIR}")
|
||||
file(TO_CMAKE_PATH "$ENV{DXSDK_DIR}\\Include" SDL2_TMP_DXSDK_INCLUDE_DIR)
|
||||
target_include_directories(sdl-build-options INTERFACE "${SDL2_TMP_DXSDK_INCLUDE_DIR}")
|
||||
endif()
|
||||
endif()
|
||||
set(CMAKE_REQUIRED_FLAGS ${ORIG_CMAKE_REQUIRED_FLAGS})
|
||||
@@ -1787,16 +1844,6 @@ elseif(WINDOWS)
|
||||
#include <windows.h>
|
||||
#include <xinput.h>
|
||||
int main(int argc, char **argv) { return 0; }" HAVE_XINPUT_H)
|
||||
check_c_source_compiles("
|
||||
#include <windows.h>
|
||||
#include <xinput.h>
|
||||
XINPUT_GAMEPAD_EX x1;
|
||||
int main(int argc, char **argv) { return 0; }" HAVE_XINPUT_GAMEPAD_EX)
|
||||
check_c_source_compiles("
|
||||
#include <windows.h>
|
||||
#include <xinput.h>
|
||||
XINPUT_STATE_EX s1;
|
||||
int main(int argc, char **argv) { return 0; }" HAVE_XINPUT_STATE_EX)
|
||||
check_c_source_compiles("
|
||||
#define COBJMACROS
|
||||
#include <windows.gaming.input.h>
|
||||
@@ -1926,7 +1973,7 @@ elseif(WINDOWS)
|
||||
|
||||
# Libraries for Win32 native and MinGW
|
||||
if(NOT WINDOWS_STORE)
|
||||
list(APPEND EXTRA_LIBS user32 gdi32 winmm imm32 ole32 oleaut32 version uuid advapi32 setupapi shell32)
|
||||
list(APPEND EXTRA_LIBS kernel32 user32 gdi32 winmm imm32 ole32 oleaut32 version uuid advapi32 setupapi shell32)
|
||||
endif()
|
||||
|
||||
if(WINDOWS_STORE)
|
||||
@@ -2020,6 +2067,7 @@ elseif(WINDOWS)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
enable_language(RC)
|
||||
file(GLOB VERSION_SOURCES ${SDL2_SOURCE_DIR}/src/main/windows/*.rc)
|
||||
file(GLOB SDLMAIN_SOURCES ${SDL2_SOURCE_DIR}/src/main/windows/*.c)
|
||||
if(MINGW OR CYGWIN)
|
||||
@@ -2037,7 +2085,7 @@ elseif(APPLE)
|
||||
# !!! FIXME: we need Carbon for some very old API calls in
|
||||
# !!! FIXME: src/video/cocoa/SDL_cocoakeyboard.c, but we should figure out
|
||||
# !!! FIXME: how to dump those.
|
||||
if(DARWIN OR MACOSX)
|
||||
if(MACOS)
|
||||
set(SDL_FRAMEWORK_COCOA 1)
|
||||
set(SDL_FRAMEWORK_CARBON 1)
|
||||
endif()
|
||||
@@ -2051,12 +2099,12 @@ elseif(APPLE)
|
||||
set(HAVE_SDL_FILE TRUE)
|
||||
endif()
|
||||
|
||||
if(IOS OR TVOS)
|
||||
if(IOS OR TVOS OR VISIONOS OR WATCHOS)
|
||||
file(GLOB SDLMAIN_SOURCES ${SDL2_SOURCE_DIR}/src/main/uikit/*.c)
|
||||
endif()
|
||||
|
||||
if(SDL_MISC)
|
||||
if(IOS OR TVOS)
|
||||
if(IOS OR TVOS OR VISIONOS OR WATCHOS)
|
||||
file(GLOB MISC_SOURCES ${SDL2_SOURCE_DIR}/src/misc/ios/*.m)
|
||||
else()
|
||||
file(GLOB MISC_SOURCES ${SDL2_SOURCE_DIR}/src/misc/macosx/*.m)
|
||||
@@ -2081,10 +2129,10 @@ elseif(APPLE)
|
||||
|
||||
if(SDL_JOYSTICK)
|
||||
file(GLOB MFI_JOYSTICK_SOURCES ${SDL2_SOURCE_DIR}/src/joystick/iphoneos/*.m)
|
||||
if(IOS OR TVOS)
|
||||
if(IOS OR TVOS OR VISIONOS OR WATCHOS)
|
||||
file(GLOB JOYSTICK_SOURCES ${SDL2_SOURCE_DIR}/src/joystick/steam/*.c)
|
||||
set(SDL_JOYSTICK_MFI 1)
|
||||
if(IOS)
|
||||
if(IOS OR VISIONOS OR WATCHOS)
|
||||
set(SDL_FRAMEWORK_COREMOTION 1)
|
||||
endif()
|
||||
set(SDL_FRAMEWORK_GAMECONTROLLER 1)
|
||||
@@ -2125,7 +2173,7 @@ elseif(APPLE)
|
||||
endif()
|
||||
|
||||
if(SDL_HAPTIC)
|
||||
if (IOS OR TVOS)
|
||||
if(IOS OR TVOS OR VISIONOS OR WATCHOS)
|
||||
file(GLOB HAPTIC_SOURCES ${SDL2_SOURCE_DIR}/src/haptic/dummy/*.c)
|
||||
set(SDL_HAPTIC_DUMMY 1)
|
||||
else()
|
||||
@@ -2139,7 +2187,7 @@ elseif(APPLE)
|
||||
endif()
|
||||
|
||||
if(SDL_POWER)
|
||||
if (IOS OR TVOS)
|
||||
if(IOS OR TVOS OR VISIONOS OR WATCHOS)
|
||||
file(GLOB POWER_SOURCES ${SDL2_SOURCE_DIR}/src/power/uikit/*.m)
|
||||
set(SDL_POWER_UIKIT 1)
|
||||
else()
|
||||
@@ -2172,7 +2220,7 @@ elseif(APPLE)
|
||||
endif()
|
||||
|
||||
if(SDL_SENSOR)
|
||||
if(IOS)
|
||||
if(IOS OR VISIONOS OR WATCHOS)
|
||||
set(SDL_SENSOR_COREMOTION 1)
|
||||
set(HAVE_SDL_SENSORS TRUE)
|
||||
file(GLOB SENSOR_SOURCES ${SDL2_SOURCE_DIR}/src/sensor/coremotion/*.m)
|
||||
@@ -2182,7 +2230,7 @@ elseif(APPLE)
|
||||
|
||||
# iOS hack needed - http://code.google.com/p/ios-cmake/ ?
|
||||
if(SDL_VIDEO)
|
||||
if (IOS OR TVOS)
|
||||
if(IOS OR TVOS OR VISIONOS OR WATCHOS)
|
||||
set(SDL_VIDEO_DRIVER_UIKIT 1)
|
||||
set(SDL_FRAMEWORK_COREGRAPHICS 1)
|
||||
set(SDL_FRAMEWORK_QUARTZCORE 1)
|
||||
@@ -2203,7 +2251,7 @@ elseif(APPLE)
|
||||
endif()
|
||||
|
||||
if(SDL_OPENGLES)
|
||||
if(IOS OR TVOS)
|
||||
if(IOS OR TVOS OR VISIONOS OR WATCHOS)
|
||||
set(SDL_FRAMEWORK_OPENGLES 1)
|
||||
set(SDL_VIDEO_OPENGL_ES 1)
|
||||
set(SDL_VIDEO_RENDER_OGL_ES 1)
|
||||
@@ -2246,73 +2294,96 @@ elseif(APPLE)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Minimum version for $<LINK_LIBRARY:feature,library-list>
|
||||
cmake_minimum_required(VERSION 3.24)
|
||||
|
||||
# Actually load the frameworks at the end so we don't duplicate include.
|
||||
if(SDL_FRAMEWORK_COREVIDEO)
|
||||
list(APPEND EXTRA_LDFLAGS "-Wl,-framework,CoreVideo")
|
||||
list(APPEND PKGCONFIG_LDFLAGS "-Wl,-framework,CoreVideo")
|
||||
list(APPEND CMAKE_LIBS "$<LINK_LIBRARY:FRAMEWORK,CoreVideo>")
|
||||
endif()
|
||||
if(SDL_FRAMEWORK_COCOA)
|
||||
list(APPEND EXTRA_LDFLAGS "-Wl,-framework,Cocoa")
|
||||
list(APPEND PKGCONFIG_LDFLAGS "-Wl,-framework,Cocoa")
|
||||
list(APPEND CMAKE_LIBS "$<LINK_LIBRARY:FRAMEWORK,Cocoa>")
|
||||
endif()
|
||||
if(SDL_FRAMEWORK_IOKIT)
|
||||
list(APPEND EXTRA_LDFLAGS "-Wl,-framework,IOKit")
|
||||
list(APPEND PKGCONFIG_LDFLAGS "-Wl,-framework,IOKit")
|
||||
list(APPEND CMAKE_LIBS "$<LINK_LIBRARY:FRAMEWORK,IOKit>")
|
||||
endif()
|
||||
if(SDL_FRAMEWORK_FF)
|
||||
list(APPEND EXTRA_LDFLAGS "-Wl,-framework,ForceFeedback")
|
||||
list(APPEND PKGCONFIG_LDFLAGS "-Wl,-framework,ForceFeedback")
|
||||
list(APPEND CMAKE_LIBS "$<LINK_LIBRARY:FRAMEWORK,ForceFeedback>")
|
||||
endif()
|
||||
if(SDL_FRAMEWORK_CARBON)
|
||||
list(APPEND EXTRA_LDFLAGS "-Wl,-framework,Carbon")
|
||||
list(APPEND PKGCONFIG_LDFLAGS "-Wl,-framework,Carbon")
|
||||
list(APPEND CMAKE_LIBS "$<LINK_LIBRARY:FRAMEWORK,Carbon>")
|
||||
endif()
|
||||
if(SDL_FRAMEWORK_COREAUDIO)
|
||||
list(APPEND EXTRA_LDFLAGS "-Wl,-framework,CoreAudio")
|
||||
list(APPEND PKGCONFIG_LDFLAGS "-Wl,-framework,CoreAudio")
|
||||
list(APPEND CMAKE_LIBS "$<LINK_LIBRARY:FRAMEWORK,CoreAudio>")
|
||||
endif()
|
||||
if(SDL_FRAMEWORK_AUDIOTOOLBOX)
|
||||
list(APPEND EXTRA_LDFLAGS "-Wl,-framework,AudioToolbox")
|
||||
list(APPEND PKGCONFIG_LDFLAGS "-Wl,-framework,AudioToolbox")
|
||||
list(APPEND CMAKE_LIBS "$<LINK_LIBRARY:FRAMEWORK,AudioToolbox>")
|
||||
endif()
|
||||
if(SDL_FRAMEWORK_AVFOUNDATION)
|
||||
list(APPEND EXTRA_LDFLAGS "-Wl,-framework,AVFoundation")
|
||||
list(APPEND PKGCONFIG_LDFLAGS "-Wl,-framework,AVFoundation")
|
||||
list(APPEND CMAKE_LIBS "$<LINK_LIBRARY:FRAMEWORK,AVFoundation>")
|
||||
endif()
|
||||
if(SDL_FRAMEWORK_COREBLUETOOTH)
|
||||
list(APPEND EXTRA_LDFLAGS "-Wl,-framework,CoreBluetooth")
|
||||
list(APPEND PKGCONFIG_LDFLAGS "-Wl,-framework,CoreBluetooth")
|
||||
list(APPEND CMAKE_LIBS "$<LINK_LIBRARY:FRAMEWORK,CoreBluetooth>")
|
||||
endif()
|
||||
if(SDL_FRAMEWORK_COREGRAPHICS)
|
||||
list(APPEND EXTRA_LDFLAGS "-Wl,-framework,CoreGraphics")
|
||||
list(APPEND PKGCONFIG_LDFLAGS "-Wl,-framework,CoreGraphics")
|
||||
list(APPEND CMAKE_LIBS "$<LINK_LIBRARY:FRAMEWORK,CoreGraphics>")
|
||||
endif()
|
||||
if(SDL_FRAMEWORK_COREMOTION)
|
||||
list(APPEND EXTRA_LDFLAGS "-Wl,-framework,CoreMotion")
|
||||
list(APPEND PKGCONFIG_LDFLAGS "-Wl,-framework,CoreMotion")
|
||||
list(APPEND CMAKE_LIBS "$<LINK_LIBRARY:FRAMEWORK,Coremotion>")
|
||||
endif()
|
||||
if(SDL_FRAMEWORK_FOUNDATION)
|
||||
list(APPEND EXTRA_LDFLAGS "-Wl,-framework,Foundation")
|
||||
list(APPEND PKGCONFIG_LDFLAGS "-Wl,-framework,Foundation")
|
||||
list(APPEND CMAKE_LIBS "$<LINK_LIBRARY:FRAMEWORK,Foundation>")
|
||||
endif()
|
||||
if(SDL_FRAMEWORK_GAMECONTROLLER)
|
||||
find_library(GAMECONTROLLER GameController)
|
||||
if(GAMECONTROLLER)
|
||||
list(APPEND EXTRA_LDFLAGS "-Wl,-weak_framework,GameController")
|
||||
list(APPEND PKGCONFIG_LDFLAGS "-Wl,-weak_framework,GameController")
|
||||
list(APPEND CMAKE_LIBS "$<LINK_LIBRARY:WEAK_FRAMEWORK,GameController>")
|
||||
endif()
|
||||
endif()
|
||||
if(SDL_FRAMEWORK_METAL)
|
||||
if(IOS OR TVOS)
|
||||
list(APPEND EXTRA_LDFLAGS "-Wl,-framework,Metal")
|
||||
if(IOS OR TVOS OR VISIONOS OR WATCHOS)
|
||||
list(APPEND PKGCONFIG_LDFLAGS "-Wl,-framework,Metal")
|
||||
list(APPEND CMAKE_LIBS "$<LINK_LIBRARY:FRAMEWORK,Metal>")
|
||||
else()
|
||||
list(APPEND EXTRA_LDFLAGS "-Wl,-weak_framework,Metal")
|
||||
list(APPEND PKGCONFIG_LDFLAGS "-Wl,-weak_framework,Metal")
|
||||
list(APPEND CMAKE_LIBS "$<LINK_LIBRARY:WEAK_FRAMEWORK,Metal>")
|
||||
endif()
|
||||
endif()
|
||||
if(SDL_FRAMEWORK_OPENGLES)
|
||||
list(APPEND EXTRA_LDFLAGS "-Wl,-framework,OpenGLES")
|
||||
list(APPEND PKGCONFIG_LDFLAGS "-Wl,-framework,OpenGLES")
|
||||
list(APPEND CMAKE_LIBS "$<LINK_LIBRARY:FRAMEWORK,OpenGLES>")
|
||||
endif()
|
||||
if(SDL_FRAMEWORK_QUARTZCORE)
|
||||
if(IOS OR TVOS)
|
||||
list(APPEND EXTRA_LDFLAGS "-Wl,-framework,QuartzCore")
|
||||
if(IOS OR TVOS OR VISIONOS OR WATCHOS)
|
||||
list(APPEND PKGCONFIG_LDFLAGS "-Wl,-framework,QuartzCore")
|
||||
list(APPEND CMAKE_LIBS "$<LINK_LIBRARY:FRAMEWORK,QuartzCore>")
|
||||
else()
|
||||
list(APPEND EXTRA_LDFLAGS "-Wl,-weak_framework,QuartzCore")
|
||||
list(APPEND PKGCONFIG_LDFLAGS "-Wl,-weak_framework,QuartzCore")
|
||||
list(APPEND CMAKE_LIBS "$<LINK_LIBRARY:WEAK_FRAMEWORK,QuartzCore>")
|
||||
endif()
|
||||
endif()
|
||||
if(SDL_FRAMEWORK_UIKIT)
|
||||
list(APPEND EXTRA_LDFLAGS "-Wl,-framework,UIKit")
|
||||
list(APPEND PKGCONFIG_LDFLAGS "-Wl,-framework,UIKit")
|
||||
list(APPEND CMAKE_LIBS "$<LINK_LIBRARY:FRAMEWORK,UIKit>")
|
||||
endif()
|
||||
if(SDL_FRAMEWORK_COREHAPTICS)
|
||||
find_library(COREHAPTICS CoreHaptics)
|
||||
if(COREHAPTICS)
|
||||
list(APPEND EXTRA_LDFLAGS "-Wl,-weak_framework,CoreHaptics")
|
||||
list(APPEND PKGCONFIG_LDFLAGS "-Wl,-weak_framework,CoreHaptics")
|
||||
list(APPEND CMAKE_LIBS "$<LINK_LIBRARY:WEAK_FRAMEWORK,CoreHaptics>")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
@@ -2472,7 +2543,7 @@ elseif(VITA)
|
||||
${SDL2_SOURCE_DIR}/src/thread/vita/SDL_sysmutex.c
|
||||
${SDL2_SOURCE_DIR}/src/thread/vita/SDL_syssem.c
|
||||
${SDL2_SOURCE_DIR}/src/thread/vita/SDL_systhread.c
|
||||
${SDL2_SOURCE_DIR}/src/thread/vita/SDL_syscond.c
|
||||
${SDL2_SOURCE_DIR}/src/thread/generic/SDL_syscond.c
|
||||
${SDL2_SOURCE_DIR}/src/thread/generic/SDL_systls.c)
|
||||
set(HAVE_SDL_THREADS TRUE)
|
||||
endif()
|
||||
@@ -2624,10 +2695,18 @@ elseif(PSP)
|
||||
endif()
|
||||
if(SDL_THREADS)
|
||||
set(SDL_THREAD_PSP 1)
|
||||
file(GLOB PSP_THREAD_SOURCES ${SDL2_SOURCE_DIR}/src/thread/generic/SDL_systls.c ${SDL2_SOURCE_DIR}/src/thread/psp/*.c)
|
||||
file(GLOB PSP_THREAD_SOURCES
|
||||
${SDL2_SOURCE_DIR}/src/thread/generic/SDL_systls.c
|
||||
${SDL2_SOURCE_DIR}/src/thread/generic/SDL_syscond.c
|
||||
${SDL2_SOURCE_DIR}/src/thread/psp/*.c)
|
||||
list(APPEND SOURCE_FILES ${PSP_THREAD_SOURCES})
|
||||
set(HAVE_SDL_THREADS TRUE)
|
||||
endif()
|
||||
if(SDL_LOCALE)
|
||||
file(GLOB PSP_LOCALE_SOURCES ${SDL2_SOURCE_DIR}/src/locale/psp/*.c)
|
||||
list(APPEND SOURCE_FILES ${PSP_LOCALE_SOURCES})
|
||||
set(HAVE_SDL_LOCALE TRUE)
|
||||
endif()
|
||||
if(SDL_TIMERS)
|
||||
set(SDL_TIMER_PSP 1)
|
||||
file(GLOB PSP_TIMER_SOURCES ${SDL2_SOURCE_DIR}/src/timer/psp/*.c)
|
||||
@@ -2660,7 +2739,6 @@ elseif(PSP)
|
||||
endif()
|
||||
|
||||
elseif(PS2)
|
||||
list(APPEND EXTRA_CFLAGS "-DPS2" "-D__PS2__" "-I$ENV{PS2SDK}/ports/include" "-I$ENV{PS2DEV}/gsKit/include")
|
||||
|
||||
file(GLOB PS2_MAIN_SOURCES ${SDL2_SOURCE_DIR}/src/main/ps2/*.c)
|
||||
set(SDLMAIN_SOURCES ${SDLMAIN_SOURCES} ${PS2_MAIN_SOURCES})
|
||||
@@ -2685,7 +2763,11 @@ elseif(PS2)
|
||||
endif()
|
||||
if(SDL_THREADS)
|
||||
set(SDL_THREAD_PS2 1)
|
||||
file(GLOB PS2_THREAD_SOURCES ${SDL2_SOURCE_DIR}/src/thread/generic/SDL_systls.c ${SDL2_SOURCE_DIR}/src/thread/generic/SDL_sysmutex.c ${SDL2_SOURCE_DIR}/src/thread/ps2/*.c)
|
||||
file(GLOB PS2_THREAD_SOURCES
|
||||
${SDL2_SOURCE_DIR}/src/thread/generic/SDL_systls.c
|
||||
${SDL2_SOURCE_DIR}/src/thread/generic/SDL_sysmutex.c
|
||||
${SDL2_SOURCE_DIR}/src/thread/generic/SDL_syscond.c
|
||||
${SDL2_SOURCE_DIR}/src/thread/ps2/*.c)
|
||||
list(APPEND SOURCE_FILES ${PS2_THREAD_SOURCES})
|
||||
set(HAVE_SDL_THREADS TRUE)
|
||||
endif()
|
||||
@@ -2816,7 +2898,9 @@ elseif(N3DS)
|
||||
if(SDL_THREADS)
|
||||
set(SDL_THREAD_N3DS 1)
|
||||
file(GLOB N3DS_THREAD_SOURCES ${SDL2_SOURCE_DIR}/src/thread/n3ds/*.c)
|
||||
list(APPEND SOURCE_FILES ${N3DS_THREAD_SOURCES} ${SDL2_SOURCE_DIR}/src/thread/generic/SDL_systls.c)
|
||||
list(APPEND SOURCE_FILES ${N3DS_THREAD_SOURCES}
|
||||
${SDL2_SOURCE_DIR}/src/thread/generic/SDL_systls.c
|
||||
${SDL2_SOURCE_DIR}/src/thread/generic/SDL_syscond.c)
|
||||
set(HAVE_SDL_THREADS TRUE)
|
||||
endif()
|
||||
|
||||
@@ -3004,10 +3088,14 @@ endif()
|
||||
listtostr(EXTRA_CFLAGS _EXTRA_CFLAGS)
|
||||
set(EXTRA_CFLAGS ${_EXTRA_CFLAGS})
|
||||
|
||||
if(USE_GCC OR USE_CLANG)
|
||||
string(REGEX REPLACE "(^| )-I" "\\1 -isystem" EXTRA_CFLAGS "${EXTRA_CFLAGS}")
|
||||
endif()
|
||||
|
||||
# Compat helpers for the configuration files
|
||||
|
||||
if(EXISTS "${PROJECT_SOURCE_DIR}/VERSION.txt")
|
||||
file(READ "${PROJECT_SOURCE_DIR}/VERSION.txt" SDL_SOURCE_VERSION)
|
||||
if(EXISTS "${PROJECT_SOURCE_DIR}/REVISION.txt")
|
||||
file(READ "${PROJECT_SOURCE_DIR}/REVISION.txt" SDL_SOURCE_VERSION)
|
||||
string(STRIP "${SDL_SOURCE_VERSION}" SDL_SOURCE_VERSION)
|
||||
endif()
|
||||
|
||||
@@ -3066,9 +3154,17 @@ else()
|
||||
set(sdl_static_libname "SDL2")
|
||||
endif()
|
||||
|
||||
set(prefix ${CMAKE_INSTALL_PREFIX})
|
||||
# CMAKE_PREFIX_PATH and CMAKE_INSTALL_FULL_BINDIR can be a non-absolute path
|
||||
# when a master-project does e.g. `set(CMAKE_INSTALL_PREFIX "libs/SDL2" CACHE PATH "prefix" FORCE)`.
|
||||
if(NOT IS_ABSOLUTE "${CMAKE_INSTALL_PREFIX}")
|
||||
set(CMAKE_INSTALL_PREFIX "${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_PREFIX}")
|
||||
endif()
|
||||
if(NOT IS_ABSOLUTE "${CMAKE_INSTALL_FULL_BINDIR}")
|
||||
set(CMAKE_INSTALL_FULL_BINDIR "${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_FULL_BINDIR}")
|
||||
endif()
|
||||
file(RELATIVE_PATH bin_prefix_relpath "${CMAKE_INSTALL_FULL_BINDIR}" "${CMAKE_INSTALL_PREFIX}")
|
||||
|
||||
set(prefix ${CMAKE_INSTALL_PREFIX})
|
||||
set(exec_prefix "\${prefix}")
|
||||
set(libdir "\${exec_prefix}/${CMAKE_INSTALL_LIBDIR}")
|
||||
set(bindir "\${exec_prefix}/${CMAKE_INSTALL_BINDIR}")
|
||||
@@ -3093,7 +3189,7 @@ endif()
|
||||
|
||||
# Clean up the different lists
|
||||
listtostr(EXTRA_LIBS _EXTRA_LIBS "-l")
|
||||
set(SDL_STATIC_LIBS ${SDL_LIBS} ${EXTRA_LDFLAGS} ${_EXTRA_LIBS})
|
||||
set(SDL_STATIC_LIBS ${EXTRA_LDFLAGS} ${_EXTRA_LIBS} ${PKGCONFIG_LDFLAGS})
|
||||
list(REMOVE_DUPLICATES SDL_STATIC_LIBS)
|
||||
listtostr(SDL_STATIC_LIBS _SDL_STATIC_LIBS)
|
||||
set(SDL_STATIC_LIBS ${_SDL_STATIC_LIBS})
|
||||
@@ -3127,9 +3223,11 @@ macro(check_add_debug_flag FLAG SUFFIX)
|
||||
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} ${FLAG}")
|
||||
endif()
|
||||
|
||||
check_cxx_compiler_flag(${FLAG} HAS_CXX_${SUFFIX})
|
||||
if (HAS_CXX_${SUFFIX})
|
||||
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} ${FLAG}")
|
||||
if(CMAKE_CXX_COMPILER)
|
||||
check_cxx_compiler_flag(${FLAG} HAS_CXX_${SUFFIX})
|
||||
if (HAS_CXX_${SUFFIX})
|
||||
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} ${FLAG}")
|
||||
endif()
|
||||
endif()
|
||||
endmacro()
|
||||
|
||||
@@ -3148,18 +3246,20 @@ macro(asan_check_add_debug_flag2 ASAN_FLAG)
|
||||
|
||||
set (STORED_REQLIBS ${CMAKE_REQUIRED_LIBRARIES})
|
||||
set (CMAKE_REQUIRED_LIBRARIES "${FLAG};asan")
|
||||
check_c_compiler_flag (${FLAG} HAS_C_FLAG_${ASAN_FLAG})
|
||||
check_cxx_compiler_flag (${FLAG} HAS_CXX_FLAG_${ASAN_FLAG})
|
||||
set (CMAKE_REQUIRED_LIBRARIES ${STORED_REQLIBS})
|
||||
|
||||
check_c_compiler_flag (${FLAG} HAS_C_FLAG_${ASAN_FLAG})
|
||||
if (HAS_C_FLAG_${ASAN_FLAG})
|
||||
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} ${FLAG}")
|
||||
endif()
|
||||
|
||||
if (HAS_CXX_${ASAN_FLAG})
|
||||
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} ${FLAG}")
|
||||
if(CMAKE_CXX_COMPILER)
|
||||
check_cxx_compiler_flag (${FLAG} HAS_CXX_FLAG_${ASAN_FLAG})
|
||||
if (HAS_CXX_${ASAN_FLAG})
|
||||
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} ${FLAG}")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
set (CMAKE_REQUIRED_LIBRARIES ${STORED_REQLIBS})
|
||||
if(HAS_C_${ASAN_FLAG} OR HAS_CXX_${ASAN_FLAG})
|
||||
set(HAVE_ASAN ON)
|
||||
endif()
|
||||
@@ -3187,7 +3287,7 @@ if (SDL_ASAN)
|
||||
endif()
|
||||
|
||||
if(SDL_CCACHE AND NOT CMAKE_VERSION VERSION_LESS 3.4)
|
||||
cmake_minimum_required(VERSION 3.4)
|
||||
cmake_minimum_required(VERSION 3.4...3.5)
|
||||
find_program(CCACHE_BINARY ccache)
|
||||
if(CCACHE_BINARY)
|
||||
set(CMAKE_C_COMPILER_LAUNCHER ${CCACHE_BINARY})
|
||||
@@ -3312,6 +3412,12 @@ if(ANDROID)
|
||||
endif()
|
||||
|
||||
if(APPLE)
|
||||
cmake_push_check_state(RESET)
|
||||
check_c_compiler_flag(-fobjc-arc COMPILER_SUPPORTS_FOBJC_ARC)
|
||||
cmake_pop_check_state()
|
||||
if(NOT COMPILER_SUPPORTS_FOBJC_ARC)
|
||||
message(FATAL_ERROR "Compiler does not support -fobjc-arc: this is required on Apple platforms")
|
||||
endif()
|
||||
target_compile_options(sdl-build-options INTERFACE "-fobjc-arc")
|
||||
endif()
|
||||
|
||||
@@ -3334,6 +3440,7 @@ if(SDL_SHARED)
|
||||
# alias target for in-tree builds
|
||||
add_library(SDL2::SDL2 ALIAS SDL2)
|
||||
set_target_properties(SDL2 PROPERTIES POSITION_INDEPENDENT_CODE TRUE)
|
||||
set_target_properties(SDL2 PROPERTIES WINDOWS_EXPORT_ALL_SYMBOLS FALSE)
|
||||
if(NOT SDL_LIBC)
|
||||
if(SDL_CPU_X86)
|
||||
# FIXME: should be added for all architectures (missing symbols for ARM)
|
||||
@@ -3368,7 +3475,7 @@ if(SDL_SHARED)
|
||||
OUTPUT_NAME "SDL2")
|
||||
endif()
|
||||
# Note: The clang toolset for Visual Studio does not support /NODEFAULTLIB.
|
||||
if(MSVC AND NOT SDL_LIBC AND NOT MSVC_CLANG AND NOT CMAKE_GENERATOR_PLATFORM STREQUAL "ARM")
|
||||
if(MSVC AND NOT SDL_LIBC AND NOT MSVC_CLANG AND NOT SDL_CPU_ARM32)
|
||||
# Don't try to link with the default set of libraries.
|
||||
if(NOT WINDOWS_STORE)
|
||||
set_property(TARGET SDL2 APPEND_STRING PROPERTY LINK_FLAGS " /NODEFAULTLIB")
|
||||
@@ -3376,7 +3483,7 @@ if(SDL_SHARED)
|
||||
set_property(TARGET SDL2 APPEND_STRING PROPERTY STATIC_LIBRARY_FLAGS " /NODEFAULTLIB")
|
||||
endif()
|
||||
# FIXME: if CMAKE_VERSION >= 3.13, use target_link_options for EXTRA_LDFLAGS
|
||||
target_link_libraries(SDL2 PRIVATE ${EXTRA_LIBS} ${EXTRA_LDFLAGS} ${EXTRA_LDFLAGS_BUILD} ${CMAKE_DEPENDS})
|
||||
target_link_libraries(SDL2 PRIVATE ${EXTRA_LIBS} ${EXTRA_LDFLAGS} ${EXTRA_LDFLAGS_BUILD} ${CMAKE_LIBS})
|
||||
target_include_directories(SDL2 PUBLIC
|
||||
"$<BUILD_INTERFACE:${SDL2_BINARY_DIR}/include>"
|
||||
"$<BUILD_INTERFACE:${SDL2_BINARY_DIR}/include/SDL2>"
|
||||
@@ -3412,7 +3519,7 @@ if(SDL_STATIC)
|
||||
target_compile_definitions(SDL2-static PRIVATE SDL_STATIC_LIB)
|
||||
# TODO: Win32 platforms keep the same suffix .lib for import and static
|
||||
# libraries - do we need to consider this?
|
||||
target_link_libraries(SDL2-static PRIVATE ${EXTRA_LIBS} ${EXTRA_LDFLAGS} ${CMAKE_DEPENDS})
|
||||
target_link_libraries(SDL2-static PRIVATE ${EXTRA_LIBS} ${EXTRA_LDFLAGS} ${CMAKE_LIBS})
|
||||
target_include_directories(SDL2-static PUBLIC
|
||||
"$<BUILD_INTERFACE:${SDL2_BINARY_DIR}/include>"
|
||||
"$<BUILD_INTERFACE:${SDL2_BINARY_DIR}/include/SDL2>"
|
||||
@@ -3452,10 +3559,28 @@ if(SDL_TEST)
|
||||
"$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>"
|
||||
"$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}/SDL2>")
|
||||
target_link_libraries(SDL2_test PRIVATE ${EXTRA_TEST_LIBS})
|
||||
target_include_directories(SDL2_test PRIVATE ${EXTRA_TEST_INCLUDES})
|
||||
set_property(TARGET SDL2_test APPEND PROPERTY COMPATIBLE_INTERFACE_STRING "SDL_VERSION")
|
||||
set_property(TARGET SDL2_test PROPERTY INTERFACE_SDL_VERSION "SDL2")
|
||||
endif()
|
||||
|
||||
if(MSVC AND NOT SDL_LIBC)
|
||||
set(targets )
|
||||
if(TARGET SDL2)
|
||||
list(APPEND targets SDL2)
|
||||
endif()
|
||||
if(TARGET SDL2-static)
|
||||
list(APPEND targets SDL2-static)
|
||||
endif()
|
||||
if(TARGET SDL2_test)
|
||||
list(APPEND targets SDL2_test)
|
||||
endif()
|
||||
set_property(TARGET ${targets} APPEND PROPERTY COMPILE_OPTIONS "/GS-;/Gs1048576")
|
||||
if(NOT ARCH_64 AND NOT CMAKE_GENERATOR_PLATFORM STREQUAL "ARM")
|
||||
set_property(TARGET ${targets} APPEND PROPERTY COMPILE_OPTIONS "/arch:SSE")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
##### Installation targets #####
|
||||
if(NOT SDL2_DISABLE_INSTALL)
|
||||
if(SDL_SHARED)
|
||||
@@ -3463,6 +3588,9 @@ if(NOT SDL2_DISABLE_INSTALL)
|
||||
LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}"
|
||||
ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}"
|
||||
RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}")
|
||||
if(MSVC)
|
||||
SDL_install_pdb(SDL2 "${CMAKE_INSTALL_BINDIR}")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(NOT WINDOWS_STORE AND NOT SDL2_DISABLE_SDL2MAIN)
|
||||
@@ -3470,6 +3598,9 @@ if(NOT SDL2_DISABLE_INSTALL)
|
||||
LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}"
|
||||
ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}"
|
||||
RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}")
|
||||
if(MSVC)
|
||||
SDL_install_pdb(SDL2main "${CMAKE_INSTALL_LIBDIR}")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(SDL_STATIC)
|
||||
@@ -3477,6 +3608,9 @@ if(NOT SDL2_DISABLE_INSTALL)
|
||||
LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}"
|
||||
ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}"
|
||||
RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}")
|
||||
if(MSVC)
|
||||
SDL_install_pdb(SDL2-static "${CMAKE_INSTALL_LIBDIR}")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(SDL_TEST)
|
||||
@@ -3484,6 +3618,9 @@ if(NOT SDL2_DISABLE_INSTALL)
|
||||
LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}"
|
||||
ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}"
|
||||
RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}")
|
||||
if(MSVC)
|
||||
SDL_install_pdb(SDL2_test "${CMAKE_INSTALL_LIBDIR}")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
##### Export files #####
|
||||
|
@@ -1,4 +1,4 @@
|
||||
Copyright (C) 1997-2023 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
|
@@ -52,7 +52,7 @@ WAYLAND_SCANNER_CODE_MODE = @WAYLAND_SCANNER_CODE_MODE@
|
||||
|
||||
INSTALL_SDL2_CONFIG = @INSTALL_SDL2_CONFIG@
|
||||
|
||||
SRC_DIST = *.md *.txt acinclude Android.mk autogen.sh android-project build-scripts cmake cmake_uninstall.cmake.in configure configure.ac docs include Makefile.* mingw sdl2-config.cmake.in sdl2-config-version.cmake.in sdl2-config.in sdl2.m4 sdl2.pc.in SDL2.spec.in SDL2Config.cmake.in src test VisualC VisualC-WinRT Xcode Xcode-iOS wayland-protocols
|
||||
SRC_DIST = *.md *.txt acinclude Android.mk autogen.sh android-project build-scripts cmake cmake_uninstall.cmake.in configure configure.ac docs include Makefile.* mingw sdl2-config.cmake.in sdl2-config-version.cmake.in sdl2-config.in sdl2.m4 sdl2.pc.in SDL2.spec.in SDL2Config.cmake.in src test VisualC VisualC-GDK VisualC-WinRT Xcode Xcode-iOS wayland-protocols
|
||||
GEN_DIST = SDL2.spec
|
||||
|
||||
ifneq ($V,1)
|
||||
|
14
Makefile.os2
14
Makefile.os2
@@ -1,4 +1,4 @@
|
||||
# Open Watcom makefile to build SDL2.dll for OS/2
|
||||
# Open Watcom makefile to build SDL2.dll for OS/2:
|
||||
# wmake -f Makefile.os2
|
||||
#
|
||||
# If you have GNU libiconv installed (iconv2.dll), you
|
||||
@@ -14,8 +14,8 @@
|
||||
|
||||
LIBNAME = SDL2
|
||||
MAJOR_VERSION = 2
|
||||
MINOR_VERSION = 28
|
||||
MICRO_VERSION = 0
|
||||
MINOR_VERSION = 32
|
||||
MICRO_VERSION = 8
|
||||
VERSION = $(MAJOR_VERSION).$(MINOR_VERSION).$(MICRO_VERSION)
|
||||
DESCRIPTION = Simple DirectMedia Layer 2
|
||||
|
||||
@@ -56,7 +56,7 @@ CFLAGS_DLL+= -bd
|
||||
# iconv:
|
||||
LIBICONV_LIB=iconv2.lib
|
||||
!ifeq LIBICONV 1
|
||||
CFLAGS_DLL+= -DHAVE_ICONV=1 -DHAVE_ICONV_H=1
|
||||
CFLAGS_DLL+= -DHAVE_ICONV=1 -DHAVE_ICONV_H=1 -DSDL_USE_LIBICONV
|
||||
LIBS+= $(ICONVLIB)
|
||||
!else
|
||||
LIBS+= libuls.lib libconv.lib
|
||||
@@ -81,7 +81,7 @@ SRCS+= SDL_events.c SDL_quit.c SDL_keyboard.c SDL_mouse.c SDL_windowevents.c &
|
||||
SDL_clipboardevents.c SDL_dropevents.c SDL_displayevents.c SDL_gesture.c &
|
||||
SDL_sensor.c SDL_touch.c
|
||||
SRCS+= SDL_haptic.c SDL_hidapi.c SDL_gamecontroller.c SDL_joystick.c controller_type.c
|
||||
SRCS+= SDL_render.c yuv_rgb.c SDL_yuv.c SDL_yuv_sw.c SDL_blendfillrect.c &
|
||||
SRCS+= SDL_render.c yuv_rgb_sse.c yuv_rgb_std.c SDL_yuv.c SDL_yuv_sw.c SDL_blendfillrect.c &
|
||||
SDL_blendline.c SDL_blendpoint.c SDL_drawline.c SDL_drawpoint.c &
|
||||
SDL_render_sw.c SDL_rotate.c SDL_triangle.c
|
||||
SRCS+= SDL_blit.c SDL_blit_0.c SDL_blit_1.c SDL_blit_A.c SDL_blit_auto.c &
|
||||
@@ -94,7 +94,7 @@ SRCS+= SDL_systimer.c
|
||||
SRCS+= SDL_sysloadso.c
|
||||
SRCS+= SDL_sysfilesystem.c
|
||||
SRCS+= SDL_os2joystick.c SDL_syshaptic.c SDL_sysjoystick.c SDL_virtualjoystick.c
|
||||
SRCS+= SDL_hidapijoystick.c SDL_hidapi_rumble.c SDL_hidapi_combined.c SDL_hidapi_gamecube.c SDL_hidapi_luna.c SDL_hidapi_ps3.c SDL_hidapi_ps4.c SDL_hidapi_ps5.c SDL_hidapi_shield.c SDL_hidapi_stadia.c SDL_hidapi_switch.c SDL_hidapi_wii.c SDL_hidapi_xbox360.c SDL_hidapi_xbox360w.c SDL_hidapi_xboxone.c SDL_hidapi_steam.c
|
||||
SRCS+= SDL_hidapijoystick.c SDL_hidapi_rumble.c SDL_hidapi_combined.c SDL_hidapi_gamecube.c SDL_hidapi_luna.c SDL_hidapi_ps3.c SDL_hidapi_ps4.c SDL_hidapi_ps5.c SDL_hidapi_shield.c SDL_hidapi_stadia.c SDL_hidapi_switch.c SDL_hidapi_wii.c SDL_hidapi_xbox360.c SDL_hidapi_xbox360w.c SDL_hidapi_xboxone.c SDL_hidapi_steam.c SDL_hidapi_steamdeck.c SDL_steam_virtual_gamepad.c
|
||||
SRCS+= SDL_dummyaudio.c SDL_diskaudio.c
|
||||
SRCS+= SDL_nullvideo.c SDL_nullframebuffer.c SDL_nullevents.c
|
||||
SRCS+= SDL_dummysensor.c
|
||||
@@ -152,6 +152,8 @@ SDL_blendpoint.obj: SDL_blendpoint.c
|
||||
wcc386 $(CFLAGS_DLL) -wcd=200 -fo=$^@ $<
|
||||
SDL_RLEaccel.obj: SDL_RLEaccel.c
|
||||
wcc386 $(CFLAGS_DLL) -wcd=201 -fo=$^@ $<
|
||||
yuv_rgb_sse.obj: yuv_rgb_sse.c
|
||||
wcc386 $(CFLAGS_DLL) -wcd=202 -fo=$^@ $<
|
||||
!ifeq HIDAPI 1
|
||||
# c99 mode needed because of structs with flexible array members in libusb.h
|
||||
SDL_hidapi.obj: SDL_hidapi.c
|
||||
|
15
Makefile.w32
15
Makefile.w32
@@ -1,12 +1,12 @@
|
||||
# Open Watcom makefile to build SDL2.dll for Win32
|
||||
# Open Watcom makefile to build SDL2.dll for Win32:
|
||||
# wmake -f Makefile.w32
|
||||
#
|
||||
# To error out upon warnings: wmake -f Makefile.w32 ENABLE_WERROR=1
|
||||
|
||||
LIBNAME = SDL2
|
||||
MAJOR_VERSION = 2
|
||||
MINOR_VERSION = 28
|
||||
MICRO_VERSION = 0
|
||||
MINOR_VERSION = 32
|
||||
MICRO_VERSION = 8
|
||||
VERSION = $(MAJOR_VERSION).$(MINOR_VERSION).$(MICRO_VERSION)
|
||||
|
||||
LIBHOME = .
|
||||
@@ -60,7 +60,7 @@ SRCS+= SDL_events.c SDL_quit.c SDL_keyboard.c SDL_mouse.c SDL_windowevents.c &
|
||||
SDL_clipboardevents.c SDL_dropevents.c SDL_displayevents.c SDL_gesture.c &
|
||||
SDL_sensor.c SDL_touch.c
|
||||
SRCS+= SDL_haptic.c SDL_hidapi.c SDL_gamecontroller.c SDL_joystick.c controller_type.c
|
||||
SRCS+= SDL_render.c yuv_rgb.c SDL_yuv.c SDL_yuv_sw.c SDL_blendfillrect.c &
|
||||
SRCS+= SDL_render.c yuv_rgb_sse.c yuv_rgb_std.c SDL_yuv.c SDL_yuv_sw.c SDL_blendfillrect.c &
|
||||
SDL_blendline.c SDL_blendpoint.c SDL_drawline.c SDL_drawpoint.c &
|
||||
SDL_render_sw.c SDL_rotate.c SDL_triangle.c
|
||||
SRCS+= SDL_blit.c SDL_blit_0.c SDL_blit_1.c SDL_blit_A.c SDL_blit_auto.c &
|
||||
@@ -73,7 +73,7 @@ SRCS+= SDL_systimer.c
|
||||
SRCS+= SDL_sysloadso.c
|
||||
SRCS+= SDL_sysfilesystem.c
|
||||
SRCS+= SDL_syshaptic.c SDL_sysjoystick.c SDL_virtualjoystick.c
|
||||
SRCS+= SDL_hidapijoystick.c SDL_hidapi_rumble.c SDL_hidapi_combined.c SDL_hidapi_gamecube.c SDL_hidapi_luna.c SDL_hidapi_ps3.c SDL_hidapi_ps4.c SDL_hidapi_ps5.c SDL_hidapi_shield.c SDL_hidapi_stadia.c SDL_hidapi_switch.c SDL_hidapi_wii.c SDL_hidapi_xbox360.c SDL_hidapi_xbox360w.c SDL_hidapi_xboxone.c SDL_hidapi_steam.c
|
||||
SRCS+= SDL_hidapijoystick.c SDL_hidapi_rumble.c SDL_hidapi_combined.c SDL_hidapi_gamecube.c SDL_hidapi_luna.c SDL_hidapi_ps3.c SDL_hidapi_ps4.c SDL_hidapi_ps5.c SDL_hidapi_shield.c SDL_hidapi_stadia.c SDL_hidapi_switch.c SDL_hidapi_wii.c SDL_hidapi_xbox360.c SDL_hidapi_xbox360w.c SDL_hidapi_xboxone.c SDL_hidapi_steam.c SDL_hidapi_steamdeck.c
|
||||
SRCS+= SDL_dummyaudio.c SDL_diskaudio.c
|
||||
SRCS+= SDL_nullvideo.c SDL_nullframebuffer.c SDL_nullevents.c
|
||||
SRCS+= SDL_dummysensor.c
|
||||
@@ -93,7 +93,7 @@ SRCS+= SDL_render_gl.c SDL_shaders_gl.c
|
||||
SRCS+= SDL_render_gles2.c SDL_shaders_gles2.c
|
||||
SRCS+= SDL_windowssensor.c
|
||||
SRCS+= SDL_syscond_cv.c
|
||||
SRCS+= SDL_windowsclipboard.c SDL_windowsevents.c SDL_windowsframebuffer.c SDL_windowskeyboard.c SDL_windowsmessagebox.c SDL_windowsmodes.c SDL_windowsmouse.c SDL_windowsopengl.c SDL_windowsopengles.c SDL_windowsshape.c SDL_windowsvideo.c SDL_windowsvulkan.c SDL_windowswindow.c
|
||||
SRCS+= SDL_windowsclipboard.c SDL_windowsevents.c SDL_windowsframebuffer.c SDL_windowskeyboard.c SDL_windowsmessagebox.c SDL_windowsmodes.c SDL_windowsmouse.c SDL_windowsopengl.c SDL_windowsopengles.c SDL_windowsshape.c SDL_windowsvideo.c SDL_windowsvulkan.c SDL_windowswindow.c SDL_steam_virtual_gamepad.c
|
||||
|
||||
SRCS+= SDL_dynapi.c
|
||||
|
||||
@@ -147,6 +147,9 @@ SDL_RLEaccel.obj: SDL_RLEaccel.c
|
||||
SDL_malloc.obj: SDL_malloc.c
|
||||
wcc386 $(CFLAGS_DLL) -wcd=201 -fo=$^@ $<
|
||||
|
||||
yuv_rgb_sse.obj: yuv_rgb_sse.c
|
||||
wcc386 $(CFLAGS_DLL) -wcd=202 -fo=$^@ $<
|
||||
|
||||
# SDL2libm
|
||||
MSRCS= e_atan2.c e_exp.c e_fmod.c e_log10.c e_log.c e_pow.c e_rem_pio2.c e_sqrt.c &
|
||||
k_cos.c k_rem_pio2.c k_sin.c k_tan.c &
|
||||
|
@@ -173,6 +173,12 @@
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<IgnoreAllDefaultLibraries>true</IgnoreAllDefaultLibraries>
|
||||
</Link>
|
||||
<PreBuildEvent>
|
||||
<Command>$(ProjectDir)..\shaders\buildshaders.bat $(ProjectDir)..\</Command>
|
||||
</PreBuildEvent>
|
||||
<PreBuildEvent>
|
||||
<Message>Building shader blobs (Xbox Series)</Message>
|
||||
</PreBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Xbox.XboxOne.x64'">
|
||||
<Midl>
|
||||
@@ -201,6 +207,12 @@
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<IgnoreAllDefaultLibraries>true</IgnoreAllDefaultLibraries>
|
||||
</Link>
|
||||
<PreBuildEvent>
|
||||
<Command>$(ProjectDir)..\shaders\buildshaders.bat $(ProjectDir)..\ one</Command>
|
||||
</PreBuildEvent>
|
||||
<PreBuildEvent>
|
||||
<Message>Building shader blobs (Xbox One)</Message>
|
||||
</PreBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Desktop.x64'">
|
||||
<Midl>
|
||||
@@ -259,6 +271,12 @@
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<IgnoreAllDefaultLibraries>true</IgnoreAllDefaultLibraries>
|
||||
</Link>
|
||||
<PreBuildEvent>
|
||||
<Command>$(ProjectDir)..\shaders\buildshaders.bat $(ProjectDir)..\</Command>
|
||||
</PreBuildEvent>
|
||||
<PreBuildEvent>
|
||||
<Message>Building shader blobs (Xbox Series)</Message>
|
||||
</PreBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Xbox.XboxOne.x64'">
|
||||
<Midl>
|
||||
@@ -288,6 +306,12 @@
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<IgnoreAllDefaultLibraries>true</IgnoreAllDefaultLibraries>
|
||||
</Link>
|
||||
<PreBuildEvent>
|
||||
<Command>$(ProjectDir)..\shaders\buildshaders.bat $(ProjectDir)..\ one</Command>
|
||||
</PreBuildEvent>
|
||||
<PreBuildEvent>
|
||||
<Message>Building shader blobs (Xbox One)</Message>
|
||||
</PreBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\..\include\begin_code.h" />
|
||||
@@ -412,6 +436,7 @@
|
||||
<ClInclude Include="..\..\src\joystick\hidapi\SDL_hidapi_rumble.h" />
|
||||
<ClInclude Include="..\..\src\joystick\SDL_gamecontrollerdb.h" />
|
||||
<ClInclude Include="..\..\src\joystick\SDL_joystick_c.h" />
|
||||
<ClInclude Include="..\..\src\joystick\SDL_steam_virtual_gamepad.h" />
|
||||
<ClInclude Include="..\..\src\joystick\SDL_sysjoystick.h" />
|
||||
<ClInclude Include="..\..\src\joystick\usb_ids.h" />
|
||||
<ClInclude Include="..\..\src\joystick\virtual\SDL_virtualjoystick_c.h" />
|
||||
@@ -474,7 +499,6 @@
|
||||
<ClInclude Include="..\..\src\video\khronos\vulkan\vk_platform.h" />
|
||||
<ClInclude Include="..\..\src\video\khronos\vulkan\vk_sdk_platform.h" />
|
||||
<ClInclude Include="..\..\src\video\khronos\vulkan\vulkan.h" />
|
||||
<ClInclude Include="..\..\src\video\khronos\vulkan\vulkan.hpp" />
|
||||
<ClInclude Include="..\..\src\video\khronos\vulkan\vulkan_android.h" />
|
||||
<ClInclude Include="..\..\src\video\khronos\vulkan\vulkan_beta.h" />
|
||||
<ClInclude Include="..\..\src\video\khronos\vulkan\vulkan_core.h" />
|
||||
@@ -519,7 +543,13 @@
|
||||
<ClInclude Include="..\..\src\video\windows\SDL_windowswindow.h" />
|
||||
<ClInclude Include="..\..\src\video\windows\wmmsg.h" />
|
||||
<ClInclude Include="..\..\src\video\yuv2rgb\yuv_rgb.h" />
|
||||
<ClInclude Include="..\..\src\video\yuv2rgb\yuv_rgb_common.h" />
|
||||
<ClInclude Include="..\..\src\video\yuv2rgb\yuv_rgb_internal.h" />
|
||||
<ClInclude Include="..\..\src\video\yuv2rgb\yuv_rgb_lsx.h" />
|
||||
<ClInclude Include="..\..\src\video\yuv2rgb\yuv_rgb_lsx_func.h" />
|
||||
<ClInclude Include="..\..\src\video\yuv2rgb\yuv_rgb_sse.h" />
|
||||
<ClInclude Include="..\..\src\video\yuv2rgb\yuv_rgb_sse_func.h" />
|
||||
<ClInclude Include="..\..\src\video\yuv2rgb\yuv_rgb_std.h" />
|
||||
<ClInclude Include="..\..\src\video\yuv2rgb\yuv_rgb_std_func.h" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
@@ -563,7 +593,7 @@
|
||||
<ClCompile Include="..\..\src\events\SDL_touch.c" />
|
||||
<ClCompile Include="..\..\src\events\SDL_windowevents.c" />
|
||||
<ClCompile Include="..\..\src\file\SDL_rwops.c" />
|
||||
<ClCompile Include="..\..\src\filesystem\windows\SDL_sysfilesystem.c" />
|
||||
<ClCompile Include="..\..\src\filesystem\gdk\SDL_sysfilesystem.cpp" />
|
||||
<ClCompile Include="..\..\src\haptic\dummy\SDL_syshaptic.c" />
|
||||
<ClCompile Include="..\..\src\haptic\SDL_haptic.c" />
|
||||
<ClCompile Include="..\..\src\haptic\windows\SDL_dinputhaptic.c" />
|
||||
@@ -601,6 +631,7 @@
|
||||
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_shield.c" />
|
||||
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_stadia.c" />
|
||||
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_steam.c" />
|
||||
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_steamdeck.c" />
|
||||
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_switch.c" />
|
||||
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_wii.c" />
|
||||
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_xbox360.c" />
|
||||
@@ -608,6 +639,7 @@
|
||||
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_xboxone.c" />
|
||||
<ClCompile Include="..\..\src\joystick\SDL_gamecontroller.c" />
|
||||
<ClCompile Include="..\..\src\joystick\SDL_joystick.c" />
|
||||
<ClCompile Include="..\..\src\joystick\SDL_steam_virtual_gamepad.c" />
|
||||
<ClCompile Include="..\..\src\joystick\virtual\SDL_virtualjoystick.c" />
|
||||
<ClCompile Include="..\..\src\joystick\windows\SDL_dinputjoystick.c" />
|
||||
<ClCompile Include="..\..\src\joystick\windows\SDL_rawinputjoystick.c" />
|
||||
@@ -752,7 +784,9 @@
|
||||
<ClCompile Include="..\..\src\video\windows\SDL_windowsvideo.c" />
|
||||
<ClCompile Include="..\..\src\video\windows\SDL_windowsvulkan.c" />
|
||||
<ClCompile Include="..\..\src\video\windows\SDL_windowswindow.c" />
|
||||
<ClCompile Include="..\..\src\video\yuv2rgb\yuv_rgb.c" />
|
||||
<ClCompile Include="..\..\src\video\yuv2rgb\yuv_rgb_lsx.c" />
|
||||
<ClCompile Include="..\..\src\video\yuv2rgb\yuv_rgb_sse.c" />
|
||||
<ClCompile Include="..\..\src\video\yuv2rgb\yuv_rgb_std.c" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ResourceCompile Include="..\..\src\main\windows\version.rc" />
|
||||
|
@@ -31,7 +31,7 @@
|
||||
<Filter Include="filesystem">
|
||||
<UniqueIdentifier>{377061e4-3856-4f05-b916-0d3b360df0f6}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="filesystem\windows">
|
||||
<Filter Include="filesystem\gdk">
|
||||
<UniqueIdentifier>{226a6643-1c65-4c7f-92aa-861313d974bb}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="haptic">
|
||||
@@ -501,6 +501,9 @@
|
||||
<ClInclude Include="..\..\src\joystick\SDL_joystick_c.h">
|
||||
<Filter>joystick</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\joystick\SDL_steam_virtual_gamepad.h">
|
||||
<Filter>joystick</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\joystick\SDL_sysjoystick.h">
|
||||
<Filter>joystick</Filter>
|
||||
</ClInclude>
|
||||
@@ -777,9 +780,6 @@
|
||||
<ClInclude Include="..\..\src\video\khronos\vulkan\vulkan.h">
|
||||
<Filter>video\khronos\vulkan</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\video\khronos\vulkan\vulkan.hpp">
|
||||
<Filter>video\khronos\vulkan</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\video\khronos\vulkan\vulkan_android.h">
|
||||
<Filter>video\khronos\vulkan</Filter>
|
||||
</ClInclude>
|
||||
@@ -925,8 +925,8 @@
|
||||
<ClCompile Include="..\..\src\file\SDL_rwops.c">
|
||||
<Filter>file</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\filesystem\windows\SDL_sysfilesystem.c">
|
||||
<Filter>filesystem\windows</Filter>
|
||||
<ClCompile Include="..\..\src\filesystem\gdk\SDL_sysfilesystem.cpp">
|
||||
<Filter>filesystem\gdk</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\haptic\SDL_haptic.c">
|
||||
<Filter>haptic</Filter>
|
||||
@@ -943,6 +943,9 @@
|
||||
<ClCompile Include="..\..\src\joystick\SDL_joystick.c">
|
||||
<Filter>joystick</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\joystick\SDL_steam_virtual_gamepad.c">
|
||||
<Filter>joystick</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\libm\e_atan2.c">
|
||||
<Filter>libm</Filter>
|
||||
</ClCompile>
|
||||
@@ -1081,6 +1084,9 @@
|
||||
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_steam.c">
|
||||
<Filter>joystick\hidapi</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_steamdeck.c">
|
||||
<Filter>joystick\hidapi</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_switch.c">
|
||||
<Filter>joystick\hidapi</Filter>
|
||||
</ClCompile>
|
||||
|
@@ -4,3 +4,4 @@ find . -type f \( -name '*.bmp' -o -name '*.wav' -o -name '*.dat' \) -print -del
|
||||
find . -depth -type d \( -name Gaming.Desktop.x64 \) -exec rm -rv {} \;
|
||||
find . -depth -type d \( -name Gaming.Xbox.Scarlett.x64 \) -exec rm -rv {} \;
|
||||
find . -depth -type d \( -name Gaming.Xbox.XboxOne.x64 \) -exec rm -rv {} \;
|
||||
rm shaders/*.h
|
||||
|
19
VisualC-GDK/shaders/D3D12_PixelShader_Colors.hlsl
Normal file
19
VisualC-GDK/shaders/D3D12_PixelShader_Colors.hlsl
Normal file
@@ -0,0 +1,19 @@
|
||||
struct PixelShaderInput
|
||||
{
|
||||
float4 pos : SV_POSITION;
|
||||
float2 tex : TEXCOORD0;
|
||||
float4 color : COLOR0;
|
||||
};
|
||||
|
||||
#define ColorRS \
|
||||
"RootFlags ( ALLOW_INPUT_ASSEMBLER_INPUT_LAYOUT |" \
|
||||
"DENY_DOMAIN_SHADER_ROOT_ACCESS |" \
|
||||
"DENY_GEOMETRY_SHADER_ROOT_ACCESS |" \
|
||||
"DENY_HULL_SHADER_ROOT_ACCESS )," \
|
||||
"RootConstants(num32BitConstants=32, b0)"
|
||||
|
||||
[RootSignature(ColorRS)]
|
||||
float4 main(PixelShaderInput input) : SV_TARGET0
|
||||
{
|
||||
return input.color;
|
||||
}
|
43
VisualC-GDK/shaders/D3D12_PixelShader_NV12_BT601.hlsl
Normal file
43
VisualC-GDK/shaders/D3D12_PixelShader_NV12_BT601.hlsl
Normal file
@@ -0,0 +1,43 @@
|
||||
Texture2D theTextureY : register(t0);
|
||||
Texture2D theTextureUV : register(t1);
|
||||
SamplerState theSampler : register(s0);
|
||||
|
||||
struct PixelShaderInput
|
||||
{
|
||||
float4 pos : SV_POSITION;
|
||||
float2 tex : TEXCOORD0;
|
||||
float4 color : COLOR0;
|
||||
};
|
||||
|
||||
#define NVRS \
|
||||
"RootFlags ( ALLOW_INPUT_ASSEMBLER_INPUT_LAYOUT |" \
|
||||
" DENY_DOMAIN_SHADER_ROOT_ACCESS |" \
|
||||
" DENY_GEOMETRY_SHADER_ROOT_ACCESS |" \
|
||||
" DENY_HULL_SHADER_ROOT_ACCESS )," \
|
||||
"RootConstants(num32BitConstants=32, b0),"\
|
||||
"DescriptorTable ( SRV(t0), visibility = SHADER_VISIBILITY_PIXEL ),"\
|
||||
"DescriptorTable ( SRV(t1), visibility = SHADER_VISIBILITY_PIXEL ),"\
|
||||
"DescriptorTable ( Sampler(s0), visibility = SHADER_VISIBILITY_PIXEL )"
|
||||
|
||||
[RootSignature(NVRS)]
|
||||
float4 main(PixelShaderInput input) : SV_TARGET
|
||||
{
|
||||
const float3 offset = {-0.0627451017, -0.501960814, -0.501960814};
|
||||
const float3 Rcoeff = {1.1644, 0.0000, 1.5960};
|
||||
const float3 Gcoeff = {1.1644, -0.3918, -0.8130};
|
||||
const float3 Bcoeff = {1.1644, 2.0172, 0.0000};
|
||||
|
||||
float4 Output;
|
||||
|
||||
float3 yuv;
|
||||
yuv.x = theTextureY.Sample(theSampler, input.tex).r;
|
||||
yuv.yz = theTextureUV.Sample(theSampler, input.tex).rg;
|
||||
|
||||
yuv += offset;
|
||||
Output.r = dot(yuv, Rcoeff);
|
||||
Output.g = dot(yuv, Gcoeff);
|
||||
Output.b = dot(yuv, Bcoeff);
|
||||
Output.a = 1.0f;
|
||||
|
||||
return Output * input.color;
|
||||
}
|
43
VisualC-GDK/shaders/D3D12_PixelShader_NV12_BT709.hlsl
Normal file
43
VisualC-GDK/shaders/D3D12_PixelShader_NV12_BT709.hlsl
Normal file
@@ -0,0 +1,43 @@
|
||||
Texture2D theTextureY : register(t0);
|
||||
Texture2D theTextureUV : register(t1);
|
||||
SamplerState theSampler : register(s0);
|
||||
|
||||
struct PixelShaderInput
|
||||
{
|
||||
float4 pos : SV_POSITION;
|
||||
float2 tex : TEXCOORD0;
|
||||
float4 color : COLOR0;
|
||||
};
|
||||
|
||||
#define NVRS \
|
||||
"RootFlags ( ALLOW_INPUT_ASSEMBLER_INPUT_LAYOUT |" \
|
||||
" DENY_DOMAIN_SHADER_ROOT_ACCESS |" \
|
||||
" DENY_GEOMETRY_SHADER_ROOT_ACCESS |" \
|
||||
" DENY_HULL_SHADER_ROOT_ACCESS )," \
|
||||
"RootConstants(num32BitConstants=32, b0),"\
|
||||
"DescriptorTable ( SRV(t0), visibility = SHADER_VISIBILITY_PIXEL ),"\
|
||||
"DescriptorTable ( SRV(t1), visibility = SHADER_VISIBILITY_PIXEL ),"\
|
||||
"DescriptorTable ( Sampler(s0), visibility = SHADER_VISIBILITY_PIXEL )"
|
||||
|
||||
[RootSignature(NVRS)]
|
||||
float4 main(PixelShaderInput input) : SV_TARGET
|
||||
{
|
||||
const float3 offset = {-0.0627451017, -0.501960814, -0.501960814};
|
||||
const float3 Rcoeff = {1.1644, 0.0000, 1.7927};
|
||||
const float3 Gcoeff = {1.1644, -0.2132, -0.5329};
|
||||
const float3 Bcoeff = {1.1644, 2.1124, 0.0000};
|
||||
|
||||
float4 Output;
|
||||
|
||||
float3 yuv;
|
||||
yuv.x = theTextureY.Sample(theSampler, input.tex).r;
|
||||
yuv.yz = theTextureUV.Sample(theSampler, input.tex).rg;
|
||||
|
||||
yuv += offset;
|
||||
Output.r = dot(yuv, Rcoeff);
|
||||
Output.g = dot(yuv, Gcoeff);
|
||||
Output.b = dot(yuv, Bcoeff);
|
||||
Output.a = 1.0f;
|
||||
|
||||
return Output * input.color;
|
||||
}
|
43
VisualC-GDK/shaders/D3D12_PixelShader_NV12_JPEG.hlsl
Normal file
43
VisualC-GDK/shaders/D3D12_PixelShader_NV12_JPEG.hlsl
Normal file
@@ -0,0 +1,43 @@
|
||||
Texture2D theTextureY : register(t0);
|
||||
Texture2D theTextureUV : register(t1);
|
||||
SamplerState theSampler : register(s0);
|
||||
|
||||
struct PixelShaderInput
|
||||
{
|
||||
float4 pos : SV_POSITION;
|
||||
float2 tex : TEXCOORD0;
|
||||
float4 color : COLOR0;
|
||||
};
|
||||
|
||||
#define NVRS \
|
||||
"RootFlags ( ALLOW_INPUT_ASSEMBLER_INPUT_LAYOUT |" \
|
||||
" DENY_DOMAIN_SHADER_ROOT_ACCESS |" \
|
||||
" DENY_GEOMETRY_SHADER_ROOT_ACCESS |" \
|
||||
" DENY_HULL_SHADER_ROOT_ACCESS )," \
|
||||
"RootConstants(num32BitConstants=32, b0),"\
|
||||
"DescriptorTable ( SRV(t0), visibility = SHADER_VISIBILITY_PIXEL ),"\
|
||||
"DescriptorTable ( SRV(t1), visibility = SHADER_VISIBILITY_PIXEL ),"\
|
||||
"DescriptorTable ( Sampler(s0), visibility = SHADER_VISIBILITY_PIXEL )"
|
||||
|
||||
[RootSignature(NVRS)]
|
||||
float4 main(PixelShaderInput input) : SV_TARGET
|
||||
{
|
||||
const float3 offset = {0.0, -0.501960814, -0.501960814};
|
||||
const float3 Rcoeff = {1.0000, 0.0000, 1.4020};
|
||||
const float3 Gcoeff = {1.0000, -0.3441, -0.7141};
|
||||
const float3 Bcoeff = {1.0000, 1.7720, 0.0000};
|
||||
|
||||
float4 Output;
|
||||
|
||||
float3 yuv;
|
||||
yuv.x = theTextureY.Sample(theSampler, input.tex).r;
|
||||
yuv.yz = theTextureUV.Sample(theSampler, input.tex).rg;
|
||||
|
||||
yuv += offset;
|
||||
Output.r = dot(yuv, Rcoeff);
|
||||
Output.g = dot(yuv, Gcoeff);
|
||||
Output.b = dot(yuv, Bcoeff);
|
||||
Output.a = 1.0f;
|
||||
|
||||
return Output * input.color;
|
||||
}
|
43
VisualC-GDK/shaders/D3D12_PixelShader_NV21_BT601.hlsl
Normal file
43
VisualC-GDK/shaders/D3D12_PixelShader_NV21_BT601.hlsl
Normal file
@@ -0,0 +1,43 @@
|
||||
Texture2D theTextureY : register(t0);
|
||||
Texture2D theTextureUV : register(t1);
|
||||
SamplerState theSampler : register(s0);
|
||||
|
||||
struct PixelShaderInput
|
||||
{
|
||||
float4 pos : SV_POSITION;
|
||||
float2 tex : TEXCOORD0;
|
||||
float4 color : COLOR0;
|
||||
};
|
||||
|
||||
#define NVRS \
|
||||
"RootFlags ( ALLOW_INPUT_ASSEMBLER_INPUT_LAYOUT |" \
|
||||
" DENY_DOMAIN_SHADER_ROOT_ACCESS |" \
|
||||
" DENY_GEOMETRY_SHADER_ROOT_ACCESS |" \
|
||||
" DENY_HULL_SHADER_ROOT_ACCESS )," \
|
||||
"RootConstants(num32BitConstants=32, b0),"\
|
||||
"DescriptorTable ( SRV(t0), visibility = SHADER_VISIBILITY_PIXEL ),"\
|
||||
"DescriptorTable ( SRV(t1), visibility = SHADER_VISIBILITY_PIXEL ),"\
|
||||
"DescriptorTable ( Sampler(s0), visibility = SHADER_VISIBILITY_PIXEL )"
|
||||
|
||||
[RootSignature(NVRS)]
|
||||
float4 main(PixelShaderInput input) : SV_TARGET
|
||||
{
|
||||
const float3 offset = {-0.0627451017, -0.501960814, -0.501960814};
|
||||
const float3 Rcoeff = {1.1644, 0.0000, 1.5960};
|
||||
const float3 Gcoeff = {1.1644, -0.3918, -0.8130};
|
||||
const float3 Bcoeff = {1.1644, 2.0172, 0.0000};
|
||||
|
||||
float4 Output;
|
||||
|
||||
float3 yuv;
|
||||
yuv.x = theTextureY.Sample(theSampler, input.tex).r;
|
||||
yuv.yz = theTextureUV.Sample(theSampler, input.tex).gr;
|
||||
|
||||
yuv += offset;
|
||||
Output.r = dot(yuv, Rcoeff);
|
||||
Output.g = dot(yuv, Gcoeff);
|
||||
Output.b = dot(yuv, Bcoeff);
|
||||
Output.a = 1.0f;
|
||||
|
||||
return Output * input.color;
|
||||
}
|
43
VisualC-GDK/shaders/D3D12_PixelShader_NV21_BT709.hlsl
Normal file
43
VisualC-GDK/shaders/D3D12_PixelShader_NV21_BT709.hlsl
Normal file
@@ -0,0 +1,43 @@
|
||||
Texture2D theTextureY : register(t0);
|
||||
Texture2D theTextureUV : register(t1);
|
||||
SamplerState theSampler : register(s0);
|
||||
|
||||
struct PixelShaderInput
|
||||
{
|
||||
float4 pos : SV_POSITION;
|
||||
float2 tex : TEXCOORD0;
|
||||
float4 color : COLOR0;
|
||||
};
|
||||
|
||||
#define NVRS \
|
||||
"RootFlags ( ALLOW_INPUT_ASSEMBLER_INPUT_LAYOUT |" \
|
||||
" DENY_DOMAIN_SHADER_ROOT_ACCESS |" \
|
||||
" DENY_GEOMETRY_SHADER_ROOT_ACCESS |" \
|
||||
" DENY_HULL_SHADER_ROOT_ACCESS )," \
|
||||
"RootConstants(num32BitConstants=32, b0),"\
|
||||
"DescriptorTable ( SRV(t0), visibility = SHADER_VISIBILITY_PIXEL ),"\
|
||||
"DescriptorTable ( SRV(t1), visibility = SHADER_VISIBILITY_PIXEL ),"\
|
||||
"DescriptorTable ( Sampler(s0), visibility = SHADER_VISIBILITY_PIXEL )"
|
||||
|
||||
[RootSignature(NVRS)]
|
||||
float4 main(PixelShaderInput input) : SV_TARGET
|
||||
{
|
||||
const float3 offset = {-0.0627451017, -0.501960814, -0.501960814};
|
||||
const float3 Rcoeff = {1.1644, 0.0000, 1.7927};
|
||||
const float3 Gcoeff = {1.1644, -0.2132, -0.5329};
|
||||
const float3 Bcoeff = {1.1644, 2.1124, 0.0000};
|
||||
|
||||
float4 Output;
|
||||
|
||||
float3 yuv;
|
||||
yuv.x = theTextureY.Sample(theSampler, input.tex).r;
|
||||
yuv.yz = theTextureUV.Sample(theSampler, input.tex).gr;
|
||||
|
||||
yuv += offset;
|
||||
Output.r = dot(yuv, Rcoeff);
|
||||
Output.g = dot(yuv, Gcoeff);
|
||||
Output.b = dot(yuv, Bcoeff);
|
||||
Output.a = 1.0f;
|
||||
|
||||
return Output * input.color;
|
||||
}
|
43
VisualC-GDK/shaders/D3D12_PixelShader_NV21_JPEG.hlsl
Normal file
43
VisualC-GDK/shaders/D3D12_PixelShader_NV21_JPEG.hlsl
Normal file
@@ -0,0 +1,43 @@
|
||||
Texture2D theTextureY : register(t0);
|
||||
Texture2D theTextureUV : register(t1);
|
||||
SamplerState theSampler : register(s0);
|
||||
|
||||
struct PixelShaderInput
|
||||
{
|
||||
float4 pos : SV_POSITION;
|
||||
float2 tex : TEXCOORD0;
|
||||
float4 color : COLOR0;
|
||||
};
|
||||
|
||||
#define NVRS \
|
||||
"RootFlags ( ALLOW_INPUT_ASSEMBLER_INPUT_LAYOUT |" \
|
||||
" DENY_DOMAIN_SHADER_ROOT_ACCESS |" \
|
||||
" DENY_GEOMETRY_SHADER_ROOT_ACCESS |" \
|
||||
" DENY_HULL_SHADER_ROOT_ACCESS )," \
|
||||
"RootConstants(num32BitConstants=32, b0),"\
|
||||
"DescriptorTable ( SRV(t0), visibility = SHADER_VISIBILITY_PIXEL ),"\
|
||||
"DescriptorTable ( SRV(t1), visibility = SHADER_VISIBILITY_PIXEL ),"\
|
||||
"DescriptorTable ( Sampler(s0), visibility = SHADER_VISIBILITY_PIXEL )"
|
||||
|
||||
[RootSignature(NVRS)]
|
||||
float4 main(PixelShaderInput input) : SV_TARGET
|
||||
{
|
||||
const float3 offset = {0.0, -0.501960814, -0.501960814};
|
||||
const float3 Rcoeff = {1.0000, 0.0000, 1.4020};
|
||||
const float3 Gcoeff = {1.0000, -0.3441, -0.7141};
|
||||
const float3 Bcoeff = {1.0000, 1.7720, 0.0000};
|
||||
|
||||
float4 Output;
|
||||
|
||||
float3 yuv;
|
||||
yuv.x = theTextureY.Sample(theSampler, input.tex).r;
|
||||
yuv.yz = theTextureUV.Sample(theSampler, input.tex).gr;
|
||||
|
||||
yuv += offset;
|
||||
Output.r = dot(yuv, Rcoeff);
|
||||
Output.g = dot(yuv, Gcoeff);
|
||||
Output.b = dot(yuv, Bcoeff);
|
||||
Output.a = 1.0f;
|
||||
|
||||
return Output * input.color;
|
||||
}
|
24
VisualC-GDK/shaders/D3D12_PixelShader_Textures.hlsl
Normal file
24
VisualC-GDK/shaders/D3D12_PixelShader_Textures.hlsl
Normal file
@@ -0,0 +1,24 @@
|
||||
Texture2D theTexture : register(t0);
|
||||
SamplerState theSampler : register(s0);
|
||||
|
||||
struct PixelShaderInput
|
||||
{
|
||||
float4 pos : SV_POSITION;
|
||||
float2 tex : TEXCOORD0;
|
||||
float4 color : COLOR0;
|
||||
};
|
||||
|
||||
#define TextureRS \
|
||||
"RootFlags ( ALLOW_INPUT_ASSEMBLER_INPUT_LAYOUT |" \
|
||||
" DENY_DOMAIN_SHADER_ROOT_ACCESS |" \
|
||||
" DENY_GEOMETRY_SHADER_ROOT_ACCESS |" \
|
||||
" DENY_HULL_SHADER_ROOT_ACCESS )," \
|
||||
"RootConstants(num32BitConstants=32, b0),"\
|
||||
"DescriptorTable ( SRV(t0), visibility = SHADER_VISIBILITY_PIXEL ),"\
|
||||
"DescriptorTable ( Sampler(s0), visibility = SHADER_VISIBILITY_PIXEL )"
|
||||
|
||||
[RootSignature(TextureRS)]
|
||||
float4 main(PixelShaderInput input) : SV_TARGET
|
||||
{
|
||||
return theTexture.Sample(theSampler, input.tex) * input.color;
|
||||
}
|
46
VisualC-GDK/shaders/D3D12_PixelShader_YUV_BT601.hlsl
Normal file
46
VisualC-GDK/shaders/D3D12_PixelShader_YUV_BT601.hlsl
Normal file
@@ -0,0 +1,46 @@
|
||||
Texture2D theTextureY : register(t0);
|
||||
Texture2D theTextureU : register(t1);
|
||||
Texture2D theTextureV : register(t2);
|
||||
SamplerState theSampler : register(s0);
|
||||
|
||||
struct PixelShaderInput
|
||||
{
|
||||
float4 pos : SV_POSITION;
|
||||
float2 tex : TEXCOORD0;
|
||||
float4 color : COLOR0;
|
||||
};
|
||||
|
||||
#define YUVRS \
|
||||
"RootFlags ( ALLOW_INPUT_ASSEMBLER_INPUT_LAYOUT |" \
|
||||
" DENY_DOMAIN_SHADER_ROOT_ACCESS |" \
|
||||
" DENY_GEOMETRY_SHADER_ROOT_ACCESS |" \
|
||||
" DENY_HULL_SHADER_ROOT_ACCESS )," \
|
||||
"RootConstants(num32BitConstants=32, b0),"\
|
||||
"DescriptorTable ( SRV(t0), visibility = SHADER_VISIBILITY_PIXEL ),"\
|
||||
"DescriptorTable ( SRV(t1), visibility = SHADER_VISIBILITY_PIXEL ),"\
|
||||
"DescriptorTable ( SRV(t2), visibility = SHADER_VISIBILITY_PIXEL ),"\
|
||||
"DescriptorTable ( Sampler(s0), visibility = SHADER_VISIBILITY_PIXEL )"
|
||||
|
||||
[RootSignature(YUVRS)]
|
||||
float4 main(PixelShaderInput input) : SV_TARGET
|
||||
{
|
||||
const float3 offset = {-0.0627451017, -0.501960814, -0.501960814};
|
||||
const float3 Rcoeff = {1.1644, 0.0000, 1.5960};
|
||||
const float3 Gcoeff = {1.1644, -0.3918, -0.8130};
|
||||
const float3 Bcoeff = {1.1644, 2.0172, 0.0000};
|
||||
|
||||
float4 Output;
|
||||
|
||||
float3 yuv;
|
||||
yuv.x = theTextureY.Sample(theSampler, input.tex).r;
|
||||
yuv.y = theTextureU.Sample(theSampler, input.tex).r;
|
||||
yuv.z = theTextureV.Sample(theSampler, input.tex).r;
|
||||
|
||||
yuv += offset;
|
||||
Output.r = dot(yuv, Rcoeff);
|
||||
Output.g = dot(yuv, Gcoeff);
|
||||
Output.b = dot(yuv, Bcoeff);
|
||||
Output.a = 1.0f;
|
||||
|
||||
return Output * input.color;
|
||||
}
|
46
VisualC-GDK/shaders/D3D12_PixelShader_YUV_BT709.hlsl
Normal file
46
VisualC-GDK/shaders/D3D12_PixelShader_YUV_BT709.hlsl
Normal file
@@ -0,0 +1,46 @@
|
||||
Texture2D theTextureY : register(t0);
|
||||
Texture2D theTextureU : register(t1);
|
||||
Texture2D theTextureV : register(t2);
|
||||
SamplerState theSampler : register(s0);
|
||||
|
||||
struct PixelShaderInput
|
||||
{
|
||||
float4 pos : SV_POSITION;
|
||||
float2 tex : TEXCOORD0;
|
||||
float4 color : COLOR0;
|
||||
};
|
||||
|
||||
#define YUVRS \
|
||||
"RootFlags ( ALLOW_INPUT_ASSEMBLER_INPUT_LAYOUT |" \
|
||||
" DENY_DOMAIN_SHADER_ROOT_ACCESS |" \
|
||||
" DENY_GEOMETRY_SHADER_ROOT_ACCESS |" \
|
||||
" DENY_HULL_SHADER_ROOT_ACCESS )," \
|
||||
"RootConstants(num32BitConstants=32, b0),"\
|
||||
"DescriptorTable ( SRV(t0), visibility = SHADER_VISIBILITY_PIXEL ),"\
|
||||
"DescriptorTable ( SRV(t1), visibility = SHADER_VISIBILITY_PIXEL ),"\
|
||||
"DescriptorTable ( SRV(t2), visibility = SHADER_VISIBILITY_PIXEL ),"\
|
||||
"DescriptorTable ( Sampler(s0), visibility = SHADER_VISIBILITY_PIXEL )"
|
||||
|
||||
[RootSignature(YUVRS)]
|
||||
float4 main(PixelShaderInput input) : SV_TARGET
|
||||
{
|
||||
const float3 offset = {-0.0627451017, -0.501960814, -0.501960814};
|
||||
const float3 Rcoeff = {1.1644, 0.0000, 1.7927};
|
||||
const float3 Gcoeff = {1.1644, -0.2132, -0.5329};
|
||||
const float3 Bcoeff = {1.1644, 2.1124, 0.0000};
|
||||
|
||||
float4 Output;
|
||||
|
||||
float3 yuv;
|
||||
yuv.x = theTextureY.Sample(theSampler, input.tex).r;
|
||||
yuv.y = theTextureU.Sample(theSampler, input.tex).r;
|
||||
yuv.z = theTextureV.Sample(theSampler, input.tex).r;
|
||||
|
||||
yuv += offset;
|
||||
Output.r = dot(yuv, Rcoeff);
|
||||
Output.g = dot(yuv, Gcoeff);
|
||||
Output.b = dot(yuv, Bcoeff);
|
||||
Output.a = 1.0f;
|
||||
|
||||
return Output * input.color;
|
||||
}
|
46
VisualC-GDK/shaders/D3D12_PixelShader_YUV_JPEG.hlsl
Normal file
46
VisualC-GDK/shaders/D3D12_PixelShader_YUV_JPEG.hlsl
Normal file
@@ -0,0 +1,46 @@
|
||||
Texture2D theTextureY : register(t0);
|
||||
Texture2D theTextureU : register(t1);
|
||||
Texture2D theTextureV : register(t2);
|
||||
SamplerState theSampler : register(s0);
|
||||
|
||||
struct PixelShaderInput
|
||||
{
|
||||
float4 pos : SV_POSITION;
|
||||
float2 tex : TEXCOORD0;
|
||||
float4 color : COLOR0;
|
||||
};
|
||||
|
||||
#define YUVRS \
|
||||
"RootFlags ( ALLOW_INPUT_ASSEMBLER_INPUT_LAYOUT |" \
|
||||
" DENY_DOMAIN_SHADER_ROOT_ACCESS |" \
|
||||
" DENY_GEOMETRY_SHADER_ROOT_ACCESS |" \
|
||||
" DENY_HULL_SHADER_ROOT_ACCESS )," \
|
||||
"RootConstants(num32BitConstants=32, b0),"\
|
||||
"DescriptorTable ( SRV(t0), visibility = SHADER_VISIBILITY_PIXEL ),"\
|
||||
"DescriptorTable ( SRV(t1), visibility = SHADER_VISIBILITY_PIXEL ),"\
|
||||
"DescriptorTable ( SRV(t2), visibility = SHADER_VISIBILITY_PIXEL ),"\
|
||||
"DescriptorTable ( Sampler(s0), visibility = SHADER_VISIBILITY_PIXEL )"
|
||||
|
||||
[RootSignature(YUVRS)]
|
||||
float4 main(PixelShaderInput input) : SV_TARGET
|
||||
{
|
||||
const float3 offset = {0.0, -0.501960814, -0.501960814};
|
||||
const float3 Rcoeff = {1.0000, 0.0000, 1.4020};
|
||||
const float3 Gcoeff = {1.0000, -0.3441, -0.7141};
|
||||
const float3 Bcoeff = {1.0000, 1.7720, 0.0000};
|
||||
|
||||
float4 Output;
|
||||
|
||||
float3 yuv;
|
||||
yuv.x = theTextureY.Sample(theSampler, input.tex).r;
|
||||
yuv.y = theTextureU.Sample(theSampler, input.tex).r;
|
||||
yuv.z = theTextureV.Sample(theSampler, input.tex).r;
|
||||
|
||||
yuv += offset;
|
||||
Output.r = dot(yuv, Rcoeff);
|
||||
Output.g = dot(yuv, Gcoeff);
|
||||
Output.b = dot(yuv, Bcoeff);
|
||||
Output.a = 1.0f;
|
||||
|
||||
return Output * input.color;
|
||||
}
|
95
VisualC-GDK/shaders/D3D12_VertexShader.hlsl
Normal file
95
VisualC-GDK/shaders/D3D12_VertexShader.hlsl
Normal file
@@ -0,0 +1,95 @@
|
||||
#pragma pack_matrix( row_major )
|
||||
|
||||
struct VertexShaderConstants
|
||||
{
|
||||
matrix model;
|
||||
matrix projectionAndView;
|
||||
};
|
||||
ConstantBuffer<VertexShaderConstants> Constants : register(b0);
|
||||
|
||||
struct VertexShaderInput
|
||||
{
|
||||
float3 pos : POSITION;
|
||||
float2 tex : TEXCOORD0;
|
||||
float4 color : COLOR0;
|
||||
};
|
||||
|
||||
struct VertexShaderOutput
|
||||
{
|
||||
float4 pos : SV_POSITION;
|
||||
float2 tex : TEXCOORD0;
|
||||
float4 color : COLOR0;
|
||||
};
|
||||
|
||||
#define ColorRS \
|
||||
"RootFlags ( ALLOW_INPUT_ASSEMBLER_INPUT_LAYOUT |" \
|
||||
"DENY_DOMAIN_SHADER_ROOT_ACCESS |" \
|
||||
"DENY_GEOMETRY_SHADER_ROOT_ACCESS |" \
|
||||
"DENY_HULL_SHADER_ROOT_ACCESS )," \
|
||||
"RootConstants(num32BitConstants=32, b0)"
|
||||
|
||||
#define TextureRS \
|
||||
"RootFlags ( ALLOW_INPUT_ASSEMBLER_INPUT_LAYOUT |" \
|
||||
" DENY_DOMAIN_SHADER_ROOT_ACCESS |" \
|
||||
" DENY_GEOMETRY_SHADER_ROOT_ACCESS |" \
|
||||
" DENY_HULL_SHADER_ROOT_ACCESS )," \
|
||||
"RootConstants(num32BitConstants=32, b0),"\
|
||||
"DescriptorTable ( SRV(t0), visibility = SHADER_VISIBILITY_PIXEL ),"\
|
||||
"DescriptorTable ( Sampler(s0), visibility = SHADER_VISIBILITY_PIXEL )"
|
||||
|
||||
#define YUVRS \
|
||||
"RootFlags ( ALLOW_INPUT_ASSEMBLER_INPUT_LAYOUT |" \
|
||||
" DENY_DOMAIN_SHADER_ROOT_ACCESS |" \
|
||||
" DENY_GEOMETRY_SHADER_ROOT_ACCESS |" \
|
||||
" DENY_HULL_SHADER_ROOT_ACCESS )," \
|
||||
"RootConstants(num32BitConstants=32, b0),"\
|
||||
"DescriptorTable ( SRV(t0), visibility = SHADER_VISIBILITY_PIXEL ),"\
|
||||
"DescriptorTable ( SRV(t1), visibility = SHADER_VISIBILITY_PIXEL ),"\
|
||||
"DescriptorTable ( SRV(t2), visibility = SHADER_VISIBILITY_PIXEL ),"\
|
||||
"DescriptorTable ( Sampler(s0), visibility = SHADER_VISIBILITY_PIXEL )"
|
||||
|
||||
#define NVRS \
|
||||
"RootFlags ( ALLOW_INPUT_ASSEMBLER_INPUT_LAYOUT |" \
|
||||
" DENY_DOMAIN_SHADER_ROOT_ACCESS |" \
|
||||
" DENY_GEOMETRY_SHADER_ROOT_ACCESS |" \
|
||||
" DENY_HULL_SHADER_ROOT_ACCESS )," \
|
||||
"RootConstants(num32BitConstants=32, b0),"\
|
||||
"DescriptorTable ( SRV(t0), visibility = SHADER_VISIBILITY_PIXEL ),"\
|
||||
"DescriptorTable ( SRV(t1), visibility = SHADER_VISIBILITY_PIXEL ),"\
|
||||
"DescriptorTable ( Sampler(s0), visibility = SHADER_VISIBILITY_PIXEL )"
|
||||
|
||||
[RootSignature(ColorRS)]
|
||||
VertexShaderOutput mainColor(VertexShaderInput input)
|
||||
{
|
||||
VertexShaderOutput output;
|
||||
float4 pos = float4(input.pos, 1.0f);
|
||||
|
||||
// Transform the vertex position into projected space.
|
||||
pos = mul(pos, Constants.model);
|
||||
pos = mul(pos, Constants.projectionAndView);
|
||||
output.pos = pos;
|
||||
|
||||
// Pass through texture coordinates and color values without transformation
|
||||
output.tex = input.tex;
|
||||
output.color = input.color;
|
||||
|
||||
return output;
|
||||
}
|
||||
|
||||
[RootSignature(TextureRS)]
|
||||
VertexShaderOutput mainTexture(VertexShaderInput input)
|
||||
{
|
||||
return mainColor(input);
|
||||
}
|
||||
|
||||
[RootSignature(YUVRS)]
|
||||
VertexShaderOutput mainYUV(VertexShaderInput input)
|
||||
{
|
||||
return mainColor(input);
|
||||
}
|
||||
|
||||
[RootSignature(NVRS)]
|
||||
VertexShaderOutput mainNV(VertexShaderInput input)
|
||||
{
|
||||
return mainColor(input);
|
||||
}
|
35
VisualC-GDK/shaders/buildshaders.bat
Normal file
35
VisualC-GDK/shaders/buildshaders.bat
Normal file
@@ -0,0 +1,35 @@
|
||||
if %2.==one. goto setxboxone
|
||||
rem Xbox Series compile
|
||||
set XBOXDXC="%GameDKLatest%\GXDK\bin\Scarlett\DXC.exe"
|
||||
set SUFFIX=_Series.h
|
||||
goto startbuild
|
||||
|
||||
:setxboxone
|
||||
set XBOXDXC="%GameDKLatest%\GXDK\bin\XboxOne\DXC.exe"
|
||||
set SUFFIX=_One.h
|
||||
|
||||
:startbuild
|
||||
echo Building with %XBOXDXC%
|
||||
cd "%1\shaders"
|
||||
rem Root Signatures
|
||||
%XBOXDXC% -E ColorRS -T rootsig_1_1 -rootsig-define ColorRS -Fh D3D12_RootSig_Color%SUFFIX% -Vn D3D12_RootSig_Color D3D12_VertexShader.hlsl
|
||||
%XBOXDXC% -E TextureRS -T rootsig_1_1 -rootsig-define TextureRS -Fh D3D12_RootSig_Texture%SUFFIX% -Vn D3D12_RootSig_Texture D3D12_VertexShader.hlsl
|
||||
%XBOXDXC% -E YUVRS -T rootsig_1_1 -rootsig-define YUVRS -Fh D3D12_RootSig_YUV%SUFFIX% -Vn D3D12_RootSig_YUV D3D12_VertexShader.hlsl
|
||||
%XBOXDXC% -E NVRS -T rootsig_1_1 -rootsig-define NVRS -Fh D3D12_RootSig_NV%SUFFIX% -Vn D3D12_RootSig_NV D3D12_VertexShader.hlsl
|
||||
rem Vertex Shaders
|
||||
%XBOXDXC% -E mainColor -T vs_6_0 -Fh D3D12_VertexShader_Color%SUFFIX% -Vn D3D12_VertexShader_Color D3D12_VertexShader.hlsl
|
||||
%XBOXDXC% -E mainTexture -T vs_6_0 -Fh D3D12_VertexShader_Texture%SUFFIX% -Vn D3D12_VertexShader_Texture D3D12_VertexShader.hlsl
|
||||
%XBOXDXC% -E mainNV -T vs_6_0 -Fh D3D12_VertexShader_NV%SUFFIX% -Vn D3D12_VertexShader_NV D3D12_VertexShader.hlsl
|
||||
%XBOXDXC% -E mainYUV -T vs_6_0 -Fh D3D12_VertexShader_YUV%SUFFIX% -Vn D3D12_VertexShader_YUV D3D12_VertexShader.hlsl
|
||||
rem Pixel Shaders
|
||||
%XBOXDXC% -E main -T ps_6_0 -Fh D3D12_PixelShader_Colors%SUFFIX% -Vn D3D12_PixelShader_Colors D3D12_PixelShader_Colors.hlsl
|
||||
%XBOXDXC% -E main -T ps_6_0 -Fh D3D12_PixelShader_NV12_BT601%SUFFIX% -Vn D3D12_PixelShader_NV12_BT601 D3D12_PixelShader_NV12_BT601.hlsl
|
||||
%XBOXDXC% -E main -T ps_6_0 -Fh D3D12_PixelShader_NV12_BT709%SUFFIX% -Vn D3D12_PixelShader_NV12_BT709 D3D12_PixelShader_NV12_BT709.hlsl
|
||||
%XBOXDXC% -E main -T ps_6_0 -Fh D3D12_PixelShader_NV12_JPEG%SUFFIX% -Vn D3D12_PixelShader_NV12_JPEG D3D12_PixelShader_NV12_JPEG.hlsl
|
||||
%XBOXDXC% -E main -T ps_6_0 -Fh D3D12_PixelShader_NV21_BT601%SUFFIX% -Vn D3D12_PixelShader_NV21_BT601 D3D12_PixelShader_NV21_BT601.hlsl
|
||||
%XBOXDXC% -E main -T ps_6_0 -Fh D3D12_PixelShader_NV21_BT709%SUFFIX% -Vn D3D12_PixelShader_NV21_BT709 D3D12_PixelShader_NV21_BT709.hlsl
|
||||
%XBOXDXC% -E main -T ps_6_0 -Fh D3D12_PixelShader_NV21_JPEG%SUFFIX% -Vn D3D12_PixelShader_NV21_JPEG D3D12_PixelShader_NV21_JPEG.hlsl
|
||||
%XBOXDXC% -E main -T ps_6_0 -Fh D3D12_PixelShader_Textures%SUFFIX% -Vn D3D12_PixelShader_Textures D3D12_PixelShader_Textures.hlsl
|
||||
%XBOXDXC% -E main -T ps_6_0 -Fh D3D12_PixelShader_YUV_BT601%SUFFIX% -Vn D3D12_PixelShader_YUV_BT601 D3D12_PixelShader_YUV_BT601.hlsl
|
||||
%XBOXDXC% -E main -T ps_6_0 -Fh D3D12_PixelShader_YUV_BT709%SUFFIX% -Vn D3D12_PixelShader_YUV_BT709 D3D12_PixelShader_YUV_BT709.hlsl
|
||||
%XBOXDXC% -E main -T ps_6_0 -Fh D3D12_PixelShader_YUV_JPEG%SUFFIX% -Vn D3D12_PixelShader_YUV_JPEG D3D12_PixelShader_YUV_JPEG.hlsl
|
@@ -139,7 +139,7 @@
|
||||
</ResourceCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<AdditionalDependencies>xgameruntime.lib;../Microsoft.Xbox.Services.141.GDK.C.Thunks.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>xgameruntime.lib;../Microsoft.Xbox.Services.GDK.C.Thunks.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Xbox.Scarlett.x64'">
|
||||
@@ -211,7 +211,7 @@
|
||||
<Link>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<AdditionalDependencies>xgameruntime.lib;../Microsoft.Xbox.Services.141.GDK.C.Thunks.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>xgameruntime.lib;../Microsoft.Xbox.Services.GDK.C.Thunks.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Xbox.Scarlett.x64'">
|
||||
@@ -409,7 +409,7 @@
|
||||
<CopyFileToFolders Include="..\..\logos\Logo480x480.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<CopyFileToFolders Include="$(Console_GRDKExtLibRoot)Xbox.Services.API.C\DesignTime\CommonConfiguration\Neutral\Lib\Release\Microsoft.Xbox.Services.141.GDK.C.Thunks.dll">
|
||||
<CopyFileToFolders Include="$(Console_GRDKExtLibRoot)Xbox.Services.API.C\DesignTime\CommonConfiguration\Neutral\Lib\Release\Microsoft.Xbox.Services.GDK.C.Thunks.dll">
|
||||
<FileType>Document</FileType>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Xbox.Scarlett.x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Xbox.XboxOne.x64'">true</ExcludedFromBuild>
|
||||
|
@@ -21,7 +21,7 @@
|
||||
<CopyFileToFolders Include="..\..\logos\Logo480x480.png">
|
||||
<Filter>logos</Filter>
|
||||
</CopyFileToFolders>
|
||||
<CopyFileToFolders Include="$(Console_GRDKExtLibRoot)Xbox.Services.API.C\DesignTime\CommonConfiguration\Neutral\Lib\Release\Microsoft.Xbox.Services.141.GDK.C.Thunks.dll">
|
||||
<CopyFileToFolders Include="$(Console_GRDKExtLibRoot)Xbox.Services.API.C\DesignTime\CommonConfiguration\Neutral\Lib\Release\Microsoft.Xbox.Services.GDK.C.Thunks.dll">
|
||||
<Filter>wingdk</Filter>
|
||||
</CopyFileToFolders>
|
||||
<CopyFileToFolders Include="wingdk\MicrosoftGame.config">
|
||||
|
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
Copyright (C) 1997-2023 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
@@ -383,7 +383,7 @@ main(int argc, char *argv[])
|
||||
|
||||
/* Initialize test framework */
|
||||
state = SDLTest_CommonCreateState(argv, SDL_INIT_VIDEO | SDL_INIT_AUDIO);
|
||||
if (state == NULL) {
|
||||
if (!state) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -446,7 +446,7 @@ main(int argc, char *argv[])
|
||||
/* Create the windows, initialize the renderers, and load the textures */
|
||||
sprites =
|
||||
(SDL_Texture **) SDL_malloc(state->num_windows * sizeof(*sprites));
|
||||
if (sprites == NULL) {
|
||||
if (!sprites) {
|
||||
SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Out of memory!\n");
|
||||
quit(2);
|
||||
}
|
||||
@@ -461,7 +461,7 @@ main(int argc, char *argv[])
|
||||
|
||||
soundname = GetResourceFilename(argc > 1 ? argv[1] : NULL, "sample.wav");
|
||||
|
||||
if (soundname == NULL) {
|
||||
if (!soundname) {
|
||||
SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "%s\n", SDL_GetError());
|
||||
quit(1);
|
||||
}
|
||||
|
@@ -139,7 +139,7 @@
|
||||
</ResourceCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<AdditionalDependencies>xgameruntime.lib;../Microsoft.Xbox.Services.141.GDK.C.Thunks.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>xgameruntime.lib;../Microsoft.Xbox.Services.GDK.C.Thunks.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
</Link>
|
||||
<PostBuildEvent>
|
||||
<Command>
|
||||
@@ -223,7 +223,7 @@
|
||||
<Link>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<AdditionalDependencies>xgameruntime.lib;../Microsoft.Xbox.Services.141.GDK.C.Thunks.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>xgameruntime.lib;../Microsoft.Xbox.Services.GDK.C.Thunks.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
</Link>
|
||||
<PostBuildEvent>
|
||||
<Command>
|
||||
@@ -352,7 +352,7 @@ copy "%(FullPath)" "$(OutDir)\"</Command>
|
||||
</CopyFileToFolders>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<CopyFileToFolders Include="$(Console_GRDKExtLibRoot)Xbox.Services.API.C\DesignTime\CommonConfiguration\Neutral\Lib\Release\Microsoft.Xbox.Services.141.GDK.C.Thunks.dll">
|
||||
<CopyFileToFolders Include="$(Console_GRDKExtLibRoot)Xbox.Services.API.C\DesignTime\CommonConfiguration\Neutral\Lib\Release\Microsoft.Xbox.Services.GDK.C.Thunks.dll">
|
||||
<FileType>Document</FileType>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Xbox.Scarlett.x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Xbox.XboxOne.x64'">true</ExcludedFromBuild>
|
||||
|
@@ -18,7 +18,7 @@
|
||||
<CopyFileToFolders Include="..\..\logos\Logo480x480.png">
|
||||
<Filter>logos</Filter>
|
||||
</CopyFileToFolders>
|
||||
<CopyFileToFolders Include="$(Console_GRDKExtLibRoot)Xbox.Services.API.C\DesignTime\CommonConfiguration\Neutral\Lib\Release\Microsoft.Xbox.Services.141.GDK.C.Thunks.dll">
|
||||
<CopyFileToFolders Include="$(Console_GRDKExtLibRoot)Xbox.Services.API.C\DesignTime\CommonConfiguration\Neutral\Lib\Release\Microsoft.Xbox.Services.GDK.C.Thunks.dll">
|
||||
<Filter>wingdk</Filter>
|
||||
</CopyFileToFolders>
|
||||
<CopyFileToFolders Include="wingdk\MicrosoftGame.config">
|
||||
|
@@ -139,7 +139,7 @@
|
||||
</ResourceCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<AdditionalDependencies>xgameruntime.lib;../Microsoft.Xbox.Services.141.GDK.C.Thunks.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>xgameruntime.lib;../Microsoft.Xbox.Services.GDK.C.Thunks.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
</Link>
|
||||
<PostBuildEvent>
|
||||
<Command>
|
||||
@@ -223,7 +223,7 @@
|
||||
<Link>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<AdditionalDependencies>xgameruntime.lib;../Microsoft.Xbox.Services.141.GDK.C.Thunks.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>xgameruntime.lib;../Microsoft.Xbox.Services.GDK.C.Thunks.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
</Link>
|
||||
<PostBuildEvent>
|
||||
<Command>
|
||||
@@ -352,7 +352,7 @@ copy "%(FullPath)" "$(OutDir)\"</Command>
|
||||
</CopyFileToFolders>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<CopyFileToFolders Include="$(Console_GRDKExtLibRoot)Xbox.Services.API.C\DesignTime\CommonConfiguration\Neutral\Lib\Release\Microsoft.Xbox.Services.141.GDK.C.Thunks.dll">
|
||||
<CopyFileToFolders Include="$(Console_GRDKExtLibRoot)Xbox.Services.API.C\DesignTime\CommonConfiguration\Neutral\Lib\Release\Microsoft.Xbox.Services.GDK.C.Thunks.dll">
|
||||
<FileType>Document</FileType>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Xbox.Scarlett.x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Xbox.XboxOne.x64'">true</ExcludedFromBuild>
|
||||
|
@@ -18,7 +18,7 @@
|
||||
<CopyFileToFolders Include="..\..\logos\Logo480x480.png">
|
||||
<Filter>logos</Filter>
|
||||
</CopyFileToFolders>
|
||||
<CopyFileToFolders Include="$(Console_GRDKExtLibRoot)Xbox.Services.API.C\DesignTime\CommonConfiguration\Neutral\Lib\Release\Microsoft.Xbox.Services.141.GDK.C.Thunks.dll">
|
||||
<CopyFileToFolders Include="$(Console_GRDKExtLibRoot)Xbox.Services.API.C\DesignTime\CommonConfiguration\Neutral\Lib\Release\Microsoft.Xbox.Services.GDK.C.Thunks.dll">
|
||||
<Filter>wingdk</Filter>
|
||||
</CopyFileToFolders>
|
||||
<CopyFileToFolders Include="xboxseries\MicrosoftGame.config">
|
||||
|
@@ -125,6 +125,7 @@
|
||||
<ClInclude Include="..\src\joystick\controller_type.h" />
|
||||
<ClInclude Include="..\src\joystick\SDL_gamecontrollerdb.h" />
|
||||
<ClInclude Include="..\src\joystick\SDL_joystick_c.h" />
|
||||
<ClInclude Include="..\src\joystick\SDL_steam_virtual_gamepad.h" />
|
||||
<ClInclude Include="..\src\joystick\SDL_sysjoystick.h" />
|
||||
<ClInclude Include="..\src\joystick\virtual\SDL_virtualjoystick_c.h" />
|
||||
<ClInclude Include="..\src\joystick\windows\SDL_dinputjoystick_c.h" />
|
||||
@@ -184,6 +185,14 @@
|
||||
<ClInclude Include="..\src\video\winrt\SDL_winrtopengles.h" />
|
||||
<ClInclude Include="..\src\video\winrt\SDL_winrtvideo_cpp.h" />
|
||||
<ClInclude Include="..\src\video\yuv2rgb\yuv_rgb.h" />
|
||||
<ClInclude Include="..\src\video\yuv2rgb\yuv_rgb_common.h" />
|
||||
<ClInclude Include="..\src\video\yuv2rgb\yuv_rgb_internal.h" />
|
||||
<ClInclude Include="..\src\video\yuv2rgb\yuv_rgb_lsx.h" />
|
||||
<ClInclude Include="..\src\video\yuv2rgb\yuv_rgb_lsx_func.h" />
|
||||
<ClInclude Include="..\src\video\yuv2rgb\yuv_rgb_sse.h" />
|
||||
<ClInclude Include="..\src\video\yuv2rgb\yuv_rgb_sse_func.h" />
|
||||
<ClInclude Include="..\src\video\yuv2rgb\yuv_rgb_std.h" />
|
||||
<ClInclude Include="..\src\video\yuv2rgb\yuv_rgb_std_func.h" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\src\atomic\SDL_atomic.c" />
|
||||
@@ -237,6 +246,7 @@
|
||||
<ClCompile Include="..\src\joystick\controller_type.c" />
|
||||
<ClCompile Include="..\src\joystick\SDL_gamecontroller.c" />
|
||||
<ClCompile Include="..\src\joystick\SDL_joystick.c" />
|
||||
<ClCompile Include="..\src\joystick\SDL_steam_virtual_gamepad.c" />
|
||||
<ClCompile Include="..\src\joystick\virtual\SDL_virtualjoystick.c" />
|
||||
<ClCompile Include="..\src\joystick\windows\SDL_dinputjoystick.c" />
|
||||
<ClCompile Include="..\src\joystick\windows\SDL_windowsjoystick.c" />
|
||||
@@ -344,7 +354,9 @@
|
||||
<ClCompile Include="..\src\video\winrt\SDL_winrtvideo.cpp">
|
||||
<CompileAsWinRT>true</CompileAsWinRT>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\video\yuv2rgb\yuv_rgb.c" />
|
||||
<ClCompile Include="..\src\video\yuv2rgb\yuv_rgb_lsx.c" />
|
||||
<ClCompile Include="..\src\video\yuv2rgb\yuv_rgb_sse.c" />
|
||||
<ClCompile Include="..\src\video\yuv2rgb\yuv_rgb_std.c" />
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{89e9b32e-a86a-47c3-a948-d2b1622925ce}</ProjectGuid>
|
||||
|
@@ -255,6 +255,9 @@
|
||||
<ClInclude Include="..\src\joystick\SDL_joystick_c.h">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\joystick\SDL_steam_virtual_gamepad.h">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\joystick\SDL_sysjoystick.h">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClInclude>
|
||||
@@ -558,6 +561,9 @@
|
||||
<ClCompile Include="..\src\joystick\SDL_joystick.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\joystick\SDL_steam_virtual_gamepad.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\joystick\virtual\SDL_virtualjoystick.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
@@ -846,4 +852,4 @@
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
</Project>
|
||||
|
@@ -44,22 +44,6 @@
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC70.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC70.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC70.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC70.props" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup>
|
||||
<_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion>
|
||||
@@ -336,6 +320,7 @@
|
||||
<ClInclude Include="..\..\src\joystick\hidapi\SDL_hidapi_rumble.h" />
|
||||
<ClInclude Include="..\..\src\joystick\SDL_gamecontrollerdb.h" />
|
||||
<ClInclude Include="..\..\src\joystick\SDL_joystick_c.h" />
|
||||
<ClInclude Include="..\..\src\joystick\SDL_steam_virtual_gamepad.h" />
|
||||
<ClInclude Include="..\..\src\joystick\SDL_sysjoystick.h" />
|
||||
<ClInclude Include="..\..\src\joystick\usb_ids.h" />
|
||||
<ClInclude Include="..\..\src\joystick\virtual\SDL_virtualjoystick_c.h" />
|
||||
@@ -393,7 +378,6 @@
|
||||
<ClInclude Include="..\..\src\video\khronos\vulkan\vk_platform.h" />
|
||||
<ClInclude Include="..\..\src\video\khronos\vulkan\vk_sdk_platform.h" />
|
||||
<ClInclude Include="..\..\src\video\khronos\vulkan\vulkan.h" />
|
||||
<ClInclude Include="..\..\src\video\khronos\vulkan\vulkan.hpp" />
|
||||
<ClInclude Include="..\..\src\video\khronos\vulkan\vulkan_android.h" />
|
||||
<ClInclude Include="..\..\src\video\khronos\vulkan\vulkan_beta.h" />
|
||||
<ClInclude Include="..\..\src\video\khronos\vulkan\vulkan_core.h" />
|
||||
@@ -438,7 +422,13 @@
|
||||
<ClInclude Include="..\..\src\video\windows\SDL_windowswindow.h" />
|
||||
<ClInclude Include="..\..\src\video\windows\wmmsg.h" />
|
||||
<ClInclude Include="..\..\src\video\yuv2rgb\yuv_rgb.h" />
|
||||
<ClInclude Include="..\..\src\video\yuv2rgb\yuv_rgb_common.h" />
|
||||
<ClInclude Include="..\..\src\video\yuv2rgb\yuv_rgb_internal.h" />
|
||||
<ClInclude Include="..\..\src\video\yuv2rgb\yuv_rgb_lsx.h" />
|
||||
<ClInclude Include="..\..\src\video\yuv2rgb\yuv_rgb_lsx_func.h" />
|
||||
<ClInclude Include="..\..\src\video\yuv2rgb\yuv_rgb_sse.h" />
|
||||
<ClInclude Include="..\..\src\video\yuv2rgb\yuv_rgb_sse_func.h" />
|
||||
<ClInclude Include="..\..\src\video\yuv2rgb\yuv_rgb_std.h" />
|
||||
<ClInclude Include="..\..\src\video\yuv2rgb\yuv_rgb_std_func.h" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
@@ -493,6 +483,7 @@
|
||||
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_shield.c" />
|
||||
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_stadia.c" />
|
||||
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_steam.c" />
|
||||
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_steamdeck.c" />
|
||||
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_switch.c" />
|
||||
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_wii.c" />
|
||||
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_xbox360.c" />
|
||||
@@ -500,6 +491,7 @@
|
||||
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_xboxone.c" />
|
||||
<ClCompile Include="..\..\src\joystick\SDL_gamecontroller.c" />
|
||||
<ClCompile Include="..\..\src\joystick\SDL_joystick.c" />
|
||||
<ClCompile Include="..\..\src\joystick\SDL_steam_virtual_gamepad.c" />
|
||||
<ClCompile Include="..\..\src\joystick\virtual\SDL_virtualjoystick.c" />
|
||||
<ClCompile Include="..\..\src\joystick\windows\SDL_dinputjoystick.c" />
|
||||
<ClCompile Include="..\..\src\joystick\windows\SDL_rawinputjoystick.c" />
|
||||
@@ -621,7 +613,9 @@
|
||||
<ClCompile Include="..\..\src\video\windows\SDL_windowsvideo.c" />
|
||||
<ClCompile Include="..\..\src\video\windows\SDL_windowsvulkan.c" />
|
||||
<ClCompile Include="..\..\src\video\windows\SDL_windowswindow.c" />
|
||||
<ClCompile Include="..\..\src\video\yuv2rgb\yuv_rgb.c" />
|
||||
<ClCompile Include="..\..\src\video\yuv2rgb\yuv_rgb_lsx.c" />
|
||||
<ClCompile Include="..\..\src\video\yuv2rgb\yuv_rgb_sse.c" />
|
||||
<ClCompile Include="..\..\src\video\yuv2rgb\yuv_rgb_std.c" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ResourceCompile Include="..\..\src\main\windows\version.rc" />
|
||||
|
@@ -501,6 +501,9 @@
|
||||
<ClInclude Include="..\..\src\joystick\SDL_joystick_c.h">
|
||||
<Filter>joystick</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\joystick\SDL_steam_virtual_gamepad.h">
|
||||
<Filter>joystick</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\joystick\SDL_sysjoystick.h">
|
||||
<Filter>joystick</Filter>
|
||||
</ClInclude>
|
||||
@@ -777,9 +780,6 @@
|
||||
<ClInclude Include="..\..\src\video\khronos\vulkan\vulkan.h">
|
||||
<Filter>video\khronos\vulkan</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\video\khronos\vulkan\vulkan.hpp">
|
||||
<Filter>video\khronos\vulkan</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\video\khronos\vulkan\vulkan_android.h">
|
||||
<Filter>video\khronos\vulkan</Filter>
|
||||
</ClInclude>
|
||||
@@ -934,6 +934,9 @@
|
||||
<ClCompile Include="..\..\src\joystick\SDL_joystick.c">
|
||||
<Filter>joystick</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\joystick\SDL_steam_virtual_gamepad.c">
|
||||
<Filter>joystick</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\libm\e_atan2.c">
|
||||
<Filter>libm</Filter>
|
||||
</ClCompile>
|
||||
@@ -1072,6 +1075,9 @@
|
||||
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_steam.c">
|
||||
<Filter>joystick\hidapi</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_steamdeck.c">
|
||||
<Filter>joystick\hidapi</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_switch.c">
|
||||
<Filter>joystick\hidapi</Filter>
|
||||
</ClCompile>
|
||||
|
@@ -1,7 +1,7 @@
|
||||
# SDL2 CMake configuration file:
|
||||
# This file is meant to be placed in a cmake subfolder of SDL2-devel-2.x.y-VC
|
||||
|
||||
cmake_minimum_required(VERSION 3.0)
|
||||
cmake_minimum_required(VERSION 3.0...3.28)
|
||||
|
||||
include(FeatureSummary)
|
||||
set_package_properties(SDL2 PROPERTIES
|
||||
@@ -79,6 +79,8 @@ endif()
|
||||
unset(_sdl2_library)
|
||||
unset(_sdl2_dll_library)
|
||||
|
||||
set(SDL2_SDL2-static_FOUND FALSE)
|
||||
|
||||
set(_sdl2main_library "${SDL2_LIBDIR}/SDL2main.lib")
|
||||
if(EXISTS "${_sdl2main_library}")
|
||||
if(NOT TARGET SDL2::SDL2main)
|
||||
@@ -92,7 +94,7 @@ if(EXISTS "${_sdl2main_library}")
|
||||
endif()
|
||||
set(SDL2_SDL2main_FOUND TRUE)
|
||||
else()
|
||||
set(SDL2_SDL2_FOUND FALSE)
|
||||
set(SDL2_SDL2main_FOUND FALSE)
|
||||
endif()
|
||||
unset(_sdl2main_library)
|
||||
|
||||
@@ -110,7 +112,7 @@ if(EXISTS "${_sdl2test_library}")
|
||||
endif()
|
||||
set(SDL2_SDL2test_FOUND TRUE)
|
||||
else()
|
||||
set(SDL2_SDL2_FOUND FALSE)
|
||||
set(SDL2_SDL2test_FOUND FALSE)
|
||||
endif()
|
||||
unset(_sdl2test_library)
|
||||
|
||||
|
@@ -188,6 +188,12 @@
|
||||
<CopyLocalSatelliteAssemblies>false</CopyLocalSatelliteAssemblies>
|
||||
<ReferenceOutputAssembly>true</ReferenceOutputAssembly>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\SDLtest\SDLtest.vcxproj">
|
||||
<Project>{da956fd3-e143-46f2-9fe5-c77bebc56b1a}</Project>
|
||||
<Private>false</Private>
|
||||
<CopyLocalSatelliteAssemblies>false</CopyLocalSatelliteAssemblies>
|
||||
<ReferenceOutputAssembly>true</ReferenceOutputAssembly>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\SDLmain\SDLmain.vcxproj">
|
||||
<Project>{da956fd3-e142-46f2-9dd5-c78bebb56b7a}</Project>
|
||||
<Private>false</Private>
|
||||
|
@@ -210,6 +210,7 @@
|
||||
<ClCompile Include="..\..\..\test\testautomation_hints.c" />
|
||||
<ClCompile Include="..\..\..\test\testautomation_joystick.c" />
|
||||
<ClCompile Include="..\..\..\test\testautomation_keyboard.c" />
|
||||
<ClCompile Include="..\..\..\test\testautomation_log.c" />
|
||||
<ClCompile Include="..\..\..\test\testautomation_main.c" />
|
||||
<ClCompile Include="..\..\..\test\testautomation_math.c" />
|
||||
<ClCompile Include="..\..\..\test\testautomation_mouse.c" />
|
||||
@@ -224,6 +225,7 @@
|
||||
<ClCompile Include="..\..\..\test\testautomation_syswm.c" />
|
||||
<ClCompile Include="..\..\..\test\testautomation_timer.c" />
|
||||
<ClCompile Include="..\..\..\test\testautomation_video.c" />
|
||||
<ClCompile Include="..\..\..\test\testautomation_subsystems.c" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\..\..\test\testautomation_suites.h" />
|
||||
@@ -231,4 +233,4 @@
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
||||
</Project>
|
@@ -216,6 +216,12 @@
|
||||
<CopyLocalSatelliteAssemblies>false</CopyLocalSatelliteAssemblies>
|
||||
<ReferenceOutputAssembly>true</ReferenceOutputAssembly>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\SDLtest\SDLtest.vcxproj">
|
||||
<Project>{da956fd3-e143-46f2-9fe5-c77bebc56b1a}</Project>
|
||||
<Private>false</Private>
|
||||
<CopyLocalSatelliteAssemblies>false</CopyLocalSatelliteAssemblies>
|
||||
<ReferenceOutputAssembly>true</ReferenceOutputAssembly>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\SDLmain\SDLmain.vcxproj">
|
||||
<Project>{da956fd3-e142-46f2-9dd5-c78bebb56b7a}</Project>
|
||||
<Private>false</Private>
|
||||
|
@@ -188,6 +188,12 @@
|
||||
<CopyLocalSatelliteAssemblies>false</CopyLocalSatelliteAssemblies>
|
||||
<ReferenceOutputAssembly>true</ReferenceOutputAssembly>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\SDLtest\SDLtest.vcxproj">
|
||||
<Project>{da956fd3-e143-46f2-9fe5-c77bebc56b1a}</Project>
|
||||
<Private>false</Private>
|
||||
<CopyLocalSatelliteAssemblies>false</CopyLocalSatelliteAssemblies>
|
||||
<ReferenceOutputAssembly>true</ReferenceOutputAssembly>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\SDLmain\SDLmain.vcxproj">
|
||||
<Project>{da956fd3-e142-46f2-9dd5-c78bebb56b7a}</Project>
|
||||
<Private>false</Private>
|
||||
|
@@ -194,6 +194,12 @@
|
||||
<CopyLocalSatelliteAssemblies>false</CopyLocalSatelliteAssemblies>
|
||||
<ReferenceOutputAssembly>true</ReferenceOutputAssembly>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\SDLtest\SDLtest.vcxproj">
|
||||
<Project>{da956fd3-e143-46f2-9fe5-c77bebc56b1a}</Project>
|
||||
<Private>false</Private>
|
||||
<CopyLocalSatelliteAssemblies>false</CopyLocalSatelliteAssemblies>
|
||||
<ReferenceOutputAssembly>true</ReferenceOutputAssembly>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\SDLmain\SDLmain.vcxproj">
|
||||
<Project>{da956fd3-e142-46f2-9dd5-c78bebb56b7a}</Project>
|
||||
<Private>false</Private>
|
||||
|
26
WhatsNew.txt
26
WhatsNew.txt
@@ -1,6 +1,32 @@
|
||||
|
||||
This is a list of major changes in SDL's version history.
|
||||
|
||||
---------------------------------------------------------------------------
|
||||
2.30.0:
|
||||
---------------------------------------------------------------------------
|
||||
|
||||
General:
|
||||
* Added support for 2 bits-per-pixel indexed surface formats
|
||||
* Added the function SDL_GameControllerGetSteamHandle() to get the Steam API handle for a controller, if available
|
||||
* Added the event SDL_CONTROLLERSTEAMHANDLEUPDATED which is sent when the Steam API handle for a controller changes. This could also change the name, VID, and PID of the controller.
|
||||
* Added the environment variable SDL_LOGGING to control default log output
|
||||
|
||||
macOS:
|
||||
* Added the hint SDL_HINT_JOYSTICK_IOKIT to control whether the IOKit controller driver should be used
|
||||
* Added the hint SDL_HINT_JOYSTICK_MFI to control whether the GCController controller driver should be used
|
||||
* Added the hint SDL_HINT_RENDER_METAL_PREFER_LOW_POWER_DEVICE to choose whether high or low power GPU should be used for rendering, in the case where there are multiple GPUs available
|
||||
|
||||
Xbox:
|
||||
* Added the function SDL_GDKGetDefaultUser()
|
||||
|
||||
---------------------------------------------------------------------------
|
||||
2.28.2:
|
||||
---------------------------------------------------------------------------
|
||||
|
||||
General:
|
||||
* Added the hint SDL_HINT_JOYSTICK_WGI to control whether to use Windows.Gaming.Input for controllers
|
||||
|
||||
|
||||
---------------------------------------------------------------------------
|
||||
2.28.0:
|
||||
---------------------------------------------------------------------------
|
||||
|
@@ -118,7 +118,7 @@ initializeTextures(SDL_Renderer *renderer)
|
||||
|
||||
/* load the ship */
|
||||
bmp_surface = SDL_LoadBMP("ship.bmp");
|
||||
if (bmp_surface == NULL) {
|
||||
if (!bmp_surface) {
|
||||
fatalError("could not ship.bmp");
|
||||
}
|
||||
/* set blue to transparent on the ship */
|
||||
@@ -127,7 +127,7 @@ initializeTextures(SDL_Renderer *renderer)
|
||||
|
||||
/* create ship texture from surface */
|
||||
ship = SDL_CreateTextureFromSurface(renderer, bmp_surface);
|
||||
if (ship == NULL) {
|
||||
if (!ship) {
|
||||
fatalError("could not create ship texture");
|
||||
}
|
||||
SDL_SetTextureBlendMode(ship, SDL_BLENDMODE_BLEND);
|
||||
@@ -140,12 +140,12 @@ initializeTextures(SDL_Renderer *renderer)
|
||||
|
||||
/* load the space background */
|
||||
bmp_surface = SDL_LoadBMP("space.bmp");
|
||||
if (bmp_surface == NULL) {
|
||||
if (!bmp_surface) {
|
||||
fatalError("could not load space.bmp");
|
||||
}
|
||||
/* create space texture from surface */
|
||||
space = SDL_CreateTextureFromSurface(renderer, bmp_surface);
|
||||
if (space == NULL) {
|
||||
if (!space) {
|
||||
fatalError("could not create space texture");
|
||||
}
|
||||
SDL_FreeSurface(bmp_surface);
|
||||
@@ -179,7 +179,7 @@ main(int argc, char *argv[])
|
||||
printf("There are %d joysticks available\n", SDL_NumJoysticks());
|
||||
printf("Default joystick (index 0) is %s\n", SDL_JoystickName(0));
|
||||
accelerometer = SDL_JoystickOpen(0);
|
||||
if (accelerometer == NULL) {
|
||||
if (!accelerometer) {
|
||||
fatalError("Could not open joystick (accelerometer)");
|
||||
}
|
||||
printf("joystick number of axis = %d\n",
|
||||
|
@@ -52,9 +52,9 @@ void spawnTrailFromEmitter(struct particle *emitter);
|
||||
void spawnEmitterParticle(GLfloat x, GLfloat y);
|
||||
void explodeEmitter(struct particle *emitter);
|
||||
void initializeParticles(void);
|
||||
void initializeTexture();
|
||||
void initializeTexture(void);
|
||||
int nextPowerOfTwo(int x);
|
||||
void drawParticles();
|
||||
void drawParticles(void);
|
||||
void stepParticles(double deltaTime);
|
||||
|
||||
/* helper function (used in texture loading)
|
||||
@@ -159,7 +159,7 @@ stepParticles(double deltaTime)
|
||||
This draws all the particles shown on screen
|
||||
*/
|
||||
void
|
||||
drawParticles()
|
||||
drawParticles(void)
|
||||
{
|
||||
|
||||
/* draw the background */
|
||||
@@ -324,7 +324,7 @@ initializeParticles(void)
|
||||
loads the particle texture
|
||||
*/
|
||||
void
|
||||
initializeTexture()
|
||||
initializeTexture(void)
|
||||
{
|
||||
|
||||
int bpp; /* texture bits per pixel */
|
||||
@@ -334,7 +334,7 @@ initializeTexture()
|
||||
to format passed into OpenGL */
|
||||
|
||||
bmp_surface = SDL_LoadBMP("stroke.bmp");
|
||||
if (bmp_surface == NULL) {
|
||||
if (!bmp_surface) {
|
||||
fatalError("could not load stroke.bmp");
|
||||
}
|
||||
|
||||
|
@@ -108,7 +108,7 @@ initializeTexture(SDL_Renderer *renderer)
|
||||
SDL_Surface *bmp_surface;
|
||||
/* load the bmp */
|
||||
bmp_surface = SDL_LoadBMP("icon.bmp");
|
||||
if (bmp_surface == NULL) {
|
||||
if (!bmp_surface) {
|
||||
fatalError("could not load bmp");
|
||||
}
|
||||
/* set white to transparent on the happyface */
|
||||
@@ -117,7 +117,7 @@ initializeTexture(SDL_Renderer *renderer)
|
||||
|
||||
/* convert RGBA surface to texture */
|
||||
texture = SDL_CreateTextureFromSurface(renderer, bmp_surface);
|
||||
if (texture == NULL) {
|
||||
if (!texture) {
|
||||
fatalError("could not create texture");
|
||||
}
|
||||
SDL_SetTextureBlendMode(texture, SDL_BLENDMODE_BLEND);
|
||||
|
@@ -165,7 +165,7 @@ loadFont(void)
|
||||
{
|
||||
SDL_Surface *surface = SDL_LoadBMP("kromasky_16x16.bmp");
|
||||
|
||||
if (surface == NULL) {
|
||||
if (!surface) {
|
||||
printf("Error loading bitmap: %s\n", SDL_GetError());
|
||||
return 0;
|
||||
} else {
|
||||
@@ -183,7 +183,7 @@ loadFont(void)
|
||||
SDL_BlitSurface(surface, NULL, converted, NULL);
|
||||
/* create our texture */
|
||||
texture = SDL_CreateTextureFromSurface(renderer, converted);
|
||||
if (texture == NULL) {
|
||||
if (!texture) {
|
||||
printf("texture creation failed: %s\n", SDL_GetError());
|
||||
} else {
|
||||
/* set blend mode for our texture */
|
||||
@@ -196,7 +196,7 @@ loadFont(void)
|
||||
}
|
||||
|
||||
void
|
||||
draw()
|
||||
draw(void)
|
||||
{
|
||||
SDL_SetRenderDrawColor(renderer, bg_color.r, bg_color.g, bg_color.b, bg_color.a);
|
||||
SDL_RenderClear(renderer);
|
||||
|
@@ -58,11 +58,11 @@ main(int argc, char *argv[])
|
||||
|
||||
/* create window and renderer */
|
||||
window = SDL_CreateWindow(NULL, 0, 0, 320, 480, SDL_WINDOW_ALLOW_HIGHDPI);
|
||||
if (window == NULL) {
|
||||
if (!window) {
|
||||
fatalError("Could not initialize Window");
|
||||
}
|
||||
renderer = SDL_CreateRenderer(window, -1, 0);
|
||||
if (renderer == NULL) {
|
||||
if (!renderer) {
|
||||
fatalError("Could not create renderer");
|
||||
}
|
||||
|
||||
|
@@ -57,13 +57,13 @@ initializeTexture(SDL_Renderer *renderer)
|
||||
{
|
||||
SDL_Surface *bmp_surface;
|
||||
bmp_surface = SDL_LoadBMP("stroke.bmp");
|
||||
if (bmp_surface == NULL) {
|
||||
if (!bmp_surface) {
|
||||
fatalError("could not load stroke.bmp");
|
||||
}
|
||||
brush =
|
||||
SDL_CreateTextureFromSurface(renderer, bmp_surface);
|
||||
SDL_FreeSurface(bmp_surface);
|
||||
if (brush == NULL) {
|
||||
if (!brush) {
|
||||
fatalError("could not create brush texture");
|
||||
}
|
||||
/* additive blending -- laying strokes on top of eachother makes them brighter */
|
||||
|
@@ -19,10 +19,10 @@
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>FMWK</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>2.28.0</string>
|
||||
<string>2.32.8</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>SDLX</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>2.28.0</string>
|
||||
<string>2.32.8</string>
|
||||
</dict>
|
||||
</plist>
|
||||
|
File diff suppressed because it is too large
Load Diff
@@ -1,4 +1,4 @@
|
||||
Title SDL 2.28.0
|
||||
Title SDL 2.32.8
|
||||
Version 1
|
||||
Description SDL Library for Mac OS X (http://www.libsdl.org)
|
||||
DefaultLocation /Library/Frameworks
|
||||
|
@@ -31,8 +31,15 @@ endmacro()
|
||||
|
||||
set(SDL2_FOUND TRUE)
|
||||
|
||||
string(REGEX REPLACE "SDL2\\.framework.*" "SDL2.framework" SDL2_FRAMEWORK_PATH "${CMAKE_CURRENT_LIST_DIR}")
|
||||
string(REGEX REPLACE "SDL2\\.framework.*" "" SDL2_FRAMEWORK_PARENT_PATH "${CMAKE_CURRENT_LIST_DIR}")
|
||||
# Compute the installation prefix relative to this file.
|
||||
set(SDL2_FRAMEWORK_PATH "${CMAKE_CURRENT_LIST_DIR}") # > /SDL2.framework/Resources/CMake/
|
||||
get_filename_component(SDL2_FRAMEWORK_PATH "${SDL2_FRAMEWORK_PATH}" REALPATH) # > /SDL2.framework/Versions/Current/Resources/CMake
|
||||
get_filename_component(SDL2_FRAMEWORK_PATH "${SDL2_FRAMEWORK_PATH}" REALPATH) # > /SDL2.framework/Versions/A/Resources/CMake/
|
||||
get_filename_component(SDL2_FRAMEWORK_PATH "${SDL2_FRAMEWORK_PATH}" PATH) # > /SDL2.framework/Versions/A/Resources/
|
||||
get_filename_component(SDL2_FRAMEWORK_PATH "${SDL2_FRAMEWORK_PATH}" PATH) # > /SDL2.framework/Versions/A/
|
||||
get_filename_component(SDL2_FRAMEWORK_PATH "${SDL2_FRAMEWORK_PATH}" PATH) # > /SDL2.framework/Versions/
|
||||
get_filename_component(SDL2_FRAMEWORK_PATH "${SDL2_FRAMEWORK_PATH}" PATH) # > /SDL2.framework/
|
||||
get_filename_component(SDL2_FRAMEWORK_PARENT_PATH "${SDL2_FRAMEWORK_PATH}" PATH) # > /
|
||||
|
||||
# For compatibility with autotools sdl2-config.cmake, provide SDL2_* variables.
|
||||
|
||||
@@ -49,12 +56,12 @@ set(SDL2_LIBRARIES "SDL2::SDL2")
|
||||
# This is done for compatibility with CMake generated SDL2-target.cmake files.
|
||||
|
||||
if(NOT TARGET SDL2::SDL2)
|
||||
add_library(SDL2::SDL2 INTERFACE IMPORTED)
|
||||
add_library(SDL2::SDL2 SHARED IMPORTED)
|
||||
set_target_properties(SDL2::SDL2
|
||||
PROPERTIES
|
||||
INTERFACE_COMPILE_OPTIONS "SHELL:-F \"${SDL2_FRAMEWORK_PARENT_PATH}\""
|
||||
FRAMEWORK "TRUE"
|
||||
IMPORTED_LOCATION "${SDL2_FRAMEWORK_PATH}/Versions/A/SDL2"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${SDL2_INCLUDE_DIRS}"
|
||||
INTERFACE_LINK_OPTIONS "SHELL:-F \"${SDL2_FRAMEWORK_PARENT_PATH}\";SHELL:-framework SDL2"
|
||||
COMPATIBLE_INTERFACE_BOOL "SDL2_SHARED"
|
||||
INTERFACE_SDL2_SHARED "ON"
|
||||
COMPATIBLE_INTERFACE_STRING "SDL_VERSION"
|
||||
|
@@ -1,6 +1,6 @@
|
||||
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2023 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
|
File diff suppressed because it is too large
Load Diff
163
acinclude/libtool.m4
vendored
163
acinclude/libtool.m4
vendored
@@ -219,8 +219,8 @@ esac
|
||||
ofile=libtool
|
||||
can_build_shared=yes
|
||||
|
||||
# All known linkers require a '.a' archive for static linking (except MSVC,
|
||||
# which needs '.lib').
|
||||
# All known linkers require a '.a' archive for static linking (except MSVC and
|
||||
# ICC, which need '.lib').
|
||||
libext=a
|
||||
|
||||
with_gnu_ld=$lt_cv_prog_gnu_ld
|
||||
@@ -1023,6 +1023,21 @@ m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
|
||||
rm -f conftest.*
|
||||
fi])
|
||||
|
||||
# Feature test to disable chained fixups since it is not
|
||||
# compatible with '-undefined dynamic_lookup'
|
||||
AC_CACHE_CHECK([for -no_fixup_chains linker flag],
|
||||
[lt_cv_support_no_fixup_chains],
|
||||
[ save_LDFLAGS=$LDFLAGS
|
||||
LDFLAGS="$LDFLAGS -Wl,-no_fixup_chains"
|
||||
AC_LINK_IFELSE(
|
||||
[AC_LANG_PROGRAM([],[])],
|
||||
lt_cv_support_no_fixup_chains=yes,
|
||||
lt_cv_support_no_fixup_chains=no
|
||||
)
|
||||
LDFLAGS=$save_LDFLAGS
|
||||
]
|
||||
)
|
||||
|
||||
AC_CACHE_CHECK([for -exported_symbols_list linker flag],
|
||||
[lt_cv_ld_exported_symbols_list],
|
||||
[lt_cv_ld_exported_symbols_list=no
|
||||
@@ -1047,7 +1062,7 @@ _LT_EOF
|
||||
echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD
|
||||
$RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD
|
||||
cat > conftest.c << _LT_EOF
|
||||
int main() { return 0;}
|
||||
int main(void) { return 0;}
|
||||
_LT_EOF
|
||||
echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD
|
||||
$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
|
||||
@@ -1072,7 +1087,12 @@ _LT_EOF
|
||||
10.[[012]],*|,*powerpc*-darwin[[5-8]]*)
|
||||
_lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
|
||||
*)
|
||||
_lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
|
||||
if test yes = "$lt_cv_support_no_fixup_chains"; then
|
||||
_lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup $wl-no_fixup_chains'
|
||||
else
|
||||
_lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup'
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
@@ -1365,7 +1385,7 @@ mips64*-*linux*)
|
||||
;;
|
||||
|
||||
x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \
|
||||
s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
|
||||
s390*-*linux*|s390*-*tpf*|sparc*-*linux*|x86_64-gnu*)
|
||||
# Find out what ABI is being produced by ac_compile, and set linker
|
||||
# options accordingly. Note that the listed cases only cover the
|
||||
# situations where additional linker options are needed (such as when
|
||||
@@ -1380,7 +1400,7 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
|
||||
x86_64-*kfreebsd*-gnu)
|
||||
LD="${LD-ld} -m elf_i386_fbsd"
|
||||
;;
|
||||
x86_64-*linux*)
|
||||
x86_64-*linux*|x86_64-gnu*)
|
||||
case `/usr/bin/file conftest.o` in
|
||||
*x86-64*)
|
||||
LD="${LD-ld} -m elf32_x86_64"
|
||||
@@ -1409,7 +1429,7 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
|
||||
x86_64-*kfreebsd*-gnu)
|
||||
LD="${LD-ld} -m elf_x86_64_fbsd"
|
||||
;;
|
||||
x86_64-*linux*)
|
||||
x86_64-*linux*|x86_64-gnu*)
|
||||
LD="${LD-ld} -m elf_x86_64"
|
||||
;;
|
||||
powerpcle-*linux*|powerpc64le-*linux*)
|
||||
@@ -1540,15 +1560,8 @@ old_postinstall_cmds='chmod 644 $oldlib'
|
||||
old_postuninstall_cmds=
|
||||
|
||||
if test -n "$RANLIB"; then
|
||||
case $host_os in
|
||||
bitrig* | openbsd*)
|
||||
old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib"
|
||||
;;
|
||||
*)
|
||||
old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib"
|
||||
;;
|
||||
esac
|
||||
old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib"
|
||||
old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib"
|
||||
fi
|
||||
|
||||
case $host_os in
|
||||
@@ -1687,7 +1700,7 @@ AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
|
||||
lt_cv_sys_max_cmd_len=-1;
|
||||
;;
|
||||
|
||||
cygwin* | mingw* | cegcc*)
|
||||
cygwin* | mingw* | windows* | cegcc*)
|
||||
# On Win9x/ME, this test blows up -- it succeeds, but takes
|
||||
# about 5 minutes as the teststring grows exponentially.
|
||||
# Worse, since 9x/ME are not pre-emptively multitasking,
|
||||
@@ -1869,11 +1882,11 @@ else
|
||||
/* When -fvisibility=hidden is used, assume the code has been annotated
|
||||
correspondingly for the symbols needed. */
|
||||
#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
|
||||
int fnord () __attribute__((visibility("default")));
|
||||
int fnord (void) __attribute__((visibility("default")));
|
||||
#endif
|
||||
|
||||
int fnord () { return 42; }
|
||||
int main ()
|
||||
int fnord (void) { return 42; }
|
||||
int main (void)
|
||||
{
|
||||
void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
|
||||
int status = $lt_dlunknown;
|
||||
@@ -1930,7 +1943,7 @@ else
|
||||
lt_cv_dlopen_self=yes
|
||||
;;
|
||||
|
||||
mingw* | pw32* | cegcc*)
|
||||
mingw* | windows* | pw32* | cegcc*)
|
||||
lt_cv_dlopen=LoadLibrary
|
||||
lt_cv_dlopen_libs=
|
||||
;;
|
||||
@@ -2298,7 +2311,7 @@ if test yes = "$GCC"; then
|
||||
*) lt_awk_arg='/^libraries:/' ;;
|
||||
esac
|
||||
case $host_os in
|
||||
mingw* | cegcc*) lt_sed_strip_eq='s|=\([[A-Za-z]]:\)|\1|g' ;;
|
||||
mingw* | windows* | cegcc*) lt_sed_strip_eq='s|=\([[A-Za-z]]:\)|\1|g' ;;
|
||||
*) lt_sed_strip_eq='s|=/|/|g' ;;
|
||||
esac
|
||||
lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
|
||||
@@ -2356,7 +2369,7 @@ BEGIN {RS = " "; FS = "/|\n";} {
|
||||
# AWK program above erroneously prepends '/' to C:/dos/paths
|
||||
# for these hosts.
|
||||
case $host_os in
|
||||
mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
|
||||
mingw* | windows* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
|
||||
$SED 's|/\([[A-Za-z]]:\)|\1|g'` ;;
|
||||
esac
|
||||
sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
|
||||
@@ -2525,7 +2538,7 @@ bsdi[[45]]*)
|
||||
# libtool to hard-code these into programs
|
||||
;;
|
||||
|
||||
cygwin* | mingw* | pw32* | cegcc*)
|
||||
cygwin* | mingw* | windows* | pw32* | cegcc*)
|
||||
version_type=windows
|
||||
shrext_cmds=.dll
|
||||
need_version=no
|
||||
@@ -2554,14 +2567,14 @@ cygwin* | mingw* | pw32* | cegcc*)
|
||||
cygwin*)
|
||||
# Cygwin DLLs use 'cyg' prefix rather than 'lib'
|
||||
#soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
|
||||
soname_spec='`echo $libname | sed -e 's/^lib//'`$shared_ext' # SDL customization
|
||||
soname_spec='`echo $libname | sed -e 's/^lib//'`$shared_ext' # SDL customization.
|
||||
m4_if([$1], [],[
|
||||
sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"])
|
||||
;;
|
||||
mingw* | cegcc*)
|
||||
mingw* | windows* | cegcc*)
|
||||
# MinGW DLLs use traditional 'lib' prefix
|
||||
#soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
|
||||
soname_spec='`echo $libname | $SED -e 's/^lib//'`$shared_ext' # SDL customization
|
||||
soname_spec='`echo $libname | $SED -e 's/^lib//'`$shared_ext' # SDL customization.
|
||||
;;
|
||||
pw32*)
|
||||
# pw32 DLLs use 'pw' prefix rather than 'lib'
|
||||
@@ -2571,14 +2584,14 @@ m4_if([$1], [],[
|
||||
dynamic_linker='Win32 ld.exe'
|
||||
;;
|
||||
|
||||
*,cl*)
|
||||
# Native MSVC
|
||||
*,cl* | *,icl*)
|
||||
# Native MSVC or ICC
|
||||
libname_spec='$name'
|
||||
soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
|
||||
library_names_spec='$libname.dll.lib'
|
||||
|
||||
case $build_os in
|
||||
mingw*)
|
||||
mingw* | windows*)
|
||||
sys_lib_search_path_spec=
|
||||
lt_save_ifs=$IFS
|
||||
IFS=';'
|
||||
@@ -2628,7 +2641,7 @@ m4_if([$1], [],[
|
||||
;;
|
||||
|
||||
*)
|
||||
# Assume MSVC wrapper
|
||||
# Assume MSVC and ICC wrapper
|
||||
library_names_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext $libname.lib'
|
||||
dynamic_linker='Win32 ld.exe'
|
||||
;;
|
||||
@@ -3267,7 +3280,7 @@ if test yes = "$GCC"; then
|
||||
# Check if gcc -print-prog-name=ld gives a path.
|
||||
AC_MSG_CHECKING([for ld used by $CC])
|
||||
case $host in
|
||||
*-*-mingw*)
|
||||
*-*-mingw* | *-*-windows*)
|
||||
# gcc leaves a trailing carriage return, which upsets mingw
|
||||
ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
|
||||
*)
|
||||
@@ -3376,7 +3389,7 @@ case $reload_flag in
|
||||
esac
|
||||
reload_cmds='$LD$reload_flag -o $output$reload_objs'
|
||||
case $host_os in
|
||||
cygwin* | mingw* | pw32* | cegcc*)
|
||||
cygwin* | mingw* | windows* | pw32* | cegcc*)
|
||||
if test yes != "$GCC"; then
|
||||
reload_cmds=false
|
||||
fi
|
||||
@@ -3473,10 +3486,10 @@ cygwin*)
|
||||
# func_win32_libid is a shell function defined in ltmain.sh
|
||||
lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
|
||||
lt_cv_file_magic_cmd='func_win32_libid'
|
||||
lt_cv_deplibs_check_method=pass_all # SDL customization
|
||||
lt_cv_deplibs_check_method=pass_all # SDL customization.
|
||||
;;
|
||||
|
||||
mingw* | pw32*)
|
||||
mingw* | windows* | pw32*)
|
||||
# Base MSYS/MinGW do not provide the 'file' command needed by
|
||||
# func_win32_libid shell function, so use a weaker test based on 'objdump',
|
||||
# unless we find 'file', for example because we are cross-compiling.
|
||||
@@ -3485,10 +3498,10 @@ mingw* | pw32*)
|
||||
lt_cv_file_magic_cmd='func_win32_libid'
|
||||
else
|
||||
# Keep this pattern in sync with the one in func_win32_libid.
|
||||
lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)'
|
||||
lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64|pe-aarch64)'
|
||||
lt_cv_file_magic_cmd='$OBJDUMP -f'
|
||||
fi
|
||||
lt_cv_deplibs_check_method=pass_all # SDL customization
|
||||
lt_cv_deplibs_check_method=pass_all # SDL customization.
|
||||
;;
|
||||
|
||||
cegcc*)
|
||||
@@ -3641,7 +3654,7 @@ file_magic_glob=
|
||||
want_nocaseglob=no
|
||||
if test "$build" = "$host"; then
|
||||
case $host_os in
|
||||
mingw* | pw32*)
|
||||
mingw* | windows* | pw32*)
|
||||
if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then
|
||||
want_nocaseglob=yes
|
||||
else
|
||||
@@ -3693,7 +3706,7 @@ else
|
||||
# Tru64's nm complains that /dev/null is an invalid object file
|
||||
# MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty
|
||||
case $build_os in
|
||||
mingw*) lt_bad_file=conftest.nm/nofile ;;
|
||||
mingw* | windows*) lt_bad_file=conftest.nm/nofile ;;
|
||||
*) lt_bad_file=/dev/null ;;
|
||||
esac
|
||||
case `"$tmp_nm" -B $lt_bad_file 2>&1 | sed '1q'` in
|
||||
@@ -3784,7 +3797,7 @@ lt_cv_sharedlib_from_linklib_cmd,
|
||||
[lt_cv_sharedlib_from_linklib_cmd='unknown'
|
||||
|
||||
case $host_os in
|
||||
cygwin* | mingw* | pw32* | cegcc*)
|
||||
cygwin* | mingw* | windows* | pw32* | cegcc*)
|
||||
# two different shell functions defined in ltmain.sh;
|
||||
# decide which one to use based on capabilities of $DLLTOOL
|
||||
case `$DLLTOOL --help 2>&1` in
|
||||
@@ -3929,7 +3942,7 @@ case $host_os in
|
||||
aix*)
|
||||
symcode='[[BCDT]]'
|
||||
;;
|
||||
cygwin* | mingw* | pw32* | cegcc*)
|
||||
cygwin* | mingw* | windows* | pw32* | cegcc*)
|
||||
symcode='[[ABCDGISTW]]'
|
||||
;;
|
||||
hpux*)
|
||||
@@ -4008,7 +4021,7 @@ $lt_c_name_lib_hook\
|
||||
# Handle CRLF in mingw tool chain
|
||||
opt_cr=
|
||||
case $build_os in
|
||||
mingw*)
|
||||
mingw* | windows*)
|
||||
opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
|
||||
;;
|
||||
esac
|
||||
@@ -4023,7 +4036,7 @@ for ac_symprfx in "" "_"; do
|
||||
if test "$lt_cv_nm_interface" = "MS dumpbin"; then
|
||||
# Fake it for dumpbin and say T for any non-static function,
|
||||
# D for any global variable and I for any imported variable.
|
||||
# Also find C++ and __fastcall symbols from MSVC++,
|
||||
# Also find C++ and __fastcall symbols from MSVC++ or ICC,
|
||||
# which start with @ or ?.
|
||||
lt_cv_sys_global_symbol_pipe="$AWK ['"\
|
||||
" {last_section=section; section=\$ 3};"\
|
||||
@@ -4059,7 +4072,7 @@ void nm_test_func(void){}
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
int main(){nm_test_var='a';nm_test_func();return(0);}
|
||||
int main(void){nm_test_var='a';nm_test_func();return(0);}
|
||||
_LT_EOF
|
||||
|
||||
if AC_TRY_EVAL(ac_compile); then
|
||||
@@ -4235,7 +4248,7 @@ m4_if([$1], [CXX], [
|
||||
beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
|
||||
# PIC is the default for these OSes.
|
||||
;;
|
||||
mingw* | cygwin* | os2* | pw32* | cegcc*)
|
||||
mingw* | windows* | cygwin* | os2* | pw32* | cegcc*)
|
||||
# This hack is so that the source file can tell whether it is being
|
||||
# built for inclusion in a dll (and should export symbols for example).
|
||||
# Although the cygwin gcc ignores -fPIC, still need this for old-style
|
||||
@@ -4311,7 +4324,7 @@ m4_if([$1], [CXX], [
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
mingw* | cygwin* | os2* | pw32* | cegcc*)
|
||||
mingw* | windows* | cygwin* | os2* | pw32* | cegcc*)
|
||||
# This hack is so that the source file can tell whether it is being
|
||||
# built for inclusion in a dll (and should export symbols for example).
|
||||
m4_if([$1], [GCJ], [],
|
||||
@@ -4559,7 +4572,7 @@ m4_if([$1], [CXX], [
|
||||
# PIC is the default for these OSes.
|
||||
;;
|
||||
|
||||
mingw* | cygwin* | pw32* | os2* | cegcc*)
|
||||
mingw* | windows* | cygwin* | pw32* | os2* | cegcc*)
|
||||
# This hack is so that the source file can tell whether it is being
|
||||
# built for inclusion in a dll (and should export symbols for example).
|
||||
# Although the cygwin gcc ignores -fPIC, still need this for old-style
|
||||
@@ -4663,7 +4676,7 @@ m4_if([$1], [CXX], [
|
||||
esac
|
||||
;;
|
||||
|
||||
mingw* | cygwin* | pw32* | os2* | cegcc*)
|
||||
mingw* | windows* | cygwin* | pw32* | os2* | cegcc*)
|
||||
# This hack is so that the source file can tell whether it is being
|
||||
# built for inclusion in a dll (and should export symbols for example).
|
||||
m4_if([$1], [GCJ], [],
|
||||
@@ -4938,9 +4951,9 @@ m4_if([$1], [CXX], [
|
||||
pw32*)
|
||||
_LT_TAGVAR(export_symbols_cmds, $1)=$ltdll_cmds
|
||||
;;
|
||||
cygwin* | mingw* | cegcc*)
|
||||
cygwin* | mingw* | windows* | cegcc*)
|
||||
case $cc_basename in
|
||||
cl*)
|
||||
cl* | icl*)
|
||||
_LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
|
||||
;;
|
||||
*)
|
||||
@@ -4996,16 +5009,16 @@ dnl Note also adjust exclude_expsyms for C++ above.
|
||||
extract_expsyms_cmds=
|
||||
|
||||
case $host_os in
|
||||
cygwin* | mingw* | pw32* | cegcc*)
|
||||
# FIXME: the MSVC++ port hasn't been tested in a loooong time
|
||||
cygwin* | mingw* | windows* | pw32* | cegcc*)
|
||||
# FIXME: the MSVC++ and ICC port hasn't been tested in a loooong time
|
||||
# When not using gcc, we currently assume that we are using
|
||||
# Microsoft Visual C++.
|
||||
# Microsoft Visual C++ or Intel C++ Compiler.
|
||||
if test yes != "$GCC"; then
|
||||
with_gnu_ld=no
|
||||
fi
|
||||
;;
|
||||
interix*)
|
||||
# we just hope/assume this is gcc and not c89 (= MSVC++)
|
||||
# we just hope/assume this is gcc and not c89 (= MSVC++ or ICC)
|
||||
with_gnu_ld=yes
|
||||
;;
|
||||
openbsd* | bitrig*)
|
||||
@@ -5111,7 +5124,7 @@ _LT_EOF
|
||||
fi
|
||||
;;
|
||||
|
||||
cygwin* | mingw* | pw32* | cegcc*)
|
||||
cygwin* | mingw* | windows* | pw32* | cegcc*)
|
||||
# _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
|
||||
# as there is no search path for DLLs.
|
||||
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
|
||||
@@ -5568,14 +5581,14 @@ _LT_EOF
|
||||
_LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
|
||||
;;
|
||||
|
||||
cygwin* | mingw* | pw32* | cegcc*)
|
||||
cygwin* | mingw* | windows* | pw32* | cegcc*)
|
||||
# When not using gcc, we currently assume that we are using
|
||||
# Microsoft Visual C++.
|
||||
# Microsoft Visual C++ or Intel C++ Compiler.
|
||||
# hardcode_libdir_flag_spec is actually meaningless, as there is
|
||||
# no search path for DLLs.
|
||||
case $cc_basename in
|
||||
cl*)
|
||||
# Native MSVC
|
||||
cl* | icl*)
|
||||
# Native MSVC or ICC
|
||||
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
|
||||
_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
|
||||
_LT_TAGVAR(always_export_symbols, $1)=yes
|
||||
@@ -5585,14 +5598,14 @@ _LT_EOF
|
||||
# Tell ltmain to make .dll files, not .so files.
|
||||
shrext_cmds=.dll
|
||||
# FIXME: Setting linknames here is a bad hack.
|
||||
_LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames='
|
||||
_LT_TAGVAR(archive_cmds, $1)='$CC -Fe $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames='
|
||||
_LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
|
||||
cp "$export_symbols" "$output_objdir/$soname.def";
|
||||
echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp";
|
||||
else
|
||||
$SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp;
|
||||
fi~
|
||||
$CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
|
||||
$CC -Fe $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
|
||||
linknames='
|
||||
# The linker will not automatically build a static lib if we build a DLL.
|
||||
# _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
|
||||
@@ -5616,7 +5629,7 @@ _LT_EOF
|
||||
fi'
|
||||
;;
|
||||
*)
|
||||
# Assume MSVC wrapper
|
||||
# Assume MSVC and ICC wrapper
|
||||
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
|
||||
_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
|
||||
# Tell ltmain to make .lib files, not .a files.
|
||||
@@ -6225,7 +6238,7 @@ _LT_TAGVAR(objext, $1)=$objext
|
||||
lt_simple_compile_test_code="int some_variable = 0;"
|
||||
|
||||
# Code to be used in simple link tests
|
||||
lt_simple_link_test_code='int main(){return(0);}'
|
||||
lt_simple_link_test_code='int main(void){return(0);}'
|
||||
|
||||
_LT_TAG_COMPILER
|
||||
# Save the default compiler, since it gets overwritten when the other
|
||||
@@ -6435,7 +6448,7 @@ if test yes != "$_lt_caught_CXX_error"; then
|
||||
# Commands to make compiler produce verbose output that lists
|
||||
# what "hidden" libraries, object files and flags are used when
|
||||
# linking a shared library.
|
||||
output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
|
||||
output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "[[-]]L"'
|
||||
|
||||
else
|
||||
GXX=no
|
||||
@@ -6644,10 +6657,10 @@ if test yes != "$_lt_caught_CXX_error"; then
|
||||
esac
|
||||
;;
|
||||
|
||||
cygwin* | mingw* | pw32* | cegcc*)
|
||||
cygwin* | mingw* | windows* | pw32* | cegcc*)
|
||||
case $GXX,$cc_basename in
|
||||
,cl* | no,cl*)
|
||||
# Native MSVC
|
||||
,cl* | no,cl* | ,icl* | no,icl*)
|
||||
# Native MSVC or ICC
|
||||
# hardcode_libdir_flag_spec is actually meaningless, as there is
|
||||
# no search path for DLLs.
|
||||
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
|
||||
@@ -6811,7 +6824,7 @@ if test yes != "$_lt_caught_CXX_error"; then
|
||||
# explicitly linking system object files so we need to strip them
|
||||
# from the output so that they don't get included in the library
|
||||
# dependencies.
|
||||
output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
|
||||
output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "[[-]]L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
|
||||
;;
|
||||
*)
|
||||
if test yes = "$GXX"; then
|
||||
@@ -6876,7 +6889,7 @@ if test yes != "$_lt_caught_CXX_error"; then
|
||||
# explicitly linking system object files so we need to strip them
|
||||
# from the output so that they don't get included in the library
|
||||
# dependencies.
|
||||
output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
|
||||
output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "[[-]]L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
|
||||
;;
|
||||
*)
|
||||
if test yes = "$GXX"; then
|
||||
@@ -7215,7 +7228,7 @@ if test yes != "$_lt_caught_CXX_error"; then
|
||||
# Commands to make compiler produce verbose output that lists
|
||||
# what "hidden" libraries, object files and flags are used when
|
||||
# linking a shared library.
|
||||
output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
|
||||
output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "[[-]]L"'
|
||||
|
||||
else
|
||||
# FIXME: insert proper C++ library support
|
||||
@@ -7299,7 +7312,7 @@ if test yes != "$_lt_caught_CXX_error"; then
|
||||
# Commands to make compiler produce verbose output that lists
|
||||
# what "hidden" libraries, object files and flags are used when
|
||||
# linking a shared library.
|
||||
output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
|
||||
output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "[[-]]L"'
|
||||
else
|
||||
# g++ 2.7 appears to require '-G' NOT '-shared' on this
|
||||
# platform.
|
||||
@@ -7310,7 +7323,7 @@ if test yes != "$_lt_caught_CXX_error"; then
|
||||
# Commands to make compiler produce verbose output that lists
|
||||
# what "hidden" libraries, object files and flags are used when
|
||||
# linking a shared library.
|
||||
output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
|
||||
output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "[[-]]L"'
|
||||
fi
|
||||
|
||||
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $wl$libdir'
|
||||
@@ -8331,7 +8344,7 @@ AC_CACHE_VAL(lt_cv_to_host_file_cmd,
|
||||
[case $host in
|
||||
*-*-mingw* )
|
||||
case $build in
|
||||
*-*-mingw* ) # actually msys
|
||||
*-*-mingw* | *-*-windows* ) # actually msys
|
||||
lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
|
||||
;;
|
||||
*-*-cygwin* )
|
||||
@@ -8344,7 +8357,7 @@ AC_CACHE_VAL(lt_cv_to_host_file_cmd,
|
||||
;;
|
||||
*-*-cygwin* )
|
||||
case $build in
|
||||
*-*-mingw* ) # actually msys
|
||||
*-*-mingw* | *-*-windows* ) # actually msys
|
||||
lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
|
||||
;;
|
||||
*-*-cygwin* )
|
||||
@@ -8370,9 +8383,9 @@ AC_CACHE_VAL(lt_cv_to_tool_file_cmd,
|
||||
[#assume ordinary cross tools, or native build.
|
||||
lt_cv_to_tool_file_cmd=func_convert_file_noop
|
||||
case $host in
|
||||
*-*-mingw* )
|
||||
*-*-mingw* | *-*-windows* )
|
||||
case $build in
|
||||
*-*-mingw* ) # actually msys
|
||||
*-*-mingw* | *-*-windows* ) # actually msys
|
||||
lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32
|
||||
;;
|
||||
esac
|
||||
|
2
acinclude/ltoptions.m4
vendored
2
acinclude/ltoptions.m4
vendored
@@ -128,7 +128,7 @@ LT_OPTION_DEFINE([LT_INIT], [win32-dll],
|
||||
[enable_win32_dll=yes
|
||||
|
||||
case $host in
|
||||
*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*)
|
||||
*-*-cygwin* | *-*-mingw* | *-*-windows* | *-*-pw32* | *-*-cegcc*)
|
||||
AC_CHECK_TOOL(AS, as, false)
|
||||
AC_CHECK_TOOL(DLLTOOL, dlltool, false)
|
||||
AC_CHECK_TOOL(OBJDUMP, objdump, false)
|
||||
|
@@ -8,22 +8,22 @@ else {
|
||||
}
|
||||
|
||||
android {
|
||||
compileSdkVersion 31
|
||||
if (buildAsApplication) {
|
||||
namespace "org.libsdl.app"
|
||||
}
|
||||
compileSdkVersion 34
|
||||
defaultConfig {
|
||||
if (buildAsApplication) {
|
||||
applicationId "org.libsdl.app"
|
||||
}
|
||||
minSdkVersion 16
|
||||
targetSdkVersion 31
|
||||
minSdkVersion 19
|
||||
targetSdkVersion 34
|
||||
versionCode 1
|
||||
versionName "1.0"
|
||||
externalNativeBuild {
|
||||
ndkBuild {
|
||||
arguments "APP_PLATFORM=android-16"
|
||||
arguments "APP_PLATFORM=android-19"
|
||||
abiFilters 'armeabi-v7a', 'arm64-v8a', 'x86', 'x86_64'
|
||||
}
|
||||
// cmake {
|
||||
// arguments "-DANDROID_APP_PLATFORM=android-16", "-DANDROID_STL=c++_static"
|
||||
// arguments "-DANDROID_APP_PLATFORM=android-19", "-DANDROID_STL=c++_static"
|
||||
// // abiFilters 'armeabi-v7a', 'arm64-v8a', 'x86', 'x86_64'
|
||||
// abiFilters 'arm64-v8a'
|
||||
// }
|
||||
@@ -53,10 +53,10 @@ android {
|
||||
}
|
||||
|
||||
}
|
||||
lintOptions {
|
||||
lint {
|
||||
abortOnError false
|
||||
}
|
||||
|
||||
|
||||
if (buildAsLibrary) {
|
||||
libraryVariants.all { variant ->
|
||||
variant.outputs.each { output ->
|
||||
|
81
android-project/app/proguard-rules.pro
vendored
81
android-project/app/proguard-rules.pro
vendored
@@ -15,3 +15,84 @@
|
||||
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
|
||||
# public *;
|
||||
#}
|
||||
|
||||
-keep,includedescriptorclasses,allowoptimization class org.libsdl.app.SDLInputConnection {
|
||||
void nativeCommitText(java.lang.String, int);
|
||||
void nativeGenerateScancodeForUnichar(char);
|
||||
}
|
||||
|
||||
-keep,includedescriptorclasses class org.libsdl.app.SDLActivity {
|
||||
# for some reason these aren't compatible with allowoptimization modifier
|
||||
boolean supportsRelativeMouse();
|
||||
void setWindowStyle(boolean);
|
||||
}
|
||||
|
||||
-keep,includedescriptorclasses,allowoptimization class org.libsdl.app.SDLActivity {
|
||||
java.lang.String nativeGetHint(java.lang.String); # Java-side doesn't use this, so it gets minified, but C-side still tries to register it
|
||||
boolean onNativeSoftReturnKey();
|
||||
void onNativeKeyboardFocusLost();
|
||||
boolean isScreenKeyboardShown();
|
||||
android.util.DisplayMetrics getDisplayDPI();
|
||||
java.lang.String clipboardGetText();
|
||||
boolean clipboardHasText();
|
||||
void clipboardSetText(java.lang.String);
|
||||
int createCustomCursor(int[], int, int, int, int);
|
||||
void destroyCustomCursor(int);
|
||||
android.content.Context getContext();
|
||||
boolean getManifestEnvironmentVariables();
|
||||
android.view.Surface getNativeSurface();
|
||||
void initTouch();
|
||||
boolean isAndroidTV();
|
||||
boolean isChromebook();
|
||||
boolean isDeXMode();
|
||||
boolean isTablet();
|
||||
void manualBackButton();
|
||||
int messageboxShowMessageBox(int, java.lang.String, java.lang.String, int[], int[], java.lang.String[], int[]);
|
||||
void minimizeWindow();
|
||||
int openURL(java.lang.String);
|
||||
void requestPermission(java.lang.String, int);
|
||||
int showToast(java.lang.String, int, int, int, int);
|
||||
boolean sendMessage(int, int);
|
||||
boolean setActivityTitle(java.lang.String);
|
||||
boolean setCustomCursor(int);
|
||||
void setOrientation(int, int, boolean, java.lang.String);
|
||||
boolean setRelativeMouseEnabled(boolean);
|
||||
boolean setSystemCursor(int);
|
||||
boolean shouldMinimizeOnFocusLoss();
|
||||
boolean showTextInput(int, int, int, int);
|
||||
}
|
||||
|
||||
-keep,includedescriptorclasses,allowoptimization class org.libsdl.app.HIDDeviceManager {
|
||||
boolean initialize(boolean, boolean);
|
||||
boolean openDevice(int);
|
||||
int sendOutputReport(int, byte[]);
|
||||
int sendFeatureReport(int, byte[]);
|
||||
boolean getFeatureReport(int, byte[]);
|
||||
void closeDevice(int);
|
||||
}
|
||||
|
||||
-keep,includedescriptorclasses,allowoptimization class org.libsdl.app.SDLAudioManager {
|
||||
int[] getAudioOutputDevices();
|
||||
int[] getAudioInputDevices();
|
||||
int[] audioOpen(int, int, int, int, int);
|
||||
void audioWriteFloatBuffer(float[]);
|
||||
void audioWriteShortBuffer(short[]);
|
||||
void audioWriteByteBuffer(byte[]);
|
||||
void audioClose();
|
||||
int[] captureOpen(int, int, int, int, int);
|
||||
int captureReadFloatBuffer(float[], boolean);
|
||||
int captureReadShortBuffer(short[], boolean);
|
||||
int captureReadByteBuffer(byte[], boolean);
|
||||
void captureClose();
|
||||
void audioSetThreadPriority(boolean, int);
|
||||
native int nativeSetupJNI();
|
||||
native void removeAudioDevice(boolean, int);
|
||||
native void addAudioDevice(boolean, int);
|
||||
}
|
||||
|
||||
-keep,includedescriptorclasses,allowoptimization class org.libsdl.app.SDLControllerManager {
|
||||
void pollInputDevices();
|
||||
void pollHapticDevices();
|
||||
void hapticRun(int, float, int);
|
||||
void hapticStop(int);
|
||||
}
|
||||
|
@@ -3,7 +3,6 @@
|
||||
com.gamemaker.game
|
||||
-->
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="org.libsdl.app"
|
||||
android:versionCode="1"
|
||||
android:versionName="1.0"
|
||||
android:installLocation="auto">
|
||||
@@ -63,7 +62,7 @@
|
||||
<application android:label="@string/app_name"
|
||||
android:icon="@mipmap/ic_launcher"
|
||||
android:allowBackup="true"
|
||||
android:theme="@android:style/Theme.NoTitleBar.Fullscreen"
|
||||
android:theme="@style/AppTheme"
|
||||
android:hardwareAccelerated="true" >
|
||||
|
||||
<!-- Example of setting SDL hints from AndroidManifest.xml:
|
||||
|
@@ -273,9 +273,11 @@ public class HIDDeviceManager {
|
||||
final int XB1_IFACE_SUBCLASS = 71;
|
||||
final int XB1_IFACE_PROTOCOL = 208;
|
||||
final int[] SUPPORTED_VENDORS = {
|
||||
0x03f0, // HP
|
||||
0x044f, // Thrustmaster
|
||||
0x045e, // Microsoft
|
||||
0x0738, // Mad Catz
|
||||
0x0b05, // ASUS
|
||||
0x0e6f, // PDP
|
||||
0x0f0d, // Hori
|
||||
0x10f5, // Turtle Beach
|
||||
@@ -284,6 +286,7 @@ public class HIDDeviceManager {
|
||||
0x24c6, // PowerA
|
||||
0x2dc8, // 8BitDo
|
||||
0x2e24, // Hyperkin
|
||||
0x3537, // GameSir
|
||||
};
|
||||
|
||||
if (usbInterface.getId() == 0 &&
|
||||
@@ -357,6 +360,12 @@ public class HIDDeviceManager {
|
||||
private void initializeBluetooth() {
|
||||
Log.d(TAG, "Initializing Bluetooth");
|
||||
|
||||
if (Build.VERSION.SDK_INT >= 31 /* Android 12 */ &&
|
||||
mContext.getPackageManager().checkPermission(android.Manifest.permission.BLUETOOTH_CONNECT, mContext.getPackageName()) != PackageManager.PERMISSION_GRANTED) {
|
||||
Log.d(TAG, "Couldn't initialize Bluetooth, missing android.permission.BLUETOOTH_CONNECT");
|
||||
return;
|
||||
}
|
||||
|
||||
if (Build.VERSION.SDK_INT <= 30 /* Android 11.0 (R) */ &&
|
||||
mContext.getPackageManager().checkPermission(android.Manifest.permission.BLUETOOTH, mContext.getPackageName()) != PackageManager.PERMISSION_GRANTED) {
|
||||
Log.d(TAG, "Couldn't initialize Bluetooth, missing android.permission.BLUETOOTH");
|
||||
@@ -582,7 +591,13 @@ public class HIDDeviceManager {
|
||||
} else {
|
||||
flags = 0;
|
||||
}
|
||||
mUsbManager.requestPermission(usbDevice, PendingIntent.getBroadcast(mContext, 0, new Intent(HIDDeviceManager.ACTION_USB_PERMISSION), flags));
|
||||
if (Build.VERSION.SDK_INT >= 33 /* Android 14.0 (U) */) {
|
||||
Intent intent = new Intent(HIDDeviceManager.ACTION_USB_PERMISSION);
|
||||
intent.setPackage(mContext.getPackageName());
|
||||
mUsbManager.requestPermission(usbDevice, PendingIntent.getBroadcast(mContext, 0, intent, flags));
|
||||
} else {
|
||||
mUsbManager.requestPermission(usbDevice, PendingIntent.getBroadcast(mContext, 0, new Intent(HIDDeviceManager.ACTION_USB_PERMISSION), flags));
|
||||
}
|
||||
} catch (Exception e) {
|
||||
Log.v(TAG, "Couldn't request permission for USB device " + usbDevice);
|
||||
HIDDeviceOpenResult(deviceID, false);
|
||||
|
@@ -38,6 +38,10 @@ public class SDL {
|
||||
}
|
||||
|
||||
public static void loadLibrary(String libraryName) throws UnsatisfiedLinkError, SecurityException, NullPointerException {
|
||||
loadLibrary(libraryName, mContext);
|
||||
}
|
||||
|
||||
public static void loadLibrary(String libraryName, Context context) throws UnsatisfiedLinkError, SecurityException, NullPointerException {
|
||||
|
||||
if (libraryName == null) {
|
||||
throw new NullPointerException("No library name provided.");
|
||||
@@ -53,10 +57,10 @@ public class SDL {
|
||||
// To use ReLinker, just add it as a dependency. For more information, see
|
||||
// https://github.com/KeepSafe/ReLinker for ReLinker's repository.
|
||||
//
|
||||
Class<?> relinkClass = mContext.getClassLoader().loadClass("com.getkeepsafe.relinker.ReLinker");
|
||||
Class<?> relinkListenerClass = mContext.getClassLoader().loadClass("com.getkeepsafe.relinker.ReLinker$LoadListener");
|
||||
Class<?> contextClass = mContext.getClassLoader().loadClass("android.content.Context");
|
||||
Class<?> stringClass = mContext.getClassLoader().loadClass("java.lang.String");
|
||||
Class<?> relinkClass = context.getClassLoader().loadClass("com.getkeepsafe.relinker.ReLinker");
|
||||
Class<?> relinkListenerClass = context.getClassLoader().loadClass("com.getkeepsafe.relinker.ReLinker$LoadListener");
|
||||
Class<?> contextClass = context.getClassLoader().loadClass("android.content.Context");
|
||||
Class<?> stringClass = context.getClassLoader().loadClass("java.lang.String");
|
||||
|
||||
// Get a 'force' instance of the ReLinker, so we can ensure libraries are reinstalled if
|
||||
// they've changed during updates.
|
||||
@@ -66,7 +70,7 @@ public class SDL {
|
||||
|
||||
// Actually load the library!
|
||||
Method loadMethod = relinkInstanceClass.getDeclaredMethod("loadLibrary", contextClass, stringClass, stringClass, relinkListenerClass);
|
||||
loadMethod.invoke(relinkInstance, mContext, libraryName, null, null);
|
||||
loadMethod.invoke(relinkInstance, context, libraryName, null, null);
|
||||
}
|
||||
catch (final Throwable e) {
|
||||
// Fall back
|
||||
|
@@ -60,8 +60,8 @@ import java.util.Locale;
|
||||
public class SDLActivity extends Activity implements View.OnSystemUiVisibilityChangeListener {
|
||||
private static final String TAG = "SDL";
|
||||
private static final int SDL_MAJOR_VERSION = 2;
|
||||
private static final int SDL_MINOR_VERSION = 28;
|
||||
private static final int SDL_MICRO_VERSION = 0;
|
||||
private static final int SDL_MINOR_VERSION = 32;
|
||||
private static final int SDL_MICRO_VERSION = 8;
|
||||
/*
|
||||
// Display InputType.SOURCE/CLASS of events and devices
|
||||
//
|
||||
@@ -89,7 +89,7 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
|
||||
| InputDevice.SOURCE_CLASS_POSITION
|
||||
| InputDevice.SOURCE_CLASS_TRACKBALL);
|
||||
|
||||
if (s2 != 0) cls += "Some_Unkown";
|
||||
if (s2 != 0) cls += "Some_Unknown";
|
||||
|
||||
s2 = s_copy & InputDevice.SOURCE_ANY; // keep source only, no class;
|
||||
|
||||
@@ -163,7 +163,7 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
|
||||
if (s == FLAG_TAINTED) src += " FLAG_TAINTED";
|
||||
s2 &= ~FLAG_TAINTED;
|
||||
|
||||
if (s2 != 0) src += " Some_Unkown";
|
||||
if (s2 != 0) src += " Some_Unknown";
|
||||
|
||||
Log.v(TAG, prefix + "int=" + s_copy + " CLASS={" + cls + " } source(s):" + src);
|
||||
}
|
||||
@@ -281,7 +281,7 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
|
||||
// Load the .so
|
||||
public void loadLibraries() {
|
||||
for (String lib : getLibraries()) {
|
||||
SDL.loadLibrary(lib);
|
||||
SDL.loadLibrary(lib, this);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -790,6 +790,9 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
|
||||
window.clearFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN);
|
||||
SDLActivity.mFullscreenModeActive = false;
|
||||
}
|
||||
if (Build.VERSION.SDK_INT >= 28 /* Android 9 (Pie) */) {
|
||||
window.getAttributes().layoutInDisplayCutoutMode = WindowManager.LayoutParams.LAYOUT_IN_DISPLAY_CUTOUT_MODE_SHORT_EDGES;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
Log.e(TAG, "error handling message, getContext() returned no Activity");
|
||||
@@ -995,8 +998,8 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
|
||||
/* No valid hint, nothing is explicitly allowed */
|
||||
if (!is_portrait_allowed && !is_landscape_allowed) {
|
||||
if (resizable) {
|
||||
/* All orientations are allowed */
|
||||
req = ActivityInfo.SCREEN_ORIENTATION_FULL_SENSOR;
|
||||
/* All orientations are allowed, respecting user orientation lock setting */
|
||||
req = ActivityInfo.SCREEN_ORIENTATION_FULL_USER;
|
||||
} else {
|
||||
/* Fixed window and nothing specified. Get orientation from w/h of created window */
|
||||
req = (w > h ? ActivityInfo.SCREEN_ORIENTATION_SENSOR_LANDSCAPE : ActivityInfo.SCREEN_ORIENTATION_SENSOR_PORTRAIT);
|
||||
@@ -1005,8 +1008,8 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
|
||||
/* At least one orientation is allowed */
|
||||
if (resizable) {
|
||||
if (is_portrait_allowed && is_landscape_allowed) {
|
||||
/* hint allows both landscape and portrait, promote to full sensor */
|
||||
req = ActivityInfo.SCREEN_ORIENTATION_FULL_SENSOR;
|
||||
/* hint allows both landscape and portrait, promote to full user */
|
||||
req = ActivityInfo.SCREEN_ORIENTATION_FULL_USER;
|
||||
} else {
|
||||
/* Use the only one allowed "orientation" */
|
||||
req = (is_landscape_allowed ? orientation_landscape : orientation_portrait);
|
||||
@@ -1345,23 +1348,6 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
|
||||
}
|
||||
}
|
||||
|
||||
if ((source & InputDevice.SOURCE_KEYBOARD) == InputDevice.SOURCE_KEYBOARD) {
|
||||
if (event.getAction() == KeyEvent.ACTION_DOWN) {
|
||||
if (isTextInputEvent(event)) {
|
||||
if (ic != null) {
|
||||
ic.commitText(String.valueOf((char) event.getUnicodeChar()), 1);
|
||||
} else {
|
||||
SDLInputConnection.nativeCommitText(String.valueOf((char) event.getUnicodeChar()), 1);
|
||||
}
|
||||
}
|
||||
onNativeKeyDown(keyCode);
|
||||
return true;
|
||||
} else if (event.getAction() == KeyEvent.ACTION_UP) {
|
||||
onNativeKeyUp(keyCode);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
if ((source & InputDevice.SOURCE_MOUSE) == InputDevice.SOURCE_MOUSE) {
|
||||
// on some devices key events are sent for mouse BUTTON_BACK/FORWARD presses
|
||||
// they are ignored here because sending them as mouse input to SDL is messy
|
||||
@@ -1376,6 +1362,21 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
|
||||
}
|
||||
}
|
||||
|
||||
if (event.getAction() == KeyEvent.ACTION_DOWN) {
|
||||
if (isTextInputEvent(event)) {
|
||||
if (ic != null) {
|
||||
ic.commitText(String.valueOf((char) event.getUnicodeChar()), 1);
|
||||
} else {
|
||||
SDLInputConnection.nativeCommitText(String.valueOf((char) event.getUnicodeChar()), 1);
|
||||
}
|
||||
}
|
||||
onNativeKeyDown(keyCode);
|
||||
return true;
|
||||
} else if (event.getAction() == KeyEvent.ACTION_UP) {
|
||||
onNativeKeyUp(keyCode);
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@@ -546,13 +546,15 @@ class SDLHapticHandler {
|
||||
if (haptic == null) {
|
||||
InputDevice device = InputDevice.getDevice(deviceIds[i]);
|
||||
Vibrator vib = device.getVibrator();
|
||||
if (vib.hasVibrator()) {
|
||||
haptic = new SDLHaptic();
|
||||
haptic.device_id = deviceIds[i];
|
||||
haptic.name = device.getName();
|
||||
haptic.vib = vib;
|
||||
mHaptics.add(haptic);
|
||||
SDLControllerManager.nativeAddHaptic(haptic.device_id, haptic.name);
|
||||
if (vib != null) {
|
||||
if (vib.hasVibrator()) {
|
||||
haptic = new SDLHaptic();
|
||||
haptic.device_id = deviceIds[i];
|
||||
haptic.name = device.getName();
|
||||
haptic.vib = vib;
|
||||
mHaptics.add(haptic);
|
||||
SDLControllerManager.nativeAddHaptic(haptic.device_id, haptic.name);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -1,8 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
|
||||
<!-- Base application theme. -->
|
||||
<style name="AppTheme" parent="android:Theme.Holo.Light.DarkActionBar">
|
||||
<style name="AppTheme" parent="android:Theme.NoTitleBar.Fullscreen">
|
||||
<!-- Customize your theme here. -->
|
||||
</style>
|
||||
|
||||
</resources>
|
||||
|
@@ -6,7 +6,7 @@ buildscript {
|
||||
google()
|
||||
}
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:7.0.3'
|
||||
classpath 'com.android.tools.build:gradle:8.1.1'
|
||||
|
||||
// NOTE: Do not place your application dependencies here; they belong
|
||||
// in the individual module build.gradle files
|
||||
|
@@ -1,6 +1,6 @@
|
||||
#Thu Nov 11 18:20:34 PST 2021
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3-bin.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.1.1-bin.zip
|
||||
distributionPath=wrapper/dists
|
||||
zipStorePath=wrapper/dists
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
|
@@ -80,7 +80,8 @@ do
|
||||
cd $folder
|
||||
done
|
||||
|
||||
ACTIVITY="${folder}Activity"
|
||||
# Uppercase the first char in the activity class name because it's Java
|
||||
ACTIVITY="$(echo $folder | awk '{$1=toupper(substr($1,0,1))substr($1,2)}1')Activity"
|
||||
sed -i -e "s|\"SDLActivity\"|\"$ACTIVITY\"|g" $BUILDPATH/app/src/main/AndroidManifest.xml
|
||||
|
||||
# Fill in a default Activity
|
||||
|
1470
build-scripts/build-release.py
Executable file
1470
build-scripts/build-release.py
Executable file
File diff suppressed because it is too large
Load Diff
18
build-scripts/cmake-toolchain-mingw64-i686.cmake
Normal file
18
build-scripts/cmake-toolchain-mingw64-i686.cmake
Normal file
@@ -0,0 +1,18 @@
|
||||
set(CMAKE_SYSTEM_NAME Windows)
|
||||
set(CMAKE_SYSTEM_PROCESSOR x86)
|
||||
|
||||
find_program(CMAKE_C_COMPILER NAMES i686-w64-mingw32-gcc)
|
||||
find_program(CMAKE_CXX_COMPILER NAMES i686-w64-mingw32-g++)
|
||||
find_program(CMAKE_RC_COMPILER NAMES i686-w64-mingw32-windres windres)
|
||||
|
||||
if(NOT CMAKE_C_COMPILER)
|
||||
message(FATAL_ERROR "Failed to find CMAKE_C_COMPILER.")
|
||||
endif()
|
||||
|
||||
if(NOT CMAKE_CXX_COMPILER)
|
||||
message(FATAL_ERROR "Failed to find CMAKE_CXX_COMPILER.")
|
||||
endif()
|
||||
|
||||
if(NOT CMAKE_RC_COMPILER)
|
||||
message(FATAL_ERROR "Failed to find CMAKE_RC_COMPILER.")
|
||||
endif()
|
18
build-scripts/cmake-toolchain-mingw64-x86_64.cmake
Normal file
18
build-scripts/cmake-toolchain-mingw64-x86_64.cmake
Normal file
@@ -0,0 +1,18 @@
|
||||
set(CMAKE_SYSTEM_NAME Windows)
|
||||
set(CMAKE_SYSTEM_PROCESSOR x86_64)
|
||||
|
||||
find_program(CMAKE_C_COMPILER NAMES x86_64-w64-mingw32-gcc)
|
||||
find_program(CMAKE_CXX_COMPILER NAMES x86_64-w64-mingw32-g++)
|
||||
find_program(CMAKE_RC_COMPILER NAMES x86_64-w64-mingw32-windres windres)
|
||||
|
||||
if(NOT CMAKE_C_COMPILER)
|
||||
message(FATAL_ERROR "Failed to find CMAKE_C_COMPILER.")
|
||||
endif()
|
||||
|
||||
if(NOT CMAKE_CXX_COMPILER)
|
||||
message(FATAL_ERROR "Failed to find CMAKE_CXX_COMPILER.")
|
||||
endif()
|
||||
|
||||
if(NOT CMAKE_RC_COMPILER)
|
||||
message(FATAL_ERROR "Failed to find CMAKE_RC_COMPILER.")
|
||||
endif()
|
79
build-scripts/config.guess
vendored
79
build-scripts/config.guess
vendored
@@ -1,10 +1,10 @@
|
||||
#! /bin/sh
|
||||
# Attempt to guess a canonical system name.
|
||||
# Copyright 1992-2022 Free Software Foundation, Inc.
|
||||
# Copyright 1992-2024 Free Software Foundation, Inc.
|
||||
|
||||
# shellcheck disable=SC2006,SC2268 # see below for rationale
|
||||
|
||||
timestamp='2022-05-25'
|
||||
timestamp='2024-07-27'
|
||||
|
||||
# This file is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License as published by
|
||||
@@ -47,7 +47,7 @@ me=`echo "$0" | sed -e 's,.*/,,'`
|
||||
usage="\
|
||||
Usage: $0 [OPTION]
|
||||
|
||||
Output the configuration name of the system \`$me' is run on.
|
||||
Output the configuration name of the system '$me' is run on.
|
||||
|
||||
Options:
|
||||
-h, --help print this help, then exit
|
||||
@@ -60,13 +60,13 @@ version="\
|
||||
GNU config.guess ($timestamp)
|
||||
|
||||
Originally written by Per Bothner.
|
||||
Copyright 1992-2022 Free Software Foundation, Inc.
|
||||
Copyright 1992-2024 Free Software Foundation, Inc.
|
||||
|
||||
This is free software; see the source for copying conditions. There is NO
|
||||
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
|
||||
|
||||
help="
|
||||
Try \`$me --help' for more information."
|
||||
Try '$me --help' for more information."
|
||||
|
||||
# Parse command line
|
||||
while test $# -gt 0 ; do
|
||||
@@ -102,8 +102,8 @@ GUESS=
|
||||
# temporary files to be created and, as you can see below, it is a
|
||||
# headache to deal with in a portable fashion.
|
||||
|
||||
# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
|
||||
# use `HOST_CC' if defined, but it is deprecated.
|
||||
# Historically, 'CC_FOR_BUILD' used to be named 'HOST_CC'. We still
|
||||
# use 'HOST_CC' if defined, but it is deprecated.
|
||||
|
||||
# Portable tmp directory creation inspired by the Autoconf team.
|
||||
|
||||
@@ -123,7 +123,7 @@ set_cc_for_build() {
|
||||
dummy=$tmp/dummy
|
||||
case ${CC_FOR_BUILD-},${HOST_CC-},${CC-} in
|
||||
,,) echo "int x;" > "$dummy.c"
|
||||
for driver in cc gcc c89 c99 ; do
|
||||
for driver in cc gcc c17 c99 c89 ; do
|
||||
if ($driver -c -o "$dummy.o" "$dummy.c") >/dev/null 2>&1 ; then
|
||||
CC_FOR_BUILD=$driver
|
||||
break
|
||||
@@ -155,6 +155,9 @@ Linux|GNU|GNU/*)
|
||||
|
||||
set_cc_for_build
|
||||
cat <<-EOF > "$dummy.c"
|
||||
#if defined(__ANDROID__)
|
||||
LIBC=android
|
||||
#else
|
||||
#include <features.h>
|
||||
#if defined(__UCLIBC__)
|
||||
LIBC=uclibc
|
||||
@@ -162,6 +165,8 @@ Linux|GNU|GNU/*)
|
||||
LIBC=dietlibc
|
||||
#elif defined(__GLIBC__)
|
||||
LIBC=gnu
|
||||
#elif defined(__LLVM_LIBC__)
|
||||
LIBC=llvm
|
||||
#else
|
||||
#include <stdarg.h>
|
||||
/* First heuristic to detect musl libc. */
|
||||
@@ -169,6 +174,7 @@ Linux|GNU|GNU/*)
|
||||
LIBC=musl
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
EOF
|
||||
cc_set_libc=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`
|
||||
eval "$cc_set_libc"
|
||||
@@ -459,7 +465,7 @@ case $UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION in
|
||||
UNAME_RELEASE=`uname -v`
|
||||
;;
|
||||
esac
|
||||
# Japanese Language versions have a version number like `4.1.3-JL'.
|
||||
# Japanese Language versions have a version number like '4.1.3-JL'.
|
||||
SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/-/_/'`
|
||||
GUESS=sparc-sun-sunos$SUN_REL
|
||||
;;
|
||||
@@ -628,7 +634,8 @@ EOF
|
||||
sed 's/^ //' << EOF > "$dummy.c"
|
||||
#include <sys/systemcfg.h>
|
||||
|
||||
main()
|
||||
int
|
||||
main ()
|
||||
{
|
||||
if (!__power_pc())
|
||||
exit(1);
|
||||
@@ -712,7 +719,8 @@ EOF
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
|
||||
int main ()
|
||||
int
|
||||
main ()
|
||||
{
|
||||
#if defined(_SC_KERNEL_BITS)
|
||||
long bits = sysconf(_SC_KERNEL_BITS);
|
||||
@@ -904,7 +912,7 @@ EOF
|
||||
fi
|
||||
;;
|
||||
*:FreeBSD:*:*)
|
||||
UNAME_PROCESSOR=`/usr/bin/uname -p`
|
||||
UNAME_PROCESSOR=`uname -p`
|
||||
case $UNAME_PROCESSOR in
|
||||
amd64)
|
||||
UNAME_PROCESSOR=x86_64 ;;
|
||||
@@ -966,11 +974,37 @@ EOF
|
||||
GNU_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'`
|
||||
GUESS=$UNAME_MACHINE-unknown-$GNU_SYS$GNU_REL-$LIBC
|
||||
;;
|
||||
x86_64:[Mm]anagarm:*:*|i?86:[Mm]anagarm:*:*)
|
||||
GUESS="$UNAME_MACHINE-pc-managarm-mlibc"
|
||||
;;
|
||||
*:[Mm]anagarm:*:*)
|
||||
GUESS="$UNAME_MACHINE-unknown-managarm-mlibc"
|
||||
;;
|
||||
*:Minix:*:*)
|
||||
GUESS=$UNAME_MACHINE-unknown-minix
|
||||
;;
|
||||
aarch64:Linux:*:*)
|
||||
GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
|
||||
set_cc_for_build
|
||||
CPU=$UNAME_MACHINE
|
||||
LIBCABI=$LIBC
|
||||
if test "$CC_FOR_BUILD" != no_compiler_found; then
|
||||
ABI=64
|
||||
sed 's/^ //' << EOF > "$dummy.c"
|
||||
#ifdef __ARM_EABI__
|
||||
#ifdef __ARM_PCS_VFP
|
||||
ABI=eabihf
|
||||
#else
|
||||
ABI=eabi
|
||||
#endif
|
||||
#endif
|
||||
EOF
|
||||
cc_set_abi=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^ABI' | sed 's, ,,g'`
|
||||
eval "$cc_set_abi"
|
||||
case $ABI in
|
||||
eabi | eabihf) CPU=armv8l; LIBCABI=$LIBC$ABI ;;
|
||||
esac
|
||||
fi
|
||||
GUESS=$CPU-unknown-linux-$LIBCABI
|
||||
;;
|
||||
aarch64_be:Linux:*:*)
|
||||
UNAME_MACHINE=aarch64_be
|
||||
@@ -1036,7 +1070,16 @@ EOF
|
||||
k1om:Linux:*:*)
|
||||
GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
|
||||
;;
|
||||
loongarch32:Linux:*:* | loongarch64:Linux:*:* | loongarchx32:Linux:*:*)
|
||||
kvx:Linux:*:*)
|
||||
GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
|
||||
;;
|
||||
kvx:cos:*:*)
|
||||
GUESS=$UNAME_MACHINE-unknown-cos
|
||||
;;
|
||||
kvx:mbr:*:*)
|
||||
GUESS=$UNAME_MACHINE-unknown-mbr
|
||||
;;
|
||||
loongarch32:Linux:*:* | loongarch64:Linux:*:*)
|
||||
GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
|
||||
;;
|
||||
m32r*:Linux:*:*)
|
||||
@@ -1191,7 +1234,7 @@ EOF
|
||||
GUESS=$UNAME_MACHINE-pc-sysv4.2uw$UNAME_VERSION
|
||||
;;
|
||||
i*86:OS/2:*:*)
|
||||
# If we were able to find `uname', then EMX Unix compatibility
|
||||
# If we were able to find 'uname', then EMX Unix compatibility
|
||||
# is probably installed.
|
||||
GUESS=$UNAME_MACHINE-pc-os2-emx
|
||||
;;
|
||||
@@ -1332,7 +1375,7 @@ EOF
|
||||
GUESS=ns32k-sni-sysv
|
||||
fi
|
||||
;;
|
||||
PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
|
||||
PENTIUM:*:4.0*:*) # Unisys 'ClearPath HMP IX 4000' SVR4/MP effort
|
||||
# says <Richard.M.Bartel@ccMail.Census.GOV>
|
||||
GUESS=i586-unisys-sysv4
|
||||
;;
|
||||
@@ -1554,6 +1597,9 @@ EOF
|
||||
*:Unleashed:*:*)
|
||||
GUESS=$UNAME_MACHINE-unknown-unleashed$UNAME_RELEASE
|
||||
;;
|
||||
*:Ironclad:*:*)
|
||||
GUESS=$UNAME_MACHINE-unknown-ironclad
|
||||
;;
|
||||
esac
|
||||
|
||||
# Do we have a guess based on uname results?
|
||||
@@ -1577,6 +1623,7 @@ cat > "$dummy.c" <<EOF
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
int
|
||||
main ()
|
||||
{
|
||||
#if defined (sony)
|
||||
|
940
build-scripts/config.sub
vendored
940
build-scripts/config.sub
vendored
File diff suppressed because it is too large
Load Diff
43
build-scripts/create-release.py
Executable file
43
build-scripts/create-release.py
Executable file
@@ -0,0 +1,43 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
import argparse
|
||||
from pathlib import Path
|
||||
import json
|
||||
import logging
|
||||
import re
|
||||
import subprocess
|
||||
|
||||
ROOT = Path(__file__).resolve().parents[1]
|
||||
|
||||
|
||||
def determine_remote() -> str:
|
||||
text = (ROOT / "build-scripts/release-info.json").read_text()
|
||||
release_info = json.loads(text)
|
||||
if "remote" in release_info:
|
||||
return release_info["remote"]
|
||||
project_with_version = release_info["name"]
|
||||
project, _ = re.subn("([^a-zA-Z_])", "", project_with_version)
|
||||
return f"libsdl-org/{project}"
|
||||
|
||||
|
||||
def main():
|
||||
default_remote = determine_remote()
|
||||
|
||||
current_commit = subprocess.check_output(["git", "rev-parse", "HEAD"], cwd=ROOT, text=True).strip()
|
||||
|
||||
parser = argparse.ArgumentParser(allow_abbrev=False)
|
||||
parser.add_argument("--ref", required=True, help=f"Name of branch or tag containing release.yml")
|
||||
parser.add_argument("--remote", "-R", default=default_remote, help=f"Remote repo (default={default_remote})")
|
||||
parser.add_argument("--commit", default=current_commit, help=f"Commit (default={current_commit})")
|
||||
args = parser.parse_args()
|
||||
|
||||
|
||||
print(f"Running release.yml workflow:")
|
||||
print(f" commit = {args.commit}")
|
||||
print(f" remote = {args.remote}")
|
||||
|
||||
subprocess.check_call(["gh", "-R", args.remote, "workflow", "run", "release.yml", "--ref", args.ref, "-f", f"commit={args.commit}"], cwd=ROOT)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
raise SystemExit(main())
|
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2023 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
@@ -395,7 +395,7 @@ int main(void)
|
||||
printf(
|
||||
"/*\n"
|
||||
" Simple DirectMedia Layer\n"
|
||||
" Copyright (C) 1997-2023 Sam Lantinga <slouken@libsdl.org>\n"
|
||||
" Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>\n"
|
||||
"\n"
|
||||
" This software is provided 'as-is', without any express or implied\n"
|
||||
" warranty. In no event will the authors be held liable for any damages\n"
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2023 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
@@ -113,7 +113,7 @@ int main(void)
|
||||
printf(
|
||||
"/*\n"
|
||||
" Simple DirectMedia Layer\n"
|
||||
" Copyright (C) 1997-2023 Sam Lantinga <slouken@libsdl.org>\n"
|
||||
" Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>\n"
|
||||
"\n"
|
||||
" This software is provided 'as-is', without any express or implied\n"
|
||||
" warranty. In no event will the authors be held liable for any damages\n"
|
||||
|
@@ -2415,10 +2415,10 @@ libtool_validate_options ()
|
||||
# preserve --debug
|
||||
test : = "$debug_cmd" || func_append preserve_args " --debug"
|
||||
|
||||
case $host in
|
||||
case $host_os in
|
||||
# Solaris2 added to fix http://debbugs.gnu.org/cgi/bugreport.cgi?bug=16452
|
||||
# see also: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59788
|
||||
*cygwin* | *mingw* | *pw32* | *cegcc* | *solaris2* | *os2*)
|
||||
cygwin* | mingw* | windows* | pw32* | cegcc* | solaris2* | os2*)
|
||||
# don't eliminate duplications in $postdeps and $predeps
|
||||
opt_duplicate_compiler_generated_deps=:
|
||||
;;
|
||||
@@ -2750,7 +2750,7 @@ EOF
|
||||
|
||||
# func_convert_core_file_wine_to_w32 ARG
|
||||
# Helper function used by file name conversion functions when $build is *nix,
|
||||
# and $host is mingw, cygwin, or some other w32 environment. Relies on a
|
||||
# and $host is mingw, windows, cygwin, or some other w32 environment. Relies on a
|
||||
# correctly configured wine environment available, with the winepath program
|
||||
# in $build's $PATH.
|
||||
#
|
||||
@@ -2782,9 +2782,10 @@ func_convert_core_file_wine_to_w32 ()
|
||||
|
||||
# func_convert_core_path_wine_to_w32 ARG
|
||||
# Helper function used by path conversion functions when $build is *nix, and
|
||||
# $host is mingw, cygwin, or some other w32 environment. Relies on a correctly
|
||||
# configured wine environment available, with the winepath program in $build's
|
||||
# $PATH. Assumes ARG has no leading or trailing path separator characters.
|
||||
# $host is mingw, windows, cygwin, or some other w32 environment. Relies on a
|
||||
# correctly configured wine environment available, with the winepath program
|
||||
# in $build's $PATH. Assumes ARG has no leading or trailing path separator
|
||||
# characters.
|
||||
#
|
||||
# ARG is path to be converted from $build format to win32.
|
||||
# Result is available in $func_convert_core_path_wine_to_w32_result.
|
||||
@@ -3439,7 +3440,7 @@ func_mode_compile ()
|
||||
|
||||
# On Cygwin there's no "real" PIC flag so we must build both object types
|
||||
case $host_os in
|
||||
cygwin* | mingw* | pw32* | os2* | cegcc*)
|
||||
cygwin* | mingw* | windows* | pw32* | os2* | cegcc*)
|
||||
pic_mode=default
|
||||
;;
|
||||
esac
|
||||
@@ -4316,7 +4317,7 @@ func_mode_install ()
|
||||
'exit $?'
|
||||
tstripme=$stripme
|
||||
case $host_os in
|
||||
cygwin* | mingw* | pw32* | cegcc*)
|
||||
cygwin* | mingw* | windows* | pw32* | cegcc*)
|
||||
case $realname in
|
||||
*.dll.a)
|
||||
tstripme=
|
||||
@@ -4429,7 +4430,7 @@ func_mode_install ()
|
||||
|
||||
# Do a test to see if this is really a libtool program.
|
||||
case $host in
|
||||
*cygwin* | *mingw*)
|
||||
*cygwin* | *mingw* | *windows*)
|
||||
if func_ltwrapper_executable_p "$file"; then
|
||||
func_ltwrapper_scriptname "$file"
|
||||
wrapper=$func_ltwrapper_scriptname_result
|
||||
@@ -4657,7 +4658,7 @@ extern \"C\" {
|
||||
$RM $export_symbols
|
||||
eval "$SED -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"'
|
||||
case $host in
|
||||
*cygwin* | *mingw* | *cegcc* )
|
||||
*cygwin* | *mingw* | *windows* | *cegcc* )
|
||||
eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
|
||||
eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"'
|
||||
;;
|
||||
@@ -4669,7 +4670,7 @@ extern \"C\" {
|
||||
eval '$GREP -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T'
|
||||
eval '$MV "$nlist"T "$nlist"'
|
||||
case $host in
|
||||
*cygwin* | *mingw* | *cegcc* )
|
||||
*cygwin* | *mingw* | *windows* | *cegcc* )
|
||||
eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
|
||||
eval 'cat "$nlist" >> "$output_objdir/$outputname.def"'
|
||||
;;
|
||||
@@ -4683,7 +4684,7 @@ extern \"C\" {
|
||||
func_basename "$dlprefile"
|
||||
name=$func_basename_result
|
||||
case $host in
|
||||
*cygwin* | *mingw* | *cegcc* )
|
||||
*cygwin* | *mingw* | *windows* | *cegcc* )
|
||||
# if an import library, we need to obtain dlname
|
||||
if func_win32_import_lib_p "$dlprefile"; then
|
||||
func_tr_sh "$dlprefile"
|
||||
@@ -4858,7 +4859,7 @@ static const void *lt_preloaded_setup() {
|
||||
# Transform the symbol file into the correct name.
|
||||
symfileobj=$output_objdir/${my_outputname}S.$objext
|
||||
case $host in
|
||||
*cygwin* | *mingw* | *cegcc* )
|
||||
*cygwin* | *mingw* | *windows* | *cegcc* )
|
||||
if test -f "$output_objdir/$my_outputname.def"; then
|
||||
compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"`
|
||||
finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"`
|
||||
@@ -4934,7 +4935,7 @@ func_win32_libid ()
|
||||
*ar\ archive*) # could be an import, or static
|
||||
# Keep the egrep pattern in sync with the one in _LT_CHECK_MAGIC_METHOD.
|
||||
if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null |
|
||||
$EGREP 'file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' >/dev/null; then
|
||||
$EGREP 'file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64|pe-aarch64)' >/dev/null; then
|
||||
case $nm_interface in
|
||||
"MS dumpbin")
|
||||
if func_cygming_ms_implib_p "$1" ||
|
||||
@@ -5201,7 +5202,7 @@ func_extract_archives ()
|
||||
#
|
||||
# Emit a libtool wrapper script on stdout.
|
||||
# Don't directly open a file because we may want to
|
||||
# incorporate the script contents within a cygwin/mingw
|
||||
# incorporate the script contents within a cygwin/mingw/windows
|
||||
# wrapper executable. Must ONLY be called from within
|
||||
# func_mode_link because it depends on a number of variables
|
||||
# set therein.
|
||||
@@ -5209,7 +5210,7 @@ func_extract_archives ()
|
||||
# ARG is the value that the WRAPPER_SCRIPT_BELONGS_IN_OBJDIR
|
||||
# variable will take. If 'yes', then the emitted script
|
||||
# will assume that the directory where it is stored is
|
||||
# the $objdir directory. This is a cygwin/mingw-specific
|
||||
# the $objdir directory. This is a cygwin/mingw/windows-specific
|
||||
# behavior.
|
||||
func_emit_wrapper ()
|
||||
{
|
||||
@@ -5333,7 +5334,7 @@ func_exec_program_core ()
|
||||
"
|
||||
case $host in
|
||||
# Backslashes separate directories on plain windows
|
||||
*-*-mingw | *-*-os2* | *-cegcc*)
|
||||
*-*-mingw* | *-*-windows* | *-*-os2* | *-cegcc*)
|
||||
$ECHO "\
|
||||
if test -n \"\$lt_option_debug\"; then
|
||||
\$ECHO \"$outputname:$output:\$LINENO: newargv[0]: \$progdir\\\\\$program\" 1>&2
|
||||
@@ -5401,7 +5402,7 @@ func_exec_program ()
|
||||
file=\`ls -ld \"\$thisdir/\$file\" | $SED -n 's/.*-> //p'\`
|
||||
done
|
||||
|
||||
# Usually 'no', except on cygwin/mingw when embedded into
|
||||
# Usually 'no', except on cygwin/mingw/windows when embedded into
|
||||
# the cwrapper.
|
||||
WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=$func_emit_wrapper_arg1
|
||||
if test \"\$WRAPPER_SCRIPT_BELONGS_IN_OBJDIR\" = \"yes\"; then
|
||||
@@ -5533,7 +5534,7 @@ EOF
|
||||
#endif
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#ifdef _MSC_VER
|
||||
#if defined _WIN32 && !defined __GNUC__
|
||||
# include <direct.h>
|
||||
# include <process.h>
|
||||
# include <io.h>
|
||||
@@ -5558,7 +5559,7 @@ EOF
|
||||
/* declarations of non-ANSI functions */
|
||||
#if defined __MINGW32__
|
||||
# ifdef __STRICT_ANSI__
|
||||
int _putenv (const char *);
|
||||
_CRTIMP int __cdecl _putenv (const char *);
|
||||
# endif
|
||||
#elif defined __CYGWIN__
|
||||
# ifdef __STRICT_ANSI__
|
||||
@@ -5756,7 +5757,7 @@ main (int argc, char *argv[])
|
||||
{
|
||||
EOF
|
||||
case $host in
|
||||
*mingw* | *cygwin* )
|
||||
*mingw* | *windows* | *cygwin* )
|
||||
# make stdout use "unix" line endings
|
||||
echo " setmode(1,_O_BINARY);"
|
||||
;;
|
||||
@@ -5859,7 +5860,7 @@ EOF
|
||||
EOF
|
||||
|
||||
case $host_os in
|
||||
mingw*)
|
||||
mingw* | windows*)
|
||||
cat <<"EOF"
|
||||
{
|
||||
char* p;
|
||||
@@ -5901,7 +5902,7 @@ EOF
|
||||
EOF
|
||||
|
||||
case $host_os in
|
||||
mingw*)
|
||||
mingw* | windows*)
|
||||
cat <<"EOF"
|
||||
/* execv doesn't actually work on mingw as expected on unix */
|
||||
newargz = prepare_spawn (newargz);
|
||||
@@ -6320,7 +6321,7 @@ lt_update_lib_path (const char *name, const char *value)
|
||||
|
||||
EOF
|
||||
case $host_os in
|
||||
mingw*)
|
||||
mingw* | windows*)
|
||||
cat <<"EOF"
|
||||
|
||||
/* Prepares an argument vector before calling spawn().
|
||||
@@ -6495,12 +6496,12 @@ func_mode_link ()
|
||||
$debug_cmd
|
||||
|
||||
case $host in
|
||||
*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*)
|
||||
*-*-cygwin* | *-*-mingw* | *-*-windows* | *-*-pw32* | *-*-os2* | *-cegcc*)
|
||||
# It is impossible to link a dll without this setting, and
|
||||
# we shouldn't force the makefile maintainer to figure out
|
||||
# what system we are compiling for in order to pass an extra
|
||||
# flag for every libtool invocation.
|
||||
# SDL customization: SDL code doesn't have any undefined symbols
|
||||
# SDL customization: SDL code doesn't have any undefined symbols.
|
||||
allow_undefined=no
|
||||
|
||||
# FIXME: Unfortunately, there are problems with the above when trying
|
||||
@@ -6508,7 +6509,7 @@ func_mode_link ()
|
||||
# even a static library is built. For now, we need to specify
|
||||
# -no-undefined on the libtool link line when we can be certain
|
||||
# that all symbols are satisfied, otherwise we get a static library.
|
||||
# SDL customization: SDL code doesn't have any undefined symbols
|
||||
# SDL customization: SDL code doesn't have any undefined symbols.
|
||||
# allow_undefined=yes
|
||||
;;
|
||||
*)
|
||||
@@ -7003,7 +7004,7 @@ func_mode_link ()
|
||||
;;
|
||||
esac
|
||||
case $host in
|
||||
*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*)
|
||||
*-*-cygwin* | *-*-mingw* | *-*-windows* | *-*-pw32* | *-*-os2* | *-cegcc*)
|
||||
testbindir=`$ECHO "$dir" | $SED 's*/lib$*/bin*'`
|
||||
case :$dllsearchpath: in
|
||||
*":$dir:"*) ;;
|
||||
@@ -7023,7 +7024,7 @@ func_mode_link ()
|
||||
-l*)
|
||||
if test X-lc = "X$arg" || test X-lm = "X$arg"; then
|
||||
case $host in
|
||||
*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos* | *-cegcc* | *-*-haiku*)
|
||||
*-*-cygwin* | *-*-mingw* | *-*-windows* | *-*-pw32* | *-*-beos* | *-cegcc* | *-*-haiku*)
|
||||
# These systems don't actually have a C or math library (as such)
|
||||
continue
|
||||
;;
|
||||
@@ -7095,7 +7096,7 @@ func_mode_link ()
|
||||
continue
|
||||
;;
|
||||
-mt|-mthreads|-kthread|-Kthread|-pthreads|--thread-safe \
|
||||
|-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*)
|
||||
|-threads|-fopenmp|-fopenmp=*|-openmp|-mp|-xopenmp|-omp|-qsmp=*)
|
||||
func_append compiler_flags " $arg"
|
||||
func_append compile_command " $arg"
|
||||
func_append finalize_command " $arg"
|
||||
@@ -7118,7 +7119,7 @@ func_mode_link ()
|
||||
|
||||
-no-install)
|
||||
case $host in
|
||||
*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin* | *-cegcc*)
|
||||
*-*-cygwin* | *-*-mingw* | *-*-windows* | *-*-pw32* | *-*-os2* | *-*-darwin* | *-cegcc*)
|
||||
# The PATH hackery in wrapper scripts is required on Windows
|
||||
# and Darwin in order for the loader to find any dlls it needs.
|
||||
func_warning "'-no-install' is ignored for $host"
|
||||
@@ -7303,13 +7304,29 @@ func_mode_link ()
|
||||
# -O*, -g*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization
|
||||
# -specs=* GCC specs files
|
||||
# -stdlib=* select c++ std lib with clang
|
||||
# -fdiagnostics-color* simply affects output
|
||||
# -frecord-gcc-switches used to verify flags were respected
|
||||
# -fsanitize=* Clang/GCC memory and address sanitizer
|
||||
# -fno-sanitize* Clang/GCC memory and address sanitizer
|
||||
# -shared-libsan Link with shared sanitizer runtimes (Clang)
|
||||
# -static-libsan Link with static sanitizer runtimes (Clang)
|
||||
# -no-canonical-prefixes Do not expand any symbolic links
|
||||
# -fuse-ld=* Linker select flags for GCC
|
||||
# -static-* direct GCC to link specific libraries statically
|
||||
# -fcilkplus Cilk Plus language extension features for C/C++
|
||||
# -rtlib=* select c runtime lib with clang
|
||||
# --unwindlib=* select unwinder library with clang
|
||||
# -f{file|debug|macro|profile}-prefix-map=* needed for lto linking
|
||||
# -Wa,* Pass flags directly to the assembler
|
||||
# -Werror, -Werror=* Report (specified) warnings as errors
|
||||
-64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
|
||||
-t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \
|
||||
-O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*|-stdlib=*| \
|
||||
-specs=*|-fsanitize=*|-fuse-ld=*|-Wa,*)
|
||||
-O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*|-no-canonical-prefixes| \
|
||||
-stdlib=*|-rtlib=*|--unwindlib=*| \
|
||||
-specs=*|-fsanitize=*|-fno-sanitize*|-shared-libsan|-static-libsan| \
|
||||
-ffile-prefix-map=*|-fdebug-prefix-map=*|-fmacro-prefix-map=*|-fprofile-prefix-map=*| \
|
||||
-fdiagnostics-color*|-frecord-gcc-switches| \
|
||||
-fuse-ld=*|-static-*|-fcilkplus|-Wa,*|-Werror|-Werror=*)
|
||||
func_quote_for_eval "$arg"
|
||||
arg=$func_quote_for_eval_result
|
||||
func_append compile_command " $arg"
|
||||
@@ -7639,7 +7656,7 @@ func_mode_link ()
|
||||
found=false
|
||||
case $deplib in
|
||||
-mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \
|
||||
|-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*)
|
||||
|-threads|-fopenmp|-fopenmp=*|-openmp|-mp|-xopenmp|-omp|-qsmp=*)
|
||||
if test prog,link = "$linkmode,$pass"; then
|
||||
compile_deplibs="$deplib $compile_deplibs"
|
||||
finalize_deplibs="$deplib $finalize_deplibs"
|
||||
@@ -8022,7 +8039,7 @@ func_mode_link ()
|
||||
fi
|
||||
case $host in
|
||||
# special handling for platforms with PE-DLLs.
|
||||
*cygwin* | *mingw* | *cegcc* )
|
||||
*cygwin* | *mingw* | *windows* | *cegcc* )
|
||||
# Linker will automatically link against shared library if both
|
||||
# static and shared are present. Therefore, ensure we extract
|
||||
# symbols from the import library if a shared library is present
|
||||
@@ -8165,8 +8182,8 @@ func_mode_link ()
|
||||
fi
|
||||
if test -n "$library_names" &&
|
||||
{ test no = "$use_static_libs" || test -z "$old_library"; }; then
|
||||
case $host in
|
||||
*cygwin* | *mingw* | *cegcc* | *os2*)
|
||||
case $host_os in
|
||||
cygwin* | mingw* | windows* | cegcc* | os2*)
|
||||
# No point in relinking DLLs because paths are not encoded
|
||||
func_append notinst_deplibs " $lib"
|
||||
need_relink=no
|
||||
@@ -8235,8 +8252,8 @@ func_mode_link ()
|
||||
soname=$dlname
|
||||
elif test -n "$soname_spec"; then
|
||||
# bleh windows
|
||||
case $host in
|
||||
*cygwin* | mingw* | *cegcc*) # | *os2* # SDL customization: removed OS/2 versioning support.
|
||||
case $host_os in
|
||||
cygwin* | mingw* | windows* | cegcc*) # | os2* # SDL customization: removed OS/2 versioning support.
|
||||
func_arith $current - $age
|
||||
major=$func_arith_result
|
||||
versuffix=-$major
|
||||
@@ -8378,7 +8395,7 @@ func_mode_link ()
|
||||
test no = "$hardcode_direct_absolute"; then
|
||||
add=$libdir/$linklib
|
||||
elif test yes = "$hardcode_minus_L"; then
|
||||
add_dir=-L$libdir
|
||||
add_dir=-L$lt_sysroot$libdir
|
||||
add=-l$name
|
||||
elif test yes = "$hardcode_shlibpath_var"; then
|
||||
case :$finalize_shlibpath: in
|
||||
@@ -8395,7 +8412,7 @@ func_mode_link ()
|
||||
fi
|
||||
else
|
||||
# We cannot seem to hardcode it, guess we'll fake it.
|
||||
add_dir=-L$libdir
|
||||
add_dir=-L$lt_sysroot$libdir
|
||||
# Try looking first in the location we're being installed to.
|
||||
if test -n "$inst_prefix_dir"; then
|
||||
case $libdir in
|
||||
@@ -8666,7 +8683,7 @@ func_mode_link ()
|
||||
test CXX = "$tagname" && {
|
||||
case $host_os in
|
||||
linux*)
|
||||
case `$CC -V 2>&1 | sed 5q` in
|
||||
case `$CC -V 2>&1 | $SED 5q` in
|
||||
*Sun\ C*) # Sun C++ 5.9
|
||||
func_suncc_cstd_abi
|
||||
|
||||
@@ -8839,13 +8856,13 @@ func_mode_link ()
|
||||
#
|
||||
case $version_type in
|
||||
# correct linux to gnu/linux during the next big refactor
|
||||
darwin|freebsd-elf|linux|midnightbsd-elf|osf|windows|none)
|
||||
darwin|freebsd-elf|linux|midnightbsd-elf|osf|qnx|windows|none)
|
||||
func_arith $number_major + $number_minor
|
||||
current=$func_arith_result
|
||||
age=$number_minor
|
||||
revision=$number_revision
|
||||
;;
|
||||
freebsd-aout|qnx|sunos)
|
||||
freebsd-aout|sco|sunos)
|
||||
current=$number_major
|
||||
revision=$number_minor
|
||||
age=0
|
||||
@@ -8992,8 +9009,9 @@ func_mode_link ()
|
||||
;;
|
||||
|
||||
qnx)
|
||||
major=.$current
|
||||
versuffix=.$current
|
||||
func_arith $current - $age
|
||||
major=.$func_arith_result
|
||||
versuffix=$major.$age.$revision
|
||||
;;
|
||||
|
||||
sco)
|
||||
@@ -9146,7 +9164,7 @@ func_mode_link ()
|
||||
if test yes = "$build_libtool_libs"; then
|
||||
if test -n "$rpath"; then
|
||||
case $host in
|
||||
*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos* | *-cegcc* | *-*-haiku*)
|
||||
*-*-cygwin* | *-*-mingw* | *-*-windows* | *-*-pw32* | *-*-os2* | *-*-beos* | *-cegcc* | *-*-haiku*)
|
||||
# these systems don't actually have a c library (as such)!
|
||||
;;
|
||||
*-*-rhapsody* | *-*-darwin1.[012])
|
||||
@@ -9660,7 +9678,7 @@ EOF
|
||||
|
||||
orig_export_symbols=
|
||||
case $host_os in
|
||||
cygwin* | mingw* | cegcc*)
|
||||
cygwin* | mingw* | windows* | cegcc*)
|
||||
if test -n "$export_symbols" && test -z "$export_symbols_regex"; then
|
||||
# exporting using user supplied symfile
|
||||
func_dll_def_p "$export_symbols" || {
|
||||
@@ -10330,7 +10348,7 @@ EOF
|
||||
esac
|
||||
fi
|
||||
case $host in
|
||||
*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*)
|
||||
*-*-cygwin* | *-*-mingw* | *-*-windows* | *-*-pw32* | *-*-os2* | *-cegcc*)
|
||||
testbindir=`$ECHO "$libdir" | $SED -e 's*/lib$*/bin*'`
|
||||
case :$dllsearchpath: in
|
||||
*":$libdir:"*) ;;
|
||||
@@ -10408,7 +10426,7 @@ EOF
|
||||
# Disable wrappers for cegcc and mingw32ce hosts, we are cross compiling anyway.
|
||||
wrappers_required=false
|
||||
;;
|
||||
*cygwin* | *mingw* )
|
||||
*cygwin* | *mingw* | *windows* )
|
||||
test yes = "$build_libtool_libs" || wrappers_required=false
|
||||
;;
|
||||
*)
|
||||
@@ -10561,7 +10579,7 @@ EOF
|
||||
*) exeext= ;;
|
||||
esac
|
||||
case $host in
|
||||
*cygwin* | *mingw* )
|
||||
*cygwin* | *mingw* | windows* )
|
||||
func_dirname_and_basename "$output" "" "."
|
||||
output_name=$func_basename_result
|
||||
output_path=$func_dirname_result
|
||||
@@ -10893,7 +10911,7 @@ EOF
|
||||
# tests/bindir.at for full details.
|
||||
tdlname=$dlname
|
||||
case $host,$output,$installed,$module,$dlname in
|
||||
*cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll)
|
||||
*cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | *windows*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll)
|
||||
# If a -bindir argument was supplied, place the dll there.
|
||||
if test -n "$bindir"; then
|
||||
func_relative_path "$install_libdir" "$bindir"
|
||||
|
108
build-scripts/release-info.json
Normal file
108
build-scripts/release-info.json
Normal file
@@ -0,0 +1,108 @@
|
||||
{
|
||||
"name": "SDL2",
|
||||
"remote": "libsdl-org/SDL",
|
||||
"version": {
|
||||
"file": "include/SDL_version.h",
|
||||
"re_major": "^#define SDL_MAJOR_VERSION\\s+([0-9]+)$",
|
||||
"re_minor": "^#define SDL_MINOR_VERSION\\s+([0-9]+)$",
|
||||
"re_micro": "^#define SDL_PATCHLEVEL\\s+([0-9]+)$"
|
||||
},
|
||||
"source": {
|
||||
"checks": [
|
||||
"src/SDL.c",
|
||||
"include/SDL.h",
|
||||
"test/testsprite2.c",
|
||||
"android-project/app/src/main/java/org/libsdl/app/SDLActivity.java"
|
||||
]
|
||||
},
|
||||
"dmg": {
|
||||
"project": "Xcode/SDL/SDL.xcodeproj",
|
||||
"path": "Xcode/SDL/build/SDL2.dmg",
|
||||
"target": "Standard DMG"
|
||||
},
|
||||
"mingw": {
|
||||
"autotools": {
|
||||
"archs": ["x86", "x64"],
|
||||
"args": [
|
||||
],
|
||||
"files": {
|
||||
"@<@TRIPLET@>@/include/SDL2": [
|
||||
"include/SDL_config*.h"
|
||||
]
|
||||
}
|
||||
},
|
||||
"files": {
|
||||
"": [
|
||||
"mingw/pkg-support/INSTALL.txt",
|
||||
"mingw/pkg-support/Makefile",
|
||||
"BUGS.txt",
|
||||
"CREDITS.txt",
|
||||
"README-SDL.txt",
|
||||
"WhatsNew.txt",
|
||||
"LICENSE.txt",
|
||||
"README.md"
|
||||
],
|
||||
"cmake": [
|
||||
"mingw/pkg-support/cmake/sdl2-config.cmake",
|
||||
"mingw/pkg-support/cmake/sdl2-config-version.cmake"
|
||||
],
|
||||
"docs": [
|
||||
"docs/*"
|
||||
],
|
||||
"test": [
|
||||
"test/*"
|
||||
]
|
||||
}
|
||||
},
|
||||
"msvc": {
|
||||
"msbuild": {
|
||||
"archs": [
|
||||
"x86",
|
||||
"x64"
|
||||
],
|
||||
"projects": [
|
||||
"VisualC/SDL/SDL.vcxproj",
|
||||
"VisualC/SDLmain/SDLmain.vcxproj",
|
||||
"VisualC/SDLtest/SDLtest.vcxproj"
|
||||
],
|
||||
"files-lib": {
|
||||
"": [
|
||||
"VisualC/SDL/@<@PLATFORM@>@/@<@CONFIGURATION@>@/SDL2.dll"
|
||||
]
|
||||
},
|
||||
"files-devel": {
|
||||
"lib/@<@ARCH@>@": [
|
||||
"VisualC/SDL/@<@PLATFORM@>@/@<@CONFIGURATION@>@/SDL2.dll",
|
||||
"VisualC/SDL/@<@PLATFORM@>@/@<@CONFIGURATION@>@/SDL2.lib",
|
||||
"VisualC/SDL/@<@PLATFORM@>@/@<@CONFIGURATION@>@/SDL2.pdb",
|
||||
"VisualC/SDLmain/@<@PLATFORM@>@/@<@CONFIGURATION@>@/SDL2main.lib",
|
||||
"VisualC/SDLtest/@<@PLATFORM@>@/@<@CONFIGURATION@>@/SDL2test.lib"
|
||||
]
|
||||
}
|
||||
},
|
||||
"files-lib": {
|
||||
"": [
|
||||
"README-SDL.txt"
|
||||
]
|
||||
},
|
||||
"files-devel": {
|
||||
"": [
|
||||
"README-SDL.txt",
|
||||
"BUGS.txt",
|
||||
"LICENSE.txt",
|
||||
"README.md",
|
||||
"WhatsNew.txt"
|
||||
],
|
||||
"cmake": [
|
||||
"VisualC/pkg-support/cmake/sdl2-config.cmake",
|
||||
"VisualC/pkg-support/cmake/sdl2-config-version.cmake"
|
||||
],
|
||||
"docs": [
|
||||
"docs/*"
|
||||
],
|
||||
"include": [
|
||||
"include/*.h"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
303
build-scripts/setup-gdk-desktop.py
Normal file
303
build-scripts/setup-gdk-desktop.py
Normal file
@@ -0,0 +1,303 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
import argparse
|
||||
import functools
|
||||
import logging
|
||||
import os
|
||||
from pathlib import Path
|
||||
import re
|
||||
import shutil
|
||||
import subprocess
|
||||
import tempfile
|
||||
import textwrap
|
||||
import urllib.request
|
||||
import zipfile
|
||||
|
||||
# Update both variables when updating the GDK
|
||||
GIT_REF = "June_2024_Update_1"
|
||||
GDK_EDITION = "240601" # YYMMUU
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
class GdDesktopConfigurator:
|
||||
def __init__(self, gdk_path, arch, vs_folder, vs_version=None, vs_toolset=None, temp_folder=None, git_ref=None, gdk_edition=None):
|
||||
self.git_ref = git_ref or GIT_REF
|
||||
self.gdk_edition = gdk_edition or GDK_EDITION
|
||||
self.gdk_path = gdk_path
|
||||
self.temp_folder = temp_folder or Path(tempfile.gettempdir())
|
||||
self.dl_archive_path = Path(self.temp_folder) / f"{ self.git_ref }.zip"
|
||||
self.gdk_extract_path = Path(self.temp_folder) / f"GDK-{ self.git_ref }"
|
||||
self.arch = arch
|
||||
self.vs_folder = vs_folder
|
||||
self._vs_version = vs_version
|
||||
self._vs_toolset = vs_toolset
|
||||
|
||||
def download_archive(self) -> None:
|
||||
gdk_url = f"https://github.com/microsoft/GDK/archive/refs/tags/{ GIT_REF }.zip"
|
||||
logger.info("Downloading %s to %s", gdk_url, self.dl_archive_path)
|
||||
urllib.request.urlretrieve(gdk_url, self.dl_archive_path)
|
||||
assert self.dl_archive_path.is_file()
|
||||
|
||||
def extract_zip_archive(self) -> None:
|
||||
extract_path = self.gdk_extract_path.parent
|
||||
assert self.dl_archive_path.is_file()
|
||||
logger.info("Extracting %s to %s", self.dl_archive_path, extract_path)
|
||||
with zipfile.ZipFile(self.dl_archive_path) as zf:
|
||||
zf.extractall(extract_path)
|
||||
assert self.gdk_extract_path.is_dir(), f"{self.gdk_extract_path} must exist"
|
||||
|
||||
def extract_development_kit(self) -> None:
|
||||
extract_dks_cmd = self.gdk_extract_path / "SetupScripts/ExtractXboxOneDKs.cmd"
|
||||
assert extract_dks_cmd.is_file()
|
||||
logger.info("Extracting GDK Development Kit: running %s", extract_dks_cmd)
|
||||
cmd = ["cmd.exe", "/C", str(extract_dks_cmd), str(self.gdk_extract_path), str(self.gdk_path)]
|
||||
logger.debug("Running %r", cmd)
|
||||
subprocess.check_call(cmd)
|
||||
|
||||
def detect_vs_version(self) -> str:
|
||||
vs_regex = re.compile("VS([0-9]{4})")
|
||||
supported_vs_versions = []
|
||||
for p in self.gaming_grdk_build_path.iterdir():
|
||||
if not p.is_dir():
|
||||
continue
|
||||
if m := vs_regex.match(p.name):
|
||||
supported_vs_versions.append(m.group(1))
|
||||
logger.info(f"Supported Visual Studio versions: {supported_vs_versions}")
|
||||
vs_versions = set(self.vs_folder.parts).intersection(set(supported_vs_versions))
|
||||
if not vs_versions:
|
||||
raise RuntimeError("Visual Studio version is incompatible")
|
||||
if len(vs_versions) > 1:
|
||||
raise RuntimeError(f"Too many compatible VS versions found ({vs_versions})")
|
||||
vs_version = vs_versions.pop()
|
||||
logger.info(f"Used Visual Studio version: {vs_version}")
|
||||
return vs_version
|
||||
|
||||
def detect_vs_toolset(self) -> str:
|
||||
toolset_paths = []
|
||||
for ts_path in self.gdk_toolset_parent_path.iterdir():
|
||||
if not ts_path.is_dir():
|
||||
continue
|
||||
ms_props = ts_path / "Microsoft.Cpp.props"
|
||||
if not ms_props.is_file():
|
||||
continue
|
||||
toolset_paths.append(ts_path.name)
|
||||
logger.info("Detected Visual Studio toolsets: %s", toolset_paths)
|
||||
assert toolset_paths, "Have we detected at least one toolset?"
|
||||
|
||||
def toolset_number(toolset: str) -> int:
|
||||
if m:= re.match("[^0-9]*([0-9]+).*", toolset):
|
||||
return int(m.group(1))
|
||||
return -9
|
||||
|
||||
return max(toolset_paths, key=toolset_number)
|
||||
|
||||
@property
|
||||
def vs_version(self) -> str:
|
||||
if self._vs_version is None:
|
||||
self._vs_version = self.detect_vs_version()
|
||||
return self._vs_version
|
||||
|
||||
@property
|
||||
def vs_toolset(self) -> str:
|
||||
if self._vs_toolset is None:
|
||||
self._vs_toolset = self.detect_vs_toolset()
|
||||
return self._vs_toolset
|
||||
|
||||
@staticmethod
|
||||
def copy_files_and_merge_into(srcdir: Path, dstdir: Path) -> None:
|
||||
logger.info(f"Copy {srcdir} to {dstdir}")
|
||||
for root, _, files in os.walk(srcdir):
|
||||
dest_root = dstdir / Path(root).relative_to(srcdir)
|
||||
if not dest_root.is_dir():
|
||||
dest_root.mkdir()
|
||||
for file in files:
|
||||
srcfile = Path(root) / file
|
||||
dstfile = dest_root / file
|
||||
shutil.copy(srcfile, dstfile)
|
||||
|
||||
def copy_msbuild(self) -> None:
|
||||
vc_toolset_parent_path = self.vs_folder / "MSBuild/Microsoft/VC"
|
||||
if 1:
|
||||
logger.info(f"Detected compatible Visual Studio version: {self.vs_version}")
|
||||
srcdir = vc_toolset_parent_path
|
||||
dstdir = self.gdk_toolset_parent_path
|
||||
assert srcdir.is_dir(), "Source directory must exist"
|
||||
assert dstdir.is_dir(), "Destination directory must exist"
|
||||
|
||||
self.copy_files_and_merge_into(srcdir=srcdir, dstdir=dstdir)
|
||||
|
||||
@property
|
||||
def game_dk_path(self) -> Path:
|
||||
return self.gdk_path / "Microsoft GDK"
|
||||
|
||||
@property
|
||||
def game_dk_latest_path(self) -> Path:
|
||||
return self.game_dk_path / self.gdk_edition
|
||||
|
||||
@property
|
||||
def windows_sdk_path(self) -> Path:
|
||||
return self.gdk_path / "Windows Kits/10"
|
||||
|
||||
@property
|
||||
def gaming_grdk_build_path(self) -> Path:
|
||||
return self.game_dk_latest_path / "GRDK"
|
||||
|
||||
@property
|
||||
def gdk_toolset_parent_path(self) -> Path:
|
||||
return self.gaming_grdk_build_path / f"VS{self.vs_version}/flatDeployment/MSBuild/Microsoft/VC"
|
||||
|
||||
@property
|
||||
def env(self) -> dict[str, str]:
|
||||
game_dk = self.game_dk_path
|
||||
game_dk_latest = self.game_dk_latest_path
|
||||
windows_sdk_dir = self.windows_sdk_path
|
||||
gaming_grdk_build = self.gaming_grdk_build_path
|
||||
|
||||
return {
|
||||
"GRDKEDITION": f"{self.gdk_edition}",
|
||||
"GameDK": f"{game_dk}\\",
|
||||
"GameDKLatest": f"{ game_dk_latest }\\",
|
||||
"WindowsSdkDir": f"{ windows_sdk_dir }\\",
|
||||
"GamingGRDKBuild": f"{ gaming_grdk_build }\\",
|
||||
"VSInstallDir": f"{ self.vs_folder }\\",
|
||||
}
|
||||
|
||||
def create_user_props(self, path: Path) -> None:
|
||||
vc_targets_path = self.gaming_grdk_build_path / f"VS{ self.vs_version }/flatDeployment/MSBuild/Microsoft/VC/{ self.vs_toolset }"
|
||||
vc_targets_path16 = self.gaming_grdk_build_path / f"VS2019/flatDeployment/MSBuild/Microsoft/VC/{ self.vs_toolset }"
|
||||
vc_targets_path17 = self.gaming_grdk_build_path / f"VS2022/flatDeployment/MSBuild/Microsoft/VC/{ self.vs_toolset }"
|
||||
additional_include_directories = ";".join(str(p) for p in self.gdk_include_paths)
|
||||
additional_library_directories = ";".join(str(p) for p in self.gdk_library_paths)
|
||||
durango_xdk_install_path = self.gdk_path / "Microsoft GDK"
|
||||
with path.open("w") as f:
|
||||
f.write(textwrap.dedent(f"""\
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<VCTargetsPath>{ vc_targets_path }\\</VCTargetsPath>
|
||||
<VCTargetsPath16>{ vc_targets_path16 }\\</VCTargetsPath16>
|
||||
<VCTargetsPath17>{ vc_targets_path17 }\\</VCTargetsPath17>
|
||||
<BWOI_GDK_Path>{ self.gaming_grdk_build_path }\\</BWOI_GDK_Path>
|
||||
<Platform Condition="'$(Platform)' == ''">Gaming.Desktop.x64</Platform>
|
||||
<Configuration Condition="'$(Configuration)' == ''">Debug</Configuration>
|
||||
<XdkEditionTarget>{ self.gdk_edition }</XdkEditionTarget>
|
||||
<DurangoXdkInstallPath>{ durango_xdk_install_path }</DurangoXdkInstallPath>
|
||||
|
||||
<DefaultXdkEditionRootVS2019>$(DurangoXdkInstallPath)\\{self.gdk_edition}\\GRDK\\VS2019\\flatDeployment\\MSBuild\\Microsoft\\VC\\{self.vs_toolset}\\Platforms\\$(Platform)\\</DefaultXdkEditionRootVS2019>
|
||||
<XdkEditionRootVS2019>$(DurangoXdkInstallPath)\\{self.gdk_edition}\\GRDK\\VS2019\\flatDeployment\\MSBuild\\Microsoft\\VC\\{self.vs_toolset}\\Platforms\\$(Platform)\\</XdkEditionRootVS2019>
|
||||
<DefaultXdkEditionRootVS2022>$(DurangoXdkInstallPath)\\{self.gdk_edition}\\GRDK\\VS2022\\flatDeployment\\MSBuild\\Microsoft\\VC\\{self.vs_toolset}\\Platforms\\$(Platform)\\</DefaultXdkEditionRootVS2022>
|
||||
<XdkEditionRootVS2022>$(DurangoXdkInstallPath)\\{self.gdk_edition}\\GRDK\\VS2022\\flatDeployment\\MSBuild\\Microsoft\\VC\\{self.vs_toolset}\\Platforms\\$(Platform)\\</XdkEditionRootVS2022>
|
||||
|
||||
<Deterministic>true</Deterministic>
|
||||
<DisableInstalledVCTargetsUse>true</DisableInstalledVCTargetsUse>
|
||||
<ClearDevCommandPromptEnvVars>true</ClearDevCommandPromptEnvVars>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Platform)' == 'Gaming.Desktop.x64'">
|
||||
<ClCompile>
|
||||
<AdditionalIncludeDirectories>{ additional_include_directories };%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalLibraryDirectories>{ additional_library_directories };%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
</Project>
|
||||
"""))
|
||||
|
||||
@property
|
||||
def gdk_include_paths(self) -> list[Path]:
|
||||
return [
|
||||
self.gaming_grdk_build_path / "gamekit/include",
|
||||
]
|
||||
|
||||
@property
|
||||
def gdk_library_paths(self) -> list[Path]:
|
||||
return [
|
||||
self.gaming_grdk_build_path / f"gamekit/lib/{self.arch}",
|
||||
]
|
||||
|
||||
@property
|
||||
def gdk_binary_path(self) -> list[Path]:
|
||||
return [
|
||||
self.gaming_grdk_build_path / "bin",
|
||||
self.game_dk_path / "bin",
|
||||
]
|
||||
|
||||
@property
|
||||
def build_env(self) -> dict[str, str]:
|
||||
gdk_include = ";".join(str(p) for p in self.gdk_include_paths)
|
||||
gdk_lib = ";".join(str(p) for p in self.gdk_library_paths)
|
||||
gdk_path = ";".join(str(p) for p in self.gdk_binary_path)
|
||||
return {
|
||||
"GDK_INCLUDE": gdk_include,
|
||||
"GDK_LIB": gdk_lib,
|
||||
"GDK_PATH": gdk_path,
|
||||
}
|
||||
|
||||
def print_env(self) -> None:
|
||||
for k, v in self.env.items():
|
||||
print(f"set \"{k}={v}\"")
|
||||
print()
|
||||
for k, v in self.build_env.items():
|
||||
print(f"set \"{k}={v}\"")
|
||||
print()
|
||||
print(f"set \"PATH=%GDK_PATH%;%PATH%\"")
|
||||
print(f"set \"LIB=%GDK_LIB%;%LIB%\"")
|
||||
print(f"set \"INCLUDE=%GDK_INCLUDE%;%INCLUDE%\"")
|
||||
|
||||
|
||||
def main():
|
||||
logging.basicConfig(level=logging.INFO)
|
||||
parser = argparse.ArgumentParser(allow_abbrev=False)
|
||||
parser.add_argument("--arch", choices=["amd64"], default="amd64", help="Architecture")
|
||||
parser.add_argument("--download", action="store_true", help="Download GDK")
|
||||
parser.add_argument("--extract", action="store_true", help="Extract downloaded GDK")
|
||||
parser.add_argument("--copy-msbuild", action="store_true", help="Copy MSBuild files")
|
||||
parser.add_argument("--temp-folder", help="Temporary folder where to download and extract GDK")
|
||||
parser.add_argument("--gdk-path", required=True, type=Path, help="Folder where to store the GDK")
|
||||
parser.add_argument("--ref-edition", type=str, help="Git ref and GDK edition separated by comma")
|
||||
parser.add_argument("--vs-folder", required=True, type=Path, help="Installation folder of Visual Studio")
|
||||
parser.add_argument("--vs-version", required=False, type=int, help="Visual Studio version")
|
||||
parser.add_argument("--vs-toolset", required=False, help="Visual Studio toolset (e.g. v150)")
|
||||
parser.add_argument("--props-folder", required=False, type=Path, default=Path(), help="Visual Studio toolset (e.g. v150)")
|
||||
parser.add_argument("--no-user-props", required=False, dest="user_props", action="store_false", help="Don't ")
|
||||
args = parser.parse_args()
|
||||
|
||||
logging.basicConfig(level=logging.INFO)
|
||||
|
||||
git_ref = None
|
||||
gdk_edition = None
|
||||
if args.ref_edition is not None:
|
||||
git_ref, gdk_edition = args.ref_edition.split(",", 1)
|
||||
try:
|
||||
int(gdk_edition)
|
||||
except ValueError:
|
||||
parser.error("Edition should be an integer (YYMMUU) (Y=year M=month U=update)")
|
||||
|
||||
configurator = GdDesktopConfigurator(
|
||||
arch=args.arch,
|
||||
git_ref=git_ref,
|
||||
gdk_edition=gdk_edition,
|
||||
vs_folder=args.vs_folder,
|
||||
vs_version=args.vs_version,
|
||||
vs_toolset=args.vs_toolset,
|
||||
gdk_path=args.gdk_path,
|
||||
temp_folder=args.temp_folder,
|
||||
)
|
||||
|
||||
if args.download:
|
||||
configurator.download_archive()
|
||||
|
||||
if args.extract:
|
||||
configurator.extract_zip_archive()
|
||||
|
||||
configurator.extract_development_kit()
|
||||
|
||||
if args.copy_msbuild:
|
||||
configurator.copy_msbuild()
|
||||
|
||||
if args.user_props:
|
||||
configurator.print_env()
|
||||
configurator.create_user_props(args.props_folder / "Directory.Build.props")
|
||||
|
||||
if __name__ == "__main__":
|
||||
raise SystemExit(main())
|
@@ -5,8 +5,8 @@
|
||||
SDL_ROOT=$(dirname $0)/..
|
||||
cd $SDL_ROOT
|
||||
|
||||
if [ -e ./VERSION.txt ]; then
|
||||
cat ./VERSION.txt
|
||||
if [ -e ./REVISION.txt ]; then
|
||||
cat ./REVISION.txt
|
||||
exit 0
|
||||
fi
|
||||
|
||||
|
@@ -1,7 +1,15 @@
|
||||
#!/bin/sh
|
||||
|
||||
find . -type f -exec grep -Il "Copyright" {} \; \
|
||||
if [ "$SED" = "" ]; then
|
||||
if type gsed >/dev/null; then
|
||||
SED=gsed
|
||||
else
|
||||
SED=sed
|
||||
fi
|
||||
fi
|
||||
|
||||
find . -type f \
|
||||
| grep -v \.git \
|
||||
| while read file; do \
|
||||
LC_ALL=C sed -b -i "s/\(.*Copyright.*\)[0-9]\{4\}\( *Sam Lantinga\)/\1`date +%Y`\2/" "$file"; \
|
||||
LC_ALL=C $SED -b -i "s/\(.*Copyright.*\)[0-9]\{4\}\( *Sam Lantinga\)/\1`date +%Y`\2/" "$file"; \
|
||||
done
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user