Compare commits
476 commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
e44e5a0128 | ||
![]() |
f26b8890f0 | ||
![]() |
f1e54eec76 | ||
![]() |
37ee134d7a | ||
![]() |
6cc6a72d18 | ||
![]() |
38adf70e7d | ||
![]() |
abed35b79b | ||
![]() |
78c2f2e954 | ||
![]() |
e8271cd138 | ||
![]() |
da713c4bf5 | ||
![]() |
392e04a9eb | ||
![]() |
71b4ada5c4 | ||
![]() |
2ce5f658e7 | ||
![]() |
5f232bf604 | ||
![]() |
e8ebd6ceff | ||
![]() |
332ed60fcf | ||
![]() |
408e4469b3 | ||
![]() |
e0abfaa743 | ||
![]() |
a19920700b | ||
![]() |
c1a5621d47 | ||
![]() |
00baf7d42c | ||
![]() |
2aa218f509 | ||
![]() |
808acc9e85 | ||
![]() |
67cc3b0638 | ||
![]() |
96e27afe76 | ||
![]() |
df228df56a | ||
![]() |
bbab147cd6 | ||
![]() |
b3cdf881a0 | ||
![]() |
feb86cb839 | ||
![]() |
99ce33e7ef | ||
![]() |
5fd0c15502 | ||
![]() |
9f1bea517c | ||
![]() |
8bdecab59e | ||
![]() |
f320b7be11 | ||
![]() |
c7ea504892 | ||
![]() |
f99e74ae69 | ||
![]() |
e4d3ffda78 | ||
![]() |
5cd8b3b6c9 | ||
![]() |
8b29e0530c | ||
![]() |
413c13fc08 | ||
![]() |
f101c27251 | ||
![]() |
26ccfb778b | ||
![]() |
3c27d274a7 | ||
![]() |
245576ce7d | ||
![]() |
6825707b34 | ||
![]() |
bb2cdb889f | ||
![]() |
a0ef4cbb4a | ||
![]() |
dc4f616514 | ||
![]() |
c7cd11e0b7 | ||
![]() |
5a6c3a87ad | ||
![]() |
5b08b79a84 | ||
![]() |
88fd63556a | ||
![]() |
1ae6f481ff | ||
![]() |
62685dc523 | ||
![]() |
8ecc810826 | ||
![]() |
17a9c802c6 | ||
![]() |
fea220ddf8 | ||
![]() |
25014855c6 | ||
![]() |
979545b60d | ||
![]() |
ff81419ccf | ||
![]() |
9ad05132ee | ||
![]() |
4f3d3fba36 | ||
![]() |
a42030eae2 | ||
![]() |
617bd92c31 | ||
![]() |
3a7804e43c | ||
![]() |
b46932004b | ||
![]() |
1977fef81b | ||
![]() |
8cf5612e57 | ||
![]() |
57934bfb8d | ||
![]() |
a9bae2e6ca | ||
![]() |
7c7a079ffc | ||
![]() |
10976c3f45 | ||
![]() |
f8034fc4fe | ||
![]() |
f00dbb066b | ||
![]() |
abaaefc6bd | ||
![]() |
98d0af2ca2 | ||
![]() |
2f06922052 | ||
![]() |
28310a4006 | ||
![]() |
f524731153 | ||
![]() |
170253beab | ||
![]() |
7a8d459e54 | ||
![]() |
4285a9ca09 | ||
![]() |
f464f1d9aa | ||
![]() |
e5f63526b6 | ||
![]() |
ad8fd351c1 | ||
![]() |
7837deeec5 | ||
![]() |
0c3b1d31b1 | ||
![]() |
5a174662b3 | ||
![]() |
0e693b8077 | ||
![]() |
fa1b943bac | ||
![]() |
0b34ff94c5 | ||
![]() |
9984f63f92 | ||
![]() |
fbdfa23a03 | ||
![]() |
e2c17ed742 | ||
![]() |
b6a73c3b8f | ||
![]() |
b157ddc4ec | ||
![]() |
cece8f963d | ||
![]() |
3aee83a88a | ||
![]() |
b6c6fabd21 | ||
![]() |
8dfe3e6178 | ||
![]() |
eb8b04751d | ||
![]() |
e6a4bbf2f3 | ||
![]() |
e6dd32b8e8 | ||
![]() |
0630f10830 | ||
![]() |
1f5d45a9f3 | ||
![]() |
e82c5c433e | ||
![]() |
36fac11ad2 | ||
![]() |
59ad396840 | ||
![]() |
812f779e23 | ||
![]() |
1243984f9a | ||
![]() |
a850dad851 | ||
![]() |
85324ae26c | ||
![]() |
1b47cea9c5 | ||
![]() |
63e8b69236 | ||
![]() |
da31d005ea | ||
![]() |
20e1989615 | ||
![]() |
e8493cd807 | ||
![]() |
e940d62ba9 | ||
![]() |
62df15b6c8 | ||
![]() |
2e2db9b4d1 | ||
![]() |
16405a5595 | ||
![]() |
07a04c0645 | ||
![]() |
72f2fabadf | ||
![]() |
46efc9cec9 | ||
![]() |
15794ceee7 | ||
![]() |
ec16918236 | ||
![]() |
4af6073c40 | ||
![]() |
10ff03c389 | ||
![]() |
cf7ceb6f24 | ||
![]() |
2f73ec0fdb | ||
![]() |
b4d6878169 | ||
![]() |
17d9d2ecd6 | ||
![]() |
69cd90c915 | ||
![]() |
06c0caf910 | ||
![]() |
88fc3cda4f | ||
![]() |
bf85b31c59 | ||
![]() |
4ac8b52563 | ||
![]() |
e42f83a8d2 | ||
![]() |
a56ff99f78 | ||
![]() |
b446e077bf | ||
![]() |
20636bb698 | ||
![]() |
e4fb2344c9 | ||
![]() |
cb1639da4d | ||
![]() |
57ceb7ac66 | ||
![]() |
32b82e1c47 | ||
![]() |
ef95de6649 | ||
![]() |
f6c3a31e0e | ||
![]() |
5c442ae9c6 | ||
![]() |
5cd164ed8c | ||
![]() |
44cd0bf496 | ||
![]() |
791e23b2ba | ||
![]() |
d5b726df6e | ||
![]() |
087fa65dc5 | ||
![]() |
0d27d59901 | ||
![]() |
af9dd1bfb6 | ||
![]() |
54f7c206a9 | ||
![]() |
d0111b33b4 | ||
![]() |
b7f703a330 | ||
![]() |
d9fa0ed182 | ||
![]() |
94412ee7b4 | ||
![]() |
a37aadcbc5 | ||
![]() |
2a54d4aaf1 | ||
![]() |
d1dd992d08 | ||
![]() |
e13d4dcaf8 | ||
![]() |
d8cd3449e0 | ||
![]() |
e461e35729 | ||
![]() |
daf204f6f7 | ||
![]() |
80d07152c7 | ||
![]() |
c2a59869cf | ||
![]() |
08358a38db | ||
![]() |
6cc8b2e1e1 | ||
![]() |
cfc85d63e2 | ||
![]() |
f880bbaec8 | ||
![]() |
677e950d75 | ||
![]() |
1a3ed67ec2 | ||
![]() |
2d4a675069 | ||
![]() |
0c409d5391 | ||
![]() |
305166e977 | ||
![]() |
1b55cee68a | ||
![]() |
55aa8b44cf | ||
![]() |
2a195e128b | ||
![]() |
b4b67f83b2 | ||
![]() |
8b95042949 | ||
![]() |
72a308ab32 | ||
![]() |
9da76b2123 | ||
![]() |
6408559b02 | ||
![]() |
b990c4c10b | ||
![]() |
b1458835cc | ||
![]() |
961a8d7835 | ||
![]() |
ef4cf3d0ac | ||
![]() |
e447ccf70d | ||
![]() |
c51b35f249 | ||
![]() |
c9c7b5e547 | ||
![]() |
d9619c1fca | ||
![]() |
5f1da43829 | ||
![]() |
2d816e8786 | ||
![]() |
9163d84c07 | ||
![]() |
635f6f035a | ||
![]() |
2580c34c12 | ||
![]() |
d461156a3d | ||
![]() |
56533dcf93 | ||
![]() |
d64b602e03 | ||
![]() |
bcc75d840b | ||
![]() |
4487b32063 | ||
![]() |
24b623ce5d | ||
![]() |
f4a1d25d3f | ||
![]() |
d5203c100d | ||
![]() |
d84ee4ae2d | ||
![]() |
12aca1caa0 | ||
![]() |
437e6f4820 | ||
![]() |
12e15b004c | ||
![]() |
f012d1199a | ||
![]() |
4fa1f4a027 | ||
![]() |
82fb578eea | ||
![]() |
ea7a485629 | ||
![]() |
16db8c6dba | ||
![]() |
292dfd426a | ||
![]() |
99d5190b79 | ||
![]() |
4d425a87a4 | ||
![]() |
1f3982d0f9 | ||
![]() |
98808019d0 | ||
![]() |
bc0e88458c | ||
![]() |
c7b09d0984 | ||
![]() |
f230cd6f11 | ||
![]() |
176140c9ff | ||
![]() |
9aec6e2d06 | ||
![]() |
7e45cc3bac | ||
![]() |
5ed6874de2 | ||
![]() |
e786b4bd58 | ||
![]() |
d7967f8883 | ||
![]() |
5f196160c5 | ||
![]() |
60c39ea239 | ||
![]() |
7c8f357d09 | ||
![]() |
d17549b5f9 | ||
![]() |
ad14fb5de8 | ||
![]() |
8ada1bf323 | ||
![]() |
02ed6f2b58 | ||
![]() |
67f3b6f9ab | ||
![]() |
e861d33533 | ||
![]() |
306be61f57 | ||
![]() |
0160eb6e6d | ||
![]() |
21ea192584 | ||
![]() |
f927bb344a | ||
![]() |
48cee23179 | ||
![]() |
96ee41d87b | ||
![]() |
0fda4450ae | ||
![]() |
4e06423b43 | ||
![]() |
545ba266bd | ||
![]() |
8c83da78e2 | ||
![]() |
76cdd3bfb5 | ||
![]() |
5491e48ad9 | ||
![]() |
b9d2095ec0 | ||
![]() |
3dec7e6c78 | ||
![]() |
4fbb2a5228 | ||
![]() |
c2a4745eec | ||
![]() |
4d952bbe61 | ||
![]() |
ebe5149dbc | ||
![]() |
4dfb946fc8 | ||
![]() |
cfb2ca9fa6 | ||
![]() |
320aa7bf88 | ||
![]() |
fc87104995 | ||
![]() |
099b6bb3e0 | ||
![]() |
3bf9b0f811 | ||
![]() |
39cc21db8e | ||
![]() |
9632febdb5 | ||
![]() |
9b2016a4af | ||
![]() |
5327400b96 | ||
![]() |
b426ae92a5 | ||
![]() |
f53dbc0b58 | ||
![]() |
e6b00ad9f1 | ||
![]() |
7e802aab98 | ||
![]() |
cb2b850c01 | ||
![]() |
b91e5e2343 | ||
![]() |
4dfd2903c9 | ||
![]() |
2f57b412b6 | ||
![]() |
f90af33be4 | ||
![]() |
a3c1bc17cc | ||
![]() |
d39ceb1aa3 | ||
![]() |
b8b1972ccf | ||
![]() |
6d7eb170e3 | ||
![]() |
dbc3265794 | ||
![]() |
f884868f2a | ||
![]() |
f2c1ca464e | ||
![]() |
b501342d3e | ||
![]() |
a9642e41f6 | ||
![]() |
26ead85914 | ||
![]() |
37af71bd65 | ||
![]() |
f9af941f1e | ||
![]() |
3ac1b686e8 | ||
![]() |
8ade92b096 | ||
![]() |
4c5ff69b95 | ||
![]() |
3cb4cc7d28 | ||
![]() |
d23e0bd7bb | ||
![]() |
78dbf2d309 | ||
![]() |
f40e821c7b | ||
![]() |
233295c35b | ||
![]() |
49d586a537 | ||
![]() |
6b1ccd9761 | ||
![]() |
3dae9a89cd | ||
![]() |
1a05133de7 | ||
![]() |
da79275657 | ||
![]() |
be306abb44 | ||
![]() |
ce35bfd13d | ||
![]() |
04d29f4e3b | ||
![]() |
24082fe594 | ||
![]() |
9682afbc26 | ||
![]() |
d64cb1b2af | ||
![]() |
e4239634e5 | ||
![]() |
d199f05097 | ||
![]() |
8845bb48e9 | ||
![]() |
e2d1f924b1 | ||
![]() |
3cc79ac681 | ||
![]() |
c80fdc2283 | ||
![]() |
09f465727d | ||
![]() |
f7a0f119de | ||
![]() |
4384caf0dd | ||
![]() |
72a102ccd4 | ||
![]() |
76f3121b2f | ||
![]() |
d7dfd59910 | ||
![]() |
adce3fe79b | ||
![]() |
84ed5488e0 | ||
![]() |
35f5fac39f | ||
![]() |
cdfbed4ea4 | ||
![]() |
5c5167cba0 | ||
![]() |
6e625ef091 | ||
![]() |
cab17d16e8 | ||
![]() |
c2e9eab6c4 | ||
![]() |
c6589a78b7 | ||
![]() |
439c43a59e | ||
![]() |
c4bc379411 | ||
![]() |
d1d60728a1 | ||
![]() |
1c94648dd5 | ||
![]() |
62641e9ed0 | ||
![]() |
9a92c81fae | ||
![]() |
0edc2b9ae4 | ||
![]() |
ebb1a2fea1 | ||
![]() |
8051d9f8fe | ||
![]() |
579a1314ae | ||
![]() |
8ba2b3ebd3 | ||
![]() |
ace2c8c9bc | ||
![]() |
629f176fe5 | ||
![]() |
4ad9ccbe38 | ||
![]() |
b6f55dfbbb | ||
![]() |
6add53c677 | ||
![]() |
4c29c98a6c | ||
![]() |
54e0785f9d | ||
![]() |
99b3e141f0 | ||
![]() |
51e8f01627 | ||
![]() |
530e042c97 | ||
![]() |
5471d3cb98 | ||
![]() |
bd9677e597 | ||
![]() |
ead20e4a17 | ||
![]() |
a86fca0d01 | ||
![]() |
f53be636ba | ||
![]() |
2be2adec99 | ||
![]() |
1a0de0e4b2 | ||
![]() |
2b9ed47080 | ||
![]() |
6d7fd11dab | ||
![]() |
013b373541 | ||
![]() |
7571420b3b | ||
![]() |
0692916f73 | ||
![]() |
032ee9ca18 | ||
![]() |
087faa728e | ||
![]() |
119595fffe | ||
![]() |
58c53f9822 | ||
![]() |
00a0552c18 | ||
![]() |
4fd13e5145 | ||
![]() |
b039c67200 | ||
![]() |
86d459fc60 | ||
![]() |
c750e78d6b | ||
![]() |
e33c8a3f3c | ||
![]() |
860a760263 | ||
![]() |
7ee7d59e96 | ||
![]() |
055b0d72fc | ||
![]() |
ae3bb1331f | ||
![]() |
4ecb10731d | ||
![]() |
4376f1c8cd | ||
![]() |
abf559712a | ||
![]() |
350437ebf7 | ||
![]() |
0808e89f27 | ||
![]() |
1de3ff043b | ||
![]() |
e4992dd518 | ||
![]() |
cdf77c8bb7 | ||
![]() |
90fe48ea18 | ||
![]() |
70dd7d8f02 | ||
![]() |
8b58dbc07f | ||
![]() |
019c5352c2 | ||
![]() |
9b79c92acd | ||
![]() |
3599083eb4 | ||
![]() |
4977eb9d8c | ||
![]() |
8f67d90767 | ||
![]() |
be9c2a9d38 | ||
![]() |
62efe11705 | ||
![]() |
7422b02ab5 | ||
![]() |
a1c0f60524 | ||
![]() |
a70f1d0ced | ||
![]() |
6797db582c | ||
![]() |
d6a8c98211 | ||
![]() |
42822ac374 | ||
![]() |
de65fad72e | ||
![]() |
37150b4e22 | ||
![]() |
db30ca53ae | ||
![]() |
43dd442a4f | ||
![]() |
4fc7906f3e | ||
![]() |
60a9ac8f6d | ||
![]() |
95bf03f357 | ||
![]() |
9153d704ae | ||
![]() |
fa353495d3 | ||
![]() |
0fdd140b62 | ||
![]() |
660c982f1e | ||
![]() |
caac0c0b83 | ||
![]() |
bac29601fa | ||
![]() |
827b3950e8 | ||
![]() |
fb758041ca | ||
![]() |
8660561ad9 | ||
![]() |
7ac222916a | ||
![]() |
f620e21c12 | ||
![]() |
79973dc787 | ||
![]() |
612224c54e | ||
![]() |
b71b97b468 | ||
![]() |
2c01b8e69b | ||
![]() |
1d693d324c | ||
![]() |
718b3e5c68 | ||
![]() |
45b8e936ca | ||
![]() |
13c0fa6391 | ||
![]() |
b853e9e10c | ||
![]() |
4ed1d509dc | ||
![]() |
a32a698ca2 | ||
![]() |
bbe353c8dd | ||
![]() |
7a83817989 | ||
![]() |
da12e97bca | ||
![]() |
652f98792e | ||
![]() |
3ac99d1d86 | ||
![]() |
7f5c687196 | ||
![]() |
a9e4a3cce8 | ||
![]() |
92b8a8cb00 | ||
![]() |
3110a1762c | ||
![]() |
510167b26c | ||
![]() |
41dfd886c7 | ||
![]() |
b7797864d6 | ||
![]() |
4738455f14 | ||
![]() |
7a769a9d2c | ||
![]() |
40fad78f5c | ||
![]() |
8f856bf05d | ||
![]() |
5b0d72c9ca | ||
![]() |
e419eb903c | ||
![]() |
d13c2cc47a | ||
![]() |
52b7c2e428 | ||
![]() |
ae13828cfd | ||
![]() |
dd1d7e3ca7 | ||
![]() |
526a09df2a | ||
![]() |
dba52e903c | ||
![]() |
6bfd776157 | ||
![]() |
8ba1eb84b4 | ||
![]() |
d24f75e8f4 | ||
![]() |
523467c40b | ||
![]() |
fe5f4556e5 | ||
![]() |
cb6fb85fe1 | ||
![]() |
1aa56c01a3 | ||
![]() |
c64777433a | ||
![]() |
918431dce9 | ||
![]() |
83fc5a0c56 | ||
![]() |
40fc9a8be7 | ||
![]() |
2d7fc054dd | ||
![]() |
9e8ede348f | ||
![]() |
55e141313f | ||
![]() |
3e8f352e2d | ||
![]() |
6d052aa72e | ||
![]() |
77ad4bb1be | ||
![]() |
e115745125 | ||
![]() |
cc7dda2ba0 | ||
![]() |
f719ae8fc9 | ||
![]() |
2c56a58a42 | ||
![]() |
1095bf104d | ||
![]() |
982d264094 | ||
![]() |
4906f3cc7a |
|
@ -1,4 +0,0 @@
|
|||
---
|
||||
Checks: '-*,modernize-use-nullptr,performance-unnecessary-value-param'
|
||||
WarningsAsErrors: true
|
||||
...
|
|
@ -13,7 +13,3 @@ indent_size = 4
|
|||
[*.{cpp,hpp}]
|
||||
indent_style = tab
|
||||
indent_size = 4
|
||||
|
||||
[*.lua]
|
||||
indent_style = tab
|
||||
indent_size = 4
|
||||
|
|
10
.github/ISSUE_TEMPLATE/bug_report.yml
vendored
|
@ -1,5 +1,5 @@
|
|||
name: Bug Report
|
||||
description: Create a bug report to help us improve the game.
|
||||
description: Create a report to help us improve the game.
|
||||
labels: ['Bug']
|
||||
|
||||
body:
|
||||
|
@ -8,11 +8,17 @@ body:
|
|||
attributes:
|
||||
label: Game and System Information
|
||||
description: |
|
||||
- What version of the game are you running? (If you built wesnoth yourself, mention the exact commit)
|
||||
- What version of the game are you running?
|
||||
- Where did you download it from? (Steam, Mac App Store, our website, built from source, etc.)
|
||||
- If you're using a custom build, what compiler did you use, and what commit did you build at?
|
||||
- What OS are you running?
|
||||
value: |
|
||||
- **Version:**
|
||||
- **Downloaded from:**
|
||||
- **Build info:**
|
||||
- **OS:**
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
id: description
|
||||
|
|
83
.github/workflows/ci-main.yml
vendored
|
@ -2,16 +2,16 @@ name: CI
|
|||
|
||||
on:
|
||||
push:
|
||||
branches: [ master ]
|
||||
branches: [ 1.18 ]
|
||||
pull_request:
|
||||
branches: [ master ]
|
||||
branches: [ 1.18 ]
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
checks: # checks that don't need a wesnoth binary
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: wesnoth/wesnoth:2404-master
|
||||
image: wesnoth/wesnoth:2204-master
|
||||
options: --tty # docker create options
|
||||
env:
|
||||
CLICOLOR_FORCE: 1
|
||||
|
@ -31,9 +31,6 @@ jobs:
|
|||
- name: Whitespace and WML indentation check
|
||||
if: success() || failure()
|
||||
run: ./utils/CI/fix_whitespace.sh; git status; git diff --exit-code
|
||||
- name: WML missing images check
|
||||
if: success() || failure()
|
||||
run: utils/CI/check_wml_images.sh
|
||||
- name: Run luacheck
|
||||
if: success() || failure()
|
||||
run: luacheck .
|
||||
|
@ -41,12 +38,12 @@ jobs:
|
|||
if: success() || failure()
|
||||
run: doxygen doc/doxygen/Doxyfile
|
||||
|
||||
copyright: # check takes a bit longer and does not need to run in docker (sound/music only)
|
||||
copyright: # check takes a bit longer and does not need to run in docker
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- { uses: actions/checkout@v4, with: { fetch-depth: 50 } }
|
||||
|
||||
- name: Sound/Music copyright check
|
||||
- name: Copyright check
|
||||
run: ./update_copyrights
|
||||
|
||||
ubuntu:
|
||||
|
@ -54,20 +51,18 @@ jobs:
|
|||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
# the check for WML tests below may need to be adjusted if configurations are changed
|
||||
- { cfg: debug, tool: scons, cc: gcc, cxx: g++, std: 17, lto: false, sys_lua: false }
|
||||
- { cfg: release, tool: cmake, cc: gcc, cxx: g++, std: 20, lto: true, sys_lua: false }
|
||||
- { cfg: release, tool: cmake, cc: clang, cxx: clang++, std: 17, lto: true, sys_lua: true }
|
||||
- { tool: scons, cc: gcc, cxx: g++, cfg: debug, lto: false, sys_lua: false }
|
||||
- { tool: cmake, cc: clang, cxx: clang++, cfg: release, lto: true, sys_lua: true }
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: wesnoth/wesnoth:2404-master
|
||||
image: wesnoth/wesnoth:2204-master
|
||||
options: --tty # docker create options
|
||||
env:
|
||||
TOOL: ${{ matrix.tool }}
|
||||
CFG: ${{ matrix.cfg }}
|
||||
CC: ${{ matrix.cc }}
|
||||
CXX: ${{ matrix.cxx }}
|
||||
CXX_STD: ${{ matrix.std }}
|
||||
CXX_STD: 17
|
||||
LTO: ${{ matrix.lto }}
|
||||
SYS_LUA: ${{ matrix.sys_lua }}
|
||||
CLICOLOR_FORCE: 1
|
||||
|
@ -90,15 +85,10 @@ jobs:
|
|||
scons "$@" build="$CFG" ctool="$CC" cxxtool="$CXX" cxx_std="$CXX_STD" \
|
||||
extra_flags_config="-pipe" forum_user_handler=true \
|
||||
nls=false enable_lto="$LTO" system_lua="$SYS_LUA" force_color=true \
|
||||
jobs=2 --debug=time glibcxx_debug=true glibcxx_assertions=true compile_db=true
|
||||
jobs=2 --debug=time glibcxx_debug=true glibcxx_assertions=true
|
||||
}
|
||||
build strict=true wesnoth boost_unit_tests
|
||||
|
||||
build cdb
|
||||
# disable all warnings since we have coverage on them in a standard build, and clang-tidy
|
||||
# triggers false positive compiler warnings that clang itself won't
|
||||
run-clang-tidy -quiet -use-color -j 2 -extra-arg="-w" -warnings-as-errors='*' '^(?!.*src/modules/|.*build/)'
|
||||
|
||||
apt remove -y -qq libsdl2-dev libsdl2-image-dev libsdl2-mixer-dev
|
||||
|
||||
build strict=false wesnothd campaignd
|
||||
|
@ -109,7 +99,7 @@ jobs:
|
|||
cmake "$@" -DCMAKE_BUILD_TYPE="$CFG" -DCXX_STD="$CXX_STD" \
|
||||
-DEXTRA_FLAGS_CONFIG="-pipe" -DENABLE_MYSQL=true \
|
||||
-DENABLE_NLS=false -DENABLE_LTO="$LTO" -DFORCE_COLOR_OUTPUT=true -DLTO_JOBS=2 \
|
||||
-DENABLE_SYSTEM_LUA="$SYS_LUA -DCLANG_TIDY=true" .
|
||||
-DENABLE_SYSTEM_LUA="$SYS_LUA" .
|
||||
}
|
||||
rm -R /usr/local/lib/cmake
|
||||
rm /usr/local/lib/libboost*
|
||||
|
@ -128,27 +118,19 @@ jobs:
|
|||
if: success() || steps.build.outcome == 'success'
|
||||
run: |
|
||||
./wesnoth --version
|
||||
for opt in data userdata usercache
|
||||
for opt in config data userconfig userdata
|
||||
do
|
||||
output=$(./wesnoth --nobanner --"$opt"-path)
|
||||
if [ "$output" = "" ]; then printf 'option --%s-path prints nothing to stdout!\n' "$opt" >&2; exit 1; fi
|
||||
printf '%s-path: %s\n' "$opt" "$output"
|
||||
done
|
||||
- name: WML validation
|
||||
# only run on release builds (takes ~10 times as long on debug); since there are multiple release builds
|
||||
# but running the following tests multiple times doesn't make much sense use cc==clang as the check
|
||||
if: matrix.cc == 'clang' && (success() || steps.build.outcome == 'success')
|
||||
if: success() || steps.build.outcome == 'success'
|
||||
run: ./utils/CI/schema_validation.sh
|
||||
- name: Run WML tests
|
||||
# only run on release builds (takes ~6 times as long on debug)
|
||||
if: matrix.cc == 'clang' && (success() || steps.build.outcome == 'success')
|
||||
run: ./run_wml_tests -v -v -g -c -t 20 -bt 1000 -a=--userdata-dir=ud
|
||||
- name: Upload userdata files from WML unit tests (logs, replays)
|
||||
if: matrix.cc == 'clang' && (success() || failure())
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: WMLTest-userdata-Linux
|
||||
path: ud
|
||||
# only run on release builds (takes ~10 times as long on debug)
|
||||
if: matrix.cfg == 'release' && (success() || steps.build.outcome == 'success')
|
||||
run: ./run_wml_tests -g -c -t 20 -bt 1000
|
||||
- name: Run play tests
|
||||
if: success() || steps.build.outcome == 'success'
|
||||
run: ./utils/CI/play_test_executor.sh
|
||||
|
@ -156,7 +138,8 @@ jobs:
|
|||
if: success() || steps.build.outcome == 'success'
|
||||
run: ./utils/CI/mp_test_executor.sh
|
||||
- name: Run unit tests
|
||||
if: success() || steps.build.outcome == 'success'
|
||||
# only run on release builds (takes ~10 times as long on debug)
|
||||
if: matrix.cfg == 'release' && (success() || steps.build.outcome == 'success')
|
||||
run: ./run_boost_tests
|
||||
|
||||
steam-runtime:
|
||||
|
@ -233,7 +216,7 @@ jobs:
|
|||
translations:
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: wesnoth/wesnoth:2404-master
|
||||
image: wesnoth/wesnoth:2204-master
|
||||
env:
|
||||
LANGUAGE: en_US.UTF-8
|
||||
LANG: en_US.UTF-8
|
||||
|
@ -253,7 +236,7 @@ jobs:
|
|||
make pot-update; echo "Ran make pot-update"
|
||||
make mo-update; echo "Ran make mo-update"
|
||||
make clean
|
||||
|
||||
|
||||
scons translations build=release --debug=time nls=true jobs=2; echo "Ran scons translations"
|
||||
scons pot-update; echo "Ran scons pot-update"
|
||||
scons update-po4a; echo "Ran scons update-po4a"
|
||||
|
@ -263,7 +246,7 @@ jobs:
|
|||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
cfg: [ Release ]
|
||||
cfg: [ Debug, Release ]
|
||||
runs-on: macos-13
|
||||
env:
|
||||
CFG: ${{ matrix.cfg }}
|
||||
|
@ -288,7 +271,6 @@ jobs:
|
|||
[ -x "build/$CFG/unit_tests" ] || { printf 'Failed to build unit test executable!\n' >&2; exit 1; }
|
||||
- name: Create disk image
|
||||
working-directory: projectfiles/Xcode
|
||||
continue-on-error: true # allow failures since this is not essential and it does fail spuriously (hdiutil: create failed - Resource busy)
|
||||
run: hdiutil create -volname "Wesnoth_$CFG" -fs 'HFS+' -srcfolder "build/$CFG" -ov -format UDBZ "Wesnoth_${CFG}.dmg"
|
||||
- name: Upload disk image
|
||||
uses: actions/upload-artifact@v4
|
||||
|
@ -297,13 +279,7 @@ jobs:
|
|||
path: projectfiles/Xcode/Wesnoth_${{ matrix.cfg }}.dmg
|
||||
- name: Run WML tests
|
||||
if: matrix.cfg == 'Release'
|
||||
run: ./run_wml_tests -g -c -t 30 -bt 350 -p "projectfiles/Xcode/build/$CFG/The Battle for Wesnoth.app/Contents/MacOS/The Battle for Wesnoth" -a=--userdata-dir="$PWD/ud"
|
||||
- name: Upload userdata files from WML unit tests (logs, replays)
|
||||
if: matrix.cfg == 'Release' && (success() || failure())
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: WMLTest-userdata-MacOS
|
||||
path: ud
|
||||
run: ./run_wml_tests -g -c -t 30 -p "projectfiles/Xcode/build/$CFG/The Battle for Wesnoth.app/Contents/MacOS/The Battle for Wesnoth"
|
||||
- name: Run unit tests
|
||||
run: ./run_boost_tests --path=projectfiles/Xcode/build/"$CFG" --executable=unit_tests
|
||||
|
||||
|
@ -311,7 +287,7 @@ jobs:
|
|||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
cfg: [Release]
|
||||
cfg: [Debug, Release]
|
||||
env:
|
||||
CFG: ${{ matrix.cfg }}
|
||||
VCPKG_FEATURE_FLAGS: dependencygraph
|
||||
|
@ -320,7 +296,7 @@ jobs:
|
|||
defaults:
|
||||
run:
|
||||
shell: cmd
|
||||
runs-on: windows-latest
|
||||
runs-on: windows-2019
|
||||
|
||||
steps:
|
||||
- { uses: actions/checkout@v4, with: { submodules: "recursive" } }
|
||||
|
@ -343,21 +319,14 @@ jobs:
|
|||
run: cmake -DCMAKE_BUILD_TYPE=%CFG% -DENABLE_GAME=true -DENABLE_SERVER=true -DENABLE_CAMPAIGN_SERVER=true
|
||||
-DENABLE_TESTS=true -DENABLE_MYSQL=false -DENABLE_NLS=false
|
||||
-DCMAKE_TOOLCHAIN_FILE=C:\vcpkg\scripts\buildsystems\vcpkg.cmake -DVCPKG_INSTALL_OPTIONS=--debug
|
||||
-DVCPKG_TARGET_TRIPLET=x64-windows -DCMAKE_GENERATOR_PLATFORM=x64 -G "Visual Studio 17 2022" .
|
||||
-DVCPKG_TARGET_TRIPLET=x64-windows -DCMAKE_GENERATOR_PLATFORM=x64 -G "Visual Studio 16 2019" .
|
||||
|
||||
- name: Build wesnoth, wesnothd, campaignd and unit tests
|
||||
run: MSBuild.exe wesnoth.sln -p:Configuration=%CFG%
|
||||
|
||||
- name: Run WML unit tests
|
||||
if: matrix.cfg == 'Release'
|
||||
run: python run_wml_tests -v -g -c -t 20 -p %CFG%/wesnoth.exe -a=--userdata-dir=ud
|
||||
|
||||
- name: Upload userdata files from WML unit tests (logs, replays)
|
||||
if: matrix.cfg == 'Release' && (success() || failure())
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: WMLTest-userdata-Windows
|
||||
path: ud
|
||||
run: python run_wml_tests -v -g -c -t 20 -p %CFG%/wesnoth.exe
|
||||
|
||||
# run after all other jobs have completed to check overall build status
|
||||
notification:
|
||||
|
|
12
.github/workflows/codeql.yml
vendored
|
@ -6,7 +6,6 @@ on:
|
|||
pull_request:
|
||||
# The branches below must be a subset of the branches above
|
||||
branches: [ master ]
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
analyze:
|
||||
|
@ -16,7 +15,7 @@ jobs:
|
|||
# - https://gh.io/supported-runners-and-hardware-resources
|
||||
# - https://gh.io/using-larger-runners
|
||||
# Consider using larger runners for possible analysis time improvements.
|
||||
runs-on: ubuntu-24.04
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 360
|
||||
permissions:
|
||||
actions: read
|
||||
|
@ -50,12 +49,11 @@ jobs:
|
|||
- name: Install dependencies
|
||||
if: matrix.language == 'cpp'
|
||||
run: |
|
||||
utils/autorevision.sh -t h > src/revision.h
|
||||
sudo apt update
|
||||
sudo apt install scons libboost-system1.83-dev libboost-filesystem1.83-dev libboost-iostreams1.83-dev \
|
||||
libboost-serialization1.83-dev libboost-locale1.83-dev libboost-regex1.83-dev libboost-random1.83-dev \
|
||||
libboost-program-options1.83-dev libboost-thread1.83-dev libboost-context1.83-dev libboost-test-dev \
|
||||
libboost-coroutine1.83-dev libboost-graph1.83-dev libasio-dev libsdl2-dev libsdl2-image-dev \
|
||||
sudo apt install scons libboost-system1.74-dev libboost-filesystem1.74-dev libboost-iostreams1.74-dev \
|
||||
libboost-serialization1.74-dev libboost-locale1.74-dev libboost-regex1.74-dev libboost-random1.74-dev \
|
||||
libboost-program-options1.74-dev libboost-thread1.74-dev libboost-context1.74-dev libboost-test-dev \
|
||||
libboost-coroutine1.74-dev libboost-graph1.74-dev libasio-dev libsdl2-dev libsdl2-image-dev \
|
||||
libsdl2-mixer-dev libvorbis-dev libpango1.0-dev libssl-dev libcurl4-openssl-dev liblua5.4-dev
|
||||
# Autobuild attempts to build any compiled languages (C/C++, C#, Go, Java, or Swift).
|
||||
- name: Autobuild
|
||||
|
|
88
.github/workflows/image_metadata.yml
vendored
|
@ -1,88 +0,0 @@
|
|||
name: Image metadata check CI
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ master ]
|
||||
paths: [ '**.webp', '**.png', '**.jpg', '**.jpeg' ]
|
||||
pull_request:
|
||||
paths: [ '**.webp', '**.png', '**.jpg', '**.jpeg' ]
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Image Metadata
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
BASE_SHA: ${{ github.event_name == 'push' && github.event.before || github.event.pull_request.base.sha }}
|
||||
HEAD_SHA: ${{ github.event_name == 'push' && github.event.after || github.event.pull_request.head.sha }}
|
||||
|
||||
steps:
|
||||
- name: exiftool installation
|
||||
run: |
|
||||
sudo apt-get install --assume-yes exiftool
|
||||
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: check image EXIF metadata
|
||||
run: |
|
||||
mapfile -t image_files < <(git diff --name-only --diff-filter=d "$BASE_SHA" "$HEAD_SHA" | grep -E '\.(webp|je?pg)$')
|
||||
# cycle through the changed image files, make sure they have the right fields
|
||||
for file in "${image_files[@]}"; do
|
||||
# check Artist tag, fail if missing
|
||||
artist="$(exiftool -p '$Artist' "$file")"
|
||||
if [ "$artist" ]; then
|
||||
printf 'Artist tag in %s is %s\n' "$file" "$artist"
|
||||
else
|
||||
printf 'no Artist EXIF tag in %s\n' "$file"
|
||||
exit 1
|
||||
fi
|
||||
# check Copyright tag, fail if missing or wrong type
|
||||
copyright="$(exiftool -p '$Copyright' "$file")"
|
||||
case $copyright in
|
||||
'GNU GPL v2+'|'CC BY-SA 4.0'|CC0)
|
||||
printf 'Copyright tag in %s is %s\n' "$file" "$copyright"
|
||||
;;
|
||||
'')
|
||||
printf 'no Copyright EXIF tag in %s\n' "$file"
|
||||
exit 1
|
||||
;;
|
||||
*)
|
||||
printf 'Copyright tag %s in file %s is not an accepted license! Must be one of: "GNU GPL v2+", "CC BY-SA 4.0", "CC0"\n' "$copyright" "$file"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
- name: check png XMP metadata
|
||||
run: |
|
||||
mapfile -t image_files < <(git diff --name-only --diff-filter=d "$BASE_SHA" "$HEAD_SHA" | grep -E '\.png$')
|
||||
# cycle through the changed image files, make sure they have the right fields
|
||||
for file in "${image_files[@]}"; do
|
||||
# check Creator tag, fail if missing
|
||||
artist="$(exiftool -p '$XMP:Creator' "$file")"
|
||||
if [ "$artist" ]; then
|
||||
printf 'Creator tag in %s is %s\n' "$file" "$artist"
|
||||
else
|
||||
printf 'no Creator XMP tag in %s\n' "$file"
|
||||
exit 1
|
||||
fi
|
||||
# check Rights tag, fail if missing or wrong type
|
||||
copyright="$(exiftool -p '$XMP:Rights' "$file")"
|
||||
case $copyright in
|
||||
'GNU GPL v2+'|'CC BY-SA 4.0'|CC0)
|
||||
printf 'Rights tag in %s is %s\n' "$file" "$copyright"
|
||||
;;
|
||||
'')
|
||||
printf 'no Rights XMP tag in %s\n' "$file"
|
||||
exit 1
|
||||
;;
|
||||
*)
|
||||
printf 'Rights tag %s in file %s is not an accepted license! Must be one of: "GNU GPL v2+", "CC BY-SA 4.0", "CC0"\n' "$copyright" "$file"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
done
|
4
.gitignore
vendored
|
@ -127,7 +127,6 @@ wesnoth.plg
|
|||
*.exe
|
||||
*.dll
|
||||
*.so
|
||||
compile_commands.json
|
||||
|
||||
# library files
|
||||
.libs
|
||||
|
@ -166,8 +165,6 @@ po/**/Makefile*
|
|||
data/tools/unit_tree/**/files
|
||||
data/tools/unit_tree/**/reports
|
||||
data/tools/unit_tree/**/Locale
|
||||
data/tools/macro_reference.html
|
||||
about.wiki
|
||||
|
||||
# doc
|
||||
doc/doxygen/html
|
||||
|
@ -222,7 +219,6 @@ config.h
|
|||
callgrind.out.*
|
||||
data/dist
|
||||
clean.sh
|
||||
widgets_tested.log
|
||||
|
||||
# clangd cache
|
||||
.cache/clangd
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# set minimum version
|
||||
# set minimum version
|
||||
cmake_minimum_required(VERSION 3.14)
|
||||
|
||||
project(wesnoth)
|
||||
|
@ -171,7 +171,6 @@ option(GLIBCXX_ASSERTIONS "Whether to define _GLIBCXX_ASSERTIONS" OFF)
|
|||
option(GLIBCXX_DEBUG "Whether to define _GLIBCXX_DEBUG and _GLIBCXX_DEBUG_PEDANTIC. Requires a version of Boost's program_options that's compiled with __GLIBCXX_DEBUG too." OFF)
|
||||
option(ENABLE_POT_UPDATE_TARGET "Enables the tools to update the pot files and manuals. This target has extra dependencies." OFF)
|
||||
option(FORCE_COLOR_OUTPUT "Always produce ANSI-colored output (GNU/Clang only)." FALSE)
|
||||
option(CLANG_TIDY "Enable clang-tidy linter checks." OFF)
|
||||
|
||||
if(UNIX AND NOT APPLE AND NOT CYGWIN)
|
||||
option(ENABLE_NOTIFICATIONS "Enable Window manager notification messages" ON)
|
||||
|
@ -256,11 +255,6 @@ if(NOT MSVC)
|
|||
endif()
|
||||
endif()
|
||||
|
||||
### Enable clang-tidy linting
|
||||
if (CLANG_TIDY)
|
||||
set(CMAKE_CXX_CLANG_TIDY "clang-tidy -Wno-unknown-warning-option")
|
||||
endif()
|
||||
|
||||
### Set the final compiler flags.
|
||||
|
||||
set(COMPILER_FLAGS "${COMPILER_FLAGS} ${CXX_FLAGS_USER}")
|
||||
|
@ -480,7 +474,7 @@ if(NOT MSVC)
|
|||
else()
|
||||
set(CMAKE_CXX_FLAGS "/W3 /WX /wd4503 /wd4351 /wd4250 /wd4244 /wd4267 /we4239 /wd4275 /EHsc /utf-8 /Zc:__cplusplus" CACHE STRING "Global flags used by the CXX compiler during all builds." FORCE)
|
||||
set(CMAKE_C_FLAGS "/WX" CACHE STRING "Global flags used by the C compiler during all builds." FORCE)
|
||||
add_definitions(-D_WIN32_WINNT=0x0A00 -D_CRT_SECURE_NO_WARNINGS -D_WINSOCK_DEPRECATED_NO_WARNINGS -DNOMINMAX)
|
||||
add_definitions(-D_WIN32_WINNT=0x0601 -D_CRT_SECURE_NO_WARNINGS -D_WINSOCK_DEPRECATED_NO_WARNINGS -DNOMINMAX)
|
||||
|
||||
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DDEBUG_LUA")
|
||||
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /MANIFEST:NO")
|
||||
|
@ -533,7 +527,7 @@ if(ENABLE_GAME OR ENABLE_TESTS)
|
|||
find_package(VorbisFile REQUIRED)
|
||||
find_package(PkgConfig REQUIRED)
|
||||
find_package(Fontconfig REQUIRED)
|
||||
find_package(SDL2 2.0.18 REQUIRED)
|
||||
find_package(SDL2 2.0.10 REQUIRED)
|
||||
if(NOT MSVC)
|
||||
# for everything else, use pkgconfig
|
||||
# SDL2_image and SDL2_mixer don't seem to have any cmake configuration available at all
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
## Prerequisites
|
||||
|
||||
Wesnoth requires a compiler with sufficient C++17 support such as GCC 11 and
|
||||
Wesnoth requires a compiler with sufficient C++17 support such as GCC 7 and
|
||||
later, or a version of Clang with equivalent support.
|
||||
|
||||
You'll need to have these libraries and their development headers installed in
|
||||
|
@ -19,9 +19,8 @@ order to build Wesnoth:
|
|||
* System
|
||||
* Coroutine
|
||||
* Graph
|
||||
* Charconv (This requires boost 1.85 or higher and is optional but reccomended especially for clang builds)
|
||||
* SDL2 libraries:
|
||||
* SDL2 >= 2.0.18 (macOS: 2.0.22 due to needing https://github.com/libsdl-org/SDL/commit/3bebdaccb7bff8c40438856081d404a7ce3def30)
|
||||
* SDL2 >= 2.0.10 (macOS: 2.0.22 due to needing https://github.com/libsdl-org/SDL/commit/3bebdaccb7bff8c40438856081d404a7ce3def30)
|
||||
* SDL2_image >= 2.0.2 (with PNG, JPEG, and WEBP support)
|
||||
* SDL2_mixer >= 2.0.0 (with Ogg Vorbis support)
|
||||
* Fontconfig >= 2.4.1
|
||||
|
@ -174,7 +173,7 @@ false value.
|
|||
| `strict=<boolean>` | `ENABLE_STRICT_COMPILATION=<boolean>` | Whether to treat compiler warnings as errors or not. Primarily intended for developers. |
|
||||
| `prefsdir=<directory name>` | `PREFERENCES_DIR=<directory name>` | Hardcoded user preferences and user data directory. The default is to leave this unspecified so that Wesnoth will use separate XDG paths such as .config/wesnoth and .local/share/wesnoth/<version> for its user preferences and data, respectively. |
|
||||
| `cxxtool=<program>` | `CMAKE_CXX_COMPILER=<program>` | Specifies which C++ compiler to use. By default, the system's default C++ compiler will be automatically selected during configuration. |
|
||||
| `ccache=<boolean>` | `CMAKE_CXX_COMPILER_LAUNCHER=ccache` | Whether to run the compiler through ccache first. Useful if the compiler executable is not a symbolic link to ccache. Requires ccache to be installed first. If using CMake, use CMAKE_C_COMPILER and CMAKE_CXX_COMPILER instead. |
|
||||
| `ccache=<boolean>` | | Whether to run the compiler through ccache first. Useful if the compiler executable is not a symbolic link to ccache. Requires ccache to be installed first. If using CMake, use CMAKE_C_COMPILER and CMAKE_CXX_COMPILER instead. |
|
||||
| `extra_flags_<buildtype>=<flags>` `extra_flags_config=<flags>` | `CXX_FLAGS_USER=<flags>` | Additional compiler flags to use when compiling a specific build type (SCons-only). To apply the same flags to all builds, use extra_flags_config (SCons) or CXX_FLAGS_USER (CMake) without a build type suffix. Alternatively, you may specify your flags in the CXXFLAGS environment variable. |
|
||||
| `fifodir=<full path>` `server_uid=<UID>` `server_gid=<GID>` | `FIFO_DIR=<full path>` `SERVER_UID=<UID>` `SERVER_GID=<GID>` | Directory and owner id for the wesnothd control FIFO file. This is relevant only if you wish to be able to communicate with a local wesnothd instance through a named pipe. You must run wesnothd with the same UID specified at build time for this to work. |
|
||||
| `enable_lto=<boolean>` | `ENABLE_LTO=<boolean>` | Controls using Link Time Optimization. Enabling will result in a smaller, faster executable at the cost of increased time to compile and link. For cmake, use LTO_JOBS=N tells how many threads to use during linking. |
|
||||
|
|
|
@ -50,7 +50,7 @@ Wesnoth can be played on Windows, macOS, and Linux, and can be installed using:
|
|||
* standalone installers on [SourceForge](https://sourceforge.net/projects/wesnoth/files/) (Windows and macOS)
|
||||
* [Flatpak](https://flathub.org/apps/details/org.wesnoth.Wesnoth) (Linux)
|
||||
|
||||
Additionally, Wesnoth is available for [iOS](https://apps.apple.com/us/app/battle-for-wesnoth/id575852062) and [Android](https://sourceforge.net/projects/wesnoth-on-android/files/).
|
||||
Additionally, Wesnoth is available for [iOS](https://apps.apple.com/us/app/battle-for-wesnoth/id575852062) and [Android](https://play.google.com/store/apps/details?id=it.alessandropira.wesnoth114).
|
||||
|
||||
To build the game from source, see [INSTALL](/INSTALL.md) for instructions.
|
||||
|
||||
|
|
14
SConstruct
|
@ -120,7 +120,6 @@ opts.AddVariables(
|
|||
BoolVariable("OS_ENV", "Forward the entire OS environment to scons", False),
|
||||
BoolVariable("history", "Clear to disable GNU history support in lua console", True),
|
||||
BoolVariable('force_color', 'Always produce ANSI-colored output (GNU/Clang only).', False),
|
||||
BoolVariable('compile_db', 'Produce a compile_commands.json file.', False),
|
||||
)
|
||||
|
||||
#
|
||||
|
@ -190,11 +189,6 @@ if env['distcc']:
|
|||
|
||||
if env['ccache']: env.Tool('ccache')
|
||||
|
||||
if env['compile_db']:
|
||||
env.Tool('compilation_db')
|
||||
cdb = env.CompilationDatabase()
|
||||
Alias('cdb', cdb)
|
||||
|
||||
boost_version = "1.67"
|
||||
|
||||
def SortHelpText(a, b):
|
||||
|
@ -232,7 +226,6 @@ You can make the following special build targets:
|
|||
update-po = merge message catalog templates with localized message catalogs for particular lingua
|
||||
update-po4a = update translations of manual and manpages
|
||||
af bg ca ... = linguas for update-po
|
||||
translations = build all translations
|
||||
dist = make distribution tarball as wesnoth.tar.bz2 (*).
|
||||
data-dist = make data tarball as wesnoth-data.tar.bz2 (*).
|
||||
binary-dist = make data tarball as wesnoth-binaries.tar.bz2 (*).
|
||||
|
@ -370,7 +363,7 @@ if env["prereqs"]:
|
|||
|
||||
def have_sdl_other():
|
||||
return \
|
||||
conf.CheckSDL2('2.0.18') & \
|
||||
conf.CheckSDL2('2.0.10') & \
|
||||
conf.CheckSDL2Mixer() & \
|
||||
conf.CheckSDL2Image()
|
||||
|
||||
|
@ -378,14 +371,13 @@ if env["prereqs"]:
|
|||
env["PKG_CONFIG_FLAGS"] = "--dont-define-prefix"
|
||||
|
||||
have_server_prereqs = (\
|
||||
conf.CheckCPlusPlus(gcc_version = "8") & \
|
||||
conf.CheckCPlusPlus(gcc_version = "7") & \
|
||||
conf.CheckBoost("iostreams", require_version = boost_version) & \
|
||||
conf.CheckBoostIostreamsGZip() & \
|
||||
conf.CheckBoostIostreamsBZip2() & \
|
||||
conf.CheckBoost("program_options", require_version = boost_version) & \
|
||||
conf.CheckBoost("random", require_version = boost_version) & \
|
||||
conf.CheckBoost("smart_ptr", header_only = True) & \
|
||||
conf.CheckBoostCharconv() & \
|
||||
CheckAsio(conf) & \
|
||||
conf.CheckBoost("thread") & \
|
||||
conf.CheckBoost("locale") & \
|
||||
|
@ -672,7 +664,7 @@ for env in [test_env, client_env, env]:
|
|||
env[d] = os.path.join(env["prefix"], env[d])
|
||||
|
||||
if env["PLATFORM"] == 'win32':
|
||||
env.Append(LIBS = ["wsock32", "crypt32", "iconv", "z", "shlwapi", "winmm", "ole32", "uuid"], CCFLAGS = ["-mthreads"], LINKFLAGS = ["-mthreads"], CPPDEFINES = ["_WIN32_WINNT=0x0A00"])
|
||||
env.Append(LIBS = ["wsock32", "crypt32", "iconv", "z", "shlwapi", "winmm", "ole32", "uuid"], CCFLAGS = ["-mthreads"], LINKFLAGS = ["-mthreads"], CPPDEFINES = ["_WIN32_WINNT=0x0601"])
|
||||
|
||||
if env["PLATFORM"] == 'darwin': # Mac OS X
|
||||
env.Append(FRAMEWORKS = "Cocoa") # Cocoa GUI
|
||||
|
|
127
add_source_file
|
@ -81,7 +81,7 @@ code_blocks_target_translations = {
|
|||
# XCode #
|
||||
#=======#
|
||||
|
||||
def modify_xcode(filename, targets, remove):
|
||||
def add_to_xcode(filename, targets):
|
||||
"""Add the given file to the specified targets.
|
||||
"""
|
||||
projectfile = rootdir.joinpath(
|
||||
|
@ -103,47 +103,36 @@ def modify_xcode(filename, targets, remove):
|
|||
f"Could not find target '{tname}' in Xcode project file")
|
||||
|
||||
# groups are organized by directory structure under "src"
|
||||
# except for tests, which have a separate root, "tests"
|
||||
if pathlib.Path("tests") in filename.parents:
|
||||
src_groups = project.get_groups_by_name("tests")
|
||||
else:
|
||||
src_groups = project.get_groups_by_name("src")
|
||||
src_groups = project.get_groups_by_name("src")
|
||||
if len(src_groups) != 1:
|
||||
raise Exception("problem finding 'src' group in xcode project")
|
||||
src_group = src_groups[0]
|
||||
parent_group = src_group
|
||||
for d in filename.parts[:-1]:
|
||||
if d == "tests":
|
||||
continue
|
||||
found_groups = project.get_groups_by_name(d, parent=parent_group)
|
||||
if len(found_groups) != 1:
|
||||
groupname = parent_group.get_name()
|
||||
raise Exception(f"problem finding '{d}' group in '{groupname}'")
|
||||
parent_group = found_groups[0]
|
||||
|
||||
if remove :
|
||||
# Remove from all targets if we want to remove
|
||||
for file in project.get_files_by_name(filename.name, parent=parent_group):
|
||||
project.remove_file_by_id(file.get_id())
|
||||
else:
|
||||
# if the group already has an entry with the same filename, loudly skip.
|
||||
# note: this doesn't allow adding to targets one at a time.
|
||||
# a new file should be added to all targets at once...
|
||||
# or maybe targets could be checked somehow,
|
||||
# or maybe the file could simply be completely removed and readded.
|
||||
if project.get_files_by_name(filename.name, parent=parent_group):
|
||||
print(" '"+filename.name+"' already found in Xcode project '"+",".join(translated_targets)+"', skipping")
|
||||
return
|
||||
# if the group already has an entry with the same filename, loudly skip.
|
||||
# note: this doesn't allow adding to targets one at a time.
|
||||
# a new file should be added to all targets at once...
|
||||
# or maybe targets could be checked somehow,
|
||||
# or maybe the file could simply be completely removed and readded.
|
||||
if project.get_files_by_name(filename.name, parent=parent_group):
|
||||
print(" '"+filename.name+"' already found in Xcode project '"+",".join(translated_targets)+"', skipping")
|
||||
return
|
||||
|
||||
# force is True here because otherwise a duplicate filename in
|
||||
# a different place will block addition of the new file.
|
||||
# the rest is just to match existing project file structure.
|
||||
project.add_file(filename.name,
|
||||
force=True,
|
||||
tree="<group>",
|
||||
parent=parent_group,
|
||||
target_name=translated_targets,
|
||||
)
|
||||
# force is True here because otherwise a duplicate filename in
|
||||
# a different place will block addition of the new file.
|
||||
# the rest is just to match existing project file structure.
|
||||
project.add_file(filename.name,
|
||||
force=True,
|
||||
tree="<group>",
|
||||
parent=parent_group,
|
||||
target_name=translated_targets,
|
||||
)
|
||||
|
||||
# that's done, save the file
|
||||
project.save()
|
||||
|
@ -153,7 +142,7 @@ def modify_xcode(filename, targets, remove):
|
|||
# source_lists #
|
||||
#==============#
|
||||
|
||||
def modify_source_list(filename, source_list, remove):
|
||||
def add_to_source_list(filename, source_list):
|
||||
source_list_file = rootdir.joinpath("source_lists", source_list)
|
||||
sl_lines = open(source_list_file).readlines()
|
||||
file_line = filename.as_posix() + '\n'
|
||||
|
@ -162,16 +151,12 @@ def modify_source_list(filename, source_list, remove):
|
|||
if filename.suffix != ".cpp":
|
||||
return
|
||||
|
||||
if remove:
|
||||
if file_line in sl_lines: sl_lines.remove(file_line)
|
||||
else:
|
||||
# if the target already has an entry with the same filename, loudly skip
|
||||
if file_line in sl_lines:
|
||||
print(f" '{filename}' already found in '{source_list}', skipping")
|
||||
return
|
||||
|
||||
sl_lines.append(file_line)
|
||||
# if the target already has an entry with the same filename, loudly skip
|
||||
if file_line in sl_lines:
|
||||
print(f" '{filename}' already found in '{source_list}', skipping")
|
||||
return
|
||||
|
||||
sl_lines.append(file_line)
|
||||
sl_lines.sort()
|
||||
open(source_list_file, 'w').writelines(sl_lines)
|
||||
|
||||
|
@ -179,18 +164,13 @@ def add_to_source_lists(filename, targets):
|
|||
translated_targets = [source_list_target_translations[t] for t in targets]
|
||||
print(" source_list targets:", translated_targets)
|
||||
for t in translated_targets:
|
||||
modify_source_list(filename, t, False)
|
||||
|
||||
def remove_from_source_lists(filename):
|
||||
# remove from all tagerts if -r was specified.
|
||||
for t in source_list_target_translations.values():
|
||||
modify_source_list(filename, t, True)
|
||||
add_to_source_list(filename, t)
|
||||
|
||||
#==============#
|
||||
# Code::Blocks #
|
||||
#==============#
|
||||
|
||||
def modify_code_blocks_target(filename, target, remove):
|
||||
def add_to_code_blocks_target(filename, target):
|
||||
cbp_file = rootdir.joinpath(
|
||||
"projectfiles",
|
||||
"CodeBlocks",
|
||||
|
@ -204,33 +184,30 @@ def modify_code_blocks_target(filename, target, remove):
|
|||
|
||||
elem = f"\t\t<Unit filename=\"{filename_for_cbp}\" />\n"
|
||||
|
||||
if remove:
|
||||
if elem in cbp_lines: cbp_lines.remove(elem)
|
||||
else:
|
||||
# if the target already has an entry with the same filename, loudly skip
|
||||
if elem in cbp_lines:
|
||||
print(f" '{filename}' already found in '{target}.cbp', skipping")
|
||||
return
|
||||
# if the target already has an entry with the same filename, loudly skip
|
||||
if elem in cbp_lines:
|
||||
print(f" '{filename}' already found in '{target}.cbp', skipping")
|
||||
return
|
||||
|
||||
# find an appropriate line to add before/after
|
||||
index = 0
|
||||
for line in cbp_lines:
|
||||
if line.startswith("\t\t<Unit "):
|
||||
if elem < line:
|
||||
break
|
||||
elif line.startswith("\t\t<Extensions>"):
|
||||
# we must be the last entry, as this comes after the Unit section
|
||||
# find an appropriate line to add before/after
|
||||
index = 0
|
||||
for line in cbp_lines:
|
||||
if line.startswith("\t\t<Unit "):
|
||||
if elem < line:
|
||||
break
|
||||
index += 1
|
||||
cbp_lines.insert(index, elem)
|
||||
elif line.startswith("\t\t<Extensions>"):
|
||||
# we must be the last entry, as this comes after the Unit section
|
||||
break
|
||||
index += 1
|
||||
cbp_lines.insert(index, elem)
|
||||
|
||||
open(cbp_file, 'w').writelines(cbp_lines)
|
||||
|
||||
def modify_code_blocks(filename, targets, remove):
|
||||
translated_targets = code_blocks_target_translations.values() if remove else [code_blocks_target_translations[t] for t in targets]
|
||||
def add_to_code_blocks(filename, targets):
|
||||
translated_targets = [code_blocks_target_translations[t] for t in targets]
|
||||
print(" code::blocks targets:", translated_targets)
|
||||
for t in translated_targets:
|
||||
modify_code_blocks_target(filename, t, remove)
|
||||
add_to_code_blocks_target(filename, t)
|
||||
|
||||
def sanity_check_existing_cpp_hpp(filenames):
|
||||
"""
|
||||
|
@ -302,8 +279,6 @@ if __name__ == "__main__":
|
|||
help="which build targets to add the file to")
|
||||
ap.add_argument("--no-checks", action="store_true",
|
||||
help="do not check whether the files exist, etc")
|
||||
ap.add_argument("-r", "--remove", action="store_true",
|
||||
help="remove the specified files from projectfiles instead of adding them, --target is then ignored")
|
||||
# By default, recognise --help too
|
||||
options = ap.parse_args()
|
||||
|
||||
|
@ -320,13 +295,7 @@ if __name__ == "__main__":
|
|||
sanity_check_existing_cpp_hpp(filenames)
|
||||
|
||||
for filename in filenames:
|
||||
if options.remove:
|
||||
print(f"removing '{filename}' from all targets")
|
||||
modify_xcode(filename, options.target, True)
|
||||
remove_from_source_lists(filename)
|
||||
modify_code_blocks(filename, options.target, True)
|
||||
else:
|
||||
print(f"adding '{filename}' to targets: {options.target}")
|
||||
modify_xcode(filename, options.target, False)
|
||||
add_to_source_lists(filename, options.target)
|
||||
modify_code_blocks(filename, options.target, False)
|
||||
print(f"adding '{filename}' to targets: {options.target}")
|
||||
add_to_xcode(filename, options.target)
|
||||
add_to_source_lists(filename, options.target)
|
||||
add_to_code_blocks(filename, options.target)
|
||||
|
|
Before Width: | Height: | Size: 428 B After Width: | Height: | Size: 292 B |
Before Width: | Height: | Size: 2.9 KiB After Width: | Height: | Size: 2.8 KiB |
Before Width: | Height: | Size: 58 KiB After Width: | Height: | Size: 58 KiB |
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 799 B After Width: | Height: | Size: 678 B |
Before Width: | Height: | Size: 5.8 KiB After Width: | Height: | Size: 5.6 KiB |
Before Width: | Height: | Size: 6.3 KiB After Width: | Height: | Size: 6.2 KiB |
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 13 KiB |
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 13 KiB |
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 1.8 KiB |
Before Width: | Height: | Size: 50 KiB After Width: | Height: | Size: 49 KiB |
Before Width: | Height: | Size: 32 KiB After Width: | Height: | Size: 32 KiB |
Before Width: | Height: | Size: 160 KiB After Width: | Height: | Size: 160 KiB |
Before Width: | Height: | Size: 94 KiB After Width: | Height: | Size: 94 KiB |
BIN
attic/perrin.png
Before Width: | Height: | Size: 164 KiB After Width: | Height: | Size: 164 KiB |
Before Width: | Height: | Size: 214 KiB After Width: | Height: | Size: 214 KiB |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 33 KiB After Width: | Height: | Size: 33 KiB |
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 2 KiB |
Before Width: | Height: | Size: 8.5 KiB After Width: | Height: | Size: 8.3 KiB |
Before Width: | Height: | Size: 2.3 KiB After Width: | Height: | Size: 2.2 KiB |
Before Width: | Height: | Size: 9.1 KiB After Width: | Height: | Size: 8.9 KiB |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1 KiB |
Before Width: | Height: | Size: 3.6 KiB After Width: | Height: | Size: 3.5 KiB |
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 6.4 KiB After Width: | Height: | Size: 6.3 KiB |
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 1.6 KiB |
Before Width: | Height: | Size: 7.2 KiB After Width: | Height: | Size: 7 KiB |
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 5.3 KiB After Width: | Height: | Size: 5.1 KiB |
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 5.7 KiB After Width: | Height: | Size: 5.6 KiB |
Before Width: | Height: | Size: 815 B After Width: | Height: | Size: 677 B |
Before Width: | Height: | Size: 2.4 KiB After Width: | Height: | Size: 2.3 KiB |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1,014 B |
Before Width: | Height: | Size: 4.4 KiB After Width: | Height: | Size: 4.3 KiB |
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 4.5 KiB After Width: | Height: | Size: 4.4 KiB |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1 KiB |
Before Width: | Height: | Size: 3.6 KiB After Width: | Height: | Size: 3.5 KiB |
Before Width: | Height: | Size: 815 B After Width: | Height: | Size: 677 B |
Before Width: | Height: | Size: 2.4 KiB After Width: | Height: | Size: 2.3 KiB |
Before Width: | Height: | Size: 655 B After Width: | Height: | Size: 517 B |
Before Width: | Height: | Size: 646 B After Width: | Height: | Size: 508 B |
Before Width: | Height: | Size: 914 B After Width: | Height: | Size: 776 B |
Before Width: | Height: | Size: 953 B After Width: | Height: | Size: 815 B |
Before Width: | Height: | Size: 464 B After Width: | Height: | Size: 326 B |
Before Width: | Height: | Size: 973 B After Width: | Height: | Size: 835 B |
Before Width: | Height: | Size: 544 B After Width: | Height: | Size: 406 B |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 953 B |
Before Width: | Height: | Size: 388 B After Width: | Height: | Size: 250 B |
Before Width: | Height: | Size: 673 B After Width: | Height: | Size: 535 B |
Before Width: | Height: | Size: 882 B After Width: | Height: | Size: 744 B |
Before Width: | Height: | Size: 882 B After Width: | Height: | Size: 744 B |
Before Width: | Height: | Size: 3.2 KiB After Width: | Height: | Size: 3 KiB |
Before Width: | Height: | Size: 890 B After Width: | Height: | Size: 752 B |
Before Width: | Height: | Size: 3.4 KiB After Width: | Height: | Size: 3.3 KiB |
Before Width: | Height: | Size: 587 B After Width: | Height: | Size: 449 B |
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 2 KiB |
Before Width: | Height: | Size: 584 B After Width: | Height: | Size: 446 B |
Before Width: | Height: | Size: 2.3 KiB After Width: | Height: | Size: 2.2 KiB |
Before Width: | Height: | Size: 990 B After Width: | Height: | Size: 852 B |
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 2.4 KiB |
Before Width: | Height: | Size: 1 KiB After Width: | Height: | Size: 901 B |
Before Width: | Height: | Size: 2.4 KiB After Width: | Height: | Size: 2.3 KiB |
Before Width: | Height: | Size: 245 B After Width: | Height: | Size: 107 B |
Before Width: | Height: | Size: 251 B After Width: | Height: | Size: 113 B |
Before Width: | Height: | Size: 256 B After Width: | Height: | Size: 118 B |
Before Width: | Height: | Size: 293 B After Width: | Height: | Size: 208 B |
Before Width: | Height: | Size: 261 B After Width: | Height: | Size: 123 B |
Before Width: | Height: | Size: 291 B After Width: | Height: | Size: 206 B |
Before Width: | Height: | Size: 269 B After Width: | Height: | Size: 131 B |
Before Width: | Height: | Size: 254 B After Width: | Height: | Size: 116 B |
Before Width: | Height: | Size: 258 B After Width: | Height: | Size: 120 B |
Before Width: | Height: | Size: 231 B After Width: | Height: | Size: 93 B |
Before Width: | Height: | Size: 253 B After Width: | Height: | Size: 115 B |
Before Width: | Height: | Size: 229 B After Width: | Height: | Size: 91 B |
Before Width: | Height: | Size: 262 B After Width: | Height: | Size: 124 B |
Before Width: | Height: | Size: 257 B After Width: | Height: | Size: 119 B |
Before Width: | Height: | Size: 331 B After Width: | Height: | Size: 193 B |
Before Width: | Height: | Size: 335 B After Width: | Height: | Size: 197 B |
Before Width: | Height: | Size: 242 B After Width: | Height: | Size: 104 B |
Before Width: | Height: | Size: 246 B After Width: | Height: | Size: 108 B |
Before Width: | Height: | Size: 314 B After Width: | Height: | Size: 176 B |
Before Width: | Height: | Size: 312 B After Width: | Height: | Size: 174 B |
Before Width: | Height: | Size: 250 B After Width: | Height: | Size: 112 B |