mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-08-13 17:49:10 +00:00
Compare commits
1927 Commits
1.9.0-beta
...
release/1.
Author | SHA1 | Date | |
---|---|---|---|
|
672f285218 | ||
|
f11b06ff6a | ||
|
f9595543ca | ||
9aa335aca3 | |||
05aed133c7 | |||
|
b9ea4f07e4 | ||
|
8b5bd34a65 | ||
|
72090f39ce | ||
|
de61dadaa9 | ||
d52a66642d | |||
|
d92d807e1d | ||
|
60f85dbc37 | ||
|
dbba489fcf | ||
dd70d0ad85 | |||
|
a8c5f8a10b | ||
|
ef258b1686 | ||
|
3265e56294 | ||
|
5e7f9cc22c | ||
|
f3b8ff0e17 | ||
|
c3d134793f | ||
|
59c356ad39 | ||
|
2514cf3c5c | ||
|
1eb20db8db | ||
|
32ead3aba6 | ||
|
cae0b46e38 | ||
|
4f8a2c2999 | ||
|
9932f4ea50 | ||
|
0a5a06c431 | ||
|
d570120e17 | ||
|
abbbeb752a | ||
|
9afe3d77e6 | ||
|
6362e29ad7 | ||
|
bc0501e96f | ||
|
7e6f00c85a | ||
|
bf07420916 | ||
|
21b196d5c4 | ||
|
26b7500f3b | ||
|
9a203b2b2c | ||
c3eae71778 | |||
|
b1d3b9544e | ||
45c866cbd1 | |||
|
f8f57ab46f | ||
ef48195ffa | |||
|
967c2ed56c | ||
037bd14ed8 | |||
|
8eb53fa1a0 | ||
|
4b14a84510 | ||
|
4e1b0eda94 | ||
|
bf727cb26a | ||
|
e609c936a4 | ||
|
59ce9b4d2f | ||
ceee558fe5 | |||
|
2bc7e5a8e2 | ||
|
8d1d271cda | ||
|
c454cc09b3 | ||
|
0be22efffc | ||
|
4f8b2aa003 | ||
|
57f01188c2 | ||
|
bcb6174bf3 | ||
7b56a630aa | |||
|
4e5be077ff | ||
|
7aaaa2c5f5 | ||
|
c9c208f78e | ||
|
522069d146 | ||
|
e379c818b3 | ||
eb5ae95c90 | |||
e8965d32d9 | |||
790b4f3076 | |||
|
4f0f113887 | ||
|
53ce868185 | ||
|
144ed59aef | ||
|
40f7d085f4 | ||
|
1f34264017 | ||
|
fa57e33dfe | ||
|
dee9d6dfd4 | ||
|
961cda50bc | ||
|
fe43c2d18f | ||
59406363bb | |||
|
cbc1d0c893 | ||
|
3d0c109d82 | ||
|
e0594d6cac | ||
|
51cb9e71e5 | ||
|
27630d255c | ||
|
d04423251b | ||
|
9e5ab59eab | ||
|
898c61d457 | ||
ec8abd072d | |||
|
0f962aaf03 | ||
|
eeb6e9d417 | ||
|
0434cc017b | ||
|
5905fdb26e | ||
|
4ffe7131cb | ||
|
aadc7beccc | ||
|
9d233bb7d4 | ||
|
5c6b43832c | ||
|
5cbbb0d17b | ||
|
19b3f777c4 | ||
|
24ddedad38 | ||
|
30313bb396 | ||
|
35aff633bd | ||
c6312a8ebf | |||
3976f2deed | |||
|
a7cb2d8d00 | ||
7021468ee3 | |||
|
d6a4b67df7 | ||
|
0b51290a1e | ||
|
3a6b811559 | ||
|
d02aae7a9c | ||
|
78285207ce | ||
|
300391465a | ||
|
306d80be49 | ||
|
5af537026f | ||
|
a8a838c24c | ||
|
4cfcbcfbaa | ||
|
34606b7cbd | ||
|
f0f87ee0dc | ||
|
9acb8f7d2c | ||
|
fb23ee6add | ||
|
1d039c86cb | ||
|
7c7f747ad8 | ||
|
bd80ec7cff | ||
|
935debbf6f | ||
|
4eac2163f5 | ||
|
150341ba29 | ||
|
183df5c981 | ||
|
7fb12afc4f | ||
|
92f966821e | ||
|
903bd3d750 | ||
|
edbae9ad6c | ||
|
a931a18d05 | ||
|
b36b1a8cf9 | ||
|
b8af503ff5 | ||
|
766b9895bf | ||
|
2b78c22349 | ||
|
4bcc3a4f3f | ||
|
d5b8829fb4 | ||
|
872d1f1396 | ||
|
1e905dea20 | ||
|
cedc5c4de8 | ||
|
13b1e585da | ||
|
6dcc7f93c3 | ||
|
9496990f53 | ||
|
d700db0e7d | ||
|
ae0b641768 | ||
|
eff2376871 | ||
|
3fae244f54 | ||
|
d77d0c9a5f | ||
|
0b6e84f4cf | ||
|
14692bf2e4 | ||
|
1f8bd4a8d7 | ||
|
10d5fc46f9 | ||
|
28aeedc4e7 | ||
|
5802f61e42 | ||
|
4e51cd1a03 | ||
|
70117d3b82 | ||
|
4d3b14af6f | ||
|
da55c7c69f | ||
|
2c93c3b9cb | ||
|
ea484bc9a6 | ||
8e6522acef | |||
|
3a3fb37dfe | ||
|
2272de80e2 | ||
|
38b506ecd6 | ||
|
df96bcf75c | ||
|
63f6ae30e2 | ||
|
87def2fd9e | ||
|
6c93f02ff9 | ||
|
ad256b5c1d | ||
|
74c98db1b6 | ||
|
217071aa1d | ||
|
41baf8778b | ||
|
c25847787e | ||
|
4fe222d853 | ||
|
22a9d921ef | ||
|
13011e00c6 | ||
|
062eeb9810 | ||
|
5056e963ba | ||
|
8230cd009d | ||
|
bcb3313e13 | ||
|
e708fb38da | ||
|
9c5a7d3a57 | ||
|
3cb2dd4889 | ||
|
de891238d6 | ||
|
f580ab4ba4 | ||
|
28589db664 | ||
|
c0b722ec46 | ||
|
1fb1e75038 | ||
|
4866e43862 | ||
|
14b61bfa6f | ||
|
afadae6d50 | ||
|
5426cb3baf | ||
|
b349ef6e71 | ||
|
970fedd78c | ||
|
098d5b2239 | ||
|
160a5f2fdd | ||
|
35a228f78f | ||
|
b5770acd50 | ||
|
47e11fa3f2 | ||
|
68e92d215a | ||
|
65f558d6df | ||
|
b21ba566ae | ||
9fdc881005 | |||
|
0464a50ab8 | ||
|
64a8c38d2f | ||
|
436cdf1fc8 | ||
|
ee69a0dc29 | ||
|
8946b41d20 | ||
|
e56d2c63c3 | ||
|
3a4a15cc93 | ||
|
b9eac7c6dc | ||
|
4610aa7ae3 | ||
|
56911a86ea | ||
|
818bee3961 | ||
|
3878c4781e | ||
|
04db99749b | ||
|
d3179709b1 | ||
|
25656a10cb | ||
|
ae1f7bd695 | ||
|
b93d7dd3cb | ||
|
6e2a96c133 | ||
|
f70aa8fabe | ||
|
25909b06d2 | ||
|
2860de7bf4 | ||
|
f536fd55d8 | ||
|
06a3c0cb26 | ||
|
8c6b5e52fd | ||
|
ac5e77ea3b | ||
|
879eb9c348 | ||
|
349dc568ea | ||
|
1d79f55a46 | ||
|
db0993f500 | ||
|
0243ae4654 | ||
|
937d60f239 | ||
|
95462493ef | ||
|
c656633bea | ||
|
b7a44983b4 | ||
|
74aa934441 | ||
|
d7a70c67ba | ||
|
a0c298a539 | ||
|
abac4b1758 | ||
|
47e899cf75 | ||
|
64686b53ff | ||
|
ef5cea0e06 | ||
|
cd4c8ecbf3 | ||
|
838fd61f29 | ||
|
02e7bc7e0a | ||
|
40505e645a | ||
|
25e5a92286 | ||
|
8bc0089fc4 | ||
|
2545b24118 | ||
|
f30f4b6892 | ||
|
c3dc27e37e | ||
|
73fd634209 | ||
|
2d9062bfc1 | ||
|
13889b6554 | ||
|
8d199b1bbc | ||
|
3677418225 | ||
|
6b8f9b50b9 | ||
|
d79398a1d5 | ||
|
4fd2eecb8b | ||
|
cd756e6f01 | ||
|
77854d561b | ||
|
1b5d1d074e | ||
|
dfa141818b | ||
|
d236c57600 | ||
|
ef4cec9382 | ||
|
54fb4c04e3 | ||
|
fe451b8dc7 | ||
|
853bfc3562 | ||
|
53c28a8ec9 | ||
|
dc7ba33b51 | ||
|
d068d61f3c | ||
|
af326753a9 | ||
|
3cbbaa62db | ||
|
9a3dbf3122 | ||
|
d4583fa64c | ||
|
9209807d66 | ||
|
311df31fb1 | ||
|
a0c1a3f736 | ||
|
e1e8cc3851 | ||
|
6a8c461e38 | ||
|
67d3c6aa71 | ||
|
c409f45ddd | ||
|
70e4845915 | ||
|
90adac8f09 | ||
|
58640824d1 | ||
|
2fd2950eb5 | ||
|
30ae019095 | ||
|
8476f12432 | ||
|
79c2b81ffd | ||
|
46e13313e4 | ||
|
c93c9c099e | ||
|
cc465efa67 | ||
|
b427ddce88 | ||
|
beeb9e0a1b | ||
|
4bc69fec62 | ||
|
b67245d71e | ||
|
ec9d1a6b8f | ||
|
06ca147a82 | ||
|
7af1fd3ffb | ||
|
b4a3bc1ffe | ||
|
7f55f0a264 | ||
|
2f25e9bdf8 | ||
|
421b599541 | ||
|
a303940372 | ||
|
a77b202767 | ||
|
e75858ce5e | ||
|
101e394475 | ||
|
0d58bc9384 | ||
|
6098811b49 | ||
|
86c309ea75 | ||
|
94d8acb7d0 | ||
|
ae7c63cc35 | ||
|
200be7d20c | ||
|
01ef44fa4f | ||
|
d62e302768 | ||
|
6bcc4884c2 | ||
|
d4dbb3f46e | ||
|
bcd15b4dd2 | ||
|
1e1a9f3999 | ||
|
3e49aff35c | ||
|
6776229047 | ||
|
70aa3b4011 | ||
|
e7e5316340 | ||
|
02e8741457 | ||
|
f94b2e73e1 | ||
|
e8fc050b6e | ||
|
320072c8dc | ||
|
821f30f735 | ||
|
90fd8f8cda | ||
|
acf59f6b68 | ||
|
b181859629 | ||
|
9a069faa01 | ||
|
a990c497b5 | ||
|
5af0cfd902 | ||
|
acf2ce35f7 | ||
|
8706c36fc0 | ||
|
d6b6775888 | ||
|
73ed748deb | ||
|
5ad545dcc1 | ||
|
3a77ade6b2 | ||
|
d7b96a424f | ||
|
ef478ade64 | ||
|
af4d32357c | ||
|
78b8fc3e4f | ||
|
8b90d4abe0 | ||
|
59e0d9618b | ||
|
78d96dad2a | ||
|
c136dd2b32 | ||
|
6af49b7885 | ||
|
80fb1c74f0 | ||
|
b749d6f1cb | ||
|
e74069e4c2 | ||
|
8157af6d68 | ||
|
3af407340e | ||
|
88959f5595 | ||
|
1d6a0c7b52 | ||
|
c461999b2b | ||
|
e1b1608dc6 | ||
|
d16dc22fdf | ||
|
5ca979b1e2 | ||
|
f3c192c63d | ||
|
61275df7da | ||
|
d9b4413bc9 | ||
|
cb95b1d2e7 | ||
|
058f13bdf9 | ||
|
0e76d965f1 | ||
|
7996fadb91 | ||
|
23d6f4eac9 | ||
|
ec1dd0bf61 | ||
|
790fa7102e | ||
|
761efbb457 | ||
|
661eb39ecc | ||
|
38b4ae1c0e | ||
|
d21442941c | ||
|
08821f82b6 | ||
|
19fdbac287 | ||
|
5fc983a1bb | ||
|
b124c49ea4 | ||
|
8bf8c0f251 | ||
|
cb8e1706b2 | ||
|
d3df4674f9 | ||
|
932abe6d5c | ||
|
15a0ac2735 | ||
|
c4df0f95ae | ||
|
fa170b9ace | ||
|
eb9b1ad68d | ||
|
ae7a2b9f02 | ||
|
c81c6e5eb7 | ||
|
5bfa014505 | ||
|
25f6851ca1 | ||
|
d437445c67 | ||
|
1f6fb8c290 | ||
|
96990b2ea7 | ||
|
7577dfa575 | ||
|
259c04f41c | ||
|
fa88cb62e1 | ||
|
15b99f2e7a | ||
|
55ed7d16f7 | ||
|
e059a88533 | ||
|
d5e18feed9 | ||
|
27b4d6390b | ||
|
8e0d48a0f6 | ||
|
8bd2349ab6 | ||
|
00c66e7096 | ||
|
8f5b8fd769 | ||
|
6de188d025 | ||
|
7bdb2e79ed | ||
|
c9bcc12265 | ||
|
db246b82ac | ||
|
d3b50b9c47 | ||
|
45e8b7a5bd | ||
|
ce06b03fac | ||
|
91cc414588 | ||
|
751f595bb6 | ||
|
5a1fa18509 | ||
|
c71d0f5e7f | ||
|
f513a807db | ||
|
4ce941bbc2 | ||
|
d17226910d | ||
|
81e47277e7 | ||
|
a18188ae90 | ||
|
6b04b7cf18 | ||
|
8d780e0607 | ||
|
f175e38666 | ||
|
f137b3057a | ||
|
33099355b8 | ||
|
22f5aeab07 | ||
|
a2c3197f42 | ||
|
f5555a6d26 | ||
|
e5c3253642 | ||
|
0fc763bc55 | ||
|
8906e9e0fd | ||
|
b66e977acd | ||
|
6755ff63e1 | ||
|
21a2cd7bc3 | ||
|
8121706b89 | ||
|
2b08f21625 | ||
|
f1fc083f2b | ||
|
acca56b6a5 | ||
|
c78e559e88 | ||
|
9c8721922b | ||
|
649ff5f9f9 | ||
|
43326d11d8 | ||
|
2a8c3a2cf6 | ||
|
94b76ce9a4 | ||
|
23389e9491 | ||
|
063b90b97d | ||
|
f4bd54fedd | ||
|
bd42fc94cc | ||
|
965ce12947 | ||
|
42af13c141 | ||
|
60f30036f1 | ||
|
8aaf4ea098 | ||
|
0eff7de659 | ||
|
8ced72ab10 | ||
|
13134f9d64 | ||
|
88f6c7a9f3 | ||
|
e6bea3961f | ||
|
4db7837d06 | ||
|
63ed3f3575 | ||
|
f2294851e6 | ||
|
c6af8f16f6 | ||
|
5ad1640984 | ||
|
2b0200d429 | ||
|
84636fc2af | ||
|
7845434270 | ||
|
9c9292949f | ||
|
0f621b4956 | ||
|
36ab9c64ef | ||
|
d9df20d102 | ||
|
348f322df1 | ||
|
f181037bed | ||
|
5a4d5f03b0 | ||
|
3ac43582c2 | ||
|
fa0704138d | ||
|
52317bb7df | ||
|
2e1535389a | ||
|
2bbef6b5cf | ||
|
569ce6c7b4 | ||
|
64e2d6b672 | ||
|
83ddb1501f | ||
|
f1f281b318 | ||
|
395e015282 | ||
|
6c8f2227cd | ||
|
ac2b5e57cf | ||
|
da4c404f3d | ||
|
af0acc9a75 | ||
|
2cbfcd2327 | ||
|
b927da73c1 | ||
|
f7ac2969ef | ||
|
2a6da319b2 | ||
|
9322b40df1 | ||
|
2c9084d48c | ||
|
4f0692c437 | ||
|
99448eedca | ||
|
a667ed945f | ||
|
05df7996a4 | ||
|
a4035af337 | ||
|
5b3fe4ae27 | ||
|
144991990e | ||
|
696b6990ea | ||
|
069fb54253 | ||
|
76a279ef68 | ||
|
7fbf705c41 | ||
|
1dda7d6486 | ||
|
0e54c32452 | ||
|
30e69c518b | ||
|
eb80fefd1d | ||
|
19345908cb | ||
|
8c37e5c526 | ||
|
8de325f256 | ||
|
e41ec5b42e | ||
|
678031f9b3 | ||
|
f31b65825f | ||
|
6916fc76bd | ||
|
a52d716c88 | ||
|
5ae2c1552b | ||
|
48698403a8 | ||
|
4831b4fa96 | ||
|
1187dc3217 | ||
|
3dac139b00 | ||
|
da78b5c130 | ||
|
027452fef8 | ||
|
67fa5a23b9 | ||
|
b2d9a2dc79 | ||
|
6b8ad5a9b1 | ||
|
07385c3662 | ||
|
485aafc1b7 | ||
|
b17177bd20 | ||
|
8fe79e153d | ||
|
a252679a12 | ||
|
b61670f929 | ||
|
bab7de6cf2 | ||
|
4b42ecb0f6 | ||
|
3345d54ad9 | ||
|
33e27e9480 | ||
|
6e1581a17d | ||
|
27caabdb91 | ||
|
b3d048dfcf | ||
|
7da224d29d | ||
|
a2bd0a14e1 | ||
|
6d95ed53dc | ||
|
2d9e164ec4 | ||
|
1eceee915e | ||
|
49df9c4155 | ||
|
881d17d8f1 | ||
|
689404a4a1 | ||
|
7415964a4d | ||
|
40d5fe1631 | ||
|
120c6fda61 | ||
|
540fdfbf5a | ||
|
c91a7b5e2e | ||
|
0a129bc810 | ||
|
ce42e819b9 | ||
|
0e62a398c7 | ||
|
fa60c1f8b9 | ||
|
711723d738 | ||
|
86818e5ae8 | ||
|
bc8f347ef2 | ||
|
cc5f190cb3 | ||
|
4f5990fa26 | ||
|
516e863395 | ||
|
1411f878ab | ||
|
b99eafbfb0 | ||
|
ebaecebc68 | ||
|
f9dee5aaa0 | ||
|
de44ce2092 | ||
|
60851ef1a6 | ||
|
c6fd6cfd15 | ||
|
98400974a9 | ||
|
57c45a2c01 | ||
|
3e7c757398 | ||
|
e339188ded | ||
|
1432dbac53 | ||
|
5bfcd742b8 | ||
|
589feba0eb | ||
|
8dda0ec4ff | ||
|
cd36e17160 | ||
|
760b0cdc11 | ||
|
ff89f5f4c6 | ||
|
fe86bf8bf6 | ||
|
eb23a6921b | ||
|
6298d9221a | ||
|
f6abc81cf1 | ||
|
f1bc4d8407 | ||
|
868d84bbfc | ||
|
5b08960560 | ||
|
0078554d6a | ||
|
63288f80f3 | ||
|
75b7bb5097 | ||
|
1fb4ed8eef | ||
|
c0d7949d7c | ||
|
97d554feb1 | ||
|
5f1154e076 | ||
|
928276a66e | ||
|
218f40eea2 | ||
|
3dbdb1c7e3 | ||
|
8da5cff210 | ||
|
8e6574dcdb | ||
|
b0456669c9 | ||
|
b6ac5a3ab9 | ||
|
5f591c86fe | ||
|
31d1968004 | ||
|
7ba0fa4bf0 | ||
|
0f1d338dda | ||
|
b08c66a796 | ||
|
9c0da686da | ||
|
fec5ce093f | ||
|
bbc96fd37c | ||
|
188bf0fbc9 | ||
|
b9f3e45af7 | ||
|
af22a4f2cd | ||
|
85a49a0d36 | ||
|
a6aec252b1 | ||
|
9aa39d0af9 | ||
|
fda1fbf61c | ||
|
4059ccf863 | ||
|
7463c46a54 | ||
|
aac8c28d73 | ||
|
ebd9f26c15 | ||
|
ef6b17baf7 | ||
|
a1987df96a | ||
|
d9ec8053d7 | ||
|
9b800a96ed | ||
|
c1fddb9a6a | ||
|
639cfa43d2 | ||
|
79d938b957 | ||
|
725d793be1 | ||
|
51e22515a8 | ||
|
f84a466ca5 | ||
|
c988b4d62b | ||
|
a3a7928372 | ||
|
1b675e7075 | ||
|
c7609e767f | ||
|
28c13ec90f | ||
|
a4e34e824c | ||
|
64eddaeb49 | ||
|
c3faec4e9a | ||
|
62cdadb582 | ||
|
d6e15d4943 | ||
|
a3f0ee3b63 | ||
|
fc474b02fa | ||
|
dff7ee8e1c | ||
|
0fd2108f7f | ||
|
f2fa2a14d7 | ||
|
bb28ff7226 | ||
|
c017a3662a | ||
|
e21302f481 | ||
|
619d714923 | ||
|
5728f9c7d0 | ||
|
9b28b15e67 | ||
|
eeb88e87d8 | ||
|
979b4af6ca | ||
|
6e8be3b03e | ||
|
0f91cb0479 | ||
|
4ce53cb851 | ||
|
c860a247d3 | ||
|
784a4ef9b5 | ||
|
b08d8c7edb | ||
|
d24a9a9df5 | ||
|
21a45168bd | ||
|
6ad5489d01 | ||
|
7bdaabf5f1 | ||
|
a61a741683 | ||
|
9ccef816f9 | ||
|
ab7da117e0 | ||
|
8c24b2b6ce | ||
|
4bd3d18f34 | ||
|
126f40e012 | ||
|
fe51051b7c | ||
|
10090d0ac6 | ||
|
3dfee979a7 | ||
|
c288eba813 | ||
|
46e13e7f0b | ||
|
5b1fb94240 | ||
|
8596b43b2b | ||
|
7222bc5814 | ||
|
a7fee48b7f | ||
|
9f423586ad | ||
|
18fccba410 | ||
|
15fd63b1b8 | ||
|
80a7d0365b | ||
|
0125892f04 | ||
|
b30c3f6498 | ||
|
f7e48cac87 | ||
|
94057e9b18 | ||
|
edbb5f4f73 | ||
|
e0161cf8da | ||
|
1bb0e6ed8c | ||
|
4f8e7b2a2b | ||
|
dc5b8020cc | ||
|
b408fe77f7 | ||
|
358056ec42 | ||
|
024a3f6259 | ||
|
5cbb2da794 | ||
|
65f65ad2ad | ||
|
f3326d34e7 | ||
|
0c6e8a8123 | ||
|
dd138fc460 | ||
|
860c270c73 | ||
|
395a5d9991 | ||
|
46ff7d918b | ||
|
0e017f6233 | ||
|
fc52d3df50 | ||
|
5cf28be742 | ||
|
eb74179c6d | ||
|
52f3abba6e | ||
|
d8605ad18d | ||
|
1478fa93b3 | ||
|
5a5d613ee3 | ||
|
2d9fa81bd0 | ||
|
e0ee2d530a | ||
|
4d0f19406b | ||
|
2c8c6d423c | ||
|
8fa2a67f6b | ||
|
f2d78b11dd | ||
|
6aef1164a4 | ||
|
e0b953b804 | ||
|
79cb9efa7f | ||
|
e6e91a345c | ||
|
f66baa444f | ||
|
9add62796c | ||
|
4319d31036 | ||
|
29e3331055 | ||
|
8c0e4ab07f | ||
|
7b515fa0e2 | ||
|
ba49fa3b82 | ||
|
2bb691f50e | ||
|
7bdfb382a8 | ||
|
22b9dec960 | ||
|
04e572933d | ||
|
94d629d79b | ||
|
ad47e3d9e6 | ||
|
2e6f37ecf1 | ||
|
3f606691a8 | ||
|
cc8301449e | ||
|
7f0fefddcf | ||
|
0c5dc5d41e | ||
|
9a45a0f535 | ||
|
b7751c483e | ||
|
547e5fdb65 | ||
|
d8c8f4e72d | ||
|
6c3a5b5b17 | ||
|
981c540201 | ||
|
4af1acfe92 | ||
|
a5047b7566 | ||
|
61fb1cac54 | ||
|
e59c400ca6 | ||
|
584df548f1 | ||
|
86e08aa8ef | ||
|
d05be2cff5 | ||
|
34051c10df | ||
|
0c3ddc5436 | ||
|
f24bc8b509 | ||
|
5575cb9133 | ||
|
914fb4c987 | ||
|
e82333cf77 | ||
|
5ca8a0bda9 | ||
|
4c1ee264a6 | ||
|
de614131e4 | ||
|
7ea5904395 | ||
|
2df182748c | ||
|
6228dde3da | ||
|
b8217610ce | ||
|
7cdf7c7ca0 | ||
|
2714e0a33f | ||
|
40269f5df2 | ||
|
b2895dfcd0 | ||
|
d989fb516b | ||
|
88f30f7fe7 | ||
|
d5f05fb781 | ||
|
0471de2d92 | ||
|
1d85d71d29 | ||
|
e07afaeffb | ||
|
f7b8e7e46c | ||
|
ca65f19b03 | ||
|
1a67954ff9 | ||
|
d6c54e7eef | ||
|
93ef759a25 | ||
|
8fbf5bef60 | ||
|
d5b9f7ac37 | ||
|
d15dc9f40f | ||
|
2da07f7615 | ||
|
f2a93dba0d | ||
|
8c42f3a8d4 | ||
|
b1cf79da5b | ||
|
79240eab1e | ||
|
cc1679e317 | ||
|
484ea62a62 | ||
|
5d278b62cc | ||
|
c9fd85528a | ||
|
68f9925cd4 | ||
|
b14e3b9b9d | ||
|
d1fa6b129c | ||
|
b7851e51ad | ||
|
a660dce295 | ||
|
abb746fae3 | ||
|
5d0331ecdc | ||
|
da7c74ba7e | ||
|
4e12aac9c0 | ||
|
c66bd18a10 | ||
|
40edc2863c | ||
|
6fae0b83d9 | ||
|
7f5afbfdf5 | ||
|
e2eafd86de | ||
|
20151e41ea | ||
|
819ce1bf49 | ||
|
535e18b54e | ||
|
2864d019f0 | ||
|
6e689e2038 | ||
|
dddf885fb4 | ||
|
6198a4776b | ||
|
cfa1b1e006 | ||
|
ad47ebc1a8 | ||
|
731af1f1f3 | ||
|
c98717cb45 | ||
|
c558936ec3 | ||
|
6ad3cca4ca | ||
|
a06fe8e8a7 | ||
|
0b2dd2c5cd | ||
|
06adb9ace3 | ||
|
d19f7b94fb | ||
|
0a9aed0522 | ||
|
b8ec88f6af | ||
|
6ef1eaf1f5 | ||
|
821592ddeb | ||
|
521f41fc10 | ||
|
92236ccd2f | ||
|
8e4a3a0e76 | ||
|
79f00277c4 | ||
|
4dc986f32d | ||
|
918857e03b | ||
|
f23a7a59b6 | ||
|
9bd2e5bf49 | ||
|
cf29d23ba4 | ||
|
421304c850 | ||
|
4797e095d9 | ||
|
a441973d17 | ||
|
59ae40af53 | ||
|
97d7c0a8e1 | ||
|
eb01f2e08d | ||
|
d9e7e8cec0 | ||
|
b3362c526a | ||
|
b6615b2cd4 | ||
|
5043f6feff | ||
|
b99fec1e4d | ||
|
313141d2f1 | ||
|
86ec74347d | ||
|
dcdcf6d57c | ||
|
b607f54462 | ||
|
13e1b13a4e | ||
|
2073c8d67f | ||
|
f1ab41e337 | ||
|
50417ab0c5 | ||
|
6e53bf00c4 | ||
|
a36a1b5ff5 | ||
|
e01143edf8 | ||
|
3723207d64 | ||
|
80f7937e42 | ||
|
bef9e3fcfa | ||
|
5af98c69e6 | ||
|
a0307652f3 | ||
|
53f36f4afa | ||
|
bdaf596373 | ||
|
d9b0e6c550 | ||
|
5584bf6bbb | ||
|
4279620aef | ||
|
d58531ec84 | ||
|
85ca1c535e | ||
|
933d02dce2 | ||
|
49b75d67bd | ||
|
348c231e12 | ||
|
df5362a008 | ||
|
0110fa12da | ||
|
8f3d1ec970 | ||
|
3ad4a6e3da | ||
|
beaa7c7894 | ||
|
53a3d940b1 | ||
|
6358ae47de | ||
|
ab420d8cc0 | ||
|
dacec76c1b | ||
|
9340fe9c7c | ||
|
3db7cf54fd | ||
|
2693a901f9 | ||
|
84efde8ee3 | ||
|
3effad0bea | ||
|
452e1e3328 | ||
|
a10013dd00 | ||
|
7d66540af5 | ||
|
c0bf7cc840 | ||
|
a56bf35409 | ||
|
82672342b7 | ||
|
663c301e7c | ||
|
808fbaa767 | ||
|
4079c47b6c | ||
|
8794c61f25 | ||
|
26b91192a3 | ||
|
706c47265e | ||
|
954d0b4e5b | ||
|
00eccbe298 | ||
|
db0bf20fbb | ||
|
c434387794 | ||
|
7d2db99bfd | ||
|
c39d62c245 | ||
|
c7e391da93 | ||
|
053d4f3bff | ||
|
de4dc792a9 | ||
|
716c883737 | ||
|
97592c4093 | ||
|
53de5b5c55 | ||
|
816fada2b1 | ||
|
94d5fcab4b | ||
|
7fd7b51593 | ||
|
e6be8be19d | ||
|
70905ee82e | ||
|
c593893b56 | ||
|
241e3adae8 | ||
|
0d46e20bd4 | ||
|
04c050f93e | ||
|
7045186594 | ||
|
380fd8cab4 | ||
|
ca2604c4e2 | ||
|
6d3c2edc59 | ||
|
7a09413a1a | ||
|
54237b0e98 | ||
|
cf8ccf4b08 | ||
|
a4a9908a51 | ||
|
63d20c029b | ||
|
218db00c4c | ||
|
1bc7047af7 | ||
|
75a2ae2f48 | ||
|
4c45448fa9 | ||
|
dc8d0089e9 | ||
|
887b912af1 | ||
|
e5f931ef42 | ||
|
64b1c70fdd | ||
|
224acb78b0 | ||
|
8a655c7fb6 | ||
|
3c8d0aa354 | ||
|
ed6f31f601 | ||
|
a2e1102b15 | ||
|
b84d61ef6e | ||
|
78b6587c40 | ||
|
6d135d4b01 | ||
|
87a069c887 | ||
|
e6f3e15c32 | ||
|
1ac0d4a5b2 | ||
|
9aca6ff971 | ||
|
506598a80a | ||
|
b0f192abc4 | ||
|
c167648d75 | ||
|
d830a34394 | ||
|
084b073e57 | ||
|
d8182b7e15 | ||
|
9895ced6af | ||
|
c9aff698d0 | ||
|
208614343f | ||
|
fb7723a9d7 | ||
|
8ef3d8f584 | ||
|
ee570e1b6d | ||
|
8652a4db76 | ||
|
caab095e4e | ||
|
40436019fd | ||
|
0b86bd8b03 | ||
|
1e01982a2e | ||
|
3d76677594 | ||
|
f51e66f697 | ||
|
90e849198f | ||
|
fe1925931d | ||
|
3d8597d42e | ||
|
b145ee310c | ||
|
877d196ef5 | ||
|
945508b854 | ||
|
4d04009d12 | ||
|
4218ebc932 | ||
|
b7643b1d36 | ||
|
56d54cf60e | ||
|
85315e2e31 | ||
|
203a77c1dc | ||
|
84b71f7962 | ||
|
eeed3a7613 | ||
|
937b366546 | ||
|
012fea301d | ||
|
f246f8faef | ||
|
cdd2892c49 | ||
|
1507902d00 | ||
|
ce618bf7e9 | ||
|
a82572d0f5 | ||
|
1c0ba07c3c | ||
|
764497206a | ||
|
b3ddf2c907 | ||
|
b5ca2161d9 | ||
|
f827bc8c1a | ||
|
a9b3312d1a | ||
|
281d93f600 | ||
|
16e5f610f7 | ||
|
f11cd8f2d0 | ||
|
71e9c2a71b | ||
|
bfa2e4edf0 | ||
|
2b2f60caf5 | ||
|
800ade7702 | ||
|
c972a63c8c | ||
|
37bc2f8064 | ||
|
a49fdb7ebb | ||
|
715aa67a9c | ||
|
8aef14386f | ||
|
63ccb36ef3 | ||
|
9b6f5e3bb8 | ||
|
9c2e47d03c | ||
|
c082f570ce | ||
|
808c8198d5 | ||
|
43cd892e0c | ||
|
f2b40f40aa | ||
|
7309bdec48 | ||
|
82572754dd | ||
|
6a8b02609f | ||
|
587d8e716b | ||
|
f6223f8ac2 | ||
|
b8a896d52c | ||
|
93d1d8773f | ||
|
d11bae58a0 | ||
|
e31def197f | ||
|
70ccd34fa0 | ||
|
edc7ee2cda | ||
|
9b8d5ea074 | ||
|
83cd040c61 | ||
|
f2a9a1e2a5 | ||
|
7bd52970a1 | ||
|
2d5869fc79 | ||
|
6dcc99edab | ||
|
cca613e3b8 | ||
|
d15c7dbdeb | ||
|
48c61c1da1 | ||
|
48d2eb703c | ||
|
39092ee13b | ||
|
d6a995fc2e | ||
|
5aa6351042 | ||
|
0ed00ae111 | ||
|
3ba34a72aa | ||
|
a95fbd59a3 | ||
|
61e1a45100 | ||
|
2c84549db0 | ||
|
170f3f9b2b | ||
|
82573a5e73 | ||
|
86e9326b7f | ||
|
bc8333723c | ||
|
64278fd598 | ||
|
364f6806c8 | ||
|
f0747c8c51 | ||
|
e0d20a44d2 | ||
|
e1c85e67a7 | ||
|
19dc31e0b3 | ||
|
8edbb42fe8 | ||
|
c01803cd42 | ||
|
aa91c0666e | ||
|
fde28ec0b0 | ||
|
9f2e23d8ba | ||
|
0f9dc88834 | ||
|
68244393f1 | ||
|
fb5fc0d80a | ||
|
1f1345de09 | ||
|
e45bccb833 | ||
|
93a7ff6709 | ||
|
0b8100b46f | ||
|
4bfa3ff619 | ||
|
e9294ce4e3 | ||
|
c21a298a8a | ||
|
b17ea3de36 | ||
|
9dd8b3d430 | ||
|
0e5be3887c | ||
|
a31cbbf67f | ||
|
9d7ad67c1d | ||
|
e90d065f11 | ||
|
9339e4dcad | ||
|
f14a69e52f | ||
|
1e3e960fce | ||
|
7aab7642bf | ||
|
d50e4641ae | ||
|
b50d77b831 | ||
|
7fe291667f | ||
|
2514f43909 | ||
|
71e79edfc1 | ||
|
e7b901462e | ||
|
8f9654c5c6 | ||
|
bd3a5876b0 | ||
|
57553cd809 | ||
|
4d4005d8b7 | ||
|
0b5e0522b6 | ||
|
2cc9afe057 | ||
|
55e81d3973 | ||
|
3e680c50ca | ||
|
3a08a7e99d | ||
|
e7da6616ba | ||
|
4a079407e7 | ||
|
6fde854759 | ||
|
ce7374ec25 | ||
|
424770d662 | ||
|
971201b3b7 | ||
|
d44a2e409c | ||
|
7191360754 | ||
|
d1b7eb2de1 | ||
|
a4a6e5dfb4 | ||
|
ea7044a74b | ||
|
0ade8b20fe | ||
|
75031c9693 | ||
|
9116b22386 | ||
|
4bc78835e8 | ||
|
5c19668fdb | ||
|
4552b17691 | ||
|
0c80ae5288 | ||
|
7f693ce497 | ||
|
87909855c8 | ||
|
47790b09a4 | ||
|
05b50aa437 | ||
|
acb3d10832 | ||
|
2196cd3cf8 | ||
|
183c2a35bd | ||
|
2b6df2544f | ||
|
8800225bdb | ||
|
45838d0105 | ||
|
9e4eee1b9e | ||
|
30fe0015e2 | ||
|
e31d75c926 | ||
|
e340934d04 | ||
|
2f264f2c92 | ||
|
a499e9acdd | ||
|
2b1a7ceb4e | ||
|
1a88fb5c91 | ||
|
9e632355f1 | ||
|
04ce1f0713 | ||
|
107283748a | ||
|
f389d66e36 | ||
|
76eab18f02 | ||
|
3089c625e4 | ||
|
492d2704f1 | ||
|
805ecd32be | ||
|
3fcb240f8e | ||
|
58c8ff456e | ||
|
5880f1479f | ||
|
b5d56559d2 | ||
|
ac7cc18ab9 | ||
|
14af8701df | ||
|
196157b29e | ||
|
be9ca4689e | ||
|
5df01bf95e | ||
|
2fee030a26 | ||
|
a38122e6f2 | ||
|
791eaedb64 | ||
fff05cf117 | |||
|
2158e26b9e | ||
|
bf4672864d | ||
|
c8779fb311 | ||
|
f88ac83408 | ||
|
341941af85 | ||
|
9d5dd893cd | ||
|
fb3de33a38 | ||
|
6dfe5c852e | ||
|
3b177af826 | ||
|
8fe38afd2b | ||
|
d7a928a08b | ||
|
4366f8e46a | ||
|
5a4b27d73a | ||
|
2fc2058b3b | ||
|
dbbd0f5ddc | ||
|
87700bfe0e | ||
|
d35f35a968 | ||
|
c3223903ed | ||
|
f1734e7815 | ||
|
22ba048c89 | ||
|
f2d230d91c | ||
|
a4be4514c9 | ||
|
41163331aa | ||
|
1ab3fe6b85 | ||
|
823333c4b0 | ||
|
a411ce18c9 | ||
|
1225693b9c | ||
|
b144258bf0 | ||
|
34b7cb6c03 | ||
|
8b0e4bb101 | ||
|
6e7117e04c | ||
|
190e074287 | ||
|
5a31efd98d | ||
|
7413d65c2a | ||
|
f02b643a44 | ||
|
35c55dfe70 | ||
|
fa71375ec2 | ||
|
5c10c426fe | ||
|
150dfba95b | ||
|
4cc1420beb | ||
|
a0066ebca1 | ||
|
eb07e174f1 | ||
|
1812b0cf49 | ||
|
5b52f25902 | ||
|
39e6247bec | ||
|
ac3bc30a30 | ||
|
838117b05e | ||
|
596fb5d54a | ||
|
808253c29c | ||
|
70f9c3c655 | ||
|
ab9042145e | ||
|
d1cead7f25 | ||
|
cddb8a4605 | ||
|
12380fc1bb | ||
|
12f4602f57 | ||
|
7be9c28037 | ||
|
f401622149 | ||
|
b524f1ae21 | ||
|
e04ca904a9 | ||
|
e7922cd078 | ||
|
9e7c5235e8 | ||
|
9e4533dc8f | ||
|
3a557b0336 | ||
|
e558aa8ff4 | ||
|
90f4abe03f | ||
|
24bace32ba | ||
|
f6ce5c4563 | ||
|
86107028a4 | ||
|
e18f1703d2 | ||
|
2fd871e2af | ||
|
69f9529ba3 | ||
|
0e78393774 | ||
|
7f25032766 | ||
|
a6901f8ae8 | ||
|
16537b472c | ||
|
18f03a300b | ||
|
d427559eba | ||
|
40605efd1c | ||
|
c7ead8388c | ||
|
26ce4eb45d | ||
|
f0ff7003fd | ||
|
dbe44e80f1 | ||
|
fea5151ee1 | ||
|
798e9ee93e | ||
|
cc1d72c3a3 | ||
|
a363933d08 | ||
|
551bde77a4 | ||
|
42144ecd56 | ||
|
b769eb30c4 | ||
|
6fa217dfc8 | ||
|
3d29c9483b | ||
|
7f351fd7c1 | ||
|
bc7f92815b | ||
|
e5dd19b0de | ||
|
b0d443d525 | ||
|
faaec445d6 | ||
|
e3c75a30ba | ||
|
ae532008ff | ||
|
ee7a8eebca | ||
|
0b489f9924 | ||
|
847e5f33d4 | ||
|
869581eb23 | ||
|
b91abd3af9 | ||
|
514565fad6 | ||
|
11f178a312 | ||
|
d8a1be48cd | ||
|
9892d90b26 | ||
|
41232f18c1 | ||
|
09fa39c5b5 | ||
|
00c2a98cf3 | ||
|
4ae829cb27 | ||
|
f58ce3db19 | ||
|
1f6b3a37f9 | ||
|
1c92ba8ebe | ||
|
fa9769f81a | ||
|
5fce5fa300 | ||
|
60e3cf8aff | ||
|
ddabfed1cd | ||
|
3a14cea068 | ||
|
68f22134cb | ||
|
379402f02e | ||
|
96f8c13543 | ||
|
e54184d18b | ||
|
e001d87569 | ||
|
94cc0edb70 | ||
|
df2a19ec87 | ||
|
f7bf8e2da9 | ||
|
35dc377a58 | ||
|
03bbae7fe9 | ||
|
9900af38f5 | ||
|
f91c701ffe | ||
|
40ebf3c765 | ||
|
d865916a07 | ||
|
ef8455f549 | ||
|
61dba850af | ||
|
c7b703d426 | ||
|
7e22f243ed | ||
|
d242b1824c | ||
|
70f8c729d4 | ||
|
e3dc65978d | ||
|
60cbddbb5f | ||
|
cf354f6668 | ||
|
ddffe32f15 | ||
|
0bdbd509be | ||
|
b533c66f42 | ||
|
a1d6354caf | ||
|
da2504a0de | ||
|
cfc4568ddc | ||
|
b8abd54181 | ||
|
196247ae71 | ||
|
e3511ecacd | ||
|
9fc6329066 | ||
|
fa657c8360 | ||
|
4eab70f84e | ||
|
13cc8a0cee | ||
|
a15ace0f5b | ||
|
1dba06656d | ||
|
81f159434d | ||
|
46f7c6a641 | ||
|
d41378c00a | ||
|
3db399d7d9 | ||
|
3d362f2513 | ||
|
2be619ea88 | ||
|
460f73cd2d | ||
|
6929429f0f | ||
|
729caa135b | ||
|
3775381c10 | ||
|
ccb4c3797f | ||
|
4884dcacba | ||
|
d5a9bd404a | ||
|
58122983fb | ||
|
9f50c754ff | ||
|
077b4096f6 | ||
|
1a13e03c49 | ||
|
dd07b23ed3 | ||
|
f5b72059be | ||
|
57add90b0f | ||
|
a407db54cf | ||
|
c46581e91f | ||
|
39925665f0 | ||
|
f1204f0d9d | ||
|
90682f8623 | ||
|
2f4de0a0fe | ||
|
880680304d | ||
|
f52e605b51 | ||
|
9479f45d1a | ||
|
d39f889775 | ||
|
d843b73280 | ||
|
8c6a16ba28 | ||
|
f13b184588 | ||
|
0d1575b5c7 | ||
|
93e42a9407 | ||
|
5fbacf9d86 | ||
|
0c4d133900 | ||
|
12e43c697d | ||
|
cbefc1d994 | ||
|
81272000f8 | ||
|
0d599e155f | ||
|
841e8b0007 | ||
|
3575dd551c | ||
|
a70b6fcece | ||
|
f159d91572 | ||
|
e4f08f2880 | ||
|
7c9dedb94f | ||
|
53f8d0b815 | ||
|
e5f1755629 | ||
|
e60b3da445 | ||
|
c95c349dd5 | ||
|
ac21118736 | ||
|
e2e112baaa | ||
|
f1712a54b2 | ||
|
652fb40652 | ||
|
1e5029563c | ||
|
48fd7b2792 | ||
|
b4f1056097 | ||
|
51f8c8a568 | ||
|
66c32533ec | ||
|
dd11990ce0 | ||
|
4154cf00f4 | ||
|
875419e4ee | ||
|
865eea8173 | ||
|
2e30601b9c | ||
|
3cc6b7f725 | ||
|
fe9731d32c | ||
|
7b400d43c1 | ||
|
b839e355ba | ||
|
6378a78817 | ||
|
99f5e29484 | ||
|
150884a93f | ||
|
73a2cee779 | ||
|
71a3e83468 | ||
|
acf0242961 | ||
|
041088d317 | ||
|
04f659e768 | ||
|
316e4e9417 | ||
|
61d6fa97cc | ||
|
ceb29cef85 | ||
|
23168ff3d8 | ||
|
2d27e8e685 | ||
|
b18a58d5e1 | ||
|
1f418555a1 | ||
|
ed6a427fcc | ||
|
994664dec5 | ||
|
d35254139a | ||
|
1978b9122b | ||
|
2ed88d6898 | ||
|
165eae0e80 | ||
|
f81cb0a90d | ||
|
b30994168d | ||
|
7bdde8b41d | ||
|
e4414471dd | ||
|
9014633866 | ||
|
0549a81c30 | ||
|
b3fd787959 | ||
|
381c2a4587 | ||
|
2d9eb1c417 | ||
|
058dadf315 | ||
|
fbbbc6e193 | ||
|
c4850475c3 | ||
|
03aaf695a5 | ||
|
d649011dfc | ||
|
cf86c39be5 | ||
|
ead772324e | ||
|
a933afabfd | ||
|
28e11623bd | ||
|
1be42c6cb8 | ||
|
c655f89d84 | ||
|
14bca19163 | ||
|
c7c1d1cb0c | ||
|
dabccf70b4 | ||
|
5feb06e3f3 | ||
|
b870596f15 | ||
|
d986f01d07 | ||
|
f0aea2d246 | ||
|
27d676e17a | ||
|
10fe568f08 | ||
|
7a70900227 | ||
|
9fd91f9b69 | ||
|
9d6fb257c3 | ||
|
bcc73bd40d | ||
|
afbf6a5918 | ||
|
8cccb158e9 | ||
|
425cd3e4ca | ||
|
2e686ad5d5 | ||
|
2817cd41f1 | ||
|
196d586849 | ||
|
d71a7c21da | ||
|
5981ed248a | ||
|
331eba544a | ||
|
88950d8f23 | ||
|
24cec63a3d | ||
|
36e4bd4023 | ||
|
a52bbb72a8 | ||
|
1e723934a1 | ||
|
a35b43ce93 | ||
|
6f28a0c051 | ||
|
81614f2378 | ||
|
9f81778836 | ||
|
603f625fda | ||
|
a0c78c73e3 | ||
|
27b7c5a5fd | ||
|
a4cf1c8aec | ||
|
9839ce006c | ||
|
f8633fc63b | ||
|
27384486e4 | ||
|
9d8a83bf8d | ||
|
c74df8581d | ||
|
2e23c5ec15 | ||
0db31ae27f | |||
31db4f8d5e | |||
ec2656ab7e | |||
f538179878 | |||
|
f1c3915341 | ||
|
ac610c50a9 | ||
|
b878891289 | ||
|
7ad9971cf0 | ||
|
7f7aba9389 | ||
|
00000ef8fa | ||
|
0518ed01b6 | ||
|
45511080b1 | ||
|
5b09323a58 | ||
|
6396ec05fe | ||
|
846fc8fe09 | ||
|
ef74af6766 | ||
|
aee3e4e496 | ||
|
b73622a01c | ||
|
c1d26d8884 | ||
|
b9eb9a4af9 | ||
|
24493548da | ||
|
09004f3697 | ||
|
a82e7ec281 | ||
|
aac4255d43 | ||
|
de73c8f91c | ||
|
eeccfa2570 | ||
|
d2ed426077 | ||
|
2675762ae9 | ||
|
a8b6e9f23c | ||
|
f8fb9fda6b | ||
2d0352d67f | |||
|
38bb6b7d1b | ||
|
e7f6f07599 | ||
|
140a96b3a0 | ||
|
c9fe6e7b8f | ||
|
0344e7a0a1 | ||
|
2e7a27d2ee | ||
83c1678f9e | |||
f4921d2c3e | |||
|
24c59283ec | ||
|
7a0e2923e5 | ||
|
47fdbdd324 | ||
|
be53ef24c1 | ||
51dd751f4a | |||
|
652268ad1a | ||
|
d04383ccf0 | ||
|
4d0ee65b51 | ||
a1de834104 | |||
402e18b460 | |||
|
7ef2f11c4c | ||
1fe580cd2b | |||
|
26aa3b8623 | ||
|
9184a62958 | ||
|
212140b88b | ||
|
d0d4fc73a7 | ||
|
6b49205745 | ||
|
515202da7b | ||
|
6f33cfd059 | ||
|
d1ef13fc04 | ||
|
585c45d6c2 | ||
82989ef076 | |||
|
8fc2b48db7 | ||
|
3469a2a445 | ||
672c857e37 | |||
3293f08e0b | |||
c02ef3e456 | |||
21edf67f89 | |||
08f00151f1 | |||
bcdb28249c | |||
|
04c74355ba | ||
|
76788a1eb3 | ||
|
cef9a76c3f | ||
|
28b23a6643 | ||
14dc8dd619 | |||
|
8cc6ee60ed | ||
|
63a7df027d | ||
|
d9f9a64389 | ||
|
3299d6540b | ||
|
9da1c5bb0b | ||
|
47d0d86a3c | ||
|
9e19a5f93e | ||
|
bd87f11355 | ||
|
a5681d3eba | ||
|
327ff89808 | ||
|
e18c8c30be | ||
|
644f4c3547 | ||
|
0a53ee8cfe | ||
|
5d66d8fd7d | ||
|
2e1936da64 | ||
|
5b34c8019f | ||
|
fcf06ba4c4 | ||
|
60e31c7cfa | ||
|
96097b34a5 | ||
|
9f3928658b | ||
|
931d32f414 | ||
|
10ba431d21 | ||
|
119ea7a195 | ||
|
fb6ae81415 | ||
|
09567bf0b3 | ||
|
f20b75d712 | ||
|
0e439aeab7 | ||
|
0a57db01af | ||
|
69a6c494bf | ||
|
96a4787710 | ||
|
aa220b2375 | ||
0ab6244f6b | |||
|
ead5b55119 | ||
b454ca7110 | |||
|
f354b869c1 | ||
|
5b0ce8c214 | ||
|
d5841109f0 | ||
81d335b081 | |||
81f0f97406 | |||
b6733edd17 | |||
|
37daf43037 | ||
|
58609e8fa6 | ||
|
2c67af391b | ||
|
62dec9f174 | ||
|
dd35a43703 | ||
|
a64bd6e22c | ||
|
08284e005d | ||
|
dcb2571888 | ||
66cd32a252 | |||
ac1e1a272f | |||
c17736b493 | |||
be073b46da | |||
d2b6176cdf | |||
|
66a8db9dc5 | ||
|
ebd4f32d15 | ||
|
48f99fd980 | ||
|
60da17418a | ||
|
9388fa2aa1 | ||
|
8899272614 | ||
|
9195f2337a | ||
|
25e534f3cf | ||
|
0797de06be | ||
|
f0b3267615 | ||
671a310d21 | |||
|
8ae15d9797 | ||
|
38729297f9 | ||
|
4e85ccf3c0 | ||
|
79343762a4 | ||
|
3964604148 | ||
4f052fc2a4 | |||
|
410b81537c | ||
3bbd7ea2c1 | |||
abe8cf4985 | |||
|
801cbea9cc | ||
|
5b77102b63 | ||
|
b52561fd38 | ||
|
2db88953e7 | ||
b9b34f676b | |||
5bd2b15e86 | |||
c0836bccef | |||
0130f3be45 | |||
|
4ad981a98e | ||
|
7c8e7c6b6e | ||
|
3b4f224c0b | ||
|
87d588f22f | ||
|
01f957c51f | ||
|
8b1880187a | ||
|
e804173595 | ||
|
c7b9987d08 | ||
|
d3e113eb5f | ||
|
baf9229931 | ||
|
329bb52613 | ||
|
9325d63d8e | ||
|
fbc4cef180 | ||
|
d95c7083ea | ||
|
0a883afe19 | ||
812886ca61 | |||
|
bc9b47d2e5 | ||
|
3e608afa6c | ||
|
967b27a2c1 | ||
|
ae748166d0 | ||
|
94c5269fa7 | ||
|
05bc2ed7cb | ||
|
05f4e73608 | ||
|
3b86f54fc7 | ||
|
90a91f1d0d | ||
|
a1e492d0d8 | ||
|
fb6e31ca43 | ||
8114bad033 | |||
|
c99f731f89 | ||
|
24fc25164a | ||
|
cebdd72146 | ||
|
92d5835495 | ||
|
cb449049ff | ||
f0336f1f17 | |||
f656f5e8eb | |||
66bed86bbb | |||
|
d0e8060182 | ||
6d1cc142c2 | |||
e1069eee05 | |||
32fda83d39 | |||
|
423aea5c32 | ||
|
e93630541d | ||
|
df673e9b2c | ||
|
66c60e52ba | ||
|
0cf25e84df | ||
|
3118f1430f | ||
|
ed51fba7ed | ||
|
1d14e31be3 | ||
b6e3e30d86 | |||
9244dad3f1 | |||
|
acb09eb9a8 | ||
|
cd3767bec2 | ||
|
21d9e87b46 | ||
|
ee260e4704 | ||
7fb77ff35a | |||
|
66dd7c3879 | ||
|
e817951bfd | ||
|
fdaf67d924 | ||
|
1a4c7a4e54 | ||
|
49f7332b75 | ||
|
8890436af1 | ||
|
a393c94695 | ||
|
ed9005690a | ||
|
b913c92aa7 | ||
|
427d9d483f | ||
|
a065d4623e | ||
|
7c81f8e076 | ||
|
e453572b6a | ||
|
03ca3190c9 | ||
|
cc62f4163f | ||
|
c01a2e2a81 | ||
|
6570f7989f | ||
|
ab711e6942 | ||
|
297fd3dda3 | ||
|
2bc2de9034 | ||
|
e0c58bf5ee | ||
|
a0f36a50e6 | ||
|
ca2f33c6d0 | ||
|
097328c3d7 | ||
|
aa7ca7fe64 | ||
|
bc7dcaffca | ||
|
5795f66d2e | ||
|
b1f5119d3a | ||
|
9b5cc73f3e | ||
|
8460952240 | ||
|
81315939b9 | ||
|
f3938fdb83 | ||
|
bad2c2154b | ||
|
a690936ed7 | ||
|
56ae855dc2 | ||
|
9cba6f7193 | ||
|
bfd79e59dc | ||
|
4b349c0f90 | ||
|
7a32cf1401 | ||
e3ea758c46 | |||
|
8acca3a72b | ||
698241e16e | |||
a4073895ae | |||
|
10f0c1e3cd | ||
|
37b9fdc0c1 | ||
|
ce10d9be3f | ||
3860a2ce2a | |||
07de9d6c3f | |||
b1fb3f4fb8 | |||
e6bb90543e | |||
|
f8e6cd10ef | ||
d54b6ac09b | |||
f6264e5212 | |||
76e77aefad | |||
317f69c152 | |||
aafce47596 | |||
|
af7d9020a1 | ||
|
31260e6625 | ||
|
685f822c63 | ||
4feea8db67 | |||
|
d755375966 | ||
3357cac847 | |||
054d05b132 | |||
|
2cf7ac2863 | ||
1585c12bb9 | |||
|
0837a1a398 | ||
c34f07d5fd | |||
b3ef06fdf3 | |||
f5f33da126 | |||
4da83d2f66 | |||
|
e3c639a09f | ||
|
72c5f2b3ee | ||
|
559d4e8335 | ||
|
fe13fadcfb | ||
|
43caef2968 | ||
|
c66b9c657a | ||
|
592f591a4b | ||
|
fe448a2616 | ||
|
c7b5f34138 | ||
bcfc9620b0 | |||
|
7bd43f7413 | ||
|
1100418063 | ||
35967effd3 | |||
fc5f67123a | |||
b00a861467 | |||
6b92b83128 | |||
|
43ced57794 | ||
|
e6798ffdca | ||
|
21ec3e5531 | ||
|
234f1007f7 | ||
|
ba3d7122df | ||
|
dea7f078f4 | ||
|
776fbda324 | ||
|
1a115e1cc8 | ||
|
6a897a2a9b | ||
|
aea1726f45 | ||
|
45fbaa64c2 | ||
|
1f57150d80 | ||
|
36105841b9 | ||
|
52d7e7d45e | ||
|
7adae09897 | ||
|
dcc5183dd0 | ||
|
75a86d8460 | ||
|
634d1f16b2 | ||
|
c09c94378c | ||
|
bfbe9ccc45 | ||
|
a1d028ea60 | ||
9cb84a1bad | |||
9c8b7b5efc | |||
b56ea5ca27 | |||
fb35cb5ed2 | |||
303cfd86a3 | |||
811bf22620 | |||
|
cc5f175615 | ||
|
26b0615c47 | ||
|
e4cc06f67e | ||
|
e8d397e4ee | ||
|
d84b67e54d | ||
|
7b56be0f3a | ||
|
d7522e5e8f | ||
|
3a54c71041 | ||
943c58e468 | |||
8b1b3fd0f9 | |||
3542ed53d4 | |||
94b40fd530 | |||
ed6084523d | |||
|
46aca9377b | ||
42046af933 | |||
|
7e7563f15f | ||
|
4be2c1022e | ||
6c6971fb43 | |||
|
dae35188ab | ||
|
35a2b3bb08 | ||
dd20ccee88 | |||
41563a871b | |||
7ca1793ec4 | |||
b8a0107ad1 | |||
a69eb5f516 | |||
|
1ad8321fff | ||
|
cdb6dbad85 | ||
|
a7e335c0b3 | ||
|
3d4736cedd | ||
|
f52e5a4d61 | ||
|
18b37e4b81 | ||
|
1c5ea33099 | ||
|
aa350528df | ||
|
f58db44ff2 | ||
|
ad30d04b5e | ||
|
7784d77713 | ||
|
db49efe29a | ||
|
52572cafa6 | ||
7f00a420cb | |||
|
585957b226 | ||
ebc3934ee6 | |||
|
3c94bddbc2 | ||
3f327116db | |||
|
a67ee02529 | ||
|
eb46a89855 | ||
|
39cda89e85 | ||
|
8016b8b3e9 | ||
|
4ac81b3ebb | ||
|
d9b4ada7e9 | ||
|
1a663d9efc | ||
93a6fd42d1 | |||
|
c61acc7fc1 | ||
c91e0058c2 | |||
5a5944867d | |||
5d3ccae6c5 | |||
e0c2ad1b65 | |||
3c047b124e | |||
b62452903a | |||
|
8139b14e9c | ||
|
5e40338543 | ||
|
90a4737bf6 | ||
|
b242a04c7d | ||
|
780593ae60 | ||
cbaf52fbe1 | |||
|
c3bc7d657e | ||
63fe6c6598 | |||
|
7ecfae8f7f | ||
|
1447661d20 | ||
9ad5112628 | |||
|
76f983a8e7 | ||
|
50a0cf1915 | ||
|
03264059e4 | ||
|
adb50cebcc | ||
|
9b99b95955 | ||
7ac17f5ae4 | |||
c2e4a8c9bf | |||
|
93c6398810 | ||
|
6ff02f0615 | ||
|
919d7accd7 | ||
|
fa2bea7394 | ||
|
d24a9dfe98 | ||
|
77ab6f8ec7 | ||
|
0bb395b21d | ||
195fd0dc60 | |||
|
91eee793e1 | ||
87ebfe1227 | |||
|
f240f61fb2 | ||
eeae4512ae | |||
|
13962a8475 | ||
|
7e1e2756d4 | ||
|
4adb91202d | ||
fde5bd0ccf | |||
|
00d28a500d | ||
56a6d7aec8 | |||
69928df3f0 | |||
|
fb1b6fa47a | ||
|
690d1dd6a4 | ||
|
456e67ac1c | ||
|
673f6753e9 | ||
5ab1a73a8a | |||
|
8a6e03c4d2 | ||
6733b71300 | |||
6dfe36b5cd | |||
de9f54ccc1 | |||
|
66d23e3e86 | ||
|
19fa960d83 | ||
|
21f009dc78 | ||
|
21d8636722 | ||
|
ba55f93f41 | ||
|
c4fe46a475 | ||
|
45ce517105 | ||
|
6ca637b8c1 | ||
|
349cbee6e9 | ||
84961034e4 | |||
|
ef7e47a53a | ||
|
aadcf40b9b | ||
|
548ec05a48 | ||
|
ebe84b9d4c | ||
|
1585eb1a3e | ||
|
7c31a32c2b | ||
|
4919c8db13 | ||
5dc377244d | |||
3a4b6b476b | |||
57734fd85d | |||
|
1f182c44c9 | ||
|
045503e728 | ||
c0c8fb25fb | |||
|
830ed6be61 | ||
|
46d97239c4 | ||
|
412e6132b6 | ||
|
6b5ebe2b09 | ||
aa737715dd | |||
|
75d3054ae4 | ||
cac2f6226c | |||
22f33fdd08 | |||
|
13af2b88b4 | ||
|
4d5d21be76 | ||
|
148e5b41d6 | ||
|
2ff10327d7 | ||
|
748d72202a | ||
|
0df95811ce | ||
|
70e1c57f81 | ||
d242875d27 | |||
|
6e21190858 | ||
|
13b7e8774d | ||
|
0151fe998a |
@@ -1,13 +1,15 @@
|
||||
notifications:
|
||||
global:
|
||||
irc:
|
||||
- openttd
|
||||
- openttd.notice
|
||||
|
||||
push:
|
||||
irc:
|
||||
- openttd
|
||||
- openttd.notice
|
||||
only:
|
||||
- master
|
||||
only-by:
|
||||
- DorpsGek
|
||||
commit-comment:
|
||||
pull-request:
|
||||
irc:
|
||||
- openttd
|
||||
- openttd.notice
|
||||
issue:
|
||||
irc:
|
||||
- openttd
|
||||
- openttd.notice
|
||||
tag-created:
|
||||
|
1
.github/FUNDING.yml
vendored
Normal file
1
.github/FUNDING.yml
vendored
Normal file
@@ -0,0 +1 @@
|
||||
custom: https://www.openttd.org/donate.html
|
48
.github/PULL_REQUEST_TEMPLATE.md
vendored
Normal file
48
.github/PULL_REQUEST_TEMPLATE.md
vendored
Normal file
@@ -0,0 +1,48 @@
|
||||
## Motivation / Problem
|
||||
|
||||
<!--
|
||||
Describe here shortly
|
||||
* For bug fixes:
|
||||
* What problem does this solve?
|
||||
* If there is already an issue, link the issue, otherwise describe the problem here.
|
||||
* For features or gameplay changes:
|
||||
* What was the motivation to develop this feature?
|
||||
* Does this address any problem with the gameplay or interface?
|
||||
* Which group of players do you think would enjoy this feature?
|
||||
-->
|
||||
|
||||
|
||||
## Description
|
||||
|
||||
<!--
|
||||
Describe here shortly
|
||||
* For bug fixes:
|
||||
* How is the problem solved?
|
||||
* For features or gameplay changes:
|
||||
* What does this feature do?
|
||||
* How does it improve/solve the situation described under 'motivation'.
|
||||
-->
|
||||
|
||||
|
||||
## Limitations
|
||||
|
||||
<!--
|
||||
Describe here
|
||||
* Is the problem solved in all scenarios?
|
||||
* Is this feature complete? Are there things that could be added in the future?
|
||||
* Are there things that are intentionally left out?
|
||||
* Do you know of a bug or corner case that does not work?
|
||||
-->
|
||||
|
||||
|
||||
## Checklist for review
|
||||
|
||||
Some things are not automated, and forgotten often. This list is a reminder for the reviewers.
|
||||
* The bug fix is important enough to be backported? (label: 'backport requested')
|
||||
* This PR affects the save game format? (label 'savegame upgrade')
|
||||
* This PR affects the GS/AI API? (label 'needs review: Script API')
|
||||
* ai_changelog.hpp, gs_changelog.hpp need updating.
|
||||
* The compatibility wrappers (compat_*.nut) need updating.
|
||||
* This PR affects the NewGRF API? (label 'needs review: NewGRF')
|
||||
* newgrf_debug_data.h may need updating.
|
||||
* [PR must be added to API tracker](https://wiki.openttd.org/en/Development/NewGRF/Specification%20Status)
|
16
.github/changelog.sh
vendored
Executable file
16
.github/changelog.sh
vendored
Executable file
@@ -0,0 +1,16 @@
|
||||
#!/bin/sh
|
||||
|
||||
tag=$(git name-rev --name-only --tags --no-undefined HEAD 2>/dev/null | sed 's@\^0$@@')
|
||||
|
||||
# If we are a tag, show the part of the changelog till (but excluding) the last stable
|
||||
if [ -n "$tag" ]; then
|
||||
grep='^[0-9]\+\.[0-9]\+\.[0-9]\+[^-]'
|
||||
next=$(cat changelog.txt | grep '^[0-9]' | awk 'BEGIN { show="false" } // { if (show=="true") print $0; if ($1=="'$tag'") show="true"} ' | grep "$grep" | head -n1 | sed 's/ .*//')
|
||||
cat changelog.txt | awk 'BEGIN { show="false" } /^[0-9]+.[0-9]+.[0-9]+/ { if ($1=="'$next'") show="false"; if ($1=="'$tag'") show="true";} // { if (show=="true") print $0 }'
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# In all other cases, show the git log of the last 7 days
|
||||
revdate=$(git log -1 --pretty=format:"%ci")
|
||||
last_week=$(date -d "$revdate -7days" +"%Y-%m-%d %H:%M")
|
||||
git log --after="${last_week}" --pretty=fuller
|
317
.github/workflows/ci-build.yml
vendored
Normal file
317
.github/workflows/ci-build.yml
vendored
Normal file
@@ -0,0 +1,317 @@
|
||||
name: CI
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
|
||||
env:
|
||||
CTEST_OUTPUT_ON_FAILURE: 1
|
||||
|
||||
jobs:
|
||||
emscripten:
|
||||
name: Emscripten
|
||||
|
||||
runs-on: ubuntu-20.04
|
||||
container:
|
||||
# If you change this version, change the number in the cache step too.
|
||||
image: emscripten/emsdk:2.0.10
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Setup cache
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: /emsdk/upstream/emscripten/cache
|
||||
key: 2.0.10-${{ runner.os }}
|
||||
|
||||
- name: Build (host tools)
|
||||
run: |
|
||||
mkdir build-host
|
||||
cd build-host
|
||||
|
||||
echo "::group::CMake"
|
||||
cmake .. -DOPTION_TOOLS_ONLY=ON
|
||||
echo "::endgroup::"
|
||||
|
||||
echo "::group::Build"
|
||||
echo "Running on $(nproc) cores"
|
||||
cmake --build . -j $(nproc) --target tools
|
||||
echo "::endgroup::"
|
||||
|
||||
- name: Install GCC problem matcher
|
||||
uses: ammaraskar/gcc-problem-matcher@master
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
mkdir build
|
||||
cd build
|
||||
|
||||
echo "::group::CMake"
|
||||
emcmake cmake .. -DHOST_BINARY_DIR=../build-host
|
||||
echo "::endgroup::"
|
||||
|
||||
echo "::group::Build"
|
||||
echo "Running on $(nproc) cores"
|
||||
cmake --build . -j $(nproc)
|
||||
echo "::endgroup::"
|
||||
|
||||
linux:
|
||||
name: Linux
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- compiler: clang
|
||||
cxxcompiler: clang++
|
||||
libsdl: libsdl2-dev
|
||||
- compiler: gcc
|
||||
cxxcompiler: g++
|
||||
libsdl: libsdl2-dev
|
||||
- compiler: gcc
|
||||
cxxcompiler: g++
|
||||
libsdl: libsdl1.2-dev
|
||||
- compiler: gcc
|
||||
cxxcompiler: g++
|
||||
extra-cmake-parameters: -DOPTION_DEDICATED=ON
|
||||
|
||||
runs-on: ubuntu-20.04
|
||||
env:
|
||||
CC: ${{ matrix.compiler }}
|
||||
CXX: ${{ matrix.cxxcompiler }}
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
echo "::group::Update apt"
|
||||
sudo apt-get update
|
||||
echo "::endgroup::"
|
||||
|
||||
echo "::group::Install dependencies"
|
||||
sudo apt-get install -y --no-install-recommends \
|
||||
liballegro4-dev \
|
||||
libfontconfig-dev \
|
||||
libicu-dev \
|
||||
liblzma-dev \
|
||||
liblzo2-dev \
|
||||
${{ matrix.libsdl }} \
|
||||
zlib1g-dev \
|
||||
# EOF
|
||||
echo "::endgroup::"
|
||||
env:
|
||||
DEBIAN_FRONTEND: noninteractive
|
||||
|
||||
- name: Get OpenGFX
|
||||
run: |
|
||||
mkdir -p ~/.local/share/openttd/baseset
|
||||
cd ~/.local/share/openttd/baseset
|
||||
|
||||
echo "::group::Download OpenGFX"
|
||||
curl -L https://cdn.openttd.org/opengfx-releases/0.6.0/opengfx-0.6.0-all.zip -o opengfx-all.zip
|
||||
echo "::endgroup::"
|
||||
|
||||
echo "::group::Unpack OpenGFX"
|
||||
unzip opengfx-all.zip
|
||||
echo "::endgroup::"
|
||||
|
||||
rm -f opengfx-all.zip
|
||||
|
||||
- name: Install GCC problem matcher
|
||||
uses: ammaraskar/gcc-problem-matcher@master
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
mkdir build
|
||||
cd build
|
||||
|
||||
echo "::group::CMake"
|
||||
cmake .. ${{ matrix.extra-cmake-parameters }}
|
||||
echo "::endgroup::"
|
||||
|
||||
echo "::group::Build"
|
||||
echo "Running on $(nproc) cores"
|
||||
cmake --build . -j $(nproc)
|
||||
echo "::endgroup::"
|
||||
|
||||
- name: Test
|
||||
run: |
|
||||
cd build
|
||||
ctest -j $(nproc) --timeout 120
|
||||
|
||||
macos:
|
||||
name: Mac OS
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- arch: x64
|
||||
full_arch: x86_64
|
||||
|
||||
runs-on: macos-latest
|
||||
env:
|
||||
MACOSX_DEPLOYMENT_TARGET: 10.9
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Prepare cache key
|
||||
id: key
|
||||
run: |
|
||||
echo "::set-output name=image::$ImageOS-$ImageVersion"
|
||||
|
||||
- name: Enable vcpkg cache
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: /usr/local/share/vcpkg/installed
|
||||
key: ${{ steps.key.outputs.image }}-vcpkg-${{ matrix.arch }}-0 # Increase the number whenever dependencies are modified
|
||||
restore-keys: |
|
||||
${{ steps.key.outputs.image }}-vcpkg-${{ matrix.arch }}
|
||||
|
||||
- name: Prepare vcpkg
|
||||
run: |
|
||||
vcpkg install --triplet=${{ matrix.arch }}-osx \
|
||||
liblzma \
|
||||
libpng \
|
||||
lzo \
|
||||
zlib \
|
||||
# EOF
|
||||
|
||||
- name: Install OpenGFX
|
||||
run: |
|
||||
mkdir -p ~/Documents/OpenTTD/baseset
|
||||
cd ~/Documents//OpenTTD/baseset
|
||||
|
||||
echo "::group::Download OpenGFX"
|
||||
curl -L https://cdn.openttd.org/opengfx-releases/0.6.0/opengfx-0.6.0-all.zip -o opengfx-all.zip
|
||||
echo "::endgroup::"
|
||||
|
||||
echo "::group::Unpack OpenGFX"
|
||||
unzip opengfx-all.zip
|
||||
echo "::endgroup::"
|
||||
|
||||
rm -f opengfx-all.zip
|
||||
|
||||
- name: Install GCC problem matcher
|
||||
uses: ammaraskar/gcc-problem-matcher@master
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
mkdir build
|
||||
cd build
|
||||
|
||||
echo "::group::CMake"
|
||||
cmake ${GITHUB_WORKSPACE} \
|
||||
-DCMAKE_OSX_ARCHITECTURES=${{ matrix.full_arch }} \
|
||||
-DVCPKG_TARGET_TRIPLET=${{ matrix.arch }}-osx \
|
||||
-DCMAKE_TOOLCHAIN_FILE=/usr/local/share/vcpkg/scripts/buildsystems/vcpkg.cmake \
|
||||
# EOF
|
||||
echo "::endgroup::"
|
||||
|
||||
echo "::group::Build"
|
||||
echo "Running on $(sysctl -n hw.logicalcpu) cores"
|
||||
cmake --build . -j $(sysctl -n hw.logicalcpu)
|
||||
echo "::endgroup::"
|
||||
|
||||
- name: Test
|
||||
run: |
|
||||
cd build
|
||||
ctest -j $(sysctl -n hw.logicalcpu) --timeout 120
|
||||
|
||||
windows:
|
||||
name: Windows
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os: [windows-latest, windows-2016]
|
||||
arch: [x86, x64]
|
||||
|
||||
runs-on: ${{ matrix.os }}
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Prepare cache key
|
||||
id: key
|
||||
shell: powershell
|
||||
run: |
|
||||
# Work around caching failure with GNU tar
|
||||
New-Item -Type Junction -Path vcpkg -Target c:\vcpkg
|
||||
|
||||
Write-Output "::set-output name=image::$env:ImageOS-$env:ImageVersion"
|
||||
|
||||
- name: Enable vcpkg cache
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: vcpkg/installed
|
||||
key: ${{ steps.key.outputs.image }}-vcpkg-${{ matrix.arch }}-0 # Increase the number whenever dependencies are modified
|
||||
restore-keys: |
|
||||
${{ steps.key.outputs.image }}-vcpkg-${{ matrix.arch }}
|
||||
|
||||
- name: Prepare vcpkg
|
||||
shell: bash
|
||||
run: |
|
||||
vcpkg install --triplet=${{ matrix.arch }}-windows-static \
|
||||
liblzma \
|
||||
libpng \
|
||||
lzo \
|
||||
zlib \
|
||||
# EOF
|
||||
|
||||
- name: Install OpenGFX
|
||||
shell: bash
|
||||
run: |
|
||||
mkdir -p "C:/Users/Public/Documents/OpenTTD/baseset"
|
||||
cd "C:/Users/Public/Documents/OpenTTD/baseset"
|
||||
|
||||
echo "::group::Download OpenGFX"
|
||||
curl -L https://cdn.openttd.org/opengfx-releases/0.6.0/opengfx-0.6.0-all.zip -o opengfx-all.zip
|
||||
echo "::endgroup::"
|
||||
|
||||
echo "::group::Unpack OpenGFX"
|
||||
unzip opengfx-all.zip
|
||||
echo "::endgroup::"
|
||||
|
||||
rm -f opengfx-all.zip
|
||||
|
||||
- name: Install MSVC problem matcher
|
||||
uses: ammaraskar/msvc-problem-matcher@master
|
||||
|
||||
- name: Configure developer command prompt for ${{ matrix.arch }}
|
||||
uses: ilammy/msvc-dev-cmd@v1
|
||||
with:
|
||||
arch: ${{ matrix.arch }}
|
||||
|
||||
- name: Build
|
||||
shell: bash
|
||||
run: |
|
||||
mkdir build
|
||||
cd build
|
||||
|
||||
echo "::group::CMake"
|
||||
cmake .. \
|
||||
-GNinja \
|
||||
-DVCPKG_TARGET_TRIPLET=${{ matrix.arch }}-windows-static \
|
||||
-DCMAKE_TOOLCHAIN_FILE="c:\vcpkg\scripts\buildsystems\vcpkg.cmake" \
|
||||
# EOF
|
||||
echo "::endgroup::"
|
||||
|
||||
echo "::group::Build"
|
||||
cmake --build .
|
||||
echo "::endgroup::"
|
||||
|
||||
- name: Test
|
||||
shell: bash
|
||||
run: |
|
||||
cd ${GITHUB_WORKSPACE}/build
|
||||
ctest --timeout 120
|
51
.github/workflows/commit-checker.yml
vendored
Normal file
51
.github/workflows/commit-checker.yml
vendored
Normal file
@@ -0,0 +1,51 @@
|
||||
name: Commit checker
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
commit-checker:
|
||||
name: Commit checker
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 4
|
||||
|
||||
- name: Get pull-request commits
|
||||
run: |
|
||||
set -x
|
||||
# actions/checkout did a merge checkout of the pull-request. As such, the first
|
||||
# commit is the merge commit. This means that on HEAD^ is the base branch, and
|
||||
# on HEAD^2 are the commits from the pull-request. We now check if those trees
|
||||
# have a common parent. If not, we fetch a few more commits till we do. In result,
|
||||
# the log between HEAD^ and HEAD^2 will be the commits in the pull-request.
|
||||
DEPTH=4
|
||||
while [ -z "$(git merge-base HEAD^ HEAD^2)" ]; do
|
||||
# Prevent infinite recursion
|
||||
if [ ${DEPTH} -gt 256 ]; then
|
||||
echo "No common parent between '${GITHUB_HEAD_REF}' and '${GITHUB_BASE_REF}'." >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
git -c protocol.version=2 fetch --no-tags --prune --progress --no-recurse-submodules --deepen=${DEPTH} origin HEAD
|
||||
DEPTH=$(( ${DEPTH} * 4 ))
|
||||
done
|
||||
|
||||
# Just to show which commits we are going to evaluate.
|
||||
git log --oneline HEAD^..HEAD^2
|
||||
|
||||
- name: Checkout commit-checker
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
repository: OpenTTD/OpenTTD-git-hooks
|
||||
path: git-hooks
|
||||
ref: master
|
||||
|
||||
- name: Check commits
|
||||
run: |
|
||||
set -x
|
||||
HOOKS_DIR=./git-hooks/hooks GIT_DIR=.git ./git-hooks/hooks/check-commits.sh HEAD^..HEAD^2
|
||||
echo "Commit checks passed"
|
133
.github/workflows/preview_build.yml
vendored
Normal file
133
.github/workflows/preview_build.yml
vendored
Normal file
@@ -0,0 +1,133 @@
|
||||
name: Preview build
|
||||
|
||||
on:
|
||||
repository_dispatch:
|
||||
types:
|
||||
- Preview*
|
||||
|
||||
jobs:
|
||||
preview:
|
||||
name: Build preview
|
||||
|
||||
runs-on: ubuntu-20.04
|
||||
container:
|
||||
# If you change this version, change the number in the cache step too.
|
||||
image: emscripten/emsdk:2.0.10
|
||||
# uid=1001(runner) gid=121(docker)
|
||||
options: -u 1001:121
|
||||
|
||||
steps:
|
||||
- name: Update deployment status to in progress
|
||||
uses: octokit/request-action@v2.x
|
||||
with:
|
||||
route: POST /repos/{owner}/{repo}/deployments/{deployment_id}/statuses
|
||||
mediaType: |
|
||||
previews:
|
||||
- ant-man
|
||||
- flash
|
||||
owner: ${{ github.event.repository.owner.login }}
|
||||
repo: ${{ github.event.repository.name }}
|
||||
deployment_id: ${{ github.event.client_payload.deployment_id }}
|
||||
state: in_progress
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.PREVIEW_GITHUB_TOKEN }}
|
||||
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
ref: ${{ github.event.client_payload.sha }}
|
||||
|
||||
- name: Name branch
|
||||
run: |
|
||||
name=$(echo "${{ github.event.client_payload.folder }}")
|
||||
git checkout -b ${name}
|
||||
|
||||
- name: Setup cache
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: /emsdk/upstream/emscripten/cache
|
||||
key: 2.0.10-${{ runner.os }}
|
||||
|
||||
- name: Build (host tools)
|
||||
run: |
|
||||
mkdir build-host
|
||||
cd build-host
|
||||
|
||||
echo "::group::CMake"
|
||||
cmake .. -DOPTION_TOOLS_ONLY=ON
|
||||
echo "::endgroup::"
|
||||
|
||||
echo "::group::Build"
|
||||
echo "Running on $(nproc) cores"
|
||||
make -j$(nproc) tools
|
||||
echo "::endgroup::"
|
||||
|
||||
- name: Install GCC problem matcher
|
||||
uses: ammaraskar/gcc-problem-matcher@master
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
mkdir build
|
||||
cd build
|
||||
|
||||
echo "::group::CMake"
|
||||
emcmake cmake .. \
|
||||
-DHOST_BINARY_DIR=../build-host \
|
||||
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
|
||||
# EOF
|
||||
echo "::endgroup::"
|
||||
|
||||
echo "::group::Build"
|
||||
echo "Running on $(nproc) cores"
|
||||
emmake make -j$(nproc)
|
||||
echo "::endgroup::"
|
||||
|
||||
- name: Publish preview
|
||||
run: |
|
||||
# setuptools is missing in this Docker image, which breaks installing
|
||||
# awscli. So we need to do this in two steps to recover sanity.
|
||||
pip3 install setuptools
|
||||
pip3 install awscli
|
||||
|
||||
~/.local/bin/aws s3 cp --only-show-errors build/openttd.data s3://${{ secrets.PREVIEW_S3_BUCKET }}/${{ github.event.client_payload.folder }}/
|
||||
~/.local/bin/aws s3 cp --only-show-errors build/openttd.html s3://${{ secrets.PREVIEW_S3_BUCKET }}/${{ github.event.client_payload.folder }}/
|
||||
~/.local/bin/aws s3 cp --only-show-errors build/openttd.js s3://${{ secrets.PREVIEW_S3_BUCKET }}/${{ github.event.client_payload.folder }}/
|
||||
~/.local/bin/aws s3 cp --only-show-errors build/openttd.wasm s3://${{ secrets.PREVIEW_S3_BUCKET }}/${{ github.event.client_payload.folder }}/
|
||||
|
||||
# Invalidate the cache of the CloudFront distribution
|
||||
~/.local/bin/aws cloudfront create-invalidation --distribution-id ${{ secrets.PREVIEW_CF_DISTRIBUTION_ID }} --paths "/${{ github.event.client_payload.folder }}/*"
|
||||
env:
|
||||
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
|
||||
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
|
||||
|
||||
- name: Update deployment status to success
|
||||
uses: octokit/request-action@v2.x
|
||||
with:
|
||||
route: POST /repos/{owner}/{repo}/deployments/{deployment_id}/statuses
|
||||
mediaType: |
|
||||
previews:
|
||||
- ant-man
|
||||
- flash
|
||||
owner: ${{ github.event.repository.owner.login }}
|
||||
repo: ${{ github.event.repository.name }}
|
||||
deployment_id: ${{ github.event.client_payload.deployment_id }}
|
||||
state: success
|
||||
environment_url: https://preview.openttd.org/${{ github.event.client_payload.folder }}/
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.PREVIEW_GITHUB_TOKEN }}
|
||||
|
||||
- if: failure()
|
||||
name: Update deployment status to failure
|
||||
uses: octokit/request-action@v2.x
|
||||
with:
|
||||
route: POST /repos/{owner}/{repo}/deployments/{deployment_id}/statuses
|
||||
mediaType: |
|
||||
previews:
|
||||
- ant-man
|
||||
- flash
|
||||
owner: ${{ github.event.repository.owner.login }}
|
||||
repo: ${{ github.event.repository.name }}
|
||||
deployment_id: ${{ github.event.client_payload.deployment_id }}
|
||||
state: failure
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.PREVIEW_GITHUB_TOKEN }}
|
66
.github/workflows/preview_label.yml
vendored
Normal file
66
.github/workflows/preview_label.yml
vendored
Normal file
@@ -0,0 +1,66 @@
|
||||
name: Preview label
|
||||
|
||||
on:
|
||||
pull_request_target:
|
||||
types:
|
||||
- labeled
|
||||
|
||||
env:
|
||||
TEAM_CORE_DEVELOPER: core-developers
|
||||
|
||||
jobs:
|
||||
check_preview_label:
|
||||
name: Check for preview label
|
||||
if: github.event.action == 'labeled' && github.event.label.name == 'preview'
|
||||
|
||||
runs-on: ubuntu-20.04
|
||||
|
||||
steps:
|
||||
- name: Check if label was added by core developer
|
||||
id: core_developer
|
||||
continue-on-error: true
|
||||
uses: octokit/request-action@v2.x
|
||||
with:
|
||||
route: GET /orgs/OpenTTD/teams/${{ env.TEAM_CORE_DEVELOPER }}/memberships/${{ github.event.sender.login }}
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.PREVIEW_GITHUB_TOKEN }}
|
||||
|
||||
- if: steps.core_developer.outcome == 'failure'
|
||||
name: Remove preview label if not core developer
|
||||
uses: octokit/request-action@v2.x
|
||||
with:
|
||||
route: DELETE /repos/{owner}/{repo}/issues/{issue_number}/labels/preview
|
||||
owner: ${{ github.event.repository.owner.login }}
|
||||
repo: ${{ github.event.repository.name }}
|
||||
issue_number: ${{ github.event.number }}
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.PREVIEW_GITHUB_TOKEN }}
|
||||
|
||||
- if: steps.core_developer.outcome == 'success'
|
||||
name: Create deployment
|
||||
id: deployment
|
||||
uses: octokit/request-action@v2.x
|
||||
with:
|
||||
route: POST /repos/{owner}/{repo}/deployments
|
||||
mediaType: |
|
||||
previews:
|
||||
- ant-man
|
||||
- flash
|
||||
owner: ${{ github.event.repository.owner.login }}
|
||||
repo: ${{ github.event.repository.name }}
|
||||
ref: ${{ github.event.pull_request.head.sha }}
|
||||
task: deploy:preview
|
||||
auto_merge: false
|
||||
required_contexts: "[]"
|
||||
environment: preview-pr-${{ github.event.number }}
|
||||
description: "Preview for Pull Request #${{ github.event.number }}"
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.PREVIEW_GITHUB_TOKEN }}
|
||||
|
||||
- if: steps.core_developer.outcome == 'success'
|
||||
name: Trigger 'preview build'
|
||||
uses: peter-evans/repository-dispatch@v1
|
||||
with:
|
||||
token: ${{ secrets.PREVIEW_GITHUB_TOKEN }}
|
||||
event-type: "Preview build #${{ github.event.number }}"
|
||||
client-payload: '{"folder": "pr${{ github.event.number }}", "sha": "${{ github.event.pull_request.head.sha }}", "deployment_id": "${{ fromJson(steps.deployment.outputs.data).id }}"}'
|
66
.github/workflows/preview_push.yml
vendored
Normal file
66
.github/workflows/preview_push.yml
vendored
Normal file
@@ -0,0 +1,66 @@
|
||||
name: Preview push
|
||||
|
||||
on:
|
||||
pull_request_target:
|
||||
types:
|
||||
- synchronize
|
||||
|
||||
jobs:
|
||||
check_new_preview:
|
||||
name: Check preview needs update
|
||||
|
||||
runs-on: ubuntu-20.04
|
||||
|
||||
steps:
|
||||
- name: Check if earlier preview exists
|
||||
id: earlier_preview
|
||||
uses: octokit/request-action@v2.x
|
||||
with:
|
||||
route: GET /repos/{owner}/{repo}/deployments
|
||||
owner: ${{ github.event.repository.owner.login }}
|
||||
repo: ${{ github.event.repository.name }}
|
||||
environment: preview-pr-${{ github.event.number }}
|
||||
per_page: 1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.PREVIEW_GITHUB_TOKEN }}
|
||||
|
||||
- if: toJson(fromJson(steps.earlier_preview.outputs.data)) != '[]'
|
||||
name: Check for preview label
|
||||
id: preview_label
|
||||
uses: octokit/request-action@v2.x
|
||||
with:
|
||||
route: GET /repos/{owner}/{repo}/issues/{issue_number}/labels
|
||||
owner: ${{ github.event.repository.owner.login }}
|
||||
repo: ${{ github.event.repository.name }}
|
||||
issue_number: ${{ github.event.number }}
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.PREVIEW_GITHUB_TOKEN }}
|
||||
|
||||
- if: toJson(fromJson(steps.earlier_preview.outputs.data)) != '[]' && contains(fromJson(steps.preview_label.outputs.data).*.name, 'preview')
|
||||
name: Create deployment
|
||||
id: deployment
|
||||
uses: octokit/request-action@v2.x
|
||||
with:
|
||||
route: POST /repos/{owner}/{repo}/deployments
|
||||
mediaType: |
|
||||
previews:
|
||||
- ant-man
|
||||
- flash
|
||||
owner: ${{ github.event.repository.owner.login }}
|
||||
repo: ${{ github.event.repository.name }}
|
||||
ref: ${{ github.event.pull_request.head.sha }}
|
||||
task: deploy:preview
|
||||
auto_merge: false
|
||||
required_contexts: "[]"
|
||||
environment: preview-pr-${{ github.event.number }}
|
||||
description: "Preview for Pull Request #${{ github.event.number }}"
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.PREVIEW_GITHUB_TOKEN }}
|
||||
|
||||
- if: toJson(fromJson(steps.earlier_preview.outputs.data)) != '[]' && contains(fromJson(steps.preview_label.outputs.data).*.name, 'preview')
|
||||
name: Trigger 'preview build'
|
||||
uses: peter-evans/repository-dispatch@v1
|
||||
with:
|
||||
token: ${{ secrets.PREVIEW_GITHUB_TOKEN }}
|
||||
event-type: "Preview build #${{ github.event.number }}"
|
||||
client-payload: '{"folder": "pr${{ github.event.number }}", "sha": "${{ github.event.pull_request.head.sha }}", "deployment_id": "${{ fromJson(steps.deployment.outputs.data).id }}"}'
|
954
.github/workflows/release.yml
vendored
Normal file
954
.github/workflows/release.yml
vendored
Normal file
@@ -0,0 +1,954 @@
|
||||
name: Release
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
ref:
|
||||
description: 'Ref to build (for Pull Requests, use refs/pull/NNN/head)'
|
||||
required: true
|
||||
repository_dispatch:
|
||||
# client_payload should be the same as the inputs for workflow_dispatch.
|
||||
types:
|
||||
- Build*
|
||||
release:
|
||||
types:
|
||||
- published
|
||||
|
||||
jobs:
|
||||
source:
|
||||
name: Source
|
||||
|
||||
runs-on: ubuntu-20.04
|
||||
|
||||
outputs:
|
||||
version: ${{ steps.metadata.outputs.version }}
|
||||
is_tag: ${{ steps.metadata.outputs.is_tag }}
|
||||
trigger_type: ${{ steps.metadata.outputs.trigger_type }}
|
||||
folder: ${{ steps.metadata.outputs.folder }}
|
||||
|
||||
steps:
|
||||
- name: Checkout (Release)
|
||||
if: github.event_name == 'release'
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
# We generate a changelog; for this we need the full git log.
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Checkout (Manual)
|
||||
if: github.event_name == 'workflow_dispatch'
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
ref: ${{ github.event.inputs.ref }}
|
||||
# We generate a changelog; for this we need the full git log.
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Checkout (Trigger)
|
||||
if: github.event_name == 'repository_dispatch'
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
ref: ${{ github.event.client_payload.ref }}
|
||||
# We generate a changelog; for this we need the full git log.
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Check valid branch name
|
||||
run: |
|
||||
if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then
|
||||
REF="${{ github.event.inputs.ref }}"
|
||||
elif [ "${{ github.event_name }}" = "repository_dispatch" ]; then
|
||||
REF="${{ github.event.client_payload.ref }}"
|
||||
else
|
||||
REF="${{ github.ref }}"
|
||||
fi
|
||||
|
||||
# Check if we are a tag.
|
||||
if [ -n "$(git name-rev --name-only --tags --no-undefined HEAD 2>/dev/null || false)" ]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# Check if the checkout caused the branch to be named.
|
||||
if [ "$(git rev-parse --abbrev-ref HEAD)" != "HEAD" ]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# Check if this was a pull request.
|
||||
if [ -n "$(echo ${REF} | grep '^refs/pull/[0-9]*')" ]; then
|
||||
PULL=$(echo ${REF} | cut -d/ -f3)
|
||||
git checkout -b pr${PULL}
|
||||
fi
|
||||
|
||||
# Are we still in a detached state? Error out.
|
||||
if [ "$(git rev-parse --abbrev-ref HEAD)" == "HEAD" ]; then
|
||||
echo "The 'ref' given resulted in a checkout of a detached HEAD."
|
||||
echo "We cannot detect the version for these checkout accurate."
|
||||
echo ""
|
||||
echo "If you want to build a Pull Request, make sure you use 'refs/pull/NNN/head'."
|
||||
echo ""
|
||||
echo "Cancelling build, as without a version we cannot store the artifacts."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
- name: Generate metadata
|
||||
id: metadata
|
||||
run: |
|
||||
echo "::group::Prepare metadata files"
|
||||
cmake -DGENERATE_OTTDREV=1 -P cmake/scripts/FindVersion.cmake
|
||||
./.github/changelog.sh > .changelog
|
||||
TZ='UTC' date +"%Y-%m-%d %H:%M UTC" > .release_date
|
||||
cat .ottdrev | cut -f 1 -d$'\t' > .version
|
||||
|
||||
if [ $(cat .ottdrev | cut -f 5 -d$'\t') = '1' ]; then
|
||||
# Assume that all tags are always releases. Why else make a tag?
|
||||
IS_TAG="true"
|
||||
|
||||
FOLDER="${{ env.FOLDER_RELEASES }}"
|
||||
TRIGGER_TYPE="new-tag"
|
||||
else
|
||||
IS_TAG="false"
|
||||
|
||||
BRANCH=$(git symbolic-ref -q HEAD | sed 's@.*/@@')
|
||||
if [ -z "${BRANCH}" ]; then
|
||||
echo "Internal error: branch name is empty."
|
||||
echo "An earlier step should have prevented this from happening."
|
||||
echo "Cancelling build, as without a branch name we cannot store the artifacts"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ "${BRANCH}" = "${{ env.NIGHTLIES_BRANCH }}" ]; then
|
||||
# The "master" branch is special, and we call a nightly.
|
||||
FOLDER="${{ env.FOLDER_NIGHTLIES }}/$(date +%Y)"
|
||||
TRIGGER_TYPE="new-master"
|
||||
else
|
||||
# All other branches, which can be builds of Pull Requests, are
|
||||
# put in their own folder.
|
||||
FOLDER="${{ env.FOLDER_BRANCHES }}/${BRANCH}"
|
||||
TRIGGER_TYPE="new-branch"
|
||||
fi
|
||||
fi
|
||||
|
||||
mkdir -p build/bundles
|
||||
cp .changelog build/bundles/changelog.txt
|
||||
cp .release_date build/bundles/released.txt
|
||||
cp README.md build/bundles/README.md
|
||||
echo "::endgroup::"
|
||||
|
||||
echo "Release Date: $(cat .release_date)"
|
||||
echo "Revision: $(cat .ottdrev)"
|
||||
echo "Version: $(cat .version)"
|
||||
echo "Is tag: ${IS_TAG}"
|
||||
echo "Folder on CDN: ${FOLDER}"
|
||||
echo "Workflow trigger: ${TRIGGER_TYPE}"
|
||||
|
||||
echo "::set-output name=version::$(cat .version)"
|
||||
echo "::set-output name=is_tag::${IS_TAG}"
|
||||
echo "::set-output name=folder::${FOLDER}"
|
||||
echo "::set-output name=trigger_type::${TRIGGER_TYPE}"
|
||||
env:
|
||||
NIGHTLIES_BRANCH: master
|
||||
FOLDER_RELEASES: openttd-releases
|
||||
FOLDER_NIGHTLIES: openttd-nightlies
|
||||
FOLDER_BRANCHES: openttd-branches
|
||||
|
||||
- name: Remove VCS information
|
||||
run: |
|
||||
rm -rf .git
|
||||
|
||||
- name: Create bundles
|
||||
run: |
|
||||
FOLDER_NAME=openttd-${{ steps.metadata.outputs.version }}
|
||||
|
||||
# Rename the folder to openttd-NNN
|
||||
mkdir ${FOLDER_NAME}
|
||||
find . -maxdepth 1 -not -name . -not -name build -not -name ${FOLDER_NAME} -exec mv {} ${FOLDER_NAME}/ \;
|
||||
|
||||
echo "::group::Create tarball (xz) bundle"
|
||||
tar --xz -cvf build/bundles/${FOLDER_NAME}-source.tar.xz ${FOLDER_NAME}
|
||||
echo "::endgroup::"
|
||||
|
||||
# This tarball is only to be used within this workflow.
|
||||
echo "::group::Create tarball (gz) bundle"
|
||||
tar --gzip -cvf source.tar.gz ${FOLDER_NAME}
|
||||
echo "::endgroup::"
|
||||
|
||||
echo "::group::Create zip bundle"
|
||||
zip -9 -r build/bundles/${FOLDER_NAME}-source.zip ${FOLDER_NAME}
|
||||
echo "::endgroup::"
|
||||
|
||||
- name: Store bundles
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: openttd-source
|
||||
path: build/bundles/*
|
||||
retention-days: 5
|
||||
|
||||
- name: Store source (for other jobs)
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: internal-source
|
||||
path: source.tar.gz
|
||||
retention-days: 1
|
||||
|
||||
docs:
|
||||
name: Docs
|
||||
needs: source
|
||||
|
||||
runs-on: ubuntu-20.04
|
||||
|
||||
steps:
|
||||
- name: Download source
|
||||
uses: actions/download-artifact@v2
|
||||
with:
|
||||
name: internal-source
|
||||
|
||||
- name: Unpack source
|
||||
run: |
|
||||
tar -xf source.tar.gz --strip-components=1
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
echo "::group::Update apt"
|
||||
sudo apt-get update
|
||||
echo "::endgroup::"
|
||||
|
||||
echo "::group::Install dependencies"
|
||||
sudo apt-get install -y --no-install-recommends \
|
||||
doxygen \
|
||||
# EOF
|
||||
echo "::endgroup::"
|
||||
env:
|
||||
DEBIAN_FRONTEND: noninteractive
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
mkdir -p ${GITHUB_WORKSPACE}/build
|
||||
cd ${GITHUB_WORKSPACE}/build
|
||||
|
||||
echo "::group::CMake"
|
||||
cmake ${GITHUB_WORKSPACE} \
|
||||
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
|
||||
-DOPTION_DOCS_ONLY=ON \
|
||||
# EOF
|
||||
echo "::endgroup::"
|
||||
|
||||
echo "::group::Build"
|
||||
cmake --build . --target docs
|
||||
echo "::endgroup::"
|
||||
|
||||
- name: Create bundles
|
||||
run: |
|
||||
BASENAME=openttd-${{ needs.source.outputs.version }}
|
||||
|
||||
cd ${GITHUB_WORKSPACE}/build
|
||||
|
||||
mv docs/source ${BASENAME}-docs
|
||||
mv docs/ai-api ${BASENAME}-docs-ai
|
||||
mv docs/gs-api ${BASENAME}-docs-gs
|
||||
|
||||
mkdir -p bundles
|
||||
|
||||
echo "::group::Create docs bundle"
|
||||
tar --xz -cf bundles/${BASENAME}-docs.tar.xz ${BASENAME}-docs
|
||||
echo "::endgroup::"
|
||||
|
||||
echo "::group::Create AI API docs bundle"
|
||||
tar --xz -cf bundles/${BASENAME}-docs-ai.tar.xz ${BASENAME}-docs-ai
|
||||
echo "::endgroup::"
|
||||
|
||||
echo "::group::Create GameScript API docs bundle"
|
||||
tar --xz -cf bundles/${BASENAME}-docs-gs.tar.xz ${BASENAME}-docs-gs
|
||||
echo "::endgroup::"
|
||||
|
||||
- name: Store bundles
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: openttd-docs
|
||||
path: build/bundles/*.tar.xz
|
||||
retention-days: 5
|
||||
|
||||
linux:
|
||||
name: Linux (Generic)
|
||||
needs: source
|
||||
|
||||
runs-on: ubuntu-20.04
|
||||
container:
|
||||
# manylinux2014 is based on CentOS 7, but already has a lot of things
|
||||
# installed and preconfigured. It makes it easier to build OpenTTD.
|
||||
image: quay.io/pypa/manylinux2014_x86_64
|
||||
|
||||
steps:
|
||||
- name: Download source
|
||||
uses: actions/download-artifact@v2
|
||||
with:
|
||||
name: internal-source
|
||||
|
||||
- name: Unpack source
|
||||
run: |
|
||||
tar -xf source.tar.gz --strip-components=1
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
echo "::group::Install dependencies"
|
||||
yum install -y \
|
||||
fontconfig-devel \
|
||||
freetype-devel \
|
||||
libicu-devel \
|
||||
libpng-devel \
|
||||
libpng-devel \
|
||||
lzo-devel \
|
||||
SDL2-devel \
|
||||
wget \
|
||||
xz-devel \
|
||||
zlib-devel \
|
||||
# EOF
|
||||
echo "::endgroup::"
|
||||
|
||||
# The yum variant of fluidsynth depends on all possible audio drivers,
|
||||
# like jack, ALSA, pulseaudio, etc. This is not really useful for us,
|
||||
# as we route the output of fluidsynth back via our sound driver, and
|
||||
# as such do not use these audio driver outputs at all. So instead,
|
||||
# we compile fluidsynth ourselves, with as little dependencies as
|
||||
# possible. This currently means it picks up SDL2, but this is fine,
|
||||
# as we need SDL2 anyway.
|
||||
echo "::group::Install fluidsynth"
|
||||
wget https://github.com/FluidSynth/fluidsynth/archive/v2.1.6.tar.gz
|
||||
tar xf v2.1.6.tar.gz
|
||||
(
|
||||
cd fluidsynth-2.1.6
|
||||
mkdir build
|
||||
cd build
|
||||
cmake .. -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_INSTALL_PREFIX=/usr
|
||||
cmake --build . -j $(nproc)
|
||||
cmake --install .
|
||||
)
|
||||
echo "::endgroup::"
|
||||
|
||||
- name: Install GCC problem matcher
|
||||
uses: ammaraskar/gcc-problem-matcher@master
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
mkdir -p build
|
||||
cd build
|
||||
|
||||
echo "::group::CMake"
|
||||
cmake ${GITHUB_WORKSPACE} \
|
||||
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
|
||||
-DOPTION_PACKAGE_DEPENDENCIES=ON \
|
||||
# EOF
|
||||
echo "::endgroup::"
|
||||
|
||||
echo "::group::Build"
|
||||
echo "Running on $(nproc) cores"
|
||||
cmake --build . -j $(nproc)
|
||||
echo "::endgroup::"
|
||||
|
||||
- name: Create bundles
|
||||
run: |
|
||||
cd ${GITHUB_WORKSPACE}/build
|
||||
echo "::group::Run CPack"
|
||||
cpack
|
||||
echo "::endgroup::"
|
||||
|
||||
echo "::group::Cleanup"
|
||||
# Remove the sha256 files CPack generates; we will do this ourself at
|
||||
# the end of this workflow.
|
||||
rm -f bundles/*.sha256
|
||||
echo "::endgroup::"
|
||||
|
||||
- name: Store bundles
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: openttd-linux-generic
|
||||
path: build/bundles
|
||||
retention-days: 5
|
||||
|
||||
linux-distro:
|
||||
name: Linux (Distros)
|
||||
needs: source
|
||||
|
||||
if: needs.source.outputs.is_tag == 'true'
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- container_image: "ubuntu:18.04"
|
||||
bundle_name: "bionic"
|
||||
- container_image: "ubuntu:20.04"
|
||||
bundle_name: "focal"
|
||||
- container_image: "ubuntu:20.10"
|
||||
bundle_name: "groovy"
|
||||
- container_image: "debian:buster"
|
||||
bundle_name: "buster"
|
||||
- container_image: "debian:bullseye"
|
||||
bundle_name: "bullseye"
|
||||
|
||||
runs-on: ubuntu-20.04
|
||||
container:
|
||||
image: ${{ matrix.container_image }}
|
||||
|
||||
steps:
|
||||
- name: Download source
|
||||
uses: actions/download-artifact@v2
|
||||
with:
|
||||
name: internal-source
|
||||
|
||||
- name: Unpack source
|
||||
run: |
|
||||
tar -xf source.tar.gz --strip-components=1
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
echo "::group::Update apt"
|
||||
apt-get update
|
||||
echo "::endgroup::"
|
||||
|
||||
echo "::group::Install dependencies"
|
||||
apt-get install -y --no-install-recommends \
|
||||
cmake \
|
||||
debhelper \
|
||||
g++ \
|
||||
git \
|
||||
make \
|
||||
openssl \
|
||||
libfontconfig-dev \
|
||||
libfluidsynth-dev \
|
||||
libicu-dev \
|
||||
liblzma-dev \
|
||||
liblzo2-dev \
|
||||
libsdl2-dev \
|
||||
lsb-release \
|
||||
zlib1g-dev \
|
||||
# EOF
|
||||
echo "::endgroup::"
|
||||
env:
|
||||
DEBIAN_FRONTEND: noninteractive
|
||||
|
||||
- name: Install GCC problem matcher
|
||||
uses: ammaraskar/gcc-problem-matcher@master
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
mkdir -p build
|
||||
cd build
|
||||
|
||||
echo "::group::CMake"
|
||||
cmake ${GITHUB_WORKSPACE} \
|
||||
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
|
||||
-DCMAKE_INSTALL_PREFIX=/usr \
|
||||
# EOF
|
||||
echo "::endgroup::"
|
||||
|
||||
echo "::group::Build"
|
||||
echo "Running on $(nproc) cores"
|
||||
# Ubuntu 18.04 cmake does not support -j so we pass the option to the native tool
|
||||
cmake --build . -- -j $(nproc)
|
||||
echo "::endgroup::"
|
||||
|
||||
- name: Create bundles
|
||||
run: |
|
||||
cd ${GITHUB_WORKSPACE}/build
|
||||
echo "::group::Run CPack"
|
||||
cpack
|
||||
echo "::endgroup::"
|
||||
|
||||
echo "::group::Cleanup"
|
||||
# Remove the sha256 files CPack generates; we will do this ourself at
|
||||
# the end of this workflow.
|
||||
rm -f bundles/*.sha256
|
||||
echo "::endgroup::"
|
||||
|
||||
- name: Store bundles
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: openttd-linux-${{ matrix.bundle_name }}
|
||||
path: build/bundles
|
||||
retention-days: 5
|
||||
|
||||
macos:
|
||||
name: MacOS
|
||||
needs: source
|
||||
|
||||
runs-on: macos-10.15
|
||||
env:
|
||||
MACOSX_DEPLOYMENT_TARGET: 10.9
|
||||
|
||||
steps:
|
||||
- name: Download source
|
||||
uses: actions/download-artifact@v2
|
||||
with:
|
||||
name: internal-source
|
||||
|
||||
- name: Unpack source
|
||||
run: |
|
||||
tar -xf source.tar.gz --strip-components=1
|
||||
|
||||
- name: Install dependencies
|
||||
env:
|
||||
HOMEBREW_NO_AUTO_UPDATE: 1
|
||||
HOMEBREW_NO_INSTALL_CLEANUP: 1
|
||||
run: |
|
||||
brew install pandoc
|
||||
|
||||
- name: Prepare cache key
|
||||
id: key
|
||||
run: |
|
||||
echo "::set-output name=image::$ImageOS-$ImageVersion"
|
||||
|
||||
- name: Enable vcpkg cache
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: /usr/local/share/vcpkg/installed
|
||||
key: ${{ steps.key.outputs.image }}-vcpkg-release-0 # Increase the number whenever dependencies are modified
|
||||
restore-keys: |
|
||||
${{ steps.key.outputs.image }}-vcpkg-release
|
||||
${{ steps.key.outputs.image }}-vcpkg-x64
|
||||
|
||||
- name: Prepare vcpkg
|
||||
run: |
|
||||
vcpkg install \
|
||||
liblzma:x64-osx \
|
||||
liblzma:arm64-osx \
|
||||
libpng:x64-osx \
|
||||
libpng:arm64-osx \
|
||||
lzo:x64-osx \
|
||||
lzo:arm64-osx \
|
||||
zlib:x64-osx \
|
||||
zlib:arm64-osx \
|
||||
# EOF
|
||||
|
||||
- name: Install GCC problem matcher
|
||||
uses: ammaraskar/gcc-problem-matcher@master
|
||||
|
||||
- name: Build tools
|
||||
run: |
|
||||
mkdir build-host
|
||||
cd build-host
|
||||
|
||||
echo "::group::CMake"
|
||||
cmake ${GITHUB_WORKSPACE} \
|
||||
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
|
||||
-DOPTION_TOOLS_ONLY=ON \
|
||||
# EOF
|
||||
echo "::endgroup::"
|
||||
|
||||
echo "::group::Build tools"
|
||||
echo "Running on $(sysctl -n hw.logicalcpu) cores"
|
||||
cmake --build . -j $(sysctl -n hw.logicalcpu) --target tools
|
||||
echo "::endgroup::"
|
||||
|
||||
- name: Import code signing certificates
|
||||
uses: Apple-Actions/import-codesign-certs@v1
|
||||
with:
|
||||
# The certificates in a PKCS12 file encoded as a base64 string
|
||||
p12-file-base64: ${{ secrets.APPLE_DEVELOPER_CERTIFICATE_P12_BASE64 }}
|
||||
# The password used to import the PKCS12 file.
|
||||
p12-password: ${{ secrets.APPLE_DEVELOPER_CERTIFICATE_PASSWORD }}
|
||||
# If this is run on a fork, there may not be a certificate set up - continue in this case
|
||||
continue-on-error: true
|
||||
|
||||
- name: Build arm64
|
||||
run: |
|
||||
mkdir build-arm64
|
||||
cd build-arm64
|
||||
|
||||
echo "::group::CMake"
|
||||
cmake ${GITHUB_WORKSPACE} \
|
||||
-DCMAKE_OSX_ARCHITECTURES=arm64 \
|
||||
-DVCPKG_TARGET_TRIPLET=arm64-osx \
|
||||
-DCMAKE_TOOLCHAIN_FILE=/usr/local/share/vcpkg/scripts/buildsystems/vcpkg.cmake \
|
||||
-DHOST_BINARY_DIR=${GITHUB_WORKSPACE}/build-host \
|
||||
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
|
||||
# EOF
|
||||
echo "::endgroup::"
|
||||
|
||||
echo "::group::Build"
|
||||
echo "Running on $(sysctl -n hw.logicalcpu) cores"
|
||||
cmake --build . -j $(sysctl -n hw.logicalcpu)
|
||||
echo "::endgroup::"
|
||||
|
||||
- name: Build x64
|
||||
run: |
|
||||
mkdir build-x64
|
||||
cd build-x64
|
||||
|
||||
echo "::group::CMake"
|
||||
cmake ${GITHUB_WORKSPACE} \
|
||||
-DCMAKE_OSX_ARCHITECTURES=x86_64 \
|
||||
-DVCPKG_TARGET_TRIPLET=x64-osx \
|
||||
-DCMAKE_TOOLCHAIN_FILE=/usr/local/share/vcpkg/scripts/buildsystems/vcpkg.cmake \
|
||||
-DHOST_BINARY_DIR=${GITHUB_WORKSPACE}/build-host \
|
||||
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
|
||||
-DCPACK_BUNDLE_APPLE_CERT_APP=${{ secrets.APPLE_DEVELOPER_CERTIFICATE_ID }} \
|
||||
"-DCPACK_BUNDLE_APPLE_CODESIGN_PARAMETER=--deep -f --options runtime" \
|
||||
-DAPPLE_UNIVERSAL_PACKAGE=1 \
|
||||
# EOF
|
||||
echo "::endgroup::"
|
||||
|
||||
echo "::group::Build"
|
||||
echo "Running on $(sysctl -n hw.logicalcpu) cores"
|
||||
cmake --build . -j $(sysctl -n hw.logicalcpu)
|
||||
echo "::endgroup::"
|
||||
|
||||
- name: Create bundles
|
||||
run: |
|
||||
cd build-x64
|
||||
|
||||
echo "::group::Create universal binary"
|
||||
# Combine the `openttd` binaries from each build into a single file
|
||||
lipo -create -output openttd-universal ../build-*/openttd
|
||||
mv openttd-universal openttd
|
||||
echo "::endgroup::"
|
||||
|
||||
echo "::group::Run CPack"
|
||||
cpack
|
||||
echo "::endgroup::"
|
||||
|
||||
echo "::group::Cleanup"
|
||||
# Remove the sha256 files CPack generates; we will do this ourself at
|
||||
# the end of this workflow.
|
||||
rm -f bundles/*.sha256
|
||||
echo "::endgroup::"
|
||||
|
||||
- name: Install gon
|
||||
env:
|
||||
HOMEBREW_NO_AUTO_UPDATE: 1
|
||||
HOMEBREW_NO_INSTALL_CLEANUP: 1
|
||||
run: |
|
||||
brew tap mitchellh/gon
|
||||
brew install mitchellh/gon/gon
|
||||
|
||||
- name: Notarize
|
||||
env:
|
||||
AC_USERNAME: ${{ secrets.APPLE_DEVELOPER_APP_USERNAME }}
|
||||
AC_PASSWORD: ${{ secrets.APPLE_DEVELOPER_APP_PASSWORD }}
|
||||
run: |
|
||||
cd build-x64
|
||||
../os/macosx/notarize.sh
|
||||
|
||||
- name: Build zip
|
||||
run: |
|
||||
cd build-x64
|
||||
|
||||
pushd _CPack_Packages/*/Bundle/openttd-*/
|
||||
|
||||
# Remove the Applications symlink from the staging folder
|
||||
rm -f Applications
|
||||
|
||||
# Remove the original dmg built by CPack to avoid a conflict when resolving
|
||||
# the zip_filename variable below
|
||||
rm -f ../*.dmg
|
||||
|
||||
zip_filename=(../openttd-*)
|
||||
|
||||
# Package up the existing, notarised .app into a zip file
|
||||
zip -r -9 ${zip_filename}.zip OpenTTD.app
|
||||
|
||||
popd
|
||||
|
||||
# Now move it into place to be uploaded
|
||||
mv _CPack_Packages/*/Bundle/openttd-*.zip bundles/
|
||||
|
||||
- name: Store bundles
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: openttd-macos-universal
|
||||
path: build-x64/bundles
|
||||
retention-days: 5
|
||||
|
||||
windows:
|
||||
name: Windows
|
||||
needs: source
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- arch: x86
|
||||
host: x86
|
||||
- arch: x64
|
||||
host: x64
|
||||
- arch: arm64
|
||||
host: x64_arm64
|
||||
|
||||
runs-on: windows-latest
|
||||
|
||||
steps:
|
||||
- name: Download source
|
||||
uses: actions/download-artifact@v2
|
||||
with:
|
||||
name: internal-source
|
||||
|
||||
- name: Unpack source
|
||||
shell: bash
|
||||
run: |
|
||||
tar -xf source.tar.gz --strip-components=1
|
||||
|
||||
- name: Install dependencies
|
||||
shell: bash
|
||||
run: |
|
||||
choco install pandoc
|
||||
|
||||
- name: Prepare cache key
|
||||
id: key
|
||||
shell: powershell
|
||||
run: |
|
||||
# Work around caching failure with GNU tar
|
||||
New-Item -Type Junction -Path vcpkg -Target c:\vcpkg
|
||||
|
||||
Write-Output "::set-output name=image::$env:ImageOS-$env:ImageVersion"
|
||||
|
||||
- name: Enable vcpkg cache
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: vcpkg/installed
|
||||
key: ${{ steps.key.outputs.image }}-vcpkg-${{ matrix.arch }}-0 # Increase the number whenever dependencies are modified
|
||||
restore-keys: |
|
||||
${{ steps.key.outputs.image }}-vcpkg-${{ matrix.arch }}
|
||||
|
||||
- name: Prepare vcpkg
|
||||
shell: bash
|
||||
run: |
|
||||
vcpkg install --triplet=${{ matrix.arch }}-windows-static \
|
||||
liblzma \
|
||||
libpng \
|
||||
lzo \
|
||||
zlib \
|
||||
# EOF
|
||||
|
||||
- name: Install MSVC problem matcher
|
||||
uses: ammaraskar/msvc-problem-matcher@master
|
||||
|
||||
- name: Configure developer command prompt for tools
|
||||
uses: ilammy/msvc-dev-cmd@v1
|
||||
with:
|
||||
arch: x64
|
||||
|
||||
- name: Build tools
|
||||
shell: bash
|
||||
run: |
|
||||
mkdir build-host
|
||||
cd build-host
|
||||
|
||||
echo "::group::CMake"
|
||||
cmake ${GITHUB_WORKSPACE} \
|
||||
-GNinja \
|
||||
-DOPTION_TOOLS_ONLY=ON \
|
||||
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
|
||||
# EOF
|
||||
echo "::endgroup::"
|
||||
|
||||
echo "::group::Build"
|
||||
cmake --build . --target tools
|
||||
echo "::endgroup::"
|
||||
|
||||
- name: Configure developer command prompt for ${{ matrix.arch }}
|
||||
uses: ilammy/msvc-dev-cmd@v1
|
||||
with:
|
||||
arch: ${{ matrix.host }}
|
||||
|
||||
- name: Build (with installer)
|
||||
if: needs.source.outputs.is_tag == 'true'
|
||||
shell: bash
|
||||
run: |
|
||||
mkdir build
|
||||
cd build
|
||||
|
||||
echo "::group::CMake"
|
||||
cmake ${GITHUB_WORKSPACE} \
|
||||
-GNinja \
|
||||
-DVCPKG_TARGET_TRIPLET=${{ matrix.arch }}-windows-static \
|
||||
-DCMAKE_TOOLCHAIN_FILE="c:\vcpkg\scripts\buildsystems\vcpkg.cmake" \
|
||||
-DOPTION_USE_NSIS=ON \
|
||||
-DHOST_BINARY_DIR=${GITHUB_WORKSPACE}/build-host \
|
||||
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
|
||||
# EOF
|
||||
echo "::endgroup::"
|
||||
|
||||
echo "::group::Build"
|
||||
cmake --build .
|
||||
echo "::endgroup::"
|
||||
|
||||
- name: Build (without installer)
|
||||
if: needs.source.outputs.is_tag != 'true'
|
||||
shell: bash
|
||||
run: |
|
||||
mkdir build
|
||||
cd build
|
||||
|
||||
echo "::group::CMake"
|
||||
cmake ${GITHUB_WORKSPACE} \
|
||||
-GNinja \
|
||||
-DVCPKG_TARGET_TRIPLET=${{ matrix.arch }}-windows-static \
|
||||
-DCMAKE_TOOLCHAIN_FILE="c:\vcpkg\scripts\buildsystems\vcpkg.cmake" \
|
||||
-DHOST_BINARY_DIR=${GITHUB_WORKSPACE}/build-host \
|
||||
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
|
||||
# EOF
|
||||
echo "::endgroup::"
|
||||
|
||||
echo "::group::Build"
|
||||
cmake --build .
|
||||
echo "::endgroup::"
|
||||
|
||||
- name: Create bundles
|
||||
shell: bash
|
||||
run: |
|
||||
cd ${GITHUB_WORKSPACE}/build
|
||||
echo "::group::Run CPack"
|
||||
cpack
|
||||
echo "::endgroup::"
|
||||
|
||||
echo "::group::Prepare PDB to be bundled"
|
||||
PDB=$(ls bundles/*.zip | cut -d/ -f2 | sed 's/.zip$/.pdb/')
|
||||
cp openttd.pdb bundles/${PDB}
|
||||
xz -9 bundles/${PDB}
|
||||
echo "::endgroup::"
|
||||
|
||||
echo "::group::Cleanup"
|
||||
# Remove the sha256 files CPack generates; we will do this ourself at
|
||||
# the end of this workflow.
|
||||
rm -f bundles/*.sha256
|
||||
echo "::endgroup::"
|
||||
|
||||
- name: Store bundles
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: openttd-windows-${{ matrix.arch }}
|
||||
path: build/bundles
|
||||
retention-days: 5
|
||||
|
||||
upload:
|
||||
name: Upload (AWS)
|
||||
needs:
|
||||
- source
|
||||
- docs
|
||||
- linux
|
||||
- linux-distro
|
||||
- macos
|
||||
- windows
|
||||
|
||||
# The 'linux' job can be skipped if it is a nightly. That normally causes
|
||||
# this job to be skipped too, unless we have this length boy :)
|
||||
# "always()" is important here, it is the keyword to use to stop skipping
|
||||
# this job if any dependency is skipped. It looks a bit silly, but it is
|
||||
# how GitHub Actions work ;)
|
||||
if: always() && needs.source.result == 'success' && needs.docs.result == 'success' && needs.linux.result == 'success' && (needs.linux-distro.result == 'success' || needs.linux-distro.result == 'skipped') && needs.macos.result == 'success' && needs.windows.result == 'success'
|
||||
|
||||
runs-on: ubuntu-20.04
|
||||
|
||||
steps:
|
||||
- name: Download all bundles
|
||||
uses: actions/download-artifact@v2
|
||||
|
||||
- name: Calculate checksums
|
||||
run: |
|
||||
echo "::group::Move bundles to a single folder"
|
||||
mkdir bundles
|
||||
mv openttd-*/* bundles/
|
||||
cd bundles
|
||||
echo "::group::Build"
|
||||
|
||||
for i in $(ls openttd-*); do
|
||||
echo "::group::Calculating checksums for ${i}"
|
||||
openssl dgst -r -md5 -hex $i > $i.md5sum
|
||||
openssl dgst -r -sha1 -hex $i > $i.sha1sum
|
||||
openssl dgst -r -sha256 -hex $i > $i.sha256sum
|
||||
echo "::endgroup::"
|
||||
done
|
||||
|
||||
- name: Upload bundles to AWS
|
||||
run: |
|
||||
aws s3 cp --recursive --only-show-errors bundles/ s3://${{ secrets.CDN_S3_BUCKET }}/${{ needs.source.outputs.folder }}/${{ needs.source.outputs.version }}/
|
||||
|
||||
# We do not invalidate the CloudFront distribution here. The trigger
|
||||
# for "New OpenTTD release" first updated the manifest files and
|
||||
# creates an index.html. We invalidate after that, so everything
|
||||
# becomes visible at once.
|
||||
env:
|
||||
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
|
||||
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
|
||||
AWS_DEFAULT_REGION: ${{ secrets.AWS_REGION }}
|
||||
|
||||
- name: Trigger 'New OpenTTD release'
|
||||
uses: peter-evans/repository-dispatch@v1
|
||||
with:
|
||||
token: ${{ secrets.DEPLOYMENT_TOKEN }}
|
||||
repository: OpenTTD/workflows
|
||||
event-type: ${{ needs.source.outputs.trigger_type }}
|
||||
client-payload: '{"version": "${{ needs.source.outputs.version }}", "folder": "${{ needs.source.outputs.folder }}"}'
|
||||
|
||||
upload-steam:
|
||||
name: Upload (Steam)
|
||||
needs:
|
||||
- source
|
||||
- linux
|
||||
- macos
|
||||
- windows
|
||||
|
||||
if: needs.source.outputs.trigger_type == 'new-master' || needs.source.outputs.trigger_type == 'new-tag'
|
||||
|
||||
runs-on: ubuntu-20.04
|
||||
|
||||
steps:
|
||||
- name: Download all bundles
|
||||
uses: actions/download-artifact@v2
|
||||
|
||||
- name: Setup steamcmd
|
||||
uses: CyberAndrii/setup-steamcmd@v1
|
||||
|
||||
- name: Generate Steam auth code
|
||||
id: steam-totp
|
||||
uses: CyberAndrii/steam-totp@v1
|
||||
with:
|
||||
shared_secret: ${{ secrets.STEAM_SHARED_SECRET }}
|
||||
|
||||
- name: Upload to Steam
|
||||
run: |
|
||||
echo "::group::Extracting source"
|
||||
mkdir source
|
||||
(
|
||||
cd source
|
||||
tar -xf ../internal-source/source.tar.gz --strip-components=1
|
||||
)
|
||||
echo "::endgroup::"
|
||||
|
||||
mkdir steam
|
||||
(
|
||||
cd steam
|
||||
|
||||
echo "::group::Prepare Win32"
|
||||
unzip ../openttd-windows-x86/openttd-*-windows-win32.zip
|
||||
mv openttd-*-windows-win32 steam-win32
|
||||
echo "::endgroup::"
|
||||
|
||||
echo "::group::Prepare Win64"
|
||||
unzip ../openttd-windows-x64/openttd-*-windows-win64.zip
|
||||
mv openttd-*-windows-win64 steam-win64
|
||||
echo "::endgroup::"
|
||||
|
||||
echo "::group::Prepare macOS"
|
||||
mkdir steam-macos
|
||||
(
|
||||
cd steam-macos
|
||||
unzip ../../openttd-macos-universal/openttd-*-macos-universal.zip
|
||||
)
|
||||
echo "::endgroup::"
|
||||
|
||||
echo "::group::Prepare Linux"
|
||||
tar xvf ../openttd-linux-generic/openttd-*-linux-generic-amd64.tar.xz
|
||||
mv openttd-*-linux-generic-amd64 steam-linux
|
||||
echo "::endgroup::"
|
||||
|
||||
echo "::group::Preparing build file"
|
||||
if [ "${{ needs.source.outputs.trigger_type }}" = "new-tag" ]; then
|
||||
BRANCH="testing"
|
||||
else
|
||||
BRANCH="nightly"
|
||||
fi
|
||||
cat ../source/os/steam/release.vdf | sed 's/@@DESCRIPTION@@/openttd-${{ needs.source.outputs.version }}/;s/@@BRANCH@@/'${BRANCH}'/' > release.vdf
|
||||
cat release.vdf
|
||||
echo "::endgroup::"
|
||||
|
||||
echo "::group::Upload to Steam"
|
||||
steamcmd +login ${{ secrets.STEAM_USERNAME }} ${{ secrets.STEAM_PASSWORD }} ${{ steps.steam-totp.outputs.code }} +run_app_build $(pwd)/release.vdf +quit
|
||||
echo "::endgroup::"
|
||||
)
|
53
.gitignore
vendored
53
.gitignore
vendored
@@ -1,52 +1,7 @@
|
||||
bin/*
|
||||
!bin/ai
|
||||
bin/ai/*
|
||||
!bin/ai/compat*.nut
|
||||
!bin/ai/regression
|
||||
!bin/data
|
||||
bin/baseset/*
|
||||
!bin/baseset/openttd.grf
|
||||
!bin/baseset/opntitle.dat
|
||||
!bin/baseset/orig_extra.grf
|
||||
!bin/baseset/orig_*.obg
|
||||
!bin/baseset/orig_*.obs
|
||||
!bin/baseset/no_sound.obs
|
||||
!bin/baseset/no_music.obm
|
||||
!bin/baseset/orig_*.obm
|
||||
!bin/scripts
|
||||
bin/scripts/*
|
||||
!bin/scripts/*.example
|
||||
!bin/scripts/readme.txt
|
||||
|
||||
*.aps
|
||||
bundle/*
|
||||
bundles/*
|
||||
/.vs
|
||||
/build*
|
||||
CMakeSettings.json
|
||||
docs/aidocs/*
|
||||
docs/gamedocs/*
|
||||
docs/source/*
|
||||
.kdev4
|
||||
.kdev4/*
|
||||
*.kdev4
|
||||
media/openttd.desktop
|
||||
media/openttd.desktop.install
|
||||
objs/*
|
||||
projects/.vs
|
||||
projects/Debug
|
||||
projects/Release
|
||||
projects/*.ncb
|
||||
projects/*.suo
|
||||
projects/*.sdf
|
||||
projects/*.opensdf
|
||||
projects/*.vcproj.*.user
|
||||
projects/*.vcxproj.user
|
||||
projects/*.VC.db
|
||||
projects/*.VC.opendb
|
||||
src/rev.cpp
|
||||
src/os/windows/ottdres.rc
|
||||
|
||||
/Makefile*
|
||||
!/Makefile.msvc
|
||||
/config.*
|
||||
!/config.lib
|
||||
!*.in
|
||||
*.tmp
|
||||
/out
|
||||
|
34
.hgignore
34
.hgignore
@@ -1,34 +0,0 @@
|
||||
syntax: glob
|
||||
|
||||
.svn
|
||||
*.aps
|
||||
bin/baseset/openttd.32.bmp
|
||||
bin/lang/*
|
||||
bin/openttd*
|
||||
bin/*.cfg
|
||||
bundle/*
|
||||
bundles/*
|
||||
config.cache*
|
||||
config.log
|
||||
config.pwd
|
||||
docs/aidocs/*
|
||||
docs/gamedocs/*
|
||||
docs/source/*
|
||||
.kdev4
|
||||
.kdev4/*
|
||||
*.kdev4
|
||||
Makefile
|
||||
Makefile.am
|
||||
Makefile.bundle
|
||||
media/openttd.desktop
|
||||
media/openttd.desktop.install
|
||||
objs/*
|
||||
projects/.vs
|
||||
projects/*.ncb
|
||||
projects/*.suo
|
||||
projects/*.sdf
|
||||
projects/*.opensdf
|
||||
projects/*.vcproj.*.user
|
||||
projects/*.vcxproj.user
|
||||
src/rev.cpp
|
||||
src/os/windows/ottdres.rc
|
378
CMakeLists.txt
Normal file
378
CMakeLists.txt
Normal file
@@ -0,0 +1,378 @@
|
||||
cmake_minimum_required(VERSION 3.9)
|
||||
|
||||
if(NOT BINARY_NAME)
|
||||
set(BINARY_NAME openttd)
|
||||
endif()
|
||||
|
||||
project(${BINARY_NAME}
|
||||
VERSION 1.11.2
|
||||
)
|
||||
|
||||
if(CMAKE_SOURCE_DIR STREQUAL CMAKE_BINARY_DIR)
|
||||
message(FATAL_ERROR "In-source builds not allowed. Please run \"cmake ..\" from the build directory. You may need to delete \"${CMAKE_SOURCE_DIR}/CMakeCache.txt\" first.")
|
||||
endif()
|
||||
|
||||
# Debug mode by default.
|
||||
if(NOT CMAKE_BUILD_TYPE)
|
||||
set(CMAKE_BUILD_TYPE Debug)
|
||||
endif()
|
||||
|
||||
if (EMSCRIPTEN)
|
||||
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/os/emscripten/cmake")
|
||||
endif()
|
||||
|
||||
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake")
|
||||
set(CMAKE_OSX_DEPLOYMENT_TARGET 10.9)
|
||||
|
||||
# Use GNUInstallDirs to allow customisation
|
||||
# but set our own default data and bin dir
|
||||
if(NOT CMAKE_INSTALL_DATADIR)
|
||||
set(CMAKE_INSTALL_DATADIR "share/games")
|
||||
endif()
|
||||
if(NOT CMAKE_INSTALL_BINDIR)
|
||||
set(CMAKE_INSTALL_BINDIR "games")
|
||||
endif()
|
||||
include(GNUInstallDirs)
|
||||
|
||||
include(Options)
|
||||
set_options()
|
||||
set_directory_options()
|
||||
|
||||
include(Static)
|
||||
set_static_if_needed()
|
||||
|
||||
set(CMAKE_CXX_STANDARD 17)
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED YES)
|
||||
set(CMAKE_CXX_EXTENSIONS NO)
|
||||
|
||||
set(CMAKE_EXPORT_COMPILE_COMMANDS YES)
|
||||
|
||||
# An empty target for the tools
|
||||
add_custom_target(tools)
|
||||
|
||||
include(Endian)
|
||||
add_endian_definition()
|
||||
|
||||
include(CompileFlags)
|
||||
compile_flags()
|
||||
|
||||
if(APPLE OR UNIX)
|
||||
add_definitions(-DUNIX)
|
||||
endif()
|
||||
|
||||
if(UNIX)
|
||||
find_package(Doxygen)
|
||||
endif()
|
||||
|
||||
list(APPEND GENERATED_SOURCE_FILES "${CMAKE_BINARY_DIR}/generated/rev.cpp")
|
||||
if(WIN32)
|
||||
list(APPEND GENERATED_SOURCE_FILES "${CMAKE_BINARY_DIR}/generated/ottdres.rc")
|
||||
endif()
|
||||
|
||||
# Generate a target to determine version, which is execute every 'make' run
|
||||
add_custom_target(find_version
|
||||
${CMAKE_COMMAND}
|
||||
-DFIND_VERSION_BINARY_DIR=${CMAKE_BINARY_DIR}/generated
|
||||
-DCPACK_BINARY_DIR=${CMAKE_BINARY_DIR}
|
||||
-DREV_MAJOR=${PROJECT_VERSION_MAJOR}
|
||||
-DREV_MINOR=${PROJECT_VERSION_MINOR}
|
||||
-DREV_BUILD=${PROJECT_VERSION_PATCH}
|
||||
-P "${CMAKE_SOURCE_DIR}/cmake/scripts/FindVersion.cmake"
|
||||
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
|
||||
BYPRODUCTS ${GENERATED_SOURCE_FILES}
|
||||
)
|
||||
|
||||
# Documentation
|
||||
if(DOXYGEN_EXECUTABLE)
|
||||
add_custom_target(docs)
|
||||
add_custom_target(docs_source
|
||||
${CMAKE_COMMAND} -E make_directory ${CMAKE_BINARY_DIR}/docs
|
||||
COMMAND ${DOXYGEN_EXECUTABLE} ${CMAKE_BINARY_DIR}/Doxyfile
|
||||
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
|
||||
COMMENT "Generating documentation for source"
|
||||
)
|
||||
add_dependencies(docs_source
|
||||
find_version
|
||||
)
|
||||
add_dependencies(docs
|
||||
docs_source
|
||||
)
|
||||
endif()
|
||||
|
||||
include(AddCustomXXXTimestamp)
|
||||
|
||||
if(OPTION_TOOLS_ONLY)
|
||||
if(HOST_BINARY_DIR)
|
||||
unset(HOST_BINARY_DIR CACHE)
|
||||
endif()
|
||||
add_subdirectory(${CMAKE_SOURCE_DIR}/src)
|
||||
return()
|
||||
endif()
|
||||
|
||||
if(APPLE)
|
||||
# Avoid searching for headers in Frameworks, and libraries in LIBDIR.
|
||||
set(CMAKE_FIND_FRAMEWORK LAST)
|
||||
endif()
|
||||
|
||||
# Prefer -pthread over -lpthread, which is often the better option of the two.
|
||||
set(CMAKE_THREAD_PREFER_PTHREAD YES)
|
||||
# Make sure we have Threads available.
|
||||
find_package(Threads REQUIRED)
|
||||
|
||||
find_package(ZLIB)
|
||||
find_package(LibLZMA)
|
||||
find_package(LZO)
|
||||
find_package(PNG)
|
||||
|
||||
if(NOT OPTION_DEDICATED)
|
||||
if(NOT WIN32)
|
||||
find_package(Allegro)
|
||||
if(NOT APPLE)
|
||||
find_package(Freetype)
|
||||
find_package(SDL2)
|
||||
if(NOT SDL2_FOUND)
|
||||
find_package(SDL)
|
||||
endif()
|
||||
find_package(Fluidsynth)
|
||||
find_package(Fontconfig)
|
||||
find_package(ICU OPTIONAL_COMPONENTS i18n lx)
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
if(APPLE)
|
||||
find_package(Iconv)
|
||||
|
||||
find_library(AUDIOTOOLBOX_LIBRARY AudioToolbox)
|
||||
find_library(AUDIOUNIT_LIBRARY AudioUnit)
|
||||
find_library(COCOA_LIBRARY Cocoa)
|
||||
find_library(QUARTZCORE_LIBRARY QuartzCore)
|
||||
endif()
|
||||
|
||||
if(NOT EMSCRIPTEN AND NOT OPTION_DEDICATED)
|
||||
find_package(OpenGL COMPONENTS OpenGL)
|
||||
endif()
|
||||
|
||||
if(MSVC)
|
||||
find_package(Editbin REQUIRED)
|
||||
endif()
|
||||
|
||||
find_package(SSE)
|
||||
find_package(Xaudio2)
|
||||
|
||||
find_package(Grfcodec)
|
||||
|
||||
include(CheckIPOSupported)
|
||||
check_ipo_supported(RESULT IPO_FOUND)
|
||||
|
||||
show_options()
|
||||
|
||||
if(UNIX AND NOT APPLE AND NOT OPTION_DEDICATED)
|
||||
if(NOT SDL_FOUND AND NOT SDL2_FOUND AND NOT ALLEGRO_FOUND)
|
||||
message(FATAL_ERROR "SDL, SDL2 or Allegro is required for this platform")
|
||||
endif()
|
||||
endif()
|
||||
if(APPLE)
|
||||
if(NOT AUDIOTOOLBOX_LIBRARY)
|
||||
message(FATAL_ERROR "AudioToolbox is required for this platform")
|
||||
endif()
|
||||
if(NOT AUDIOUNIT_LIBRARY)
|
||||
message(FATAL_ERROR "AudioUnit is required for this platform")
|
||||
endif()
|
||||
if(NOT COCOA_LIBRARY)
|
||||
message(FATAL_ERROR "Cocoa is required for this platform")
|
||||
endif()
|
||||
if(NOT QUARTZCORE_LIBRARY)
|
||||
message(FATAL_ERROR "QuartzCore is required for this platform")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(OPTION_PACKAGE_DEPENDENCIES)
|
||||
if(NOT UNIX)
|
||||
message(FATAL_ERROR "Can only package dependencies on Linux")
|
||||
endif()
|
||||
if(OPTION_INSTALL_FHS)
|
||||
message(FATAL_ERROR "Cannot install in FHS folders when we are packaging dependencies")
|
||||
endif()
|
||||
if(${CMAKE_VERSION} VERSION_LESS "3.16.0")
|
||||
message(FATAL_ERROR "OPTION_PACKAGE_DEPENDENCIES can only work with CMake 3.16+; you are using ${CMAKE_VERSION}")
|
||||
endif()
|
||||
|
||||
# If we are packaging dependencies, we do two things:
|
||||
# 1) set the RPATH to include $ORIGIN/lib; $ORIGIN (that literal string)
|
||||
# is a Linux indicator for "path where application is". In CMake, we
|
||||
# have to do this before add_executable() is executed.
|
||||
# 2) copy the libraries that we compile against to the "lib" folder.
|
||||
# This is done in InstallAndPackage.cmake.
|
||||
set(CMAKE_INSTALL_RPATH "\$ORIGIN/lib")
|
||||
set(CMAKE_BUILD_WITH_INSTALL_RPATH ON)
|
||||
endif()
|
||||
|
||||
include(SourceList)
|
||||
|
||||
# Needed by rev.cpp
|
||||
include_directories(${CMAKE_SOURCE_DIR}/src)
|
||||
# Needed by everything that uses Squirrel
|
||||
include_directories(${CMAKE_SOURCE_DIR}/src/3rdparty/squirrel/include)
|
||||
|
||||
include(MSVCFilters)
|
||||
|
||||
add_executable(openttd WIN32 ${GENERATED_SOURCE_FILES})
|
||||
set_target_properties(openttd PROPERTIES OUTPUT_NAME "${BINARY_NAME}")
|
||||
# All other files are added via target_sources()
|
||||
|
||||
if(MSVC)
|
||||
# Add DPI manifest to project; other WIN32 targets get this via ottdres.rc
|
||||
target_sources(openttd PRIVATE "${CMAKE_SOURCE_DIR}/os/windows/openttd.manifest")
|
||||
endif()
|
||||
|
||||
add_subdirectory(${CMAKE_SOURCE_DIR}/bin)
|
||||
add_subdirectory(${CMAKE_SOURCE_DIR}/src)
|
||||
add_subdirectory(${CMAKE_SOURCE_DIR}/media)
|
||||
|
||||
add_dependencies(openttd
|
||||
find_version)
|
||||
|
||||
target_link_libraries(openttd
|
||||
openttd::languages
|
||||
openttd::settings
|
||||
openttd::media
|
||||
openttd::basesets
|
||||
openttd::script_api
|
||||
Threads::Threads
|
||||
)
|
||||
|
||||
if(IPO_FOUND)
|
||||
set_target_properties(openttd PROPERTIES INTERPROCEDURAL_OPTIMIZATION_RELEASE True)
|
||||
set_target_properties(openttd PROPERTIES INTERPROCEDURAL_OPTIMIZATION_MINSIZEREL True)
|
||||
set_target_properties(openttd PROPERTIES INTERPROCEDURAL_OPTIMIZATION_RELWITHDEBINFO True)
|
||||
endif()
|
||||
set_target_properties(openttd PROPERTIES VS_DEBUGGER_WORKING_DIRECTORY "${CMAKE_BINARY_DIR}")
|
||||
process_compile_flags()
|
||||
|
||||
include(LinkPackage)
|
||||
link_package(PNG TARGET PNG::PNG ENCOURAGED)
|
||||
link_package(ZLIB TARGET ZLIB::ZLIB ENCOURAGED)
|
||||
link_package(LIBLZMA TARGET LibLZMA::LibLZMA ENCOURAGED)
|
||||
link_package(LZO)
|
||||
|
||||
if(NOT OPTION_DEDICATED)
|
||||
link_package(Fluidsynth)
|
||||
link_package(SDL)
|
||||
link_package(SDL2 TARGET SDL2::SDL2)
|
||||
link_package(Allegro)
|
||||
link_package(FREETYPE TARGET Freetype::Freetype)
|
||||
link_package(Fontconfig TARGET Fontconfig::Fontconfig)
|
||||
link_package(ICU_lx)
|
||||
link_package(ICU_i18n)
|
||||
|
||||
if(SDL2_FOUND AND OPENGL_FOUND AND UNIX)
|
||||
# SDL2 dynamically loads OpenGL if needed, so do not link to OpenGL when
|
||||
# on Linux. For Windows, we need to link to OpenGL as we also have a win32
|
||||
# driver using it.
|
||||
add_definitions(-DWITH_OPENGL)
|
||||
message(STATUS "OpenGL found -- -DWITH_OPENGL -- (via SDL2)")
|
||||
else()
|
||||
link_package(OpenGL TARGET OpenGL::GL)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(APPLE)
|
||||
link_package(Iconv TARGET Iconv::Iconv)
|
||||
|
||||
target_link_libraries(openttd
|
||||
${AUDIOTOOLBOX_LIBRARY}
|
||||
${AUDIOUNIT_LIBRARY}
|
||||
${COCOA_LIBRARY}
|
||||
${QUARTZCORE_LIBRARY}
|
||||
)
|
||||
|
||||
add_definitions(
|
||||
-DWITH_COCOA
|
||||
)
|
||||
endif()
|
||||
|
||||
if(EMSCRIPTEN)
|
||||
add_library(WASM::WASM INTERFACE IMPORTED)
|
||||
|
||||
# Allow heap-growth, and start with a bigger memory size.
|
||||
target_link_libraries(WASM::WASM INTERFACE "-s ALLOW_MEMORY_GROWTH=1")
|
||||
target_link_libraries(WASM::WASM INTERFACE "-s INITIAL_MEMORY=33554432")
|
||||
target_link_libraries(WASM::WASM INTERFACE "-s DISABLE_EXCEPTION_CATCHING=0")
|
||||
add_definitions(-s DISABLE_EXCEPTION_CATCHING=0)
|
||||
|
||||
# Export functions to Javascript.
|
||||
target_link_libraries(WASM::WASM INTERFACE "-s EXPORTED_FUNCTIONS='[\"_main\", \"_em_openttd_add_server\"]' -s EXTRA_EXPORTED_RUNTIME_METHODS='[\"cwrap\"]'")
|
||||
|
||||
# Preload all the files we generate during build.
|
||||
# As we do not compile with FreeType / FontConfig, we also have no way to
|
||||
# render several languages (like Chinese, ..), so where do you draw the
|
||||
# line what languages to include and which not? In the end, especially as
|
||||
# the more languages you add the slower downloading becomes, we decided to
|
||||
# only ship the English language.
|
||||
target_link_libraries(WASM::WASM INTERFACE "--preload-file ${CMAKE_BINARY_DIR}/baseset@/baseset")
|
||||
target_link_libraries(WASM::WASM INTERFACE "--preload-file ${CMAKE_BINARY_DIR}/lang/english.lng@/lang/english.lng")
|
||||
target_link_libraries(WASM::WASM INTERFACE "--preload-file ${CMAKE_SOURCE_DIR}/bin/ai@/ai")
|
||||
target_link_libraries(WASM::WASM INTERFACE "--preload-file ${CMAKE_SOURCE_DIR}/bin/game@/game")
|
||||
|
||||
# We use IDBFS for persistent storage.
|
||||
target_link_libraries(WASM::WASM INTERFACE "-lidbfs.js")
|
||||
|
||||
# Use custom pre-js and shell.html.
|
||||
target_link_libraries(WASM::WASM INTERFACE "--pre-js ${CMAKE_SOURCE_DIR}/os/emscripten/pre.js")
|
||||
target_link_libraries(WASM::WASM INTERFACE "--shell-file ${CMAKE_SOURCE_DIR}/os/emscripten/shell.html")
|
||||
|
||||
# Build the .html (which builds the .js, .wasm, and .data too).
|
||||
set_target_properties(openttd PROPERTIES SUFFIX ".html")
|
||||
target_link_libraries(openttd WASM::WASM)
|
||||
endif()
|
||||
|
||||
if(NOT PERSONAL_DIR STREQUAL "(not set)")
|
||||
add_definitions(
|
||||
-DWITH_PERSONAL_DIR
|
||||
-DPERSONAL_DIR="${PERSONAL_DIR}"
|
||||
)
|
||||
endif()
|
||||
|
||||
if(NOT SHARED_DIR STREQUAL "(not set)")
|
||||
add_definitions(
|
||||
-DWITH_SHARED_DIR
|
||||
-DSHARED_DIR="${SHARED_DIR}"
|
||||
)
|
||||
endif()
|
||||
|
||||
if(NOT GLOBAL_DIR STREQUAL "(not set)")
|
||||
add_definitions(
|
||||
-DGLOBAL_DATA_DIR="${GLOBAL_DIR}"
|
||||
)
|
||||
endif()
|
||||
|
||||
link_package(SSE)
|
||||
|
||||
add_definitions_based_on_options()
|
||||
|
||||
if(WIN32)
|
||||
add_definitions(
|
||||
-DUNICODE
|
||||
-D_UNICODE
|
||||
-DWITH_UNISCRIBE
|
||||
)
|
||||
|
||||
target_link_libraries(openttd
|
||||
ws2_32
|
||||
winmm
|
||||
imm32
|
||||
)
|
||||
endif()
|
||||
|
||||
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
|
||||
add_definitions(-D_SQ64)
|
||||
endif()
|
||||
|
||||
include(CreateRegression)
|
||||
create_regression()
|
||||
|
||||
if(APPLE OR WIN32)
|
||||
find_package(Pandoc)
|
||||
endif()
|
||||
|
||||
include(InstallAndPackage)
|
150
COMPILING.md
Normal file
150
COMPILING.md
Normal file
@@ -0,0 +1,150 @@
|
||||
# Compiling OpenTTD
|
||||
|
||||
## Required/optional libraries
|
||||
|
||||
OpenTTD makes use of the following external libraries:
|
||||
|
||||
- (encouraged) zlib: (de)compressing of old (0.3.0-1.0.5) savegames, content downloads,
|
||||
heightmaps
|
||||
- (encouraged) liblzma: (de)compressing of savegames (1.1.0 and later)
|
||||
- (encouraged) libpng: making screenshots and loading heightmaps
|
||||
- (optional) liblzo2: (de)compressing of old (pre 0.3.0) savegames
|
||||
|
||||
For Linux, the following additional libraries are used (for non-dedicated only):
|
||||
|
||||
- libSDL2: hardware access (video, sound, mouse)
|
||||
- libfreetype: loading generic fonts and rendering them
|
||||
- libfontconfig: searching for fonts, resolving font names to actual fonts
|
||||
- libicu: handling of right-to-left scripts (e.g. Arabic and Persian) and
|
||||
natural sorting of strings
|
||||
|
||||
OpenTTD does not require any of the libraries to be present, but without
|
||||
liblzma you cannot open most recent savegames and without zlib you cannot
|
||||
open most older savegames or use the content downloading system.
|
||||
|
||||
## Windows
|
||||
|
||||
You need Microsoft Visual Studio 2017 or more recent.
|
||||
|
||||
You can download the free Visual Studio Community Edition from Microsoft at
|
||||
https://visualstudio.microsoft.com/vs/community/.
|
||||
|
||||
OpenTTD needs the Platform SDK, if it isn't installed already. This can be
|
||||
done during installing Visual Studio, by selecting
|
||||
`Visual C++ MFC for x86 and x64` (and possibly
|
||||
`Visual C++ ATL for x86 and x64` depending on your version). If not, you
|
||||
can get download it as [MS Windows Platform SDK](https://developer.microsoft.com/en-US/windows/downloads/windows-10-sdk).
|
||||
|
||||
Install the SDK by following the instructions as given.
|
||||
|
||||
Dependencies for OpenTTD on Windows are handled via
|
||||
[vcpkg](https://github.com/Microsoft/vcpkg/). First you need to install vcpkg
|
||||
by following the `Quick Start` instructions of their
|
||||
[README](https://github.com/Microsoft/vcpkg/blob/master/README.md).
|
||||
|
||||
After this, you can install the dependencies OpenTTD needs. We advise to use
|
||||
the `static` versions, and OpenTTD currently needs the following dependencies:
|
||||
|
||||
- liblzma
|
||||
- libpng
|
||||
- lzo
|
||||
- zlib
|
||||
|
||||
To install both the x64 (64bit) and x86 (32bit) variants (though only one is necessary), you can use:
|
||||
|
||||
```ps
|
||||
.\vcpkg install liblzma:x64-windows-static libpng:x64-windows-static lzo:x64-windows-static zlib:x64-windows-static
|
||||
.\vcpkg install liblzma:x86-windows-static libpng:x86-windows-static lzo:x86-windows-static zlib:x86-windows-static
|
||||
```
|
||||
|
||||
You can open the folder (as a CMake project). CMake will be detected, and you can compile from there.
|
||||
If libraries are installed but not found, you need to set VCPKG_TARGET_TRIPLET in CMake parameters.
|
||||
For Visual Studio 2017 you also need to set CMAKE_TOOLCHAIN_FILE.
|
||||
(Typical values are shown in the MSVC project file command line example)
|
||||
|
||||
Alternatively, you can create a MSVC project file via CMake. For this
|
||||
either download CMake from https://cmake.org/download/ or use the version
|
||||
that comes with vcpkg. After that, you can run something similar to this:
|
||||
|
||||
```powershell
|
||||
mkdir build
|
||||
cd build
|
||||
cmake.exe .. -G'Visual Studio 16 2019' -DCMAKE_TOOLCHAIN_FILE="<location of vcpkg>\vcpkg\scripts\buildsystems\vcpkg.cmake" -DVCPKG_TARGET_TRIPLET="x64-windows-static"
|
||||
```
|
||||
|
||||
Change `<location of vcpkg>` to where you have installed vcpkg. After this
|
||||
in the build folder are MSVC project files. MSVC can rebuild the project
|
||||
files himself via the `ZERO_CHECK` project.
|
||||
|
||||
## All other platforms
|
||||
Minimum required version of CMake is 3.9.
|
||||
By default this produces a Debug build with assertations enabled.
|
||||
This is a far slower build than release builds.
|
||||
|
||||
```bash
|
||||
mkdir build
|
||||
cd build
|
||||
cmake ..
|
||||
make
|
||||
```
|
||||
|
||||
For more information on how to use CMake (including how to make Release builds),
|
||||
we urge you to read [their excellent manual](https://cmake.org/cmake/help/latest/guide/user-interaction/index.html).
|
||||
|
||||
## CMake Options
|
||||
|
||||
Via CMake, several options can be influenced to get different types of
|
||||
builds.
|
||||
|
||||
- `-DCMAKE_BUILD_TYPE=RelWithDebInfo`: build a release build. This is
|
||||
significant faster than a debug build, but has far less useful information
|
||||
in case of a crash.
|
||||
- `-DOPTION_DEDICATED=ON`: build OpenTTD without a GUI. Useful if you are
|
||||
running a headless server, as it requires less libraries to operate.
|
||||
- `-DOPTION_USE_ASSERTS=OFF`: disable asserts. Use with care, as assert
|
||||
statements capture early signs of trouble. Release builds have them
|
||||
disabled by default.
|
||||
- `-DOPTION_USE_THREADS=OFF`: disable the use of threads. This will block
|
||||
the interface in many places, and in general gives a worse experience of
|
||||
the game. Use with care.
|
||||
- `-DOPTION_TOOLS_ONLY=ON`: only build tools like `strgen`. Does not build
|
||||
the game itself. Useful for cross-compiling.
|
||||
|
||||
## Supported compilers
|
||||
|
||||
Every compiler that is supported by CMake and supports C++17, should be
|
||||
able to compile OpenTTD. As the exact list of compilers changes constantly,
|
||||
we refer to the compiler manual to see if it supports C++17, and to CMake
|
||||
to see if it supports your compiler.
|
||||
|
||||
## Compilation of base sets
|
||||
|
||||
To recompile the extra graphics needed to play with the original Transport
|
||||
Tycoon Deluxe graphics you need GRFCodec (which includes NFORenum) as well.
|
||||
GRFCodec can be found at
|
||||
https://www.openttd.org/downloads/grfcodec-releases/latest.html.
|
||||
|
||||
Having GRFCodec installed can cause regeneration of the `.grf` files, which
|
||||
are written in the source directory. This can leave your repository in a
|
||||
modified state, as different GRFCodec versions can cause binary differences
|
||||
in the resulting `.grf` files. Also translations might have been added for
|
||||
the base sets which are not yet included in the base set information files.
|
||||
To avoid this behaviour, disable GRFCodec (and NFORenum) in CMake cache
|
||||
(`GRFCODEC_EXECUTABLE` and `NFORENUM_EXECUTABLE`).
|
||||
|
||||
## Developers settings
|
||||
|
||||
You can control some flags directly via `CXXFLAGS` (any combination
|
||||
of these flags will work fine too):
|
||||
|
||||
- `-DRANDOM_DEBUG`: this helps with debugging desyncs.
|
||||
- `-fno-inline`: this avoids creating inline functions; this can make
|
||||
debugging a lot easier.
|
||||
- `-O0`: this disables all optimizations; this can make debugging a
|
||||
lot easier.
|
||||
- `-p`: this enables profiling.
|
||||
|
||||
Always use a clean buildfolder if you changing `CXXFLAGS`, as this
|
||||
value is otherwise cached. Example use:
|
||||
|
||||
`CXXFLAGS="-fno-inline" cmake ..`
|
150
CONTRIBUTING.md
150
CONTRIBUTING.md
@@ -5,21 +5,28 @@ Looking to contribute something to OpenTTD? **Here's how you can help.**
|
||||
|
||||
Please take a moment to review this document in order to make the contribution process easy and effective for everyone involved.
|
||||
|
||||
Following these guidelines helps to communicate that you respect the time of the developers managing and developing this open source project. In return, they should reciprocate that respect in addressing your issue or assessing patches and features.
|
||||
Following these guidelines helps to communicate that you respect the time of the developers managing and developing this open source project.
|
||||
In return, they should reciprocate that respect in addressing your issue or assessing patches and features.
|
||||
|
||||
|
||||
## Using the issue tracker
|
||||
|
||||
The [issue tracker](https://github.com/OpenTTD/OpenTTD/issues) is the preferred channel for [bug reports](#bug-reports), but please respect the following restrictions:
|
||||
|
||||
* Please **do not** use the issue tracker for help playing or using OpenTTD. Please try [irc](https://wiki.openttd.org/IRC_channel), or the [forums](https://www.tt-forums.net/)
|
||||
* Please **do not** use the issue tracker for help playing or using OpenTTD.
|
||||
Please try [irc](https://wiki.openttd.org/en/Development/IRC%20channel), or the [forums](https://www.tt-forums.net/)
|
||||
|
||||
* Please **do not** derail or troll issues. Keep the discussion on topic and respect the opinions of others.
|
||||
|
||||
* Please **do not** post comments consisting solely of "+1" or ":thumbsup:".
|
||||
Use [GitHub's "reactions" feature](https://github.com/blog/2119-add-reactions-to-pull-requests-issues-and-comments) instead. We reserve the right to delete comments which violate this rule.
|
||||
Use [GitHub's "reactions" feature](https://github.com/blog/2119-add-reactions-to-pull-requests-issues-and-comments) instead.
|
||||
We reserve the right to delete comments which violate this rule.
|
||||
|
||||
* Please **do not** open issues or pull requests regarding add-on content in NewGRF, GameScripts, AIs, etc.
|
||||
These are created by third-parties. Please try [irc](https://wiki.openttd.org/en/Development/IRC%20channel) or the [forums](https://www.tt-forums.net/) to discuss these.
|
||||
|
||||
* Please use [the web translator](https://translator.openttd.org/) to submit corrections and improvements to translations of the game.
|
||||
|
||||
* Please **do not** open issues or pull requests regarding add-on content in NewGRF, GameScripts, AIs, etc. These are created by third-parties. Please try [irc](https://wiki.openttd.org/IRC_channel) or the [forums](https://www.tt-forums.net/) to discuss these.
|
||||
|
||||
## Bug reports
|
||||
|
||||
@@ -28,16 +35,16 @@ Good bug reports are extremely helpful, so thanks!
|
||||
|
||||
Guidelines for bug reports:
|
||||
|
||||
0. Please don't report issues with games where you changed NewGRFs.
|
||||
0. Please don't report issues with games where you changed NewGRFs mid-game. (This can be verified with the `gamelog` console command in-game.)
|
||||
|
||||
1. Please don't report issues with modified versions of OpenTTD (patchpacks and similar).
|
||||
1. Please don't report issues with modified versions of OpenTTD (patchpacks, unofficial ports, and similar).
|
||||
|
||||
2. **Use the GitHub issue search** --- check if the issue has already been
|
||||
2. **Use the GitHub issue search** — check if the issue has already been
|
||||
reported.
|
||||
|
||||
3. **Check if the issue has been fixed** --- try to reproduce it using the latest `nightly` build of OpenTTD, available from https://www.openttd.org
|
||||
3. **Check if the issue has been fixed** — try to reproduce it using the latest `nightly` build of OpenTTD, available from https://www.openttd.org
|
||||
|
||||
4. **Isolate the problem** --- ideally create reproduceable steps with an attached savegame and screenshots. Try to use few or no NewGRFs, AIs etc if possible.
|
||||
4. **Isolate the problem** — ideally create reproducible steps with an attached savegame and screenshots. Try to use few or no NewGRFs, AIs etc if possible.
|
||||
|
||||
A good bug report shouldn't leave others needing to chase you up for more information.
|
||||
Please try to be as detailed as possible in your report.
|
||||
@@ -69,13 +76,15 @@ Example:
|
||||
> causing the bug, and potential solutions (and your opinions on their
|
||||
> merits).
|
||||
|
||||
|
||||
## Feature requests
|
||||
|
||||
Before opening a feature request, please take a moment to find out whether your idea fits with the scope and aims of the project.
|
||||
Before opening a feature request, please take a moment to find out whether your idea fits with the [scope and goals](./CONTRIBUTING.md#project-goals) of the project.
|
||||
|
||||
It's up to *you* to make a strong case to convince the project's developers of the merits of this feature.
|
||||
|
||||
Please provide as much detail and context as possible. This means don't request for a solution, but describe the problem you see and how/why you think it should be fixed.
|
||||
Please provide as much detail and context as possible.
|
||||
This means don't request for a solution, but describe the problem you see and how/why you think it should be fixed.
|
||||
|
||||
For feature request we have a strict policy.
|
||||
|
||||
@@ -85,17 +94,21 @@ Although we really appreciate feedback and ideas, we will close feature requests
|
||||
|
||||
Many of those ideas etc do have a place on the [forums](https://www.tt-forums.net); and if enough people like it, someone will stand up and make it.
|
||||
|
||||
It's usually best discuss in [irc](https://wiki.openttd.org/IRC_channel) before opening a feature request or working on a large feature in a fork.
|
||||
It's usually best discuss in [irc](https://wiki.openttd.org/en/Development/IRC%20channel) before opening a feature request or working on a large feature in a fork.
|
||||
Discussion in irc can take time, but it can be productive and avoid disappointment :)
|
||||
|
||||
|
||||
## Pull requests
|
||||
|
||||
Good pull requests—patches, improvements, new features—are a fantastic help.
|
||||
They should remain focused in scope and avoid containing unrelated commits.
|
||||
|
||||
**Please ask first** before embarking on any significant pull request (e.g. implementing features, refactoring code, porting to a different language), otherwise you risk spending a lot of time working on something that the project's developers might not want to merge into the project.
|
||||
Pull requests should fit with the [goals of the project](./CONTRIBUTING.md#project-goals).
|
||||
|
||||
Please adhere to the [coding guidelines](#code-guidelines) used throughout the project (indentation, accurate comments, etc.) and any other requirements (such as test coverage).
|
||||
**Please do ask first** before embarking on any significant pull request (e.g. implementing features, refactoring code, porting to a different language), otherwise you risk spending a lot of time working on something that the project's developers might not want to merge into the project.
|
||||
|
||||
Every pull request should have a clear scope, with no unrelated commits.
|
||||
|
||||
[Code style](https://wiki.openttd.org/en/Development/Coding%20style) must be complied with for pull requests to be accepted; this also includes [commit message format](https://wiki.openttd.org/en/Development/Coding%20style#commit-message).
|
||||
|
||||
Adhering to the following process is the best way to get your work included in the project:
|
||||
|
||||
@@ -123,7 +136,7 @@ contain your feature, change, or fix:
|
||||
git checkout upstream/master -b <topic-branch-name>
|
||||
```
|
||||
|
||||
4. Commit your changes in logical chunks. Please adhere to these [git commit message guidelines](https://wiki.openttd.org/Commit_style#Commit_message) or your code is unlikely to be merged into the main project.
|
||||
4. Commit your changes in logical chunks. Please adhere to these [git commit message guidelines](https://wiki.openttd.org/en/Development/Coding%20style#commit-message) or your code is unlikely to be merged into the main project.
|
||||
Use Git's [interactive rebase](https://help.github.com/articles/interactive-rebase) feature to tidy up your commits before making them public.
|
||||
|
||||
5. Locally rebase the upstream development branch into your topic branch:
|
||||
@@ -147,17 +160,8 @@ git push
|
||||
|
||||
7. [Open a Pull Request](https://help.github.com/articles/using-pull-requests/) with a clear title and description against the `master` branch.
|
||||
|
||||
**IMPORTANT**: By submitting a patch, you agree to the [License](#license).
|
||||
**IMPORTANT**: By submitting a pull request or patch, you agree to the [License](#license) and the [Privacy Notice](CONTRIBUTING.md#privacy-notice).
|
||||
|
||||
### Privacy Notice
|
||||
|
||||
We would like to make you aware that contributing to OpenTTD via git will permanently store the name and email address you provide as well as the actual changes and the time and date you made it inside git's version history.
|
||||
|
||||
This is inevitable, because it is a main feature of git. If you are concerned about your privacy, we strongly recommend to use "Anonymous <anonymous@openttd.org>" as the git commit author. We might refuse anonymous contributions if malicious intent is suspected.
|
||||
|
||||
Please note that the contributor identity, once given, is used for copyright verification and to provide proof should a malicious commit be made. As such, the [EU GDPR](https://www.eugdpr.org/key-changes.html) "right to be forgotten" does not apply, as this is an overriding legitimate interest.
|
||||
|
||||
Please also note that your commit is public and as such will potentially be processed by many third-parties. Git's distributed nature makes it impossible to track where exactly your commit, and thus your personal data, will be stored and be processed. If you would not like to accept this risk, please do either commit anonymously or refrain from contributing to the OpenTTD project.
|
||||
|
||||
### Pull request validation
|
||||
|
||||
@@ -165,15 +169,99 @@ Continuous integration (CI) tools monitor pull requests, and help us identify bu
|
||||
|
||||
The results of the CI tests will show on your pull request.
|
||||
|
||||
By clicking on Details you can further zoom in; in case of a failure it will show you why it failed. In case of success it will report how awesome you were.
|
||||
By clicking on Details you can further zoom in; in case of a failure it will show you why it failed.
|
||||
In case of success it will report how awesome you were.
|
||||
|
||||
## Code guidelines
|
||||
Tip: [commit message format](https://wiki.openttd.org/en/Development/Coding%20style#commit-message) is a common reason for pull requests to fail validation.
|
||||
|
||||
[Code style](https://wiki.openttd.org/Coding_style) must be adhered to for pull requests to be accepted
|
||||
|
||||
## License
|
||||
### Are there any development docs?
|
||||
|
||||
There is no single source for OpenTTD development docs. It's a complex project with a long history, and multiple APIs.
|
||||
|
||||
A good entry point is [Development](https://wiki.openttd.org/en/Development/) on the OpenTTD wiki; this provides links to wiki documentation and other sources.
|
||||
|
||||
The GitHub repo also includes some non-comprehensive documentation in [/docs](./docs).
|
||||
|
||||
You may also want the guide to [compiling OpenTTD](./COMPILING.md).
|
||||
|
||||
|
||||
## Project goals
|
||||
|
||||
### What are the goals of the official branch?
|
||||
|
||||
The main goals of the official branch are:
|
||||
|
||||
- Stay faithful to the original gameplay from Transport Tycoon Deluxe
|
||||
- Improve the user interface
|
||||
- Allow extending the gameplay with add-ons / mods via supported content APIs
|
||||
- Provide a (relatively) stable core for both players of the official branch, and for authors of add-ons and maintainers of patchpacks
|
||||
|
||||
In contrast, extending or altering the gameplay of the base game is not encouraged.
|
||||
|
||||
The rationale behind these goals is that people have different opinions about what OpenTTD is and what it should be.
|
||||
When it comes to gameplay, there are at least these groups of people:
|
||||
|
||||
- *Model railway (mostly singleplayer)*: build "realistic" landscapes, roleplay a world, or even replicate historical scenarios
|
||||
- *Economical challenge (mostly singleplayer)*: run a business with economical challenges
|
||||
- *Transport challenge (singleplayer or cooperative multiplayer)*: build efficient track layouts with high cargo throughput and tons of vehicles
|
||||
- *Competitive speed run (competitive multiplayer)*: maximize some goal in some limited amount of time
|
||||
|
||||
When it comes to gameplay features there are at least these groups of interests:
|
||||
|
||||
- *Control freak:* micromanagement like conditional orders, refitting and loading etc.
|
||||
- *Casual:* automatisation like cargodist, path based signalling etc.
|
||||
|
||||
To please everyone, the official branch tries to stay close to the original gameplay; after all, that is what everyone brought here.
|
||||
The preferred method to alter and extent the gameplay is via add-ons like NewGRF and GameScripts.
|
||||
|
||||
For a long time, the official branch was also open to features which could be enabled/disabled, but the corner-cases that came with some configurations have rendered some parts of the code very complicated.
|
||||
Today, new features have to work with all the already existing features, which is not only challenging in corner cases, but also requires spending considerable more work than just "making it work in the game mode that I play".
|
||||
|
||||
The preferred method to introduce new gameplay features is to extend the content APIs, supporting ever more add-on content / mods.
|
||||
|
||||
This moves conflict-solving away from the codebase to content authors / players.
|
||||
It is more accepted for add-ons not working together than the base game not working with certain setting combinations.
|
||||
|
||||
In general the game should allow anything that doesn't violate basic rules, but it should warn players if they take potentially dangerous or "stupid" actions.
|
||||
|
||||
For example, players are not prevented from starting vehicles without orders, but will receive a warning about vehicles having too few orders.
|
||||
This lack of limitation has led to players challenging themselves to create networks where all vehicles have no orders, increasing gameplay possibilities.
|
||||
|
||||
### I do not agree with the goals of the official branch, what can I do instead?
|
||||
|
||||
Fork! There is a rich history of experimental patches for OpenTTD.
|
||||
|
||||
Many of these will never be accepted for core, but are creative and interesting ways to modify OpenTTD.
|
||||
|
||||
Sometimes patches are combined into long-running patchpacks, modified OpenTTD versions which can be downloaded by anyone, or modified OpenTTD clients for dedicated multiplayer servers.
|
||||
|
||||
One of the reasons to keep core relatively stable is to make life easier for patch authors and patchpack maintainers where possible.
|
||||
|
||||
Patchpack discussions and related topics may be found in community sites such as [TT-Forums development section](https://www.tt-forums.net/viewforum.php?f=33).
|
||||
|
||||
|
||||
## Legal stuff
|
||||
|
||||
### License
|
||||
|
||||
By contributing your code, you agree to license your contribution under the [GPL v2](https://github.com/OpenTTD/OpenTTD/blob/master/COPYING.md).
|
||||
|
||||
|
||||
### Privacy Notice
|
||||
|
||||
We would like to make you aware that contributing to OpenTTD via git will permanently store the name and email address you provide as well as the actual changes and the time and date you made it inside git's version history.
|
||||
|
||||
This is inevitable, because it is a main feature of git.
|
||||
If you are concerned about your privacy, we strongly recommend to use "Anonymous <anonymous@openttd.org>" as the git commit author. We might refuse anonymous contributions if malicious intent is suspected.
|
||||
|
||||
Please note that the contributor identity, once given, is used for copyright verification and to provide proof should a malicious commit be made.
|
||||
As such, the [EU GDPR](https://www.eugdpr.org/key-changes.html) "right to be forgotten" does not apply, as this is an overriding legitimate interest.
|
||||
|
||||
Please also note that your commit is public and as such will potentially be processed by many third-parties.
|
||||
Git's distributed nature makes it impossible to track where exactly your commit, and thus your personal data, will be stored and be processed.
|
||||
If you would not like to accept this risk, please do either commit anonymously or refrain from contributing to the OpenTTD project.
|
||||
|
||||
By contributing your code, you agree to license your contribution under the [GPL v2](https://github.com/OpenTTD/OpenTTD/blob/master/COPYING).
|
||||
|
||||
### Attribution of this Contributing Guide
|
||||
|
||||
|
@@ -1,18 +1,19 @@
|
||||
This is the license which applies to OpenTTD with the exception of some
|
||||
3rd party modules. See README.md for details
|
||||
3rd party modules. See [./README.md](./README.md) for details
|
||||
|
||||
GNU General Public License
|
||||
==========================
|
||||
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 2, June 1991
|
||||
_Version 2, June 1991_
|
||||
_Copyright © 1989, 1991 Free Software Foundation, Inc.,_
|
||||
_51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA_
|
||||
|
||||
Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
### Preamble
|
||||
|
||||
The licenses for most software are designed to take away your
|
||||
The licenses for most software are designed to take away your
|
||||
freedom to share and change it. By contrast, the GNU General Public
|
||||
License is intended to guarantee your freedom to share and change free
|
||||
software--to make sure the software is free for all its users. This
|
||||
@@ -22,48 +23,47 @@ using it. (Some other Free Software Foundation software is covered by
|
||||
the GNU Lesser General Public License instead.) You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
this service if you wish), that you receive source code or can get it
|
||||
if you want it, that you can change the software or use pieces of it
|
||||
in new free programs; and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to make restrictions that forbid
|
||||
To protect your rights, we need to make restrictions that forbid
|
||||
anyone to deny you these rights or to ask you to surrender the rights.
|
||||
These restrictions translate to certain responsibilities for you if you
|
||||
distribute copies of the software, or if you modify it.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must give the recipients all the rights that
|
||||
you have. You must make sure that they, too, receive or can get the
|
||||
source code. And you must show them these terms so they know their
|
||||
rights.
|
||||
|
||||
We protect your rights with two steps: (1) copyright the software, and
|
||||
(2) offer you this license which gives you legal permission to copy,
|
||||
We protect your rights with two steps: **(1)** copyright the software, and
|
||||
**(2)** offer you this license which gives you legal permission to copy,
|
||||
distribute and/or modify the software.
|
||||
|
||||
Also, for each author's protection and ours, we want to make certain
|
||||
Also, for each author's protection and ours, we want to make certain
|
||||
that everyone understands that there is no warranty for this free
|
||||
software. If the software is modified by someone else and passed on, we
|
||||
want its recipients to know that what they have is not the original, so
|
||||
that any problems introduced by others will not reflect on the original
|
||||
authors' reputations.
|
||||
|
||||
Finally, any free program is threatened constantly by software
|
||||
Finally, any free program is threatened constantly by software
|
||||
patents. We wish to avoid the danger that redistributors of a free
|
||||
program will individually obtain patent licenses, in effect making the
|
||||
program proprietary. To prevent this, we have made it clear that any
|
||||
patent must be licensed for everyone's free use or not licensed at all.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
### TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. This License applies to any program or other work which contains
|
||||
**0.** This License applies to any program or other work which contains
|
||||
a notice placed by the copyright holder saying it may be distributed
|
||||
under the terms of this General Public License. The "Program", below,
|
||||
refers to any such program or work, and a "work based on the Program"
|
||||
@@ -80,7 +80,7 @@ is covered only if its contents constitute a work based on the
|
||||
Program (independent of having been made by running the Program).
|
||||
Whether that is true depends on what the Program does.
|
||||
|
||||
1. You may copy and distribute verbatim copies of the Program's
|
||||
**1.** You may copy and distribute verbatim copies of the Program's
|
||||
source code as you receive it, in any medium, provided that you
|
||||
conspicuously and appropriately publish on each copy an appropriate
|
||||
copyright notice and disclaimer of warranty; keep intact all the
|
||||
@@ -91,29 +91,27 @@ along with the Program.
|
||||
You may charge a fee for the physical act of transferring a copy, and
|
||||
you may at your option offer warranty protection in exchange for a fee.
|
||||
|
||||
2. You may modify your copy or copies of the Program or any portion
|
||||
**2.** You may modify your copy or copies of the Program or any portion
|
||||
of it, thus forming a work based on the Program, and copy and
|
||||
distribute such modifications or work under the terms of Section 1
|
||||
above, provided that you also meet all of these conditions:
|
||||
|
||||
a) You must cause the modified files to carry prominent notices
|
||||
stating that you changed the files and the date of any change.
|
||||
|
||||
b) You must cause any work that you distribute or publish, that in
|
||||
whole or in part contains or is derived from the Program or any
|
||||
part thereof, to be licensed as a whole at no charge to all third
|
||||
parties under the terms of this License.
|
||||
|
||||
c) If the modified program normally reads commands interactively
|
||||
when run, you must cause it, when started running for such
|
||||
interactive use in the most ordinary way, to print or display an
|
||||
announcement including an appropriate copyright notice and a
|
||||
notice that there is no warranty (or else, saying that you provide
|
||||
a warranty) and that users may redistribute the program under
|
||||
these conditions, and telling the user how to view a copy of this
|
||||
License. (Exception: if the Program itself is interactive but
|
||||
does not normally print such an announcement, your work based on
|
||||
the Program is not required to print an announcement.)
|
||||
* **a)** You must cause the modified files to carry prominent notices
|
||||
stating that you changed the files and the date of any change.
|
||||
* **b)** You must cause any work that you distribute or publish, that in
|
||||
whole or in part contains or is derived from the Program or any
|
||||
part thereof, to be licensed as a whole at no charge to all third
|
||||
parties under the terms of this License.
|
||||
* **c)** If the modified program normally reads commands interactively
|
||||
when run, you must cause it, when started running for such
|
||||
interactive use in the most ordinary way, to print or display an
|
||||
announcement including an appropriate copyright notice and a
|
||||
notice that there is no warranty (or else, saying that you provide
|
||||
a warranty) and that users may redistribute the program under
|
||||
these conditions, and telling the user how to view a copy of this
|
||||
License. (Exception: if the Program itself is interactive but
|
||||
does not normally print such an announcement, your work based on
|
||||
the Program is not required to print an announcement.)
|
||||
|
||||
These requirements apply to the modified work as a whole. If
|
||||
identifiable sections of that work are not derived from the Program,
|
||||
@@ -135,26 +133,24 @@ with the Program (or with a work based on the Program) on a volume of
|
||||
a storage or distribution medium does not bring the other work under
|
||||
the scope of this License.
|
||||
|
||||
3. You may copy and distribute the Program (or a work based on it,
|
||||
**3.** You may copy and distribute the Program (or a work based on it,
|
||||
under Section 2) in object code or executable form under the terms of
|
||||
Sections 1 and 2 above provided that you also do one of the following:
|
||||
|
||||
a) Accompany it with the complete corresponding machine-readable
|
||||
source code, which must be distributed under the terms of Sections
|
||||
1 and 2 above on a medium customarily used for software interchange; or,
|
||||
|
||||
b) Accompany it with a written offer, valid for at least three
|
||||
years, to give any third party, for a charge no more than your
|
||||
cost of physically performing source distribution, a complete
|
||||
machine-readable copy of the corresponding source code, to be
|
||||
distributed under the terms of Sections 1 and 2 above on a medium
|
||||
customarily used for software interchange; or,
|
||||
|
||||
c) Accompany it with the information you received as to the offer
|
||||
to distribute corresponding source code. (This alternative is
|
||||
allowed only for noncommercial distribution and only if you
|
||||
received the program in object code or executable form with such
|
||||
an offer, in accord with Subsection b above.)
|
||||
* **a)** Accompany it with the complete corresponding machine-readable
|
||||
source code, which must be distributed under the terms of Sections
|
||||
1 and 2 above on a medium customarily used for software interchange; or,
|
||||
* **b)** Accompany it with a written offer, valid for at least three
|
||||
years, to give any third party, for a charge no more than your
|
||||
cost of physically performing source distribution, a complete
|
||||
machine-readable copy of the corresponding source code, to be
|
||||
distributed under the terms of Sections 1 and 2 above on a medium
|
||||
customarily used for software interchange; or,
|
||||
* **c)** Accompany it with the information you received as to the offer
|
||||
to distribute corresponding source code. (This alternative is
|
||||
allowed only for noncommercial distribution and only if you
|
||||
received the program in object code or executable form with such
|
||||
an offer, in accord with Subsection b above.)
|
||||
|
||||
The source code for a work means the preferred form of the work for
|
||||
making modifications to it. For an executable work, complete source
|
||||
@@ -173,7 +169,7 @@ access to copy the source code from the same place counts as
|
||||
distribution of the source code, even though third parties are not
|
||||
compelled to copy the source along with the object code.
|
||||
|
||||
4. You may not copy, modify, sublicense, or distribute the Program
|
||||
**4.** You may not copy, modify, sublicense, or distribute the Program
|
||||
except as expressly provided under this License. Any attempt
|
||||
otherwise to copy, modify, sublicense or distribute the Program is
|
||||
void, and will automatically terminate your rights under this License.
|
||||
@@ -181,7 +177,7 @@ However, parties who have received copies, or rights, from you under
|
||||
this License will not have their licenses terminated so long as such
|
||||
parties remain in full compliance.
|
||||
|
||||
5. You are not required to accept this License, since you have not
|
||||
**5.** You are not required to accept this License, since you have not
|
||||
signed it. However, nothing else grants you permission to modify or
|
||||
distribute the Program or its derivative works. These actions are
|
||||
prohibited by law if you do not accept this License. Therefore, by
|
||||
@@ -190,7 +186,7 @@ Program), you indicate your acceptance of this License to do so, and
|
||||
all its terms and conditions for copying, distributing or modifying
|
||||
the Program or works based on it.
|
||||
|
||||
6. Each time you redistribute the Program (or any work based on the
|
||||
**6.** Each time you redistribute the Program (or any work based on the
|
||||
Program), the recipient automatically receives a license from the
|
||||
original licensor to copy, distribute or modify the Program subject to
|
||||
these terms and conditions. You may not impose any further
|
||||
@@ -198,7 +194,7 @@ restrictions on the recipients' exercise of the rights granted herein.
|
||||
You are not responsible for enforcing compliance by third parties to
|
||||
this License.
|
||||
|
||||
7. If, as a consequence of a court judgment or allegation of patent
|
||||
**7.** If, as a consequence of a court judgment or allegation of patent
|
||||
infringement or for any other reason (not limited to patent issues),
|
||||
conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
@@ -230,7 +226,7 @@ impose that choice.
|
||||
This section is intended to make thoroughly clear what is believed to
|
||||
be a consequence of the rest of this License.
|
||||
|
||||
8. If the distribution and/or use of the Program is restricted in
|
||||
**8.** If the distribution and/or use of the Program is restricted in
|
||||
certain countries either by patents or by copyrighted interfaces, the
|
||||
original copyright holder who places the Program under this License
|
||||
may add an explicit geographical distribution limitation excluding
|
||||
@@ -238,7 +234,7 @@ those countries, so that distribution is permitted only in or among
|
||||
countries not thus excluded. In such case, this License incorporates
|
||||
the limitation as if written in the body of this License.
|
||||
|
||||
9. The Free Software Foundation may publish revised and/or new versions
|
||||
**9.** The Free Software Foundation may publish revised and/or new versions
|
||||
of the General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
@@ -251,7 +247,7 @@ Software Foundation. If the Program does not specify a version number of
|
||||
this License, you may choose any version ever published by the Free Software
|
||||
Foundation.
|
||||
|
||||
10. If you wish to incorporate parts of the Program into other free
|
||||
**10.** If you wish to incorporate parts of the Program into other free
|
||||
programs whose distribution conditions are different, write to the author
|
||||
to ask for permission. For software which is copyrighted by the Free
|
||||
Software Foundation, write to the Free Software Foundation; we sometimes
|
||||
@@ -259,9 +255,9 @@ make exceptions for this. Our decision will be guided by the two goals
|
||||
of preserving the free status of all derivatives of our free software and
|
||||
of promoting the sharing and reuse of software generally.
|
||||
|
||||
NO WARRANTY
|
||||
### NO WARRANTY
|
||||
|
||||
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
|
||||
**11.** BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
|
||||
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
|
||||
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
|
||||
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
|
||||
@@ -271,7 +267,7 @@ TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
|
||||
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
|
||||
REPAIR OR CORRECTION.
|
||||
|
||||
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
**12.** IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
|
||||
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
|
||||
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
|
||||
@@ -281,15 +277,15 @@ YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
|
||||
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGES.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
### How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
convey the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
@@ -321,20 +317,20 @@ when it starts in an interactive mode:
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||
The hypothetical commands `show w` and `show c` should show the appropriate
|
||||
parts of the General Public License. Of course, the commands you use may
|
||||
be called something other than `show w' and `show c'; they could even be
|
||||
be called something other than `show w` and `show c`; they could even be
|
||||
mouse-clicks or menu items--whatever suits your program.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or your
|
||||
school, if any, to sign a "copyright disclaimer" for the program, if
|
||||
necessary. Here is a sample; alter the names:
|
||||
|
||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
|
||||
`Gnomovision' (which makes passes at compilers) written by James Hacker.
|
||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
|
||||
`Gnomovision' (which makes passes at compilers) written by James Hacker.
|
||||
|
||||
<signature of Ty Coon>, 1 April 1989
|
||||
Ty Coon, President of Vice
|
||||
<signature of Ty Coon>, 1 April 1989
|
||||
Ty Coon, President of Vice
|
||||
|
||||
This General Public License does not permit incorporating your program into
|
||||
proprietary programs. If your program is a subroutine library, you may
|
12
CPackProperties.cmake.in
Normal file
12
CPackProperties.cmake.in
Normal file
@@ -0,0 +1,12 @@
|
||||
# Make the current version available to CPack
|
||||
set(CPACK_PACKAGE_VERSION "@REV_VERSION@")
|
||||
|
||||
# Name the output file with the correct version
|
||||
string(REPLACE "#CPACK_PACKAGE_VERSION#" "@REV_VERSION@" CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_FILE_NAME}")
|
||||
|
||||
if (CPACK_BUNDLE_PLIST_SOURCE)
|
||||
# Rewrite the Info.plist.in to contain the correct version
|
||||
file(READ ${CPACK_BUNDLE_PLIST_SOURCE} INFO_PLIST_CONTENT)
|
||||
string(REPLACE "#CPACK_PACKAGE_VERSION#" "@REV_VERSION@" INFO_PLIST_CONTENT "${INFO_PLIST_CONTENT}")
|
||||
file(WRITE ${CPACK_BUNDLE_PLIST} "${INFO_PLIST_CONTENT}")
|
||||
endif (CPACK_BUNDLE_PLIST_SOURCE)
|
60
CREDITS.md
Normal file
60
CREDITS.md
Normal file
@@ -0,0 +1,60 @@
|
||||
### The OpenTTD team (in alphabetical order):
|
||||
|
||||
- Grzegorz Duczyński (adf88) - General coding (since 1.7.2)
|
||||
- Albert Hofkamp (Alberth) - GUI expert (since 0.7)
|
||||
- Matthijs Kooijman (blathijs) - Pathfinder-guru, Debian port (since 0.3)
|
||||
- Ulf Hermann (fonsinchen) - Cargo Distribution (since 1.3)
|
||||
- Christoph Elsenhans (frosch) - General coding (since 0.6)
|
||||
- Loïc Guilloux (glx) - Windows Expert (since 0.4.5)
|
||||
- Charles Pigott (LordAro) - General / Correctness police (since 1.9)
|
||||
- Michael Lutz (michi_cc) - Path based signals (since 0.7)
|
||||
- Niels Martin Hansen (nielsm) - Music system, general coding (since 1.9)
|
||||
- Owen Rudge (orudge) - Forum host, OS/2 port (since 0.1)
|
||||
- Peter Nelson (peter1138) - Spiritual descendant from newGRF gods (since 0.4.5)
|
||||
- Ingo von Borstel (planetmaker) - General coding, Support (since 1.1)
|
||||
- Remko Bijker (Rubidium) - Lead coder and way more (since 0.4.5)
|
||||
- José Soler (Terkhen) - General coding (since 1.0)
|
||||
- Leif Linse (Zuu) - AI/Game Script (since 1.2)
|
||||
|
||||
### Inactive Developers:
|
||||
|
||||
- Jean-François Claeys (Belugas) - GUI, newindustries and more (0.4.5 - 1.0)
|
||||
- Bjarni Corfitzen (Bjarni) - macOS port, coder and vehicles (0.3 - 0.7)
|
||||
- Victor Fischer (Celestar) - Programming everywhere you need him to (0.3 - 0.6)
|
||||
- Jaroslav Mazanec (KUDr) - YAPG (Yet Another Pathfinder God) ;) (0.4.5 - 0.6)
|
||||
- Jonathan Coome (Maedhros) - High priest of the NewGRF Temple (0.5 - 0.6)
|
||||
- Attila Bán (MiHaMiX) - WebTranslator 1 and 2 (0.3 - 0.5)
|
||||
- Zdeněk Sojka (SmatZ) - Bug finder and fixer (0.6 - 1.3)
|
||||
- Christoph Mallon (Tron) - Programmer, code correctness police (0.3 - 0.5)
|
||||
- Patric Stout (TrueBrain) - NoProgrammer (0.3 - 1.2), sys op (active)
|
||||
- Thijs Marinussen (Yexo) - AI Framework, General (0.6 - 1.3)
|
||||
|
||||
### Retired Developers:
|
||||
|
||||
- Tamás Faragó (Darkvater) - Ex-Lead coder (0.3 - 0.5)
|
||||
- Dominik Scherer (dominik81) - Lead programmer, GUI expert (0.3 - 0.3)
|
||||
- Emil Djupfeld (egladil) - macOS port (0.4 - 0.6)
|
||||
- Simon Sasburg (HackyKid) - Bug fixer (0.4 - 0.4.5)
|
||||
- Ludvig Strigeus (ludde) - Original author of OpenTTD, main coder (0.1 - 0.3)
|
||||
- Cian Duffy (MYOB) - BeOS port / manual writing (0.1 - 0.3)
|
||||
- Petr Baudiš (pasky) - Many patches, newgrf support, etc. (0.3 - 0.3)
|
||||
- Benedikt Brüggemeier (skidd13) - Bug fixer and code reworker (0.6 - 0.7)
|
||||
- Serge Paquet (vurlix) - 2nd contributor after ludde (0.1 - 0.3)
|
||||
|
||||
### Thanks to:
|
||||
|
||||
- Josef Drexler - For his great work on TTDPatch.
|
||||
- Marcin Grzegorczyk - For his TTDPatch work and documentation of Transport Tycoon Deluxe internals and track foundations
|
||||
- Stefan Meißner (sign_de) - For his work on the console
|
||||
- Mike Ragsdale - OpenTTD installer
|
||||
- Christian Rosentreter (tokai) - MorphOS / AmigaOS port
|
||||
- Richard Kempton (RichK67) - Additional airports, initial TGP implementation
|
||||
- Alberto Demichelis - Squirrel scripting language
|
||||
- L. Peter Deutsch - MD5 implementation
|
||||
- Michael Blunck - For revolutionizing TTD with awesome graphics
|
||||
- George - Canal graphics
|
||||
- Andrew Parkhouse (andythenorth) - River graphics
|
||||
- David Dallaston (Pikka) - Tram tracks
|
||||
- All Translators - For their support to make OpenTTD a truly international game
|
||||
- Bug Reporters - Thanks for all bug reports
|
||||
- Chris Sawyer - For an amazing game!
|
@@ -1,5 +1,3 @@
|
||||
# $Id$
|
||||
|
||||
# This file is part of OpenTTD.
|
||||
# OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
|
||||
# OpenTTD 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.
|
||||
@@ -9,11 +7,11 @@
|
||||
# Project related configuration options
|
||||
#---------------------------------------------------------------------------
|
||||
DOXYFILE_ENCODING = UTF-8
|
||||
PROJECT_NAME = OpenTTD
|
||||
PROJECT_NUMBER =
|
||||
PROJECT_NAME = "OpenTTD Source"
|
||||
PROJECT_NUMBER = ${REV_VERSION}
|
||||
PROJECT_BRIEF =
|
||||
PROJECT_LOGO =
|
||||
OUTPUT_DIRECTORY = docs/source/
|
||||
OUTPUT_DIRECTORY = ${CPACK_BINARY_DIR}/docs/source/
|
||||
CREATE_SUBDIRS = YES
|
||||
ALLOW_UNICODE_NAMES = NO
|
||||
OUTPUT_LANGUAGE = English
|
||||
@@ -289,16 +287,15 @@ EXPAND_ONLY_PREDEF = YES
|
||||
SEARCH_INCLUDES = YES
|
||||
INCLUDE_PATH =
|
||||
INCLUDE_FILE_PATTERNS =
|
||||
PREDEFINED = ENABLE_NETWORK \
|
||||
WITH_ZLIB \
|
||||
PREDEFINED = WITH_ZLIB \
|
||||
WITH_LZO \
|
||||
WITH_LZMA \
|
||||
WITH_LIBLZMA \
|
||||
WITH_SDL \
|
||||
WITH_PNG \
|
||||
WITH_FONTCONFIG \
|
||||
WITH_FREETYPE \
|
||||
WITH_ICU_SORT \
|
||||
WITH_ICU_LAYOUT \
|
||||
WITH_ICU_I18N \
|
||||
WITH_ICU_LX \
|
||||
UNICODE \
|
||||
_UNICODE \
|
||||
_GNU_SOURCE \
|
||||
@@ -309,16 +306,14 @@ SKIP_FUNCTION_MACROS = YES
|
||||
# Configuration options related to external references
|
||||
#---------------------------------------------------------------------------
|
||||
TAGFILES =
|
||||
GENERATE_TAGFILE = objs/openttd.tag
|
||||
GENERATE_TAGFILE = ${CPACK_BINARY_DIR}/docs/openttd.tag
|
||||
ALLEXTERNALS = NO
|
||||
EXTERNAL_GROUPS = YES
|
||||
EXTERNAL_PAGES = YES
|
||||
PERL_PATH = /usr/bin/perl
|
||||
#---------------------------------------------------------------------------
|
||||
# Configuration options related to the dot tool
|
||||
#---------------------------------------------------------------------------
|
||||
CLASS_DIAGRAMS = YES
|
||||
MSCGEN_PATH =
|
||||
DIA_PATH =
|
||||
HIDE_UNDOC_RELATIONS = YES
|
||||
HAVE_DOT = NO
|
@@ -1,229 +0,0 @@
|
||||
# $Id$
|
||||
|
||||
# This file is part of OpenTTD.
|
||||
# OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
|
||||
# OpenTTD 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 OpenTTD. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
#
|
||||
# Creation of bundles
|
||||
#
|
||||
|
||||
# The revision is needed for the bundle name and creating an OSX application bundle.
|
||||
# Detect the revision
|
||||
VERSIONS := $(shell AWK="$(AWK)" "$(ROOT_DIR)/findversion.sh")
|
||||
VERSION := $(shell echo "$(VERSIONS)" | cut -f 1 -d' ')
|
||||
|
||||
# Make sure we have something in VERSION
|
||||
ifeq ($(VERSION),)
|
||||
VERSION := norev000
|
||||
endif
|
||||
|
||||
ifndef BUNDLE_NAME
|
||||
BUNDLE_NAME = openttd-custom-$(VERSION)-$(OS)
|
||||
endif
|
||||
|
||||
# An OSX application bundle needs the data files, lang files and openttd executable in a different location.
|
||||
ifdef OSXAPP
|
||||
AI_DIR = $(BUNDLE_DIR)/$(OSXAPP)/Contents/Resources/ai
|
||||
GAME_DIR = $(BUNDLE_DIR)/$(OSXAPP)/Contents/Resources/game
|
||||
BASESET_DIR = $(BUNDLE_DIR)/$(OSXAPP)/Contents/Resources/baseset
|
||||
LANG_DIR = $(BUNDLE_DIR)/$(OSXAPP)/Contents/Resources/lang
|
||||
TTD_DIR = $(BUNDLE_DIR)/$(OSXAPP)/Contents/MacOS
|
||||
else
|
||||
AI_DIR = $(BUNDLE_DIR)/ai
|
||||
GAME_DIR = $(BUNDLE_DIR)/game
|
||||
BASESET_DIR = $(BUNDLE_DIR)/baseset
|
||||
LANG_DIR = $(BUNDLE_DIR)/lang
|
||||
TTD_DIR = $(BUNDLE_DIR)
|
||||
endif
|
||||
|
||||
bundle: all
|
||||
@echo '[BUNDLE] Constructing bundle'
|
||||
$(Q)rm -rf "$(BUNDLE_DIR)"
|
||||
$(Q)mkdir -p "$(BUNDLE_DIR)"
|
||||
$(Q)mkdir -p "$(BUNDLE_DIR)/docs"
|
||||
$(Q)mkdir -p "$(BUNDLE_DIR)/media"
|
||||
$(Q)mkdir -p "$(BUNDLE_DIR)/scripts"
|
||||
$(Q)mkdir -p "$(TTD_DIR)"
|
||||
$(Q)mkdir -p "$(AI_DIR)"
|
||||
$(Q)mkdir -p "$(GAME_DIR)"
|
||||
$(Q)mkdir -p "$(BASESET_DIR)"
|
||||
$(Q)mkdir -p "$(LANG_DIR)"
|
||||
ifdef OSXAPP
|
||||
$(Q)mkdir -p "$(BUNDLE_DIR)/$(OSXAPP)/Contents/Resources"
|
||||
$(Q)echo "APPL????" > "$(BUNDLE_DIR)/$(OSXAPP)/Contents/PkgInfo"
|
||||
$(Q)cp "$(ROOT_DIR)/os/macosx/openttd.icns" "$(BUNDLE_DIR)/$(OSXAPP)/Contents/Resources/openttd.icns"
|
||||
$(Q)$(ROOT_DIR)/os/macosx/plistgen.sh "$(BUNDLE_DIR)/$(OSXAPP)" "$(VERSION)"
|
||||
$(Q)cp "$(ROOT_DIR)/os/macosx/splash.png" "$(BASESET_DIR)"
|
||||
endif
|
||||
ifeq ($(OS),UNIX)
|
||||
$(Q)cp "$(ROOT_DIR)/media/openttd.32.bmp" "$(BASESET_DIR)/"
|
||||
endif
|
||||
$(Q)cp "$(BIN_DIR)/$(TTD)" "$(TTD_DIR)/"
|
||||
$(Q)cp "$(BIN_DIR)/ai/"compat_*.nut "$(AI_DIR)/"
|
||||
$(Q)cp "$(BIN_DIR)/game/"compat_*.nut "$(GAME_DIR)/"
|
||||
$(Q)cp "$(BIN_DIR)/baseset/"*.grf "$(BASESET_DIR)/"
|
||||
$(Q)cp "$(BIN_DIR)/baseset/"*.obg "$(BASESET_DIR)/"
|
||||
$(Q)cp "$(BIN_DIR)/baseset/"*.obs "$(BASESET_DIR)/"
|
||||
$(Q)cp "$(BIN_DIR)/baseset/opntitle.dat" "$(BASESET_DIR)/"
|
||||
$(Q)cp "$(BIN_DIR)/baseset/"*.obm "$(BASESET_DIR)/"
|
||||
$(Q)cp "$(BIN_DIR)/lang/"*.lng "$(LANG_DIR)/"
|
||||
$(Q)cp "$(ROOT_DIR)/README.md" "$(BUNDLE_DIR)/"
|
||||
$(Q)cp "$(ROOT_DIR)/COPYING" "$(BUNDLE_DIR)/"
|
||||
$(Q)cp "$(ROOT_DIR)/known-bugs.txt" "$(BUNDLE_DIR)/"
|
||||
$(Q)cp "$(ROOT_DIR)/docs/multiplayer.txt" "$(BUNDLE_DIR)/docs/"
|
||||
$(Q)cp "$(ROOT_DIR)/changelog.txt" "$(BUNDLE_DIR)/"
|
||||
ifdef MAN_DIR
|
||||
$(Q)mkdir -p "$(BUNDLE_DIR)/man/"
|
||||
$(Q)cp "$(ROOT_DIR)/docs/openttd.6" "$(BUNDLE_DIR)/man/"
|
||||
$(Q)gzip -9 "$(BUNDLE_DIR)/man/openttd.6"
|
||||
endif
|
||||
$(Q)cp "$(ROOT_DIR)/media/openttd.32.xpm" "$(BUNDLE_DIR)/media/"
|
||||
$(Q)cp "$(ROOT_DIR)/media/openttd."*.png "$(BUNDLE_DIR)/media/"
|
||||
$(Q)cp "$(BIN_DIR)/scripts/"* "$(BUNDLE_DIR)/scripts/"
|
||||
ifdef MENU_DIR
|
||||
$(Q)cp "$(ROOT_DIR)/media/openttd.desktop" "$(BUNDLE_DIR)/media/"
|
||||
$(Q)$(AWK) -f "$(ROOT_DIR)/media/openttd.desktop.translation.awk" "$(SRC_DIR)/lang/"*.txt | LC_ALL=C $(SORT) | $(AWK) -f "$(ROOT_DIR)/media/openttd.desktop.filter.awk" >> "$(BUNDLE_DIR)/media/openttd.desktop"
|
||||
$(Q)sed s/=openttd/=$(BINARY_NAME)/g "$(BUNDLE_DIR)/media/openttd.desktop" > "$(ROOT_DIR)/media/openttd.desktop.install"
|
||||
endif
|
||||
ifeq ($(TTD), openttd.exe)
|
||||
$(Q)unix2dos "$(BUNDLE_DIR)/docs/"* "$(BUNDLE_DIR)/README.md" "$(BUNDLE_DIR)/COPYING" "$(BUNDLE_DIR)/changelog.txt" "$(BUNDLE_DIR)/known-bugs.txt"
|
||||
ifeq ($(OS), DOS)
|
||||
$(Q)cp "$(ROOT_DIR)/os/dos/cwsdpmi/cwsdpmi.txt" "$(BUNDLE_DIR)/docs/"
|
||||
ifndef STRIP
|
||||
$(Q)cp "$(ROOT_DIR)/os/dos/cwsdpmi/cwsdpmi.exe" "$(TTD_DIR)/"
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
### Packing the current bundle into several compressed file formats ###
|
||||
#
|
||||
# Zips & dmgs do not contain a root folder, i.e. they have files in the root of the zip/dmg.
|
||||
# gzip, bzip2 and lha archives have a root folder, with the same name as the bundle.
|
||||
#
|
||||
# One can supply a custom name by adding BUNDLE_NAME:=<name> to the make command.
|
||||
#
|
||||
bundle_zip: bundle
|
||||
@echo '[BUNDLE] Creating $(BUNDLE_NAME).zip'
|
||||
$(Q)mkdir -p "$(BUNDLES_DIR)"
|
||||
$(Q)cd "$(BUNDLE_DIR)" && zip -r $(shell if test -z "$(VERBOSE)"; then echo '-q'; fi) "$(BUNDLES_DIR)/$(BUNDLE_NAME).zip" .
|
||||
|
||||
bundle_7z: bundle
|
||||
@echo '[BUNDLE] Creating $(BUNDLE_NAME).7z'
|
||||
$(Q)mkdir -p "$(BUNDLES_DIR)"
|
||||
$(Q)cd "$(BUNDLE_DIR)" && 7z a "$(BUNDLES_DIR)/$(BUNDLE_NAME).7z" .
|
||||
|
||||
bundle_gzip: bundle
|
||||
@echo '[BUNDLE] Creating $(BUNDLE_NAME).tar.gz'
|
||||
$(Q)mkdir -p "$(BUNDLES_DIR)/.gzip/$(BUNDLE_NAME)"
|
||||
$(Q)cp -R "$(BUNDLE_DIR)/"* "$(BUNDLES_DIR)/.gzip/$(BUNDLE_NAME)/"
|
||||
$(Q)cd "$(BUNDLES_DIR)/.gzip" && tar -zc$(shell if test -n "$(VERBOSE)"; then echo 'v'; fi)f "$(BUNDLES_DIR)/$(BUNDLE_NAME).tar.gz" "$(BUNDLE_NAME)"
|
||||
$(Q)rm -rf "$(BUNDLES_DIR)/.gzip"
|
||||
|
||||
bundle_bzip2: bundle
|
||||
@echo '[BUNDLE] Creating $(BUNDLE_NAME).tar.bz2'
|
||||
$(Q)mkdir -p "$(BUNDLES_DIR)/.bzip2/$(BUNDLE_NAME)"
|
||||
$(Q)cp -R "$(BUNDLE_DIR)/"* "$(BUNDLES_DIR)/.bzip2/$(BUNDLE_NAME)/"
|
||||
$(Q)cd "$(BUNDLES_DIR)/.bzip2" && tar -jc$(shell if test -n "$(VERBOSE)"; then echo 'v'; fi)f "$(BUNDLES_DIR)/$(BUNDLE_NAME).tar.bz2" "$(BUNDLE_NAME)"
|
||||
$(Q)rm -rf "$(BUNDLES_DIR)/.bzip2"
|
||||
|
||||
bundle_lzma: bundle
|
||||
@echo '[BUNDLE] Creating $(BUNDLE_NAME).tar.lzma'
|
||||
$(Q)mkdir -p "$(BUNDLES_DIR)/.lzma/$(BUNDLE_NAME)"
|
||||
$(Q)cp -R "$(BUNDLE_DIR)/"* "$(BUNDLES_DIR)/.lzma/$(BUNDLE_NAME)/"
|
||||
$(Q)cd "$(BUNDLES_DIR)/.lzma" && tar --lzma -c$(shell if test -n "$(VERBOSE)"; then echo 'v'; fi)f "$(BUNDLES_DIR)/$(BUNDLE_NAME).tar.lzma" "$(BUNDLE_NAME)"
|
||||
$(Q)rm -rf "$(BUNDLES_DIR)/.lzma"
|
||||
|
||||
bundle_xz: bundle
|
||||
@echo '[BUNDLE] Creating $(BUNDLE_NAME).tar.xz'
|
||||
$(Q)mkdir -p "$(BUNDLES_DIR)/.xz/$(BUNDLE_NAME)"
|
||||
$(Q)cp -R "$(BUNDLE_DIR)/"* "$(BUNDLES_DIR)/.xz/$(BUNDLE_NAME)/"
|
||||
$(Q)cd "$(BUNDLES_DIR)/.xz" && tar --xz -c$(shell if test -n "$(VERBOSE)"; then echo 'v'; fi)f "$(BUNDLES_DIR)/$(BUNDLE_NAME).tar.xz" "$(BUNDLE_NAME)"
|
||||
$(Q)rm -rf "$(BUNDLES_DIR)/.xz"
|
||||
|
||||
bundle_lha: bundle
|
||||
@echo '[BUNDLE] Creating $(BUNDLE_NAME).lha'
|
||||
$(Q)mkdir -p "$(BUNDLES_DIR)/.lha/$(BUNDLE_NAME)"
|
||||
$(Q)cp -R "$(BUNDLE_DIR)/"* "$(BUNDLES_DIR)/.lha/$(BUNDLE_NAME)/"
|
||||
$(Q)cd "$(BUNDLES_DIR)/.lha" && lha ao6 "$(BUNDLES_DIR)/$(BUNDLE_NAME).lha" "$(BUNDLE_NAME)"
|
||||
$(Q)rm -rf "$(BUNDLES_DIR)/.lha"
|
||||
|
||||
bundle_dmg: bundle
|
||||
@echo '[BUNDLE] Creating $(BUNDLE_NAME).dmg'
|
||||
$(Q)mkdir -p "$(BUNDLES_DIR)/OpenTTD $(VERSION)"
|
||||
$(Q)cp -R "$(BUNDLE_DIR)/" "$(BUNDLES_DIR)/OpenTTD $(VERSION)"
|
||||
$(Q)hdiutil create -ov -format UDZO -srcfolder "$(BUNDLES_DIR)/OpenTTD $(VERSION)" "$(BUNDLES_DIR)/$(BUNDLE_NAME).dmg"
|
||||
$(Q)rm -fr "$(BUNDLES_DIR)/OpenTTD $(VERSION)"
|
||||
|
||||
bundle_exe: all
|
||||
@echo '[BUNDLE] Creating $(BUNDLE_NAME).exe'
|
||||
$(Q)mkdir -p "$(BUNDLES_DIR)"
|
||||
$(Q)unix2dos "$(ROOT_DIR)/docs/"*.txt "$(ROOT_DIR)/README.md" "$(ROOT_DIR)/COPYING" "$(ROOT_DIR)/changelog.txt" "$(ROOT_DIR)/known-bugs.txt"
|
||||
$(Q)cd $(ROOT_DIR)/os/windows/installer && makensis.exe //DVERSION_INCLUDE=version_$(PLATFORM).txt install.nsi
|
||||
$(Q)mv $(ROOT_DIR)/os/windows/installer/*$(PLATFORM).exe "$(BUNDLES_DIR)/$(BUNDLE_NAME).exe"
|
||||
|
||||
ifdef OSXAPP
|
||||
install:
|
||||
@echo '[INSTALL] Cannot install the OSX Application Bundle'
|
||||
else
|
||||
install: bundle
|
||||
@echo '[INSTALL] Installing OpenTTD'
|
||||
$(Q)install -d "$(INSTALL_BINARY_DIR)"
|
||||
$(Q)install -d "$(INSTALL_ICON_DIR)"
|
||||
$(Q)install -d "$(INSTALL_DATA_DIR)/ai"
|
||||
$(Q)install -d "$(INSTALL_DATA_DIR)/game"
|
||||
$(Q)install -d "$(INSTALL_DATA_DIR)/baseset"
|
||||
$(Q)install -d "$(INSTALL_DATA_DIR)/lang"
|
||||
$(Q)install -d "$(INSTALL_DATA_DIR)/scripts"
|
||||
ifeq ($(TTD), openttd.exe)
|
||||
$(Q)install -m 755 "$(BUNDLE_DIR)/$(TTD)" "$(INSTALL_BINARY_DIR)/${BINARY_NAME}.exe"
|
||||
else
|
||||
$(Q)install -m 755 "$(BUNDLE_DIR)/$(TTD)" "$(INSTALL_BINARY_DIR)/${BINARY_NAME}"
|
||||
endif
|
||||
$(Q)install -m 644 "$(BUNDLE_DIR)/lang/"* "$(INSTALL_DATA_DIR)/lang"
|
||||
$(Q)install -m 644 "$(BUNDLE_DIR)/ai/"* "$(INSTALL_DATA_DIR)/ai"
|
||||
$(Q)install -m 644 "$(BUNDLE_DIR)/game/"* "$(INSTALL_DATA_DIR)/game"
|
||||
$(Q)install -m 644 "$(BUNDLE_DIR)/baseset/"* "$(INSTALL_DATA_DIR)/baseset"
|
||||
$(Q)install -m 644 "$(BUNDLE_DIR)/scripts/"* "$(INSTALL_DATA_DIR)/scripts"
|
||||
ifndef DO_NOT_INSTALL_DOCS
|
||||
$(Q)install -d "$(INSTALL_DOC_DIR)"
|
||||
$(Q)install -m 644 "$(BUNDLE_DIR)/docs/"* "$(BUNDLE_DIR)/README.md" "$(BUNDLE_DIR)/known-bugs.txt" "$(INSTALL_DOC_DIR)"
|
||||
endif
|
||||
ifndef DO_NOT_INSTALL_CHANGELOG
|
||||
$(Q)install -d "$(INSTALL_DOC_DIR)"
|
||||
$(Q)install -m 644 "$(BUNDLE_DIR)/changelog.txt" "$(INSTALL_DOC_DIR)"
|
||||
endif
|
||||
ifndef DO_NOT_INSTALL_LICENSE
|
||||
$(Q)install -d "$(INSTALL_DOC_DIR)"
|
||||
$(Q)install -m 644 "$(BUNDLE_DIR)/COPYING" "$(INSTALL_DOC_DIR)"
|
||||
endif
|
||||
$(Q)install -m 644 "$(BUNDLE_DIR)/media/openttd.32.xpm" "$(INSTALL_ICON_DIR)/${BINARY_NAME}.32.xpm"
|
||||
ifdef ICON_THEME_DIR
|
||||
$(Q)install -d "$(INSTALL_ICON_THEME_DIR)"
|
||||
$(Q)install -d "$(INSTALL_ICON_THEME_DIR)/16x16/apps"
|
||||
$(Q)install -m 644 "$(BUNDLE_DIR)/media/openttd.16.png" "$(INSTALL_ICON_THEME_DIR)/16x16/apps/${BINARY_NAME}.png"
|
||||
$(Q)install -d "$(INSTALL_ICON_THEME_DIR)/32x32/apps"
|
||||
$(Q)install -m 644 "$(BUNDLE_DIR)/media/openttd.32.png" "$(INSTALL_ICON_THEME_DIR)/32x32/apps/${BINARY_NAME}.png"
|
||||
$(Q)install -d "$(INSTALL_ICON_THEME_DIR)/48x48/apps"
|
||||
$(Q)install -m 644 "$(BUNDLE_DIR)/media/openttd.48.png" "$(INSTALL_ICON_THEME_DIR)/48x48/apps/${BINARY_NAME}.png"
|
||||
$(Q)install -d "$(INSTALL_ICON_THEME_DIR)/64x64/apps"
|
||||
$(Q)install -m 644 "$(BUNDLE_DIR)/media/openttd.64.png" "$(INSTALL_ICON_THEME_DIR)/64x64/apps/${BINARY_NAME}.png"
|
||||
$(Q)install -d "$(INSTALL_ICON_THEME_DIR)/128x128/apps"
|
||||
$(Q)install -m 644 "$(BUNDLE_DIR)/media/openttd.128.png" "$(INSTALL_ICON_THEME_DIR)/128x128/apps/${BINARY_NAME}.png"
|
||||
$(Q)install -d "$(INSTALL_ICON_THEME_DIR)/256x256/apps"
|
||||
$(Q)install -m 644 "$(BUNDLE_DIR)/media/openttd.256.png" "$(INSTALL_ICON_THEME_DIR)/256x256/apps/${BINARY_NAME}.png"
|
||||
else
|
||||
$(Q)install -m 644 "$(BUNDLE_DIR)/media/"*.png "$(INSTALL_ICON_DIR)"
|
||||
endif
|
||||
ifdef MAN_DIR
|
||||
ifndef DO_NOT_INSTALL_MAN
|
||||
$(Q)install -d "$(INSTALL_MAN_DIR)"
|
||||
$(Q)install -m 644 "$(BUNDLE_DIR)/man/openttd.6.gz" "$(INSTALL_MAN_DIR)/${BINARY_NAME}.6.gz"
|
||||
endif
|
||||
endif
|
||||
ifdef MENU_DIR
|
||||
$(Q)install -d "$(INSTALL_MENU_DIR)"
|
||||
$(Q)install -m 644 "$(ROOT_DIR)/media/openttd.desktop.install" "$(INSTALL_MENU_DIR)/${BINARY_NAME}.desktop"
|
||||
endif
|
||||
endif # OSXAPP
|
118
Makefile.grf.in
118
Makefile.grf.in
@@ -1,118 +0,0 @@
|
||||
# $Id$
|
||||
|
||||
# This file is part of OpenTTD.
|
||||
# OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
|
||||
# OpenTTD 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 OpenTTD. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
# Building requires GRFCodec.
|
||||
#
|
||||
# Recent versions (including sources) can be found at:
|
||||
# http://www.openttd.org/download-grfcodec
|
||||
#
|
||||
# The mercurial repository can be found at:
|
||||
# http://hg.openttdcoop.org/grfcodec
|
||||
#
|
||||
|
||||
|
||||
ROOT_DIR = !!ROOT_DIR!!
|
||||
GRF_DIR = $(ROOT_DIR)/media/extra_grf
|
||||
BASESET_DIR = $(ROOT_DIR)/media/baseset
|
||||
LANG_DIR = $(ROOT_DIR)/src/lang
|
||||
BIN_DIR = !!BIN_DIR!!/baseset
|
||||
OBJS_DIR = !!GRF_OBJS_DIR!!
|
||||
OS = !!OS!!
|
||||
STAGE = !!STAGE!!
|
||||
|
||||
# Check if we want to show what we are doing
|
||||
ifdef VERBOSE
|
||||
Q =
|
||||
E = @true
|
||||
else
|
||||
Q = @
|
||||
E = @echo
|
||||
endif
|
||||
|
||||
GRFCODEC := !!GRFCODEC!!
|
||||
NFORENUM := !!NFORENUM!!
|
||||
CC_BUILD := !!CC_BUILD!!
|
||||
MD5SUM := $(shell [ "$(OS)" = "OSX" ] && echo "md5 -r" || echo "md5sum")
|
||||
|
||||
# Some "should not be changed" settings.
|
||||
NFO_FILES := $(GRF_DIR)/*.nfo $(GRF_DIR)/rivers/*.nfo
|
||||
PNG_FILES := $(GRF_DIR)/*.png $(GRF_DIR)/rivers/*.png
|
||||
|
||||
# List of target files.
|
||||
OBT_FILES := $(BIN_DIR)/orig_dos.obg
|
||||
OBT_FILES += $(BIN_DIR)/orig_dos_de.obg
|
||||
OBT_FILES += $(BIN_DIR)/orig_win.obg
|
||||
OBT_FILES += $(BIN_DIR)/orig_dos.obs
|
||||
OBT_FILES += $(BIN_DIR)/orig_win.obs
|
||||
OBT_FILES += $(BIN_DIR)/no_sound.obs
|
||||
OBT_FILES += $(BIN_DIR)/orig_dos.obm
|
||||
OBT_FILES += $(BIN_DIR)/orig_win.obm
|
||||
OBT_FILES += $(BIN_DIR)/no_music.obm
|
||||
OBT_FILES += $(BIN_DIR)/orig_tto.obm
|
||||
|
||||
# Build the GRF.
|
||||
all: $(OBT_FILES)
|
||||
ifdef GRFCODEC
|
||||
all: $(BIN_DIR)/openttd.grf $(BIN_DIR)/orig_extra.grf
|
||||
endif
|
||||
|
||||
$(OBJS_DIR)/langfiles.tmp: $(LANG_DIR)/*.txt
|
||||
$(E) '$(STAGE) Collecting baseset translations'
|
||||
$(Q) cat $^ > $@
|
||||
|
||||
$(BIN_DIR)/%.obg: $(BASESET_DIR)/%.obg $(BIN_DIR)/orig_extra.grf $(OBJS_DIR)/langfiles.tmp $(BASESET_DIR)/translations.awk
|
||||
$(E) '$(STAGE) Updating $(notdir $@)'
|
||||
$(Q) sed 's/^ORIG_EXTRA.GRF = *[0-9a-f]*$$/ORIG_EXTRA.GRF = '`$(MD5SUM) $(BIN_DIR)/orig_extra.grf | sed 's@ .*@@'`'/' $< > $@.tmp
|
||||
$(Q) awk -v langfiles='$(OBJS_DIR)/langfiles.tmp' -f $(BASESET_DIR)/translations.awk $@.tmp >$@
|
||||
$(Q) rm $@.tmp
|
||||
|
||||
$(BIN_DIR)/%.obs: $(BASESET_DIR)/%.obs $(OBJS_DIR)/langfiles.tmp $(BASESET_DIR)/translations.awk
|
||||
$(E) '$(STAGE) Updating $(notdir $@)'
|
||||
$(Q) awk -v langfiles='$(OBJS_DIR)/langfiles.tmp' -f $(BASESET_DIR)/translations.awk $< >$@
|
||||
|
||||
$(BIN_DIR)/%.obm: $(BASESET_DIR)/%.obm $(OBJS_DIR)/langfiles.tmp $(BASESET_DIR)/translations.awk
|
||||
$(E) '$(STAGE) Updating $(notdir $@)'
|
||||
$(Q) awk -v langfiles='$(OBJS_DIR)/langfiles.tmp' -f $(BASESET_DIR)/translations.awk $< >$@
|
||||
|
||||
# Guard against trying to run GRFCODEC/NFORENUM without either being set.
|
||||
ifdef GRFCODEC
|
||||
ifdef NFORENUM
|
||||
|
||||
# Compile extra grf
|
||||
$(BIN_DIR)/openttd.grf: $(PNG_FILES) $(NFO_FILES) $(GRF_DIR)/assemble_nfo.awk
|
||||
$(E) '$(STAGE) Assembling openttd.nfo'
|
||||
$(Q)-mkdir -p $(OBJS_DIR)/sprites
|
||||
$(Q)-cp $(PNG_FILES) $(OBJS_DIR)/sprites 2> /dev/null
|
||||
$(Q) awk -f $(GRF_DIR)/assemble_nfo.awk $(GRF_DIR)/openttd.nfo > $(OBJS_DIR)/sprites/openttd.nfo
|
||||
$(Q) $(NFORENUM) -s $(OBJS_DIR)/sprites/openttd.nfo
|
||||
$(E) '$(STAGE) Compiling openttd.grf'
|
||||
$(Q) $(GRFCODEC) -n -s -e -p1 $(OBJS_DIR)/openttd.grf
|
||||
$(Q)cp $(OBJS_DIR)/openttd.grf $(BIN_DIR)/openttd.grf
|
||||
|
||||
# The copy operation of PNG_FILES is duplicated from the target 'openttd.grf', thus those targets may not run in parallel.
|
||||
$(BIN_DIR)/orig_extra.grf: $(PNG_FILES) $(NFO_FILES) $(GRF_DIR)/assemble_nfo.awk | $(BIN_DIR)/openttd.grf
|
||||
$(E) '$(STAGE) Assembling orig_extra.nfo'
|
||||
$(Q)-mkdir -p $(OBJS_DIR)/sprites
|
||||
$(Q)-cp $(PNG_FILES) $(OBJS_DIR)/sprites 2> /dev/null
|
||||
$(Q) awk -f $(GRF_DIR)/assemble_nfo.awk $(GRF_DIR)/orig_extra.nfo > $(OBJS_DIR)/sprites/orig_extra.nfo
|
||||
$(Q) $(NFORENUM) -s $(OBJS_DIR)/sprites/orig_extra.nfo
|
||||
$(E) '$(STAGE) Compiling orig_extra.grf'
|
||||
$(Q) $(GRFCODEC) -n -s -e -p1 $(OBJS_DIR)/orig_extra.grf
|
||||
$(Q)cp $(OBJS_DIR)/orig_extra.grf $(BIN_DIR)/orig_extra.grf
|
||||
|
||||
endif
|
||||
endif
|
||||
|
||||
# Clean up temporary files.
|
||||
clean:
|
||||
$(Q)rm -f *.bak *.grf $(OBT_FILES)
|
||||
|
||||
# Clean up temporary files
|
||||
mrproper: clean
|
||||
$(Q)rm -fr sprites
|
||||
|
||||
.PHONY: all mrproper depend clean
|
187
Makefile.in
187
Makefile.in
@@ -1,187 +0,0 @@
|
||||
# $Id$
|
||||
|
||||
# This file is part of OpenTTD.
|
||||
# OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
|
||||
# OpenTTD 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 OpenTTD. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
# Check if we want to show what we are doing
|
||||
ifdef VERBOSE
|
||||
Q =
|
||||
else
|
||||
Q = @
|
||||
endif
|
||||
|
||||
include Makefile.am
|
||||
|
||||
CONFIG_CACHE_PWD = !!CONFIG_CACHE_PWD!!
|
||||
CONFIG_CACHE_SOURCE_LIST = !!CONFIG_CACHE_SOURCE_LIST!!
|
||||
BIN_DIR = !!BIN_DIR!!
|
||||
ICON_THEME_DIR = !!ICON_THEME_DIR!!
|
||||
MAN_DIR = !!MAN_DIR!!
|
||||
MENU_DIR = !!MENU_DIR!!
|
||||
SRC_DIR = !!SRC_DIR!!
|
||||
ROOT_DIR = !!ROOT_DIR!!
|
||||
BUNDLE_DIR = "$(ROOT_DIR)/bundle"
|
||||
BUNDLES_DIR = "$(ROOT_DIR)/bundles"
|
||||
INSTALL_DIR = !!INSTALL_DIR!!
|
||||
INSTALL_BINARY_DIR = "$(INSTALL_DIR)/"!!BINARY_DIR!!
|
||||
INSTALL_MAN_DIR = "$(INSTALL_DIR)/$(MAN_DIR)"
|
||||
INSTALL_MENU_DIR = "$(INSTALL_DIR)/$(MENU_DIR)"
|
||||
INSTALL_ICON_DIR = "$(INSTALL_DIR)/"!!ICON_DIR!!
|
||||
INSTALL_ICON_THEME_DIR = "$(INSTALL_DIR)/$(ICON_THEME_DIR)"
|
||||
INSTALL_DATA_DIR = "$(INSTALL_DIR)/"!!DATA_DIR!!
|
||||
INSTALL_DOC_DIR = "$(INSTALL_DIR)/"!!DOC_DIR!!
|
||||
SOURCE_LIST = !!SOURCE_LIST!!
|
||||
CONFIGURE_FILES = !!CONFIGURE_FILES!!
|
||||
BINARY_NAME = !!BINARY_NAME!!
|
||||
STRIP = !!STRIP!!
|
||||
TTD = !!TTD!!
|
||||
TTDS = $(SRC_DIRS:%=%/$(TTD))
|
||||
OS = !!OS!!
|
||||
OSXAPP = !!OSXAPP!!
|
||||
LIPO = !!LIPO!!
|
||||
AWK = !!AWK!!
|
||||
SORT = !!SORT!!
|
||||
DISTCC = !!DISTCC!!
|
||||
|
||||
RES := $(shell if [ ! -f $(CONFIG_CACHE_PWD) ] || [ "`pwd`" != "`cat $(CONFIG_CACHE_PWD)`" ]; then echo "`pwd`" > $(CONFIG_CACHE_PWD); fi )
|
||||
RES := $(shell if [ ! -f $(CONFIG_CACHE_SOURCE_LIST) ] || [ -n "`cmp $(CONFIG_CACHE_SOURCE_LIST) $(SOURCE_LIST) 2>/dev/null`" ]; then cp $(SOURCE_LIST) $(CONFIG_CACHE_SOURCE_LIST); fi )
|
||||
|
||||
all: config.pwd config.cache
|
||||
ifdef DISTCC
|
||||
@if [ -z "`echo '$(MFLAGS)' | grep '\-j'`" ]; then echo; echo "WARNING: you enabled distcc support, but you don't seem to be using the -jN paramter"; echo; fi
|
||||
endif
|
||||
@for dir in $(DIRS); do \
|
||||
$(MAKE) -C $$dir all || exit 1; \
|
||||
done
|
||||
ifdef LIPO
|
||||
# Lipo is an OSX thing. If it is defined, it means we are building for universal,
|
||||
# and so we have have to combine the binaries into one big binary
|
||||
|
||||
# Remove the last binary made by the last compiled target
|
||||
$(Q)rm -f $(BIN_DIR)/$(TTD)
|
||||
# Make all the binaries into one
|
||||
$(Q)$(LIPO) -create -output $(BIN_DIR)/$(TTD) $(TTDS)
|
||||
endif
|
||||
|
||||
help:
|
||||
@echo "Available make commands:"
|
||||
@echo ""
|
||||
@echo "Compilation:"
|
||||
@echo " all compile the executable and the lang files"
|
||||
@echo " lang compile the lang files only"
|
||||
@echo "Clean up:"
|
||||
@echo " clean remove the files generated during compilation"
|
||||
@echo " mrproper remove the files generated during configuration and compilation"
|
||||
@echo "Run after compilation:"
|
||||
@echo " run execute openttd after the compilation"
|
||||
@echo " run-gdb execute openttd in debug mode after the compilation"
|
||||
@echo " run-prof execute openttd in profiling mode after the compilation"
|
||||
@echo "Installation:"
|
||||
@echo " install install the compiled files and the data-files after the compilation"
|
||||
@echo " bundle create the base for an installation bundle"
|
||||
@echo " bundle_zip create the zip installation bundle"
|
||||
@echo " bundle_gzip create the gzip installation bundle"
|
||||
@echo " bundle_bzip2 create the bzip2 installation bundle"
|
||||
@echo " bundle_lha create the lha installation bundle"
|
||||
@echo " bundle_dmg create the dmg installation bundle"
|
||||
|
||||
config.pwd: $(CONFIG_CACHE_PWD)
|
||||
$(MAKE) reconfigure
|
||||
|
||||
config.cache: $(CONFIG_CACHE_SOURCE_LIST) $(CONFIGURE_FILES)
|
||||
$(MAKE) reconfigure
|
||||
|
||||
reconfigure:
|
||||
ifeq ($(shell if test -f config.cache; then echo 1; fi), 1)
|
||||
@echo "----------------"
|
||||
@echo "The system detected that source.list or any configure file is altered."
|
||||
@echo " Going to reconfigure with last known settings..."
|
||||
@echo "----------------"
|
||||
# Make sure we don't lock config.cache
|
||||
@$(shell cat config.cache | sed 's@\\ @\\\\ @g') || exit 1
|
||||
@echo "----------------"
|
||||
@echo "Reconfig done. Please re-execute make."
|
||||
@echo "----------------"
|
||||
else
|
||||
@echo "----------------"
|
||||
@echo "Have not found a configuration, please run configure first."
|
||||
@echo "----------------"
|
||||
@exit 1
|
||||
endif
|
||||
|
||||
clean:
|
||||
@for dir in $(DIRS); do \
|
||||
$(MAKE) -C $$dir clean; \
|
||||
done
|
||||
$(Q)rm -rf $(BUNDLE_TARGET)
|
||||
|
||||
lang:
|
||||
@for dir in $(LANG_DIRS); do \
|
||||
$(MAKE) -C $$dir all; \
|
||||
done
|
||||
|
||||
mrproper:
|
||||
@for dir in $(DIRS); do \
|
||||
$(MAKE) -C $$dir mrproper; \
|
||||
done
|
||||
# Don't be tempted to merge these two for loops. Doing that breaks make
|
||||
# --dry-run, since make has this "feature" that it always runs commands
|
||||
# containing $(MAKE), even when --dry-run is passed. The objective is of
|
||||
# course to also get a dry-run of submakes, but make is not smart enough
|
||||
# to see that a for loop runs both a submake and an actual command.
|
||||
@for dir in $(DIRS); do \
|
||||
rm -f $$dir/Makefile; \
|
||||
done
|
||||
$(Q)rm -rf objs
|
||||
$(Q)rm -f Makefile Makefile.am Makefile.bundle
|
||||
$(Q)rm -f media/openttd.desktop media/openttd.desktop.install
|
||||
$(Q)rm -f $(CONFIG_CACHE_SOURCE_LIST) config.cache config.pwd config.log $(CONFIG_CACHE_PWD)
|
||||
# directories for bundle generation
|
||||
$(Q)rm -rf $(BUNDLE_DIR)
|
||||
$(Q)rm -rf $(BUNDLES_DIR)
|
||||
# output of profiling
|
||||
$(Q)rm -f $(BIN_DIR)/gmon.out
|
||||
# output of generating 'API' documentation
|
||||
$(Q)rm -rf $(ROOT_DIR)/docs/source
|
||||
$(Q)rm -rf $(ROOT_DIR)/docs/aidocs
|
||||
$(Q)rm -rf $(ROOT_DIR)/docs/gamedocs
|
||||
# directories created by OpenTTD on regression testing
|
||||
$(Q)rm -rf $(BIN_DIR)/ai/regression/content_download $(BIN_DIR)/ai/regression/save $(BIN_DIR)/ai/regression/scenario
|
||||
distclean: mrproper
|
||||
|
||||
maintainer-clean: distclean
|
||||
$(Q)rm -f $(BIN_DIR)/baseset/openttd.grf $(BIN_DIR)/baseset/orig_extra.grf $(BIN_DIR)/baseset/*.obg $(BIN_DIR)/baseset/*.obs $(BIN_DIR)/baseset/*.obm
|
||||
|
||||
depend:
|
||||
@for dir in $(SRC_DIRS); do \
|
||||
$(MAKE) -C $$dir depend; \
|
||||
done
|
||||
|
||||
run: all
|
||||
$(Q)cd !!BIN_DIR!! && ./!!TTD!! $(OPENTTD_ARGS)
|
||||
|
||||
run-gdb: all
|
||||
$(Q)cd !!BIN_DIR!! && gdb --ex run --args ./!!TTD!! $(OPENTTD_ARGS)
|
||||
|
||||
run-prof: all
|
||||
$(Q)cd !!BIN_DIR!! && ./!!TTD!! $(OPENTTD_ARGS) && gprof !!TTD!! | less
|
||||
|
||||
regression: all
|
||||
$(Q)cd !!BIN_DIR!! && sh ai/regression/run.sh
|
||||
test: regression
|
||||
|
||||
%.o:
|
||||
@for dir in $(SRC_DIRS); do \
|
||||
$(MAKE) -C $$dir $(@:src/%=%); \
|
||||
done
|
||||
|
||||
%.lng:
|
||||
@for dir in $(LANG_DIRS); do \
|
||||
$(MAKE) -C $$dir $@; \
|
||||
done
|
||||
|
||||
.PHONY: test distclean mrproper clean
|
||||
|
||||
include Makefile.bundle
|
@@ -1,89 +0,0 @@
|
||||
# $Id$
|
||||
|
||||
# This file is part of OpenTTD.
|
||||
# OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
|
||||
# OpenTTD 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 OpenTTD. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
STRGEN = !!STRGEN!!
|
||||
SRC_DIR = !!SRC_DIR!!
|
||||
LANG_DIR = !!LANG_DIR!!
|
||||
BIN_DIR = !!BIN_DIR!!
|
||||
LANGS_SRC = $(shell ls $(LANG_DIR)/*.txt)
|
||||
LANGS = $(LANGS_SRC:$(LANG_DIR)/%.txt=%.lng)
|
||||
CXX_BUILD = !!CXX_BUILD!!
|
||||
CFLAGS_BUILD = !!CFLAGS_BUILD!!
|
||||
CXXFLAGS_BUILD= !!CXXFLAGS_BUILD!!
|
||||
LDFLAGS_BUILD = !!LDFLAGS_BUILD!!
|
||||
STRGEN_FLAGS = !!STRGEN_FLAGS!!
|
||||
STAGE = !!STAGE!!
|
||||
LANG_SUPPRESS = !!LANG_SUPPRESS!!
|
||||
LANG_OBJS_DIR = !!LANG_OBJS_DIR!!
|
||||
|
||||
ifeq ($(LANG_SUPPRESS), yes)
|
||||
LANG_ERRORS = >/dev/null 2>&1
|
||||
endif
|
||||
|
||||
# Check if we want to show what we are doing
|
||||
ifdef VERBOSE
|
||||
Q =
|
||||
E = @true
|
||||
else
|
||||
Q = @
|
||||
E = @echo
|
||||
endif
|
||||
|
||||
RES := $(shell mkdir -p $(BIN_DIR)/lang )
|
||||
|
||||
all: table/strings.h $(LANGS)
|
||||
|
||||
strgen_base.o: $(SRC_DIR)/strgen/strgen_base.cpp $(SRC_DIR)/strgen/strgen.h $(SRC_DIR)/table/control_codes.h $(SRC_DIR)/table/strgen_tables.h $(SRC_DIR)/safeguards.h
|
||||
$(E) '$(STAGE) Compiling $(<:$(SRC_DIR)/%.cpp=%.cpp)'
|
||||
$(Q)$(CXX_BUILD) $(CFLAGS_BUILD) $(CXXFLAGS_BUILD) -DSTRGEN -c -o $@ $<
|
||||
|
||||
strgen.o: $(SRC_DIR)/strgen/strgen.cpp $(SRC_DIR)/strgen/strgen.h $(SRC_DIR)/table/control_codes.h $(SRC_DIR)/table/strgen_tables.h $(SRC_DIR)/safeguards.h
|
||||
$(E) '$(STAGE) Compiling $(<:$(SRC_DIR)/%.cpp=%.cpp)'
|
||||
$(Q)$(CXX_BUILD) $(CFLAGS_BUILD) $(CXXFLAGS_BUILD) -DSTRGEN -c -o $@ $<
|
||||
|
||||
string.o: $(SRC_DIR)/string.cpp $(SRC_DIR)/safeguards.h
|
||||
$(E) '$(STAGE) Compiling $(<:$(SRC_DIR)/%.cpp=%.cpp)'
|
||||
$(Q)$(CXX_BUILD) $(CFLAGS_BUILD) $(CXXFLAGS_BUILD) -DSTRGEN -c -o $@ $<
|
||||
|
||||
alloc_func.o: $(SRC_DIR)/core/alloc_func.cpp $(SRC_DIR)/safeguards.h
|
||||
$(E) '$(STAGE) Compiling $(<:$(SRC_DIR)/%.cpp=%.cpp)'
|
||||
$(Q)$(CXX_BUILD) $(CFLAGS_BUILD) $(CXXFLAGS_BUILD) -DSTRGEN -c -o $@ $<
|
||||
|
||||
getoptdata.o: $(SRC_DIR)/misc/getoptdata.cpp $(SRC_DIR)/misc/getoptdata.h $(SRC_DIR)/safeguards.h
|
||||
$(E) '$(STAGE) Compiling $(<:$(SRC_DIR)/misc/%.cpp=%.cpp)'
|
||||
$(Q)$(CXX_BUILD) $(CFLAGS_BUILD) $(CXXFLAGS_BUILD) -DSTRGEN -c -o $@ $<
|
||||
|
||||
lang/english.txt: $(LANG_DIR)/english.txt
|
||||
$(Q)mkdir -p lang
|
||||
$(Q)cp $(LANG_DIR)/english.txt lang/english.txt
|
||||
|
||||
$(STRGEN): alloc_func.o string.o strgen_base.o strgen.o getoptdata.o
|
||||
$(E) '$(STAGE) Compiling and Linking $@'
|
||||
$(Q)$(CXX_BUILD) $(CFLAGS_BUILD) $(CXXFLAGS_BUILD) $(LDFLAGS_BUILD) $^ -o $@
|
||||
|
||||
table/strings.h: lang/english.txt $(STRGEN)
|
||||
$(E) '$(STAGE) Generating $@'
|
||||
@mkdir -p table
|
||||
$(Q)./$(STRGEN) -s $(LANG_DIR) -d table
|
||||
|
||||
$(LANGS): %.lng: $(LANG_DIR)/%.txt $(STRGEN) lang/english.txt
|
||||
$(E) '$(STAGE) Compiling language $(*F)'
|
||||
$(Q)./$(STRGEN) $(STRGEN_FLAGS) -s $(LANG_DIR) -d $(LANG_OBJS_DIR) $< $(LANG_ERRORS) && cp $@ $(BIN_DIR)/lang || true # Do not fail all languages when one fails
|
||||
|
||||
depend:
|
||||
|
||||
clean:
|
||||
$(E) '$(STAGE) Cleaning up language files'
|
||||
$(Q)rm -f strgen_base.o strgen.o string.o alloc_func.o getoptdata.o table/strings.h $(STRGEN) $(LANGS) $(LANGS:%=$(BIN_DIR)/lang/%) lang/english.*
|
||||
|
||||
mrproper: clean
|
||||
$(Q)rm -rf $(BIN_DIR)/lang
|
||||
|
||||
%.lng:
|
||||
@echo '$(STAGE) No such language: $(@:%.lng=%)'
|
||||
|
||||
.PHONY: all mrproper depend clean
|
@@ -1,47 +0,0 @@
|
||||
# $Id$
|
||||
|
||||
# This file is part of OpenTTD.
|
||||
# OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
|
||||
# OpenTTD 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 OpenTTD. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
#
|
||||
# Makefile for creating bundles of MSVC's binaries in the same way as we make
|
||||
# the zip bundles for ALL other OSes.
|
||||
#
|
||||
# Usage: make -f Makefile.msvc PLATFORM=[Win32|x64] BUNDLE_NAME=openttd-<version>-win[32|64]
|
||||
# or make -f Makefile.msvc PLATFORM=[Win32|x64] BUNDLE_NAME=OTTD-win[32|64]-nightly-<revision>
|
||||
#
|
||||
|
||||
# Check if we want to show what we are doing
|
||||
ifdef VERBOSE
|
||||
Q =
|
||||
else
|
||||
Q = @
|
||||
endif
|
||||
|
||||
AWK = "awk"
|
||||
ROOT_DIR := $(shell pwd)
|
||||
BIN_DIR = "$(ROOT_DIR)/bin"
|
||||
SRC_DIR = "$(ROOT_DIR)/src"
|
||||
BUNDLE_DIR = "$(ROOT_DIR)/bundle"
|
||||
BUNDLES_DIR = "$(ROOT_DIR)/bundles"
|
||||
TTD = openttd.exe
|
||||
PDB = openttd.pdb
|
||||
MODE = Release
|
||||
TARGET := $(shell echo $(PLATFORM) | sed "s@win64@x64@;s@win32@Win32@")
|
||||
|
||||
all:
|
||||
$(Q)cp objs/$(TARGET)/$(MODE)/$(TTD) $(BIN_DIR)/$(TTD)
|
||||
|
||||
include Makefile.bundle.in
|
||||
|
||||
bundle_pdb:
|
||||
@echo '[BUNDLE] Creating $(BUNDLE_NAME).pdb.xz'
|
||||
$(Q)mkdir -p "$(BUNDLES_DIR)"
|
||||
$(Q)cp objs/$(TARGET)/Release/$(PDB) $(BUNDLES_DIR)/$(BUNDLE_NAME).pdb
|
||||
$(Q)xz -9 $(BUNDLES_DIR)/$(BUNDLE_NAME).pdb
|
||||
|
||||
regression: all
|
||||
$(Q)cp bin/$(TTD) bin/openttd
|
||||
$(Q)cd bin && sh ai/regression/run.sh
|
@@ -1,65 +0,0 @@
|
||||
# $Id$
|
||||
|
||||
# This file is part of OpenTTD.
|
||||
# OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
|
||||
# OpenTTD 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 OpenTTD. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
SETTINGSGEN = !!SETTINGSGEN!!
|
||||
SRC_DIR = !!SRC_DIR!!
|
||||
CXX_BUILD = !!CXX_BUILD!!
|
||||
CFLAGS_BUILD = !!CFLAGS_BUILD!!
|
||||
CXXFLAGS_BUILD = !!CXXFLAGS_BUILD!!
|
||||
LDFLAGS_BUILD = !!LDFLAGS_BUILD!!
|
||||
STAGE = !!STAGE!!
|
||||
SETTING_OBJS_DIR = !!SETTING_OBJS_DIR!!
|
||||
|
||||
# Check if we want to show what we are doing
|
||||
ifdef VERBOSE
|
||||
Q =
|
||||
E = @true
|
||||
else
|
||||
Q = @
|
||||
E = @echo
|
||||
endif
|
||||
|
||||
all: table/settings.h
|
||||
|
||||
settingsgen.o: $(SRC_DIR)/settingsgen/settingsgen.cpp $(SRC_DIR)/string_func.h $(SRC_DIR)/strings_type.h $(SRC_DIR)/misc/getoptdata.h $(SRC_DIR)/ini_type.h $(SRC_DIR)/core/smallvec_type.hpp $(SRC_DIR)/safeguards.h
|
||||
$(E) '$(STAGE) Compiling $(<:$(SRC_DIR)/%.cpp=%.cpp)'
|
||||
$(Q)$(CXX_BUILD) $(CFLAGS_BUILD) $(CXXFLAGS_BUILD) -DSETTINGSGEN -c -o $@ $<
|
||||
|
||||
alloc_func.o: $(SRC_DIR)/core/alloc_func.cpp $(SRC_DIR)/safeguards.h
|
||||
$(E) '$(STAGE) Compiling $(<:$(SRC_DIR)/%.cpp=%.cpp)'
|
||||
$(Q)$(CXX_BUILD) $(CFLAGS_BUILD) $(CXXFLAGS_BUILD) -DSETTINGSGEN -c -o $@ $<
|
||||
|
||||
getoptdata.o: $(SRC_DIR)/misc/getoptdata.cpp $(SRC_DIR)/misc/getoptdata.h $(SRC_DIR)/safeguards.h
|
||||
$(E) '$(STAGE) Compiling $(<:$(SRC_DIR)/misc/%.cpp=%.cpp)'
|
||||
$(Q)$(CXX_BUILD) $(CFLAGS_BUILD) $(CXXFLAGS_BUILD) -DSETTINGSGEN -c -o $@ $<
|
||||
|
||||
string.o: $(SRC_DIR)/string.cpp $(SRC_DIR)/safeguards.h
|
||||
$(E) '$(STAGE) Compiling $(<:$(SRC_DIR)/%.cpp=%.cpp)'
|
||||
$(Q)$(CXX_BUILD) $(CFLAGS_BUILD) $(CXXFLAGS_BUILD) -DSETTINGSGEN -c -o $@ $<
|
||||
|
||||
ini_load.o: $(SRC_DIR)/ini_load.cpp $(SRC_DIR)/core/alloc_func.hpp $(SRC_DIR)/core/mem_func.hpp $(SRC_DIR)/ini_type.h $(SRC_DIR)/string_func.h $(SRC_DIR)/safeguards.h
|
||||
$(E) '$(STAGE) Compiling $(<:$(SRC_DIR)/%.cpp=%.cpp)'
|
||||
$(Q)$(CXX_BUILD) $(CFLAGS_BUILD) $(CXXFLAGS_BUILD) -DSETTINGSGEN -c -o $@ $<
|
||||
|
||||
$(SETTINGSGEN): alloc_func.o string.o ini_load.o settingsgen.o getoptdata.o
|
||||
$(E) '$(STAGE) Compiling and Linking $@'
|
||||
$(Q)$(CXX_BUILD) $(CFLAGS_BUILD) $(CXXFLAGS_BUILD) $(LDFLAGS_BUILD) $^ -o $@
|
||||
|
||||
table/settings.h: $(SETTINGSGEN) $(SRC_DIR)/table/settings.h.preamble $(SRC_DIR)/table/settings.h.postamble $(SRC_DIR)/table/*.ini
|
||||
$(E) '$(STAGE) Generating $@'
|
||||
@mkdir -p table
|
||||
$(Q)./$(SETTINGSGEN) -o table/settings.h -b $(SRC_DIR)/table/settings.h.preamble -a $(SRC_DIR)/table/settings.h.postamble $(SRC_DIR)/table/*.ini
|
||||
|
||||
depend:
|
||||
|
||||
clean:
|
||||
$(E) '$(STAGE) Cleaning up settings files'
|
||||
$(Q)rm -f settingsgen.o alloc_func.o getoptdata.o string.o ini_load.o $(SETTINGSGEN) table/settings.h
|
||||
|
||||
mrproper: clean
|
||||
|
||||
.PHONY: all mrproper depend clean
|
298
Makefile.src.in
298
Makefile.src.in
@@ -1,298 +0,0 @@
|
||||
# $Id$
|
||||
|
||||
# This file is part of OpenTTD.
|
||||
# OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
|
||||
# OpenTTD 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 OpenTTD. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
CC_HOST = !!CC_HOST!!
|
||||
CXX_HOST = !!CXX_HOST!!
|
||||
CC_BUILD = !!CC_BUILD!!
|
||||
CXX_BUILD = !!CXX_BUILD!!
|
||||
WINDRES = !!WINDRES!!
|
||||
STRIP = !!STRIP!!
|
||||
CFLAGS = !!CFLAGS!!
|
||||
CFLAGS_BUILD = !!CFLAGS_BUILD!!
|
||||
CXXFLAGS = !!CXXFLAGS!!
|
||||
CXXFLAGS_BUILD = !!CXXFLAGS_BUILD!!
|
||||
LIBS = !!LIBS!!
|
||||
LDFLAGS = !!LDFLAGS!!
|
||||
LDFLAGS_BUILD = !!LDFLAGS_BUILD!!
|
||||
ROOT_DIR = !!ROOT_DIR!!
|
||||
BIN_DIR = !!BIN_DIR!!
|
||||
LANG_DIR = !!LANG_DIR!!
|
||||
SRC_OBJS_DIR = !!SRC_OBJS_DIR!!
|
||||
LANG_OBJS_DIR = !!LANG_OBJS_DIR!!
|
||||
SETTING_OBJS_DIR= !!SETTING_OBJS_DIR!!
|
||||
SRC_DIR = !!SRC_DIR!!
|
||||
SCRIPT_SRC_DIR = !!SCRIPT_SRC_DIR!!
|
||||
MEDIA_DIR = !!MEDIA_DIR!!
|
||||
TTD = !!TTD!!
|
||||
STRGEN = !!STRGEN!!
|
||||
DEPEND = !!DEPEND!!
|
||||
OS = !!OS!!
|
||||
STAGE = !!STAGE!!
|
||||
MAKEDEPEND = !!MAKEDEPEND!!
|
||||
CFLAGS_MAKEDEP = !!CFLAGS_MAKEDEP!!
|
||||
SORT = !!SORT!!
|
||||
AWK = !!AWK!!
|
||||
CONFIG_CACHE_COMPILER = $(SRC_OBJS_DIR)/!!CONFIG_CACHE_COMPILER!!
|
||||
CONFIG_CACHE_LINKER = $(SRC_OBJS_DIR)/!!CONFIG_CACHE_LINKER!!
|
||||
CONFIG_CACHE_SOURCE = $(SRC_OBJS_DIR)/!!CONFIG_CACHE_SOURCE!!
|
||||
CONFIG_CACHE_VERSION = $(SRC_OBJS_DIR)/!!CONFIG_CACHE_VERSION!!
|
||||
|
||||
OBJS_C := !!OBJS_C!!
|
||||
OBJS_CPP := !!OBJS_CPP!!
|
||||
OBJS_MM := !!OBJS_MM!!
|
||||
OBJS_RC := !!OBJS_RC!!
|
||||
OBJS := $(OBJS_C) $(OBJS_CPP) $(OBJS_MM) $(OBJS_RC)
|
||||
SRCS := !!SRCS!!
|
||||
|
||||
# All C-files depend on those 3 files
|
||||
FILE_DEP := $(CONFIG_CACHE_COMPILER)
|
||||
# Create all dirs and subdirs
|
||||
RES := $(shell mkdir -p $(BIN_DIR) $(sort $(dir $(OBJS))))
|
||||
|
||||
CFLAGS += -I $(SRC_OBJS_DIR) -I $(LANG_OBJS_DIR) -I $(SETTING_OBJS_DIR)
|
||||
CFLAGS_MAKEDEP += -I $(SRC_OBJS_DIR) -I $(LANG_OBJS_DIR) -I $(SETTING_OBJS_DIR)
|
||||
ifdef SCRIPT_SRC_DIR
|
||||
CFLAGS_MAKEDEP += -I $(SCRIPT_SRC_DIR)
|
||||
endif
|
||||
|
||||
# Check if we want to show what we are doing
|
||||
ifdef VERBOSE
|
||||
Q =
|
||||
E = @true
|
||||
else
|
||||
Q = @
|
||||
E = @echo
|
||||
endif
|
||||
|
||||
# Our default target
|
||||
all: $(BIN_DIR)/$(TTD)
|
||||
|
||||
# This are 2 rules that are pointing back to STRGEN stuff.
|
||||
# There is not really a need to have them here, but in case
|
||||
# some weirdo wants to run 'make' in the 'src' dir and expects
|
||||
# the languages to be recompiled, this catches that case and
|
||||
# takes care of it nicely.
|
||||
$(LANG_OBJS_DIR)/$(STRGEN):
|
||||
$(MAKE) -C $(LANG_OBJS_DIR) $(STRGEN)
|
||||
|
||||
$(LANG_OBJS_DIR)/table/strings.h: $(LANG_DIR)/english.txt $(LANG_OBJS_DIR)/$(STRGEN)
|
||||
$(MAKE) -C $(LANG_OBJS_DIR) table/strings.h
|
||||
|
||||
# Always run version detection, so we always have an accurate modified
|
||||
# flag
|
||||
VERSIONS := $(shell AWK="$(AWK)" "$(ROOT_DIR)/findversion.sh")
|
||||
MODIFIED := $(shell echo "$(VERSIONS)" | cut -f 3 -d' ')
|
||||
|
||||
# Use autodetected revisions
|
||||
VERSION := $(shell echo "$(VERSIONS)" | cut -f 1 -d' ')
|
||||
ISODATE := $(shell echo "$(VERSIONS)" | cut -f 2 -d' ')
|
||||
GITHASH := $(shell echo "$(VERSIONS)" | cut -f 3 -d' ')
|
||||
|
||||
# Make sure we have something in VERSION and ISODATE
|
||||
ifeq ($(VERSION),)
|
||||
VERSION := norev000
|
||||
endif
|
||||
ifeq ($(ISODATE),)
|
||||
ISODATE := 00000000
|
||||
endif
|
||||
|
||||
# This helps to recompile if flags change
|
||||
RES := $(shell if [ "`cat $(CONFIG_CACHE_COMPILER) 2>/dev/null`" != "$(CFLAGS) $(CXXFLAGS)" ]; then echo "$(CFLAGS) $(CXXFLAGS)" > $(CONFIG_CACHE_COMPILER); fi )
|
||||
RES := $(shell if [ "`cat $(CONFIG_CACHE_LINKER) 2>/dev/null`" != "$(LDFLAGS) $(LIBS)" ]; then echo "$(LDFLAGS) $(LIBS)" > $(CONFIG_CACHE_LINKER); fi )
|
||||
|
||||
# If there is a change in the source-file-list, make sure we recheck the deps
|
||||
RES := $(shell if [ "`cat $(CONFIG_CACHE_SOURCE) 2>/dev/null`" != "$(SRCS)" ]; then echo "$(SRCS)" > $(CONFIG_CACHE_SOURCE); fi )
|
||||
# If there is a change in the revision, make sure we recompile rev.cpp
|
||||
RES := $(shell if [ "`cat $(CONFIG_CACHE_VERSION) 2>/dev/null`" != "$(VERSION) $(MODIFIED)" ]; then echo "$(VERSION) $(MODIFIED)" > $(CONFIG_CACHE_VERSION); fi )
|
||||
|
||||
ifndef MAKEDEPEND
|
||||
# The slow, but always correct, dep-check
|
||||
DEP_MASK := %.d
|
||||
DEPS := $(OBJS:%.o=%.d)
|
||||
|
||||
# Only include the deps if we are compiling everything
|
||||
ifeq ($(filter %.o clean mrproper, $(MAKECMDGOALS)),)
|
||||
-include $(DEPS)
|
||||
else
|
||||
# In case we want to compile a single target, include the .d file for it
|
||||
ifneq ($(filter %.o, $(MAKECMDGOALS)),)
|
||||
SINGLE_DEP := $(filter %.o, $(MAKECMDGOALS))
|
||||
-include $(SINGLE_DEP:%.o=%.d)
|
||||
endif
|
||||
endif
|
||||
|
||||
# Find the deps via GCC. Rarely wrong, but a bit slow
|
||||
|
||||
$(OBJS_C:%.o=%.d): %.d: $(SRC_DIR)/%.c $(FILE_DEP)
|
||||
$(E) '$(STAGE) DEP $(<:$(SRC_DIR)/%.c=%.c)'
|
||||
$(Q)$(CC_HOST) $(CFLAGS) -MM $< | sed 's@^$(@F:%.d=%.o):@$@ $(@:%.d=%.o):@' > $@
|
||||
|
||||
$(OBJS_CPP:%.o=%.d): %.d: $(SRC_DIR)/%.cpp $(FILE_DEP)
|
||||
$(E) '$(STAGE) DEP $(<:$(SRC_DIR)/%.cpp=%.cpp)'
|
||||
$(Q)$(CXX_HOST) $(CFLAGS) $(CXXFLAGS) -MM $< | sed 's@^$(@F:%.d=%.o):@$@ $(@:%.d=%.o):@' > $@
|
||||
|
||||
$(OBJS_MM:%.o=%.d): %.d: $(SRC_DIR)/%.mm $(FILE_DEP)
|
||||
$(E) '$(STAGE) DEP $(<:$(SRC_DIR)/%.mm=%.mm)'
|
||||
$(Q)$(CC_HOST) $(CFLAGS) -MM $< | sed 's@^$(@F:%.d=%.o):@$@ $(@:%.d=%.o):@' > $@
|
||||
|
||||
$(OBJS_RC:%.o=%.d): %.d: $(SRC_DIR)/%.rc $(FILE_DEP)
|
||||
$(E) '$(STAGE) DEP $(<:$(SRC_DIR)/%.rc=%.rc)'
|
||||
$(Q)touch $@
|
||||
|
||||
else
|
||||
# The much faster, but can be wrong, dep-check
|
||||
DEP_MASK :=
|
||||
DEPS := Makefile.dep
|
||||
|
||||
# Only include the deps if we are not cleaning
|
||||
ifeq ($(filter depend clean mrproper, $(MAKECMDGOALS)),)
|
||||
-include Makefile.dep
|
||||
endif
|
||||
|
||||
ifeq ("$(SRC_OBJS_DIR)/$(DEPEND)","$(MAKEDEPEND)")
|
||||
DEP := $(MAKEDEPEND)
|
||||
$(SRC_OBJS_DIR)/$(DEPEND): $(SRC_DIR)/depend/depend.cpp
|
||||
$(E) '$(STAGE) Compiling and linking $(DEPEND)'
|
||||
$(Q)$(CXX_BUILD) $(CFLAGS_BUILD) $(CXXFLAGS_BUILD) $(LDFLAGS_BUILD) -o $@ $<
|
||||
endif
|
||||
|
||||
# Macro for invoking a command on groups of 100 words at a time
|
||||
# (analogous to xargs(1)). The macro invokes itself recursively
|
||||
# until the list of words is depleted.
|
||||
#
|
||||
# Usage: $(call xargs,COMMAND,LIST)
|
||||
#
|
||||
# COMMAND should be a shell command to which the words will be
|
||||
# appended as arguments in groups of 100.
|
||||
define xargs
|
||||
$(1) $(wordlist 1,100,$(2))
|
||||
$(if $(word 101,$(2)),$(call xargs,$(1),$(wordlist 101,$(words $(2)),$(2))))
|
||||
endef
|
||||
|
||||
# Make sure that only 'make depend' ALWAYS triggers a recheck
|
||||
ifeq ($(filter depend, $(MAKECMDGOALS)),)
|
||||
Makefile.dep: $(FILE_DEP) $(SRCS:%=$(SRC_DIR)/%) $(CONFIG_CACHE_SOURCE) $(DEP)
|
||||
else
|
||||
Makefile.dep: $(FILE_DEP) $(SRCS:%=$(SRC_DIR)/%) $(DEP) FORCE
|
||||
endif
|
||||
$(E) '$(STAGE) DEP CHECK (all files)'
|
||||
$(Q)rm -f Makefile.dep.tmp
|
||||
$(Q)touch Makefile.dep.tmp
|
||||
|
||||
# Calculate the deps via makedepend
|
||||
$(call xargs,$(Q)$(MAKEDEPEND) -f$(SRC_OBJS_DIR)/Makefile.dep.tmp -o.o -Y -v -a -- $(CFLAGS_MAKEDEP) -- 2>/dev/null,$(SRCS:%=$(SRC_DIR)/%))
|
||||
|
||||
# Remove all comments and includes that don't start with $(SRC_DIR)
|
||||
# Remove $(SRC_DIR) from object-file-name
|
||||
@$(AWK) ' \
|
||||
/^# DO NOT/ { print $$0 ; next} \
|
||||
/^#/ {next} \
|
||||
/: / { \
|
||||
left = NF - 1; \
|
||||
for (n = 2; n <= NF; n++) { \
|
||||
if (match($$n, "^$(ROOT_DIR)") == 0) { \
|
||||
$$n = ""; \
|
||||
left--; \
|
||||
} \
|
||||
} \
|
||||
gsub("$(SRC_DIR)/", "", $$1); \
|
||||
if (left > 0) { \
|
||||
print $$0; \
|
||||
$$1 = "Makefile.dep:"; \
|
||||
print $$0; \
|
||||
} \
|
||||
next \
|
||||
} \
|
||||
{ \
|
||||
print $$0 \
|
||||
} \
|
||||
' < Makefile.dep.tmp | sed 's@ *@ @g;s@ $$@@' | LC_ALL=C $(SORT) > Makefile.dep
|
||||
|
||||
$(Q)rm -f Makefile.dep.tmp Makefile.dep.tmp.bak
|
||||
|
||||
endif
|
||||
|
||||
# Avoid problems with deps if a .h/.hpp/.hpp.sq file is deleted without the deps
|
||||
# being updated. Now the Makefile continues, the deps are recreated
|
||||
# and all will be fine.
|
||||
%.h %.hpp %.hpp.sq:
|
||||
@true
|
||||
|
||||
|
||||
# Compile all the files according to the targets
|
||||
|
||||
$(OBJS_C): %.o: $(SRC_DIR)/%.c $(DEP_MASK) $(FILE_DEP)
|
||||
$(E) '$(STAGE) Compiling $(<:$(SRC_DIR)/%.c=%.c)'
|
||||
$(Q)$(CC_HOST) $(CFLAGS) -c -o $@ $<
|
||||
|
||||
$(filter-out %sse2.o, $(filter-out %ssse3.o, $(filter-out %sse4.o, $(OBJS_CPP)))): %.o: $(SRC_DIR)/%.cpp $(DEP_MASK) $(FILE_DEP)
|
||||
$(E) '$(STAGE) Compiling $(<:$(SRC_DIR)/%.cpp=%.cpp)'
|
||||
$(Q)$(CXX_HOST) $(CFLAGS) $(CXXFLAGS) -c -o $@ $<
|
||||
|
||||
$(filter %sse2.o, $(OBJS_CPP)): %.o: $(SRC_DIR)/%.cpp $(DEP_MASK) $(FILE_DEP)
|
||||
$(E) '$(STAGE) Compiling $(<:$(SRC_DIR)/%.cpp=%.cpp)'
|
||||
$(Q)$(CXX_HOST) $(CFLAGS) $(CXXFLAGS) -c -msse2 -o $@ $<
|
||||
|
||||
$(filter %ssse3.o, $(OBJS_CPP)): %.o: $(SRC_DIR)/%.cpp $(DEP_MASK) $(FILE_DEP)
|
||||
$(E) '$(STAGE) Compiling $(<:$(SRC_DIR)/%.cpp=%.cpp)'
|
||||
$(Q)$(CXX_HOST) $(CFLAGS) $(CXXFLAGS) -c -mssse3 -o $@ $<
|
||||
|
||||
$(filter %sse4.o, $(OBJS_CPP)): %.o: $(SRC_DIR)/%.cpp $(DEP_MASK) $(FILE_DEP)
|
||||
$(E) '$(STAGE) Compiling $(<:$(SRC_DIR)/%.cpp=%.cpp)'
|
||||
$(Q)$(CXX_HOST) $(CFLAGS) $(CXXFLAGS) -c -msse4.1 -o $@ $<
|
||||
|
||||
$(OBJS_MM): %.o: $(SRC_DIR)/%.mm $(DEP_MASK) $(FILE_DEP)
|
||||
$(E) '$(STAGE) Compiling $(<:$(SRC_DIR)/%.mm=%.mm)'
|
||||
$(Q)$(CC_HOST) $(CFLAGS) -c -o $@ $<
|
||||
|
||||
$(OBJS_RC): %.o: $(SRC_DIR)/%.rc $(FILE_DEP)
|
||||
$(E) '$(STAGE) Compiling resource $(<:$(SRC_DIR)/%.rc=%.rc)'
|
||||
$(Q)$(WINDRES) -o $@ $<
|
||||
|
||||
$(BIN_DIR)/$(TTD): $(TTD)
|
||||
$(Q)cp $(TTD) $(BIN_DIR)/$(TTD)
|
||||
ifeq ($(OS), UNIX)
|
||||
$(Q)cp $(MEDIA_DIR)/openttd.32.bmp $(BIN_DIR)/baseset/
|
||||
endif
|
||||
ifeq ($(OS), OSX)
|
||||
$(Q)cp $(ROOT_DIR)/os/macosx/splash.png $(BIN_DIR)/baseset/
|
||||
endif
|
||||
|
||||
$(TTD): $(OBJS) $(CONFIG_CACHE_LINKER)
|
||||
$(E) '$(STAGE) Linking $@'
|
||||
$(Q)+$(CXX_HOST) $(LDFLAGS) $(OBJS) $(LIBS) -o $@
|
||||
ifdef STRIP
|
||||
$(Q)$(STRIP) $@
|
||||
endif
|
||||
ifeq ($(OS), DOS)
|
||||
$(E) '$(STAGE) Adding CWSDPMI stub to $@'
|
||||
$(Q)$(ROOT_DIR)/os/dos/make_dos_binary_selfcontained.sh $(SRC_OBJS_DIR)/$@
|
||||
endif
|
||||
|
||||
# Revision files
|
||||
|
||||
$(SRC_DIR)/rev.cpp: $(CONFIG_CACHE_VERSION) $(SRC_DIR)/rev.cpp.in
|
||||
$(Q)cat $(SRC_DIR)/rev.cpp.in | sed "s@\!\!ISODATE\!\!@$(ISODATE)@g;s@!!VERSION!!@$(VERSION)@g;s@!!MODIFIED!!@$(MODIFIED)@g;s@!!DATE!!@`date +%d.%m.%y`@g;s@!!GITHASH!!@$(GITHASH)@g" > $(SRC_DIR)/rev.cpp
|
||||
|
||||
$(SRC_DIR)/os/windows/ottdres.rc: $(CONFIG_CACHE_VERSION) $(SRC_DIR)/os/windows/ottdres.rc.in
|
||||
$(Q)cat $(SRC_DIR)/os/windows/ottdres.rc.in | sed "s@\!\!ISODATE\!\!@$(ISODATE)@g;s@!!VERSION!!@$(VERSION)@g;s@!!DATE!!@`date +%d.%m.%y`@g;s@!!GITHASH!!@$(GITHASH)@g" > $(SRC_DIR)/os/windows/ottdres.rc
|
||||
|
||||
FORCE:
|
||||
|
||||
depend: $(DEPS)
|
||||
|
||||
clean:
|
||||
$(E) '$(STAGE) Cleaning up object files'
|
||||
$(Q)rm -f $(DEPS) $(OBJS) $(TTD) $(DEPEND) $(TTD:%=$(BIN_DIR)/%) $(BIN_DIR)/baseset/openttd.32.bmp $(CONFIG_CACHE_COMPILER) $(CONFIG_CACHE_LINKER) $(CONFIG_CACHE_SOURCE)
|
||||
|
||||
mrproper: clean
|
||||
$(Q)rm -f $(SRC_DIR)/rev.cpp $(SRC_DIR)/os/windows/ottdres.rc
|
||||
|
||||
%.o:
|
||||
@echo '$(STAGE) No such source-file: $(@:%.o=%).[c|cpp|mm|rc]'
|
||||
|
||||
.PHONY: all mrproper depend clean FORCE
|
882
README.md
882
README.md
@@ -3,228 +3,94 @@
|
||||
## Table of contents
|
||||
|
||||
- 1.0) [About](#10-about)
|
||||
- 2.0) [Contacting](#20-contacting)
|
||||
- 2.1) [Reporting bugs](#21-reporting-bugs)
|
||||
- 2.2) [Reporting desyncs](#22-reporting-desyncs)
|
||||
- 3.0) [Supported platforms](#30-supported-platforms)
|
||||
- 4.0) [Installing and running OpenTTD](#40-installing-and-running-openttd)
|
||||
- 4.1) [(Required) 3rd party files](#41-required-3rd-party-files)
|
||||
- 4.2) [OpenTTD directories](#42-openttd-directories)
|
||||
- 4.3) [Portable installations (portable media)](#43-portable-installations-portable-media)
|
||||
- 4.4) [Files in tar (archives)](#44-files-in-tar-archives)
|
||||
- 5.0) [OpenTTD features](#50-openttd-features)
|
||||
- 5.1) [Logging of potentially dangerous actions](#51-logging-of-potentially-dangerous-actions)
|
||||
- 5.2) [Frame rate and performance metrics](#52-frame-rate-and-performance-metrics)
|
||||
- 6.0) [Configuration file](#60-configuration-file)
|
||||
- 7.0) [Compiling](#70-compiling)
|
||||
- 7.1) [Required/optional libraries](#71-requiredoptional-libraries)
|
||||
- 7.2) [Supported compilers](#72-supported-compilers)
|
||||
- 7.3) [Compilation of base sets](#73-compilation-of-base-sets)
|
||||
- 8.0) [Translating](#80-translating)
|
||||
- 8.1) [Translation](#81-translation)
|
||||
- 8.2) [Previewing](#82-previewing)
|
||||
- 9.0) [Troubleshooting](#90-troubleshooting)
|
||||
- 10.0) [Licensing](#100-licensing)
|
||||
- X.X) [Credits](#xx-credits)
|
||||
- 1.1) [Downloading OpenTTD](#11-downloading-openttd)
|
||||
- 1.2) [OpenTTD gameplay manual](#12-openttd-gameplay-manual)
|
||||
- 1.3) [Supported platforms](#13-supported-platforms)
|
||||
- 1.4) [Installing and running OpenTTD](#14-installing-and-running-openttd)
|
||||
- 1.5) [Add-on content / mods](#15-add-on-content--mods)
|
||||
- 1.6) [OpenTTD directories](#16-openttd-directories)
|
||||
- 1.7) [Compiling OpenTTD](#17-compiling-openttd)
|
||||
- 2.0) [Contact and community](#20-contact-and-community)
|
||||
- 2.1) [Contributing to OpenTTD](#21-contributing-to-openttd)
|
||||
- 2.2) [Reporting bugs](#22-reporting-bugs)
|
||||
- 2.3) [Translating](#23-translating)
|
||||
- 3.0) [Licensing](#30-licensing)
|
||||
- 4.0) [Credits](#40-credits)
|
||||
|
||||
## 1.0) About
|
||||
|
||||
OpenTTD is a transport simulation game based upon the popular game Transport
|
||||
Tycoon Deluxe, written by Chris Sawyer. It attempts to mimic the original
|
||||
game as closely as possible while extending it with new features.
|
||||
OpenTTD is a transport simulation game based upon the popular game Transport Tycoon Deluxe, written by Chris Sawyer.
|
||||
It attempts to mimic the original game as closely as possible while extending it with new features.
|
||||
|
||||
OpenTTD is licensed under the GNU General Public License version 2.0,
|
||||
but includes some 3rd party software under different licenses. See the
|
||||
section "Licensing" below for details.
|
||||
OpenTTD is licensed under the GNU General Public License version 2.0, but includes some 3rd party software under different licenses.
|
||||
See the section ["Licensing"](#30-licensing) below for details.
|
||||
|
||||
## 2.0) Contacting
|
||||
## 1.1) Downloading OpenTTD
|
||||
|
||||
The easiest way to contact the OpenTTD team is by submitting bug reports or
|
||||
posting comments in our forums. You can also chat with us on IRC (#openttd
|
||||
on irc.oftc.net).
|
||||
OpenTTD can be downloaded from the [official OpenTTD website](https://www.openttd.org/).
|
||||
|
||||
The OpenTTD homepage is https://www.openttd.org.
|
||||
Both 'stable' and 'nightly' versions are available for download:
|
||||
|
||||
You can also find the OpenTTD forums at
|
||||
[https://www.tt-forums.net](https://www.tt-forums.net/viewforum.php?f=55).
|
||||
- most people should choose the 'stable' version, as this has been more extensively tested
|
||||
- the 'nightly' version includes the latest changes and features, but may sometimes be less reliable
|
||||
|
||||
### 2.1) Reporting bugs
|
||||
On some platforms OpenTTD will also be available via your OS package manager or a similar service.
|
||||
|
||||
First of all, check whether the bug is not already known. Do this by looking
|
||||
through the file called 'known-bugs.txt' which is distributed with OpenTTD
|
||||
like this readme.
|
||||
|
||||
For tracking our bugs we are using GitHub's issue tracker. You can find
|
||||
the tracker at https://github.com/OpenTTD/OpenTTD/issues. Before actually
|
||||
reporting take a look through the already reported bugs there to see if
|
||||
the bug is already known. The 'known-bugs.txt' file might be a bit outdated
|
||||
at the moment you are reading it as only bugs known before the release
|
||||
are documented there. Also look through the recently closed bugs.
|
||||
## 1.2) OpenTTD gameplay manual
|
||||
|
||||
When you are sure it is not already reported you should:
|
||||
OpenTTD has a [community-maintained wiki](https://wiki.openttd.org/), including a gameplay manual and tips.
|
||||
|
||||
- Make sure you are running a recent version, i.e. run the latest stable or
|
||||
nightly based on where you found the bug.
|
||||
- Make sure you are not running a non-official binary, like a patch pack.
|
||||
When you are playing with a patch pack you should report any bugs to the
|
||||
forum thread related to that patch pack.
|
||||
- Make it reproducible for the developers. In other words, create a savegame
|
||||
in which you can reproduce the issue once loaded. It is very useful to give
|
||||
us the crash.dmp, crash.sav, crash.log and crash screenshot which are
|
||||
created on crashes.
|
||||
- Check whether the bug is already reported on our bug tracker. This includes
|
||||
searching for recently closed bug reports as the bug might already be fixed.
|
||||
|
||||
After you have done all that you can report the bug. Please include the
|
||||
following information in your bug report:
|
||||
## 1.3) Supported platforms
|
||||
|
||||
- OpenTTD version (PLEASE test the latest Git revision/nightly build)
|
||||
- Bug details, including instructions how to reproduce it
|
||||
- Platform (Windows, Linux, FreeBSD, …) and compiler (including version) if
|
||||
you compiled OpenTTD yourself.
|
||||
- The processor architecture of your OS (32-bit Windows, 64-bit Windows,
|
||||
Linux on an ARM, Mac OS X on a PowerPC, etc.)
|
||||
- Attach a saved game **and** a screenshot if possible
|
||||
- If this bug only occurred recently please note the last version without
|
||||
the bug and the first version including the bug. That way we can fix it
|
||||
quicker by looking at the changes made.
|
||||
- Attach crash.dmp, crash.log and crash.sav. These files are usually created
|
||||
next to your openttd.cfg. The crash handler will tell you the location.
|
||||
OpenTTD has been ported to several platforms and operating systems.
|
||||
|
||||
### 2.2) Reporting desyncs
|
||||
The currently supported platforms are:
|
||||
|
||||
As desyncs are hard to make reproducible OpenTTD has the ability to log all
|
||||
actions done by clients so we can replay the whole game in an effort to make
|
||||
desyncs better reproducible. You need to turn this ability on. When turned
|
||||
on an automatic savegame will be made once the map has been constructed in
|
||||
the 'save/autosave' directory, see OpenTTD directories to know where to find
|
||||
this directory. Furthermore the log file 'commands-out.log' will be created
|
||||
and all actions will be written to there.
|
||||
- Linux (SDL (OpenGL and non-OpenGL))
|
||||
- macOS (universal) (Cocoa)
|
||||
- Windows (Win32 GDI / OpenGL)
|
||||
|
||||
To enable the desync debugging you need to set the debug level for 'desync'
|
||||
to at least 1. You do this by starting OpenTTD with '`-d desync=<level>`' as
|
||||
parameter or by typing '`debug_level desync=<level>`' in OpenTTD's internal
|
||||
console.
|
||||
The desync debug levels are:
|
||||
Other platforms may also work (in particular various BSD systems), but we don't actively test or maintain these.
|
||||
|
||||
- 0: nothing.
|
||||
- 1: dumping of commands to 'commands-out.log'.
|
||||
- 2: same as 1 plus checking vehicle caches and dumping that too.
|
||||
- 3: same as 2 plus monthly saves in autosave.
|
||||
- 4 and higher: same as 3
|
||||
### 1.3.1) Legacy support
|
||||
Platforms, languages and compilers change.
|
||||
We'll keep support going on old platforms as long as someone is interested in supporting them, except where it means the project can't move forward to keep up with language and compiler features.
|
||||
|
||||
Restarting OpenTTD will overwrite 'commands-out.log'. OpenTTD will not remove
|
||||
the savegames (dmp_cmds_*.sav) made by the desync debugging system, so you
|
||||
have to occasionally remove them yourself!
|
||||
We guarantee that every revision of OpenTTD will be able to load savegames from every older revision (excepting where the savegame is corrupt).
|
||||
Please report a bug if you find a save that doesn't load.
|
||||
|
||||
The naming format of the desync savegames is as follows:
|
||||
dmp_cmds_XXXXXXXX_YYYYYYYY.sav. The XXXXXXXX is the hexadecimal representation
|
||||
of the generation seed of the game and YYYYYYYY is the hexadecimal
|
||||
representation of the date of the game. This sorts the savegames by game and
|
||||
then by date making it easier to find the right savegames.
|
||||
## 1.4) Installing and running OpenTTD
|
||||
|
||||
When a desync has occurred with the desync debugging turned on you should file
|
||||
a bug report with the following files attached:
|
||||
OpenTTD is usually straightforward to install, but for more help the wiki [includes an installation guide](https://wiki.openttd.org/en/Manual/Installation).
|
||||
|
||||
- commands-out.log as it contains all the commands that were done
|
||||
- the last saved savegame (search for the last line beginning with
|
||||
'save: dmp_cmds_' in commands-out.log). We use this savegame to check
|
||||
whether we can quickly reproduce the desync. Otherwise we will need …
|
||||
- the first saved savegame (search for the first line beginning with 'save'
|
||||
where the first part, up to the last underscore '_', is the same). We need
|
||||
this savegame to be able to reproduce the bug when the last savegame is not
|
||||
old enough. If you loaded a scenario or savegame you need to attach that.
|
||||
- optionally you can attach the savegames from around 50%, 75%, 85%, 90% and
|
||||
95% of the game's progression. We can use these savegames to speed up the
|
||||
reproduction of the desync, but we should be able to reproduce these
|
||||
savegames based on the first savegame and commands-out.log.
|
||||
- in case you use any NewGRFs you should attach the ones you used unless
|
||||
we can easily find them ourselves via bananas or when they are in the
|
||||
#openttdcoop pack.
|
||||
OpenTTD needs some additional graphics and sound files to run.
|
||||
|
||||
Do NOT remove the dmp_cmds savegames of a desync you have reported until the
|
||||
desync has been fixed; if you, by accident, send us the wrong savegames we
|
||||
will not be able to reproduce the desync and thus will be unable to fix it.
|
||||
For some platforms these will be downloaded during the installation process if required.
|
||||
|
||||
## 3.0) Supported platforms
|
||||
For some platforms, you will need to refer to [the installation guide](https://wiki.openttd.org/en/Manual/Installation).
|
||||
|
||||
OpenTTD has been ported to several platforms and operating systems. It should
|
||||
not be very difficult to port it to a new platform. The currently working
|
||||
platforms are:
|
||||
|
||||
- BeOS (SDL or Allegro)
|
||||
- DOS (Allegro)
|
||||
- FreeBSD (SDL)
|
||||
- Linux (SDL or Allegro)
|
||||
- macOS (universal) (Cocoa video and sound drivers)
|
||||
- MorphOS (SDL)
|
||||
- OpenBSD (SDL)
|
||||
- OS/2 (SDL)
|
||||
- Windows (Win32 GDI (faster) or SDL or Allegro)
|
||||
|
||||
## 4.0) Installing and running OpenTTD
|
||||
|
||||
Installing OpenTTD is fairly straightforward. Either you have downloaded an
|
||||
archive which you have to extract to a directory where you want OpenTTD to
|
||||
be installed, or you have downloaded an installer, which will automatically
|
||||
extract OpenTTD in the given directory.
|
||||
|
||||
OpenTTD looks in multiple locations to find the required data files (described
|
||||
in section 4.2). Installing any 3rd party files into a 'shared' location has
|
||||
the advantage that you only need to do this step once, rather than copying the
|
||||
data files into all OpenTTD versions you have.
|
||||
|
||||
Savegames, screenshots, etc are saved relative to the config file (openttd.cfg)
|
||||
currently being used. This means that if you use a config file in one of the
|
||||
shared directories, savegames will reside in the save/ directory next to the
|
||||
openttd.cfg file there.
|
||||
|
||||
If you want savegames and screenshots in the directory where the OpenTTD binary
|
||||
resides, simply have your config file in that location. But if you remove this
|
||||
config file, savegames will still be in this directory (see notes in
|
||||
section 4.2 'OpenTTD directories')
|
||||
|
||||
OpenTTD comes without AIs, so if you want to play with AIs you have to download
|
||||
them. The easiest way is via the 'Check Online Content' button in the main menu.
|
||||
You can select some AIs that you think are compatible with your playing style.
|
||||
Another way is manually downloading the AIs from the forum although then you
|
||||
need to make sure that you install all the required AI libraries too; they get
|
||||
automatically selected (and downloaded) if you get the AIs via the 'Check
|
||||
Online Content'. If you do not have an AI but have configured OpenTTD to start
|
||||
an AI a message will be shown that the 'dummy' AI has been started.
|
||||
|
||||
### 4.1) (Required) 3rd party files
|
||||
|
||||
Before you run OpenTTD, you need to put the game's data files into a baseset/
|
||||
directory which can be located in various places addressed in the following
|
||||
section.
|
||||
|
||||
For OpenTTD you need to acquire some third party data files. For this you have
|
||||
the choice of using the original Transport Tycoon Deluxe data files or a set
|
||||
of free data files.
|
||||
|
||||
Do NOT copy files included with OpenTTD into 'shared' directories (explained in
|
||||
the following sections) as sooner or later you will run into graphical glitches
|
||||
when using other versions of the game.
|
||||
|
||||
#### 4.1.1) Free graphics and sound files
|
||||
### 1.4.1) Free graphics and sound files
|
||||
|
||||
The free data files, split into OpenGFX for graphics, OpenSFX for sounds and
|
||||
OpenMSX for music can be found at:
|
||||
|
||||
- https://www.openttd.org/download-opengfx for OpenGFX
|
||||
- https://www.openttd.org/download-opensfx for OpenSFX
|
||||
- https://www.openttd.org/download-openmsx for OpenMSX
|
||||
- https://www.openttd.org/downloads/opengfx-releases/ for OpenGFX
|
||||
- https://www.openttd.org/downloads/opensfx-releases/ for OpenSFX
|
||||
- https://www.openttd.org/downloads/openmsx-releases/ for OpenMSX
|
||||
|
||||
Please follow the readme of these packages about the installation procedure.
|
||||
The Windows installer can optionally download and install these packages.
|
||||
|
||||
#### 4.1.2) Original Transport Tycoon Deluxe graphics and sound files
|
||||
|
||||
If you want to play with the original Transport Tycoon Deluxe data files you
|
||||
have to copy the data files from the CD-ROM into the baseset/ directory. It
|
||||
does not matter whether you copy them from the DOS or Windows version of
|
||||
Transport Tycoon Deluxe. The Windows install can optionally copy these files.
|
||||
### 1.4.2) Original Transport Tycoon Deluxe graphics and sound files
|
||||
|
||||
If you want to play with the original Transport Tycoon Deluxe data files you have to copy the data files from the CD-ROM into the baseset/ directory.
|
||||
It does not matter whether you copy them from the DOS or Windows version of Transport Tycoon Deluxe.
|
||||
The Windows install can optionally copy these files.
|
||||
|
||||
You need to copy the following files:
|
||||
- sample.cat
|
||||
- trg1r.grf or TRG1.GRF
|
||||
@@ -233,601 +99,113 @@ You need to copy the following files:
|
||||
- trgir.grf or TRGI.GRF
|
||||
- trgtr.grf or TRGT.GRF
|
||||
|
||||
#### 4.1.3) Original Transport Tycoon Deluxe music
|
||||
|
||||
If you want the Transport Tycoon Deluxe music, copy the appropriate files from
|
||||
the original game into the baseset folder.
|
||||
### 1.4.3) Original Transport Tycoon Deluxe music
|
||||
|
||||
If you want the Transport Tycoon Deluxe music, copy the appropriate files from the original game into the baseset folder.
|
||||
- TTD for Windows: All files in the gm/ folder (gm_tt00.gm up to gm_tt21.gm)
|
||||
- TTD for DOS: The GM.CAT file
|
||||
- Transport Tycoon Original: The GM.CAT file, but rename it to GM-TTO.CAT
|
||||
|
||||
#### 4.1.4) AIs
|
||||
|
||||
If you want AIs use the in-game content downloader. If for some reason that is
|
||||
not possible or you want to use an AI that has not been uploaded to the content
|
||||
download system download the tar file and place it in the ai/ directory. If the
|
||||
AI needs libraries you will have to download those too and put them in the
|
||||
ai/library/ directory. All AIs and AI Libraries that have been uploaded to
|
||||
the content download system can be found at https://noai.openttd.org/downloads.
|
||||
The AIs and libraries can be found their in the form of .tar.gz packages.
|
||||
OpenTTD can read inside tar files but it does not extract .tar.gz files by itself.
|
||||
|
||||
To figure out which libraries you need for an AI you have to start the AI and
|
||||
wait for an error message to pop up. The error message will tell you
|
||||
'could not find library "lib-name"'. Download that library and try again.
|
||||
|
||||
#### 4.1.5) Game scripts
|
||||
|
||||
If you want an extra challenge in OpenTTD you can download so-called game
|
||||
scripts via the in-game content downloader. These game scripts have varying
|
||||
functionality, though they can generally influence town growth, subsidies, add
|
||||
goals to reach or provide a different ranking system.
|
||||
|
||||
If you download a game script manually you have to follow the same rules as for
|
||||
AIs, except that game scripts are placed in the game/ directory instead of the
|
||||
ai/ directory.
|
||||
|
||||
### 4.2) OpenTTD directories
|
||||
|
||||
OpenTTD uses its own directory to store its required 3rd party base set files
|
||||
(see section 4.1 'Required 3rd party files') and non-compulsory extension and
|
||||
configuration files. See below for their proper place within this OpenTTD main
|
||||
data directory.
|
||||
|
||||
The main OpenTTD directories can be found in various locations, depending on
|
||||
your operating system:
|
||||
|
||||
1. The current working directory (from where you started OpenTTD)
|
||||
|
||||
For non-Windows operating systems OpenTTD will not scan for files in this
|
||||
directory if it is your personal directory, i.e. '~/', or when it is the
|
||||
root directory, i.e. '/'.
|
||||
|
||||
2. Your personal directory
|
||||
- Windows:
|
||||
- `C:\My Documents\OpenTTD` (95, 98, ME)
|
||||
- `C:\Documents and Settings\<username>\My Documents\OpenTTD` (2000, XP)
|
||||
- `C:\Users\<username>\Documents\OpenTTD` (Vista, 7, 8.1, 10)
|
||||
- macOS: `~/Documents/OpenTTD`
|
||||
- Linux: `$XDG_DATA_HOME/openttd` which is usually `~/.local/share/openttd`
|
||||
when built with XDG base directory support, otherwise `~/.openttd`
|
||||
3. The shared directory
|
||||
- Windows:
|
||||
- `C:\Documents and Settings\All Users\Shared Documents\OpenTTD` (2000, XP)
|
||||
- `C:\Users\Public\Documents\OpenTTD` (Vista, 7, 8.1, 10)
|
||||
- macOS: `/Library/Application Support/OpenTTD`
|
||||
- Linux: not available
|
||||
4. The binary directory (where the OpenTTD executable is)
|
||||
- Windows: `C:\Program Files\OpenTTD`
|
||||
- Linux: `/usr/games`
|
||||
5. The installation directory (Linux only)
|
||||
- Linux: `/usr/share/games/openttd`
|
||||
6. The application bundle (macOS only)
|
||||
|
||||
It includes the OpenTTD files (grf+lng) and it will work as long as they
|
||||
are not touched
|
||||
|
||||
Different types of data or extensions go into different subdirectories of the
|
||||
chosen main OpenTTD directory:
|
||||
|
||||
| data type | directory | additional info |
|
||||
| --- | --- | --- |
|
||||
| Config File | (no subdirectory) | |
|
||||
| Screenshots | screenshot | |
|
||||
| Base Graphics | baseset | (or a subdirectory thereof) |
|
||||
| Sound Sets | baseset | (or a subdirectory thereof) |
|
||||
| NewGRFs | newgrf | (or a subdirectory thereof) |
|
||||
| 32bpp Sets | newgrf | (or a subdirectory thereof) |
|
||||
| Music Sets | baseset | (or a subdirectory thereof) |
|
||||
| AIs | ai | (or a subdirectory thereof) |
|
||||
| AI Libraries | ai/library | (or a subdirectory thereof) |
|
||||
| Game Scripts (GS) | game | (or a subdirectory thereof) |
|
||||
| GS Libraries | game/library | (or a subdirectory thereof) |
|
||||
| Savegames | save | |
|
||||
| Automatic Savegames | save/autosave | |
|
||||
| Scenarios | scenario | |
|
||||
|
||||
The (automatically created) directory content_download is for OpenTTD's internal
|
||||
use and no files should be added to it or its subdirectories manually.
|
||||
|
||||
#### Notes:
|
||||
|
||||
- Linux in the previous list means .deb, but most paths should be similar for
|
||||
others.
|
||||
- The previous search order is also used for NewGRFs and openttd.cfg.
|
||||
- If openttd.cfg is not found, then it will be created using the 2, 4, 1, 3,
|
||||
5 order. When built with XDG base directory support, openttd.cfg will be
|
||||
created in $XDG_CONFIG_HOME/openttd which is usually ~/.config/openttd.
|
||||
- Savegames will be relative to the config file only if there is no save/
|
||||
directory in paths with higher priority than the config file path, but
|
||||
autosaves and screenshots will always be relative to the config file.
|
||||
Unless the configuration file is in $XDG_CONFIG_HOME/openttd, then all
|
||||
other files will be saved under $XDG_DATA_HOME/openttd.
|
||||
|
||||
#### The preferred setup:
|
||||
|
||||
Place 3rd party files in shared directory (or in personal directory if you do
|
||||
not have write access on shared directory) and have your openttd.cfg config
|
||||
file in personal directory (where the game will then also place savegames and
|
||||
screenshots).
|
||||
|
||||
### 4.3) Portable installations (portable media)
|
||||
|
||||
You can install OpenTTD on external media so you can take it with you, i.e.
|
||||
using a USB key, or a USB HDD, etc.
|
||||
Create a directory where you shall store the game in (i.e. OpenTTD/).
|
||||
Copy the binary (OpenTTD.exe, OpenTTD.app, openttd, etc), baseset/ and your
|
||||
openttd.cfg to this directory.
|
||||
You can copy binaries for any operating system into this directory, which will
|
||||
allow you to play the game on nearly any computer you can attach the external
|
||||
media to.
|
||||
As always - additional grf files are stored in the newgrf/ dir (for details,
|
||||
again, see section 4.1).
|
||||
|
||||
### 4.4) Files in tar (archives)
|
||||
|
||||
OpenTTD can read files that are in an uncompressed tar (archive), which
|
||||
makes it easy to bundle files belonging to the same script, NewGRF or base
|
||||
set. Music sets are the only exception as they cannot be stored in a tar
|
||||
file due to being played by external applications.
|
||||
|
||||
OpenTTD sees each tar archive as the 'root' of its search path. This means that
|
||||
having a file with the same path in two different tar files means that one
|
||||
cannot be opened, after all only one file will be found first. As such it is
|
||||
advisable to put an uniquely named folder in the root of the tar and put all the
|
||||
content in that folder. For example, all downloaded content has a path that
|
||||
concatenates the name of the content and the version, which makes the path
|
||||
unique. For custom tar files it is advised to do this as well.
|
||||
|
||||
The normal files are also referred to by their relative path from the search
|
||||
directory, this means that also normal files could hide files in a tar as
|
||||
long as the relative path from the search path of the normal file is the
|
||||
same as the path in the tar file. Again it is advised to have an unique path
|
||||
to the normal file so they do not collide with the files from other tar
|
||||
files.
|
||||
|
||||
## 5.0) OpenTTD features
|
||||
|
||||
OpenTTD has a lot of features going beyond the original Transport Tycoon Deluxe
|
||||
emulation. Unfortunately, there is currently no comprehensive list of features,
|
||||
but there is a basic features list on the web, and some optional features can be
|
||||
controlled through the Advanced Settings dialog. We also implement some
|
||||
features known from [TTDPatch](https://www.ttdpatch.net).
|
||||
|
||||
Several important non-standard controls:
|
||||
|
||||
- Ctrl modifies many commands and makes them more powerful. For example Ctrl
|
||||
clicking on signals with the build signal tool changes their behaviour,
|
||||
holding Ctrl while the track build tool is activated changes it to the track
|
||||
removal tool, and so on. See https://wiki.openttd.org/Hidden_features
|
||||
for a non-comprehensive list or look at the tooltips.
|
||||
- Ingame console. More information at https://wiki.openttd.org/Console
|
||||
- Hovering over a GUI element shows tooltips. This can be changed to right click
|
||||
via the advanced settings.
|
||||
|
||||
### 5.1) Logging of potentially dangerous actions
|
||||
|
||||
OpenTTD is a complex program, and together with NewGRF, it may show a buggy
|
||||
behaviour. But not only bugs in code can cause problems. There are several
|
||||
ways to affect game state possibly resulting in program crash or multiplayer
|
||||
desyncs.
|
||||
|
||||
Easier way would be to forbid all these unsafe actions, but that would affect
|
||||
game usability for many players. We certainly do not want that.
|
||||
However, we receive bug reports because of this. To reduce time spent with
|
||||
solving these problems, these potentially unsafe actions are logged in
|
||||
the savegame (including crash.sav). Log is stored in crash logs, too.
|
||||
|
||||
Information logged:
|
||||
|
||||
- Adding / removing / changing order of NewGRFs
|
||||
- Changing NewGRF parameters, loading compatible NewGRF
|
||||
- Changing game mode (scenario editor <-> normal game)
|
||||
- Loading game saved in a different OpenTTD / TTDPatch / Transport Tycoon Deluxe /
|
||||
original Transport Tycoon version
|
||||
- Running a modified OpenTTD build
|
||||
- Changing settings affecting NewGRF behaviour (non-network-safe settings)
|
||||
- Triggering NewGRF bugs
|
||||
|
||||
No personal information is stored.
|
||||
|
||||
You can show the game log by typing 'gamelog' in the console or by running
|
||||
OpenTTD in debug mode.
|
||||
|
||||
### 5.2) Frame rate and performance metrics
|
||||
|
||||
The Help menu in-game has a function to open the Frame rate window. This
|
||||
window shows various real-time performance statistics, measuring what parts
|
||||
of the game require the most processing power currently.
|
||||
|
||||
A summary of the statistics can also be retrieved from the console with the
|
||||
`fps` command. This is especially useful on dedicated servers, where the
|
||||
administrator might want to determine what's limiting performance in a slow
|
||||
game.
|
||||
|
||||
The frame rate is given as two figures, the simulation rate and the graphics
|
||||
frame rate. Usually these are identical, as the screen is rendered exactly
|
||||
once per simulated tick, but in the future there might be support for graphics
|
||||
and simulation running at different rates. When the game is paused, the
|
||||
simulation rate drops to zero.
|
||||
|
||||
In addition to the simulation rate, a game speed factor is also calculated.
|
||||
This is based on the target simulation speed, which is 30 milliseconds per
|
||||
game tick. At that speed, the expected frame rate is 33.33 frames/second, and
|
||||
the game speed factor is how close to that target the actual rate is. When
|
||||
the game is in fast forward mode, the game speed factor shows how much
|
||||
speed up is achieved.
|
||||
|
||||
The lower part of the window shows timing statistics for individual parts of
|
||||
the game. The times shown are short-term and long-term averages of how long
|
||||
it takes to process one tick of game time, all figures are in milliseconds.
|
||||
|
||||
Clicking a line in the lower part of the window opens a graph window, giving
|
||||
detailed readings on each tick simulated by the game.
|
||||
|
||||
The following is an explanation of the different statistics:
|
||||
|
||||
- *Game loop* - Total processing time used per simulated "tick" in the game.
|
||||
This includes all pathfinding, world updates, and economy handling.
|
||||
- *Cargo handling* - Time spent loading/unloading cargo at stations, and
|
||||
industries and towns sending/retrieving cargo from stations.
|
||||
- *Train ticks*, *Road vehicle ticks*, *Ship ticks*, *Aircraft ticks* -
|
||||
Time spent on pathfinding and other processing for each player vehicle type.
|
||||
- *World ticks* - Time spent on other world/landscape processing. This
|
||||
includes towns growing, building animations, updates of farmland and trees,
|
||||
and station rating updates.
|
||||
- *Link graph delay* - Time overruns of the cargo distribution link graph
|
||||
update thread. Usually the link graph is updated in a background thread,
|
||||
but these updates need to synchronise with the main game loop occasionally,
|
||||
if the time spent on link graph updates is longer than the time taken to
|
||||
otherwise simulate the game while it was updating, these delays are counted
|
||||
in this figure.
|
||||
- *Graphics rendering* - Total time spent rendering all graphics, including
|
||||
both GUI and world viewports. This typically spikes when panning the view
|
||||
around, and when more things are happening on screen at once.
|
||||
- *World viewport rendering* - Isolated time spent rendering just world
|
||||
viewports. If this figure is significantly lower than the total graphics
|
||||
rendering time, most time is spent rendering GUI than rendering world.
|
||||
- *Video output* - Speed of copying the rendered graphics to the display
|
||||
adapter. Usually this should be very fast (in the range of 0-3 ms), large
|
||||
values for this can indicate a graphics driver problem.
|
||||
- *Sound mixing* - Speed of mixing active audio samples together. Usually
|
||||
this should be very fast (in the range of 0-3 ms), if it is slow, consider
|
||||
switching to the NoSound set.
|
||||
|
||||
If the frame rate window is shaded, the title bar will instead show just the
|
||||
current simulation rate and the game speed factor.
|
||||
|
||||
## 6.0) Configuration file
|
||||
|
||||
The configuration file for OpenTTD (openttd.cfg) is in a simple Windows-like
|
||||
.INI format. It is mostly undocumented. Almost all settings can be changed
|
||||
ingame by using the 'Advanced Settings' window.
|
||||
When you cannot find openttd.cfg you should look in the directories as
|
||||
described in section 4.2. If you do not have an openttd.cfg OpenTTD will
|
||||
create one after closing.
|
||||
|
||||
## 7.0) Compiling
|
||||
|
||||
### Windows:
|
||||
|
||||
You need Microsoft Visual Studio 2015 Update 3 or more recent. Open the project file
|
||||
and it should build automatically. In case you want to build with SDL support
|
||||
you need to add WITH_SDL to the project settings.
|
||||
|
||||
PNG (WITH_PNG), ZLIB (WITH_ZLIB), LZO (WITH_LZO), Freetype (WITH_FREETYPE) and
|
||||
LZMA (WITH_LZMA) support is enabled by default. For these to work you need their
|
||||
development files. To get them just use vcpkg from https://github.com/Microsoft/vcpkg
|
||||
using x86-windows-static and x64-windows-static triplets.
|
||||
For more help with VS see docs/Readme_Windows_MSVC.md.
|
||||
|
||||
You can also build it using the Makefile with MSYS/MinGW or Cygwin/MinGW.
|
||||
Please read the Makefile for more information.
|
||||
|
||||
### Solaris, FreeBSD, OpenBSD:
|
||||
|
||||
Use '`gmake`', but do a '`./configure`' before the first build.
|
||||
|
||||
### Linux/Unix:
|
||||
|
||||
OpenTTD can be built with GNU '`make`'. On non-GNU systems it is called '`gmake`'.
|
||||
However, for the first build one has to do a '`./configure`' first.
|
||||
|
||||
### macOS:
|
||||
|
||||
Use '`make`' or Xcode (which will then call make for you)
|
||||
This will give you a binary for your CPU type (PPC/Intel)
|
||||
However, for the first build one has to do a '`./configure`' first.
|
||||
To make a universal binary type '`./configure --enabled-universal`'
|
||||
instead of '`./configure`'.
|
||||
|
||||
### BeOS:
|
||||
|
||||
Use '`make`', but do a '`./configure`' before the first build.
|
||||
|
||||
### MorphOS:
|
||||
|
||||
Use '`make`'. However, for the first build one has to do a '`./configure`'
|
||||
first. Note that you need the MorphOS SDK, latest libnix updates (else C++
|
||||
parts of OpenTTD will not build) and the powersdl.library SDK. Optionally libz,
|
||||
libpng and freetype2 developer files.
|
||||
|
||||
### OS/2:
|
||||
|
||||
A comprehensive GNU build environment is required to build the OS/2 version.
|
||||
See the docs/Readme_OS2.txt file for more information.
|
||||
|
||||
### DOS:
|
||||
|
||||
A build environment with DJGPP is needed as well as libraries such as
|
||||
Allegro, zlib and libpng, which all can be downloaded from the DJGPP
|
||||
website. Compilation is straight forward: use '`make`', but do a '`./configure`'
|
||||
before the first build. The build binary will need cwsdpmi.exe to be in
|
||||
the same directory as the openttd executable. cwsdpmi.exe can be found in
|
||||
the os/dos/cwsdpmi subdirectory. If you compile with stripping turned on a
|
||||
binary will be generated that does not need cwsdpmi.exe by adding the
|
||||
cswdstub.exe to the created OpenTTD binary.
|
||||
|
||||
### 7.1) Required/optional libraries
|
||||
|
||||
The following libraries are used by OpenTTD for:
|
||||
|
||||
- libSDL/liballegro: hardware access (video, sound, mouse)
|
||||
- zlib: (de)compressing of old (0.3.0-1.0.5) savegames, content downloads,
|
||||
heightmaps
|
||||
- liblzo2: (de)compressing of old (pre 0.3.0) savegames
|
||||
- liblzma: (de)compressing of savegames (1.1.0 and later)
|
||||
- libpng: making screenshots and loading heightmaps
|
||||
- libfreetype: loading generic fonts and rendering them
|
||||
- libfontconfig: searching for fonts, resolving font names to actual fonts
|
||||
- libicu: handling of right-to-left scripts (e.g. Arabic and Persian) and
|
||||
natural sorting of strings.
|
||||
|
||||
OpenTTD does not require any of the libraries to be present, but without
|
||||
liblzma you cannot open most recent savegames and without zlib you cannot
|
||||
open most older savegames or use the content downloading system.
|
||||
Without libSDL/liballegro on non-Windows and non-macOS machines you have
|
||||
no graphical user interface; you would be building a dedicated server.
|
||||
## 1.5) Add-on content / mods
|
||||
|
||||
### 7.2) Supported compilers
|
||||
OpenTTD features multiple types of add-on content, which modify gameplay in different ways.
|
||||
|
||||
The following compilers are known to compile OpenTTD:
|
||||
Most types of add-on content can be downloaded within OpenTTD via the 'Check Online Content' button in the main menu.
|
||||
|
||||
- Microsoft Visual C++ (MSVC) 2015, 2017 and 2019.
|
||||
- GNU Compiler Collection (GCC) 3.3 - 4.4, 4.6 - 4.8.
|
||||
- Versions 4.1 and earlier give bogus warnings about uninitialised variables.
|
||||
- Versions 4.4, 4.6 give bogus warnings about freeing non-heap objects.
|
||||
- Versions 4.6 and later give invalid warnings when lto is enabled.
|
||||
- Intel C++ Compiler (ICC) 12.0.
|
||||
- Clang/LLVM 2.9 - 3.0
|
||||
Version 2.9 gives bogus warnings about code nonconformity.
|
||||
Add-on content can also be installed manually, but that's more complicated; the [OpenTTD wiki](https://wiki.openttd.org/) may offer help with that, or the [OpenTTD directory structure guide](./docs/directory_structure.md).
|
||||
|
||||
The following compilers are known not to compile OpenTTD:
|
||||
### 1.5.1) AI opponents
|
||||
|
||||
- Microsoft Visual C++ (MSVC) 2013 and earlier.
|
||||
These old versions do not support modern C++ language features.
|
||||
- GNU Compiler Collection (GCC) 3.2 and earlier.
|
||||
These old versions fail due to OpenTTD's template usage.
|
||||
- GNU Compiler Collection (GCC) 4.5. It optimizes enums too aggressively.
|
||||
See https://github.com/OpenTTD/OpenTTD/issues/5513 and references therein.
|
||||
- Intel C++ Compiler (ICC) 11.1 and earlier.
|
||||
- Version 10.0 and earlier fail a configure check and fail with recent
|
||||
system headers.
|
||||
- Version 10.1 fails to compile station_gui.cpp.
|
||||
- Version 11.1 fails with an internal error when compiling network.cpp.
|
||||
- Clang/LLVM 2.8 and earlier.
|
||||
- (Open) Watcom.
|
||||
OpenTTD comes without AI opponents, so if you want to play with AIs you have to download them.
|
||||
|
||||
If any of these compilers can compile OpenTTD again, please let us know.
|
||||
Patches to support more compilers are welcome.
|
||||
The easiest way is via the 'Check Online Content' button in the main menu.
|
||||
|
||||
### 7.3) Compilation of base sets
|
||||
You can select some AIs that you think are compatible with your playing style.
|
||||
|
||||
To recompile the extra graphics needed to play with the original Transport
|
||||
Tycoon Deluxe graphics you need GRFCodec (which includes NFORenum) as well.
|
||||
GRFCodec can be found at https://www.openttd.org/download-grfcodec.
|
||||
The compilation of these extra graphics does generally not happen, unless
|
||||
you remove the graphics file using '`make maintainer-clean`'.
|
||||
AI help and discussions may also be found in the [AI section of the forum](https://www.tt-forums.net/viewforum.php?f=65).
|
||||
|
||||
Re-compilation of the base sets, thus also use of '`--maintainer-clean`' can
|
||||
leave the repository in a modified state as different grfcodec versions can
|
||||
cause binary differences in the resulting grf. Also translations might have
|
||||
been added for the base sets which are not yet included in the base set
|
||||
information files. Use the configure option '`--without-grfcodec`' to avoid
|
||||
modification of the base set files by the build process.
|
||||
### 1.5.2) Scenarios and height maps
|
||||
|
||||
## 8.0) Translating
|
||||
Scenarios and heightmaps can be added via the 'Check Online Content' button in the main menu.
|
||||
|
||||
See https://www.openttd.org/development for up-to-date information.
|
||||
### 1.5.3) NewGRFs
|
||||
|
||||
The use of the online Translator service, located at
|
||||
https://translator.openttd.org, is highly encouraged. For getting an account
|
||||
simply follow the guidelines in the FAQ of the translator website.
|
||||
A wide range of add-content is available as NewGRFs, including vehicles, industries, stations, landscape objects, town names and more.
|
||||
|
||||
If for some reason the website is down for a longer period of time, the
|
||||
information below might be of help.
|
||||
NewGRFs can be added via the 'Check Online Content' button in the main menu.
|
||||
|
||||
Please contact the translations manager (https://www.openttd.org/contact)
|
||||
before beginning the translation process! This avoids double work, as
|
||||
someone else may have already started translating to the same language.
|
||||
See also the wiki [guide to NewGRFs](https://wiki.openttd.org/en/Manual/NewGRF) and [the forum graphics development section](https://www.tt-forums.net/viewforum.php?f=66).
|
||||
|
||||
### 8.1) Translation
|
||||
### 1.5.4) Game scripts
|
||||
|
||||
So, now that you have notified the development team about your intention to
|
||||
translate (You did, right? Of course you did.) you can pick up english.txt
|
||||
(found in the Git repository under /src/lang) and translate.
|
||||
Game scripts can provide additional challenges or changes to the standard OpenTTD gameplay, for example setting transport goals, or changing town growth behaviour.
|
||||
|
||||
You must change the first two lines of the file appropriately:
|
||||
Game scripts can be added via the 'Check Online Content' button in the main menu.
|
||||
|
||||
##name English-Name-Of-Language
|
||||
##ownname Native-Name-Of-Language
|
||||
|
||||
Note: Do not alter the following parts of the file:
|
||||
See also the wiki [guide to game scripts](https://wiki.openttd.org/en/Manual/Game%20script) and [the forum graphics game script section](https://www.tt-forums.net/viewforum.php?f=65).
|
||||
|
||||
- String identifiers (the first word on each line)
|
||||
- Parts of the strings which are in curly braces (such as {STRING})
|
||||
- Lines beginning with ## (such as ##id), other than the first two lines
|
||||
of the file
|
||||
|
||||
### 8.2) Previewing
|
||||
|
||||
In order to view the translation in the game, you need to compile your language
|
||||
file with the strgen utility. As this utility is tailored to a specific OpenTTD
|
||||
version, you need to compile it yourself. Just take the normal OpenTTD sources
|
||||
and build that. During the build process the strgen utility will be made.
|
||||
### 1.6) OpenTTD directories
|
||||
|
||||
strgen is a command-line utility. It takes the language filename as parameter.
|
||||
OpenTTD uses its own directory structure to store game data, add-on content etc.
|
||||
|
||||
Example:
|
||||
For more information, see the [directory structure guide](./docs/directory_structure.md).
|
||||
|
||||
strgen lang/german.txt
|
||||
### 1.7) Compiling OpenTTD
|
||||
|
||||
This results in compiling german.txt and produces another file named german.lng.
|
||||
Any missing strings are replaced with the English strings. Note that it looks
|
||||
for english.txt in the lang subdirectory, which is where your language file
|
||||
should also be.
|
||||
|
||||
That is all! You should now be able to select the language in the game options.
|
||||
If you want to compile OpenTTD from source, instructions can be found in [COMPILING.md](./COMPILING.md).
|
||||
|
||||
## 9.0) Troubleshooting
|
||||
|
||||
To see all startup options available to you, start OpenTTD with the
|
||||
'`./openttd -h`' option. This might help you tweak some of the settings.
|
||||
|
||||
If the game is acting strange and you feel adventurous you can try the
|
||||
'`-d [[<name>=]<level>]`' flag, where the higher levels will give you more
|
||||
debugging output. The 'name' variable can help you to display only some type of
|
||||
debugging messages. This is mostly undocumented so best is to look in the
|
||||
source code file debug.c for the various debugging types. For more information
|
||||
look at https://wiki.openttd.org/Command_line.
|
||||
|
||||
The most frequent problem is missing data files. Please install OpenGFX and
|
||||
possibly OpenSFX and OpenMSX. See section 4.1.1 for more information.
|
||||
|
||||
Under certain circumstance, especially on Ubuntu OpenTTD can be extremely slow
|
||||
and/or freeze. See known-bugs.txt for more information and how to solve this
|
||||
problem on your computer.
|
||||
|
||||
Under Windows 98 and lower it is impossible to use a dedicated server; it will
|
||||
fail to start. Perhaps this is for the better because those OSes are not known
|
||||
for their stability.
|
||||
|
||||
With the added support for font-based text selecting a non-latin language can
|
||||
result in lots of question marks ('?') being shown on screen. Please open your
|
||||
configuration file (openttd.cfg - see Section 4.2 for where to find it)
|
||||
and add a suitable font for the small, medium and / or large font, e.g.:
|
||||
## 2.0) Contact and Community
|
||||
|
||||
small_font = "Tahoma"
|
||||
medium_font = "Tahoma"
|
||||
large_font = "Tahoma"
|
||||
|
||||
You should use a font name like 'Tahoma' or a path to the desired font.
|
||||
|
||||
Any NewGRF file used in a game is stored inside the savegame and will refuse to
|
||||
load if you do not have that NewGRF file available. A list of missing files can
|
||||
be viewed in the NewGRF window accessible from the file load dialogue window.
|
||||
|
||||
You can try to obtain the missing files from that NewGRF dialogue or – if they
|
||||
are not available online – you can search manually through our
|
||||
[forum's graphics development section](https://www.tt-forums.net/viewforum.php?f=66)
|
||||
or [GRFCrawler](https://grfcrawler.tt-forums.net). Put the NewGRF files in
|
||||
OpenTTD's newgrf folder (see section 4.2 'OpenTTD directories') and rescan the
|
||||
list of available NewGRFs. Once you have all missing files, you are set to go.
|
||||
|
||||
## 10.0) Licensing
|
||||
|
||||
OpenTTD is licensed under the GNU General Public License version 2.0. For
|
||||
the complete license text, see the file 'COPYING'. This license applies
|
||||
to all files in this distribution, except as noted below.
|
||||
|
||||
The squirrel implementation in src/3rdparty/squirrel is licensed under
|
||||
the Zlib license. See src/3rdparty/squirrel/COPYRIGHT for the complete
|
||||
license text.
|
||||
|
||||
The md5 implementation in src/3rdparty/md5 is licensed under the Zlib
|
||||
license. See the comments in the source files in src/3rdparty/md5 for
|
||||
the complete license text.
|
||||
|
||||
The implementations of Posix getaddrinfo and getnameinfo for OS/2 in
|
||||
src/3rdparty/os2 are distributed partly under the GNU Lesser General Public
|
||||
License 2.1, and partly under the (3-clause) BSD license. The exact licensing
|
||||
terms can be found in src/3rdparty/os2/getaddrinfo.c resp.
|
||||
src/3rdparty/os2/getnameinfo.c.
|
||||
|
||||
The exe2coff implementation in os/dos/exe2coff is available under the
|
||||
GPL, with a number of additional terms. See os/dos/exe2coff/copying and
|
||||
os/dos/exe2coff/copying.dj for the exact licensing terms.
|
||||
|
||||
The CWSDPMI implementation in os/dos/cwsdpmi is distributed under a
|
||||
custom binary-only license that prohibits modification. The exact
|
||||
licensing terms can be found in os/dos/cwsdpmi/cwsdpmi.txt. The sources
|
||||
for these files can be downloaded at its author site, at
|
||||
http://homer.rice.edu/~sandmann/cwsdpmi/csdpmi5s.zip.
|
||||
|
||||
CONTRIBUTING.md is adapted from
|
||||
[Bootstrap](https://github.com/twbs/bootstrap/blob/master/CONTRIBUTING.md)
|
||||
under the [Creative Commons Attribution 3.0 Unported
|
||||
License](https://github.com/twbs/bootstrap/blob/master/docs/LICENSE)
|
||||
terms for Bootstrap documentation.
|
||||
|
||||
## X.X) Credits
|
||||
|
||||
### The OpenTTD team (in alphabetical order):
|
||||
|
||||
- Grzegorz Duczyński (adf88) - General coding (since 1.7.2)
|
||||
- Albert Hofkamp (Alberth) - GUI expert (since 0.7)
|
||||
- Matthijs Kooijman (blathijs) - Pathfinder-guru, Debian port (since 0.3)
|
||||
- Ulf Hermann (fonsinchen) - Cargo Distribution (since 1.3)
|
||||
- Christoph Elsenhans (frosch) - General coding (since 0.6)
|
||||
- Loïc Guilloux (glx) - Windows Expert (since 0.4.5)
|
||||
- Michael Lutz (michi_cc) - Path based signals (since 0.7)
|
||||
- Niels Martin Hansen (nielsm) - Music system, general coding (since 1.9)
|
||||
- Owen Rudge (orudge) - Forum host, OS/2 port (since 0.1)
|
||||
- Peter Nelson (peter1138) - Spiritual descendant from newGRF gods (since 0.4.5)
|
||||
- Ingo von Borstel (planetmaker) - General coding, Support (since 1.1)
|
||||
- Remko Bijker (Rubidium) - Lead coder and way more (since 0.4.5)
|
||||
- José Soler (Terkhen) - General coding (since 1.0)
|
||||
- Leif Linse (Zuu) - AI/Game Script (since 1.2)
|
||||
|
||||
### Inactive Developers:
|
||||
|
||||
- Jean-François Claeys (Belugas) - GUI, newindustries and more (0.4.5 - 1.0)
|
||||
- Bjarni Corfitzen (Bjarni) - macOS port, coder and vehicles (0.3 - 0.7)
|
||||
- Victor Fischer (Celestar) - Programming everywhere you need him to (0.3 - 0.6)
|
||||
- Jaroslav Mazanec (KUDr) - YAPG (Yet Another Pathfinder God) ;) (0.4.5 - 0.6)
|
||||
- Jonathan Coome (Maedhros) - High priest of the NewGRF Temple (0.5 - 0.6)
|
||||
- Attila Bán (MiHaMiX) - WebTranslator 1 and 2 (0.3 - 0.5)
|
||||
- Zdeněk Sojka (SmatZ) - Bug finder and fixer (0.6 - 1.3)
|
||||
- Christoph Mallon (Tron) - Programmer, code correctness police (0.3 - 0.5)
|
||||
- Patric Stout (TrueBrain) - NoProgrammer (0.3 - 1.2), sys op (active)
|
||||
- Thijs Marinussen (Yexo) - AI Framework, General (0.6 - 1.3)
|
||||
|
||||
### Retired Developers:
|
||||
|
||||
- Tamás Faragó (Darkvater) - Ex-Lead coder (0.3 - 0.5)
|
||||
- Dominik Scherer (dominik81) - Lead programmer, GUI expert (0.3 - 0.3)
|
||||
- Emil Djupfeld (egladil) - macOS port (0.4 - 0.6)
|
||||
- Simon Sasburg (HackyKid) - Bug fixer (0.4 - 0.4.5)
|
||||
- Ludvig Strigeus (ludde) - Original author of OpenTTD, main coder (0.1 - 0.3)
|
||||
- Cian Duffy (MYOB) - BeOS port / manual writing (0.1 - 0.3)
|
||||
- Petr Baudiš (pasky) - Many patches, newgrf support, etc. (0.3 - 0.3)
|
||||
- Benedikt Brüggemeier (skidd13) - Bug fixer and code reworker (0.6 - 0.7)
|
||||
- Serge Paquet (vurlix) - 2nd contributor after ludde (0.1 - 0.3)
|
||||
|
||||
### Thanks to:
|
||||
|
||||
- Josef Drexler - For his great work on TTDPatch.
|
||||
- Marcin Grzegorczyk - For his TTDPatch work and documentation of Transport Tycoon Deluxe internals and track foundations
|
||||
- Stefan Meißner (sign_de) - For his work on the console
|
||||
- Mike Ragsdale - OpenTTD installer
|
||||
- Christian Rosentreter (tokai) - MorphOS / AmigaOS port
|
||||
- Richard Kempton (RichK67) - Additional airports, initial TGP implementation
|
||||
- Alberto Demichelis - Squirrel scripting language
|
||||
- L. Peter Deutsch - MD5 implementation
|
||||
- Michael Blunck - For revolutionizing TTD with awesome graphics
|
||||
- George - Canal graphics
|
||||
- Andrew Parkhouse (andythenorth) - River graphics
|
||||
- David Dallaston (Pikka) - Tram tracks
|
||||
- All Translators - For their support to make OpenTTD a truly international game
|
||||
- Bug Reporters - Thanks for all bug reports
|
||||
- Chris Sawyer - For an amazing game!
|
||||
'Official' channels
|
||||
|
||||
- [OpenTTD website](https://www.openttd.org)
|
||||
- IRC chat using #openttd on irc.oftc.net [more info about our irc channel](https://wiki.openttd.org/en/Development/IRC%20channel)
|
||||
- [OpenTTD on Github](https://github.com/openTTD/) for code repositories and for reporting issues
|
||||
- [forum.openttd.org](https://forum.openttd.org/) - the primary community forum site for discussing OpenTTD and related games
|
||||
- [OpenTTD wiki](https://wiki.openttd.org/) community-maintained wiki, including topics like gameplay guide, detailed explanation of some game mechanics, how to use add-on content (mods) and much more
|
||||
|
||||
'Unofficial' channels
|
||||
|
||||
- the OpenTTD wiki has a [page listing OpenTTD communities](https://wiki.openttd.org/en/Community/Community) including some in languages other than English
|
||||
|
||||
|
||||
### 2.1) Contributing to OpenTTD
|
||||
|
||||
We welcome contributors to OpenTTD. More information for contributors can be found in [CONTRIBUTING.md](./CONTRIBUTING.md)
|
||||
|
||||
|
||||
### 2.2) Reporting bugs
|
||||
|
||||
Good bug reports are very helpful. We have a [guide to reporting bugs](./CONTRIBUTING.md#bug-reports) to help with this.
|
||||
|
||||
Desyncs in multiplayer are complex to debug and report (some software development skils are required).
|
||||
Instructions can be found in [debugging and reporting desyncs](./docs/debugging_desyncs.md).
|
||||
|
||||
|
||||
### 2.3) Translating
|
||||
|
||||
OpenTTD is translated into many languages. Translations are added and updated via the [online translation tool](https://translator.openttd.org).
|
||||
|
||||
|
||||
## 3.0) Licensing
|
||||
|
||||
OpenTTD is licensed under the GNU General Public License version 2.0.
|
||||
For the complete license text, see the file '[COPYING.md](./COPYING.md)'.
|
||||
This license applies to all files in this distribution, except as noted below.
|
||||
|
||||
The squirrel implementation in `src/3rdparty/squirrel` is licensed under the Zlib license.
|
||||
See `src/3rdparty/squirrel/COPYRIGHT` for the complete license text.
|
||||
|
||||
The md5 implementation in `src/3rdparty/md5` is licensed under the Zlib license.
|
||||
See the comments in the source files in `src/3rdparty/md5` for the complete license text.
|
||||
|
||||
The implementations of Posix `getaddrinfo` and `getnameinfo` for OS/2 in `src/3rdparty/os2` are distributed partly under the GNU Lesser General Public License 2.1, and partly under the (3-clause) BSD license.
|
||||
The exact licensing terms can be found in `src/3rdparty/os2/getaddrinfo.c` resp. `src/3rdparty/os2/getnameinfo.c`.
|
||||
|
||||
|
||||
## 4.0 Credits
|
||||
|
||||
See [CREDITS.md](./CREDITS.md)
|
||||
|
@@ -1,64 +0,0 @@
|
||||
trigger:
|
||||
- master
|
||||
pr:
|
||||
- master
|
||||
|
||||
jobs:
|
||||
- job: windows
|
||||
displayName: 'Windows'
|
||||
pool:
|
||||
vmImage: 'VS2017-Win2016'
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
Win32:
|
||||
BuildPlatform: 'Win32'
|
||||
Win64:
|
||||
BuildPlatform: 'x64'
|
||||
|
||||
steps:
|
||||
- template: azure-pipelines/templates/ci-git-rebase.yml
|
||||
- template: azure-pipelines/templates/windows-dependencies.yml
|
||||
- template: azure-pipelines/templates/ci-opengfx.yml
|
||||
- template: azure-pipelines/templates/windows-build.yml
|
||||
parameters:
|
||||
BuildPlatform: $(BuildPlatform)
|
||||
- script: |
|
||||
call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x86
|
||||
cd projects
|
||||
call regression.bat
|
||||
displayName: 'Test'
|
||||
|
||||
- job: linux
|
||||
displayName: 'Linux'
|
||||
pool:
|
||||
vmImage: 'ubuntu-16.04'
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
commit-checker: {}
|
||||
linux-amd64-clang-3.8: {}
|
||||
linux-amd64-gcc-6: {}
|
||||
linux-i386-gcc-6: {}
|
||||
|
||||
steps:
|
||||
- template: azure-pipelines/templates/ci-git-rebase.yml
|
||||
# The dockers already have the dependencies installed
|
||||
# The dockers already have OpenGFX installed
|
||||
- template: azure-pipelines/templates/linux-build.yml
|
||||
parameters:
|
||||
Image: compile-farm-ci
|
||||
Tag: $(Agent.JobName)
|
||||
|
||||
- job: macos
|
||||
displayName: 'MacOS'
|
||||
pool:
|
||||
vmImage: 'macOS-10.13'
|
||||
|
||||
steps:
|
||||
- template: azure-pipelines/templates/ci-git-rebase.yml
|
||||
- template: azure-pipelines/templates/osx-dependencies.yml
|
||||
- template: azure-pipelines/templates/ci-opengfx.yml
|
||||
- template: azure-pipelines/templates/osx-build.yml
|
||||
- script: 'make regression'
|
||||
displayName: 'Test'
|
@@ -1,10 +0,0 @@
|
||||
trigger:
|
||||
branches:
|
||||
include:
|
||||
- refs/tags/*
|
||||
pr: none
|
||||
|
||||
jobs:
|
||||
- template: azure-pipelines/templates/release.yml
|
||||
parameters:
|
||||
IsStableRelease: true
|
@@ -1,7 +0,0 @@
|
||||
trigger: none
|
||||
pr: none
|
||||
|
||||
jobs:
|
||||
- template: azure-pipelines/templates/release.yml
|
||||
parameters:
|
||||
IsStableRelease: false
|
@@ -1,20 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
tag=$(git describe --tags 2>/dev/null)
|
||||
|
||||
# If we are a tag, show the part of the changelog that matches the tag.
|
||||
# In case of a stable, also show all betas and RCs.
|
||||
if [ -n "$tag" ]; then
|
||||
grep="."
|
||||
if [ "$(echo $tag | grep '-')" = "" ]; then
|
||||
grep='^[0-9]\.[0-9]\.[0-9][^-]'
|
||||
fi
|
||||
next=$(cat changelog.txt | grep '^[0-9]' | awk 'BEGIN { show="false" } // { if (show=="true") print $0; if ($1=="'$tag'") show="true"} ' | grep "$grep" | head -n1 | sed 's/ .*//')
|
||||
cat changelog.txt | awk 'BEGIN { show="false" } /^[0-9].[0-9].[0-9]/ { if ($1=="'$next'") show="false"; if ($1=="'$tag'") show="true";} // { if (show=="true") print $0 }'
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# In all other cases, show the git log of the last 7 days
|
||||
revdate=$(git log -1 --pretty=format:"%ci")
|
||||
last_week=$(date -u -d "$revdate -7days" +"%Y-%m-%d %H:%M")
|
||||
git log --after="${last_week}" --pretty=fuller
|
@@ -1,60 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -ex
|
||||
|
||||
if [ -z "$1" ]; then
|
||||
echo "Usage: $0 <folder-with-bundles>"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
FOLDER=$1
|
||||
|
||||
if [ ! -e .version ] || [ ! -e .release_date ]; then
|
||||
echo "This script should be executed in the root of an extracted source tarball"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Find the name based on the version
|
||||
if [ "${ISSTABLERELEASE}" = "true" ]; then
|
||||
isTesting=$(cat .version | grep "RC\|beta" || true)
|
||||
if [ -z "${isTesting}" ]; then
|
||||
NAME="stable"
|
||||
else
|
||||
NAME="testing"
|
||||
fi
|
||||
else
|
||||
NAME=$(cat .version | cut -d- -f2 | cut -d- -f-2)
|
||||
fi
|
||||
|
||||
# Convert the date to a YAML date
|
||||
DATE=$(cat .release_date | tr ' ' T | sed 's/TUTC/:00-00:00/')
|
||||
VERSION=$(cat .version)
|
||||
BASE="openttd-${VERSION}"
|
||||
|
||||
echo "name: ${NAME}" >> manifest.yaml
|
||||
echo "date: ${DATE}" >> manifest.yaml
|
||||
echo "base: ${BASE}-" >> manifest.yaml
|
||||
echo "files:" >> manifest.yaml
|
||||
|
||||
error=""
|
||||
for i in $(ls ${FOLDER} | grep -v ".txt$\|.md$\|sum$" | sort); do
|
||||
if [ -n "$(echo $i | grep pdb.xz)" ]; then continue; fi
|
||||
if [ -n "$(echo $i | grep dbg.deb)" ]; then continue; fi
|
||||
|
||||
if [ ! -e ${FOLDER}/$i.md5sum ] || [ ! -e ${FOLDER}/$i.sha1sum ] || [ ! -e ${FOLDER}/$i.sha256sum ]; then
|
||||
echo "ERROR: missing checksum file for ${i}" 1>&2
|
||||
error="y"
|
||||
continue
|
||||
fi
|
||||
|
||||
echo "- id: $i" >> manifest.yaml
|
||||
echo " size: $(stat -c"%s" ${FOLDER}/$i)" >> manifest.yaml
|
||||
echo " md5sum: $(cat ${FOLDER}/$i.md5sum | cut -d\ -f1)" >> manifest.yaml
|
||||
echo " sha1sum: $(cat ${FOLDER}/$i.sha1sum | cut -d\ -f1)" >> manifest.yaml
|
||||
echo " sha256sum: $(cat ${FOLDER}/$i.sha256sum | cut -d\ -f1)" >> manifest.yaml
|
||||
done
|
||||
|
||||
if [ -n "${error}" ]; then
|
||||
echo "ERROR: exiting due to earlier errors" 1>&2
|
||||
exit 1
|
||||
fi
|
@@ -1,9 +0,0 @@
|
||||
steps:
|
||||
# Rebase to origin/master for every PR. This means users don't have to
|
||||
# rebase every time master changes. As long as the PR applies cleanly, we
|
||||
# will validate it.
|
||||
- script: |
|
||||
git config user.email 'info@openttd.org'
|
||||
git config user.name 'OpenTTD CI'
|
||||
git rebase origin/master
|
||||
displayName: 'Rebase to master'
|
@@ -1,8 +0,0 @@
|
||||
steps:
|
||||
- bash: |
|
||||
set -ex
|
||||
cd bin/baseset
|
||||
curl -L https://binaries.openttd.org/extra/opengfx/0.5.2/opengfx-0.5.2-all.zip > opengfx-0.5.2-all.zip
|
||||
unzip opengfx-0.5.2-all.zip
|
||||
rm -f opengfx-0.5.2-all.zip
|
||||
displayName: 'Install OpenGFX'
|
@@ -1,18 +0,0 @@
|
||||
parameters:
|
||||
Image: ''
|
||||
Tag: ''
|
||||
ContainerCommand: ''
|
||||
|
||||
steps:
|
||||
- task: Docker@1
|
||||
${{ if eq(parameters.Image, 'compile-farm') }}:
|
||||
displayName: 'Build'
|
||||
${{ if eq(parameters.Image, 'compile-farm-ci') }}:
|
||||
displayName: 'Build and test'
|
||||
inputs:
|
||||
command: 'Run an image'
|
||||
imageName: openttd/${{ parameters.Image }}:${{ parameters.Tag }}
|
||||
volumes: '$(Build.SourcesDirectory):$(Build.SourcesDirectory)'
|
||||
workingDirectory: '$(Build.SourcesDirectory)'
|
||||
containerCommand: ${{ parameters.ContainerCommand }}
|
||||
runInBackground: false
|
@@ -1,5 +0,0 @@
|
||||
steps:
|
||||
# Because we run the compile in a docker (under root), we are not owner
|
||||
# of the 'bundles' folder. Fix that by executing a chown on it.
|
||||
- bash: sudo chown -R $(id -u):$(id -g) bundles
|
||||
displayName: 'Claim bundles folder back'
|
@@ -1,5 +0,0 @@
|
||||
steps:
|
||||
- script: './configure PKG_CONFIG_PATH=/usr/local/lib/pkgconfig --enable-static'
|
||||
displayName: 'Configure'
|
||||
- script: 'make -j2'
|
||||
displayName: 'Build'
|
@@ -1,11 +0,0 @@
|
||||
steps:
|
||||
- script: |
|
||||
set -ex
|
||||
HOMEBREW_NO_AUTO_UPDATE=1 brew install pkg-config lzo xz libpng
|
||||
# Remove the dynamic libraries of these libraries, to ensure we use
|
||||
# the static versions. That is important, as it is unlikely any
|
||||
# end-user has these brew libraries installed.
|
||||
rm /usr/local/Cellar/lzo/*/lib/*.dylib
|
||||
rm /usr/local/Cellar/xz/*/lib/*.dylib
|
||||
rm /usr/local/Cellar/libpng/*/lib/*.dylib
|
||||
displayName: 'Install dependencies'
|
@@ -1,19 +0,0 @@
|
||||
parameters:
|
||||
CalculateChecksums: true
|
||||
|
||||
steps:
|
||||
- ${{ if eq(parameters.CalculateChecksums, true) }}:
|
||||
- bash: |
|
||||
set -ex
|
||||
cd bundles
|
||||
for i in $(ls); do
|
||||
openssl dgst -r -md5 -hex $i > $i.md5sum
|
||||
openssl dgst -r -sha1 -hex $i > $i.sha1sum
|
||||
openssl dgst -r -sha256 -hex $i > $i.sha256sum
|
||||
done
|
||||
displayName: 'Calculate checksums'
|
||||
- task: PublishBuildArtifacts@1
|
||||
displayName: 'Publish bundles'
|
||||
inputs:
|
||||
PathtoPublish: bundles/
|
||||
ArtifactName: bundles
|
@@ -1,20 +0,0 @@
|
||||
# Fetch the source tarball as prepared by an earlier job. In there is the
|
||||
# version predefined. This ensures we are all going to compile the same
|
||||
# source with the same version.
|
||||
|
||||
steps:
|
||||
- checkout: none
|
||||
- task: DownloadBuildArtifacts@0
|
||||
displayName: 'Download source'
|
||||
inputs:
|
||||
downloadType: specific
|
||||
itemPattern: 'bundles/openttd-*-source.tar.xz'
|
||||
downloadPath: '$(Build.ArtifactStagingDirectory)'
|
||||
- bash: tar --xz -xf ../a/bundles/openttd-*-source.tar.xz --strip-components=1
|
||||
displayName: 'Extracting source'
|
||||
- bash: |
|
||||
set -e
|
||||
VERSION=$(cat .version)
|
||||
echo "${VERSION}"
|
||||
echo "##vso[build.updatebuildnumber]${VERSION}"
|
||||
displayName: 'Change BuildNumber to version'
|
@@ -1,13 +0,0 @@
|
||||
steps:
|
||||
- task: DownloadBuildArtifacts@0
|
||||
displayName: 'Download all bundles'
|
||||
inputs:
|
||||
downloadType: specific
|
||||
itemPattern: 'bundles/*'
|
||||
downloadPath: '$(Build.ArtifactStagingDirectory)'
|
||||
- script: |
|
||||
set -ex
|
||||
./azure-pipelines/manifest.sh ../a/bundles/
|
||||
mkdir -p bundles
|
||||
mv manifest.yaml bundles/
|
||||
displayName: 'Create manifest.yaml'
|
@@ -1,35 +0,0 @@
|
||||
# Set the revisions, and remove the VCS files.
|
||||
# This ensures everything else picks up on the predefined versions, and not
|
||||
# that because of some build process the version all of a sudden changes.
|
||||
|
||||
steps:
|
||||
- script: |
|
||||
set -ex
|
||||
|
||||
if [ -n "${SYSTEM_PULLREQUEST_PULLREQUESTNUMBER}" ]; then
|
||||
# We are triggered from a GitHub Pull Request
|
||||
git checkout -B pr${SYSTEM_PULLREQUEST_PULLREQUESTNUMBER}
|
||||
elif [ "${BUILD_SOURCEBRANCHNAME}" = "merge" ] || [ "${BUILD_SOURCEBRANCHNAME}" = "head" ]; then
|
||||
# We are manually triggered based on a GitHub Pull Request
|
||||
PULLREQUESTNUMBER=$(echo ${BUILD_SOURCEBRANCH} | cut -d/ -f3)
|
||||
git checkout -B pr${PULLREQUESTNUMBER}
|
||||
else
|
||||
git checkout -B ${BUILD_SOURCEBRANCHNAME}
|
||||
fi
|
||||
|
||||
./findversion.sh > .ottdrev
|
||||
./azure-pipelines/changelog.sh > .changelog
|
||||
TZ='UTC' date +"%Y-%m-%d %H:%M UTC" > .release_date
|
||||
cat .ottdrev | cut -f 1 -d$'\t' > .version
|
||||
echo "Release Date: $(cat .release_date)"
|
||||
echo "Revision: $(cat .ottdrev)"
|
||||
echo "Version: $(cat .version)"
|
||||
displayName: 'Create version files'
|
||||
- script: |
|
||||
set -e
|
||||
VERSION=$(cat .version)
|
||||
echo "${VERSION}"
|
||||
echo "##vso[build.updatebuildnumber]${VERSION}"
|
||||
displayName: 'Change BuildNumber to version'
|
||||
- script: find . -iname .hg -or -iname .git -or -iname .svn | xargs rm -rf
|
||||
displayName: 'Remove VCS information'
|
@@ -1,169 +0,0 @@
|
||||
parameters:
|
||||
# If this is false, not all targets are triggered. For example:
|
||||
# The NSIS installer for Windows and the creation of debs only work for
|
||||
# releases. Not for any other type of binary. So they are skilled if this
|
||||
# is set to false.
|
||||
IsStableRelease: false
|
||||
|
||||
jobs:
|
||||
- job: source
|
||||
displayName: 'Source'
|
||||
pool:
|
||||
vmImage: 'ubuntu-16.04'
|
||||
|
||||
steps:
|
||||
- template: release-prepare-source.yml
|
||||
- script: |
|
||||
set -ex
|
||||
|
||||
# Rename the folder to openttd-NNN-source
|
||||
mkdir openttd-$(Build.BuildNumber)
|
||||
find . -maxdepth 1 -not -name . -not -name openttd-$(Build.BuildNumber) -exec mv {} openttd-$(Build.BuildNumber)/ \;
|
||||
# Copy back release_date, as it is needed for the template 'release-bundles'
|
||||
cp openttd-$(Build.BuildNumber)/.release_date .release_date
|
||||
|
||||
mkdir bundles
|
||||
tar --xz -cf bundles/openttd-$(Build.BuildNumber)-source.tar.xz openttd-$(Build.BuildNumber)
|
||||
zip -9 -r -q bundles/openttd-$(Build.BuildNumber)-source.zip openttd-$(Build.BuildNumber)
|
||||
displayName: 'Create bundle'
|
||||
- template: release-bundles.yml
|
||||
|
||||
- job: meta
|
||||
displayName: 'Metadata'
|
||||
pool:
|
||||
vmImage: 'ubuntu-16.04'
|
||||
dependsOn: source
|
||||
|
||||
steps:
|
||||
- template: release-fetch-source.yml
|
||||
- script: |
|
||||
set -ex
|
||||
|
||||
mkdir -p bundles
|
||||
cp .changelog bundles/changelog.txt
|
||||
cp .release_date bundles/released.txt
|
||||
cp README.md bundles/README.md
|
||||
displayName: 'Copy meta files'
|
||||
- template: release-bundles.yml
|
||||
parameters:
|
||||
CalculateChecksums: false
|
||||
|
||||
- job: docs
|
||||
displayName: 'Docs'
|
||||
pool:
|
||||
vmImage: 'ubuntu-16.04'
|
||||
dependsOn: source
|
||||
|
||||
steps:
|
||||
- template: release-fetch-source.yml
|
||||
- template: linux-build.yml
|
||||
parameters:
|
||||
Image: compile-farm
|
||||
ContainerCommand: '$(Build.BuildNumber)'
|
||||
Tag: docs
|
||||
- template: linux-claim-bundles.yml
|
||||
- template: release-bundles.yml
|
||||
|
||||
- job: windows
|
||||
displayName: 'Windows'
|
||||
pool:
|
||||
vmImage: 'VS2017-Win2016'
|
||||
dependsOn: source
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
Win32:
|
||||
BuildPlatform: 'Win32'
|
||||
BundlePlatform: 'win32'
|
||||
Win64:
|
||||
BuildPlatform: 'x64'
|
||||
BundlePlatform: 'win64'
|
||||
|
||||
steps:
|
||||
- template: release-fetch-source.yml
|
||||
- template: windows-dependencies.yml
|
||||
- template: windows-dependency-zip.yml
|
||||
- ${{ if eq(parameters.IsStableRelease, true) }}:
|
||||
- template: windows-dependency-nsis.yml
|
||||
- template: windows-build.yml
|
||||
parameters:
|
||||
BuildPlatform: $(BuildPlatform)
|
||||
- bash: |
|
||||
set -ex
|
||||
make -f Makefile.msvc bundle_pdb bundle_zip PLATFORM=$(BundlePlatform) BUNDLE_NAME=openttd-$(Build.BuildNumber)-windows-$(BundlePlatform)
|
||||
displayName: 'Create bundles'
|
||||
- ${{ if eq(parameters.IsStableRelease, true) }}:
|
||||
- bash: |
|
||||
set -ex
|
||||
# NSIS will be part of the Hosted image in the next update. Till then, we set the PATH ourself
|
||||
export PATH="${PATH}:/c/Program Files (x86)/NSIS"
|
||||
make -f Makefile.msvc bundle_exe PLATFORM=$(BundlePlatform) BUNDLE_NAME=openttd-$(Build.BuildNumber)-windows-$(BundlePlatform)
|
||||
displayName: 'Create installer bundle'
|
||||
- template: release-bundles.yml
|
||||
|
||||
- ${{ if eq(parameters.IsStableRelease, true) }}:
|
||||
- job: linux_stable
|
||||
displayName: 'Linux'
|
||||
pool:
|
||||
vmImage: 'ubuntu-16.04'
|
||||
dependsOn: source
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
linux-ubuntu-xenial-i386-gcc: {}
|
||||
linux-ubuntu-xenial-amd64-gcc: {}
|
||||
linux-ubuntu-bionic-i386-gcc: {}
|
||||
linux-ubuntu-bionic-amd64-gcc: {}
|
||||
linux-debian-jessie-i386-gcc: {}
|
||||
linux-debian-jessie-amd64-gcc: {}
|
||||
linux-debian-stretch-i386-gcc: {}
|
||||
linux-debian-stretch-amd64-gcc: {}
|
||||
|
||||
steps:
|
||||
- template: release-fetch-source.yml
|
||||
- template: linux-build.yml
|
||||
parameters:
|
||||
Image: compile-farm
|
||||
ContainerCommand: '$(Build.BuildNumber)'
|
||||
Tag: $(Agent.JobName)
|
||||
- template: linux-claim-bundles.yml
|
||||
- template: release-bundles.yml
|
||||
|
||||
- job: macos
|
||||
displayName: 'MacOS'
|
||||
pool:
|
||||
vmImage: 'macOS-10.13'
|
||||
dependsOn: source
|
||||
|
||||
steps:
|
||||
- template: release-fetch-source.yml
|
||||
- template: osx-dependencies.yml
|
||||
- template: osx-build.yml
|
||||
- script: 'make bundle_zip bundle_dmg BUNDLE_NAME=openttd-$(Build.BuildNumber)-macosx'
|
||||
displayName: 'Create bundles'
|
||||
- template: release-bundles.yml
|
||||
|
||||
- job: manifest
|
||||
displayName: 'Manifest'
|
||||
pool:
|
||||
vmImage: 'ubuntu-16.04'
|
||||
dependsOn:
|
||||
- source
|
||||
- docs
|
||||
- windows
|
||||
- ${{ if eq(parameters.IsStableRelease, true) }}:
|
||||
- linux_stable
|
||||
- macos
|
||||
# "Skipped" is not a status, and is not succeeded. So it seems to be
|
||||
# considered failed. So we trigger if all the earlier jobs are done (which
|
||||
# might be succeeded, failed, or skipped), and run this job. This is not
|
||||
# optimal, but given the rules, it is the only way to get this to work (as
|
||||
# some jobs might be skipped).
|
||||
condition: succeededOrFailed()
|
||||
|
||||
steps:
|
||||
- template: release-fetch-source.yml
|
||||
- template: release-manifest.yml
|
||||
- template: release-bundles.yml
|
||||
parameters:
|
||||
CalculateChecksums: false
|
@@ -1,11 +0,0 @@
|
||||
parameters:
|
||||
BuildPlatform: ''
|
||||
|
||||
steps:
|
||||
- task: VSBuild@1
|
||||
displayName: 'Build'
|
||||
inputs:
|
||||
solution: 'projects/openttd_vs141.sln'
|
||||
platform: ${{ parameters.BuildPlatform }}
|
||||
configuration: Release
|
||||
maximumCpuCount: true
|
@@ -1,10 +0,0 @@
|
||||
steps:
|
||||
- bash: |
|
||||
set -ex
|
||||
curl -L https://github.com/OpenTTD/CompileFarm/releases/download/latest/windows-dependencies.zip > windows-dependencies.zip
|
||||
unzip windows-dependencies.zip
|
||||
rm -f windows-dependencies.zip
|
||||
displayName: 'Download dependencies'
|
||||
workingDirectory: $(Build.ArtifactStagingDirectory)
|
||||
- script: $(Build.ArtifactStagingDirectory)\windows-dependencies\vcpkg.exe integrate install
|
||||
displayName: 'Install dependencies'
|
@@ -1,26 +0,0 @@
|
||||
parameters:
|
||||
condition: true
|
||||
|
||||
steps:
|
||||
- bash: |
|
||||
set -ex
|
||||
|
||||
mkdir nsis-plugin; cd nsis-plugin
|
||||
curl -L https://devs.openttd.org/~truebrain/nsis-plugins/Nsis7z.zip > Nsis7z.zip
|
||||
unzip Nsis7z.zip
|
||||
cp -R Plugins/* "/c/Program Files (x86)/NSIS/Plugins/"
|
||||
cd ..; rm -rf nsis-plugin
|
||||
|
||||
mkdir nsis-plugin; cd nsis-plugin
|
||||
curl -L https://devs.openttd.org/~truebrain/nsis-plugins/NsisGetVersion.zip > NsisGetVersion.zip
|
||||
unzip NsisGetVersion.zip
|
||||
cp -R Plugins/* "/c/Program Files (x86)/NSIS/Plugins/x86-ansi/"
|
||||
cd ..; rm -rf nsis-plugin
|
||||
|
||||
mkdir nsis-plugin; cd nsis-plugin
|
||||
curl -L https://devs.openttd.org/~truebrain/nsis-plugins/NsisFindProc.zip > NsisFindProc.zip
|
||||
unzip NsisFindProc.zip
|
||||
cp -R *.dll "/c/Program Files (x86)/NSIS/Plugins/x86-ansi/"
|
||||
cd ..; rm -rf nsis-plugin
|
||||
displayName: 'Install NSIS with the 7z, GetVersion, and FindProc plugins'
|
||||
condition: and(succeeded(), ${{ parameters.condition }})
|
@@ -1,5 +0,0 @@
|
||||
steps:
|
||||
- bash: |
|
||||
set -ex
|
||||
choco install zip
|
||||
displayName: 'Install zip'
|
2
bin/CMakeLists.txt
Normal file
2
bin/CMakeLists.txt
Normal file
@@ -0,0 +1,2 @@
|
||||
add_subdirectory(ai)
|
||||
add_subdirectory(game)
|
39
bin/ai/CMakeLists.txt
Normal file
39
bin/ai/CMakeLists.txt
Normal file
@@ -0,0 +1,39 @@
|
||||
set(AI_COMPAT_SOURCE_FILES
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/compat_0.7.nut
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/compat_1.0.nut
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/compat_1.1.nut
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/compat_1.2.nut
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/compat_1.3.nut
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/compat_1.4.nut
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/compat_1.5.nut
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/compat_1.6.nut
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/compat_1.7.nut
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/compat_1.8.nut
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/compat_1.9.nut
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/compat_1.10.nut
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/compat_1.11.nut
|
||||
)
|
||||
|
||||
foreach(AI_COMPAT_SOURCE_FILE IN LISTS AI_COMPAT_SOURCE_FILES)
|
||||
string(REPLACE "${CMAKE_SOURCE_DIR}/bin/" "" AI_COMPAT_SOURCE_FILE_NAME "${AI_COMPAT_SOURCE_FILE}")
|
||||
string(CONCAT AI_COMPAT_BINARY_FILE "${CMAKE_BINARY_DIR}/" "${AI_COMPAT_SOURCE_FILE_NAME}")
|
||||
|
||||
add_custom_command(OUTPUT ${AI_COMPAT_BINARY_FILE}
|
||||
COMMAND ${CMAKE_COMMAND} -E copy
|
||||
${AI_COMPAT_SOURCE_FILE}
|
||||
${AI_COMPAT_BINARY_FILE}
|
||||
MAIN_DEPENDENCY ${AI_COMPAT_SOURCE_FILE}
|
||||
COMMENT "Copying ${AI_COMPAT_SOURCE_FILE_NAME}"
|
||||
)
|
||||
|
||||
list(APPEND AI_COMPAT_BINARY_FILES ${AI_COMPAT_BINARY_FILE})
|
||||
endforeach()
|
||||
|
||||
# Create a new target which copies all compat files
|
||||
add_custom_target(ai_compat_files
|
||||
DEPENDS ${AI_COMPAT_BINARY_FILES}
|
||||
)
|
||||
|
||||
add_dependencies(openttd
|
||||
ai_compat_files
|
||||
)
|
@@ -1,5 +1,3 @@
|
||||
/* $Id$ */
|
||||
|
||||
/*
|
||||
* This file is part of OpenTTD.
|
||||
* OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
|
||||
@@ -374,3 +372,10 @@ AIBridge.GetName <- function(bridge_id)
|
||||
{
|
||||
return AIBridge._GetName(bridge_id, AIVehicle.VT_RAIL);
|
||||
}
|
||||
|
||||
/* 1.9 adds parent_group_id to CreateGroup function */
|
||||
AIGroup._CreateGroup <- AIGroup.CreateGroup;
|
||||
AIGroup.CreateGroup <- function(vehicle_type)
|
||||
{
|
||||
return AIGroup._CreateGroup(vehicle_type, AIGroup.GROUP_INVALID);
|
||||
}
|
||||
|
@@ -1,5 +1,3 @@
|
||||
/* $Id$ */
|
||||
|
||||
/*
|
||||
* This file is part of OpenTTD.
|
||||
* OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
|
||||
@@ -126,3 +124,10 @@ AIBridge.GetName <- function(bridge_id)
|
||||
{
|
||||
return AIBridge._GetName(bridge_id, AIVehicle.VT_RAIL);
|
||||
}
|
||||
|
||||
/* 1.9 adds parent_group_id to CreateGroup function */
|
||||
AIGroup._CreateGroup <- AIGroup.CreateGroup;
|
||||
AIGroup.CreateGroup <- function(vehicle_type)
|
||||
{
|
||||
return AIGroup._CreateGroup(vehicle_type, AIGroup.GROUP_INVALID);
|
||||
}
|
||||
|
@@ -1,5 +1,3 @@
|
||||
/* $Id$ */
|
||||
|
||||
/*
|
||||
* This file is part of OpenTTD.
|
||||
* OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
|
||||
@@ -63,3 +61,10 @@ AIBridge.GetName <- function(bridge_id)
|
||||
{
|
||||
return AIBridge._GetName(bridge_id, AIVehicle.VT_RAIL);
|
||||
}
|
||||
|
||||
/* 1.9 adds parent_group_id to CreateGroup function */
|
||||
AIGroup._CreateGroup <- AIGroup.CreateGroup;
|
||||
AIGroup.CreateGroup <- function(vehicle_type)
|
||||
{
|
||||
return AIGroup._CreateGroup(vehicle_type, AIGroup.GROUP_INVALID);
|
||||
}
|
||||
|
8
bin/ai/compat_1.10.nut
Normal file
8
bin/ai/compat_1.10.nut
Normal file
@@ -0,0 +1,8 @@
|
||||
/*
|
||||
* This file is part of OpenTTD.
|
||||
* OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
|
||||
* OpenTTD 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 OpenTTD. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
AILog.Info("1.10 API compatibility in effect.");
|
6
bin/ai/compat_1.11.nut
Normal file
6
bin/ai/compat_1.11.nut
Normal file
@@ -0,0 +1,6 @@
|
||||
/*
|
||||
* This file is part of OpenTTD.
|
||||
* OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
|
||||
* OpenTTD 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 OpenTTD. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
@@ -1,5 +1,3 @@
|
||||
/* $Id$ */
|
||||
|
||||
/*
|
||||
* This file is part of OpenTTD.
|
||||
* OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
|
||||
@@ -15,3 +13,10 @@ AIBridge.GetName <- function(bridge_id)
|
||||
{
|
||||
return AIBridge._GetName(bridge_id, AIVehicle.VT_RAIL);
|
||||
}
|
||||
|
||||
/* 1.9 adds parent_group_id to CreateGroup function */
|
||||
AIGroup._CreateGroup <- AIGroup.CreateGroup;
|
||||
AIGroup.CreateGroup <- function(vehicle_type)
|
||||
{
|
||||
return AIGroup._CreateGroup(vehicle_type, AIGroup.GROUP_INVALID);
|
||||
}
|
||||
|
@@ -1,5 +1,3 @@
|
||||
/* $Id$ */
|
||||
|
||||
/*
|
||||
* This file is part of OpenTTD.
|
||||
* OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
|
||||
@@ -15,3 +13,10 @@ AIBridge.GetName <- function(bridge_id)
|
||||
{
|
||||
return AIBridge._GetName(bridge_id, AIVehicle.VT_RAIL);
|
||||
}
|
||||
|
||||
/* 1.9 adds parent_group_id to CreateGroup function */
|
||||
AIGroup._CreateGroup <- AIGroup.CreateGroup;
|
||||
AIGroup.CreateGroup <- function(vehicle_type)
|
||||
{
|
||||
return AIGroup._CreateGroup(vehicle_type, AIGroup.GROUP_INVALID);
|
||||
}
|
||||
|
@@ -1,5 +1,3 @@
|
||||
/* $Id$ */
|
||||
|
||||
/*
|
||||
* This file is part of OpenTTD.
|
||||
* OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
|
||||
@@ -15,3 +13,10 @@ AIBridge.GetName <- function(bridge_id)
|
||||
{
|
||||
return AIBridge._GetName(bridge_id, AIVehicle.VT_RAIL);
|
||||
}
|
||||
|
||||
/* 1.9 adds parent_group_id to CreateGroup function */
|
||||
AIGroup._CreateGroup <- AIGroup.CreateGroup;
|
||||
AIGroup.CreateGroup <- function(vehicle_type)
|
||||
{
|
||||
return AIGroup._CreateGroup(vehicle_type, AIGroup.GROUP_INVALID);
|
||||
}
|
||||
|
@@ -1,5 +1,3 @@
|
||||
/* $Id$ */
|
||||
|
||||
/*
|
||||
* This file is part of OpenTTD.
|
||||
* OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
|
||||
@@ -15,3 +13,10 @@ AIBridge.GetName <- function(bridge_id)
|
||||
{
|
||||
return AIBridge._GetName(bridge_id, AIVehicle.VT_RAIL);
|
||||
}
|
||||
|
||||
/* 1.9 adds parent_group_id to CreateGroup function */
|
||||
AIGroup._CreateGroup <- AIGroup.CreateGroup;
|
||||
AIGroup.CreateGroup <- function(vehicle_type)
|
||||
{
|
||||
return AIGroup._CreateGroup(vehicle_type, AIGroup.GROUP_INVALID);
|
||||
}
|
||||
|
@@ -1,5 +1,3 @@
|
||||
/* $Id$ */
|
||||
|
||||
/*
|
||||
* This file is part of OpenTTD.
|
||||
* OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
|
||||
@@ -15,3 +13,10 @@ AIBridge.GetName <- function(bridge_id)
|
||||
{
|
||||
return AIBridge._GetName(bridge_id, AIVehicle.VT_RAIL);
|
||||
}
|
||||
|
||||
/* 1.9 adds parent_group_id to CreateGroup function */
|
||||
AIGroup._CreateGroup <- AIGroup.CreateGroup;
|
||||
AIGroup.CreateGroup <- function(vehicle_type)
|
||||
{
|
||||
return AIGroup._CreateGroup(vehicle_type, AIGroup.GROUP_INVALID);
|
||||
}
|
||||
|
@@ -1,5 +1,3 @@
|
||||
/* $Id$ */
|
||||
|
||||
/*
|
||||
* This file is part of OpenTTD.
|
||||
* OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
|
||||
@@ -15,3 +13,10 @@ AIBridge.GetName <- function(bridge_id)
|
||||
{
|
||||
return AIBridge._GetName(bridge_id, AIVehicle.VT_RAIL);
|
||||
}
|
||||
|
||||
/* 1.9 adds parent_group_id to CreateGroup function */
|
||||
AIGroup._CreateGroup <- AIGroup.CreateGroup;
|
||||
AIGroup.CreateGroup <- function(vehicle_type)
|
||||
{
|
||||
return AIGroup._CreateGroup(vehicle_type, AIGroup.GROUP_INVALID);
|
||||
}
|
||||
|
@@ -1,5 +1,3 @@
|
||||
/* $Id$ */
|
||||
|
||||
/*
|
||||
* This file is part of OpenTTD.
|
||||
* OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
|
||||
@@ -15,3 +13,10 @@ AIBridge.GetName <- function(bridge_id)
|
||||
{
|
||||
return AIBridge._GetName(bridge_id, AIVehicle.VT_RAIL);
|
||||
}
|
||||
|
||||
/* 1.9 adds parent_group_id to CreateGroup function */
|
||||
AIGroup._CreateGroup <- AIGroup.CreateGroup;
|
||||
AIGroup.CreateGroup <- function(vehicle_type)
|
||||
{
|
||||
return AIGroup._CreateGroup(vehicle_type, AIGroup.GROUP_INVALID);
|
||||
}
|
||||
|
@@ -1,8 +1,8 @@
|
||||
/* $Id$ */
|
||||
|
||||
/*
|
||||
* This file is part of OpenTTD.
|
||||
* OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
|
||||
* OpenTTD 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 OpenTTD. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
AILog.Info("1.9 API compatibility in effect.");
|
||||
|
@@ -1,69 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
# $Id$
|
||||
|
||||
if ! [ -f ai/regression/completeness.sh ]; then
|
||||
echo "Make sure you are in the root of OpenTTD before starting this script."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
cat ai/regression/tst_*/main.nut | tr ';' '\n' | awk '
|
||||
/^function/ {
|
||||
for (local in locals) {
|
||||
delete locals[local]
|
||||
}
|
||||
if (match($0, "function Regression::Start") || match($0, "function Regression::Stop")) next
|
||||
locals["this"] = "AIControllerSquirrel"
|
||||
}
|
||||
|
||||
/local/ {
|
||||
gsub(".*local", "local")
|
||||
if (match($4, "^AI")) {
|
||||
sub("\\(.*", "", $4)
|
||||
locals[$2] = $4
|
||||
}
|
||||
}
|
||||
|
||||
/Valuate/ {
|
||||
gsub(".*Valuate\\(", "")
|
||||
gsub("\\).*", "")
|
||||
gsub(",.*", "")
|
||||
gsub("\\.", "::")
|
||||
print $0
|
||||
}
|
||||
|
||||
/\./ {
|
||||
for (local in locals) {
|
||||
if (match($0, local ".")) {
|
||||
fname = substr($0, index($0, local "."))
|
||||
sub("\\(.*", "", fname)
|
||||
sub("\\.", "::", fname)
|
||||
sub(local, locals[local], fname)
|
||||
print fname
|
||||
if (match(locals[local], "List")) {
|
||||
sub(locals[local], "AIAbstractList", fname)
|
||||
print fname
|
||||
}
|
||||
}
|
||||
}
|
||||
# We want to remove everything before the FIRST occurence of AI.
|
||||
# If we do not remove any other occurences of AI from the string
|
||||
# we will remove everything before the LAST occurence of AI, so
|
||||
# do some little magic to make it work the way we want.
|
||||
sub("AI", "AXXXXY")
|
||||
gsub("AI", "AXXXXX")
|
||||
sub(".*AXXXXY", "AI")
|
||||
if (match($0, "^AI") && match($0, ".")) {
|
||||
sub("\\(.*", "", $0)
|
||||
sub("\\.", "::", $0)
|
||||
print $0
|
||||
}
|
||||
}
|
||||
' | sed 's/ //g' | sort | uniq > tmp.in_regression
|
||||
|
||||
grep 'DefSQ.*Method' ../src/script/api/ai/*.hpp.sq | grep -v 'AIError::' | grep -v 'AIAbstractList::Valuate' | grep -v '::GetClassName' | sed 's/^[^,]*, &//g;s/,[^,]*//g' | sort > tmp.in_api
|
||||
|
||||
diff -u tmp.in_regression tmp.in_api | grep -v '^+++' | grep '^+' | sed 's/^+//'
|
||||
|
||||
rm -f tmp.in_regression tmp.in_api
|
||||
|
@@ -1,71 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
# $Id$
|
||||
|
||||
if ! [ -f ai/regression/run.sh ]; then
|
||||
echo "Make sure you are in the root of OpenTTD before starting this script."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ -f scripts/game_start.scr ]; then
|
||||
mv scripts/game_start.scr scripts/game_start.scr.regression
|
||||
fi
|
||||
|
||||
params=""
|
||||
gdb=""
|
||||
if [ "$1" != "-r" ]; then
|
||||
params="-snull -mnull -vnull:ticks=30000"
|
||||
fi
|
||||
if [ "$1" = "-g" ]; then
|
||||
gdb="gdb --ex run --args "
|
||||
fi
|
||||
|
||||
if [ -d "ai/regression/tst_$1" ]; then
|
||||
tests="ai/regression/tst_$1"
|
||||
elif [ -d "ai/regression/tst_$2" ]; then
|
||||
tests="ai/regression/tst_$2"
|
||||
else
|
||||
tests=ai/regression/tst_*
|
||||
fi
|
||||
|
||||
ret=0
|
||||
for tst in $tests; do
|
||||
echo -n "Running $tst... "
|
||||
|
||||
# Make sure that only one info.nut is present for each test run. Otherwise openttd gets confused.
|
||||
cp ai/regression/regression_info.nut $tst/info.nut
|
||||
|
||||
sav=$tst/test.sav
|
||||
if ! [ -f $sav ]; then
|
||||
sav=ai/regression/empty.sav
|
||||
fi
|
||||
|
||||
if [ -n "$gdb" ]; then
|
||||
$gdb ./openttd -x -c ai/regression/regression.cfg $params -g $sav
|
||||
else
|
||||
./openttd -x -c ai/regression/regression.cfg $params -g $sav -d script=2 -d misc=9 2>&1 | awk '{ gsub("0x(\\(nil\\)|0+)(x0)?", "0x00000000", $0); gsub("^dbg: \\[script\\]", "", $0); gsub("^ ", "ERROR: ", $0); gsub("ERROR: \\[1\\] ", "", $0); gsub("\\[P\\] ", "", $0); print $0; }' | grep -v '^dbg: \[.*\]' > $tst/tmp.regression
|
||||
fi
|
||||
|
||||
if [ -z "$gdb" ]; then
|
||||
res="`diff -ub $tst/result.txt $tst/tmp.regression`"
|
||||
if [ -z "$res" ]; then
|
||||
echo "passed!"
|
||||
else
|
||||
echo "failed! Difference:"
|
||||
echo "$res"
|
||||
ret=1
|
||||
fi
|
||||
fi
|
||||
|
||||
rm $tst/info.nut
|
||||
|
||||
if [ "$1" != "-k" ]; then
|
||||
rm -f $tst/tmp.regression
|
||||
fi
|
||||
done
|
||||
|
||||
if [ -f scripts/game_start.scr.regression ]; then
|
||||
mv scripts/game_start.scr.regression scripts/game_start.scr
|
||||
fi
|
||||
|
||||
exit $ret
|
@@ -1,154 +0,0 @@
|
||||
Option Explicit
|
||||
|
||||
' $Id$
|
||||
'
|
||||
' This file is part of OpenTTD.
|
||||
' OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
|
||||
' OpenTTD 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 OpenTTD. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Dim FSO
|
||||
Set FSO = CreateObject("Scripting.FileSystemObject")
|
||||
|
||||
Function GetTestList()
|
||||
Dim retests, i, tests, dir
|
||||
Set retests = New RegExp
|
||||
Set GetTestList = CreateObject("Scripting.Dictionary")
|
||||
|
||||
retests.Pattern = "ai/regression/tst_*"
|
||||
retests.Global = True
|
||||
For i = 0 To WScript.Arguments.Count - 1
|
||||
Dim test
|
||||
test = "ai/regression/tst_" & WScript.Arguments.Item(i)
|
||||
If FSO.FolderExists(test) Then
|
||||
retests.Pattern = test
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
|
||||
For Each dir In FSO.GetFolder("ai/regression/").SubFolders
|
||||
Dim name
|
||||
name = "ai/regression/" & dir.Name
|
||||
If retests.Test(name) Then
|
||||
GetTestList.Add name, name
|
||||
End If
|
||||
Next
|
||||
End Function
|
||||
|
||||
Function GetParams()
|
||||
GetParams = "-snull -mnull -vnull:ticks=30000"
|
||||
If WScript.Arguments.Count = 0 Then Exit Function
|
||||
If WScript.Arguments.Item(0) <> "-r" Then Exit Function
|
||||
GetParams = ""
|
||||
End Function
|
||||
|
||||
Sub FilterFile(filename)
|
||||
Dim lines, filter, file
|
||||
|
||||
Set file = FSO.OpenTextFile(filename, 1)
|
||||
If Not file.AtEndOfStream Then
|
||||
lines = file.ReadAll
|
||||
End If
|
||||
file.Close
|
||||
|
||||
Set filter = New RegExp
|
||||
filter.Global = True
|
||||
filter.Multiline = True
|
||||
filter.Pattern = "0x(\(nil\)|0+)(x0)?"
|
||||
lines = filter.Replace(lines, "0x00000000")
|
||||
filter.Pattern = "^dbg: \[script\]"
|
||||
lines = filter.Replace(lines, "")
|
||||
filter.Pattern = "^ "
|
||||
lines = filter.Replace(lines, "ERROR: ")
|
||||
filter.Pattern = "ERROR: \[1\] \[P\] "
|
||||
lines = filter.Replace(lines, "")
|
||||
filter.Pattern = "^dbg: .*\r\n"
|
||||
lines = filter.Replace(lines, "")
|
||||
|
||||
Set file = FSO.OpenTextFile(filename, 2)
|
||||
file.Write lines
|
||||
file.Close
|
||||
End Sub
|
||||
|
||||
Function CompareFiles(filename1, filename2)
|
||||
Dim file, lines1, lines2
|
||||
Set file = FSO.OpenTextFile(filename1, 1)
|
||||
If Not file.AtEndOfStream Then
|
||||
lines1 = file.ReadAll
|
||||
End IF
|
||||
file.Close
|
||||
Set file = FSO.OpenTextFile(filename2, 1)
|
||||
If Not file.AtEndOfStream Then
|
||||
lines2 = file.ReadAll
|
||||
End IF
|
||||
file.Close
|
||||
CompareFiles = (lines1 = lines2)
|
||||
End Function
|
||||
|
||||
Function RunTest(test, params, ret)
|
||||
Dim WshShell, oExec, sav, command
|
||||
Set WshShell = CreateObject("WScript.Shell")
|
||||
|
||||
' Make sure that only one info.nut is present for each test run. Otherwise openttd gets confused.
|
||||
FSO.CopyFile "ai/regression/regression_info.nut", test & "/info.nut"
|
||||
|
||||
sav = test & "/test.sav"
|
||||
If Not FSO.FileExists(sav) Then
|
||||
sav = "ai/regression/empty.sav"
|
||||
End If
|
||||
|
||||
command = ".\openttd -x -c ai/regression/regression.cfg " & params & " -g " & sav & " -d script=2 -d misc=9"
|
||||
' 2>&1 must be after >tmp.regression, else stderr is not redirected to the file
|
||||
WshShell.Run "cmd /c " & command & " >"& test & "/tmp.regression 2>&1", 0, True
|
||||
|
||||
FilterFile test & "/tmp.regression"
|
||||
|
||||
If CompareFiles(test & "/result.txt", test & "/tmp.regression") Then
|
||||
RunTest = "passed!"
|
||||
Else
|
||||
RunTest = "failed!"
|
||||
ret = 1
|
||||
End If
|
||||
|
||||
FSO.DeleteFile test & "/info.nut"
|
||||
|
||||
If WScript.Arguments.Count > 0 Then
|
||||
If WScript.Arguments.Item(0) = "-k" Then
|
||||
Exit Function
|
||||
End If
|
||||
End If
|
||||
|
||||
FSO.DeleteFile test & "/tmp.regression"
|
||||
End Function
|
||||
|
||||
On Error Resume Next
|
||||
WScript.StdOut.WriteLine ""
|
||||
If Err.Number <> 0 Then
|
||||
WScript.Echo "This script must be started with cscript."
|
||||
WScript.Quit 1
|
||||
End If
|
||||
On Error Goto 0
|
||||
|
||||
If Not FSO.FileExists("ai/regression/run.vbs") Then
|
||||
WScript.Echo "Make sure you are in the root of OpenTTD before starting this script."
|
||||
WScript.Quit 1
|
||||
End If
|
||||
|
||||
If FSO.FileExists("scripts/game_start.scr") Then
|
||||
FSO.MoveFile "scripts/game_start.scr", "scripts/game_start.scr.regression"
|
||||
End If
|
||||
|
||||
Dim params, test, ret
|
||||
params = GetParams()
|
||||
ret = 0
|
||||
|
||||
For Each test in GetTestList()
|
||||
WScript.StdOut.Write "Running " & test & "... "
|
||||
WScript.StdOut.WriteLine RunTest(test, params, ret)
|
||||
Next
|
||||
|
||||
If FSO.FileExists("scripts/game_start.scr.regression") Then
|
||||
FSO.MoveFile "scripts/game_start.scr.regression", "scripts/game_start.scr"
|
||||
End If
|
||||
|
||||
WScript.Quit ret
|
Binary file not shown.
Binary file not shown.
36
bin/game/CMakeLists.txt
Normal file
36
bin/game/CMakeLists.txt
Normal file
@@ -0,0 +1,36 @@
|
||||
set(GS_COMPAT_SOURCE_FILES
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/compat_1.2.nut
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/compat_1.3.nut
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/compat_1.4.nut
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/compat_1.5.nut
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/compat_1.6.nut
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/compat_1.7.nut
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/compat_1.8.nut
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/compat_1.9.nut
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/compat_1.10.nut
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/compat_1.11.nut
|
||||
)
|
||||
|
||||
foreach(GS_COMPAT_SOURCE_FILE IN LISTS GS_COMPAT_SOURCE_FILES)
|
||||
string(REPLACE "${CMAKE_SOURCE_DIR}/bin/" "" GS_COMPAT_SOURCE_FILE_NAME "${GS_COMPAT_SOURCE_FILE}")
|
||||
string(CONCAT GS_COMPAT_BINARY_FILE "${CMAKE_BINARY_DIR}/" "${GS_COMPAT_SOURCE_FILE_NAME}")
|
||||
|
||||
add_custom_command(OUTPUT ${GS_COMPAT_BINARY_FILE}
|
||||
COMMAND ${CMAKE_COMMAND} -E copy
|
||||
${GS_COMPAT_SOURCE_FILE}
|
||||
${GS_COMPAT_BINARY_FILE}
|
||||
MAIN_DEPENDENCY ${GS_COMPAT_SOURCE_FILE}
|
||||
COMMENT "Copying ${GS_COMPAT_SOURCE_FILE_NAME}"
|
||||
)
|
||||
|
||||
list(APPEND GS_COMPAT_BINARY_FILES ${GS_COMPAT_BINARY_FILE})
|
||||
endforeach()
|
||||
|
||||
# Create a new target which copies all compat files
|
||||
add_custom_target(gs_compat_files
|
||||
DEPENDS ${GS_COMPAT_BINARY_FILES}
|
||||
)
|
||||
|
||||
add_dependencies(openttd
|
||||
gs_compat_files
|
||||
)
|
15
bin/game/compat_1.10.nut
Normal file
15
bin/game/compat_1.10.nut
Normal file
@@ -0,0 +1,15 @@
|
||||
/*
|
||||
* This file is part of OpenTTD.
|
||||
* OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
|
||||
* OpenTTD 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 OpenTTD. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
GSLog.Info("1.10 API compatibility in effect.");
|
||||
|
||||
/* 1.11 adds a tile parameter. */
|
||||
GSCompany._ChangeBankBalance <- GSCompany.ChangeBankBalance;
|
||||
GSCompany.ChangeBankBalance <- function(company, delta, expenses_type)
|
||||
{
|
||||
return GSCompany._ChangeBankBalance(company, delta, expenses_type, GSMap.TILE_INVALID);
|
||||
}
|
6
bin/game/compat_1.11.nut
Normal file
6
bin/game/compat_1.11.nut
Normal file
@@ -0,0 +1,6 @@
|
||||
/*
|
||||
* This file is part of OpenTTD.
|
||||
* OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
|
||||
* OpenTTD 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 OpenTTD. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
@@ -1,5 +1,3 @@
|
||||
/* $Id$ */
|
||||
|
||||
/*
|
||||
* This file is part of OpenTTD.
|
||||
* OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
|
||||
@@ -30,3 +28,10 @@ GSBridge.GetName <- function(bridge_id)
|
||||
{
|
||||
return GSBridge._GetName(bridge_id, GSVehicle.VT_RAIL);
|
||||
}
|
||||
|
||||
/* 1.11 adds a tile parameter. */
|
||||
GSCompany._ChangeBankBalance <- GSCompany.ChangeBankBalance;
|
||||
GSCompany.ChangeBankBalance <- function(company, delta, expenses_type)
|
||||
{
|
||||
return GSCompany._ChangeBankBalance(company, delta, expenses_type, GSMap.TILE_INVALID);
|
||||
}
|
||||
|
@@ -1,5 +1,3 @@
|
||||
/* $Id$ */
|
||||
|
||||
/*
|
||||
* This file is part of OpenTTD.
|
||||
* OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
|
||||
@@ -30,3 +28,10 @@ GSBridge.GetName <- function(bridge_id)
|
||||
{
|
||||
return GSBridge._GetName(bridge_id, GSVehicle.VT_RAIL);
|
||||
}
|
||||
|
||||
/* 1.11 adds a tile parameter. */
|
||||
GSCompany._ChangeBankBalance <- GSCompany.ChangeBankBalance;
|
||||
GSCompany.ChangeBankBalance <- function(company, delta, expenses_type)
|
||||
{
|
||||
return GSCompany._ChangeBankBalance(company, delta, expenses_type, GSMap.TILE_INVALID);
|
||||
}
|
||||
|
@@ -1,5 +1,3 @@
|
||||
/* $Id$ */
|
||||
|
||||
/*
|
||||
* This file is part of OpenTTD.
|
||||
* OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
|
||||
@@ -22,3 +20,11 @@ GSBridge.GetName <- function(bridge_id)
|
||||
{
|
||||
return GSBridge._GetName(bridge_id, GSVehicle.VT_RAIL);
|
||||
}
|
||||
|
||||
/* 1.11 adds a tile parameter. */
|
||||
GSCompany._ChangeBankBalance <- GSCompany.ChangeBankBalance;
|
||||
GSCompany.ChangeBankBalance <- function(company, delta, expenses_type)
|
||||
{
|
||||
return GSCompany._ChangeBankBalance(company, delta, expenses_type, GSMap.TILE_INVALID);
|
||||
}
|
||||
|
||||
|
@@ -1,5 +1,3 @@
|
||||
/* $Id$ */
|
||||
|
||||
/*
|
||||
* This file is part of OpenTTD.
|
||||
* OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
|
||||
@@ -15,3 +13,10 @@ GSBridge.GetName <- function(bridge_id)
|
||||
{
|
||||
return GSBridge._GetName(bridge_id, GSVehicle.VT_RAIL);
|
||||
}
|
||||
|
||||
/* 1.11 adds a tile parameter. */
|
||||
GSCompany._ChangeBankBalance <- GSCompany.ChangeBankBalance;
|
||||
GSCompany.ChangeBankBalance <- function(company, delta, expenses_type)
|
||||
{
|
||||
return GSCompany._ChangeBankBalance(company, delta, expenses_type, GSMap.TILE_INVALID);
|
||||
}
|
||||
|
@@ -1,5 +1,3 @@
|
||||
/* $Id$ */
|
||||
|
||||
/*
|
||||
* This file is part of OpenTTD.
|
||||
* OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
|
||||
@@ -15,3 +13,10 @@ GSBridge.GetName <- function(bridge_id)
|
||||
{
|
||||
return GSBridge._GetName(bridge_id, GSVehicle.VT_RAIL);
|
||||
}
|
||||
|
||||
/* 1.11 adds a tile parameter. */
|
||||
GSCompany._ChangeBankBalance <- GSCompany.ChangeBankBalance;
|
||||
GSCompany.ChangeBankBalance <- function(company, delta, expenses_type)
|
||||
{
|
||||
return GSCompany._ChangeBankBalance(company, delta, expenses_type, GSMap.TILE_INVALID);
|
||||
}
|
||||
|
@@ -1,5 +1,3 @@
|
||||
/* $Id$ */
|
||||
|
||||
/*
|
||||
* This file is part of OpenTTD.
|
||||
* OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
|
||||
@@ -15,3 +13,10 @@ GSBridge.GetName <- function(bridge_id)
|
||||
{
|
||||
return GSBridge._GetName(bridge_id, GSVehicle.VT_RAIL);
|
||||
}
|
||||
|
||||
/* 1.11 adds a tile parameter. */
|
||||
GSCompany._ChangeBankBalance <- GSCompany.ChangeBankBalance;
|
||||
GSCompany.ChangeBankBalance <- function(company, delta, expenses_type)
|
||||
{
|
||||
return GSCompany._ChangeBankBalance(company, delta, expenses_type, GSMap.TILE_INVALID);
|
||||
}
|
||||
|
@@ -1,5 +1,3 @@
|
||||
/* $Id$ */
|
||||
|
||||
/*
|
||||
* This file is part of OpenTTD.
|
||||
* OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
|
||||
@@ -15,3 +13,10 @@ GSBridge.GetName <- function(bridge_id)
|
||||
{
|
||||
return GSBridge._GetName(bridge_id, GSVehicle.VT_RAIL);
|
||||
}
|
||||
|
||||
/* 1.11 adds a tile parameter. */
|
||||
GSCompany._ChangeBankBalance <- GSCompany.ChangeBankBalance;
|
||||
GSCompany.ChangeBankBalance <- function(company, delta, expenses_type)
|
||||
{
|
||||
return GSCompany._ChangeBankBalance(company, delta, expenses_type, GSMap.TILE_INVALID);
|
||||
}
|
||||
|
@@ -1,8 +1,15 @@
|
||||
/* $Id$ */
|
||||
|
||||
/*
|
||||
* This file is part of OpenTTD.
|
||||
* OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
|
||||
* OpenTTD 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 OpenTTD. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
GSLog.Info("1.9 API compatibility in effect.");
|
||||
|
||||
/* 1.11 adds a tile parameter. */
|
||||
GSCompany._ChangeBankBalance <- GSCompany.ChangeBankBalance;
|
||||
GSCompany.ChangeBankBalance <- function(company, delta, expenses_type)
|
||||
{
|
||||
return GSCompany._ChangeBankBalance(company, delta, expenses_type, GSMap.TILE_INVALID);
|
||||
}
|
||||
|
606
changelog.txt
606
changelog.txt
@@ -1,4 +1,588 @@
|
||||
1.9.0-beta1 (2018-02-09)
|
||||
1.11.2 (2021-05-03)
|
||||
------------------------------------------------------------------------
|
||||
Change: [Win32] Limit hardware accelerated video driver to OpenGL 3.2 or higher (#9077)
|
||||
Change: More improvements to the GUI at different scales (#9075, #9102, #9107, #9133, #9174, #9183)
|
||||
Fix: Query windows could be partially drawn (#9184)
|
||||
Fix #9113: Crash when removing an airport that exists in an aircraft's orders (#9182)
|
||||
Fix #9117: [Fluidsynth] Hang when changing song (#9181)
|
||||
Fix: String validation could leave invalid UTF-8 encoded strings (#9096)
|
||||
Fix: [Network] Out-of-bounds memory access with modified servers sending too short password salts (#9176)
|
||||
Fix: Crash when extra viewport with zero height has sign in view (#9175)
|
||||
Fix #9147: Crash when taking screenshots (#9169)
|
||||
Fix #6598: [Network] Prevent crashes when (re)joining network game by falling back to main menu first (#9163)
|
||||
Fix #9152: Screenshot success popup window was treated as an error (#9159)
|
||||
Fix: Fast-forward stuttering when vsync is enabled (#9140)
|
||||
Fix: [Network, Win32] Network errors were handled badly (#9116)
|
||||
Fix: [Network] Savegame transfer could stall in rare cases (#9106)
|
||||
Fix #9097: [NewGRF] Cargo initial payment variable was being truncated (#9098)
|
||||
Fix: [NewGRF] Industry variable 66 and object variable 46 erroneously truncated the distance (#9088)
|
||||
Fix: [NewGRF] Industry variables 65 and 66 ignored the parameter, and always used the north tile (#9088)
|
||||
Fix: Do not include regression test AI in bundle (#9068, #9164)
|
||||
Fix #9062: [Win32] Version in executable was not set to current release version (#9066, #9154)
|
||||
|
||||
|
||||
1.11.1 (2021-04-18)
|
||||
------------------------------------------------------------------------
|
||||
Feature: Toggle to enable/disable vsync (#8997)
|
||||
Feature: Volume controls in the Game Options window, and better defaults (#8943)
|
||||
Add: Hotkey to focus object and rail filters (#8908)
|
||||
Add: Better plural support for Romanian (#8936)
|
||||
Change: Improve layout and spacing of several windows at different GUI scales (#9041, #9042, #9044, #9050)
|
||||
Change: [Win32] Use user UI language setting for initial language selection (#8974)
|
||||
Change: Make effect volume scale more intuitively (#8945, #8950)
|
||||
Change: Improve padding of Object & Rail station windows (#8929)
|
||||
Fix #6322: [Script] Crash when script allocates too much memory, now kills script instead (#9047)
|
||||
Fix #7513: [Script] Crash on garbage collection with misbehaving script (#9040)
|
||||
Fix #9028: [OpenGL] Crash when changing max sprite zoom level (#9032)
|
||||
Fix #8874: show a warning when a NewGRF scan is requested multiple times (#9022)
|
||||
Fix: Desync when GS unlocks railtype with wagon unlock (#9021)
|
||||
Fix #9015: [Win32] Crash on running "pwd" command in the console (#9016)
|
||||
Fix #9008: Validate starting year given on the command line (-t) (#9014)
|
||||
Fix #8878: [Network] Slow DNS queries could block the server and disconnect clients (#9013)
|
||||
Fix: Improve validation of OpenGL video driver to avoid crashes (#9007)
|
||||
Fix: Credits scrolled too slowly with larger font sizes (#8994)
|
||||
Fix #8977: Crash when altering max sprite resolution (#8993)
|
||||
Fix #8956: Industry disaster news messages showed the wrong location (#8992)
|
||||
Fix: [Win32] Font glyphs of certain widths had broken rendering (#8990)
|
||||
Fix #8930: [Win32] Duplicate text input issue for systems using IME (#8976)
|
||||
Fix: [Network] Potential stale client entries in client list (#8959)
|
||||
Fix: Graphical issues when dragging measurement tooltips (#8951)
|
||||
Fix: [Fluidsynth] Use provided default soundfont if available (#8948, #8953)
|
||||
Fix #8935: [macOS] Crash on save (#8944)
|
||||
Fix #8922: Crash when selling shared vehicles with shared vehicle window open (#8926)
|
||||
Fix: Compiling on armhf (Raspberry Pi) (#8924)
|
||||
|
||||
|
||||
1.11.0 (2021-04-01)
|
||||
------------------------------------------------------------------------
|
||||
Feature: Allow setting a custom terrain type to define highest peak (#8891)
|
||||
Feature: Auto-detect map height limit based on generated map (#8891)
|
||||
Feature: Setting to indicate desert coverage for tropic climate and snow coverage for arctic climate (replaces snow line height) (#8891)
|
||||
Add: Allow setting the highest mountain for heightmaps (#8891)
|
||||
Change: Scale exported heightmaps to highest peak and inform the user of this value (#8891)
|
||||
Change: Remove "maximum map height" from the New Game GUI (#8891)
|
||||
Fix #8803: Only auto-remove signals when rail can be built (#8904)
|
||||
Fix #8565: Stopped road vehicle displays a speed different than 0 (#8901)
|
||||
Fix #8886: Don't try to resolve folders within tars named '.' (#8893)
|
||||
Fix: Placing random trees in SE crashes the game (#8892)
|
||||
Fix #8875: Filter string in station window breaks flow in user interface (#8885)
|
||||
Fix #8871: [OpenGL] Initialize all buffers after resize and clear back buffer (#8877)
|
||||
Fix: OpenGL performance with some AMD GPUs (#8876)
|
||||
Fix: Recompute road/railtype availability after disabling the engine (#8872)
|
||||
Fix: OSK layout not scaled for 2x or 4x GUI scale (#8868)
|
||||
|
||||
|
||||
1.11.0-RC1 (2021-03-14)
|
||||
------------------------------------------------------------------------
|
||||
Feature: Option to (dis-)allow hardware accelerated video drivers (#8819)
|
||||
Feature: Option to set display refresh rate (#8813)
|
||||
Feature: Allow custom width/height of screenshot and making heightmap screenshots via console (#8804)
|
||||
Feature: Allow filtering on name in rail station window (#8706)
|
||||
Feature: Setting for highest resolution of sprites to use (#8604)
|
||||
Add: Make NewGRF Scanner / World Generation update smoother and make aborting it react faster (#8830)
|
||||
Add: Malaysia Ringgit as Currency (#8783)
|
||||
Add: "Engines only" filter in build train window (#8733)
|
||||
Change: De-limit framerate window's framerate (#8772)
|
||||
Change: Clarify what effect town interactions have (#8744)
|
||||
Change: Don't show global goals in company goal windows (#8709)
|
||||
Change: Recolour graph windows to brown (#8700)
|
||||
Fix #8855: Bootstrap could result in an empty screen when bootstrap fails (#8856)
|
||||
Fix #8851: Don't allow infinite "exec" depth in script, but limit to 10 deep (#8852)
|
||||
Fix #8647: Incorrect drawing order of tram catenary sprites (#8843)
|
||||
Fix #8711: Having gui_zoom lower than zoom_min causes a crash (#8835)
|
||||
Fix #8810: "aircraft out of fuel" news shows the wrong place (#8832)
|
||||
Fix #8833: Don't reload NewGRFs when we are shutting down (#8830)
|
||||
Fix: Scale padding between elements the same as other padding (#8829)
|
||||
Fix #8808: [OSX, OpenGL] Crash on switching blitters due to double-mapping the video buffer (#8822)
|
||||
Fix #8784: Using Alt+Enter doesn't update the fullscreen toggle visibly (#8820)
|
||||
Fix #8817: Keep NewGRF order for object class sorting (#8818)
|
||||
Fix #8809: Crash when removing airport when hangar window open (#8815)
|
||||
Fix #8799: Crash when Search Internet in Multiplayer (#8801)
|
||||
Fix #8775: [Win32] Don't create the main window when Alt-Tabbing back into fullscreen (#8792)
|
||||
Fix #8774: Black screenshots when using 40bpp-blitter (#8791)
|
||||
Fix: [OSX] Hide dock when entering fullscreen (#8789)
|
||||
Fix: Bootstrap fails to start on clean install (#8788)
|
||||
Fix: Terraform limit acts random when maxing out per_64k_frames setting (#8782)
|
||||
Fix: Max-value of fast-forward-speed-limit can be outside its storage size (#8769)
|
||||
|
||||
|
||||
1.11.0-beta2 (2021-02-28)
|
||||
------------------------------------------------------------------------
|
||||
Feature: Add setting to limit fast-forward speed (#8766)
|
||||
Feature: Significant performance improvements to all video drivers (#8605, #8652, #8660, #8685, #8702, #8703, #8707, #8726, #8740)
|
||||
Feature: Configurable display refresh-rate, default to 60fps (#8680)
|
||||
Feature: Automatically upload releases to Steam (#8644)
|
||||
Feature: Generic Linux builds (#8641)
|
||||
Feature: [GS] Allow non-question type windows to have no buttons (#8638)
|
||||
Feature: [macOS] ZIP build (#8614)
|
||||
Feature: Object class selection string filtering (#8603)
|
||||
Feature: 'Remove all industries' button in scenario editor (#8550)
|
||||
Feature: Automatic UI and font zoom levels when supported by the OS (#8537)
|
||||
Feature: [macOS] Render screen at native resolution by default for HiDPI screens (#8519)
|
||||
Feature: OpenGL video driver (#7744)
|
||||
Add: Indonesia Rupiah currency (#8616)
|
||||
Change: Improve graph period markings (#8732)
|
||||
Change: Make pathfinder account for maximum order speed, if set (#8722)
|
||||
Change: Darken graph grid lines for legibility (#8690)
|
||||
Change: Make order window hotkeys toggle for load & unload variants (#8669)
|
||||
Change: Use a more specific error message when attempting to bulldoze your own HQ (#8667)
|
||||
Change: Convert .md to .rtf for Windows/Mac packages (#8617)
|
||||
Change: Move the 'tree placer algorithm' & 'road drive side' settings to the Settings window (#8566)
|
||||
Change: Move town name generator selection to mapgen GUI (#8566)
|
||||
Change: [macOS] Native font rendering (#8518)
|
||||
Fix: Display of network lobby windows for different GUI sizes (#8765)
|
||||
Fix: Don't desync if client leaves before you finish downloading map (#8755)
|
||||
Fix: Allow estimating vehicle clone cost even if short on money (#8748)
|
||||
Fix: Don't notify twice that a client left because of a timeout (#8746)
|
||||
Fix: Vehicle cursor size did not account for the interface zoom level (#8739)
|
||||
Fix #8123: Trams on half-tiles couldn't find depots (#8738)
|
||||
Fix #8276: [NewGRF] Crash when an object's size was not set (#8719)
|
||||
Fix #8349: Close depot vehicle list windows when closing the depot window (#8717)
|
||||
Fix #8594: [NRT] Road pathfinder did not account for roadtype speed limits or lengths of tunnels/bridges (#8710)
|
||||
Fix: Whole status bar instead of money widget refreshed on money change (#8692)
|
||||
Fix: Unnecessary status bar redraws when there is no news to show (#8691)
|
||||
Fix: New orders are non-stop by default (#8689)
|
||||
Fix: Framerate window showed a slightly higher rate than actually measured (#8682)
|
||||
Fix: Autorenew failure advice due to bad refit being shown to all companies (#8681)
|
||||
Fix #8625: Wrong ending year was displayed in highscore table (#8672)
|
||||
Fix #8620: Scale spacing between date & news in history window according to font scaling (#8671)
|
||||
Fix: [Win32] Set minimum resolution for timers to 1ms (#8660)
|
||||
Fix: Mention our websites with https:// (instead of http://) (#8657)
|
||||
Fix: [Emscripten] Open links in browser (#8655)
|
||||
Fix: Don't crash when towns upgrade road tiles during expansion (#8651)
|
||||
Fix #8029: [SDL2] Blank display when under Wayland (#8648)
|
||||
Fix: Default Network Server List sorter put compatible servers in wrong order (#8626)
|
||||
Fix: Use non-pulsating red highlight for coverage (#8622)
|
||||
Fix: Center text and image in vehicle statusbar vertically (#8602)
|
||||
Fix: Don't walk out of the map when trying to build tunnels (#8600)
|
||||
Fix: Off-by-one error in desert/rainforest positioning at world gen (#8588)
|
||||
Fix #8037: Crash when restarting AI that is controlling the same company as the player (#8587)
|
||||
Fix: Stopped ships shouldn't block depots (#8578)
|
||||
|
||||
|
||||
1.11.0-beta1 (2021-01-22)
|
||||
------------------------------------------------------------------------
|
||||
Feature: [GS] Ability to set some extra text in the industry window (#8576)
|
||||
Feature: Show rainforest under vegetation on smallmap (#8562)
|
||||
Feature: Automatically determine window size on new install (#8536)
|
||||
Feature: Towns can build tunnels (#8473)
|
||||
Feature: Make maximum length of town bridges depend on population (with a minimum limit of 4) (#8439)
|
||||
Feature: New icons for renaming and go-to-location on GUI windows, and improve consistency of usage (#8455)
|
||||
Feature: Support for ARM64 on Apple Silicon and Windows (#8340, #8577, #8583)
|
||||
Feature: Add an option to disable tree growth completely (#8415)
|
||||
Feature: Support for Emscripten (play-OpenTTD-in-the-browser!) (#8355)
|
||||
Feature: Show group name as part of the default vehicle name (#8307)
|
||||
Feature: "Frozen" economy setting that stops production changes and industry closures (#8282)
|
||||
Feature: New velocity unit "tiles/day" (#8278)
|
||||
Feature: Option to automatically remove signals when placing rail (#8274)
|
||||
Feature: Increase max possible distance from border for oil refineries and rigs (#8237)
|
||||
Feature: Improve tree planting window, and allow planting 'clumps' of trees by dragging in the scenario editor (#8234)
|
||||
Feature: Indian Rupee (INR) currency (#8136)
|
||||
Feature: [GS] Ability to give a company exclusive access to an industry (#8115)
|
||||
Feature: Hotkeys for Land Info window, News window & close error window (#8053, #8266)
|
||||
Feature: Improve rendering of large viewports (#7962)
|
||||
Feature: [GS] Influence industry production changes from GameScript (#7912)
|
||||
Feature: [GS] Push-buttons on storybook pages (#7896)
|
||||
Feature: Option to group vehicle lists by shared orders (#7028)
|
||||
Feature: Drag-and-drop vehicles in group GUI for shared order groups (#7028)
|
||||
Add: [GS] A tile parameter to GSCompany::ChangeBankBalance for showing changes more visually (#8573)
|
||||
Add: [NewGRF] Allow NewGRF vehicles to query the current rail/road/tram type (#8554)
|
||||
Add: [Script] ScriptCargo::GetName for the human readable name of cargoes (#8544)
|
||||
Add: "reload" console command to reload the current scenario or heightmap (#8527)
|
||||
Add: [NewGRF] Flag to test if inflation is on or off (#8427)
|
||||
Add: [Script] Native priority queue (useful for things like pathfinders) (#8091)
|
||||
Add: [NewGRF] Industry behaviour flag to override second cargo production clamping for water industries when using smooth economy (#8079)
|
||||
Change: [SDL2] Start game on the screen where the cursor is (#8572)
|
||||
Change: Use a dark background for all profit graphs to increase contrast (#8557)
|
||||
Change: Reword warning in cheat window (#8538)
|
||||
Change: Enable the toolbar for road/rail/dock/airport, regardless of vehicle availability (#8521)
|
||||
Change: For arctic and tropical climates, make sure at least a few hills are generated (#8513)
|
||||
Change: Destroying a tunnel/bridge now sells the tracks before destroying the tunnel/bridge (#8508)
|
||||
Change: Move "give money" from client-list to company window (#8500)
|
||||
Change: [MacOS] Hide Dock and menu when in fullscreen mode (#8487)
|
||||
Change: Improve performance for complex vehicle chains by resolving sprites less frequently (#8485)
|
||||
Change: Make engine reliability independent of introduction date (#8470)
|
||||
Change: Some default settings to improve gameplay for new players - default non-stop orders on, disable inflation, quick goto orders, show track reservations, and more (#8463)
|
||||
Change: Converting town-owned road types now requires a positive town rating (#8457)
|
||||
Change: Rework server list buttons for searching LAN/internet servers (#8426)
|
||||
Change: Add some styling to GS question windows depending on the type (#8422)
|
||||
Change: [Linkgraph] Speed up game exit by allowing job threads to be aborted early (#8416)
|
||||
Change: Prevent towns from building dead-end road bridges (#8401)
|
||||
Change: Send network error to the server before making an emergency save (#8387)
|
||||
Change: Extend the allowed range for max loan setting up to £2 billion (#8386)
|
||||
Change: Don't display OS name when exiting the game (#8366)
|
||||
Change: Save openttd.cfg immediately on changing a setting (#8358)
|
||||
Change: Autorenew now defaults to on (#8352)
|
||||
Change: [NewGRF] Also use aircraft property 12 for helicopters (#8347)
|
||||
Change: Service at depot also resets breakdown chance (#8317)
|
||||
Change: Use key names instead of characters in hotkey.cfg (#8291)
|
||||
Change: Allow command cost-estimation while paused (#8222)
|
||||
Change: Always apply inflation from 1920 to 2090, no matter the game start year (#7589)
|
||||
Change: Use CMake for build system (#7270)
|
||||
Change: [Linkgraph] Pause the game when linkgraph jobs lag (#7081)
|
||||
Change: Place "Group by" above "Sort by" in station window for consistency (#7028)
|
||||
Fix #8589: Prevent desyncs with vehicle motion counters and NewGRFs (#8591)
|
||||
Fix #7670: Improve pathfinder performance when lost vehicles are blocked from moving (#8568)
|
||||
Fix: Inform user if a custom font failed to load due to missing glyphs (#8559)
|
||||
Fix: Don't allow wagon chains (without an engine) to exceed maximum train length (#8533)
|
||||
Fix #7619: Super fast NewGRF aircraft could be unable to land (#8531)
|
||||
Fix: Improve connection retries for the content server in cases of broken networking (#8530)
|
||||
Fix #7972: Show invalid orders to stations that don't accept the vehicle (#8516)
|
||||
Fix: Error when trying to clone a vehicle with invalid orders (#8515)
|
||||
Fix #8050: Various off-by-one errors in how the end-year of the game was used (#8512)
|
||||
Fix #8332: Aborting vehicle group drag & drop could cause crashes (#8511)
|
||||
Fix #8168: Allow relocating HQ partially over an existing HQ (#8510)
|
||||
Fix #8068: Allow selling tram track regardless of bank balance (#8509)
|
||||
Fix #7604: Prevent houses from wandering away from roads (#8507)
|
||||
Fix: Make the "password" button the same size as the other buttons in the Company window (#8500)
|
||||
Fix #7611: Keep news about vehicle accidents around after the vehicle is cleaned up (#8497)
|
||||
Fix: [MacOS] Full animation in fullscreen mode was reducing the height of the window (#8491)
|
||||
Fix: [MacOS] Loading custom fonts (#8484)
|
||||
Fix: Network client makes emergency saves twice if the server is disconnected (#8477)
|
||||
Fix #8462: Stop towns from trying to build roads on water (#8471)
|
||||
Fix: [NewGRF] GetCurveSpeedLimit should use the railtype from the current tile (#8466)
|
||||
Fix #8437: Crash when using certain heliports with certain rotated airports (#8458)
|
||||
Fix #8437: Planes would land at the wrong height if the top corner of the airport was lowered (#8458)
|
||||
Fix #8297: Infrastructure counters for road tunnels, bridges & depots (#8454)
|
||||
Fix #6468: Don't store the version of AIs that are started via console (#8430)
|
||||
Fix: Don't lower tree density if spreading is not enabled (#8413)
|
||||
Fix: Prevent savegame version conflicts with certain old patchpacks (#8411)
|
||||
Fix: [NewGRF] Variable 0x44 was always HZB_TOWN_EDGE for road stops (#8400)
|
||||
Fix #8313: Use correct capitalization for TTO / DOS music files in the baseset metadata (#8385)
|
||||
Fix: [NewGRF] Action 7/9 conditions 0x0F to 0x12 failed, if 'param' was 0x88 (#8382)
|
||||
Fix: Change the working-dir searchpath when using '-c' (#8367)
|
||||
Fix: Useless warning with -snull and no BaseSounds available (#8361)
|
||||
Fix: Crash trying to load TTO/TTD savegames. (#8356)
|
||||
Fix: [Script] Don't echo script exceptions to console (#8331)
|
||||
Fix: Slovak ownname was using the wrong form (#8326)
|
||||
Fix #8311: [NewGRF] Industry probability at map generation was scaled differently when set via property or callback (#8312)
|
||||
Fix: Only check houses for cargo when generating subsidies with towns (#8305)
|
||||
Fix: Sprite preview in sprite aligner was too small with scaled UI (#8288)
|
||||
Fix: Spell 'Viewport' consistently (#8260)
|
||||
Fix #7772: Show vehicle destination on mouseover when vehicle stopped (#8236, #8543)
|
||||
Fix #8232: Huge screenshot warning was shown incorrectly (#8224)
|
||||
Fix #8153: Report incompatible cargo/order when autoreplace fails (#8169)
|
||||
Fix: [Script] ScriptMarine::AreWaterTilesConnected did not work for aqueducts (#8074)
|
||||
Fix #7645: Add cost of clearing the sloped tile to the price of a dock (#7947)
|
||||
Fix #6452: Reset only editable and visible settings from GUI (#7890)
|
||||
Fix: Original terrain generator did not keep a single gap of water at the borders (#7883)
|
||||
Remove: In-game console command "content select all" (#8363)
|
||||
Remove: [OSX] Support for OSX older than 10.7, including QuickTime music driver (#8078)
|
||||
|
||||
|
||||
1.10.3 (2020-08-09)
|
||||
------------------------------------------------------------------------
|
||||
Change: Also make roadside trees match the tree transparency option (#8245)
|
||||
Fix: Center text and icons in the status bar vertically (#8273)
|
||||
Fix: [NRT] Set invalid road and tram types for rail tunnel ends (#8269)
|
||||
Fix #7980: Properly invalidate mouse-over station coverage highlight (#8263)
|
||||
Fix #8250: [NRT] Company infrastructure window always omits last road/tramtype (#8251)
|
||||
Fix #8162: [NRT] Improve error message when converting town owned road (#8247)
|
||||
Fix #8216: Don't show floating text on autoreplace if cost is 0 (#8244)
|
||||
Fix #8129: Crash if a news message expires while viewing the endgame screen (#8243)
|
||||
Fix #8221: Use more specific error message when a bridge is too long (#8240)
|
||||
Fix #8230: Resolve ".." when opening files in .tar (#8231)
|
||||
Fix: A few race conditions in netcode (#8227, #8228, #8229)
|
||||
Fix #7838: Crash relating to group creation and renaming (#8223)
|
||||
Fix #8104: [SDL2] Fix window resizability when going from fullscreen to windowed mode (#8211)
|
||||
Fix: Display banlist's indexes correctly (#8209)
|
||||
Fix: Possible desync with subsidy creation (#8159)
|
||||
Fix #8131: Draw small bridges pillars in more places (#8149)
|
||||
|
||||
|
||||
1.10.2 (2020-06-01)
|
||||
------------------------------------------------------------------------
|
||||
Add: Ubuntu 20.04 packages (#8127)
|
||||
Fix: [OSX] Possible crash on failure to set colourspace (#8181)
|
||||
Fix #8166: Prevent crash from a NewGRF with an invalid RoadType (#8180)
|
||||
Fix #8024: Make Online Content GUI more responsive while loading (#8179)
|
||||
Fix #7970: Disable event loop when generating crash dump (#8176)
|
||||
Fix: [Build] Compatibility with modern Visual Studio (#8170)
|
||||
Fix: Trees would disappear completely after a few years if tree spread was disabled (#8160)
|
||||
Fix #8155: Roadtype speed limit in scenario editor toolbar dropdown was doubled (#8156)
|
||||
Fix: Desync after house replacement (#8151)
|
||||
Fix #8137: New clients can't join (desync) after funding an industry (#8140)
|
||||
Fix #8132: Corrupted savegame with station with multiple owners caused a crash (#8134, #8142)
|
||||
Fix: Stop gamelog when recovering from a savegame load error (#8133)
|
||||
Fix: Exceptionally unlikely issue when reading MIDI files (#8125)
|
||||
Fix #8119: Docking areas were not properly updated when clearing, causing desyncs (#8124, #8130)
|
||||
Fix #8117: Memory leak for incoming admin port packets (#8122)
|
||||
Fix: Non-roadbridges potentially had roadtype information set (#8111)
|
||||
Fix #8108: Possible crash on loading TTD savegames with phantom oil rigs (#8109, #8110)
|
||||
Fix #8093: Build & refit test run changed game state and could cause desyncs (#8103)
|
||||
Fix: [Script] AreWaterTilesConnected did not handle aqueducts properly (#8074)
|
||||
|
||||
|
||||
1.10.1 (2020-04-13)
|
||||
------------------------------------------------------------------------
|
||||
Fix #8081: Crash when placing a ship depot next to a dock (#8082)
|
||||
Fix: [GS] A Goal's QuestionID was getting truncated (#8072)
|
||||
Fix #8064: Refit capacity could be displayed incorrectly in extreme edgecases (#8065)
|
||||
Fix #8060: Restore admin network API compatibility (#8061)
|
||||
Fix #8055: Crash when roadtype availability changes with the road construction toolbar open (#8058)
|
||||
|
||||
|
||||
1.10.0 (2020-04-01)
|
||||
------------------------------------------------------------------------
|
||||
Change: Open company window when clicking on a company goal (#8033)
|
||||
Change: [SDL2] Support pasting from clipboard on Linux (#8004)
|
||||
Fix: [Script] Random deviation upper bound range should be inclusive (#8052)
|
||||
Fix #8043: Incorrect handling of global road/tram hotkeys caused a crash (#8044)
|
||||
Fix #8039: [Script] SetOrderFlags and GetOrderDestination didn't work for oil rigs (#8040)
|
||||
Fix: [Script] CanBuildConnectedRoadPartsHere neighbours tiles were incorrect if you started a new game with a different world size (#8036)
|
||||
Fix: Ignore clicks on non-applicable global goals (#8035)
|
||||
Fix #7613: Limit News Window to 1024 messages to keep it usable and avoid overflowing scrollbars (#8026)
|
||||
Fix #7644: [OSX] Hopefully improve performance by manually set colorspace to sRGB (#8023)
|
||||
Fix #8020: Add missing docking tiles around industry neutral stations (#8021)
|
||||
Fix: GUI tramway icon only contained a single set of tram tracks (#8015)
|
||||
Fix: Station with multiple docks had the wrong tile area (#8014)
|
||||
Fix #8011: Crash when loading TTD scenario containing a dock (#8012)
|
||||
Fix #7998: Crash when scripts tried to access companies with invalid IDs (#8010)
|
||||
Fix: Crash when attempting to draw a string containing nonprintable characters (#8005)
|
||||
Fix #6399: Directory ~/.local/share not created if it didn't already exist (#8003)
|
||||
Fix #7958: Custom catenary missing on road bridges (#7991)
|
||||
Fix #7944: Demolishing locks built on rivers didn't always restore the river (#7946)
|
||||
|
||||
|
||||
1.10.0-RC1 (2020-02-09)
|
||||
------------------------------------------------------------------------
|
||||
Feature: Allow server to supply a reason to kicked/banned clients (#7859)
|
||||
Feature: [NewGRF] Station variable 6A, querying GRFID of nearby station tiles (#7956)
|
||||
Feature: Improved logic of sharing industry production between 3 or more stations (#7922)
|
||||
Feature: Highlight the item under mouse cursor in file browser (#7900)
|
||||
Feature: [GS] Methods to change town rating of companies (#7898)
|
||||
Feature: [NewGRF] Callback profiling command (#7868)
|
||||
Feature: Add a setting to show the name of the NewGRF of a vehicle in the build window (#7852)
|
||||
Feature: Ability to filter industry directory window by cargo (#7843)
|
||||
Feature: Minimap screenshot type (#7817)
|
||||
Feature: [GS] Methods to control engine availability of a specific company (#7791)
|
||||
Feature: Configurable game ending year (#7747)
|
||||
Feature: Separate window for taking screenshots (#7550)
|
||||
Change: Move autorenew setting to basic category (#7984)
|
||||
Change: Improved algorithm for transfer feeder payments (#7935)
|
||||
Change: Show volume sliders with wedges instead of boxy slider (#7902)
|
||||
Change: Auto-restart loads the original resources (e.g. save or scenario) again (#7688)
|
||||
Change: Improve readability of integer lists saved to config files (#7396)
|
||||
Fix #7976: Crash when attempting to kick the host via rcon (#7985)
|
||||
Fix #7592: Road vehicles no longer balanced between multiple road stop stations (#7979)
|
||||
Fix: Station rating effects affecting too large area (#7977)
|
||||
Fix #7974: Crash when Ctrl+click to show a collapsed vehicle group (#7975)
|
||||
Fix #7969: Crash when executing a recursive console alias (#7973)
|
||||
Fix #6566: Very long loading of the maximum "zoom out" level at high resolutions (#7968)
|
||||
Fix #7952: Crash when switching input languages (#7953)
|
||||
Fix: [OSX] Don't show a crash/assertion message box for a GUI-less video driver (#7934)
|
||||
Fix #7925: Corrupt savegames could lead to corruption of the titlegame (#7932)
|
||||
Fix: [Fluidsynth] Music notes from previous song were not properly reset (#7930)
|
||||
Fix: Invalid string usage within music window (#7928)
|
||||
Fix: Non-deterministic name sorting in industry directory window (#7915)
|
||||
Fix #7899: Various issues with town list window sorting (#7906, #7916)
|
||||
Fix #7587: Fix possible crashes when loading old save games with invalid waypoint positions (#7894)
|
||||
Fix: Avoid a crash by properly resetting timetable duration when loading old savegames (#7894)
|
||||
Fix: Possible crash when post road-works cleanup removes all road pieces (#7903)
|
||||
Fix #7891: Fix crash when loading save from 1.7.2 (#7892)
|
||||
Fix #7887: Missing sound effects for some main toolbar buttons (#7888)
|
||||
Fix #6667: Avoid confusion by also recalculating bridge costs for 'spectated' AI companies (#7884)
|
||||
Fix: Allow old NewGRF industries to hide in/out cargo slots (#7882)
|
||||
Fix: [Windows] Fix bootstrap GUI with Uniscribe but no Freetype (#7878)
|
||||
Fix: Missing keycodes for hotkeys.cfg (#7850)
|
||||
Fix #7625: Ensure road infrastructure cost is correctly updated when upgrading your own roads (#7628)
|
||||
Fix #7088: Avoid crash by closing AI/GS textfile windows when changing their in-game slot (#7094)
|
||||
|
||||
|
||||
1.10.0-beta2 (2019-12-25)
|
||||
------------------------------------------------------------------------
|
||||
- Feature: [Script] More error mappings (#7857)
|
||||
- Feature: Ctrl+Click on a vehicle in the vehicle group window selects and scrolls to the vehicle's group (#7800)
|
||||
- Feature: Ctrl+Click on the vehicle details button in the vehicle view window opens the vehicle group window focused on the vehicle (#7800)
|
||||
- Feature: Add a button to the vehicle advisory news window to open the vehicle's group window (#7800)
|
||||
- Feature: Ctrl+Click on a vehicle in the vehicle list window opens the vehicle group window focused on the vehicle's group (#7800)
|
||||
- Fix: Custom sea level default value is now equal to minimum value (#7866)
|
||||
- Fix: [NewGRF] Various tracktype fixes (#7863)
|
||||
- Fix: Infrastructure total update when removing tram road stop (#7856)
|
||||
- Fix #7847: Use ViewportSign coordinates for sign Kdtree coordinates (#7849)
|
||||
- Fix #7836: Check coherency of NewGRF parameter min/max (#7840)
|
||||
- Fix #7673: [Script] Allow removal of custom town text (#7834)
|
||||
- Fix: Crash when displaying an error message at map edges (#7833)
|
||||
- Fix #7783, #7816: [SDL2] Fix input handling in edit context (#7825)
|
||||
- Fix #7697: Tile query on HQs did not display cargo correctly (#7824)
|
||||
- Fix #7820: Possible game crash when removing oil rig (#7821)
|
||||
- Fix #7606: Rare crash when trying to clean up a crashed script (#7819)
|
||||
- Fix #7784: [SDL2] up/down/home/end key behaviour (#7815)
|
||||
- Fix #7631: 16 out cargo support for industry directory (#7809)
|
||||
- Fix #7646: Crash on random map generation failure (#7805)
|
||||
- Fix #7430: Only reset time since pickup when train visits station if it has room to load (#7595)
|
||||
- Fix #5405: Aircraft could route to depots outside their range (#7104)
|
||||
|
||||
|
||||
1.10.0-beta1 (2019-10-29)
|
||||
------------------------------------------------------------------------
|
||||
- Feature: Configurable minimum age for companies before allowing share trading (#7780)
|
||||
- Feature: Filter on town list window (#7621)
|
||||
- Feature: Ability to show Newspaper and Ticker messages in parallel (#7612)
|
||||
- Feature: Show coverage area for stations and towns (#7446)
|
||||
- Feature: Collapsible vehicle groups (#7417)
|
||||
- Feature: More flexible docks - can now have multiple per station, ships can use any part of dock (#7380)
|
||||
- Feature: [NewGRF] Railtype flags to allow/disallow 90 degree curves (#7352)
|
||||
- Feature/Change: Non-rectangular catchment area for sparse stations (#7235)
|
||||
- Feature: Improved performance for road vehicle pathfinding (#7261)
|
||||
- Feature: Option to show local authority boundary of towns (#7025)
|
||||
- Feature: Experimental method of town cargo generation that scales linearly with population (#6965)
|
||||
- Feature: [NewGRF] RoadTypes (NRT) (#6811)
|
||||
- Add: [Win32] Select MIDI device by port name (#7666)
|
||||
- Add: 'getsysdate' console command (#7658)
|
||||
- Add: Currencies NTD, CNY, HKD (#7596)
|
||||
- Add: Icons to vehicle construction drop down lists (#7358, #7485)
|
||||
- Add: Security warning to players that company passwords are not truly secure (#7351)
|
||||
- Add: [Script] Various API functions for managing vehicle groups (#7225, #7336, #7716)
|
||||
- Add: SDL2 video driver (#7086)
|
||||
- Change: Inactive industries do not make sound effects (#7752)
|
||||
- Change: [Win32] Use native GDI engine for rendering fonts (#7572)
|
||||
- Change: Scale oil refinery edge distance limit by map size (#7514)
|
||||
- Change: Do not display a news message about old vehicles when a replacement for it is activated (#7401)
|
||||
- Change: When filtering purchase list by cargo type, buy button now performs a refit if required (#7301)
|
||||
- Change: Don't apply forbid 90 deg turn settings to ships, and make penalties for turns configurable (#7289, #7372)
|
||||
- Change: Make the chance of an aeroplane crashing at an airport with a short runway independent of plane crash setting (#7302)
|
||||
- Change: Keep town growth rate in sync with house count (#6777)
|
||||
- Fix #6219: Improve helicopter's ability to takeoff from commuter and international airports (#7710)
|
||||
- Fix #6407: Show snowy ground sprites for train depots (#7671)
|
||||
- Fix: Power/running cost sorting algorithm was not correct when power was higher than running cost (#7561)
|
||||
- Fix: Tweaks to small-map colours to make dark blue company more visible (#7436, #7450)
|
||||
- Fix: [SDL] Do not offer video smaller than 640x480 (#7442)
|
||||
- Fix: Incorrect display of industry production around tiles (#7426)
|
||||
- Fix: Show industry name in Land Area Information window for industries with neutral stations instead of just 'Oil Rig' (#7349)
|
||||
- Fix: Remove redundant and broken file lookups when loading base sets (#7348)
|
||||
- Fix: Always report error when ordering a road vehicle to wrong type of road stop (#7316)
|
||||
- Fix #7043, #7274: Improve performance when creating towns during world creation (#7284)
|
||||
- Fix #7062: Remove ship max order distance (#7279)
|
||||
- Fix #7189: Fluidsynth volume gain too high (#7253)
|
||||
- Fix: Add setting for whether industries with neutral stations (e.g. Oil rigs) accept and supply cargo to/from surrounding stations to fix exploit as old as TTO (#7234)
|
||||
- Fix: Properly reset dropdown menu windows after changing AI/GS settings (#7092)
|
||||
- Remove: DOS, MorphOS, AmigaOS & BeOS support (#7326, #7388)
|
||||
- Remove: Original Path Finder (#7245)
|
||||
|
||||
|
||||
1.9.3 (2019-09-16)
|
||||
------------------------------------------------------------------------
|
||||
- Change: Use natural sort when sorting the file list (#7727)
|
||||
- Fix #7479: Don't close construction windows when changing client name (#7728)
|
||||
- Fix #7731: Files sorting by modification time on Windows XP (#7731)
|
||||
- Fix #7644: [OSX] Better solution for colourspace/performance issues (#7741)
|
||||
|
||||
|
||||
1.9.3-RC1 (2019-09-07)
|
||||
------------------------------------------------------------------------
|
||||
- Add: Can now click industries to make orders to their neutral station (e.g. oil rig) (#7709)
|
||||
- Fix #7644: [OSX] Poor framerate on certain systems (#7721)
|
||||
- Fix #7702: Highscore screen UI scaling (#7714)
|
||||
- Fix #7704: [OSX] Handle malformed UTF8 strings, leading to crashes in server browser (#7705)
|
||||
- Fix #7188: [AI] Possible crash when reloading an AI in multiplayer games (#7701, #7725)
|
||||
- Fix: RemoveAirport function now returns 'Aircraft in the way' error message when occupied (#7690)
|
||||
- Fix: Spelling in running costs setting help text (#7686)
|
||||
- Fix #7655: 'Decrease' buttons in cheat window not working properly with UI scaling (#7669)
|
||||
- Fix: [GS] Could not create elements on Storybook pages with ID > 255 (#7657)
|
||||
- Fix #7626: Allow building road stops over town-owned one-way roads, instead of crashing (#7627)
|
||||
|
||||
|
||||
1.9.2 (2019-07-07)
|
||||
------------------------------------------------------------------------
|
||||
- Change: Set default setting in server browser of "Advertised" to "Yes" (#7568)
|
||||
- Change: Allow building road stops over self-owned one-way/blocked road (#7547)
|
||||
- Fix #7463: Promote scroll mode setting to basic category (#7586)
|
||||
- Fix: Inconsistent GUI scaling (#7539)
|
||||
- Fix #7491: Send company update admin message when bankruptcy counter changes (#7492)
|
||||
- Fix #7553: Check bounds when loading strings (#7554)
|
||||
- Fix: Really increase the maximum number of GameScript texts to 64k (#7555)
|
||||
- Fix: Crash when attempting to load old save game with GRFs set (#7546)
|
||||
- Fix #6507: Don't try to load invalid depots from older savegames (#7546)
|
||||
- Fix: Railtype bits were moved too late, leading to rails under bridges losing their type (#7546)
|
||||
- Fix: Bounds check access to railtype_map (#7529)
|
||||
- Fix: Spurious errors when using more than 32 railtypes (#7533)
|
||||
- Fix #7633: Allow zero-cost track conversion to succeed (#7634)
|
||||
- Fix #7577: Check if linkgraph station index is valid before dereferencing (#7583)
|
||||
- Fix #7224: Drag and drop vehicle group creation does not work correctly (#7581)
|
||||
- Fix #7570: Show Github URL in the crashlog window (#7571)
|
||||
- Fix: Clicking on scrollbar 'thumb' moved position up instantly (#7549)
|
||||
- Fix #7255: Prevent crashlog corruption by only printing the 32 most recent news messages (#7542)
|
||||
- Fix #5685: Check for free wagons in ScriptVehicleList (#7617)
|
||||
- Fix: Make GSGoal.QuestionClient work correctly at least for clients with ID < 2**16 (#7560)
|
||||
- Fix #6666: Mismatched parentheses in RTL languages (#7480)
|
||||
- Fix: [Windows] Various reliability and correctness improvements to MIDI on Windows (#7620)
|
||||
|
||||
|
||||
1.9.1 (2019-04-08)
|
||||
------------------------------------------------------------------------
|
||||
- Fix #6564: Enforce types of arguments for station name strings (#7419)
|
||||
- Fix #7433: Don't use AirportSpec substitute if it's not enabled (#7435)
|
||||
- Fix #7447, #7466, #7476: Missing NewGRF strings due to Action 4 feature check skipping pseudo-feature 48 (#7449)
|
||||
- Fix #6222: Advanced sprite layout sometimes showed incorrect railtype ground tile. (#7460)
|
||||
- Fix #7439: CompanyRemoveReason overwritten by ClientID (#7465)
|
||||
- Fix: [Windows] Incorrect error handling could lead to cascading error windows (#7482)
|
||||
- Fix #7478: Don't remove NewGRF objects on company take-over. (#7483)
|
||||
|
||||
|
||||
1.9.0 (2019-04-01)
|
||||
------------------------------------------------------------------------
|
||||
- Fix #7411: Use industry production callback (if used) on initial industry cargo generation (#7412)
|
||||
|
||||
|
||||
1.9.0-RC2 (2019-03-24)
|
||||
------------------------------------------------------------------------
|
||||
- Fix #7400: WaterClass for tree tiles was not converted for old saves preventing industry creation (#7405)
|
||||
- Fix: Filtered file list did not scroll properly (#7402)
|
||||
- Fix #7391: Don't invalidate go to depot orders of non-aircraft when invalidating hangar orders that happen to share IDs (#7392)
|
||||
- Fix #7386: Measurement tooltip for tunnels, aqueducts & docks did not display or flickered (#7389)
|
||||
- Fix: Wrong company performance rating when money exceeds INT_MAX (#7382)
|
||||
- Fix: Permit loading of industry production callback with invalid cargo type (#7364)
|
||||
- Fix: Spelling for a few real town names (#7338)
|
||||
- Fix: Runway too short for large aircraft message should not depend on plane crashes setting (#7325)
|
||||
- Fix #7334: Ship lost after crossing bridge due to path cache not being consumed while on final bridge end (#7335)
|
||||
|
||||
|
||||
1.9.0-RC1 (2019-03-03)
|
||||
------------------------------------------------------------------------
|
||||
- Add: Various AI/GS functions for vehicle groups (#7225)
|
||||
- Change: Synchronise introduction date and reliability randomness across vehicles with the same base introduction date (#7147)
|
||||
- Change: Allow towns to build bridges over rails and one-way roads (#7291)
|
||||
- Fix: Detection of coast tiles with trees on them (#7309)
|
||||
- Fix: Emergency netsave saved the title game instead of the broken game in question (#7298)
|
||||
- Fix: Company livery window showed incorrect groups when opened in multiplayer (#7288)
|
||||
- Fix: Unable to select last group in open livery window (#7283)
|
||||
- Fix: Goto hangar orders were not invalidated when rebuilding airports (#7100)
|
||||
|
||||
|
||||
1.9.0-beta3 (2019-02-24)
|
||||
------------------------------------------------------------------------
|
||||
- Feature: Option to adjust font size separately from GUI size (#7003)
|
||||
- Feature: Increase maximum number of orders from 64000 to ~16.7m (#7220)
|
||||
- Add: Show performance of AI and GS in framerate window
|
||||
- Add: News menu entry and shortcut for deleting all messages (#7240)
|
||||
- Change: [OSX] Improved scrolling behaviour when using touchpads
|
||||
- Change: Add scrollbar to cargo legend in cargo payment rates window
|
||||
- Change: Owner of vehicle with exclusive transport rights may now load cargo from neutral stations (#7256)
|
||||
- Change: Improved UI behaviour when dragging sound volume sliders with the mouse (#7227)
|
||||
- Change: Use selected vehicle group as parent when creating a new group (#7224)
|
||||
- Change: Use SlErrorCorrupt() on pool index error when loading a savegame, instead of terminating (#7219)
|
||||
- Change: Skip reliability decay if servicing is disabled
|
||||
- Fix: Remove desert around lakes upon generation
|
||||
- Fix: Re-sorting file list did not update filtered rows
|
||||
- Fix #7159: Waiting time at red one-way signals was too short
|
||||
- Fix #7189: Fluidsynth volume gain too high
|
||||
- Fix #7004: Cargo flow legend was not properly refreshed after zooming (#7265)
|
||||
- Fix: Possibility to modify wrong AI/GS settings when switching AI/GS scripts around (#7090, #7091)
|
||||
- Fix: Use more descriptive "spectator" strings for story book and goal dropdown menus
|
||||
- Fix #6599: Disable build and rename button in build vehicle window when no vehicle is selected
|
||||
- Fix: Do not mangle tagged revision strings for network revision strings
|
||||
- Fix #7151: AI start date deviation was still applied when not set to a random AI (#7223)
|
||||
- Fix #7197: Invalidate depot buttons when necessary (#7212)
|
||||
- Doc: [AI] UnshareOrders empties the orders list of the vehicle
|
||||
|
||||
|
||||
1.9.0-beta2 (2019-02-09)
|
||||
------------------------------------------------------------------------
|
||||
- Fix: Non-Windows builds did not get correct git hash
|
||||
|
||||
|
||||
1.9.0-beta1 (2019-02-09)
|
||||
------------------------------------------------------------------------
|
||||
Note: OpenTTD was migrated to GitHub for 1.9, so SVN revision and FlySpray numbers have been replaced with Pull Requests and Issue numbers
|
||||
- Feature: Group liveries, and livery window usability enhancements (#7108)
|
||||
@@ -124,7 +708,7 @@ Note: OpenTTD was migrated to GitHub for 1.9, so SVN revision and FlySpray numbe
|
||||
- Fix: [Win32] Right mouse scrolling didn't work properly with the Windows 10 Fall Creators Update [FS#6629] (r27935)
|
||||
- Fix: Forest, candyfloss forest and battery farm skipped the first animation frame [FS#6639] (r27932)
|
||||
- Fix: Glyphs in range U+0020 to U+00FF may only be defined in orig_extra.grf, not in openttd.grf [FS#6620] (r27915)
|
||||
- Fix: 'unban' console command was not handling IPv6 adresses properly (r27914, r27913)
|
||||
- Fix: 'unban' console command was not handling IPv6 addresses properly (r27914, r27913)
|
||||
- Fix: Keep the 'link' between industry chain and smallmap windows whenever possible [FS#6585] (r27905)
|
||||
- Fix: When the last vehicle is removed from a shared orders group, hide the 'Stop sharing' button in the vehicle orders window [FS#6593] (r27904)
|
||||
- Fix: Tooltip of 'increase service interval' said 'decrease' [FS#6606] (r27895)
|
||||
@@ -230,7 +814,7 @@ Note: OpenTTD was migrated to GitHub for 1.9, so SVN revision and FlySpray numbe
|
||||
- Fix: [Build] Force sorting to be locale independent, so files are always ordered the same and by that token better diff-able (r27562, r27558)
|
||||
- Fix: Typos in comments and string (r27561, r27560)
|
||||
- Fix: [Build] bashism that caused different CFLAGS with bash vs dash (r27557)
|
||||
- Fix: Use a more appropiate sound effect for convert-rail (r27547)
|
||||
- Fix: Use a more appropriate sound effect for convert-rail (r27547)
|
||||
- Fix: Remove SetFill from vehicle GUI buttons, so that the viewport is resized instead of them in case of long window titles (r27546)
|
||||
- Fix: [Script] Generation of API wrappers (r27545, r27544, r27543)
|
||||
- Fix: [Windows] ICU got disabled for Windows builds, breaking RTL support [FS#6427] (r27542)
|
||||
@@ -3121,7 +3705,7 @@ Note: OpenTTD was migrated to GitHub for 1.9, so SVN revision and FlySpray numbe
|
||||
- Fix: Improve corner case order handling: mark order as done only when actually done, obey non-stop orders, do only stop/refit at the depot in the order (r16240, r16228, r16199, r16198, r16187)
|
||||
- Fix: [NoAI] Use the stop/non-stop intermediate orderflags AIs can give for goto-depot orders (r16239)
|
||||
- Fix: [NewGRF] ActionB should use the online parameters from GRFFile instead of the initial user-specified values from GRFConfig. Also use the values as they were set when the ActionB was executed, not as they are set when the message is shown (r16223)
|
||||
- Fix: Possible crashes when quiting OpenTTD or forcing resizes/redraws of the screen during map generation [FS#2862] (r16220)
|
||||
- Fix: Possible crashes when quitting OpenTTD or forcing resizes/redraws of the screen during map generation [FS#2862] (r16220)
|
||||
- Fix: Shared orders without orders were not properly converted causing corrupt/invalid orders when loading pre 0.7 savegames [FS#2878] (r16214)
|
||||
- Fix: Hardcoded (old sized) MAX_COMPANIES constant (r16182)
|
||||
- Fix: [Squirrel] The traps variable was not restored, causing try/catch blocks to be 'forgotten' during a suspend (r16181)
|
||||
@@ -3129,7 +3713,7 @@ Note: OpenTTD was migrated to GitHub for 1.9, so SVN revision and FlySpray numbe
|
||||
- Fix: Forbid joining AI companies via the 'move' and 'join' console commands/multiplayer lobby (r16176, r16175)
|
||||
- Fix: [NoAI] AIOrder::GetOrderDestination and AIOrder::GetOrderFlags did not work on ORDER_CURRENT when the vehicle was loading/leaving in a station (r16165)
|
||||
- Fix: [NoAI] Change WAYPOINT_INVALID to 0xFFFF from -1 as that is the value the AIs got (due to casting) (r16150)
|
||||
- Fix: The overflowsafe type did not like dividing by int64 larger than MAX_INT32 causing division by negative numbers and small anomolies when drawing graphs [FS#2855] (r16130)
|
||||
- Fix: The overflowsafe type did not like dividing by int64 larger than MAX_INT32 causing division by negative numbers and small anomalies when drawing graphs [FS#2855] (r16130)
|
||||
- Fix: Road was removed when both the Remove button was active and Ctrl was pressed [FS#2582] (r16119)
|
||||
- Fix: [NoAI] Make sure AIOrder::GetDestination always returns a tile belonging to the station (16109)
|
||||
- Fix: [NoAI] When giving an aircraft a goto-hangar order do not let it be a normal goto-station order (r16108)
|
||||
@@ -3585,7 +4169,7 @@ Note: OpenTTD was migrated to GitHub for 1.9, so SVN revision and FlySpray numbe
|
||||
- Fix: Inconsistent use of 8/15-bitness of NewGRF callback results with respect to TTDP's implementation of the specification (r12819, r12818, r12759)
|
||||
- Fix: Possible out of bounds array access (r12809)
|
||||
- Fix: Enforce autorenew values range in command (r12808)
|
||||
- Fix: Vehicles could break down during loading and keep loading. The intention of the break down code is not to break down when having zero speed, therefor break downs now do not happen when loading [FS#1938] (r12795)
|
||||
- Fix: Vehicles could break down during loading and keep loading. The intention of the break down code is not to break down when having zero speed, therefore break downs now do not happen when loading [FS#1938] (r12795)
|
||||
- Fix: [OSX] In some rare cases when using an uncalibrated monitor the system colour space could not be retrieved. Show an error when this happens instead of just trying an assertion (r12776)
|
||||
- Fix: Slope checking for NewGRFs failed (r12759)
|
||||
- Fix: Check the TILE_NOT_SLOPED flag of the _north_ tile of multi-tile houses to decide if autoslope is allowed (r12717)
|
||||
@@ -3693,7 +4277,7 @@ Note: OpenTTD was migrated to GitHub for 1.9, so SVN revision and FlySpray numbe
|
||||
- Feature: Separate catenary transparency settings from building transparency settings (r12103)
|
||||
- Feature: Allow locking individual transparency settings so they will not be changed by pressing 'x' (r12102)
|
||||
- Feature: Add some missing VarAction2 variables (r12124)
|
||||
- Feature: Make snow appear on rail tiles dependant on track height, not on height of the lowest part of the tile (r12098)
|
||||
- Feature: Make snow appear on rail tiles dependent on track height, not on height of the lowest part of the tile (r12098)
|
||||
- Feature: [NewGRF] Specify the purchase, rail and road description of a bridge (r12069)
|
||||
- Feature: [NewGRF] Add support for var 12, Variational Action 2 (r12045)
|
||||
- Feature: Allow trees on shore (r12029)
|
||||
@@ -3974,7 +4558,7 @@ Note: OpenTTD was migrated to GitHub for 1.9, so SVN revision and FlySpray numbe
|
||||
- Feature: Add support for variable snow lines in the arctic climate, supplied by NewGRF files (r9371)
|
||||
- Feature: [NewGRF] Add support for newhouses (r9315)
|
||||
- Feature: [NewGRF] Add support for Action 13, which allows you to translate GRF-specific texts. The translations will only be shown if you are using a language with a GRF language id and if a string has not already been set specifically for the language you are using (r9037)
|
||||
- Feature: Translation dependant formatting of dates (r8906)
|
||||
- Feature: Translation dependent formatting of dates (r8906)
|
||||
- Feature: If an action 7/9 leads to skipping the rest of the file, disable the NewGRF if an action 8 has not been encountered yet (r8831)
|
||||
- Feature: Stop loading and disable the current NewGRF if a fatal error message in Action B is encountered. Also be more strict on the values accepted (r8830)
|
||||
- Feature: Build aircraft windows will no longer show aircraft that cannot use the airport in question (r8771)
|
||||
@@ -4095,7 +4679,7 @@ Note: OpenTTD was migrated to GitHub for 1.9, so SVN revision and FlySpray numbe
|
||||
- Fix: Do not display income/expenses when they do not belong to a 'valid' tile, like the money cheat and giving money [FS#1175] (r11021)
|
||||
- Fix: One could not give money when (s)he had too much money [FS#1174] (r11020)
|
||||
- Fix: Disallow buying/selling shares in your own company or a bankrupt company [FS#1169] (r11018)
|
||||
- Fix: Crash when quiting the game in one of the end score windows [FS#1218] (r11071)
|
||||
- Fix: Crash when quitting the game in one of the end score windows [FS#1218] (r11071)
|
||||
|
||||
|
||||
0.5.3-RC3 (2007-08-30)
|
||||
@@ -4227,7 +4811,7 @@ Note: OpenTTD was migrated to GitHub for 1.9, so SVN revision and FlySpray numbe
|
||||
|
||||
0.5.1-RC1 (2007-03-20)
|
||||
------------------------------------------------------------------------
|
||||
- Feature: Translation dependant formatting of dates (r8906)
|
||||
- Feature: Translation dependent formatting of dates (r8906)
|
||||
- Feature: Kick inactive initial network connections after some time [FS#115] (r9038, r9061)
|
||||
- Feature: Add an extra news group for opening and closing of industries (r9097)
|
||||
- Codechange: Disable shares by default and increase the default maximum distance from edge for oil refineries (r9339)
|
||||
@@ -5190,7 +5774,7 @@ Note: OpenTTD was migrated to GitHub for 1.9, so SVN revision and FlySpray numbe
|
||||
- Fix: Wrong pathfinding when northern station tile is missing
|
||||
- Fix: You cannot take ownership of an oilrig by building right next to it
|
||||
- Fix: [Makefile] Fixed issue where sdl-config was needed even on systems without SDL
|
||||
- Fix: [SDL] Performance fix fo palette animation and mouse jumping
|
||||
- Fix: [SDL] Performance fix for palette animation and mouse jumping
|
||||
- Fix: [SDL] Same resolution was displayed more than once in game options
|
||||
- Fix: [SDL] Smoother mouse and performance fix, like in the Windows video driver
|
||||
- Fix: Wrong trains you can buy with scenarios [SF#963056]
|
||||
|
145
cmake/AddCustomXXXTimestamp.cmake
Normal file
145
cmake/AddCustomXXXTimestamp.cmake
Normal file
@@ -0,0 +1,145 @@
|
||||
macro(_parse_arguments_with_multi_hack ORIGINAL_COMMAND_LINE)
|
||||
# cmake_parse_arguments() put all the MULTIS in a single variable; you
|
||||
# lose the ability to see for example multiple COMMANDs. To be able to
|
||||
# passthrough multiple MULTIS, we add a marker after every MULTI. This
|
||||
# allows us to reassemble the correct amount again before giving it to
|
||||
# the wrapped command with _reassemble_command_line().
|
||||
|
||||
set(COMMAND_LINE "${ORIGINAL_COMMAND_LINE}")
|
||||
|
||||
foreach(MULTI IN LISTS MULTIS)
|
||||
string(REPLACE "${MULTI}" "${MULTI};:::" COMMAND_LINE "${COMMAND_LINE}")
|
||||
endforeach()
|
||||
|
||||
cmake_parse_arguments(PARAM "${OPTIONS}" "${SINGLES}" "${MULTIS}" ${COMMAND_LINE})
|
||||
endmacro()
|
||||
|
||||
macro(_reassemble_command_line)
|
||||
# Reassemble the command line as we original got it.
|
||||
set(NEW_COMMAND_LINE ${PARAM_UNPARSED_ARGUMENTS})
|
||||
|
||||
foreach(OPTION IN LISTS OPTIONS)
|
||||
if(PARAM_${OPTION})
|
||||
list(APPEND NEW_COMMAND_LINE "${OPTION}")
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
foreach(SINGLE IN LISTS SINGLES)
|
||||
if(PARAM_${SINGLE})
|
||||
list(APPEND NEW_COMMAND_LINE "${SINGLE}" "${PARAM_${SINGLE}}")
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
foreach(MULTI IN LISTS MULTIS)
|
||||
if(PARAM_${MULTI})
|
||||
# Replace our special marker with the name of the MULTI again. This
|
||||
# restores for example multiple COMMANDs again.
|
||||
string(REPLACE ":::" "${MULTI}" PARAM_${MULTI} "${PARAM_${MULTI}}")
|
||||
list(APPEND NEW_COMMAND_LINE "${PARAM_${MULTI}}")
|
||||
endif()
|
||||
endforeach()
|
||||
endmacro()
|
||||
|
||||
# Generated files can be older than their dependencies, causing useless
|
||||
# regenerations. This function replaces each file in OUTPUT with a .timestamp
|
||||
# file, adds a command to touch it and move the original file in BYPRODUCTS,
|
||||
# before calling add_custom_command().
|
||||
#
|
||||
# Note: Any add_custom_target() depending on files in original OUTPUT must use
|
||||
# add_custom_target_timestamp() instead to have the correct dependencies.
|
||||
#
|
||||
# add_custom_command_timestamp(OUTPUT output1 [output2 ...]
|
||||
# COMMAND command1 [ARGS] [args1...]
|
||||
# [COMMAND command2 [ARGS] [args2...] ...]
|
||||
# [MAIN_DEPENDENCY depend]
|
||||
# [DEPENDS [depends...]]
|
||||
# [BYPRODUCTS [files...]]
|
||||
# [IMPLICIT_DEPENDS <lang1> depend1
|
||||
# [<lang2> depend2] ...]
|
||||
# [WORKING_DIRECTORY dir]
|
||||
# [COMMENT comment]
|
||||
# [VERBATIM] [APPEND] [USES_TERMINAL])
|
||||
function(add_custom_command_timestamp)
|
||||
set(OPTIONS VERBATIM APPEND USES_TERMINAL)
|
||||
set(SINGLES MAIN_DEPENDENCY WORKING_DIRECTORY COMMENT)
|
||||
set(MULTIS OUTPUT COMMAND DEPENDS BYPRODUCTS IMPLICIT_DEPENDS)
|
||||
|
||||
_parse_arguments_with_multi_hack("${ARGN}")
|
||||
|
||||
# Create a list of all the OUTPUTs (by removing our magic marker)
|
||||
string(REPLACE ":::;" "" OUTPUTS "${PARAM_OUTPUT}")
|
||||
|
||||
# Reset the OUTPUT and BYPRODUCTS as an empty list (if needed).
|
||||
# Because they are MULTIS, we need to add our special marker here.
|
||||
set(PARAM_OUTPUT ":::")
|
||||
if(NOT PARAM_BYPRODUCTS)
|
||||
set(PARAM_BYPRODUCTS ":::")
|
||||
endif()
|
||||
|
||||
foreach(OUTPUT IN LISTS OUTPUTS)
|
||||
# For every output, we add a 'cmake -E touch' entry to update the
|
||||
# timestamp on each run.
|
||||
get_filename_component(OUTPUT_FILENAME ${OUTPUT} NAME)
|
||||
string(APPEND PARAM_COMMAND ";:::;${CMAKE_COMMAND};-E;touch;${CMAKE_CURRENT_BINARY_DIR}/${OUTPUT_FILENAME}.timestamp")
|
||||
|
||||
# We change the OUTPUT to a '.timestamp' variant, and make the real
|
||||
# output a byproduct.
|
||||
list(APPEND PARAM_OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${OUTPUT_FILENAME}.timestamp)
|
||||
list(APPEND PARAM_BYPRODUCTS ${OUTPUT})
|
||||
|
||||
# Mark this file as being a byproduct; we use this again with
|
||||
# add_custom_target_timestamp() to know if we should point to the
|
||||
# '.timestamp' variant or not.
|
||||
set_source_files_properties(${OUTPUT} PROPERTIES BYPRODUCT ${CMAKE_CURRENT_BINARY_DIR}/${OUTPUT_FILENAME}.timestamp)
|
||||
endforeach()
|
||||
|
||||
# Reassemble and call the wrapped command
|
||||
_reassemble_command_line()
|
||||
add_custom_command(${NEW_COMMAND_LINE})
|
||||
endfunction()
|
||||
|
||||
# Generated files can be older than their dependencies, causing useless
|
||||
# regenerations. This function adds a .timestamp file for each file in DEPENDS
|
||||
# replaced by add_custom_command_timestamp(), before calling add_custom_target().
|
||||
#
|
||||
# add_custom_target_timestamp(Name [ALL] [command1 [args1...]]
|
||||
# [COMMAND command2 [args2...] ...]
|
||||
# [DEPENDS depend depend depend ... ]
|
||||
# [BYPRODUCTS [files...]]
|
||||
# [WORKING_DIRECTORY dir]
|
||||
# [COMMENT comment]
|
||||
# [VERBATIM] [USES_TERMINAL]
|
||||
# [SOURCES src1 [src2...]])
|
||||
function(add_custom_target_timestamp)
|
||||
set(OPTIONS VERBATIM USES_TERMINAL)
|
||||
set(SINGLES WORKING_DIRECTORY COMMENT)
|
||||
set(MULTIS COMMAND DEPENDS BYPRODUCTS SOURCES)
|
||||
# ALL is missing, as the order is important here. It will be picked up
|
||||
# by ${PARAM_UNPARSED_ARGUMENTS} when reassembling the command line.
|
||||
|
||||
_parse_arguments_with_multi_hack("${ARGN}")
|
||||
|
||||
# Create a list of all the DEPENDs (by removing our magic marker)
|
||||
string(REPLACE ":::;" "" DEPENDS "${PARAM_DEPENDS}")
|
||||
|
||||
# Reset the DEPEND as an empty list.
|
||||
# Because it is a MULTI, we need to add our special marker here.
|
||||
set(PARAM_DEPENDS ":::")
|
||||
|
||||
foreach(DEPEND IN LISTS DEPENDS)
|
||||
# Check if the output is produced by add_custom_command_timestamp()
|
||||
get_source_file_property(BYPRODUCT ${DEPEND} BYPRODUCT)
|
||||
|
||||
if(BYPRODUCT STREQUAL "NOTFOUND")
|
||||
# If it is not, just keep it as DEPEND
|
||||
list(APPEND PARAM_DEPENDS "${DEPEND}")
|
||||
else()
|
||||
# If it is, the BYPRODUCT property points to the timestamp we want to depend on
|
||||
list(APPEND PARAM_DEPENDS "${BYPRODUCT}")
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
# Reassemble and call the wrapped command
|
||||
_reassemble_command_line()
|
||||
add_custom_target(${NEW_COMMAND_LINE})
|
||||
endfunction()
|
163
cmake/CompileFlags.cmake
Normal file
163
cmake/CompileFlags.cmake
Normal file
@@ -0,0 +1,163 @@
|
||||
# Macro which contains all bits to setup the compile flags correctly.
|
||||
#
|
||||
# compile_flags()
|
||||
#
|
||||
macro(compile_flags)
|
||||
if(MSVC)
|
||||
if(VCPKG_TARGET_TRIPLET MATCHES "-static" AND NOT VCPKG_TARGET_TRIPLET MATCHES "-md")
|
||||
# Switch to MT (static) instead of MD (dynamic) binary
|
||||
|
||||
# For MSVC two generators are available
|
||||
# - a command line generator (Ninja) using CMAKE_BUILD_TYPE to specify the
|
||||
# configuration of the build tree
|
||||
# - an IDE generator (Visual Studio) using CMAKE_CONFIGURATION_TYPES to
|
||||
# specify all configurations that will be available in the generated solution
|
||||
list(APPEND MSVC_CONFIGS "${CMAKE_BUILD_TYPE}" "${CMAKE_CONFIGURATION_TYPES}")
|
||||
|
||||
# Set usage of static runtime for all configurations
|
||||
foreach(MSVC_CONFIG ${MSVC_CONFIGS})
|
||||
string(TOUPPER "CMAKE_CXX_FLAGS_${MSVC_CONFIG}" MSVC_FLAGS)
|
||||
string(REPLACE "/MD" "/MT" ${MSVC_FLAGS} "${${MSVC_FLAGS}}")
|
||||
endforeach()
|
||||
endif()
|
||||
|
||||
# "If /Zc:rvalueCast is specified, the compiler follows section 5.4 of the
|
||||
# C++11 standard". We need C++11 for the way we use threads.
|
||||
add_compile_options(/Zc:rvalueCast)
|
||||
|
||||
if(NOT CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
|
||||
# Enable multi-threaded compilation.
|
||||
add_compile_options(/MP)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Add some -D flags for Debug builds. We cannot use add_definitions(), because
|
||||
# it does not appear to support the $<> tags.
|
||||
add_compile_options(
|
||||
"$<$<CONFIG:Debug>:-D_DEBUG>"
|
||||
"$<$<NOT:$<CONFIG:Debug>>:-D_FORTIFY_SOURCE=2>" # FORTIFY_SOURCE should only be used in non-debug builds (requires -O1+)
|
||||
)
|
||||
if(MINGW)
|
||||
add_link_options(
|
||||
"$<$<NOT:$<CONFIG:Debug>>:-fstack-protector>" # Prevent undefined references when _FORTIFY_SOURCE > 0
|
||||
)
|
||||
endif()
|
||||
|
||||
# Prepare a generator that checks if we are not a debug, and don't have asserts
|
||||
# on. We need this later on to set some compile options for stable releases.
|
||||
set(IS_STABLE_RELEASE "$<AND:$<NOT:$<CONFIG:Debug>>,$<NOT:$<BOOL:${OPTION_USE_ASSERTS}>>>")
|
||||
|
||||
if(MSVC)
|
||||
add_compile_options(/W3)
|
||||
elseif(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" OR CMAKE_CXX_COMPILER_ID STREQUAL "Clang" OR CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang")
|
||||
add_compile_options(
|
||||
-W
|
||||
-Wall
|
||||
-Wcast-qual
|
||||
-Wextra
|
||||
-Wsign-compare
|
||||
-Wundef
|
||||
-Wpointer-arith
|
||||
-Wwrite-strings
|
||||
-Wredundant-decls
|
||||
-Wformat-security
|
||||
-Wformat=2
|
||||
-Winit-self
|
||||
-Wnon-virtual-dtor
|
||||
|
||||
# Often parameters are unused, which is fine.
|
||||
-Wno-unused-parameter
|
||||
# We use 'ABCD' multichar for SaveLoad chunks identifiers
|
||||
-Wno-multichar
|
||||
|
||||
# Compilers complains about that we break strict-aliasing.
|
||||
# On most places we don't see how to fix it, and it doesn't
|
||||
# break anything. So disable strict-aliasing to make the
|
||||
# compiler all happy.
|
||||
-fno-strict-aliasing
|
||||
)
|
||||
|
||||
# When we are a stable release (Release build + USE_ASSERTS not set),
|
||||
# assertations are off, which trigger a lot of warnings. We disable
|
||||
# these warnings for these releases.
|
||||
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
|
||||
add_compile_options(
|
||||
"$<${IS_STABLE_RELEASE}:-Wno-unused-variable>"
|
||||
"$<${IS_STABLE_RELEASE}:-Wno-unused-but-set-parameter>"
|
||||
"$<${IS_STABLE_RELEASE}:-Wno-unused-but-set-variable>"
|
||||
)
|
||||
else()
|
||||
add_compile_options(
|
||||
"$<${IS_STABLE_RELEASE}:-Wno-unused-variable>"
|
||||
"$<${IS_STABLE_RELEASE}:-Wno-unused-parameter>"
|
||||
)
|
||||
endif()
|
||||
|
||||
# Ninja processes the output so the output from the compiler
|
||||
# isn't directly to a terminal; hence, the default is
|
||||
# non-coloured output. We can override this to get nicely
|
||||
# coloured output, but since that might yield odd results with
|
||||
# IDEs, we extract it to an option.
|
||||
if(OPTION_FORCE_COLORED_OUTPUT)
|
||||
if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
|
||||
add_compile_options (-fdiagnostics-color=always)
|
||||
elseif("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang" OR CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang")
|
||||
add_compile_options (-fcolor-diagnostics)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
|
||||
include(CheckCXXCompilerFlag)
|
||||
check_cxx_compiler_flag("-flifetime-dse=1" LIFETIME_DSE_FOUND)
|
||||
|
||||
add_compile_options(
|
||||
# GCC 4.2+ automatically assumes that signed overflows do
|
||||
# not occur in signed arithmetics, whereas we are not
|
||||
# sure that they will not happen. It furthermore complains
|
||||
# about its own optimized code in some places.
|
||||
"-fno-strict-overflow"
|
||||
|
||||
# Prevent optimisation supposing enums are in a range specified by the standard
|
||||
# For details, see http://gcc.gnu.org/PR43680
|
||||
"-fno-tree-vrp"
|
||||
|
||||
# -flifetime-dse=2 (default since GCC 6) doesn't play
|
||||
# well with our custom pool item allocator
|
||||
"$<$<BOOL:${LIFETIME_DSE_FOUND}>:-flifetime-dse=1>"
|
||||
)
|
||||
endif()
|
||||
|
||||
if(CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang")
|
||||
if (NOT CMAKE_OSX_ARCHITECTURES STREQUAL "arm64")
|
||||
include(CheckCXXCompilerFlag)
|
||||
check_cxx_compiler_flag("-mno-sse4" NO_SSE4_FOUND)
|
||||
|
||||
if(NO_SSE4_FOUND)
|
||||
add_compile_options(
|
||||
# Don't use SSE4 for general sources to increase compatibility.
|
||||
-mno-sse4
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
elseif(CMAKE_CXX_COMPILER_ID STREQUAL "Intel")
|
||||
add_compile_options(
|
||||
-Wall
|
||||
# warning #873: function ... ::operator new ... has no corresponding operator delete ...
|
||||
-wd873
|
||||
# warning #1292: unknown attribute "fallthrough"
|
||||
-wd1292
|
||||
# warning #1899: multicharacter character literal (potential portability problem)
|
||||
-wd1899
|
||||
# warning #2160: anonymous union qualifier is ignored
|
||||
-wd2160
|
||||
)
|
||||
else()
|
||||
message(FATAL_ERROR "No warning flags are set for this compiler yet; please consider creating a Pull Request to add support for this compiler.")
|
||||
endif()
|
||||
|
||||
if(NOT WIN32)
|
||||
# rdynamic is used to get useful stack traces from crash reports.
|
||||
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -rdynamic")
|
||||
endif()
|
||||
endmacro()
|
50
cmake/CreateGrfCommand.cmake
Normal file
50
cmake/CreateGrfCommand.cmake
Normal file
@@ -0,0 +1,50 @@
|
||||
# Macro which contains all bits and pieces to create a single grf file based
|
||||
# on NFO and PNG files.
|
||||
#
|
||||
# create_grf_command()
|
||||
#
|
||||
function(create_grf_command)
|
||||
set(EXTRA_PNG_SOURCE_FILES ${ARGV})
|
||||
|
||||
get_filename_component(GRF_SOURCE_FOLDER_NAME "${CMAKE_CURRENT_SOURCE_DIR}" NAME)
|
||||
get_filename_component(GRF_BINARY_FILE ${CMAKE_CURRENT_SOURCE_DIR}/../${GRF_SOURCE_FOLDER_NAME}.grf ABSOLUTE)
|
||||
file(GLOB_RECURSE GRF_PNG_SOURCE_FILES ${CMAKE_CURRENT_SOURCE_DIR}/*.png)
|
||||
file(GLOB_RECURSE GRF_NFO_SOURCE_FILES ${CMAKE_CURRENT_SOURCE_DIR}/*.nfo)
|
||||
set(GRF_PNG_SOURCE_FILES ${GRF_PNG_SOURCE_FILES} ${EXTRA_PNG_SOURCE_FILES})
|
||||
|
||||
# Copy over all the PNG files to the correct folder
|
||||
foreach(GRF_PNG_SOURCE_FILE IN LISTS GRF_PNG_SOURCE_FILES)
|
||||
get_filename_component(GRF_PNG_SOURCE_FILE_NAME "${GRF_PNG_SOURCE_FILE}" NAME)
|
||||
set(GRF_PNG_BINARY_FILE "${CMAKE_CURRENT_BINARY_DIR}/sprites/${GRF_PNG_SOURCE_FILE_NAME}")
|
||||
|
||||
add_custom_command(OUTPUT ${GRF_PNG_BINARY_FILE}
|
||||
COMMAND ${CMAKE_COMMAND} -E copy
|
||||
${GRF_PNG_SOURCE_FILE}
|
||||
${GRF_PNG_BINARY_FILE}
|
||||
MAIN_DEPENDENCY ${GRF_PNG_SOURCE_FILE}
|
||||
COMMENT "Copying ${GRF_PNG_SOURCE_FILE_NAME} sprite file"
|
||||
)
|
||||
|
||||
list(APPEND GRF_PNG_BINARY_FILES ${GRF_PNG_BINARY_FILE})
|
||||
endforeach()
|
||||
|
||||
add_custom_command(OUTPUT ${GRF_BINARY_FILE}
|
||||
COMMAND ${CMAKE_COMMAND}
|
||||
-DGRF_SOURCE_FOLDER=${CMAKE_CURRENT_SOURCE_DIR}
|
||||
-DGRF_BINARY_FILE=${GRF_BINARY_FILE}
|
||||
-DNFORENUM_EXECUTABLE=${NFORENUM_EXECUTABLE}
|
||||
-DGRFCODEC_EXECUTABLE=${GRFCODEC_EXECUTABLE}
|
||||
-P ${CMAKE_SOURCE_DIR}/cmake/scripts/CreateGRF.cmake
|
||||
MAIN_DEPENDENCY ${CMAKE_SOURCE_DIR}/cmake/scripts/CreateGRF.cmake
|
||||
DEPENDS ${GRF_PNG_BINARY_FILES}
|
||||
${GRF_NFO_SOURCE_FILES}
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
|
||||
COMMENT "Generating ${GRF_SOURCE_FOLDER_NAME}.grf"
|
||||
)
|
||||
|
||||
# For conviance, if you want to only test building the GRF
|
||||
add_custom_target(${GRF_SOURCE_FOLDER_NAME}.grf
|
||||
DEPENDS
|
||||
${GRF_BINARY_FILE}
|
||||
)
|
||||
endfunction()
|
86
cmake/CreateRegression.cmake
Normal file
86
cmake/CreateRegression.cmake
Normal file
@@ -0,0 +1,86 @@
|
||||
# Macro which contains all bits and pieces to create the regression tests.
|
||||
# This creates both a standalone target 'regression', and it integrates with
|
||||
# 'ctest'. The first is prefered, as it is more verbose, and takes care of
|
||||
# dependencies correctly.
|
||||
#
|
||||
# create_regression()
|
||||
#
|
||||
macro(create_regression)
|
||||
# Find all the files in the regression folder; they need to be copied to the
|
||||
# build folder before we can run the regression
|
||||
file(GLOB_RECURSE REGRESSION_SOURCE_FILES ${CMAKE_SOURCE_DIR}/regression/*)
|
||||
foreach(REGRESSION_SOURCE_FILE IN LISTS REGRESSION_SOURCE_FILES)
|
||||
string(REPLACE "${CMAKE_SOURCE_DIR}/regression/" "" REGRESSION_SOURCE_FILE_NAME "${REGRESSION_SOURCE_FILE}")
|
||||
string(CONCAT REGRESSION_BINARY_FILE "${CMAKE_BINARY_DIR}/ai/" "${REGRESSION_SOURCE_FILE_NAME}")
|
||||
|
||||
if("${REGRESSION_SOURCE_FILE_NAME}" STREQUAL "regression.cfg")
|
||||
continue()
|
||||
endif()
|
||||
|
||||
add_custom_command(OUTPUT ${REGRESSION_BINARY_FILE}
|
||||
COMMAND ${CMAKE_COMMAND} -E copy
|
||||
${REGRESSION_SOURCE_FILE}
|
||||
${REGRESSION_BINARY_FILE}
|
||||
MAIN_DEPENDENCY ${REGRESSION_SOURCE_FILE}
|
||||
COMMENT "Copying ${REGRESSION_SOURCE_FILE_NAME} regression file"
|
||||
)
|
||||
|
||||
list(APPEND REGRESSION_BINARY_FILES ${REGRESSION_BINARY_FILE})
|
||||
endforeach()
|
||||
|
||||
# Copy the regression configuration in a special folder, so all autogenerated
|
||||
# folders end up in the same place after running regression.
|
||||
add_custom_command(OUTPUT ${CMAKE_BINARY_DIR}/regression/regression.cfg
|
||||
COMMAND ${CMAKE_COMMAND} -E copy
|
||||
${CMAKE_SOURCE_DIR}/regression/regression.cfg
|
||||
${CMAKE_BINARY_DIR}/regression/regression.cfg
|
||||
MAIN_DEPENDENCY ${CMAKE_SOURCE_DIR}/regression/regression.cfg
|
||||
COMMENT "Copying ${REGRESSION_SOURCE_FILE_NAME} regression file"
|
||||
)
|
||||
list(APPEND REGRESSION_BINARY_FILES ${CMAKE_BINARY_DIR}/regression/regression.cfg)
|
||||
|
||||
# Create a new target which copies all regression files
|
||||
add_custom_target(regression_files
|
||||
ALL # this is needed because 'make test' doesn't resolve dependencies, and otherwise this is never executed
|
||||
DEPENDS
|
||||
${REGRESSION_BINARY_FILES}
|
||||
)
|
||||
|
||||
enable_testing()
|
||||
|
||||
# Find all the tests we have, and create a target for them
|
||||
file(GLOB REGRESSION_TESTS ${CMAKE_SOURCE_DIR}/regression/*)
|
||||
foreach(REGRESSION_TEST IN LISTS REGRESSION_TESTS)
|
||||
get_filename_component(REGRESSION_TEST_NAME "${REGRESSION_TEST}" NAME)
|
||||
|
||||
if("${REGRESSION_TEST_NAME}" STREQUAL "regression.cfg")
|
||||
continue()
|
||||
endif()
|
||||
|
||||
add_custom_target(regression_${REGRESSION_TEST_NAME}
|
||||
COMMAND ${CMAKE_COMMAND}
|
||||
-DOPENTTD_EXECUTABLE=$<TARGET_FILE:openttd>
|
||||
-DEDITBIN_EXECUTABLE=${EDITBIN_EXECUTABLE}
|
||||
-DREGRESSION_TEST=${REGRESSION_TEST_NAME}
|
||||
-P "${CMAKE_SOURCE_DIR}/cmake/scripts/Regression.cmake"
|
||||
DEPENDS openttd regression_files
|
||||
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
|
||||
COMMENT "Running regression test ${REGRESSION_TEST_NAME}"
|
||||
)
|
||||
|
||||
# Also make sure that 'make test' runs the regression
|
||||
add_test(NAME regression_${REGRESSION_TEST_NAME}
|
||||
COMMAND ${CMAKE_COMMAND}
|
||||
-DOPENTTD_EXECUTABLE=$<TARGET_FILE:openttd>
|
||||
-DEDITBIN_EXECUTABLE=${EDITBIN_EXECUTABLE}
|
||||
-DREGRESSION_TEST=${REGRESSION_TEST_NAME}
|
||||
-P "${CMAKE_SOURCE_DIR}/cmake/scripts/Regression.cmake"
|
||||
WORKING_DIRECTORY ${CMAKE_BINARY_DIR})
|
||||
|
||||
list(APPEND REGRESSION_TARGETS regression_${REGRESSION_TEST_NAME})
|
||||
endforeach()
|
||||
|
||||
# Create a new target which runs the regression
|
||||
add_custom_target(regression
|
||||
DEPENDS ${REGRESSION_TARGETS})
|
||||
endmacro()
|
14
cmake/Endian.cmake
Normal file
14
cmake/Endian.cmake
Normal file
@@ -0,0 +1,14 @@
|
||||
# Add the definitions to indicate which endian we are building for.
|
||||
#
|
||||
# add_endian_definition()
|
||||
#
|
||||
function(add_endian_definition)
|
||||
include(TestBigEndian)
|
||||
TEST_BIG_ENDIAN(IS_BIG_ENDIAN)
|
||||
|
||||
if(IS_BIG_ENDIAN)
|
||||
add_definitions(-DTTD_ENDIAN=TTD_BIG_ENDIAN)
|
||||
else()
|
||||
add_definitions(-DTTD_ENDIAN=TTD_LITTLE_ENDIAN)
|
||||
endif()
|
||||
endfunction()
|
65
cmake/FindAllegro.cmake
Normal file
65
cmake/FindAllegro.cmake
Normal file
@@ -0,0 +1,65 @@
|
||||
#[=======================================================================[.rst:
|
||||
FindAllegro
|
||||
-------
|
||||
|
||||
Finds the allegro library.
|
||||
|
||||
Result Variables
|
||||
^^^^^^^^^^^^^^^^
|
||||
|
||||
This will define the following variables:
|
||||
|
||||
``Allegro_FOUND``
|
||||
True if the system has the allegro library.
|
||||
``Allegro_INCLUDE_DIRS``
|
||||
Include directories needed to use allegro.
|
||||
``Allegro_LIBRARIES``
|
||||
Libraries needed to link to allegro.
|
||||
``Allegro_VERSION``
|
||||
The version of the allegro library which was found.
|
||||
|
||||
Cache Variables
|
||||
^^^^^^^^^^^^^^^
|
||||
|
||||
The following cache variables may also be set:
|
||||
|
||||
``Allegro_INCLUDE_DIR``
|
||||
The directory containing ``allegro.h``.
|
||||
``Allegro_LIBRARY``
|
||||
The path to the allegro library.
|
||||
|
||||
#]=======================================================================]
|
||||
|
||||
find_package(PkgConfig QUIET)
|
||||
pkg_check_modules(PC_Allegro QUIET allegro<5)
|
||||
|
||||
find_path(Allegro_INCLUDE_DIR
|
||||
NAMES allegro.h
|
||||
PATHS ${PC_Allegro_INCLUDE_DIRS}
|
||||
)
|
||||
|
||||
find_library(Allegro_LIBRARY
|
||||
NAMES alleg
|
||||
PATHS ${PC_Allegro_LIBRARY_DIRS}
|
||||
)
|
||||
|
||||
set(Allegro_VERSION ${PC_Allegro_VERSION})
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(Allegro
|
||||
FOUND_VAR Allegro_FOUND
|
||||
REQUIRED_VARS
|
||||
Allegro_LIBRARY
|
||||
Allegro_INCLUDE_DIR
|
||||
VERSION_VAR Allegro_VERSION
|
||||
)
|
||||
|
||||
if(Allegro_FOUND)
|
||||
set(Allegro_LIBRARIES ${Allegro_LIBRARY})
|
||||
set(Allegro_INCLUDE_DIRS ${Allegro_INCLUDE_DIR})
|
||||
endif()
|
||||
|
||||
mark_as_advanced(
|
||||
Allegro_INCLUDE_DIR
|
||||
Allegro_LIBRARY
|
||||
)
|
30
cmake/FindEditbin.cmake
Normal file
30
cmake/FindEditbin.cmake
Normal file
@@ -0,0 +1,30 @@
|
||||
# Autodetect editbin. Only useful for MSVC.
|
||||
|
||||
if(NOT EDITBIN_DIRECTORY)
|
||||
if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
|
||||
get_filename_component(MSVC_COMPILE_DIRECTORY ${CMAKE_CXX_COMPILER} DIRECTORY)
|
||||
set(EDITBIN_DIRECTORY ${MSVC_COMPILE_DIRECTORY})
|
||||
else()
|
||||
# For clang-cl build
|
||||
# find editbin.exe from environmental variable VCToolsInstallDir
|
||||
set(EDITBIN_DIRECTORY "$ENV{VCToolsInstallDir}/bin/Hostx64/x64")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
message(CHECK_START "Finding editbin.exe")
|
||||
find_program(
|
||||
EDITBIN_EXECUTABLE editbin.exe
|
||||
HINTS ${EDITBIN_DIRECTORY}
|
||||
)
|
||||
|
||||
if(EDITBIN_EXECUTABLE)
|
||||
message(CHECK_PASS "found")
|
||||
else()
|
||||
message(CHECK_FAIL "not found , please manually specify EDITBIN_DIRECTORY")
|
||||
endif()
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(Editbin
|
||||
FOUND_VAR EDITBIN_FOUND
|
||||
REQUIRED_VARS EDITBIN_EXECUTABLE
|
||||
)
|
65
cmake/FindFluidsynth.cmake
Normal file
65
cmake/FindFluidsynth.cmake
Normal file
@@ -0,0 +1,65 @@
|
||||
#[=======================================================================[.rst:
|
||||
FindFluidsynth
|
||||
-------
|
||||
|
||||
Finds the fluidsynth library.
|
||||
|
||||
Result Variables
|
||||
^^^^^^^^^^^^^^^^
|
||||
|
||||
This will define the following variables:
|
||||
|
||||
``Fluidsynth_FOUND``
|
||||
True if the system has the fluidsynth library.
|
||||
``Fluidsynth_INCLUDE_DIRS``
|
||||
Include directories needed to use fluidsynth.
|
||||
``Fluidsynth_LIBRARIES``
|
||||
Libraries needed to link to fluidsynth.
|
||||
``Fluidsynth_VERSION``
|
||||
The version of the fluidsynth library which was found.
|
||||
|
||||
Cache Variables
|
||||
^^^^^^^^^^^^^^^
|
||||
|
||||
The following cache variables may also be set:
|
||||
|
||||
``Fluidsynth_INCLUDE_DIR``
|
||||
The directory containing ``fluidsynth.h``.
|
||||
``Fluidsynth_LIBRARY``
|
||||
The path to the fluidsynth library.
|
||||
|
||||
#]=======================================================================]
|
||||
|
||||
find_package(PkgConfig QUIET)
|
||||
pkg_check_modules(PC_Fluidsynth QUIET fluidsynth)
|
||||
|
||||
find_path(Fluidsynth_INCLUDE_DIR
|
||||
NAMES fluidsynth.h
|
||||
PATHS ${PC_Fluidsynth_INCLUDE_DIRS}
|
||||
)
|
||||
|
||||
find_library(Fluidsynth_LIBRARY
|
||||
NAMES fluidsynth
|
||||
PATHS ${PC_Fluidsynth_LIBRARY_DIRS}
|
||||
)
|
||||
|
||||
set(Fluidsynth_VERSION ${PC_Fluidsynth_VERSION})
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(Fluidsynth
|
||||
FOUND_VAR Fluidsynth_FOUND
|
||||
REQUIRED_VARS
|
||||
Fluidsynth_LIBRARY
|
||||
Fluidsynth_INCLUDE_DIR
|
||||
VERSION_VAR Fluidsynth_VERSION
|
||||
)
|
||||
|
||||
if(Fluidsynth_FOUND)
|
||||
set(Fluidsynth_LIBRARIES ${Fluidsynth_LIBRARY})
|
||||
set(Fluidsynth_INCLUDE_DIRS ${Fluidsynth_INCLUDE_DIR})
|
||||
endif()
|
||||
|
||||
mark_as_advanced(
|
||||
Fluidsynth_INCLUDE_DIR
|
||||
Fluidsynth_LIBRARY
|
||||
)
|
101
cmake/FindFontconfig.cmake
Normal file
101
cmake/FindFontconfig.cmake
Normal file
@@ -0,0 +1,101 @@
|
||||
# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
|
||||
# file Copyright.txt or https://cmake.org/licensing for details.
|
||||
|
||||
#[=======================================================================[.rst:
|
||||
FindFontconfig
|
||||
--------------
|
||||
|
||||
Find Fontconfig headers and library.
|
||||
|
||||
Imported Targets
|
||||
^^^^^^^^^^^^^^^^
|
||||
|
||||
``Fontconfig::Fontconfig``
|
||||
The Fontconfig library, if found.
|
||||
|
||||
Result Variables
|
||||
^^^^^^^^^^^^^^^^
|
||||
|
||||
This will define the following variables in your project:
|
||||
|
||||
``Fontconfig_FOUND``
|
||||
true if (the requested version of) Fontconfig is available.
|
||||
``Fontconfig_VERSION``
|
||||
the version of Fontconfig.
|
||||
``Fontconfig_LIBRARIES``
|
||||
the libraries to link against to use Fontconfig.
|
||||
``Fontconfig_INCLUDE_DIRS``
|
||||
where to find the Fontconfig headers.
|
||||
``Fontconfig_COMPILE_OPTIONS``
|
||||
this should be passed to target_compile_options(), if the
|
||||
target is not used for linking
|
||||
|
||||
#]=======================================================================]
|
||||
|
||||
|
||||
# use pkg-config to get the directories and then use these values
|
||||
# in the FIND_PATH() and FIND_LIBRARY() calls
|
||||
find_package(PkgConfig QUIET)
|
||||
pkg_check_modules(PKG_FONTCONFIG QUIET fontconfig)
|
||||
set(Fontconfig_COMPILE_OPTIONS ${PKG_FONTCONFIG_CFLAGS_OTHER})
|
||||
set(Fontconfig_VERSION ${PKG_FONTCONFIG_VERSION})
|
||||
|
||||
find_path( Fontconfig_INCLUDE_DIR
|
||||
NAMES
|
||||
fontconfig/fontconfig.h
|
||||
HINTS
|
||||
${PKG_FONTCONFIG_INCLUDE_DIRS}
|
||||
/usr/X11/include
|
||||
)
|
||||
|
||||
find_library( Fontconfig_LIBRARY
|
||||
NAMES
|
||||
fontconfig
|
||||
PATHS
|
||||
${PKG_FONTCONFIG_LIBRARY_DIRS}
|
||||
)
|
||||
|
||||
if(Fontconfig_INCLUDE_DIR AND NOT Fontconfig_VERSION)
|
||||
file(STRINGS ${Fontconfig_INCLUDE_DIR}/fontconfig/fontconfig.h _contents REGEX "^#define[ \t]+FC_[A-Z]+[ \t]+[0-9]+$")
|
||||
unset(Fontconfig_VERSION)
|
||||
foreach(VPART MAJOR MINOR REVISION)
|
||||
foreach(VLINE ${_contents})
|
||||
if(VLINE MATCHES "^#define[\t ]+FC_${VPART}[\t ]+([0-9]+)$")
|
||||
set(Fontconfig_VERSION_PART "${CMAKE_MATCH_1}")
|
||||
if(Fontconfig_VERSION)
|
||||
string(APPEND Fontconfig_VERSION ".${Fontconfig_VERSION_PART}")
|
||||
else()
|
||||
set(Fontconfig_VERSION "${Fontconfig_VERSION_PART}")
|
||||
endif()
|
||||
endif()
|
||||
endforeach()
|
||||
endforeach()
|
||||
endif()
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(Fontconfig
|
||||
FOUND_VAR
|
||||
Fontconfig_FOUND
|
||||
REQUIRED_VARS
|
||||
Fontconfig_LIBRARY
|
||||
Fontconfig_INCLUDE_DIR
|
||||
VERSION_VAR
|
||||
Fontconfig_VERSION
|
||||
)
|
||||
|
||||
|
||||
if(Fontconfig_FOUND AND NOT TARGET Fontconfig::Fontconfig)
|
||||
add_library(Fontconfig::Fontconfig UNKNOWN IMPORTED)
|
||||
set_target_properties(Fontconfig::Fontconfig PROPERTIES
|
||||
IMPORTED_LOCATION "${Fontconfig_LIBRARY}"
|
||||
INTERFACE_COMPILE_OPTIONS "${Fontconfig_COMPILE_OPTIONS}"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${Fontconfig_INCLUDE_DIR}"
|
||||
)
|
||||
endif()
|
||||
|
||||
mark_as_advanced(Fontconfig_LIBRARY Fontconfig_INCLUDE_DIR)
|
||||
|
||||
if(Fontconfig_FOUND)
|
||||
set(Fontconfig_LIBRARIES ${Fontconfig_LIBRARY})
|
||||
set(Fontconfig_INCLUDE_DIRS ${Fontconfig_INCLUDE_DIR})
|
||||
endif()
|
13
cmake/FindGrfcodec.cmake
Normal file
13
cmake/FindGrfcodec.cmake
Normal file
@@ -0,0 +1,13 @@
|
||||
# Autodetect grfcodec and nforenum.
|
||||
#
|
||||
|
||||
find_program(GRFCODEC_EXECUTABLE grfcodec)
|
||||
find_program(NFORENUM_EXECUTABLE nforenum)
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(Grfcodec
|
||||
FOUND_VAR GRFCODEC_FOUND
|
||||
REQUIRED_VARS
|
||||
GRFCODEC_EXECUTABLE
|
||||
NFORENUM_EXECUTABLE
|
||||
)
|
69
cmake/FindICU.cmake
Normal file
69
cmake/FindICU.cmake
Normal file
@@ -0,0 +1,69 @@
|
||||
# CMake provides a FindICU module since version 3.7.
|
||||
# But it doesn't use pkgconfig, doesn't set expected variables,
|
||||
# And it returns incomplete dependencies if only some modules are searched.
|
||||
|
||||
|
||||
#[=======================================================================[.rst:
|
||||
FindICU
|
||||
-------
|
||||
|
||||
Finds components of the ICU library.
|
||||
|
||||
Accepted components are: uc, i18n, le, lx, io
|
||||
|
||||
Result Variables
|
||||
^^^^^^^^^^^^^^^^
|
||||
|
||||
This will define the following variables:
|
||||
|
||||
``ICU_FOUND``
|
||||
True if components of ICU library are found.
|
||||
``ICU_VERSION``
|
||||
The version of the ICU library which was found.
|
||||
``ICU_<c>_FOUND``
|
||||
True if the system has the <c> component of ICU library.
|
||||
``ICU_<c>_INCLUDE_DIRS``
|
||||
Include directories needed to use the <c> component of ICU library.
|
||||
``ICU_<c>_LIBRARIES``
|
||||
Libraries needed to link to the <c> component of ICU library.
|
||||
|
||||
#]=======================================================================]
|
||||
|
||||
find_package(PkgConfig QUIET)
|
||||
|
||||
set(ICU_KNOWN_COMPONENTS "uc" "i18n" "le" "lx" "io")
|
||||
|
||||
foreach(MOD_NAME IN LISTS ICU_FIND_COMPONENTS)
|
||||
if(NOT MOD_NAME IN_LIST ICU_KNOWN_COMPONENTS)
|
||||
message(FATAL_ERROR "Unknown ICU component: ${MOD_NAME}")
|
||||
endif()
|
||||
pkg_check_modules(PC_ICU_${MOD_NAME} QUIET icu-${MOD_NAME})
|
||||
|
||||
# Check the libraries returned by pkg-config really exist.
|
||||
unset(PC_LIBRARIES)
|
||||
foreach(LIBRARY IN LISTS PC_ICU_${MOD_NAME}_LIBRARIES)
|
||||
unset(PC_LIBRARY CACHE)
|
||||
find_library(PC_LIBRARY NAMES ${LIBRARY})
|
||||
if(NOT PC_LIBRARY)
|
||||
unset(PC_ICU_${MOD_NAME}_FOUND)
|
||||
endif()
|
||||
list(APPEND PC_LIBRARIES ${PC_LIBRARY})
|
||||
endforeach()
|
||||
unset(PC_LIBRARY CACHE)
|
||||
|
||||
if(${PC_ICU_${MOD_NAME}_FOUND})
|
||||
set(ICU_COMPONENT_FOUND TRUE)
|
||||
set(ICU_${MOD_NAME}_FOUND TRUE)
|
||||
set(ICU_${MOD_NAME}_LIBRARIES ${PC_LIBRARIES})
|
||||
set(ICU_${MOD_NAME}_INCLUDE_DIRS ${PC_ICU_${MOD_NAME}_INCLUDE_DIRS})
|
||||
set(ICU_VERSION ${PC_ICU_${MOD_NAME}_VERSION})
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(ICU
|
||||
FOUND_VAR ICU_FOUND
|
||||
REQUIRED_VARS ICU_COMPONENT_FOUND
|
||||
VERSION_VAR ICU_VERSION
|
||||
HANDLE_COMPONENTS
|
||||
)
|
133
cmake/FindIconv.cmake
Normal file
133
cmake/FindIconv.cmake
Normal file
@@ -0,0 +1,133 @@
|
||||
# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
|
||||
# file Copyright.txt or https://cmake.org/licensing for details.
|
||||
|
||||
#[=======================================================================[.rst:
|
||||
FindIconv
|
||||
---------
|
||||
|
||||
This module finds the ``iconv()`` POSIX.1 functions on the system.
|
||||
These functions might be provided in the regular C library or externally
|
||||
in the form of an additional library.
|
||||
|
||||
The following variables are provided to indicate iconv support:
|
||||
|
||||
.. variable:: Iconv_FOUND
|
||||
|
||||
Variable indicating if the iconv support was found.
|
||||
|
||||
.. variable:: Iconv_INCLUDE_DIRS
|
||||
|
||||
The directories containing the iconv headers.
|
||||
|
||||
.. variable:: Iconv_LIBRARIES
|
||||
|
||||
The iconv libraries to be linked.
|
||||
|
||||
.. variable:: Iconv_IS_BUILT_IN
|
||||
|
||||
A variable indicating whether iconv support is stemming from the
|
||||
C library or not. Even if the C library provides `iconv()`, the presence of
|
||||
an external `libiconv` implementation might lead to this being false.
|
||||
|
||||
Additionally, the following :prop_tgt:`IMPORTED` target is being provided:
|
||||
|
||||
.. variable:: Iconv::Iconv
|
||||
|
||||
Imported target for using iconv.
|
||||
|
||||
The following cache variables may also be set:
|
||||
|
||||
.. variable:: Iconv_INCLUDE_DIR
|
||||
|
||||
The directory containing the iconv headers.
|
||||
|
||||
.. variable:: Iconv_LIBRARY
|
||||
|
||||
The iconv library (if not implicitly given in the C library).
|
||||
|
||||
.. note::
|
||||
On POSIX platforms, iconv might be part of the C library and the cache
|
||||
variables ``Iconv_INCLUDE_DIR`` and ``Iconv_LIBRARY`` might be empty.
|
||||
|
||||
#]=======================================================================]
|
||||
|
||||
include(CMakePushCheckState)
|
||||
if(CMAKE_C_COMPILER_LOADED)
|
||||
include(CheckCSourceCompiles)
|
||||
elseif(CMAKE_CXX_COMPILER_LOADED)
|
||||
include(CheckCXXSourceCompiles)
|
||||
else()
|
||||
# If neither C nor CXX are loaded, implicit iconv makes no sense.
|
||||
set(Iconv_IS_BUILT_IN NO)
|
||||
endif()
|
||||
|
||||
# iconv can only be provided in libc on a POSIX system.
|
||||
# If any cache variable is already set, we'll skip this test.
|
||||
if(NOT DEFINED Iconv_IS_BUILT_IN)
|
||||
if(UNIX AND NOT DEFINED Iconv_INCLUDE_DIR AND NOT DEFINED Iconv_LIBRARY)
|
||||
cmake_push_check_state(RESET)
|
||||
# We always suppress the message here: Otherwise on supported systems
|
||||
# not having iconv in their C library (e.g. those using libiconv)
|
||||
# would always display a confusing "Looking for iconv - not found" message
|
||||
set(CMAKE_FIND_QUIETLY TRUE)
|
||||
# The following code will not work, but it's sufficient to see if it compiles.
|
||||
# Note: libiconv will define the iconv functions as macros, so CheckSymbolExists
|
||||
# will not yield correct results.
|
||||
set(Iconv_IMPLICIT_TEST_CODE
|
||||
"
|
||||
#include <stddef.h>
|
||||
#include <iconv.h>
|
||||
int main() {
|
||||
char *a, *b;
|
||||
size_t i, j;
|
||||
iconv_t ic;
|
||||
ic = iconv_open(\"to\", \"from\");
|
||||
iconv(ic, &a, &i, &b, &j);
|
||||
iconv_close(ic);
|
||||
}
|
||||
"
|
||||
)
|
||||
if(CMAKE_C_COMPILER_LOADED)
|
||||
check_c_source_compiles("${Iconv_IMPLICIT_TEST_CODE}" Iconv_IS_BUILT_IN)
|
||||
else()
|
||||
check_cxx_source_compiles("${Iconv_IMPLICIT_TEST_CODE}" Iconv_IS_BUILT_IN)
|
||||
endif()
|
||||
cmake_pop_check_state()
|
||||
else()
|
||||
set(Iconv_IS_BUILT_IN NO)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(NOT Iconv_IS_BUILT_IN)
|
||||
find_path(Iconv_INCLUDE_DIR
|
||||
NAMES "iconv.h"
|
||||
DOC "iconv include directory")
|
||||
set(Iconv_LIBRARY_NAMES "iconv" "libiconv")
|
||||
else()
|
||||
set(Iconv_INCLUDE_DIR "" CACHE FILEPATH "iconv include directory")
|
||||
set(Iconv_LIBRARY_NAMES "c")
|
||||
endif()
|
||||
|
||||
find_library(Iconv_LIBRARY
|
||||
NAMES ${Iconv_LIBRARY_NAMES}
|
||||
DOC "iconv library (potentially the C library)")
|
||||
|
||||
mark_as_advanced(Iconv_INCLUDE_DIR)
|
||||
mark_as_advanced(Iconv_LIBRARY)
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
if(NOT Iconv_IS_BUILT_IN)
|
||||
find_package_handle_standard_args(Iconv REQUIRED_VARS Iconv_LIBRARY Iconv_INCLUDE_DIR)
|
||||
else()
|
||||
find_package_handle_standard_args(Iconv REQUIRED_VARS Iconv_LIBRARY)
|
||||
endif()
|
||||
|
||||
if(Iconv_FOUND)
|
||||
set(Iconv_INCLUDE_DIRS "${Iconv_INCLUDE_DIR}")
|
||||
set(Iconv_LIBRARIES "${Iconv_LIBRARY}")
|
||||
if(NOT TARGET Iconv::Iconv)
|
||||
add_library(Iconv::Iconv INTERFACE IMPORTED)
|
||||
endif()
|
||||
set_property(TARGET Iconv::Iconv PROPERTY INTERFACE_INCLUDE_DIRECTORIES "${Iconv_INCLUDE_DIRS}")
|
||||
set_property(TARGET Iconv::Iconv PROPERTY INTERFACE_LINK_LIBRARIES "${Iconv_LIBRARIES}")
|
||||
endif()
|
89
cmake/FindLZO.cmake
Normal file
89
cmake/FindLZO.cmake
Normal file
@@ -0,0 +1,89 @@
|
||||
#[=======================================================================[.rst:
|
||||
FindLZO
|
||||
-------
|
||||
|
||||
Finds the LZO library.
|
||||
|
||||
Result Variables
|
||||
^^^^^^^^^^^^^^^^
|
||||
|
||||
This will define the following variables:
|
||||
|
||||
``LZO_FOUND``
|
||||
True if the system has the LZO library.
|
||||
``LZO_INCLUDE_DIRS``
|
||||
Include directories needed to use LZO.
|
||||
``LZO_LIBRARIES``
|
||||
Libraries needed to link to LZO.
|
||||
``LZO_VERSION``
|
||||
The version of the LZO library which was found.
|
||||
|
||||
Cache Variables
|
||||
^^^^^^^^^^^^^^^
|
||||
|
||||
The following cache variables may also be set:
|
||||
|
||||
``LZO_INCLUDE_DIR``
|
||||
The directory containing ``lzo/lzo1x.h``.
|
||||
``LZO_LIBRARY``
|
||||
The path to the LZO library.
|
||||
|
||||
#]=======================================================================]
|
||||
|
||||
find_package(PkgConfig QUIET)
|
||||
pkg_check_modules(PC_LZO QUIET lzo2)
|
||||
|
||||
find_path(LZO_INCLUDE_DIR
|
||||
NAMES lzo/lzo1x.h
|
||||
PATHS ${PC_LZO_INCLUDE_DIRS}
|
||||
)
|
||||
|
||||
find_library(LZO_LIBRARY
|
||||
NAMES lzo2
|
||||
PATHS ${PC_LZO_LIBRARY_DIRS}
|
||||
)
|
||||
|
||||
# With vcpkg, the library path should contain both 'debug' and 'optimized'
|
||||
# entries (see target_link_libraries() documentation for more information)
|
||||
#
|
||||
# NOTE: we only patch up when using vcpkg; the same issue might happen
|
||||
# when not using vcpkg, but this is non-trivial to fix, as we have no idea
|
||||
# what the paths are. With vcpkg we do. And we only official support vcpkg
|
||||
# with Windows.
|
||||
#
|
||||
# NOTE: this is based on the assumption that the debug file has the same
|
||||
# name as the optimized file. This is not always the case, but so far
|
||||
# experiences has shown that in those case vcpkg CMake files do the right
|
||||
# thing.
|
||||
if(VCPKG_TOOLCHAIN AND LZO_LIBRARY)
|
||||
if(LZO_LIBRARY MATCHES "/debug/")
|
||||
set(LZO_LIBRARY_DEBUG ${LZO_LIBRARY})
|
||||
string(REPLACE "/debug/lib/" "/lib/" LZO_LIBRARY_RELEASE ${LZO_LIBRARY})
|
||||
else()
|
||||
set(LZO_LIBRARY_RELEASE ${LZO_LIBRARY})
|
||||
string(REPLACE "/lib/" "/debug/lib/" LZO_LIBRARY_DEBUG ${LZO_LIBRARY})
|
||||
endif()
|
||||
include(SelectLibraryConfigurations)
|
||||
select_library_configurations(LZO)
|
||||
endif()
|
||||
|
||||
set(LZO_VERSION ${PC_LZO_VERSION})
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(LZO
|
||||
FOUND_VAR LZO_FOUND
|
||||
REQUIRED_VARS
|
||||
LZO_LIBRARY
|
||||
LZO_INCLUDE_DIR
|
||||
VERSION_VAR LZO_VERSION
|
||||
)
|
||||
|
||||
if(LZO_FOUND)
|
||||
set(LZO_LIBRARIES ${LZO_LIBRARY})
|
||||
set(LZO_INCLUDE_DIRS ${LZO_INCLUDE_DIR})
|
||||
endif()
|
||||
|
||||
mark_as_advanced(
|
||||
LZO_INCLUDE_DIR
|
||||
LZO_LIBRARY
|
||||
)
|
3
cmake/FindPandoc.cmake
Normal file
3
cmake/FindPandoc.cmake
Normal file
@@ -0,0 +1,3 @@
|
||||
if(NOT EXISTS ${PANDOC_EXECUTABLE})
|
||||
find_program(PANDOC_EXECUTABLE pandoc)
|
||||
endif()
|
17
cmake/FindSSE.cmake
Normal file
17
cmake/FindSSE.cmake
Normal file
@@ -0,0 +1,17 @@
|
||||
# Autodetect if SSE4.1 can be used. If so, the assumption is, so can the other
|
||||
# SSE version (SSE 2.0, SSSE 3.0).
|
||||
|
||||
include(CheckCXXSourceCompiles)
|
||||
set(CMAKE_REQUIRED_FLAGS "")
|
||||
|
||||
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" OR CMAKE_CXX_COMPILER_ID STREQUAL "Clang" OR CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang")
|
||||
set(CMAKE_REQUIRED_FLAGS "-msse4.1")
|
||||
endif()
|
||||
|
||||
check_cxx_source_compiles("
|
||||
#include <xmmintrin.h>
|
||||
#include <smmintrin.h>
|
||||
#include <tmmintrin.h>
|
||||
int main() { return 0; }"
|
||||
SSE_FOUND
|
||||
)
|
19
cmake/FindXaudio2.cmake
Normal file
19
cmake/FindXaudio2.cmake
Normal file
@@ -0,0 +1,19 @@
|
||||
# Autodetect if xaudio2 can be used.
|
||||
|
||||
include(CheckCXXSourceCompiles)
|
||||
set(CMAKE_REQUIRED_FLAGS "")
|
||||
|
||||
check_cxx_source_compiles("
|
||||
#include <cstdio>
|
||||
#include <windows.h>
|
||||
|
||||
#undef NTDDI_VERSION
|
||||
#undef _WIN32_WINNT
|
||||
|
||||
#define NTDDI_VERSION NTDDI_WIN8
|
||||
#define _WIN32_WINNT _WIN32_WINNT_WIN8
|
||||
|
||||
#include <xaudio2.h>
|
||||
int main() { printf(\"%s\\\\n\", XAUDIO2_DLL_A); return 0; }"
|
||||
XAUDIO2_FOUND
|
||||
)
|
224
cmake/InstallAndPackage.cmake
Normal file
224
cmake/InstallAndPackage.cmake
Normal file
@@ -0,0 +1,224 @@
|
||||
include(GNUInstallDirs)
|
||||
|
||||
# If requested, use FHS layout; otherwise fall back to a flat layout.
|
||||
if(OPTION_INSTALL_FHS)
|
||||
set(BINARY_DESTINATION_DIR "${CMAKE_INSTALL_BINDIR}")
|
||||
set(DATA_DESTINATION_DIR "${CMAKE_INSTALL_DATADIR}/${BINARY_NAME}")
|
||||
set(DOCS_DESTINATION_DIR "${CMAKE_INSTALL_DOCDIR}")
|
||||
set(MAN_DESTINATION_DIR "${CMAKE_INSTALL_MANDIR}")
|
||||
else()
|
||||
if(APPLE)
|
||||
set(BINARY_DESTINATION_DIR "../MacOS")
|
||||
else()
|
||||
set(BINARY_DESTINATION_DIR ".")
|
||||
endif()
|
||||
set(DATA_DESTINATION_DIR ".")
|
||||
set(DOCS_DESTINATION_DIR ".")
|
||||
set(MAN_DESTINATION_DIR ".")
|
||||
endif()
|
||||
|
||||
install(TARGETS openttd
|
||||
RUNTIME
|
||||
DESTINATION ${BINARY_DESTINATION_DIR}
|
||||
COMPONENT Runtime
|
||||
)
|
||||
|
||||
install(DIRECTORY
|
||||
${CMAKE_BINARY_DIR}/lang
|
||||
${CMAKE_BINARY_DIR}/baseset
|
||||
${CMAKE_BINARY_DIR}/ai
|
||||
${CMAKE_BINARY_DIR}/game
|
||||
${CMAKE_SOURCE_DIR}/bin/scripts
|
||||
DESTINATION ${DATA_DESTINATION_DIR}
|
||||
COMPONENT language_files
|
||||
REGEX "ai/[^\.]+$" EXCLUDE # Ignore subdirs in ai dir
|
||||
)
|
||||
|
||||
install(FILES
|
||||
${CMAKE_SOURCE_DIR}/COPYING.md
|
||||
${CMAKE_SOURCE_DIR}/README.md
|
||||
${CMAKE_SOURCE_DIR}/changelog.txt
|
||||
${CMAKE_SOURCE_DIR}/docs/multiplayer.md
|
||||
${CMAKE_SOURCE_DIR}/known-bugs.txt
|
||||
DESTINATION ${DOCS_DESTINATION_DIR}
|
||||
COMPONENT docs)
|
||||
|
||||
# A Linux manual only makes sense when using FHS. Otherwise it is a very odd
|
||||
# file with little context to what it is.
|
||||
if(OPTION_INSTALL_FHS)
|
||||
set(MAN_SOURCE_FILE ${CMAKE_SOURCE_DIR}/docs/openttd.6)
|
||||
set(MAN_BINARY_FILE ${CMAKE_BINARY_DIR}/docs/${BINARY_NAME}.6)
|
||||
install(CODE
|
||||
"
|
||||
execute_process(COMMAND ${CMAKE_COMMAND} -E copy ${MAN_SOURCE_FILE} ${MAN_BINARY_FILE})
|
||||
execute_process(COMMAND gzip -9 -n -f ${MAN_BINARY_FILE})
|
||||
"
|
||||
COMPONENT manual)
|
||||
install(FILES
|
||||
${MAN_BINARY_FILE}.gz
|
||||
DESTINATION ${MAN_DESTINATION_DIR}/man6
|
||||
COMPONENT manual)
|
||||
endif()
|
||||
|
||||
if(UNIX AND NOT APPLE)
|
||||
install(DIRECTORY
|
||||
${CMAKE_BINARY_DIR}/media/icons
|
||||
${CMAKE_BINARY_DIR}/media/pixmaps
|
||||
DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}
|
||||
COMPONENT media)
|
||||
|
||||
install(FILES
|
||||
${CMAKE_BINARY_DIR}/media/${BINARY_NAME}.desktop
|
||||
DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/applications
|
||||
COMPONENT menu)
|
||||
endif()
|
||||
|
||||
if(CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64")
|
||||
set(ARCHITECTURE "amd64")
|
||||
else()
|
||||
string(TOLOWER "${CMAKE_SYSTEM_PROCESSOR}" ARCHITECTURE)
|
||||
endif()
|
||||
|
||||
# Windows is a bit more annoying to detect; using the size of void pointer
|
||||
# seems to be the most robust.
|
||||
if(WIN32)
|
||||
# Check if the MSVC platform has been defined
|
||||
if ("$ENV{Platform}" STREQUAL "arm64")
|
||||
set(ARCHITECTURE "arm64")
|
||||
else()
|
||||
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
|
||||
set(ARCHITECTURE "win64")
|
||||
else()
|
||||
set(ARCHITECTURE "win32")
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
if(APPLE AND CMAKE_OSX_ARCHITECTURES)
|
||||
string(TOLOWER "${CMAKE_OSX_ARCHITECTURES}" ARCHITECTURE)
|
||||
endif()
|
||||
|
||||
set(CPACK_SYSTEM_NAME "${ARCHITECTURE}")
|
||||
|
||||
set(CPACK_PACKAGE_NAME "openttd")
|
||||
set(CPACK_PACKAGE_VENDOR "OpenTTD")
|
||||
set(CPACK_PACKAGE_DESCRIPTION "OpenTTD")
|
||||
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "OpenTTD")
|
||||
set(CPACK_PACKAGE_HOMEPAGE_URL "https://www.openttd.org/")
|
||||
set(CPACK_PACKAGE_CONTACT "OpenTTD <info@openttd.org>")
|
||||
set(CPACK_PACKAGE_INSTALL_DIRECTORY "OpenTTD")
|
||||
set(CPACK_PACKAGE_CHECKSUM "SHA256")
|
||||
|
||||
if((APPLE OR WIN32) AND EXISTS ${PANDOC_EXECUTABLE})
|
||||
execute_process(COMMAND ${PANDOC_EXECUTABLE} "${CMAKE_SOURCE_DIR}/COPYING.md" -s -o "${CMAKE_BINARY_DIR}/COPYING.rtf")
|
||||
set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_BINARY_DIR}/COPYING.rtf")
|
||||
else()
|
||||
set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_SOURCE_DIR}/COPYING.md")
|
||||
endif()
|
||||
|
||||
set(CPACK_RESOURCE_FILE_README "${CMAKE_SOURCE_DIR}/README.md")
|
||||
set(CPACK_MONOLITHIC_INSTALL YES)
|
||||
set(CPACK_PACKAGE_EXECUTABLES "openttd;OpenTTD")
|
||||
set(CPACK_STRIP_FILES YES)
|
||||
set(CPACK_OUTPUT_FILE_PREFIX "bundles")
|
||||
|
||||
if(APPLE)
|
||||
set(CPACK_GENERATOR "Bundle")
|
||||
include(PackageBundle)
|
||||
|
||||
if (APPLE_UNIVERSAL_PACKAGE)
|
||||
set(CPACK_PACKAGE_FILE_NAME "openttd-#CPACK_PACKAGE_VERSION#-macos-universal")
|
||||
else()
|
||||
set(CPACK_PACKAGE_FILE_NAME "openttd-#CPACK_PACKAGE_VERSION#-macos-${CPACK_SYSTEM_NAME}")
|
||||
endif()
|
||||
elseif(WIN32)
|
||||
set(CPACK_GENERATOR "ZIP")
|
||||
if(OPTION_USE_NSIS)
|
||||
list(APPEND CPACK_GENERATOR "NSIS")
|
||||
include(PackageNSIS)
|
||||
endif()
|
||||
|
||||
set(CPACK_PACKAGE_FILE_NAME "openttd-#CPACK_PACKAGE_VERSION#-windows-${CPACK_SYSTEM_NAME}")
|
||||
elseif(UNIX)
|
||||
# With FHS, we can create deb/rpm/... Without it, they would be horribly broken
|
||||
# and not work. The other way around is also true; with FHS they are not
|
||||
# usable, and only flat formats work.
|
||||
if(OPTION_PACKAGE_DEPENDENCIES)
|
||||
set(CPACK_GENERATOR "TXZ")
|
||||
set(PLATFORM "generic")
|
||||
elseif(NOT OPTION_INSTALL_FHS)
|
||||
set(CPACK_GENERATOR "TXZ")
|
||||
set(PLATFORM "unknown")
|
||||
else()
|
||||
find_program(LSB_RELEASE_EXEC lsb_release)
|
||||
execute_process(COMMAND ${LSB_RELEASE_EXEC} -is
|
||||
OUTPUT_VARIABLE LSB_RELEASE_ID
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
)
|
||||
if(LSB_RELEASE_ID)
|
||||
if(LSB_RELEASE_ID STREQUAL "Ubuntu" OR LSB_RELEASE_ID STREQUAL "Debian")
|
||||
execute_process(COMMAND ${LSB_RELEASE_EXEC} -cs
|
||||
OUTPUT_VARIABLE LSB_RELEASE_CODENAME
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
)
|
||||
string(TOLOWER "${LSB_RELEASE_ID}-${LSB_RELEASE_CODENAME}" PLATFORM)
|
||||
|
||||
set(CPACK_GENERATOR "DEB")
|
||||
include(PackageDeb)
|
||||
else()
|
||||
set(UNSUPPORTED_PLATFORM_NAME "LSB-based Linux distribution '${LSB_RELEASE_ID}'")
|
||||
endif()
|
||||
elseif(EXISTS "/etc/os-release")
|
||||
file(STRINGS "/etc/os-release" OS_RELEASE_CONTENTS REGEX "^ID=")
|
||||
string(REGEX MATCH "ID=(.*)" _ ${OS_RELEASE_CONTENTS})
|
||||
set(DISTRO_ID ${CMAKE_MATCH_1})
|
||||
if(DISTRO_ID STREQUAL "arch")
|
||||
set(PLATFORM "arch")
|
||||
set(CPACK_GENERATOR "TXZ")
|
||||
else()
|
||||
set(UNSUPPORTED_PLATFORM_NAME "Linux distribution '${DISTRO_ID}' from /etc/os-release")
|
||||
endif()
|
||||
else()
|
||||
set(UNSUPPORTED_PLATFORM_NAME "Linux distribution")
|
||||
endif()
|
||||
|
||||
if(NOT PLATFORM)
|
||||
set(PLATFORM "generic")
|
||||
set(CPACK_GENERATOR "TXZ")
|
||||
message(WARNING "Unknown ${UNSUPPORTED_PLATFORM_NAME} found for packaging; can only pack to a txz. Please consider creating a Pull Request to add support for this distribution.")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
set(CPACK_PACKAGE_FILE_NAME "openttd-#CPACK_PACKAGE_VERSION#-linux-${PLATFORM}-${CPACK_SYSTEM_NAME}")
|
||||
|
||||
else()
|
||||
message(FATAL_ERROR "Unknown OS found for packaging; please consider creating a Pull Request to add support for this OS.")
|
||||
endif()
|
||||
|
||||
include(CPack)
|
||||
|
||||
if(OPTION_PACKAGE_DEPENDENCIES)
|
||||
# Install all dependencies we can resolve, with the exception of ones that
|
||||
# every Linux machine should have. This should make this build as generic
|
||||
# as possible, where it runs on any machine with the same or newer libc
|
||||
# than the one this is compiled with.
|
||||
# We copy these libraries into lib/ folder, so they can be found on game
|
||||
# startup. See comment in root CMakeLists.txt for how this works exactly.
|
||||
install(CODE [[
|
||||
file(GET_RUNTIME_DEPENDENCIES
|
||||
RESOLVED_DEPENDENCIES_VAR DEPENDENCIES
|
||||
UNRESOLVED_DEPENDENCIES_VAR UNRESOLVED_DEPENDENCIES
|
||||
EXECUTABLES openttd
|
||||
POST_EXCLUDE_REGEXES "ld-linux|libc.so|libdl.so|libm.so|libgcc_s.so|libpthread.so|librt.so|libstdc...so")
|
||||
file(INSTALL
|
||||
DESTINATION "${CMAKE_INSTALL_PREFIX}/lib"
|
||||
FILES ${DEPENDENCIES}
|
||||
FOLLOW_SYMLINK_CHAIN)
|
||||
|
||||
# This should not be possible, but error out when a dependency cannot
|
||||
# be resolved.
|
||||
list(LENGTH UNRESOLVED_DEPENDENCIES UNRESOLVED_LENGTH)
|
||||
if(${UNRESOLVED_LENGTH} GREATER 0)
|
||||
message(FATAL_ERROR "Unresolved dependencies: ${UNRESOLVED_DEPENDENCIES}")
|
||||
endif()
|
||||
]])
|
||||
endif()
|
23
cmake/LinkPackage.cmake
Normal file
23
cmake/LinkPackage.cmake
Normal file
@@ -0,0 +1,23 @@
|
||||
function(link_package NAME)
|
||||
cmake_parse_arguments(LP "ENCOURAGED" "TARGET" "" ${ARGN})
|
||||
|
||||
if(${NAME}_FOUND)
|
||||
string(TOUPPER "${NAME}" UCNAME)
|
||||
add_definitions(-DWITH_${UCNAME})
|
||||
# Some libraries' cmake packages (looking at you, SDL2) leave trailing whitespace in the link commands,
|
||||
# which (later) cmake considers to be an error. Work around this with by stripping the incoming string.
|
||||
if(LP_TARGET AND TARGET ${LP_TARGET})
|
||||
string(STRIP "${LP_TARGET}" LP_TARGET)
|
||||
target_link_libraries(openttd ${LP_TARGET})
|
||||
message(STATUS "${NAME} found -- -DWITH_${UCNAME} -- ${LP_TARGET}")
|
||||
else()
|
||||
string(STRIP "${${NAME}_LIBRARY}" ${NAME}_LIBRARY)
|
||||
string(STRIP "${${NAME}_LIBRARIES}" ${NAME}_LIBRARIES)
|
||||
include_directories(${${NAME}_INCLUDE_DIRS} ${${NAME}_INCLUDE_DIR})
|
||||
target_link_libraries(openttd ${${NAME}_LIBRARIES} ${${NAME}_LIBRARY})
|
||||
message(STATUS "${NAME} found -- -DWITH_${UCNAME} -- ${${NAME}_INCLUDE_DIRS} ${${NAME}_INCLUDE_DIR} -- ${${NAME}_LIBRARIES} ${${NAME}_LIBRARY}")
|
||||
endif()
|
||||
elseif(LP_ENCOURAGED)
|
||||
message(WARNING "${NAME} not found; compiling OpenTTD without ${NAME} is strongly disencouraged")
|
||||
endif()
|
||||
endfunction()
|
39
cmake/MSVCFilters.cmake
Normal file
39
cmake/MSVCFilters.cmake
Normal file
@@ -0,0 +1,39 @@
|
||||
# Add source group filters for use in generated projects.
|
||||
|
||||
source_group("AI Core" REGULAR_EXPRESSION "src/ai/")
|
||||
source_group("Blitters" REGULAR_EXPRESSION "src/blitter/")
|
||||
source_group("Core Source Code" REGULAR_EXPRESSION "src/core/")
|
||||
source_group("Game Core" REGULAR_EXPRESSION "src/game/")
|
||||
source_group("MD5" REGULAR_EXPRESSION "src/3rdparty/md5/")
|
||||
source_group("Misc" REGULAR_EXPRESSION "src/misc/")
|
||||
source_group("Music" REGULAR_EXPRESSION "src/music/")
|
||||
source_group("Network Core" REGULAR_EXPRESSION "src/network/core/")
|
||||
source_group("OSX" REGULAR_EXPRESSION "src/os/macosx/")
|
||||
source_group("Pathfinder" REGULAR_EXPRESSION "src/pathfinder/")
|
||||
source_group("Save/Load handlers" REGULAR_EXPRESSION "src/saveload/")
|
||||
source_group("Sound" REGULAR_EXPRESSION "src/sound/")
|
||||
source_group("Sprite loaders" REGULAR_EXPRESSION "src/spriteloader/")
|
||||
source_group("Squirrel" REGULAR_EXPRESSION "src/3rdparty/squirrel/squirrel/")
|
||||
source_group("Tables" REGULAR_EXPRESSION "src/table/")
|
||||
source_group("Video" REGULAR_EXPRESSION "src/video/")
|
||||
source_group("Video/GL" REGULAR_EXPRESSION "src/3rdparty/opengl/")
|
||||
source_group("Widgets" REGULAR_EXPRESSION "src/widgets/")
|
||||
source_group("Windows files" REGULAR_EXPRESSION "src/os/windows/|\.rc$")
|
||||
|
||||
# Last directive for each file wins, so make sure NPF/YAPF are after the generic pathfinder filter.
|
||||
source_group("NPF" REGULAR_EXPRESSION "src/pathfinder/npf/")
|
||||
source_group("YAPF" REGULAR_EXPRESSION "src/pathfinder/yapf/")
|
||||
|
||||
source_group("Script" REGULAR_EXPRESSION "src/script/")
|
||||
source_group("Script API Implementation" REGULAR_EXPRESSION "src/script/api/")
|
||||
source_group("Script API" REGULAR_EXPRESSION "src/script/api/.*\.hpp$")
|
||||
source_group("AI API" REGULAR_EXPRESSION "src/script/api/ai_")
|
||||
source_group("Game API" REGULAR_EXPRESSION "src/script/api/game_")
|
||||
|
||||
# Placed last to ensure any of the previous directory filters are overridden.
|
||||
source_group("Command handlers" REGULAR_EXPRESSION "_cmd\.cpp$")
|
||||
source_group("Drivers" REGULAR_EXPRESSION "_driver\.hpp$")
|
||||
source_group("GUI Source Code" REGULAR_EXPRESSION "_gui\.cpp$")
|
||||
source_group("Map Accessors" REGULAR_EXPRESSION "_map\.(cpp|h)$")
|
||||
source_group("NewGRF" REGULAR_EXPRESSION "newgrf.*cpp$")
|
||||
source_group("Squirrel headers" REGULAR_EXPRESSION "src/3rdparty/squirrel/squirrel/.*\.h$")
|
107
cmake/Options.cmake
Normal file
107
cmake/Options.cmake
Normal file
@@ -0,0 +1,107 @@
|
||||
include(GNUInstallDirs)
|
||||
|
||||
# Set the options for the directories (personal, shared, global).
|
||||
#
|
||||
# set_directory_options()
|
||||
#
|
||||
function(set_directory_options)
|
||||
if(APPLE)
|
||||
set(DEFAULT_PERSONAL_DIR "Documents/OpenTTD")
|
||||
set(DEFAULT_SHARED_DIR "/Library/Application Support/OpenTTD")
|
||||
set(DEFAULT_GLOBAL_DIR "(not set)")
|
||||
elseif(WIN32)
|
||||
set(DEFAULT_PERSONAL_DIR "OpenTTD")
|
||||
set(DEFAULT_SHARED_DIR "(not set)")
|
||||
set(DEFAULT_GLOBAL_DIR "(not set)")
|
||||
elseif(UNIX)
|
||||
set(DEFAULT_PERSONAL_DIR ".${BINARY_NAME}")
|
||||
set(DEFAULT_SHARED_DIR "(not set)")
|
||||
set(DEFAULT_GLOBAL_DIR "${CMAKE_INSTALL_FULL_DATADIR}/${BINARY_NAME}")
|
||||
else()
|
||||
message(FATAL_ERROR "Unknown OS found; please consider creating a Pull Request to add support for this OS.")
|
||||
endif()
|
||||
|
||||
if(NOT PERSONAL_DIR)
|
||||
set(PERSONAL_DIR "${DEFAULT_PERSONAL_DIR}" CACHE STRING "Personal directory")
|
||||
message(STATUS "Detecting Personal Data directory - ${PERSONAL_DIR}")
|
||||
endif()
|
||||
|
||||
if(NOT SHARED_DIR)
|
||||
set(SHARED_DIR "${DEFAULT_SHARED_DIR}" CACHE STRING "Shared directory")
|
||||
message(STATUS "Detecting Shared Data directory - ${SHARED_DIR}")
|
||||
endif()
|
||||
|
||||
if(NOT GLOBAL_DIR)
|
||||
set(GLOBAL_DIR "${DEFAULT_GLOBAL_DIR}" CACHE STRING "Global directory")
|
||||
message(STATUS "Detecting Global Data directory - ${GLOBAL_DIR}")
|
||||
endif()
|
||||
|
||||
set(HOST_BINARY_DIR "" CACHE PATH "Full path to native cmake build directory")
|
||||
endfunction()
|
||||
|
||||
# Set some generic options that influence what is being build.
|
||||
#
|
||||
# set_options()
|
||||
#
|
||||
function(set_options)
|
||||
option(OPTION_PACKAGE_DEPENDENCIES "Copy dependencies into lib/ for easy packaging (Linux only)" OFF)
|
||||
|
||||
if(UNIX AND NOT APPLE AND NOT OPTION_PACKAGE_DEPENDENCIES)
|
||||
set(DEFAULT_OPTION_INSTALL_FHS ON)
|
||||
else()
|
||||
set(DEFAULT_OPTION_INSTALL_FHS OFF)
|
||||
endif()
|
||||
|
||||
option(OPTION_FORCE_COLORED_OUTPUT "Always produce ANSI-colored output (GNU/Clang only)." OFF)
|
||||
|
||||
option(OPTION_DEDICATED "Build dedicated server only (no GUI)" OFF)
|
||||
option(OPTION_INSTALL_FHS "Install with Filesystem Hierarchy Standard folders" ${DEFAULT_OPTION_INSTALL_FHS})
|
||||
option(OPTION_USE_ASSERTS "Use assertions; leave enabled for nightlies, betas, and RCs" OFF)
|
||||
if(EMSCRIPTEN)
|
||||
# Although pthreads is supported, it is not in a way yet that is
|
||||
# useful for us.
|
||||
option(OPTION_USE_THREADS "Use threads" OFF)
|
||||
else()
|
||||
option(OPTION_USE_THREADS "Use threads" ON)
|
||||
endif()
|
||||
option(OPTION_USE_NSIS "Use NSIS to create windows installer; enable only for stable releases" OFF)
|
||||
option(OPTION_TOOLS_ONLY "Build only tools target" OFF)
|
||||
option(OPTION_DOCS_ONLY "Build only docs target" OFF)
|
||||
|
||||
if (OPTION_DOCS_ONLY)
|
||||
set(OPTION_TOOLS_ONLY ON PARENT_SCOPE)
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
# Show the values of the generic options.
|
||||
#
|
||||
# show_options()
|
||||
#
|
||||
function(show_options)
|
||||
message(STATUS "Option Package Dependencies - ${OPTION_PACKAGE_DEPENDENCIES}")
|
||||
message(STATUS "Option Dedicated - ${OPTION_DEDICATED}")
|
||||
message(STATUS "Option Install FHS - ${OPTION_INSTALL_FHS}")
|
||||
message(STATUS "Option Use assert - ${OPTION_USE_ASSERTS}")
|
||||
message(STATUS "Option Use threads - ${OPTION_USE_THREADS}")
|
||||
message(STATUS "Option Use NSIS - ${OPTION_USE_NSIS}")
|
||||
endfunction()
|
||||
|
||||
# Add the definitions for the options that are selected.
|
||||
#
|
||||
# add_definitions_based_on_options()
|
||||
#
|
||||
function(add_definitions_based_on_options)
|
||||
if(OPTION_DEDICATED)
|
||||
add_definitions(-DDEDICATED)
|
||||
endif()
|
||||
|
||||
if(NOT OPTION_USE_THREADS)
|
||||
add_definitions(-DNO_THREADS)
|
||||
endif()
|
||||
|
||||
if(OPTION_USE_ASSERTS)
|
||||
add_definitions(-DWITH_ASSERT)
|
||||
else()
|
||||
add_definitions(-DNDEBUG)
|
||||
endif()
|
||||
endfunction()
|
25
cmake/PackageBundle.cmake
Normal file
25
cmake/PackageBundle.cmake
Normal file
@@ -0,0 +1,25 @@
|
||||
string(TIMESTAMP CURRENT_YEAR "%Y")
|
||||
|
||||
set(CPACK_BUNDLE_NAME "OpenTTD")
|
||||
set(CPACK_BUNDLE_ICON "${CMAKE_SOURCE_DIR}/os/macosx/openttd.icns")
|
||||
set(CPACK_BUNDLE_PLIST "${CMAKE_CURRENT_BINARY_DIR}/Info.plist")
|
||||
set(CPACK_DMG_BACKGROUND_IMAGE "${CMAKE_SOURCE_DIR}/os/macosx/splash.png")
|
||||
set(CPACK_DMG_FORMAT "UDBZ")
|
||||
|
||||
# Create a temporary Info.plist.in, where we will fill in the version via
|
||||
# CPackProperties.cmake.in. This because at this point in time the version
|
||||
# is not yet known.
|
||||
configure_file("${CMAKE_SOURCE_DIR}/os/macosx/Info.plist.in" "${CMAKE_CURRENT_BINARY_DIR}/Info.plist.in")
|
||||
set(CPACK_BUNDLE_PLIST_SOURCE "${CMAKE_CURRENT_BINARY_DIR}/Info.plist.in")
|
||||
|
||||
# Delay fixup_bundle() till the install step; this makes sure all executables
|
||||
# exists and it can do its job.
|
||||
install(
|
||||
CODE
|
||||
"
|
||||
include(BundleUtilities)
|
||||
set(BU_CHMOD_BUNDLE_ITEMS TRUE)
|
||||
fixup_bundle(\"\${CMAKE_INSTALL_PREFIX}/../MacOS/openttd\" \"\" \"\")
|
||||
"
|
||||
DESTINATION .
|
||||
COMPONENT Runtime)
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user