mirror of
https://github.com/kichikuou/xsystem35-sdl2.git
synced 2026-09-22 22:48:08 +03:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ade76adda6 | ||
|
|
53d0e8ffef | ||
|
|
b2e14bd19a | ||
|
|
9c73a34c35 | ||
|
|
36e1dc152b | ||
|
|
f786db5a50 | ||
|
|
c515b21afb | ||
|
|
d3db3fa83e | ||
|
|
86068b0ab9 | ||
|
|
de4f3ebb0d | ||
|
|
187a3ced35 | ||
|
|
b7703b6270 | ||
|
|
b7d0efbe55 | ||
|
|
02fe55eb93 | ||
|
|
058789b435 | ||
|
|
c5dcb20ac3 | ||
|
|
cb08f7ca76 | ||
|
|
7a7d94e60f | ||
|
|
b7681982a6 | ||
|
|
fefaf6c343 | ||
|
|
42e994dfba | ||
|
|
a6aa50b5cf | ||
|
|
c4e8205d6c | ||
|
|
dd09f54329 | ||
|
|
435ceb31d3 | ||
|
|
e40de66821 | ||
|
|
73c79b7a2e | ||
|
|
a825ee80b3 | ||
|
|
eeeab6e054 | ||
|
|
875b233f32 | ||
|
|
bcaed3a687 | ||
|
|
894e8e26a6 | ||
|
|
7206b0a4f7 | ||
|
|
343f3bb7c5 | ||
|
|
d3650ce293 | ||
|
|
386cfeb60c | ||
|
|
9cd66c83ef | ||
|
|
065e16a082 | ||
|
|
3699aa5c2d | ||
|
|
20914970c9 | ||
|
|
3f2f555aa6 | ||
|
|
095da0bb86 | ||
|
|
7b8acd6e05 | ||
|
|
1b13e331e4 | ||
|
|
5621ab4d86 | ||
|
|
79805d9ea2 | ||
|
|
f427d50fa3 | ||
|
|
7c7768fba4 | ||
|
|
2b6267aeb9 | ||
|
|
16e7d3baf1 | ||
|
|
2d8d95ac6f | ||
|
|
d5899ff55a | ||
|
|
04037682ee | ||
|
|
cdb16f73a3 | ||
|
|
2895e338c0 | ||
|
|
1a2268e94b | ||
|
|
07643c82a4 | ||
|
|
a16156f8e4 | ||
|
|
ea5cef91fd | ||
|
|
48a41b9f82 | ||
|
|
c11c80d95d | ||
|
|
d7082a9d80 | ||
|
|
083cf885de | ||
|
|
7b1fef4ad7 | ||
|
|
f039baf061 | ||
|
|
22c6b8e963 | ||
|
|
576afecbfc | ||
|
|
4e28d92a2d | ||
|
|
22192c245f | ||
|
|
409fa83406 | ||
|
|
894b0592f4 | ||
|
|
370100a6f2 | ||
|
|
18cfbc90f2 | ||
|
|
cd51dc7f02 | ||
|
|
e2638ed840 | ||
|
|
6607815df3 | ||
|
|
77ed85aff7 | ||
|
|
3b1a311f32 | ||
|
|
1b3c2190b8 | ||
|
|
52e2d6095a | ||
|
|
47e2fcaec0 | ||
|
|
183ceb614a | ||
|
|
185e62010b | ||
|
|
6f647701dd | ||
|
|
a9c79b2e31 | ||
|
|
ba52fbf5e9 | ||
|
|
85d40701c4 | ||
|
|
7b535b371a | ||
|
|
c0dbae8202 | ||
|
|
ca03450b87 | ||
|
|
f795a500cf | ||
|
|
3314f00bf8 | ||
|
|
a2d79f045c | ||
|
|
f247495578 | ||
|
|
f6583330de | ||
|
|
4b15f45897 | ||
|
|
7bc433731f | ||
|
|
4c21570eb1 | ||
|
|
a3e7feffc2 | ||
|
|
a4c1dd1acf | ||
|
|
09086ccc85 | ||
|
|
53e39b7c11 | ||
|
|
f0ccfee40f | ||
|
|
10cdec98e6 | ||
|
|
c61afb4308 | ||
|
|
f6cf881e61 | ||
|
|
a8277e71a7 | ||
|
|
3482fb6440 | ||
|
|
3c81c8fec2 | ||
|
|
e090485b37 | ||
|
|
d7deaec972 | ||
|
|
30467371f4 | ||
|
|
e9a30f7493 | ||
|
|
d9e42dd4bb | ||
|
|
0e06cc1e22 | ||
|
|
89423c94f1 | ||
|
|
c694d2282c | ||
|
|
39e94afc44 | ||
|
|
e37a491908 | ||
|
|
43dff9a9e4 | ||
|
|
e6b3d6094d | ||
|
|
61ad4282e6 | ||
|
|
e4628d8bbb | ||
|
|
21bd4279a1 | ||
|
|
b6c33fd761 | ||
|
|
1b9d8c48f1 | ||
|
|
55ef307e07 | ||
|
|
894cd51e01 | ||
|
|
880244020e | ||
|
|
9c2f423399 | ||
|
|
654a489f49 | ||
|
|
912af592ae | ||
|
|
6d70439dff | ||
|
|
aec06f775a | ||
|
|
446ffe9466 | ||
|
|
02cad74568 | ||
|
|
33e1ff3b4a | ||
|
|
11f8f00072 | ||
|
|
b59d683fef | ||
|
|
b9f4c7c03a | ||
|
|
2d2c6aa373 | ||
|
|
850af6d140 | ||
|
|
da4cf017bf | ||
|
|
e88dfcdaa1 | ||
|
|
70a940b216 | ||
|
|
db2bb03fdd | ||
|
|
5ef949ae14 | ||
|
|
043028cf7d | ||
|
|
eace5d1dbd | ||
|
|
878bea69d6 | ||
|
|
ae8becc4a3 | ||
|
|
1d863cfb2e | ||
|
|
7bb2bee693 | ||
|
|
47e7f5542e | ||
|
|
8087d11b2b | ||
|
|
4f1521ac90 | ||
|
|
99632397da | ||
|
|
59283815d8 | ||
|
|
a32c901eb8 | ||
|
|
03b84b8ba7 | ||
|
|
720da4e42c | ||
|
|
c4dc799c94 | ||
|
|
ce271ae5eb | ||
|
|
526e5f8709 | ||
|
|
c967e63be9 | ||
|
|
d4a32aee17 | ||
|
|
1191723612 | ||
|
|
addf2e3728 | ||
|
|
4785c8c77c | ||
|
|
b1ac106057 | ||
|
|
acdc40ec60 | ||
|
|
d9f635a6d0 | ||
|
|
e8357c4e6f | ||
|
|
8e44a87069 | ||
|
|
d1befbd355 | ||
|
|
ec0bae5490 | ||
|
|
f5b3b1a936 | ||
|
|
1b546e3bab | ||
|
|
d454899048 | ||
|
|
7aa704b3f4 | ||
|
|
50d7d7ee33 | ||
|
|
586a9c855e | ||
|
|
9600e34229 | ||
|
|
001c97ea00 | ||
|
|
b100dbe26c | ||
|
|
55e38f9db2 | ||
|
|
ddf6fba393 | ||
|
|
83fa5db82c | ||
|
|
1807cf0c26 | ||
|
|
5906079d3f | ||
|
|
7fba19fe18 | ||
|
|
8de86e276d | ||
|
|
64a5f47258 | ||
|
|
29a139c8a1 | ||
|
|
b53c82e072 | ||
|
|
307bb2623b | ||
|
|
d1712ab7b4 | ||
|
|
7c24ba276d | ||
|
|
c8f9880efb | ||
|
|
d508676c70 | ||
|
|
92506d6a94 | ||
|
|
0a37920c95 | ||
|
|
fa44889047 | ||
|
|
cee18a572e | ||
|
|
652d284628 | ||
|
|
d2661e97f1 | ||
|
|
0e9afe7c0a | ||
|
|
fbe8af5f7b | ||
|
|
0c1f8f8450 | ||
|
|
078525e2c2 | ||
|
|
d4a4022894 | ||
|
|
dc89c92139 | ||
|
|
4f351fc767 | ||
|
|
02ef4a1771 | ||
|
|
4a20d74f1a | ||
|
|
c9663c5cfc | ||
|
|
5c7e92391c | ||
|
|
0a15e6490f | ||
|
|
fe294bd34b | ||
|
|
e26779a189 | ||
|
|
f9b5fec03d | ||
|
|
d63e3503e7 | ||
|
|
3dd38959a3 | ||
|
|
f56ec88cda | ||
|
|
9706f516f9 | ||
|
|
b15690d9b7 | ||
|
|
26db7f46f5 | ||
|
|
1cf0dbc7e2 | ||
|
|
3f36eeee4c | ||
|
|
ff62533faf | ||
|
|
f60b21bc19 | ||
|
|
8fac291e84 | ||
|
|
782a9e5925 | ||
|
|
c8f1ef2b9e | ||
|
|
6184e93965 | ||
|
|
3377441caf | ||
|
|
d243358b48 | ||
|
|
9e82445ace | ||
|
|
a6109b6210 | ||
|
|
901a3bb28c | ||
|
|
f1b80d7086 | ||
|
|
f1fb50841c | ||
|
|
f97259bc30 | ||
|
|
3eccaa6165 | ||
|
|
42b9d43a70 | ||
|
|
a7800e652c | ||
|
|
1c2e395e88 | ||
|
|
c67198cc0e | ||
|
|
fc80275944 | ||
|
|
76db37756b | ||
|
|
4c022cf505 | ||
|
|
1c3dccb349 | ||
|
|
63c456329f | ||
|
|
141b754340 | ||
|
|
45612feb79 | ||
|
|
605de284e9 | ||
|
|
0b71a84bb0 | ||
|
|
933cf5b6a3 | ||
|
|
c15e7233b4 | ||
|
|
bad6b90e23 | ||
|
|
83989f1a0e | ||
|
|
cc9aa1e7c0 | ||
|
|
d1d943d2a5 | ||
|
|
6c59122c59 | ||
|
|
a6cbf243c7 | ||
|
|
a89ed4ba29 | ||
|
|
135cd6b8c4 | ||
|
|
b6a69deab7 | ||
|
|
eea1f9c93a | ||
|
|
47d23d4ee7 | ||
|
|
10b414fb4e | ||
|
|
49e707e40e | ||
|
|
9655a9106d | ||
|
|
d35a24f142 | ||
|
|
d945dfe77d | ||
|
|
a224d89233 | ||
|
|
debabaf686 | ||
|
|
bc97e4c826 | ||
|
|
c4d74d659a | ||
|
|
4daaa5ede5 | ||
|
|
9ea1a81cc1 | ||
|
|
0a1d0a5a76 | ||
|
|
5fefd74d4a | ||
|
|
d03568c3ff | ||
|
|
8dc49fee71 | ||
|
|
1b907e904f | ||
|
|
82963e8293 | ||
|
|
3ccf59a94e | ||
|
|
2f9ce8cec8 | ||
|
|
3ff022c73e | ||
|
|
9ad1059ced | ||
|
|
2d026c6122 | ||
|
|
b68c217554 | ||
|
|
7e09c14660 | ||
|
|
2db403a692 | ||
|
|
850fa96933 | ||
|
|
e1e1e5cacc | ||
|
|
d7dd98a8ca | ||
|
|
f11dbc7400 | ||
|
|
3b52efb752 | ||
|
|
93f01efdb5 | ||
|
|
3012412a5d | ||
|
|
91fa4284c4 | ||
|
|
93d29b5f87 | ||
|
|
b6cdba145f | ||
|
|
38a40e82f3 | ||
|
|
d29a764de2 | ||
|
|
0d74454355 | ||
|
|
1a248ea897 | ||
|
|
556b9687ca | ||
|
|
8be63b7f11 | ||
|
|
8c963f4dcf | ||
|
|
87316495e8 | ||
|
|
45b50fe78a | ||
|
|
c31da0fe10 | ||
|
|
0d376a3d35 | ||
|
|
ff9710426f | ||
|
|
aa537687c4 | ||
|
|
ae30b73333 | ||
|
|
28ac087bca | ||
|
|
fc3d66195f | ||
|
|
f7ca54104b | ||
|
|
d8513d78e4 | ||
|
|
d0ad06e7c5 | ||
|
|
cae31a72d1 | ||
|
|
1405c8693b | ||
|
|
5c5a71237c | ||
|
|
0a82376cfd | ||
|
|
e08ba5fb03 | ||
|
|
ca1e47c093 | ||
|
|
0bbb6fbeae | ||
|
|
f9d753d46a | ||
|
|
117b81bf86 | ||
|
|
f311ccb15e | ||
|
|
fd4c8fb4d3 | ||
|
|
4832b0ab84 | ||
|
|
69f5e8f538 | ||
|
|
7cb8896685 | ||
|
|
0ecc4edb43 | ||
|
|
162bf8dc25 | ||
|
|
7f6ab44e96 | ||
|
|
e9abf1f4d8 | ||
|
|
828cb047ba | ||
|
|
bc06099e01 | ||
|
|
6c87a9155b | ||
|
|
8e4070e91e | ||
|
|
78cc181271 | ||
|
|
af256b8a83 | ||
|
|
0e3ea590c6 | ||
|
|
2936212967 | ||
|
|
e83f4da24f | ||
|
|
066295df2f | ||
|
|
40a4d8b2f6 | ||
|
|
0793b57e3c | ||
|
|
089520ec55 | ||
|
|
4bea33d852 | ||
|
|
6930acd3b1 | ||
|
|
f9a3ef8606 | ||
|
|
841deb6f81 | ||
|
|
d713e1470e | ||
|
|
6268cb6a9b | ||
|
|
a5aa8d0672 | ||
|
|
f8b7adf3d0 | ||
|
|
3e46c54ce6 | ||
|
|
0925ee86e0 | ||
|
|
7a77470a19 | ||
|
|
068a2910b5 | ||
|
|
6ef699e87d | ||
|
|
d6dd7d34b7 | ||
|
|
a4f0e18d70 | ||
|
|
80bd68214b | ||
|
|
4143cfc83b | ||
|
|
541cd22e56 | ||
|
|
d82175c9f5 | ||
|
|
21e43b5cc7 | ||
|
|
5283a0aa5d | ||
|
|
91d30c9b13 | ||
|
|
f66ebff002 | ||
|
|
98e1355461 | ||
|
|
35b1b12ab6 | ||
|
|
1e2ea9821c | ||
|
|
e5fab0f198 | ||
|
|
2e2fbbaa1b | ||
|
|
fb44e5b1e3 | ||
|
|
6690687d0f | ||
|
|
26c9f663ca | ||
|
|
d5a7040b54 | ||
|
|
3280d6073b | ||
|
|
ca09dc7413 | ||
|
|
cc60fdfb7d | ||
|
|
ac703b3448 | ||
|
|
2c6a66af8f | ||
|
|
fdcc3de352 | ||
|
|
dda7d7f077 | ||
|
|
a159e7cb24 | ||
|
|
785f46be2a | ||
|
|
7ca3f2527e | ||
|
|
f6221a04ba | ||
|
|
7069343e57 | ||
|
|
9be7b0ab68 | ||
|
|
8779763615 | ||
|
|
869e2e34dd | ||
|
|
c0daba25a5 | ||
|
|
9775c4569d | ||
|
|
21444ac1c0 | ||
|
|
d61ce9a18e | ||
|
|
04c3e22339 | ||
|
|
92f8120e4a | ||
|
|
3613358b7b | ||
|
|
fc6651642d | ||
|
|
0b15fa3506 | ||
|
|
2f8dd2d6a5 | ||
|
|
4e2d81cf47 | ||
|
|
29c85aad36 | ||
|
|
cd77cbfbf1 | ||
|
|
e18bb6cb75 | ||
|
|
34e2d60ab4 | ||
|
|
8894dd40fa | ||
|
|
2529a5b61b | ||
|
|
ca41501f6d | ||
|
|
36a0e01dcd | ||
|
|
81906641e1 | ||
|
|
da1c136b39 | ||
|
|
9878f5ca74 | ||
|
|
6da3dfef55 | ||
|
|
be1f048b33 | ||
|
|
6d5831c4e8 | ||
|
|
5ec0c0a7be | ||
|
|
4b002c676c | ||
|
|
f0bd336da1 | ||
|
|
704cfda6ef | ||
|
|
c0de87d0d8 | ||
|
|
3964a1bc27 | ||
|
|
b765332c27 | ||
|
|
9f9805128f | ||
|
|
ba0d59d5a4 | ||
|
|
d531fa3994 | ||
|
|
4d5fd5efca | ||
|
|
89a4ba2bd2 | ||
|
|
163c23af81 | ||
|
|
48d937a0c3 | ||
|
|
4aff7a1df7 | ||
|
|
303510e5c0 | ||
|
|
c7263a3082 | ||
|
|
aea53c1079 | ||
|
|
32f1e1ef8a | ||
|
|
500fffaee2 | ||
|
|
ebe3762809 | ||
|
|
4fd00a9088 | ||
|
|
44d0ddcec7 | ||
|
|
9541f3f85a | ||
|
|
b5c8b158c6 | ||
|
|
8d91657c14 | ||
|
|
ebb249cd47 | ||
|
|
379ca744d5 | ||
|
|
b892189f8b | ||
|
|
f1b4c2550b | ||
|
|
79c9bfc85a | ||
|
|
042f333564 | ||
|
|
417baec290 | ||
|
|
ec270f2378 | ||
|
|
55837e5115 | ||
|
|
97b8bcb22a | ||
|
|
862f639e2e | ||
|
|
316a06a168 | ||
|
|
c9ec20dcc8 | ||
|
|
023b8cd455 | ||
|
|
335681863c | ||
|
|
ecba592d82 | ||
|
|
dbac18c260 | ||
|
|
ed8f610f80 | ||
|
|
f753cf8670 | ||
|
|
c3cc4f3e44 | ||
|
|
e57913bfc6 | ||
|
|
f941916fb2 | ||
|
|
f5248bda8a | ||
|
|
988a072964 | ||
|
|
775b34cf1a | ||
|
|
5455bce8d6 | ||
|
|
5e5defb6bc | ||
|
|
05cca544c6 | ||
|
|
38758569bb | ||
|
|
e417811a94 | ||
|
|
b509be2b64 | ||
|
|
fa845a6439 | ||
|
|
b3cb185a35 | ||
|
|
87413d54dc | ||
|
|
440fb93b08 | ||
|
|
6d1ef1ba6f | ||
|
|
dd1f0fd230 | ||
|
|
15fb122148 | ||
|
|
91a6cf7e67 | ||
|
|
dc8025469a | ||
|
|
0bbace898d | ||
|
|
c4e5ef3c36 | ||
|
|
e039fb3193 | ||
|
|
e547c153fc | ||
|
|
fef74da3dd | ||
|
|
7baab6b616 | ||
|
|
54b219e435 | ||
|
|
a20363b901 | ||
|
|
bc9fc924ed | ||
|
|
d8fbf9a8b1 | ||
|
|
077e4d32e0 | ||
|
|
652e4b9111 | ||
|
|
3cecc58607 | ||
|
|
f31742a503 | ||
|
|
e830190537 | ||
|
|
7d8458c86d | ||
|
|
dfc10a7f34 | ||
|
|
a5684cffa4 | ||
|
|
cfa9dc3502 | ||
|
|
f978c43ee1 | ||
|
|
7871bb9328 | ||
|
|
ab32b1792f | ||
|
|
98d0a13a20 | ||
|
|
5456ac4219 | ||
|
|
f258ae42b1 | ||
|
|
6a459260e4 | ||
|
|
6580b864c0 | ||
|
|
bfd8e3e55a | ||
|
|
05cacb170f | ||
|
|
d2c861ad53 | ||
|
|
8a395a57e4 | ||
|
|
6706348c11 | ||
|
|
c66714bab6 | ||
|
|
730b15dfca | ||
|
|
ad6c84db4d | ||
|
|
9053583517 | ||
|
|
07f8f8a5f8 | ||
|
|
9f244c3dee | ||
|
|
2e895ed3ae | ||
|
|
b5010df10d | ||
|
|
fc5f89912e | ||
|
|
70ea305ca9 | ||
|
|
b4eb18c938 | ||
|
|
b9e0d97156 | ||
|
|
350d8bb367 | ||
|
|
fb10cbc52d | ||
|
|
55976a5816 | ||
|
|
827f98d24a | ||
|
|
ce67aa7028 | ||
|
|
50b3812364 | ||
|
|
616534621e | ||
|
|
1f5ec7a9a9 | ||
|
|
06223ea727 | ||
|
|
d15c770b4b | ||
|
|
60bb70c456 | ||
|
|
52322345b5 | ||
|
|
66693ad39a | ||
|
|
73fab9b628 | ||
|
|
bdfe0e8077 | ||
|
|
03f8af2241 | ||
|
|
c03b6cf6b5 | ||
|
|
1a3b779ace | ||
|
|
4c58510a37 | ||
|
|
b4c729a1f6 | ||
|
|
daf5098530 | ||
|
|
4223284781 | ||
|
|
3d70d00bce | ||
|
|
f2fbf54c32 | ||
|
|
b4d2c0832e | ||
|
|
d777b18b55 | ||
|
|
7b3efd9aaa | ||
|
|
90eb139994 | ||
|
|
aa87e3e8c0 | ||
|
|
1cd949f597 | ||
|
|
426cdaa836 | ||
|
|
8db5a9cd65 | ||
|
|
47f82e87c5 | ||
|
|
86470e543a | ||
|
|
a23ce19433 | ||
|
|
1cf197513c | ||
|
|
64c3c28336 | ||
|
|
7309ed012f | ||
|
|
515a92544b | ||
|
|
725b0ee6ab | ||
|
|
e17b447e73 | ||
|
|
6dbd31cdbc | ||
|
|
a217df39b1 | ||
|
|
80266d6454 | ||
|
|
2e17188f2b | ||
|
|
37f4d847e5 | ||
|
|
43c6688ce7 | ||
|
|
09e89e794d | ||
|
|
3fd7a58544 | ||
|
|
f0ccdcf40a | ||
|
|
1a6b7b33b9 | ||
|
|
7240971beb | ||
|
|
250fbd30a0 | ||
|
|
d3579186c6 | ||
|
|
54dcd8c5fc | ||
|
|
5c81929461 | ||
|
|
dbc15ca3b4 | ||
|
|
9a1f1c77a6 | ||
|
|
0fe5cb60a3 | ||
|
|
3e2c226866 | ||
|
|
0351f4cbcd | ||
|
|
f1eed8f2af | ||
|
|
9020e5ab1d | ||
|
|
697c15854a | ||
|
|
70a03ff02f | ||
|
|
d50e7ac150 | ||
|
|
ea5776108a | ||
|
|
8d72775daa | ||
|
|
73216073af | ||
|
|
2d237079db | ||
|
|
dbb396ae7c | ||
|
|
638e96f894 | ||
|
|
174f1ac359 | ||
|
|
af49f40d0b | ||
|
|
11442f1574 | ||
|
|
acd4dc239b | ||
|
|
70c6480181 | ||
|
|
ea747ffcc9 | ||
|
|
457d6ae992 | ||
|
|
f16f768a69 | ||
|
|
1b4f44384e | ||
|
|
6854d9bea2 | ||
|
|
b7bbbaee61 | ||
|
|
e5f1036b6b | ||
|
|
f4b301a28d | ||
|
|
c98a11dc0e | ||
|
|
c646028afc | ||
|
|
1ab4a74798 | ||
|
|
809232a4cb | ||
|
|
f6d8611e77 | ||
|
|
31e073203d | ||
|
|
f6a39a0539 | ||
|
|
8f10145fc4 | ||
|
|
0fab2405f8 | ||
|
|
5743979bca | ||
|
|
5831087c8b | ||
|
|
83c4195f3a | ||
|
|
8523586e8b | ||
|
|
473e490686 | ||
|
|
127c21e032 | ||
|
|
d3248eb53a | ||
|
|
ea7eee836f | ||
|
|
29bb5fc226 | ||
|
|
1e46f128cb | ||
|
|
60df54efc6 | ||
|
|
b2c1ba5247 | ||
|
|
070a2f8105 | ||
|
|
8588a0033c | ||
|
|
eb50ac4fdc | ||
|
|
d1d0641642 | ||
|
|
8c31e7a2ec | ||
|
|
b820ff573d | ||
|
|
a51addd73a | ||
|
|
8958b41ad2 | ||
|
|
7a27bcaafd | ||
|
|
665277fcdd | ||
|
|
c1baffd583 | ||
|
|
71e61adbd6 | ||
|
|
b1580643f0 | ||
|
|
7f0f51df41 | ||
|
|
0f3ff4ff3a | ||
|
|
b97e834964 | ||
|
|
8f65891ed8 | ||
|
|
c0ac281789 | ||
|
|
4602b1ebfc | ||
|
|
641f53e5bb | ||
|
|
f91338aeb5 | ||
|
|
ecf0e6c829 | ||
|
|
184211b87a | ||
|
|
1785a4e1c2 | ||
|
|
eff39cf3c5 | ||
|
|
17ab866835 | ||
|
|
1031def79f | ||
|
|
12c65208de | ||
|
|
a593bc9d7e | ||
|
|
93aa3e7e5c | ||
|
|
510c0753dd | ||
|
|
97e4e2b6da | ||
|
|
7578b02f2b | ||
|
|
d26f23e5f8 | ||
|
|
b6b6ca5393 | ||
|
|
553734eb15 | ||
|
|
06a8e61e83 | ||
|
|
4bd32f01ee | ||
|
|
8483b6353b | ||
|
|
ced715e7ec | ||
|
|
cc4e725800 | ||
|
|
30575ea7b7 | ||
|
|
dbb248666f | ||
|
|
5bed15ec8f | ||
|
|
9abf253900 | ||
|
|
627f4ba846 | ||
|
|
c16652ca82 | ||
|
|
6134741e7a | ||
|
|
cf94938d95 | ||
|
|
6f38736305 | ||
|
|
b2cd70543a | ||
|
|
117ab8fbae | ||
|
|
d063dc2e5b | ||
|
|
fe189e61c0 | ||
|
|
ac64ea0951 | ||
|
|
19296d9256 | ||
|
|
4868063773 | ||
|
|
90c57a80b6 | ||
|
|
9b058eaac4 | ||
|
|
30ff3d86d8 | ||
|
|
d631148791 | ||
|
|
0bd92db772 | ||
|
|
ab924e8955 | ||
|
|
13c77cd890 | ||
|
|
f866d097be | ||
|
|
75d90281e8 | ||
|
|
5cf61eea8b | ||
|
|
513e7b2312 | ||
|
|
e5be7fd867 | ||
|
|
2cc2097fc4 | ||
|
|
447632a4c3 | ||
|
|
ee547fc1b7 | ||
|
|
470010c78c | ||
|
|
f0f04e92da | ||
|
|
158b7b53b1 | ||
|
|
47c3694882 | ||
|
|
189762345f | ||
|
|
285c8f77f7 | ||
|
|
53d38e036c | ||
|
|
8586e35987 | ||
|
|
cd2b164951 | ||
|
|
ac85bed1de | ||
|
|
3eb9137c07 | ||
|
|
c534631fc4 | ||
|
|
23f1199b2e | ||
|
|
b587cea679 | ||
|
|
4dbd6b670a | ||
|
|
3f5c6f1b25 | ||
|
|
ce07088282 | ||
|
|
f6217bcc3d | ||
|
|
b2c0c3a528 | ||
|
|
f66e998b20 | ||
|
|
fa790cdcbd | ||
|
|
d91b4f9d5a | ||
|
|
37e24e166b | ||
|
|
00d3a10cf8 | ||
|
|
c4d3fa8c24 | ||
|
|
2f25b7bd07 | ||
|
|
8fa417b290 | ||
|
|
c850d1cd46 | ||
|
|
29a436f17e | ||
|
|
46599e8896 | ||
|
|
e703676c84 | ||
|
|
5d99f00b7b | ||
|
|
a6d0a9770b | ||
|
|
f8d468121c | ||
|
|
9853b30cda | ||
|
|
8ae7e40db5 | ||
|
|
f6046a2b3f | ||
|
|
4bc3512a20 | ||
|
|
4054225dc6 | ||
|
|
eb51b35732 | ||
|
|
349b448416 | ||
|
|
593888d760 | ||
|
|
845434e3db | ||
|
|
aeba63e0cd | ||
|
|
8c2d51d510 | ||
|
|
4f256c79df | ||
|
|
7cf1b3a2c7 | ||
|
|
4751d7e88e | ||
|
|
ca3a4b2ea3 | ||
|
|
bea272611a | ||
|
|
a03ec33836 | ||
|
|
4c228f2813 | ||
|
|
e5047dfbdf | ||
|
|
f5b328f191 | ||
|
|
0d2dd9560e | ||
|
|
dcdd77da01 | ||
|
|
3771851d52 | ||
|
|
d735bda8db | ||
|
|
0405260aa9 | ||
|
|
3d73818ecd | ||
|
|
fb0499fa10 | ||
|
|
f4d35b544e | ||
|
|
08ab39156b | ||
|
|
08cf326c89 | ||
|
|
3fc72bc61e | ||
|
|
6c3337b18d | ||
|
|
a77740d634 | ||
|
|
dd1a6c525f | ||
|
|
cda6189ae7 | ||
|
|
9ebeb61739 | ||
|
|
5495c9a180 | ||
|
|
37b926551a | ||
|
|
3bdcba025f | ||
|
|
f852a7e73a | ||
|
|
83540c3485 | ||
|
|
67f7241743 | ||
|
|
4b11578a80 | ||
|
|
24c65c1e88 | ||
|
|
d242a024d1 | ||
|
|
9f945f89a1 | ||
|
|
3dae2986e7 | ||
|
|
3cc43aec65 | ||
|
|
104a93e073 | ||
|
|
968ca30d70 | ||
|
|
666fb87521 | ||
|
|
748d487c8e | ||
|
|
4050985701 | ||
|
|
61bd0b5b0d | ||
|
|
38ea296f44 | ||
|
|
3c6d7fbf45 | ||
|
|
8ace19af34 | ||
|
|
e53e2b40c1 | ||
|
|
a227e560a1 | ||
|
|
fbdf6a81c0 | ||
|
|
35b62c98c2 | ||
|
|
25ce99e434 | ||
|
|
89144b01f7 | ||
|
|
e9532191a3 | ||
|
|
d07abcbee8 | ||
|
|
4f537cae3e | ||
|
|
44a56c3d50 | ||
|
|
ede1277154 | ||
|
|
2d9e6112ab | ||
|
|
d16617a14e | ||
|
|
9942d80988 | ||
|
|
f2b8a241c9 | ||
|
|
4eb7f5935c | ||
|
|
7055fd02aa | ||
|
|
c9e3bfa4e1 | ||
|
|
612ef91c72 | ||
|
|
d6d1d37c5f | ||
|
|
dfadcb864a | ||
|
|
cf4bf087dd | ||
|
|
e0fc7fbe6f | ||
|
|
f6483900f8 | ||
|
|
0e4d1c764b | ||
|
|
3fe4435523 | ||
|
|
ee83411bcd | ||
|
|
6d8f3b9f2f | ||
|
|
7669f39cf3 | ||
|
|
3ecb19166c | ||
|
|
79a283b42a | ||
|
|
a3d1d4dbfa | ||
|
|
71c86d9c96 | ||
|
|
721290f09a | ||
|
|
f76bf0a19a | ||
|
|
ab6112b0bf | ||
|
|
9f4d6cefbf | ||
|
|
43e1f511e3 | ||
|
|
d970261870 | ||
|
|
b2c1ed56e9 | ||
|
|
90f8eb71dc | ||
|
|
a280a7b30b | ||
|
|
d829fa85d5 | ||
|
|
51b5280d61 | ||
|
|
4eaf00914b | ||
|
|
0dd3c5693a | ||
|
|
ca408e24f1 | ||
|
|
d8980e4d3c | ||
|
|
3d96d7858d | ||
|
|
f1e37a425a | ||
|
|
8209eb2e10 | ||
|
|
a77273020e | ||
|
|
2850ca3152 | ||
|
|
953d3115c7 | ||
|
|
8fa9027e15 | ||
|
|
0ca2c7dc0c | ||
|
|
67518ab37d | ||
|
|
1e1907e2f6 | ||
|
|
b8b6474561 | ||
|
|
dbc0d4cda4 | ||
|
|
7c4cadc805 | ||
|
|
8fe37f2281 | ||
|
|
fcc41fd425 | ||
|
|
07a9930cbc | ||
|
|
c090745e80 | ||
|
|
ed429d9803 | ||
|
|
f68986dabe | ||
|
|
b6b9054794 | ||
|
|
eae3411168 | ||
|
|
95b711abb4 | ||
|
|
22aea042c7 | ||
|
|
3450f6ff43 | ||
|
|
143289f06e | ||
|
|
e995284dde | ||
|
|
9d6f07f98c | ||
|
|
9fe7013033 | ||
|
|
0f3cd637cf | ||
|
|
727938980c | ||
|
|
54d6b84dc6 | ||
|
|
5d1fcff674 | ||
|
|
04cae28ee1 | ||
|
|
cc1782ad3a | ||
|
|
989b0799c7 | ||
|
|
21f8006463 | ||
|
|
51db4b1144 | ||
|
|
5b40647b65 | ||
|
|
dee375fbf9 | ||
|
|
59984d973f | ||
|
|
ea10109af3 | ||
|
|
58fa2ad68a | ||
|
|
1a7eee2f23 | ||
|
|
9feeb5873a | ||
|
|
03fa655532 | ||
|
|
1052e63fe0 | ||
|
|
de33e10509 | ||
|
|
a28b4d8190 | ||
|
|
baeb11c98c | ||
|
|
956f78d1b7 | ||
|
|
e7b03b10c9 | ||
|
|
e2bef80d88 | ||
|
|
be94461eef | ||
|
|
2bf9e9e5c4 | ||
|
|
626a552170 | ||
|
|
e6af440a23 | ||
|
|
5b39a81cac | ||
|
|
2cbb67e459 | ||
|
|
0a628731c3 | ||
|
|
676400cee3 | ||
|
|
245bc1212c | ||
|
|
b7d0f88a83 | ||
|
|
1379df1080 | ||
|
|
674b8b4f9f |
@@ -0,0 +1,13 @@
|
||||
# https://EditorConfig.org
|
||||
root = true
|
||||
|
||||
[*]
|
||||
charset = utf-8
|
||||
|
||||
[*.{h,c}]
|
||||
indent_style = tab
|
||||
indent_size = 4
|
||||
|
||||
[CMakeLists.txt]
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
@@ -0,0 +1,24 @@
|
||||
---
|
||||
name: Bug report
|
||||
about: Create a report to help us improve xsystem35
|
||||
title: ''
|
||||
labels: ''
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
### Environment
|
||||
- xsystem35 version:
|
||||
- OS:
|
||||
|
||||
### Steps to reproduce the behavior
|
||||
1.
|
||||
2.
|
||||
3.
|
||||
|
||||
### Expected behavior
|
||||
|
||||
### Actual behavior
|
||||
<!-- If applicable, add screenshots to help explain your problem. -->
|
||||
|
||||
### Additional context
|
||||
@@ -0,0 +1,28 @@
|
||||
name: Android Build
|
||||
on: [push, pull_request]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Install Deps
|
||||
run: sudo apt install ninja-build
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
cd android
|
||||
echo "${{ secrets.KEYSTORE_BASE64 }}" | base64 -d > keystore.jks
|
||||
JAVA_HOME=$JAVA_HOME_17_X64 ANDROID_NDK_HOME=$ANDROID_SDK_ROOT/ndk-bundle ./gradlew assembleRelease
|
||||
env:
|
||||
KEY_ALIAS: ${{ secrets.KEY_ALIAS }}
|
||||
KEY_PASSWORD: ${{ secrets.KEY_PASSWORD }}
|
||||
KEYSTORE_PASSWORD: ${{ secrets.KEYSTORE_PASSWORD }}
|
||||
|
||||
- name: Upload artifacts
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: xsystem35-apk
|
||||
path: android/app/build/outputs/apk/release/app-release.apk
|
||||
@@ -0,0 +1,41 @@
|
||||
name: Emscripten Build
|
||||
on: [push, pull_request]
|
||||
|
||||
env:
|
||||
EM_VERSION: latest
|
||||
EM_CACHE_FOLDER: 'emsdk-cache'
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Setup cache
|
||||
id: cache-system-libraries
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: ${{env.EM_CACHE_FOLDER}}
|
||||
key: ${{env.EM_VERSION}}-${{ runner.os }}
|
||||
|
||||
- name: Setup Emscripten toolchain
|
||||
uses: mymindstorm/setup-emsdk@v14
|
||||
with:
|
||||
version: ${{ env.EM_VERSION }}
|
||||
actions-cache-folder: ${{env.EM_CACHE_FOLDER}}
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
mkdir -p out/wasm
|
||||
cd out/wasm
|
||||
emcmake cmake -DCMAKE_BUILD_TYPE=MinSizeRel -DCMAKE_COMPILE_WARNING_AS_ERROR=YES ../../
|
||||
make -j4
|
||||
mkdir xsystem35
|
||||
mv src/xsystem35.* xsystem35/
|
||||
|
||||
- name: Upload artifacts
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: xsystem35-wasm
|
||||
path: out/wasm/xsystem35
|
||||
@@ -0,0 +1,29 @@
|
||||
name: Linux Build
|
||||
on: [push, pull_request]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
build-type: ["Debug", "Release"]
|
||||
|
||||
name: Linux ${{ matrix.build-type }}
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Install Deps
|
||||
run: |
|
||||
sudo apt update
|
||||
sudo apt install libgtk-3-dev libsdl2-dev libsdl2-ttf-dev libsdl2-mixer-dev libwebp-dev libportmidi-dev libcjson-dev asciidoctor
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
mkdir -p out/${{ matrix.build-type }}
|
||||
cd out/${{ matrix.build-type }}
|
||||
cmake -DCMAKE_BUILD_TYPE=${{ matrix.build-type }} ../../
|
||||
make -j4
|
||||
|
||||
- name: Test
|
||||
run: ctest --output-on-failure
|
||||
working-directory: out/${{ matrix.build-type }}
|
||||
@@ -0,0 +1,70 @@
|
||||
name: Windows Build
|
||||
on: [push, pull_request]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: windows-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- sys: mingw32
|
||||
package: "xsystem35-32bit"
|
||||
cmake_args: "-DENABLE_DEBUGGER=no"
|
||||
deps: ""
|
||||
- sys: ucrt64
|
||||
package: "xsystem35-64bit"
|
||||
cmake_args: ""
|
||||
deps: "cjson:p"
|
||||
defaults:
|
||||
run:
|
||||
shell: msys2 {0}
|
||||
name: MSYS2 ${{ matrix.sys }}
|
||||
steps:
|
||||
|
||||
- name: Set up MSYS2
|
||||
uses: msys2/setup-msys2@v2
|
||||
with:
|
||||
msystem: ${{ matrix.sys }}
|
||||
pacboy: >-
|
||||
SDL2:p
|
||||
SDL2_ttf:p
|
||||
SDL2_mixer:p
|
||||
libwebp:p
|
||||
portmidi:p
|
||||
${{ matrix.deps }}
|
||||
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Copy licenses
|
||||
run: |
|
||||
ls /${{ matrix.sys }}/share/licenses
|
||||
mkdir dist
|
||||
cp -r /${{ matrix.sys }}/share/licenses dist/
|
||||
cp fonts/*.license dist/licenses/
|
||||
|
||||
- name: Install dev dependencies
|
||||
run: pacboy --noconfirm -S --needed gcc:p cmake:p ninja:p asciidoctor:p
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
mkdir -p out/release
|
||||
cd out/release
|
||||
cmake -GNinja -DCMAKE_BUILD_TYPE=Release -DCMAKE_COMPILE_WARNING_AS_ERROR=YES ${{ matrix.cmake_args }} ../../
|
||||
ninja
|
||||
|
||||
- name: Test
|
||||
run: ctest --output-on-failure
|
||||
working-directory: out/release
|
||||
|
||||
- name: Package
|
||||
run: |
|
||||
cp out/release/src/xsystem35.exe out/release/doc/*.html *.md COPYING xsys35rc.sample dist/
|
||||
|
||||
- name: Upload
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: ${{ matrix.package }}
|
||||
path: dist
|
||||
compression-level: 9 # because we use it for releases
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
out
|
||||
android/.gradle
|
||||
android/.idea
|
||||
android/app/.cxx
|
||||
android/app/.externalNativeBuild
|
||||
android/app/build
|
||||
android/app/src/main/assets
|
||||
android/build
|
||||
android/keystore.jks
|
||||
android/local.properties
|
||||
.ccls-cache
|
||||
.dir-locals.el
|
||||
compile_commands.json
|
||||
build
|
||||
@@ -1,435 +0,0 @@
|
||||
Notes on the Free Translation Project
|
||||
*************************************
|
||||
|
||||
Free software is going international! The Free Translation Project
|
||||
is a way to get maintainers of free software, translators, and users all
|
||||
together, so that will gradually become able to speak many languages.
|
||||
A few packages already provide translations for their messages.
|
||||
|
||||
If you found this `ABOUT-NLS' file inside a distribution, you may
|
||||
assume that the distributed package does use GNU `gettext' internally,
|
||||
itself available at your nearest GNU archive site. But you do _not_
|
||||
need to install GNU `gettext' prior to configuring, installing or using
|
||||
this package with messages translated.
|
||||
|
||||
Installers will find here some useful hints. These notes also
|
||||
explain how users should proceed for getting the programs to use the
|
||||
available translations. They tell how people wanting to contribute and
|
||||
work at translations should contact the appropriate team.
|
||||
|
||||
When reporting bugs in the `intl/' directory or bugs which may be
|
||||
related to internationalization, you should tell about the version of
|
||||
`gettext' which is used. The information can be found in the
|
||||
`intl/VERSION' file, in internationalized packages.
|
||||
|
||||
Quick configuration advice
|
||||
==========================
|
||||
|
||||
If you want to exploit the full power of internationalization, you
|
||||
should configure it using
|
||||
|
||||
./configure --with-included-gettext
|
||||
|
||||
to force usage of internationalizing routines provided within this
|
||||
package, despite the existence of internationalizing capabilities in the
|
||||
operating system where this package is being installed. So far, only
|
||||
the `gettext' implementation in the GNU C library version 2 provides as
|
||||
many features (such as locale alias, message inheritance, automatic
|
||||
charset conversion or plural form handling) as the implementation here.
|
||||
It is also not possible to offer this additional functionality on top
|
||||
of a `catgets' implementation. Future versions of GNU `gettext' will
|
||||
very likely convey even more functionality. So it might be a good idea
|
||||
to change to GNU `gettext' as soon as possible.
|
||||
|
||||
So you need _not_ provide this option if you are using GNU libc 2 or
|
||||
you have installed a recent copy of the GNU gettext package with the
|
||||
included `libintl'.
|
||||
|
||||
INSTALL Matters
|
||||
===============
|
||||
|
||||
Some packages are "localizable" when properly installed; the
|
||||
programs they contain can be made to speak your own native language.
|
||||
Most such packages use GNU `gettext'. Other packages have their own
|
||||
ways to internationalization, predating GNU `gettext'.
|
||||
|
||||
By default, this package will be installed to allow translation of
|
||||
messages. It will automatically detect whether the system already
|
||||
provides the GNU `gettext' functions. If not, the GNU `gettext' own
|
||||
library will be used. This library is wholly contained within this
|
||||
package, usually in the `intl/' subdirectory, so prior installation of
|
||||
the GNU `gettext' package is _not_ required. Installers may use
|
||||
special options at configuration time for changing the default
|
||||
behaviour. The commands:
|
||||
|
||||
./configure --with-included-gettext
|
||||
./configure --disable-nls
|
||||
|
||||
will respectively bypass any pre-existing `gettext' to use the
|
||||
internationalizing routines provided within this package, or else,
|
||||
_totally_ disable translation of messages.
|
||||
|
||||
When you already have GNU `gettext' installed on your system and run
|
||||
configure without an option for your new package, `configure' will
|
||||
probably detect the previously built and installed `libintl.a' file and
|
||||
will decide to use this. This might be not what is desirable. You
|
||||
should use the more recent version of the GNU `gettext' library. I.e.
|
||||
if the file `intl/VERSION' shows that the library which comes with this
|
||||
package is more recent, you should use
|
||||
|
||||
./configure --with-included-gettext
|
||||
|
||||
to prevent auto-detection.
|
||||
|
||||
The configuration process will not test for the `catgets' function
|
||||
and therefore it will not be used. The reason is that even an
|
||||
emulation of `gettext' on top of `catgets' could not provide all the
|
||||
extensions of the GNU `gettext' library.
|
||||
|
||||
Internationalized packages have usually many `po/LL.po' files, where
|
||||
LL gives an ISO 639 two-letter code identifying the language. Unless
|
||||
translations have been forbidden at `configure' time by using the
|
||||
`--disable-nls' switch, all available translations are installed
|
||||
together with the package. However, the environment variable `LINGUAS'
|
||||
may be set, prior to configuration, to limit the installed set.
|
||||
`LINGUAS' should then contain a space separated list of two-letter
|
||||
codes, stating which languages are allowed.
|
||||
|
||||
Using This Package
|
||||
==================
|
||||
|
||||
As a user, if your language has been installed for this package, you
|
||||
only have to set the `LANG' environment variable to the appropriate
|
||||
`LL_CC' combination. Here `LL' is an ISO 639 two-letter language code,
|
||||
and `CC' is an ISO 3166 two-letter country code. For example, let's
|
||||
suppose that you speak German and live in Germany. At the shell
|
||||
prompt, merely execute `setenv LANG de_DE' (in `csh'),
|
||||
`export LANG; LANG=de_DE' (in `sh') or `export LANG=de_DE' (in `bash').
|
||||
This can be done from your `.login' or `.profile' file, once and for
|
||||
all.
|
||||
|
||||
You might think that the country code specification is redundant.
|
||||
But in fact, some languages have dialects in different countries. For
|
||||
example, `de_AT' is used for Austria, and `pt_BR' for Brazil. The
|
||||
country code serves to distinguish the dialects.
|
||||
|
||||
The locale naming convention of `LL_CC', with `LL' denoting the
|
||||
language and `CC' denoting the country, is the one use on systems based
|
||||
on GNU libc. On other systems, some variations of this scheme are
|
||||
used, such as `LL' or `LL_CC.ENCODING'. You can get the list of
|
||||
locales supported by your system for your country by running the command
|
||||
`locale -a | grep '^LL''.
|
||||
|
||||
Not all programs have translations for all languages. By default, an
|
||||
English message is shown in place of a nonexistent translation. If you
|
||||
understand other languages, you can set up a priority list of languages.
|
||||
This is done through a different environment variable, called
|
||||
`LANGUAGE'. GNU `gettext' gives preference to `LANGUAGE' over `LANG'
|
||||
for the purpose of message handling, but you still need to have `LANG'
|
||||
set to the primary language; this is required by other parts of the
|
||||
system libraries. For example, some Swedish users who would rather
|
||||
read translations in German than English for when Swedish is not
|
||||
available, set `LANGUAGE' to `sv:de' while leaving `LANG' to `sv_SE'.
|
||||
|
||||
In the `LANGUAGE' environment variable, but not in the `LANG'
|
||||
environment variable, `LL_CC' combinations can be abbreviated as `LL'
|
||||
to denote the language's main dialect. For example, `de' is equivalent
|
||||
to `de_DE' (German as spoken in Germany), and `pt' to `pt_PT'
|
||||
(Portuguese as spoken in Portugal) in this context.
|
||||
|
||||
Translating Teams
|
||||
=================
|
||||
|
||||
For the Free Translation Project to be a success, we need interested
|
||||
people who like their own language and write it well, and who are also
|
||||
able to synergize with other translators speaking the same language.
|
||||
Each translation team has its own mailing list. The up-to-date list of
|
||||
teams can be found at the Free Translation Project's homepage,
|
||||
`http://www.iro.umontreal.ca/contrib/po/HTML/', in the "National teams"
|
||||
area.
|
||||
|
||||
If you'd like to volunteer to _work_ at translating messages, you
|
||||
should become a member of the translating team for your own language.
|
||||
The subscribing address is _not_ the same as the list itself, it has
|
||||
`-request' appended. For example, speakers of Swedish can send a
|
||||
message to `sv-request@li.org', having this message body:
|
||||
|
||||
subscribe
|
||||
|
||||
Keep in mind that team members are expected to participate
|
||||
_actively_ in translations, or at solving translational difficulties,
|
||||
rather than merely lurking around. If your team does not exist yet and
|
||||
you want to start one, or if you are unsure about what to do or how to
|
||||
get started, please write to `translation@iro.umontreal.ca' to reach the
|
||||
coordinator for all translator teams.
|
||||
|
||||
The English team is special. It works at improving and uniformizing
|
||||
the terminology in use. Proven linguistic skill are praised more than
|
||||
programming skill, here.
|
||||
|
||||
Available Packages
|
||||
==================
|
||||
|
||||
Languages are not equally supported in all packages. The following
|
||||
matrix shows the current state of internationalization, as of August
|
||||
2002. The matrix shows, in regard of each package, for which languages
|
||||
PO files have been submitted to translation coordination, with a
|
||||
translation percentage of at least 50%.
|
||||
|
||||
Ready PO files be bg ca cs da de el en eo es et fi fr
|
||||
+----------------------------------------+
|
||||
a2ps | [] [] [] [] |
|
||||
ap-utils | |
|
||||
bash | [] [] [] [] |
|
||||
bfd | [] [] |
|
||||
binutils | [] [] |
|
||||
bison | [] [] [] [] |
|
||||
clisp | |
|
||||
clisp | [] [] [] [] |
|
||||
clisplow | |
|
||||
cpio | [] [] [] [] |
|
||||
darkstat | () |
|
||||
diffutils | [] [] [] [] [] [] |
|
||||
enscript | [] [] |
|
||||
error | [] [] [] |
|
||||
fetchmail | [] () [] [] [] () |
|
||||
fileutils | [] [] [] [] [] |
|
||||
findutils | [] [] [] [] [] [] |
|
||||
flex | [] [] [] [] [] |
|
||||
gas | [] [] |
|
||||
gawk | [] [] [] |
|
||||
gcal | [] [] |
|
||||
gcc | [] [] |
|
||||
gettext | [] [] [] [] [] |
|
||||
gnupg | [] [] [] [] [] [] [] |
|
||||
gprof | [] [] |
|
||||
gpsdrive | () () () () () |
|
||||
grep | [] [] [] [] [] [] [] [] |
|
||||
gretl | [] |
|
||||
gthumb | () () () |
|
||||
hello | [] [] [] [] [] [] [] [] [] |
|
||||
id-utils | [] [] [] |
|
||||
indent | [] [] [] [] [] |
|
||||
jpilot | () [] [] [] |
|
||||
jwhois | [] [] |
|
||||
kbd | [] [] [] |
|
||||
ld | [] [] |
|
||||
libc | [] [] [] [] [] [] [] [] |
|
||||
libiconv | [] [] [] [] |
|
||||
lifelines | () () |
|
||||
lilypond | [] [] |
|
||||
lingoteach | [] [] |
|
||||
lingoteach_lessons| () () |
|
||||
lynx | [] [] [] [] [] |
|
||||
m4 | [] [] [] [] [] |
|
||||
make | [] [] [] [] |
|
||||
man-db | [] () () [] () () |
|
||||
mysecretdiary | [] [] [] |
|
||||
nano | [] () [] [] [] [] |
|
||||
nano_1_0 | [] () [] [] [] [] |
|
||||
opcodes | [] [] [] |
|
||||
parted | [] [] [] [] [] |
|
||||
ptx | [] [] [] [] [] [] [] |
|
||||
python | |
|
||||
recode | [] [] [] [] [] [] |
|
||||
sed | [] [] [] [] [] [] [] [] [] [] |
|
||||
sh-utils | [] [] [] [] |
|
||||
sharutils | [] [] [] [] [] [] [] |
|
||||
sketch | () [] () |
|
||||
soundtracker | [] [] [] |
|
||||
sp | [] |
|
||||
tar | [] [] [] [] [] [] |
|
||||
texinfo | [] [] [] [] [] |
|
||||
textutils | [] [] [] [] [] |
|
||||
util-linux | [] [] [] [] [] [] |
|
||||
vorbis-tools | [] |
|
||||
wastesedge | |
|
||||
wdiff | [] [] [] [] [] [] |
|
||||
wget | [] [] [] [] [] [] [] [] [] [] |
|
||||
+----------------------------------------+
|
||||
be bg ca cs da de el en eo es et fi fr
|
||||
0 2 19 10 30 44 9 1 12 44 17 6 53
|
||||
|
||||
gl he hr hu id it ja ko lv nb nl nn
|
||||
+-------------------------------------+
|
||||
a2ps | () () [] |
|
||||
ap-utils | |
|
||||
bash | [] |
|
||||
bfd | [] |
|
||||
binutils | [] |
|
||||
bison | [] [] [] [] |
|
||||
clisp | |
|
||||
clisp | [] |
|
||||
clisplow | |
|
||||
cpio | [] [] [] [] |
|
||||
darkstat | |
|
||||
diffutils | [] [] [] [] [] |
|
||||
enscript | [] [] |
|
||||
error | [] |
|
||||
fetchmail | [] |
|
||||
fileutils | [] [] [] |
|
||||
findutils | [] [] [] [] [] [] [] [] |
|
||||
flex | [] |
|
||||
gas | |
|
||||
gawk | [] |
|
||||
gcal | |
|
||||
gcc | [] |
|
||||
gettext | [] [] |
|
||||
gnupg | [] [] [] [] |
|
||||
gprof | [] |
|
||||
gpsdrive | [] () () |
|
||||
grep | [] [] [] [] [] [] [] |
|
||||
gretl | |
|
||||
gthumb | () () |
|
||||
hello | [] [] [] [] [] [] [] [] [] [] [] [] |
|
||||
id-utils | [] [] |
|
||||
indent | [] [] [] [] |
|
||||
jpilot | () () |
|
||||
jwhois | [] [] |
|
||||
kbd | |
|
||||
ld | |
|
||||
libc | [] [] [] [] |
|
||||
libiconv | [] [] [] |
|
||||
lifelines | |
|
||||
lilypond | [] |
|
||||
lingoteach | [] |
|
||||
lingoteach_lessons| |
|
||||
lynx | [] [] [] [] |
|
||||
m4 | [] [] [] [] |
|
||||
make | [] [] [] [] [] [] |
|
||||
man-db | () () |
|
||||
mysecretdiary | [] |
|
||||
nano | [] [] [] [] |
|
||||
nano_1_0 | [] [] [] [] [] |
|
||||
opcodes | [] [] |
|
||||
parted | [] [] [] |
|
||||
ptx | [] [] [] [] [] |
|
||||
python | |
|
||||
recode | [] [] [] |
|
||||
sed | [] [] [] [] [] [] [] [] |
|
||||
sh-utils | [] [] [] |
|
||||
sharutils | [] [] [] |
|
||||
sketch | () |
|
||||
soundtracker | [] [] |
|
||||
sp | |
|
||||
tar | [] [] [] [] [] [] |
|
||||
texinfo | [] [] [] |
|
||||
textutils | [] [] [] [] |
|
||||
util-linux | () [] |
|
||||
vorbis-tools | [] |
|
||||
wastesedge | |
|
||||
wdiff | [] [] [] |
|
||||
wget | [] [] [] [] [] [] |
|
||||
+-------------------------------------+
|
||||
gl he hr hu id it ja ko lv nb nl nn
|
||||
23 9 12 19 16 13 26 9 1 7 19 3
|
||||
|
||||
no pl pt pt_BR ru sk sl sv tr uk zh_CN zh_TW
|
||||
+----------------------------------------------+
|
||||
a2ps | () () () [] [] [] [] [] | 10
|
||||
ap-utils | () | 0
|
||||
bash | [] | 6
|
||||
bfd | [] [] | 5
|
||||
binutils | [] [] | 5
|
||||
bison | [] [] [] [] | 12
|
||||
clisp | | 0
|
||||
clisp | | 5
|
||||
clisplow | | 0
|
||||
cpio | [] [] [] [] | 12
|
||||
darkstat | [] [] () () | 2
|
||||
diffutils | [] [] [] [] [] [] | 17
|
||||
enscript | [] [] [] [] | 8
|
||||
error | [] [] [] | 7
|
||||
fetchmail | () () [] | 6
|
||||
fileutils | [] [] [] [] [] [] | 14
|
||||
findutils | [] [] [] [] [] [] [] | 21
|
||||
flex | [] [] [] | 9
|
||||
gas | [] | 3
|
||||
gawk | [] [] | 6
|
||||
gcal | [] [] | 4
|
||||
gcc | [] | 4
|
||||
gettext | [] [] [] [] [] [] | 13
|
||||
gnupg | [] [] [] | 14
|
||||
gprof | [] [] | 5
|
||||
gpsdrive | [] [] | 3
|
||||
grep | [] [] [] [] [] | 20
|
||||
gretl | | 1
|
||||
gthumb | () () [] | 1
|
||||
hello | [] [] [] [] [] [] [] | 28
|
||||
id-utils | [] [] [] [] | 9
|
||||
indent | [] [] [] [] [] | 14
|
||||
jpilot | () () [] [] | 5
|
||||
jwhois | [] () () [] [] | 7
|
||||
kbd | [] [] | 5
|
||||
ld | [] [] | 4
|
||||
libc | [] [] [] [] [] [] | 18
|
||||
libiconv | [] [] [] [] [] | 12
|
||||
lifelines | [] | 1
|
||||
lilypond | [] | 4
|
||||
lingoteach | [] [] | 5
|
||||
lingoteach_lessons| () | 0
|
||||
lynx | [] [] [] [] | 13
|
||||
m4 | [] [] [] [] | 13
|
||||
make | [] [] [] [] [] | 15
|
||||
man-db | | 3
|
||||
mysecretdiary | [] [] [] | 7
|
||||
nano | [] [] [] [] | 13
|
||||
nano_1_0 | [] [] [] [] | 14
|
||||
opcodes | [] [] [] | 8
|
||||
parted | [] [] [] [] | 12
|
||||
ptx | [] [] [] [] [] [] [] | 19
|
||||
python | | 0
|
||||
recode | [] [] [] [] [] [] | 15
|
||||
sed | [] [] [] [] [] [] | 24
|
||||
sh-utils | [] [] | 9
|
||||
sharutils | [] [] [] [] | 14
|
||||
sketch | [] () [] | 4
|
||||
soundtracker | [] | 6
|
||||
sp | | 1
|
||||
tar | [] [] [] [] [] [] [] | 19
|
||||
texinfo | [] [] | 10
|
||||
textutils | [] [] [] [] [] | 14
|
||||
util-linux | [] [] [] | 10
|
||||
vorbis-tools | [] | 3
|
||||
wastesedge | | 0
|
||||
wdiff | [] [] [] [] [] | 14
|
||||
wget | [] [] [] [] [] [] [] [] | 24
|
||||
+----------------------------------------------+
|
||||
37 teams no pl pt pt_BR ru sk sl sv tr uk zh_CN zh_TW
|
||||
68 domains 4 15 2 28 28 12 10 49 43 4 1 9 609
|
||||
|
||||
Some counters in the preceding matrix are higher than the number of
|
||||
visible blocks let us expect. This is because a few extra PO files are
|
||||
used for implementing regional variants of languages, or language
|
||||
dialects.
|
||||
|
||||
For a PO file in the matrix above to be effective, the package to
|
||||
which it applies should also have been internationalized and
|
||||
distributed as such by its maintainer. There might be an observable
|
||||
lag between the mere existence a PO file and its wide availability in a
|
||||
distribution.
|
||||
|
||||
If August 2002 seems to be old, you may fetch a more recent copy of
|
||||
this `ABOUT-NLS' file on most GNU archive sites. The most up-to-date
|
||||
matrix with full percentage details can be found at
|
||||
`http://www.iro.umontreal.ca/contrib/po/HTML/matrix.html'.
|
||||
|
||||
Using `gettext' in new packages
|
||||
===============================
|
||||
|
||||
If you are writing a freely available program and want to
|
||||
internationalize it you are welcome to use GNU `gettext' in your
|
||||
package. Of course you have to respect the GNU Library General Public
|
||||
License which covers the use of the GNU `gettext' library. This means
|
||||
in particular that even non-free programs can use `libintl' as a shared
|
||||
library, whereas only free software can use `libintl' as a static
|
||||
library or use modified versions of `libintl'.
|
||||
|
||||
Once the sources are changed appropriately and the setup can handle
|
||||
to use of `gettext' the only thing missing are the translations. The
|
||||
Free Translation Project is also available for packages which are not
|
||||
developed inside the GNU project. Therefore the information given above
|
||||
applies also for every other Free Software Project. Contact
|
||||
`translation@iro.umontreal.ca' to make the `.pot' files available to
|
||||
the translation teams.
|
||||
|
||||
+119
@@ -0,0 +1,119 @@
|
||||
# Changelog
|
||||
|
||||
## 2.12.0 - 2024-11-26
|
||||
- Implemented playback of the opening movie for 妻みぐい2.
|
||||
|
||||
## 2.11.7 - 2024-11-12
|
||||
- Fixed crash when canceling menu with two-finger touch (#58)
|
||||
- Fixed screen artifact in Rance 3 immediately after selecting "Game Start"
|
||||
|
||||
## 2.11.6 - 2024-07-22
|
||||
- Fixed strange behavior when canceling the battle selection menu in Kichikuou Rance. (#56)
|
||||
- Use system mouse cursors whenever possible. They look better on high dpi displays.
|
||||
- Added manual page for the xsystem35 command.
|
||||
|
||||
## 2.11.5 - 2024-06-10
|
||||
- Android: Fixed a black screen issue in the MangaGamer version of Rance 5D.
|
||||
- Fixed `fileCheckExist` command. (#55)
|
||||
|
||||
## 2.11.4 - 2024-05-22
|
||||
- Windows: In full-screen mode, the menu bar now appears only when the mouse pointer is at the top of the screen. (#53)
|
||||
- Fixed text rendering issue in Rance 3 intro. (#54)
|
||||
|
||||
## 2.11.3 - 2024-04-11
|
||||
- Android: Fixed a bug where save files from older versions could not be loaded in version 2.11.2.
|
||||
|
||||
## 2.11.2 - 2024-04-10
|
||||
- Added `-savedir` option to specify save directory.
|
||||
- Android: Fixed a bug where .xsys35rc in a subdirectory of ZIP was not loaded. (#51)
|
||||
|
||||
## 2.11.1 - 2024-02-18
|
||||
- Windows: Fixed a black screen issue in the MangaGamer version of Rance 5D (#45).
|
||||
- Fixed a crash bug in command-line debugger.
|
||||
|
||||
## 2.11.0 - 2024-01-20
|
||||
- Windows: Now `xsystem35.exe` is a standalone executable. You can just copy it to the game folder and run it.
|
||||
- Windows: The installer is no longer provided. If you have an earlier version installed, please uninstall it.
|
||||
- Windows: The debugger is no longer available in the 32-bit version. Please use the 64-bit version if you need it.
|
||||
- Added experimental `enable_zb` option (#44). See `xsys35rc.sample` for details.
|
||||
|
||||
## 2.10.1 - 2024-01-01
|
||||
- Windows: Added "Integer Scaling" menu option
|
||||
- Fixed initial palette colors (to match System3.9)
|
||||
- Fixed a bug where palette 246 to 249 were unintentionally changed after loading 256-color CGs
|
||||
|
||||
## 2.10.0 - 2023-12-09
|
||||
- Breaking change: A [bug](https://github.com/kichikuou/xsystem35-sdl2/issues/41) has been fixed in which save format for 大悪司 and かえるにょ国にょアリス was not compatible with System3.9. As a result, save files for these games created with older versions of xsystem35 are no longer usable. (Loading will not fail, but wrong values will be loaded.)
|
||||
- Now the 64-bit executable supports Windows 10 or later. For older Windows, please use the 32-bit version.
|
||||
- Fixed a problem with the download edition of Daiakuji requiring insertion of Disk 2. (#43)
|
||||
- Debugger: Added debug commands for monitoring the color palette.
|
||||
- Minor bug fixes.
|
||||
|
||||
## 2.9.1 - 2023-06-22
|
||||
- Fixed a bug where the `CX 1` command (copy with transparent color) did not work in some games (e.g. Daiakuji)
|
||||
- Debugger: Now breakpoints do not make the window completely unresponsive
|
||||
- Debugger: Fixed a conditional breakpoint crash bug
|
||||
|
||||
## 2.9.0 - 2023-05-04
|
||||
- Now xsystem35 uses the System3.9 save file format (unless `-saveformat` command line flag is specified). Old save files can still be loaded.
|
||||
- Changed the default naming convention for save files from `[a-z]sleep.asd` to `<gamename>s[a-z].asd`.
|
||||
- Fixed a bug where SACT games (e.g. Rance 5D) were not responding to touch.
|
||||
- Fixed memory leaks in debugger.
|
||||
|
||||
## 2.8.0 - 2023-02-12
|
||||
- Added support for Rance 4.1/4.2 ver1.05
|
||||
- Fixed movement animation in rooms in Rance 4 v2.05 (#35)
|
||||
- Added `-game` option which can be used to enable game-specific hacks in translated games
|
||||
|
||||
## 2.7.0 - 2023-01-28
|
||||
- Added support for Rance4 ver.2.05
|
||||
- Now supports BGM playback for the download edition of Daiakuji
|
||||
- Bug fixes
|
||||
|
||||
## 2.6.0 - 2023-01-01
|
||||
- Android: Introduced a new way to simulate right-click; tapping on the black bars at the left/right or top/bottom of the screen is treated as a right click. (Two-finger touch, the old way to simulate a right click, still works.)
|
||||
- Windows: Added a menu command to enable/disable automatic mouse movements.
|
||||
|
||||
## 2.5.1 - 2022-07-31
|
||||
- Implemented "palette shift" graphic effect (used in 闘神都市II).
|
||||
- Implemented `grDrawFillCircle` command (used in グレイメルカ).
|
||||
- Fixed color update bug in 256-color games.
|
||||
- Fixed crash by out-of-bounds variable access in debugger.
|
||||
|
||||
## 2.5.0 - 2022-07-17
|
||||
- Supported JPEG image format on Android.
|
||||
|
||||
## 2.4.0 - 2022-07-02
|
||||
- Windows: Added "Restart" menu command.
|
||||
- Fixed a bug where wrong music is played in Kichikuou Rance (System3.9 version). #32
|
||||
- Supported mouse wheel input.
|
||||
- Fixed a bug in `MF` command.
|
||||
- Implemented `grEffectMoveView` command.
|
||||
|
||||
## 2.3.0 - 2022-04-08
|
||||
- Code for screen transition effects have been substantially rewritten (but you probably wouldn't notice any difference).
|
||||
- Fixed bugs in System3.9 games.
|
||||
- Android: Enabled joystick input.
|
||||
- Debugger improvements.
|
||||
|
||||
## 2.2.0 - 2021-12-03
|
||||
From now on, the Android and Windows versions will use a common version number.
|
||||
|
||||
- Android: Use custom fonts specified in `.xsys35c`. (#20)
|
||||
- Supported "王子さまLv1".
|
||||
- Debugger improvements.
|
||||
- Fixed some bugs and compatibility issues.
|
||||
|
||||
## 2.1.0 - 2021-11-07
|
||||
- Fixed issues with MangaGamer version of Rance 5D.
|
||||
- Fixed garbled text in some System3.9 games with Unicode mode.
|
||||
- Display a message box on fatal errors.
|
||||
- Various debugger improvements.
|
||||
|
||||
## 2.0.1 - 2021-10-24
|
||||
- Fixed crash during shutdown.
|
||||
|
||||
## 2.0.0 - 2021-10-23
|
||||
- Added window menubar from which you can save screenshots, change fullscreen mode, and enable message skipping.
|
||||
- Added debugger support that can be used from Visual Studio Code. See [vscode-system3x](https://github.com/kichikuou/vscode-system3x) for details.
|
||||
- Many bug fixes and compatibility fixes.
|
||||
+231
@@ -0,0 +1,231 @@
|
||||
cmake_minimum_required(VERSION 3.13)
|
||||
|
||||
# Rebuild external projects when download URL changes
|
||||
if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.24.0")
|
||||
cmake_policy(SET CMP0135 NEW)
|
||||
endif()
|
||||
|
||||
project(xsystem35 LANGUAGES C)
|
||||
set(CMAKE_C_STANDARD 99)
|
||||
enable_testing()
|
||||
set(CMAKE_EXPORT_COMPILE_COMMANDS TRUE)
|
||||
|
||||
set(XSYSTEM35_VERSION "2.12.0")
|
||||
|
||||
include(CheckSymbolExists)
|
||||
include(FetchContent)
|
||||
|
||||
# A wrapper around pkg_check_modules() that skips the check if ENABLE_<prefix> is false
|
||||
macro (optional_pkg_check_modules prefix)
|
||||
option(ENABLE_${prefix} "Use ${prefix} if available" ON)
|
||||
if (ENABLE_${prefix})
|
||||
pkg_check_modules(${prefix} ${ARGN})
|
||||
endif()
|
||||
endmacro()
|
||||
|
||||
# Generates a static library from pkg_check_modules() result
|
||||
function(add_static_library name pkg)
|
||||
add_library(${name} INTERFACE)
|
||||
set_target_properties(${name}
|
||||
PROPERTIES
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${${pkg}_STATIC_INCLUDE_DIRS}"
|
||||
INTERFACE_COMPILE_OPTIONS "${${pkg}_STATIC_CFLAGS_OTHER}"
|
||||
INTERFACE_LINK_LIBRARIES "${${pkg}_STATIC_LIBRARIES}"
|
||||
INTERFACE_LINK_OPTIONS "${${pkg}_STATIC_LDFLAGS_OTHER}")
|
||||
endfunction()
|
||||
|
||||
function(fetch_webp)
|
||||
FetchContent_Declare(
|
||||
libwebp
|
||||
URL https://storage.googleapis.com/downloads.webmproject.org/releases/webp/libwebp-1.4.0.tar.gz
|
||||
URL_HASH SHA1=0b1c8bea200caaa010182609dbaaa91aec69b64d
|
||||
)
|
||||
set(WEBP_BUILD_ANIM_UTILS OFF CACHE BOOL "Build animation utilities." FORCE)
|
||||
set(WEBP_BUILD_CWEBP OFF CACHE BOOL "Build the cwebp command line tool." FORCE)
|
||||
set(WEBP_BUILD_DWEBP OFF CACHE BOOL "Build the dwebp command line tool." FORCE)
|
||||
set(WEBP_BUILD_GIF2WEBP OFF CACHE BOOL "Build the gif2webp conversion tool." FORCE)
|
||||
set(WEBP_BUILD_IMG2WEBP OFF CACHE BOOL "Build the img2webp animation tool." FORCE)
|
||||
set(WEBP_BUILD_VWEBP OFF CACHE BOOL "Build the vwebp viewer tool." FORCE)
|
||||
set(WEBP_BUILD_WEBPINFO OFF CACHE BOOL "Build the webpinfo command line tool." FORCE)
|
||||
set(WEBP_BUILD_LIBWEBPMUX OFF CACHE BOOL "Build the libwebpmux library." FORCE)
|
||||
set(WEBP_BUILD_WEBPMUX OFF CACHE BOOL "Build the webpmux command line tool." FORCE)
|
||||
set(WEBP_BUILD_EXTRAS OFF CACHE BOOL "Build extras." FORCE)
|
||||
set(WEBP_BUILD_WEBP_JS OFF CACHE BOOL "Emscripten build of webp.js." FORCE)
|
||||
FetchContent_MakeAvailable(libwebp)
|
||||
add_library(WebP ALIAS webp)
|
||||
endfunction()
|
||||
|
||||
check_symbol_exists(getlogin "unistd.h" HAVE_GETLOGIN)
|
||||
check_symbol_exists(mmap "sys/mman.h" HAVE_MMAP)
|
||||
check_symbol_exists(sigaction "signal.h" HAVE_SIGACTION)
|
||||
|
||||
if (EMSCRIPTEN)
|
||||
function(add_emscripten_library name option)
|
||||
add_library(${name} INTERFACE)
|
||||
set_target_properties(${name} PROPERTIES
|
||||
INTERFACE_COMPILE_OPTIONS ${option}
|
||||
INTERFACE_LINK_OPTIONS ${option})
|
||||
endfunction()
|
||||
add_emscripten_library(zlib -sUSE_ZLIB=1)
|
||||
add_emscripten_library(sdl2 -sUSE_SDL=2)
|
||||
add_emscripten_library(sdl2_ttf -sUSE_SDL_TTF=2)
|
||||
set(DEFAULT_FONT_PATH /fonts/)
|
||||
fetch_webp()
|
||||
set(HAVE_WEBP 1)
|
||||
|
||||
elseif (ANDROID)
|
||||
add_library(sdl2 ALIAS SDL2)
|
||||
add_library(sdl2_ttf ALIAS SDL2_ttf)
|
||||
add_library(sdl2_mixer ALIAS SDL2_mixer)
|
||||
find_library(ndk_log log)
|
||||
find_library(ndk_zlib z)
|
||||
add_library(zlib INTERFACE)
|
||||
set_target_properties(zlib PROPERTIES INTERFACE_LINK_LIBRARIES ${ndk_zlib})
|
||||
fetch_webp()
|
||||
set(HAVE_WEBP 1)
|
||||
|
||||
else() # non-emscripten, non-android
|
||||
if (WIN32)
|
||||
set(ZLIB_USE_STATIC_LIBS ON)
|
||||
endif()
|
||||
find_package(ZLIB REQUIRED)
|
||||
add_library(zlib ALIAS ZLIB::ZLIB)
|
||||
|
||||
include(FindPkgConfig)
|
||||
optional_pkg_check_modules(GTK3 IMPORTED_TARGET gtk+-3.0)
|
||||
if (GTK3_FOUND)
|
||||
set(ENABLE_GTK 1)
|
||||
endif()
|
||||
|
||||
pkg_check_modules(SDL2 REQUIRED IMPORTED_TARGET sdl2)
|
||||
pkg_check_modules(SDL2TTF REQUIRED IMPORTED_TARGET SDL2_ttf)
|
||||
pkg_check_modules(SDL2MIXER REQUIRED IMPORTED_TARGET SDL2_mixer)
|
||||
if (WIN32)
|
||||
add_static_library(sdl2 SDL2)
|
||||
add_static_library(sdl2_ttf SDL2TTF)
|
||||
# Workaround for linking error
|
||||
set_property(TARGET sdl2_ttf PROPERTY INTERFACE_LINK_LIBRARIES
|
||||
$<LINK_GROUP:RESCAN,${SDL2TTF_STATIC_LIBRARIES} -lstdc++>)
|
||||
add_static_library(sdl2_mixer SDL2MIXER)
|
||||
else()
|
||||
add_library(sdl2 ALIAS PkgConfig::SDL2)
|
||||
add_library(sdl2_ttf ALIAS PkgConfig::SDL2TTF)
|
||||
add_library(sdl2_mixer ALIAS PkgConfig::SDL2MIXER)
|
||||
set(DEFAULT_FONT_PATH ${CMAKE_INSTALL_PREFIX}/share/xsystem35/fonts/)
|
||||
endif()
|
||||
|
||||
option(ENABLE_DEBUGGER "Enable built-in debugger" ON)
|
||||
if (ENABLE_DEBUGGER)
|
||||
pkg_check_modules(cJSON IMPORTED_TARGET libcjson)
|
||||
if (cJSON_FOUND)
|
||||
if (WIN32)
|
||||
add_static_library(cJSON cJSON)
|
||||
else ()
|
||||
add_library(cJSON ALIAS PkgConfig::cJSON)
|
||||
endif()
|
||||
else ()
|
||||
# libcjson-dev of Debian buster / Ubuntu 20.04 does not install pkgconfig files.
|
||||
find_library(cJSON cjson)
|
||||
if (NOT cJSON)
|
||||
message(FATAL_ERROR "libcjson is required but not found.")
|
||||
endif()
|
||||
add_library(cJSON ALIAS ${cJSON})
|
||||
endif()
|
||||
endif()
|
||||
|
||||
optional_pkg_check_modules(WEBP IMPORTED_TARGET libwebp)
|
||||
if (WEBP_FOUND)
|
||||
set(HAVE_WEBP 1)
|
||||
if (WIN32)
|
||||
add_static_library(WebP WEBP)
|
||||
else()
|
||||
add_library(WebP ALIAS PkgConfig::WEBP)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
find_library(PORTMIDI portmidi)
|
||||
if (PORTMIDI)
|
||||
set(HAVE_PORTMIDI 1)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Menu
|
||||
|
||||
if (ENABLE_GTK)
|
||||
# i18n support (currently only menus are translated)
|
||||
include(FindIntl)
|
||||
include(FindGettext)
|
||||
if (Intl_FOUND AND GETTEXT_FOUND)
|
||||
set(ENABLE_NLS 1)
|
||||
add_compile_definitions(LOCALEDIR="${CMAKE_INSTALL_PREFIX}/share/locale")
|
||||
include_directories(${Intl_INCLUDE_DIRS})
|
||||
link_libraries(${Intl_LIBRARIES})
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# PCM audio
|
||||
|
||||
if (EMSCRIPTEN)
|
||||
list(APPEND SUMMARY_AUDIO "Emscripten")
|
||||
else()
|
||||
list(APPEND SUMMARY_AUDIO "SDL_mixer")
|
||||
endif()
|
||||
|
||||
# CDROM
|
||||
|
||||
if (EMSCRIPTEN)
|
||||
list(APPEND SUMMARY_CDROM "Emscripten")
|
||||
else()
|
||||
list(APPEND SUMMARY_CDROM "SDL_mixer (wav|mp3|ogg...)")
|
||||
endif()
|
||||
set(DEFAULT_PLAYLIST_PATH "playlist.txt" CACHE STRING "Default playlist path")
|
||||
|
||||
# MIDI
|
||||
|
||||
if (EMSCRIPTEN)
|
||||
list(APPEND SUMMARY_MIDI "Emscripten")
|
||||
elseif (ANDROID)
|
||||
list(APPEND SUMMARY_MIDI "Android")
|
||||
else()
|
||||
list(APPEND SUMMARY_MIDI "SDL_mixer")
|
||||
set(ENABLE_MIDI_SDLMIXER 1)
|
||||
|
||||
if (HAVE_PORTMIDI)
|
||||
list(APPEND SUMMARY_MIDI "PortMidi")
|
||||
set(ENABLE_MIDI_PORTMIDI 1)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
function (print_summary name)
|
||||
if (ARGN)
|
||||
list(JOIN ARGN ", " MSG)
|
||||
else()
|
||||
set(MSG "none")
|
||||
endif()
|
||||
message(" ${name}: ${MSG}")
|
||||
endfunction()
|
||||
|
||||
message("xsystem35 summary:")
|
||||
message("------------------")
|
||||
print_summary(audio ${SUMMARY_AUDIO})
|
||||
print_summary(cdrom ${SUMMARY_CDROM})
|
||||
print_summary(midi ${SUMMARY_MIDI})
|
||||
message("------------------")
|
||||
|
||||
set(PACKAGE ${PROJECT_NAME})
|
||||
configure_file(config.h.in config.h)
|
||||
include_directories(${CMAKE_CURRENT_BINARY_DIR})
|
||||
add_compile_definitions($<$<CONFIG:Debug>:DEBUG>)
|
||||
|
||||
add_subdirectory(src)
|
||||
add_subdirectory(tools)
|
||||
add_subdirectory(fonts)
|
||||
if (NOT ANDROID AND NOT EMSCRIPTEN)
|
||||
add_subdirectory(doc)
|
||||
endif()
|
||||
if (ENABLE_NLS)
|
||||
add_subdirectory(po)
|
||||
endif()
|
||||
|
||||
add_subdirectory(modules)
|
||||
target_link_libraries(xsystem35 PRIVATE modules)
|
||||
@@ -1,195 +0,0 @@
|
||||
|
||||
System 3.5 for X Window System Version 1.7 (開発版)
|
||||
|
||||
インストールドキュメント
|
||||
|
||||
|
||||
0. 目次
|
||||
|
||||
1. 必要環境と対応機能
|
||||
2. コンパイルとインストール
|
||||
3. コンパイル時のオプション
|
||||
4. サポート
|
||||
|
||||
|
||||
1. 必要環境と対応機能
|
||||
|
||||
1.1 必要環境
|
||||
* X11R6
|
||||
* gtk+ 2.0.0 以上
|
||||
* SYSV IPC in kernel
|
||||
* zlib
|
||||
* Ogg Vorbis library (libvorbis)
|
||||
|
||||
1.2 推奨環境
|
||||
* スケーラブルフォント(例えば X-TT など)
|
||||
(http://X-TT.dsl.gr.jp/index-ja.html)
|
||||
* MIT-SHM extension をサポートした X Server。次のようにチェックします。
|
||||
$ xdpyinfo | grep MIT-SHM
|
||||
* MMX Pentinum 以降 (for IA32 platform)
|
||||
|
||||
1.3 対応機能
|
||||
* ALSA (for Linux) 0.9.x 以上
|
||||
(http://www.alsa-project.org/)
|
||||
* ESD (Esound) 0.2.8 以上
|
||||
(http://www.tux.org/~ricdude/EsounD.html)
|
||||
(ftp://ftp.gnome.org/pub/GNOME/stable/sources/esound/ or mirrors)
|
||||
* Joystick (for Linux kernel 2.2.x)
|
||||
* SDL(Simple DirectMedia Layer) 1.0.x 以上
|
||||
(http://www.devolution.com/~slouken/SDL)
|
||||
* FreeType Library 2.0 以上
|
||||
(http://www.freetype.org/)
|
||||
* midi デバイス(OSS /dev/midi, /dev/sequencer)を介した外部/仮想MIDI音源
|
||||
|
||||
1.4 注意点
|
||||
* コンパイルには GNU Make (gmake) と gtk-config と nasm (assembler)
|
||||
が必要です。(nasm は IA-32 platform のみ)
|
||||
* また gcc 以外でのコンパイルは多分出来ないと思います。標準 cc でコンパイル
|
||||
を通すためのパッチは大歓迎です。
|
||||
|
||||
|
||||
2. コンパイルとインストール
|
||||
|
||||
2.1 プログラムのコンパイルとインストール
|
||||
|
||||
$ tar xvfz xsystem35-(version).tar.gz # ソースコードの展開
|
||||
$ cd xsystem35-(version) # xsystem35 のトップディレクトリに移動
|
||||
$ cp src/xsys35rc.sample ~/.xsys35rc # 設定ファイルのコピー
|
||||
$ ./configure # `configure' スクリプトの実行
|
||||
$ make # xsystem35 のコンパイル
|
||||
[必要なら root になる]
|
||||
# make install # xsystem35 のインストール
|
||||
|
||||
default では make install で /usr/local/bin にインストールされます。
|
||||
|
||||
2.2 ゲームデータのインストール
|
||||
|
||||
contrib ディレクトリにゲームデータをインストールするプログラムが入っています。
|
||||
/cdromにCD-ROMをマウントした後、
|
||||
|
||||
$ cd ./contrib
|
||||
$ ./instgame kichiku.inf
|
||||
|
||||
のようにしてインストールします。 詳しくは contrib/README.TXTを御覧下さい。
|
||||
|
||||
|
||||
3. コンパイル時のオプション
|
||||
|
||||
$ ./configure --help
|
||||
で使用可能なオプションの一覧がでます。
|
||||
|
||||
* audio 関連
|
||||
|
||||
--enable-audio=xxx
|
||||
オーディオデバイスのうち xxx を有効にしてコンパイルします。xxx には今の所
|
||||
oss, alsa, esd が使えます。カンマで区切って並べて指定する事で複数のデバイ
|
||||
スをゲーム起動時に選択できます。(ex. --enable-audio=oss,alsa,esd)
|
||||
このオプションを指定しない時は OS ごとに適切なデバイスが組み込まれます。
|
||||
|
||||
--with-default-output=xxx
|
||||
--enable-audioで複数のデバイスを選択した時、デフォルトのデバイスをこの
|
||||
オプションで指定できます。指定しない場合は使用可能なデバイスのうち任意の
|
||||
デバイスを使用します。
|
||||
|
||||
--with-oss-audiodev=xxx
|
||||
OSS での DSP デバイスのデバイスファイルを xxx で指定します。デフォルトは
|
||||
/dev/dsp です。(*1)
|
||||
|
||||
--with-oss-mixerdev=xxx
|
||||
OSS での MIXER デバイスのデバイスファイルを xxx で指定します。デフォルトは
|
||||
/dev/mixer です。(*1)
|
||||
|
||||
--enable-cdrom=xxx
|
||||
CD-ROM デバイスのうち xxx を有効にしてコンパイルします。CD-DA の代わりに
|
||||
MP3などを外部プレイヤを使って演奏することも出来ます。xxx には linux,bsd,
|
||||
mp3 が使えます。
|
||||
カンマで区切って並べて指定することで複数のデバイスをゲーム起動時に選択
|
||||
できます。(ex. --enable-cdrom=linux,mp3)
|
||||
CD-DA を使うか MP3 を使うかの指定については README.music を御覧下さい。
|
||||
このオプションを指定しない時は OS ごとに適切なデバイスが組み込まれます。
|
||||
|
||||
--with-cdromdev=xxx
|
||||
CD-ROM デバイスのデバイスファイルを xxx で指定します。デフォルトは
|
||||
/dev/cdrom です。(*1)
|
||||
|
||||
--enable-midi=xxx
|
||||
MIDI デバイスのうち xxx を有効にしてコンパイルします。xxx にはいまのところ
|
||||
extp,raw,seq が使えます。extp は外部プレイヤを使って MIDI を演奏します。
|
||||
raw は Raw midi デバイス (/dev/midiなど)を通して外部MIDI機器を接続している
|
||||
場合に使います。seq は OSS sequencer device (/dev/sequencer) を通して MIDI
|
||||
機器を接続している場合に使います。カンマで区切って並べて指定することで複数
|
||||
のデバイスをゲーム起動時に選択できます。(ex. --enable-midi=extp,raw,seq)
|
||||
|
||||
--with-mididev=xxx
|
||||
Raw MIDI デバイスのデバイスファイルを xxx で指定します。デフォルトは
|
||||
/dev/midi です。(*1)
|
||||
|
||||
--with-seqdev=xxx
|
||||
Sequencer MIDI デバイスのデバイスファイルを xxx で指定します。デフォルトは
|
||||
/dev/sequencer です。(*1)
|
||||
|
||||
--with-midiplayer=xxx
|
||||
外部 MIDI プレイヤを指定します。デフォルトは midiplay -4 です。(*1)
|
||||
|
||||
--enable-qmidi
|
||||
外部 MIDI プレイヤを実行する際に、プレイヤーの実行時メッセージを抑止
|
||||
します。
|
||||
|
||||
|
||||
* graphics 関連
|
||||
|
||||
--enable-sdl
|
||||
SDL を有効にしてコンパイルします。
|
||||
|
||||
--enable-bgr
|
||||
X server の color order が BGR の時指定します。SunとSGIのプラットフォーム
|
||||
ではデフォルトでこの指定が有効になっています。それ以外のプラットフォーム
|
||||
では不要です。ただし、sgi O2 および、Sun sparc のマシンの中には RGB の
|
||||
並びのものもあるので、その場合は --enable-bgr=no あるいは --disable-bgr
|
||||
としてください。詳しくは doc/README.color を御覧下さい。
|
||||
|
||||
|
||||
* その他
|
||||
|
||||
--enable-joy
|
||||
Joystic support を有効にしてコンパイルします。Linux kernel 2.2 以降に
|
||||
対応しています。
|
||||
|
||||
--with-joydev=xxx
|
||||
Joystick デバイスのデバイスファイルを xxx で指定します。デフォルトは
|
||||
/dev/js0 です。(*1)
|
||||
|
||||
--with-locale=xxxx
|
||||
X の locale 機構を使う場合に指定します。Linux libc5 System 等では通常
|
||||
使用している locale を指定して下さい。(ex. --with-locale=ja_JP.ujis)
|
||||
それ以外では必要無いと思います。
|
||||
|
||||
--with-cachesize=xxxx
|
||||
データキャッシュの大きさを指定します。単位は MB で、デフォルトは 20MB
|
||||
です。データのほとんどは展開済み CG のキャッシュに使われます。シナリオ
|
||||
などのデータは mmap を使っていますので、キャッシングは xsystem35 の管理
|
||||
外です。
|
||||
|
||||
--enable-mmx
|
||||
IA32 プラットフォームで MMX を使うようにします。nasm というアセンブラが
|
||||
必要になります。IA32 ではデフォルトで有効にします。無効にする場合は =no
|
||||
を指定して下さい。実行時に MMX 命令が使用可能かどうかチェックしますので、
|
||||
MMX 命令を持たないCPUでも有効のままでかまいません。
|
||||
|
||||
--enable-debug
|
||||
debuging を有効にします。
|
||||
有効にしてコンパイルすると -debuglv # オプションが使えるようになります。
|
||||
debug level に関しては src/xsystem35.h を参照して下さい。
|
||||
|
||||
## (*1) 実行時に読み込む設定ファイル ~/.xsys35rc でも指定できます。
|
||||
|
||||
|
||||
参考: 私の開発時の configure オプション(実際には1行です)
|
||||
|
||||
./configure --enable-midi=extp,raw,seq --enable-audio=oss,alsa,esd
|
||||
--enable-cdrom=linux,mp3 --enable-debug
|
||||
|
||||
4. サポート
|
||||
|
||||
http://www.aist-nara.ac.jp/~masaki-c/private/unitbase/xsys35/index.html
|
||||
または READMEの 8. サポートの項を御覧下さい。
|
||||
@@ -1,8 +0,0 @@
|
||||
## Makefile.am for xsystem35
|
||||
|
||||
#SUBDIRS = m4 po libltdl macros modules src
|
||||
SUBDIRS = po libltdl macros modules src
|
||||
|
||||
ACLOCAL_AMFLAGS = -I macros
|
||||
|
||||
EXTRA_DIST = xsystem35.spec
|
||||
-905
@@ -1,905 +0,0 @@
|
||||
# Makefile.in generated by automake 1.14.1 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright (C) 1994-2013 Free Software Foundation, Inc.
|
||||
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
@SET_MAKE@
|
||||
VPATH = @srcdir@
|
||||
am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
|
||||
am__make_running_with_option = \
|
||||
case $${target_option-} in \
|
||||
?) ;; \
|
||||
*) echo "am__make_running_with_option: internal error: invalid" \
|
||||
"target option '$${target_option-}' specified" >&2; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
has_opt=no; \
|
||||
sane_makeflags=$$MAKEFLAGS; \
|
||||
if $(am__is_gnu_make); then \
|
||||
sane_makeflags=$$MFLAGS; \
|
||||
else \
|
||||
case $$MAKEFLAGS in \
|
||||
*\\[\ \ ]*) \
|
||||
bs=\\; \
|
||||
sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
|
||||
| sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
|
||||
esac; \
|
||||
fi; \
|
||||
skip_next=no; \
|
||||
strip_trailopt () \
|
||||
{ \
|
||||
flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
|
||||
}; \
|
||||
for flg in $$sane_makeflags; do \
|
||||
test $$skip_next = yes && { skip_next=no; continue; }; \
|
||||
case $$flg in \
|
||||
*=*|--*) continue;; \
|
||||
-*I) strip_trailopt 'I'; skip_next=yes;; \
|
||||
-*I?*) strip_trailopt 'I';; \
|
||||
-*O) strip_trailopt 'O'; skip_next=yes;; \
|
||||
-*O?*) strip_trailopt 'O';; \
|
||||
-*l) strip_trailopt 'l'; skip_next=yes;; \
|
||||
-*l?*) strip_trailopt 'l';; \
|
||||
-[dEDm]) skip_next=yes;; \
|
||||
-[JT]) skip_next=yes;; \
|
||||
esac; \
|
||||
case $$flg in \
|
||||
*$$target_option*) has_opt=yes; break;; \
|
||||
esac; \
|
||||
done; \
|
||||
test $$has_opt = yes
|
||||
am__make_dryrun = (target_option=n; $(am__make_running_with_option))
|
||||
am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkglibexecdir = $(libexecdir)/@PACKAGE@
|
||||
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||
install_sh_DATA = $(install_sh) -c -m 644
|
||||
install_sh_PROGRAM = $(install_sh) -c
|
||||
install_sh_SCRIPT = $(install_sh) -c
|
||||
INSTALL_HEADER = $(INSTALL_DATA)
|
||||
transform = $(program_transform_name)
|
||||
NORMAL_INSTALL = :
|
||||
PRE_INSTALL = :
|
||||
POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
build_triplet = @build@
|
||||
host_triplet = @host@
|
||||
target_triplet = @target@
|
||||
subdir = .
|
||||
DIST_COMMON = INSTALL NEWS README AUTHORS ChangeLog \
|
||||
$(srcdir)/Makefile.in $(srcdir)/Makefile.am \
|
||||
$(top_srcdir)/configure $(am__configure_deps) \
|
||||
$(srcdir)/config.h.in mkinstalldirs \
|
||||
$(srcdir)/xsystem35.spec.in ABOUT-NLS COPYING compile \
|
||||
config.guess config.rpath config.sub depcomp install-sh \
|
||||
missing ltmain.sh
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/macros/aclocal-include.m4 \
|
||||
$(top_srcdir)/macros/alsa.m4 $(top_srcdir)/macros/argz.m4 \
|
||||
$(top_srcdir)/macros/esd.m4 $(top_srcdir)/macros/freetype2.m4 \
|
||||
$(top_srcdir)/macros/gettext.m4 \
|
||||
$(top_srcdir)/macros/glib-2.0.m4 \
|
||||
$(top_srcdir)/macros/gtk-2.0.m4 $(top_srcdir)/macros/iconv.m4 \
|
||||
$(top_srcdir)/macros/lib-ld.m4 \
|
||||
$(top_srcdir)/macros/lib-link.m4 \
|
||||
$(top_srcdir)/macros/lib-prefix.m4 \
|
||||
$(top_srcdir)/macros/libtool.m4 $(top_srcdir)/macros/ltdl.m4 \
|
||||
$(top_srcdir)/macros/ltoptions.m4 \
|
||||
$(top_srcdir)/macros/ltsugar.m4 \
|
||||
$(top_srcdir)/macros/ltversion.m4 \
|
||||
$(top_srcdir)/macros/lt~obsolete.m4 \
|
||||
$(top_srcdir)/macros/ogg.m4 $(top_srcdir)/macros/progtest.m4 \
|
||||
$(top_srcdir)/macros/sdl.m4 $(top_srcdir)/macros/vorbis.m4 \
|
||||
$(top_srcdir)/configure.ac
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
|
||||
configure.lineno config.status.lineno
|
||||
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
|
||||
CONFIG_HEADER = config.h
|
||||
CONFIG_CLEAN_FILES = xsystem35.spec
|
||||
CONFIG_CLEAN_VPATH_FILES =
|
||||
AM_V_P = $(am__v_P_@AM_V@)
|
||||
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
|
||||
am__v_P_0 = false
|
||||
am__v_P_1 = :
|
||||
AM_V_GEN = $(am__v_GEN_@AM_V@)
|
||||
am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
|
||||
am__v_GEN_0 = @echo " GEN " $@;
|
||||
am__v_GEN_1 =
|
||||
AM_V_at = $(am__v_at_@AM_V@)
|
||||
am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
|
||||
am__v_at_0 = @
|
||||
am__v_at_1 =
|
||||
SOURCES =
|
||||
DIST_SOURCES =
|
||||
RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \
|
||||
ctags-recursive dvi-recursive html-recursive info-recursive \
|
||||
install-data-recursive install-dvi-recursive \
|
||||
install-exec-recursive install-html-recursive \
|
||||
install-info-recursive install-pdf-recursive \
|
||||
install-ps-recursive install-recursive installcheck-recursive \
|
||||
installdirs-recursive pdf-recursive ps-recursive \
|
||||
tags-recursive uninstall-recursive
|
||||
am__can_run_installinfo = \
|
||||
case $$AM_UPDATE_INFO_DIR in \
|
||||
n|no|NO) false;; \
|
||||
*) (install-info --version) >/dev/null 2>&1;; \
|
||||
esac
|
||||
RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
|
||||
distclean-recursive maintainer-clean-recursive
|
||||
am__recursive_targets = \
|
||||
$(RECURSIVE_TARGETS) \
|
||||
$(RECURSIVE_CLEAN_TARGETS) \
|
||||
$(am__extra_recursive_targets)
|
||||
AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \
|
||||
cscope distdir dist dist-all distcheck
|
||||
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) \
|
||||
$(LISP)config.h.in
|
||||
# Read a list of newline-separated strings from the standard input,
|
||||
# and print each of them once, without duplicates. Input order is
|
||||
# *not* preserved.
|
||||
am__uniquify_input = $(AWK) '\
|
||||
BEGIN { nonempty = 0; } \
|
||||
{ items[$$0] = 1; nonempty = 1; } \
|
||||
END { if (nonempty) { for (i in items) print i; }; } \
|
||||
'
|
||||
# Make sure the list of sources is unique. This is necessary because,
|
||||
# e.g., the same source file might be shared among _SOURCES variables
|
||||
# for different programs/libraries.
|
||||
am__define_uniq_tagged_files = \
|
||||
list='$(am__tagged_files)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | $(am__uniquify_input)`
|
||||
ETAGS = etags
|
||||
CTAGS = ctags
|
||||
CSCOPE = cscope
|
||||
DIST_SUBDIRS = $(SUBDIRS)
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
distdir = $(PACKAGE)-$(VERSION)
|
||||
top_distdir = $(distdir)
|
||||
am__remove_distdir = \
|
||||
if test -d "$(distdir)"; then \
|
||||
find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \
|
||||
&& rm -rf "$(distdir)" \
|
||||
|| { sleep 5 && rm -rf "$(distdir)"; }; \
|
||||
else :; fi
|
||||
am__post_remove_distdir = $(am__remove_distdir)
|
||||
am__relativize = \
|
||||
dir0=`pwd`; \
|
||||
sed_first='s,^\([^/]*\)/.*$$,\1,'; \
|
||||
sed_rest='s,^[^/]*/*,,'; \
|
||||
sed_last='s,^.*/\([^/]*\)$$,\1,'; \
|
||||
sed_butlast='s,/*[^/]*$$,,'; \
|
||||
while test -n "$$dir1"; do \
|
||||
first=`echo "$$dir1" | sed -e "$$sed_first"`; \
|
||||
if test "$$first" != "."; then \
|
||||
if test "$$first" = ".."; then \
|
||||
dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \
|
||||
dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \
|
||||
else \
|
||||
first2=`echo "$$dir2" | sed -e "$$sed_first"`; \
|
||||
if test "$$first2" = "$$first"; then \
|
||||
dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \
|
||||
else \
|
||||
dir2="../$$dir2"; \
|
||||
fi; \
|
||||
dir0="$$dir0"/"$$first"; \
|
||||
fi; \
|
||||
fi; \
|
||||
dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
|
||||
done; \
|
||||
reldir="$$dir2"
|
||||
DIST_ARCHIVES = $(distdir).tar.gz
|
||||
GZIP_ENV = --best
|
||||
DIST_TARGETS = dist-gzip
|
||||
distuninstallcheck_listfiles = find . -type f -print
|
||||
am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \
|
||||
| sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$'
|
||||
distcleancheck_listfiles = find . -type f -print
|
||||
ACLOCAL = @ACLOCAL@
|
||||
ALSA_CFLAGS = @ALSA_CFLAGS@
|
||||
ALSA_LIBS = @ALSA_LIBS@
|
||||
AMTAR = @AMTAR@
|
||||
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
|
||||
AR = @AR@
|
||||
ARGZ_H = @ARGZ_H@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AWK = @AWK@
|
||||
CC = @CC@
|
||||
CCDEPMODE = @CCDEPMODE@
|
||||
CFLAGS = @CFLAGS@
|
||||
CPP = @CPP@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
CYGPATH_W = @CYGPATH_W@
|
||||
DEBUG_CFLAGS = @DEBUG_CFLAGS@
|
||||
DEFS = @DEFS@
|
||||
DEPDIR = @DEPDIR@
|
||||
DLLTOOL = @DLLTOOL@
|
||||
DSYMUTIL = @DSYMUTIL@
|
||||
DUMPBIN = @DUMPBIN@
|
||||
ECHO_C = @ECHO_C@
|
||||
ECHO_N = @ECHO_N@
|
||||
ECHO_T = @ECHO_T@
|
||||
EGREP = @EGREP@
|
||||
ESD_CFLAGS = @ESD_CFLAGS@
|
||||
ESD_CONFIG = @ESD_CONFIG@
|
||||
ESD_LIBS = @ESD_LIBS@
|
||||
EXEEXT = @EXEEXT@
|
||||
EXTRACFLAGS = @EXTRACFLAGS@
|
||||
EXTRALDFLAGS = @EXTRALDFLAGS@
|
||||
EXTRALIBS = @EXTRALIBS@
|
||||
FGREP = @FGREP@
|
||||
FT2_CFLAGS = @FT2_CFLAGS@
|
||||
FT2_CONFIG = @FT2_CONFIG@
|
||||
FT2_LIBS = @FT2_LIBS@
|
||||
GLIB_CFLAGS = @GLIB_CFLAGS@
|
||||
GLIB_COMPILE_RESOURCES = @GLIB_COMPILE_RESOURCES@
|
||||
GLIB_GENMARSHAL = @GLIB_GENMARSHAL@
|
||||
GLIB_LIBS = @GLIB_LIBS@
|
||||
GLIB_MKENUMS = @GLIB_MKENUMS@
|
||||
GMSGFMT = @GMSGFMT@
|
||||
GOBJECT_QUERY = @GOBJECT_QUERY@
|
||||
GREP = @GREP@
|
||||
GTK_CFLAGS = @GTK_CFLAGS@
|
||||
GTK_LIBS = @GTK_LIBS@
|
||||
HAVE_NASM = @HAVE_NASM@
|
||||
INCLTDL = @INCLTDL@
|
||||
INSTALL = @INSTALL@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||
INTLLIBS = @INTLLIBS@
|
||||
JOY_S = @JOY_S@
|
||||
JPEG_CFLAGS = @JPEG_CFLAGS@
|
||||
JPEG_LIBS = @JPEG_LIBS@
|
||||
LD = @LD@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBADD_DL = @LIBADD_DL@
|
||||
LIBADD_DLD_LINK = @LIBADD_DLD_LINK@
|
||||
LIBADD_DLOPEN = @LIBADD_DLOPEN@
|
||||
LIBADD_SHL_LOAD = @LIBADD_SHL_LOAD@
|
||||
LIBICONV = @LIBICONV@
|
||||
LIBINTL = @LIBINTL@
|
||||
LIBLTDL = @LIBLTDL@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
LIBS = @LIBS@
|
||||
LIBTOOL = @LIBTOOL@
|
||||
LIPO = @LIPO@
|
||||
LN_S = @LN_S@
|
||||
LTDLDEPS = @LTDLDEPS@
|
||||
LTDLINCL = @LTDLINCL@
|
||||
LTDLOPEN = @LTDLOPEN@
|
||||
LTLIBICONV = @LTLIBICONV@
|
||||
LTLIBINTL = @LTLIBINTL@
|
||||
LTLIBOBJS = @LTLIBOBJS@
|
||||
LT_CONFIG_H = @LT_CONFIG_H@
|
||||
LT_DLLOADERS = @LT_DLLOADERS@
|
||||
LT_DLPREOPEN = @LT_DLPREOPEN@
|
||||
MAINT = @MAINT@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
MANIFEST_TOOL = @MANIFEST_TOOL@
|
||||
MKDIR_P = @MKDIR_P@
|
||||
MKINSTALLDIRS = @MKINSTALLDIRS@
|
||||
MSGFMT = @MSGFMT@
|
||||
MSGMERGE = @MSGMERGE@
|
||||
NM = @NM@
|
||||
NMEDIT = @NMEDIT@
|
||||
OBJDUMP = @OBJDUMP@
|
||||
OBJEXT = @OBJEXT@
|
||||
OGG_CFLAGS = @OGG_CFLAGS@
|
||||
OGG_LIBS = @OGG_LIBS@
|
||||
OTOOL = @OTOOL@
|
||||
OTOOL64 = @OTOOL64@
|
||||
PACKAGE = @PACKAGE@
|
||||
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||
PACKAGE_NAME = @PACKAGE_NAME@
|
||||
PACKAGE_STRING = @PACKAGE_STRING@
|
||||
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||
PACKAGE_URL = @PACKAGE_URL@
|
||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
PKG_CONFIG = @PKG_CONFIG@
|
||||
PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
|
||||
PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
|
||||
POSUB = @POSUB@
|
||||
RANLIB = @RANLIB@
|
||||
SDL = @SDL@
|
||||
SDL_CFLAGS = @SDL_CFLAGS@
|
||||
SDL_CONFIG = @SDL_CONFIG@
|
||||
SDL_LIBS = @SDL_LIBS@
|
||||
SED = @SED@
|
||||
SET_MAKE = @SET_MAKE@
|
||||
SHELL = @SHELL@
|
||||
SRC_ABLEND = @SRC_ABLEND@
|
||||
SRC_AUDIO = @SRC_AUDIO@
|
||||
SRC_CDROM = @SRC_CDROM@
|
||||
SRC_FONT = @SRC_FONT@
|
||||
SRC_GRAPHDEV = @SRC_GRAPHDEV@
|
||||
SRC_MENU = @SRC_MENU@
|
||||
SRC_MIDI = @SRC_MIDI@
|
||||
STRIP = @STRIP@
|
||||
USE_NLS = @USE_NLS@
|
||||
VERSION = @VERSION@
|
||||
VERSION_MA = @VERSION_MA@
|
||||
VERSION_MI = @VERSION_MI@
|
||||
VORBISENC_LIBS = @VORBISENC_LIBS@
|
||||
VORBISFILE_LIBS = @VORBISFILE_LIBS@
|
||||
VORBIS_CFLAGS = @VORBIS_CFLAGS@
|
||||
VORBIS_LIBS = @VORBIS_LIBS@
|
||||
XGETTEXT = @XGETTEXT@
|
||||
XMKMF = @XMKMF@
|
||||
X_CFLAGS = @X_CFLAGS@
|
||||
X_EXTRA_LIBS = @X_EXTRA_LIBS@
|
||||
X_LIBS = @X_LIBS@
|
||||
X_PRE_LIBS = @X_PRE_LIBS@
|
||||
ZLIB_LIBS = @ZLIB_LIBS@
|
||||
abs_builddir = @abs_builddir@
|
||||
abs_srcdir = @abs_srcdir@
|
||||
abs_top_builddir = @abs_top_builddir@
|
||||
abs_top_srcdir = @abs_top_srcdir@
|
||||
ac_ct_AR = @ac_ct_AR@
|
||||
ac_ct_CC = @ac_ct_CC@
|
||||
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
|
||||
am__include = @am__include@
|
||||
am__leading_dot = @am__leading_dot@
|
||||
am__quote = @am__quote@
|
||||
am__tar = @am__tar@
|
||||
am__untar = @am__untar@
|
||||
bindir = @bindir@
|
||||
build = @build@
|
||||
build_alias = @build_alias@
|
||||
build_cpu = @build_cpu@
|
||||
build_os = @build_os@
|
||||
build_vendor = @build_vendor@
|
||||
builddir = @builddir@
|
||||
datadir = @datadir@
|
||||
datarootdir = @datarootdir@
|
||||
docdir = @docdir@
|
||||
dvidir = @dvidir@
|
||||
exec_prefix = @exec_prefix@
|
||||
host = @host@
|
||||
host_alias = @host_alias@
|
||||
host_cpu = @host_cpu@
|
||||
host_os = @host_os@
|
||||
host_vendor = @host_vendor@
|
||||
htmldir = @htmldir@
|
||||
includedir = @includedir@
|
||||
infodir = @infodir@
|
||||
install_sh = @install_sh@
|
||||
libdir = @libdir@
|
||||
libexecdir = @libexecdir@
|
||||
localedir = @localedir@
|
||||
localstatedir = @localstatedir@
|
||||
ltdl_LIBOBJS = @ltdl_LIBOBJS@
|
||||
ltdl_LTLIBOBJS = @ltdl_LTLIBOBJS@
|
||||
mandir = @mandir@
|
||||
mkdir_p = @mkdir_p@
|
||||
oldincludedir = @oldincludedir@
|
||||
pdfdir = @pdfdir@
|
||||
prefix = @prefix@
|
||||
program_transform_name = @program_transform_name@
|
||||
psdir = @psdir@
|
||||
sbindir = @sbindir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
srcdir = @srcdir@
|
||||
subdirs = @subdirs@
|
||||
sys_symbol_underscore = @sys_symbol_underscore@
|
||||
sysconfdir = @sysconfdir@
|
||||
target = @target@
|
||||
target_alias = @target_alias@
|
||||
target_cpu = @target_cpu@
|
||||
target_os = @target_os@
|
||||
target_vendor = @target_vendor@
|
||||
top_build_prefix = @top_build_prefix@
|
||||
top_builddir = @top_builddir@
|
||||
top_srcdir = @top_srcdir@
|
||||
|
||||
#SUBDIRS = m4 po libltdl macros modules src
|
||||
SUBDIRS = po libltdl macros modules src
|
||||
ACLOCAL_AMFLAGS = -I macros
|
||||
EXTRA_DIST = xsystem35.spec
|
||||
all: config.h
|
||||
$(MAKE) $(AM_MAKEFLAGS) all-recursive
|
||||
|
||||
.SUFFIXES:
|
||||
am--refresh: Makefile
|
||||
@:
|
||||
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
|
||||
@for dep in $?; do \
|
||||
case '$(am__configure_deps)' in \
|
||||
*$$dep*) \
|
||||
echo ' cd $(srcdir) && $(AUTOMAKE) --gnu'; \
|
||||
$(am__cd) $(srcdir) && $(AUTOMAKE) --gnu \
|
||||
&& exit 0; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
done; \
|
||||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \
|
||||
$(am__cd) $(top_srcdir) && \
|
||||
$(AUTOMAKE) --gnu Makefile
|
||||
.PRECIOUS: Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
@case '$?' in \
|
||||
*config.status*) \
|
||||
echo ' $(SHELL) ./config.status'; \
|
||||
$(SHELL) ./config.status;; \
|
||||
*) \
|
||||
echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \
|
||||
esac;
|
||||
|
||||
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||
$(SHELL) ./config.status --recheck
|
||||
|
||||
$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
|
||||
$(am__cd) $(srcdir) && $(AUTOCONF)
|
||||
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
|
||||
$(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
|
||||
$(am__aclocal_m4_deps):
|
||||
|
||||
config.h: stamp-h1
|
||||
@test -f $@ || rm -f stamp-h1
|
||||
@test -f $@ || $(MAKE) $(AM_MAKEFLAGS) stamp-h1
|
||||
|
||||
stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status
|
||||
@rm -f stamp-h1
|
||||
cd $(top_builddir) && $(SHELL) ./config.status config.h
|
||||
$(srcdir)/config.h.in: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
|
||||
($(am__cd) $(top_srcdir) && $(AUTOHEADER))
|
||||
rm -f stamp-h1
|
||||
touch $@
|
||||
|
||||
distclean-hdr:
|
||||
-rm -f config.h stamp-h1
|
||||
xsystem35.spec: $(top_builddir)/config.status $(srcdir)/xsystem35.spec.in
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $@
|
||||
|
||||
mostlyclean-libtool:
|
||||
-rm -f *.lo
|
||||
|
||||
clean-libtool:
|
||||
-rm -rf .libs _libs
|
||||
|
||||
distclean-libtool:
|
||||
-rm -f libtool config.lt
|
||||
|
||||
# This directory's subdirectories are mostly independent; you can cd
|
||||
# into them and run 'make' without going through this Makefile.
|
||||
# To change the values of 'make' variables: instead of editing Makefiles,
|
||||
# (1) if the variable is set in 'config.status', edit 'config.status'
|
||||
# (which will cause the Makefiles to be regenerated when you run 'make');
|
||||
# (2) otherwise, pass the desired values on the 'make' command line.
|
||||
$(am__recursive_targets):
|
||||
@fail=; \
|
||||
if $(am__make_keepgoing); then \
|
||||
failcom='fail=yes'; \
|
||||
else \
|
||||
failcom='exit 1'; \
|
||||
fi; \
|
||||
dot_seen=no; \
|
||||
target=`echo $@ | sed s/-recursive//`; \
|
||||
case "$@" in \
|
||||
distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
|
||||
*) list='$(SUBDIRS)' ;; \
|
||||
esac; \
|
||||
for subdir in $$list; do \
|
||||
echo "Making $$target in $$subdir"; \
|
||||
if test "$$subdir" = "."; then \
|
||||
dot_seen=yes; \
|
||||
local_target="$$target-am"; \
|
||||
else \
|
||||
local_target="$$target"; \
|
||||
fi; \
|
||||
($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|
||||
|| eval $$failcom; \
|
||||
done; \
|
||||
if test "$$dot_seen" = "no"; then \
|
||||
$(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
|
||||
fi; test -z "$$fail"
|
||||
|
||||
ID: $(am__tagged_files)
|
||||
$(am__define_uniq_tagged_files); mkid -fID $$unique
|
||||
tags: tags-recursive
|
||||
TAGS: tags
|
||||
|
||||
tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
|
||||
set x; \
|
||||
here=`pwd`; \
|
||||
if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
|
||||
include_option=--etags-include; \
|
||||
empty_fix=.; \
|
||||
else \
|
||||
include_option=--include; \
|
||||
empty_fix=; \
|
||||
fi; \
|
||||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
if test "$$subdir" = .; then :; else \
|
||||
test ! -f $$subdir/TAGS || \
|
||||
set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
|
||||
fi; \
|
||||
done; \
|
||||
$(am__define_uniq_tagged_files); \
|
||||
shift; \
|
||||
if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
|
||||
test -n "$$unique" || unique=$$empty_fix; \
|
||||
if test $$# -gt 0; then \
|
||||
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||
"$$@" $$unique; \
|
||||
else \
|
||||
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||
$$unique; \
|
||||
fi; \
|
||||
fi
|
||||
ctags: ctags-recursive
|
||||
|
||||
CTAGS: ctags
|
||||
ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
|
||||
$(am__define_uniq_tagged_files); \
|
||||
test -z "$(CTAGS_ARGS)$$unique" \
|
||||
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
|
||||
$$unique
|
||||
|
||||
GTAGS:
|
||||
here=`$(am__cd) $(top_builddir) && pwd` \
|
||||
&& $(am__cd) $(top_srcdir) \
|
||||
&& gtags -i $(GTAGS_ARGS) "$$here"
|
||||
cscope: cscope.files
|
||||
test ! -s cscope.files \
|
||||
|| $(CSCOPE) -b -q $(AM_CSCOPEFLAGS) $(CSCOPEFLAGS) -i cscope.files $(CSCOPE_ARGS)
|
||||
clean-cscope:
|
||||
-rm -f cscope.files
|
||||
cscope.files: clean-cscope cscopelist
|
||||
cscopelist: cscopelist-recursive
|
||||
|
||||
cscopelist-am: $(am__tagged_files)
|
||||
list='$(am__tagged_files)'; \
|
||||
case "$(srcdir)" in \
|
||||
[\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
|
||||
*) sdir=$(subdir)/$(srcdir) ;; \
|
||||
esac; \
|
||||
for i in $$list; do \
|
||||
if test -f "$$i"; then \
|
||||
echo "$(subdir)/$$i"; \
|
||||
else \
|
||||
echo "$$sdir/$$i"; \
|
||||
fi; \
|
||||
done >> $(top_builddir)/cscope.files
|
||||
|
||||
distclean-tags:
|
||||
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
|
||||
-rm -f cscope.out cscope.in.out cscope.po.out cscope.files
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
$(am__remove_distdir)
|
||||
test -d "$(distdir)" || mkdir "$(distdir)"
|
||||
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||
list='$(DISTFILES)'; \
|
||||
dist_files=`for file in $$list; do echo $$file; done | \
|
||||
sed -e "s|^$$srcdirstrip/||;t" \
|
||||
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
|
||||
case $$dist_files in \
|
||||
*/*) $(MKDIR_P) `echo "$$dist_files" | \
|
||||
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
|
||||
sort -u` ;; \
|
||||
esac; \
|
||||
for file in $$dist_files; do \
|
||||
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
||||
if test -d $$d/$$file; then \
|
||||
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||
if test -d "$(distdir)/$$file"; then \
|
||||
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
|
||||
fi; \
|
||||
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
||||
cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
|
||||
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
|
||||
fi; \
|
||||
cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
|
||||
else \
|
||||
test -f "$(distdir)/$$file" \
|
||||
|| cp -p $$d/$$file "$(distdir)/$$file" \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
@list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
|
||||
if test "$$subdir" = .; then :; else \
|
||||
$(am__make_dryrun) \
|
||||
|| test -d "$(distdir)/$$subdir" \
|
||||
|| $(MKDIR_P) "$(distdir)/$$subdir" \
|
||||
|| exit 1; \
|
||||
dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
|
||||
$(am__relativize); \
|
||||
new_distdir=$$reldir; \
|
||||
dir1=$$subdir; dir2="$(top_distdir)"; \
|
||||
$(am__relativize); \
|
||||
new_top_distdir=$$reldir; \
|
||||
echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \
|
||||
echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \
|
||||
($(am__cd) $$subdir && \
|
||||
$(MAKE) $(AM_MAKEFLAGS) \
|
||||
top_distdir="$$new_top_distdir" \
|
||||
distdir="$$new_distdir" \
|
||||
am__remove_distdir=: \
|
||||
am__skip_length_check=: \
|
||||
am__skip_mode_fix=: \
|
||||
distdir) \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
-test -n "$(am__skip_mode_fix)" \
|
||||
|| find "$(distdir)" -type d ! -perm -755 \
|
||||
-exec chmod u+rwx,go+rx {} \; -o \
|
||||
! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
|
||||
! -type d ! -perm -400 -exec chmod a+r {} \; -o \
|
||||
! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \
|
||||
|| chmod -R a+r "$(distdir)"
|
||||
dist-gzip: distdir
|
||||
tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
|
||||
$(am__post_remove_distdir)
|
||||
|
||||
dist-bzip2: distdir
|
||||
tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2
|
||||
$(am__post_remove_distdir)
|
||||
|
||||
dist-lzip: distdir
|
||||
tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz
|
||||
$(am__post_remove_distdir)
|
||||
|
||||
dist-xz: distdir
|
||||
tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz
|
||||
$(am__post_remove_distdir)
|
||||
|
||||
dist-tarZ: distdir
|
||||
@echo WARNING: "Support for shar distribution archives is" \
|
||||
"deprecated." >&2
|
||||
@echo WARNING: "It will be removed altogether in Automake 2.0" >&2
|
||||
tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
|
||||
$(am__post_remove_distdir)
|
||||
|
||||
dist-shar: distdir
|
||||
@echo WARNING: "Support for distribution archives compressed with" \
|
||||
"legacy program 'compress' is deprecated." >&2
|
||||
@echo WARNING: "It will be removed altogether in Automake 2.0" >&2
|
||||
shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
|
||||
$(am__post_remove_distdir)
|
||||
|
||||
dist-zip: distdir
|
||||
-rm -f $(distdir).zip
|
||||
zip -rq $(distdir).zip $(distdir)
|
||||
$(am__post_remove_distdir)
|
||||
|
||||
dist dist-all:
|
||||
$(MAKE) $(AM_MAKEFLAGS) $(DIST_TARGETS) am__post_remove_distdir='@:'
|
||||
$(am__post_remove_distdir)
|
||||
|
||||
# This target untars the dist file and tries a VPATH configuration. Then
|
||||
# it guarantees that the distribution is self-contained by making another
|
||||
# tarfile.
|
||||
distcheck: dist
|
||||
case '$(DIST_ARCHIVES)' in \
|
||||
*.tar.gz*) \
|
||||
GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\
|
||||
*.tar.bz2*) \
|
||||
bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\
|
||||
*.tar.lz*) \
|
||||
lzip -dc $(distdir).tar.lz | $(am__untar) ;;\
|
||||
*.tar.xz*) \
|
||||
xz -dc $(distdir).tar.xz | $(am__untar) ;;\
|
||||
*.tar.Z*) \
|
||||
uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
|
||||
*.shar.gz*) \
|
||||
GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\
|
||||
*.zip*) \
|
||||
unzip $(distdir).zip ;;\
|
||||
esac
|
||||
chmod -R a-w $(distdir)
|
||||
chmod u+w $(distdir)
|
||||
mkdir $(distdir)/_build $(distdir)/_inst
|
||||
chmod a-w $(distdir)
|
||||
test -d $(distdir)/_build || exit 0; \
|
||||
dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
|
||||
&& dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
|
||||
&& am__cwd=`pwd` \
|
||||
&& $(am__cd) $(distdir)/_build \
|
||||
&& ../configure \
|
||||
$(AM_DISTCHECK_CONFIGURE_FLAGS) \
|
||||
$(DISTCHECK_CONFIGURE_FLAGS) \
|
||||
--srcdir=.. --prefix="$$dc_install_base" \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) dvi \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) check \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) install \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) installcheck \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) uninstall \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \
|
||||
distuninstallcheck \
|
||||
&& chmod -R a-w "$$dc_install_base" \
|
||||
&& ({ \
|
||||
(cd ../.. && umask 077 && mkdir "$$dc_destdir") \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \
|
||||
distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \
|
||||
} || { rm -rf "$$dc_destdir"; exit 1; }) \
|
||||
&& rm -rf "$$dc_destdir" \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) dist \
|
||||
&& rm -rf $(DIST_ARCHIVES) \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) distcleancheck \
|
||||
&& cd "$$am__cwd" \
|
||||
|| exit 1
|
||||
$(am__post_remove_distdir)
|
||||
@(echo "$(distdir) archives ready for distribution: "; \
|
||||
list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
|
||||
sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x'
|
||||
distuninstallcheck:
|
||||
@test -n '$(distuninstallcheck_dir)' || { \
|
||||
echo 'ERROR: trying to run $@ with an empty' \
|
||||
'$$(distuninstallcheck_dir)' >&2; \
|
||||
exit 1; \
|
||||
}; \
|
||||
$(am__cd) '$(distuninstallcheck_dir)' || { \
|
||||
echo 'ERROR: cannot chdir into $(distuninstallcheck_dir)' >&2; \
|
||||
exit 1; \
|
||||
}; \
|
||||
test `$(am__distuninstallcheck_listfiles) | wc -l` -eq 0 \
|
||||
|| { echo "ERROR: files left after uninstall:" ; \
|
||||
if test -n "$(DESTDIR)"; then \
|
||||
echo " (check DESTDIR support)"; \
|
||||
fi ; \
|
||||
$(distuninstallcheck_listfiles) ; \
|
||||
exit 1; } >&2
|
||||
distcleancheck: distclean
|
||||
@if test '$(srcdir)' = . ; then \
|
||||
echo "ERROR: distcleancheck can only run from a VPATH build" ; \
|
||||
exit 1 ; \
|
||||
fi
|
||||
@test `$(distcleancheck_listfiles) | wc -l` -eq 0 \
|
||||
|| { echo "ERROR: files left in build directory after distclean:" ; \
|
||||
$(distcleancheck_listfiles) ; \
|
||||
exit 1; } >&2
|
||||
check-am: all-am
|
||||
check: check-recursive
|
||||
all-am: Makefile config.h
|
||||
installdirs: installdirs-recursive
|
||||
installdirs-am:
|
||||
install: install-recursive
|
||||
install-exec: install-exec-recursive
|
||||
install-data: install-data-recursive
|
||||
uninstall: uninstall-recursive
|
||||
|
||||
install-am: all-am
|
||||
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||
|
||||
installcheck: installcheck-recursive
|
||||
install-strip:
|
||||
if test -z '$(STRIP)'; then \
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
install; \
|
||||
else \
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
"INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
|
||||
fi
|
||||
mostlyclean-generic:
|
||||
|
||||
clean-generic:
|
||||
|
||||
distclean-generic:
|
||||
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
||||
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
|
||||
|
||||
maintainer-clean-generic:
|
||||
@echo "This command is intended for maintainers to use"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
clean: clean-recursive
|
||||
|
||||
clean-am: clean-generic clean-libtool mostlyclean-am
|
||||
|
||||
distclean: distclean-recursive
|
||||
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
|
||||
-rm -f Makefile
|
||||
distclean-am: clean-am distclean-generic distclean-hdr \
|
||||
distclean-libtool distclean-tags
|
||||
|
||||
dvi: dvi-recursive
|
||||
|
||||
dvi-am:
|
||||
|
||||
html: html-recursive
|
||||
|
||||
html-am:
|
||||
|
||||
info: info-recursive
|
||||
|
||||
info-am:
|
||||
|
||||
install-data-am:
|
||||
|
||||
install-dvi: install-dvi-recursive
|
||||
|
||||
install-dvi-am:
|
||||
|
||||
install-exec-am:
|
||||
|
||||
install-html: install-html-recursive
|
||||
|
||||
install-html-am:
|
||||
|
||||
install-info: install-info-recursive
|
||||
|
||||
install-info-am:
|
||||
|
||||
install-man:
|
||||
|
||||
install-pdf: install-pdf-recursive
|
||||
|
||||
install-pdf-am:
|
||||
|
||||
install-ps: install-ps-recursive
|
||||
|
||||
install-ps-am:
|
||||
|
||||
installcheck-am:
|
||||
|
||||
maintainer-clean: maintainer-clean-recursive
|
||||
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
|
||||
-rm -rf $(top_srcdir)/autom4te.cache
|
||||
-rm -f Makefile
|
||||
maintainer-clean-am: distclean-am maintainer-clean-generic
|
||||
|
||||
mostlyclean: mostlyclean-recursive
|
||||
|
||||
mostlyclean-am: mostlyclean-generic mostlyclean-libtool
|
||||
|
||||
pdf: pdf-recursive
|
||||
|
||||
pdf-am:
|
||||
|
||||
ps: ps-recursive
|
||||
|
||||
ps-am:
|
||||
|
||||
uninstall-am:
|
||||
|
||||
.MAKE: $(am__recursive_targets) all install-am install-strip
|
||||
|
||||
.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am \
|
||||
am--refresh check check-am clean clean-cscope clean-generic \
|
||||
clean-libtool cscope cscopelist-am ctags ctags-am dist \
|
||||
dist-all dist-bzip2 dist-gzip dist-lzip dist-shar dist-tarZ \
|
||||
dist-xz dist-zip distcheck distclean distclean-generic \
|
||||
distclean-hdr distclean-libtool distclean-tags distcleancheck \
|
||||
distdir distuninstallcheck dvi dvi-am html html-am info \
|
||||
info-am install install-am install-data install-data-am \
|
||||
install-dvi install-dvi-am install-exec install-exec-am \
|
||||
install-html install-html-am install-info install-info-am \
|
||||
install-man install-pdf install-pdf-am install-ps \
|
||||
install-ps-am install-strip installcheck installcheck-am \
|
||||
installdirs installdirs-am maintainer-clean \
|
||||
maintainer-clean-generic mostlyclean mostlyclean-generic \
|
||||
mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \
|
||||
uninstall-am
|
||||
|
||||
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
||||
@@ -0,0 +1,145 @@
|
||||
# xsytem35-sdl2
|
||||
|
||||
This is a multi-platform port of `xsystem35`, a free implementation of
|
||||
AliceSoft's System 3.x game engine.
|
||||
|
||||
## Compatibility
|
||||
|
||||
See the [game compatibility table](game_compatibility.md) for a list of games
|
||||
that can be played with xsystem35-sdl2.
|
||||
|
||||
## Unique Features
|
||||
|
||||
In addition to the original System 3.x functionalities, xsystem35-sdl2 offers
|
||||
the following features:
|
||||
|
||||
### Playing Audio Files as Virtual CD Music
|
||||
|
||||
Many System 3.x games feature music as audio tracks on the CD-ROM. xsystem35
|
||||
can play music from audio files, eliminating the need to insert CDs. To use
|
||||
ripped audio files, create a file named `playlist.txt` in the game directory
|
||||
and list the paths to your tracks, one per line. For example:
|
||||
|
||||
```
|
||||
# The first line is not used
|
||||
BGM/track02.mp3
|
||||
BGM/track03.mp3
|
||||
...
|
||||
```
|
||||
|
||||
The first line is not used because the first track on a game CD is typically a
|
||||
data track.
|
||||
|
||||
Some games have integrated music as MIDI. In such cases, the music won't play
|
||||
using the virtual CD feature. If you encounter a `Cannot load MIDI` error
|
||||
message, you might need to set the `SDL_SOUNDFONTS` environment variable to
|
||||
point to an `.sf2` file. For example:
|
||||
|
||||
```
|
||||
SDL_SOUNDFONTS=/usr/share/soundfonts/GeneralUser.sf2 xsystem35
|
||||
```
|
||||
|
||||
### Unicode Translation Support
|
||||
|
||||
While the original System 3.x only supported Shift_JIS (a Japanese character
|
||||
encoding), xsystem35 supports Unicode and can run games translated into
|
||||
languages other than Japanese and English.
|
||||
|
||||
For instructions on how to build a game with Unicode support, see the
|
||||
[xsys35c](https://github.com/kichikuou/xsys35c) documentation.
|
||||
|
||||
### Debugging
|
||||
|
||||
xsystem35 features a built-in debugger that allows you to step through the game
|
||||
and examine or modify game variables. There are two ways to use the debugger:
|
||||
|
||||
- Through [Visual Studio Code](https://code.visualstudio.com/) (recommended):
|
||||
The [vscode-system3x](https://github.com/kichikuou/vscode-system3x) extension
|
||||
provides a graphical debugging interface for System 3.x.
|
||||
- Using the CLI Debugger: Running xsystem35 with the `-debug` option will
|
||||
launch the debugger with a console interface. Type `help` to see a list of
|
||||
available commands.
|
||||
|
||||
## Installation
|
||||
|
||||
Prebuilt packages for Windows and Android can be downloaded from the
|
||||
[Releases](https://github.com/kichikuou/xsystem35-sdl2/releases) page.
|
||||
|
||||
Note for Windows:
|
||||
- The 64-bit version supports Windows 10 or later. For older versions of
|
||||
Windows, please use the 32-bit version.
|
||||
- Debugging is supported only in the 64-bit version.
|
||||
|
||||
For other platforms, refer to the [Building](#building) section.
|
||||
|
||||
## Running
|
||||
### Windows
|
||||
|
||||
Copy `xsystem35.exe` to the game folder and run it.
|
||||
|
||||
### Android
|
||||
|
||||
See [android/README.md](android/README.md#usage).
|
||||
|
||||
### Other Platforms
|
||||
|
||||
Run xsystem35 from within the game directory.
|
||||
|
||||
```bash
|
||||
$ cd /path/to/game_directory
|
||||
$ xsystem35
|
||||
```
|
||||
|
||||
See [xsystem35 command manual](doc/xsystem35.6.adoc) for detailed usage.
|
||||
|
||||
## Building
|
||||
### Linux (Debian / Ubuntu)
|
||||
|
||||
```bash
|
||||
$ sudo apt install build-essential cmake libgtk-3-dev libsdl2-dev libsdl2-ttf-dev libsdl2-mixer-dev libwebp-dev libportmidi-dev libcjson-dev asciidoctor
|
||||
$ mkdir -p out/debug
|
||||
$ cd out/debug
|
||||
$ cmake -DCMAKE_BUILD_TYPE=Debug ../../
|
||||
$ make && make install
|
||||
```
|
||||
|
||||
### MacOS
|
||||
|
||||
[Homebrew](https://brew.sh/) is required.
|
||||
|
||||
```bash
|
||||
$ brew install cmake pkg-config sdl2 sdl2_mixer sdl2_ttf webp portmidi cjson asciidoctor
|
||||
$ mkdir -p out/debug
|
||||
$ cd out/debug
|
||||
$ cmake -DCMAKE_BUILD_TYPE=Debug ../../
|
||||
$ make && make install
|
||||
```
|
||||
|
||||
### Windows
|
||||
|
||||
[MSYS2](https://www.msys2.org) is required.
|
||||
|
||||
```bash
|
||||
$ pacman -S cmake mingw-w64-ucrt-x86_64-gcc mingw-w64-ucrt-x86_64-cmake mingw-w64-ucrt-x86_64-SDL2 mingw-w64-ucrt-x86_64-SDL2_ttf mingw-w64-ucrt-x86_64-SDL2_mixer mingw-w64-ucrt-x86_64-libwebp mingw-w64-ucrt-x86_64-portmidi mingw-w64-ucrt-x86_64-cjson
|
||||
$ mkdir -p out/debug
|
||||
$ cd out/debug
|
||||
$ cmake -G"MSYS Makefiles" -DCMAKE_BUILD_TYPE=Debug ../../
|
||||
$ make
|
||||
```
|
||||
|
||||
### Emscripten
|
||||
|
||||
```bash
|
||||
$ mkdir -p out/wasm
|
||||
$ cd out/wasm
|
||||
$ emcmake cmake -DCMAKE_BUILD_TYPE=MinSizeRel ../../
|
||||
$ make
|
||||
```
|
||||
|
||||
To use the generated binary, check out
|
||||
[Kichikuou on Web](https://github.com/kichikuou/web) and copy `out/xsystem35.*`
|
||||
into its `docs` directory.
|
||||
|
||||
### Android
|
||||
|
||||
See [android/README.md](android/).
|
||||
Vendored
-1451
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,73 @@
|
||||
# xsystem35 for Android
|
||||
|
||||
## Download
|
||||
You can download prebuilt APKs
|
||||
[here](https://github.com/kichikuou/xsystem35-sdl2/releases).
|
||||
|
||||
## Build
|
||||
Prerequisites:
|
||||
- Android SDK >=28
|
||||
- Android NDK >=r15c
|
||||
|
||||
### Using Android Studio
|
||||
Open this directory as an Android Studio project.
|
||||
|
||||
### Command Line Build
|
||||
Set environment variables and run the `gradlew` script in this directory.
|
||||
|
||||
Example build instructions (for Debian bookworm):
|
||||
```sh
|
||||
# Install necessary packages
|
||||
sudo apt install git wget unzip default-jdk-headless ninja-build
|
||||
|
||||
# Install Android SDK / NDK
|
||||
export ANDROID_SDK_ROOT=$HOME/android-sdk
|
||||
mkdir -p $ANDROID_SDK_ROOT/cmdline-tools
|
||||
wget https://dl.google.com/android/repository/commandlinetools-linux-10406996_latest.zip
|
||||
unzip commandlinetools-linux-10406996_latest.zip -d $ANDROID_SDK_ROOT/cmdline-tools
|
||||
mv $ANDROID_SDK_ROOT/cmdline-tools/cmdline-tools $ANDROID_SDK_ROOT/cmdline-tools/tools
|
||||
yes | $ANDROID_SDK_ROOT/cmdline-tools/tools/bin/sdkmanager --licenses
|
||||
$ANDROID_SDK_ROOT/cmdline-tools/tools/bin/sdkmanager ndk-bundle 'cmake;3.22.1'
|
||||
export ANDROID_NDK_HOME=$ANDROID_SDK_ROOT/ndk-bundle
|
||||
|
||||
# Clone and build xsystem35
|
||||
git clone https://github.com/kichikuou/xsystem35-sdl2.git
|
||||
cd xsystem35-sdl2/android
|
||||
./gradlew build # or ./gradlew installDebug if you have a connected device
|
||||
```
|
||||
|
||||
## Usage
|
||||
### Basic Usage
|
||||
1. Create a ZIP file containing all the game files and BGM files (see
|
||||
[below](#preparing-a-zip) for details), and transfer it to your device.
|
||||
2. Open the app. A list of installed games will be displayed. Since no games
|
||||
have been installed yet, only the "Install from ZIP" button will be visible.
|
||||
Tap it.
|
||||
3. Select the ZIP file you created in step 1.
|
||||
4. The game will start. To simulate a right-click, tap the black bars on either
|
||||
the left or right, or top or bottom of the screen.
|
||||
|
||||
### Preparing a ZIP
|
||||
- Include all files from the `GAMEDATA` folder (such as `.ALD` files and
|
||||
others). `.EXE` and `.DLL` files are not necessary, but you can include them
|
||||
if you want.
|
||||
- Music files (`.mp3`, `.ogg`, or `.wav`) whose filenames end with a number
|
||||
will be recognized as BGM files. For example:
|
||||
- `Track2.mp3`
|
||||
- `15.ogg`
|
||||
- `rance4_03.wav` (Note: The filename shouldn't be `rance403.wav`, as it
|
||||
would be treated as the 403rd track.)
|
||||
|
||||
Note: This ZIP format is also compatible with
|
||||
[Kichikuou on Web](http://kichikuou.github.io/web/).
|
||||
|
||||
### Miscellaneous
|
||||
- You can export or import save files via the game list's option menu.
|
||||
- To uninstall a game, long-tap its title in the game list.
|
||||
|
||||
## Known Issues
|
||||
- Android versions older than 7.0 cannot handle ZIP files containing Shift-JIS
|
||||
filenames. This issue occurs with some ZIP files distributed on
|
||||
[retroc.net](http://retropc.net/alice/). If you encounter the error message
|
||||
"This type of ZIP is not supported," unzip the file on your PC and re-archive
|
||||
it using modern ZIP creation software.
|
||||
@@ -0,0 +1,92 @@
|
||||
def buildAsLibrary = project.hasProperty('BUILD_AS_LIBRARY')
|
||||
def buildAsApplication = !buildAsLibrary
|
||||
if (buildAsApplication) {
|
||||
apply plugin: 'com.android.application'
|
||||
}
|
||||
else {
|
||||
apply plugin: 'com.android.library'
|
||||
}
|
||||
apply plugin: 'kotlin-android'
|
||||
|
||||
android {
|
||||
if (buildAsApplication) {
|
||||
namespace "io.github.kichikuou.xsystem35"
|
||||
}
|
||||
compileSdkVersion 34
|
||||
defaultConfig {
|
||||
minSdkVersion 19
|
||||
targetSdkVersion 34
|
||||
versionCode 26
|
||||
versionName "2.12.0" + gitRevision()
|
||||
externalNativeBuild {
|
||||
cmake {
|
||||
arguments "-DANDROID_APP_PLATFORM=android-19", "-DANDROID_STL=c++_static"
|
||||
// abiFilters 'armeabi-v7a', 'arm64-v8a', 'x86', 'x86_64'
|
||||
abiFilters 'armeabi-v7a', 'arm64-v8a'
|
||||
}
|
||||
}
|
||||
}
|
||||
signingConfigs {
|
||||
release {
|
||||
storeFile rootProject.file('keystore.jks')
|
||||
storePassword System.getenv('KEYSTORE_PASSWORD')
|
||||
keyAlias System.getenv('KEY_ALIAS')
|
||||
keyPassword System.getenv('KEY_PASSWORD')
|
||||
}
|
||||
}
|
||||
buildTypes {
|
||||
release {
|
||||
minifyEnabled false
|
||||
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
||||
if (rootProject.file('keystore.jks').exists()) {
|
||||
signingConfig signingConfigs.release
|
||||
}
|
||||
}
|
||||
}
|
||||
applicationVariants.all { variant ->
|
||||
tasks["merge${variant.name.capitalize()}Assets"]
|
||||
.dependsOn("externalNativeBuild${variant.name.capitalize()}")
|
||||
}
|
||||
if (!project.hasProperty('EXCLUDE_NATIVE_LIBS')) {
|
||||
sourceSets.main {
|
||||
jniLibs.srcDir 'libs'
|
||||
}
|
||||
aaptOptions {
|
||||
// Disable asset compression for fonts.
|
||||
// Without this, text rendering will be very slow.
|
||||
noCompress 'ttf', 'otf'
|
||||
}
|
||||
externalNativeBuild {
|
||||
cmake {
|
||||
version '3.22.1'
|
||||
path 'jni/CMakeLists.txt'
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
lint {
|
||||
abortOnError false
|
||||
}
|
||||
|
||||
if (buildAsLibrary) {
|
||||
libraryVariants.all { variant ->
|
||||
variant.outputs.each { output ->
|
||||
def outputFile = output.outputFile
|
||||
if (outputFile != null && outputFile.name.endsWith(".aar")) {
|
||||
def fileName = "org.libsdl.app.aar"
|
||||
output.outputFile = new File(outputFile.parent, fileName)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation fileTree(include: ['*.jar'], dir: 'libs')
|
||||
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
|
||||
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.6.4'
|
||||
}
|
||||
|
||||
static String gitRevision() {
|
||||
' (git ' + "git rev-parse --short HEAD".execute().text.trim() + ')'
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
include $(call all-subdir-makefiles)
|
||||
@@ -0,0 +1,10 @@
|
||||
|
||||
# Uncomment this if you're using STL in your project
|
||||
# You can find more information here:
|
||||
# https://developer.android.com/ndk/guides/cpp-support
|
||||
# APP_STL := c++_shared
|
||||
|
||||
APP_ABI := armeabi-v7a arm64-v8a x86 x86_64
|
||||
|
||||
# Min runtime API level
|
||||
APP_PLATFORM=android-16
|
||||
@@ -0,0 +1,53 @@
|
||||
cmake_minimum_required(VERSION 3.14)
|
||||
|
||||
project(GAME)
|
||||
set(PROJECT_ROOT_DIR ../../..)
|
||||
|
||||
# Compilation of SDL and companion libraries
|
||||
include(FetchContent)
|
||||
FetchContent_Declare(
|
||||
SDL
|
||||
URL https://github.com/libsdl-org/SDL/releases/download/release-2.30.9/SDL2-2.30.9.tar.gz
|
||||
URL_HASH SHA1=9403df0573d47f62f2de074b582b87576bb4abbc
|
||||
)
|
||||
FetchContent_Declare(
|
||||
SDL_ttf
|
||||
URL https://github.com/libsdl-org/SDL_ttf/releases/download/release-2.22.0/SDL2_ttf-2.22.0.tar.gz
|
||||
URL_HASH SHA1=da5e86b601ad299a697878fab1af6f3be47b529d
|
||||
)
|
||||
FetchContent_Declare(
|
||||
SDL_mixer
|
||||
URL https://github.com/libsdl-org/SDL_mixer/releases/download/release-2.8.0/SDL2_mixer-2.8.0.tar.gz
|
||||
URL_HASH SHA1=a58c69f9d00e44833b9e00e1adb58d85759ca499
|
||||
)
|
||||
|
||||
set(SDL2TTF_SAMPLES OFF CACHE BOOL "Build the SDL2_ttf sample program(s)" FORCE)
|
||||
set(SDL2TTF_INSTALL OFF CACHE BOOL "Enable SDL2_ttf install target" FORCE)
|
||||
set(SDL2TTF_VENDORED ON CACHE BOOL "Use vendored third-party libraries" FORCE)
|
||||
|
||||
set(SDL2MIXER_OPUS OFF CACHE BOOL "Enable Opus music" FORCE)
|
||||
set(SDL2MIXER_FLAC OFF CACHE BOOL "Enable FLAC music" FORCE)
|
||||
set(SDL2MIXER_MOD OFF CACHE BOOL "Support loading MOD music" FORCE)
|
||||
set(SDL2MIXER_MIDI OFF CACHE BOOL "Enable MIDI music" FORCE)
|
||||
set(SDL2MIXER_WAVPACK OFF CACHE BOOL "Enable WavPack music" FORCE)
|
||||
set(SDL2MIXER_SAMPLES OFF CACHE BOOL "Build the SDL2_mixer sample program(s)" FORCE)
|
||||
set(SDL2MIXER_INSTALL OFF CACHE BOOL "Enable SDL2_mixer install target" FORCE)
|
||||
|
||||
FetchContent_MakeAvailable(SDL SDL_ttf SDL_mixer)
|
||||
|
||||
# The main CMakeLists.txt of xsystem35
|
||||
add_subdirectory(${PROJECT_ROOT_DIR} xsystem35)
|
||||
|
||||
# Copy asset files
|
||||
set(ASSETS_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../src/main/assets)
|
||||
file(MAKE_DIRECTORY ${ASSETS_DIR}/licenses)
|
||||
file(COPY_FILE ${PROJECT_ROOT_DIR}/fonts/MTLc3m.ttf ${ASSETS_DIR}/MTLc3m.ttf)
|
||||
file(COPY_FILE ${PROJECT_ROOT_DIR}/fonts/mincho.otf ${ASSETS_DIR}/mincho.otf)
|
||||
file(COPY_FILE ${PROJECT_ROOT_DIR}/COPYING ${ASSETS_DIR}/licenses/xsystem35)
|
||||
file(COPY_FILE ${PROJECT_ROOT_DIR}/fonts/MTLc3m.ttf.license ${ASSETS_DIR}/licenses/MTLc3m)
|
||||
file(COPY_FILE ${PROJECT_ROOT_DIR}/fonts/mincho.otf.license ${ASSETS_DIR}/licenses/mincho)
|
||||
file(COPY_FILE ${sdl_SOURCE_DIR}/LICENSE.txt ${ASSETS_DIR}/licenses/SDL)
|
||||
file(COPY_FILE ${sdl_ttf_SOURCE_DIR}/LICENSE.txt ${ASSETS_DIR}/licenses/SDL_ttf)
|
||||
file(COPY_FILE ${sdl_ttf_SOURCE_DIR}/external/freetype/docs/GPLv2.TXT ${ASSETS_DIR}/licenses/freetype)
|
||||
file(COPY_FILE ${sdl_ttf_SOURCE_DIR}/external/harfbuzz/COPYING ${ASSETS_DIR}/licenses/harfbuzz)
|
||||
file(COPY_FILE ${sdl_mixer_SOURCE_DIR}/LICENSE.txt ${ASSETS_DIR}/licenses/SDL_mixer)
|
||||
@@ -0,0 +1,18 @@
|
||||
LOCAL_PATH := $(call my-dir)
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
|
||||
LOCAL_MODULE := main
|
||||
|
||||
SDL_PATH := ../SDL
|
||||
|
||||
LOCAL_C_INCLUDES := $(LOCAL_PATH)/$(SDL_PATH)/include
|
||||
|
||||
# Add your application source files here...
|
||||
LOCAL_SRC_FILES := YourSourceHere.c
|
||||
|
||||
LOCAL_SHARED_LIBRARIES := SDL2
|
||||
|
||||
LOCAL_LDLIBS := -lGLESv1_CM -lGLESv2 -lOpenSLES -llog -landroid
|
||||
|
||||
include $(BUILD_SHARED_LIBRARY)
|
||||
@@ -0,0 +1,13 @@
|
||||
cmake_minimum_required(VERSION 3.6)
|
||||
|
||||
project(MY_APP)
|
||||
|
||||
find_library(SDL2 SDL2)
|
||||
|
||||
add_library(main SHARED)
|
||||
|
||||
target_sources(main PRIVATE YourSourceHere.c)
|
||||
|
||||
target_link_libraries(main SDL2)
|
||||
|
||||
|
||||
Vendored
+17
@@ -0,0 +1,17 @@
|
||||
# Add project specific ProGuard rules here.
|
||||
# By default, the flags in this file are appended to flags specified
|
||||
# in [sdk]/tools/proguard/proguard-android.txt
|
||||
# You can edit the include path and order by changing the proguardFiles
|
||||
# directive in build.gradle.
|
||||
#
|
||||
# For more details, see
|
||||
# http://developer.android.com/guide/developing/tools/proguard.html
|
||||
|
||||
# Add any project specific keep options here:
|
||||
|
||||
# If your project uses WebView with JS, uncomment the following
|
||||
# and specify the fully qualified class name to the JavaScript interface
|
||||
# class:
|
||||
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
|
||||
# public *;
|
||||
#}
|
||||
@@ -0,0 +1,109 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Replace com.test.game with the identifier of your game below, e.g.
|
||||
com.gamemaker.game
|
||||
-->
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:installLocation="auto">
|
||||
|
||||
<!-- OpenGL ES 2.0 -->
|
||||
<uses-feature android:glEsVersion="0x00020000" />
|
||||
|
||||
<!-- Touchscreen support -->
|
||||
<uses-feature
|
||||
android:name="android.hardware.touchscreen"
|
||||
android:required="false" />
|
||||
|
||||
<!-- Game controller support -->
|
||||
<uses-feature
|
||||
android:name="android.hardware.bluetooth"
|
||||
android:required="false" />
|
||||
<uses-feature
|
||||
android:name="android.hardware.gamepad"
|
||||
android:required="false" />
|
||||
<uses-feature
|
||||
android:name="android.hardware.usb.host"
|
||||
android:required="false" />
|
||||
|
||||
<!-- External mouse input events -->
|
||||
<uses-feature
|
||||
android:name="android.hardware.type.pc"
|
||||
android:required="false" />
|
||||
|
||||
<!-- Audio recording support -->
|
||||
<!-- if you want to capture audio, uncomment this. -->
|
||||
<!-- <uses-feature
|
||||
android:name="android.hardware.microphone"
|
||||
android:required="false" /> -->
|
||||
|
||||
<!-- Allow downloading to the external storage on Android 5.1 and older -->
|
||||
<!-- <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" android:maxSdkVersion="22" /> -->
|
||||
|
||||
<!-- Allow access to Bluetooth devices -->
|
||||
<!-- Currently this is just for Steam Controller support and requires setting SDL_HINT_JOYSTICK_HIDAPI_STEAM -->
|
||||
<!-- <uses-permission android:name="android.permission.BLUETOOTH" android:maxSdkVersion="30" /> -->
|
||||
<!-- <uses-permission android:name="android.permission.BLUETOOTH_CONNECT" /> -->
|
||||
|
||||
<!-- Allow access to the vibrator -->
|
||||
<!-- <uses-permission android:name="android.permission.VIBRATE" /> -->
|
||||
|
||||
<!-- if you want to capture audio, uncomment this. -->
|
||||
<!-- <uses-permission android:name="android.permission.RECORD_AUDIO" /> -->
|
||||
|
||||
<!-- Create a Java class extending SDLActivity and place it in a
|
||||
directory under app/src/main/java matching the package, e.g. app/src/main/java/com/gamemaker/game/MyGame.java
|
||||
|
||||
then replace "SDLActivity" with the name of your class (e.g. "MyGame")
|
||||
in the XML below.
|
||||
|
||||
An example Java class can be found in README-android.md
|
||||
-->
|
||||
<application android:label="@string/app_name"
|
||||
android:icon="@drawable/ic_launcher"
|
||||
android:allowBackup="false"
|
||||
tools:ignore="GoogleAppIndexingWarning">
|
||||
|
||||
<!-- Example of setting SDL hints from AndroidManifest.xml:
|
||||
<meta-data android:name="SDL_ENV.SDL_ACCELEROMETER_AS_JOYSTICK" android:value="0"/>
|
||||
-->
|
||||
|
||||
<activity android:name=".LauncherActivity"
|
||||
android:exported="true">
|
||||
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
<category android:name="android.intent.category.LAUNCHER" />
|
||||
</intent-filter>
|
||||
</activity>
|
||||
|
||||
<activity android:name=".GameActivity"
|
||||
android:label="@string/app_name"
|
||||
android:alwaysRetainTaskState="true"
|
||||
android:configChanges="layoutDirection|locale|orientation|uiMode|screenLayout|screenSize|smallestScreenSize|keyboard|keyboardHidden|navigation"
|
||||
android:theme="@style/AppTheme"
|
||||
android:hardwareAccelerated="true"
|
||||
>
|
||||
|
||||
<!-- Drop file event -->
|
||||
<!--
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.VIEW" />
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
<data android:mimeType="*/*" />
|
||||
</intent-filter>
|
||||
-->
|
||||
</activity>
|
||||
|
||||
<activity android:name=".LicensesMenuActivity"
|
||||
android:label="@string/action_licenses"
|
||||
android:parentActivityName=".LauncherActivity"
|
||||
android:exported="false">
|
||||
</activity>
|
||||
|
||||
<activity android:name=".LicensesActivity"
|
||||
android:parentActivityName=".LicensesMenuActivity"
|
||||
android:exported="false">
|
||||
</activity>
|
||||
</application>
|
||||
|
||||
</manifest>
|
||||
@@ -0,0 +1,201 @@
|
||||
/* Copyright (C) 2019 <KichikuouChrome@gmail.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
*/
|
||||
package io.github.kichikuou.xsystem35
|
||||
|
||||
import android.app.AlertDialog
|
||||
import android.media.MediaPlayer
|
||||
import android.os.Bundle
|
||||
import android.text.InputType
|
||||
import android.util.Log
|
||||
import android.widget.EditText
|
||||
import android.widget.NumberPicker
|
||||
import org.libsdl.app.SDLActivity
|
||||
import java.io.File
|
||||
import java.io.IOException
|
||||
|
||||
// Intent for this activity must have the following extra:
|
||||
// - EXTRA_GAME_ROOT (string): A path to the game installation.
|
||||
// - EXTRA_SAVE_DIRECTORY (string): A path to the save data directory.
|
||||
class GameActivity : SDLActivity() {
|
||||
companion object {
|
||||
const val EXTRA_GAME_ROOT = "GAME_ROOT"
|
||||
const val EXTRA_SAVE_DIRECTORY = "SAVE_DIRECTORY"
|
||||
const val EXTRA_ARCHIVE_NAME = "ARCHIVE_NAME"
|
||||
}
|
||||
|
||||
private lateinit var gameRoot: File
|
||||
private val midi = MidiPlayer()
|
||||
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
gameRoot = File(intent.getStringExtra(EXTRA_GAME_ROOT)!!)
|
||||
}
|
||||
|
||||
override fun onStop() {
|
||||
super.onStop()
|
||||
midi.onActivityStop()
|
||||
}
|
||||
|
||||
override fun onResume() {
|
||||
super.onResume()
|
||||
midi.onActivityResume()
|
||||
}
|
||||
|
||||
override fun getLibraries(): Array<String> {
|
||||
return arrayOf("SDL2", "xsystem35")
|
||||
}
|
||||
|
||||
override fun getArguments(): Array<String> {
|
||||
return arrayOf(
|
||||
"-gamedir", intent.getStringExtra(EXTRA_GAME_ROOT)!!,
|
||||
"-savedir", intent.getStringExtra(EXTRA_SAVE_DIRECTORY)!!)
|
||||
}
|
||||
|
||||
override fun setTitle(title: CharSequence?) {
|
||||
super.setTitle(title)
|
||||
var str = title?.toString()?.substringAfter(':', "")
|
||||
if (str.isNullOrEmpty()) {
|
||||
str = intent.getStringExtra(EXTRA_ARCHIVE_NAME)
|
||||
if (str == null)
|
||||
return
|
||||
}
|
||||
File(gameRoot, Launcher.TITLE_FILE).writeText(str)
|
||||
Launcher.updateGameList()
|
||||
}
|
||||
|
||||
private fun textInputDialog(msg: String, oldVal: String, maxLen: Int, result: Array<String?>) {
|
||||
val input = EditText(this)
|
||||
input.inputType = InputType.TYPE_CLASS_TEXT
|
||||
input.setText(oldVal)
|
||||
AlertDialog.Builder(this)
|
||||
.setMessage(msg)
|
||||
.setView(input)
|
||||
.setPositiveButton(R.string.ok) {_, _ ->
|
||||
val s = input.text.toString()
|
||||
result[0] = if (s.length <= maxLen) s else s.substring(0, maxLen)
|
||||
}
|
||||
.setNegativeButton(R.string.cancel) {_, _ -> }
|
||||
.setOnDismissListener {
|
||||
synchronized(result) {
|
||||
@Suppress("PLATFORM_CLASS_MAPPED_TO_KOTLIN") (result as Object).notify()
|
||||
}
|
||||
}
|
||||
.show()
|
||||
}
|
||||
|
||||
private fun numberInputDialog(msg: String, min: Int, max: Int, initial: Int, result: IntArray) {
|
||||
val input = NumberPicker(this)
|
||||
input.minValue = min
|
||||
input.maxValue = max
|
||||
input.value = initial
|
||||
AlertDialog.Builder(this)
|
||||
.setMessage(msg)
|
||||
.setView(input)
|
||||
.setPositiveButton(R.string.ok) {_, _ ->
|
||||
input.clearFocus()
|
||||
result[0] = input.value
|
||||
}
|
||||
.setNegativeButton(R.string.cancel) {_, _ -> }
|
||||
.setOnDismissListener {
|
||||
synchronized(result) {
|
||||
@Suppress("PLATFORM_CLASS_MAPPED_TO_KOTLIN") (result as Object).notify()
|
||||
}
|
||||
}
|
||||
.show()
|
||||
}
|
||||
|
||||
// The functions below are called in the SDL thread by JNI.
|
||||
@Suppress("unused") fun midiStart(path: String, loop: Boolean) = midi.start(path, loop)
|
||||
@Suppress("unused") fun midiStop() = midi.stop()
|
||||
@Suppress("unused") fun midiCurrentPosition() = midi.currentPosition()
|
||||
|
||||
@Suppress("unused") fun inputString(msg: String, oldVal: String, maxLen: Int): String? {
|
||||
val result = arrayOfNulls<String?>(1)
|
||||
runOnUiThread { textInputDialog(msg, oldVal, maxLen, result) }
|
||||
// Block the calling thread.
|
||||
synchronized(result) {
|
||||
try {
|
||||
@Suppress("PLATFORM_CLASS_MAPPED_TO_KOTLIN") (result as Object).wait()
|
||||
} catch (ex: InterruptedException) {
|
||||
ex.printStackTrace()
|
||||
}
|
||||
}
|
||||
return result[0]
|
||||
}
|
||||
|
||||
@Suppress("unused") fun inputNumber(msg: String, min: Int, max: Int, initial: Int): Int {
|
||||
val result = intArrayOf(-1)
|
||||
runOnUiThread { numberInputDialog(msg, min, max, initial, result) }
|
||||
// Block the calling thread.
|
||||
synchronized(result) {
|
||||
try {
|
||||
@Suppress("PLATFORM_CLASS_MAPPED_TO_KOTLIN") (result as Object).wait()
|
||||
} catch (ex: InterruptedException) {
|
||||
ex.printStackTrace()
|
||||
}
|
||||
}
|
||||
return result[0]
|
||||
}
|
||||
}
|
||||
|
||||
private class MidiPlayer {
|
||||
private val player = MediaPlayer()
|
||||
private var playing = false
|
||||
private var playerPaused = false
|
||||
|
||||
fun start(path: String, loop: Boolean) {
|
||||
try {
|
||||
player.apply {
|
||||
reset()
|
||||
setDataSource(path)
|
||||
isLooping = loop
|
||||
prepare()
|
||||
start()
|
||||
}
|
||||
playing = true
|
||||
} catch (e: IOException) {
|
||||
Log.e("midiStart", "Cannot play midi", e)
|
||||
player.reset()
|
||||
}
|
||||
}
|
||||
|
||||
fun stop() {
|
||||
if (playing && player.isPlaying) {
|
||||
player.stop()
|
||||
playing = false
|
||||
}
|
||||
}
|
||||
|
||||
fun currentPosition(): Int {
|
||||
return if (playing) player.currentPosition else 0
|
||||
}
|
||||
|
||||
fun onActivityStop() {
|
||||
if (playing && player.isPlaying) {
|
||||
player.pause()
|
||||
playerPaused = true
|
||||
}
|
||||
}
|
||||
|
||||
fun onActivityResume() {
|
||||
if (playerPaused) {
|
||||
player.start()
|
||||
playerPaused = false
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,277 @@
|
||||
/* Copyright (C) 2020 <KichikuouChrome@gmail.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
*/
|
||||
package io.github.kichikuou.xsystem35
|
||||
|
||||
import android.os.Build
|
||||
import android.util.Log
|
||||
import kotlinx.coroutines.DelicateCoroutinesApi
|
||||
import kotlinx.coroutines.Dispatchers
|
||||
import kotlinx.coroutines.GlobalScope
|
||||
import kotlinx.coroutines.launch
|
||||
import kotlinx.coroutines.withContext
|
||||
import java.io.*
|
||||
import java.nio.charset.Charset
|
||||
import java.util.zip.ZipEntry
|
||||
import java.util.zip.ZipInputStream
|
||||
import java.util.zip.ZipOutputStream
|
||||
|
||||
private var gLauncher: Launcher? = null
|
||||
|
||||
interface LauncherObserver {
|
||||
fun onGameListChange()
|
||||
fun onInstallProgress(path: String)
|
||||
fun onInstallSuccess(path: File, archiveName: String?)
|
||||
fun onInstallFailure(msgId: Int)
|
||||
}
|
||||
|
||||
class Launcher private constructor(private val rootDir: File) {
|
||||
companion object {
|
||||
const val SAVE_DIR = "save"
|
||||
const val TITLE_FILE = "title.txt"
|
||||
const val GAMEDIR_FILE = "game_directory.txt"
|
||||
const val PLAYLIST_FILE = "playlist.txt"
|
||||
const val OLD_PLAYLIST_FILE = "playlist2.txt"
|
||||
|
||||
fun getInstance(rootDir: File): Launcher {
|
||||
if (gLauncher == null) {
|
||||
gLauncher = Launcher(rootDir)
|
||||
}
|
||||
return gLauncher!!
|
||||
}
|
||||
|
||||
fun updateGameList() {
|
||||
gLauncher?.updateGameList()
|
||||
}
|
||||
}
|
||||
|
||||
data class Entry(val path: File, val title: String, val timestamp: Long)
|
||||
val games = arrayListOf<Entry>()
|
||||
val titles: List<String>
|
||||
get() = games.map(Entry::title)
|
||||
var observer: LauncherObserver? = null
|
||||
var isInstalling = false
|
||||
private set
|
||||
|
||||
init {
|
||||
updateGameList()
|
||||
}
|
||||
|
||||
@OptIn(DelicateCoroutinesApi::class)
|
||||
fun install(input: InputStream, archiveName: String?) {
|
||||
val dir = createDirForGame()
|
||||
isInstalling = true
|
||||
GlobalScope.launch(Dispatchers.Main) {
|
||||
try {
|
||||
val gameDir = withContext(Dispatchers.IO) {
|
||||
extractFiles(input, dir) { msg ->
|
||||
GlobalScope.launch(Dispatchers.Main) {
|
||||
observer?.onInstallProgress(msg)
|
||||
}
|
||||
}
|
||||
}
|
||||
observer?.onInstallSuccess(gameDir, archiveName)
|
||||
} catch (e: InstallFailureException) {
|
||||
observer?.onInstallFailure(e.msgId)
|
||||
} catch (e: Exception) {
|
||||
Log.e("launcher", "Failed to extract ZIP", e)
|
||||
observer?.onInstallFailure(R.string.zip_extraction_error)
|
||||
}
|
||||
isInstalling = false
|
||||
}
|
||||
}
|
||||
|
||||
fun uninstall(id: Int) {
|
||||
games[id].path.deleteRecursively()
|
||||
games.removeAt(id)
|
||||
observer?.onGameListChange()
|
||||
}
|
||||
|
||||
private fun updateGameList() {
|
||||
var saveDirFound = false
|
||||
games.clear()
|
||||
for (path in rootDir.listFiles() ?: emptyArray()) {
|
||||
if (!path.isDirectory)
|
||||
continue
|
||||
if (path.name == SAVE_DIR) {
|
||||
saveDirFound = true
|
||||
continue
|
||||
}
|
||||
try {
|
||||
val gameDirFile = File(path, GAMEDIR_FILE)
|
||||
val gamePath = if (gameDirFile.exists()) File(path, gameDirFile.readText()) else path
|
||||
val titleFile = File(gamePath, TITLE_FILE)
|
||||
val title = titleFile.readText()
|
||||
games.add(Entry(gamePath, title, titleFile.lastModified()))
|
||||
migratePlaylist(path)
|
||||
} catch (e: IOException) {
|
||||
// Incomplete game installation. Delete it.
|
||||
path.deleteRecursively()
|
||||
}
|
||||
}
|
||||
games.sortByDescending(Entry::timestamp)
|
||||
if (!saveDirFound) {
|
||||
File(rootDir, SAVE_DIR).mkdir()
|
||||
}
|
||||
}
|
||||
|
||||
private fun createDirForGame(): File {
|
||||
var i = 0
|
||||
while (true) {
|
||||
val f = File(rootDir, i++.toString())
|
||||
if (!f.exists() && f.mkdir()) {
|
||||
return f
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Throws IOException
|
||||
fun exportSaveData(output: OutputStream) {
|
||||
ZipOutputStream(output.buffered()).use { zip ->
|
||||
for (path in File(rootDir, SAVE_DIR).listFiles() ?: emptyArray()) {
|
||||
if (path.isDirectory || path.name.endsWith(".asd."))
|
||||
continue
|
||||
val pathInZip = "${SAVE_DIR}/${path.name}"
|
||||
Log.i("exportSaveData", pathInZip)
|
||||
zip.putNextEntry(ZipEntry(pathInZip))
|
||||
path.inputStream().buffered().use {
|
||||
it.copyTo(zip)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fun importSaveData(input: InputStream): Int? {
|
||||
try {
|
||||
var imported = false
|
||||
forEachZipEntry(input) { zipEntry, zip ->
|
||||
// Process only files directly under save/
|
||||
if (zipEntry.isDirectory || !zipEntry.name.startsWith("save/") ||
|
||||
zipEntry.name.count{it == '/'} != 1)
|
||||
return@forEachZipEntry
|
||||
Log.i("importSaveData", zipEntry.name)
|
||||
FileOutputStream(File(rootDir, zipEntry.name)).buffered().use {
|
||||
zip.copyTo(it)
|
||||
}
|
||||
imported = true
|
||||
}
|
||||
return if (imported) null else R.string.no_data_to_import
|
||||
} catch (e: UTFDataFormatException) {
|
||||
// Attempted to read Shift_JIS zip in Android < 7
|
||||
return R.string.unsupported_zip
|
||||
} catch (e: IOException) {
|
||||
Log.e("launcher", "Failed to extract ZIP", e)
|
||||
return R.string.zip_extraction_error
|
||||
}
|
||||
}
|
||||
|
||||
private fun extractFiles(input: InputStream, outDir: File, progressCallback: (String) -> Unit): File {
|
||||
val configWriter = GameConfigWriter()
|
||||
val hadDecodeError = forEachZipEntry(input) { zipEntry, zip ->
|
||||
Log.i("extractFiles", zipEntry.name)
|
||||
val path = File(outDir, zipEntry.name)
|
||||
if (zipEntry.isDirectory)
|
||||
return@forEachZipEntry
|
||||
path.parentFile?.mkdirs()
|
||||
progressCallback(zipEntry.name)
|
||||
FileOutputStream(path).buffered().use {
|
||||
zip.copyTo(it)
|
||||
}
|
||||
configWriter.maybeAdd(zipEntry.name)
|
||||
}
|
||||
if (!configWriter.ready) {
|
||||
if (hadDecodeError)
|
||||
throw InstallFailureException(R.string.unsupported_zip)
|
||||
throw InstallFailureException(R.string.cannot_find_ald)
|
||||
}
|
||||
configWriter.write(outDir)
|
||||
return configWriter.gameDir?.let { File(outDir, it) } ?: outDir
|
||||
}
|
||||
|
||||
// Xsystem35-sdl2 2.3.0 - 2.11.1 used playlist2.txt. Rename it to playlist.txt.
|
||||
private fun migratePlaylist(dir: File) {
|
||||
val oldPlaylist = File(dir, OLD_PLAYLIST_FILE)
|
||||
if (oldPlaylist.exists()) {
|
||||
oldPlaylist.renameTo(File(dir, PLAYLIST_FILE))
|
||||
}
|
||||
}
|
||||
|
||||
class InstallFailureException(val msgId: Int) : Exception()
|
||||
|
||||
// A helper class which generates GAMEDIR_FILE and PLAYLIST_FILE.
|
||||
private class GameConfigWriter {
|
||||
var ready = false
|
||||
private set
|
||||
var gameDir: String? = null
|
||||
private set
|
||||
private val aldRegex = """.*?s[a-z]\.ald""".toRegex(RegexOption.IGNORE_CASE)
|
||||
private val audioRegex = """.*?(\d+)\.(wav|mp3|ogg)""".toRegex(RegexOption.IGNORE_CASE)
|
||||
private val audioFiles: Array<String?> = arrayOfNulls(100)
|
||||
|
||||
fun maybeAdd(path: String) {
|
||||
aldRegex.matchEntire(path)?.let {
|
||||
gameDir = File(path).parent
|
||||
ready = true
|
||||
}
|
||||
audioRegex.matchEntire(path)?.let {
|
||||
val track = it.groupValues[1].toInt()
|
||||
if (0 < track && track <= audioFiles.size)
|
||||
audioFiles[track - 1] = path
|
||||
}
|
||||
}
|
||||
|
||||
fun write(outDir: File) {
|
||||
// Generate GAMEDIR_FILE
|
||||
gameDir?.let {
|
||||
File(outDir, GAMEDIR_FILE).writeText(it)
|
||||
}
|
||||
// Generate PLAYLIST_FILE
|
||||
val absGameDir = gameDir?.let { File(outDir, it) } ?: outDir
|
||||
val playlistFile = File(absGameDir, PLAYLIST_FILE)
|
||||
if (!playlistFile.exists()) {
|
||||
val prefixToRemove = gameDir?.let { "$it/" } ?: ""
|
||||
val playlist = audioFiles.joinToString("\n") {
|
||||
it?.removePrefix(prefixToRemove) ?: ""
|
||||
}.trimEnd('\n')
|
||||
playlistFile.writeText(playlist)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private fun forEachZipEntry(input: InputStream, action: (ZipEntry, ZipInputStream) -> Unit): Boolean {
|
||||
val zip = if (Build.VERSION.SDK_INT >= 24) {
|
||||
ZipInputStream(input.buffered(), Charset.forName("Shift_JIS"))
|
||||
} else {
|
||||
ZipInputStream(input.buffered())
|
||||
}
|
||||
var hadDecodeError = false
|
||||
zip.use {
|
||||
while (true) {
|
||||
try {
|
||||
val zipEntry = zip.nextEntry ?: break
|
||||
action(zipEntry, zip)
|
||||
} catch (e: UTFDataFormatException) {
|
||||
// Attempted to read Shift_JIS zip in Android < 7
|
||||
Log.w("forEachZipEntry", "UTFDataFormatException: skipping a zip entry")
|
||||
zip.closeEntry()
|
||||
hadDecodeError = true
|
||||
}
|
||||
}
|
||||
}
|
||||
return hadDecodeError
|
||||
}
|
||||
@@ -0,0 +1,230 @@
|
||||
/* Copyright (C) 2019 <KichikuouChrome@gmail.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
*/
|
||||
package io.github.kichikuou.xsystem35
|
||||
|
||||
import android.app.*
|
||||
import android.content.Intent
|
||||
import android.net.Uri
|
||||
import android.os.Bundle
|
||||
import android.provider.OpenableColumns
|
||||
import android.util.Log
|
||||
import android.view.Menu
|
||||
import android.view.MenuItem
|
||||
import android.widget.ArrayAdapter
|
||||
import android.widget.ListView
|
||||
import android.widget.TextView
|
||||
import android.widget.Toast
|
||||
import java.io.*
|
||||
|
||||
private const val CONTENT_TYPE_ZIP = "application/zip"
|
||||
private const val INSTALL_REQUEST = 1
|
||||
private const val SAVEDATA_EXPORT_REQUEST = 2
|
||||
private const val SAVEDATA_IMPORT_REQUEST = 3
|
||||
private const val STATE_PROGRESS_TEXT = "progressText"
|
||||
|
||||
class LauncherActivity : Activity(), LauncherObserver {
|
||||
private lateinit var launcher: Launcher
|
||||
private var progressDialog: Dialog? = null
|
||||
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
setContentView(R.layout.launcher)
|
||||
|
||||
launcher = Launcher.getInstance(filesDir)
|
||||
launcher.observer = this
|
||||
if (launcher.isInstalling) {
|
||||
showProgressDialog(savedInstanceState)
|
||||
}
|
||||
|
||||
onGameListChange()
|
||||
val listView = findViewById<ListView>(R.id.list)
|
||||
listView.setOnItemClickListener { _, _, position, _ ->
|
||||
onListItemClick(position)
|
||||
}
|
||||
listView.setOnItemLongClickListener { _, _, position, _ ->
|
||||
onItemLongClick(position)
|
||||
}
|
||||
}
|
||||
|
||||
override fun onDestroy() {
|
||||
launcher.observer = null
|
||||
dismissProgressDialog()
|
||||
super.onDestroy()
|
||||
}
|
||||
|
||||
override fun onSaveInstanceState(outState: Bundle) {
|
||||
progressDialog?.let {
|
||||
outState.putCharSequence(STATE_PROGRESS_TEXT, it.findViewById<TextView>(R.id.text).text)
|
||||
}
|
||||
super.onSaveInstanceState(outState)
|
||||
}
|
||||
|
||||
private fun onListItemClick(position: Int) {
|
||||
if (position < launcher.games.size) {
|
||||
startGame(launcher.games[position].path, null)
|
||||
} else {
|
||||
val i = Intent(Intent.ACTION_GET_CONTENT)
|
||||
i.type = CONTENT_TYPE_ZIP
|
||||
startActivityForResult(Intent.createChooser(i, getString(R.string.choose_a_file)), INSTALL_REQUEST)
|
||||
}
|
||||
}
|
||||
|
||||
private fun onItemLongClick(position: Int): Boolean {
|
||||
if (position < launcher.games.size) {
|
||||
AlertDialog.Builder(this).setTitle(R.string.uninstall_dialog_title)
|
||||
.setMessage(getString(R.string.uninstall_dialog_message, launcher.games[position].title))
|
||||
.setPositiveButton(R.string.ok) {_, _ -> uninstall(position)}
|
||||
.setNegativeButton(R.string.cancel) {_, _ -> }
|
||||
.show()
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
override fun onCreateOptionsMenu(menu: Menu): Boolean {
|
||||
menuInflater.inflate(R.menu.launcher_menu, menu)
|
||||
return true
|
||||
}
|
||||
|
||||
override fun onOptionsItemSelected(item: MenuItem): Boolean {
|
||||
return when (item.itemId) {
|
||||
R.id.export_savedata -> {
|
||||
val i = Intent(Intent.ACTION_CREATE_DOCUMENT)
|
||||
i.type = CONTENT_TYPE_ZIP
|
||||
i.putExtra(Intent.EXTRA_TITLE, "savedata.zip")
|
||||
startActivityForResult(i, SAVEDATA_EXPORT_REQUEST)
|
||||
true
|
||||
}
|
||||
R.id.import_savedata -> {
|
||||
val i = Intent(Intent.ACTION_GET_CONTENT)
|
||||
i.type = CONTENT_TYPE_ZIP
|
||||
startActivityForResult(Intent.createChooser(i, getString(R.string.choose_a_file)),
|
||||
SAVEDATA_IMPORT_REQUEST)
|
||||
true
|
||||
}
|
||||
R.id.licenses -> {
|
||||
val intent = Intent(this, LicensesMenuActivity::class.java)
|
||||
startActivity(intent)
|
||||
true
|
||||
}
|
||||
else -> super.onOptionsItemSelected(item)
|
||||
}
|
||||
}
|
||||
|
||||
override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {
|
||||
if (resultCode != RESULT_OK)
|
||||
return
|
||||
val uri = data?.data ?: return
|
||||
when (requestCode) {
|
||||
INSTALL_REQUEST -> {
|
||||
val input = contentResolver.openInputStream(uri) ?: return
|
||||
showProgressDialog()
|
||||
launcher.install(input, getArchiveName(uri))
|
||||
}
|
||||
SAVEDATA_EXPORT_REQUEST -> try {
|
||||
launcher.exportSaveData(contentResolver.openOutputStream(uri)!!)
|
||||
Toast.makeText(this, R.string.save_data_export_success, Toast.LENGTH_SHORT).show()
|
||||
} catch (e: IOException) {
|
||||
Log.e("launcher", "Failed to export savedata", e)
|
||||
errorDialog(R.string.save_data_export_error)
|
||||
}
|
||||
SAVEDATA_IMPORT_REQUEST -> {
|
||||
val input = contentResolver.openInputStream(uri) ?: return
|
||||
val errMsgId = launcher.importSaveData(input)
|
||||
if (errMsgId == null) {
|
||||
Toast.makeText(this, R.string.save_data_import_success, Toast.LENGTH_SHORT).show()
|
||||
} else {
|
||||
errorDialog(errMsgId)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
override fun onGameListChange() {
|
||||
val items = launcher.titles.toMutableList()
|
||||
items.add(getString(R.string.install_from_zip))
|
||||
val listView = findViewById<ListView>(R.id.list)
|
||||
listView.adapter = ArrayAdapter(this, android.R.layout.simple_list_item_1, items)
|
||||
}
|
||||
|
||||
override fun onInstallProgress(path: String) {
|
||||
progressDialog?.findViewById<TextView>(R.id.text)?.text = getString(R.string.install_progress, path)
|
||||
}
|
||||
|
||||
override fun onInstallSuccess(path: File, archiveName: String?) {
|
||||
dismissProgressDialog()
|
||||
startGame(path, archiveName)
|
||||
}
|
||||
|
||||
override fun onInstallFailure(msgId: Int) {
|
||||
dismissProgressDialog()
|
||||
errorDialog(msgId)
|
||||
}
|
||||
|
||||
private fun startGame(path: File, archiveName: String?) {
|
||||
val i = Intent()
|
||||
i.setClass(applicationContext, GameActivity::class.java)
|
||||
i.putExtra(GameActivity.EXTRA_GAME_ROOT, path.path)
|
||||
i.putExtra(GameActivity.EXTRA_SAVE_DIRECTORY, File(filesDir, Launcher.SAVE_DIR).path)
|
||||
i.putExtra(GameActivity.EXTRA_ARCHIVE_NAME, archiveName)
|
||||
startActivity(i)
|
||||
}
|
||||
|
||||
private fun uninstall(id: Int) {
|
||||
launcher.uninstall(id)
|
||||
}
|
||||
|
||||
private fun showProgressDialog(savedInstanceState: Bundle? = null) {
|
||||
progressDialog = Dialog(this)
|
||||
progressDialog!!.apply {
|
||||
setTitle(R.string.install_dialog_title)
|
||||
setCancelable(false)
|
||||
setContentView(R.layout.progress_dialog)
|
||||
savedInstanceState?.let {
|
||||
findViewById<TextView>(R.id.text)?.text = it.getCharSequence(STATE_PROGRESS_TEXT)
|
||||
}
|
||||
show()
|
||||
}
|
||||
}
|
||||
|
||||
private fun dismissProgressDialog() {
|
||||
progressDialog?.dismiss()
|
||||
progressDialog = null
|
||||
}
|
||||
|
||||
private fun errorDialog(msgId: Int) {
|
||||
AlertDialog.Builder(this).setTitle(R.string.error_dialog_title)
|
||||
.setMessage(msgId)
|
||||
.setPositiveButton(R.string.ok) {_, _ -> }
|
||||
.show()
|
||||
}
|
||||
|
||||
private fun getArchiveName(uri: Uri): String? {
|
||||
val cursor = contentResolver.query(uri, null, null, null, null, null)
|
||||
cursor?.use {
|
||||
if (it.moveToFirst()) {
|
||||
val column = it.getColumnIndex(OpenableColumns.DISPLAY_NAME)
|
||||
if (column >= 0) {
|
||||
val fname = it.getString(column)
|
||||
return if (fname.endsWith(".zip", true)) fname.dropLast(4) else fname
|
||||
}
|
||||
}
|
||||
}
|
||||
return null
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
package io.github.kichikuou.xsystem35
|
||||
|
||||
import android.app.Activity
|
||||
import android.os.Bundle
|
||||
import android.widget.TextView
|
||||
import java.io.BufferedReader
|
||||
|
||||
class LicensesActivity : Activity() {
|
||||
companion object {
|
||||
const val EXTRA_DISPLAY_NAME = "DISPLAY_NAME"
|
||||
const val EXTRA_FILE_NAME = "FILE_NAME"
|
||||
}
|
||||
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
setContentView(R.layout.activity_licenses)
|
||||
|
||||
actionBar?.title = intent.getStringExtra(EXTRA_DISPLAY_NAME)
|
||||
val path = "licenses/" + intent.getStringExtra(EXTRA_FILE_NAME)
|
||||
val text = assets.open(path).bufferedReader().use(BufferedReader::readText)
|
||||
findViewById<TextView>(R.id.license_text).text = text
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
package io.github.kichikuou.xsystem35
|
||||
|
||||
import android.app.Activity
|
||||
import android.content.Intent
|
||||
import android.os.Bundle
|
||||
import android.widget.ListView
|
||||
import android.widget.SimpleAdapter
|
||||
|
||||
class LicensesMenuActivity : Activity() {
|
||||
class Entry(val displayName: String, val fileName: String, val url: String)
|
||||
private val entries: ArrayList<Entry> = arrayListOf(
|
||||
Entry("xsystem35-sdl2", "xsystem35", "https://github.com/kichikuou/xsystem35-sdl2"),
|
||||
Entry("SDL", "SDL", "https://www.libsdl.org/"),
|
||||
Entry("SDL_mixer", "SDL_mixer", "https://github.com/libsdl-org/SDL_mixer"),
|
||||
Entry("SDL_ttf", "SDL_ttf", "https://github.com/libsdl-org/SDL_ttf"),
|
||||
Entry("FreeType", "freetype", "https://freetype.org/"),
|
||||
Entry("HarfBuzz", "harfbuzz", "https://harfbuzz.github.io/"),
|
||||
Entry("MotoyaLCedar W3 mono", "MTLc3m", "https://github.com/aosp-mirror/platform_frameworks_base/tree/lollipop-release/data/fonts"),
|
||||
Entry("Source Han Serif", "mincho", "https://github.com/adobe-fonts/source-han-serif/"),
|
||||
)
|
||||
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
setContentView(R.layout.activity_licenses_menu)
|
||||
|
||||
val items = entries.map { mapOf("name" to it.displayName, "url" to it.url)}
|
||||
val listView = findViewById<ListView>(R.id.list)
|
||||
listView.adapter = SimpleAdapter(this, items, android.R.layout.simple_list_item_2,
|
||||
arrayOf("name", "url"), intArrayOf(android.R.id.text1, android.R.id.text2))
|
||||
listView.setOnItemClickListener { _, _, pos, _ ->
|
||||
val intent = Intent(this, LicensesActivity::class.java).apply {
|
||||
putExtra(LicensesActivity.EXTRA_DISPLAY_NAME, entries[pos].displayName)
|
||||
putExtra(LicensesActivity.EXTRA_FILE_NAME, entries[pos].fileName)
|
||||
}
|
||||
startActivity(intent)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
package org.libsdl.app;
|
||||
|
||||
import android.hardware.usb.UsbDevice;
|
||||
|
||||
interface HIDDevice
|
||||
{
|
||||
public int getId();
|
||||
public int getVendorId();
|
||||
public int getProductId();
|
||||
public String getSerialNumber();
|
||||
public int getVersion();
|
||||
public String getManufacturerName();
|
||||
public String getProductName();
|
||||
public UsbDevice getDevice();
|
||||
public boolean open();
|
||||
public int sendFeatureReport(byte[] report);
|
||||
public int sendOutputReport(byte[] report);
|
||||
public boolean getFeatureReport(byte[] report);
|
||||
public void setFrozen(boolean frozen);
|
||||
public void close();
|
||||
public void shutdown();
|
||||
}
|
||||
@@ -0,0 +1,650 @@
|
||||
package org.libsdl.app;
|
||||
|
||||
import android.content.Context;
|
||||
import android.bluetooth.BluetoothDevice;
|
||||
import android.bluetooth.BluetoothGatt;
|
||||
import android.bluetooth.BluetoothGattCallback;
|
||||
import android.bluetooth.BluetoothGattCharacteristic;
|
||||
import android.bluetooth.BluetoothGattDescriptor;
|
||||
import android.bluetooth.BluetoothManager;
|
||||
import android.bluetooth.BluetoothProfile;
|
||||
import android.bluetooth.BluetoothGattService;
|
||||
import android.hardware.usb.UsbDevice;
|
||||
import android.os.Handler;
|
||||
import android.os.Looper;
|
||||
import android.util.Log;
|
||||
import android.os.*;
|
||||
|
||||
//import com.android.internal.util.HexDump;
|
||||
|
||||
import java.lang.Runnable;
|
||||
import java.util.Arrays;
|
||||
import java.util.LinkedList;
|
||||
import java.util.UUID;
|
||||
|
||||
class HIDDeviceBLESteamController extends BluetoothGattCallback implements HIDDevice {
|
||||
|
||||
private static final String TAG = "hidapi";
|
||||
private HIDDeviceManager mManager;
|
||||
private BluetoothDevice mDevice;
|
||||
private int mDeviceId;
|
||||
private BluetoothGatt mGatt;
|
||||
private boolean mIsRegistered = false;
|
||||
private boolean mIsConnected = false;
|
||||
private boolean mIsChromebook = false;
|
||||
private boolean mIsReconnecting = false;
|
||||
private boolean mFrozen = false;
|
||||
private LinkedList<GattOperation> mOperations;
|
||||
GattOperation mCurrentOperation = null;
|
||||
private Handler mHandler;
|
||||
|
||||
private static final int TRANSPORT_AUTO = 0;
|
||||
private static final int TRANSPORT_BREDR = 1;
|
||||
private static final int TRANSPORT_LE = 2;
|
||||
|
||||
private static final int CHROMEBOOK_CONNECTION_CHECK_INTERVAL = 10000;
|
||||
|
||||
static public final UUID steamControllerService = UUID.fromString("100F6C32-1735-4313-B402-38567131E5F3");
|
||||
static public final UUID inputCharacteristic = UUID.fromString("100F6C33-1735-4313-B402-38567131E5F3");
|
||||
static public final UUID reportCharacteristic = UUID.fromString("100F6C34-1735-4313-B402-38567131E5F3");
|
||||
static private final byte[] enterValveMode = new byte[] { (byte)0xC0, (byte)0x87, 0x03, 0x08, 0x07, 0x00 };
|
||||
|
||||
static class GattOperation {
|
||||
private enum Operation {
|
||||
CHR_READ,
|
||||
CHR_WRITE,
|
||||
ENABLE_NOTIFICATION
|
||||
}
|
||||
|
||||
Operation mOp;
|
||||
UUID mUuid;
|
||||
byte[] mValue;
|
||||
BluetoothGatt mGatt;
|
||||
boolean mResult = true;
|
||||
|
||||
private GattOperation(BluetoothGatt gatt, GattOperation.Operation operation, UUID uuid) {
|
||||
mGatt = gatt;
|
||||
mOp = operation;
|
||||
mUuid = uuid;
|
||||
}
|
||||
|
||||
private GattOperation(BluetoothGatt gatt, GattOperation.Operation operation, UUID uuid, byte[] value) {
|
||||
mGatt = gatt;
|
||||
mOp = operation;
|
||||
mUuid = uuid;
|
||||
mValue = value;
|
||||
}
|
||||
|
||||
public void run() {
|
||||
// This is executed in main thread
|
||||
BluetoothGattCharacteristic chr;
|
||||
|
||||
switch (mOp) {
|
||||
case CHR_READ:
|
||||
chr = getCharacteristic(mUuid);
|
||||
//Log.v(TAG, "Reading characteristic " + chr.getUuid());
|
||||
if (!mGatt.readCharacteristic(chr)) {
|
||||
Log.e(TAG, "Unable to read characteristic " + mUuid.toString());
|
||||
mResult = false;
|
||||
break;
|
||||
}
|
||||
mResult = true;
|
||||
break;
|
||||
case CHR_WRITE:
|
||||
chr = getCharacteristic(mUuid);
|
||||
//Log.v(TAG, "Writing characteristic " + chr.getUuid() + " value=" + HexDump.toHexString(value));
|
||||
chr.setValue(mValue);
|
||||
if (!mGatt.writeCharacteristic(chr)) {
|
||||
Log.e(TAG, "Unable to write characteristic " + mUuid.toString());
|
||||
mResult = false;
|
||||
break;
|
||||
}
|
||||
mResult = true;
|
||||
break;
|
||||
case ENABLE_NOTIFICATION:
|
||||
chr = getCharacteristic(mUuid);
|
||||
//Log.v(TAG, "Writing descriptor of " + chr.getUuid());
|
||||
if (chr != null) {
|
||||
BluetoothGattDescriptor cccd = chr.getDescriptor(UUID.fromString("00002902-0000-1000-8000-00805f9b34fb"));
|
||||
if (cccd != null) {
|
||||
int properties = chr.getProperties();
|
||||
byte[] value;
|
||||
if ((properties & BluetoothGattCharacteristic.PROPERTY_NOTIFY) == BluetoothGattCharacteristic.PROPERTY_NOTIFY) {
|
||||
value = BluetoothGattDescriptor.ENABLE_NOTIFICATION_VALUE;
|
||||
} else if ((properties & BluetoothGattCharacteristic.PROPERTY_INDICATE) == BluetoothGattCharacteristic.PROPERTY_INDICATE) {
|
||||
value = BluetoothGattDescriptor.ENABLE_INDICATION_VALUE;
|
||||
} else {
|
||||
Log.e(TAG, "Unable to start notifications on input characteristic");
|
||||
mResult = false;
|
||||
return;
|
||||
}
|
||||
|
||||
mGatt.setCharacteristicNotification(chr, true);
|
||||
cccd.setValue(value);
|
||||
if (!mGatt.writeDescriptor(cccd)) {
|
||||
Log.e(TAG, "Unable to write descriptor " + mUuid.toString());
|
||||
mResult = false;
|
||||
return;
|
||||
}
|
||||
mResult = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public boolean finish() {
|
||||
return mResult;
|
||||
}
|
||||
|
||||
private BluetoothGattCharacteristic getCharacteristic(UUID uuid) {
|
||||
BluetoothGattService valveService = mGatt.getService(steamControllerService);
|
||||
if (valveService == null)
|
||||
return null;
|
||||
return valveService.getCharacteristic(uuid);
|
||||
}
|
||||
|
||||
static public GattOperation readCharacteristic(BluetoothGatt gatt, UUID uuid) {
|
||||
return new GattOperation(gatt, Operation.CHR_READ, uuid);
|
||||
}
|
||||
|
||||
static public GattOperation writeCharacteristic(BluetoothGatt gatt, UUID uuid, byte[] value) {
|
||||
return new GattOperation(gatt, Operation.CHR_WRITE, uuid, value);
|
||||
}
|
||||
|
||||
static public GattOperation enableNotification(BluetoothGatt gatt, UUID uuid) {
|
||||
return new GattOperation(gatt, Operation.ENABLE_NOTIFICATION, uuid);
|
||||
}
|
||||
}
|
||||
|
||||
public HIDDeviceBLESteamController(HIDDeviceManager manager, BluetoothDevice device) {
|
||||
mManager = manager;
|
||||
mDevice = device;
|
||||
mDeviceId = mManager.getDeviceIDForIdentifier(getIdentifier());
|
||||
mIsRegistered = false;
|
||||
mIsChromebook = mManager.getContext().getPackageManager().hasSystemFeature("org.chromium.arc.device_management");
|
||||
mOperations = new LinkedList<GattOperation>();
|
||||
mHandler = new Handler(Looper.getMainLooper());
|
||||
|
||||
mGatt = connectGatt();
|
||||
// final HIDDeviceBLESteamController finalThis = this;
|
||||
// mHandler.postDelayed(new Runnable() {
|
||||
// @Override
|
||||
// public void run() {
|
||||
// finalThis.checkConnectionForChromebookIssue();
|
||||
// }
|
||||
// }, CHROMEBOOK_CONNECTION_CHECK_INTERVAL);
|
||||
}
|
||||
|
||||
public String getIdentifier() {
|
||||
return String.format("SteamController.%s", mDevice.getAddress());
|
||||
}
|
||||
|
||||
public BluetoothGatt getGatt() {
|
||||
return mGatt;
|
||||
}
|
||||
|
||||
// Because on Chromebooks we show up as a dual-mode device, it will attempt to connect TRANSPORT_AUTO, which will use TRANSPORT_BREDR instead
|
||||
// of TRANSPORT_LE. Let's force ourselves to connect low energy.
|
||||
private BluetoothGatt connectGatt(boolean managed) {
|
||||
if (Build.VERSION.SDK_INT >= 23 /* Android 6.0 (M) */) {
|
||||
try {
|
||||
return mDevice.connectGatt(mManager.getContext(), managed, this, TRANSPORT_LE);
|
||||
} catch (Exception e) {
|
||||
return mDevice.connectGatt(mManager.getContext(), managed, this);
|
||||
}
|
||||
} else {
|
||||
return mDevice.connectGatt(mManager.getContext(), managed, this);
|
||||
}
|
||||
}
|
||||
|
||||
private BluetoothGatt connectGatt() {
|
||||
return connectGatt(false);
|
||||
}
|
||||
|
||||
protected int getConnectionState() {
|
||||
|
||||
Context context = mManager.getContext();
|
||||
if (context == null) {
|
||||
// We are lacking any context to get our Bluetooth information. We'll just assume disconnected.
|
||||
return BluetoothProfile.STATE_DISCONNECTED;
|
||||
}
|
||||
|
||||
BluetoothManager btManager = (BluetoothManager)context.getSystemService(Context.BLUETOOTH_SERVICE);
|
||||
if (btManager == null) {
|
||||
// This device doesn't support Bluetooth. We should never be here, because how did
|
||||
// we instantiate a device to start with?
|
||||
return BluetoothProfile.STATE_DISCONNECTED;
|
||||
}
|
||||
|
||||
return btManager.getConnectionState(mDevice, BluetoothProfile.GATT);
|
||||
}
|
||||
|
||||
public void reconnect() {
|
||||
|
||||
if (getConnectionState() != BluetoothProfile.STATE_CONNECTED) {
|
||||
mGatt.disconnect();
|
||||
mGatt = connectGatt();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
protected void checkConnectionForChromebookIssue() {
|
||||
if (!mIsChromebook) {
|
||||
// We only do this on Chromebooks, because otherwise it's really annoying to just attempt
|
||||
// over and over.
|
||||
return;
|
||||
}
|
||||
|
||||
int connectionState = getConnectionState();
|
||||
|
||||
switch (connectionState) {
|
||||
case BluetoothProfile.STATE_CONNECTED:
|
||||
if (!mIsConnected) {
|
||||
// We are in the Bad Chromebook Place. We can force a disconnect
|
||||
// to try to recover.
|
||||
Log.v(TAG, "Chromebook: We are in a very bad state; the controller shows as connected in the underlying Bluetooth layer, but we never received a callback. Forcing a reconnect.");
|
||||
mIsReconnecting = true;
|
||||
mGatt.disconnect();
|
||||
mGatt = connectGatt(false);
|
||||
break;
|
||||
}
|
||||
else if (!isRegistered()) {
|
||||
if (mGatt.getServices().size() > 0) {
|
||||
Log.v(TAG, "Chromebook: We are connected to a controller, but never got our registration. Trying to recover.");
|
||||
probeService(this);
|
||||
}
|
||||
else {
|
||||
Log.v(TAG, "Chromebook: We are connected to a controller, but never discovered services. Trying to recover.");
|
||||
mIsReconnecting = true;
|
||||
mGatt.disconnect();
|
||||
mGatt = connectGatt(false);
|
||||
break;
|
||||
}
|
||||
}
|
||||
else {
|
||||
Log.v(TAG, "Chromebook: We are connected, and registered. Everything's good!");
|
||||
return;
|
||||
}
|
||||
break;
|
||||
|
||||
case BluetoothProfile.STATE_DISCONNECTED:
|
||||
Log.v(TAG, "Chromebook: We have either been disconnected, or the Chromebook BtGatt.ContextMap bug has bitten us. Attempting a disconnect/reconnect, but we may not be able to recover.");
|
||||
|
||||
mIsReconnecting = true;
|
||||
mGatt.disconnect();
|
||||
mGatt = connectGatt(false);
|
||||
break;
|
||||
|
||||
case BluetoothProfile.STATE_CONNECTING:
|
||||
Log.v(TAG, "Chromebook: We're still trying to connect. Waiting a bit longer.");
|
||||
break;
|
||||
}
|
||||
|
||||
final HIDDeviceBLESteamController finalThis = this;
|
||||
mHandler.postDelayed(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
finalThis.checkConnectionForChromebookIssue();
|
||||
}
|
||||
}, CHROMEBOOK_CONNECTION_CHECK_INTERVAL);
|
||||
}
|
||||
|
||||
private boolean isRegistered() {
|
||||
return mIsRegistered;
|
||||
}
|
||||
|
||||
private void setRegistered() {
|
||||
mIsRegistered = true;
|
||||
}
|
||||
|
||||
private boolean probeService(HIDDeviceBLESteamController controller) {
|
||||
|
||||
if (isRegistered()) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (!mIsConnected) {
|
||||
return false;
|
||||
}
|
||||
|
||||
Log.v(TAG, "probeService controller=" + controller);
|
||||
|
||||
for (BluetoothGattService service : mGatt.getServices()) {
|
||||
if (service.getUuid().equals(steamControllerService)) {
|
||||
Log.v(TAG, "Found Valve steam controller service " + service.getUuid());
|
||||
|
||||
for (BluetoothGattCharacteristic chr : service.getCharacteristics()) {
|
||||
if (chr.getUuid().equals(inputCharacteristic)) {
|
||||
Log.v(TAG, "Found input characteristic");
|
||||
// Start notifications
|
||||
BluetoothGattDescriptor cccd = chr.getDescriptor(UUID.fromString("00002902-0000-1000-8000-00805f9b34fb"));
|
||||
if (cccd != null) {
|
||||
enableNotification(chr.getUuid());
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
if ((mGatt.getServices().size() == 0) && mIsChromebook && !mIsReconnecting) {
|
||||
Log.e(TAG, "Chromebook: Discovered services were empty; this almost certainly means the BtGatt.ContextMap bug has bitten us.");
|
||||
mIsConnected = false;
|
||||
mIsReconnecting = true;
|
||||
mGatt.disconnect();
|
||||
mGatt = connectGatt(false);
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
private void finishCurrentGattOperation() {
|
||||
GattOperation op = null;
|
||||
synchronized (mOperations) {
|
||||
if (mCurrentOperation != null) {
|
||||
op = mCurrentOperation;
|
||||
mCurrentOperation = null;
|
||||
}
|
||||
}
|
||||
if (op != null) {
|
||||
boolean result = op.finish(); // TODO: Maybe in main thread as well?
|
||||
|
||||
// Our operation failed, let's add it back to the beginning of our queue.
|
||||
if (!result) {
|
||||
mOperations.addFirst(op);
|
||||
}
|
||||
}
|
||||
executeNextGattOperation();
|
||||
}
|
||||
|
||||
private void executeNextGattOperation() {
|
||||
synchronized (mOperations) {
|
||||
if (mCurrentOperation != null)
|
||||
return;
|
||||
|
||||
if (mOperations.isEmpty())
|
||||
return;
|
||||
|
||||
mCurrentOperation = mOperations.removeFirst();
|
||||
}
|
||||
|
||||
// Run in main thread
|
||||
mHandler.post(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
synchronized (mOperations) {
|
||||
if (mCurrentOperation == null) {
|
||||
Log.e(TAG, "Current operation null in executor?");
|
||||
return;
|
||||
}
|
||||
|
||||
mCurrentOperation.run();
|
||||
// now wait for the GATT callback and when it comes, finish this operation
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void queueGattOperation(GattOperation op) {
|
||||
synchronized (mOperations) {
|
||||
mOperations.add(op);
|
||||
}
|
||||
executeNextGattOperation();
|
||||
}
|
||||
|
||||
private void enableNotification(UUID chrUuid) {
|
||||
GattOperation op = HIDDeviceBLESteamController.GattOperation.enableNotification(mGatt, chrUuid);
|
||||
queueGattOperation(op);
|
||||
}
|
||||
|
||||
public void writeCharacteristic(UUID uuid, byte[] value) {
|
||||
GattOperation op = HIDDeviceBLESteamController.GattOperation.writeCharacteristic(mGatt, uuid, value);
|
||||
queueGattOperation(op);
|
||||
}
|
||||
|
||||
public void readCharacteristic(UUID uuid) {
|
||||
GattOperation op = HIDDeviceBLESteamController.GattOperation.readCharacteristic(mGatt, uuid);
|
||||
queueGattOperation(op);
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
////////////// BluetoothGattCallback overridden methods
|
||||
//////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
public void onConnectionStateChange(BluetoothGatt g, int status, int newState) {
|
||||
//Log.v(TAG, "onConnectionStateChange status=" + status + " newState=" + newState);
|
||||
mIsReconnecting = false;
|
||||
if (newState == 2) {
|
||||
mIsConnected = true;
|
||||
// Run directly, without GattOperation
|
||||
if (!isRegistered()) {
|
||||
mHandler.post(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
mGatt.discoverServices();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
else if (newState == 0) {
|
||||
mIsConnected = false;
|
||||
}
|
||||
|
||||
// Disconnection is handled in SteamLink using the ACTION_ACL_DISCONNECTED Intent.
|
||||
}
|
||||
|
||||
public void onServicesDiscovered(BluetoothGatt gatt, int status) {
|
||||
//Log.v(TAG, "onServicesDiscovered status=" + status);
|
||||
if (status == 0) {
|
||||
if (gatt.getServices().size() == 0) {
|
||||
Log.v(TAG, "onServicesDiscovered returned zero services; something has gone horribly wrong down in Android's Bluetooth stack.");
|
||||
mIsReconnecting = true;
|
||||
mIsConnected = false;
|
||||
gatt.disconnect();
|
||||
mGatt = connectGatt(false);
|
||||
}
|
||||
else {
|
||||
probeService(this);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void onCharacteristicRead(BluetoothGatt gatt, BluetoothGattCharacteristic characteristic, int status) {
|
||||
//Log.v(TAG, "onCharacteristicRead status=" + status + " uuid=" + characteristic.getUuid());
|
||||
|
||||
if (characteristic.getUuid().equals(reportCharacteristic) && !mFrozen) {
|
||||
mManager.HIDDeviceFeatureReport(getId(), characteristic.getValue());
|
||||
}
|
||||
|
||||
finishCurrentGattOperation();
|
||||
}
|
||||
|
||||
public void onCharacteristicWrite(BluetoothGatt gatt, BluetoothGattCharacteristic characteristic, int status) {
|
||||
//Log.v(TAG, "onCharacteristicWrite status=" + status + " uuid=" + characteristic.getUuid());
|
||||
|
||||
if (characteristic.getUuid().equals(reportCharacteristic)) {
|
||||
// Only register controller with the native side once it has been fully configured
|
||||
if (!isRegistered()) {
|
||||
Log.v(TAG, "Registering Steam Controller with ID: " + getId());
|
||||
mManager.HIDDeviceConnected(getId(), getIdentifier(), getVendorId(), getProductId(), getSerialNumber(), getVersion(), getManufacturerName(), getProductName(), 0, 0, 0, 0);
|
||||
setRegistered();
|
||||
}
|
||||
}
|
||||
|
||||
finishCurrentGattOperation();
|
||||
}
|
||||
|
||||
public void onCharacteristicChanged(BluetoothGatt gatt, BluetoothGattCharacteristic characteristic) {
|
||||
// Enable this for verbose logging of controller input reports
|
||||
//Log.v(TAG, "onCharacteristicChanged uuid=" + characteristic.getUuid() + " data=" + HexDump.dumpHexString(characteristic.getValue()));
|
||||
|
||||
if (characteristic.getUuid().equals(inputCharacteristic) && !mFrozen) {
|
||||
mManager.HIDDeviceInputReport(getId(), characteristic.getValue());
|
||||
}
|
||||
}
|
||||
|
||||
public void onDescriptorRead(BluetoothGatt gatt, BluetoothGattDescriptor descriptor, int status) {
|
||||
//Log.v(TAG, "onDescriptorRead status=" + status);
|
||||
}
|
||||
|
||||
public void onDescriptorWrite(BluetoothGatt gatt, BluetoothGattDescriptor descriptor, int status) {
|
||||
BluetoothGattCharacteristic chr = descriptor.getCharacteristic();
|
||||
//Log.v(TAG, "onDescriptorWrite status=" + status + " uuid=" + chr.getUuid() + " descriptor=" + descriptor.getUuid());
|
||||
|
||||
if (chr.getUuid().equals(inputCharacteristic)) {
|
||||
boolean hasWrittenInputDescriptor = true;
|
||||
BluetoothGattCharacteristic reportChr = chr.getService().getCharacteristic(reportCharacteristic);
|
||||
if (reportChr != null) {
|
||||
Log.v(TAG, "Writing report characteristic to enter valve mode");
|
||||
reportChr.setValue(enterValveMode);
|
||||
gatt.writeCharacteristic(reportChr);
|
||||
}
|
||||
}
|
||||
|
||||
finishCurrentGattOperation();
|
||||
}
|
||||
|
||||
public void onReliableWriteCompleted(BluetoothGatt gatt, int status) {
|
||||
//Log.v(TAG, "onReliableWriteCompleted status=" + status);
|
||||
}
|
||||
|
||||
public void onReadRemoteRssi(BluetoothGatt gatt, int rssi, int status) {
|
||||
//Log.v(TAG, "onReadRemoteRssi status=" + status);
|
||||
}
|
||||
|
||||
public void onMtuChanged(BluetoothGatt gatt, int mtu, int status) {
|
||||
//Log.v(TAG, "onMtuChanged status=" + status);
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//////// Public API
|
||||
//////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
@Override
|
||||
public int getId() {
|
||||
return mDeviceId;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getVendorId() {
|
||||
// Valve Corporation
|
||||
final int VALVE_USB_VID = 0x28DE;
|
||||
return VALVE_USB_VID;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getProductId() {
|
||||
// We don't have an easy way to query from the Bluetooth device, but we know what it is
|
||||
final int D0G_BLE2_PID = 0x1106;
|
||||
return D0G_BLE2_PID;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getSerialNumber() {
|
||||
// This will be read later via feature report by Steam
|
||||
return "12345";
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getVersion() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getManufacturerName() {
|
||||
return "Valve Corporation";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getProductName() {
|
||||
return "Steam Controller";
|
||||
}
|
||||
|
||||
@Override
|
||||
public UsbDevice getDevice() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean open() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int sendFeatureReport(byte[] report) {
|
||||
if (!isRegistered()) {
|
||||
Log.e(TAG, "Attempted sendFeatureReport before Steam Controller is registered!");
|
||||
if (mIsConnected) {
|
||||
probeService(this);
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
// We need to skip the first byte, as that doesn't go over the air
|
||||
byte[] actual_report = Arrays.copyOfRange(report, 1, report.length - 1);
|
||||
//Log.v(TAG, "sendFeatureReport " + HexDump.dumpHexString(actual_report));
|
||||
writeCharacteristic(reportCharacteristic, actual_report);
|
||||
return report.length;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int sendOutputReport(byte[] report) {
|
||||
if (!isRegistered()) {
|
||||
Log.e(TAG, "Attempted sendOutputReport before Steam Controller is registered!");
|
||||
if (mIsConnected) {
|
||||
probeService(this);
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
//Log.v(TAG, "sendFeatureReport " + HexDump.dumpHexString(report));
|
||||
writeCharacteristic(reportCharacteristic, report);
|
||||
return report.length;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean getFeatureReport(byte[] report) {
|
||||
if (!isRegistered()) {
|
||||
Log.e(TAG, "Attempted getFeatureReport before Steam Controller is registered!");
|
||||
if (mIsConnected) {
|
||||
probeService(this);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
//Log.v(TAG, "getFeatureReport");
|
||||
readCharacteristic(reportCharacteristic);
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void close() {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setFrozen(boolean frozen) {
|
||||
mFrozen = frozen;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void shutdown() {
|
||||
close();
|
||||
|
||||
BluetoothGatt g = mGatt;
|
||||
if (g != null) {
|
||||
g.disconnect();
|
||||
g.close();
|
||||
mGatt = null;
|
||||
}
|
||||
mManager = null;
|
||||
mIsRegistered = false;
|
||||
mIsConnected = false;
|
||||
mOperations.clear();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,698 @@
|
||||
package org.libsdl.app;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.app.AlertDialog;
|
||||
import android.app.PendingIntent;
|
||||
import android.bluetooth.BluetoothAdapter;
|
||||
import android.bluetooth.BluetoothDevice;
|
||||
import android.bluetooth.BluetoothManager;
|
||||
import android.bluetooth.BluetoothProfile;
|
||||
import android.os.Build;
|
||||
import android.util.Log;
|
||||
import android.content.BroadcastReceiver;
|
||||
import android.content.Context;
|
||||
import android.content.DialogInterface;
|
||||
import android.content.Intent;
|
||||
import android.content.IntentFilter;
|
||||
import android.content.SharedPreferences;
|
||||
import android.content.pm.PackageManager;
|
||||
import android.hardware.usb.*;
|
||||
import android.os.Handler;
|
||||
import android.os.Looper;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
|
||||
public class HIDDeviceManager {
|
||||
private static final String TAG = "hidapi";
|
||||
private static final String ACTION_USB_PERMISSION = "org.libsdl.app.USB_PERMISSION";
|
||||
|
||||
private static HIDDeviceManager sManager;
|
||||
private static int sManagerRefCount = 0;
|
||||
|
||||
public static HIDDeviceManager acquire(Context context) {
|
||||
if (sManagerRefCount == 0) {
|
||||
sManager = new HIDDeviceManager(context);
|
||||
}
|
||||
++sManagerRefCount;
|
||||
return sManager;
|
||||
}
|
||||
|
||||
public static void release(HIDDeviceManager manager) {
|
||||
if (manager == sManager) {
|
||||
--sManagerRefCount;
|
||||
if (sManagerRefCount == 0) {
|
||||
sManager.close();
|
||||
sManager = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private Context mContext;
|
||||
private HashMap<Integer, HIDDevice> mDevicesById = new HashMap<Integer, HIDDevice>();
|
||||
private HashMap<BluetoothDevice, HIDDeviceBLESteamController> mBluetoothDevices = new HashMap<BluetoothDevice, HIDDeviceBLESteamController>();
|
||||
private int mNextDeviceId = 0;
|
||||
private SharedPreferences mSharedPreferences = null;
|
||||
private boolean mIsChromebook = false;
|
||||
private UsbManager mUsbManager;
|
||||
private Handler mHandler;
|
||||
private BluetoothManager mBluetoothManager;
|
||||
private List<BluetoothDevice> mLastBluetoothDevices;
|
||||
|
||||
private final BroadcastReceiver mUsbBroadcast = new BroadcastReceiver() {
|
||||
@Override
|
||||
public void onReceive(Context context, Intent intent) {
|
||||
String action = intent.getAction();
|
||||
if (action.equals(UsbManager.ACTION_USB_DEVICE_ATTACHED)) {
|
||||
UsbDevice usbDevice = intent.getParcelableExtra(UsbManager.EXTRA_DEVICE);
|
||||
handleUsbDeviceAttached(usbDevice);
|
||||
} else if (action.equals(UsbManager.ACTION_USB_DEVICE_DETACHED)) {
|
||||
UsbDevice usbDevice = intent.getParcelableExtra(UsbManager.EXTRA_DEVICE);
|
||||
handleUsbDeviceDetached(usbDevice);
|
||||
} else if (action.equals(HIDDeviceManager.ACTION_USB_PERMISSION)) {
|
||||
UsbDevice usbDevice = intent.getParcelableExtra(UsbManager.EXTRA_DEVICE);
|
||||
handleUsbDevicePermission(usbDevice, intent.getBooleanExtra(UsbManager.EXTRA_PERMISSION_GRANTED, false));
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
private final BroadcastReceiver mBluetoothBroadcast = new BroadcastReceiver() {
|
||||
@Override
|
||||
public void onReceive(Context context, Intent intent) {
|
||||
String action = intent.getAction();
|
||||
// Bluetooth device was connected. If it was a Steam Controller, handle it
|
||||
if (action.equals(BluetoothDevice.ACTION_ACL_CONNECTED)) {
|
||||
BluetoothDevice device = intent.getParcelableExtra(BluetoothDevice.EXTRA_DEVICE);
|
||||
Log.d(TAG, "Bluetooth device connected: " + device);
|
||||
|
||||
if (isSteamController(device)) {
|
||||
connectBluetoothDevice(device);
|
||||
}
|
||||
}
|
||||
|
||||
// Bluetooth device was disconnected, remove from controller manager (if any)
|
||||
if (action.equals(BluetoothDevice.ACTION_ACL_DISCONNECTED)) {
|
||||
BluetoothDevice device = intent.getParcelableExtra(BluetoothDevice.EXTRA_DEVICE);
|
||||
Log.d(TAG, "Bluetooth device disconnected: " + device);
|
||||
|
||||
disconnectBluetoothDevice(device);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
private HIDDeviceManager(final Context context) {
|
||||
mContext = context;
|
||||
|
||||
HIDDeviceRegisterCallback();
|
||||
|
||||
mSharedPreferences = mContext.getSharedPreferences("hidapi", Context.MODE_PRIVATE);
|
||||
mIsChromebook = mContext.getPackageManager().hasSystemFeature("org.chromium.arc.device_management");
|
||||
|
||||
// if (shouldClear) {
|
||||
// SharedPreferences.Editor spedit = mSharedPreferences.edit();
|
||||
// spedit.clear();
|
||||
// spedit.commit();
|
||||
// }
|
||||
// else
|
||||
{
|
||||
mNextDeviceId = mSharedPreferences.getInt("next_device_id", 0);
|
||||
}
|
||||
}
|
||||
|
||||
public Context getContext() {
|
||||
return mContext;
|
||||
}
|
||||
|
||||
public int getDeviceIDForIdentifier(String identifier) {
|
||||
SharedPreferences.Editor spedit = mSharedPreferences.edit();
|
||||
|
||||
int result = mSharedPreferences.getInt(identifier, 0);
|
||||
if (result == 0) {
|
||||
result = mNextDeviceId++;
|
||||
spedit.putInt("next_device_id", mNextDeviceId);
|
||||
}
|
||||
|
||||
spedit.putInt(identifier, result);
|
||||
spedit.commit();
|
||||
return result;
|
||||
}
|
||||
|
||||
private void initializeUSB() {
|
||||
mUsbManager = (UsbManager)mContext.getSystemService(Context.USB_SERVICE);
|
||||
if (mUsbManager == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
/*
|
||||
// Logging
|
||||
for (UsbDevice device : mUsbManager.getDeviceList().values()) {
|
||||
Log.i(TAG,"Path: " + device.getDeviceName());
|
||||
Log.i(TAG,"Manufacturer: " + device.getManufacturerName());
|
||||
Log.i(TAG,"Product: " + device.getProductName());
|
||||
Log.i(TAG,"ID: " + device.getDeviceId());
|
||||
Log.i(TAG,"Class: " + device.getDeviceClass());
|
||||
Log.i(TAG,"Protocol: " + device.getDeviceProtocol());
|
||||
Log.i(TAG,"Vendor ID " + device.getVendorId());
|
||||
Log.i(TAG,"Product ID: " + device.getProductId());
|
||||
Log.i(TAG,"Interface count: " + device.getInterfaceCount());
|
||||
Log.i(TAG,"---------------------------------------");
|
||||
|
||||
// Get interface details
|
||||
for (int index = 0; index < device.getInterfaceCount(); index++) {
|
||||
UsbInterface mUsbInterface = device.getInterface(index);
|
||||
Log.i(TAG," ***** *****");
|
||||
Log.i(TAG," Interface index: " + index);
|
||||
Log.i(TAG," Interface ID: " + mUsbInterface.getId());
|
||||
Log.i(TAG," Interface class: " + mUsbInterface.getInterfaceClass());
|
||||
Log.i(TAG," Interface subclass: " + mUsbInterface.getInterfaceSubclass());
|
||||
Log.i(TAG," Interface protocol: " + mUsbInterface.getInterfaceProtocol());
|
||||
Log.i(TAG," Endpoint count: " + mUsbInterface.getEndpointCount());
|
||||
|
||||
// Get endpoint details
|
||||
for (int epi = 0; epi < mUsbInterface.getEndpointCount(); epi++)
|
||||
{
|
||||
UsbEndpoint mEndpoint = mUsbInterface.getEndpoint(epi);
|
||||
Log.i(TAG," ++++ ++++ ++++");
|
||||
Log.i(TAG," Endpoint index: " + epi);
|
||||
Log.i(TAG," Attributes: " + mEndpoint.getAttributes());
|
||||
Log.i(TAG," Direction: " + mEndpoint.getDirection());
|
||||
Log.i(TAG," Number: " + mEndpoint.getEndpointNumber());
|
||||
Log.i(TAG," Interval: " + mEndpoint.getInterval());
|
||||
Log.i(TAG," Packet size: " + mEndpoint.getMaxPacketSize());
|
||||
Log.i(TAG," Type: " + mEndpoint.getType());
|
||||
}
|
||||
}
|
||||
}
|
||||
Log.i(TAG," No more devices connected.");
|
||||
*/
|
||||
|
||||
// Register for USB broadcasts and permission completions
|
||||
IntentFilter filter = new IntentFilter();
|
||||
filter.addAction(UsbManager.ACTION_USB_DEVICE_ATTACHED);
|
||||
filter.addAction(UsbManager.ACTION_USB_DEVICE_DETACHED);
|
||||
filter.addAction(HIDDeviceManager.ACTION_USB_PERMISSION);
|
||||
mContext.registerReceiver(mUsbBroadcast, filter);
|
||||
|
||||
for (UsbDevice usbDevice : mUsbManager.getDeviceList().values()) {
|
||||
handleUsbDeviceAttached(usbDevice);
|
||||
}
|
||||
}
|
||||
|
||||
UsbManager getUSBManager() {
|
||||
return mUsbManager;
|
||||
}
|
||||
|
||||
private void shutdownUSB() {
|
||||
try {
|
||||
mContext.unregisterReceiver(mUsbBroadcast);
|
||||
} catch (Exception e) {
|
||||
// We may not have registered, that's okay
|
||||
}
|
||||
}
|
||||
|
||||
private boolean isHIDDeviceInterface(UsbDevice usbDevice, UsbInterface usbInterface) {
|
||||
if (usbInterface.getInterfaceClass() == UsbConstants.USB_CLASS_HID) {
|
||||
return true;
|
||||
}
|
||||
if (isXbox360Controller(usbDevice, usbInterface) || isXboxOneController(usbDevice, usbInterface)) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
private boolean isXbox360Controller(UsbDevice usbDevice, UsbInterface usbInterface) {
|
||||
final int XB360_IFACE_SUBCLASS = 93;
|
||||
final int XB360_IFACE_PROTOCOL = 1; // Wired
|
||||
final int XB360W_IFACE_PROTOCOL = 129; // Wireless
|
||||
final int[] SUPPORTED_VENDORS = {
|
||||
0x0079, // GPD Win 2
|
||||
0x044f, // Thrustmaster
|
||||
0x045e, // Microsoft
|
||||
0x046d, // Logitech
|
||||
0x056e, // Elecom
|
||||
0x06a3, // Saitek
|
||||
0x0738, // Mad Catz
|
||||
0x07ff, // Mad Catz
|
||||
0x0e6f, // PDP
|
||||
0x0f0d, // Hori
|
||||
0x1038, // SteelSeries
|
||||
0x11c9, // Nacon
|
||||
0x12ab, // Unknown
|
||||
0x1430, // RedOctane
|
||||
0x146b, // BigBen
|
||||
0x1532, // Razer Sabertooth
|
||||
0x15e4, // Numark
|
||||
0x162e, // Joytech
|
||||
0x1689, // Razer Onza
|
||||
0x1949, // Lab126, Inc.
|
||||
0x1bad, // Harmonix
|
||||
0x20d6, // PowerA
|
||||
0x24c6, // PowerA
|
||||
0x2c22, // Qanba
|
||||
0x2dc8, // 8BitDo
|
||||
0x9886, // ASTRO Gaming
|
||||
};
|
||||
|
||||
if (usbInterface.getInterfaceClass() == UsbConstants.USB_CLASS_VENDOR_SPEC &&
|
||||
usbInterface.getInterfaceSubclass() == XB360_IFACE_SUBCLASS &&
|
||||
(usbInterface.getInterfaceProtocol() == XB360_IFACE_PROTOCOL ||
|
||||
usbInterface.getInterfaceProtocol() == XB360W_IFACE_PROTOCOL)) {
|
||||
int vendor_id = usbDevice.getVendorId();
|
||||
for (int supportedVid : SUPPORTED_VENDORS) {
|
||||
if (vendor_id == supportedVid) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
private boolean isXboxOneController(UsbDevice usbDevice, UsbInterface usbInterface) {
|
||||
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
|
||||
0x1532, // Razer Wildcat
|
||||
0x20d6, // PowerA
|
||||
0x24c6, // PowerA
|
||||
0x2dc8, // 8BitDo
|
||||
0x2e24, // Hyperkin
|
||||
0x3537, // GameSir
|
||||
};
|
||||
|
||||
if (usbInterface.getId() == 0 &&
|
||||
usbInterface.getInterfaceClass() == UsbConstants.USB_CLASS_VENDOR_SPEC &&
|
||||
usbInterface.getInterfaceSubclass() == XB1_IFACE_SUBCLASS &&
|
||||
usbInterface.getInterfaceProtocol() == XB1_IFACE_PROTOCOL) {
|
||||
int vendor_id = usbDevice.getVendorId();
|
||||
for (int supportedVid : SUPPORTED_VENDORS) {
|
||||
if (vendor_id == supportedVid) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
private void handleUsbDeviceAttached(UsbDevice usbDevice) {
|
||||
connectHIDDeviceUSB(usbDevice);
|
||||
}
|
||||
|
||||
private void handleUsbDeviceDetached(UsbDevice usbDevice) {
|
||||
List<Integer> devices = new ArrayList<Integer>();
|
||||
for (HIDDevice device : mDevicesById.values()) {
|
||||
if (usbDevice.equals(device.getDevice())) {
|
||||
devices.add(device.getId());
|
||||
}
|
||||
}
|
||||
for (int id : devices) {
|
||||
HIDDevice device = mDevicesById.get(id);
|
||||
mDevicesById.remove(id);
|
||||
device.shutdown();
|
||||
HIDDeviceDisconnected(id);
|
||||
}
|
||||
}
|
||||
|
||||
private void handleUsbDevicePermission(UsbDevice usbDevice, boolean permission_granted) {
|
||||
for (HIDDevice device : mDevicesById.values()) {
|
||||
if (usbDevice.equals(device.getDevice())) {
|
||||
boolean opened = false;
|
||||
if (permission_granted) {
|
||||
opened = device.open();
|
||||
}
|
||||
HIDDeviceOpenResult(device.getId(), opened);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void connectHIDDeviceUSB(UsbDevice usbDevice) {
|
||||
synchronized (this) {
|
||||
int interface_mask = 0;
|
||||
for (int interface_index = 0; interface_index < usbDevice.getInterfaceCount(); interface_index++) {
|
||||
UsbInterface usbInterface = usbDevice.getInterface(interface_index);
|
||||
if (isHIDDeviceInterface(usbDevice, usbInterface)) {
|
||||
// Check to see if we've already added this interface
|
||||
// This happens with the Xbox Series X controller which has a duplicate interface 0, which is inactive
|
||||
int interface_id = usbInterface.getId();
|
||||
if ((interface_mask & (1 << interface_id)) != 0) {
|
||||
continue;
|
||||
}
|
||||
interface_mask |= (1 << interface_id);
|
||||
|
||||
HIDDeviceUSB device = new HIDDeviceUSB(this, usbDevice, interface_index);
|
||||
int id = device.getId();
|
||||
mDevicesById.put(id, device);
|
||||
HIDDeviceConnected(id, device.getIdentifier(), device.getVendorId(), device.getProductId(), device.getSerialNumber(), device.getVersion(), device.getManufacturerName(), device.getProductName(), usbInterface.getId(), usbInterface.getInterfaceClass(), usbInterface.getInterfaceSubclass(), usbInterface.getInterfaceProtocol());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
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");
|
||||
return;
|
||||
}
|
||||
|
||||
if (!mContext.getPackageManager().hasSystemFeature(PackageManager.FEATURE_BLUETOOTH_LE) || (Build.VERSION.SDK_INT < 18 /* Android 4.3 (JELLY_BEAN_MR2) */)) {
|
||||
Log.d(TAG, "Couldn't initialize Bluetooth, this version of Android does not support Bluetooth LE");
|
||||
return;
|
||||
}
|
||||
|
||||
// Find bonded bluetooth controllers and create SteamControllers for them
|
||||
mBluetoothManager = (BluetoothManager)mContext.getSystemService(Context.BLUETOOTH_SERVICE);
|
||||
if (mBluetoothManager == null) {
|
||||
// This device doesn't support Bluetooth.
|
||||
return;
|
||||
}
|
||||
|
||||
BluetoothAdapter btAdapter = mBluetoothManager.getAdapter();
|
||||
if (btAdapter == null) {
|
||||
// This device has Bluetooth support in the codebase, but has no available adapters.
|
||||
return;
|
||||
}
|
||||
|
||||
// Get our bonded devices.
|
||||
for (BluetoothDevice device : btAdapter.getBondedDevices()) {
|
||||
|
||||
Log.d(TAG, "Bluetooth device available: " + device);
|
||||
if (isSteamController(device)) {
|
||||
connectBluetoothDevice(device);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// NOTE: These don't work on Chromebooks, to my undying dismay.
|
||||
IntentFilter filter = new IntentFilter();
|
||||
filter.addAction(BluetoothDevice.ACTION_ACL_CONNECTED);
|
||||
filter.addAction(BluetoothDevice.ACTION_ACL_DISCONNECTED);
|
||||
mContext.registerReceiver(mBluetoothBroadcast, filter);
|
||||
|
||||
if (mIsChromebook) {
|
||||
mHandler = new Handler(Looper.getMainLooper());
|
||||
mLastBluetoothDevices = new ArrayList<BluetoothDevice>();
|
||||
|
||||
// final HIDDeviceManager finalThis = this;
|
||||
// mHandler.postDelayed(new Runnable() {
|
||||
// @Override
|
||||
// public void run() {
|
||||
// finalThis.chromebookConnectionHandler();
|
||||
// }
|
||||
// }, 5000);
|
||||
}
|
||||
}
|
||||
|
||||
private void shutdownBluetooth() {
|
||||
try {
|
||||
mContext.unregisterReceiver(mBluetoothBroadcast);
|
||||
} catch (Exception e) {
|
||||
// We may not have registered, that's okay
|
||||
}
|
||||
}
|
||||
|
||||
// Chromebooks do not pass along ACTION_ACL_CONNECTED / ACTION_ACL_DISCONNECTED properly.
|
||||
// This function provides a sort of dummy version of that, watching for changes in the
|
||||
// connected devices and attempting to add controllers as things change.
|
||||
public void chromebookConnectionHandler() {
|
||||
if (!mIsChromebook) {
|
||||
return;
|
||||
}
|
||||
|
||||
ArrayList<BluetoothDevice> disconnected = new ArrayList<BluetoothDevice>();
|
||||
ArrayList<BluetoothDevice> connected = new ArrayList<BluetoothDevice>();
|
||||
|
||||
List<BluetoothDevice> currentConnected = mBluetoothManager.getConnectedDevices(BluetoothProfile.GATT);
|
||||
|
||||
for (BluetoothDevice bluetoothDevice : currentConnected) {
|
||||
if (!mLastBluetoothDevices.contains(bluetoothDevice)) {
|
||||
connected.add(bluetoothDevice);
|
||||
}
|
||||
}
|
||||
for (BluetoothDevice bluetoothDevice : mLastBluetoothDevices) {
|
||||
if (!currentConnected.contains(bluetoothDevice)) {
|
||||
disconnected.add(bluetoothDevice);
|
||||
}
|
||||
}
|
||||
|
||||
mLastBluetoothDevices = currentConnected;
|
||||
|
||||
for (BluetoothDevice bluetoothDevice : disconnected) {
|
||||
disconnectBluetoothDevice(bluetoothDevice);
|
||||
}
|
||||
for (BluetoothDevice bluetoothDevice : connected) {
|
||||
connectBluetoothDevice(bluetoothDevice);
|
||||
}
|
||||
|
||||
final HIDDeviceManager finalThis = this;
|
||||
mHandler.postDelayed(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
finalThis.chromebookConnectionHandler();
|
||||
}
|
||||
}, 10000);
|
||||
}
|
||||
|
||||
public boolean connectBluetoothDevice(BluetoothDevice bluetoothDevice) {
|
||||
Log.v(TAG, "connectBluetoothDevice device=" + bluetoothDevice);
|
||||
synchronized (this) {
|
||||
if (mBluetoothDevices.containsKey(bluetoothDevice)) {
|
||||
Log.v(TAG, "Steam controller with address " + bluetoothDevice + " already exists, attempting reconnect");
|
||||
|
||||
HIDDeviceBLESteamController device = mBluetoothDevices.get(bluetoothDevice);
|
||||
device.reconnect();
|
||||
|
||||
return false;
|
||||
}
|
||||
HIDDeviceBLESteamController device = new HIDDeviceBLESteamController(this, bluetoothDevice);
|
||||
int id = device.getId();
|
||||
mBluetoothDevices.put(bluetoothDevice, device);
|
||||
mDevicesById.put(id, device);
|
||||
|
||||
// The Steam Controller will mark itself connected once initialization is complete
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public void disconnectBluetoothDevice(BluetoothDevice bluetoothDevice) {
|
||||
synchronized (this) {
|
||||
HIDDeviceBLESteamController device = mBluetoothDevices.get(bluetoothDevice);
|
||||
if (device == null)
|
||||
return;
|
||||
|
||||
int id = device.getId();
|
||||
mBluetoothDevices.remove(bluetoothDevice);
|
||||
mDevicesById.remove(id);
|
||||
device.shutdown();
|
||||
HIDDeviceDisconnected(id);
|
||||
}
|
||||
}
|
||||
|
||||
public boolean isSteamController(BluetoothDevice bluetoothDevice) {
|
||||
// Sanity check. If you pass in a null device, by definition it is never a Steam Controller.
|
||||
if (bluetoothDevice == null) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// If the device has no local name, we really don't want to try an equality check against it.
|
||||
if (bluetoothDevice.getName() == null) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return bluetoothDevice.getName().equals("SteamController") && ((bluetoothDevice.getType() & BluetoothDevice.DEVICE_TYPE_LE) != 0);
|
||||
}
|
||||
|
||||
private void close() {
|
||||
shutdownUSB();
|
||||
shutdownBluetooth();
|
||||
synchronized (this) {
|
||||
for (HIDDevice device : mDevicesById.values()) {
|
||||
device.shutdown();
|
||||
}
|
||||
mDevicesById.clear();
|
||||
mBluetoothDevices.clear();
|
||||
HIDDeviceReleaseCallback();
|
||||
}
|
||||
}
|
||||
|
||||
public void setFrozen(boolean frozen) {
|
||||
synchronized (this) {
|
||||
for (HIDDevice device : mDevicesById.values()) {
|
||||
device.setFrozen(frozen);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
private HIDDevice getDevice(int id) {
|
||||
synchronized (this) {
|
||||
HIDDevice result = mDevicesById.get(id);
|
||||
if (result == null) {
|
||||
Log.v(TAG, "No device for id: " + id);
|
||||
Log.v(TAG, "Available devices: " + mDevicesById.keySet());
|
||||
}
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
////////// JNI interface functions
|
||||
//////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
public boolean initialize(boolean usb, boolean bluetooth) {
|
||||
Log.v(TAG, "initialize(" + usb + ", " + bluetooth + ")");
|
||||
|
||||
if (usb) {
|
||||
initializeUSB();
|
||||
}
|
||||
if (bluetooth) {
|
||||
initializeBluetooth();
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public boolean openDevice(int deviceID) {
|
||||
Log.v(TAG, "openDevice deviceID=" + deviceID);
|
||||
HIDDevice device = getDevice(deviceID);
|
||||
if (device == null) {
|
||||
HIDDeviceDisconnected(deviceID);
|
||||
return false;
|
||||
}
|
||||
|
||||
// Look to see if this is a USB device and we have permission to access it
|
||||
UsbDevice usbDevice = device.getDevice();
|
||||
if (usbDevice != null && !mUsbManager.hasPermission(usbDevice)) {
|
||||
HIDDeviceOpenPending(deviceID);
|
||||
try {
|
||||
final int FLAG_MUTABLE = 0x02000000; // PendingIntent.FLAG_MUTABLE, but don't require SDK 31
|
||||
int flags;
|
||||
if (Build.VERSION.SDK_INT >= 31 /* Android 12.0 (S) */) {
|
||||
flags = FLAG_MUTABLE;
|
||||
} else {
|
||||
flags = 0;
|
||||
}
|
||||
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);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
try {
|
||||
return device.open();
|
||||
} catch (Exception e) {
|
||||
Log.e(TAG, "Got exception: " + Log.getStackTraceString(e));
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public int sendOutputReport(int deviceID, byte[] report) {
|
||||
try {
|
||||
//Log.v(TAG, "sendOutputReport deviceID=" + deviceID + " length=" + report.length);
|
||||
HIDDevice device;
|
||||
device = getDevice(deviceID);
|
||||
if (device == null) {
|
||||
HIDDeviceDisconnected(deviceID);
|
||||
return -1;
|
||||
}
|
||||
|
||||
return device.sendOutputReport(report);
|
||||
} catch (Exception e) {
|
||||
Log.e(TAG, "Got exception: " + Log.getStackTraceString(e));
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
public int sendFeatureReport(int deviceID, byte[] report) {
|
||||
try {
|
||||
//Log.v(TAG, "sendFeatureReport deviceID=" + deviceID + " length=" + report.length);
|
||||
HIDDevice device;
|
||||
device = getDevice(deviceID);
|
||||
if (device == null) {
|
||||
HIDDeviceDisconnected(deviceID);
|
||||
return -1;
|
||||
}
|
||||
|
||||
return device.sendFeatureReport(report);
|
||||
} catch (Exception e) {
|
||||
Log.e(TAG, "Got exception: " + Log.getStackTraceString(e));
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
public boolean getFeatureReport(int deviceID, byte[] report) {
|
||||
try {
|
||||
//Log.v(TAG, "getFeatureReport deviceID=" + deviceID);
|
||||
HIDDevice device;
|
||||
device = getDevice(deviceID);
|
||||
if (device == null) {
|
||||
HIDDeviceDisconnected(deviceID);
|
||||
return false;
|
||||
}
|
||||
|
||||
return device.getFeatureReport(report);
|
||||
} catch (Exception e) {
|
||||
Log.e(TAG, "Got exception: " + Log.getStackTraceString(e));
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public void closeDevice(int deviceID) {
|
||||
try {
|
||||
Log.v(TAG, "closeDevice deviceID=" + deviceID);
|
||||
HIDDevice device;
|
||||
device = getDevice(deviceID);
|
||||
if (device == null) {
|
||||
HIDDeviceDisconnected(deviceID);
|
||||
return;
|
||||
}
|
||||
|
||||
device.close();
|
||||
} catch (Exception e) {
|
||||
Log.e(TAG, "Got exception: " + Log.getStackTraceString(e));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
/////////////// Native methods
|
||||
//////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
private native void HIDDeviceRegisterCallback();
|
||||
private native void HIDDeviceReleaseCallback();
|
||||
|
||||
native void HIDDeviceConnected(int deviceID, String identifier, int vendorId, int productId, String serial_number, int release_number, String manufacturer_string, String product_string, int interface_number, int interface_class, int interface_subclass, int interface_protocol);
|
||||
native void HIDDeviceOpenPending(int deviceID);
|
||||
native void HIDDeviceOpenResult(int deviceID, boolean opened);
|
||||
native void HIDDeviceDisconnected(int deviceID);
|
||||
|
||||
native void HIDDeviceInputReport(int deviceID, byte[] report);
|
||||
native void HIDDeviceFeatureReport(int deviceID, byte[] report);
|
||||
}
|
||||
@@ -0,0 +1,309 @@
|
||||
package org.libsdl.app;
|
||||
|
||||
import android.hardware.usb.*;
|
||||
import android.os.Build;
|
||||
import android.util.Log;
|
||||
import java.util.Arrays;
|
||||
|
||||
class HIDDeviceUSB implements HIDDevice {
|
||||
|
||||
private static final String TAG = "hidapi";
|
||||
|
||||
protected HIDDeviceManager mManager;
|
||||
protected UsbDevice mDevice;
|
||||
protected int mInterfaceIndex;
|
||||
protected int mInterface;
|
||||
protected int mDeviceId;
|
||||
protected UsbDeviceConnection mConnection;
|
||||
protected UsbEndpoint mInputEndpoint;
|
||||
protected UsbEndpoint mOutputEndpoint;
|
||||
protected InputThread mInputThread;
|
||||
protected boolean mRunning;
|
||||
protected boolean mFrozen;
|
||||
|
||||
public HIDDeviceUSB(HIDDeviceManager manager, UsbDevice usbDevice, int interface_index) {
|
||||
mManager = manager;
|
||||
mDevice = usbDevice;
|
||||
mInterfaceIndex = interface_index;
|
||||
mInterface = mDevice.getInterface(mInterfaceIndex).getId();
|
||||
mDeviceId = manager.getDeviceIDForIdentifier(getIdentifier());
|
||||
mRunning = false;
|
||||
}
|
||||
|
||||
public String getIdentifier() {
|
||||
return String.format("%s/%x/%x/%d", mDevice.getDeviceName(), mDevice.getVendorId(), mDevice.getProductId(), mInterfaceIndex);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getId() {
|
||||
return mDeviceId;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getVendorId() {
|
||||
return mDevice.getVendorId();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getProductId() {
|
||||
return mDevice.getProductId();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getSerialNumber() {
|
||||
String result = null;
|
||||
if (Build.VERSION.SDK_INT >= 21 /* Android 5.0 (LOLLIPOP) */) {
|
||||
try {
|
||||
result = mDevice.getSerialNumber();
|
||||
}
|
||||
catch (SecurityException exception) {
|
||||
//Log.w(TAG, "App permissions mean we cannot get serial number for device " + getDeviceName() + " message: " + exception.getMessage());
|
||||
}
|
||||
}
|
||||
if (result == null) {
|
||||
result = "";
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getVersion() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getManufacturerName() {
|
||||
String result = null;
|
||||
if (Build.VERSION.SDK_INT >= 21 /* Android 5.0 (LOLLIPOP) */) {
|
||||
result = mDevice.getManufacturerName();
|
||||
}
|
||||
if (result == null) {
|
||||
result = String.format("%x", getVendorId());
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getProductName() {
|
||||
String result = null;
|
||||
if (Build.VERSION.SDK_INT >= 21 /* Android 5.0 (LOLLIPOP) */) {
|
||||
result = mDevice.getProductName();
|
||||
}
|
||||
if (result == null) {
|
||||
result = String.format("%x", getProductId());
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public UsbDevice getDevice() {
|
||||
return mDevice;
|
||||
}
|
||||
|
||||
public String getDeviceName() {
|
||||
return getManufacturerName() + " " + getProductName() + "(0x" + String.format("%x", getVendorId()) + "/0x" + String.format("%x", getProductId()) + ")";
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean open() {
|
||||
mConnection = mManager.getUSBManager().openDevice(mDevice);
|
||||
if (mConnection == null) {
|
||||
Log.w(TAG, "Unable to open USB device " + getDeviceName());
|
||||
return false;
|
||||
}
|
||||
|
||||
// Force claim our interface
|
||||
UsbInterface iface = mDevice.getInterface(mInterfaceIndex);
|
||||
if (!mConnection.claimInterface(iface, true)) {
|
||||
Log.w(TAG, "Failed to claim interfaces on USB device " + getDeviceName());
|
||||
close();
|
||||
return false;
|
||||
}
|
||||
|
||||
// Find the endpoints
|
||||
for (int j = 0; j < iface.getEndpointCount(); j++) {
|
||||
UsbEndpoint endpt = iface.getEndpoint(j);
|
||||
switch (endpt.getDirection()) {
|
||||
case UsbConstants.USB_DIR_IN:
|
||||
if (mInputEndpoint == null) {
|
||||
mInputEndpoint = endpt;
|
||||
}
|
||||
break;
|
||||
case UsbConstants.USB_DIR_OUT:
|
||||
if (mOutputEndpoint == null) {
|
||||
mOutputEndpoint = endpt;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// Make sure the required endpoints were present
|
||||
if (mInputEndpoint == null || mOutputEndpoint == null) {
|
||||
Log.w(TAG, "Missing required endpoint on USB device " + getDeviceName());
|
||||
close();
|
||||
return false;
|
||||
}
|
||||
|
||||
// Start listening for input
|
||||
mRunning = true;
|
||||
mInputThread = new InputThread();
|
||||
mInputThread.start();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int sendFeatureReport(byte[] report) {
|
||||
int res = -1;
|
||||
int offset = 0;
|
||||
int length = report.length;
|
||||
boolean skipped_report_id = false;
|
||||
byte report_number = report[0];
|
||||
|
||||
if (report_number == 0x0) {
|
||||
++offset;
|
||||
--length;
|
||||
skipped_report_id = true;
|
||||
}
|
||||
|
||||
res = mConnection.controlTransfer(
|
||||
UsbConstants.USB_TYPE_CLASS | 0x01 /*RECIPIENT_INTERFACE*/ | UsbConstants.USB_DIR_OUT,
|
||||
0x09/*HID set_report*/,
|
||||
(3/*HID feature*/ << 8) | report_number,
|
||||
mInterface,
|
||||
report, offset, length,
|
||||
1000/*timeout millis*/);
|
||||
|
||||
if (res < 0) {
|
||||
Log.w(TAG, "sendFeatureReport() returned " + res + " on device " + getDeviceName());
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (skipped_report_id) {
|
||||
++length;
|
||||
}
|
||||
return length;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int sendOutputReport(byte[] report) {
|
||||
int r = mConnection.bulkTransfer(mOutputEndpoint, report, report.length, 1000);
|
||||
if (r != report.length) {
|
||||
Log.w(TAG, "sendOutputReport() returned " + r + " on device " + getDeviceName());
|
||||
}
|
||||
return r;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean getFeatureReport(byte[] report) {
|
||||
int res = -1;
|
||||
int offset = 0;
|
||||
int length = report.length;
|
||||
boolean skipped_report_id = false;
|
||||
byte report_number = report[0];
|
||||
|
||||
if (report_number == 0x0) {
|
||||
/* Offset the return buffer by 1, so that the report ID
|
||||
will remain in byte 0. */
|
||||
++offset;
|
||||
--length;
|
||||
skipped_report_id = true;
|
||||
}
|
||||
|
||||
res = mConnection.controlTransfer(
|
||||
UsbConstants.USB_TYPE_CLASS | 0x01 /*RECIPIENT_INTERFACE*/ | UsbConstants.USB_DIR_IN,
|
||||
0x01/*HID get_report*/,
|
||||
(3/*HID feature*/ << 8) | report_number,
|
||||
mInterface,
|
||||
report, offset, length,
|
||||
1000/*timeout millis*/);
|
||||
|
||||
if (res < 0) {
|
||||
Log.w(TAG, "getFeatureReport() returned " + res + " on device " + getDeviceName());
|
||||
return false;
|
||||
}
|
||||
|
||||
if (skipped_report_id) {
|
||||
++res;
|
||||
++length;
|
||||
}
|
||||
|
||||
byte[] data;
|
||||
if (res == length) {
|
||||
data = report;
|
||||
} else {
|
||||
data = Arrays.copyOfRange(report, 0, res);
|
||||
}
|
||||
mManager.HIDDeviceFeatureReport(mDeviceId, data);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void close() {
|
||||
mRunning = false;
|
||||
if (mInputThread != null) {
|
||||
while (mInputThread.isAlive()) {
|
||||
mInputThread.interrupt();
|
||||
try {
|
||||
mInputThread.join();
|
||||
} catch (InterruptedException e) {
|
||||
// Keep trying until we're done
|
||||
}
|
||||
}
|
||||
mInputThread = null;
|
||||
}
|
||||
if (mConnection != null) {
|
||||
UsbInterface iface = mDevice.getInterface(mInterfaceIndex);
|
||||
mConnection.releaseInterface(iface);
|
||||
mConnection.close();
|
||||
mConnection = null;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void shutdown() {
|
||||
close();
|
||||
mManager = null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setFrozen(boolean frozen) {
|
||||
mFrozen = frozen;
|
||||
}
|
||||
|
||||
protected class InputThread extends Thread {
|
||||
@Override
|
||||
public void run() {
|
||||
int packetSize = mInputEndpoint.getMaxPacketSize();
|
||||
byte[] packet = new byte[packetSize];
|
||||
while (mRunning) {
|
||||
int r;
|
||||
try
|
||||
{
|
||||
r = mConnection.bulkTransfer(mInputEndpoint, packet, packetSize, 1000);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Log.v(TAG, "Exception in UsbDeviceConnection bulktransfer: " + e);
|
||||
break;
|
||||
}
|
||||
if (r < 0) {
|
||||
// Could be a timeout or an I/O error
|
||||
}
|
||||
if (r > 0) {
|
||||
byte[] data;
|
||||
if (r == packetSize) {
|
||||
data = packet;
|
||||
} else {
|
||||
data = Arrays.copyOfRange(packet, 0, r);
|
||||
}
|
||||
|
||||
if (!mFrozen) {
|
||||
mManager.HIDDeviceInputReport(mDeviceId, data);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,90 @@
|
||||
package org.libsdl.app;
|
||||
|
||||
import android.content.Context;
|
||||
|
||||
import java.lang.Class;
|
||||
import java.lang.reflect.Method;
|
||||
|
||||
/**
|
||||
SDL library initialization
|
||||
*/
|
||||
public class SDL {
|
||||
|
||||
// This function should be called first and sets up the native code
|
||||
// so it can call into the Java classes
|
||||
public static void setupJNI() {
|
||||
SDLActivity.nativeSetupJNI();
|
||||
SDLAudioManager.nativeSetupJNI();
|
||||
SDLControllerManager.nativeSetupJNI();
|
||||
}
|
||||
|
||||
// This function should be called each time the activity is started
|
||||
public static void initialize() {
|
||||
setContext(null);
|
||||
|
||||
SDLActivity.initialize();
|
||||
SDLAudioManager.initialize();
|
||||
SDLControllerManager.initialize();
|
||||
}
|
||||
|
||||
// This function stores the current activity (SDL or not)
|
||||
public static void setContext(Context context) {
|
||||
SDLAudioManager.setContext(context);
|
||||
mContext = context;
|
||||
}
|
||||
|
||||
public static Context getContext() {
|
||||
return mContext;
|
||||
}
|
||||
|
||||
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.");
|
||||
}
|
||||
|
||||
try {
|
||||
// Let's see if we have ReLinker available in the project. This is necessary for
|
||||
// some projects that have huge numbers of local libraries bundled, and thus may
|
||||
// trip a bug in Android's native library loader which ReLinker works around. (If
|
||||
// loadLibrary works properly, ReLinker will simply use the normal Android method
|
||||
// internally.)
|
||||
//
|
||||
// To use ReLinker, just add it as a dependency. For more information, see
|
||||
// https://github.com/KeepSafe/ReLinker for ReLinker's repository.
|
||||
//
|
||||
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.
|
||||
Method forceMethod = relinkClass.getDeclaredMethod("force");
|
||||
Object relinkInstance = forceMethod.invoke(null);
|
||||
Class<?> relinkInstanceClass = relinkInstance.getClass();
|
||||
|
||||
// Actually load the library!
|
||||
Method loadMethod = relinkInstanceClass.getDeclaredMethod("loadLibrary", contextClass, stringClass, stringClass, relinkListenerClass);
|
||||
loadMethod.invoke(relinkInstance, context, libraryName, null, null);
|
||||
}
|
||||
catch (final Throwable e) {
|
||||
// Fall back
|
||||
try {
|
||||
System.loadLibrary(libraryName);
|
||||
}
|
||||
catch (final UnsatisfiedLinkError ule) {
|
||||
throw ule;
|
||||
}
|
||||
catch (final SecurityException se) {
|
||||
throw se;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected static Context mContext;
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,514 @@
|
||||
package org.libsdl.app;
|
||||
|
||||
import android.content.Context;
|
||||
import android.media.AudioDeviceCallback;
|
||||
import android.media.AudioDeviceInfo;
|
||||
import android.media.AudioFormat;
|
||||
import android.media.AudioManager;
|
||||
import android.media.AudioRecord;
|
||||
import android.media.AudioTrack;
|
||||
import android.media.MediaRecorder;
|
||||
import android.os.Build;
|
||||
import android.util.Log;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
||||
public class SDLAudioManager {
|
||||
protected static final String TAG = "SDLAudio";
|
||||
|
||||
protected static AudioTrack mAudioTrack;
|
||||
protected static AudioRecord mAudioRecord;
|
||||
protected static Context mContext;
|
||||
|
||||
private static final int[] NO_DEVICES = {};
|
||||
|
||||
private static AudioDeviceCallback mAudioDeviceCallback;
|
||||
|
||||
public static void initialize() {
|
||||
mAudioTrack = null;
|
||||
mAudioRecord = null;
|
||||
mAudioDeviceCallback = null;
|
||||
|
||||
if(Build.VERSION.SDK_INT >= 24 /* Android 7.0 (N) */)
|
||||
{
|
||||
mAudioDeviceCallback = new AudioDeviceCallback() {
|
||||
@Override
|
||||
public void onAudioDevicesAdded(AudioDeviceInfo[] addedDevices) {
|
||||
Arrays.stream(addedDevices).forEach(deviceInfo -> addAudioDevice(deviceInfo.isSink(), deviceInfo.getId()));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAudioDevicesRemoved(AudioDeviceInfo[] removedDevices) {
|
||||
Arrays.stream(removedDevices).forEach(deviceInfo -> removeAudioDevice(deviceInfo.isSink(), deviceInfo.getId()));
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
public static void setContext(Context context) {
|
||||
mContext = context;
|
||||
if (context != null) {
|
||||
registerAudioDeviceCallback();
|
||||
}
|
||||
}
|
||||
|
||||
public static void release(Context context) {
|
||||
unregisterAudioDeviceCallback(context);
|
||||
}
|
||||
|
||||
// Audio
|
||||
|
||||
protected static String getAudioFormatString(int audioFormat) {
|
||||
switch (audioFormat) {
|
||||
case AudioFormat.ENCODING_PCM_8BIT:
|
||||
return "8-bit";
|
||||
case AudioFormat.ENCODING_PCM_16BIT:
|
||||
return "16-bit";
|
||||
case AudioFormat.ENCODING_PCM_FLOAT:
|
||||
return "float";
|
||||
default:
|
||||
return Integer.toString(audioFormat);
|
||||
}
|
||||
}
|
||||
|
||||
protected static int[] open(boolean isCapture, int sampleRate, int audioFormat, int desiredChannels, int desiredFrames, int deviceId) {
|
||||
int channelConfig;
|
||||
int sampleSize;
|
||||
int frameSize;
|
||||
|
||||
Log.v(TAG, "Opening " + (isCapture ? "capture" : "playback") + ", requested " + desiredFrames + " frames of " + desiredChannels + " channel " + getAudioFormatString(audioFormat) + " audio at " + sampleRate + " Hz");
|
||||
|
||||
/* On older devices let's use known good settings */
|
||||
if (Build.VERSION.SDK_INT < 21 /* Android 5.0 (LOLLIPOP) */) {
|
||||
if (desiredChannels > 2) {
|
||||
desiredChannels = 2;
|
||||
}
|
||||
}
|
||||
|
||||
/* AudioTrack has sample rate limitation of 48000 (fixed in 5.0.2) */
|
||||
if (Build.VERSION.SDK_INT < 22 /* Android 5.1 (LOLLIPOP_MR1) */) {
|
||||
if (sampleRate < 8000) {
|
||||
sampleRate = 8000;
|
||||
} else if (sampleRate > 48000) {
|
||||
sampleRate = 48000;
|
||||
}
|
||||
}
|
||||
|
||||
if (audioFormat == AudioFormat.ENCODING_PCM_FLOAT) {
|
||||
int minSDKVersion = (isCapture ? 23 /* Android 6.0 (M) */ : 21 /* Android 5.0 (LOLLIPOP) */);
|
||||
if (Build.VERSION.SDK_INT < minSDKVersion) {
|
||||
audioFormat = AudioFormat.ENCODING_PCM_16BIT;
|
||||
}
|
||||
}
|
||||
switch (audioFormat)
|
||||
{
|
||||
case AudioFormat.ENCODING_PCM_8BIT:
|
||||
sampleSize = 1;
|
||||
break;
|
||||
case AudioFormat.ENCODING_PCM_16BIT:
|
||||
sampleSize = 2;
|
||||
break;
|
||||
case AudioFormat.ENCODING_PCM_FLOAT:
|
||||
sampleSize = 4;
|
||||
break;
|
||||
default:
|
||||
Log.v(TAG, "Requested format " + audioFormat + ", getting ENCODING_PCM_16BIT");
|
||||
audioFormat = AudioFormat.ENCODING_PCM_16BIT;
|
||||
sampleSize = 2;
|
||||
break;
|
||||
}
|
||||
|
||||
if (isCapture) {
|
||||
switch (desiredChannels) {
|
||||
case 1:
|
||||
channelConfig = AudioFormat.CHANNEL_IN_MONO;
|
||||
break;
|
||||
case 2:
|
||||
channelConfig = AudioFormat.CHANNEL_IN_STEREO;
|
||||
break;
|
||||
default:
|
||||
Log.v(TAG, "Requested " + desiredChannels + " channels, getting stereo");
|
||||
desiredChannels = 2;
|
||||
channelConfig = AudioFormat.CHANNEL_IN_STEREO;
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
switch (desiredChannels) {
|
||||
case 1:
|
||||
channelConfig = AudioFormat.CHANNEL_OUT_MONO;
|
||||
break;
|
||||
case 2:
|
||||
channelConfig = AudioFormat.CHANNEL_OUT_STEREO;
|
||||
break;
|
||||
case 3:
|
||||
channelConfig = AudioFormat.CHANNEL_OUT_STEREO | AudioFormat.CHANNEL_OUT_FRONT_CENTER;
|
||||
break;
|
||||
case 4:
|
||||
channelConfig = AudioFormat.CHANNEL_OUT_QUAD;
|
||||
break;
|
||||
case 5:
|
||||
channelConfig = AudioFormat.CHANNEL_OUT_QUAD | AudioFormat.CHANNEL_OUT_FRONT_CENTER;
|
||||
break;
|
||||
case 6:
|
||||
channelConfig = AudioFormat.CHANNEL_OUT_5POINT1;
|
||||
break;
|
||||
case 7:
|
||||
channelConfig = AudioFormat.CHANNEL_OUT_5POINT1 | AudioFormat.CHANNEL_OUT_BACK_CENTER;
|
||||
break;
|
||||
case 8:
|
||||
if (Build.VERSION.SDK_INT >= 23 /* Android 6.0 (M) */) {
|
||||
channelConfig = AudioFormat.CHANNEL_OUT_7POINT1_SURROUND;
|
||||
} else {
|
||||
Log.v(TAG, "Requested " + desiredChannels + " channels, getting 5.1 surround");
|
||||
desiredChannels = 6;
|
||||
channelConfig = AudioFormat.CHANNEL_OUT_5POINT1;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
Log.v(TAG, "Requested " + desiredChannels + " channels, getting stereo");
|
||||
desiredChannels = 2;
|
||||
channelConfig = AudioFormat.CHANNEL_OUT_STEREO;
|
||||
break;
|
||||
}
|
||||
|
||||
/*
|
||||
Log.v(TAG, "Speaker configuration (and order of channels):");
|
||||
|
||||
if ((channelConfig & 0x00000004) != 0) {
|
||||
Log.v(TAG, " CHANNEL_OUT_FRONT_LEFT");
|
||||
}
|
||||
if ((channelConfig & 0x00000008) != 0) {
|
||||
Log.v(TAG, " CHANNEL_OUT_FRONT_RIGHT");
|
||||
}
|
||||
if ((channelConfig & 0x00000010) != 0) {
|
||||
Log.v(TAG, " CHANNEL_OUT_FRONT_CENTER");
|
||||
}
|
||||
if ((channelConfig & 0x00000020) != 0) {
|
||||
Log.v(TAG, " CHANNEL_OUT_LOW_FREQUENCY");
|
||||
}
|
||||
if ((channelConfig & 0x00000040) != 0) {
|
||||
Log.v(TAG, " CHANNEL_OUT_BACK_LEFT");
|
||||
}
|
||||
if ((channelConfig & 0x00000080) != 0) {
|
||||
Log.v(TAG, " CHANNEL_OUT_BACK_RIGHT");
|
||||
}
|
||||
if ((channelConfig & 0x00000100) != 0) {
|
||||
Log.v(TAG, " CHANNEL_OUT_FRONT_LEFT_OF_CENTER");
|
||||
}
|
||||
if ((channelConfig & 0x00000200) != 0) {
|
||||
Log.v(TAG, " CHANNEL_OUT_FRONT_RIGHT_OF_CENTER");
|
||||
}
|
||||
if ((channelConfig & 0x00000400) != 0) {
|
||||
Log.v(TAG, " CHANNEL_OUT_BACK_CENTER");
|
||||
}
|
||||
if ((channelConfig & 0x00000800) != 0) {
|
||||
Log.v(TAG, " CHANNEL_OUT_SIDE_LEFT");
|
||||
}
|
||||
if ((channelConfig & 0x00001000) != 0) {
|
||||
Log.v(TAG, " CHANNEL_OUT_SIDE_RIGHT");
|
||||
}
|
||||
*/
|
||||
}
|
||||
frameSize = (sampleSize * desiredChannels);
|
||||
|
||||
// Let the user pick a larger buffer if they really want -- but ye
|
||||
// gods they probably shouldn't, the minimums are horrifyingly high
|
||||
// latency already
|
||||
int minBufferSize;
|
||||
if (isCapture) {
|
||||
minBufferSize = AudioRecord.getMinBufferSize(sampleRate, channelConfig, audioFormat);
|
||||
} else {
|
||||
minBufferSize = AudioTrack.getMinBufferSize(sampleRate, channelConfig, audioFormat);
|
||||
}
|
||||
desiredFrames = Math.max(desiredFrames, (minBufferSize + frameSize - 1) / frameSize);
|
||||
|
||||
int[] results = new int[4];
|
||||
|
||||
if (isCapture) {
|
||||
if (mAudioRecord == null) {
|
||||
mAudioRecord = new AudioRecord(MediaRecorder.AudioSource.DEFAULT, sampleRate,
|
||||
channelConfig, audioFormat, desiredFrames * frameSize);
|
||||
|
||||
// see notes about AudioTrack state in audioOpen(), above. Probably also applies here.
|
||||
if (mAudioRecord.getState() != AudioRecord.STATE_INITIALIZED) {
|
||||
Log.e(TAG, "Failed during initialization of AudioRecord");
|
||||
mAudioRecord.release();
|
||||
mAudioRecord = null;
|
||||
return null;
|
||||
}
|
||||
|
||||
if (Build.VERSION.SDK_INT >= 24 /* Android 7.0 (N) */ && deviceId != 0) {
|
||||
mAudioRecord.setPreferredDevice(getOutputAudioDeviceInfo(deviceId));
|
||||
}
|
||||
|
||||
mAudioRecord.startRecording();
|
||||
}
|
||||
|
||||
results[0] = mAudioRecord.getSampleRate();
|
||||
results[1] = mAudioRecord.getAudioFormat();
|
||||
results[2] = mAudioRecord.getChannelCount();
|
||||
|
||||
} else {
|
||||
if (mAudioTrack == null) {
|
||||
mAudioTrack = new AudioTrack(AudioManager.STREAM_MUSIC, sampleRate, channelConfig, audioFormat, desiredFrames * frameSize, AudioTrack.MODE_STREAM);
|
||||
|
||||
// Instantiating AudioTrack can "succeed" without an exception and the track may still be invalid
|
||||
// Ref: https://android.googlesource.com/platform/frameworks/base/+/refs/heads/master/media/java/android/media/AudioTrack.java
|
||||
// Ref: http://developer.android.com/reference/android/media/AudioTrack.html#getState()
|
||||
if (mAudioTrack.getState() != AudioTrack.STATE_INITIALIZED) {
|
||||
/* Try again, with safer values */
|
||||
|
||||
Log.e(TAG, "Failed during initialization of Audio Track");
|
||||
mAudioTrack.release();
|
||||
mAudioTrack = null;
|
||||
return null;
|
||||
}
|
||||
|
||||
if (Build.VERSION.SDK_INT >= 24 /* Android 7.0 (N) */ && deviceId != 0) {
|
||||
mAudioTrack.setPreferredDevice(getInputAudioDeviceInfo(deviceId));
|
||||
}
|
||||
|
||||
mAudioTrack.play();
|
||||
}
|
||||
|
||||
results[0] = mAudioTrack.getSampleRate();
|
||||
results[1] = mAudioTrack.getAudioFormat();
|
||||
results[2] = mAudioTrack.getChannelCount();
|
||||
}
|
||||
results[3] = desiredFrames;
|
||||
|
||||
Log.v(TAG, "Opening " + (isCapture ? "capture" : "playback") + ", got " + results[3] + " frames of " + results[2] + " channel " + getAudioFormatString(results[1]) + " audio at " + results[0] + " Hz");
|
||||
|
||||
return results;
|
||||
}
|
||||
|
||||
private static AudioDeviceInfo getInputAudioDeviceInfo(int deviceId) {
|
||||
if (Build.VERSION.SDK_INT >= 24 /* Android 7.0 (N) */) {
|
||||
AudioManager audioManager = (AudioManager) mContext.getSystemService(Context.AUDIO_SERVICE);
|
||||
return Arrays.stream(audioManager.getDevices(AudioManager.GET_DEVICES_INPUTS))
|
||||
.filter(deviceInfo -> deviceInfo.getId() == deviceId)
|
||||
.findFirst()
|
||||
.orElse(null);
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
private static AudioDeviceInfo getOutputAudioDeviceInfo(int deviceId) {
|
||||
if (Build.VERSION.SDK_INT >= 24 /* Android 7.0 (N) */) {
|
||||
AudioManager audioManager = (AudioManager) mContext.getSystemService(Context.AUDIO_SERVICE);
|
||||
return Arrays.stream(audioManager.getDevices(AudioManager.GET_DEVICES_OUTPUTS))
|
||||
.filter(deviceInfo -> deviceInfo.getId() == deviceId)
|
||||
.findFirst()
|
||||
.orElse(null);
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
private static void registerAudioDeviceCallback() {
|
||||
if (Build.VERSION.SDK_INT >= 24 /* Android 7.0 (N) */) {
|
||||
AudioManager audioManager = (AudioManager) mContext.getSystemService(Context.AUDIO_SERVICE);
|
||||
audioManager.registerAudioDeviceCallback(mAudioDeviceCallback, null);
|
||||
}
|
||||
}
|
||||
|
||||
private static void unregisterAudioDeviceCallback(Context context) {
|
||||
if (Build.VERSION.SDK_INT >= 24 /* Android 7.0 (N) */) {
|
||||
AudioManager audioManager = (AudioManager) context.getSystemService(Context.AUDIO_SERVICE);
|
||||
audioManager.unregisterAudioDeviceCallback(mAudioDeviceCallback);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* This method is called by SDL using JNI.
|
||||
*/
|
||||
public static int[] getAudioOutputDevices() {
|
||||
if (Build.VERSION.SDK_INT >= 24 /* Android 7.0 (N) */) {
|
||||
AudioManager audioManager = (AudioManager) mContext.getSystemService(Context.AUDIO_SERVICE);
|
||||
return Arrays.stream(audioManager.getDevices(AudioManager.GET_DEVICES_OUTPUTS)).mapToInt(AudioDeviceInfo::getId).toArray();
|
||||
} else {
|
||||
return NO_DEVICES;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* This method is called by SDL using JNI.
|
||||
*/
|
||||
public static int[] getAudioInputDevices() {
|
||||
if (Build.VERSION.SDK_INT >= 24 /* Android 7.0 (N) */) {
|
||||
AudioManager audioManager = (AudioManager) mContext.getSystemService(Context.AUDIO_SERVICE);
|
||||
return Arrays.stream(audioManager.getDevices(AudioManager.GET_DEVICES_INPUTS)).mapToInt(AudioDeviceInfo::getId).toArray();
|
||||
} else {
|
||||
return NO_DEVICES;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* This method is called by SDL using JNI.
|
||||
*/
|
||||
public static int[] audioOpen(int sampleRate, int audioFormat, int desiredChannels, int desiredFrames, int deviceId) {
|
||||
return open(false, sampleRate, audioFormat, desiredChannels, desiredFrames, deviceId);
|
||||
}
|
||||
|
||||
/**
|
||||
* This method is called by SDL using JNI.
|
||||
*/
|
||||
public static void audioWriteFloatBuffer(float[] buffer) {
|
||||
if (mAudioTrack == null) {
|
||||
Log.e(TAG, "Attempted to make audio call with uninitialized audio!");
|
||||
return;
|
||||
}
|
||||
|
||||
if (android.os.Build.VERSION.SDK_INT < 21 /* Android 5.0 (LOLLIPOP) */) {
|
||||
Log.e(TAG, "Attempted to make an incompatible audio call with uninitialized audio! (floating-point output is supported since Android 5.0 Lollipop)");
|
||||
return;
|
||||
}
|
||||
|
||||
for (int i = 0; i < buffer.length;) {
|
||||
int result = mAudioTrack.write(buffer, i, buffer.length - i, AudioTrack.WRITE_BLOCKING);
|
||||
if (result > 0) {
|
||||
i += result;
|
||||
} else if (result == 0) {
|
||||
try {
|
||||
Thread.sleep(1);
|
||||
} catch(InterruptedException e) {
|
||||
// Nom nom
|
||||
}
|
||||
} else {
|
||||
Log.w(TAG, "SDL audio: error return from write(float)");
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* This method is called by SDL using JNI.
|
||||
*/
|
||||
public static void audioWriteShortBuffer(short[] buffer) {
|
||||
if (mAudioTrack == null) {
|
||||
Log.e(TAG, "Attempted to make audio call with uninitialized audio!");
|
||||
return;
|
||||
}
|
||||
|
||||
for (int i = 0; i < buffer.length;) {
|
||||
int result = mAudioTrack.write(buffer, i, buffer.length - i);
|
||||
if (result > 0) {
|
||||
i += result;
|
||||
} else if (result == 0) {
|
||||
try {
|
||||
Thread.sleep(1);
|
||||
} catch(InterruptedException e) {
|
||||
// Nom nom
|
||||
}
|
||||
} else {
|
||||
Log.w(TAG, "SDL audio: error return from write(short)");
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* This method is called by SDL using JNI.
|
||||
*/
|
||||
public static void audioWriteByteBuffer(byte[] buffer) {
|
||||
if (mAudioTrack == null) {
|
||||
Log.e(TAG, "Attempted to make audio call with uninitialized audio!");
|
||||
return;
|
||||
}
|
||||
|
||||
for (int i = 0; i < buffer.length; ) {
|
||||
int result = mAudioTrack.write(buffer, i, buffer.length - i);
|
||||
if (result > 0) {
|
||||
i += result;
|
||||
} else if (result == 0) {
|
||||
try {
|
||||
Thread.sleep(1);
|
||||
} catch(InterruptedException e) {
|
||||
// Nom nom
|
||||
}
|
||||
} else {
|
||||
Log.w(TAG, "SDL audio: error return from write(byte)");
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* This method is called by SDL using JNI.
|
||||
*/
|
||||
public static int[] captureOpen(int sampleRate, int audioFormat, int desiredChannels, int desiredFrames, int deviceId) {
|
||||
return open(true, sampleRate, audioFormat, desiredChannels, desiredFrames, deviceId);
|
||||
}
|
||||
|
||||
/** This method is called by SDL using JNI. */
|
||||
public static int captureReadFloatBuffer(float[] buffer, boolean blocking) {
|
||||
if (Build.VERSION.SDK_INT < 23 /* Android 6.0 (M) */) {
|
||||
return 0;
|
||||
} else {
|
||||
return mAudioRecord.read(buffer, 0, buffer.length, blocking ? AudioRecord.READ_BLOCKING : AudioRecord.READ_NON_BLOCKING);
|
||||
}
|
||||
}
|
||||
|
||||
/** This method is called by SDL using JNI. */
|
||||
public static int captureReadShortBuffer(short[] buffer, boolean blocking) {
|
||||
if (Build.VERSION.SDK_INT < 23 /* Android 6.0 (M) */) {
|
||||
return mAudioRecord.read(buffer, 0, buffer.length);
|
||||
} else {
|
||||
return mAudioRecord.read(buffer, 0, buffer.length, blocking ? AudioRecord.READ_BLOCKING : AudioRecord.READ_NON_BLOCKING);
|
||||
}
|
||||
}
|
||||
|
||||
/** This method is called by SDL using JNI. */
|
||||
public static int captureReadByteBuffer(byte[] buffer, boolean blocking) {
|
||||
if (Build.VERSION.SDK_INT < 23 /* Android 6.0 (M) */) {
|
||||
return mAudioRecord.read(buffer, 0, buffer.length);
|
||||
} else {
|
||||
return mAudioRecord.read(buffer, 0, buffer.length, blocking ? AudioRecord.READ_BLOCKING : AudioRecord.READ_NON_BLOCKING);
|
||||
}
|
||||
}
|
||||
|
||||
/** This method is called by SDL using JNI. */
|
||||
public static void audioClose() {
|
||||
if (mAudioTrack != null) {
|
||||
mAudioTrack.stop();
|
||||
mAudioTrack.release();
|
||||
mAudioTrack = null;
|
||||
}
|
||||
}
|
||||
|
||||
/** This method is called by SDL using JNI. */
|
||||
public static void captureClose() {
|
||||
if (mAudioRecord != null) {
|
||||
mAudioRecord.stop();
|
||||
mAudioRecord.release();
|
||||
mAudioRecord = null;
|
||||
}
|
||||
}
|
||||
|
||||
/** This method is called by SDL using JNI. */
|
||||
public static void audioSetThreadPriority(boolean iscapture, int device_id) {
|
||||
try {
|
||||
|
||||
/* Set thread name */
|
||||
if (iscapture) {
|
||||
Thread.currentThread().setName("SDLAudioC" + device_id);
|
||||
} else {
|
||||
Thread.currentThread().setName("SDLAudioP" + device_id);
|
||||
}
|
||||
|
||||
/* Set thread priority */
|
||||
android.os.Process.setThreadPriority(android.os.Process.THREAD_PRIORITY_AUDIO);
|
||||
|
||||
} catch (Exception e) {
|
||||
Log.v(TAG, "modify thread properties failed " + e.toString());
|
||||
}
|
||||
}
|
||||
|
||||
public static native int nativeSetupJNI();
|
||||
|
||||
public static native void removeAudioDevice(boolean isCapture, int deviceId);
|
||||
|
||||
public static native void addAudioDevice(boolean isCapture, int deviceId);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,856 @@
|
||||
package org.libsdl.app;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.Comparator;
|
||||
import java.util.List;
|
||||
|
||||
import android.content.Context;
|
||||
import android.os.Build;
|
||||
import android.os.VibrationEffect;
|
||||
import android.os.Vibrator;
|
||||
import android.util.Log;
|
||||
import android.view.InputDevice;
|
||||
import android.view.KeyEvent;
|
||||
import android.view.MotionEvent;
|
||||
import android.view.View;
|
||||
|
||||
|
||||
public class SDLControllerManager
|
||||
{
|
||||
|
||||
public static native int nativeSetupJNI();
|
||||
|
||||
public static native int nativeAddJoystick(int device_id, String name, String desc,
|
||||
int vendor_id, int product_id,
|
||||
boolean is_accelerometer, int button_mask,
|
||||
int naxes, int axis_mask, int nhats, int nballs);
|
||||
public static native int nativeRemoveJoystick(int device_id);
|
||||
public static native int nativeAddHaptic(int device_id, String name);
|
||||
public static native int nativeRemoveHaptic(int device_id);
|
||||
public static native int onNativePadDown(int device_id, int keycode);
|
||||
public static native int onNativePadUp(int device_id, int keycode);
|
||||
public static native void onNativeJoy(int device_id, int axis,
|
||||
float value);
|
||||
public static native void onNativeHat(int device_id, int hat_id,
|
||||
int x, int y);
|
||||
|
||||
protected static SDLJoystickHandler mJoystickHandler;
|
||||
protected static SDLHapticHandler mHapticHandler;
|
||||
|
||||
private static final String TAG = "SDLControllerManager";
|
||||
|
||||
public static void initialize() {
|
||||
if (mJoystickHandler == null) {
|
||||
if (Build.VERSION.SDK_INT >= 19 /* Android 4.4 (KITKAT) */) {
|
||||
mJoystickHandler = new SDLJoystickHandler_API19();
|
||||
} else {
|
||||
mJoystickHandler = new SDLJoystickHandler_API16();
|
||||
}
|
||||
}
|
||||
|
||||
if (mHapticHandler == null) {
|
||||
if (Build.VERSION.SDK_INT >= 26 /* Android 8.0 (O) */) {
|
||||
mHapticHandler = new SDLHapticHandler_API26();
|
||||
} else {
|
||||
mHapticHandler = new SDLHapticHandler();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Joystick glue code, just a series of stubs that redirect to the SDLJoystickHandler instance
|
||||
public static boolean handleJoystickMotionEvent(MotionEvent event) {
|
||||
return mJoystickHandler.handleMotionEvent(event);
|
||||
}
|
||||
|
||||
/**
|
||||
* This method is called by SDL using JNI.
|
||||
*/
|
||||
public static void pollInputDevices() {
|
||||
mJoystickHandler.pollInputDevices();
|
||||
}
|
||||
|
||||
/**
|
||||
* This method is called by SDL using JNI.
|
||||
*/
|
||||
public static void pollHapticDevices() {
|
||||
mHapticHandler.pollHapticDevices();
|
||||
}
|
||||
|
||||
/**
|
||||
* This method is called by SDL using JNI.
|
||||
*/
|
||||
public static void hapticRun(int device_id, float intensity, int length) {
|
||||
mHapticHandler.run(device_id, intensity, length);
|
||||
}
|
||||
|
||||
/**
|
||||
* This method is called by SDL using JNI.
|
||||
*/
|
||||
public static void hapticStop(int device_id)
|
||||
{
|
||||
mHapticHandler.stop(device_id);
|
||||
}
|
||||
|
||||
// Check if a given device is considered a possible SDL joystick
|
||||
public static boolean isDeviceSDLJoystick(int deviceId) {
|
||||
InputDevice device = InputDevice.getDevice(deviceId);
|
||||
// We cannot use InputDevice.isVirtual before API 16, so let's accept
|
||||
// only nonnegative device ids (VIRTUAL_KEYBOARD equals -1)
|
||||
if ((device == null) || (deviceId < 0)) {
|
||||
return false;
|
||||
}
|
||||
int sources = device.getSources();
|
||||
|
||||
/* This is called for every button press, so let's not spam the logs */
|
||||
/*
|
||||
if ((sources & InputDevice.SOURCE_CLASS_JOYSTICK) != 0) {
|
||||
Log.v(TAG, "Input device " + device.getName() + " has class joystick.");
|
||||
}
|
||||
if ((sources & InputDevice.SOURCE_DPAD) == InputDevice.SOURCE_DPAD) {
|
||||
Log.v(TAG, "Input device " + device.getName() + " is a dpad.");
|
||||
}
|
||||
if ((sources & InputDevice.SOURCE_GAMEPAD) == InputDevice.SOURCE_GAMEPAD) {
|
||||
Log.v(TAG, "Input device " + device.getName() + " is a gamepad.");
|
||||
}
|
||||
*/
|
||||
|
||||
return ((sources & InputDevice.SOURCE_CLASS_JOYSTICK) != 0 ||
|
||||
((sources & InputDevice.SOURCE_DPAD) == InputDevice.SOURCE_DPAD) ||
|
||||
((sources & InputDevice.SOURCE_GAMEPAD) == InputDevice.SOURCE_GAMEPAD)
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
class SDLJoystickHandler {
|
||||
|
||||
/**
|
||||
* Handles given MotionEvent.
|
||||
* @param event the event to be handled.
|
||||
* @return if given event was processed.
|
||||
*/
|
||||
public boolean handleMotionEvent(MotionEvent event) {
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Handles adding and removing of input devices.
|
||||
*/
|
||||
public void pollInputDevices() {
|
||||
}
|
||||
}
|
||||
|
||||
/* Actual joystick functionality available for API >= 12 devices */
|
||||
class SDLJoystickHandler_API16 extends SDLJoystickHandler {
|
||||
|
||||
static class SDLJoystick {
|
||||
public int device_id;
|
||||
public String name;
|
||||
public String desc;
|
||||
public ArrayList<InputDevice.MotionRange> axes;
|
||||
public ArrayList<InputDevice.MotionRange> hats;
|
||||
}
|
||||
static class RangeComparator implements Comparator<InputDevice.MotionRange> {
|
||||
@Override
|
||||
public int compare(InputDevice.MotionRange arg0, InputDevice.MotionRange arg1) {
|
||||
// Some controllers, like the Moga Pro 2, return AXIS_GAS (22) for right trigger and AXIS_BRAKE (23) for left trigger - swap them so they're sorted in the right order for SDL
|
||||
int arg0Axis = arg0.getAxis();
|
||||
int arg1Axis = arg1.getAxis();
|
||||
if (arg0Axis == MotionEvent.AXIS_GAS) {
|
||||
arg0Axis = MotionEvent.AXIS_BRAKE;
|
||||
} else if (arg0Axis == MotionEvent.AXIS_BRAKE) {
|
||||
arg0Axis = MotionEvent.AXIS_GAS;
|
||||
}
|
||||
if (arg1Axis == MotionEvent.AXIS_GAS) {
|
||||
arg1Axis = MotionEvent.AXIS_BRAKE;
|
||||
} else if (arg1Axis == MotionEvent.AXIS_BRAKE) {
|
||||
arg1Axis = MotionEvent.AXIS_GAS;
|
||||
}
|
||||
|
||||
// Make sure the AXIS_Z is sorted between AXIS_RY and AXIS_RZ.
|
||||
// This is because the usual pairing are:
|
||||
// - AXIS_X + AXIS_Y (left stick).
|
||||
// - AXIS_RX, AXIS_RY (sometimes the right stick, sometimes triggers).
|
||||
// - AXIS_Z, AXIS_RZ (sometimes the right stick, sometimes triggers).
|
||||
// This sorts the axes in the above order, which tends to be correct
|
||||
// for Xbox-ish game pads that have the right stick on RX/RY and the
|
||||
// triggers on Z/RZ.
|
||||
//
|
||||
// Gamepads that don't have AXIS_Z/AXIS_RZ but use
|
||||
// AXIS_LTRIGGER/AXIS_RTRIGGER are unaffected by this.
|
||||
//
|
||||
// References:
|
||||
// - https://developer.android.com/develop/ui/views/touch-and-input/game-controllers/controller-input
|
||||
// - https://www.kernel.org/doc/html/latest/input/gamepad.html
|
||||
if (arg0Axis == MotionEvent.AXIS_Z) {
|
||||
arg0Axis = MotionEvent.AXIS_RZ - 1;
|
||||
} else if (arg0Axis > MotionEvent.AXIS_Z && arg0Axis < MotionEvent.AXIS_RZ) {
|
||||
--arg0Axis;
|
||||
}
|
||||
if (arg1Axis == MotionEvent.AXIS_Z) {
|
||||
arg1Axis = MotionEvent.AXIS_RZ - 1;
|
||||
} else if (arg1Axis > MotionEvent.AXIS_Z && arg1Axis < MotionEvent.AXIS_RZ) {
|
||||
--arg1Axis;
|
||||
}
|
||||
|
||||
return arg0Axis - arg1Axis;
|
||||
}
|
||||
}
|
||||
|
||||
private final ArrayList<SDLJoystick> mJoysticks;
|
||||
|
||||
public SDLJoystickHandler_API16() {
|
||||
|
||||
mJoysticks = new ArrayList<SDLJoystick>();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void pollInputDevices() {
|
||||
int[] deviceIds = InputDevice.getDeviceIds();
|
||||
|
||||
for (int device_id : deviceIds) {
|
||||
if (SDLControllerManager.isDeviceSDLJoystick(device_id)) {
|
||||
SDLJoystick joystick = getJoystick(device_id);
|
||||
if (joystick == null) {
|
||||
InputDevice joystickDevice = InputDevice.getDevice(device_id);
|
||||
joystick = new SDLJoystick();
|
||||
joystick.device_id = device_id;
|
||||
joystick.name = joystickDevice.getName();
|
||||
joystick.desc = getJoystickDescriptor(joystickDevice);
|
||||
joystick.axes = new ArrayList<InputDevice.MotionRange>();
|
||||
joystick.hats = new ArrayList<InputDevice.MotionRange>();
|
||||
|
||||
List<InputDevice.MotionRange> ranges = joystickDevice.getMotionRanges();
|
||||
Collections.sort(ranges, new RangeComparator());
|
||||
for (InputDevice.MotionRange range : ranges) {
|
||||
if ((range.getSource() & InputDevice.SOURCE_CLASS_JOYSTICK) != 0) {
|
||||
if (range.getAxis() == MotionEvent.AXIS_HAT_X || range.getAxis() == MotionEvent.AXIS_HAT_Y) {
|
||||
joystick.hats.add(range);
|
||||
} else {
|
||||
joystick.axes.add(range);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
mJoysticks.add(joystick);
|
||||
SDLControllerManager.nativeAddJoystick(joystick.device_id, joystick.name, joystick.desc,
|
||||
getVendorId(joystickDevice), getProductId(joystickDevice), false,
|
||||
getButtonMask(joystickDevice), joystick.axes.size(), getAxisMask(joystick.axes), joystick.hats.size()/2, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Check removed devices */
|
||||
ArrayList<Integer> removedDevices = null;
|
||||
for (SDLJoystick joystick : mJoysticks) {
|
||||
int device_id = joystick.device_id;
|
||||
int i;
|
||||
for (i = 0; i < deviceIds.length; i++) {
|
||||
if (device_id == deviceIds[i]) break;
|
||||
}
|
||||
if (i == deviceIds.length) {
|
||||
if (removedDevices == null) {
|
||||
removedDevices = new ArrayList<Integer>();
|
||||
}
|
||||
removedDevices.add(device_id);
|
||||
}
|
||||
}
|
||||
|
||||
if (removedDevices != null) {
|
||||
for (int device_id : removedDevices) {
|
||||
SDLControllerManager.nativeRemoveJoystick(device_id);
|
||||
for (int i = 0; i < mJoysticks.size(); i++) {
|
||||
if (mJoysticks.get(i).device_id == device_id) {
|
||||
mJoysticks.remove(i);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected SDLJoystick getJoystick(int device_id) {
|
||||
for (SDLJoystick joystick : mJoysticks) {
|
||||
if (joystick.device_id == device_id) {
|
||||
return joystick;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean handleMotionEvent(MotionEvent event) {
|
||||
int actionPointerIndex = event.getActionIndex();
|
||||
int action = event.getActionMasked();
|
||||
if (action == MotionEvent.ACTION_MOVE) {
|
||||
SDLJoystick joystick = getJoystick(event.getDeviceId());
|
||||
if (joystick != null) {
|
||||
for (int i = 0; i < joystick.axes.size(); i++) {
|
||||
InputDevice.MotionRange range = joystick.axes.get(i);
|
||||
/* Normalize the value to -1...1 */
|
||||
float value = (event.getAxisValue(range.getAxis(), actionPointerIndex) - range.getMin()) / range.getRange() * 2.0f - 1.0f;
|
||||
SDLControllerManager.onNativeJoy(joystick.device_id, i, value);
|
||||
}
|
||||
for (int i = 0; i < joystick.hats.size() / 2; i++) {
|
||||
int hatX = Math.round(event.getAxisValue(joystick.hats.get(2 * i).getAxis(), actionPointerIndex));
|
||||
int hatY = Math.round(event.getAxisValue(joystick.hats.get(2 * i + 1).getAxis(), actionPointerIndex));
|
||||
SDLControllerManager.onNativeHat(joystick.device_id, i, hatX, hatY);
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public String getJoystickDescriptor(InputDevice joystickDevice) {
|
||||
String desc = joystickDevice.getDescriptor();
|
||||
|
||||
if (desc != null && !desc.isEmpty()) {
|
||||
return desc;
|
||||
}
|
||||
|
||||
return joystickDevice.getName();
|
||||
}
|
||||
public int getProductId(InputDevice joystickDevice) {
|
||||
return 0;
|
||||
}
|
||||
public int getVendorId(InputDevice joystickDevice) {
|
||||
return 0;
|
||||
}
|
||||
public int getAxisMask(List<InputDevice.MotionRange> ranges) {
|
||||
return -1;
|
||||
}
|
||||
public int getButtonMask(InputDevice joystickDevice) {
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
class SDLJoystickHandler_API19 extends SDLJoystickHandler_API16 {
|
||||
|
||||
@Override
|
||||
public int getProductId(InputDevice joystickDevice) {
|
||||
return joystickDevice.getProductId();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getVendorId(InputDevice joystickDevice) {
|
||||
return joystickDevice.getVendorId();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getAxisMask(List<InputDevice.MotionRange> ranges) {
|
||||
// For compatibility, keep computing the axis mask like before,
|
||||
// only really distinguishing 2, 4 and 6 axes.
|
||||
int axis_mask = 0;
|
||||
if (ranges.size() >= 2) {
|
||||
// ((1 << SDL_GAMEPAD_AXIS_LEFTX) | (1 << SDL_GAMEPAD_AXIS_LEFTY))
|
||||
axis_mask |= 0x0003;
|
||||
}
|
||||
if (ranges.size() >= 4) {
|
||||
// ((1 << SDL_GAMEPAD_AXIS_RIGHTX) | (1 << SDL_GAMEPAD_AXIS_RIGHTY))
|
||||
axis_mask |= 0x000c;
|
||||
}
|
||||
if (ranges.size() >= 6) {
|
||||
// ((1 << SDL_GAMEPAD_AXIS_LEFT_TRIGGER) | (1 << SDL_GAMEPAD_AXIS_RIGHT_TRIGGER))
|
||||
axis_mask |= 0x0030;
|
||||
}
|
||||
// Also add an indicator bit for whether the sorting order has changed.
|
||||
// This serves to disable outdated gamecontrollerdb.txt mappings.
|
||||
boolean have_z = false;
|
||||
boolean have_past_z_before_rz = false;
|
||||
for (InputDevice.MotionRange range : ranges) {
|
||||
int axis = range.getAxis();
|
||||
if (axis == MotionEvent.AXIS_Z) {
|
||||
have_z = true;
|
||||
} else if (axis > MotionEvent.AXIS_Z && axis < MotionEvent.AXIS_RZ) {
|
||||
have_past_z_before_rz = true;
|
||||
}
|
||||
}
|
||||
if (have_z && have_past_z_before_rz) {
|
||||
// If both these exist, the compare() function changed sorting order.
|
||||
// Set a bit to indicate this fact.
|
||||
axis_mask |= 0x8000;
|
||||
}
|
||||
return axis_mask;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getButtonMask(InputDevice joystickDevice) {
|
||||
int button_mask = 0;
|
||||
int[] keys = new int[] {
|
||||
KeyEvent.KEYCODE_BUTTON_A,
|
||||
KeyEvent.KEYCODE_BUTTON_B,
|
||||
KeyEvent.KEYCODE_BUTTON_X,
|
||||
KeyEvent.KEYCODE_BUTTON_Y,
|
||||
KeyEvent.KEYCODE_BACK,
|
||||
KeyEvent.KEYCODE_MENU,
|
||||
KeyEvent.KEYCODE_BUTTON_MODE,
|
||||
KeyEvent.KEYCODE_BUTTON_START,
|
||||
KeyEvent.KEYCODE_BUTTON_THUMBL,
|
||||
KeyEvent.KEYCODE_BUTTON_THUMBR,
|
||||
KeyEvent.KEYCODE_BUTTON_L1,
|
||||
KeyEvent.KEYCODE_BUTTON_R1,
|
||||
KeyEvent.KEYCODE_DPAD_UP,
|
||||
KeyEvent.KEYCODE_DPAD_DOWN,
|
||||
KeyEvent.KEYCODE_DPAD_LEFT,
|
||||
KeyEvent.KEYCODE_DPAD_RIGHT,
|
||||
KeyEvent.KEYCODE_BUTTON_SELECT,
|
||||
KeyEvent.KEYCODE_DPAD_CENTER,
|
||||
|
||||
// These don't map into any SDL controller buttons directly
|
||||
KeyEvent.KEYCODE_BUTTON_L2,
|
||||
KeyEvent.KEYCODE_BUTTON_R2,
|
||||
KeyEvent.KEYCODE_BUTTON_C,
|
||||
KeyEvent.KEYCODE_BUTTON_Z,
|
||||
KeyEvent.KEYCODE_BUTTON_1,
|
||||
KeyEvent.KEYCODE_BUTTON_2,
|
||||
KeyEvent.KEYCODE_BUTTON_3,
|
||||
KeyEvent.KEYCODE_BUTTON_4,
|
||||
KeyEvent.KEYCODE_BUTTON_5,
|
||||
KeyEvent.KEYCODE_BUTTON_6,
|
||||
KeyEvent.KEYCODE_BUTTON_7,
|
||||
KeyEvent.KEYCODE_BUTTON_8,
|
||||
KeyEvent.KEYCODE_BUTTON_9,
|
||||
KeyEvent.KEYCODE_BUTTON_10,
|
||||
KeyEvent.KEYCODE_BUTTON_11,
|
||||
KeyEvent.KEYCODE_BUTTON_12,
|
||||
KeyEvent.KEYCODE_BUTTON_13,
|
||||
KeyEvent.KEYCODE_BUTTON_14,
|
||||
KeyEvent.KEYCODE_BUTTON_15,
|
||||
KeyEvent.KEYCODE_BUTTON_16,
|
||||
};
|
||||
int[] masks = new int[] {
|
||||
(1 << 0), // A -> A
|
||||
(1 << 1), // B -> B
|
||||
(1 << 2), // X -> X
|
||||
(1 << 3), // Y -> Y
|
||||
(1 << 4), // BACK -> BACK
|
||||
(1 << 6), // MENU -> START
|
||||
(1 << 5), // MODE -> GUIDE
|
||||
(1 << 6), // START -> START
|
||||
(1 << 7), // THUMBL -> LEFTSTICK
|
||||
(1 << 8), // THUMBR -> RIGHTSTICK
|
||||
(1 << 9), // L1 -> LEFTSHOULDER
|
||||
(1 << 10), // R1 -> RIGHTSHOULDER
|
||||
(1 << 11), // DPAD_UP -> DPAD_UP
|
||||
(1 << 12), // DPAD_DOWN -> DPAD_DOWN
|
||||
(1 << 13), // DPAD_LEFT -> DPAD_LEFT
|
||||
(1 << 14), // DPAD_RIGHT -> DPAD_RIGHT
|
||||
(1 << 4), // SELECT -> BACK
|
||||
(1 << 0), // DPAD_CENTER -> A
|
||||
(1 << 15), // L2 -> ??
|
||||
(1 << 16), // R2 -> ??
|
||||
(1 << 17), // C -> ??
|
||||
(1 << 18), // Z -> ??
|
||||
(1 << 20), // 1 -> ??
|
||||
(1 << 21), // 2 -> ??
|
||||
(1 << 22), // 3 -> ??
|
||||
(1 << 23), // 4 -> ??
|
||||
(1 << 24), // 5 -> ??
|
||||
(1 << 25), // 6 -> ??
|
||||
(1 << 26), // 7 -> ??
|
||||
(1 << 27), // 8 -> ??
|
||||
(1 << 28), // 9 -> ??
|
||||
(1 << 29), // 10 -> ??
|
||||
(1 << 30), // 11 -> ??
|
||||
(1 << 31), // 12 -> ??
|
||||
// We're out of room...
|
||||
0xFFFFFFFF, // 13 -> ??
|
||||
0xFFFFFFFF, // 14 -> ??
|
||||
0xFFFFFFFF, // 15 -> ??
|
||||
0xFFFFFFFF, // 16 -> ??
|
||||
};
|
||||
boolean[] has_keys = joystickDevice.hasKeys(keys);
|
||||
for (int i = 0; i < keys.length; ++i) {
|
||||
if (has_keys[i]) {
|
||||
button_mask |= masks[i];
|
||||
}
|
||||
}
|
||||
return button_mask;
|
||||
}
|
||||
}
|
||||
|
||||
class SDLHapticHandler_API26 extends SDLHapticHandler {
|
||||
@Override
|
||||
public void run(int device_id, float intensity, int length) {
|
||||
SDLHaptic haptic = getHaptic(device_id);
|
||||
if (haptic != null) {
|
||||
Log.d("SDL", "Rtest: Vibe with intensity " + intensity + " for " + length);
|
||||
if (intensity == 0.0f) {
|
||||
stop(device_id);
|
||||
return;
|
||||
}
|
||||
|
||||
int vibeValue = Math.round(intensity * 255);
|
||||
|
||||
if (vibeValue > 255) {
|
||||
vibeValue = 255;
|
||||
}
|
||||
if (vibeValue < 1) {
|
||||
stop(device_id);
|
||||
return;
|
||||
}
|
||||
try {
|
||||
haptic.vib.vibrate(VibrationEffect.createOneShot(length, vibeValue));
|
||||
}
|
||||
catch (Exception e) {
|
||||
// Fall back to the generic method, which uses DEFAULT_AMPLITUDE, but works even if
|
||||
// something went horribly wrong with the Android 8.0 APIs.
|
||||
haptic.vib.vibrate(length);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class SDLHapticHandler {
|
||||
|
||||
static class SDLHaptic {
|
||||
public int device_id;
|
||||
public String name;
|
||||
public Vibrator vib;
|
||||
}
|
||||
|
||||
private final ArrayList<SDLHaptic> mHaptics;
|
||||
|
||||
public SDLHapticHandler() {
|
||||
mHaptics = new ArrayList<SDLHaptic>();
|
||||
}
|
||||
|
||||
public void run(int device_id, float intensity, int length) {
|
||||
SDLHaptic haptic = getHaptic(device_id);
|
||||
if (haptic != null) {
|
||||
haptic.vib.vibrate(length);
|
||||
}
|
||||
}
|
||||
|
||||
public void stop(int device_id) {
|
||||
SDLHaptic haptic = getHaptic(device_id);
|
||||
if (haptic != null) {
|
||||
haptic.vib.cancel();
|
||||
}
|
||||
}
|
||||
|
||||
public void pollHapticDevices() {
|
||||
|
||||
final int deviceId_VIBRATOR_SERVICE = 999999;
|
||||
boolean hasVibratorService = false;
|
||||
|
||||
int[] deviceIds = InputDevice.getDeviceIds();
|
||||
// It helps processing the device ids in reverse order
|
||||
// For example, in the case of the XBox 360 wireless dongle,
|
||||
// so the first controller seen by SDL matches what the receiver
|
||||
// considers to be the first controller
|
||||
|
||||
for (int i = deviceIds.length - 1; i > -1; i--) {
|
||||
SDLHaptic haptic = getHaptic(deviceIds[i]);
|
||||
if (haptic == null) {
|
||||
InputDevice device = InputDevice.getDevice(deviceIds[i]);
|
||||
Vibrator vib = device.getVibrator();
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Check VIBRATOR_SERVICE */
|
||||
Vibrator vib = (Vibrator) SDL.getContext().getSystemService(Context.VIBRATOR_SERVICE);
|
||||
if (vib != null) {
|
||||
hasVibratorService = vib.hasVibrator();
|
||||
|
||||
if (hasVibratorService) {
|
||||
SDLHaptic haptic = getHaptic(deviceId_VIBRATOR_SERVICE);
|
||||
if (haptic == null) {
|
||||
haptic = new SDLHaptic();
|
||||
haptic.device_id = deviceId_VIBRATOR_SERVICE;
|
||||
haptic.name = "VIBRATOR_SERVICE";
|
||||
haptic.vib = vib;
|
||||
mHaptics.add(haptic);
|
||||
SDLControllerManager.nativeAddHaptic(haptic.device_id, haptic.name);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Check removed devices */
|
||||
ArrayList<Integer> removedDevices = null;
|
||||
for (SDLHaptic haptic : mHaptics) {
|
||||
int device_id = haptic.device_id;
|
||||
int i;
|
||||
for (i = 0; i < deviceIds.length; i++) {
|
||||
if (device_id == deviceIds[i]) break;
|
||||
}
|
||||
|
||||
if (device_id != deviceId_VIBRATOR_SERVICE || !hasVibratorService) {
|
||||
if (i == deviceIds.length) {
|
||||
if (removedDevices == null) {
|
||||
removedDevices = new ArrayList<Integer>();
|
||||
}
|
||||
removedDevices.add(device_id);
|
||||
}
|
||||
} // else: don't remove the vibrator if it is still present
|
||||
}
|
||||
|
||||
if (removedDevices != null) {
|
||||
for (int device_id : removedDevices) {
|
||||
SDLControllerManager.nativeRemoveHaptic(device_id);
|
||||
for (int i = 0; i < mHaptics.size(); i++) {
|
||||
if (mHaptics.get(i).device_id == device_id) {
|
||||
mHaptics.remove(i);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected SDLHaptic getHaptic(int device_id) {
|
||||
for (SDLHaptic haptic : mHaptics) {
|
||||
if (haptic.device_id == device_id) {
|
||||
return haptic;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
class SDLGenericMotionListener_API12 implements View.OnGenericMotionListener {
|
||||
// Generic Motion (mouse hover, joystick...) events go here
|
||||
@Override
|
||||
public boolean onGenericMotion(View v, MotionEvent event) {
|
||||
float x, y;
|
||||
int action;
|
||||
|
||||
switch ( event.getSource() ) {
|
||||
case InputDevice.SOURCE_JOYSTICK:
|
||||
return SDLControllerManager.handleJoystickMotionEvent(event);
|
||||
|
||||
case InputDevice.SOURCE_MOUSE:
|
||||
action = event.getActionMasked();
|
||||
switch (action) {
|
||||
case MotionEvent.ACTION_SCROLL:
|
||||
x = event.getAxisValue(MotionEvent.AXIS_HSCROLL, 0);
|
||||
y = event.getAxisValue(MotionEvent.AXIS_VSCROLL, 0);
|
||||
SDLActivity.onNativeMouse(0, action, x, y, false);
|
||||
return true;
|
||||
|
||||
case MotionEvent.ACTION_HOVER_MOVE:
|
||||
x = event.getX(0);
|
||||
y = event.getY(0);
|
||||
|
||||
SDLActivity.onNativeMouse(0, action, x, y, false);
|
||||
return true;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
// Event was not managed
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean supportsRelativeMouse() {
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean inRelativeMode() {
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean setRelativeMouseEnabled(boolean enabled) {
|
||||
return false;
|
||||
}
|
||||
|
||||
public void reclaimRelativeMouseModeIfNeeded()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public float getEventX(MotionEvent event) {
|
||||
return event.getX(0);
|
||||
}
|
||||
|
||||
public float getEventY(MotionEvent event) {
|
||||
return event.getY(0);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
class SDLGenericMotionListener_API24 extends SDLGenericMotionListener_API12 {
|
||||
// Generic Motion (mouse hover, joystick...) events go here
|
||||
|
||||
private boolean mRelativeModeEnabled;
|
||||
|
||||
@Override
|
||||
public boolean onGenericMotion(View v, MotionEvent event) {
|
||||
|
||||
// Handle relative mouse mode
|
||||
if (mRelativeModeEnabled) {
|
||||
if (event.getSource() == InputDevice.SOURCE_MOUSE) {
|
||||
int action = event.getActionMasked();
|
||||
if (action == MotionEvent.ACTION_HOVER_MOVE) {
|
||||
float x = event.getAxisValue(MotionEvent.AXIS_RELATIVE_X);
|
||||
float y = event.getAxisValue(MotionEvent.AXIS_RELATIVE_Y);
|
||||
SDLActivity.onNativeMouse(0, action, x, y, true);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Event was not managed, call SDLGenericMotionListener_API12 method
|
||||
return super.onGenericMotion(v, event);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsRelativeMouse() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean inRelativeMode() {
|
||||
return mRelativeModeEnabled;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean setRelativeMouseEnabled(boolean enabled) {
|
||||
mRelativeModeEnabled = enabled;
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public float getEventX(MotionEvent event) {
|
||||
if (mRelativeModeEnabled) {
|
||||
return event.getAxisValue(MotionEvent.AXIS_RELATIVE_X);
|
||||
} else {
|
||||
return event.getX(0);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public float getEventY(MotionEvent event) {
|
||||
if (mRelativeModeEnabled) {
|
||||
return event.getAxisValue(MotionEvent.AXIS_RELATIVE_Y);
|
||||
} else {
|
||||
return event.getY(0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class SDLGenericMotionListener_API26 extends SDLGenericMotionListener_API24 {
|
||||
// Generic Motion (mouse hover, joystick...) events go here
|
||||
private boolean mRelativeModeEnabled;
|
||||
|
||||
@Override
|
||||
public boolean onGenericMotion(View v, MotionEvent event) {
|
||||
float x, y;
|
||||
int action;
|
||||
|
||||
switch ( event.getSource() ) {
|
||||
case InputDevice.SOURCE_JOYSTICK:
|
||||
return SDLControllerManager.handleJoystickMotionEvent(event);
|
||||
|
||||
case InputDevice.SOURCE_MOUSE:
|
||||
// DeX desktop mouse cursor is a separate non-standard input type.
|
||||
case InputDevice.SOURCE_MOUSE | InputDevice.SOURCE_TOUCHSCREEN:
|
||||
action = event.getActionMasked();
|
||||
switch (action) {
|
||||
case MotionEvent.ACTION_SCROLL:
|
||||
x = event.getAxisValue(MotionEvent.AXIS_HSCROLL, 0);
|
||||
y = event.getAxisValue(MotionEvent.AXIS_VSCROLL, 0);
|
||||
SDLActivity.onNativeMouse(0, action, x, y, false);
|
||||
return true;
|
||||
|
||||
case MotionEvent.ACTION_HOVER_MOVE:
|
||||
x = event.getX(0);
|
||||
y = event.getY(0);
|
||||
SDLActivity.onNativeMouse(0, action, x, y, false);
|
||||
return true;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
||||
case InputDevice.SOURCE_MOUSE_RELATIVE:
|
||||
action = event.getActionMasked();
|
||||
switch (action) {
|
||||
case MotionEvent.ACTION_SCROLL:
|
||||
x = event.getAxisValue(MotionEvent.AXIS_HSCROLL, 0);
|
||||
y = event.getAxisValue(MotionEvent.AXIS_VSCROLL, 0);
|
||||
SDLActivity.onNativeMouse(0, action, x, y, false);
|
||||
return true;
|
||||
|
||||
case MotionEvent.ACTION_HOVER_MOVE:
|
||||
x = event.getX(0);
|
||||
y = event.getY(0);
|
||||
SDLActivity.onNativeMouse(0, action, x, y, true);
|
||||
return true;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
// Event was not managed
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsRelativeMouse() {
|
||||
return (!SDLActivity.isDeXMode() || Build.VERSION.SDK_INT >= 27 /* Android 8.1 (O_MR1) */);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean inRelativeMode() {
|
||||
return mRelativeModeEnabled;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean setRelativeMouseEnabled(boolean enabled) {
|
||||
if (!SDLActivity.isDeXMode() || Build.VERSION.SDK_INT >= 27 /* Android 8.1 (O_MR1) */) {
|
||||
if (enabled) {
|
||||
SDLActivity.getContentView().requestPointerCapture();
|
||||
} else {
|
||||
SDLActivity.getContentView().releasePointerCapture();
|
||||
}
|
||||
mRelativeModeEnabled = enabled;
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void reclaimRelativeMouseModeIfNeeded()
|
||||
{
|
||||
if (mRelativeModeEnabled && !SDLActivity.isDeXMode()) {
|
||||
SDLActivity.getContentView().requestPointerCapture();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public float getEventX(MotionEvent event) {
|
||||
// Relative mouse in capture mode will only have relative for X/Y
|
||||
return event.getX(0);
|
||||
}
|
||||
|
||||
@Override
|
||||
public float getEventY(MotionEvent event) {
|
||||
// Relative mouse in capture mode will only have relative for X/Y
|
||||
return event.getY(0);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,405 @@
|
||||
package org.libsdl.app;
|
||||
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.pm.ActivityInfo;
|
||||
import android.hardware.Sensor;
|
||||
import android.hardware.SensorEvent;
|
||||
import android.hardware.SensorEventListener;
|
||||
import android.hardware.SensorManager;
|
||||
import android.os.Build;
|
||||
import android.util.DisplayMetrics;
|
||||
import android.util.Log;
|
||||
import android.view.Display;
|
||||
import android.view.InputDevice;
|
||||
import android.view.KeyEvent;
|
||||
import android.view.MotionEvent;
|
||||
import android.view.Surface;
|
||||
import android.view.SurfaceHolder;
|
||||
import android.view.SurfaceView;
|
||||
import android.view.View;
|
||||
import android.view.WindowManager;
|
||||
|
||||
|
||||
/**
|
||||
SDLSurface. This is what we draw on, so we need to know when it's created
|
||||
in order to do anything useful.
|
||||
|
||||
Because of this, that's where we set up the SDL thread
|
||||
*/
|
||||
public class SDLSurface extends SurfaceView implements SurfaceHolder.Callback,
|
||||
View.OnKeyListener, View.OnTouchListener, SensorEventListener {
|
||||
|
||||
// Sensors
|
||||
protected SensorManager mSensorManager;
|
||||
protected Display mDisplay;
|
||||
|
||||
// Keep track of the surface size to normalize touch events
|
||||
protected float mWidth, mHeight;
|
||||
|
||||
// Is SurfaceView ready for rendering
|
||||
public boolean mIsSurfaceReady;
|
||||
|
||||
// Startup
|
||||
public SDLSurface(Context context) {
|
||||
super(context);
|
||||
getHolder().addCallback(this);
|
||||
|
||||
setFocusable(true);
|
||||
setFocusableInTouchMode(true);
|
||||
requestFocus();
|
||||
setOnKeyListener(this);
|
||||
setOnTouchListener(this);
|
||||
|
||||
mDisplay = ((WindowManager)context.getSystemService(Context.WINDOW_SERVICE)).getDefaultDisplay();
|
||||
mSensorManager = (SensorManager)context.getSystemService(Context.SENSOR_SERVICE);
|
||||
|
||||
setOnGenericMotionListener(SDLActivity.getMotionListener());
|
||||
|
||||
// Some arbitrary defaults to avoid a potential division by zero
|
||||
mWidth = 1.0f;
|
||||
mHeight = 1.0f;
|
||||
|
||||
mIsSurfaceReady = false;
|
||||
}
|
||||
|
||||
public void handlePause() {
|
||||
enableSensor(Sensor.TYPE_ACCELEROMETER, false);
|
||||
}
|
||||
|
||||
public void handleResume() {
|
||||
setFocusable(true);
|
||||
setFocusableInTouchMode(true);
|
||||
requestFocus();
|
||||
setOnKeyListener(this);
|
||||
setOnTouchListener(this);
|
||||
enableSensor(Sensor.TYPE_ACCELEROMETER, true);
|
||||
}
|
||||
|
||||
public Surface getNativeSurface() {
|
||||
return getHolder().getSurface();
|
||||
}
|
||||
|
||||
// Called when we have a valid drawing surface
|
||||
@Override
|
||||
public void surfaceCreated(SurfaceHolder holder) {
|
||||
Log.v("SDL", "surfaceCreated()");
|
||||
SDLActivity.onNativeSurfaceCreated();
|
||||
}
|
||||
|
||||
// Called when we lose the surface
|
||||
@Override
|
||||
public void surfaceDestroyed(SurfaceHolder holder) {
|
||||
Log.v("SDL", "surfaceDestroyed()");
|
||||
|
||||
// Transition to pause, if needed
|
||||
SDLActivity.mNextNativeState = SDLActivity.NativeState.PAUSED;
|
||||
SDLActivity.handleNativeState();
|
||||
|
||||
mIsSurfaceReady = false;
|
||||
SDLActivity.onNativeSurfaceDestroyed();
|
||||
}
|
||||
|
||||
// Called when the surface is resized
|
||||
@Override
|
||||
public void surfaceChanged(SurfaceHolder holder,
|
||||
int format, int width, int height) {
|
||||
Log.v("SDL", "surfaceChanged()");
|
||||
|
||||
if (SDLActivity.mSingleton == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
mWidth = width;
|
||||
mHeight = height;
|
||||
int nDeviceWidth = width;
|
||||
int nDeviceHeight = height;
|
||||
try
|
||||
{
|
||||
if (Build.VERSION.SDK_INT >= 17 /* Android 4.2 (JELLY_BEAN_MR1) */) {
|
||||
DisplayMetrics realMetrics = new DisplayMetrics();
|
||||
mDisplay.getRealMetrics( realMetrics );
|
||||
nDeviceWidth = realMetrics.widthPixels;
|
||||
nDeviceHeight = realMetrics.heightPixels;
|
||||
}
|
||||
} catch(Exception ignored) {
|
||||
}
|
||||
|
||||
synchronized(SDLActivity.getContext()) {
|
||||
// In case we're waiting on a size change after going fullscreen, send a notification.
|
||||
SDLActivity.getContext().notifyAll();
|
||||
}
|
||||
|
||||
Log.v("SDL", "Window size: " + width + "x" + height);
|
||||
Log.v("SDL", "Device size: " + nDeviceWidth + "x" + nDeviceHeight);
|
||||
SDLActivity.nativeSetScreenResolution(width, height, nDeviceWidth, nDeviceHeight, mDisplay.getRefreshRate());
|
||||
SDLActivity.onNativeResize();
|
||||
|
||||
// Prevent a screen distortion glitch,
|
||||
// for instance when the device is in Landscape and a Portrait App is resumed.
|
||||
boolean skip = false;
|
||||
int requestedOrientation = SDLActivity.mSingleton.getRequestedOrientation();
|
||||
|
||||
if (requestedOrientation == ActivityInfo.SCREEN_ORIENTATION_PORTRAIT || requestedOrientation == ActivityInfo.SCREEN_ORIENTATION_SENSOR_PORTRAIT) {
|
||||
if (mWidth > mHeight) {
|
||||
skip = true;
|
||||
}
|
||||
} else if (requestedOrientation == ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE || requestedOrientation == ActivityInfo.SCREEN_ORIENTATION_SENSOR_LANDSCAPE) {
|
||||
if (mWidth < mHeight) {
|
||||
skip = true;
|
||||
}
|
||||
}
|
||||
|
||||
// Special Patch for Square Resolution: Black Berry Passport
|
||||
if (skip) {
|
||||
double min = Math.min(mWidth, mHeight);
|
||||
double max = Math.max(mWidth, mHeight);
|
||||
|
||||
if (max / min < 1.20) {
|
||||
Log.v("SDL", "Don't skip on such aspect-ratio. Could be a square resolution.");
|
||||
skip = false;
|
||||
}
|
||||
}
|
||||
|
||||
// Don't skip in MultiWindow.
|
||||
if (skip) {
|
||||
if (Build.VERSION.SDK_INT >= 24 /* Android 7.0 (N) */) {
|
||||
if (SDLActivity.mSingleton.isInMultiWindowMode()) {
|
||||
Log.v("SDL", "Don't skip in Multi-Window");
|
||||
skip = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (skip) {
|
||||
Log.v("SDL", "Skip .. Surface is not ready.");
|
||||
mIsSurfaceReady = false;
|
||||
return;
|
||||
}
|
||||
|
||||
/* If the surface has been previously destroyed by onNativeSurfaceDestroyed, recreate it here */
|
||||
SDLActivity.onNativeSurfaceChanged();
|
||||
|
||||
/* Surface is ready */
|
||||
mIsSurfaceReady = true;
|
||||
|
||||
SDLActivity.mNextNativeState = SDLActivity.NativeState.RESUMED;
|
||||
SDLActivity.handleNativeState();
|
||||
}
|
||||
|
||||
// Key events
|
||||
@Override
|
||||
public boolean onKey(View v, int keyCode, KeyEvent event) {
|
||||
return SDLActivity.handleKeyEvent(v, keyCode, event, null);
|
||||
}
|
||||
|
||||
// Touch events
|
||||
@Override
|
||||
public boolean onTouch(View v, MotionEvent event) {
|
||||
/* Ref: http://developer.android.com/training/gestures/multi.html */
|
||||
int touchDevId = event.getDeviceId();
|
||||
final int pointerCount = event.getPointerCount();
|
||||
int action = event.getActionMasked();
|
||||
int pointerFingerId;
|
||||
int i = -1;
|
||||
float x,y,p;
|
||||
|
||||
/*
|
||||
* Prevent id to be -1, since it's used in SDL internal for synthetic events
|
||||
* Appears when using Android emulator, eg:
|
||||
* adb shell input mouse tap 100 100
|
||||
* adb shell input touchscreen tap 100 100
|
||||
*/
|
||||
if (touchDevId < 0) {
|
||||
touchDevId -= 1;
|
||||
}
|
||||
|
||||
// 12290 = Samsung DeX mode desktop mouse
|
||||
// 12290 = 0x3002 = 0x2002 | 0x1002 = SOURCE_MOUSE | SOURCE_TOUCHSCREEN
|
||||
// 0x2 = SOURCE_CLASS_POINTER
|
||||
if (event.getSource() == InputDevice.SOURCE_MOUSE || event.getSource() == (InputDevice.SOURCE_MOUSE | InputDevice.SOURCE_TOUCHSCREEN)) {
|
||||
int mouseButton = 1;
|
||||
try {
|
||||
Object object = event.getClass().getMethod("getButtonState").invoke(event);
|
||||
if (object != null) {
|
||||
mouseButton = (Integer) object;
|
||||
}
|
||||
} catch(Exception ignored) {
|
||||
}
|
||||
|
||||
// We need to check if we're in relative mouse mode and get the axis offset rather than the x/y values
|
||||
// if we are. We'll leverage our existing mouse motion listener
|
||||
SDLGenericMotionListener_API12 motionListener = SDLActivity.getMotionListener();
|
||||
x = motionListener.getEventX(event);
|
||||
y = motionListener.getEventY(event);
|
||||
|
||||
SDLActivity.onNativeMouse(mouseButton, action, x, y, motionListener.inRelativeMode());
|
||||
} else {
|
||||
switch(action) {
|
||||
case MotionEvent.ACTION_MOVE:
|
||||
for (i = 0; i < pointerCount; i++) {
|
||||
pointerFingerId = event.getPointerId(i);
|
||||
x = event.getX(i) / mWidth;
|
||||
y = event.getY(i) / mHeight;
|
||||
p = event.getPressure(i);
|
||||
if (p > 1.0f) {
|
||||
// may be larger than 1.0f on some devices
|
||||
// see the documentation of getPressure(i)
|
||||
p = 1.0f;
|
||||
}
|
||||
SDLActivity.onNativeTouch(touchDevId, pointerFingerId, action, x, y, p);
|
||||
}
|
||||
break;
|
||||
|
||||
case MotionEvent.ACTION_UP:
|
||||
case MotionEvent.ACTION_DOWN:
|
||||
// Primary pointer up/down, the index is always zero
|
||||
i = 0;
|
||||
/* fallthrough */
|
||||
case MotionEvent.ACTION_POINTER_UP:
|
||||
case MotionEvent.ACTION_POINTER_DOWN:
|
||||
// Non primary pointer up/down
|
||||
if (i == -1) {
|
||||
i = event.getActionIndex();
|
||||
}
|
||||
|
||||
pointerFingerId = event.getPointerId(i);
|
||||
x = event.getX(i) / mWidth;
|
||||
y = event.getY(i) / mHeight;
|
||||
p = event.getPressure(i);
|
||||
if (p > 1.0f) {
|
||||
// may be larger than 1.0f on some devices
|
||||
// see the documentation of getPressure(i)
|
||||
p = 1.0f;
|
||||
}
|
||||
SDLActivity.onNativeTouch(touchDevId, pointerFingerId, action, x, y, p);
|
||||
break;
|
||||
|
||||
case MotionEvent.ACTION_CANCEL:
|
||||
for (i = 0; i < pointerCount; i++) {
|
||||
pointerFingerId = event.getPointerId(i);
|
||||
x = event.getX(i) / mWidth;
|
||||
y = event.getY(i) / mHeight;
|
||||
p = event.getPressure(i);
|
||||
if (p > 1.0f) {
|
||||
// may be larger than 1.0f on some devices
|
||||
// see the documentation of getPressure(i)
|
||||
p = 1.0f;
|
||||
}
|
||||
SDLActivity.onNativeTouch(touchDevId, pointerFingerId, MotionEvent.ACTION_UP, x, y, p);
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// Sensor events
|
||||
public void enableSensor(int sensortype, boolean enabled) {
|
||||
// TODO: This uses getDefaultSensor - what if we have >1 accels?
|
||||
if (enabled) {
|
||||
mSensorManager.registerListener(this,
|
||||
mSensorManager.getDefaultSensor(sensortype),
|
||||
SensorManager.SENSOR_DELAY_GAME, null);
|
||||
} else {
|
||||
mSensorManager.unregisterListener(this,
|
||||
mSensorManager.getDefaultSensor(sensortype));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAccuracyChanged(Sensor sensor, int accuracy) {
|
||||
// TODO
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onSensorChanged(SensorEvent event) {
|
||||
if (event.sensor.getType() == Sensor.TYPE_ACCELEROMETER) {
|
||||
|
||||
// Since we may have an orientation set, we won't receive onConfigurationChanged events.
|
||||
// We thus should check here.
|
||||
int newOrientation;
|
||||
|
||||
float x, y;
|
||||
switch (mDisplay.getRotation()) {
|
||||
case Surface.ROTATION_90:
|
||||
x = -event.values[1];
|
||||
y = event.values[0];
|
||||
newOrientation = SDLActivity.SDL_ORIENTATION_LANDSCAPE;
|
||||
break;
|
||||
case Surface.ROTATION_270:
|
||||
x = event.values[1];
|
||||
y = -event.values[0];
|
||||
newOrientation = SDLActivity.SDL_ORIENTATION_LANDSCAPE_FLIPPED;
|
||||
break;
|
||||
case Surface.ROTATION_180:
|
||||
x = -event.values[0];
|
||||
y = -event.values[1];
|
||||
newOrientation = SDLActivity.SDL_ORIENTATION_PORTRAIT_FLIPPED;
|
||||
break;
|
||||
case Surface.ROTATION_0:
|
||||
default:
|
||||
x = event.values[0];
|
||||
y = event.values[1];
|
||||
newOrientation = SDLActivity.SDL_ORIENTATION_PORTRAIT;
|
||||
break;
|
||||
}
|
||||
|
||||
if (newOrientation != SDLActivity.mCurrentOrientation) {
|
||||
SDLActivity.mCurrentOrientation = newOrientation;
|
||||
SDLActivity.onNativeOrientationChanged(newOrientation);
|
||||
}
|
||||
|
||||
SDLActivity.onNativeAccel(-x / SensorManager.GRAVITY_EARTH,
|
||||
y / SensorManager.GRAVITY_EARTH,
|
||||
event.values[2] / SensorManager.GRAVITY_EARTH);
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
// Captured pointer events for API 26.
|
||||
public boolean onCapturedPointerEvent(MotionEvent event)
|
||||
{
|
||||
int action = event.getActionMasked();
|
||||
|
||||
float x, y;
|
||||
switch (action) {
|
||||
case MotionEvent.ACTION_SCROLL:
|
||||
x = event.getAxisValue(MotionEvent.AXIS_HSCROLL, 0);
|
||||
y = event.getAxisValue(MotionEvent.AXIS_VSCROLL, 0);
|
||||
SDLActivity.onNativeMouse(0, action, x, y, false);
|
||||
return true;
|
||||
|
||||
case MotionEvent.ACTION_HOVER_MOVE:
|
||||
case MotionEvent.ACTION_MOVE:
|
||||
x = event.getX(0);
|
||||
y = event.getY(0);
|
||||
SDLActivity.onNativeMouse(0, action, x, y, true);
|
||||
return true;
|
||||
|
||||
case MotionEvent.ACTION_BUTTON_PRESS:
|
||||
case MotionEvent.ACTION_BUTTON_RELEASE:
|
||||
|
||||
// Change our action value to what SDL's code expects.
|
||||
if (action == MotionEvent.ACTION_BUTTON_PRESS) {
|
||||
action = MotionEvent.ACTION_DOWN;
|
||||
} else { /* MotionEvent.ACTION_BUTTON_RELEASE */
|
||||
action = MotionEvent.ACTION_UP;
|
||||
}
|
||||
|
||||
x = event.getX(0);
|
||||
y = event.getY(0);
|
||||
int button = event.getButtonState();
|
||||
|
||||
SDLActivity.onNativeMouse(button, action, x, y, true);
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
<vector android:height="98dp" android:viewportHeight="294"
|
||||
android:viewportWidth="294" android:width="98dp" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<path android:fillColor="#39c64c"
|
||||
android:pathData="M56,111a91,84 0,1 0,182 0a91,84 0,1 0,-182 0z"
|
||||
android:strokeColor="#FFF" android:strokeWidth="14.4"/>
|
||||
<path android:fillColor="#39c64c"
|
||||
android:pathData="M78,90L216,90A22,22 0,0 1,238 112L238,250A22,22 0,0 1,216 272L78,272A22,22 0,0 1,56 250L56,112A22,22 0,0 1,78 90z"
|
||||
android:strokeColor="#FFF" android:strokeWidth="14.4"/>
|
||||
<path android:fillColor="#39c64c"
|
||||
android:pathData="M87.377,4.721L87.377,4.721A6.5,6.5 106.754,0 0,84.843 13.558L120.234,77.405A6.5,6.5 114.852,0 0,129.07 79.939L129.07,79.939A6.5,6.5 114.852,0 0,131.604 71.102L96.213,7.255A6.5,6.5 106.754,0 0,87.377 4.721z"
|
||||
android:strokeColor="#FFF" android:strokeWidth="7.2"/>
|
||||
<path android:fillColor="#39c64c"
|
||||
android:pathData="M266,111L266,111A24,24 0,0 0,242 135L242,167A24,24 0,0 0,266 191L266,191A24,24 0,0 0,290 167L290,135A24,24 0,0 0,266 111z"
|
||||
android:strokeColor="#FFF" android:strokeWidth="7.2"/>
|
||||
<path android:fillColor="#39c64c"
|
||||
android:pathData="M206.623,4.721L206.623,4.721A6.5,6.5 118.209,0 1,209.157 13.558L173.766,77.405A6.5,6.5 87.387,0 1,164.93 79.939L164.93,79.939A6.5,6.5 87.387,0 1,162.396 71.102L197.787,7.255A6.5,6.5 118.209,0 1,206.623 4.721z"
|
||||
android:strokeColor="#FFF" android:strokeWidth="7.2"/>
|
||||
<path android:fillColor="#39c64c"
|
||||
android:pathData="M28,111L28,111A24,24 0,0 1,52 135L52,167A24,24 0,0 1,28 191L28,191A24,24 0,0 1,4 167L4,135A24,24 0,0 1,28 111z"
|
||||
android:strokeColor="#FFF" android:strokeWidth="7.2"/>
|
||||
<path android:fillColor="#39c64c" android:pathData="M56,111a91,84 0,1 0,182 0a91,84 0,1 0,-182 0z"/>
|
||||
<path android:fillColor="#39c64c" android:pathData="M78,90L216,90A22,22 0,0 1,238 112L238,250A22,22 0,0 1,216 272L78,272A22,22 0,0 1,56 250L56,112A22,22 0,0 1,78 90z"/>
|
||||
<path android:fillColor="#000"
|
||||
android:pathData="M127,140a20,25 0,1 0,40 0a20,25 0,1 0,-40 0z"
|
||||
android:strokeColor="#000" android:strokeWidth="7.2"/>
|
||||
<path android:fillColor="#000"
|
||||
android:pathData="M163.493,89.441a25,20 61,1 0,34.985 -19.392a25,20 61,1 0,-34.985 19.392z"
|
||||
android:strokeColor="#000" android:strokeWidth="7.2"/>
|
||||
<path android:fillColor="#000"
|
||||
android:pathData="M130.507,89.441a25,20 119,1 1,-34.985 -19.392a25,20 119,1 1,34.985 19.392z"
|
||||
android:strokeColor="#000" android:strokeWidth="7.2"/>
|
||||
</vector>
|
||||
@@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
<TextView android:id="@+id/license_text"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="20dp" />
|
||||
</ScrollView>
|
||||
@@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:orientation="vertical"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent">
|
||||
<ListView android:id="@+id/list"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent" />
|
||||
</LinearLayout>
|
||||
@@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:orientation="vertical"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
<ListView android:id="@+id/list"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
</LinearLayout>
|
||||
@@ -0,0 +1,19 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:orientation="horizontal"
|
||||
android:padding="16dp"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<ProgressBar
|
||||
android:layout_marginEnd="8dp"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/text"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:textSize="16sp"/>
|
||||
</LinearLayout>
|
||||
@@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<menu xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item
|
||||
android:id="@+id/export_savedata"
|
||||
android:title="@string/action_export_save_data" />
|
||||
<item
|
||||
android:id="@+id/import_savedata"
|
||||
android:title="@string/action_import_save_data" />
|
||||
<item
|
||||
android:id="@+id/licenses"
|
||||
android:title="@string/action_licenses" />
|
||||
</menu>
|
||||
@@ -0,0 +1,22 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<string name="app_name">xsystem35</string>
|
||||
<string name="action_export_save_data">セーブデータをエクスポート</string>
|
||||
<string name="action_import_save_data">セーブデータをインポート</string>
|
||||
<string name="action_licenses">オープンソースライセンス</string>
|
||||
<string name="cancel">キャンセル</string>
|
||||
<string name="cannot_find_ald">System 3.x のファイル (*.ald) が見つかりません。</string>
|
||||
<string name="choose_a_file">ファイルを選択</string>
|
||||
<string name="error_dialog_title">エラー</string>
|
||||
<string name="install_dialog_title">インストール中…</string>
|
||||
<string name="install_from_zip">ZIP からインストール</string>
|
||||
<string name="install_progress">%s を展開中</string>
|
||||
<string name="no_data_to_import">ZIP アーカイブ中に save/ フォルダが見つかりません。</string>
|
||||
<string name="save_data_export_error">セーブデータのエクスポートに失敗しました。</string>
|
||||
<string name="save_data_export_success">エクスポートに成功しました。</string>
|
||||
<string name="save_data_import_success">インポートに成功しました。</string>
|
||||
<string name="uninstall_dialog_message">「%s」をアンインストールしますか?</string>
|
||||
<string name="uninstall_dialog_title">確認</string>
|
||||
<string name="unsupported_zip">この形式の ZIP はサポートしていません。</string>
|
||||
<string name="zip_extraction_error">ZIP の展開に失敗しました。</string>
|
||||
</resources>
|
||||
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<color name="colorPrimary">#3F51B5</color>
|
||||
<color name="colorPrimaryDark">#303F9F</color>
|
||||
<color name="colorAccent">#FF4081</color>
|
||||
</resources>
|
||||
@@ -0,0 +1,22 @@
|
||||
<resources>
|
||||
<string name="app_name">xsystem35</string>
|
||||
<string name="action_export_save_data">Export Save Files</string>
|
||||
<string name="action_import_save_data">Import Save Files</string>
|
||||
<string name="action_licenses">Open source licenses</string>
|
||||
<string name="cancel">Cancel</string>
|
||||
<string name="cannot_find_ald">Cannot find System 3.x game files (*.ald).</string>
|
||||
<string name="choose_a_file">Choose a file</string>
|
||||
<string name="error_dialog_title">Error</string>
|
||||
<string name="install_dialog_title">Installing…</string>
|
||||
<string name="install_from_zip">Install from ZIP</string>
|
||||
<string name="install_progress">Extracting %s</string>
|
||||
<string name="no_data_to_import">No save/ folder in the ZIP archive.</string>
|
||||
<string name="ok">OK</string>
|
||||
<string name="save_data_export_error">Failed to export save files.</string>
|
||||
<string name="save_data_import_success">Imported successfully.</string>
|
||||
<string name="save_data_export_success">Exported successfully.</string>
|
||||
<string name="uninstall_dialog_message">Uninstall \"%s\"?</string>
|
||||
<string name="uninstall_dialog_title">Confirm</string>
|
||||
<string name="unsupported_zip">This type of ZIP is not supported.</string>
|
||||
<string name="zip_extraction_error">Failed to extract ZIP.</string>
|
||||
</resources>
|
||||
@@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<!-- Base application theme. -->
|
||||
<style name="AppTheme" parent="android:Theme.NoTitleBar.Fullscreen">
|
||||
<!-- Customize your theme here. -->
|
||||
</style>
|
||||
</resources>
|
||||
@@ -0,0 +1,27 @@
|
||||
// Top-level build file where you can add configuration options common to all sub-projects/modules.
|
||||
|
||||
buildscript {
|
||||
ext.kotlin_version = '1.7.21'
|
||||
repositories {
|
||||
mavenCentral()
|
||||
google()
|
||||
}
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:8.1.1'
|
||||
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
||||
|
||||
// NOTE: Do not place your application dependencies here; they belong
|
||||
// in the individual module build.gradle files
|
||||
}
|
||||
}
|
||||
|
||||
allprojects {
|
||||
repositories {
|
||||
mavenCentral()
|
||||
google()
|
||||
}
|
||||
}
|
||||
|
||||
task clean(type: Delete) {
|
||||
delete rootProject.buildDir
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
# Project-wide Gradle settings.
|
||||
|
||||
# IDE (e.g. Android Studio) users:
|
||||
# Gradle settings configured through the IDE *will override*
|
||||
# any settings specified in this file.
|
||||
|
||||
# For more details on how to configure your build environment visit
|
||||
# http://www.gradle.org/docs/current/userguide/build_environment.html
|
||||
|
||||
# Specifies the JVM arguments used for the daemon process.
|
||||
# The setting is particularly useful for tweaking memory settings.
|
||||
org.gradle.jvmargs=-Xmx1536m
|
||||
|
||||
# When configured, Gradle will run in incubating parallel mode.
|
||||
# This option should only be used with decoupled projects. More details, visit
|
||||
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
|
||||
# org.gradle.parallel=true
|
||||
BIN
Binary file not shown.
@@ -0,0 +1,6 @@
|
||||
#Thu Nov 11 18:20:34 PST 2021
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.1.1-bin.zip
|
||||
distributionPath=wrapper/dists
|
||||
zipStorePath=wrapper/dists
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
+160
@@ -0,0 +1,160 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
##############################################################################
|
||||
##
|
||||
## Gradle start up script for UN*X
|
||||
##
|
||||
##############################################################################
|
||||
|
||||
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||
DEFAULT_JVM_OPTS=""
|
||||
|
||||
APP_NAME="Gradle"
|
||||
APP_BASE_NAME=`basename "$0"`
|
||||
|
||||
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
||||
MAX_FD="maximum"
|
||||
|
||||
warn ( ) {
|
||||
echo "$*"
|
||||
}
|
||||
|
||||
die ( ) {
|
||||
echo
|
||||
echo "$*"
|
||||
echo
|
||||
exit 1
|
||||
}
|
||||
|
||||
# OS specific support (must be 'true' or 'false').
|
||||
cygwin=false
|
||||
msys=false
|
||||
darwin=false
|
||||
case "`uname`" in
|
||||
CYGWIN* )
|
||||
cygwin=true
|
||||
;;
|
||||
Darwin* )
|
||||
darwin=true
|
||||
;;
|
||||
MINGW* )
|
||||
msys=true
|
||||
;;
|
||||
esac
|
||||
|
||||
# Attempt to set APP_HOME
|
||||
# Resolve links: $0 may be a link
|
||||
PRG="$0"
|
||||
# Need this for relative symlinks.
|
||||
while [ -h "$PRG" ] ; do
|
||||
ls=`ls -ld "$PRG"`
|
||||
link=`expr "$ls" : '.*-> \(.*\)$'`
|
||||
if expr "$link" : '/.*' > /dev/null; then
|
||||
PRG="$link"
|
||||
else
|
||||
PRG=`dirname "$PRG"`"/$link"
|
||||
fi
|
||||
done
|
||||
SAVED="`pwd`"
|
||||
cd "`dirname \"$PRG\"`/" >/dev/null
|
||||
APP_HOME="`pwd -P`"
|
||||
cd "$SAVED" >/dev/null
|
||||
|
||||
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
|
||||
|
||||
# Determine the Java command to use to start the JVM.
|
||||
if [ -n "$JAVA_HOME" ] ; then
|
||||
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
|
||||
# IBM's JDK on AIX uses strange locations for the executables
|
||||
JAVACMD="$JAVA_HOME/jre/sh/java"
|
||||
else
|
||||
JAVACMD="$JAVA_HOME/bin/java"
|
||||
fi
|
||||
if [ ! -x "$JAVACMD" ] ; then
|
||||
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
|
||||
|
||||
Please set the JAVA_HOME variable in your environment to match the
|
||||
location of your Java installation."
|
||||
fi
|
||||
else
|
||||
JAVACMD="java"
|
||||
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||
|
||||
Please set the JAVA_HOME variable in your environment to match the
|
||||
location of your Java installation."
|
||||
fi
|
||||
|
||||
# Increase the maximum file descriptors if we can.
|
||||
if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
|
||||
MAX_FD_LIMIT=`ulimit -H -n`
|
||||
if [ $? -eq 0 ] ; then
|
||||
if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
|
||||
MAX_FD="$MAX_FD_LIMIT"
|
||||
fi
|
||||
ulimit -n $MAX_FD
|
||||
if [ $? -ne 0 ] ; then
|
||||
warn "Could not set maximum file descriptor limit: $MAX_FD"
|
||||
fi
|
||||
else
|
||||
warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
|
||||
fi
|
||||
fi
|
||||
|
||||
# For Darwin, add options to specify how the application appears in the dock
|
||||
if $darwin; then
|
||||
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
|
||||
fi
|
||||
|
||||
# For Cygwin, switch paths to Windows format before running java
|
||||
if $cygwin ; then
|
||||
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
|
||||
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
|
||||
JAVACMD=`cygpath --unix "$JAVACMD"`
|
||||
|
||||
# We build the pattern for arguments to be converted via cygpath
|
||||
ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
|
||||
SEP=""
|
||||
for dir in $ROOTDIRSRAW ; do
|
||||
ROOTDIRS="$ROOTDIRS$SEP$dir"
|
||||
SEP="|"
|
||||
done
|
||||
OURCYGPATTERN="(^($ROOTDIRS))"
|
||||
# Add a user-defined pattern to the cygpath arguments
|
||||
if [ "$GRADLE_CYGPATTERN" != "" ] ; then
|
||||
OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
|
||||
fi
|
||||
# Now convert the arguments - kludge to limit ourselves to /bin/sh
|
||||
i=0
|
||||
for arg in "$@" ; do
|
||||
CHECK=`echo "$arg"|grep -E -c "$OURCYGPATTERN" -`
|
||||
CHECK2=`echo "$arg"|grep -E -c "^-"` ### Determine if an option
|
||||
|
||||
if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
|
||||
eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
|
||||
else
|
||||
eval `echo args$i`="\"$arg\""
|
||||
fi
|
||||
i=$((i+1))
|
||||
done
|
||||
case $i in
|
||||
(0) set -- ;;
|
||||
(1) set -- "$args0" ;;
|
||||
(2) set -- "$args0" "$args1" ;;
|
||||
(3) set -- "$args0" "$args1" "$args2" ;;
|
||||
(4) set -- "$args0" "$args1" "$args2" "$args3" ;;
|
||||
(5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
|
||||
(6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
|
||||
(7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
|
||||
(8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
|
||||
(9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
|
||||
esac
|
||||
fi
|
||||
|
||||
# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
|
||||
function splitJvmOpts() {
|
||||
JVM_OPTS=("$@")
|
||||
}
|
||||
eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
|
||||
JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
|
||||
|
||||
exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
|
||||
Vendored
+90
@@ -0,0 +1,90 @@
|
||||
@if "%DEBUG%" == "" @echo off
|
||||
@rem ##########################################################################
|
||||
@rem
|
||||
@rem Gradle startup script for Windows
|
||||
@rem
|
||||
@rem ##########################################################################
|
||||
|
||||
@rem Set local scope for the variables with windows NT shell
|
||||
if "%OS%"=="Windows_NT" setlocal
|
||||
|
||||
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||
set DEFAULT_JVM_OPTS=
|
||||
|
||||
set DIRNAME=%~dp0
|
||||
if "%DIRNAME%" == "" set DIRNAME=.
|
||||
set APP_BASE_NAME=%~n0
|
||||
set APP_HOME=%DIRNAME%
|
||||
|
||||
@rem Find java.exe
|
||||
if defined JAVA_HOME goto findJavaFromJavaHome
|
||||
|
||||
set JAVA_EXE=java.exe
|
||||
%JAVA_EXE% -version >NUL 2>&1
|
||||
if "%ERRORLEVEL%" == "0" goto init
|
||||
|
||||
echo.
|
||||
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||
echo.
|
||||
echo Please set the JAVA_HOME variable in your environment to match the
|
||||
echo location of your Java installation.
|
||||
|
||||
goto fail
|
||||
|
||||
:findJavaFromJavaHome
|
||||
set JAVA_HOME=%JAVA_HOME:"=%
|
||||
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
|
||||
|
||||
if exist "%JAVA_EXE%" goto init
|
||||
|
||||
echo.
|
||||
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
|
||||
echo.
|
||||
echo Please set the JAVA_HOME variable in your environment to match the
|
||||
echo location of your Java installation.
|
||||
|
||||
goto fail
|
||||
|
||||
:init
|
||||
@rem Get command-line arguments, handling Windowz variants
|
||||
|
||||
if not "%OS%" == "Windows_NT" goto win9xME_args
|
||||
if "%@eval[2+2]" == "4" goto 4NT_args
|
||||
|
||||
:win9xME_args
|
||||
@rem Slurp the command line arguments.
|
||||
set CMD_LINE_ARGS=
|
||||
set _SKIP=2
|
||||
|
||||
:win9xME_args_slurp
|
||||
if "x%~1" == "x" goto execute
|
||||
|
||||
set CMD_LINE_ARGS=%*
|
||||
goto execute
|
||||
|
||||
:4NT_args
|
||||
@rem Get arguments from the 4NT Shell from JP Software
|
||||
set CMD_LINE_ARGS=%$
|
||||
|
||||
:execute
|
||||
@rem Setup the command line
|
||||
|
||||
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
|
||||
|
||||
@rem Execute Gradle
|
||||
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
|
||||
|
||||
:end
|
||||
@rem End local scope for the variables with windows NT shell
|
||||
if "%ERRORLEVEL%"=="0" goto mainEnd
|
||||
|
||||
:fail
|
||||
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
|
||||
rem the _cmd.exe /c_ return code!
|
||||
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
|
||||
exit /b 1
|
||||
|
||||
:mainEnd
|
||||
if "%OS%"=="Windows_NT" endlocal
|
||||
|
||||
:omega
|
||||
@@ -0,0 +1 @@
|
||||
include ':app'
|
||||
@@ -1,15 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
srcdir=`dirname $0`
|
||||
test -z "$srcdir" && srcdir=.
|
||||
|
||||
PKG_NAME="the package."
|
||||
|
||||
(test -f $srcdir/configure.ac) || {
|
||||
echo -n "**Error**: Directory "\`$srcdir\'" does not look like the"
|
||||
echo " top-level directory"
|
||||
exit 1
|
||||
}
|
||||
|
||||
. $srcdir/macros/autogen.sh
|
||||
|
||||
@@ -1,347 +0,0 @@
|
||||
#! /bin/sh
|
||||
# Wrapper for compilers which do not understand '-c -o'.
|
||||
|
||||
scriptversion=2012-10-14.11; # UTC
|
||||
|
||||
# Copyright (C) 1999-2013 Free Software Foundation, Inc.
|
||||
# Written by Tom Tromey <tromey@cygnus.com>.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2, or (at your option)
|
||||
# any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
# As a special exception to the GNU General Public License, if you
|
||||
# distribute this file as part of a program that contains a
|
||||
# configuration script generated by Autoconf, you may include it under
|
||||
# the same distribution terms that you use for the rest of that program.
|
||||
|
||||
# This file is maintained in Automake, please report
|
||||
# bugs to <bug-automake@gnu.org> or send patches to
|
||||
# <automake-patches@gnu.org>.
|
||||
|
||||
nl='
|
||||
'
|
||||
|
||||
# We need space, tab and new line, in precisely that order. Quoting is
|
||||
# there to prevent tools from complaining about whitespace usage.
|
||||
IFS=" "" $nl"
|
||||
|
||||
file_conv=
|
||||
|
||||
# func_file_conv build_file lazy
|
||||
# Convert a $build file to $host form and store it in $file
|
||||
# Currently only supports Windows hosts. If the determined conversion
|
||||
# type is listed in (the comma separated) LAZY, no conversion will
|
||||
# take place.
|
||||
func_file_conv ()
|
||||
{
|
||||
file=$1
|
||||
case $file in
|
||||
/ | /[!/]*) # absolute file, and not a UNC file
|
||||
if test -z "$file_conv"; then
|
||||
# lazily determine how to convert abs files
|
||||
case `uname -s` in
|
||||
MINGW*)
|
||||
file_conv=mingw
|
||||
;;
|
||||
CYGWIN*)
|
||||
file_conv=cygwin
|
||||
;;
|
||||
*)
|
||||
file_conv=wine
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
case $file_conv/,$2, in
|
||||
*,$file_conv,*)
|
||||
;;
|
||||
mingw/*)
|
||||
file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'`
|
||||
;;
|
||||
cygwin/*)
|
||||
file=`cygpath -m "$file" || echo "$file"`
|
||||
;;
|
||||
wine/*)
|
||||
file=`winepath -w "$file" || echo "$file"`
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
# func_cl_dashL linkdir
|
||||
# Make cl look for libraries in LINKDIR
|
||||
func_cl_dashL ()
|
||||
{
|
||||
func_file_conv "$1"
|
||||
if test -z "$lib_path"; then
|
||||
lib_path=$file
|
||||
else
|
||||
lib_path="$lib_path;$file"
|
||||
fi
|
||||
linker_opts="$linker_opts -LIBPATH:$file"
|
||||
}
|
||||
|
||||
# func_cl_dashl library
|
||||
# Do a library search-path lookup for cl
|
||||
func_cl_dashl ()
|
||||
{
|
||||
lib=$1
|
||||
found=no
|
||||
save_IFS=$IFS
|
||||
IFS=';'
|
||||
for dir in $lib_path $LIB
|
||||
do
|
||||
IFS=$save_IFS
|
||||
if $shared && test -f "$dir/$lib.dll.lib"; then
|
||||
found=yes
|
||||
lib=$dir/$lib.dll.lib
|
||||
break
|
||||
fi
|
||||
if test -f "$dir/$lib.lib"; then
|
||||
found=yes
|
||||
lib=$dir/$lib.lib
|
||||
break
|
||||
fi
|
||||
if test -f "$dir/lib$lib.a"; then
|
||||
found=yes
|
||||
lib=$dir/lib$lib.a
|
||||
break
|
||||
fi
|
||||
done
|
||||
IFS=$save_IFS
|
||||
|
||||
if test "$found" != yes; then
|
||||
lib=$lib.lib
|
||||
fi
|
||||
}
|
||||
|
||||
# func_cl_wrapper cl arg...
|
||||
# Adjust compile command to suit cl
|
||||
func_cl_wrapper ()
|
||||
{
|
||||
# Assume a capable shell
|
||||
lib_path=
|
||||
shared=:
|
||||
linker_opts=
|
||||
for arg
|
||||
do
|
||||
if test -n "$eat"; then
|
||||
eat=
|
||||
else
|
||||
case $1 in
|
||||
-o)
|
||||
# configure might choose to run compile as 'compile cc -o foo foo.c'.
|
||||
eat=1
|
||||
case $2 in
|
||||
*.o | *.[oO][bB][jJ])
|
||||
func_file_conv "$2"
|
||||
set x "$@" -Fo"$file"
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
func_file_conv "$2"
|
||||
set x "$@" -Fe"$file"
|
||||
shift
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
-I)
|
||||
eat=1
|
||||
func_file_conv "$2" mingw
|
||||
set x "$@" -I"$file"
|
||||
shift
|
||||
;;
|
||||
-I*)
|
||||
func_file_conv "${1#-I}" mingw
|
||||
set x "$@" -I"$file"
|
||||
shift
|
||||
;;
|
||||
-l)
|
||||
eat=1
|
||||
func_cl_dashl "$2"
|
||||
set x "$@" "$lib"
|
||||
shift
|
||||
;;
|
||||
-l*)
|
||||
func_cl_dashl "${1#-l}"
|
||||
set x "$@" "$lib"
|
||||
shift
|
||||
;;
|
||||
-L)
|
||||
eat=1
|
||||
func_cl_dashL "$2"
|
||||
;;
|
||||
-L*)
|
||||
func_cl_dashL "${1#-L}"
|
||||
;;
|
||||
-static)
|
||||
shared=false
|
||||
;;
|
||||
-Wl,*)
|
||||
arg=${1#-Wl,}
|
||||
save_ifs="$IFS"; IFS=','
|
||||
for flag in $arg; do
|
||||
IFS="$save_ifs"
|
||||
linker_opts="$linker_opts $flag"
|
||||
done
|
||||
IFS="$save_ifs"
|
||||
;;
|
||||
-Xlinker)
|
||||
eat=1
|
||||
linker_opts="$linker_opts $2"
|
||||
;;
|
||||
-*)
|
||||
set x "$@" "$1"
|
||||
shift
|
||||
;;
|
||||
*.cc | *.CC | *.cxx | *.CXX | *.[cC]++)
|
||||
func_file_conv "$1"
|
||||
set x "$@" -Tp"$file"
|
||||
shift
|
||||
;;
|
||||
*.c | *.cpp | *.CPP | *.lib | *.LIB | *.Lib | *.OBJ | *.obj | *.[oO])
|
||||
func_file_conv "$1" mingw
|
||||
set x "$@" "$file"
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
set x "$@" "$1"
|
||||
shift
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
shift
|
||||
done
|
||||
if test -n "$linker_opts"; then
|
||||
linker_opts="-link$linker_opts"
|
||||
fi
|
||||
exec "$@" $linker_opts
|
||||
exit 1
|
||||
}
|
||||
|
||||
eat=
|
||||
|
||||
case $1 in
|
||||
'')
|
||||
echo "$0: No command. Try '$0 --help' for more information." 1>&2
|
||||
exit 1;
|
||||
;;
|
||||
-h | --h*)
|
||||
cat <<\EOF
|
||||
Usage: compile [--help] [--version] PROGRAM [ARGS]
|
||||
|
||||
Wrapper for compilers which do not understand '-c -o'.
|
||||
Remove '-o dest.o' from ARGS, run PROGRAM with the remaining
|
||||
arguments, and rename the output as expected.
|
||||
|
||||
If you are trying to build a whole package this is not the
|
||||
right script to run: please start by reading the file 'INSTALL'.
|
||||
|
||||
Report bugs to <bug-automake@gnu.org>.
|
||||
EOF
|
||||
exit $?
|
||||
;;
|
||||
-v | --v*)
|
||||
echo "compile $scriptversion"
|
||||
exit $?
|
||||
;;
|
||||
cl | *[/\\]cl | cl.exe | *[/\\]cl.exe )
|
||||
func_cl_wrapper "$@" # Doesn't return...
|
||||
;;
|
||||
esac
|
||||
|
||||
ofile=
|
||||
cfile=
|
||||
|
||||
for arg
|
||||
do
|
||||
if test -n "$eat"; then
|
||||
eat=
|
||||
else
|
||||
case $1 in
|
||||
-o)
|
||||
# configure might choose to run compile as 'compile cc -o foo foo.c'.
|
||||
# So we strip '-o arg' only if arg is an object.
|
||||
eat=1
|
||||
case $2 in
|
||||
*.o | *.obj)
|
||||
ofile=$2
|
||||
;;
|
||||
*)
|
||||
set x "$@" -o "$2"
|
||||
shift
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
*.c)
|
||||
cfile=$1
|
||||
set x "$@" "$1"
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
set x "$@" "$1"
|
||||
shift
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
shift
|
||||
done
|
||||
|
||||
if test -z "$ofile" || test -z "$cfile"; then
|
||||
# If no '-o' option was seen then we might have been invoked from a
|
||||
# pattern rule where we don't need one. That is ok -- this is a
|
||||
# normal compilation that the losing compiler can handle. If no
|
||||
# '.c' file was seen then we are probably linking. That is also
|
||||
# ok.
|
||||
exec "$@"
|
||||
fi
|
||||
|
||||
# Name of file we expect compiler to create.
|
||||
cofile=`echo "$cfile" | sed 's|^.*[\\/]||; s|^[a-zA-Z]:||; s/\.c$/.o/'`
|
||||
|
||||
# Create the lock directory.
|
||||
# Note: use '[/\\:.-]' here to ensure that we don't use the same name
|
||||
# that we are using for the .o file. Also, base the name on the expected
|
||||
# object file name, since that is what matters with a parallel build.
|
||||
lockdir=`echo "$cofile" | sed -e 's|[/\\:.-]|_|g'`.d
|
||||
while true; do
|
||||
if mkdir "$lockdir" >/dev/null 2>&1; then
|
||||
break
|
||||
fi
|
||||
sleep 1
|
||||
done
|
||||
# FIXME: race condition here if user kills between mkdir and trap.
|
||||
trap "rmdir '$lockdir'; exit 1" 1 2 15
|
||||
|
||||
# Run the compile.
|
||||
"$@"
|
||||
ret=$?
|
||||
|
||||
if test -f "$cofile"; then
|
||||
test "$cofile" = "$ofile" || mv "$cofile" "$ofile"
|
||||
elif test -f "${cofile}bj"; then
|
||||
test "${cofile}bj" = "$ofile" || mv "${cofile}bj" "$ofile"
|
||||
fi
|
||||
|
||||
rmdir "$lockdir"
|
||||
exit $ret
|
||||
|
||||
# Local Variables:
|
||||
# mode: shell-script
|
||||
# sh-indentation: 2
|
||||
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
||||
# time-stamp-start: "scriptversion="
|
||||
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||
# time-stamp-time-zone: "UTC"
|
||||
# time-stamp-end: "; # UTC"
|
||||
# End:
|
||||
Vendored
-1420
File diff suppressed because it is too large
Load Diff
+16
-325
@@ -1,330 +1,21 @@
|
||||
/* config.h.in. Generated from configure.ac by autoheader. */
|
||||
#cmakedefine PACKAGE "@PACKAGE@"
|
||||
#define VERSION "@XSYSTEM35_VERSION@"
|
||||
|
||||
/* Define if building universal (internal helper macro) */
|
||||
#undef AC_APPLE_UNIVERSAL_BUILD
|
||||
#cmakedefine CACHE_TOTALSIZE @CACHE_TOTALSIZE@
|
||||
|
||||
/* aduio device */
|
||||
#undef AUDIODEV_OSS
|
||||
#cmakedefine ENABLE_DEBUGGER @ENABLE_DEBUGGER@
|
||||
#cmakedefine ENABLE_GTK @ENABLE_GTK@
|
||||
#cmakedefine ENABLE_MIDI_SDLMIXER @ENABLE_MIDI_SDLMIXER@
|
||||
#cmakedefine ENABLE_MIDI_PORTMIDI @ENABLE_MIDI_PORTMIDI@
|
||||
#cmakedefine ENABLE_NLS @ENABLE_NLS@
|
||||
|
||||
/* Define this if X11 Pixmap color order is BGR */
|
||||
#undef BGR_ORDER
|
||||
#cmakedefine DEFAULT_PLAYLIST_PATH "@DEFAULT_PLAYLIST_PATH@"
|
||||
#cmakedefine JOY_DEVICE "@JOY_DEVICE@"
|
||||
|
||||
/* General Cache size (MB) */
|
||||
#undef CACHE_TOTALSIZE
|
||||
#cmakedefine HAVE_GETLOGIN @HAVE_GETLOGIN@
|
||||
#cmakedefine HAVE_MMAP @HAVE_MMAP@
|
||||
#cmakedefine HAVE_SIGACTION @HAVE_SIGACTION@
|
||||
#cmakedefine HAVE_WEBP @HAVE_WEBP@
|
||||
|
||||
/* cdrom device */
|
||||
#undef CDROM_DEVICE
|
||||
|
||||
/* Define this if you want to Debug */
|
||||
#undef DEBUG
|
||||
|
||||
/* default audio mode */
|
||||
#undef DEFAULT_AUDIO_MODE
|
||||
|
||||
/* Define this if you have Alsa (libasound) installed */
|
||||
#undef ENABLE_ALSA
|
||||
|
||||
/* Define this if you use cdrom iotctl in *BSD */
|
||||
#undef ENABLE_CDROM_BSD
|
||||
|
||||
/* Define this if your use cdrom ioctl in linux or Solaris */
|
||||
#undef ENABLE_CDROM_LINUX
|
||||
|
||||
/* Define this if you use external player for cdrom audio */
|
||||
#undef ENABLE_CDROM_MP3
|
||||
|
||||
/* Define this if you have ESD (libesd) installed */
|
||||
#undef ENABLE_ESD
|
||||
|
||||
/* Define this if you have freetype2 installed */
|
||||
#undef ENABLE_FT2
|
||||
|
||||
/* Define this if you have glib >= 2.0.0 */
|
||||
#undef ENABLE_GLIB
|
||||
|
||||
/* Define this if you have gtk+ >= 2.0.0 */
|
||||
#undef ENABLE_GTK
|
||||
|
||||
/* define this if you use external midi player */
|
||||
#undef ENABLE_MIDI_EXTPLAYER
|
||||
|
||||
/* define this if you use oss raw midi interface */
|
||||
#undef ENABLE_MIDI_RAWMIDI
|
||||
|
||||
/* define thsi if you use oss sequencer interface */
|
||||
#undef ENABLE_MIDI_SEQMIDI
|
||||
|
||||
/* define this if you want to use MMX instructions */
|
||||
#undef ENABLE_MMX
|
||||
|
||||
/* Define to 1 if translation of program messages to the user's native
|
||||
language is requested. */
|
||||
#undef ENABLE_NLS
|
||||
|
||||
/* define this if you use OSS audio interface */
|
||||
#undef ENABLE_OSS
|
||||
|
||||
/* define this if you use SDL */
|
||||
#undef ENABLE_SDL
|
||||
|
||||
/* define this if you use sun stlye audio interface */
|
||||
#undef ENABLE_SUNAUDIO
|
||||
|
||||
/* define this if you use X11 font interface */
|
||||
#undef ENABLE_X11FONT
|
||||
|
||||
/* define this if you use X11 render etension */
|
||||
#undef ENABLE_XRENDER
|
||||
|
||||
/* Define to 1 if you have the `argz_add' function. */
|
||||
#undef HAVE_ARGZ_ADD
|
||||
|
||||
/* Define to 1 if you have the `argz_append' function. */
|
||||
#undef HAVE_ARGZ_APPEND
|
||||
|
||||
/* Define to 1 if you have the `argz_count' function. */
|
||||
#undef HAVE_ARGZ_COUNT
|
||||
|
||||
/* Define to 1 if you have the `argz_create_sep' function. */
|
||||
#undef HAVE_ARGZ_CREATE_SEP
|
||||
|
||||
/* Define to 1 if you have the <argz.h> header file. */
|
||||
#undef HAVE_ARGZ_H
|
||||
|
||||
/* Define to 1 if you have the `argz_insert' function. */
|
||||
#undef HAVE_ARGZ_INSERT
|
||||
|
||||
/* Define to 1 if you have the `argz_next' function. */
|
||||
#undef HAVE_ARGZ_NEXT
|
||||
|
||||
/* Define to 1 if you have the `argz_stringify' function. */
|
||||
#undef HAVE_ARGZ_STRINGIFY
|
||||
|
||||
/* Define to 1 if you have the `closedir' function. */
|
||||
#undef HAVE_CLOSEDIR
|
||||
|
||||
/* Define if the GNU dcgettext() function is already present or preinstalled.
|
||||
*/
|
||||
#undef HAVE_DCGETTEXT
|
||||
|
||||
/* Define to 1 if you have the declaration of `cygwin_conv_path', and to 0 if
|
||||
you don't. */
|
||||
#undef HAVE_DECL_CYGWIN_CONV_PATH
|
||||
|
||||
/* Define to 1 if you have the <dirent.h> header file. */
|
||||
#undef HAVE_DIRENT_H
|
||||
|
||||
/* Define if you have the GNU dld library. */
|
||||
#undef HAVE_DLD
|
||||
|
||||
/* Define to 1 if you have the <dld.h> header file. */
|
||||
#undef HAVE_DLD_H
|
||||
|
||||
/* Define to 1 if you have the `dlerror' function. */
|
||||
#undef HAVE_DLERROR
|
||||
|
||||
/* Define to 1 if you have the <dlfcn.h> header file. */
|
||||
#undef HAVE_DLFCN_H
|
||||
|
||||
/* Define to 1 if you have the <dl.h> header file. */
|
||||
#undef HAVE_DL_H
|
||||
|
||||
/* Define if you have the _dyld_func_lookup function. */
|
||||
#undef HAVE_DYLD
|
||||
|
||||
/* Define to 1 if the system has the type `error_t'. */
|
||||
#undef HAVE_ERROR_T
|
||||
|
||||
/* Define if the GNU gettext() function is already present or preinstalled. */
|
||||
#undef HAVE_GETTEXT
|
||||
|
||||
/* Define to 1 if you have the `gettimeofday' function. */
|
||||
#undef HAVE_GETTIMEOFDAY
|
||||
|
||||
/* Define if you have the iconv() function. */
|
||||
#undef HAVE_ICONV
|
||||
|
||||
/* Define to 1 if you have the <inttypes.h> header file. */
|
||||
#undef HAVE_INTTYPES_H
|
||||
|
||||
/* Define to 1 if you have the `asound' library (-lasound). */
|
||||
#undef HAVE_LIBASOUND
|
||||
|
||||
/* Define if you have the libdl library or equivalent. */
|
||||
#undef HAVE_LIBDL
|
||||
|
||||
/* Define if libdlloader will be built on this platform */
|
||||
#undef HAVE_LIBDLLOADER
|
||||
|
||||
/* Define to 1 if you have the <libgen.h> header file. */
|
||||
#undef HAVE_LIBGEN_H
|
||||
|
||||
/* Define to 1 if you have the <linux/joystick.h> header file. */
|
||||
#undef HAVE_LINUX_JOYSTICK_H
|
||||
|
||||
/* Define this if a modern libltdl is already installed */
|
||||
#undef HAVE_LTDL
|
||||
|
||||
/* Define to 1 if you have the <mach-o/dyld.h> header file. */
|
||||
#undef HAVE_MACH_O_DYLD_H
|
||||
|
||||
/* Define to 1 if you have the <memory.h> header file. */
|
||||
#undef HAVE_MEMORY_H
|
||||
|
||||
/* Define to 1 if you have the `mkdtemp' function. */
|
||||
#undef HAVE_MKDTEMP
|
||||
|
||||
/* Define to 1 if you have the `opendir' function. */
|
||||
#undef HAVE_OPENDIR
|
||||
|
||||
/* Define if libtool can extract symbol lists from object files. */
|
||||
#undef HAVE_PRELOADED_SYMBOLS
|
||||
|
||||
/* Define to 1 if you have the `readdir' function. */
|
||||
#undef HAVE_READDIR
|
||||
|
||||
/* define this if you use SDL joystick interface */
|
||||
#undef HAVE_SDLJOY
|
||||
|
||||
/* define this if you have SDLRALPHA */
|
||||
#undef HAVE_SDLRALPHA
|
||||
|
||||
/* define this if you have SDLRLE */
|
||||
#undef HAVE_SDLRLE
|
||||
|
||||
/* Define if you have the shl_load function. */
|
||||
#undef HAVE_SHL_LOAD
|
||||
|
||||
/* Define to 1 if you have the <stdint.h> header file. */
|
||||
#undef HAVE_STDINT_H
|
||||
|
||||
/* Define to 1 if you have the <stdlib.h> header file. */
|
||||
#undef HAVE_STDLIB_H
|
||||
|
||||
/* Define to 1 if you have the <strings.h> header file. */
|
||||
#undef HAVE_STRINGS_H
|
||||
|
||||
/* Define to 1 if you have the <string.h> header file. */
|
||||
#undef HAVE_STRING_H
|
||||
|
||||
/* Define to 1 if you have the `strlcat' function. */
|
||||
#undef HAVE_STRLCAT
|
||||
|
||||
/* Define to 1 if you have the `strlcpy' function. */
|
||||
#undef HAVE_STRLCPY
|
||||
|
||||
/* Define to 1 if you have the <sys/dl.h> header file. */
|
||||
#undef HAVE_SYS_DL_H
|
||||
|
||||
/* Define to 1 if you have the <sys/stat.h> header file. */
|
||||
#undef HAVE_SYS_STAT_H
|
||||
|
||||
/* Define to 1 if you have the <sys/types.h> header file. */
|
||||
#undef HAVE_SYS_TYPES_H
|
||||
|
||||
/* Define to 1 if you have the <unistd.h> header file. */
|
||||
#undef HAVE_UNISTD_H
|
||||
|
||||
/* This value is set to 1 to indicate that the system argz facility works */
|
||||
#undef HAVE_WORKING_ARGZ
|
||||
|
||||
/* Define this if you have libXxf86vm installed */
|
||||
#undef HAVE_XF86VMODE
|
||||
|
||||
/* joystick device */
|
||||
#undef JOY_DEVICE
|
||||
|
||||
/* Define if the OS needs help to load dependent libraries for dlopen(). */
|
||||
#undef LTDL_DLOPEN_DEPLIBS
|
||||
|
||||
/* Define to the system default library search path. */
|
||||
#undef LT_DLSEARCH_PATH
|
||||
|
||||
/* The archive extension */
|
||||
#undef LT_LIBEXT
|
||||
|
||||
/* The archive prefix */
|
||||
#undef LT_LIBPREFIX
|
||||
|
||||
/* Define to the extension used for runtime loadable modules, say, ".so". */
|
||||
#undef LT_MODULE_EXT
|
||||
|
||||
/* Define to the name of the environment variable that determines the run-time
|
||||
module search path. */
|
||||
#undef LT_MODULE_PATH_VAR
|
||||
|
||||
/* Define to the sub-directory in which libtool stores uninstalled libraries.
|
||||
*/
|
||||
#undef LT_OBJDIR
|
||||
|
||||
/* Define to the shared library suffix, say, ".dylib". */
|
||||
#undef LT_SHARED_EXT
|
||||
|
||||
/* midi device */
|
||||
#undef MIDI_DEVICE
|
||||
|
||||
/* midi player */
|
||||
#undef MIDI_PLAYER
|
||||
|
||||
/* mixer device */
|
||||
#undef MIXERDEV_OSS
|
||||
|
||||
/* Define if dlsym() requires a leading underscore in symbol names. */
|
||||
#undef NEED_USCORE
|
||||
|
||||
/* Name of package */
|
||||
#undef PACKAGE
|
||||
|
||||
/* Define to the address where bug reports for this package should be sent. */
|
||||
#undef PACKAGE_BUGREPORT
|
||||
|
||||
/* Define to the full name of this package. */
|
||||
#undef PACKAGE_NAME
|
||||
|
||||
/* Define to the full name and version of this package. */
|
||||
#undef PACKAGE_STRING
|
||||
|
||||
/* Define to the one symbol short name of this package. */
|
||||
#undef PACKAGE_TARNAME
|
||||
|
||||
/* Define to the home page for this package. */
|
||||
#undef PACKAGE_URL
|
||||
|
||||
/* Define to the version of this package. */
|
||||
#undef PACKAGE_VERSION
|
||||
|
||||
/* define this if you stop midi stdout */
|
||||
#undef QUITE_MIDI
|
||||
|
||||
/* Define this if X11 Pixmap color order is RGB */
|
||||
#undef RGB_ORDER
|
||||
|
||||
/* sequencer device */
|
||||
#undef SEQ_DEVICE
|
||||
|
||||
/* Define to 1 if you have the ANSI C header files. */
|
||||
#undef STDC_HEADERS
|
||||
|
||||
/* Version number of package */
|
||||
#undef VERSION
|
||||
|
||||
/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most
|
||||
significant byte first (like Motorola and SPARC, unlike Intel). */
|
||||
#if defined AC_APPLE_UNIVERSAL_BUILD
|
||||
# if defined __BIG_ENDIAN__
|
||||
# define WORDS_BIGENDIAN 1
|
||||
# endif
|
||||
#else
|
||||
# ifndef WORDS_BIGENDIAN
|
||||
# undef WORDS_BIGENDIAN
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* Define to 1 if the X Window System is missing or not being used. */
|
||||
#undef X_DISPLAY_MISSING
|
||||
|
||||
/* Define so that glibc/gnulib argp.h does not typedef error_t. */
|
||||
#undef __error_t_defined
|
||||
|
||||
/* Define to a type to use for `error_t' if it is not otherwise available. */
|
||||
#undef error_t
|
||||
#define DEFAULT_GOTHIC_TTF "@DEFAULT_FONT_PATH@MTLc3m.ttf"
|
||||
#define DEFAULT_MINCHO_TTF "@DEFAULT_FONT_PATH@mincho.otf"
|
||||
|
||||
-513
@@ -1,513 +0,0 @@
|
||||
#! /bin/sh
|
||||
# Output a system dependent set of variables, describing how to set the
|
||||
# run time search path of shared libraries in an executable.
|
||||
#
|
||||
# Copyright 1996-2002 Free Software Foundation, Inc.
|
||||
# Taken from GNU libtool, 2001
|
||||
# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful, but
|
||||
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
# General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
#
|
||||
# As a special exception to the GNU General Public License, if you
|
||||
# distribute this file as part of a program that contains a
|
||||
# configuration script generated by Autoconf, you may include it under
|
||||
# the same distribution terms that you use for the rest of that program.
|
||||
#
|
||||
# The first argument passed to this file is the canonical host specification,
|
||||
# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
|
||||
# or
|
||||
# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
|
||||
# The environment variables CC, GCC, LDFLAGS, LD, with_gnu_ld
|
||||
# should be set by the caller.
|
||||
#
|
||||
# The set of defined variables is at the end of this script.
|
||||
|
||||
# All known linkers require a `.a' archive for static linking (except M$VC,
|
||||
# which needs '.lib').
|
||||
libext=a
|
||||
shlibext=
|
||||
|
||||
host="$1"
|
||||
host_cpu=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
|
||||
host_vendor=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
|
||||
host_os=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
|
||||
|
||||
wl=
|
||||
if test "$GCC" = yes; then
|
||||
wl='-Wl,'
|
||||
else
|
||||
case "$host_os" in
|
||||
aix3* | aix4* | aix5*)
|
||||
wl='-Wl,'
|
||||
;;
|
||||
hpux9* | hpux10* | hpux11*)
|
||||
wl='-Wl,'
|
||||
;;
|
||||
irix5* | irix6*)
|
||||
wl='-Wl,'
|
||||
;;
|
||||
linux*)
|
||||
echo '__INTEL_COMPILER' > conftest.$ac_ext
|
||||
if $CC -E conftest.$ac_ext >/dev/null | grep __INTEL_COMPILER >/dev/null
|
||||
then
|
||||
:
|
||||
else
|
||||
# Intel icc
|
||||
wl='-Qoption,ld,'
|
||||
fi
|
||||
;;
|
||||
osf3* | osf4* | osf5*)
|
||||
wl='-Wl,'
|
||||
;;
|
||||
solaris*)
|
||||
wl='-Wl,'
|
||||
;;
|
||||
sunos4*)
|
||||
wl='-Qoption ld '
|
||||
;;
|
||||
sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
|
||||
if test "x$host_vendor" = xsni; then
|
||||
wl='-LD'
|
||||
else
|
||||
wl='-Wl,'
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
hardcode_libdir_flag_spec=
|
||||
hardcode_libdir_separator=
|
||||
hardcode_direct=no
|
||||
hardcode_minus_L=no
|
||||
|
||||
case "$host_os" in
|
||||
cygwin* | mingw* | pw32*)
|
||||
# FIXME: the MSVC++ port hasn't been tested in a loooong time
|
||||
# When not using gcc, we currently assume that we are using
|
||||
# Microsoft Visual C++.
|
||||
if test "$GCC" != yes; then
|
||||
with_gnu_ld=no
|
||||
fi
|
||||
;;
|
||||
openbsd*)
|
||||
with_gnu_ld=no
|
||||
;;
|
||||
esac
|
||||
|
||||
ld_shlibs=yes
|
||||
if test "$with_gnu_ld" = yes; then
|
||||
case "$host_os" in
|
||||
aix3* | aix4* | aix5*)
|
||||
# On AIX, the GNU linker is very broken
|
||||
ld_shlibs=no
|
||||
;;
|
||||
amigaos*)
|
||||
hardcode_libdir_flag_spec='-L$libdir'
|
||||
hardcode_minus_L=yes
|
||||
# Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
|
||||
# that the semantics of dynamic libraries on AmigaOS, at least up
|
||||
# to version 4, is to share data among multiple programs linked
|
||||
# with the same dynamic library. Since this doesn't match the
|
||||
# behavior of shared libraries on other platforms, we can use
|
||||
# them.
|
||||
ld_shlibs=no
|
||||
;;
|
||||
beos*)
|
||||
if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
|
||||
:
|
||||
else
|
||||
ld_shlibs=no
|
||||
fi
|
||||
;;
|
||||
cygwin* | mingw* | pw32*)
|
||||
# hardcode_libdir_flag_spec is actually meaningless, as there is
|
||||
# no search path for DLLs.
|
||||
hardcode_libdir_flag_spec='-L$libdir'
|
||||
;;
|
||||
solaris* | sysv5*)
|
||||
if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then
|
||||
ld_shlibs=no
|
||||
elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
|
||||
:
|
||||
else
|
||||
ld_shlibs=no
|
||||
fi
|
||||
;;
|
||||
sunos4*)
|
||||
hardcode_direct=yes
|
||||
;;
|
||||
*)
|
||||
if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
|
||||
:
|
||||
else
|
||||
ld_shlibs=no
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
if test "$ld_shlibs" = yes; then
|
||||
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
|
||||
fi
|
||||
else
|
||||
case "$host_os" in
|
||||
aix3*)
|
||||
# Note: this linker hardcodes the directories in LIBPATH if there
|
||||
# are no directories specified by -L.
|
||||
hardcode_minus_L=yes
|
||||
if test "$GCC" = yes; then
|
||||
# Neither direct hardcoding nor static linking is supported with a
|
||||
# broken collect2.
|
||||
hardcode_direct=unsupported
|
||||
fi
|
||||
;;
|
||||
aix4* | aix5*)
|
||||
if test "$host_cpu" = ia64; then
|
||||
# On IA64, the linker does run time linking by default, so we don't
|
||||
# have to do anything special.
|
||||
aix_use_runtimelinking=no
|
||||
else
|
||||
aix_use_runtimelinking=no
|
||||
# Test if we are trying to use run time linking or normal
|
||||
# AIX style linking. If -brtl is somewhere in LDFLAGS, we
|
||||
# need to do runtime linking.
|
||||
case $host_os in aix4.[23]|aix4.[23].*|aix5*)
|
||||
for ld_flag in $LDFLAGS; do
|
||||
if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
|
||||
aix_use_runtimelinking=yes
|
||||
break
|
||||
fi
|
||||
done
|
||||
esac
|
||||
fi
|
||||
hardcode_direct=yes
|
||||
hardcode_libdir_separator=':'
|
||||
if test "$GCC" = yes; then
|
||||
case $host_os in aix4.[012]|aix4.[012].*)
|
||||
collect2name=`${CC} -print-prog-name=collect2`
|
||||
if test -f "$collect2name" && \
|
||||
strings "$collect2name" | grep resolve_lib_name >/dev/null
|
||||
then
|
||||
# We have reworked collect2
|
||||
hardcode_direct=yes
|
||||
else
|
||||
# We have old collect2
|
||||
hardcode_direct=unsupported
|
||||
hardcode_minus_L=yes
|
||||
hardcode_libdir_flag_spec='-L$libdir'
|
||||
hardcode_libdir_separator=
|
||||
fi
|
||||
esac
|
||||
fi
|
||||
if test "$aix_use_runtimelinking" = yes; then
|
||||
hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:/usr/lib:/lib'
|
||||
else
|
||||
if test "$host_cpu" = ia64; then
|
||||
hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
|
||||
else
|
||||
hardcode_libdir_flag_spec='${wl}-bnolibpath ${wl}-blibpath:$libdir:/usr/lib:/lib'
|
||||
fi
|
||||
fi
|
||||
;;
|
||||
amigaos*)
|
||||
hardcode_libdir_flag_spec='-L$libdir'
|
||||
hardcode_minus_L=yes
|
||||
# see comment about different semantics on the GNU ld section
|
||||
ld_shlibs=no
|
||||
;;
|
||||
cygwin* | mingw* | pw32*)
|
||||
# When not using gcc, we currently assume that we are using
|
||||
# Microsoft Visual C++.
|
||||
# hardcode_libdir_flag_spec is actually meaningless, as there is
|
||||
# no search path for DLLs.
|
||||
hardcode_libdir_flag_spec=' '
|
||||
libext=lib
|
||||
;;
|
||||
darwin* | rhapsody*)
|
||||
hardcode_direct=yes
|
||||
;;
|
||||
freebsd1*)
|
||||
ld_shlibs=no
|
||||
;;
|
||||
freebsd2.2*)
|
||||
hardcode_libdir_flag_spec='-R$libdir'
|
||||
hardcode_direct=yes
|
||||
;;
|
||||
freebsd2*)
|
||||
hardcode_direct=yes
|
||||
hardcode_minus_L=yes
|
||||
;;
|
||||
freebsd*)
|
||||
hardcode_libdir_flag_spec='-R$libdir'
|
||||
hardcode_direct=yes
|
||||
;;
|
||||
hpux9* | hpux10* | hpux11*)
|
||||
hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
|
||||
hardcode_libdir_separator=:
|
||||
hardcode_direct=yes
|
||||
hardcode_minus_L=yes # Not in the search PATH, but as the default
|
||||
# location of the library.
|
||||
;;
|
||||
irix5* | irix6*)
|
||||
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
|
||||
hardcode_libdir_separator=:
|
||||
;;
|
||||
netbsd*)
|
||||
hardcode_libdir_flag_spec='-R$libdir'
|
||||
hardcode_direct=yes
|
||||
;;
|
||||
newsos6)
|
||||
hardcode_direct=yes
|
||||
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
|
||||
hardcode_libdir_separator=:
|
||||
;;
|
||||
openbsd*)
|
||||
hardcode_direct=yes
|
||||
if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
|
||||
hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
|
||||
else
|
||||
case "$host_os" in
|
||||
openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
|
||||
hardcode_libdir_flag_spec='-R$libdir'
|
||||
;;
|
||||
*)
|
||||
hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
;;
|
||||
os2*)
|
||||
hardcode_libdir_flag_spec='-L$libdir'
|
||||
hardcode_minus_L=yes
|
||||
;;
|
||||
osf3*)
|
||||
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
|
||||
hardcode_libdir_separator=:
|
||||
;;
|
||||
osf4* | osf5*)
|
||||
if test "$GCC" = yes; then
|
||||
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
|
||||
else
|
||||
# Both cc and cxx compiler support -rpath directly
|
||||
hardcode_libdir_flag_spec='-rpath $libdir'
|
||||
fi
|
||||
hardcode_libdir_separator=:
|
||||
;;
|
||||
sco3.2v5*)
|
||||
;;
|
||||
solaris*)
|
||||
hardcode_libdir_flag_spec='-R$libdir'
|
||||
;;
|
||||
sunos4*)
|
||||
hardcode_libdir_flag_spec='-L$libdir'
|
||||
hardcode_direct=yes
|
||||
hardcode_minus_L=yes
|
||||
;;
|
||||
sysv4)
|
||||
if test "x$host_vendor" = xsno; then
|
||||
hardcode_direct=yes # is this really true???
|
||||
else
|
||||
hardcode_direct=no # Motorola manual says yes, but my tests say they lie
|
||||
fi
|
||||
;;
|
||||
sysv4.3*)
|
||||
;;
|
||||
sysv5*)
|
||||
hardcode_libdir_flag_spec=
|
||||
;;
|
||||
uts4*)
|
||||
hardcode_libdir_flag_spec='-L$libdir'
|
||||
;;
|
||||
dgux*)
|
||||
hardcode_libdir_flag_spec='-L$libdir'
|
||||
;;
|
||||
sysv4*MP*)
|
||||
if test -d /usr/nec; then
|
||||
ld_shlibs=yes
|
||||
fi
|
||||
;;
|
||||
sysv4.2uw2*)
|
||||
hardcode_direct=yes
|
||||
hardcode_minus_L=no
|
||||
;;
|
||||
sysv5uw7* | unixware7*)
|
||||
;;
|
||||
*)
|
||||
ld_shlibs=no
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
# Check dynamic linker characteristics
|
||||
libname_spec='lib$name'
|
||||
sys_lib_dlsearch_path_spec="/lib /usr/lib"
|
||||
sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
|
||||
case "$host_os" in
|
||||
aix3*)
|
||||
shlibext=so
|
||||
;;
|
||||
aix4* | aix5*)
|
||||
shlibext=so
|
||||
;;
|
||||
amigaos*)
|
||||
shlibext=ixlibrary
|
||||
;;
|
||||
beos*)
|
||||
shlibext=so
|
||||
;;
|
||||
bsdi4*)
|
||||
shlibext=so
|
||||
sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
|
||||
sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
|
||||
;;
|
||||
cygwin* | mingw* | pw32*)
|
||||
case $GCC,$host_os in
|
||||
yes,cygwin*)
|
||||
shlibext=dll.a
|
||||
;;
|
||||
yes,mingw*)
|
||||
shlibext=dll
|
||||
sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | sed -e "s/^libraries://" -e "s/;/ /g"`
|
||||
;;
|
||||
yes,pw32*)
|
||||
shlibext=dll
|
||||
;;
|
||||
*)
|
||||
shlibext=dll
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
darwin* | rhapsody*)
|
||||
shlibext=dylib
|
||||
;;
|
||||
freebsd1*)
|
||||
;;
|
||||
freebsd*)
|
||||
shlibext=so
|
||||
;;
|
||||
gnu*)
|
||||
shlibext=so
|
||||
;;
|
||||
hpux9* | hpux10* | hpux11*)
|
||||
shlibext=sl
|
||||
;;
|
||||
irix5* | irix6*)
|
||||
shlibext=so
|
||||
case "$host_os" in
|
||||
irix5*)
|
||||
libsuff= shlibsuff=
|
||||
;;
|
||||
*)
|
||||
case $LD in
|
||||
*-32|*"-32 ") libsuff= shlibsuff= ;;
|
||||
*-n32|*"-n32 ") libsuff=32 shlibsuff=N32 ;;
|
||||
*-64|*"-64 ") libsuff=64 shlibsuff=64 ;;
|
||||
*) libsuff= shlibsuff= ;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
|
||||
sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
|
||||
;;
|
||||
linux-gnuoldld* | linux-gnuaout* | linux-gnucoff*)
|
||||
;;
|
||||
linux-gnu*)
|
||||
shlibext=so
|
||||
;;
|
||||
netbsd*)
|
||||
shlibext=so
|
||||
;;
|
||||
newsos6)
|
||||
shlibext=so
|
||||
;;
|
||||
openbsd*)
|
||||
shlibext=so
|
||||
;;
|
||||
os2*)
|
||||
libname_spec='$name'
|
||||
shlibext=dll
|
||||
;;
|
||||
osf3* | osf4* | osf5*)
|
||||
shlibext=so
|
||||
sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
|
||||
sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
|
||||
;;
|
||||
sco3.2v5*)
|
||||
shlibext=so
|
||||
;;
|
||||
solaris*)
|
||||
shlibext=so
|
||||
;;
|
||||
sunos4*)
|
||||
shlibext=so
|
||||
;;
|
||||
sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
|
||||
shlibext=so
|
||||
case "$host_vendor" in
|
||||
motorola)
|
||||
sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
uts4*)
|
||||
shlibext=so
|
||||
;;
|
||||
dgux*)
|
||||
shlibext=so
|
||||
;;
|
||||
sysv4*MP*)
|
||||
if test -d /usr/nec; then
|
||||
shlibext=so
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
sed_quote_subst='s/\(["`$\\]\)/\\\1/g'
|
||||
escaped_wl=`echo "X$wl" | sed -e 's/^X//' -e "$sed_quote_subst"`
|
||||
escaped_hardcode_libdir_flag_spec=`echo "X$hardcode_libdir_flag_spec" | sed -e 's/^X//' -e "$sed_quote_subst"`
|
||||
escaped_sys_lib_search_path_spec=`echo "X$sys_lib_search_path_spec" | sed -e 's/^X//' -e "$sed_quote_subst"`
|
||||
escaped_sys_lib_dlsearch_path_spec=`echo "X$sys_lib_dlsearch_path_spec" | sed -e 's/^X//' -e "$sed_quote_subst"`
|
||||
|
||||
sed -e 's/^\([a-zA-Z0-9_]*\)=/acl_cv_\1=/' <<EOF
|
||||
|
||||
# How to pass a linker flag through the compiler.
|
||||
wl="$escaped_wl"
|
||||
|
||||
# Static library suffix (normally "a").
|
||||
libext="$libext"
|
||||
|
||||
# Shared library suffix (normally "so").
|
||||
shlibext="$shlibext"
|
||||
|
||||
# Flag to hardcode \$libdir into a binary during linking.
|
||||
# This must work even if \$libdir does not exist.
|
||||
hardcode_libdir_flag_spec="$escaped_hardcode_libdir_flag_spec"
|
||||
|
||||
# Whether we need a single -rpath flag with a separated argument.
|
||||
hardcode_libdir_separator="$hardcode_libdir_separator"
|
||||
|
||||
# Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
|
||||
# resulting binary.
|
||||
hardcode_direct="$hardcode_direct"
|
||||
|
||||
# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
|
||||
# resulting binary.
|
||||
hardcode_minus_L="$hardcode_minus_L"
|
||||
|
||||
# Compile-time system search path for libraries
|
||||
sys_lib_search_path_spec="$escaped_sys_lib_search_path_spec"
|
||||
|
||||
# Run-time system search path for libraries
|
||||
sys_lib_dlsearch_path_spec="$escaped_sys_lib_dlsearch_path_spec"
|
||||
|
||||
EOF
|
||||
Vendored
-1799
File diff suppressed because it is too large
Load Diff
-925
@@ -1,925 +0,0 @@
|
||||
dnl
|
||||
dnl configure.ac for xsystem35
|
||||
dnl -----
|
||||
AC_INIT
|
||||
AC_CONFIG_SRCDIR([configure.ac])
|
||||
AC_CANONICAL_TARGET
|
||||
|
||||
dnl
|
||||
dnl Require autoconf version 2.59
|
||||
dnl
|
||||
AC_PREREQ([2.69])
|
||||
|
||||
dnl
|
||||
dnl EXTRAxxx is for misc CFLAGS and LIBS
|
||||
dnl
|
||||
EXTRACFLAGS=
|
||||
EXTRALIBS=
|
||||
EXTRALDFLAGS="-rdynamic"
|
||||
|
||||
dnl
|
||||
dnl versions
|
||||
dnl
|
||||
XSYS35_MAJOR=1
|
||||
XSYS35_MINOR=7
|
||||
XSYS35_MICRO=3
|
||||
XSYS35_EXTRA=pre5
|
||||
|
||||
XSYS35_VERSION=$XSYS35_MAJOR.$XSYS35_MINOR.$XSYS35_MICRO$XSYS35_EXTRA
|
||||
VERSION_MA=$XSYS35_MAJOR.$XSYS35_MINOR.$XSYS35_MICRO
|
||||
VERSION_MI=$XSYS35_EXTRA
|
||||
AC_SUBST(VERSION_MA)
|
||||
AC_SUBST(VERSION_MI)
|
||||
|
||||
dnl
|
||||
dnl For automake.
|
||||
dnl
|
||||
VERSION=$XSYS35_VERSION
|
||||
PACKAGE=xsystem35
|
||||
|
||||
dnl
|
||||
dnl Initialize automake stuff
|
||||
dnl
|
||||
AM_INIT_AUTOMAKE($PACKAGE, $VERSION)
|
||||
AM_CONFIG_HEADER(config.h)
|
||||
AM_MAINTAINER_MODE
|
||||
|
||||
dnl
|
||||
dnl Pick up m4 macros
|
||||
dnl
|
||||
dnl AM_ACLOCAL_INCLUDE(m4)
|
||||
AM_ACLOCAL_INCLUDE(macros)
|
||||
|
||||
dnl
|
||||
dnl add subdirectory for libltdl
|
||||
dnl
|
||||
dnl AC_CONFIG_SUBDIRS(libltdl)
|
||||
|
||||
dnl
|
||||
dnl Checks for programs.
|
||||
dnl
|
||||
AC_PROG_CC
|
||||
dnl AC_PROG_INSTALL
|
||||
dnl AC_PROG_MAKE_SET
|
||||
dnl AC_SEARCH_LIBS([strerror],[cposix])
|
||||
dnl AC_C_VAR_FUNC
|
||||
|
||||
dnl
|
||||
dnl Check for libltdl
|
||||
dnl
|
||||
dnl AC_CONFIG_SUBDIRS(libltdl)
|
||||
LT_INIT([dlopen])
|
||||
LT_CONFIG_LTDL_DIR([libltdl])
|
||||
_LTDL_CONVENIENCE
|
||||
LTDL_INIT([])
|
||||
AC_SUBST([LTDLINCL])
|
||||
AC_SUBST([LIBLTDL])
|
||||
|
||||
dnl LT_INIT
|
||||
dnl AC_SUBST(INCLTDL)
|
||||
dnl AC_SUBST(LIBLTDL)
|
||||
dnl AC_SUBST(LIBADD_DL)
|
||||
dnl _LT_CONFIG_LTDL_DIR([m4_default([], [libltdl])])
|
||||
_LTDL_INSTALLABLE
|
||||
dnl LTDL_INIT([])
|
||||
|
||||
dnl
|
||||
dnl Check for gettext
|
||||
dnl
|
||||
AM_GNU_GETTEXT([external])
|
||||
AM_GNU_GETTEXT_VERSION(0.11.5)
|
||||
|
||||
dnl
|
||||
dnl Checks for header files.
|
||||
dnl
|
||||
AC_PATH_X
|
||||
|
||||
dnl
|
||||
dnl Checks for typedefs, structures, and compiler characteristics.
|
||||
dnl
|
||||
dnl AC_C_CONST
|
||||
dnl AC_C_INLINE
|
||||
dnl AC_TYPE_PID_T
|
||||
dnl AC_TYPE_SIZE_T
|
||||
dnl AC_HEADER_TIME
|
||||
dnl AC_STRUCT_TM
|
||||
AC_C_BIGENDIAN
|
||||
AC_CHECK_HEADERS(libgen.h)
|
||||
|
||||
|
||||
dnl
|
||||
dnl Check X11
|
||||
dnl
|
||||
AC_PATH_XTRA
|
||||
AC_SUBST(X_CFLAGS)
|
||||
AC_SUBST(X_LIBS)
|
||||
|
||||
dnl
|
||||
dnl Checks for library functions.
|
||||
dnl
|
||||
AC_CHECK_FUNCS(gettimeofday mkdtemp)
|
||||
|
||||
dnl
|
||||
dnl zlib
|
||||
dnl
|
||||
AC_CHECK_LIB(z, zlibVersion,
|
||||
[ AC_CHECK_HEADER(zlib.h,
|
||||
have_zlib=yes
|
||||
ZLIB_LIBS="-lz",)], AC_MSG_ERROR(zlib needed))
|
||||
AC_SUBST(ZLIB_LIBS)
|
||||
|
||||
|
||||
|
||||
dnl
|
||||
dnl check pkg-config program
|
||||
dnl
|
||||
dnl AC_PATH_PROG(PKGCONFIG,pkg-config,no)
|
||||
dnl enable_pkgc=no
|
||||
dnl if test x"$PKGCONFIG" != "xno"; then
|
||||
dnl AC_ARG_ENABLE(pkg-config,
|
||||
dnl [ --enable-pkg-config Enable pkg-config for check glib|gtk [default=no]],
|
||||
dnl [enable_pkgc=yes])
|
||||
dnl fi
|
||||
|
||||
dnl
|
||||
dnl check glib
|
||||
dnl
|
||||
AM_PATH_GLIB_2_0(2.0.0,
|
||||
AC_DEFINE(ENABLE_GLIB,1,[Define this if you have glib >= 2.0.0]),
|
||||
AC_MSG_ERROR(*** check for glib-2.x failed ***)
|
||||
)
|
||||
|
||||
|
||||
dnl if test x"$enable_pkgc" = "xno"; then
|
||||
dnl AM_PATH_GLIB(1.2.0,
|
||||
dnl AC_DEFINE(ENABLE_GLIB,1,[Define this if you have glib >= 1.2.0]),must_gtk=yes)
|
||||
dnl if test x"$must_gtk" = "xyes"; then
|
||||
dnl AC_MSG_RESULT("May be 1.0.x ?. You can't be disable gtk")
|
||||
dnl fi
|
||||
dnl else
|
||||
dnl AC_ARG_WITH(glib-target,
|
||||
dnl [ --with-glib-target target glib [default=glib]],
|
||||
dnl [glibtarget="glib$withval"],[glibtarget="glib"])
|
||||
dnl PKG_CHECK_MODULES(BASE_DEPENDENCEIS, $glibtarget >= 1.2.0)
|
||||
dnl GLIB_CFLAGS="`$PKGCONFIG --cflags $glibtarget`"
|
||||
dnl GLIB_LIBS="`$PKGCONFIG --libs $glibtarget`"
|
||||
dnl AC_DEFINE(ENABLE_GLIB,1,[Define this if you have glib >= 1.2.0])
|
||||
dnl fi
|
||||
|
||||
dnl
|
||||
dnl check for gtk
|
||||
dnl
|
||||
AC_ARG_ENABLE(gtk,
|
||||
[ --enable-gtk Enable gtk-based widget [default=yes]],,
|
||||
[enable_gtk=yes])
|
||||
|
||||
have_gtk=no
|
||||
if test "x$enable_gtk" = xyes; then
|
||||
AM_PATH_GTK_2_0(2.0.0,
|
||||
AC_DEFINE(ENABLE_GTK,1,[Define this if you have gtk+ >= 2.0.0]),
|
||||
AC_MSG_ERROR(*** check for GTK failed ***)
|
||||
)
|
||||
have_gtk=yes
|
||||
fi
|
||||
|
||||
|
||||
dnl if test x"$enable_gtk" = "xyes"; then
|
||||
dnl if test x"$enable_pkgc" = "xno"; then
|
||||
dnl AM_PATH_GTK(1.0.0,
|
||||
dnl AC_DEFINE(ENABLE_GTK,1,[Define this if you have gtk+ >= 1.0.0]),
|
||||
dnl AC_MSG_ERROR(*** check for GTK failed ***))
|
||||
dnl else
|
||||
dnl AC_ARG_WITH(gtk-target,
|
||||
dnl [ --with-gtk-target target gtk+ [default=gtk+]],
|
||||
dnl [gtktarget="gtk+$withval"],[gtktarget="gtk+"])
|
||||
dnl PKG_CHECK_MODULES(BASE_DEPENDENCEIS, $gtktarget >= 1.0.0)
|
||||
dnl GTK_CFLAGS="`$PKGCONFIG --cflags $gtktarget`"
|
||||
dnl GTK_LIBS="`$PKGCONFIG --libs $gtktarget`"
|
||||
dnl AC_DEFINE(ENABLE_GTK,1,[Define this if you have gtk+ >= 1.0.0])
|
||||
dnl fi
|
||||
dnl have_gtk=yes
|
||||
dnl fi
|
||||
|
||||
AM_CONDITIONAL(HAVE_GTK, test "x$have_gtk" = xyes)
|
||||
SRC_MENU=
|
||||
if test "x$have_gtk" = xyes ; then
|
||||
SRC_MENU="menu.c menu_callback.c menu_gui.c s39init.c"
|
||||
else
|
||||
SRC_MENU="menu_null.c"
|
||||
fi
|
||||
AC_SUBST(SRC_MENU)
|
||||
|
||||
|
||||
dnl
|
||||
dnl audio check
|
||||
dnl
|
||||
AC_ARG_ENABLE(audio,
|
||||
[ --enable-audio[=mode_list] Enable audio (Specify comma separated mode list):
|
||||
default: Automatically select audio device.
|
||||
oss: OSS (Open Sound System) device
|
||||
sun: sun style interface
|
||||
alsa: ALSA pcm device
|
||||
esd: EsounD],
|
||||
[ enable_audio=$enableval],
|
||||
[ enable_audio=yes])
|
||||
|
||||
dnl yes -> default
|
||||
test "x$enable_audio" = xyes && enable_audio=default
|
||||
|
||||
if test "x$enable_audio" != xno; then
|
||||
for i in `echo $enable_audio | sed 's/,/ /g'`; do
|
||||
eval "enable_$i=yes"
|
||||
done
|
||||
if test "x$enable_default" = xyes; then
|
||||
enable_audio=default
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "x$enable_audio" = xdefault; then
|
||||
case "$target" in
|
||||
*-*-linux*)
|
||||
enable_alsa=yes
|
||||
;;
|
||||
*-*-freebsd*|*-*-netbsd*|*-*-openbsd*)
|
||||
enable_oss=yes
|
||||
;;
|
||||
*-*-solaris*)
|
||||
enable_sun=yes
|
||||
;;
|
||||
*)
|
||||
enable_esd=yes
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
|
||||
dnl
|
||||
dnl Sun style audio interface
|
||||
dnl
|
||||
have_sunaudio=no
|
||||
if test "x$enable_sun" = xyes; then
|
||||
AC_MSG_CHECKING(for Sun audio support)
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
|
||||
#include <sys/types.h>
|
||||
#include <sys/audioio.h>
|
||||
]], [[
|
||||
audio_info_t audio_info;
|
||||
AUDIO_INITINFO(&audio_info);
|
||||
]])],[
|
||||
have_sunaudio=yes
|
||||
],[])
|
||||
AC_MSG_RESULT($have_sunaudio)
|
||||
if test "x$have_sunaudio" = xyes; then
|
||||
AC_DEFINE(ENABLE_SUNAUDIO,1,[define this if you use sun stlye audio interface])
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
dnl
|
||||
dnl OSS
|
||||
dnl
|
||||
have_ossaudio=no
|
||||
if test "x$enable_oss" = xyes; then
|
||||
AC_MSG_CHECKING(for OSS audio support)
|
||||
case "$target" in
|
||||
*-*-netbsd*)
|
||||
EXTRALIBS="$EXTRALIBS -lossaudio"
|
||||
have_ossaudio=yes
|
||||
;;
|
||||
*-*-openbsd*)
|
||||
EXTRACFLAGS="$EXTRACFLAGS -I/usr/local/lib/oss/include"
|
||||
EXTRALIBS="$EXTRALIBS -lossaudio"
|
||||
have_ossaudio=yes
|
||||
;;
|
||||
*-*-linux*|*-*-freebsd*)
|
||||
have_ossaudio=yes
|
||||
;;
|
||||
*)
|
||||
have_ossaudio=no
|
||||
;;
|
||||
esac
|
||||
AC_MSG_RESULT($have_ossaudio)
|
||||
if test "x$have_ossaudio" = xyes; then
|
||||
AC_DEFINE(ENABLE_OSS,1,[define this if you use OSS audio interface])
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
dnl
|
||||
dnl ALSA
|
||||
dnl
|
||||
dnl if test x"$enable_alsa" = "xyes"; then
|
||||
dnl AM_PATH_ALSA(0.5.0,
|
||||
dnl [ AC_DEFINE(ENABLE_ALSA,1,[Define this if you have Alsa (libasound) installed])
|
||||
dnl if test x"$have_alsa09" = "xyes"; then
|
||||
dnl AC_DEFINE(ENABLE_ALSA09,1,[Define this if you have alsa 0.9.x and more installed])
|
||||
dnl fi
|
||||
dnl if test x"$have_alsa05" = "xyes"; then
|
||||
dnl AC_DEFINE(ENABLE_ALSA05,1,[Define this if you have alsa 0.5.x installed])
|
||||
dnl fi
|
||||
dnl ],
|
||||
dnl AC_MSG_RESULT(*** All of ALSA dependent parts will be disabled ***))
|
||||
dnl fi
|
||||
have_alsa=no
|
||||
if test "x$enable_alsa" = xyes; then
|
||||
AM_PATH_ALSA(0.9.0,
|
||||
[ AC_DEFINE(ENABLE_ALSA,1,[Define this if you have Alsa (libasound) installed])
|
||||
have_alsa=yes
|
||||
],
|
||||
AC_MSG_RESULT(*** All of ALSA dependent parts will be disabled ***))
|
||||
fi
|
||||
|
||||
|
||||
dnl
|
||||
dnl ESD
|
||||
dnl
|
||||
no_esd=yes
|
||||
if test "x$enable_esd" = xyes; then
|
||||
AM_PATH_ESD(0.2.8,
|
||||
AC_DEFINE(ENABLE_ESD,1,[Define this if you have ESD (libesd) installed]),
|
||||
AC_MSG_RESULT(*** All of ESD dependent parts will be disabled ***))
|
||||
fi
|
||||
|
||||
|
||||
dnl
|
||||
dnl Turn on default audio output mode
|
||||
dnl
|
||||
DEFAULT_PLAYMODE=
|
||||
AC_ARG_WITH(default-output,
|
||||
[ --with-default-output=<mode> Specify default output mode (optional):
|
||||
default|oss|alsa|esd|sun],
|
||||
[ if test "$enable_audio" != no; then
|
||||
DEFAULT_PLAYMODE=$withval
|
||||
eval "enable_$DEFAULT_PLAYMODE=yes"
|
||||
else
|
||||
AC_MSG_WARN(--with-default-output=$withval: audio is not enabled)
|
||||
fi]
|
||||
)
|
||||
AC_MSG_CHECKING(default output mode)
|
||||
if test "x$DEFAULT_PLAYMODE" = x; then
|
||||
DEFAULT_PLAYMODE=`echo $enable_audio | sed 's/,.*//'`
|
||||
fi
|
||||
case ".$DEFAULT_PLAYMODE" in
|
||||
.default) def_am=AUDIO_PCM_ANY ;;
|
||||
.oss) def_am=AUDIO_PCM_OSS ;;
|
||||
.alsa) def_am=AUDIO_PCM_ALSA ;;
|
||||
.esd) def_am=AUDIO_PCM_ESD ;;
|
||||
.sun) def_am=AUDIO_PCM_SUN ;;
|
||||
*) def_am= ;;
|
||||
esac
|
||||
AC_MSG_RESULT($def_am)
|
||||
if test "x$def_am" != x; then
|
||||
AC_DEFINE_UNQUOTED(DEFAULT_AUDIO_MODE, $def_am, [default audio mode])
|
||||
fi
|
||||
|
||||
|
||||
|
||||
dnl
|
||||
dnl OSS/ALSA/ESD
|
||||
dnl
|
||||
SRC_AUDIO=
|
||||
if test "x$have_ossaudio" = xyes; then
|
||||
SRC_AUDIO="$SRC_AUDIO audio_oss.c"
|
||||
fi
|
||||
if test "x$have_sunaudio" = xyes; then
|
||||
SRC_AUDIO="$SRC_AUDIO audio_sun.c"
|
||||
fi
|
||||
if test "x$have_alsa" = xyes; then
|
||||
SRC_AUDIO="$SRC_AUDIO audio_alsa.c"
|
||||
fi
|
||||
if test "x$no_esd" != xyes; then
|
||||
SRC_AUDIO="$SRC_AUDIO audio_esd.c"
|
||||
fi
|
||||
AC_SUBST(SRC_AUDIO)
|
||||
|
||||
dnl
|
||||
dnl cdrom device
|
||||
dnl
|
||||
AC_ARG_ENABLE(cdrom,
|
||||
[ --enable-cdrom[=mode_list] Enable CD-adio (Specify comma separated mode list):
|
||||
(default: Automatically select cdrom device)
|
||||
linux: linux API (Linux/Solaris)
|
||||
bsd: BSD API (FreeBSD/NetBSD/OpenBSD)
|
||||
mp3: play mp3 file using external/piped player],
|
||||
[ enable_cdrom=$enableval],
|
||||
[ enable_cdrom=yes])
|
||||
|
||||
dnl yes -> default
|
||||
test "x$enable_cdrom" = xyes -a enable_cdrom=default
|
||||
|
||||
if test "x$enable_cdrom" != xno; then
|
||||
for i in `echo $enable_cdrom | sed 's/,/ /g'`; do
|
||||
eval "enable_cd_$i=yes"
|
||||
done
|
||||
if test "x$enable_cd_default" = xyes; then
|
||||
enable_cdrom=default
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "x$enable_cdrom" = xdefault; then
|
||||
case "$target" in
|
||||
*-*-linux*|*-*-solaris*)
|
||||
enable_cd_linux=yes
|
||||
;;
|
||||
*-*-freebsd*|*-*-netbsd*|*-*-openbsd*)
|
||||
enable_cd_bsd=yes
|
||||
;;
|
||||
*-dec-*)
|
||||
enable_cd_mp3=yes
|
||||
;;
|
||||
*)
|
||||
AC_MSG_WARN(No --enable-cdrom=default cdrom for $target)
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
SRC_CDROM=
|
||||
if test "x$enable_cd_linux" = xyes; then
|
||||
SRC_CDROM="cdrom.Linux.c"
|
||||
AC_DEFINE(ENABLE_CDROM_LINUX,1,[Define this if your use cdrom ioctl in linux or Solaris])
|
||||
elif test "x$enable_cd_bsd" = xyes; then
|
||||
SRC_CDROM="$SRC_CROM cdrom.FreeBSD.c"
|
||||
AC_DEFINE(ENABLE_CDROM_BSD,1,[Define this if you use cdrom iotctl in *BSD])
|
||||
else
|
||||
SRC_CDROM="$SRC_CDROM cdrom.empty.c"
|
||||
fi
|
||||
if test "x$enable_cd_mp3" = xyes; then
|
||||
SRC_CDROM="$SRC_CDROM cdrom.mp3.c"
|
||||
AC_DEFINE(ENABLE_CDROM_MP3,1,[Define this if you use external player for cdrom audio])
|
||||
fi
|
||||
AC_SUBST(SRC_CDROM)
|
||||
|
||||
AC_ARG_WITH(cdromdev, [ --with-cdromdev=# CDROM Device Name. [default=/dev/cdrom]], cdromdev="$withval",cdromdev="/dev/cdrom")
|
||||
AC_DEFINE_UNQUOTED(CDROM_DEVICE,"$cdromdev",[cdrom device])
|
||||
|
||||
dnl
|
||||
dnl Check if X_LOCALE definition is necessary
|
||||
dnl
|
||||
AC_ARG_WITH(locale, [ --with-locale=LOCALE locale name you want to use(ex. ja_JP.ujis) ])
|
||||
AC_MSG_CHECKING(need -DX_LOCALE)
|
||||
|
||||
AC_RUN_IFELSE([AC_LANG_SOURCE([[
|
||||
#include <stdio.h>
|
||||
#include <locale.h>
|
||||
|
||||
int
|
||||
main ()
|
||||
{
|
||||
return setlocale (LC_ALL, "${with_locale}") == NULL;
|
||||
}]])],[need_x_locale=no],[need_x_locale=yes],[need_x_locale=no])
|
||||
AC_MSG_RESULT($need_x_locale)
|
||||
|
||||
if test "x$need_x_locale" = xyes; then
|
||||
EXTRACFLAGS="$EXTRACFLAGS -DX_LOCALE"
|
||||
fi
|
||||
|
||||
dnl
|
||||
dnl OS dependent param
|
||||
dnl
|
||||
case "$target" in
|
||||
*-*-linux*)
|
||||
;;
|
||||
*-*-freebsd*)
|
||||
EXTRALIBS="$EXTRALIBS -lxpg4"
|
||||
EXTRACFLAGS="$EXTRACFLAGS -I/usr/local/include"
|
||||
EXTRALDFLAGS="$EXTRALDFLAGS -L/usr/local/lib"
|
||||
;;
|
||||
sparc-*)
|
||||
chk_rgb=yes
|
||||
;;
|
||||
esac
|
||||
|
||||
dnl
|
||||
dnl Force to set Color RGB order (need to check for sparc)
|
||||
dnl
|
||||
if test "x$chk_rgb" = xyes; then
|
||||
AC_ARG_ENABLE(bgr,
|
||||
[ --enable-bgr Color order is BGR [default is no for most arch]
|
||||
You should check whether your X server is RGB or
|
||||
BGR order, especially in sparc architecture.],,
|
||||
[ enable_bgr=yes ])
|
||||
fi
|
||||
if test "x$enable_bgr" = xyes; then
|
||||
AC_DEFINE(BGR_ORDER,1,[Define this if X11 Pixmap color order is BGR])
|
||||
else
|
||||
AC_DEFINE(RGB_ORDER,1,[Define this if X11 Pixmap color order is RGB])
|
||||
fi
|
||||
|
||||
dnl
|
||||
dnl set OSS param
|
||||
dnl
|
||||
if test "x$have_ossaudio" = xyes ; then
|
||||
AC_ARG_WITH(audiodev,[ --with-oss-audiodev=DEVFILE DSP DEVICE],
|
||||
audiodev="$withval",ossaudiodev="/dev/dsp")
|
||||
AC_ARG_WITH(mixerdev,[ --with-oss-mixerdev=DEVFILE MIXER DEVICE],
|
||||
mixerdev="Ec$withval",ossmixerdev="/dev/mixer")
|
||||
AUDIODEV_OSS=$ossaudiodev
|
||||
MIXERDEV_OSS=$ossmixerdev
|
||||
AC_DEFINE_UNQUOTED(AUDIODEV_OSS,"$AUDIODEV_OSS",[aduio device])
|
||||
AC_DEFINE_UNQUOTED(MIXERDEV_OSS,"$MIXERDEV_OSS",[mixer device])
|
||||
fi
|
||||
|
||||
|
||||
dnl
|
||||
dnl Select Midi Play Methods
|
||||
dnl
|
||||
AC_ARG_ENABLE(midi,
|
||||
[ --enable-midi[=mode_list] Enable midi (Specify comma separated mode list):
|
||||
extp: External midi player(default)
|
||||
raw: Raw midi interface
|
||||
seq: Sequencer interface],
|
||||
[ enable_midi=$enableval],
|
||||
[ enable_midi=yes])
|
||||
|
||||
dnl yes -> default
|
||||
test "x$enable_midi" = xyes && enable_midi=default
|
||||
|
||||
if test "x$enable_midi" != xno; then
|
||||
for i in `echo $enable_midi | sed 's/,/ /g'`; do
|
||||
eval "enable_midi_$i=yes"
|
||||
done
|
||||
fi
|
||||
|
||||
if test "x$enable_midi" = xdefault; then
|
||||
case "$target" in
|
||||
*)
|
||||
enable_midi_extp=yes
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
SRC_MIDI=
|
||||
if test "x$enable_midi_extp" = xyes; then
|
||||
SRC_MIDI="midi.extplayer.c"
|
||||
AC_DEFINE(ENABLE_MIDI_EXTPLAYER,1,[define this if you use external midi player])
|
||||
fi
|
||||
if test "x$enable_midi_raw" = xyes || test "x$enable_midi_seq" = xyes; then
|
||||
SRC_MIDI="$SRC_MIDI midi.rawmidi.c midifile.c"
|
||||
if test "x$enable_midi_raw" = xyes; then
|
||||
AC_DEFINE(ENABLE_MIDI_RAWMIDI,1,[define this if you use oss raw midi interface])
|
||||
fi
|
||||
if test "x$enable_midi_seq" = xyes; then
|
||||
AC_DEFINE(ENABLE_MIDI_SEQMIDI,1,[define thsi if you use oss sequencer interface])
|
||||
fi
|
||||
fi
|
||||
AC_SUBST(SRC_MIDI)
|
||||
|
||||
dnl
|
||||
dnl set midi player
|
||||
dnl
|
||||
AC_ARG_WITH(midi-player,[ --with-midi-player=xxx External Midi Player [default=playmidi -4]],
|
||||
midiplayer="$withval",midiplayer="playmidi -4")
|
||||
AC_DEFINE_UNQUOTED(MIDI_PLAYER,"$midiplayer",[midi player])
|
||||
|
||||
dnl
|
||||
dnl Quiet mode for external midi player
|
||||
dnl
|
||||
AC_ARG_ENABLE(qmidi,[ --enable-qmidi No display midi stdout],
|
||||
AC_DEFINE(QUITE_MIDI,1,[define this if you stop midi stdout]))
|
||||
|
||||
dnl
|
||||
dnl Midi device for rawmidi mode
|
||||
dnl
|
||||
AC_ARG_WITH(mididev, [ --with-mididev=# MIDI Raw Device Name. [default=/dev/midi]], mididev="$withval", mididev="/dev/midi")
|
||||
AC_DEFINE_UNQUOTED(MIDI_DEVICE,"$mididev",[midi device])
|
||||
|
||||
dnl
|
||||
dnl Sequencer device for seqmidi mode
|
||||
dnl
|
||||
AC_ARG_WITH(seqdev, [ --with-seqdev=# MIDI Sequencer Device Name. [default=/dev/sequencer]], mididev="$withval", seqdev="/dev/sequencer")
|
||||
AC_DEFINE_UNQUOTED(SEQ_DEVICE,"$seqdev",[sequencer device])
|
||||
|
||||
|
||||
dnl
|
||||
dnl general cachae size
|
||||
dnl
|
||||
AC_ARG_WITH(cachesize,[ --with-cachesize=# General Cache size (MB)],
|
||||
AC_DEFINE_UNQUOTED(CACHE_TOTALSIZE,$withval,[General Cache size (MB)]))
|
||||
|
||||
|
||||
dnl
|
||||
dnl SDL
|
||||
dnl
|
||||
SRC_GRAPHDEV="xcore_draw.c xcore_video.c xcore_mode.c xcore_event.c xcore_cursor.c xcore_maskupdate.c image.c"
|
||||
AC_ARG_ENABLE(sdl,
|
||||
[ --enable-sdl SDL [default=no] ],,
|
||||
[ enable_sdl=no ])
|
||||
if test "x$enable_sdl" = xyes ; then
|
||||
KEEPLIBS=$LIBS
|
||||
KEEPCFLAGS=$CFLAGS
|
||||
KEEPLDFLAGS=$LDFLAGS
|
||||
AM_PATH_SDL(1.0.0,have_sdl=yes,have_sdl=no)
|
||||
LIBS=$SDL_LIBS
|
||||
CFLAGS=$SDL_CFLAGS
|
||||
AC_CHECK_LIB(SDL,SDL_NumJoysticks,have_sdljoy=yes)
|
||||
AC_MSG_CHECKING(for SDL RLE accell)
|
||||
sdlrle=no
|
||||
sdlralpha=no
|
||||
AC_RUN_IFELSE([AC_LANG_SOURCE([[
|
||||
#include <SDL.h>
|
||||
int main( int argc,char **argv) {
|
||||
#ifndef SDL_RLEACCEL
|
||||
exit(1);
|
||||
#else
|
||||
exit(0);
|
||||
#endif
|
||||
}
|
||||
]])],[AC_MSG_RESULT("yes");sdlrle=yes],[AC_MSG_RESULT("no")],[AC_MSG_RESULT("unknown")
|
||||
])
|
||||
if test "x$sdlrle" = xyes ; then
|
||||
AC_MSG_CHECKING(for SDL alpha value)
|
||||
AC_RUN_IFELSE([AC_LANG_SOURCE([[
|
||||
#include <SDL.h>
|
||||
int main( int argc,char **argv) {
|
||||
SDL_Surface *s1,*s2;
|
||||
unsigned short *x;
|
||||
s1=SDL_AllocSurface(SDL_SWSURFACE,8,8,16,0,0,0,0);
|
||||
s2=SDL_AllocSurface(SDL_SWSURFACE,8,8,16,0,0,0,0);
|
||||
SDL_FillRect(s1,NULL,0);
|
||||
SDL_FillRect(s2,NULL,0xFFFF);
|
||||
SDL_SetAlpha(s2,SDL_SRCALPHA|SDL_RLEACCEL,255);
|
||||
SDL_BlitSurface(s2,NULL,s1,NULL);
|
||||
x=s1->pixels;
|
||||
if( *x )
|
||||
exit(1);
|
||||
exit(0);
|
||||
}
|
||||
]])],[AC_MSG_RESULT("normal")],[AC_MSG_RESULT("revese");sdlralpha=yes],[AC_MSG_RESULT("unknown")
|
||||
])
|
||||
fi
|
||||
LIBS=$KEEPLIBS
|
||||
CFLAGS=$KEEPCFLAGS
|
||||
LDFLAGS=$KEEPLDFLAGS
|
||||
fi
|
||||
if test "x$have_sdl" = xyes ; then
|
||||
AC_DEFINE(ENABLE_SDL,1,[define this if you use SDL])
|
||||
SDL=1
|
||||
SRC_GRAPHDEV="sdl_video.c sdl_mode.c sdl_draw.c sdl_event.c sdl_image.c sdl_cursor.c image.c"
|
||||
AC_SUBST(SDL)
|
||||
if test "x$sdlrle" = xyes ; then
|
||||
AC_DEFINE(HAVE_SDLRLE,1,[define this if you have SDLRLE])
|
||||
fi
|
||||
if test "x$sdlralpha" = xyes ; then
|
||||
AC_DEFINE(HAVE_SDLRALPHA,1,[define this if you have SDLRALPHA])
|
||||
fi
|
||||
fi
|
||||
AC_SUBST(SRC_GRAPHDEV)
|
||||
|
||||
dnl
|
||||
dnl joystick
|
||||
dnl
|
||||
AC_ARG_ENABLE(joy,
|
||||
[ --enable-joy Use joystick (only linux and SDL) [default=no]],,
|
||||
[ enable_joy=no] )
|
||||
if test "x$enable_joy" = xyes ; then
|
||||
if test "x$have_sdljoy" = xyes ; then
|
||||
AC_DEFINE(HAVE_SDLJOY,1,[define this if you use SDL joystick interface])
|
||||
JOY_S=joystick_sdl
|
||||
else
|
||||
AC_CHECK_HEADERS(linux/joystick.h,
|
||||
[JOY_S=joystick_linux],
|
||||
[JOY_S=joystick_dmy])
|
||||
fi
|
||||
else
|
||||
JOY_S=joystick_dmy
|
||||
fi
|
||||
AC_SUBST(JOY_S)
|
||||
|
||||
AC_ARG_WITH(joydev, [ --with-joydev=# Joystick Device Name. [default=/dev/js0]], joydev="$withval",joydev="/dev/js0")
|
||||
AC_DEFINE_UNQUOTED(JOY_DEVICE,"$joydev",[joystick device])
|
||||
|
||||
|
||||
dnl
|
||||
dnl FreeType (Font)
|
||||
dnl
|
||||
SRC_FONT=
|
||||
if test "x$have_sdl" != xyes; then
|
||||
SRC_FONT="font_x11.c"
|
||||
AC_CHECK_LIB(X11, XmbTextEscapement, X_LIBS="$X_LIBS -lX11", AC_MSG_ERROR(libX11 needed))
|
||||
AC_DEFINE(ENABLE_X11FONT,1,[define this if you use X11 font interface])
|
||||
fi
|
||||
AC_CHECK_FT2(2.0.0,
|
||||
AC_DEFINE(ENABLE_FT2,1,[Define this if you have freetype2 installed]))
|
||||
if test "x$no_ft" != xyes; then
|
||||
SRC_FONT="$SRC_FONT font_freetype2.c cp932tojis0213.c"
|
||||
EXTRALIBS="$EXTRALIBS $FT2_LIBS"
|
||||
EXTRACFLAGS="$EXTRACFLAGS $FT2_CFLAGS"
|
||||
fi
|
||||
dnl
|
||||
dnl check null
|
||||
if test x"$SRC_FONT" = "x"; then
|
||||
AC_MSG_ERROR("*** No font device available ***");
|
||||
fi
|
||||
AC_SUBST(SRC_FONT)
|
||||
|
||||
|
||||
dnl
|
||||
dnl XFree86extendions
|
||||
dnl
|
||||
AC_CHECK_LIB(Xxf86vm, XF86VidModeQueryExtension,
|
||||
[ AC_DEFINE(HAVE_XF86VMODE,1,[Define this if you have libXxf86vm installed])
|
||||
XXF86VM_LIB="-lXxf86vm"],,
|
||||
$X_LIBS $X_PRE_LIBS -lXext -lX11 $X_EXTRA_LIBS)
|
||||
X_LIBS="$X_LIBS $XXF86VM_LIB -lXext"
|
||||
|
||||
AC_ARG_ENABLE(xrender,
|
||||
[ --enable-xrender Use XRender extension (future work) [default=disable]],,
|
||||
enable_xrender="no")
|
||||
if test "x$enable-xrender" = xyes; then
|
||||
AC_DEFINE(ENABLE_XRENDER,1,[define this if you use X11 render etension])
|
||||
fi
|
||||
|
||||
|
||||
dnl
|
||||
dnl MMX
|
||||
dnl
|
||||
SRC_ABLEND=
|
||||
AC_PATH_PROG(HAVE_NASM,nasm,no)
|
||||
if test "x$HAVE_NASM" != xno; then
|
||||
case "$target" in
|
||||
*i*86-*)
|
||||
AC_ARG_ENABLE(mmx,
|
||||
[ --enable-mmx MMX support [default=yes]],,
|
||||
[ enable_mmx=yes ])
|
||||
if test "x$enable_mmx" = xyes ; then
|
||||
AC_DEFINE(ENABLE_MMX,1,[define this if you want to use MMX instructions])
|
||||
SRC_ABLEND="alpha_blend16.s haveunit.s"
|
||||
fi;;
|
||||
esac
|
||||
fi
|
||||
AC_SUBST(SRC_ABLEND)
|
||||
|
||||
|
||||
dnl
|
||||
dnl Vorbis input
|
||||
dnl
|
||||
XIPH_PATH_OGG(
|
||||
[ XIPH_PATH_VORBIS([],
|
||||
AC_MSG_ERROR([OGG/VORBIS needed]))
|
||||
],
|
||||
AC_MSG_ERROR([OGG/VORBIS needed]))
|
||||
AM_CONDITIONAL(HAVE_VORBIS, [test "x$no_ogg" != xyes -a "x$no_vorbis" != xyes])
|
||||
|
||||
dnl
|
||||
dnl Test for libjpeg
|
||||
dnl
|
||||
JPEG_CFLAGS=""
|
||||
JPEG_LIBS=""
|
||||
available_jpeg=no
|
||||
AC_ARG_WITH(libjpeg-prefix,
|
||||
[ --with-libjpeg-prefix=PFX Prefix where libjpeg is install(optional)], libjpeg_prefix="$withval", libjpeg_prefix="")
|
||||
|
||||
if test "x$libjpeg_prefix" != x ; then
|
||||
JPEG_CFLAGS="-I$libjpeg_prefix/include"
|
||||
JPEG_LIBS="-L$libjpeg_prefix/lib"
|
||||
fi
|
||||
|
||||
ac_save_CFLAGS="$CFLAGS"
|
||||
ac_save_LIBS="$LIBS"
|
||||
CFLAGS="$CFLAGS $JPEG_CFLAGS"
|
||||
LIBS="$LIBS $JPEG_LIBS"
|
||||
|
||||
AC_CHECK_LIB(jpeg, jpeg_destroy_decompress,
|
||||
available_jpeg=yes,
|
||||
available_jpeg=no)
|
||||
|
||||
if test "x$available_jpeg" = xyes; then
|
||||
AC_MSG_CHECKING([for jpeglib.h])
|
||||
AC_PREPROC_IFELSE([AC_LANG_SOURCE([[#include <stdio.h>
|
||||
#undef PACKAGE
|
||||
#undef VERSION
|
||||
#undef HAVE_STDLIB_H
|
||||
#include <jpeglib.h>]])],[available_jpeg=yes],[available_jpeg=no])
|
||||
AC_MSG_RESULT($available_jpeg)
|
||||
if test "x$available_jpeg" = xyes; then
|
||||
JPEG_LIBS="$JPEG_LIBS -ljpeg"
|
||||
fi
|
||||
fi
|
||||
CFLAGS="$ac_save_CFLAGS"
|
||||
LIBS="$ac_save_LIBS"
|
||||
|
||||
if test "x$available_jpeg" != xyes; then
|
||||
AC_MSG_ERROR(libjpeg needed)
|
||||
fi
|
||||
|
||||
AM_CONDITIONAL(ENABLE_JPEG, test "x$available_jpeg" = xyes)
|
||||
AC_SUBST(JPEG_CFLAGS)
|
||||
AC_SUBST(JPEG_LIBS)
|
||||
|
||||
enable_jpeg=$available_jpeg
|
||||
|
||||
|
||||
dnl
|
||||
dnl debugging
|
||||
dnl
|
||||
AC_ARG_ENABLE(debug, [ --enable-debug Turn on debugging [default=no]],,enable_debug=no)
|
||||
|
||||
if test "x$enable_debug" = xyes; then
|
||||
DEBUG_CFLAGS="-g"
|
||||
if test "x$GCC" = xyes; then
|
||||
DEBUG_CFLAGS="$DEBUG_CFLAGS -Wall"
|
||||
fi
|
||||
AC_DEFINE(DEBUG,1,[Define this if you want to Debug])
|
||||
else
|
||||
CFLAGS="`echo $CFLAGS | sed 's/-g//g'`"
|
||||
DEBUG_CFLAGS=""
|
||||
fi
|
||||
AC_SUBST(DEBUG_CFLAGS)
|
||||
|
||||
|
||||
dnl
|
||||
dnl Some infos:
|
||||
dnl
|
||||
echo "xsystem35 summary:"
|
||||
echo "------------------"
|
||||
|
||||
dnl Audio
|
||||
echo " * audio output:"
|
||||
if test "x$have_ossaudio" = xyes; then
|
||||
echo " - oss (Open Sound System)"
|
||||
fi
|
||||
if test "x$have_sunaudio" = xyes; then
|
||||
echo " - sun ()"
|
||||
fi
|
||||
if test "x$have_alsa" = xyes; then
|
||||
echo " - alsa"
|
||||
fi
|
||||
if test "x$no_esd" != xyes; then
|
||||
echo " - esd (Enlightened Sound Daemon)"
|
||||
fi
|
||||
echo ""
|
||||
|
||||
dnl CDROM
|
||||
echo " * cdrom output:"
|
||||
if test "x$enable_cd_linux" = xyes; then
|
||||
echo " - Linux|Solaris ioctl"
|
||||
fi
|
||||
if test "x$enable_cd_bsd" = xyes; then
|
||||
echo " - *BSD ioctl"
|
||||
fi
|
||||
if test "x$enable_cd_mp3" = xyes; then
|
||||
echo " - External player (wav|mp3|ogg...)"
|
||||
fi
|
||||
echo ""
|
||||
|
||||
dnl MIDI
|
||||
echo " * midi output:"
|
||||
if test "x$enable_midi_raw" = xyes; then
|
||||
echo " - raw midi interface"
|
||||
fi
|
||||
if test "x$enable_midi_seq" = xyes; then
|
||||
echo " - OSS sequencer interface"
|
||||
fi
|
||||
if test "x$enable_midi_extp" = xyes; then
|
||||
echo " - External MIDI Player"
|
||||
fi
|
||||
echo ""
|
||||
|
||||
dnl font
|
||||
echo " * font device:"
|
||||
if test "x$have_sdl" != xyes; then
|
||||
echo " - x11 font"
|
||||
fi
|
||||
if test "x$no_ft" != xyes; then
|
||||
echo " - freetype2 library"
|
||||
fi
|
||||
echo ""
|
||||
|
||||
echo "----"
|
||||
|
||||
AC_SUBST(EXTRACFLAGS)
|
||||
AC_SUBST(EXTRALIBS)
|
||||
AC_SUBST(EXTRALDFLAGS)
|
||||
AC_CONFIG_FILES([
|
||||
po/Makefile.in
|
||||
Makefile
|
||||
xsystem35.spec
|
||||
modules/ShArray/Makefile
|
||||
modules/ShCalc/Makefile
|
||||
modules/ShString/Makefile
|
||||
modules/ShPort/Makefile
|
||||
modules/nDEMO/Makefile
|
||||
modules/nDEMOE/Makefile
|
||||
modules/NIGHTDLL/Makefile
|
||||
modules/oujimisc/Makefile
|
||||
modules/RandMT/Makefile
|
||||
modules/Math/Makefile
|
||||
modules/Gpx/Makefile
|
||||
modules/MsgSkip/Makefile
|
||||
modules/ShSound/Makefile
|
||||
modules/ShGraph/Makefile
|
||||
modules/dDemo/Makefile
|
||||
modules/oDEMO/Makefile
|
||||
modules/SACT/Makefile
|
||||
modules/tDemo/Makefile
|
||||
modules/eDemo/Makefile
|
||||
modules/eeDemo/Makefile
|
||||
modules/Confirm/Makefile
|
||||
modules/AliceLogo/Makefile
|
||||
modules/NightDemonDemo/Makefile
|
||||
modules/lib/Makefile
|
||||
modules/Makefile
|
||||
src/Makefile
|
||||
macros/Makefile
|
||||
])
|
||||
AC_OUTPUT
|
||||
@@ -1,7 +0,0 @@
|
||||
# 20世紀アリス これDPS? Install infomation
|
||||
# Tag, #origin, #destination
|
||||
ScenarioA, gamedata/*SA.ald, 20cDPS_sa.ald
|
||||
GraphicsA, gamedata/*GA.ald, 20cDPS_ga.ald
|
||||
MidiA, gamedata/*MA.ald, 20cDPS_ma.ald
|
||||
SaveA, , 20cDPS_sa.asd
|
||||
Ain, gamedata/*.ain, system39.ain
|
||||
@@ -1,10 +0,0 @@
|
||||
# 20世紀アリス かえるにょ国にょアリス Install infomation
|
||||
# Tag, #origin, #destination
|
||||
ScenarioA, gamedata/*SA.ald, 20cKaeru_sa.ald
|
||||
GraphicsA, gamedata/*GA.ald, 20cKaeru_ga.ald
|
||||
WaveA, gamedata/*WA.ald, 20cKaeru_wa.ald
|
||||
MidiA, gamedata/*MA.ald, 20cKaeru_ma.ald
|
||||
DataA, gamedata/*DA.ald, 20cKaeru_da.ald
|
||||
Ain, gamedata/*.ain, system39.ain
|
||||
SaveA, , 20cKaeru_sa.asd
|
||||
SaveZ, , 20cKaeru_sz.asd
|
||||
@@ -1,14 +0,0 @@
|
||||
# ATLACH-NACHA Install infomation
|
||||
# Tag, #origin, #destination
|
||||
ScenarioA, gamedata/*sa.ald, atlach_sa.ald
|
||||
GraphicsA, gamedata/*ga.ald, atlach_ga.ald
|
||||
GraphicsB, gamedata/*gb.ald, atlach_gb.ald
|
||||
WaveA, gamedata/*wa.ald, atlach_wa.ald
|
||||
SaveA, , atlach_sa.asd
|
||||
SaveB, , atlach_sb.asd
|
||||
SaveC, , atlach_sc.asd
|
||||
SaveD, , atlach_sd.asd
|
||||
SaveE, , atlach_se.asd
|
||||
SaveF, , atlach_sf.asd
|
||||
SaveG, , atlach_sg.asd
|
||||
SaveH, , atlach_sh.asd
|
||||
@@ -1,6 +0,0 @@
|
||||
# Ningen Kari Install infomation
|
||||
# Tag, #origin, #destination
|
||||
ScenarioA, gamedata/*sa.ald, ningen_sa.ald
|
||||
GraphicsA, gamedata/*ga.ald, ningen_ga.ald
|
||||
WaveA, gamedata/*wa.ald, ningen_wa.ald
|
||||
SaveA, , ningen_sa.asd
|
||||
@@ -1,12 +0,0 @@
|
||||
# Zero-shiki Install infomation
|
||||
# Tag, #origin, #destination
|
||||
ScenarioA, gamedata/*sa.ald, zero_sa.ald
|
||||
GraphicsA, gamedata/*ga.ald, zero_ga.ald
|
||||
WaveA, gamedata/*wa.ald, zero_wa.ald
|
||||
SaveA, , zero_sa.asd
|
||||
SaveB, , zero_sb.asd
|
||||
SaveC, , zero_sc.asd
|
||||
SaveD, , zero_sd.asd
|
||||
SaveE, , zero_se.asd
|
||||
, gamedata/map_data.dat, MAP_DATA.DAT
|
||||
, gamedata/ur_data.dat, UR_DATA.DAT
|
||||
@@ -1,115 +0,0 @@
|
||||
ゲームデータインストール用スクリプト instgame の使い方について
|
||||
|
||||
スクリプト作成 奈良木 さん
|
||||
ドキュメント作成 近間@NAIST
|
||||
0. 目次
|
||||
|
||||
1. ファイルの説明
|
||||
2. 使い方
|
||||
3. その他の情報
|
||||
4. 著作権など
|
||||
5. 連絡先
|
||||
|
||||
|
||||
1. ファイルの説明
|
||||
|
||||
instgame スクリプト本体
|
||||
456atlach.inf ATLACH-NACHA 用設定ファイル (アリスの館456収録)
|
||||
456ningen.inf 人間狩り 用設定ファイル (アリスの館456収録
|
||||
456zero.inf 零式 用設定ファイル (アリスの館456収録)
|
||||
ambi.inf AmbivalenZ for WIN95 用設定ファイル
|
||||
atlach_new.inf ATLACH-NACHA (廉価版) 用設定ファイル
|
||||
darcrows.inf DARCROWS 用設定ファイル
|
||||
diabo.inf DiaboLiQue 用設定ファイル
|
||||
diabo_new.inf DiaboLiQue (廉価版) 用設定ファイル
|
||||
hushaby.inf HushaBy Baby 用設定ファイル
|
||||
katsumi.inf いけないかつみ先生 用設定ファイル
|
||||
kichiku.inf 鬼畜王ランス 用設定ファイル
|
||||
mamatoto.inf ママトト 用設定ファイル
|
||||
mamori.inf 守り神様 用設定ファイル
|
||||
miko.inf 戦巫女 用設定ファイル
|
||||
mugen.inf 無幻泡影 for WIN95 用設定ファイル
|
||||
oudou.inf 王道勇者 用設定ファイル
|
||||
panyo.inf かえるにょぱにょ〜ん 用設定ファイル
|
||||
panyo_new.inf かえるにょぱにょ〜ん(廉価版) 用設定ファイル
|
||||
pascha.inf ぱすてるチャイム 用設定ファイル
|
||||
persiom.inf PERSIOM 用設定ファイル
|
||||
progood.inf ぷろすちゅーでんとGOOD 用設定ファイル
|
||||
rance4.inf ランス4 forWIN 用設定ファイル
|
||||
seeinao.inf SeeIn青 用設定ファイル
|
||||
toushin2.inf 闘神都市II forWIN 用設定ファイル
|
||||
dalk.inf DALK 用設定ファイル (アリスの館456収録)
|
||||
drstop.inf Dr.Stop! 用設定ファイル (アリスの館456収録)
|
||||
rance1.inf Rance1 用設定ファイル (アリスの館456収録)
|
||||
rance2.inf Rance2 用設定ファイル (アリスの館456収録)
|
||||
rance3.inf Rance3 用設定ファイル (アリスの館456収録)
|
||||
toushin.inf 闘神都市 用設定ファイル (アリスの館456収録)
|
||||
zero_new.inf 零式 (廉価版) 用設定ファイル
|
||||
20cKaeru.inf 20世紀アリス かえるにょ国にょアリス 用設定ファイル
|
||||
20cDPS.inf 20世紀アリス これDPS? 用設定ファイル
|
||||
onlyyou_r.inf Only You リクルス 用設定ファイル
|
||||
daiakuji.inf 大悪司 用設定ファイル
|
||||
tsuma.inf 妻みぐい 用設定ファイル
|
||||
|
||||
2. 使い方
|
||||
|
||||
ゲームのCD-ROMをドライブに入れてマウントし、
|
||||
% ./instgame kichiku.inf
|
||||
のように実行します。
|
||||
|
||||
デフォルトではCDROMは/cdromにマウントされているものとしています。
|
||||
また、データのインストール先は ~/game/kichiku/ の下になります。
|
||||
|
||||
デフォルトでは設定用ファイルのファイル名が~/game/の下のディレクトリ名に
|
||||
なります。
|
||||
|
||||
これらのデフォルトの条件を変えるには以下のオプションを使います。
|
||||
|
||||
-c : CD-ROMのマウントされている位置を指定します(default: -c /cdrom)
|
||||
-d : ゲームデータのインストール先を指定します (default: -d ~/game/target>)
|
||||
|
||||
データが正常にコピーされると、~/game/の下にkichiku.grと言うファイルが作成
|
||||
されます。これはゲームデータの場所をプログラム(xsystem35)に知らせるためのも
|
||||
ので、
|
||||
% xsystem35 -gamefile ~/game/kichiku.gr
|
||||
のように指定するのに使います。(「ゲームリソースファイル」とでも呼んで下さい)
|
||||
|
||||
デフォルトでは、*.grというファイルも設定用ファイルのファイル名と同じ名前に
|
||||
なりますが、以下のオプションで変更可能です。
|
||||
|
||||
-g : ゲームリソースファイルのファイル名を指定します
|
||||
(default: -g ~/game/<target>.inf)
|
||||
|
||||
|
||||
3. その他の情報
|
||||
|
||||
その他のオプションに、指定のファイルはCD-ROMからコピーせずにリンクを張る、
|
||||
という指定が出来ます。
|
||||
|
||||
% ./instgame -k Graphics kichiku.inf
|
||||
|
||||
とすると、kichiku_ga.ald と kichiku_gb.ald のファイルはコピーされずに、
|
||||
CD-ROM上のデータへのシンボリックリンクになります。ただし、そうするとゲーム中
|
||||
はCD-ROMをマウントしておかなければならないので、CD-ROMをマウントしたまま
|
||||
CD-DAの演奏可能な一部のシステムでのみ可能です。
|
||||
|
||||
|
||||
このオプションはゲームデータのインストール時の動作を規定するものなので、
|
||||
自分でCD-ROMからファイルをコピーして、ゲームリソースファイルをエディタで
|
||||
編集すれば、全く自由にデータの配置を行なう事が出来ます。もちろん、ゲーム
|
||||
リソースファイルのファイル名や置き場所も自由にして出来ます。
|
||||
ゲームリソースファイルの書式については doc/GRFMT.TXT を御覧下さい。
|
||||
|
||||
|
||||
4. 著作権など
|
||||
|
||||
instgameは 奈良木 さんがつくられたものですので、著作権は奈良木さんに
|
||||
属します。奈良木さんの意向により、GPLに基づいて再配布可能です。
|
||||
|
||||
ドキュメントの不備は私(近間)までどうぞ。
|
||||
|
||||
|
||||
5. 連絡先
|
||||
|
||||
奈良木さん <naraki@debian.or.jp>
|
||||
近間@NAIST <masaki-c@is.aist-nara.ac.jp>
|
||||
@@ -1,18 +0,0 @@
|
||||
# AmbivalenZ Install infomation
|
||||
# Tag, #origin, #destination
|
||||
ScenarioA, gamedata/*sa.ald, ambi_sa.ald
|
||||
GraphicsA, gamedata/*ga.ald, ambi_ga.ald
|
||||
SaveA, , ambi_sa.asd
|
||||
SaveB, , ambi_sb.asd
|
||||
SaveC, , ambi_sc.asd
|
||||
SaveD, , ambi_sd.asd
|
||||
SaveE, , ambi_se.asd
|
||||
SaveF, , ambi_sf.asd
|
||||
SaveG, , ambi_sg.asd
|
||||
SaveH, , ambi_sh.asd
|
||||
SaveI, , ambi_si.asd
|
||||
SaveJ, , ambi_sj.asd
|
||||
SaveK, , ambi_sk.asd
|
||||
SaveL, , ambi_sl.asd
|
||||
SaveM, , ambi_sm.asd
|
||||
SaveN, , ambi_sn.asd
|
||||
@@ -1,30 +0,0 @@
|
||||
# ATLACH-NACHA (low price version) Install infomation
|
||||
# Tag, #origin, #destination
|
||||
ScenarioA, gamedata/*sa.ald, atlach_sa.ald
|
||||
GraphicsA, gamedata/*ga.ald, atlach_ga.ald
|
||||
WaveA, gamedata/*wa.ald, atlach_wa.ald
|
||||
SaveA, , atlach_sa.asd
|
||||
SaveB, , atlach_sb.asd
|
||||
SaveC, , atlach_sc.asd
|
||||
SaveD, , atlach_sd.asd
|
||||
SaveE, , atlach_se.asd
|
||||
SaveF, , atlach_sf.asd
|
||||
SaveG, , atlach_sg.asd
|
||||
SaveH, , atlach_sh.asd
|
||||
SaveI, , atlach_si.asd
|
||||
SaveJ, , atlach_sj.asd
|
||||
SaveK, , atlach_sk.asd
|
||||
SaveL, , atlach_sl.asd
|
||||
SaveM, , atlach_sm.asd
|
||||
SaveN, , atlach_sn.asd
|
||||
SaveO, , atlach_so.asd
|
||||
SaveP, , atlach_sp.asd
|
||||
SaveQ, , atlach_sq.asd
|
||||
SaveR, , atlach_sr.asd
|
||||
SaveS, , atlach_ss.asd
|
||||
SaveT, , atlach_st.asd
|
||||
SaveU, , atlach_su.asd
|
||||
SaveV, , atlach_sv.asd
|
||||
SaveW, , atlach_sw.asd
|
||||
SaveX, , atlach_sx.asd
|
||||
SaveY, , atlach_sy.asd
|
||||
@@ -1,37 +0,0 @@
|
||||
# シェル・クレイル Install infomation
|
||||
# Tag, #origin, #destination
|
||||
ScenarioA, GAMEDATA/*SA.ALD, chairs_sa.ald
|
||||
GraphicsA, GAMEDATA/*GA.ald, chairs_ga.ald
|
||||
WaveA, GAMEDATA/*WA.ald, chairs_wa.ald
|
||||
BGMA, GAMEDATA/*BA.ald, chairs_ba.ald
|
||||
WAIA, GAMEDATA/*WA.wai, chairs_wa.wai
|
||||
BGIA, GAMEDATA/*BA.bgi, chairs_ba.bgi
|
||||
Ain, GAMEDATA/*.ain, system39.ain
|
||||
Init, GAMEDATA/*.ini, system39.ini
|
||||
SACT01, GAMEDATA/SACTEFAM.KLD, SACTEFAM.KLD
|
||||
SaveA, , chairs_sa.asd
|
||||
SaveB, , chairs_sb.asd
|
||||
SaveC, , chairs_sc.asd
|
||||
SaveD, , chairs_sd.asd
|
||||
SaveE, , chairs_se.asd
|
||||
SaveF, , chairs_sf.asd
|
||||
SaveG, , chairs_sg.asd
|
||||
SaveH, , chairs_sh.asd
|
||||
SaveI, , chairs_si.asd
|
||||
SaveJ, , chairs_sj.asd
|
||||
SaveK, , chairs_sk.asd
|
||||
SaveL, , chairs_sl.asd
|
||||
SaveM, , chairs_sm.asd
|
||||
SaveN, , chairs_sn.asd
|
||||
SaveO, , chairs_so.asd
|
||||
SaveP, , chairs_sp.asd
|
||||
SaveQ, , chairs_sq.asd
|
||||
SaveR, , chairs_sr.asd
|
||||
SaveS, , chairs_ss.asd
|
||||
SaveT, , chairs_st.asd
|
||||
SaveU, , chairs_su.asd
|
||||
SaveV, , chairs_sv.asd
|
||||
SaveW, , chairs_sw.asd
|
||||
SaveX, , chairs_sx.asd
|
||||
SaveY, , chairs_sy.asd
|
||||
SaveZ, , chairs_sz.asd
|
||||
@@ -1,19 +0,0 @@
|
||||
# 大悪司 Install infomation
|
||||
# Tag, #origin, #destination
|
||||
ScenarioA, GAMEDATA/*SA.ALD, daiakuji_sa.ald
|
||||
GraphicsA, GAMEDATA/*GA.ALD, daiakuji_ga.ald
|
||||
WaveA, GAMEDATA/*WA.ALD, daiakuji_wa.ald
|
||||
DataA, GAMEDATA/*DA.ALD, daiakuji_da.ald
|
||||
Ain, GAMEDATA/*.ain, system39.ain
|
||||
SaveA, , daiakuji_sa.asd
|
||||
SaveB, , daiakuji_sb.asd
|
||||
SaveC, , daiakuji_sc.asd
|
||||
SaveD, , daiakuji_sd.asd
|
||||
SaveE, , daiakuji_se.asd
|
||||
SaveF, , daiakuji_sf.asd
|
||||
SaveG, , daiakuji_sg.asd
|
||||
SaveH, , daiakuji_sh.asd
|
||||
SaveI, , daiakuji_si.asd
|
||||
SaveJ, , daiakuji_sj.asd
|
||||
SaveK, , daiakuji_sk.asd
|
||||
SaveL, , daiakuji_sl.asd
|
||||
@@ -1,17 +0,0 @@
|
||||
# dalk Install infomation
|
||||
# Tag, #origin, #destination
|
||||
ScenarioA, dalk/dalk_sa.ald, dalk_sa.ald
|
||||
GraphicsA, dalk/dalk_ga.ald, dalk_ga.ald
|
||||
MidiA, dalk/dalk_ma.ald, dalk_ma.ald
|
||||
WaveA, dalk/dalk_wa.ald, dalk_wa.ald
|
||||
DataA, dalk/dalk_da.ald, dalk_da.ald
|
||||
SaveA, , dalk_sa.asd
|
||||
SaveB, , dalk_sb.asd
|
||||
SaveC, , dalk_sc.asd
|
||||
SaveD, , dalk_sd.asd
|
||||
SaveE, , dalk_se.asd
|
||||
SaveF, , dalk_sf.asd
|
||||
SaveG, , dalk_sg.asd
|
||||
SaveH, , dalk_sh.asd
|
||||
SaveI, , dalk_si.asd
|
||||
SaveJ, , dalk_sj.asd
|
||||
@@ -1,35 +0,0 @@
|
||||
# DARCROWS Install infomation
|
||||
# Tag, #origin, #destination
|
||||
ScenarioA, gamedata/*SA.ALD, hime_sa.ald
|
||||
GraphicsA, gamedata/*GA.ALD, hime_ga.ald
|
||||
GraphicsB, gamedata/*GB.ALD, hime_gb.ald
|
||||
WaveA, gamedata/*WA.ALD, hime_wa.ald
|
||||
WaveB, gamedata/*WB.ALD, hime_wb.ald
|
||||
MidiA, gamedata/*MA.ALD, hime_ma.ald
|
||||
ResourceA, gamedata/*RA.ALD, hime_ra.ald
|
||||
SaveA, , hime_sa.asd
|
||||
SaveB, , hime_sb.asd
|
||||
SaveC, , hime_sc.asd
|
||||
SaveD, , hime_sd.asd
|
||||
SaveE, , hime_se.asd
|
||||
SaveF, , hime_sf.asd
|
||||
SaveG, , hime_sg.asd
|
||||
SaveH, , hime_sh.asd
|
||||
SaveI, , hime_si.asd
|
||||
SaveJ, , hime_sj.asd
|
||||
SaveK, , hime_sk.asd
|
||||
SaveL, , hime_sl.asd
|
||||
SaveM, , hime_sm.asd
|
||||
SaveN, , hime_sn.asd
|
||||
SaveO, , hime_so.asd
|
||||
SaveP, , hime_sp.asd
|
||||
SaveQ, , hime_sq.asd
|
||||
SaveR, , hime_sr.asd
|
||||
SaveS, , hime_ss.asd
|
||||
SaveT, , hime_st.asd
|
||||
SaveU, , hime_su.asd
|
||||
SaveV, , hime_sv.asd
|
||||
SaveW, , hime_sw.asd
|
||||
SaveX, , hime_sx.asd
|
||||
SaveY, , hime_sy.asd
|
||||
SaveZ, , hime_sz.asd
|
||||
@@ -1,16 +0,0 @@
|
||||
# DiaboLiQue Install infomation
|
||||
# Tag, #origin, #destination
|
||||
ScenarioA, gamedata/*sa.ald, diabo_sa.ald
|
||||
GraphicsA, gamedata/*ga.ald, diabo_ga.ald
|
||||
GraphicsB, gamedata/*gb.ald, diabo_gb.ald
|
||||
WaveA, gamedata/*wa.ald, diabo_wa.ald
|
||||
SaveA, , diabo_sa.asd
|
||||
SaveB, , diabo_sb.asd
|
||||
SaveC, , diabo_sc.asd
|
||||
SaveD, , diabo_sd.asd
|
||||
SaveE, , diabo_se.asd
|
||||
SaveF, , diabo_sf.asd
|
||||
SaveG, , diabo_sg.asd
|
||||
SaveH, , diabo_sh.asd
|
||||
SaveI, , diabo_si.asd
|
||||
SaveJ, , diabo_sj.asd
|
||||
@@ -1,30 +0,0 @@
|
||||
# DiaboLiQue (low price version) Install infomation
|
||||
# Tag, #origin, #destination
|
||||
ScenarioA, gamedata/*sa.ald, diabo_sa.ald
|
||||
GraphicsA, gamedata/*ga.ald, diabo_ga.ald
|
||||
WaveA, gamedata/*wa.ald, diabo_wa.ald
|
||||
SaveA, , diabo_sa.asd
|
||||
SaveB, , diabo_sb.asd
|
||||
SaveC, , diabo_sc.asd
|
||||
SaveD, , diabo_sd.asd
|
||||
SaveE, , diabo_se.asd
|
||||
SaveF, , diabo_sf.asd
|
||||
SaveG, , diabo_sg.asd
|
||||
SaveH, , diabo_sh.asd
|
||||
SaveI, , diabo_si.asd
|
||||
SaveJ, , diabo_sj.asd
|
||||
SaveK, , diabo_sk.asd
|
||||
SaveL, , diabo_sl.asd
|
||||
SaveM, , diabo_sm.asd
|
||||
SaveN, , diabo_sn.asd
|
||||
SaveO, , diabo_so.asd
|
||||
SaveP, , diabo_sp.asd
|
||||
SaveQ, , diabo_sq.asd
|
||||
SaveR, , diabo_sr.asd
|
||||
SaveS, , diabo_ss.asd
|
||||
SaveT, , diabo_st.asd
|
||||
SaveU, , diabo_su.asd
|
||||
SaveV, , diabo_sv.asd
|
||||
SaveW, , diabo_sw.asd
|
||||
SaveX, , diabo_sx.asd
|
||||
SaveY, , diabo_sy.asd
|
||||
@@ -1,10 +0,0 @@
|
||||
# DrStop! Install infomation
|
||||
# Tag, #origin, #destination
|
||||
ScenarioA, drstop\!/ds_sa.ald, ds_sa.ald
|
||||
GraphicsA, drstop\!/ds_ga.ald, ds_ga.ald
|
||||
MidiA, drstop\!/ds_ma.ald, ds_ma.ald
|
||||
SaveA, , ds_sa.asd
|
||||
SaveB, , ds_sb.asd
|
||||
SaveC, , ds_sc.asd
|
||||
SaveD, , ds_sd.asd
|
||||
SaveE, , ds_se.asd
|
||||
@@ -1,38 +0,0 @@
|
||||
# エスカレイヤー Install infomation
|
||||
# Tag, #origin, #destination
|
||||
ScenarioA, GAMEDATA/*SA.ALD, esuka_sa.ald
|
||||
GraphicsA, GAMEDATA/*GA.ALD, esuka_ga.ald
|
||||
GraphicsB, GAMEDATA/*GB.ALD, esuka_gb.ald
|
||||
WaveA, GAMEDATA/*WA.ALD, esuka_wa.ald
|
||||
WaveB, GAMEDATA/*WB.ALD, esuka_wb.ald
|
||||
BGMA, GAMEDATA/*BA.ALD, esuka_ba.ald
|
||||
WAIA, GAMEDATA/*WA.WAI, esuka_wa.wai
|
||||
BGIA, GAMEDATA/*BA.BGI, esuka_ba.bgi
|
||||
Ain, GAMEDATA/*.ain, system39.ain
|
||||
Init, GAMEDATA/*.ini, system39.ini
|
||||
SaveA, , esuka_sa.asd
|
||||
SaveB, , esuka_sb.asd
|
||||
SaveC, , esuka_sc.asd
|
||||
SaveD, , esuka_sd.asd
|
||||
SaveE, , esuka_se.asd
|
||||
SaveF, , esuka_sf.asd
|
||||
SaveG, , esuka_sg.asd
|
||||
SaveH, , esuka_sh.asd
|
||||
SaveI, , esuka_si.asd
|
||||
SaveJ, , esuka_sj.asd
|
||||
SaveK, , esuka_sk.asd
|
||||
SaveL, , esuka_sl.asd
|
||||
SaveM, , esuka_sm.asd
|
||||
SaveN, , esuka_sn.asd
|
||||
SaveO, , esuka_so.asd
|
||||
SaveP, , esuka_sp.asd
|
||||
SaveQ, , esuka_sq.asd
|
||||
SaveR, , esuka_sr.asd
|
||||
SaveS, , esuka_ss.asd
|
||||
SaveT, , esuka_st.asd
|
||||
SaveU, , esuka_su.asd
|
||||
SaveV, , esuka_sv.asd
|
||||
SaveW, , esuka_sw.asd
|
||||
SaveX, , esuka_sx.asd
|
||||
SaveY, , esuka_sy.asd
|
||||
SaveZ, , esuka_sz.asd
|
||||
@@ -1,8 +0,0 @@
|
||||
# Hushaby Baby Install infomation
|
||||
# Tag, #origin, #destination
|
||||
ScenarioA, gamedata/*SA.ALD, hushaby_sa.ald
|
||||
GraphicsA, gamedata/*GA.ALD, hushaby_ga.ald
|
||||
WaveA, gamedata/*WA.ALD, hushaby_wa.ald
|
||||
MidiA, gamedata/*MA.ALD, hushaby_ma.ald
|
||||
SaveA, , hushaby_sa.asd
|
||||
|
||||
@@ -1,151 +0,0 @@
|
||||
#!/usr/bin/perl
|
||||
#
|
||||
# instgame: xsystem3.5 data install script
|
||||
#
|
||||
# Author: Hiroshi Naraki<naraki@debian.or.jp>
|
||||
#
|
||||
# $Id: instgame,v 1.5 1999/05/18 21:52:02 chikama Exp $
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
|
||||
# default value
|
||||
$cdrom_dir = "/cdrom";
|
||||
$dest_base_dir = "~/game";
|
||||
|
||||
# get program name
|
||||
($program) = ($0 =~ m%([^/]+)$%);
|
||||
|
||||
# get home directory
|
||||
$home = $ENV{'HOME'};
|
||||
|
||||
# show usage and exit
|
||||
sub usage {
|
||||
print "Usage: $program [options] <target>.inf \n";
|
||||
print " -c directory cdrom directory.(default: /cdrom) \n";
|
||||
print " -d directory destination game directory.(default: ~/game/<target>)\n";
|
||||
print " -g file game resource file name.(default: ~/game/<target>.gr)\n";
|
||||
print " -k tag keep the tagged file from copying.\n";
|
||||
}
|
||||
|
||||
;# parsing options
|
||||
while (@ARGV) {
|
||||
$_ = shift;
|
||||
s/^-// || do { $target = $_; last };
|
||||
$_ eq 'c' && @ARGV && do { $cdrom_dir = shift; next }; # install from
|
||||
$_ eq 'd' && @ARGV && do { $dest_base_dir = shift; next }; # install to
|
||||
$_ eq 'g' && @ARGV && do { $grfile = shift; next }; # gr-file to
|
||||
$_ eq 'k' && @ARGV && do { @keep_list = (@keep_list, shift); next }; # keep tag
|
||||
$_ eq 'v' && @ARGV && do { $debug = 1; next }; # debug
|
||||
&usage;
|
||||
exit;
|
||||
}
|
||||
|
||||
# nothing target
|
||||
if (! -f $target ) {
|
||||
&usage;
|
||||
exit;
|
||||
}
|
||||
# decide game resource file name
|
||||
$base = $target;
|
||||
$base =~ s%.*/%%;
|
||||
$base =~ s/\.inf//;
|
||||
$dest_dir = $dest_base_dir."/".$base;
|
||||
$grfile = $dest_base_dir."/".$base.".gr";
|
||||
|
||||
# expand directory name
|
||||
$dest_dir =~ s/~/$home/;
|
||||
$grfile =~ s/~/$home/;
|
||||
|
||||
# print variables if debug
|
||||
if ($debug) {
|
||||
print "cdrom_dir:$cdrom_dir\n";
|
||||
print "dest_dir:$dest_dir\n";
|
||||
print "grfile :$grfile\n";
|
||||
}
|
||||
|
||||
-d $cdrom_dir || die "$!:$cdrom_dir\n";
|
||||
|
||||
&make_dir($dest_dir);
|
||||
|
||||
open( DAT, $target) || die "Can't open $target:$!\n";
|
||||
|
||||
open( FILE, "> $grfile" ) || die "Can't create file $grfile:$!\n";
|
||||
print FILE "# System 3.5 GameResource File: [$target]\n";
|
||||
|
||||
while( $line = <DAT>) {
|
||||
$line =~ s/\#.*|\s//g;
|
||||
$line eq /^$/ && do { next };
|
||||
@data = split(/,/,$line);
|
||||
$tag = $data[0];
|
||||
$from = $data[1];
|
||||
$to = $data[2];
|
||||
|
||||
if( $to eq '' ) {
|
||||
&view_action("Ignore ", $tag, $from, $to);
|
||||
next;
|
||||
}
|
||||
$to = $dest_dir."/".$to;
|
||||
if( $tag eq '' ) {
|
||||
$keep = 0;
|
||||
} else {
|
||||
$keep = grep(/$tag*/, @keep_list );
|
||||
}
|
||||
if( $keep ) {
|
||||
$from = $cdrom_dir."/".$from ;
|
||||
&view_action("Linking", $tag, $from, $to);
|
||||
# symlink($from, $to) if !$debug;
|
||||
system("ln -s $from $to") if !$debug;
|
||||
} elsif( $from eq '' ) {
|
||||
# &view_action("Create ", $tag, $from, $to);
|
||||
# system("touch $to") if !$debug;
|
||||
&view_action("Skip ", $tag, $from, $to);
|
||||
} else {
|
||||
$from = $cdrom_dir."/".$from ;
|
||||
foreach ( <${from}>) {
|
||||
&view_action("Copying", $tag, $from, $to);
|
||||
system("cp $from $to") if !$debug;
|
||||
}
|
||||
}
|
||||
|
||||
# Create game resource file
|
||||
if( $tag ne '' ) {
|
||||
print "writing: $tag $to\n" if $debug;
|
||||
print FILE "$tag $to\n";
|
||||
}
|
||||
}
|
||||
close(FILE);
|
||||
close(DAT);
|
||||
exit;
|
||||
|
||||
sub view_action {
|
||||
local($action, $tag, $from, $to ) = @_;
|
||||
|
||||
print "$action $tag: $from -> $to\n";
|
||||
}
|
||||
|
||||
# mkdir destination directories.
|
||||
sub make_dir {
|
||||
local($target ) = @_;
|
||||
|
||||
@dest = split(/\//,$target);
|
||||
foreach $dir ( @dest ) {
|
||||
$work .= $dir.'/';
|
||||
print "checking $work\n" if $debug;
|
||||
if( !-d $work ) {
|
||||
print "mkdir $work\n" if $debug;
|
||||
mkdir( $work,0777) || die "Can't mkdir $work:$!\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,16 +0,0 @@
|
||||
# kakurezuki Install infomation
|
||||
# Tag, #origin, #destination
|
||||
ScenarioA, GAMEDATA/*SA.ALD, tsuki_sa.ald
|
||||
GraphicsA, GAMEDATA/*GA.ALD, tsuki_ga.ald
|
||||
WaveA, GAMEDATA/*WA.ALD, tsuki_wa.ald
|
||||
SaveA, , tsuki_sa.asd
|
||||
SaveB, , tsuki_sb.asd
|
||||
SaveC, , tsuki_sc.asd
|
||||
SaveD, , tsuki_sd.asd
|
||||
SaveE, , tsuki_se.asd
|
||||
SaveF, , tsuki_sf.asd
|
||||
SaveG, , tsuki_sg.asd
|
||||
SaveH, , tsuki_sh.asd
|
||||
SaveI, , tsuki_si.asd
|
||||
SaveJ, , tsuki_sj.asd
|
||||
SaveK, , tsuki_sk.asd
|
||||
@@ -1,17 +0,0 @@
|
||||
# Ikenai Katsumisensei Install infomation
|
||||
# Tag, #origin, #destination
|
||||
ScenarioA, gamedata/*sa.ald, katsumi_sa.ald
|
||||
GraphicsA, gamedata/*ga.ald, katsumi_ga.ald
|
||||
GraphicsB, gamedata/*gb.ald, katsumi_gb.ald
|
||||
WaveA, gamedata/*wa.ald, katsumi_wa.ald
|
||||
SaveA, , katsumi_sa.asd
|
||||
SaveB, , katsumi_sb.asd
|
||||
SaveC, , katsumi_sc.asd
|
||||
SaveD, , katsumi_sd.asd
|
||||
SaveE, , katsumi_se.asd
|
||||
SaveF, , katsumi_sf.asd
|
||||
SaveG, , katsumi_sg.asd
|
||||
SaveH, , katsumi_sh.asd
|
||||
SaveI, , katsumi_si.asd
|
||||
SaveJ, , katsumi_sj.asd
|
||||
gamedata/gaiji.dat, gaiji.dat
|
||||
@@ -1,16 +0,0 @@
|
||||
# Kichikuoh Install infomation
|
||||
# Tag, #origin, #destination
|
||||
ScenarioA, gamedata/*sa.ald, kichiku_sa.ald
|
||||
GraphicsA, gamedata/*ga.ald, kichiku_ga.ald
|
||||
GraphicsB, gamedata/*gb.ald, kichiku_gb.ald
|
||||
WaveA, gamedata/*wa.ald, kichiku_wa.ald
|
||||
SaveA, , kichiku_sa.asd
|
||||
SaveB, , kichiku_sb.asd
|
||||
SaveC, , kichiku_sc.asd
|
||||
SaveD, , kichiku_sd.asd
|
||||
SaveE, , kichiku_se.asd
|
||||
SaveF, , kichiku_sf.asd
|
||||
SaveG, , kichiku_sg.asd
|
||||
SaveH, , kichiku_sh.asd
|
||||
SaveI, , kichiku_si.asd
|
||||
SaveJ, , kichiku_sj.asd
|
||||
@@ -1,34 +0,0 @@
|
||||
# MAMATOTO Install infomation
|
||||
# Tag, #origin, #destination
|
||||
ScenarioA, GAMEDATA/*SA.ALD, mamatoto_sa.ald
|
||||
GraphicsA, GAMEDATA/*GA.ALD, mamatoto_ga.ald
|
||||
GraphicsB, GAMEDATA/*GB.ALD, mamatoto_gb.ald
|
||||
WaveA, GAMEDATA/*WA.ALD, mamatoto_wa.ald
|
||||
MidiA, GAMEDATA/*MA.ALD, mamatoto_ma.ald
|
||||
DataA, GAMEDATA/*DA.ALD, mamatoto_da.ald
|
||||
SaveA, , mamatoto_sa.asd
|
||||
SaveB, , mamatoto_sb.asd
|
||||
SaveC, , mamatoto_sc.asd
|
||||
SaveD, , mamatoto_sd.asd
|
||||
SaveE, , mamatoto_se.asd
|
||||
SaveF, , mamatoto_sf.asd
|
||||
SaveG, , mamatoto_sg.asd
|
||||
SaveH, , mamatoto_sh.asd
|
||||
SaveI, , mamatoto_si.asd
|
||||
SaveJ, , mamatoto_sj.asd
|
||||
SaveK, , mamatoto_sk.asd
|
||||
SaveL, , mamatoto_sl.asd
|
||||
SaveM, , mamatoto_sm.asd
|
||||
SaveN, , mamatoto_sn.asd
|
||||
SaveO, , mamatoto_so.asd
|
||||
SaveP, , mamatoto_sp.asd
|
||||
SaveQ, , mamatoto_sq.asd
|
||||
SaveR, , mamatoto_sr.asd
|
||||
SaveS, , mamatoto_ss.asd
|
||||
SaveT, , mamatoto_st.asd
|
||||
SaveU, , mamatoto_su.asd
|
||||
SaveV, , mamatoto_sv.asd
|
||||
SaveW, , mamatoto_sw.asd
|
||||
SaveX, , mamatoto_sx.asd
|
||||
SaveY, , mamatoto_sy.asd
|
||||
SaveZ, , mamatoto_sz.asd
|
||||
@@ -1,17 +0,0 @@
|
||||
# MamoriGami Sama Install infomation
|
||||
# Tag, #origin, #destination
|
||||
ScenarioA, GAMEDATA/*SA.ALD, mamori_sa.ald
|
||||
GraphicsA, GAMEDATA/*GA.ALD, mamori_ga.ald
|
||||
GraphicsB, GAMEDATA/*GB.ALD, mamori_gb.ald
|
||||
WaveA, GAMEDATA/*WA.ALD, mamori_wa.ald
|
||||
MidiA, GAMEDATA/*MA.ALD, mamori_ma.ald
|
||||
SaveA, , mamori_sa.asd
|
||||
SaveB, , mamori_sb.asd
|
||||
SaveC, , mamori_sc.asd
|
||||
SaveD, , mamori_sd.asd
|
||||
SaveE, , mamori_se.asd
|
||||
SaveF, , mamori_sf.asd
|
||||
SaveG, , mamori_sg.asd
|
||||
SaveH, , mamori_sh.asd
|
||||
SaveI, , mamori_si.asd
|
||||
SaveJ, , mamori_sj.asd
|
||||
@@ -1,9 +0,0 @@
|
||||
# Ikusa Miko Install infomation
|
||||
# Tag, #origin, #destination
|
||||
ScenarioA, gamedata/*sa.ald, miko_sa.ald
|
||||
GraphicsA, gamedata/*ga.ald, miko_ga.ald
|
||||
WaveA, gamedata/*wa.ald, miko_wa.ald
|
||||
SaveA, , miko_sa.asd
|
||||
SaveB, , miko_sb.asd
|
||||
SaveC, , miko_sc.asd
|
||||
SaveJ, , miko_sj.asd
|
||||
@@ -1,7 +0,0 @@
|
||||
# mugen hoyo Install infomation
|
||||
# Tag, #origin, #destination
|
||||
ScenarioA, gamedata/*SA.ald, mugen_sa.ald
|
||||
GraphicsA, gamedata/*GA.ald, mugen_ga.ald
|
||||
SaveA, , mugen_sa.asd
|
||||
SaveB, , mugen_sb.asd
|
||||
SaveC, , mugen_sc.asd
|
||||
@@ -1,41 +0,0 @@
|
||||
# Night Demon Install infomation
|
||||
# Tag, #origin, #destination
|
||||
ScenarioA, GAMEDATA/*SA.ald, nd_sa.ald
|
||||
GraphicsA, GAMEDATA/*GA.ald, nd_ga.ald
|
||||
WaveA, GAMEDATA/*WA.ald, nd_wa.ald
|
||||
BGMA, GAMEDATA/*BA.ald, nd_ba.ald
|
||||
WAIA, GAMEDATA/*WA.wai, nd_wa.wai
|
||||
BGIA, GAMEDATA/*BA.bgi, nd_ba.bgi
|
||||
Ain, GAMEDATA/*.ain, system39.ain
|
||||
Init, GAMEDATA/*.ini, system39.ini
|
||||
SACT01, GAMEDATA/SACTEFAM.KLD, SACTEFAM.KLD
|
||||
ALK01, GAMEDATA/AliceLogo.alk, AliceLogo.alk
|
||||
ALK02, GAMEDATA/NightDemonDemo1.alk, NightDemonDemo1.alk
|
||||
ALK03, GAMEDATA/NightDemonDemo2.alk, NightDemonDemo2.alk
|
||||
ALK04, GAMEDATA/NightDemonDemo3.alk, NightDemonDemo3.alk
|
||||
SaveA, , nd_sa.asd
|
||||
SaveB, , nd_sb.asd
|
||||
SaveC, , nd_sc.asd
|
||||
SaveD, , nd_sd.asd
|
||||
SaveE, , nd_se.asd
|
||||
SaveF, , nd_sf.asd
|
||||
SaveG, , nd_sg.asd
|
||||
SaveH, , nd_sh.asd
|
||||
SaveI, , nd_si.asd
|
||||
SaveJ, , nd_sj.asd
|
||||
SaveK, , nd_sk.asd
|
||||
SaveL, , nd_sl.asd
|
||||
SaveM, , nd_sm.asd
|
||||
SaveN, , nd_sn.asd
|
||||
SaveO, , nd_so.asd
|
||||
SaveP, , nd_sp.asd
|
||||
SaveQ, , nd_sq.asd
|
||||
SaveR, , nd_sr.asd
|
||||
SaveS, , nd_ss.asd
|
||||
SaveT, , nd_st.asd
|
||||
SaveU, , nd_su.asd
|
||||
SaveV, , nd_sv.asd
|
||||
SaveW, , nd_sw.asd
|
||||
SaveX, , nd_sx.asd
|
||||
SaveY, , nd_sy.asd
|
||||
SaveZ, , nd_sz.asd
|
||||
@@ -1,32 +0,0 @@
|
||||
# Only You リクルス Install infomation
|
||||
# Tag, #origin, #destination
|
||||
ScenarioA, gamedata/*SA.ald, onlyyou_r_sa.ald
|
||||
GraphicsA, gamedata/*GA.ald, onlyyou_r_ga.ald
|
||||
WaveA, gamedata/*WA.ald, onlyyou_r_wa.ald
|
||||
Ain, gamedata/*.ain, System39.ain
|
||||
SaveA, , onlyyou_r_sa.asd
|
||||
SaveB, , onlyyou_r_sb.asd
|
||||
SaveC, , onlyyou_r_sc.asd
|
||||
SaveD, , onlyyou_r_sd.asd
|
||||
SaveE, , onlyyou_r_se.asd
|
||||
SaveF, , onlyyou_r_sf.asd
|
||||
SaveG, , onlyyou_r_sg.asd
|
||||
SaveH, , onlyyou_r_sh.asd
|
||||
SaveI, , onlyyou_r_si.asd
|
||||
SaveJ, , onlyyou_r_sj.asd
|
||||
SaveK, , onlyyou_r_sk.asd
|
||||
SaveL, , onlyyou_r_sl.asd
|
||||
SaveM, , onlyyou_r_sm.asd
|
||||
SaveN, , onlyyou_r_sn.asd
|
||||
SaveO, , onlyyou_r_so.asd
|
||||
SaveP, , onlyyou_r_sp.asd
|
||||
SaveQ, , onlyyou_r_sq.asd
|
||||
SaveR, , onlyyou_r_sr.asd
|
||||
SaveS, , onlyyou_r_ss.asd
|
||||
SaveT, , onlyyou_r_st.asd
|
||||
SaveU, , onlyyou_r_su.asd
|
||||
SaveV, , onlyyou_r_sv.asd
|
||||
SaveW, , onlyyou_r_sw.asd
|
||||
SaveX, , onlyyou_r_sx.asd
|
||||
SaveY, , onlyyou_r_sy.asd
|
||||
SaveZ, , onlyyou_r_sz.asd
|
||||
@@ -1,16 +0,0 @@
|
||||
# Oudou Yusha Install infomation
|
||||
# Tag, #origin, #destination
|
||||
ScenarioA, gamedata/*sa.ald, oudou_sa.ald
|
||||
GraphicsA, gamedata/*ga.ald, oudou_ga.ald
|
||||
GraphicsB, gamedata/*gb.ald, oudou_gb.ald
|
||||
WaveA, gamedata/*wa.ald, oudou_wa.ald
|
||||
SaveA, , oudou_sa.asd
|
||||
SaveB, , oudou_sb.asd
|
||||
SaveC, , oudou_sc.asd
|
||||
SaveD, , oudou_sd.asd
|
||||
SaveE, , oudou_se.asd
|
||||
SaveF, , oudou_sf.asd
|
||||
SaveG, , oudou_sg.asd
|
||||
SaveH, , oudou_sh.asd
|
||||
SaveI, , oudou_si.asd
|
||||
SaveJ, , oudou_sj.asd
|
||||
@@ -1,36 +0,0 @@
|
||||
# Kaerunyo Panyon Install infomation
|
||||
# Tag, #origin, #destination
|
||||
ScenarioA, gamedata/*sa.ald, panyo_sa.ald
|
||||
GraphicsA, gamedata/*ga.ald, panyo_ga.ald
|
||||
WaveA, gamedata/*wa.ald, panyo_wa.ald
|
||||
SaveA, , panyo_sa.asd
|
||||
SaveB, , panyo_sb.asd
|
||||
SaveC, , panyo_sc.asd
|
||||
SaveD, , panyo_sd.asd
|
||||
SaveE, , panyo_se.asd
|
||||
SaveF, , panyo_sf.asd
|
||||
SaveG, , panyo_sg.asd
|
||||
SaveH, , panyo_sh.asd
|
||||
SaveI, , panyo_si.asd
|
||||
SaveJ, , panyo_sj.asd
|
||||
SaveK, , panyo_sk.asd
|
||||
SaveL, , panyo_sl.asd
|
||||
SaveM, , panyo_sm.asd
|
||||
SaveN, , panyo_sn.asd
|
||||
SaveO, , panyo_so.asd
|
||||
, gamedata/floor_1.map, floor_1.map
|
||||
, gamedata/floor_2.map, floor_2.map
|
||||
, gamedata/floor_3.map, floor_3.map
|
||||
, gamedata/floor_4.map, floor_4.map
|
||||
, gamedata/floor_5.map, floor_5.map
|
||||
, gamedata/floor_6.map, floor_6.map
|
||||
, gamedata/floor_7.map, floor_7.map
|
||||
, gamedata/floor_8.map, floor_8.map
|
||||
, gamedata/floor_9.map, floor_9.map
|
||||
, gamedata/floor_10.map, floor_10.map
|
||||
, gamedata/floor_11.map, floor_11.map
|
||||
, gamedata/floor_12.map, floor_12.map
|
||||
, gamedata/floor_13.map, floor_13.map
|
||||
, gamedata/floor_14.map, floor_14.map
|
||||
, gamedata/floor_15.map, floor_15.map
|
||||
, gamedata/floor_16.map, floor_16.map
|
||||
@@ -1,63 +0,0 @@
|
||||
# Kaerunyo Panyon (low price version) Install infomation
|
||||
# Tag, #origin, #destination
|
||||
ScenarioA, gamedata/*sa.ald, panyo_sa.ald
|
||||
GraphicsA, gamedata/*ga.ald, panyo_ga.ald
|
||||
WaveA, gamedata/*wa.ald, panyo_wa.ald
|
||||
SaveA, , panyo_sa.asd
|
||||
SaveB, , panyo_sb.asd
|
||||
SaveC, , panyo_sc.asd
|
||||
SaveD, , panyo_sd.asd
|
||||
SaveE, , panyo_se.asd
|
||||
SaveF, , panyo_sf.asd
|
||||
SaveG, , panyo_sg.asd
|
||||
SaveH, , panyo_sh.asd
|
||||
SaveI, , panyo_si.asd
|
||||
SaveJ, , panyo_sj.asd
|
||||
SaveK, , panyo_sk.asd
|
||||
SaveL, , panyo_sl.asd
|
||||
SaveM, , panyo_sm.asd
|
||||
SaveN, , panyo_sn.asd
|
||||
SaveO, , panyo_so.asd
|
||||
SaveP, , panyo_sp.asd
|
||||
SaveQ, , panyo_sq.asd
|
||||
SaveR, , panyo_sr.asd
|
||||
SaveS, , panyo_ss.asd
|
||||
SaveT, , panyo_st.asd
|
||||
SaveU, , panyo_su.asd
|
||||
SaveV, , panyo_sv.asd
|
||||
SaveW, , panyo_sw.asd
|
||||
SaveX, , panyo_sx.asd
|
||||
SaveY, , panyo_sy.asd
|
||||
, gamedata/floor_1.map, floor_1.map
|
||||
, gamedata/floor_2.map, floor_2.map
|
||||
, gamedata/floor_3.map, floor_3.map
|
||||
, gamedata/floor_4.map, floor_4.map
|
||||
, gamedata/floor_5.map, floor_5.map
|
||||
, gamedata/floor_6.map, floor_6.map
|
||||
, gamedata/floor_7.map, floor_7.map
|
||||
, gamedata/floor_8.map, floor_8.map
|
||||
, gamedata/floor_9.map, floor_9.map
|
||||
, gamedata/floor_10.map, floor_10.map
|
||||
, gamedata/floor_11.map, floor_11.map
|
||||
, gamedata/floor_12.map, floor_12.map
|
||||
, gamedata/floor_13.map, floor_13.map
|
||||
, gamedata/floor_14.map, floor_14.map
|
||||
, gamedata/floor_15.map, floor_15.map
|
||||
, gamedata/floor_16.map, floor_16.map
|
||||
, gamedata/floor_17.map, floor_17.map
|
||||
, gamedata/floor_18.map, floor_18.map
|
||||
, gamedata/floor_19.map, floor_19.map
|
||||
, gamedata/floor_20.map, floor_20.map
|
||||
, gamedata/floor_21.map, floor_21.map
|
||||
, gamedata/floor_22.map, floor_22.map
|
||||
, gamedata/floor_23.map, floor_23.map
|
||||
, gamedata/floor_24.map, floor_24.map
|
||||
, gamedata/floor_25.map, floor_25.map
|
||||
, gamedata/floor_26.map, floor_26.map
|
||||
, gamedata/floor_27.map, floor_27.map
|
||||
, gamedata/floor_28.map, floor_28.map
|
||||
, gamedata/floor_29.map, floor_29.map
|
||||
, gamedata/floor_30.map, floor_30.map
|
||||
, gamedata/floor_31.map, floor_31.map
|
||||
, gamedata/floor_32.map, floor_32.map
|
||||
, gamedata/floor_33.map, floor_33.map
|
||||
@@ -1,33 +0,0 @@
|
||||
# PastelChime Install infomation
|
||||
# Tag, #origin, #destination
|
||||
ScenarioA, gamedata/*SA.ALD, pascha_sa.ald
|
||||
GraphicsA, gamedata/*GA.ALD, pascha_ga.ald
|
||||
WaveA, gamedata/*WA.ALD, pascha_wa.ald
|
||||
MidiA, gamedata/*MA.ALD, pascha_ma.ald
|
||||
DataA, gamedata/*DA.ALD, pascha_da.ald
|
||||
SaveA, , pascha_sa.asd
|
||||
SaveB, , pascha_sb.asd
|
||||
SaveC, , pascha_sc.asd
|
||||
SaveD, , pascha_sd.asd
|
||||
SaveE, , pascha_se.asd
|
||||
SaveF, , pascha_sf.asd
|
||||
SaveG, , pascha_sg.asd
|
||||
SaveH, , pascha_sh.asd
|
||||
SaveI, , pascha_si.asd
|
||||
SaveJ, , pascha_sj.asd
|
||||
SaveK, , pascha_sk.asd
|
||||
SaveL, , pascha_sl.asd
|
||||
SaveM, , pascha_sm.asd
|
||||
SaveN, , pascha_sn.asd
|
||||
SaveO, , pascha_so.asd
|
||||
SaveP, , pascha_sp.asd
|
||||
SaveQ, , pascha_sq.asd
|
||||
SaveR, , pascha_sr.asd
|
||||
SaveS, , pascha_ss.asd
|
||||
SaveT, , pascha_st.asd
|
||||
SaveU, , pascha_su.asd
|
||||
SaveV, , pascha_sv.asd
|
||||
SaveW, , pascha_sw.asd
|
||||
SaveX, , pascha_sx.asd
|
||||
SaveY, , pascha_sy.asd
|
||||
SaveZ, , pascha_sz.asd
|
||||
@@ -1,20 +0,0 @@
|
||||
# Persiom Install infomation
|
||||
# Tag, #origin, #destination
|
||||
ScenarioA, GAMEDATA/*SA.ALD, persiom_sa.ald
|
||||
GraphicsA, GAMEDATA/*GA.ALD, persiom_ga.ald
|
||||
GraphicsB, GAMEDATA/*GB.ALD, persiom_gb.ald
|
||||
WaveA, GAMEDATA/*WA.ALD, persiom_wa.ald
|
||||
MidiA, GAMEDATA/*MA.ALD, persiom_ma.ald
|
||||
DataA, GAMEDATA/*DA.ALD, persiom_da.ald
|
||||
SaveA, , persiom_sa.asd
|
||||
SaveB, , persiom_sb.asd
|
||||
SaveC, , persiom_sc.asd
|
||||
SaveD, , persiom_sd.asd
|
||||
SaveE, , persiom_se.asd
|
||||
SaveF, , persiom_sf.asd
|
||||
SaveG, , persiom_sg.asd
|
||||
SaveH, , persiom_sh.asd
|
||||
SaveI, , persiom_si.asd
|
||||
SaveJ, , persiom_sj.asd
|
||||
SaveK, , persiom_sk.asd
|
||||
SaveL, , persiom_sl.asd
|
||||
@@ -1,17 +0,0 @@
|
||||
# prostudent good Install infomation
|
||||
# Tag, #origin, #destination
|
||||
ScenarioA, GAMEDATA/*SA.ALD, progood_sa.ald
|
||||
GraphicsA, GAMEDATA/*GA.ALD, progood_ga.ald
|
||||
WaveA, GAMEDATA/*WA.ALD, progood_wa.ald
|
||||
DataA, GAMEDATA/*DA.ALD, progood_da.ald
|
||||
SaveA, , progood_sa.asd
|
||||
SaveB, , progood_sb.asd
|
||||
SaveC, , progood_sc.asd
|
||||
SaveD, , progood_sd.asd
|
||||
SaveE, , progood_se.asd
|
||||
SaveF, , progood_sf.asd
|
||||
SaveG, , progood_sg.asd
|
||||
SaveH, , progood_sh.asd
|
||||
SaveI, , progood_si.asd
|
||||
SaveJ, , progood_sj.asd
|
||||
SaveK, , progood_sk.asd
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user