Compare commits

..

190 Commits

Author SHA1 Message Date
kuutekitty 625a0ec5ec add kuutekitty to donations.md (#89712) 2026-11-22 12:57:25 -08:00
Maya Granade 6b79ead016 JSON linter gh-pages file update (#87466)
Co-authored-by: harakka <2456481+harakka@users.noreply.github.com>
2026-08-06 10:55:40 -07:00
ergolyam f2504649e9 [+] add flathub download link (#87667) 2026-06-20 09:20:34 -07:00
Maya Granade b4326d972d Update head.html 2026-06-03 12:51:48 -07:00
gettingusedto 2f23974f81 Update donations.md (#83821) 2025-11-19 18:31:05 -08:00
SittingDucken 26c4be927a Initial twison build. (#81587) 2025-07-28 21:58:31 -07:00
Kevin Granade 87baa3cc79 Add link to reactivated subreddit 2025-07-16 15:35:37 -07:00
Kevin Granade 189354b8e9 Remove release enumeration from releases page
This was exceeding the GitHub "list releases" API limit of 10,000 release entries and causing the page rebuild to fail.
2025-04-03 10:14:11 -07:00
Kevin Granade 345c1c0d27 Remove enumeration of releases from experimental releases page
This was exceeding the "list releases" API limit of 10,000 release entries and failing to build the page.
2025-04-03 10:00:33 -07:00
Kevin Granade c98ee8dbef Remove outdated comment about msvc builds 2025-03-17 10:46:45 -07:00
Kevin Granade 6b2ab31824 JSON linter gh-pages file update (#78086)
Co-authored-by: kevingranade <kevingranade@users.noreply.github.com>
2024-12-19 08:43:58 -08:00
Kevin Granade 31ad94a1ee add crosslink to project organization doc 2024-11-23 00:44:18 -08:00
Kevin Granade 33f71fa042 Update org.flathub.VerifiedApps.txt 2024-11-04 18:45:11 -08:00
Kevin Granade 8e35b4dd35 include the .well-known folder
For flathub verification
2024-11-04 18:18:19 -08:00
Kevin Granade 47de02a172 Create org.flathub.VerifiedApps.txt for app verification 2024-11-04 14:18:01 -08:00
Kevin Granade 256f1a99de JSON linter gh-pages file update (#71354)
Co-authored-by: Maleclypse <Maleclypse@users.noreply.github.com>
2024-03-14 15:18:48 -07:00
Antti Riikonen 1361276e1a Remove mention of lemmy (#72097)
Remove Lemmy mention
2024-03-04 11:03:01 -08:00
Kevin Granade 54a996a989 JSON linter gh-pages file update (#68707)
Co-authored-by: Maleclypse <Maleclypse@users.noreply.github.com>
2023-11-04 14:29:37 -07:00
Zhilkin Serg d13493e7fe Privacy policy update (#69039)
* Privay policy update

* add header

---------

Co-authored-by: I-am-Erk <45136638+I-am-Erk@users.noreply.github.com>
2023-10-31 12:08:03 -07:00
Kevin Granade d1f3bd9938 JSON linter gh-pages file update (#67630)
Co-authored-by: Maleclypse <Maleclypse@users.noreply.github.com>
2023-08-27 18:26:06 -07:00
Dillon Matchett cb164a8236 Added Community Discord To Website (#67428)
* Added Community Discord

* fixed steam link
2023-08-03 23:07:33 -07:00
Dillon Matchett 88a9b6ce7b Updated index removed all developer facing pages (#66475) 2023-06-27 08:12:54 -07:00
Antti Riikonen 97b6d7e4cf Update hhg url (#64549) 2023-05-06 09:53:13 -07:00
taatu cf3250e11b fix broken anchor references (#64814) 2023-04-05 17:51:41 -07:00
I-am-Erk d1cf4fcf61 Create steam_faq.md (#64439)
* Create steam_faq.md

* Update steam_faq.md

* Update steam_faq.md

* Update index.md

* Update index.md

* Update steam_faq.md

Co-authored-by: andrei <68240139+andrei8l@users.noreply.github.com>

* Update steam_faq.md

---------

Co-authored-by: andrei <68240139+andrei8l@users.noreply.github.com>
2023-03-21 13:13:17 -07:00
Antti Riikonen afd99f6ec0 Remove Bountysource and Chezzo links, move hhg up (#64020) 2023-03-06 23:27:49 -08:00
Kevin Granade fcfe75b906 Merge pull request #63703 from John-Candlebury/gh-pages-donationlink
Add my Patreon to the donations page
2023-02-22 10:49:38 -08:00
John Candlebury 17d955042f Add my info to the donations page 2023-02-20 17:40:40 -06:00
NetSysFire 1a72165a2c Hint about other files on the lore page (#60899) 2023-01-12 07:14:46 -08:00
Kevin Granade 834754b3a3 Merge pull request #62080 from irwiss/explain-msvc
Provide hint for msvc build tag on downloads page
2022-12-23 21:01:47 -08:00
Alexey Kim 160bd243a6 Provide hint for msvc build tag 2022-11-04 20:26:18 +02:00
NetSysFire ba6c7353d9 Some typo and grammar fixes (#57880) 2022-07-03 19:03:44 -07:00
Kevin Granade 90c1b7b5c1 Prune the defunct game launcher from the front page 2022-04-03 15:49:14 -07:00
NetSysFire b83267d257 Update IRC stuff (#55439) 2022-03-08 09:52:47 -08:00
I-am-Erk c9915d2b0b Design doc updates (#54074)
* in progress changes to lore docs

* adjust gameplay doc a bit

* touch up background document
2022-01-05 16:42:02 -08:00
I-am-Erk bb38735679 split up the design doc 2022-01-05 10:19:36 -08:00
Kevin Granade 1f2ba5df16 tpyo 2022-01-04 11:32:52 -08:00
Zhilkin Serg 04850d017f Create privacy.md (#52607) 2021-11-02 14:34:22 -07:00
I-am-Erk ac04d717af Update lore-factions.md 2021-10-28 11:26:23 -07:00
I-am-Erk ddbb41e71a Update lore-factions.md 2021-10-28 11:24:32 -07:00
I-am-Erk 856e285427 Update technology.md 2021-10-28 11:14:19 -07:00
I-am-Erk 3d0816a284 Update technology.md 2021-10-28 10:17:53 -07:00
I-am-Erk c1d8ec0cd2 Update design-doc.md 2021-10-28 10:05:29 -07:00
I-am-Erk dc817bf2b9 format fixes 2021-10-28 09:54:49 -07:00
I-am-Erk 9452acb749 Update lore-factions.md 2021-10-28 09:51:05 -07:00
I-am-Erk c850ae3aea Update lore-factions.md 2021-10-28 09:49:13 -07:00
I-am-Erk 7e43f1bfbf Update lore-factions.md 2021-10-28 09:45:56 -07:00
I-am-Erk d0f8c7c6a9 Update lore-factions.md 2021-10-28 09:19:40 -07:00
I-am-Erk 1e3420aa8f Update lore-factions.md 2021-10-28 09:08:13 -07:00
I-am-Erk 62185ef48b Update lore-factions.md 2021-10-28 09:06:25 -07:00
Kevin Granade e851085b9b correcting some misleading phrasing 2021-10-28 08:55:44 -07:00
I-am-Erk 748a5ed5b5 Update design-balance.md 2021-10-27 15:17:26 -07:00
I-am-Erk 4b62a06af9 Update design-balance.md 2021-10-27 15:16:31 -07:00
I-am-Erk f191347e05 Update design-balance.md 2021-10-27 15:10:54 -07:00
I-am-Erk a195028061 Update design-balance.md 2021-10-27 15:01:57 -07:00
I-am-Erk 72ccb94cba Update design-balance.md 2021-10-27 14:47:28 -07:00
I-am-Erk 53541e8e38 Update design-balance.md 2021-10-27 13:54:23 -07:00
I-am-Erk 40d1691b40 Update design-balance.md 2021-10-27 12:31:26 -07:00
I-am-Erk d38c685772 add design-balance
based on kevingranade balance draft, expanded
2021-10-27 12:29:29 -07:00
I-am-Erk b56181e59f Update lore-factions.md 2021-10-27 11:36:51 -07:00
I-am-Erk 8496a93690 Update lore-factions.md 2021-10-27 10:55:37 -07:00
I-am-Erk 3984f0197f Update design-doc.md 2021-10-27 10:30:34 -07:00
I-am-Erk 73827b40c8 Update lore-factions.md 2021-10-27 10:25:55 -07:00
I-am-Erk 42e34087fc Update lore-factions.md 2021-10-26 15:58:42 -07:00
I-am-Erk 7292ac7b92 Update lore-factions.md 2021-10-26 13:09:15 -07:00
I-am-Erk 931236ec82 Update lore-factions.md 2021-10-26 13:03:07 -07:00
I-am-Erk d25a043958 Update lore-factions.md 2021-10-26 13:02:47 -07:00
I-am-Erk 8c2f5c109a add lore-factions.md
Not too much new info here yet.
2021-10-26 12:53:14 -07:00
I-am-Erk f2834c0079 remove factions from design doc main 2021-10-26 12:52:45 -07:00
Kevin Granade 487a686c9a Remove lore note we haven't been following 2021-09-24 10:32:33 -07:00
Alexey Mostovoy 5f8eb8d704 Small tweaks to gh-pages service files (#51469)
* Update .gitignore

Include the directory and file name used to serve the site locally

* Update _config.yml

Deprecated `gems`: `plugins` config key is a replacement for `gems`

* Update .gitignore and sync with master
2021-09-13 15:49:59 -07:00
Alexey Mostovoy 8ee5a039d9 Add showcase image (Ultica tileset) (#51468)
Add showcase image to home page
https://github.com/I-am-Erk/CDDA-Tilesets
2021-09-13 15:49:23 -07:00
I-am-Erk 6f62316525 Update design-doc.md
wip
2021-09-10 12:42:00 -07:00
I-am-Erk e86adb7b4a Update technology.md 2021-09-10 12:41:37 -07:00
casswedson bc139be5ac Fix typos in design-doc.md (#49554)
* fix typos
Co-authored-by: actual-nh <74678550+actual-nh@users.noreply.github.com>
2021-07-06 16:54:59 -07:00
halosammy 89606d54f1 Update lore-background.md (#49553)
Capitalization
2021-07-06 11:21:45 -07:00
Zhilkin Serg afaeab92a6 Just wanna rebuild releases page (#49505) 2021-07-01 08:53:34 -07:00
Kevin Granade e2a81e3626 Enhance distinction between first party and third party resources
Also added HHGTTC, and removed reddit as I no longer consider it productive to send users there.
2021-05-28 11:37:56 -07:00
Kevin Granade 80c519df6b Update IRC channel reference to point to Libera 2021-05-26 12:20:00 -07:00
Zhilkin Serg 85b70b1bef Fix missing line break (#48439)
... and also bring OMG release down
2021-04-08 23:23:26 -07:00
Kevin Granade 10c7b24130 Create CNAME 2021-03-21 15:29:35 -07:00
Kevin Granade 725700952e Delete CNAME 2021-03-21 15:29:26 -07:00
Kevin Granade 386d664d2f Update index.md 2020-11-09 13:41:58 -08:00
Kevin Granade d17b905747 Update code style blurb 2020-10-14 19:38:27 -07:00
Kevin Granade f6d198b4fb Clarify build availablility. 2020-10-14 19:33:47 -07:00
gemsys 5e81da6827 Improve grammar and fix typos in the website 2020-10-15 02:27:53 +00:00
I-am-Erk 8c6b82564a Update technology.md 2020-06-01 12:12:12 -07:00
I-am-Erk dd72f62e06 Update technology.md 2020-06-01 12:02:16 -07:00
I-am-Erk 90dd579372 Update technology.md 2020-06-01 11:54:18 -07:00
I-am-Erk c3c77d79ed Update technology.md 2020-06-01 11:53:33 -07:00
I-am-Erk 128d69039e Update technology.md 2020-06-01 11:41:26 -07:00
I-am-Erk 668ca4d4d5 Update lore-background.md 2020-06-01 11:35:46 -07:00
I-am-Erk 33e7dc1b04 Update lore-background.md 2020-06-01 11:22:44 -07:00
I-am-Erk 856b06a9d7 Update lore-background.md 2020-06-01 11:20:12 -07:00
I-am-Erk 6a95b78584 Update lore-background.md 2020-06-01 10:46:47 -07:00
I-am-Erk b5631470ad Remove CBMs, tighten up timeline, add spoiler. 2020-06-01 10:46:37 -07:00
I-am-Erk 757e29b223 Update technology.md 2020-06-01 10:28:58 -07:00
I-am-Erk 6e17b80cd2 Update technology.md 2020-06-01 10:28:45 -07:00
I-am-Erk d9e8b3bb17 add spoiler alerts. 2020-06-01 10:20:34 -07:00
ZhilkinSerg 3889ef8d11 Update CDDA description on homepage (#40945) 2020-05-31 07:10:42 +00:00
I-am-Erk 9d16ab056b Update technology.md 2020-05-29 10:38:03 -07:00
Kevin Granade 339b665712 Remove dead links
The target pages are unfortunately gone now, so no reason to keep them around.
2020-05-21 14:56:36 -07:00
snipercup 71c2f0acf9 Remove snipercup from donations page 2020-05-21 14:48:55 -07:00
Isaac Freund 6c79e7fb41 Trigger rebuild 2020-05-20 16:18:15 +02:00
Isaac Freund 98220d224f Trigger rebuild to remove 0.C download links 2020-05-08 13:49:52 +02:00
Isaac Freund c57923f1a9 Trigger one more rebuild 2020-04-01 14:51:01 +02:00
Isaac Freund 13beb3e0f4 Trigger rebuild 2020-04-01 14:34:46 +02:00
Isaac Freund c5e612a48b Add script for simple local testing with docker 2020-02-21 06:50:23 +00:00
Isaac Freund 14cd8db985 Create packaging status page on website (#37855)
This information was quite hidden at the bottom of the releases page.
2020-02-09 07:58:18 -08:00
Isaac Freund 194c87c271 Merge pull request #37834 from reinerh/gh-pages
Add Debian/Ubuntu install instructions to releases page
2020-02-09 12:02:43 +01:00
Reiner Herrmann d5478c5d26 Add Debian/Ubuntu install instructions to releases page 2020-02-08 14:46:06 +01:00
I-am-Erk ffd16169a8 Update lore-background.md 2020-01-30 17:33:05 -08:00
I-am-Erk 69321de26f Update lore-background.md 2020-01-30 17:27:10 -08:00
snipercup 2608758799 Explain the difference between tiles and curses on release page (#37433)
* Explain the difference between tiles and curses

* Revert "Explain the difference between tiles and curses"

This reverts commit 6f83dcb738.

* Explain the difference between tiles and curses

* Update releases.md

Co-Authored-By: Alexey Mostovoy <1931904+AMurkin@users.noreply.github.com>

* Update releases.md

Co-authored-by: Alexey Mostovoy <1931904+AMurkin@users.noreply.github.com>
2020-01-29 21:39:04 -08:00
Kevin Granade 1d2f7bff6b Fix a typo 2020-01-23 12:32:44 -08:00
Artem Polishchuk b7eb63e481 Add packaging status to Release page (#36143) 2019-12-16 19:20:18 +00:00
I-am-Erk c9efd9e07d Update design-doc.md 2019-11-29 18:11:15 -08:00
I-am-Erk 2fbb555d1f Add a section on mi-go 2019-11-27 22:06:41 -08:00
I-am-Erk d05bb314c6 Add info about mutations 2019-11-15 18:27:54 -08:00
snipercup a8202034ed Add contributor to donations page (#35317) 2019-11-04 18:25:42 -08:00
Curtis Merrill a072ef1ac8 add Donations tab and add extra return (#35149) 2019-10-29 17:36:52 -07:00
Curtis Merrill c779eaa368 Create initial donations page (#35036) 2019-10-27 12:03:25 -07:00
Kevin Granade e252913a04 Add link to discord server 2019-07-13 12:10:45 -07:00
I-am-Erk a7a4b27974 Update technology.md 2019-07-08 14:31:54 -07:00
I-am-Erk db309cab30 Update technology.md 2019-07-08 14:11:05 -07:00
I-am-Erk 44eb59a505 prosthetics 2019-07-08 14:07:14 -07:00
I-am-Erk dedf57fac0 Update technology.md 2019-07-08 13:44:05 -07:00
I-am-Erk e398f9bafd Comment on dimensions 2019-07-08 13:33:40 -07:00
I-am-Erk 979b06b3d7 Update technology.md 2019-07-08 13:18:52 -07:00
I-am-Erk 764717a692 add links to technology doc that were missed. 2019-07-08 13:16:56 -07:00
Kevin Granade 955ddf5a68 Remove a link to a compromised page 2019-07-07 15:10:40 -07:00
I-am-Erk c11694c8f5 Continue technology.md 2019-05-22 11:38:22 -07:00
I-am-Erk 71c137cb7b Create technology.md 2019-05-22 11:18:00 -07:00
I-am-Erk 236a8eaf2b Alien fuel cells, not alien robots 2019-05-22 09:21:00 -07:00
I-am-Erk 11584605aa More power cell stuff 2019-05-22 08:47:12 -07:00
I-am-Erk 7ba6ddd36c Update lore-background.md 2019-05-22 08:34:23 -07:00
Kevin Granade 1919ec2d1f More mutation notes 2019-05-14 20:18:59 -07:00
Kevin Granade 4e0431a322 Notes about clothes bionics and mutagen 2019-05-14 18:13:18 -07:00
I-am-Erk 32dfe1835c hyperlink 2019-05-14 16:01:17 -07:00
I-am-Erk 39c70d5215 Update design-doc.md 2019-05-14 13:59:59 -07:00
I-am-Erk 53f46d6cbc Expand timeline of Year 0 2019-05-11 22:35:10 -07:00
I-am-Erk cac6b77701 Create a file for the timeline and background info
It's too crowded in the main design doc.
2019-05-11 13:06:46 -07:00
I-am-Erk 10a53e345e Remove timeline from master design doc
It's crowded in there.
2019-05-11 13:06:20 -07:00
Isaac Freund 858cb2c70c Merge pull request #30407 from AMurkin/patch-1
Design Document - minor style change
2019-05-11 12:54:08 +02:00
Alexey Mostovoy 55917f29ee Update design-doc.md 2019-05-11 14:11:39 +04:00
Isaac Freund 8e298bf3c8 Fix build list on experimental page
Trying to display all releases seems to cause issues with only ~15 loading, so make a counter
and only display the most recent 10 releases for which at least one artifact was generated
2019-05-10 11:21:45 +02:00
Isaac Freund 2cd7f3b231 Add experimental builds page
- Edit build descriptions and links on Home and Releases pages
 - Only list experimental builds that were successful (have artifacts)
2019-05-02 15:21:48 -07:00
Isaac Freund df8b9c496b Hide changes page in header
- The changes page currently is blank, as the github-metadat api doesn't seem to give us access
   to the pull requests or commits and I haven't found a way around this yet.
2019-05-02 23:15:38 +02:00
Isaac Freund 26ed97b25e Remove prerelease builds from releases page 2019-05-02 23:09:51 +02:00
Isaac Freund 89b144fe69 Fix typo 2019-05-02 22:53:25 +02:00
Kevin Granade 7a090660f0 Added note about factions. 2019-05-01 21:04:25 -07:00
Kevin Granade 1b864a9a90 Moved overview sections to top 2019-05-01 20:31:45 -07:00
Kevin Granade f302db99fd Added more notes about vehicles 2019-05-01 20:09:19 -07:00
Kevin Granade aa71c25eee Add note about structures 2019-05-01 19:20:52 -07:00
Kevin Granade 8ddb42e3b7 add some notes about scavenging and crafting 2019-05-01 17:45:35 -07:00
Isaac Freund 3d3b660f35 Add download links to release list
- tweak formatting
 - add version tags
2019-04-21 18:53:40 +02:00
Isaac Freund b648d80e52 Merge pull request #29795 from KorGgenT/gh-pages-update
Gh pages update
2019-04-21 18:19:38 +02:00
Isaac Freund aa744bfc9d Use github-metadata api for links and release name 2019-04-21 18:17:24 +02:00
KorGgenT 157c2f3ebc update releases page
before it recommended experimental, which we do not necessarily want to encourage.
2019-04-21 11:20:56 -04:00
KorGgenT 0277830d44 Update .gitignore
add the .gitignore from master to this gitignore
2019-04-21 11:12:33 -04:00
Isaac Freund 4478b07e9c Add GitHub link to header
- correct github reference on contributions page
2019-04-18 02:12:14 +02:00
Isaac Freund 9fbd2684e8 Fix table of contents formatting 2019-04-18 01:35:51 +02:00
Isaac Freund ad69d1bbbe Clean up header
- Hardcode and reword links in header
 - Standardize urls
 - Fix minor formatting erro on contributions page
2019-04-18 01:28:51 +02:00
I-am-Erk c83d72ee59 Add Timeline (incomplete) 2019-04-04 21:34:06 -07:00
Isaac Freund 079f0e3cbc Standardize spelling and fix minor formatting errors 2019-04-05 05:02:26 +02:00
Kevin Granade 6d26f077ca Update header 2019-04-04 18:22:25 -07:00
Kevin Granade 884582f056 Drop the design doc draft 2019-04-04 18:19:20 -07:00
Kevin Granade dc01a8cb0b Added link to Android build. 2019-03-22 06:56:06 +00:00
Kevin Granade 843e548735 update wiki link
Fixes #28848
2019-03-20 21:53:17 -07:00
Kevin Granade 3f8605b480 rebuild pages 2019-03-08 08:00:43 +00:00
Kevin Granade fb5597ecc2 remove adsense stub. 2019-01-01 11:53:22 -06:00
Kevin Granade c0f9e865bd Add addsense resources 2018-12-29 20:49:36 -06:00
Kevin Granade c406d589a4 Revert head.html version to minima 2.0 2018-12-29 20:47:40 -06:00
Kevin Granade 2ca266e1f2 Import head.html from minima to override it 2018-12-29 20:38:32 -06:00
Kevin Granade 0ed563b102 Remove discord link.
Removing due to poor moderation practices.
2018-11-12 11:27:23 -08:00
Kevin Granade 114c25454b De-emphisize the sentence transitioning to releases. 2018-05-24 10:32:31 -07:00
Kevin Granade eedabd57c2 Add download links for latest builds to releases page.
This seems like a point of confusion, and encourages people to seek out 0.C instead of playing the latest experimental, which is a tragedy.
2018-05-24 10:30:43 -07:00
Kevin Granade 07b6f36115 Update links to use https where possible, including migrating urls to discourse site. (#23053) 2018-02-25 11:49:15 -08:00
Leland Clemmons f87bf17412 Move Linux downloads links to 64bit versions
We're not building 32 bit ones anymore
2018-01-31 20:07:47 -08:00
Kevin Granade 877552c3a4 Add FAQ entry for bountysource.
Addresses #22385
2018-01-03 11:58:19 -06:00
Kevin Granade 07fcf7d196 Point forums link at new discourse site. 2017-11-15 13:26:30 -08:00
Kevin Granade dff69f7269 Moved community resources higher on page. 2017-09-28 02:46:15 +00:00
Kevin Granade 9654131119 Create CNAME 2017-09-24 18:03:23 +00:00
Kevin Granade ff4619146e Add changes page. 2017-06-08 06:44:29 +00:00
Miguel Melon Otero 0e366475a3 Corriged typo (#20979) 2017-05-09 11:55:06 -07:00
Kevin Granade b420f16e3c Added link to game launcher. 2017-05-02 10:11:23 -07:00
Kevin Granade 2d50f82c1b Several minor changes to site main page.
Expanded System Requirements section.
Corrected outdated link text.
Added link to issue guidelines page.
2017-05-01 18:02:22 -07:00
Kevin Granade 7e99570f41 Import contribution guide from game source tree. 2017-04-28 06:11:33 +00:00
Kevin Granade 51f537e2fc First draft of GitHub Pages site for Ctaclysm: Dark Days Ahead. 2017-03-22 04:32:21 +00:00
Kevin Granade 6e566bb0dd Remove game content from pages branch. 2017-03-22 04:31:25 +00:00
7760 changed files with 1329 additions and 15350364 deletions
-56
View File
@@ -1,56 +0,0 @@
# These options are mirrored in .astylerc and doc/CODE_STYLE.txt
# "One True Brace Style"
--style=1tbs
# Attach brackets to class and struct inline function definitions.
--attach-inlines
# 4 spaces per indentation level and per tab stop
--indent=spaces=4
# 'char *foo' instead of 'char* foo'
--align-pointer=name
# maximum length for a single unbroken line
--max-code-length=100
# 'foo ||\nbar' instead of 'foo\n|| bar'
--break-after-logical
# indent 'public:' 'protected:' 'private:' deeper than 'class' or 'struct'
--indent-classes
# indent 'case' lines deeper than 'switch'
--indent-switches
# indent later lines of multi-line preprocessor directives
# to be deprecated by --indent-preproc-define
--indent-preprocessor
# indent comments on column 1 to match the code block they are in
--indent-col1-comments
# indent multi-line control block headers like 'if (foo\nbar)'
--min-conditional-indent=0
# add space around operators with two operands
--pad-oper
# add brackets to unbracketed one line conditional statements
--add-brackets
# replaces tabs with spaces in non-indent sections, except in strings
--convert-tabs
# remove extra space padding around parentheses
--unpad-paren
# insert space padding around parentheses on the inside only
--pad-paren-in
# exclude src/third-party
--exclude=src/third-party
# but don't be sad about no tests/src/third-party
--ignore-exclude-errors-x
-77
View File
@@ -1,77 +0,0 @@
# Enable some categories of checks and then disable individual ones.
# The disabled checks that appear as part of the initial alphabetical section
# enabling categories (e.g. cert-err58-cpp) are ones that do not make sense for
# this codebase and we do not intend to fix. The disabled checks appearing
# thereafter in a separate alphabetical list have yet to be triaged. We may
# fix their errors or recategorise them as checks we don't care about.
#
# Comments on the checks we have decided are not worthwhile:
#
# * cert-dcl21-cpp (postfix operator++ and operator-- should return const objects)
# This is an unconventional code style, and conflicts with
# readability-const-return-type.
#
# * cert-env33-c (calls to system, popen)
# Unlikely to catch bugs, and using system is convenient for portability.
#
# * cert-err58-cpp (exceptions from static variable declarations)
# We have lots of memory allocations in static variable declarations, and
# that's fine.
#
# * modernize-use-auto
# We prefer an almost-always-avoid-auto style.
#
# * modernize-use-trailing-return-type
# An arbitrary style convention we haven't adopted.
#
# * readability-braces-around-statements
# Covered by astyle and buggy in clang-tidy 8. Can enable once we have a newer
# clang-tidy.
Checks: "\
bugprone-*,\
cata-*,\
cert-*,\
-cert-dcl21-cpp,\
-cert-env33-c,\
-cert-err58-cpp,\
clang-diagnostic-*,\
cppcoreguidelines-slicing,\
google-explicit-constructor,\
llvm-namespace-comment,\
misc-*,\
modernize-*,\
-modernize-use-auto,\
-modernize-use-trailing-return-type,\
performance-*,\
readability-*,\
-readability-braces-around-statements,\
-bugprone-narrowing-conversions,\
-misc-no-recursion,\
-misc-non-private-member-variables-in-classes,\
-modernize-pass-by-value,\
-modernize-return-braced-init-list,\
-modernize-use-default-member-init,\
-modernize-use-nodiscard,\
-readability-convert-member-functions-to-static,\
-readability-else-after-return,\
-readability-function-cognitive-complexity,\
-readability-implicit-bool-conversion,\
-readability-magic-numbers,\
-readability-named-parameter,\
-readability-use-anyofallof,\
"
WarningsAsErrors: '*'
HeaderFilterRegex: '(src|test|tools).*'
FormatStyle: none
CheckOptions:
- key: cata-large-inline-function.MaxStatements
value: 5
- key: cata-text-style.EscapeUnicode
value: 0
- key: cert-oop54-cpp.WarnOnlyIfThisHasSuspiciousField
value: true
- key: readability-uppercase-literal-suffix.NewSuffixes
value: 'L;UL;LL;ULL'
# vim:tw=0
-43
View File
@@ -1,43 +0,0 @@
# options affecting formatting
format:
# how wide to allow formatted cmake files
line_width: 100
# how many spaces to tab for indent
tab_size: 4
# if true, separate flow control names from their parentheses
separate_ctrl_name_with_space: true # currently ignored by cmake-lint
# if true, separate function names from parentheses with a
separate_fn_name_with_space: false # currently ignored by cmake-lint
# if a statement is wrapped to more than one line, than dangle
# the closing parenthesis on its own line.
dangle_parens: false # currently ignored by cmake-lint
# Format command names consistently as 'lower' or 'upper' case
# 'canonical': like in official documentation
command_case: 'canonical' # currently ignored by cmake-lint
# Format keywords consistently as 'lower' or 'upper' case
keyword_case: 'upper' # currently ignored by cmake-lint
# options affecting comment reflow and formatting
markup:
# enable comment markup parsing and reflow
enable_markup: false
# options affecting linter
lint:
# list of lint codes to disable
# C0113: Missing COMMENT in statement which allows it
disabled_codes: ['C0113']
# regular expression pattern describing valid function names
function_pattern: '[a-z_]+'
# regular expression pattern describing valid names for private variables
# WEIRD: strangely named "directory variable name" in lint output
private_var_pattern: '_[0-9A-Z_]+'
# regular expression pattern describing valid names for public variables (strangely named "directories"?)
# WEIRD: strangely named "directory variable name" in lint output
public_var_pattern: '[0-9A-Z]+'
# regular expression pattern describing valid macro names
macro_pattern: '[a-z_]+'
# regular expression pattern describing valid names for function/macro
# arguments and loop variables
argument_var_pattern: '[A-Z][A-Z0-9_]+'
# require no more than this many newlines between statements
max_statement_spacing: 2
-18
View File
@@ -1,18 +0,0 @@
# EditorConfig is awesome: http://EditorConfig.org
# top-most EditorConfig file
root = true
# Unix-style newlines with a newline ending every file
[*]
end_of_line = lf
insert_final_newline = true
indent_style = space
indent_size = 4
[*.json]
end_of_line = lf
insert_final_newline = true
indent_style = space
indent_size = 2
charset = utf-8
-11
View File
@@ -1,11 +0,0 @@
[flake8]
exclude = .git,__pycache__,lang/json
ignore =
# E265 forces comments to have a space after the '#'. We have a bunch of
# optional debugging code commented out this way, and not having a space is
# a convenient way to distinguish it from proper comments. Maybe we should
# delete that code, but unless that happens leaving E265 disabled.
E265,
# W503 and W504 require line breaks after or before binary operators; you
# can only have one enabled
W504
-39
View File
@@ -1,39 +0,0 @@
# Automatically normalize line endings for all files
# detected as text (Convert CRLF => LF).
* text=auto
# Explicitly normalize files with these extensions in
# case Git doesn't detect them as text for some reason.
*.c text
*.cbp text
*.cpp text
*.h text
*.json text
*.md text
*.py text
*.rc text
*.sh text
*.txt text
*.yml text
# Visual Studio project files, leave them alone.
*.cmd -text
*.filters -text
*.sln -text
*.user -text
*.vcxproj -text
# Generated translation text, don't mess with them.
*.mo -text
*.po -text
*.pot -text
# Treat images, archives, and font files as binary.
# (binary is a macro for -text -diff)
*.db binary
*.fon binary
*.gz binary
*.ico binary
*.png binary
*.ttf binary
-31
View File
@@ -1,31 +0,0 @@
#Note that despite github calling these "owners", a better term would be "alerts"
#Everything in the cataclysm repository remains under a creative commons license, nobody owns the mods.
#In fact, the code "owners" designation is meant to encourage third party
#individuals to contribute to the mod, with the curators notified for reviews.
/data/mods/Aftershock/ @Maleclypse @John-Candlebury @Mom-Bun
/data/mods/DinoMod/ @ephemeralstoryteller @damien @LyleSY
/data/mods/Graphical_Overmap/ @Kilvoctu @Larwck
/data/mods/MMA/ @Hymore246
/data/mods/blazemod/ @SouP
/data/mods/classic_zombies/ @I-am-Erk
/data/mods/crt_expansion/ @Soupster89
/data/mods/desertpack/ @davidpwbrown
/data/mods/generic_guns/ @tenmillimaster
/data/mods/Magiclysm/ @KorGgenT
/data/mods/My_Sweet_Cataclysm/ @Fris0uman
/data/mods/ruralbiome/ @I-am-Erk
/data/mods/speedydex/ @KorGgenT
/data/mods/stats_through_kills/ @KorGgenT
/data/mods/Xedra_Evolved/ @Maleclypse
/data/mods/Dark-Skies-Above/ @ephemeralstoryteller
/data/mods/No_Hope/ @Night-Pryanik
/data/mods/innawood/ @Light-Wave
/data/mods/MA/ @ZhilkinSerg
magic*.cpp @KorGgenT
magic*.h @KorGgenT
/tools/ @int-ua
/lang/ @BrettDong
widget.cpp @wapcaplet @dseguin
widget.h @wapcaplet @dseguin
-100
View File
@@ -1,100 +0,0 @@
name: Bug Report 🐛
description: Create a report to help us improve
labels: ["(S1 - Need confirmation)"]
body:
- type: markdown
attributes:
value: |
Please take the time to fill out all the fields below.
- type: textarea
id: description-of-bug
attributes:
label: Describe the bug
description: A clear and concise description of what the bug is.
placeholder: There is no way for aim level to increase.
validations:
required: true
- type: textarea
id: save-file
attributes:
label: Attach save file
description: |
`ESC`Main Menu -> `b`Debug Menu -> `i`Info -> `!`Generate minimized save archive
placeholder: |
Write N/A if not applicable.
- this bug report is unlikely to get resolved without a save file, unless it's trivially
reproducible or the reproduction steps are complete.
validations:
required: true
- type: textarea
id: steps-to-reproduce
attributes:
label: Steps to reproduce
description: Steps to reproduce the behavior.
placeholder: |
1. Make a player with a gun, magazine, and some ammo.
2. Try to aim at a wall.
3. There's no way to increase aim level.
validations:
required: true
- type: textarea
id: expected-behavior
attributes:
label: Expected behavior
description: |
A clear and concise description of what you expected to happen.
Ideally also describe *why* you expect it to happen.
placeholder: I expected that aim level would increase, because all other skills can increase in level.
validations:
required: true
- type: textarea
id: screenshots
attributes:
label: Screenshots
description: |
**If applicable**, add screenshots to help explain your problem.
Do not take a screenshot of the crashing window. Please provide the crash logs in the "Additional context"
validations:
required: false
- type: textarea
id: versions-and-config
attributes:
label: Versions and configuration
description: |
`ESC`Main Menu -> `b`Debug Menu -> `i`Info -> `r`Generate game report
placeholder: |
- OS: [e.g. iOS 8 or Windows 10 or Ubuntu 18.04]
- Game Version: [e.g. 0.C-29938-g90f5268437]
- Graphics version: [Tiles or Terminal]
- Ingame language: [Arabic or Bulgarian or Chinese (Simplified) or Chinese (Traditional) or Dutch or Esperanto or French or German or Italian (Italy) or Japanese or Korean or Polish or Portuguese (Brazil) or Russian or Serbian or Spanish (Argentina) or Spanish (Spain) or Turkish]
- Mods loaded: [e.g. dda, boats, hacktheplanet, StatsThroughSkills]
validations:
required: true
- type: textarea
id: additional-context
attributes:
label: Additional context
description: Add any other context about the problem here.
placeholder: |
Crash: if your problem refers to a crash, please add the following files to the "Additional Context" paragraph:
- From the /config folder (you can zip them both together):
- crash.log file.
- debug.log file.
- Your save file (zipped)
- note #1: you can drag and drop files in this issue post!
- note #2: it is very important for us that you provide a save file in case of a crash. It really helps the developers
to reproduce the bug and fix it. If possible, try to provide a save file that occurs in the right conditions, just
before the crash happens.
validations:
required: false
-11
View File
@@ -1,11 +0,0 @@
blank_issues_enabled: false
contact_links:
- name: Tileset Issues
url: https://github.com/I-am-Erk/CDDA-Tilesets/issues
about: For issues concerning the built-in tilesets.
- name: Github Discussion
url: https://github.com/CleverRaven/Cataclysm-DDA/discussions
about: For nonspecific feature requests, balance concerns, and questions about the game, prefer opening a discussion to an issue.
- name: Project Forums
url: https://discourse.cataclysmdda.org/
about: For even more general discussion with the community, consider posting on the forums.
@@ -1,45 +0,0 @@
name: Feature Request ✨
description: Suggest an idea for this project
labels: ["<Suggestion / Discussion>"]
body:
- type: markdown
attributes:
value: |
Please take the time to fill out all the fields below.
- type: textarea
id: description-of-bug
attributes:
label: Is your feature request related to a problem? Please describe.
description: A clear and concise description of what the problem is that made you submit this report.
placeholder: I am always frustrated, when...
validations:
required: true
- type: textarea
id: description-of-solution
attributes:
label: Solution you would like.
description: A clear and concise description of what you want to happen.
placeholder: Instead of behaving like this, there should be...
validations:
required: true
- type: textarea
id: alternatives
attributes:
label: Describe alternatives you have considered.
description: A clear and concise description of any alternative solutions or features you have considered.
placeholder: Another workaround that would work, is...
validations:
required: false
- type: textarea
id: additional-context
attributes:
label: Additional context
description: Add any other context (such as mock-ups, proof of concepts or screenshots) about the feature request here.
validations:
required: false
-40
View File
@@ -1,40 +0,0 @@
# https://github.com/rytswd/comvent
trigger: specific
# list of users allowed to use these commands, from labeling an issue in
# a specific way to mark as duplicate, closing issues, the sky is the limit
# TODO implement more commands, add more users
users:
active:
- casswedson
- Maleclypse
- Termineitor244
- Faalagorn
- Ilysen
- Aerin-of-the-Toast
- anoobindisguise
- PatrikLundell
- TheShadowFerret
- Jan-Blasiak
- MNG-cataclysm
- mqrause
- andrei8l
- haveric
- MylieDaniels
- nopenoperson
- Inglonias
- GuardianDll
- hexagonrecursion
- ANickelN
- a-chancey
- Cimanyd0
- LyranRenegade
- Stadler76
- sonphantrung
- sadenar
- RenechCDDA
- irwiss
keywords:
- name: confirm-bug
value: '\/(C|c)onfirm.*'
-273
View File
@@ -1,273 +0,0 @@
"[C++]":
- "**/*.cpp"
- "**/*.h"
"[JSON]":
- "**/*.json"
"[Markdown]":
- "**/*.md"
"Game: Achievements / Conducts / Scores":
- "**/scores**"
- "**/**statistics**"
- "**/statistics**"
- "**/**achievement**"
- "**/achievement**"
- "**/**conducts**"
- "**/conducts**"
"[Python]":
- "**/*.py"
"<Documentation>":
- "**/*.md"
- "doc/**"
- "doxygen_doc/**"
"Code: Tooling":
- ".github/**"
- "utilities/**"
- any: ['tools/**', '!tools/spell_checker/dictionary.txt']
"Code: Tests":
- "tests/**"
- "data/mods/TEST_DATA/**"
"Character / World Generation":
- "**/newcharacter**"
- "**/worldfactory**"
"Code: Build":
- "build-data/**"
- "build-scripts/**"
- "**/Makefile"
- "**/CMakeLists.txt"
- "**/*.cmake"
"Code: Infrastructure / Style / Static Analysis":
- .astylerc
- .clang-tidy
- .editorconfig
- .lgtm.yml
"Crafting / Construction / Recipes":
- "**/**crafting**"
- "**/crafting**"
- "**/**recipe**"
- "**/recipe**"
- "**/**construction**"
- "**/construction**"
"EOC: Effects On Condition":
- "**/**effect_on_condition**"
- "**/effect_on_condition**"
- "**/**eocs**"
- "**/eocs**"
- "**/condition**"
"Fields / Furniture / Terrain / Traps":
- "**/**furniture**"
- "**/furniture**"
- "**/**field**"
- "**/field**"
- "**/**terrain**"
- "**/terrain**"
- "**/**trap**"
- "**/trap**"
"Items: Food / Vitamins":
- "**/**food**"
- "**/food**"
- "**/**comestible**"
- "**/comestible**"
"NPC / Factions":
- "**/**npc**"
- "**/npc**"
- "**/**NPC**"
- "**/NPC**"
"Melee":
- "**/**melee**"
- "**/melee**"
- "**/**techniques**"
- "**/techniques**"
"Missions":
- "**/**mission**"
- "**/mission**"
"Info / User Interface":
- "src/**ui**"
- "**/ui/**"
- "**/**widget**"
- "**/widget**"
- "**/**view**"
- "**/view**"
"Items: Archery":
- "**/archery**"
- "**/crossbow**"
"Items: Armor / Clothing":
- "**/**armor**"
- "**/armor**"
- "**/armor/**"
"Items: Battery / UPS":
- "**/**battery**"
- "**/battery**"
"Items: Containers":
- "**/container**"
- "**/**pocket**"
- "**/pocket**"
- "**/**contents**"
- "**/contents**"
"Items: Magazines":
- "**/**magazine**"
- "**/magazine**"
"Appliance/Power Grid":
- "**/**appliance**"
- "**/appliance**"
"Monsters":
- "**/**monsters**"
- "**/monsters**"
"Mutations / Traits / Professions/ Hobbies":
- "**/**profession**"
- "**/profession**"
- "**/**mutations**"
- "**/mutation**"
- "**/hobbies**"
"Lore":
- data/json/npcs/BG_trait_groups.json
- data/json/npcs/Personality_trait_groups.json
- data/json/npcs/personality_traits.json
- "**/**Backgrounds**"
- "**/Backgrounds**"
- "**/**snippets**"
- "**/snippets**"
"Limbs":
- "**/**bodypart**"
- "**/bodypart**"
- "data/json/limb_scores.json"
"Spawn":
- "**/**itemgroup**"
- "**/itemgroup**"
- "**/itemgroups/**"
- "**/**monstergroup**"
- "**/monstergroup**"
- "**/monstergroups/**"
"Bionics":
- "**/bionic**"
- "**/**bionic**"
"Map / Mapgen":
- "**/**mapgen**"
- "**/mapgen**"
- "**/**overmap**"
- "**/overmap**"
"Martial Arts":
- "**/martialart**"
"Player Faction Base / Camp":
- "**/basecamp**"
- "**/faction_camp**"
"Items: Ammo / Guns":
- "**/**gun**"
- "**/gun**"
- "**/**ammo**"
- "**/ammo**"
"Items: Gunmod / Toolmod":
- "**/**gunmod**"
- "**/gunmod**"
- "**/**toolmod**"
- "**/toolmod**"
"SDL: Tiles / Sound":
- "gfx/**"
- "sound/**"
"Scenarios":
- "**/scenario**"
- "**/start_location**"
"Translation":
- "lang/**"
- "**/**translation**"
- "**/translation**"
"Mods: Aftershock":
- data/mods/Aftershock/**/*
- data/mods/aftershock_exoplanet/**/*
"Mods: Dark Days of the Dead":
- data/mods/classic_zombies/**/*
"Mods: Dark Skies":
- data/mods/Dark-Skies-Above/**/*
"Mods: Desert Region":
- data/mods/desert_region/**/*
"Mods: DinoMod":
- data/mods/DinoMod/**/*
"Mods: Generic Guns":
- data/mods/Generic_Guns/**/*
"Mods: MA":
- data/mods/MA/**/*
"Mods: MMA":
- data/mods/MMA/**/*
"Mods: Magiclysm":
- data/mods/Magiclysm/**/*
"Mods: Innawood 🌲":
- data/mods/innawood/**/*
"Mods: No Hope":
- data/mods/No_Hope/**/*
"Mods: TropiCataclysm 🌴":
- data/mods/TropiCataclysm/**/*
"Mods: Tamable Wildlife":
- data/mods/Tamable_Wildlife/**/*
"Mods: Xedra Evolved":
- data/mods/Xedra_Evolved/**/*
"Mods":
- any: [ 'data/mods/**' ]
all: [ '!data/mods/TEST_DATA/**' ]
"Mechanics: Enchantments / Spells":
- "**/**enchantment**"
- "**/enchantment**"
- "**/**spells**"
- "**/spells**"
- "**/Spells/**"
- any: ['**/**spell**', '!tools/**']
"Mechanics: Weather":
- "**/weather**"
"Vehicles":
- "**/**vehicle**"
- "**/vehicle**"
- "src/veh_**"
-46
View File
@@ -1,46 +0,0 @@
<!-- HOW TO USE: Under each "#### Heading" below, enter information relevant to your pull request.
Leave the headings unless they don't apply to your PR.
Please read carefully and don't delete the comments delimited by "< !--" and "-- >"
Once a pull request is submitted, automatic stylistic and consistency checks will be performed on the PR's changes.
The results of these can be either seen under the "Files changed" section of a PR or in the check's details.
NOTE: Please grant permission for repository maintainers to edit your PR. It is EXTREMELY common for PRs to be held up due to trivial changes being requested and the author being unavailable to make them. -->
#### Summary
Category "Brief description"
<!-- This section should consist of exactly one line, edit the one above.
1. Replace the word "Category" with one of these words: Features, Content, Interface, Mods, Balance, Bugfixes, Performance, Infrastructure, Build, I18N.
2. Replace the text inside the quotes with a brief description of your changes.
Or if you don't want a changelog entry, replace the whole line with just the word "None" (with no quotes).
For more on the meaning of each category, see:
https://github.com/CleverRaven/Cataclysm-DDA/blob/master/doc/CHANGELOG_GUIDELINES.md
If approved and merged, your summary will be added to the project changelog:
https://github.com/CleverRaven/Cataclysm-DDA/blob/master/data/changelog.txt -->
#### Purpose of change
<!-- With a few sentences, describe your reasons for making this change. If it relates to an existing issue, you can link it with a # followed by the GitHub issue number, like #1234. If your pull request *fully* resolves an issue, include the word "Fix" or "Fixes" before the issue number, like: Fixes #xxxx
If there is no related issue, explain here what issue, feature, or other concern you are addressing. If this is a bugfix, include steps to reproduce the original bug, so your fix can be verified. -->
#### Describe the solution
<!-- How does the feature work, or how does this fix a bug? The easier you make your solution to understand, the faster it can get merged. -->
#### Describe alternatives you've considered
<!-- Explain any alternative solutions, different approaches, or possibilities you've considered using to solve the same problem. -->
#### Testing
<!-- Describe what steps you took to test that this PR resolved the bug or added the feature, and what tests you performed to make sure it didn't cause any regressions. Also include testing suggestions for reviewers and maintainers. -->
#### Additional context
<!-- Add any other context (such as mock-ups, proof of concepts or screenshots) about the feature or bugfix here. -->
<!--README: Cataclysm: Dark Days Ahead is released under the Creative Commons Attribution ShareAlike 3.0 license.
The code and content of the game is free to use, modify, and redistribute for any purpose whatsoever.
By contributing to the project you agree to the term of the license and that any contribution you make will also be covered by the same license.
See http://creativecommons.org/licenses/by-sa/3.0/ for details. -->
-42
View File
@@ -1,42 +0,0 @@
version: v1
labels:
- label: "<Enhancement / Feature>"
matcher:
body: "(\\s|^)#### Summary\\s*Features +\".+\"\\s*(\n|$)"
- label: "Info / User Interface"
matcher:
body: "(\\s|^)#### Summary\\s*Interface +\".+\"\\s*(\n|$)"
- label: "Mods"
matcher:
body: "(\\s|^)#### Summary\\s*Mods +\".+\"\\s*(\n|$)"
- label: "Game: Balance"
matcher:
body: "(\\s|^)#### Summary\\s*Balance +\".+\"\\s*(\n|$)"
- label: "<Bugfix>"
matcher:
body: "(\\s|^)#### Summary\\s*Bugfixes +\".+\"\\s*(\n|$)"
- label: "<Bugfix>"
matcher:
body: ".*((C|c)lose(s|d)?|(F|f)ix(es|ed)?|(R|r)esolve(s|d)?):? #([1-9][0-9]{3,6})(\\s*|$)"
- label: "Code: Performance"
matcher:
body: "(\\s|^)#### Summary\\s*Performance +\".+\"\\s*(\n|$)"
- label: "Code: Infrastructure / Style / Static Analysis"
matcher:
body: "(\\s|^)#### Summary\\s*Infrastructure +\".+\"\\s*(\n|$)"
- label: "Code: Build"
matcher:
body: "(\\s|^)#### Summary\\s*Build +\".+\"\\s*(\n|$)"
- label: "Translation"
matcher:
body: "(\\s|^)#### Summary\\s*I18N +\".+\"\\s*(\n|$)"
-13
View File
@@ -1,13 +0,0 @@
diff --git a/cmake/sdlchecks.cmake b/cmake/sdlchecks.cmake
index 65a98efbe..2f99f28f1 100644
--- a/cmake/sdlchecks.cmake
+++ b/cmake/sdlchecks.cmake
@@ -352,7 +352,7 @@ endmacro()
# - HAVE_SDL_LOADSO opt
macro(CheckLibSampleRate)
if(SDL_LIBSAMPLERATE)
- find_package(SampleRate QUIET)
+ find_package(SampleRate CONFIG REQUIRED)
if(SampleRate_FOUND AND TARGET SampleRate::samplerate)
set(HAVE_LIBSAMPLERATE TRUE)
set(HAVE_LIBSAMPLERATE_H TRUE)
-130
View File
@@ -1,130 +0,0 @@
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO akrieger/SDL
REF release-2.26.4_qrox_math
SHA512 aa8c0552ac92bbf85dd3f9339088ebd41e0d09b1d46492462b47b632bab5d850c62b7938950accbfb51798b9f5664c1896fc75bdb8dd42b2c1cee84eebd59e13
HEAD_REF main
PATCHES
deps.patch
)
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" SDL_STATIC)
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" SDL_SHARED)
string(COMPARE EQUAL "${VCPKG_CRT_LINKAGE}" "static" FORCE_STATIC_VCRT)
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
FEATURES
vulkan SDL_VULKAN
x11 SDL_X11
wayland SDL_WAYLAND
samplerate SDL_LIBSAMPLERATE
ibus SDL_IBUS
)
if ("x11" IN_LIST FEATURES)
message(WARNING "You will need to install Xorg dependencies to use feature x11:\nsudo apt install libx11-dev libxft-dev libxext-dev\n")
endif()
if ("wayland" IN_LIST FEATURES)
message(WARNING "You will need to install Wayland dependencies to use feature wayland:\nsudo apt install libwayland-dev libxkbcommon-dev libegl1-mesa-dev\n")
endif()
if ("ibus" IN_LIST FEATURES)
message(WARNING "You will need to install ibus dependencies to use feature ibus:\nsudo apt install libibus-1.0-dev\n")
endif()
if(VCPKG_TARGET_IS_UWP)
set(configure_opts WINDOWS_USE_MSBUILD)
endif()
vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
${configure_opts}
OPTIONS ${FEATURE_OPTIONS}
-DSDL_STATIC=${SDL_STATIC}
-DSDL_SHARED=${SDL_SHARED}
-DSDL_FORCE_STATIC_VCRT=${FORCE_STATIC_VCRT}
-DSDL_LIBC=ON
-DSDL_TEST=OFF
-DSDL_INSTALL_CMAKEDIR="cmake"
-DCMAKE_DISABLE_FIND_PACKAGE_Git=ON
-DSDL_LIBSAMPLERATE_SHARED=OFF
MAYBE_UNUSED_VARIABLES
SDL_FORCE_STATIC_VCRT
)
vcpkg_cmake_install()
vcpkg_cmake_config_fixup(CONFIG_PATH cmake)
file(REMOVE_RECURSE
"${CURRENT_PACKAGES_DIR}/debug/include"
"${CURRENT_PACKAGES_DIR}/debug/share"
"${CURRENT_PACKAGES_DIR}/bin/sdl2-config"
"${CURRENT_PACKAGES_DIR}/debug/bin/sdl2-config"
"${CURRENT_PACKAGES_DIR}/SDL2.framework"
"${CURRENT_PACKAGES_DIR}/debug/SDL2.framework"
"${CURRENT_PACKAGES_DIR}/share/licenses"
"${CURRENT_PACKAGES_DIR}/share/aclocal"
)
file(GLOB BINS "${CURRENT_PACKAGES_DIR}/debug/bin/*" "${CURRENT_PACKAGES_DIR}/bin/*")
if(NOT BINS)
file(REMOVE_RECURSE
"${CURRENT_PACKAGES_DIR}/bin"
"${CURRENT_PACKAGES_DIR}/debug/bin"
)
endif()
if(VCPKG_TARGET_IS_WINDOWS AND NOT VCPKG_TARGET_IS_UWP AND NOT VCPKG_TARGET_IS_MINGW)
if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release")
file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/lib/manual-link")
file(RENAME "${CURRENT_PACKAGES_DIR}/lib/SDL2main.lib" "${CURRENT_PACKAGES_DIR}/lib/manual-link/SDL2main.lib")
endif()
if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug")
file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/debug/lib/manual-link")
file(RENAME "${CURRENT_PACKAGES_DIR}/debug/lib/SDL2maind.lib" "${CURRENT_PACKAGES_DIR}/debug/lib/manual-link/SDL2maind.lib")
endif()
file(GLOB SHARE_FILES "${CURRENT_PACKAGES_DIR}/share/sdl2/*.cmake")
foreach(SHARE_FILE ${SHARE_FILES})
vcpkg_replace_string("${SHARE_FILE}" "lib/SDL2main" "lib/manual-link/SDL2main")
endforeach()
endif()
vcpkg_copy_pdbs()
set(DYLIB_COMPATIBILITY_VERSION_REGEX "set\\(DYLIB_COMPATIBILITY_VERSION (.+)\\)")
set(DYLIB_CURRENT_VERSION_REGEX "set\\(DYLIB_CURRENT_VERSION (.+)\\)")
file(STRINGS "${SOURCE_PATH}/CMakeLists.txt" DYLIB_COMPATIBILITY_VERSION REGEX ${DYLIB_COMPATIBILITY_VERSION_REGEX})
file(STRINGS "${SOURCE_PATH}/CMakeLists.txt" DYLIB_CURRENT_VERSION REGEX ${DYLIB_CURRENT_VERSION_REGEX})
string(REGEX REPLACE ${DYLIB_COMPATIBILITY_VERSION_REGEX} "\\1" DYLIB_COMPATIBILITY_VERSION "${DYLIB_COMPATIBILITY_VERSION}")
string(REGEX REPLACE ${DYLIB_CURRENT_VERSION_REGEX} "\\1" DYLIB_CURRENT_VERSION "${DYLIB_CURRENT_VERSION}")
if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug")
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/sdl2.pc" "-lSDL2main" "-lSDL2maind")
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/sdl2.pc" "-lSDL2 " "-lSDL2d ")
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/sdl2.pc" "-lSDL2-static " "-lSDL2-staticd ")
endif()
if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic" AND VCPKG_TARGET_IS_WINDOWS AND NOT VCPKG_TARGET_IS_MINGW)
if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release")
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/lib/pkgconfig/sdl2.pc" "-lSDL2-static " " ")
endif()
if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug")
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/sdl2.pc" "-lSDL2-staticd " " ")
endif()
endif()
if(VCPKG_TARGET_IS_UWP)
if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release")
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/lib/pkgconfig/sdl2.pc" "$<$<CONFIG:Debug>:d>.lib" "")
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/lib/pkgconfig/sdl2.pc" "-l-nodefaultlib:" "-nodefaultlib:")
endif()
if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug")
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/sdl2.pc" "$<$<CONFIG:Debug>:d>.lib" "d")
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/sdl2.pc" "-l-nodefaultlib:" "-nodefaultlib:")
endif()
endif()
vcpkg_fixup_pkgconfig()
file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE.txt")
-8
View File
@@ -1,8 +0,0 @@
sdl2 provides CMake targets:
find_package(SDL2 CONFIG REQUIRED)
target_link_libraries(main
PRIVATE
$<TARGET_NAME_IF_EXISTS:SDL2::SDL2main>
$<IF:$<TARGET_EXISTS:SDL2::SDL2>,SDL2::SDL2,SDL2::SDL2-static>
)
-58
View File
@@ -1,58 +0,0 @@
{
"name": "sdl2",
"version": "2.26.4",
"description": "Simple DirectMedia Layer is a cross-platform development library designed to provide low level access to audio, keyboard, mouse, joystick, and graphics hardware via OpenGL and Direct3D.",
"homepage": "https://www.libsdl.org/download-2.0.php",
"license": "Zlib",
"dependencies": [
{
"name": "vcpkg-cmake",
"host": true
},
{
"name": "vcpkg-cmake-config",
"host": true
}
],
"default-features": [
"base"
],
"features": {
"base": {
"description": "Base functionality for SDL",
"dependencies": [
{
"name": "sdl2",
"default-features": false,
"features": [
"ibus",
"wayland",
"x11"
],
"platform": "linux"
}
]
},
"ibus": {
"description": "Build with ibus IME support",
"supports": "linux"
},
"samplerate": {
"description": "Use libsamplerate for audio rate conversion",
"dependencies": [
"libsamplerate"
]
},
"vulkan": {
"description": "Vulkan functionality for SDL"
},
"wayland": {
"description": "Build with Wayland support",
"supports": "linux"
},
"x11": {
"description": "Build with X11 support",
"supports": "!windows"
}
}
}
@@ -1,5 +0,0 @@
set(VCPKG_TARGET_ARCHITECTURE x64)
set(VCPKG_CRT_LINKAGE static)
set(VCPKG_LIBRARY_LINKAGE static)
set(VCPKG_BUILD_TYPE release)
-5
View File
@@ -1,5 +0,0 @@
set(VCPKG_TARGET_ARCHITECTURE x64)
set(VCPKG_CRT_LINKAGE dynamic)
set(VCPKG_LIBRARY_LINKAGE dynamic)
set(VCPKG_BUILD_TYPE release)
@@ -1,5 +0,0 @@
set(VCPKG_TARGET_ARCHITECTURE x86)
set(VCPKG_CRT_LINKAGE static)
set(VCPKG_LIBRARY_LINKAGE static)
set(VCPKG_BUILD_TYPE release)
-5
View File
@@ -1,5 +0,0 @@
set(VCPKG_TARGET_ARCHITECTURE x86)
set(VCPKG_CRT_LINKAGE dynamic)
set(VCPKG_LIBRARY_LINKAGE dynamic)
set(VCPKG_BUILD_TYPE release)
-43
View File
@@ -1,43 +0,0 @@
name: Clang Build Analyzer
on:
push:
branches:
- master
workflow_dispatch:
# Mixing in event_name so that a master push and a workflow dispatch can run at the same time.
concurrency: clang_build_analyzer-${{ github.event_name }}
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: checkout repository
uses: actions/checkout@v2
with:
fetch-depth: 1
- name: install dependencies
run: sudo apt-get install libncursesw5-dev gettext
- name: Prepare Build Analyzer
run: |
cd
git clone --recursive https://github.com/aras-p/ClangBuildAnalyzer.git buildAnalyzer
cd buildAnalyzer
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=RELEASE ..
cmake --build . -- -j3
echo "${PWD}" >> $GITHUB_PATH
- uses: ammaraskar/gcc-problem-matcher@master
- name: make
run: |
ClangBuildAnalyzer --start .
CLANG=clang++-14 CXXFLAGS=-ftime-trace make
ClangBuildAnalyzer --stop . buildAnalysis
- name: Analyze
run: ClangBuildAnalyzer --analyze buildAnalysis
- uses: actions/upload-artifact@v2
with:
name: ClangBuildAnalyzer-traces
path: "**/obj/*.json"
@@ -1,16 +0,0 @@
name: Detect missions that are missing .start.assign_mission_target.om_special
on:
pull_request:
paths:
- '**.json'
permissions:
contents: read
jobs:
run-the-tool:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- run: ./tools/json_tools/assign_mission_target_needs_om_special.bash 2>&1
-45
View File
@@ -1,45 +0,0 @@
name: astyle
on: pull_request
jobs:
skip-duplicates:
continue-on-error: true
runs-on: ubuntu-latest
# Map a step output to a job output
outputs:
should_skip: ${{ steps.skip_check.outputs.should_skip }}
steps:
- id: skip_check
uses: fkirc/skip-duplicate-actions@master
with:
cancel_others: 'true'
paths: '[".github/workflows/astyle.yml", "Makefile", ".astylerc", "**.cpp", "**.h", "**.c"]'
- run: echo ${{ github.event.number }} > pull_request_id
- uses: actions/upload-artifact@v2
with:
name: pull_request_id
path: pull_request_id
astyle-code:
name: astyle check
needs: skip-duplicates
if: ${{ needs.skip-duplicates.outputs.should_skip != 'true' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: install dependencies
run: sudo apt-get install astyle
- name: astyle check
run: make astyle-check
- name: Format
if: failure()
run: make astyle-fast
- name: Display Corrections
if: failure()
run: git diff --color
-24
View File
@@ -1,24 +0,0 @@
name: Check pull request head branch name
on:
pull_request_target:
types:
- opened
jobs:
check_branch_name:
runs-on: ubuntu-latest
if: github.head_ref == 'master' && github.repository == 'CleverRaven/Cataclysm-DDA'
steps:
- name: Post warning
uses: actions/github-script@v6.3.3
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
await github.rest.issues.createComment({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.issue.number,
body: "You are creating a pull request with the master branch as the head branch. This is likely a mistake unless you really know what you are doing. You may read https://docs.github.com/en/get-started/quickstart/contributing-to-projects#creating-a-branch-to-work-on for a typical workflow of contributing to a project on GitHub."
});
-24
View File
@@ -1,24 +0,0 @@
name: Check printf format string in translations
on:
pull_request:
paths:
- 'lang/po/*.po'
- 'tools/check_po_printf_format.py'
permissions:
contents: read
jobs:
check-po-printf:
runs-on: ubuntu-20.04
steps:
- name: "Install dependencies"
run: |
sudo apt-get update
sudo apt-get install python3-pip
sudo pip3 install polib
- name: "Checkout"
uses: actions/checkout@v2
- name: "Check printf format string in translations"
run: ./tools/check_po_printf_format.py
-77
View File
@@ -1,77 +0,0 @@
name: Clang-tidy (clang-12, tiles)
on:
push:
branches:
- master
pull_request:
branches:
- master
# We only care about the latest revision of a PR, so cancel all previous instances.
concurrency:
group: clang-tidy-build-${{ github.event.pull_request.number || github.ref_name }}
cancel-in-progress: true
jobs:
skip-duplicates:
continue-on-error: true
runs-on: ubuntu-latest
# Map a step output to a job output
outputs:
should_skip: ${{ steps.skip_check.outputs.should_skip }}
steps:
- id: skip_check
uses: fkirc/skip-duplicate-actions@master
with:
cancel_others: 'true'
paths: '[ "**.cpp", "**.h", "**.c", "**/CMakeLists.txt", "**/Makefile", "**.hpp", "**.cmake", ".github/workflows/clang-tidy.yml" ]'
build:
needs: skip-duplicates
if: ${{ needs.skip-duplicates.outputs.should_skip != 'true' }}
runs-on: ubuntu-20.04
env:
CMAKE: 1
CLANG: clang++-12
COMPILER: clang++-12
CATA_CLANG_TIDY: plugin
TILES: 1
SOUND: 1
steps:
- name: checkout repository
uses: actions/checkout@v2
with:
fetch-depth: 1
- name: install dependencies
run: |
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
sudo apt-add-repository "deb http://apt.llvm.org/focal/ llvm-toolchain-focal-12 main"
sudo apt-get update
sudo apt-get install libncursesw5-dev clang-12 libclang-12-dev llvm-12-dev llvm-12-tools \
libsdl2-dev libsdl2-ttf-dev libsdl2-image-dev libsdl2-mixer-dev libpulse-dev ccache \
gettext jq
- name: prepare
run: bash ./build-scripts/requirements.sh
- name: determine changed files
if: ${{ github.event_name == 'pull_request' }}
uses: actions/github-script@v5
with:
script: |
var fs = require('fs');
const response = await github.paginate(github.rest.pulls.listFiles,
{
owner: context.repo.owner,
repo: context.repo.repo,
pull_number: context.issue.number,
}
);
const files = response.map(x => x.filename);
for (const path of files) {
console.log(path);
}
fs.writeFileSync("files_changed", files.join('\n'));
- uses: ammaraskar/gcc-problem-matcher@master
- name: run clang-tidy
run: bash ./build-scripts/clang-tidy.sh
-34
View File
@@ -1,34 +0,0 @@
name: cmake-format linting
on:
push:
branches:
- master
paths:
- '**/CMakeLists.txt'
- '**.cmake'
- '**.cmake.in'
pull_request:
branches:
- master
paths:
- '**/CMakeLists.txt'
- '**.cmake'
- '**.cmake.in'
permissions:
contents: read
jobs:
check:
runs-on: ubuntu-latest
steps:
- name: checkout repository
uses: actions/checkout@v2
with:
fetch-depth: 1
- name: install cmakelang
run: python3 -m pip install -U cmakelang
- name: run cmake-lint
run: python3 -m cmakelang.lint CMakeLists.txt src/CMakeLists.txt data/CMakeLists.txt lang/CMakeLists.txt src/chkjson/CMakeLists.txt tools/format/CMakeLists.txt tools/clang-tidy-plugin/CMakeLists.txt cmake_uninstall.cmake.in -c .cmake-format.yml
-70
View File
@@ -1,70 +0,0 @@
# For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository.
#
# You may wish to alter this file to override the set of languages analyzed,
# or to provide custom queries or build logic.
#
# ******** NOTE ********
# We have attempted to detect the languages in your repository. Please check
# the `language` matrix defined below to confirm you have the correct set of
# supported CodeQL languages.
#
name: "CodeQL"
on:
push:
branches: [ master, 0.8-branch, 0.9-branch, 0.A-branch, 0.B-branch, 0.C-branch, 0.D-branch, 0.E-branch, gh-pages ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ master ]
schedule:
- cron: '31 12 * * 6'
jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write
strategy:
fail-fast: false
matrix:
language: [ 'cpp', 'javascript', 'python' ]
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ]
# Learn more:
# https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed
steps:
- name: Checkout repository
uses: actions/checkout@v2
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# queries: ./path/to/local/query, your-org/your-repo/queries@main
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
#- name: Autobuild
# uses: github/codeql-action/autobuild@v1
# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
# and modify them (or add more) to build your code if your project
# uses a compiled language
- run: |
make RELEASE=1 RUNTESTS=0
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
-31
View File
@@ -1,31 +0,0 @@
name: "Comment Commands"
on:
issue_comment:
types:
- created
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
ISSUE_NUMBER: ${{ github.event.issue.number }}
jobs:
confirm-bug:
if: ${{ !github.event.issue.pull_request }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set-up Comvent
uses: rytswd/comvent@v0.3
id: comvent
with:
token: ${{ secrets.GITHUB_TOKEN }}
config-path: .github/comment-commands.yml
- if: steps.comvent.outputs.confirm-bug != ''
name: Handle confirmation command - Label
run: |
gh issue edit "$ISSUE_NUMBER" --remove-label "(S1 - Need Confirmation)"
gh issue edit "$ISSUE_NUMBER" --add-label "(S2 - Confirmed)"
@@ -1,59 +0,0 @@
name: Detect translation file changes
on:
pull_request_target:
paths:
- lang/po/*.po
- lang/po/*.pot
jobs:
detect-translation-file-changes:
runs-on: ubuntu-latest
steps:
- name: "Detect translation file changes"
uses: actions/github-script@v6
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const skip_phrase = 'Translation file changes are intended';
if (context.payload.pull_request.body.includes(skip_phrase)) {
console.log('PR body contains skip phrase. Exiting.');
return;
}
core.setFailed('Translation file changes detected, but a skip phrase is not found in the PR body.')
console.log(
'Fetching comments of pull request %d of repository %s/%s.',
context.issue.number, context.repo.owner, context.repo.repo
);
const comments = await github.paginate(
github.rest.issues.listComments,
{
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.issue.number
}
);
const body = 'It appears you modified a `.po` or `.pot` file. '
+ 'These translation files are automatically generated, '
+ 'pushed to, and pulled from Transifex, and should not be '
+ 'modified otherwise. If these changes are intended, please '
+ 'add `' + skip_phrase + '` to the '
+ 'PR body.';
const bot_comments = comments.filter(
comment => comment.user.type === 'Bot'
&& comment.user.login === 'github-actions[bot]'
&& comment.body === body
);
if (bot_comments.length > 0) {
console.log('Comment already exists. Exiting.');
return;
}
console.log('Posting comment.');
await github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: body
});
-32
View File
@@ -1,32 +0,0 @@
name: Flake8 Python linting
on:
push:
branches:
- master
paths:
- '**.py'
pull_request:
branches:
- master
paths:
- '**.py'
permissions:
contents: read
jobs:
check:
runs-on: ubuntu-latest
steps:
- name: checkout repository
uses: actions/checkout@v2
with:
fetch-depth: 1
- name: install dependencies
run: sudo apt-get install flake8
- name: Enable flake8 problem matcher
run: echo "::add-matcher::build-scripts/problem-matchers/flake8.json"
- name: run Flake8
run: make python-check
-36
View File
@@ -1,36 +0,0 @@
name: JSON Validation
on: pull_request
jobs:
skip-duplicates:
continue-on-error: true
runs-on: ubuntu-latest
# Map a step output to a job output
outputs:
should_skip: ${{ steps.skip_check.outputs.should_skip }}
steps:
- id: skip_check
uses: fkirc/skip-duplicate-actions@master
with:
cancel_others: 'true'
paths: '["**.json", ".github/workflows/json.yml"]'
- run: echo ${{ github.event.number }} > pull_request_id
- uses: actions/upload-artifact@v2
with:
name: pull_request_id
path: pull_request_id
style-json:
name: JSON style check
runs-on: ubuntu-latest
needs: skip-duplicates
if: ${{ needs.skip-duplicates.outputs.should_skip != 'true' }}
steps:
- uses: actions/checkout@v3
- name: JSON style check
run: make style-all-json-parallel RELEASE=1
- name: Display Corrections
if: failure()
run: git diff --color
-19
View File
@@ -1,19 +0,0 @@
name: "Pull Request Labeler"
on:
- pull_request_target
permissions:
contents: read
jobs:
triage:
permissions:
contents: read # for actions/labeler to determine modified files
pull-requests: write # for actions/labeler to add labels to PRs
runs-on: ubuntu-latest
steps:
- uses: actions/labeler@v3
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"
# I don't want no bot removing stuff for me
sync-labels: ""
-41
View File
@@ -1,41 +0,0 @@
name: Code Style Reviewer
on:
pull_request_target:
paths:
- '**.json'
- '**.cpp'
- '**.h'
- '**.c'
pull_request:
paths:
- '**.json'
- '**.cpp'
- '**.h'
- '**.c'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.run_id }}
cancel-in-progress: true
jobs:
style-code:
if: ${{ github.event_name == 'pull_request_target' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
ref: '${{ github.event.pull_request.head.sha }}'
- run: sudo apt-get install astyle
- run: make astyle-fast
- run: make style-all-json-parallel
- name: 'suggester / JSON & C++'
uses: reviewdog/action-suggester@v1
if: ${{ always() }}
with:
tool_name: 'JSON & C++ formatters'
-343
View File
@@ -1,343 +0,0 @@
name: General build matrix
on:
push:
branches:
- master
pull_request:
branches:
- master
# We only care about the latest revision of a PR, so cancel all previous instances.
# Allow running master builds to complete to help with ccache refreshes.
concurrency:
group: general-build-${{ github.event.pull_request.number || github.ref_name }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
# Overall strategy for what sorts of builds to include:
# We want a build for the newest and oldest supported version of each compiler.
# We want a build for each platform.
# We also want to ensure that each of the following tweaks are covered in at
# least one PR build:
# - TILES=1
# - SOUND=1
# - RELEASE=1
# - CMAKE=1
# - LOCALIZE=0
# - LTO=1
# - LIBBACKTRACE=1 (on Linux and Windows)
# - Tests with important mods enabled (Magiclysm)
# - A clang-tidy run
# - SANITIZE=address,undefined
# We try to minimize the number of builds subject to those constraints.
#
# To see what toolchains are available, the following may be useful:
# https://launchpad.net/%7Eubuntu-toolchain-r/+archive/ubuntu/test/+index
# https://apt.llvm.org/
jobs:
skip-duplicates-code:
continue-on-error: true
runs-on: ubuntu-latest
# Map a step output to a job output
outputs:
should_skip_code: ${{ steps.skip_check.outputs.should_skip }}
steps:
- id: skip_check
uses: fkirc/skip-duplicate-actions@master
with:
paths_ignore: '["android/**", "build-data/osx/**", "doc/**", "doxygen_doc/**", "lgtm/**", "msvc-**", "object_creator/**", "tools/**", "utilities/**", "data/**", "lang/**"]'
skip-duplicates-data:
continue-on-error: true
runs-on: ubuntu-latest
# Map a step output to a job output
outputs:
should_skip_data: ${{ steps.skip_check.outputs.should_skip }}
steps:
- id: skip_check
uses: fkirc/skip-duplicate-actions@master
with:
paths_ignore: '["android/**", "build-data/osx/**", "doc/**", "doxygen_doc/**", "lgtm/**", "msvc-**", "object_creator/**", "tools/**", "utilities/**"]'
matrix-variables:
permissions:
contents: none
continue-on-error: true
runs-on: ubuntu-latest
outputs:
fail_fast: ${{ steps.matrix_vars.outputs.fail_fast }}
skip_tests: ${{ steps.matrix_vars.outputs.skip_tests }}
max_parallel: ${{ steps.matrix_vars.outputs.max_parallel }}
steps:
- id: matrix_vars
run: |
echo "fail_fast=$([ "$GITHUB_REF_NAME" = "master" ] && echo false || echo true)" >> $GITHUB_OUTPUT
echo "skip_tests=$([ "$GITHUB_REF_NAME" = "master" ] && echo true || echo false)" >> $GITHUB_OUTPUT
echo "max_parallel=$([ "$GITHUB_REF_NAME" = "master" ] && echo 20 || echo 1)" >> $GITHUB_OUTPUT
varied_builds:
needs: [ skip-duplicates-code, skip-duplicates-data, matrix-variables ]
strategy:
fail-fast: ${{ fromJSON(needs.matrix-variables.outputs.fail_fast) }}
max-parallel: ${{ fromJSON(needs.matrix-variables.outputs.max_parallel) }}
matrix:
include:
- compiler: clang++-10
os: ubuntu-20.04
tiles: 0
sound: 0
release: 1
cmake: 0
localize: 1
test-stage: 1
native: linux64
archive-success: basic-build
dont_skip_data_only_changes: 1
title: Basic Build and Test (Clang 10, Ubuntu, Curses)
# ~190MB in a clean build
# ~30MB compressed
# observed usage: 3.0GB -> 300MB
ccache_limit: 2G
ccache_key: linux-llvm-10
- compiler: g++-9
os: ubuntu-latest
release: 1
cmake: 0
tiles: 0
sound: 0
localize: 1
gold: 1
lto: 1
libbacktrace: 1
native: linux64
title: GCC 9, Curses, LTO
# ~850MB in a clean build
# ~370MB compressed
# observed usage: 4.0GB -> 1.5GB
ccache_limit: 3G
ccache_key: linux-gcc-9-lto
- compiler: clang++-12
os: ubuntu-22.04
release: 0
cmake: 0
tiles: 1
sound: 0
localize: 1
native: linux64
sanitize: address
cxxflags: --gcc-toolchain=/opt/mock-gcc-11
mods: --mods=magiclysm
dont_skip_data_only_changes: 1
title: Clang 12, Ubuntu, Tiles, ASan
# ~390MB in a clean build
# ~50MB compressed
# observed usage: 4.0GB -> 400MB
ccache_limit: 3G
ccache_key: linux-llvm-12-asan
- compiler: g++-11
os: ubuntu-latest
release: 0
cmake: 0
tiles: 0
sound: 0
localize: 1
native: linux64
sanitize: address
title: GCC 11, Ubuntu, Curses, ASan
# ~480MB in a clean build
# ~50MB compressed
# observed usage: 4.4GB -> 400MB
ccache_limit: 4G
ccache_key: linux-gcc-11-asan
- compiler: clang++
os: macos-12
release: 0
cmake: 0
native: osx
sanitize: undefined
tiles: 1
sound: 1
localize: 1
title: Clang 14, macOS 12, Tiles, Sound, UBSan
# ~880MB ccache-compressed in a clean build
# ~100 compressed
# observed usage: 3.85GB -> 500MB
ccache_limit: 4G
ccache_key: macos-llvm-14
- compiler: g++
os: ubuntu-latest
release: 0
cmake: 0
native:
tiles: 1
sound: 1
localize: 1
libbacktrace: 1
title: GCC 12, Ubuntu cross-compile to MinGW-Win64, Tiles, Sound
ldflags: -static-libgcc -static-libstdc++
mxe_target: x86_64-w64-mingw32.static.gcc12
wine: wine
# ~285MB in a clean build
# ~36MB compressed
# observed usage: 3.0GB -> 350MB
ccache_limit: 2G
ccache_key: mingw-gcc-12
- compiler: g++-9
os: ubuntu-latest
release: 1
cmake: 1
tiles: 1
sound: 1
localize: 0
native: linux64
title: GCC 9, Ubuntu, Tiles, Sound, CMake
# ~180MB in a clean build
# ~25MB compressed
# observed usage: 3.0GB -> 300MB
ccache_limit: 2G
ccache_key: linux-gcc-9-cmake
# Reserving space for msvc ccache & vcpkg cache
# observed usage:
# vcpkg: ??? -> 500MB
# ccache: 8GB -> 1.0GB
name: ${{ matrix.title }}
runs-on: ${{ matrix.os }}
env:
ZSTD_CLEVEL: 17
CMAKE: ${{ matrix.cmake }}
COMPILER: ${{ matrix.compiler }}
MXE_TARGET: ${{ matrix.mxe_target }}
WINE: ${{ matrix.wine }}
OS: ${{ matrix.os }}
TILES: ${{ matrix.tiles }}
SOUND: ${{ matrix.sound }}
LOCALIZE: ${{ matrix.localize }}
MODS: ${{ matrix.mods }}
SANITIZE: ${{ matrix.sanitize }}
TEST_STAGE: ${{ matrix.test-stage }}
CXXFLAGS: ${{ matrix.cxxflags }}
LDFLAGS: ${{ matrix.ldflags }}
EXTRA_TEST_OPTS: --error-format=github-action
NUM_TEST_JOBS: ${{ matrix.num_test_jobs }}
NATIVE: ${{ matrix.native }}
GOLD: ${{ matrix.gold }}
LTO: ${{ matrix.lto }}
LIBBACKTRACE: ${{ matrix.libbacktrace }}
RELEASE: ${{ matrix.release }}
ARCHIVE_SUCCESS: ${{ matrix.archive-success }}
CCACHE_LIMIT: ${{ matrix.ccache_limit }}
CCACHE_FILECLONE: true
CCACHE_HARDLINK: true
CCACHE_NOCOMPRESS: true
SKIP: ${{ ( github.event.pull_request.draft == true && matrix.title != 'Basic Build and Test (Clang 10, Ubuntu, Curses)' ) || ( matrix.dont_skip_data_only_changes == 0 && needs.skip-duplicates.outputs.should_skip_code == 'true' ) || ( matrix.dont_skip_data_only_changes != 0 && needs.skip-duplicates-mods.outputs.should_skip_data == 'true' ) }}
SKIP_TESTS: ${{ needs.matrix-variables.outputs.skip_tests }}
steps:
- name: checkout repository
if: ${{ env.SKIP == 'false' }}
uses: actions/checkout@v2
with:
fetch-depth: 1
- name: install dependencies (ubuntu)
if: ${{ env.SKIP == 'false' && runner.os == 'Linux' }}
run: |
sudo apt-get update
sudo apt-get install libncursesw5-dev ccache gettext parallel
- name: install SDL2 dependencies (ubuntu)
if: ${{ env.SKIP == 'false' && runner.os == 'Linux' && matrix.tiles == 1 }}
run: |
sudo apt-get install libsdl2-dev libsdl2-ttf-dev libsdl2-image-dev libsdl2-mixer-dev libpulse-dev
- name: install recent ccache on ubuntu 20.04
if: ${{ env.SKIP == 'false' && runner.os == 'Linux' && matrix.os == 'ubuntu-20.04' }}
run: |
sudo apt-get remove --purge -y ccache
curl -sL https://github.com/ccache/ccache/releases/download/v4.8/ccache-4.8-linux-x86_64.tar.xz | sudo tar Jxvf - --strip-components 1 -C /usr/bin ccache-4.8-linux-x86_64/ccache
ccache --version
- name: set up a mock GCC toolchain root for Clang (Ubuntu)
if: ${{ env.SKIP == 'false' && runner.os == 'Linux' && (matrix.compiler == 'clang++-12') }}
run: |
sudo mkdir /opt/mock-gcc-11
sudo ln -s /usr/include /opt/mock-gcc-11/include
sudo ln -s /usr/bin /opt/mock-gcc-11/bin
sudo mkdir -p /opt/mock-gcc-11/lib/gcc/x86_64-linux-gnu
sudo ln -s /usr/lib/gcc/x86_64-linux-gnu/11 /opt/mock-gcc-11/lib/gcc/x86_64-linux-gnu/11
- name: install runtime dependencies (mac)
if: ${{ env.SKIP == 'false' && runner.os == 'macOS' }}
uses: BrettDong/setup-sdl2-frameworks@v1
with:
sdl2: latest
sdl2-ttf: latest
sdl2-image: latest
sdl2-mixer: latest
- name: install build dependencies (mac)
if: ${{ env.SKIP == 'false' && runner.os == 'macOS' }}
run: |
HOMEBREW_NO_AUTO_UPDATE=yes HOMEBREW_NO_INSTALL_CLEANUP=yes brew install gettext ccache parallel
- name: prepare
if: ${{ env.SKIP == 'false' }}
run: bash ./build-scripts/requirements.sh
- name: Get ccache vars
id: get-vars
if: ${{ env.SKIP == 'false' }}
run: |
echo "datetime=$(/bin/date -u "+%Y%m%d%H%M")" >> $GITHUB_OUTPUT
echo "ccache-path=$([ "$RUNNER_OS" = "macOS" ] && echo '/Users/runner/Library/Caches/ccache' || echo '~/.cache/ccache')" >> $GITHUB_OUTPUT
shell: bash
- name: ccache cache files
if: ${{ env.SKIP == 'false' && ( runner.os == 'Linux' || runner.os == 'macOS' ) }}
uses: actions/cache@v2
with:
path: ${{ steps.get-vars.outputs.ccache-path }}
# double-dash after compiler is not a typo, it is to disambiguate between g++-<date> and g++-11-<date> for restore key prefix matching
key: ccache-${{ github.ref_name }}-${{ matrix.ccache_key }}--${{ steps.get-vars.outputs.datetime }}
restore-keys: |
ccache-master-${{ matrix.ccache_key }}--
- uses: ammaraskar/gcc-problem-matcher@master
- name: build
if: ${{ env.SKIP == 'false' }}
run: bash ./build-scripts/gha_compile_only.sh
- name: post-build ccache manipulation
if: ${{ env.SKIP == 'false' && !failure() && (runner.os == 'Linux' || runner.os == 'macOS') }}
run: |
ccache --show-stats --verbose
ccache -M ${{ env.CCACHE_LIMIT }}
ccache -c
ccache --show-stats --verbose
- name: clear ccache on PRs
if: ${{ github.ref_name != 'master' && env.SKIP == 'false' && !failure() && (runner.os == 'Linux' || runner.os == 'macOS') }}
run: |
ccache -C
# TODO: post ccache here, however actions/cache@v2 does not support manual upload step
- name: run tests
if: ${{ env.SKIP == 'false' && env.SKIP_TESTS == 'false' }}
run: bash ./build-scripts/gha_test_only.sh
- run: |
echo ${{ github.event.number }} > pull_request_id
echo "true" > ${{ env.ARCHIVE_SUCCESS }}
if: ${{ env.ARCHIVE_SUCCESS && success() }}
- run: |
echo ${{ github.event.number }} > pull_request_id
echo "false" > ${{ env.ARCHIVE_SUCCESS }}
if: ${{ env.ARCHIVE_SUCCESS && failure() }}
- uses: actions/upload-artifact@v2
if: ${{ always() && env.ARCHIVE_SUCCESS }}
with:
name: pull_request_id
path: pull_request_id
- uses: actions/upload-artifact@v2
if: ${{ always() && env.ARCHIVE_SUCCESS }}
with:
name: ${{ env.ARCHIVE_SUCCESS }}
path: ${{ env.ARCHIVE_SUCCESS }}
- name: upload artifacts if failed
uses: actions/upload-artifact@v2
if: failure()
with:
name: cata_test
path: tests/cata_test*
if-no-files-found: ignore
-211
View File
@@ -1,211 +0,0 @@
name: Cataclysm Windows build
on:
push:
branches:
- master
paths-ignore:
- 'android/**'
- 'build-data/osx/**'
- 'doc/**'
- 'doxygen_doc/**'
- 'gfx/**'
- 'lang/**'
- 'lgtm/**'
- 'tools/**'
- '!tools/format/**'
- 'utilities/**'
pull_request:
branches:
- master
paths-ignore:
- 'android/**'
- 'build-data/osx/**'
- 'doc/**'
- 'doxygen_doc/**'
- 'gfx/**'
- 'lang/**'
- 'lgtm/**'
- 'tools/**'
- '!tools/format/**'
- 'utilities/**'
# We only care about the latest revision of a PR, so cancel previous instances.
concurrency:
group: msvc-build-${{ github.event.pull_request.number || github.ref_name }}
cancel-in-progress: true
env:
# Enable pretty backtraces
BACKTRACE: 1
# Compressed size ~1GB based on observations
CCACHE_LIMIT: 8GB
CDDA_CCACHE_PATH: ${{ github.workspace }}\ccache\
CDDA_USE_CCACHE: true
# There's not enough disk space to build both release and debug versions of
# our dependencies, so we hack the triplet file to build only release versions
# Have to use github.workspace because runner namespace isn't available yet.
VCPKG_OVERLAY_TRIPLETS: ${{ github.workspace }}\.github\vcpkg_triplets
# Also conveniently disable ccache internal compression
CCACHE_HARDLINK: true
# vcpkg with object_creator deps totals ~500MB at this compression level
ZSTD_CLEVEL: 17
jobs:
build_catatclysm:
name: Build
runs-on: windows-2019
steps:
- name: checkout repository
uses: actions/checkout@v2
with:
fetch-depth: 1
- name: Add msbuild to PATH
uses: microsoft/setup-msbuild@v1.0.2
- name: Use GNU tar to enable zstd for actions/cache
run: |
echo "Adding GNU tar to PATH"
echo C:\Program Files\Git\usr\bin>>"%GITHUB_PATH%"
shell: cmd
- name: Restore artifacts, or run vcpkg, build and cache artifacts
uses: lukka/run-vcpkg@v10
id: runvcpkg
with:
# run-vcpkg tries to hash vcpkg.json but complans if it finds more than one.
# That said, we also have our custom vcpkg_triplets to hash, so we keep everything the same.
appendedCacheKey: ${{ hashFiles( 'msvc-full-features/vcpkg.json', 'msvc-object_creator/vcpkg.json', '.github/vcpkg_triplets/**', '.github/vckg_ports/**' ) }}
# Rev this value to drop cache without changing vcpkg commit
prependedCacheKey: v1-x64-full
vcpkgDirectory: '${{ runner.workspace }}/b/vcpkg'
# We have to use at least this version of vcpkg to include fixes for yasm-tool's
# availability only as an x86 host tool. Keep it in sync with the builtin-baseline
# field in vcpkg.json. Caching happens as a post-action which runs at the end of
# the whole workflow, after vcpkg install happens during msbuild run.
vcpkgGitCommitId: 'd08e708c2111893da3cc7e49b597ee4654c8076e'
- name: Integrate vcpkg
run: |
vcpkg integrate install --vcpkg-root '${{ runner.workspace }}\b\vcpkg'
- name: Download ccache
uses: robinraju/release-downloader@v1.4
with:
repository: 'ccache/ccache'
tag: 'v4.6.1'
fileName: 'ccache-4.6.1-windows-x86_64.zip'
- name: Install ccache
id: install-ccache
run: |
unzip ccache-4.6.1-windows-x86_64.zip
cp ccache-4.6.1-windows-x86_64/ccache.exe ccache-4.6.1-windows-x86_64/cl.exe
cp ccache-4.6.1-windows-x86_64/ccache.exe ccache-4.6.1-windows-x86_64/clang-cl.exe
mv ccache-4.6.1-windows-x86_64 ${{ env.CDDA_CCACHE_PATH }}
- name: Get ccache vars
id: get-vars
run: |
echo "datetime=$(/bin/date -u "+%Y%m%d%H%M")" >> $GITHUB_OUTPUT
echo "ccache-path=$(echo "$APPDATA\\ccache")" >> $GITHUB_OUTPUT
shell: bash
- name: ccache cache files
uses: actions/cache@v3
with:
path: ${{ steps.get-vars.outputs.ccache-path }}
# double-dash after compiler is not a typo, it is to disambiguate between g++-<date> and g++-11-<date> for restore key prefix matching
key: ccache-${{ github.ref_name }}-${{ runner.os }}-msvc--${{ steps.get-vars.outputs.datetime }}
restore-keys: |
ccache-master-${{ runner.os }}-msvc--
- name: Configure ccache
run: |
${{ env.CDDA_CCACHE_PATH }}\ccache.exe -M 10G
${{ env.CDDA_CCACHE_PATH }}\ccache.exe -s -v
${{ env.CDDA_CCACHE_PATH }}\ccache.exe -z
- name: Symlink intermediates to C
run: |
mkdir -p "$env:TEMP\objwin"
New-Item -ItemType SymbolicLink -Target "$env:TEMP\objwin" objwin
- name: Build
run: |
msbuild -m -p:Configuration=Release -p:Platform=x64 "-target:Cataclysm-vcpkg-static;Cataclysm-test-vcpkg-static;JsonFormatter-vcpkg-static" msvc-full-features/Cataclysm-vcpkg-static.sln
msbuild -m -p:Configuration=Release -p:Platform=x64 "-target:ObjectCreator-vcpkg-static" msvc-object_creator/ObjectCreator-vcpkg-static.sln
- name: Post-build ccache manipulation
if: ${{ !failure() }}
run: |
${{ env.CDDA_CCACHE_PATH }}\ccache.exe -s -v
${{ env.CDDA_CCACHE_PATH }}\ccache.exe -M ${{ env.CCACHE_LIMIT }}
${{ env.CDDA_CCACHE_PATH }}\ccache.exe -c
${{ env.CDDA_CCACHE_PATH }}\ccache.exe -s -v
- name: clear ccache on PRs
if: ${{ github.ref_name != 'master' }}
run: |
${{ env.CDDA_CCACHE_PATH }}\ccache.exe -C
- name: Dump vcpkg logs if build failed
if: failure()
run: |
echo =================================================
Get-ChildItem "${{ runner.workspace }}/Cataclysm-DDA/msvc-full-features/vcpkg_installed" -Recurse
echo =================================================
Get-ChildItem "${{ runner.workspace }}/Cataclysm-DDA/msvc-object_creator/vcpkg_installed" -Recurse
echo =================================================
Get-ChildItem "${{ runner.workspace }}/b/vcpkg/buildtrees" |
Foreach-Object {
Get-ChildItem $_.FullName -Filter *.log |
Foreach-Object {
echo =================================================
echo $_.FullName
echo =================================================
type $_.FullName
}
}
- name: Compile .mo files for localization
if: ${{ github.ref_name != 'master' }}
run: |
& "C:\msys64\mingw64\bin\mingw32-make" -C lang -j2
mkdir -p ./data/mods/TEST_DATA/lang/mo/ru/LC_MESSAGES -ErrorAction SilentlyContinue
msgfmt -f -o ./data/mods/TEST_DATA/lang/mo/ru/LC_MESSAGES/TEST_DATA.mo ./data/mods/TEST_DATA/lang/po/ru.po
- name: Enable GitHub Actions problem matchers
if: ${{ github.ref_name != 'master' }}
run: |
Write-Output "::add-matcher::build-scripts/problem-matchers/catch2.json"
Write-Output "::add-matcher::build-scripts/problem-matchers/debugmsg.json"
- name: Run tests
if: ${{ github.ref_name != 'master' }}
run: |
.\Cataclysm-test-vcpkg-static-Release-x64.exe --min-duration 0.2 --rng-seed time
- name: Dump disk usage logs if job failed
if: failure()
run: |
echo =================================================
df
echo =================================================
du -sh *
echo =================================================
du -sh msvc-full-features/*
echo =================================================
du -sh msvc-object_creator/*
echo =================================================
du -sh tools/*
echo =================================================
shell: bash
- name: Don't upload vcpkg cache on failure or PRs
if: ${{ failure() || cancelled() || github.ref_name != 'master' }}
run: |
echo "RUNVCPKG_NO_CACHE=1" >> $GITHUB_ENV
shell: bash
@@ -1,78 +0,0 @@
name: Post Spell Check Result
on:
workflow_run:
workflows: ["Text Changes Analyzer"]
types:
- completed
jobs:
post-spell-check-result:
runs-on: ubuntu-latest
if: >
${{ github.event.workflow_run.event == 'pull_request' &&
github.event.workflow_run.conclusion == 'success' }}
steps:
- name: Download pr id artifact
uses: dawidd6/action-download-artifact@v2
with:
workflow: ${{ github.event.workflow_run.name }}
run_id: ${{ github.event.workflow_run.id }}
name: pull_request_id
- name: Download spell check retcode artifact
uses: dawidd6/action-download-artifact@v2
with:
workflow: ${{ github.event.workflow_run.name }}
run_id: ${{ github.event.workflow_run.id }}
name: spell_check_retcode
- name: set-spell-check-retcode
id: set-spell-check-retcode
run: echo "spell-check-retcode=$( cat spell_check_retcode )" >> $GITHUB_OUTPUT
- name: Download spell check output artifact
if: steps.set-spell-check-retcode.outputs.spell-check-retcode >= 1
uses: dawidd6/action-download-artifact@v2
with:
workflow: ${{ github.event.workflow_run.name }}
run_id: ${{ github.event.workflow_run.id }}
name: spell_check_output
- name: 'Comment on PR'
if: steps.set-spell-check-retcode.outputs.spell-check-retcode >= 1
uses: actions/github-script@v5
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
var fs = require('fs');
var issue_number = Number(fs.readFileSync('./pull_request_id'));
var body = fs.readFileSync('./spell_check_output', 'utf8');
console.log("Fetching comments of pull request %d of repository %s/%s.", issue_number, context.repo.owner, context.repo.repo);
const comments = await github.paginate(github.rest.issues.listComments,
{
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: issue_number
}
);
const prev_spell_checks = comments.slice(0).reverse()
.filter(comment => comment.user.type === 'Bot' && comment.user.login === 'github-actions[bot]')
.filter(comment => comment.body.startsWith("Spell checker"));
if (prev_spell_checks.some(comment => comment.body === body)) {
console.log("The exact same spell checker comment already exists. Exiting.");
return;
}
for (const comment of prev_spell_checks) {
console.log("Deleting previous spell checker comment (comment id: %i)", comment.id);
await github.rest.issues.deleteComment({
owner: context.repo.owner,
repo: context.repo.repo,
comment_id: comment.id,
});
}
console.log("Posting comment.");
await github.rest.issues.createComment({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: issue_number,
body: body
});
-16
View File
@@ -1,16 +0,0 @@
name: PR Validator
on:
pull_request:
branches:
- master
types: [opened, edited, synchronize]
jobs:
validate:
name: Validate PR
runs-on: ubuntu-latest
steps:
- name: "Validate SUMMARY"
uses: CleverRaven/pr-validator@master
with:
description-regex: '(\n|^)#### Summary\s+`{0,3}(SUMMARY:\s+)?(None|((Features|Content|Interface|Mods|Balance|Bugfixes|Performance|Infrastructure|Build|I18N) +".+"))`{0,3}\s*(\n|$)'
description-regex-flags: 'i'
-49
View File
@@ -1,49 +0,0 @@
name: "Pull translations from Transifex"
on:
schedule:
- cron: "42 1 * * 6"
jobs:
pull-translations:
if: github.repository == 'CleverRaven/Cataclysm-DDA'
runs-on: ubuntu-22.04
steps:
- name: "Install Transifex CLI"
run: |
curl -sL https://github.com/transifex/cli/releases/download/v1.6.4/tx-linux-amd64.tar.gz | sudo tar zxvf - -C /usr/bin tx
- name: "Delete existing i18n branch"
uses: actions/github-script@v6
with:
github-token: ${{ secrets.TX_PR_CREATOR }}
script: |
try {
await github.rest.git.deleteRef({
owner: context.repo.owner,
repo: context.repo.repo,
ref: "i18n"
})
} catch (error) {
console.log(error)
}
- name: "Checkout"
uses: actions/checkout@v3
- name: "Get current date"
uses: josStorer/get-current-time@v2.0.2
id: current-date
with:
format: 'DD MMMM YYYY'
- name: "Pull translations"
env:
TX_TOKEN: ${{ secrets.TX_TOKEN }}
run: tx pull --force
- name: Create Pull Request
uses: peter-evans/create-pull-request@v4
with:
commit-message: Routine i18n updates on ${{ steps.current-date.outputs.formattedTime }}
token: ${{ secrets.TX_PR_CREATOR }}
branch: i18n
base: master
title: Routine i18n updates on ${{ steps.current-date.outputs.formattedTime }}
body: "#### Summary\nNone\n\n#### Additional context\n`Translation file changes are intended`"
labels: Translation
@@ -1,41 +0,0 @@
name: "Push translation template"
concurrency: push_transifex
on:
workflow_run:
workflows: ["Experimental Release"]
types:
- completed
permissions:
contents: read
jobs:
push-template:
runs-on: ubuntu-latest
if: >
${{ github.event.workflow_run.event == 'push' &&
github.event.workflow_run.conclusion == 'success' &&
github.event.workflow_run.status == 'success' &&
github.repository == 'CleverRaven/Cataclysm-DDA' }}
steps:
- name: "Install gettext tools"
run: sudo apt install gettext
- name: "Install Transifex CLI"
run: |
curl -sL https://github.com/transifex/cli/releases/download/v1.6.4/tx-linux-amd64.tar.gz | sudo tar zxvf - -C /usr/bin tx
- name: "Install Python3"
run: |
sudo apt install python3-pip
sudo pip3 install polib
- name: "Checkout"
uses: actions/checkout@v2
- name: "Generate translation template"
run: |
lang/update_pot.sh
- name: "Push translation template to Transifex server"
env:
TX_TOKEN: ${{ secrets.TX_TOKEN }}
run: tx push -s
-342
View File
@@ -1,342 +0,0 @@
name: "Experimental Release"
concurrency: release
on:
push:
branches:
- master
paths:
- '.github/workflows/release.yml'
- 'android/**'
- 'build-data/**'
- 'cataclysm-launcher'
- 'data/**'
- 'doc/**'
- 'gfx/**'
- 'lang/po/*.po'
- 'LICENSE*'
- 'Makefile'
- 'README*'
- 'src/**'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
jobs:
release:
name: Create Release
runs-on: ubuntu-latest
outputs:
upload_url: ${{ steps.create_release.outputs.upload_url }}
timestamp: ${{ steps.get-timestamp.outputs.time }}
release_already_exists: ${{ steps.tag_check.outputs.exists }}
steps:
- name: Get build timestamp
id: get-timestamp
uses: nanzm/get-time-action@v1.1
with:
timeZone: 0
format: 'YYYY-MM-DD-HHmm'
- name: Generate environmental variables
id: generate_env_vars
run: |
echo "tag_name=cdda-experimental-${{ steps.get-timestamp.outputs.time }}" >> $GITHUB_OUTPUT
echo "release_name=Cataclysm-DDA experimental build ${{ steps.get-timestamp.outputs.time }}" >> $GITHUB_OUTPUT
- name: Check if there is existing git tag
id: tag_check
uses: mukunku/tag-exists-action@v1.0.0
with:
tag: ${{ steps.generate_env_vars.outputs.tag_name }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/checkout@v2
- name: Push tag
id: tag_version
uses: mathieudutour/github-tag-action@v5.5
if: ${{ steps.tag_check.outputs.exists == 'false' }}
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
custom_tag: ${{ steps.generate_env_vars.outputs.tag_name }}
tag_prefix: ""
- name: "Generate release notes"
run: |
gh api \
--method POST \
-H "Accept: application/vnd.github.v3+json" \
/repos/CleverRaven/Cataclysm-DDA/releases/generate-notes \
-f tag_name='${{ steps.generate_env_vars.outputs.tag_name }}' \
-f target_commitish='master' \
-q .body > CHANGELOG.md
- name: Create release
id: create_release
uses: actions/create-release@v1
if: ${{ steps.tag_check.outputs.exists == 'false' }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ steps.generate_env_vars.outputs.tag_name }}
release_name: ${{ steps.generate_env_vars.outputs.release_name }}
body_path: ./CHANGELOG.md
draft: false
prerelease: true
builds:
needs: release
if: ${{ needs.release.outputs.release_already_exists == 'false' }}
strategy:
fail-fast: false
matrix:
include:
- name: Windows Tiles x64 MSVC
artifact: windows-tiles-x64-msvc
arch: x64
os: windows-2019
mxe: none
ext: zip
content: application/zip
sound: 0
- name: Windows Tiles Sounds x64 MSVC
artifact: windows-tiles-sounds-x64-msvc
arch: x64
os: windows-2019
mxe: none
ext: zip
content: application/zip
sound: 1
- name: Windows Tiles x64
mxe: x86_64
artifact: windows-tiles-x64
os: ubuntu-latest
ext: zip
content: application/zip
sound: 0
- name: Windows Tiles Sounds x64
mxe: x86_64
artifact: windows-tiles-sounds-x64
os: ubuntu-latest
ext: zip
content: application/zip
sound: 1
- name: Linux Tiles x64
os: ubuntu-20.04
mxe: none
android: none
tiles: 1
sound: 0
artifact: linux-tiles-x64
ext: tar.gz
content: application/gzip
- name: Linux Tiles Sounds x64
os: ubuntu-20.04
mxe: none
android: none
tiles: 1
sound: 1
artifact: linux-tiles-sounds-x64
ext: tar.gz
content: application/gzip
- name: Linux Curses x64
os: ubuntu-20.04
mxe: none
android: none
tiles: 0
sound: 0
artifact: linux-curses-x64
ext: tar.gz
content: application/gzip
- name: OSX Curses x64
os: macos-12
mxe: none
tiles: 0
sound: 0
artifact: osx-curses-x64
ext: dmg
content: application/x-apple-diskimage
- name: OSX Tiles x64
os: macos-12
mxe: none
tiles: 1
sound: 0
artifact: osx-tiles-x64
ext: dmg
content: application/x-apple-diskimage
- name: Android x64
os: ubuntu-latest
mxe: none
android: arm64
artifact: android-x64
ext: apk
content: application/apk
- name: Android x32
os: ubuntu-latest
mxe: none
android: arm32
artifact: android-x32
ext: apk
content: application/apk
- name: Android Bundle
os: ubuntu-latest
mxe: none
android: bundle
artifact: android-bundle
ext: aab
content: application/aap
name: ${{ matrix.name }}
runs-on: ${{ matrix.os }}
env:
ZSTD_CLEVEL: 17
steps:
- uses: actions/checkout@v2
- name: Get soundpack
if: matrix.sound == 1
run: |
git clone --depth=1 --shallow-submodules --recurse-submodules https://github.com/Fris0uman/CDDA-Soundpacks '${{ github.workspace }}/CDDA-Soundpacks'
mv '${{ github.workspace }}/CDDA-Soundpacks/sound/CC-Sounds' '${{ github.workspace }}/data/sound'
- name: Install dependencies (windows msvc) (1/3)
if: runner.os == 'Windows'
uses: microsoft/setup-msbuild@v1.0.2
- name: Install dependencies (windows msvc) (2/3)
if: runner.os == 'Windows'
uses: lukka/run-vcpkg@v10
id: runvcpkg
with:
appendedCacheKey: ${{ hashFiles( 'msvc-full-features/vcpkg.json', '.github/vcpkg_triplets/**', '.github/vckg_ports/**' ) }}
# Rev this value to drop cache without changing vcpkg commit
prependedCacheKey: v1-${{ matrix.arch }}
vcpkgDirectory: '${{ runner.workspace }}/b/vcpkg'
# We have to use at least this version of vcpkg to include fixes for yasm-tool's
# availability only as an x86 host tool. Keep it in sync with the builtin-baseline
# field in vcpkg.json. Caching happens as a post-action which runs at the end of
# the whole workflow, after vcpkg install happens during msbuild run.
vcpkgGitCommitId: 'd08e708c2111893da3cc7e49b597ee4654c8076e'
- name: Install dependencies (windows msvc) (3/3)
if: runner.os == 'Windows'
run: |
vcpkg integrate install --vcpkg-root '${{ runner.workspace }}\b\vcpkg'
- name: Install dependencies (windows mxe)
if: matrix.mxe != 'none'
run: |
sudo apt install gettext
- name: Install MXE
if: matrix.mxe != 'none'
run: |
curl -L -o mxe-${{ matrix.mxe }}.tar.xz https://github.com/BrettDong/MXE-GCC/releases/download/mxe-sdl-2-0-20/mxe-${{ matrix.mxe }}.tar.xz
curl -L -o mxe-${{ matrix.mxe }}.tar.xz.sha256 https://github.com/BrettDong/MXE-GCC/releases/download/mxe-sdl-2-0-20/mxe-${{ matrix.mxe }}.tar.xz.sha256
shasum -a 256 -c ./mxe-${{ matrix.mxe }}.tar.xz.sha256
sudo tar xJf mxe-${{ matrix.mxe }}.tar.xz -C /opt
curl -L -o SDL2-devel-2.26.2-mingw.tar.gz https://github.com/libsdl-org/SDL/releases/download/release-2.26.2/SDL2-devel-2.26.2-mingw.tar.gz
shasum -a 256 -c ./build-scripts/SDL2-devel-2.26.2-mingw.tar.gz.sha256
sudo tar -xzf SDL2-devel-2.26.2-mingw.tar.gz -C /opt/mxe/usr/${{ matrix.mxe }}-w64-mingw32.static.gcc12 --strip-components=2 SDL2-2.26.2/${{ matrix.mxe }}-w64-mingw32
curl -L -o libbacktrace-${{ matrix.mxe }}-w64-mingw32.tar.gz https://github.com/Qrox/libbacktrace/releases/download/2020-01-03/libbacktrace-${{ matrix.mxe }}-w64-mingw32.tar.gz
shasum -a 256 -c ./build-scripts/libbacktrace-${{ matrix.mxe }}-w64-mingw32-sha256
sudo tar -xzf libbacktrace-${{ matrix.mxe }}-w64-mingw32.tar.gz --exclude=LICENSE -C /opt/mxe/usr/${{ matrix.mxe }}-w64-mingw32.static.gcc12
- name: Install dependencies (Linux)
if: runner.os == 'Linux' && matrix.mxe == 'none' && matrix.android == 'none'
run: |
sudo apt-get update
sudo apt-get install libncursesw5-dev libsdl2-dev libsdl2-ttf-dev libsdl2-image-dev \
libsdl2-mixer-dev libpulse-dev ccache gettext parallel
- name: Install runtime dependencies (mac)
if: runner.os == 'macOS'
uses: BrettDong/setup-sdl2-frameworks@v1
with:
sdl2: latest
sdl2-ttf: latest
sdl2-image: latest
sdl2-mixer: latest
- name: Install build dependencies (mac)
if: runner.os == 'macOS'
run: |
HOMEBREW_NO_AUTO_UPDATE=yes HOMEBREW_NO_INSTALL_CLEANUP=yes brew install gettext ccache parallel
pip3 install mac_alias==2.2.0 dmgbuild==1.4.2 biplist
- name: Create VERSION.TXT
shell: bash
run: |
cat >VERSION.txt <<EOL
build type: ${{ matrix.artifact }}
build number: ${{ needs.release.outputs.timestamp }}
commit sha: ${{ github.sha }}
commit url: https://github.com/${{ github.repository }}/commit/${{ github.sha }}
EOL
- name: Compile translations (windows)
if: runner.os == 'Windows'
shell: bash
run: |
lang/compile_mo.sh all
- name: Build CDDA (linux)
if: runner.os == 'Linux' && matrix.mxe == 'none' && matrix.android == 'none'
run: |
make -j$((`nproc`+0)) TILES=${{ matrix.tiles }} SOUND=${{ matrix.tiles }} RELEASE=1 LOCALIZE=1 LANGUAGES=all BACKTRACE=0 PCH=0 bindist
mv cataclysmdda-0.F.tar.gz cdda-${{ matrix.artifact }}-${{ needs.release.outputs.timestamp }}.tar.gz
- name: Build CDDA (windows mxe)
if: matrix.mxe != 'none'
env:
PLATFORM: /opt/mxe/usr/bin/${{ matrix.mxe }}-w64-mingw32.static.gcc12-
run: |
make -j$((`nproc`+0)) CROSS="${PLATFORM}" TILES=1 SOUND=1 RELEASE=1 LOCALIZE=1 LANGUAGES=all BACKTRACE=1 PCH=0 bindist
mv cataclysmdda-0.F.zip cdda-${{ matrix.artifact }}-${{ needs.release.outputs.timestamp }}.zip
- name: Build CDDA (windows msvc)
if: runner.os == 'Windows'
env:
# Enable pretty backtraces
BACKTRACE: 1
CDDA_STRIPPED_PDB: 1
VCPKG_OVERLAY_TRIPLETS: ${{ github.workspace }}\.github\vcpkg_triplets
run: |
msbuild -m -p:Configuration=Release -p:Platform=${{ matrix.arch }} "-target:Cataclysm-vcpkg-static;JsonFormatter-vcpkg-static" msvc-full-features\Cataclysm-vcpkg-static.sln
.\build-scripts\windist.ps1
mv cataclysmdda-0.F.zip cdda-${{ matrix.artifact }}-${{ needs.release.outputs.timestamp }}.zip
- name: Build CDDA (osx)
if: runner.os == 'macOS'
run: |
make -j3 TILES=${{ matrix.tiles }} SOUND=${{ matrix.tiles }} RELEASE=1 LOCALIZE=1 LANGUAGES=all BACKTRACE=0 PCH=0 USE_HOME_DIR=1 OSX_MIN=10.13 FRAMEWORK=1 dmgdist
mv Cataclysm.dmg cdda-${{ matrix.artifact }}-${{ needs.release.outputs.timestamp }}.dmg
- name: Set up JDK 8 (android)
if: runner.os == 'Linux' && matrix.android != 'none' && matrix.mxe == 'none'
uses: actions/setup-java@v2
with:
java-version: '11'
distribution: 'adopt'
- name: Setup Build and Dependencies (android)
if: runner.os == 'Linux' && matrix.android != 'none' && matrix.mxe == 'none'
run: |
sudo apt-get update
sudo apt-get install gettext
- name: Build CDDA (android)
if: runner.os == 'Linux' && matrix.android != 'none' && matrix.mxe == 'none'
working-directory: ./android
run: |
echo "${{ secrets.KEYSTORE }}" > release.keystore.asc
gpg -d --passphrase "${{ secrets.KEYSTORE_PASSWORD }}" --batch release.keystore.asc > app/release.keystore
echo "${{ secrets.KEYSTORE_PROPERTIES }}" > keystore.properties.asc
gpg -d --passphrase "${{ secrets.KEYSTORE_PASSWORD }}" --batch keystore.properties.asc > keystore.properties
export UPSTREAM_BUILD_NUMBER="$((11581 + ${{ github.run_number }}))"
chmod +x gradlew
if [ ${{ matrix.android }} = arm64 ]
then
./gradlew -Pj=$((`nproc`+0)) -Pabi_arm_32=false assembleExperimentalRelease
mv ./app/build/outputs/apk/experimental/release/*.apk ../cdda-${{ matrix.artifact }}-${{ needs.release.outputs.timestamp }}.apk
elif [ ${{ matrix.android }} = arm32 ]
then
./gradlew -Pj=$((`nproc`+0)) -Pabi_arm_64=false assembleExperimentalRelease
mv ./app/build/outputs/apk/experimental/release/*.apk ../cdda-${{ matrix.artifact }}-${{ needs.release.outputs.timestamp }}.apk
elif [ ${{ matrix.android }} = bundle ]
then
./gradlew -Pj=$((`nproc`+0)) bundleExperimentalRelease
mv ./app/build/outputs/bundle/experimentalRelease/*.aab ../cdda-${{ matrix.artifact }}-${{ needs.release.outputs.timestamp }}.aab
fi
- name: Upload release asset
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.release.outputs.upload_url }}
asset_path: cdda-${{ matrix.artifact }}-${{ needs.release.outputs.timestamp }}.${{ matrix.ext }}
asset_name: cdda-${{ matrix.artifact }}-${{ needs.release.outputs.timestamp }}.${{ matrix.ext }}
asset_content_type: ${{ matrix.content }}
- name: Trigger GitHub pages rebuild
shell: bash
run: |
curl --fail --request POST \
--url https://api.github.com/repos/${{ github.repository }}/pages/builds \
--header "Authorization: Bearer ${{ secrets.USER_TOKEN }}" \
--header "Accept: application/vnd.github.v3+json"
-33
View File
@@ -1,33 +0,0 @@
name: 'Stale issue handler'
on:
workflow_dispatch:
schedule:
- cron: '0 * * * *'
permissions:
issues: write
pull-requests: write
jobs:
stale:
runs-on: ubuntu-latest
steps:
- name: get-time
run: |
echo "time=$(date +%I)" >> $GITHUB_ENV
- uses: actions/stale@main
id: stale
with:
stale-issue-label: stale
stale-pr-label: stale
stale-issue-message: 'This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. Please do not bump or comment on this issue unless you are actively working on it. Stale issues, and stale issues that are closed are still considered.'
stale-pr-message: 'This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. Please do not bump or comment on this issue unless you are actively working on it. Stale issues, and stale issues that are closed are still considered.'
days-before-stale: 30
days-before-close: 30
start-date: '2020-05-07'
ascending: ${{ contains(fromJson('["01", "03", "05", "07", "09", "11"]'), env.time) }}
operations-per-run: 250
exempt-issue-labels: '<Bug>,<Bugfix>,<Crash / Freeze>,Organization: Bounty,Good First Issue,(P1 - Critical),(P2 - High),(P3 - Medium),(P4 - Low),(P5 - Long-term),(S2 - Confirmed),0.G String Freeze,0.G Feature Freeze,0.G Content Freeze'
exempt-pr-labels: '<Bug>,<Bugfix>,<Crash / Freeze>,Organization: Bounty,Good First Issue,(P1 - Critical),(P2 - High),(P3 - Medium),(P4 - Low),(P5 - Long-term),(S2 - Confirmed),0.G String Freeze,0.G Feature Freeze,0.G Content Freeze'
exempt-all-milestones: true
exempt-all-assignees: true
- name: Print outputs
run: echo ${{ join(steps.stale.outputs.*, ',') }}
-15
View File
@@ -1,15 +0,0 @@
name: Summary Labeler
on:
- pull_request_target
jobs:
uses:
name: labeler
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: fuxingloh/multi-labeler@main
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
config-path: '.github/summary-labels.yml'
-78
View File
@@ -1,78 +0,0 @@
name: Apply Test Labels
on:
workflow_run:
workflows: ["astyle", "JSON Validation", "General build matrix"]
types: [completed]
jobs:
labeling:
if: github.repository == 'CleverRaven/Cataclysm-DDA'
runs-on: ubuntu-latest
steps:
- name: setLabel
id: setLabel
run: |
if [[ "${{ github.event.workflow_run.name }}" == "astyle" ]]; then
echo "label=astyled" >> $GITHUB_OUTPUT
fi
if [[ "${{ github.event.workflow_run.name }}" == "JSON Validation" ]]; then
echo "label=json-styled" >> $GITHUB_OUTPUT
fi
if [[ "${{ github.event.workflow_run.name }}" == "General build matrix" ]]; then
echo "label=BasicBuildPassed" >> $GITHUB_OUTPUT
fi
- name: Download success artifact from basic build
if: ${{ github.event.workflow_run.name == 'General build matrix' }}
uses: dawidd6/action-download-artifact@v2
with:
workflow: ${{ github.event.workflow_run.name }}
run_id: ${{ github.event.workflow_run.id }}
name: basic-build
- name: set-basic-build-success
id: set-basic-build-success
run: echo "basic-build-success=$( cat basic-build )" >> $GITHUB_OUTPUT
- name: Download pr id artifact
uses: dawidd6/action-download-artifact@v2
with:
workflow: ${{ github.event.workflow_run.name }}
run_id: ${{ github.event.workflow_run.id }}
name: pull_request_id
- name: set-pr-id
id: set-pr-id
run: echo "pr-id=$( cat pull_request_id )" >> $GITHUB_OUTPUT
- name: set-label
if: ${{ github.event.workflow_run.conclusion == 'success' && github.event.workflow_run.conclusion != 'skipped' || steps.set-basic-build-success.outputs.basic-build-success == 'true' }}
uses: actions/github-script@v5
with:
script: |
if ('${{ steps.set-pr-id.outputs.pr-id }}'.trim().length == 0) {
console.log("The PR ID artifact does not contain a pull request number.")
} else {
github.rest.issues.addLabels({
issue_number: ${{ steps.set-pr-id.outputs.pr-id }},
owner: context.repo.owner,
repo: context.repo.repo,
labels: ['${{ steps.setLabel.outputs.label }}']
})
}
- name: remove-label
if: ${{ github.event.workflow_run.conclusion == 'failure' && steps.set-basic-build-success.outputs.basic-build-success != 'true' }}
uses: actions/github-script@v5
with:
script: |
if ('${{ steps.set-pr-id.outputs.pr-id }}'.trim().length == 0) {
console.log("The PR ID artifact does not contain a pull request number.")
} else {
try {
github.rest.issues.removeLabel({
issue_number: ${{ steps.set-pr-id.outputs.pr-id }},
owner: context.repo.owner,
repo: context.repo.repo,
name: '${{ steps.setLabel.outputs.label }}'
})
} catch (e) {
console.log(e)
}
}
@@ -1,83 +0,0 @@
name: Text Changes Analyzer
on:
pull_request:
branches:
- master
paths:
- '.github/workflows/text-changes-analyzer.yml'
- 'tools/pot_diff.py'
- 'lang/extract_json_strings.py'
- 'lang/string_extractor/**'
- 'src/*.h'
- 'src/*.cpp'
- '**.json'
permissions:
contents: read
jobs:
analyze-text-changes:
runs-on: ubuntu-20.04
steps:
- name: "Install dependencies"
run: |
sudo apt-get update
sudo apt-get install python3-pip gettext
sudo pip3 install polib pyspellchecker
- name: "Checkout test merge commit"
uses: actions/checkout@v2
- name: "Compute base commit and test merge commit"
id: get-commit-hash
run: |
echo "test_merge_commit=$(git rev-parse HEAD)" >> $GITHUB_OUTPUT
echo "head_commit=$(git log -1 --format='%B' | grep -o -E -e 'Merge\s([0-9a-f]{40})\sinto' | grep -o -E -e '[0-9a-f]{40}')" >> $GITHUB_OUTPUT
echo "base_commit=$(git log -1 --format='%B' | grep -o -E -e 'into\s([0-9a-f]{40})$' | grep -o -E -e '[0-9a-f]{40}')" >> $GITHUB_OUTPUT
- name: "Generate translation template on test merge commit"
run: |
rm -f lang/po/cataclysm-dda.pot
./lang/update_pot.sh
cp lang/po/cataclysm-dda.pot ~/merge.pot
- name: "Checkout base commit"
uses: actions/checkout@v2
with:
ref: ${{ steps.get-commit-hash.outputs.base_commit }}
- name: "Generate translation template on base commit"
run: |
rm -f lang/po/cataclysm-dda.pot
./lang/update_pot.sh
cp lang/po/cataclysm-dda.pot ~/base.pot
- name: "Checkout test merge commit"
uses: actions/checkout@v2
with:
ref: ${{ steps.get-commit-hash.outputs.test_merge_commit }}
- name: "List text changes"
run: |
python3 ./tools/pot_diff.py ~/base.pot ~/merge.pot
- name: "Write text changes"
run: |
python3 ./tools/pot_diff.py ~/base.pot ~/merge.pot -j ~/pot_diff.json
- name: "Spell check on text changes"
run: |
python3 ./tools/spell_check_pr.py -i ~/pot_diff.json > spell_check_output
- name: "Get length of spell check output"
id: get_length
run: |
wc -c spell_check_output | grep -o '[0-9]*' > spell_check_retcode
echo "length=$(cat spell_check_retcode)" >> $GITHUB_OUTPUT
- run: echo ${{ github.event.number }} > pull_request_id
- uses: actions/upload-artifact@v2
with:
name: pull_request_id
path: pull_request_id
- uses: actions/upload-artifact@v2
with:
name: spell_check_retcode
path: spell_check_retcode
- uses: actions/upload-artifact@v2
if: steps.get_length.outputs.length >= 1
with:
name: spell_check_output
path: spell_check_output
-31
View File
@@ -1,31 +0,0 @@
on:
push:
branches:
- master
paths:
- 'doc/JSON_INFO.md'
name: TOC Generator
permissions:
contents: read
jobs:
generateTOC:
if: github.repository == 'CleverRaven/Cataclysm-DDA'
name: Update the table of contents
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: npx doctoc doc/JSON_INFO.md --github
- name: Create Pull Request
uses: peter-evans/create-pull-request@v3
with:
commit-message: Update the table of contents
branch: update-toc
token: ${{ secrets.TX_PR_CREATOR }}
title: Update the table of contents in doc/JSON_INFO.md
body: |
```sh
#### Summary
None
npx doctoc doc/JSON_INFO.md --github
```
-48
View File
@@ -1,48 +0,0 @@
# This workflow runs at 23:00 UTC sundays
name: "Pull Tileset Updates"
on:
schedule:
- cron: "0 23 * * sun"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TX_TOKEN: ${{ secrets.TX_TOKEN }}
jobs:
pull-updates:
if: github.repository == 'CleverRaven/Cataclysm-DDA'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: "Get current date"
uses: 1466587594/get-current-time@v2
id: current-date
with:
format: 'DD MMMM YYYY'
- name: "Update Tilesets"
shell: bash
run: |
gh release download -D gfx/ -p '*.zip' -R I-am-Erk/CDDA-Tilesets
gh release download -D gfx/ -p '*.zip' -R pixel-32/CDDA-tileset
find gfx/ -name "*.zip" | xargs -I{} unzip -o {} -d gfx/
rm -fr gfx/*.zip
# make sure all files are linted just in case
# FIXME: make json test check gfx folder instead of using this
make tools/format/json_formatter.cgi
find gfx/ -name "*.json" -print0 | xargs -0 -L 1 -P $(nproc) tools/format/json_formatter.cgi || exit 0
- name: Create Pull Request
uses: peter-evans/create-pull-request@v4
with:
commit-message: |
Routine tileset updates on ${{ steps.current-date.outputs.formattedTime }}
committer: casswedson <casswedson@users.noreply.github.com>
author: casswedson <casswedson@users.noreply.github.com>
token: ${{ secrets.TX_PR_CREATOR }}
branch: tileset-updates
delete-branch: true
base: master
title: Routine tileset updates on ${{ steps.current-date.outputs.formattedTime }}
body: "#### Summary\nNone\nAutomatic tileset updates from:\n\n**https://github.com/I-am-Erk/CDDA-Tilesets/releases**\nAltica, BrownLikeBears, ChibiUltica, HollowMoon, Larwick_Overmap, MshockXotto+, NeoDaysTileset, RetroDaysTileset, SmashButton_iso, SurveyorsMap\n\n---\n\n**https://github.com/pixel-32/CDDA-tileset/releases**\nCuteclysm"
-50
View File
@@ -1,50 +0,0 @@
name: "Weekly changelog update"
on:
schedule:
- cron: "45 0 * * 1"
push:
branches:
- master
paths:
- '.github/workflows/weekly-changelog.yml'
jobs:
weekly-changelog:
if: github.repository == 'CleverRaven/Cataclysm-DDA'
runs-on: ubuntu-latest
steps:
- name: "Checkout"
uses: actions/checkout@v2
- name: "Get current date"
uses: 1466587594/get-current-time@v2
id: current-date
with:
format: 'YYYYMMDD'
- name: "Get changes since last week"
id: getting-changes
env:
CURR_DATE: ${{ steps.current-date.outputs.formattedTime }}
run: |
LAST_WEEK="$(date -d "@$(( $(date +%s -d $CURR_DATE) - (60*60*24*7) ))" +"%Y-%m-%d")"
tools/generate_changelog.py -f --by-date /tmp/changelog.txt -T "${{ secrets.GITHUB_TOKEN }}" "$LAST_WEEK"
tac /tmp/changelog.txt > /tmp/changelog_rev.txt
tools/merge_summaries.sh /tmp/changelog_rev.txt data/changelog.txt
echo "date=$( date +"%Y-%m-%d" -d $CURR_DATE )" >> $GITHUB_OUTPUT
echo "old_date=$LAST_WEEK" >> $GITHUB_OUTPUT
- name: Create Pull Request
uses: peter-evans/create-pull-request@v3.10.0
with:
commit-message: Weekly Changelog ${{ steps.getting-changes.outputs.old_date }} to ${{ steps.getting-changes.outputs.date }}
committer: David Seguin <davidseguin@live.ca>
author: David Seguin <davidseguin@live.ca>
token: ${{ secrets.TX_PR_CREATOR }}
branch: changelog-weekly
delete-branch: true
base: master
title: Weekly Changelog ${{ steps.getting-changes.outputs.old_date }} to ${{ steps.getting-changes.outputs.date }}
body: "#### Summary\nNone\n\n#### Additional context\n`Automatically generated as a draft. Please copy-edit before merging.`"
labels: Organization,<Documentation>
# create as a draft to allow maintainers to cull the changes before merging
draft: true
+8 -26
View File
@@ -8,16 +8,13 @@
*.tmp
*.zip
*.apk
*.log
/WinDepend/
/bindist/
/build/
/build-start-time
/cache/
/cmake-build-debug/
/config/
/data/*.template
/data/cache/
/data/mods/user-default-mods.json
/dep/
/doxygen_doc/html/*
@@ -30,7 +27,6 @@
/objwin/
/save/
/src/version.h
/src/prefix.h
/sound/
/templates/
/tools/format/json_formatter.cgi
@@ -40,7 +36,7 @@ CataclysmWin.layout
cata_test
cata_test-tiles
cataclysm
*cataclysm-tiles
cataclysm-tiles
cataclysm-vcpkg
cataclysmdda-*
chkjson*
@@ -55,23 +51,17 @@ json_formatter
*.opensdf
*.pdb
*.lib
*.manifest
*.sdf
*.suo
*.user
*.vcxproj.filters
*.lastbuildstate
.vs/
.vscode/
Directory.Build.props
Directory.Build.targets
Debug*/
Release*/
# Visual Studio project files
/msvc-full-features/**/
# Temporary CMakeFiles
CMakeUserPresets.json
out/
# Distribution script results
/msvc-full-features/distribution
# Visual Studio 2015
/msvc-full-features/*db
@@ -82,10 +72,8 @@ Cataclysm.exe.lastcodeanalysissucceeded
#Visual Studio 2017
/msvc-full-features/PredictedInputCache_Debug_x64.dat
# Visual Studio 2019
**/enc_temp_folder/*
#vcpkg
/msvc-full-features/vcpkg_installed
/msvc-object_creator/vcpkg_installed
# PVS Studio
@@ -107,14 +95,12 @@ cscope.*
tags
# Generated translation source
/lang/po/*.pot
/lang/po/cataclysm-dda.pot
/lang/po/en.po
# Compiled binary translations
/lang/mo/
# Stampfile for binary translations
/lang/mo_built.stamp
# Directory for translatable strings
/lang/json/*
!/lang/json/README
@@ -123,7 +109,6 @@ tags
nbproject/
# Python runtime files
__pycache__
*.pyc
# vim files
@@ -229,6 +214,3 @@ weather.output
.sass-cache
.jekyll-metadata
Gemfile.lock
# VERSION.txt generated by our CMakeLists.txt
VERSION.txt
-8
View File
@@ -1,8 +0,0 @@
# If this commit is applied, it will ....
# |<-- Using around 50, Maximum 72 Characters -->|
# Explain why this change is being made
# |<---- Limit Each Line to a Maximum Of 72 Characters ---->|
# Provide links or keys to any relevant tickets, articles or other resources
# Example: fixes #1234, closes #2345, resolves #3456, references #4567
-12
View File
@@ -1,12 +0,0 @@
extraction:
cpp:
prepare:
packages:
- "libncurses-dev"
index:
build_command: "make RELEASE=1 cataclysm -j2"
# Disable FIXME query, in DDA it is as likely to be a future feature as a bug.
queries:
- exclude: cpp/fixme-comment
- exclude: cpp/non-constant-format
-24
View File
@@ -1,24 +0,0 @@
[main]
host = https://www.transifex.com
[o:cataclysm-dda-translators:p:cataclysm-dda:r:master-cataclysm-dda]
file_filter = lang/po/<lang>.po
source_file = lang/po/cataclysm-dda.pot
source_lang = en
type = PO
minimum_perc = 0
[o:cataclysm-dda-translators:p:cataclysm-dda:r:credits-master]
file_filter = data/credits/<lang>.credits
source_file = data/credits/en.credits
source_lang = en
type = TXT
minimum_perc = 20
[o:cataclysm-dda-translators:p:cataclysm-dda:r:motd-master]
file_filter = data/motd/<lang>.motd
source_file = data/motd/en.motd
source_lang = en
type = TXT
minimum_perc = 20
+1
View File
@@ -0,0 +1 @@
1e7d902c-02b7-4619-bf01-fe4b9c0ba8ca
-464
View File
@@ -1,464 +0,0 @@
cmake_minimum_required(VERSION 3.21)
project(CataclysmDDA)
list(APPEND CMAKE_MODULE_PATH
${CMAKE_SOURCE_DIR}/CMakeModules)
if (NOT VCPKG_MANIFEST_MODE)
list(APPEND CMAKE_MODULE_PATH
${CMAKE_SOURCE_DIR}/CMakeModules/Find)
endif()
set(CMAKE_TLS_VERIFY ON)
# Build options
option(TILES "Build graphical tileset version." "OFF")
option(CURSES "Build curses version." "ON")
option(SOUND "Support for in-game sounds & music." "OFF")
option(BACKTRACE "Support for printing stack backtraces on crash" "ON")
option(LIBBACKTRACE "Print backtrace with libbacktrace." "OFF")
option(USE_HOME_DIR "Use user's home directory for save files." "ON")
option(USE_PREFIX_DATA_DIR "Use UNIX system directories for game data in release build." "ON")
option(LOCALIZE "Support for language localizations. Also enable UTF support." "ON")
option(LANGUAGES "Compile localization files for specified languages." "")
option(DYNAMIC_LINKING
"Use dynamic linking. Or use static to remove MinGW dependency instead." "ON")
option(JSON_FORMAT "Build JSON formatter" "OFF")
option(CATA_CCACHE "Try to find and build with ccache" "ON")
option(CATA_CLANG_TIDY_PLUGIN "Build Cata's custom clang-tidy checks as a plugin" "OFF")
option(CATA_CLANG_TIDY_EXECUTABLE "Build Cata's custom clang-tidy checks as an executable" "OFF")
option(TESTS "Compile Cata's tests" "ON")
set(CATA_CLANG_TIDY_INCLUDE_DIR "" CACHE STRING
"Path to internal clang-tidy headers required for plugin (e.g. ClangTidy.h)")
set(CATA_CHECK_CLANG_TIDY "" CACHE STRING "Path to check_clang_tidy.py for plugin tests")
set(GIT_BINARY "" CACHE STRING "Git binary name or path.")
set(GETTEXT_MSGFMT_BINARY "" CACHE FILEPATH "msgfmt binary name or path.")
if (TESTS)
include(CTest)
endif()
message(STATUS "${PROJECT} build environment --")
message(STATUS "Build realm is: ${CMAKE_SYSTEM_NAME} ${CMAKE_HOST_SYSTEM_PROCESSOR}")
if (NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE Debug)
endif ()
add_definitions(-DCMAKE)
include(GetGitRevisionDescription)
git_describe(GIT_VERSION --tags --always --match "[0-9A-Z]*.[0-9A-Z]*")
if (NOT "${GIT_VERSION}" MATCHES "GIT-NOTFOUND")
string(REPLACE "-NOTFOUND" "" GIT_VERSION ${GIT_VERSION})
file(WRITE ${CMAKE_SOURCE_DIR}/src/version.h
"// NOLINT(cata-header-guard)\n\#define VERSION \"${GIT_VERSION}\"\n")
message(STATUS "${PROJECT_NAME} build version is: ${GIT_VERSION}")
add_definitions(-DGIT_VERSION)
# get_git_head_revision() does not work with worktrees in Windows
execute_process(COMMAND ${GIT_EXECUTABLE} rev-parse HEAD
WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}"
OUTPUT_VARIABLE _sha1
OUTPUT_STRIP_TRAILING_WHITESPACE)
string(TIMESTAMP _timestamp %Y-%m-%d-%H%M)
file(WRITE VERSION.txt "\
build type: ${BUILD_PRESET_NAME}\n\
build number: ${_timestamp}\n\
commit sha: ${_sha1}\n\
commit url: https://github.com/CleverRaven/Cataclysm-DDA/commit/${_sha1}"
)
endif ()
#OS Check Placeholders. Will be used for BINDIST
if ("${CMAKE_SYSTEM_NAME}" MATCHES "Linux")
set(_OS_LINUX_ 1)
endif ()
if ("${CMAKE_SYSTEM_NAME}" MATCHES "FreeBSD")
set(_OS_FREEBSD_ 1)
endif ()
if ("${CMAKE_SYSTEM_NAME}" MATCHES "Darwin")
set(_OS_DARWIN_ 1)
add_definitions(-DMACOSX)
if (TILES)
add_definitions(-DOSX_SDL2_LIBS)
endif ()
endif ()
include(CheckCXXCompilerFlag)
#FIXME: Add dest build choice: m32 for 32 bit or m64 for 64 bit version
#add_definitions("-m32")
#SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -m32")
#SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -m32")
#SET(CMAKE_SHARED_LIBRARY_C_FLAGS "${CMAKE_SHARED_LIBRARY_C_FLAGS} -m32")
#SET(CMAKE_SHARED_LIBRARY_CXX_FLAGS "${CMAKE_SHARED_LIBRARY_CXX_FLAGS} -m32")
if (NOT DYNAMIC_LINKING)
if(NOT MSVC)
set(CMAKE_FIND_LIBRARY_SUFFIXES ".a;.dll.a")
endif()
set(BUILD_SHARED_LIBRARIES OFF)
check_cxx_compiler_flag (-static HAVE_STATIC_FLAG)
if (HAVE_STATIC_FLAG)
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -static")
endif ()
# Workaround for cmake link library guesser
set(CMAKE_EXE_LINK_DYNAMIC_C_FLAGS) # remove -Wl,-Bdynamic
set(CMAKE_EXE_LINK_DYNAMIC_CXX_FLAGS)
set(CMAKE_SHARED_LIBRARY_C_FLAGS) # remove -fPIC
set(CMAKE_SHARED_LIBRARY_CXX_FLAGS)
set(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS) # remove -rdynamic
set(CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS)
else ()
if (MINGW AND NOT "${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang")
# Avoid depending on MinGW runtime DLLs
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -static-libgcc -static-libstdc++")
endif ()
endif ()
# System specific actions
if ("${CMAKE_SYSTEM_NAME}" MATCHES "(Linux|FreeBSD|Darwin)")
if (NOT DATA_PREFIX)
set(DATA_PREFIX ${CMAKE_INSTALL_PREFIX}/share/cataclysm-dda)
endif ()
if (NOT README_DIR)
set(README_DIR ${DATA_PREFIX})
endif ()
if (NOT LOCALE_DIR)
set(LOCALE_DIR ${CMAKE_INSTALL_PREFIX}/share/locale)
endif ()
if (NOT BIN_PREFIX)
set(BIN_PREFIX ${CMAKE_INSTALL_PREFIX}/bin)
endif ()
if (NOT DESKTOP_ENTRY_PATH)
set(DESKTOP_ENTRY_PATH ${CMAKE_INSTALL_PREFIX}/share/applications)
endif ()
if (NOT PIXMAPS_ENTRY_PATH)
set(PIXMAPS_ENTRY_PATH ${CMAKE_INSTALL_PREFIX}/share/icons/hicolor)
endif ()
if (NOT PIXMAPS_UNITY_ENTRY_PATH)
set(PIXMAPS_UNITY_ENTRY_PATH ${CMAKE_INSTALL_PREFIX}/share/icons/ubuntu-mono-dark)
endif ()
if (NOT MANPAGE_ENTRY_PATH)
set(MANPAGE_ENTRY_PATH ${CMAKE_INSTALL_PREFIX}/share/man)
endif ()
endif ()
if ("${CMAKE_SYSTEM_NAME}" MATCHES "(Windows|MSYS)")
if (NOT DATA_PREFIX)
set(DATA_PREFIX ${CMAKE_INSTALL_PREFIX}/data)
endif ()
if (NOT README_DIR)
set(README_DIR ${CMAKE_INSTALL_PREFIX})
endif ()
if (NOT LOCALE_DIR)
set(LOCALE_DIR ${CMAKE_INSTALL_PREFIX}/lang)
endif ()
if (NOT BIN_PREFIX)
set(BIN_PREFIX ${CMAKE_INSTALL_PREFIX})
endif ()
endif ()
message(STATUS "${PROJECT_NAME} build options --")
# Preset variables
if (NOT LANGUAGES)
set(LANGUAGES ar cs da de el es_AR es_ES fil_PH fr ga_IE hu id is it_IT ja ko nb nl pl pt_BR ro
ru sr tr uk_UA zh_CN zh_TW)
endif ()
if (GIT_BINARY)
set(GIT_EXECUTABLE ${GIT_BINARY})
else ()
find_package(Git)
if (NOT GIT_FOUND)
message(WARNING
"Git binary not found. Build version will be set to NULL. \
Install Git package or use -DGIT_BINARY to set path to git binary.")
endif ()
endif ()
# Can't compile curses and tiles build's at same time
if (TILES)
set(CURSES OFF)
endif ()
# Set build types and display info
if ("${CMAKE_BUILD_TYPE}" STREQUAL "Debug")
set(RELEASE 0)
message(STATUS "Build ${PROJECT} in development mode --")
message(STATUS "Binaries will be located in: " ${CMAKE_SOURCE_DIR})
set(CMAKE_VERBOSE_MAKEFILE ON)
# Since CataclysmDDA does not respect PREFIX for development builds
# and has funny path handlers, we should create resulting Binaries
# in the source directory
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR} CACHE PATH
"Single Directory for all Executables.")
set(BIN_PREFIX ${CMAKE_SOURCE_DIR})
else ()
set(RELEASE 1)
message(STATUS "CMAKE_INSTALL_PREFIX : ${CMAKE_INSTALL_PREFIX}")
message(STATUS "BIN_PREFIX : ${BIN_PREFIX}")
message(STATUS "DATA_PREFIX : ${DATA_PREFIX}")
if (LOCALIZE)
message(STATUS "LOCALE_PATH : ${LOCALE_DIR}")
endif ()
message(STATUS "DESKTOP_ENTRY_PATH : ${DESKTOP_ENTRY_PATH}")
message(STATUS "PIXMAPS_ENTRY_PATH : ${PIXMAPS_ENTRY_PATH}")
message(STATUS "PIXMAPS_UNITY_ENTRY_PATH : ${PIXMAPS_UNITY_ENTRY_PATH}")
message(STATUS "MANPAGE_ENTRY_PATH : ${MANPAGE_ENTRY_PATH}")
add_definitions(-DRELEASE)
# Use CMAKE_INSTALL_PREFIX as storage of data,gfx, etc.. Useful only on *nix OS.
if (CMAKE_INSTALL_PREFIX AND NOT WIN32 AND USE_PREFIX_DATA_DIR)
add_definitions(-DPREFIX=${CMAKE_INSTALL_PREFIX})
configure_file(
"${CMAKE_SOURCE_DIR}/src/prefix.h.in"
"${CMAKE_SOURCE_DIR}/src/prefix.h"
@ONLY)
add_definitions(-DDATA_DIR_PREFIX)
endif ()
endif ()
message(STATUS "GIT_BINARY : ${GIT_EXECUTABLE}")
message(STATUS "DYNAMIC_LINKING : ${DYNAMIC_LINKING}")
message(STATUS "TILES : ${TILES}")
message(STATUS "CURSES : ${CURSES}")
message(STATUS "SOUND : ${SOUND}")
message(STATUS "BACKTRACE : ${BACKTRACE}")
message(STATUS "LOCALIZE : ${LOCALIZE}")
message(STATUS "USE_HOME_DIR : ${USE_HOME_DIR}")
message(STATUS "LANGUAGES : ${LANGUAGES}")
message(STATUS "See doc/COMPILING/COMPILING-CMAKE.md for details and more info --")
if (NOT MSVC)
set(CATA_WARNINGS
"-Werror -Wall -Wextra \
-Wformat-signedness \
-Wlogical-op \
-Wmissing-declarations \
-Wmissing-noreturn \
-Wnon-virtual-dtor \
-Wold-style-cast \
-Woverloaded-virtual \
-Wpedantic \
-Wsuggest-override \
-Wunused-macros \
-Wzero-as-null-pointer-constant")
if("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang")
set(CATA_WARNINGS "${CATA_WARNINGS} -Wno-unknown-warning-option")
else()
set(CATA_WARNINGS "${CATA_WARNINGS} -Wno-unknown-warning")
endif()
if (NOT "${CMAKE_SYSTEM_NAME}" MATCHES "Windows")
set(CATA_WARNINGS "${CATA_WARNINGS} -Wredundant-decls")
endif ()
set(CATA_OTHER_FLAGS "${CATA_OTHER_FLAGS} -fsigned-char")
# Compact the whitespace in the warning string
string(REGEX REPLACE "[\t ]+" " " CATA_WARNINGS "${CATA_WARNINGS}")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CATA_WARNINGS} ${CATA_OTHER_FLAGS}")
set(CMAKE_CXX_FLAGS_DEBUG "-Og -g")
endif ()
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
# Force out-of-source build
if ("${CMAKE_SOURCE_DIR}" STREQUAL "${CMAKE_BINARY_DIR}")
message(FATAL_ERROR
"This project requires an out of source build. \
Remove the file 'CMakeCache.txt' found in this directory before continuing; \
create a separate build directory and run 'cmake [options] <srcs>' from there. \
See doc/COMPILING/COMPILING-CMAKE.md for details and more info.")
endif ()
#set(THREADS_USE_PTHREADS_WIN32 True)
set(CMAKE_THREAD_PREFER_PTHREAD True)
find_package(Threads REQUIRED)
find_package(ZLIB REQUIRED)
# Check for build types and libraries
if (TILES)
# Find SDL, SDL_ttf & SDL_image for graphical install
message(STATUS "Searching for SDL2 library --")
find_package(SDL2)
if (NOT (SDL2_FOUND OR TARGET SDL2::SDL2))
message(FATAL_ERROR
"This project requires SDL2 to be installed to compile in graphical mode. \
Please install the SDL2 development libraries, \
or try compiling without -DTILES=1 for a text-only compilation. \
See doc/COMPILING/COMPILING-CMAKE.md for details and more info.")
endif ()
if (NOT DYNAMIC_LINKING)
# SDL, SDL_Image, SDL_ttf deps are required for static build
message(STATUS "Searching for SDL deps libraries --")
find_package(Freetype REQUIRED)
find_package(PNG REQUIRED)
find_package(JPEG REQUIRED)
find_package(ZLIB REQUIRED)
find_package(BZip2 REQUIRED)
endif ()
message(STATUS "Searching for SDL2_TTF library --")
if (NOT VCPKG_MANIFEST_MODE)
find_package(SDL2_ttf)
else()
find_package(sdl2-ttf)
endif()
if (NOT (SDL2_TTF_FOUND OR TARGET SDL2::SDL2_ttf OR TARGET SDL2::SDL2_ttf-static))
message(FATAL_ERROR
"This project requires SDL2_ttf to be installed to compile in graphical mode. \
Please install the SDL2_ttf development libraries, \
or try compiling without -DTILES=1 for a text-only compilation. \
See doc/COMPILING/COMPILING-CMAKE.md for details and more info.")
endif ()
message(STATUS "Searching for SDL2_image library --")
if(VCPKG_MANIFEST_MODE)
find_package(sdl2-image)
else()
find_package(SDL2_image)
endif()
if (NOT (SDL2_IMAGE_FOUND OR TARGET SDL2::SDL2_image))
message(FATAL_ERROR
"This project requires SDL2_image to be installed to compile in graphical mode. \
Please install the SDL2_image development libraries, \
or try compiling without -DTILES=1 for a text-only compilation. \
See doc/COMPILING/COMPILING-CMAKE.md for details and more info.")
endif ()
add_definitions(-DTILES)
endif ()
if (CURSES)
# Find the ncurses library for a text based compile
message(STATUS "Searching for Curses library --")
set(CURSES_NEED_NCURSES TRUE)
set(CURSES_NEED_WIDE TRUE)
find_package(Curses)
if (NOT CURSES_FOUND)
message(FATAL_ERROR
"This project requires ncurses to be installed to be compiled in text-only mode. \
Please install the ncurses development libraries, \
or try compiling with -DTILES=1 for a graphical compilation. \
See doc/COMPILING/COMPILING-CMAKE.md for details and more info")
endif ()
if (NOT DYNAMIC_LINKING)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DNCURSES_STATIC")
endif ()
endif ()
if (SOUND)
# You need TILES to be able to use SOUND
if (NOT TILES)
message(FATAL_ERROR
"You must enable graphical support with -DTILES=1 \
to be able to enable sound support. \
See doc/COMPILING/COMPILING-CMAKE.md for details and more info.")
endif ()
# Sound requires SDL_mixer library
if(VCPKG_MANIFEST_MODE)
message(STATUS "Searching for sdl2-mixer library --")
find_package(sdl2-mixer)
if (NOT TARGET SDL2::SDL2_mixer)
message(FATAL_ERROR
"You need the sdl2-mixer development library \
to be able to compile with sound enabled. \
See doc/COMPILING/COMPILING-CMAKE.md for details and more info.")
endif()
else()
message(STATUS "Searching for SDL2_mixer library --")
find_package(SDL2_mixer)
# if (NOT TARGET SDL2_mixer::SDL2_mixer-static) # TODO x64-mingw-static ?
if (NOT SDL2_MIXER_FOUND)
message(FATAL_ERROR
"You need the SDL2_mixer development library \
to be able to compile with sound enabled. \
See doc/COMPILING/COMPILING-CMAKE.md for details and more info.")
endif()
endif()
endif ()
if (BACKTRACE)
add_definitions(-DBACKTRACE)
if (LIBBACKTRACE)
add_definitions(-DLIBBACKTRACE)
endif ()
endif ()
if ((LOCALIZE OR BUILD_TESTING) AND "${GETTEXT_MSGFMT_BINARY}" STREQUAL "")
if(MSVC)
list(APPEND Gettext_ROOT C:\\msys64\\usr)
list(APPEND Gettext_ROOT C:\\Program\ Files\\Git\\usr)
endif(MSVC)
find_package(Gettext)
endif ()
if (NOT GETTEXT_MSGFMT_EXECUTABLE )
set(GETTEXT_MSGFMT_EXECUTABLE "${GETTEXT_MSGFMT_BINARY}")
endif()
# Ok. Now create build and install recipes
if (LOCALIZE)
add_subdirectory(lang)
add_definitions(-DLOCALIZE)
endif ()
if (USE_HOME_DIR)
add_definitions(-DUSE_HOME_DIR)
endif ()
find_program(CCACHE_FOUND ccache)
if (CCACHE_FOUND AND CATA_CCACHE)
set(CMAKE_C_COMPILER_LAUNCHER ccache)
set(CMAKE_CXX_COMPILER_LAUNCHER ccache)
set(CMAKE_C_LINKER_LAUNCHER ccache)
set(CMAKE_CXX_LINKER_LAUNCHER ccache)
endif ()
add_subdirectory(src)
add_subdirectory(data)
if (NOT MSVC)
add_subdirectory(src/chkjson)
endif()
if(TESTS)
add_subdirectory(tests)
endif()
if (JSON_FORMAT)
add_subdirectory(tools/format)
endif()
if (CATA_CLANG_TIDY_PLUGIN OR CATA_CLANG_TIDY_EXECUTABLE)
add_subdirectory(tools/clang-tidy-plugin)
endif()
install(DIRECTORY doc gfx
DESTINATION ${DATA_PREFIX}
)
if (RELEASE)
install(FILES
${CMAKE_SOURCE_DIR}/README.md
${CMAKE_SOURCE_DIR}/LICENSE.txt
${CMAKE_SOURCE_DIR}/LICENSE-OFL-Terminus-Font.txt
${CMAKE_SOURCE_DIR}/VERSION.txt
DESTINATION ${README_DIR})
if (TILES)
install(DIRECTORY ${CMAKE_SOURCE_DIR}/gfx DESTINATION ${DATA_PREFIX})
endif()
endif()
configure_file(
"${CMAKE_CURRENT_SOURCE_DIR}/cmake_uninstall.cmake.in"
"${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake"
IMMEDIATE @ONLY)
add_custom_target(uninstall
"${CMAKE_COMMAND}"
-P "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake")
-53
View File
@@ -1,53 +0,0 @@
# - Try to find Iconv
# Once done this will define
#
# ICONV_FOUND - system has Iconv
# ICONV_INCLUDE_DIR - the Iconv include directory
# ICONV_LIBRARIES - Link these to use Iconv
# ICONV_SECOND_ARGUMENT_IS_CONST - the second argument for iconv() is const
#
include(CheckCXXSourceCompiles)
IF (ICONV_INCLUDE_DIR AND ICONV_LIBRARIES)
# Already in cache, be silent
SET(ICONV_FIND_QUIETLY TRUE)
ENDIF (ICONV_INCLUDE_DIR AND ICONV_LIBRARIES)
FIND_PATH(ICONV_INCLUDE_DIR iconv.h)
FIND_LIBRARY(ICONV_LIBRARIES NAMES iconv libiconv libiconv-2 c)
IF(ICONV_INCLUDE_DIR AND ICONV_LIBRARIES)
SET(ICONV_FOUND TRUE)
ENDIF(ICONV_INCLUDE_DIR AND ICONV_LIBRARIES)
set(CMAKE_REQUIRED_INCLUDES ${ICONV_INCLUDE_DIR})
set(CMAKE_REQUIRED_LIBRARIES ${ICONV_LIBRARIES})
IF(ICONV_FOUND)
check_cxx_source_compiles("
#include <iconv.h>
int main(){
iconv_t conv = 0;
const char* in = 0;
size_t ilen = 0;
char* out = 0;
size_t olen = 0;
iconv(conv, &in, &ilen, &out, &olen);
return 0;
}
" ICONV_SECOND_ARGUMENT_IS_CONST )
ENDIF(ICONV_FOUND)
set(CMAKE_REQUIRED_INCLUDES)
set(CMAKE_REQUIRED_LIBRARIES)
# handle the QUIETLY and REQUIRED arguments and set CURSES_FOUND to TRUE if
# all listed variables are TRUE
INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Iconv DEFAULT_MSG
ICONV_LIBRARIES ICONV_INCLUDE_DIR)
MARK_AS_ADVANCED(
ICONV_INCLUDE_DIR
ICONV_LIBRARIES
ICONV_SECOND_ARGUMENT_IS_CONST
)
-45
View File
@@ -1,45 +0,0 @@
# Try to find Libintl functionality
# Once done this will define
#
# LIBINTL_FOUND - system has Libintl
# LIBINTL_INCLUDE_DIR - Libintl include directory
# LIBINTL_LIBRARIES - Libraries needed to use Libintl
#
# TODO: This will enable translations only if Gettext functionality is
# present in libc. Must have more robust system for release, where Gettext
# functionality can also reside in standalone Gettext library, or the one
# embedded within kdelibs (cf. gettext.m4 from Gettext source).
# Copyright (c) 2006, Chusslove Illich, <caslav.ilic@gmx.net>
# Copyright (c) 2007, Alexander Neundorf, <neundorf@kde.org>
#
# Redistribution and use is allowed according to the terms of the BSD license.
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
if(LIBINTL_INCLUDE_DIR AND LIBINTL_LIB_FOUND)
set(Libintl_FIND_QUIETLY TRUE)
endif(LIBINTL_INCLUDE_DIR AND LIBINTL_LIB_FOUND)
find_path(LIBINTL_INCLUDE_DIR libintl.h)
set(LIBINTL_LIB_FOUND FALSE)
if(LIBINTL_INCLUDE_DIR)
include(CheckFunctionExists)
check_function_exists(dgettext LIBINTL_LIBC_HAS_DGETTEXT)
if (LIBINTL_LIBC_HAS_DGETTEXT)
set(LIBINTL_LIBRARIES)
set(LIBINTL_LIB_FOUND TRUE)
else (LIBINTL_LIBC_HAS_DGETTEXT)
find_library(LIBINTL_LIBRARIES intl libintl libintl-8)
if(LIBINTL_LIBRARIES)
set(LIBINTL_LIB_FOUND TRUE)
endif(LIBINTL_LIBRARIES)
endif (LIBINTL_LIBC_HAS_DGETTEXT)
endif(LIBINTL_INCLUDE_DIR)
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(Libintl DEFAULT_MSG LIBINTL_LIBRARIES LIBINTL_INCLUDE_DIR)
mark_as_advanced(LIBINTL_INCLUDE_DIR LIBINTL_LIBRARIES LIBINTL_LIBC_HAS_DGETTEXT LIBINTL_LIB_FOUND)
-186
View File
@@ -1,186 +0,0 @@
#.rst:
# FindSDL2
# -------
#
# Locate SDL2 library
#
# This module defines
#
# ::
#
# SDL2_LIBRARY, the name of the library to link against
# SDL2_FOUND, if false, do not try to link to SDL
# SDL2_INCLUDE_DIR, where to find SDL.h
# SDL2_VERSION_STRING, human-readable string containing the version of SDL
#
#
#
# This module responds to the flag:
#
# ::
#
# SDL2_BUILDING_LIBRARY
# If this is defined, then no SDL2_main will be linked in because
# only applications need main().
# Otherwise, it is assumed you are building an application and this
# module will attempt to locate and set the proper link flags
# as part of the returned SDL2_LIBRARY variable.
#
#
#
# Don't forget to include SDLmain.h and SDLmain.m your project for the
# OS X framework based version. (Other versions link to -lSDLmain which
# this module will try to find on your behalf.) Also for OS X, this
# module will automatically add the -framework Cocoa on your behalf.
#
#
#
# Additional Note: If you see an empty SDL2_LIBRARY_TEMP in your
# configuration and no SDL2_LIBRARY, it means CMake did not find your SDL
# library (SDL.dll, libsdl.so, SDL.framework, etc). Set
# SDL2_LIBRARY_TEMP to point to your SDL library, and configure again.
# Similarly, if you see an empty SDLMAIN_LIBRARY, you should set this
# value as appropriate. These values are used to generate the final
# SDL2_LIBRARY variable, but when these values are unset, SDL2_LIBRARY
# does not get created.
#
#
#
# $SDLDIR is an environment variable that would correspond to the
# ./configure --prefix=$SDLDIR used in building SDL. l.e.galup 9-20-02
#
# Modified by Eric Wing. Added code to assist with automated building
# by using environmental variables and providing a more
# controlled/consistent search behavior. Added new modifications to
# recognize OS X frameworks and additional Unix paths (FreeBSD, etc).
# Also corrected the header search path to follow "proper" SDL
# guidelines. Added a search for SDLmain which is needed by some
# platforms. Added a search for threads which is needed by some
# platforms. Added needed compile switches for MinGW.
#
# On OSX, this will prefer the Framework version (if found) over others.
# People will have to manually change the cache values of SDL2_LIBRARY to
# override this selection or set the CMake environment
# CMAKE_INCLUDE_PATH to modify the search paths.
#
# Note that the header path has changed from SDL/SDL.h to just SDL.h
# This needed to change because "proper" SDL convention is #include
# "SDL.h", not <SDL/SDL.h>. This is done for portability reasons
# because not all systems place things in SDL/ (see FreeBSD).
#=============================================================================
# Copyright 2003-2009 Kitware, Inc.
# Copyright 2012 Benjamin Eikel
#
# Distributed under the OSI-approved BSD License (the "License");
# see accompanying file Copyright.txt for details.
#
# This software is distributed WITHOUT ANY WARRANTY; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the License for more information.
#=============================================================================
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
find_path(SDL2_INCLUDE_DIR SDL.h
HINTS
ENV SDL2DIR
${CMAKE_SOURCE_DIR}/dep/
PATH_SUFFIXES SDL2
# path suffixes to search inside ENV{SDLDIR}
include/SDL2 include
)
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
set(VC_LIB_PATH_SUFFIX lib/x64)
else()
set(VC_LIB_PATH_SUFFIX lib/x86)
endif()
find_library(SDL2_LIBRARY_TEMP
NAMES SDL2
HINTS
ENV SDL2DIR
${CMAKE_SOURCE_DIR}/dep/
PATH_SUFFIXES lib ${VC_LIB_PATH_SUFFIX}
)
if(NOT SDL2_BUILDING_LIBRARY)
if(NOT SDL2_INCLUDE_DIR MATCHES ".framework")
# Non-OS X framework versions expect you to also dynamically link to
# SDLmain. This is mainly for Windows and OS X. Other (Unix) platforms
# seem to provide SDLmain for compatibility even though they don't
# necessarily need it.
find_library(SDL2MAIN_LIBRARY
NAMES SDL2main
HINTS
ENV SDL2DIR
${CMAKE_SOURCE_DIR}/dep/
PATH_SUFFIXES lib ${VC_LIB_PATH_SUFFIX}
PATHS
/sw
/opt/local
/opt/csw
/opt
)
endif()
endif()
# SDL may require threads on your system.
# The Apple build may not need an explicit flag because one of the
# frameworks may already provide it.
# But for non-OSX systems, I will use the CMake Threads package.
if(NOT APPLE)
find_package(Threads)
endif()
# MinGW needs an additional library, mwindows
# It's total link flags should look like -lmingw32 -lSDLmain -lSDL -lmwindows
# (Actually on second look, I think it only needs one of the m* libraries.)
if(MINGW)
set(MINGW32_LIBRARY mingw32 CACHE STRING "mwindows for MinGW")
endif()
if(SDL2_LIBRARY_TEMP)
# For SDLmain
if(SDL2MAIN_LIBRARY AND NOT SDL2_BUILDING_LIBRARY)
list(FIND SDL2_LIBRARY_TEMP "${SDL2MAIN_LIBRARY}" _SDL2_MAIN_INDEX)
if(_SDL2_MAIN_INDEX EQUAL -1)
set(SDL2_LIBRARY_TEMP "${SDL2MAIN_LIBRARY}" ${SDL2_LIBRARY_TEMP})
endif()
unset(_SDL2_MAIN_INDEX)
endif()
# For OS X, SDL uses Cocoa as a backend so it must link to Cocoa.
# CMake doesn't display the -framework Cocoa string in the UI even
# though it actually is there if I modify a pre-used variable.
# I think it has something to do with the CACHE STRING.
# So I use a temporary variable until the end so I can set the
# "real" variable in one-shot.
if(APPLE)
set(SDL2_LIBRARY_TEMP ${SDL2_LIBRARY_TEMP} "-framework Cocoa")
endif()
# For threads, as mentioned Apple doesn't need this.
# In fact, there seems to be a problem if I used the Threads package
# and try using this line, so I'm just skipping it entirely for OS X.
if(NOT APPLE)
set(SDL2_LIBRARY_TEMP ${SDL2_LIBRARY_TEMP} ${CMAKE_THREAD_LIBS_INIT})
endif()
# For MinGW library
if(MINGW)
set(SDL2_LIBRARY_TEMP ${MINGW32_LIBRARY} ${SDL2_LIBRARY_TEMP})
endif()
# Set the final string here so the GUI reflects the final state.
set(SDL2_LIBRARY ${SDL2_LIBRARY_TEMP} CACHE STRING "Where the SDL2 Library can be found")
# Set the temp variable to INTERNAL so it is not seen in the CMake GUI
set(SDL2_LIBRARY_TEMP "${SDL2_LIBRARY_TEMP}" CACHE INTERNAL "")
endif()
include(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(SDL2
REQUIRED_VARS SDL2_LIBRARY SDL2_INCLUDE_DIR
VERSION_VAR SDL2_VERSION_STRING)
-97
View File
@@ -1,97 +0,0 @@
#.rst:
# FindSDL2_image
# -------------
#
# Locate SDL2_image library
#
# This module defines:
#
# ::
#
# SDL2_IMAGE_LIBRARIES, the name of the library to link against
# SDL2_IMAGE_INCLUDE_DIRS, where to find the headers
# SDL2_IMAGE_FOUND, if false, do not try to link against
# SDL2_IMAGE_VERSION_STRING - human-readable string containing the
# version of SDL2_image
#
#
#
# For backward compatibility the following variables are also set:
#
# ::
#
# SDL2IMAGE_LIBRARY (same value as SDL2_IMAGE_LIBRARIES)
# SDL2IMAGE_INCLUDE_DIR (same value as SDL2_IMAGE_INCLUDE_DIRS)
# SDL2IMAGE_FOUND (same value as SDL2_IMAGE_FOUND)
#
#
#
# $SDL2DIR is an environment variable that would correspond to the
# ./configure --prefix=$SDL2DIR used in building SDL2.
#
# Created by Eric Wing. This was influenced by the FindSDL2.cmake
# module, but with modifications to recognize OS X frameworks and
# additional Unix paths (FreeBSD, etc).
#=============================================================================
# Copyright 2005-2009 Kitware, Inc.
# Copyright 2012 Benjamin Eikel
#
# Distributed under the OSI-approved BSD License (the "License");
# see accompanying file Copyright.txt for details.
#
# This software is distributed WITHOUT ANY WARRANTY; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the License for more information.
#=============================================================================
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
if(NOT SDL2_IMAGE_INCLUDE_DIR AND SDL2IMAGE_INCLUDE_DIR)
set(SDL2_IMAGE_INCLUDE_DIR ${SDL2IMAGE_INCLUDE_DIR} CACHE PATH "directory cache
entry initialized from old variable name")
endif()
find_path(SDL2_IMAGE_INCLUDE_DIR SDL_image.h
HINTS
ENV SDL2IMAGEDIR
ENV SDL2DIR
${CMAKE_SOURCE_DIR}/dep/
PATH_SUFFIXES SDL2
# path suffixes to search inside ENV{SDL2DIR}
include/SDL2 include
)
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
set(VC_LIB_PATH_SUFFIX lib/x64)
else()
set(VC_LIB_PATH_SUFFIX lib/x86)
endif()
if(NOT SDL2_IMAGE_LIBRARY AND SDL2IMAGE_LIBRARY)
set(SDL2_IMAGE_LIBRARY ${SDL2IMAGE_LIBRARY} CACHE FILEPATH "file cache entry
initialized from old variable name")
endif()
find_library(SDL2_IMAGE_LIBRARY
NAMES SDL2_image
HINTS
ENV SDL2IMAGEDIR
ENV SDL2DIR
${CMAKE_SOURCE_DIR}/dep/
PATH_SUFFIXES lib ${VC_LIB_PATH_SUFFIX}
)
set(SDL2_IMAGE_LIBRARIES ${SDL2_IMAGE_LIBRARY})
set(SDL2_IMAGE_INCLUDE_DIRS ${SDL2_IMAGE_INCLUDE_DIR})
include(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(SDL2_image
REQUIRED_VARS SDL2_IMAGE_LIBRARIES SDL2_IMAGE_INCLUDE_DIRS
VERSION_VAR SDL2_IMAGE_VERSION_STRING)
# for backward compatibility
set(SDL2IMAGE_LIBRARY ${SDL2_IMAGE_LIBRARIES})
set(SDL2IMAGE_INCLUDE_DIR ${SDL2_IMAGE_INCLUDE_DIRS})
set(SDL2IMAGE_FOUND ${SDL2_IMAGE_FOUND})
mark_as_advanced(SDL2_IMAGE_LIBRARY SDL2_IMAGE_INCLUDE_DIR)
-97
View File
@@ -1,97 +0,0 @@
#.rst:
# FindSDL2_mixer
# -------------
#
# Locate SDL2_mixer library
#
# This module defines:
#
# ::
#
# SDL2_MIXER_LIBRARIES, the name of the library to link against
# SDL2_MIXER_INCLUDE_DIRS, where to find the headers
# SDL2_MIXER_FOUND, if false, do not try to link against
# SDL2_MIXER_VERSION_STRING - human-readable string containing the
# version of SDL2_mixer
#
#
#
# For backward compatibility the following variables are also set:
#
# ::
#
# SDL2MIXER_LIBRARY (same value as SDL2_MIXER_LIBRARIES)
# SDL2MIXER_INCLUDE_DIR (same value as SDL2_MIXER_INCLUDE_DIRS)
# SDL2MIXER_FOUND (same value as SDL2_MIXER_FOUND)
#
#
#
# $SDL2DIR is an environment variable that would correspond to the
# ./configure --prefix=$SDL2DIR used in building SDL2.
#
# Created by Eric Wing. This was influenced by the FindSDL2.cmake
# module, but with modifications to recognize OS X frameworks and
# additional Unix paths (FreeBSD, etc).
#=============================================================================
# Copyright 2005-2009 Kitware, Inc.
# Copyright 2012 Benjamin Eikel
#
# Distributed under the OSI-approved BSD License (the "License");
# see accompanying file Copyright.txt for details.
#
# This software is distributed WITHOUT ANY WARRANTY; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the License for more information.
#=============================================================================
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
if(NOT SDL2_MIXER_INCLUDE_DIR AND SDL2MIXER_INCLUDE_DIR)
set(SDL2_MIXER_INCLUDE_DIR ${SDL2MIXER_INCLUDE_DIR} CACHE PATH "directory cache
entry initialized from old variable name")
endif()
find_path(SDL2_MIXER_INCLUDE_DIR SDL_mixer.h
HINTS
ENV SDL2MIXERDIR
ENV SDL2DIR
${CMAKE_SOURCE_DIR}/dep/
PATH_SUFFIXES SDL2
# path suffixes to search inside ENV{SDL2DIR}
include/SDL2 include
)
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
set(VC_LIB_PATH_SUFFIX lib/x64)
else()
set(VC_LIB_PATH_SUFFIX lib/x86)
endif()
if(NOT SDL2_MIXER_LIBRARY AND SDL2MIXER_LIBRARY)
set(SDL2_MIXER_LIBRARY ${SDL2MIXER_LIBRARY} CACHE FILEPATH "file cache entry
initialized from old variable name")
endif()
find_library(SDL2_MIXER_LIBRARY
NAMES SDL2_mixer
HINTS
ENV SDL2MIXERDIR
ENV SDL2DIR
${CMAKE_SOURCE_DIR}/dep/
PATH_SUFFIXES lib ${VC_LIB_PATH_SUFFIX}
)
set(SDL2_MIXER_LIBRARIES ${SDL2_MIXER_LIBRARY})
set(SDL2_MIXER_INCLUDE_DIRS ${SDL2_MIXER_INCLUDE_DIR})
include(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(SDL2_mixer
REQUIRED_VARS SDL2_MIXER_LIBRARIES SDL2_MIXER_INCLUDE_DIRS
VERSION_VAR SDL2_MIXER_VERSION_STRING)
# for backward compatibility
set(SDL2MIXER_LIBRARY ${SDL2_MIXER_LIBRARIES})
set(SDL2MIXER_INCLUDE_DIR ${SDL2_MIXER_INCLUDE_DIRS})
set(SDL2MIXER_FOUND ${SDL2_MIXER_FOUND})
mark_as_advanced(SDL2_MIXER_LIBRARY SDL2_MIXER_INCLUDE_DIR)
-96
View File
@@ -1,96 +0,0 @@
#.rst:
# FindSDL2_ttf
# -----------
#
# Locate SDL2_ttf library
#
# This module defines:
#
# ::
#
# SDL2_TTF_LIBRARIES, the name of the library to link against
# SDL2_TTF_INCLUDE_DIRS, where to find the headers
# SDL2_TTF_FOUND, if false, do not try to link against
# SDL2_TTF_VERSION_STRING - human-readable string containing the version of SDL2_ttf
#
#
#
# For backward compatibility the following variables are also set:
#
# ::
#
# SDL2TTF_LIBRARY (same value as SDL2_TTF_LIBRARIES)
# SDL2TTF_INCLUDE_DIR (same value as SDL2_TTF_INCLUDE_DIRS)
# SDL2TTF_FOUND (same value as SDL2_TTF_FOUND)
#
#
#
# $SDL2DIR is an environment variable that would correspond to the
# ./configure --prefix=$SDL2DIR used in building SDL2.
#
# Created by Eric Wing. This was influenced by the FindSDL2.cmake
# module, but with modifications to recognize OS X frameworks and
# additional Unix paths (FreeBSD, etc).
#=============================================================================
# Copyright 2005-2009 Kitware, Inc.
# Copyright 2012 Benjamin Eikel
#
# Distributed under the OSI-approved BSD License (the "License");
# see accompanying file Copyright.txt for details.
#
# This software is distributed WITHOUT ANY WARRANTY; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the License for more information.
#=============================================================================
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
if(NOT SDL2_TTF_INCLUDE_DIR AND SDL2TTF_INCLUDE_DIR)
set(SDL2_TTF_INCLUDE_DIR ${SDL2TTF_INCLUDE_DIR} CACHE PATH "directory cache
entry initialized from old variable name")
endif()
find_path(SDL2_TTF_INCLUDE_DIR SDL_ttf.h
HINTS
ENV SDL2TTFDIR
ENV SDL2DIR
${CMAKE_SOURCE_DIR}/dep/
PATH_SUFFIXES SDL2
# path suffixes to search inside ENV{SDL2DIR}
include/SDL2 include
)
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
set(VC_LIB_PATH_SUFFIX lib/x64)
else()
set(VC_LIB_PATH_SUFFIX lib/x86)
endif()
if(NOT SDL2_TTF_LIBRARY AND SDL2TTF_LIBRARY)
set(SDL2_TTF_LIBRARY ${SDL2TTF_LIBRARY} CACHE FILEPATH "file cache entry
initialized from old variable name")
endif()
find_library(SDL2_TTF_LIBRARY
NAMES SDL2_ttf
HINTS
ENV SDL2TTFDIR
ENV SDL2DIR
${CMAKE_SOURCE_DIR}/dep/
PATH_SUFFIXES lib ${VC_LIB_PATH_SUFFIX}
)
set(SDL2_TTF_LIBRARIES ${SDL2_TTF_LIBRARY})
set(SDL2_TTF_INCLUDE_DIRS ${SDL2_TTF_INCLUDE_DIR})
include(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(SDL2_ttf
REQUIRED_VARS SDL2_TTF_LIBRARIES SDL2_TTF_INCLUDE_DIRS
VERSION_VAR SDL2_TTF_VERSION_STRING)
# for backward compatibility
set(SDL2TTF_LIBRARY ${SDL2_TTF_LIBRARIES})
set(SDL2TTF_INCLUDE_DIR ${SDL2_TTF_INCLUDE_DIRS})
set(SDL2TTF_FOUND ${SDL2_TTF_FOUND})
mark_as_advanced(SDL2_TTF_LIBRARY SDL2_TTF_INCLUDE_DIR)
@@ -1,130 +0,0 @@
# - Returns a version string from Git
#
# These functions force a re-configure on each git commit so that you can
# trust the values of the variables in your build system.
#
# get_git_head_revision(<refspecvar> <hashvar> [<additional arguments to git describe> ...])
#
# Returns the refspec and sha hash of the current head revision
#
# git_describe(<var> [<additional arguments to git describe> ...])
#
# Returns the results of git describe on the source tree, and adjusting
# the output so that it tests false if an error occurs.
#
# git_get_exact_tag(<var> [<additional arguments to git describe> ...])
#
# Returns the results of git describe --exact-match on the source tree,
# and adjusting the output so that it tests false if there was no exact
# matching tag.
#
# Requires CMake 2.6 or newer (uses the 'function' command)
#
# Original Author:
# 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net>
# http://academic.cleardefinition.com
# Iowa State University HCI Graduate Program/VRAC
#
# Copyright Iowa State University 2009-2010.
# Distributed under the Boost Software License, Version 1.0.
# (See accompanying file LICENSE_1_0.txt or copy at
# http://www.boost.org/LICENSE_1_0.txt)
if(__get_git_revision_description)
return()
endif()
set(__get_git_revision_description YES)
# We must run the following at "include" time, not at function call time,
# to find the path to this module rather than the path to a calling list file
get_filename_component(_gitdescmoddir ${CMAKE_CURRENT_LIST_FILE} PATH)
function(get_git_head_revision _refspecvar _hashvar)
set(GIT_PARENT_DIR "${CMAKE_CURRENT_SOURCE_DIR}")
set(GIT_DIR "${GIT_PARENT_DIR}/.git")
while(NOT EXISTS "${GIT_DIR}") # .git dir not found, search parent directories
set(GIT_PREVIOUS_PARENT "${GIT_PARENT_DIR}")
get_filename_component(GIT_PARENT_DIR ${GIT_PARENT_DIR} PATH)
if(GIT_PARENT_DIR STREQUAL GIT_PREVIOUS_PARENT)
# We have reached the root directory, we are not in git
set(${_refspecvar} "GITDIR-NOTFOUND" PARENT_SCOPE)
set(${_hashvar} "GITDIR-NOTFOUND" PARENT_SCOPE)
return()
endif()
set(GIT_DIR "${GIT_PARENT_DIR}/.git")
endwhile()
# check if this is a submodule
if(NOT IS_DIRECTORY ${GIT_DIR})
file(READ ${GIT_DIR} submodule)
string(REGEX REPLACE "gitdir: (.*)\n$" "\\1" GIT_DIR_RELATIVE ${submodule})
get_filename_component(SUBMODULE_DIR ${GIT_DIR} PATH)
get_filename_component(GIT_DIR ${SUBMODULE_DIR}/${GIT_DIR_RELATIVE} ABSOLUTE)
endif()
set(GIT_DATA "${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/git-data")
if(NOT EXISTS "${GIT_DATA}")
file(MAKE_DIRECTORY "${GIT_DATA}")
endif()
if(NOT EXISTS "${GIT_DIR}/HEAD")
return()
endif()
set(HEAD_FILE "${GIT_DATA}/HEAD")
configure_file("${GIT_DIR}/HEAD" "${HEAD_FILE}" COPYONLY)
configure_file("${_gitdescmoddir}/GetGitRevisionDescription.cmake.in"
"${GIT_DATA}/grabRef.cmake"
@ONLY)
include("${GIT_DATA}/grabRef.cmake")
set(${_refspecvar} "${HEAD_REF}" PARENT_SCOPE)
set(${_hashvar} "${HEAD_HASH}" PARENT_SCOPE)
endfunction()
function(git_describe _var)
if(NOT GIT_FOUND)
find_package(Git QUIET)
endif()
get_git_head_revision(refspec hash)
if(NOT GIT_FOUND)
set(${_var} "GIT-NOTFOUND" PARENT_SCOPE)
return()
endif()
if(NOT hash)
set(${_var} "HEAD-HASH-NOTFOUND" PARENT_SCOPE)
return()
endif()
# TODO sanitize
#if((${ARGN}" MATCHES "&&") OR
# (ARGN MATCHES "||") OR
# (ARGN MATCHES "\\;"))
# message("Please report the following error to the project!")
# message(FATAL_ERROR "Looks like someone's doing something nefarious with git_describe! Passed arguments ${ARGN}")
#endif()
#message(STATUS "Arguments to execute_process: ${ARGN}")
execute_process(COMMAND
"${GIT_EXECUTABLE}"
describe
${hash}
${ARGN}
WORKING_DIRECTORY
"${CMAKE_SOURCE_DIR}"
RESULT_VARIABLE
res
OUTPUT_VARIABLE
out
ERROR_QUIET
OUTPUT_STRIP_TRAILING_WHITESPACE)
if(NOT res EQUAL 0)
set(out "${out}-${res}-NOTFOUND")
endif()
set(${_var} "${out}" PARENT_SCOPE)
endfunction()
function(git_get_exact_tag _var)
git_describe(out --exact-match ${ARGN})
set(${_var} "${out}" PARENT_SCOPE)
endfunction()
@@ -1,41 +0,0 @@
#
# Internal file for GetGitRevisionDescription.cmake
#
# Requires CMake 2.6 or newer (uses the 'function' command)
#
# Original Author:
# 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net>
# http://academic.cleardefinition.com
# Iowa State University HCI Graduate Program/VRAC
#
# Copyright Iowa State University 2009-2010.
# Distributed under the Boost Software License, Version 1.0.
# (See accompanying file LICENSE_1_0.txt or copy at
# http://www.boost.org/LICENSE_1_0.txt)
set(HEAD_HASH)
file(READ "@HEAD_FILE@" HEAD_CONTENTS LIMIT 1024)
string(STRIP "${HEAD_CONTENTS}" HEAD_CONTENTS)
if(HEAD_CONTENTS MATCHES "ref")
# named branch
string(REPLACE "ref: " "" HEAD_REF "${HEAD_CONTENTS}")
if(EXISTS "@GIT_DIR@/${HEAD_REF}")
configure_file("@GIT_DIR@/${HEAD_REF}" "@GIT_DATA@/head-ref" COPYONLY)
else()
configure_file("@GIT_DIR@/packed-refs" "@GIT_DATA@/packed-refs" COPYONLY)
file(READ "@GIT_DATA@/packed-refs" PACKED_REFS)
if(${PACKED_REFS} MATCHES "([0-9a-z]*) ${HEAD_REF}")
set(HEAD_HASH "${CMAKE_MATCH_1}")
endif()
endif()
else()
# detached HEAD
configure_file("@GIT_DIR@/HEAD" "@GIT_DATA@/head-ref" COPYONLY)
endif()
if(NOT HEAD_HASH)
file(READ "@GIT_DATA@/head-ref" HEAD_HASH LIMIT 1024)
string(STRIP "${HEAD_HASH}" HEAD_HASH)
endif()
-71
View File
@@ -1,71 +0,0 @@
{
"version": 3,
"configurePresets": [
{
"name": "base",
"description": "Base Build Configuration",
"binaryDir": "${sourceDir}/out/build/${presetName}",
"installDir": "${sourceDir}/out/install/${presetName}",
"hidden": true
},
{
"name": "windows",
"description": "Windows Build Configuration",
"condition": {
"type": "allOf",
"conditions": [
{
"type": "equals",
"lhs": "$env{MSYSTEM}",
"rhs": ""
},
{
"type": "equals",
"lhs": "${hostSystemName}",
"rhs": "Windows"
}
]
},
"cacheVariables": {
"VCPKG_OVERLAY_TRIPLETS": "${sourceDir}/build-scripts"
},
"hidden": true
},
{
"name": "MSVC",
"inherits": [ "windows" ],
"description": "Visual C++ Configuration",
"toolchainFile": "${sourceDir}/build-scripts/MSVC.cmake",
"cacheVariables": {
"VCPKG_ROOT": "C:/vcpkg"
},
"hidden": true
},
{
"name": "x64-windows-static",
"inherits": [ "base", "MSVC" ],
"description": "Link Statically",
"cacheVariables": {
"VCPKG_TARGET_TRIPLET": "x64-windows-static",
"DYNAMIC_LINKING": "False"
},
"hidden": true
},
{
"name": "windows-tiles-sounds-x64-msvc",
"inherits": [ "x64-windows-static" ],
"displayName": "Windows Tiles Sounds x64 MSVC",
"description": "Target Windows (64-bit) with the Visual Studio development environment. (RelWithDebInfo)",
"cacheVariables": {
"CMAKE_PROJECT_INCLUDE_BEFORE": "${sourceDir}/build-scripts/windows-tiles-sounds-x64-msvc.cmake",
"CMAKE_BUILD_TYPE": "RelWithDebInfo",
"RELEASE": "True",
"CURSES": "False",
"LOCALIZE": "True",
"TILES": "True",
"SOUND": "True",
"TESTS": "False"
}
}
]
}
+1
View File
@@ -0,0 +1 @@
cataclysmdda.org
-25
View File
@@ -1,25 +0,0 @@
## Our Pledge
In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation.
## Our Standards
1. Assume other participants are posting in good faith, even if you disagree with what they say.
2. Make an effort to treat other participants with respect.
1. Do not take a harsh tone towards other participants, and especially don't make personal attacks against them.
2. Recognize that criticism of your statements is not a personal attack on you.
3. Avoid statements about the presumed typical desires, capabilities or actions of some demographic group.
3. Be especially kind to other contributors when saying they made a mistake.
4. Don't argue unceasingly for your preferred course of action when a decision for some other course has already been made.
5. If other participants complain about the way you express your ideas, please make an effort to cater to them.
6. Don't raise unrelated political issues.
7. If you feel these standards are being violated, please alert the project lead Kevin Granade at kevin.granade@gmail.com
## Attribution
This Code of Conduct is adapted from the [Contributor Covenant][CoC homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][CoC version] and the [GNU Kind Communications Guidelines][GKCG homepage].
[CoC homepage]: http://contributor-covenant.org
[CoC version]: http://contributor-covenant.org/version/1/4/
[GKCG homepage]: https://www.gnu.org/philosophy/kind-communication.html
-84
View File
@@ -1,84 +0,0 @@
{
"build_systems":
[
{
"cmd":
[
"make",
"USE_HOME_DIR=1",
"CLANG=1",
"CCACHE=1",
"RELEASE=1"
],
"file_regex": "^(..[^:]*):([0-9]+):?([0-9]+)?:? (.*)$",
"name": "make RELEASE",
"working_dir": "${folder:${project_path:${file_path}}}"
},
{
"cmd":
[
"make",
"USE_HOME_DIR=1",
"CLANG=1",
"CCACHE=1"
],
"file_regex": "^(..[^:]*):([0-9]+):?([0-9]+)?:? (.*)$",
"name": "make",
"working_dir": "${folder:${project_path:${file_path}}}"
},
{
"cmd":
[
"make",
"USE_HOME_DIR=1",
"CLANG=1",
"CCACHE=1",
"TILES=1"
],
"file_regex": "^(..[^:]*):([0-9]+):?([0-9]+)?:? (.*)$",
"name": "make TILES",
"working_dir": "${folder:${project_path:${file_path}}}"
},
{
"cmd":
[
"make",
"USE_HOME_DIR=1",
"CLANG=1",
"CCACHE=1",
"TILES=1",
"RELEASE=1"
],
"file_regex": "^(..[^:]*):([0-9]+):?([0-9]+)?:? (.*)$",
"name": "make RELEASE TILES",
"working_dir": "${folder:${project_path:${file_path}}}"
}
],
"folders":
[
{
"folder_exclude_patterns":
[
"Cataclysm.app"
],
"path": "."
},
{
"path": "~/.cataclysm-dda"
},
{
"path": "~/Library/Application Support/Cataclysm"
}
],
"settings":
{
"AStyleFormatter":
{
"options_c++":
{
"additional_options_file": ".astylerc",
"use_only_additional_options": true
}
}
}
}
+28
View File
@@ -0,0 +1,28 @@
source "https://rubygems.org"
ruby RUBY_VERSION
# Hello! This is where you manage which Jekyll version is used to run.
# When you want to use a different version, change it below, save the
# file and run `bundle install`. Run Jekyll with `bundle exec`, like so:
#
# bundle exec jekyll serve
#
# This will help ensure the proper Jekyll version is running.
# Happy Jekylling!
# gem "jekyll", "3.4.2"
# This is the default theme for new Jekyll sites. You may change this to anything you like.
gem "minima", "~> 2.0"
# If you want to use GitHub Pages, remove the "gem "jekyll"" above and
# uncomment the line below. To upgrade, run `bundle update github-pages`.
gem "github-pages", group: :jekyll_plugins
# If you have any plugins, put them here!
group :jekyll_plugins do
gem "jekyll-feed", "~> 0.6"
end
# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]
-55
View File
@@ -1,55 +0,0 @@
# Issues
## How to create new issues properly
GitHub issues are used for everything from bug reporting to suggesting long-term ideas. You can make everything run much smoother by following some simple rules.
### Rule zero
Always give your issue a meaningful title as this is the first thing anyone will see.
Note: `[CR]` and `[WIP]` "tags" are meaningful only for PRs. All open issues by definition are request for comments and work in progress.
### Bug reports
Before you submit a bug always search the current list of issues to see if it has been reported already.
Your bug report has to include:
- On what OS did you experience the problem (Windows, Linux, OS X etc.)
- What version were you playing:
- Tiles or Curses (text-based)
- Version string (preferably full version e.g. "0.C-4547-g3f1c109", or Jenkins build number e.g. 3245)
- Description of the problem written in a way that enables anyone to try and recreate it
Your bug report may include:
- Screenshot(s) as some things are best explained visually
- Save file (e.g. link to a dropbox upload)
Bonus points for:
- Checking if the bug exists under latest experimental build
- Checking if it is OS specific
The OS and CDDA version are very important - with the pace of changes here it is possible the bug you have encountered has already been fixed. After that reproducibility is the key, so write your report with all the necessary details.
### Enhancements and addition ideas
We have hundreds of issues open - most of them are ideas and suggestions. If you have a general idea or anything that can't be easily described in terms of *current* code changes you'd be better off suggesting it in the appropriate section of [the forum](https://discourse.cataclysmdda.org/). You'll also get much broader exposure for your idea there. After developing a polished idea on the forum, it should be easy to make a GitHub issue for it.
Please first search if something like what you have on mind has been already proposed. If so, feel free to join the discussion! If your idea is related but sufficiently different, open a new issue and refer to the older discussion (use GitHub's `#issue_number` reference system).
Remember to take part in the discussion of your suggestions.
### Questions
You should direct your questions to the forum or ask on IRC. You should also read the included documentation and additional text files, e.g. [COMPILING.md](doc/COMPILING/COMPILING.md) if you have problems building.
## Bounties
Placing a bounty *does not* necessarily mean that change will be incorporated into the main game. Please coordinate in the issue you intend to place a bounty on to determine if it is a change the project will accept, and keep in mind that placing a bounty will not confer special status on the issue. A good way of thinking about bounties is as encouragement for contributors to work on a particular issue, and certainly not as "paying for features".
## Issue resolution
We do not assign people to issues. If you plan to work on a bug fix or a validated idea feel free to just comment about that. Actual PRs are of much greater value than any assignments. In general the first correct PR about something will be the PR that will get merged, but remember: we are using Git - you can collaborate with someone else easily by sending them patches or PRs against their PR branch.
-100
View File
@@ -1,100 +0,0 @@
Copyright (c) 2019 Dimitar Toshkov Zhekov,
with Reserved Font Name "Terminus Font".
Copyright (c) 2017 tisimst
with Reserved Font Name "Vecterminus"
Copyright (c) 2011 Tilman Blumenbach,
with Reserved Font Name "Terminus (TTF)".
This Font Software is licensed under the SIL Open Font License, Version 1.1.
This license is copied below, and is also available with a FAQ at:
http://scripts.sil.org/OFL
-----------------------------------------------------------
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
-----------------------------------------------------------
PREAMBLE
The goals of the Open Font License (OFL) are to stimulate worldwide
development of collaborative font projects, to support the font creation
efforts of academic and linguistic communities, and to provide a free and
open framework in which fonts may be shared and improved in partnership
with others.
The OFL allows the licensed fonts to be used, studied, modified and
redistributed freely as long as they are not sold by themselves. The
fonts, including any derivative works, can be bundled, embedded,
redistributed and/or sold with any software provided that any reserved
names are not used by derivative works. The fonts and derivatives,
however, cannot be released under any other type of license. The
requirement for fonts to remain under this license does not apply
to any document created using the fonts or their derivatives.
DEFINITIONS
"Font Software" refers to the set of files released by the Copyright
Holder(s) under this license and clearly marked as such. This may
include source files, build scripts and documentation.
"Reserved Font Name" refers to any names specified as such after the
copyright statement(s).
"Original Version" refers to the collection of Font Software components as
distributed by the Copyright Holder(s).
"Modified Version" refers to any derivative made by adding to, deleting,
or substituting -- in part or in whole -- any of the components of the
Original Version, by changing formats or by porting the Font Software to a
new environment.
"Author" refers to any designer, engineer, programmer, technical
writer or other person who contributed to the Font Software.
PERMISSION & CONDITIONS
Permission is hereby granted, free of charge, to any person obtaining
a copy of the Font Software, to use, study, copy, merge, embed, modify,
redistribute, and sell modified and unmodified copies of the Font
Software, subject to the following conditions:
1) Neither the Font Software nor any of its individual components,
in Original or Modified Versions, may be sold by itself.
2) Original or Modified Versions of the Font Software may be bundled,
redistributed and/or sold with any software, provided that each copy
contains the above copyright notice and this license. These can be
included either as stand-alone text files, human-readable headers or
in the appropriate machine-readable metadata fields within text or
binary files as long as those fields can be easily viewed by the user.
3) No Modified Version of the Font Software may use the Reserved Font
Name(s) unless explicit written permission is granted by the corresponding
Copyright Holder. This restriction only applies to the primary font name as
presented to the users.
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
Software shall not be used to promote, endorse or advertise any
Modified Version, except to acknowledge the contribution(s) of the
Copyright Holder(s) and the Author(s) or with their explicit written
permission.
5) The Font Software, modified or unmodified, in part or in whole,
must be distributed entirely under this license, and must not be
distributed under any other license. The requirement for fonts to
remain under this license does not apply to any document created
using the Font Software.
TERMINATION
This license becomes null and void if any of the above conditions are
not met.
DISCLAIMER
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
OTHER DEALINGS IN THE FONT SOFTWARE.
-47
View File
@@ -1,47 +0,0 @@
Cataclysm is licensed under the Creative Commons Attribution-ShareAlike 3.0 Unported License. To view a copy of this license, visit http://creativecommons.org/licenses/by-sa/3.0/ or send a letter to Creative Commons, 444 Castro Street, Suite 900, Mountain View, California, 94041, USA.
GNU Unifont (data/font/unifont.ttf) is licensed under GNU General Public License v2+ with the GNU font embedding exception. Visit http://unifoundry.com/LICENSE.txt for details.
Terminus Font (data/font/terminus.ttf) is licensed under the SIL Open Font License (see LICENSE-OFL-Terminus-Font.txt).
Vecterminus Font (data/font/VecTerminus12Medium.otf) is licensed under the SIL Open Font License (see LICENSE-OFL-Terminus-Font.txt).
CATCH unit-test framework (tests/catch/catch.hpp) is licensed under the Boost Software License. Visit https://github.com/philsquared/Catch/blob/master/LICENSE.txt to read the license.
PLF List and PLF Colony (src/list.h, src/colony.h) are licensed under the zLib license (https://www.zlib.net/zlib_license.html).
getpost (tools/json_tools/format/getpost.h) is licensed under the MIT license, see file for text of license.
gulrak filesystem (src/third-party/ghc/*) is licensed under the MIT license, see file for text of license.
libbacktrace is licensed under a BSD license (https://github.com/ianlancetaylor/libbacktrace/blob/master/LICENSE). The full license text is as follows:
# Copyright (C) 2012-2016 Free Software Foundation, Inc.
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
# (1) Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# (2) Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in
# the documentation and/or other materials provided with the
# distribution.
# (3) The name of the author may not be used to
# endorse or promote products derived from this software without
# specific prior written permission.
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
# DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
# INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
# STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
# IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
-1294
View File
File diff suppressed because it is too large Load Diff
-108
View File
@@ -1,108 +0,0 @@
# Cataclysm: Dark Days Ahead
Cataclysm: Dark Days Ahead is a turn-based survival game set in a post-apocalyptic world. While some have described it as a "zombie game", there is far more to Cataclysm than that. Struggle to survive in a harsh, persistent, procedurally generated world. Scavenge the remnants of a dead civilization for food, equipment, or, if you are lucky, a vehicle with a full tank of gas to get you the hell out of Dodge. Fight to defeat or escape from a wide variety of powerful monstrosities, from zombies to giant insects to killer robots and things far stranger and deadlier, and against the others like yourself, who want what you have...
<p align="center">
<img src="./data/screenshots/ultica-showcase-sep-2021.png" alt="Tileset: Ultica">
</p>
## Downloads
**Releases** - [Stable](https://cataclysmdda.org/releases/) | [Experimental](https://cataclysmdda.org/experimental/)
**Source** - The source can be downloaded as a [.zip archive](https://github.com/CleverRaven/Cataclysm-DDA/archive/master.zip), or cloned from our [GitHub repo](https://github.com/CleverRaven/Cataclysm-DDA/).
<a href="https://repology.org/project/cataclysm-dda/versions">
<img src="https://repology.org/badge/vertical-allrepos/cataclysm-dda.svg" alt="Packaging Status" align="right">
</a>
[![General build matrix](https://github.com/CleverRaven/Cataclysm-DDA/actions/workflows/matrix.yml/badge.svg)](https://github.com/CleverRaven/Cataclysm-DDA/actions/workflows/matrix.yml)
[![Coverage Status](https://coveralls.io/repos/github/CleverRaven/Cataclysm-DDA/badge.svg?branch=master)](https://coveralls.io/github/CleverRaven/Cataclysm-DDA?branch=master)
[![Open Source Helpers](https://www.codetriage.com/cleverraven/cataclysm-dda/badges/users.svg)](https://www.codetriage.com/cleverraven/cataclysm-dda)
[![Commit Activity](https://img.shields.io/github/commit-activity/m/CleverRaven/Cataclysm-DDA)](https://github.com/CleverRaven/Cataclysm-DDA/graphs/contributors)
[![Lines of Code](https://tokei.rs/b1/github/CleverRaven/Cataclysm-DDA?category=code)](https://github.com/XAMPPRocky/tokei)
[![TODOs](https://badgen.net/https/api.tickgit.com/badgen/github.com/CleverRaven/Cataclysm-DDA)](https://www.tickgit.com/browse?repo=github.com/CleverRaven/Cataclysm-DDA)
### Packaging status
#### Arch Linux
Ncurses and tiles versions are available in the [community repo](https://www.archlinux.org/packages/?q=cataclysm-dda).
`sudo pacman -S cataclysm-dda`
#### Fedora
Ncurses and tiles versions are available in the [official repos](https://src.fedoraproject.org/rpms/cataclysm-dda).
`sudo dnf install cataclysm-dda`
#### Debian / Ubuntu
Ncurses and tiles versions are available in the [official repos](https://tracker.debian.org/pkg/cataclysm-dda).
`sudo apt install cataclysm-dda-curses cataclysm-dda-sdl`
## Compile
Please read [COMPILING.md](doc/COMPILING/COMPILING.md) - it covers general information and more specific recipes for Linux, OS X, Windows and BSD. See [COMPILER_SUPPORT.md](doc/COMPILING/COMPILER_SUPPORT.md) for details on which compilers we support. And you can always dig for more information in [doc/](https://github.com/CleverRaven/Cataclysm-DDA/tree/master/doc).
We also have the following build guides:
* Building on Windows with `MSYS2` at [COMPILING-MSYS.md](doc/COMPILING/COMPILING-MSYS.md)
* Building on Windows with `vcpkg` at [COMPILING-VS-VCPKG.md](doc/COMPILING/COMPILING-VS-VCPKG.md)
* Building with `cmake` at [COMPILING-CMAKE.md](doc/COMPILING/COMPILING-CMAKE.md) (*unofficial guide*)
## Contribute
Cataclysm: Dark Days Ahead is the result of contributions from over 1000 volunteers under the Creative Commons Attribution ShareAlike 3.0 license. The code and content of the game is free to use, modify, and redistribute for any purpose whatsoever. See https://creativecommons.org/licenses/by-sa/3.0/ for details.
Some code distributed with the project is not part of the project and is released under different software licenses; the files covered by different software licenses have their own license notices.
[<img src="https://www.bountysource.com/badge/tracker?tracker_id=146201" alt="Bountysource" align="right">](https://www.bountysource.com/trackers/146201-clever-raven-cataclysm-dda?utm_source=146201&utm_medium=shield&utm_campaign=TRACKER_BADGE)
Please see [CONTRIBUTING.md](doc/CONTRIBUTING.md) for details.
Special thanks to the contributors, including but not limited to, people below:
<a href="https://github.com/cleverraven/cataclysm-dda/graphs/contributors">
<img src="https://contrib.rocks/image?repo=cleverraven/cataclysm-dda" />
</a>
Made with [contrib.rocks](https://contrib.rocks).
## Community
Forums:
https://discourse.cataclysmdda.org
Wiki:
https://cddawiki.chezzo.com/cdda_wiki/index.php
GitHub repo:
https://github.com/CleverRaven/Cataclysm-DDA
IRC:
`#CataclysmDDA` on [Libera Chat](https://libera.chat), https://web.libera.chat/#CataclysmDDA
Official Discord:
https://discord.gg/jFEc7Yp
## Frequently Asked Questions
#### Is there a tutorial?
Yes, you can find the tutorial in the **Special** menu at the main menu (be aware that due to many code changes the tutorial may not function). You can also access documentation in-game via the `?` key.
#### How can I change the key bindings?
Press the `?` key, followed by the `1` key to see the full list of key commands. Press the `+` key to add a key binding, select which action with the corresponding letter key `a-w`, and then the key you wish to assign to that action.
#### How can I start a new world?
**World** on the main menu will generate a fresh world for you. Select **Create World**.
#### I've found a bug. What should I do?
Please submit an issue on [our GitHub page](https://github.com/CleverRaven/Cataclysm-DDA/issues/) using [bug report template](https://github.com/CleverRaven/Cataclysm-DDA/issues/new?template=bug_report.md). If you're not able to, send an email to `kevin.granade@gmail.com`.
#### I would like to make a suggestion. What should I do?
Please submit an issue on [our GitHub page](https://github.com/CleverRaven/Cataclysm-DDA/issues/) using [feature request template](https://github.com/CleverRaven/Cataclysm-DDA/issues/new?template=feature_request.md).
-66
View File
@@ -1,66 +0,0 @@
The undersigned release all their contributions to the Cataclysm project under the Creative Commons Attribution-ShareAlike 3.0 Unported License.
Kevin Granade <kevin.granade@gmail.com>
Matthew Moffatt <TheDarklingWolf@gmail.com>
origamiwolf <origamiwolf@gmail.com>
Frank Huard <veryinky@gmail.com>
daftfad <daftfjord@gmail.com>
ZwodahS <ericnjf@gmail.com>
Williham "Wito" Totland <williham.totland@gmail.com>
Zach Morgan <zpmorgan@gmail.com>
Livingstone <minexal@gmail.com>
Ethan "Soron" Kaminski <ethan.kaminski@gmail.com>
Soyweiser <soyweiser@gmail.com>
Jason Gilbert <0jason.gilbert@gmail.com>
Charlie Nolan (FunnyMan3595) <funnyman3595@gmail.com>
uzername (some_name) <ivanpost777@gmail.com>
Christian Buskirk (i2amroy) <i2amroy@gmail.com>
Kevin McKayven (GlyphGryph) <glyphgryph@gmail.com>
Ozone <satori.jj@gmail.com>
Herbert Jones <jones.herbert@gmail.com>
Justin "MacrosBlackD" Drury <macrosblackd@gmail.com>
AtomicDryad <fnord@fnord> / <atomicdryad@gmail.com>
Izicata
Voker57 <voker57@gmail.com>
Tommy <yobbobanana@gmx.com>
teh-sam
Alex Casey (Tamunshin) <tamunshin@hotmail.com>
Stevensonz <money3030@yahoo.com.>
David Holmes <dholmes@dholmes.us>
Sean McLaughlin <galenevil@hotmail.com> / <galenevil.eve@gmail.com>
Robert Sørlie (1942rob) <1942rob@gmail.com>
Angela Graves <Rivet.the.Zombie@gmail.com>
Ian Strachan <ian_e_strachan@hotmail.com>
Greg McNew <gmcnew@gmail.com>
NaturesWitness <natureswitness@gmail.com>
CodeHero <codehero@nerdpol.ch>
tasetase "Tase" <tase on irc.freenode.net>
Barry Peddycord III <ishara@isharacomix.org>
Vidar Engh Skaugen <vidarsk@gmail.com>
Brandon Bergren (Bdragon) <bdragon@rtk0.net> / <git@bdragon.rtk0.net>
Henrik "Tivec" Bergvin <henrik@bergvin.com>
FryCarson <frycarson@gmail.com>
TranquilMarmot (Nate Moore) <nate272@gmail.com>
Stéphane Travostino <stephane.travostino@gmail.com>
Jeremy Osborne <jeremywosborne@gmail.com>
David "Davek" Keaton <keaton.david@gmail.com>
Piotr S. Staszewski (drbig) <p.staszewski@gmail.com>
Donnie "Desrik" McNabb <koderkore@gmail.com>
Christian R. Byrne <christianbyrne2012@gmail.com>
Dmitry "illi-kun" Serov <D.E.Serov@gmail.com>
Karl Parakenings (karlnp) <karl.parakenings@gmail.com>
Rob Palkowski <dopeghoti@gmail.com>
Zaweri Runewright <mrampuja@gmail.com>
Cliffs Dover <cliffs@dancingbottle.com>
Sven-Hendrik "svenstaro" Haase <svenstaro@gmail.com>
Nick Owens <mischief@offblast.org>
Brett Dong <brett.browning.dong@gmail.com>
Barry Gackle <bdgackle@gmail.com>
BorkBorkGoesTheCode <imreallytoolazy@protonmail.com>
Patrik Stridvall <patrik@stridvall.se>
Ryan Schneider (RadHazard) <rslego@gmail.com>
Paul Bransford (draeath) <draeath@gmail.com>
Mark Langsdorf (mlangsdorf) <mark.langsdorf@gmail.com> / <mlangsdo@redhat.com>
Ratul Saha (sahaRatul) <ratul.saha@arrakis.in> / <50.ratulsaha@gmail.com>
Davis Bray (Kaltag1925) <pdavisbray@gmail.com>
Nicolas Appriou <nicolas.appriou@gmail.com>
+35
View File
@@ -0,0 +1,35 @@
# Welcome to Jekyll!
#
# This config file is meant for settings that affect your whole blog, values
# which you are expected to set up once and rarely edit after that. If you find
# yourself editing this file very often, consider using Jekyll's data files
# feature for the data you need to update frequently.
#
# For technical reasons, this file is *NOT* reloaded automatically when you use
# 'bundle exec jekyll serve'. If you change this file, please restart the server process.
# Site settings
# These are used to personalize your new site. If you look in the HTML files,
# you will see them accessed via {{ site.title }}, {{ site.email }}, and so on.
# You can create any custom variable you would like, and they will be accessible
# in the templates via {{ site.myvariable }}.
title: "Cataclysm: Dark Days Ahead"
email: kevin.granade@gmail.com
description: > # this means to ignore newlines until "baseurl:"
Official homepage of Cataclysm: Dark Days Ahead open source turn-based survival RPG development project.
Hosts downloads of game and links to community sites and resources.
baseurl: "" # the subpath of your site, e.g. /blog
url: "https://cataclysmdda.org" # the base hostname & protocol for your site, e.g. http://example.com
repository: CleverRaven/Cataclysm-DDA
# Build settings
markdown: kramdown
theme: minima
plugins:
- jekyll-feed
exclude:
- Gemfile
- Gemfile.lock
- vendor
include:
- .well-known
+18
View File
@@ -0,0 +1,18 @@
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>{% if page.title %}{{ page.title | escape }}{% else %}{{ site.title | escape }}{% endif %}</title>
<meta name="description" content="{{ page.excerpt | default: site.description | strip_html | normalize_whitespace | truncate: 160 | escape }}">
<link rel="stylesheet" href="{{ "/assets/main.css" | relative_url }}">
<link rel="canonical" href="{{ page.url | replace:'index.html','' | absolute_url }}">
<link rel="alternate" type="application/rss+xml" title="{{ site.title | escape }}" href="{{ "/feed.xml" | relative_url }}">
<link rel="me" href="https://mastodon.gamedev.place/@kevingranade">
<link rel="me" href="https://social.treehouse.systems/@itsmaya">
{% if jekyll.environment == 'production' and site.google_analytics %}
{% include google-analytics.html %}
{% endif %}
</head>
+31
View File
@@ -0,0 +1,31 @@
<header class="site-header">
<div class="wrapper">
{%- assign default_paths = site.pages | map: "path" -%}
{%- assign page_paths = site.header_pages | default: default_paths -%}
{%- assign titles_size = site.pages | map: 'title' | join: '' | size -%}
<a class="site-title" rel="author" href="{{ "/" | relative_url }}">{{ site.title | escape }}</a>
{%- if titles_size > 0 -%}
<nav class="site-nav">
<input type="checkbox" id="nav-trigger" class="nav-trigger" />
<label for="nav-trigger">
<span class="menu-icon">
<svg viewBox="0 0 18 15" width="18px" height="15px">
<path d="M18,1.484c0,0.82-0.665,1.484-1.484,1.484H1.484C0.665,2.969,0,2.304,0,1.484l0,0C0,0.665,0.665,0,1.484,0 h15.032C17.335,0,18,0.665,18,1.484L18,1.484z M18,7.516C18,8.335,17.335,9,16.516,9H1.484C0.665,9,0,8.335,0,7.516l0,0 c0-0.82,0.665-1.484,1.484-1.484h15.032C17.335,6.031,18,6.696,18,7.516L18,7.516z M18,13.516C18,14.335,17.335,15,16.516,15H1.484 C0.665,15,0,14.335,0,13.516l0,0c0-0.82,0.665-1.483,1.484-1.483h15.032C17.335,12.031,18,12.695,18,13.516L18,13.516z"/>
</svg>
</span>
</label>
<div class="trigger">
<a class="page-link" href="/">Home</a>
<a class="page-link" href="/releases/">Releases</a>
<!--<a class="page-link" href="/changes/">Changes</a>-->
<a class="page-link" href="/contributions/">Contribution Guidelines</a>
<a class="page-link" href="/donations/">Donations</a>
<a class="page-link" href="https://github.com/CleverRaven/Cataclysm-DDA/">GitHub</a>
</div>
</nav>
{%- endif -%}
</div>
</header>
-21
View File
@@ -1,21 +0,0 @@
!config/
!deps*.zip
*.iml
.cxx
.DS_Store
.externalNativeBuild
.gradle
/.idea/libraries
/.idea/workspace.xml
/app/jni/SDL2
/app/jni/SDL2_image
/app/jni/SDL2_mixer
/app/jni/SDL2_ttf
/app/jni/libhidapi
/app/jni/lua
/app/jni/mpg-123
/app/build
/app/src/main/assetsWinHost
/build
/captures
/local.properties
-414
View File
@@ -1,414 +0,0 @@
import org.gradle.internal.os.OperatingSystem;
tasks.withType(JavaCompile) {
options.encoding = 'UTF-8'
//options.compilerArgs << "-Xlint:deprecation"
}
def buildAsLibrary = project.hasProperty('BUILD_AS_LIBRARY');
def buildAsApplication = !buildAsLibrary
if (buildAsApplication) {
apply plugin: 'com.android.application'
} else {
apply plugin: 'com.android.library'
}
def localProperties = new Properties()
def localPropertiesFile = rootProject.file('local.properties')
if (localPropertiesFile.exists()) {
localPropertiesFile.withReader('UTF-8') { reader ->
localProperties.load(reader)
}
}
def keystorePropertiesFilename = 'keystore.properties'
if (localProperties.getProperty('keystorePropertiesFilename') != null) {
keystorePropertiesFilename = localProperties.getProperty("keystorePropertiesFilename")
}
def keystoreProperties = new Properties()
def keystorePropertiesFile = rootProject.file(keystorePropertiesFilename)
if (keystorePropertiesFile.exists()) {
keystorePropertiesFile.withReader('UTF-8') { reader ->
keystoreProperties.load(reader)
}
}
def njobs = getProperty("j")
if (localProperties.getProperty('j') != null) {
njobs = localProperties.getProperty("j")
}
def localize = getProperty("localize").toBoolean()
if (localProperties.getProperty('localize') != null) {
localize = localProperties.getProperty("localize").toBoolean()
}
def abi_arm_32 = getProperty("abi_arm_32").toBoolean()
if (localProperties.getProperty('abi_arm_32') != null) {
abi_arm_32 = localProperties.getProperty("abi_arm_32").toBoolean()
}
def abi_arm_64 = getProperty("abi_arm_64").toBoolean()
if (localProperties.getProperty('abi_arm_64') != null) {
abi_arm_64 = localProperties.getProperty("abi_arm_64").toBoolean()
}
def abi_x86_32 = getProperty("abi_x86_32").toBoolean()
if (localProperties.getProperty('abi_x86_32') != null) {
abi_x86_32 = localProperties.getProperty("abi_x86_32").toBoolean()
}
def abi_x86_64 = getProperty("abi_x86_64").toBoolean()
if (localProperties.getProperty('abi_x86_64') != null) {
abi_x86_64 = localProperties.getProperty("abi_x86_64").toBoolean()
}
def deps = getProperty("deps")
if (localProperties.getProperty('deps') != null) {
deps = localProperties.getProperty("deps")
}
def override_version = getProperty("override_version")
if (localProperties.getProperty('override_version') != null) {
override_version = localProperties.getProperty("override_version")
}
def version_header_path = getProperty("version_header_path")
if (localProperties.getProperty('version_header_path') != null) {
version_header_path = localProperties.getProperty("version_header_path")
}
def override_compileSdkVersion = getProperty("override_compileSdkVersion").toInteger()
if (localProperties.getProperty('override_compileSdkVersion') != null) {
override_compileSdkVersion = localProperties.getProperty("override_compileSdkVersion").toInteger()
}
def override_minSdkVersion = getProperty("override_minSdkVersion").toInteger()
if (localProperties.getProperty('override_minSdkVersion') != null) {
override_minSdkVersion = localProperties.getProperty("override_minSdkVersion").toInteger()
}
def override_targetSdkVersion = getProperty("override_targetSdkVersion").toInteger()
if (localProperties.getProperty('override_targetSdkVersion') != null) {
override_targetSdkVersion = localProperties.getProperty("override_targetSdkVersion").toInteger()
}
def override_ndkBuildAppPlatform = getProperty("override_ndkBuildAppPlatform")
if (localProperties.getProperty('override_ndkBuildAppPlatform') != null) {
override_ndkBuildAppPlatform = localProperties.getProperty("override_ndkBuildAppPlatform")
}
def override_ndkVersion = getProperty("override_ndkVersion")
if (localProperties.getProperty('override_ndkVersion') != null) {
override_ndkVersion = localProperties.getProperty('override_ndkVersion')
}
println("Using [ njobs]: $njobs")
println("Using [ localize]: $localize")
println("Using [ deps]: $deps")
println("Using [ override_version]: $override_version")
println("Using [version_header_path]: $version_header_path")
println("Using [ compileSdkVersion]: $override_compileSdkVersion")
println("Using [ minSdkVersion]: $override_minSdkVersion")
println("Using [ targetSdkVersion]: $override_targetSdkVersion")
println("Using [ndkBuildAppPlatform]: $override_ndkBuildAppPlatform")
println("Using [ ndkVersion]: $override_ndkVersion")
println("Using [ abi_arm_32]: $abi_arm_32")
println("Using [ abi_arm_64]: $abi_arm_64")
println("Using [ abi_x86_32]: $abi_x86_32")
println("Using [ abi_x86_64]: $abi_x86_64")
if (!abi_arm_32 && !abi_arm_64 && !abi_x86_32 && !abi_x86_64) {
throw new GradleException("All supported ABI properties are set to false!")
}
if (!file(deps).exists()) {
throw new GradleException("Dependencies file does not exist:" + deps)
}
if (!override_version.isEmpty()) {
if (version_header_path.isEmpty()) {
throw new GradleException("`version_header_path` cannot be empty when `override_version` is not empty")
} else {
println("Overriding version number to $override_version using path $version_header_path")
}
}
def projectRoot = './../..'
def assetsDir = 'src/main/assets'
def assetsDirWindows = 'src/main/assetsWinHost'
task unzipDeps(type: Copy) {
println("Using dependencies file: $deps")
def zipFile = new File("$deps")
def outputDir = new File('.')
from zipTree(zipFile)
into outputDir
}
task makeLocalization(type: Exec) {
def args = []
if (localize) {
println("Building with localization")
switch (OperatingSystem.current()) {
case OperatingSystem.LINUX:
args = ['make', 'localization', 'LANGUAGES=all']
break
case OperatingSystem.WINDOWS:
args = ['sh.exe', 'lang/compile_mo.sh']
break
default:
args = ['echo', 'Building without localization']
break
}
} else {
args = ['echo', 'Building without localization']
if (OperatingSystem.current() == OperatingSystem.WINDOWS) {
args = ['cmd.exe', '/k'] + args
}
}
workingDir projectRoot
commandLine args
}
task generateVersionHeader() {
// this taks imitates `make version` while respecting version_header_path
if (override_version.isEmpty()) {
println("Generating version number to $version_header_path")
def output = new ByteArrayOutputStream()
exec {
workingDir projectRoot
commandLine 'git', 'describe', '--tags', '--always', '--dirty', '--match', '"[0-9A-Z]*.[0-9A-Z]*"'
standardOutput output
}
override_version = output.toString()
override_version = override_version.split()[0] // strip whitespaces
} else {
println("Overriding version number to $override_version")
}
def define = "// NOLINT(cata-header-guard)\n#define VERSION \"$override_version\"\n"
def versionHeader = new File("$version_header_path")
if (!versionHeader.exists() || versionHeader.text != define) {
versionHeader.text = define
}
}
task createWindowsJunctionLinks() {
onlyIf {
OperatingSystem.current() == OperatingSystem.WINDOWS
}
doLast {
def mkJunction = { to, from ->
def errOut = new ByteArrayOutputStream()
exec {
commandLine 'cmd', '/k', "mklink /J $to $from"
errorOutput errOut
standardOutput new ByteArrayOutputStream() // don't print the output
}
def errString = errOut.toString()
if (!errString.isEmpty() && !errString.endsWith('already exists.\r\n')) {
// we have an error that is not 'file already exists'
errString = errString.substring(0, errString.size() - 2) // discard \r\n
throw new GradleException("$errString")
}
}
println("Creating junctions for the assets")
mkdir assetsDirWindows
mkdir "$assetsDirWindows/lang"
def rootDir = projectRoot.replace('/', '\\')
def unixAssetsDir = assetsDir.replace('/', '\\')
def winAssetsDir = assetsDirWindows.replace('/', '\\')
mkJunction("$winAssetsDir\\android", "$unixAssetsDir\\android")
for (dir in ['data', 'gfx', 'lang\\mo']) {
mkJunction("$winAssetsDir\\$dir", "$rootDir\\$dir")
}
}
}
preBuild.dependsOn unzipDeps
preBuild.dependsOn makeLocalization
preBuild.dependsOn generateVersionHeader
preBuild.dependsOn createWindowsJunctionLinks
createWindowsJunctionLinks.dependsOn makeLocalization
android {
namespace "com.cleverraven.cataclysmdda"
compileSdkVersion override_compileSdkVersion
ndkVersion override_ndkVersion
defaultConfig {
minSdkVersion override_minSdkVersion
targetSdkVersion override_targetSdkVersion
versionCode Integer.valueOf(System.env.UPSTREAM_BUILD_NUMBER ?: 1)
versionName new File("$version_header_path").text.split('\"')[1]
if (buildAsApplication) {
applicationId "com.cleverraven.cataclysmdda"
setProperty("archivesBaseName", "cataclysmdda-" + versionName)
}
resValue "string", "app_name", "Cataclysm DDA"
splits {
// Configures multiple APKs based on ABI.
abi {
// Enables building multiple APKs per ABI.
enable true
// Resets the list of ABIs that Gradle should create APKs for to none.
reset()
// Specifies a list of ABIs that Gradle should create APKs for.
if (abi_arm_32) {
include "armeabi-v7a"
}
if (abi_arm_64) {
include "arm64-v8a"
}
if (abi_x86_32) {
include "x86"
}
if (abi_x86_64) {
include "x86_64"
}
// Specifies that we do not want to also generate a universal APK that includes all ABIs.
universalApk false
}
}
externalNativeBuild {
ndkBuild {
arguments "APP_PLATFORM=$override_ndkBuildAppPlatform", "-j$njobs"
}
}
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
flavorDimensions "version"
productFlavors {
stable {
dimension "version"
resValue "string", "app_name", "Cataclysm DDA"
}
experimental {
dimension "version"
applicationIdSuffix ".experimental"
resValue "string", "app_name", "Cataclysm DDA (experimental)"
}
}
signingConfigs {
if (keystoreProperties.getProperty('storeFile') != null) {
if (file(keystoreProperties.getProperty('storeFile')).exists()) {
release {
storeFile file(keystoreProperties.getProperty("storeFile"))
storePassword keystoreProperties.getProperty("storePassword")
keyAlias keystoreProperties.getProperty("keyAlias")
keyPassword keystoreProperties.getProperty("keyPassword")
}
} else {
throw new GradleException("Keystore file " + keystoreProperties.getProperty("storeFile") + " was not found.\n")
}
}
if (keystoreProperties.getProperty('debug_storeFile') != null) {
if (file(keystoreProperties.getProperty('debug_storeFile')).exists()) {
debug {
storeFile file(keystoreProperties.getProperty("debug_storeFile"))
storePassword keystoreProperties.getProperty("debug_storePassword")
keyAlias keystoreProperties.getProperty("debug_keyAlias")
keyPassword keystoreProperties.getProperty("debug_keyPassword")
}
} else {
throw new GradleException("Keystore file " + keystoreProperties.getProperty("debug_storeFile") + " was not found.\n")
}
}
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
if (signingConfigs.hasProperty("release")) {
signingConfig signingConfigs.release
}
externalNativeBuild {
ndkBuild {
cFlags "-DNDEBUG", "-DRELEASE", "-Os", "-g"
}
}
ndk {
debugSymbolLevel 'SYMBOL_TABLE'
}
}
debug {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
if (signingConfigs.hasProperty("debug")) {
signingConfig signingConfigs.debug
}
externalNativeBuild {
ndkBuild {
cFlags "-g"
}
}
ndk {
debugSymbolLevel 'FULL'
}
}
}
if (!project.hasProperty('EXCLUDE_NATIVE_LIBS')) {
sourceSets.main {
jniLibs.srcDir 'libs'
}
externalNativeBuild {
ndkBuild {
path 'jni/Android.mk'
}
}
}
lintOptions {
abortOnError false
}
if (OperatingSystem.current() == OperatingSystem.WINDOWS) {
sourceSets.main.assets.srcDirs = ['src/main/assetsWinHost']
}
if (buildAsLibrary) {
libraryVariants.all { variant ->
variant.outputs.each { output ->
def outputFile = output.outputFile
if (outputFile != null && outputFile.name.endsWith(".aar")) {
def fileName = "$applicationId.aar";
output.outputFile = new File(outputFile.parent, fileName);
}
}
}
}
}
sourceSets {
main {
java {
srcDirs = ['src/main/java']
}
resources {
srcDirs = ['src/main/res']
}
}
stable {
}
experimental {
resources {
srcDirs = ['src/experimental/res']
}
}
}
dependencies {
api fileTree(include: ['*.jar'], dir: 'libs')
}
Binary file not shown.
Binary file not shown.
-3
View File
@@ -1,3 +0,0 @@
# Reference: https://developer.android.com/ndk/guides/android_mk.html
include $(call all-subdir-makefiles)
-17
View File
@@ -1,17 +0,0 @@
# Reference: https://developer.android.com/ndk/guides/application_mk.html
# See CPLUSPLUS-SUPPORT.html in the NDK documentation for more information
APP_STL := c++_shared
APP_CPPFLAGS += -std=c++17
ifneq ($(OS),Windows_NT)
APP_LDFLAGS += -fuse-ld=lld
endif
# Do not specify APP_OPTIM here, it is done through ndk-build NDK_DEBUG=0/1 setting instead
# See https://developer.android.com/ndk/guides/ndk-build.html#dvr
#APP_OPTIM := debug
#APP_OPTIM := release
# Min SDK level
APP_PLATFORM=android-16
-30
View File
@@ -1,30 +0,0 @@
LOCAL_PATH := $(call my-dir)/../../../../src
include $(CLEAR_VARS)
LOCAL_MODULE := main
LOCAL_CPP_FEATURES := exceptions rtti
# Add your application source files here...
CATA_SRCS := $(sort $(wildcard $(LOCAL_PATH)/*.cpp))
LOCAL_SRC_FILES := $(sort $(CATA_SRCS:$(LOCAL_PATH)/%=%))
LOCAL_STATIC_LIBRARIES := third-party
LOCAL_SHARED_LIBRARIES := libhidapi SDL2 SDL2_mixer SDL2_image SDL2_ttf mpg123
LOCAL_LDLIBS := -lGLESv1_CM -lGLESv2 -llog -lz
LOCAL_CFLAGS += -DTILES=1 -DSDL_SOUND=1 -DBACKTRACE=1 -DLOCALIZE=1 -Wextra -Wall -fsigned-char
LOCAL_LDFLAGS += $(LOCAL_CFLAGS)
ifeq ($(OS),Windows_NT)
# needed to bypass 8191 character limit on Windows command line
LOCAL_SHORT_COMMANDS := true
endif
include $(BUILD_SHARED_LIBRARY)
include $(LOCAL_PATH)/../android/app/jni/src/third-party/Android.mk
-24
View File
@@ -1,24 +0,0 @@
LOCAL_PATH := $(call my-dir)/../../../../../src/third-party
include $(CLEAR_VARS)
LOCAL_C_INCLUDES := $(LOCAL_PATH) $(LOCAL_PATH)/..
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)
LOCAL_MODULE := third-party
LOCAL_CPP_FEATURES := exceptions rtti
# Add your application source files here...
FLATBUFFERS_SRCS := $(sort $(wildcard $(LOCAL_PATH)/flatbuffers/*.cpp))
LOCAL_SRC_FILES := $(sort $(FLATBUFFERS_SRCS:$(LOCAL_PATH)/%=%))
LOCAL_CFLAGS += -DBACKTRACE=1 -DLOCALIZE=1 -Wextra -Wall -fsigned-char
ifeq ($(OS),Windows_NT)
# needed to bypass 8191 character limit on Windows command line
LOCAL_SHORT_COMMANDS := true
endif
include $(BUILD_STATIC_LIBRARY)
-17
View File
@@ -1,17 +0,0 @@
# Add project specific ProGuard rules here.
# By default, the flags in this file are appended to flags specified
# in [sdk]/tools/proguard/proguard-android.txt
# You can edit the include path and order by changing the proguardFiles
# directive in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html
# Add any project specific keep options here:
# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

@@ -1,15 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item
android:drawable="@color/black"/>
<item>
<bitmap
android:gravity="center"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:src="@drawable/splash"/>
</item>
</layer-list>
Binary file not shown.

Before

Width:  |  Height:  |  Size: 92 KiB

@@ -1,7 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="black">#000000</color>
<color name="accent_material_dark">#990026</color>
<color name="primary_material_dark">#212121</color>
<color name="background_material_dark">#212121</color>
</resources>
@@ -1,5 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="installing">Installing game data...</string>
<string name="upgrading">Upgrading game data...</string>
</resources>
@@ -1,10 +0,0 @@
<resources>
<style name="AppTheme" parent="@android:style/Theme.Material.NoActionBar.Fullscreen">
<item name="android:windowBackground">@drawable/background_splash</item>
<item name="android:colorAccent">@color/accent_material_dark</item>
<item name="android:colorPrimary">@color/primary_material_dark</item>
<item name="android:colorBackground">@color/background_material_dark</item>
</style>
</resources>
-63
View File
@@ -1,63 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Replace com.test.game with the identifier of your game below, e.g.
com.gamemaker.game
-->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
android:versionCode="1"
android:versionName="1.0"
android:installLocation="auto">
<!-- OpenGL ES 2.0 -->
<uses-feature android:glEsVersion="0x00020000" />
<!-- Allow writing to external storage -->
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<!-- Allow access to the vibrator -->
<uses-permission android:name="android.permission.VIBRATE" />
<!-- if you want to capture audio, uncomment this. -->
<!-- <uses-permission android:name="android.permission.RECORD_AUDIO" /> -->
<!-- Create a Java class extending SDLActivity and place it in a
directory under app/src/main/java matching the package, e.g. app/src/main/java/com/gamemaker/game/MyGame.java
then replace "SDLActivity" with the name of your class (e.g. "MyGame")
in the XML below.
An example Java class can be found in README-android.md
-->
<application android:label="@string/app_name"
android:icon="@drawable/ic_launcher"
android:allowBackup="true"
android:theme="@style/AppTheme"
android:hardwareAccelerated="true"
android:isGame="true" >
<!-- Example of setting SDL hints from AndroidManifest.xml:
<meta-data android:name="SDL_ENV.SDL_ACCELEROMETER_AS_JOYSTICK" android:value="0"/>
-->
<activity android:name="SplashScreen"
android:label="@string/app_name"
android:launchMode="singleInstance"
android:keepScreenOn="true"
android:screenOrientation="userLandscape"
android:configChanges="keyboardHidden|keyboard|orientation|screenSize|navigation"
android:exported="true"
>
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name="CataclysmDDA"
android:label="@string/app_name"
android:launchMode="singleInstance"
android:keepScreenOn="true"
android:screenOrientation="userLandscape"
android:configChanges="keyboardHidden|keyboard|orientation|screenSize|navigation"
>
</activity>
</application>
</manifest>
Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.5 KiB

-1
View File
@@ -1 +0,0 @@
../../../../../data

Some files were not shown because too many files have changed in this diff Show More