Compare commits
190 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 625a0ec5ec | |||
| 6b79ead016 | |||
| f2504649e9 | |||
| b4326d972d | |||
| 2f23974f81 | |||
| 26c4be927a | |||
| 87baa3cc79 | |||
| 189354b8e9 | |||
| 345c1c0d27 | |||
| c98ee8dbef | |||
| 6b2ab31824 | |||
| 31ad94a1ee | |||
| 33f71fa042 | |||
| 8e35b4dd35 | |||
| 47de02a172 | |||
| 256f1a99de | |||
| 1361276e1a | |||
| 54a996a989 | |||
| d13493e7fe | |||
| d1f3bd9938 | |||
| cb164a8236 | |||
| 88a9b6ce7b | |||
| 97b6d7e4cf | |||
| cf3250e11b | |||
| d1cf4fcf61 | |||
| afd99f6ec0 | |||
| fcfe75b906 | |||
| 17d955042f | |||
| 1a72165a2c | |||
| 834754b3a3 | |||
| 160bd243a6 | |||
| ba6c7353d9 | |||
| 90c1b7b5c1 | |||
| b83267d257 | |||
| c9915d2b0b | |||
| bb38735679 | |||
| 1f2ba5df16 | |||
| 04850d017f | |||
| ac04d717af | |||
| ddbb41e71a | |||
| 856e285427 | |||
| 3d0816a284 | |||
| c1d8ec0cd2 | |||
| dc817bf2b9 | |||
| 9452acb749 | |||
| c850ae3aea | |||
| 7e43f1bfbf | |||
| d0f8c7c6a9 | |||
| 1e3420aa8f | |||
| 62185ef48b | |||
| e851085b9b | |||
| 748a5ed5b5 | |||
| 4b62a06af9 | |||
| f191347e05 | |||
| a195028061 | |||
| 72ccb94cba | |||
| 53541e8e38 | |||
| 40d1691b40 | |||
| d38c685772 | |||
| b56181e59f | |||
| 8496a93690 | |||
| 3984f0197f | |||
| 73827b40c8 | |||
| 42e34087fc | |||
| 7292ac7b92 | |||
| 931236ec82 | |||
| d25a043958 | |||
| 8c2f5c109a | |||
| f2834c0079 | |||
| 487a686c9a | |||
| 5f8eb8d704 | |||
| 8ee5a039d9 | |||
| 6f62316525 | |||
| e86adb7b4a | |||
| bc139be5ac | |||
| 89606d54f1 | |||
| afaeab92a6 | |||
| e2a81e3626 | |||
| 80c519df6b | |||
| 85b70b1bef | |||
| 10c7b24130 | |||
| 725700952e | |||
| 386d664d2f | |||
| d17b905747 | |||
| f6d198b4fb | |||
| 5e81da6827 | |||
| 8c6b82564a | |||
| dd72f62e06 | |||
| 90dd579372 | |||
| c3c77d79ed | |||
| 128d69039e | |||
| 668ca4d4d5 | |||
| 33e7dc1b04 | |||
| 856b06a9d7 | |||
| 6a95b78584 | |||
| b5631470ad | |||
| 757e29b223 | |||
| 6e17b80cd2 | |||
| d9e8b3bb17 | |||
| 3889ef8d11 | |||
| 9d16ab056b | |||
| 339b665712 | |||
| 71c2f0acf9 | |||
| 6c79e7fb41 | |||
| 98220d224f | |||
| c57923f1a9 | |||
| 13beb3e0f4 | |||
| c5e612a48b | |||
| 14cd8db985 | |||
| 194c87c271 | |||
| d5478c5d26 | |||
| ffd16169a8 | |||
| 69321de26f | |||
| 2608758799 | |||
| 1d2f7bff6b | |||
| b7eb63e481 | |||
| c9efd9e07d | |||
| 2fbb555d1f | |||
| d05bb314c6 | |||
| a8202034ed | |||
| a072ef1ac8 | |||
| c779eaa368 | |||
| e252913a04 | |||
| a7a4b27974 | |||
| db309cab30 | |||
| 44eb59a505 | |||
| dedf57fac0 | |||
| e398f9bafd | |||
| 979b06b3d7 | |||
| 764717a692 | |||
| 955ddf5a68 | |||
| c11694c8f5 | |||
| 71c137cb7b | |||
| 236a8eaf2b | |||
| 11584605aa | |||
| 7ba6ddd36c | |||
| 1919ec2d1f | |||
| 4e0431a322 | |||
| 32dfe1835c | |||
| 39c70d5215 | |||
| 53f46d6cbc | |||
| cac6b77701 | |||
| 10a53e345e | |||
| 858cb2c70c | |||
| 55917f29ee | |||
| 8e298bf3c8 | |||
| 2cd7f3b231 | |||
| df8b9c496b | |||
| 26ed97b25e | |||
| 89b144fe69 | |||
| 7a090660f0 | |||
| 1b864a9a90 | |||
| f302db99fd | |||
| aa71c25eee | |||
| 8ddb42e3b7 | |||
| 3d3b660f35 | |||
| b648d80e52 | |||
| aa744bfc9d | |||
| 157c2f3ebc | |||
| 0277830d44 | |||
| 4478b07e9c | |||
| 9fbd2684e8 | |||
| ad69d1bbbe | |||
| c83d72ee59 | |||
| 079f0e3cbc | |||
| 6d26f077ca | |||
| 884582f056 | |||
| dc01a8cb0b | |||
| 843e548735 | |||
| 3f8605b480 | |||
| fb5597ecc2 | |||
| c0f9e865bd | |||
| c406d589a4 | |||
| 2ca266e1f2 | |||
| 0ed563b102 | |||
| 114c25454b | |||
| eedabd57c2 | |||
| 07b6f36115 | |||
| f87bf17412 | |||
| 877552c3a4 | |||
| 07fcf7d196 | |||
| dff69f7269 | |||
| 9654131119 | |||
| ff4619146e | |||
| 0e366475a3 | |||
| b420f16e3c | |||
| 2d50f82c1b | |||
| 7e99570f41 | |||
| 51f537e2fc | |||
| 6e566bb0dd |
@@ -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
|
||||
@@ -1,76 +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,\
|
||||
-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
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
@@ -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
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
@@ -1 +0,0 @@
|
||||
../doc/CONTRIBUTING.md
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -1,39 +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
|
||||
|
||||
keywords:
|
||||
- name: confirm-bug
|
||||
value: '\/(C|c)onfirm.*'
|
||||
@@ -1,271 +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**"
|
||||
|
||||
"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**"
|
||||
@@ -1,40 +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. -->
|
||||
@@ -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|$)"
|
||||
@@ -1,5 +0,0 @@
|
||||
set(VCPKG_TARGET_ARCHITECTURE x64)
|
||||
set(VCPKG_CRT_LINKAGE static)
|
||||
set(VCPKG_LIBRARY_LINKAGE static)
|
||||
|
||||
set(VCPKG_BUILD_TYPE release)
|
||||
@@ -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)
|
||||
@@ -1,5 +0,0 @@
|
||||
set(VCPKG_TARGET_ARCHITECTURE x86)
|
||||
set(VCPKG_CRT_LINKAGE dynamic)
|
||||
set(VCPKG_LIBRARY_LINKAGE dynamic)
|
||||
|
||||
set(VCPKG_BUILD_TYPE release)
|
||||
@@ -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,13 +0,0 @@
|
||||
name: Detect missions that are missing .start.assign_mission_target.om_special
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
paths:
|
||||
- '**.json'
|
||||
|
||||
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
|
||||
@@ -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
|
||||
@@ -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."
|
||||
});
|
||||
|
||||
@@ -1,21 +0,0 @@
|
||||
name: Check printf format string in translations
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
paths:
|
||||
- 'lang/po/*.po'
|
||||
- 'tools/check_po_printf_format.py'
|
||||
|
||||
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
|
||||
@@ -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
|
||||
- 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
|
||||
@@ -1,31 +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'
|
||||
|
||||
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
|
||||
|
||||
@@ -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
|
||||
@@ -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
|
||||
});
|
||||
@@ -1,29 +0,0 @@
|
||||
name: Flake8 Python linting
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
paths:
|
||||
- '**.py'
|
||||
pull_request:
|
||||
branches:
|
||||
- master
|
||||
paths:
|
||||
- '**.py'
|
||||
|
||||
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
|
||||
@@ -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
|
||||
@@ -1,13 +0,0 @@
|
||||
name: "Pull Request Labeler"
|
||||
on:
|
||||
- pull_request_target
|
||||
|
||||
jobs:
|
||||
triage:
|
||||
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: ""
|
||||
@@ -1,40 +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-check && make astyle-fast && make style-all-json-parallel
|
||||
|
||||
- name: 'suggester / JSON & C++'
|
||||
uses: reviewdog/action-suggester@v1
|
||||
if: ${{ failure() }}
|
||||
with:
|
||||
tool_name: 'JSON & C++ formatters'
|
||||
@@ -1,334 +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:
|
||||
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++-6.0
|
||||
os: ubuntu-18.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 6, Ubuntu, Curses)
|
||||
# ~190MB in a clean build
|
||||
# ~30MB compressed
|
||||
# observed usage: 3.0GB -> 300MB
|
||||
ccache_limit: 2G
|
||||
|
||||
- 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
|
||||
|
||||
- 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
|
||||
|
||||
- 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
|
||||
|
||||
- compiler: clang++
|
||||
os: macos-10.15
|
||||
release: 0
|
||||
cmake: 0
|
||||
native: osx
|
||||
sanitize: undefined
|
||||
tiles: 1
|
||||
sound: 1
|
||||
localize: 1
|
||||
title: Clang 12, macOS 10.15, Tiles, Sound, UBSan
|
||||
# ~880MB ccache-compressed in a clean build
|
||||
# ~100 compressed
|
||||
# observed usage: 3.85GB -> 500MB
|
||||
ccache_limit: 4G
|
||||
|
||||
- compiler: g++
|
||||
os: ubuntu-latest
|
||||
release: 0
|
||||
cmake: 0
|
||||
native:
|
||||
tiles: 1
|
||||
sound: 1
|
||||
localize: 1
|
||||
libbacktrace: 1
|
||||
title: GCC 11, Ubuntu cross-compile to MinGW-Win64, Tiles, Sound
|
||||
ldflags: -static-libgcc -static-libstdc++
|
||||
mxe_target: x86_64-w64-mingw32.static.gcc11
|
||||
wine: wine
|
||||
# ~285MB in a clean build
|
||||
# ~36MB compressed
|
||||
# observed usage: 3.0GB -> 350MB
|
||||
ccache_limit: 2G
|
||||
|
||||
- compiler: g++-7
|
||||
os: ubuntu-18.04
|
||||
release: 1
|
||||
cmake: 1
|
||||
tiles: 1
|
||||
sound: 1
|
||||
localize: 0
|
||||
native: linux64
|
||||
title: GCC 7, Ubuntu, Tiles, Sound, CMake
|
||||
# ~180MB in a clean build
|
||||
# ~25MB compressed
|
||||
# observed usage: 3.0GB -> 300MB
|
||||
ccache_limit: 2G
|
||||
|
||||
# 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 6, 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 old GCC (Ubuntu)
|
||||
if: ${{ env.SKIP == 'false' && runner.os == 'Linux' && (matrix.compiler == 'g++-7' || matrix.compiler == 'g++-8') }}
|
||||
run: |
|
||||
sudo apt-get install g++-7 g++-8
|
||||
- name: install new GCC (Ubuntu)
|
||||
if: ${{ env.SKIP == 'false' && runner.os == 'Linux' && (matrix.compiler == 'g++-11') }}
|
||||
run: |
|
||||
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
|
||||
sudo apt-get update
|
||||
sudo apt-get install g++-11
|
||||
- name: install old Clang (Ubuntu)
|
||||
if: ${{ env.SKIP == 'false' && runner.os == 'Linux' && (matrix.compiler == 'clang++-6.0') }}
|
||||
run: |
|
||||
sudo apt-get install clang-6.0
|
||||
- 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 dependencies (mac)
|
||||
if: ${{ env.SKIP == 'false' && runner.os == 'macOS' }}
|
||||
run: |
|
||||
HOMEBREW_NO_AUTO_UPDATE=yes HOMEBREW_NO_INSTALL_CLEANUP=yes brew install sdl2 sdl2_image sdl2_ttf sdl2_mixer 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 '~/.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 }}-${{ runner.os }}-${{ matrix.compiler }}--${{ steps.get-vars.outputs.datetime }}
|
||||
restore-keys: |
|
||||
ccache-master-${{ runner.os }}-${{ matrix.compiler }}--
|
||||
- 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
|
||||
ccache -M ${{ env.CCACHE_LIMIT }}
|
||||
ccache -c
|
||||
ccache --show-stats
|
||||
- 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
|
||||
@@ -1,204 +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:
|
||||
# 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.4
|
||||
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', '.github/vcpkg_triplets/**' ) }}-x64
|
||||
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: '12b7cfe6109a9d68319334b56a01c44a302a13b6'
|
||||
|
||||
- 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
|
||||
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
|
||||
run: |
|
||||
Write-Output "::add-matcher::build-scripts/problem-matchers/catch2.json"
|
||||
Write-Output "::add-matcher::build-scripts/problem-matchers/debugmsg.json"
|
||||
|
||||
- name: Run tests
|
||||
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
|
||||
});
|
||||
@@ -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'
|
||||
@@ -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,38 +0,0 @@
|
||||
name: "Push translation template"
|
||||
|
||||
concurrency: push_transifex
|
||||
|
||||
on:
|
||||
workflow_run:
|
||||
workflows: ["Experimental Release"]
|
||||
types:
|
||||
- completed
|
||||
|
||||
|
||||
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
|
||||
@@ -1,356 +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 x32 MSVC
|
||||
artifact: windows-tiles-x32-msvc
|
||||
arch: x86
|
||||
os: windows-2019
|
||||
mxe: none
|
||||
ext: zip
|
||||
content: application/zip
|
||||
sound: 0
|
||||
- name: Windows Tiles Sounds x32 MSVC
|
||||
artifact: windows-tiles-sounds-x32-msvc
|
||||
arch: x86
|
||||
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: Windows Tiles x32
|
||||
mxe: i686
|
||||
artifact: windows-tiles-x32
|
||||
os: ubuntu-latest
|
||||
ext: zip
|
||||
content: application/zip
|
||||
sound: 0
|
||||
- name: Windows Tiles Sounds x32
|
||||
mxe: i686
|
||||
artifact: windows-tiles-sounds-x32
|
||||
os: ubuntu-latest
|
||||
ext: zip
|
||||
content: application/zip
|
||||
sound: 1
|
||||
- name: Linux Tiles x64
|
||||
os: ubuntu-18.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-18.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-18.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-10.15
|
||||
mxe: none
|
||||
tiles: 0
|
||||
sound: 0
|
||||
artifact: osx-curses-x64
|
||||
ext: dmg
|
||||
content: application/x-apple-diskimage
|
||||
- name: OSX Tiles x64
|
||||
os: macos-10.15
|
||||
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.2
|
||||
id: runvcpkg
|
||||
with:
|
||||
appendedCacheKey: ${{ hashFiles( 'msvc-full-features/vcpkg.json', '.github/vcpkg_triplets/**' ) }}-${{ 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: '12b7cfe6109a9d68319334b56a01c44a302a13b6'
|
||||
- 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-gcc-11.2/mxe-${{ matrix.mxe }}.tar.xz
|
||||
curl -L -o mxe-${{ matrix.mxe }}.tar.xz.sha256 https://github.com/BrettDong/MXE-GCC/releases/download/mxe-gcc-11.2/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 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.gcc11
|
||||
- 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 dependencies (mac)
|
||||
if: runner.os == 'macOS'
|
||||
run: |
|
||||
HOMEBREW_NO_AUTO_UPDATE=yes HOMEBREW_NO_INSTALL_CLEANUP=yes brew install sdl2 sdl2_image sdl2_ttf sdl2_mixer 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.gcc11-
|
||||
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:
|
||||
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.12 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: '8'
|
||||
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"
|
||||
@@ -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.*, ',') }}
|
||||
@@ -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'
|
||||
@@ -1,65 +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: |
|
||||
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: |
|
||||
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 }}'
|
||||
})
|
||||
@@ -1,80 +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'
|
||||
|
||||
|
||||
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
|
||||
@@ -1,28 +0,0 @@
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
paths:
|
||||
- 'doc/JSON_INFO.md'
|
||||
name: TOC Generator
|
||||
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
|
||||
```
|
||||
@@ -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"
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
@@ -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
|
||||
@@ -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
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
1e7d902c-02b7-4619-bf01-fe4b9c0ba8ca
|
||||
@@ -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 14)
|
||||
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")
|
||||
|
||||
@@ -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
|
||||
)
|
||||
@@ -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)
|
||||
@@ -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)
|
||||
@@ -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)
|
||||
@@ -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)
|
||||
@@ -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()
|
||||
@@ -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,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
|
||||
@@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,304 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
|
||||
<CodeBlocks_project_file>
|
||||
<FileVersion major="1" minor="6" />
|
||||
<Project>
|
||||
<Option title="Cataclysm" />
|
||||
<Option pch_mode="2" />
|
||||
<Option compiler="gcc" />
|
||||
<Build>
|
||||
<Target title="Release">
|
||||
<Option output="Cataclysm" prefix_auto="1" extension_auto="1" />
|
||||
<Option object_output="obj/Release/" />
|
||||
<Option type="0" />
|
||||
<Option compiler="gcc" />
|
||||
<Compiler>
|
||||
<Add option="-Os" />
|
||||
<Add option="-O2" />
|
||||
<Add option="-DRELEASE=1" />
|
||||
</Compiler>
|
||||
</Target>
|
||||
<Target title="Release (Localized)">
|
||||
<Option output="CataclysmWin" prefix_auto="1" extension_auto="1" />
|
||||
<Option object_output="obj/ReleaseLocalized/" />
|
||||
<Option type="0" />
|
||||
<Option compiler="gcc" />
|
||||
<Compiler>
|
||||
<Add option="-Os" />
|
||||
<Add option="-O2" />
|
||||
<Add option="-DLOCALIZE=1" />
|
||||
<Add option="-DRELEASE=1" />
|
||||
<Add directory="WinDepend/include" />
|
||||
</Compiler>
|
||||
<Linker>
|
||||
<Add library="libintl.dll.a" />
|
||||
<Add library="libiconv.dll.a" />
|
||||
<Add directory="WinDepend/lib" />
|
||||
</Linker>
|
||||
</Target>
|
||||
<Target title="Release (SDL)">
|
||||
<Option output="Cataclysm-Tiles" prefix_auto="0" extension_auto="1" />
|
||||
<Option object_output="obj/ReleaseSDL/" />
|
||||
<Option type="0" />
|
||||
<Option compiler="gcc" />
|
||||
<Compiler>
|
||||
<Add option="-Os" />
|
||||
<Add option="-O2" />
|
||||
<Add option="-DTILES=1" />
|
||||
<Add option="-DRELEASE=1" />
|
||||
<Add directory="WinDepend/include" />
|
||||
<Add directory="WinDepend/include/SDL2" />
|
||||
</Compiler>
|
||||
<Linker>
|
||||
<Add library="libSDL2.dll.a" />
|
||||
<Add library="libSDL2main.a" />
|
||||
<Add library="libSDL2_ttf.dll.a" />
|
||||
<Add library="libSDL2_image.dll.a" />
|
||||
<Add directory="WinDepend/lib" />
|
||||
</Linker>
|
||||
</Target>
|
||||
<Target title="Release (SDL, Sound)">
|
||||
<Option output="Cataclysm-Tiles" prefix_auto="0" extension_auto="1" />
|
||||
<Option object_output="obj/ReleaseSoundSDL/" />
|
||||
<Option type="0" />
|
||||
<Option compiler="gcc" />
|
||||
<Compiler>
|
||||
<Add option="-Os" />
|
||||
<Add option="-O2" />
|
||||
<Add option="-DTILES=1" />
|
||||
<Add option="-DSDL_SOUND=1" />
|
||||
<Add option="-DRELEASE=1" />
|
||||
<Add directory="WinDepend/include" />
|
||||
<Add directory="WinDepend/include/SDL2" />
|
||||
</Compiler>
|
||||
<Linker>
|
||||
<Add library="libSDL2.dll.a" />
|
||||
<Add library="libSDL2main.a" />
|
||||
<Add library="libSDL2_ttf.dll.a" />
|
||||
<Add library="libSDL2_image.dll.a" />
|
||||
<Add library="libSDL2_mixer.dll.a" />
|
||||
<Add directory="WinDepend/lib" />
|
||||
</Linker>
|
||||
</Target>
|
||||
<Target title="Release (SDL, Localized)">
|
||||
<Option output="Cataclysm-Tiles" prefix_auto="0" extension_auto="1" />
|
||||
<Option object_output="obj/ReleaseLocalizedSDL/" />
|
||||
<Option type="0" />
|
||||
<Option compiler="gcc" />
|
||||
<Compiler>
|
||||
<Add option="-Os" />
|
||||
<Add option="-O2" />
|
||||
<Add option="-DLOCALIZE=1" />
|
||||
<Add option="-DTILES=1" />
|
||||
<Add option="-DRELEASE=1" />
|
||||
<Add directory="WinDepend/include" />
|
||||
<Add directory="WinDepend/include/SDL2" />
|
||||
</Compiler>
|
||||
<Linker>
|
||||
<Add library="libintl.dll.a" />
|
||||
<Add library="libiconv.dll.a" />
|
||||
<Add library="libSDL2.dll.a" />
|
||||
<Add library="libSDL2main.a" />
|
||||
<Add library="libSDL2_ttf.dll.a" />
|
||||
<Add library="libSDL2_image.dll.a" />
|
||||
<Add directory="WinDepend/lib" />
|
||||
</Linker>
|
||||
</Target>
|
||||
<Target title="Release (SDL, Loc, Sound)">
|
||||
<Option output="Cataclysm-Tiles" prefix_auto="0" extension_auto="1" />
|
||||
<Option object_output="obj/ReleaseLocalizedSoundSDL/" />
|
||||
<Option type="0" />
|
||||
<Option compiler="gcc" />
|
||||
<Compiler>
|
||||
<Add option="-Os" />
|
||||
<Add option="-O2" />
|
||||
<Add option="-DLOCALIZE=1" />
|
||||
<Add option="-DTILES=1" />
|
||||
<Add option="-DSDL_SOUND=1" />
|
||||
<Add option="-DRELEASE=1" />
|
||||
<Add directory="WinDepend/include" />
|
||||
<Add directory="WinDepend/include/SDL2" />
|
||||
</Compiler>
|
||||
<Linker>
|
||||
<Add library="libintl.dll.a" />
|
||||
<Add library="libiconv.dll.a" />
|
||||
<Add library="libSDL2.dll.a" />
|
||||
<Add library="libSDL2main.a" />
|
||||
<Add library="libSDL2_ttf.dll.a" />
|
||||
<Add library="libSDL2_image.dll.a" />
|
||||
<Add library="libSDL2_mixer.dll.a" />
|
||||
<Add directory="WinDepend/lib" />
|
||||
</Linker>
|
||||
</Target>
|
||||
<Target title="Debug">
|
||||
<Option output="CataclysmWin" prefix_auto="1" extension_auto="1" />
|
||||
<Option object_output="obj/Debug/" />
|
||||
<Option type="0" />
|
||||
<Option compiler="gcc" />
|
||||
<Compiler>
|
||||
<Add option="-pg -g" />
|
||||
</Compiler>
|
||||
<Linker>
|
||||
<Add option="-pg -lgmon" />
|
||||
</Linker>
|
||||
</Target>
|
||||
<Target title="Debug (Localized)">
|
||||
<Option output="CataclysmWin" prefix_auto="1" extension_auto="1" />
|
||||
<Option object_output="obj/DebugLocalized/" />
|
||||
<Option type="0" />
|
||||
<Option compiler="gcc" />
|
||||
<Compiler>
|
||||
<Add option="-pg" />
|
||||
<Add option="-g" />
|
||||
<Add option="-DLOCALIZE=1" />
|
||||
<Add directory="WinDepend/include" />
|
||||
</Compiler>
|
||||
<Linker>
|
||||
<Add option="-pg" />
|
||||
<Add option="-lgmon" />
|
||||
<Add library="libintl.dll.a" />
|
||||
<Add library="libiconv.dll.a" />
|
||||
<Add directory="WinDepend/lib" />
|
||||
</Linker>
|
||||
</Target>
|
||||
<Target title="Debug (SDL)">
|
||||
<Option output="CataclysmWin-Tiles" prefix_auto="0" extension_auto="1" />
|
||||
<Option object_output="obj/DebugSDL/" />
|
||||
<Option type="0" />
|
||||
<Option compiler="gcc" />
|
||||
<Compiler>
|
||||
<Add option="-pg" />
|
||||
<Add option="-g" />
|
||||
<Add option="-DTILES=1" />
|
||||
<Add directory="WinDepend/include" />
|
||||
<Add directory="WinDepend/include/SDL2" />
|
||||
</Compiler>
|
||||
<Linker>
|
||||
<Add option="-pg" />
|
||||
<Add option="-lgmon" />
|
||||
<Add library="libSDL2.dll.a" />
|
||||
<Add library="libSDL2main.a" />
|
||||
<Add library="libSDL2_ttf.dll.a" />
|
||||
<Add library="libSDL2_image.dll.a" />
|
||||
<Add directory="WinDepend/lib" />
|
||||
</Linker>
|
||||
</Target>
|
||||
<Target title="Debug (SDL, Sound)">
|
||||
<Option output="Cataclysm-Tiles" prefix_auto="0" extension_auto="1" />
|
||||
<Option object_output="obj/DebugSoundSDL/" />
|
||||
<Option type="0" />
|
||||
<Option compiler="gcc" />
|
||||
<Compiler>
|
||||
<Add option="-pg" />
|
||||
<Add option="-g" />
|
||||
<Add option="-DTILES=1" />
|
||||
<Add option="-DSDL_SOUND=1" />
|
||||
<Add directory="WinDepend/include" />
|
||||
<Add directory="WinDepend/include/SDL2" />
|
||||
</Compiler>
|
||||
<Linker>
|
||||
<Add option="-pg" />
|
||||
<Add option="-lgmon" />
|
||||
<Add library="libSDL2.dll.a" />
|
||||
<Add library="libSDL2main.a" />
|
||||
<Add library="libSDL2_ttf.dll.a" />
|
||||
<Add library="libSDL2_image.dll.a" />
|
||||
<Add library="libSDL2_mixer.dll.a" />
|
||||
<Add directory="WinDepend/lib" />
|
||||
</Linker>
|
||||
</Target>
|
||||
<Target title="Debug (SDL, Localized)">
|
||||
<Option output="CataclysmWin-Tiles" prefix_auto="0" extension_auto="1" />
|
||||
<Option object_output="obj/DebugLocalizedSDL/" />
|
||||
<Option type="0" />
|
||||
<Option compiler="gcc" />
|
||||
<Compiler>
|
||||
<Add option="-pg" />
|
||||
<Add option="-g" />
|
||||
<Add option="-DLOCALIZE=1" />
|
||||
<Add option="-DTILES=1" />
|
||||
<Add directory="WinDepend/include" />
|
||||
<Add directory="WinDepend/include/SDL2" />
|
||||
</Compiler>
|
||||
<Linker>
|
||||
<Add option="-pg" />
|
||||
<Add option="-lgmon" />
|
||||
<Add library="libintl.dll.a" />
|
||||
<Add library="libiconv.dll.a" />
|
||||
<Add library="libSDL2.dll.a" />
|
||||
<Add library="libSDL2main.a" />
|
||||
<Add library="libSDL2_ttf.dll.a" />
|
||||
<Add library="libSDL2_image.dll.a" />
|
||||
<Add directory="WinDepend/lib" />
|
||||
</Linker>
|
||||
</Target>
|
||||
<Target title="Debug (SDL, Loc, Sound)">
|
||||
<Option output="Cataclysm-Tiles" prefix_auto="0" extension_auto="1" />
|
||||
<Option object_output="obj/DebugLocalizedSoundSDL/" />
|
||||
<Option type="0" />
|
||||
<Option compiler="gcc" />
|
||||
<Compiler>
|
||||
<Add option="-pg" />
|
||||
<Add option="-g" />
|
||||
<Add option="-DLOCALIZE=1" />
|
||||
<Add option="-DTILES=1" />
|
||||
<Add option="-DSDL_SOUND=1" />
|
||||
<Add directory="WinDepend/include" />
|
||||
<Add directory="WinDepend/include/SDL2" />
|
||||
</Compiler>
|
||||
<Linker>
|
||||
<Add option="-pg" />
|
||||
<Add option="-lgmon" />
|
||||
<Add library="libintl.dll.a" />
|
||||
<Add library="libiconv.dll.a" />
|
||||
<Add library="libSDL2.dll.a" />
|
||||
<Add library="libSDL2main.a" />
|
||||
<Add library="libSDL2_ttf.dll.a" />
|
||||
<Add library="libSDL2_image.dll.a" />
|
||||
<Add library="libSDL2_mixer.dll.a" />
|
||||
<Add directory="WinDepend/lib" />
|
||||
</Linker>
|
||||
</Target>
|
||||
</Build>
|
||||
<Compiler>
|
||||
<Add option="-Wextra" />
|
||||
<Add option="-Wall" />
|
||||
<Add option="-std=c++14" />
|
||||
<Add option="-DCB_BUILD" />
|
||||
<Add option="-D_WINDOWS" />
|
||||
<Add option="-D_MINGW" />
|
||||
<Add option="-D_WIN32" />
|
||||
<Add option="-D__MINGW__" />
|
||||
</Compiler>
|
||||
<Linker>
|
||||
<Add option="-Wl,-stack,12000000,-subsystem,windows" />
|
||||
<Add option="-static" />
|
||||
<Add library="gdi32" />
|
||||
<Add library="winmm" />
|
||||
</Linker>
|
||||
<ExtraCommands>
|
||||
<Add before="cmd /c git --version || echo 'git' command not found!" />
|
||||
<Add before="cmd /c git describe --tags --always --dirty > version.tmp || echo no-git> version.tmp" />
|
||||
<Add before='cmd /c for /F "tokens=*" %%i in (version.tmp) do echo #define VERSION "%%i" > src/version.h' />
|
||||
<Add before="cmd /c del version.tmp" />
|
||||
<Mode after="always" />
|
||||
</ExtraCommands>
|
||||
<UnitsGlob directory="src" recursive="0" />
|
||||
<Unit filename="src/resource.rc">
|
||||
<Option compilerVar="WINDRES" />
|
||||
</Unit>
|
||||
<Extensions>
|
||||
<code_completion />
|
||||
<debugger />
|
||||
<envvars />
|
||||
<DoxyBlocks>
|
||||
<comment_style block="0" line="0" />
|
||||
<doxyfile_project />
|
||||
<doxyfile_build />
|
||||
<doxyfile_warnings />
|
||||
<doxyfile_output />
|
||||
<doxyfile_dot />
|
||||
<general />
|
||||
</DoxyBlocks>
|
||||
</Extensions>
|
||||
</Project>
|
||||
</CodeBlocks_project_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]
|
||||
|
||||
@@ -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.
|
||||
@@ -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.
|
||||
@@ -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.
|
||||
@@ -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>
|
||||
|
||||
[](https://github.com/CleverRaven/Cataclysm-DDA/actions/workflows/matrix.yml)
|
||||
[](https://coveralls.io/github/CleverRaven/Cataclysm-DDA?branch=master)
|
||||
[](https://www.codetriage.com/cleverraven/cataclysm-dda)
|
||||
[](https://github.com/CleverRaven/Cataclysm-DDA/graphs/contributors)
|
||||
[](https://github.com/XAMPPRocky/tokei)
|
||||
[](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 http://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](.github/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:
|
||||
http://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).
|
||||
@@ -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>
|
||||
@@ -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
|
||||
@@ -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>
|
||||
@@ -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>
|
||||
@@ -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
|
||||
@@ -1,406 +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")
|
||||
}
|
||||
|
||||
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 [ 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 {
|
||||
compileSdkVersion override_compileSdkVersion
|
||||
|
||||
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')
|
||||
}
|
||||
@@ -1,3 +0,0 @@
|
||||
# Reference: https://developer.android.com/ndk/guides/android_mk.html
|
||||
|
||||
include $(call all-subdir-makefiles)
|
||||
@@ -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++14
|
||||
ifneq ($(OS),Windows_NT)
|
||||
APP_LDFLAGS += -fuse-ld=gold
|
||||
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
|
||||
|
||||
@@ -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
|
||||
@@ -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)
|
||||
@@ -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 *;
|
||||
#}
|
||||
|
Before Width: | Height: | Size: 7.1 KiB |
|
Before Width: | Height: | Size: 3.9 KiB |
|
Before Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 23 KiB |
|
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>
|
||||
|
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>
|
||||
@@ -1,64 +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"
|
||||
package="com.cleverraven.cataclysmdda"
|
||||
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>
|
||||
|
Before Width: | Height: | Size: 8.5 KiB |
@@ -1 +0,0 @@
|
||||
../../../../../data
|
||||
@@ -1 +0,0 @@
|
||||
../../../../../gfx
|
||||
@@ -1 +0,0 @@
|
||||
../../../../../../lang/mo
|
||||
@@ -1,70 +0,0 @@
|
||||
package com.cleverraven.cataclysmdda;
|
||||
|
||||
import org.libsdl.app.SDLActivity;
|
||||
|
||||
import android.preference.PreferenceManager;
|
||||
import android.util.Log;
|
||||
import android.content.Context;
|
||||
import android.os.Vibrator;
|
||||
import android.view.View;
|
||||
import android.widget.Toast;
|
||||
import android.content.res.Configuration;
|
||||
|
||||
public class CataclysmDDA extends SDLActivity {
|
||||
private static final String TAG = "CDDA";
|
||||
|
||||
private NativeUI nativeUI = new NativeUI(CataclysmDDA.this);
|
||||
|
||||
public void vibrate(int duration) {
|
||||
try {
|
||||
Vibrator v = (Vibrator)getSystemService(Context.VIBRATOR_SERVICE);
|
||||
v.vibrate(duration);
|
||||
} catch(Exception e) {
|
||||
System.err.println(e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
public void toast(final String message) {
|
||||
try {
|
||||
runOnUiThread(new Runnable() {
|
||||
public void run() {
|
||||
Toast.makeText(getApplicationContext(), message, Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
});
|
||||
} catch(Exception e) {
|
||||
System.err.println(e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
private boolean isHardwareKeyboardAvailable() {
|
||||
return getResources().getConfiguration().keyboard == Configuration.KEYBOARD_QWERTY;
|
||||
}
|
||||
|
||||
private float getDisplayDensity() {
|
||||
return getResources().getDisplayMetrics().density;
|
||||
}
|
||||
|
||||
public void show_sdl_surface() {
|
||||
try {
|
||||
runOnUiThread(new Runnable() {
|
||||
public void run() {
|
||||
mLayout.setVisibility(View.VISIBLE);
|
||||
}
|
||||
});
|
||||
} catch(Exception e) {
|
||||
System.err.println(e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
public boolean getDefaultSetting(final String settingsName, boolean defaultValue) {
|
||||
return PreferenceManager.getDefaultSharedPreferences(getApplicationContext()).getBoolean(settingsName, defaultValue);
|
||||
}
|
||||
|
||||
public String getSystemLang() {
|
||||
return getResources().getConfiguration().locale.toLanguageTag().replace('-', '_');
|
||||
}
|
||||
|
||||
public NativeUI getNativeUI() {
|
||||
return nativeUI;
|
||||
}
|
||||
}
|
||||