mirror of https://github.com/OpenTTD/OpenTTD
Merge branch 'OpenTTD:master' into 10028Patch
commit
70fbf9c787
|
@ -8,9 +8,13 @@ notifications:
|
|||
only:
|
||||
- master
|
||||
only-by:
|
||||
- DorpsGek
|
||||
- eints-sync\[bot\]
|
||||
commit-comment:
|
||||
discussion:
|
||||
pull-request:
|
||||
issue:
|
||||
tag-created:
|
||||
workflow-run:
|
||||
only:
|
||||
- .github/workflows/release.yml
|
||||
- .github/workflows/ci-nightly.yml
|
||||
|
|
468
.editorconfig
468
.editorconfig
|
@ -7,3 +7,471 @@ trim_trailing_whitespace = true
|
|||
[*.{c,cpp,h,hpp}]
|
||||
indent_style = tab
|
||||
charset = utf-8
|
||||
#indent_size = <integer>
|
||||
#tab_width = <integer>
|
||||
#end_of_line = <lf, cf, crlf>
|
||||
|
||||
### C++ specific editor config rules ###
|
||||
## Visual Studio ## https://learn.microsoft.com/en-us/visualstudio/ide/cpp-editorconfig-properties?view=vs-2019 ##
|
||||
# Indentation #
|
||||
# Do not indent braces
|
||||
cpp_indent_braces = false
|
||||
# When a new line is typed, it's indented relatively to the innermost open parenthesis
|
||||
cpp_indent_multi_line_relative_to = innermost_parenthesis
|
||||
# Indent new lines within parenthesis
|
||||
cpp_indent_within_parentheses = indent
|
||||
# In existing code, do not use the setting for alignment of new lines within parentheses
|
||||
cpp_indent_preserve_within_parentheses = true
|
||||
# Indent case contents
|
||||
cpp_indent_case_contents = true
|
||||
# Indent case labels
|
||||
cpp_indent_case_labels = true
|
||||
# Do not indent braces following a case statement
|
||||
cpp_indent_case_contents_when_block = false
|
||||
# Do not indent braces of lambdas used as parameters
|
||||
cpp_indent_lambda_braces_when_parameter = false
|
||||
# No override for "Position of goto labels" (Unspecified)
|
||||
#cpp_indent_goto_labels
|
||||
# Move preprocessor directives to the leftmost column
|
||||
cpp_indent_preprocessor = leftmost_column
|
||||
# Do not indent access specifiers
|
||||
cpp_indent_access_specifiers = false
|
||||
# Indent namespace contents
|
||||
cpp_indent_namespace_contents = true
|
||||
# Preserve indentation of comments
|
||||
cpp_indent_preserve_comments = true
|
||||
|
||||
# Newline #
|
||||
# Keep open braces for namespaces on the same line, but add a space before the brace
|
||||
cpp_new_line_before_open_brace_namespace = same_line
|
||||
# Keep open braces for types/classes on the same line, but add a space before the brace
|
||||
cpp_new_line_before_open_brace_type = same_line
|
||||
# Move open braces for functions to a new line
|
||||
cpp_new_line_before_open_brace_function = new_line
|
||||
# Keep open braces for control blocks on the same line, but add a space before the brace
|
||||
cpp_new_line_before_open_brace_block = same_line
|
||||
# Keep open braces for lambdas on the same line, but add a space before the brace
|
||||
cpp_new_line_before_open_brace_lambda = same_line
|
||||
# Place scope braces on separate lines
|
||||
cpp_new_line_scope_braces_on_separate_lines = true
|
||||
# Do not move closing braces to the same line as opening braces for empty types
|
||||
cpp_new_line_close_brace_same_line_empty_type = false
|
||||
# Do not move closing braces to the same line as opening braces for empty function bodies
|
||||
cpp_new_line_close_brace_same_line_empty_function = false
|
||||
# Do not place 'catch' and similar keywords on a new line
|
||||
cpp_new_line_before_catch = false
|
||||
# Do not place 'else' on a new line
|
||||
cpp_new_line_before_else = false
|
||||
# Do not place 'while' in a do-while loop on a new line
|
||||
cpp_new_line_before_while_in_do_while = false
|
||||
|
||||
# Spacing #
|
||||
# Remove spaces between function names and opening parentheses of argument lists
|
||||
cpp_space_before_function_open_parenthesis = remove
|
||||
# Do not insert a space within parentheses of an argument list
|
||||
cpp_space_within_parameter_list_parentheses = false
|
||||
# Do not insert a space between parentheses when argument list is empty
|
||||
cpp_space_between_empty_parameter_list_parentheses = false
|
||||
# Insert space between keyword and opening parenthesis in control flow statements
|
||||
cpp_space_after_keywords_in_control_flow_statements = true
|
||||
# Do not insert a space within parentheses of a control statement
|
||||
cpp_space_within_control_flow_statement_parentheses = false
|
||||
# Do not insert a space before opening parenthesis of lambda argument lists
|
||||
cpp_space_before_lambda_open_parenthesis = false
|
||||
# Do not insert a space within parentheses of a C-style cast
|
||||
cpp_space_within_cast_parentheses = false
|
||||
# Do not insert a space after closing parenthesis of C-style cast
|
||||
cpp_space_after_cast_close_parenthesis = false
|
||||
# Do not insert a space within parentheses of a parenthesized expression
|
||||
cpp_space_within_expression_parentheses = false
|
||||
# Insert space before opening brace of blocks
|
||||
cpp_space_before_block_open_brace = true
|
||||
# Do not insert a space between empty braces
|
||||
cpp_space_between_empty_braces = false
|
||||
# Do not insert a space before opening brace of uniform initialization and initializer lists
|
||||
cpp_space_before_initializer_list_open_brace = false
|
||||
# No override for "Insert space within braces of uniform initialization and initializer lists" (Spacing for this varies)
|
||||
#cpp_space_within_initializer_list_braces
|
||||
# Preserve spaces inside uniform initialization and initializer lists
|
||||
cpp_space_preserve_in_initializer_list = true
|
||||
# Do not insert space before opening square brackets
|
||||
cpp_space_before_open_square_bracket = false
|
||||
# Do not insert space within square bracket
|
||||
cpp_space_within_square_brackets = false
|
||||
# Do not insert space before empty square brackets
|
||||
cpp_space_before_empty_square_brackets = false
|
||||
# Do not insert space between empty square brackets
|
||||
cpp_space_between_empty_square_brackets = false
|
||||
# Group square brackets for multi-dimensional arrays together
|
||||
cpp_space_group_square_brackets = true
|
||||
# Do not insert space within square brackets for lambdas
|
||||
cpp_space_within_lambda_brackets = false
|
||||
# Do not insert space between empty lambda brackets
|
||||
cpp_space_between_empty_lambda_brackets = false
|
||||
# Do not insert space before commas
|
||||
cpp_space_before_comma = false
|
||||
# Insert space after commas
|
||||
cpp_space_after_comma = true
|
||||
# Remove spaces before and after member operators
|
||||
cpp_space_remove_around_member_operators = true
|
||||
# Insert space before colon for base in type declarations
|
||||
cpp_space_before_inheritance_colon = true
|
||||
# Insert space before colon for constructors
|
||||
cpp_space_before_constructor_colon = true
|
||||
# Remove space before semicolons
|
||||
cpp_space_remove_before_semicolon = true
|
||||
# No override for "Insert space after semicolons" (Depends on if loop is unconditional)
|
||||
#cpp_space_after_semicolon
|
||||
# Remove spaces between unary operators and their operands
|
||||
cpp_space_remove_around_unary_operator = true
|
||||
# Insert spaces before and after binary operators
|
||||
cpp_space_around_binary_operator = insert
|
||||
# Insert spaces around assignment operators
|
||||
cpp_space_around_assignment_operator = insert
|
||||
# Align pointer/reference symbol to the right
|
||||
cpp_space_pointer_reference_alignment = right
|
||||
# Insert spaces around conditional operators
|
||||
cpp_space_around_ternary_operator = insert
|
||||
|
||||
# Wrapping #
|
||||
# Always apply New Lines settings for blocks
|
||||
cpp_wrap_preserve_blocks = never
|
||||
|
||||
|
||||
|
||||
## Rider & ReSharper ## https://www.jetbrains.com/help/resharper/EditorConfig_CPP_CppBlankLinesPageScheme.html ##
|
||||
# Blank Lines #
|
||||
# No override for "Max blank lines in declarations" (Unspecified; Not consistent across source code)
|
||||
#cpp_keep_blank_lines_in_declarations
|
||||
# No override for "Max blank lines in rest of source code" (Unspecified; Not consistent across source code)
|
||||
#cpp_keep_blank_lines_in_code
|
||||
# No override for "Number of blank lines around class/struct/enum definition" (Unspecified; Not consistent across source code)
|
||||
#cpp_blank_lines_around_class_definition
|
||||
# No override for "Number of blank lines around function declarations" (Unspecified; Not consistent across source code)
|
||||
#cpp_blank_lines_around_function_declaration
|
||||
# No override for "Number of blank lines around function definitions" (Unspecified; Not consistent across source code)
|
||||
#cpp_blank_lines_around_function_definition
|
||||
# No override for "Number of blank lines around single line function definitions" (Unspecified; Not consistent across source code)
|
||||
#cpp_blank_lines_around_single_line_function_definition
|
||||
# No override for "Number of blank lines around namespaces" (Unspecified; Not consistent across source code)
|
||||
#cpp_blank_lines_around_namespace
|
||||
# No override for "Number of blank lines around other definitions and declarations" (Unspecified; Not consistent across source code)
|
||||
#cpp_blank_lines_around_other_declaration
|
||||
|
||||
# Braces Layout #
|
||||
# Keep open braces for namespace declarations on the same line, but add a space before the brace
|
||||
cpp_namespace_declaration_braces = end_of_line
|
||||
# Keep open braces for linkage declarations on the same line, but add a space before the brace
|
||||
cpp_linkage_specification_braces = end_of_line
|
||||
# Keep open braces for types/classes on the same line, but add a space before the brace
|
||||
cpp_type_declaration_braces = end_of_line
|
||||
# Keep open braces for namespace definitions on the same line (does not modify spacing before the brace)
|
||||
cpp_place_namespace_definitions_on_same_line = true
|
||||
# Move open braces for functions to a new line
|
||||
cpp_invocable_declaration_braces = next_line
|
||||
# Keep open braces for lambdas on the same line, but add a space before the brace
|
||||
cpp_anonymous_method_declaration_braces = end_of_line
|
||||
# Keep open braces for case blocks on the same line, but add a space before the brace
|
||||
cpp_case_block_braces = end_of_line
|
||||
# No override for "Requires expression braces" style (requires expressions are a C++20 feature)
|
||||
#cpp_requires_expression_braces
|
||||
# Keep open braces for all other blocks on the same line, but add a space before the brace
|
||||
cpp_other_braces = end_of_line
|
||||
# Only indent the insides of multi-line expression braces
|
||||
cpp_expression_braces = inside
|
||||
# Place the braces of empty blocks together and on the same line
|
||||
cpp_empty_block_style = together_same_line
|
||||
# Force line breaks within simple compound statements
|
||||
cpp_simple_block_style = line_break
|
||||
# No override for "Regular expression for macros starting a block" (Marco blocks aren't used)
|
||||
#cpp_macro_block_begin
|
||||
# No override for "Regular expression for macros ending a block" (Marco blocks aren't used)
|
||||
#cpp_macro_block_end
|
||||
|
||||
# Tabs and indents #
|
||||
# Redundant override (Already overriden globally by 'indent_style')
|
||||
#cpp_indent_style
|
||||
# Redundant override (Already overriden globally by 'indent_size')
|
||||
#cpp_indent_size
|
||||
# Redundant override (Already overriden globally by 'tab_width')
|
||||
#cpp_tab_width
|
||||
# Use spaces instead of tabs as indentation for precise alignment
|
||||
cpp_alignment_tab_fill_style = use_spaces
|
||||
# Allow alignment even if construct is located too far to the right, more than 2/3 of 'Hard wrap at' limit
|
||||
cpp_allow_far_alignment = true
|
||||
|
||||
# Indentation and Alignment #
|
||||
# No override for "Continuous line indent" (Varies throughout source code)
|
||||
#cpp_continuous_line_indent
|
||||
# Do not use continuous line indent in function declaration and invocation parentheses
|
||||
cpp_use_continuous_line_indent_in_method_pars = false
|
||||
# Do not use continuous line indent in initializer lists
|
||||
cpp_use_continuous_line_indent_in_expression_braces = false
|
||||
# Indent namespace members (including nested ones)
|
||||
cpp_namespace_indentation = all
|
||||
# No override for "Indent linkage specification block members" (Unspecified)
|
||||
#cpp_linkage_specification_indentation
|
||||
# Do not indent access specifier from class
|
||||
cpp_indent_access_specifiers_from_class = false
|
||||
# Indent class member from access specifier
|
||||
cpp_indent_class_members_from_access_specifiers = true
|
||||
# Do not indent if a function definition or declaration is wrapped after the type
|
||||
cpp_indent_wrapped_function_names = false
|
||||
# Indent 'case' labels from 'switch'
|
||||
cpp_indent_switch_labels = true
|
||||
# No override for "Indent function declarations' parentheses" (Varies throughout source code)
|
||||
#cpp_indent_method_decl_pars
|
||||
# No override for "Indent method calls' parentheses" (Varies throughout source code)
|
||||
#cpp_indent_invocation_pars
|
||||
# No override for "Indent statement (if, while, for, etc) parentheses" (Varies throughout source code)
|
||||
#cpp_indent_statement_pars
|
||||
# Do not change preprocessor directives indenting
|
||||
cpp_indent_preprocessor_directives = do_not_change
|
||||
# No override for "Indent C++/CLI generic constraints" (C++/CLI is not used)
|
||||
#cpp_indent_type_constraints
|
||||
# Align/indent comments started at the first column
|
||||
cpp_indent_comment = true
|
||||
# Comments that comment out code will use the indentation level of the commented code.
|
||||
cpp_place_comments_at_first_column = false
|
||||
# Align multiline declarators in declaration
|
||||
cpp_align_multiple_declaration = true
|
||||
# Align multiline function parameters
|
||||
cpp_align_multiline_parameter = true
|
||||
# Align multiline call arguments
|
||||
cpp_align_multiline_argument = true
|
||||
# Do not align first of multiline call arguments with the opening parentheses
|
||||
cpp_align_first_arg_by_paren = false
|
||||
# Align multiline initializer list arguments
|
||||
cpp_align_multiline_expression_brace = true
|
||||
# No override for "Align multiline template parameters in template declaration" (Unspecified)
|
||||
#cpp_align_multiline_type_parameter
|
||||
# No override for "Align multiline template arguments" (Unspecified)
|
||||
#cpp_align_multiline_type_argument
|
||||
# Align multiline base classes in class base clause
|
||||
cpp_align_multiline_extends_list = true
|
||||
# Align multiline member initializers in member initializer lists
|
||||
cpp_align_multiline_ctor_init = true
|
||||
# Outdent commas placed on new line
|
||||
cpp_outdent_commas = true
|
||||
# Do not align multiline ?: operator with first line (since alignment is incorrect)
|
||||
cpp_align_ternary = none
|
||||
# Do not indent aligned ?: operator (since indentation varies)
|
||||
cpp_indent_aligned_ternary = false
|
||||
# No override for "Align multiline chained method calls" (Unspecified)
|
||||
#cpp_align_multiline_calls_chain
|
||||
# No override for "Outdent '.' and '->' in chained method calls on new lines" (Unspecified)
|
||||
#cpp_outdent_dots
|
||||
# Do not align multiline chained binary expressions
|
||||
cpp_align_multiline_binary_expressions_chain = false
|
||||
# Fix column alignment in adjacent lines
|
||||
cpp_int_align_fix_in_adjacent = true
|
||||
# Align assignments with adjacent assignments
|
||||
cpp_int_align_eq = true
|
||||
# Do not align declaration names with adjacent declaration names
|
||||
cpp_int_align_declaration_names = false
|
||||
# Align end-of-line comments with adjacent end-of-line comments
|
||||
cpp_int_align_comments = true
|
||||
|
||||
# Spaces #
|
||||
# Do not put space before ANY commas
|
||||
cpp_space_before_comma = false
|
||||
# Put space after ALL commas
|
||||
cpp_space_after_comma = true
|
||||
# Put space before ptr in declaration of variable
|
||||
cpp_space_before_ptr_in_data_member = true
|
||||
# Do not put space after ptr in declaration of variable
|
||||
cpp_space_after_ptr_in_data_member = false
|
||||
# Put space before ptr in declaration of multiple variables
|
||||
cpp_space_before_ptr_in_data_members = true
|
||||
# Do not put space after ptr in declaration of multiple variables
|
||||
cpp_space_after_ptr_in_data_members = false
|
||||
# Put space before ptr in return type of function
|
||||
cpp_space_before_ptr_in_method = true
|
||||
# Do not put space after ptr in return type of function
|
||||
cpp_space_after_ptr_in_method = false
|
||||
# Do not put space before ptr in abstract declaration
|
||||
cpp_space_before_ptr_in_abstract_decl = false
|
||||
# Put space before ref in declaration of variable
|
||||
cpp_space_before_ref_in_data_member = true
|
||||
# Do not put space after ref in declaration of variable
|
||||
cpp_space_after_ref_in_data_member = false
|
||||
# Put space before ref in declaration of multiple variables
|
||||
cpp_space_before_ref_in_data_members = true
|
||||
# Do not put space after ref in declaration of multiple variables
|
||||
cpp_space_after_ref_in_data_members = false
|
||||
# Do not put space before ref in return type of function
|
||||
cpp_space_before_ref_in_method = false
|
||||
# Put space after ref in return type of function
|
||||
cpp_space_after_ref_in_method = true
|
||||
# Do not put space before ref in abstract declaration
|
||||
cpp_space_before_ref_in_abstract_decl = false
|
||||
# Do not put space before parentheses in function parameters
|
||||
cpp_space_between_method_declaration_name_and_open_parenthesis = false
|
||||
# Do not put space before parentheses in lambda parameters
|
||||
cpp_space_before_lambda_parentheses = false
|
||||
# Do not put space within parentheses in function parameters
|
||||
cpp_space_between_method_declaration_parameter_list_parentheses = false
|
||||
# Do not put space within empty parentheses in function parameters
|
||||
cpp_space_between_method_declaration_empty_parameter_list_parentheses = false
|
||||
# Do not put space before angle brackets in template parameters
|
||||
cpp_space_before_template_params = false
|
||||
# Do not put space within angle brackets in template parameters
|
||||
cpp_space_within_template_params = false
|
||||
# Do not put space within empty angle brackets in template parameters
|
||||
cpp_space_within_empty_template_params = false
|
||||
# Do not put space before angle brackets in template arguments
|
||||
cpp_space_before_template_args = false
|
||||
# Do not put space within angle brackets in template arguments
|
||||
cpp_space_within_template_args = false
|
||||
# Do not put space between closing angle brackets in template arguments
|
||||
cpp_space_between_closing_angle_brackets_in_template_args = false
|
||||
# Put space around '=' in alias declaration and namespace alias
|
||||
cpp_space_around_alias_eq = true
|
||||
# Do not put space around '->' in trailing return types
|
||||
cpp_space_around_deref_in_trailing_return_type = false
|
||||
# Put space before base types list colon
|
||||
cpp_space_before_colon_in_inheritance_clause = true
|
||||
# Put space after base types list colon
|
||||
cpp_space_after_colon_in_inheritance_clause = true
|
||||
# No override for "Before C++/CLI generic constraint colon" (Unspecified)
|
||||
#cpp_space_before_type_parameter_constraint_colon
|
||||
# No override for "After C++/CLI generic constraint colon" (Unspecified)
|
||||
#cpp_space_after_type_parameter_constraint_colon
|
||||
# Put space before parentheses of control statements
|
||||
cpp_space_after_keywords_in_control_flow_statements = true
|
||||
# Do not put space within parentheses of control statements
|
||||
cpp_space_between_parentheses_of_control_flow_statements = false
|
||||
# Do not put space before semicolon in 'for' statements
|
||||
cpp_space_before_semicolon_in_for_statement = false
|
||||
# Put space after semicolon in 'for' statements
|
||||
cpp_space_after_semicolon_in_for_statement = true
|
||||
# Put space before ':' in range-based for loop
|
||||
cpp_space_before_for_colon = true
|
||||
# Put space after ':' in range-based for loop
|
||||
cpp_space_after_for_colon = true
|
||||
# Do not put space before colon in switch case or label statement
|
||||
cpp_space_before_colon_in_case = false
|
||||
# Put space after colon in switch case or label statement
|
||||
cpp_space_after_colon_in_case = true
|
||||
# Put space around binary operator
|
||||
cpp_space_around_binary_operator = true
|
||||
# Put space around assignment operator
|
||||
cpp_space_around_assignment_operator = true
|
||||
# Do not put space around dot, '->', '.*' and '->.'
|
||||
cpp_space_around_member_access_operator = false
|
||||
# Do not put space within any parentheses
|
||||
cpp_space_within_parentheses = false
|
||||
# Do not put space before array subscript brackets
|
||||
cpp_space_before_open_square_brackets = false
|
||||
# Do not put space within array subscript brackets
|
||||
cpp_space_between_square_brackets = false
|
||||
# Do not put space before empty parentheses in function call and initialization
|
||||
cpp_space_between_method_call_name_and_opening_parenthesis = false
|
||||
# Do not put space within parentheses in cast expressions
|
||||
cpp_space_between_typecast_parentheses = false
|
||||
# Do not put space after parentheses in cast expressions
|
||||
cpp_space_after_cast = false
|
||||
# Do not put space within parentheses in function call and initialization
|
||||
cpp_space_between_method_call_parameter_list_parentheses = false
|
||||
# Do not put space within empty parentheses in function call and initialization
|
||||
cpp_space_between_method_call_empty_parameter_list_parentheses = false
|
||||
# Put space in ternary operator '? :' before '?'
|
||||
cpp_space_before_ternary_quest = true
|
||||
# Put space in ternary operator '? :' after '?'
|
||||
cpp_space_after_ternary_quest = true
|
||||
# Put space in ternary operator '? :' before ':'
|
||||
cpp_space_before_ternary_colon = true
|
||||
# Put space in ternary operator '? :' after ':'
|
||||
cpp_space_after_ternary_colon = true
|
||||
# Do not put space before uniform initialization braces
|
||||
cpp_space_before_initializer_braces = false
|
||||
# Do not put space within uniform initialization braces
|
||||
cpp_space_within_initializer_braces = false
|
||||
# Do not put space within empty uniform initialization braces
|
||||
cpp_space_within_empty_initializer_braces = false
|
||||
# Put space before end of line comment
|
||||
cpp_space_before_trailing_comment = true
|
||||
# Preserve spaces before end of line comment
|
||||
cpp_disable_space_changes_before_trailing_comment = true
|
||||
|
||||
# Line breaks and Wrapping #
|
||||
# Redundant override (Already overriden globally by 'insert_final_newline')
|
||||
#cpp_insert_final_newline
|
||||
# Redundant override (Already overriden earlier in Visual Studio section)
|
||||
#cpp_new_line_before_else
|
||||
# Do not place 'while' in a do-while loop on a new line
|
||||
cpp_new_line_before_while = false
|
||||
# Redundant override (Already overriden earlier in Visual Studio section)
|
||||
#cpp_new_line_before_catch
|
||||
# Do not change the line breaks of single embedded statements
|
||||
cpp_simple_embedded_statement_style = do_not_change
|
||||
# Do not change the line breaks of simple 'case' statement
|
||||
cpp_simple_case_statement_style = do_not_change
|
||||
# Put member function definition return type on same line
|
||||
cpp_function_definition_return_type_style = on_single_line
|
||||
# Put top-level function definition return type on same line
|
||||
cpp_toplevel_function_definition_return_type_style = on_single_line
|
||||
# Put member function declaration return type on same line
|
||||
cpp_function_declaration_return_type_style = on_single_line
|
||||
# Put top-level function declaration return type on same line
|
||||
cpp_toplevel_function_declaration_return_type_style = on_single_line
|
||||
# Force template<...> of a template declaration on new line
|
||||
cpp_break_template_declaration = line_break
|
||||
# No override for "Break line before the requires-clause" (requires-clause is a C++20 feature)
|
||||
#cpp_line_break_before_requires_clause
|
||||
# Do not change the line break before the colon in member initializer lists
|
||||
cpp_member_initializer_list_style = do_not_change
|
||||
# Do not change the line break after the colon in member initializer lists
|
||||
cpp_line_break_after_colon_in_member_initializer_lists = do_not_change
|
||||
# No override for "Break line before comma in member initializer lists" (Varies throughout source code)
|
||||
#cpp_line_break_before_comma_in_member_initializer_lists
|
||||
# No override for "Break line after comma in member initializer lists" (Varies throughout source code)
|
||||
#cpp_line_break_after_comma_in_member_initializer_lists
|
||||
# No override for "Allow C++/CLI generic constraints on the same line" (C++/CLI is not used)
|
||||
#cpp_place_type_constraints_on_same_line
|
||||
# No override for "Keep existing line breaks" (Varies throughout source code; depends on developer preference)
|
||||
#cpp_keep_user_linebreaks
|
||||
# No override for "Hard wrap at _ characters" (Unspecified)
|
||||
#cpp_max_line_length
|
||||
# Do not prefer wrap before ','
|
||||
cpp_wrap_before_comma = false
|
||||
# Do not prefer wrap before ',' in base clause
|
||||
cpp_wrap_before_comma_in_base_clause = false
|
||||
# No override for "Wrap ternary expression" (Varies throughout source code)
|
||||
#cpp_wrap_ternary_expr_style
|
||||
# No override for "Prefer wrap before '?' and ':' in ternary expressions" (Varies throughout source code)
|
||||
#cpp_wrap_before_ternary_opsigns
|
||||
# No override for "Prefer wrap before ':'" (Varies throughout source code)
|
||||
#cpp_wrap_before_colon
|
||||
# No override for "Prefer wrap before first C++/CLI generic constraint" (C++/CLI is not used)
|
||||
#cpp_wrap_before_first_type_parameter_constraint
|
||||
# No override for "Wrap multiple C++/CLI generic constraints" (C++/CLI is not used)
|
||||
#cpp_wrap_multiple_type_parameter_constraints_style
|
||||
# No override for "Wrap enum definition" (Varies throughout source code)
|
||||
#cpp_wrap_enumeration_style
|
||||
# No override for "Wrap braced initializer list" (Varies throughout source code)
|
||||
#cpp_wrap_braced_init_list_style
|
||||
# No override for "Wrap base classes list" (Varies throughout source code)
|
||||
#cpp_wrap_base_clause_style
|
||||
# No override for "Wrap constructor initializer" (Varies throughout source code)
|
||||
#cpp_wrap_ctor_initializer_style
|
||||
# No override for "Wrap formal parameters" (Varies throughout source code)
|
||||
#cpp_wrap_parameters_style
|
||||
# Do not prefer wrap before '(' in declaration
|
||||
cpp_wrap_before_declaration_lpar = false
|
||||
# Prefer wrap after '(' in declaration
|
||||
cpp_wrap_after_declaration_lpar = true
|
||||
# Do not prefer wrap before ')' in declaration
|
||||
cpp_wrap_before_declaration_rpar = false
|
||||
# No override for "Wrap invocation arguments" (Varies throughout source code)
|
||||
#cpp_wrap_arguments_style
|
||||
# Do not prefer wrap before '(' in invocation
|
||||
cpp_wrap_before_invocation_lpar = false
|
||||
# Prefer wrap after '(' in invocation
|
||||
cpp_wrap_after_invocation_lpar = true
|
||||
# Do not prefer wrap before ')' in invocation
|
||||
cpp_wrap_before_invocation_rpar = false
|
||||
# Prefer wrap after '{' in initializer lists
|
||||
cpp_wrap_after_expression_lbrace = true
|
||||
# Do not prefer wrap before '}' in initializer lists
|
||||
cpp_wrap_before_expression_rbrace = false
|
||||
|
|
|
@ -1,3 +1,13 @@
|
|||
<!--
|
||||
Commit message:
|
||||
|
||||
- Please use Feature / Add / Change / Fix for player-facing changes. E.g.: "Feature: My cool new feature".
|
||||
- Please use Feature / Add / Change / Fix followed by "[NewGRF]" or "[Script]" for moddable changes. E.g.: "Feature: [NewGRF] My cool new NewGRF addition".
|
||||
- Please use Codechange / Codefix for developer-facing changes. E.g.: "Codefix #1234: Validate against nullptr properly".
|
||||
|
||||
See https://github.com/OpenTTD/OpenTTD/blob/master/CODINGSTYLE.md#commit-message for more details.
|
||||
-->
|
||||
|
||||
## Motivation / Problem
|
||||
|
||||
<!--
|
||||
|
@ -42,7 +52,7 @@ Some things are not automated, and forgotten often. This list is a reminder for
|
|||
* This PR touches english.txt or translations? Check the [guidelines](https://github.com/OpenTTD/OpenTTD/blob/master/docs/eints.md)
|
||||
* This PR affects the save game format? (label 'savegame upgrade')
|
||||
* This PR affects the GS/AI API? (label 'needs review: Script API')
|
||||
* ai_changelog.hpp, gs_changelog.hpp need updating.
|
||||
* ai_changelog.hpp, game_changelog.hpp need updating.
|
||||
* The compatibility wrappers (compat_*.nut) need updating.
|
||||
* This PR affects the NewGRF API? (label 'needs review: NewGRF')
|
||||
* newgrf_debug_data.h may need updating.
|
||||
|
|
|
@ -0,0 +1,10 @@
|
|||
version: 2
|
||||
updates:
|
||||
- package-ecosystem: "github-actions"
|
||||
directory: "/"
|
||||
schedule:
|
||||
interval: "monthly"
|
||||
groups:
|
||||
actions:
|
||||
patterns:
|
||||
- "*"
|
|
@ -30,7 +30,7 @@ def check_mode_enforcement(path):
|
|||
continue
|
||||
|
||||
if re.match(
|
||||
r"\t(EnforceDeityMode|EnforceCompanyModeValid|EnforceDeityOrCompanyModeValid|EnforceDeityOrCompanyModeValid_Void)\(",
|
||||
r"\t(EnforceDeityMode|EnforceCompanyModeValid|EnforceCompanyModeValid_Void|EnforceDeityOrCompanyModeValid|EnforceDeityOrCompanyModeValid_Void)\(",
|
||||
line,
|
||||
):
|
||||
# Mode enforcement macro found
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
name: CI
|
||||
name: CI - Build
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
|
@ -17,396 +17,82 @@ jobs:
|
|||
emscripten:
|
||||
name: Emscripten
|
||||
|
||||
runs-on: ubuntu-20.04
|
||||
container:
|
||||
# If you change this version, change the number in the cache step too.
|
||||
image: emscripten/emsdk:3.1.28
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Setup cache
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: /emsdk/upstream/emscripten/cache
|
||||
key: 3.1.28-${{ runner.os }}
|
||||
|
||||
- name: Patch Emscripten to support LZMA
|
||||
run: |
|
||||
cd /emsdk/upstream/emscripten
|
||||
patch -p1 < ${GITHUB_WORKSPACE}/os/emscripten/emsdk-liblzma.patch
|
||||
|
||||
- name: Build (host tools)
|
||||
run: |
|
||||
mkdir build-host
|
||||
cd build-host
|
||||
|
||||
echo "::group::CMake"
|
||||
cmake .. -DOPTION_TOOLS_ONLY=ON
|
||||
echo "::endgroup::"
|
||||
|
||||
echo "::group::Build"
|
||||
echo "Running on $(nproc) cores"
|
||||
cmake --build . -j $(nproc) --target tools
|
||||
echo "::endgroup::"
|
||||
|
||||
- name: Install GCC problem matcher
|
||||
uses: ammaraskar/gcc-problem-matcher@master
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
mkdir build
|
||||
cd build
|
||||
|
||||
echo "::group::CMake"
|
||||
emcmake cmake .. -DHOST_BINARY_DIR=../build-host
|
||||
echo "::endgroup::"
|
||||
|
||||
echo "::group::Build"
|
||||
echo "Running on $(nproc) cores"
|
||||
cmake --build . -j $(nproc)
|
||||
echo "::endgroup::"
|
||||
uses: ./.github/workflows/ci-emscripten.yml
|
||||
secrets: inherit
|
||||
|
||||
linux:
|
||||
name: Linux
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- compiler: clang
|
||||
cxxcompiler: clang++
|
||||
libsdl: libsdl2-dev
|
||||
- compiler: gcc
|
||||
- name: Clang
|
||||
compiler: clang-15
|
||||
cxxcompiler: clang++-15
|
||||
libraries: libsdl2-dev
|
||||
- name: GCC - SDL2
|
||||
compiler: gcc
|
||||
cxxcompiler: g++
|
||||
libsdl: libsdl2-dev
|
||||
- compiler: gcc
|
||||
libraries: libsdl2-dev
|
||||
- name: GCC - Dedicated
|
||||
compiler: gcc
|
||||
cxxcompiler: g++
|
||||
libsdl: libsdl1.2-dev
|
||||
- compiler: gcc
|
||||
cxxcompiler: g++
|
||||
extra-cmake-parameters: -DOPTION_DEDICATED=ON -DCMAKE_CXX_FLAGS_INIT="-DRANDOM_DEBUG"
|
||||
libraries: grfcodec
|
||||
extra-cmake-parameters: -DOPTION_DEDICATED=ON -DCMAKE_CXX_FLAGS_INIT="-DRANDOM_DEBUG" -DCMAKE_DISABLE_PRECOMPILE_HEADERS=ON
|
||||
# Compile without SDL / SDL2, as that should compile fine too.
|
||||
|
||||
runs-on: ubuntu-20.04
|
||||
env:
|
||||
CC: ${{ matrix.compiler }}
|
||||
CXX: ${{ matrix.cxxcompiler }}
|
||||
name: Linux (${{ matrix.name }})
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
uses: ./.github/workflows/ci-linux.yml
|
||||
secrets: inherit
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
echo "::group::Update apt"
|
||||
sudo apt-get update
|
||||
echo "::endgroup::"
|
||||
|
||||
echo "::group::Install dependencies"
|
||||
sudo apt-get install -y --no-install-recommends \
|
||||
liballegro4-dev \
|
||||
libcurl4-openssl-dev \
|
||||
libfontconfig-dev \
|
||||
libicu-dev \
|
||||
liblzma-dev \
|
||||
liblzo2-dev \
|
||||
${{ matrix.libsdl }} \
|
||||
zlib1g-dev \
|
||||
# EOF
|
||||
echo "::endgroup::"
|
||||
env:
|
||||
DEBIAN_FRONTEND: noninteractive
|
||||
|
||||
- name: Get OpenGFX
|
||||
run: |
|
||||
mkdir -p ~/.local/share/openttd/baseset
|
||||
cd ~/.local/share/openttd/baseset
|
||||
|
||||
echo "::group::Download OpenGFX"
|
||||
curl -L https://cdn.openttd.org/opengfx-releases/0.6.0/opengfx-0.6.0-all.zip -o opengfx-all.zip
|
||||
echo "::endgroup::"
|
||||
|
||||
echo "::group::Unpack OpenGFX"
|
||||
unzip opengfx-all.zip
|
||||
echo "::endgroup::"
|
||||
|
||||
rm -f opengfx-all.zip
|
||||
|
||||
- name: Install GCC problem matcher
|
||||
uses: ammaraskar/gcc-problem-matcher@master
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
mkdir build
|
||||
cd build
|
||||
|
||||
echo "::group::CMake"
|
||||
cmake .. ${{ matrix.extra-cmake-parameters }}
|
||||
echo "::endgroup::"
|
||||
|
||||
echo "::group::Build"
|
||||
echo "Running on $(nproc) cores"
|
||||
cmake --build . -j $(nproc)
|
||||
echo "::endgroup::"
|
||||
|
||||
- name: Test
|
||||
run: |
|
||||
cd build
|
||||
ctest -j $(nproc) --timeout 120
|
||||
with:
|
||||
compiler: ${{ matrix.compiler }}
|
||||
cxxcompiler: ${{ matrix.cxxcompiler }}
|
||||
libraries: ${{ matrix.libraries }}
|
||||
extra-cmake-parameters: ${{ matrix.extra-cmake-parameters }}
|
||||
|
||||
macos:
|
||||
name: Mac OS
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- arch: x64
|
||||
full_arch: x86_64
|
||||
- name: arm64 - Debug
|
||||
arch: arm64
|
||||
full_arch: arm64
|
||||
extra-cmake-parameters: -DCMAKE_BUILD_TYPE=Debug
|
||||
- name: arm64 - Release
|
||||
arch: arm64
|
||||
full_arch: arm64
|
||||
extra-cmake-parameters: -DCMAKE_BUILD_TYPE=RelWithDebInfo -DOPTION_USE_ASSERTS=OFF
|
||||
|
||||
runs-on: macos-latest
|
||||
env:
|
||||
MACOSX_DEPLOYMENT_TARGET: 10.13
|
||||
name: Mac OS (${{ matrix.name }})
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
uses: ./.github/workflows/ci-macos.yml
|
||||
secrets: inherit
|
||||
|
||||
- name: Install dependencies
|
||||
env:
|
||||
HOMEBREW_NO_AUTO_UPDATE: 1
|
||||
HOMEBREW_NO_INSTALL_CLEANUP: 1
|
||||
run: |
|
||||
brew install \
|
||||
pkg-config \
|
||||
# EOF
|
||||
|
||||
- name: Prepare cache key
|
||||
id: key
|
||||
run: |
|
||||
echo "image=$ImageOS-$ImageVersion" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Enable vcpkg cache
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: /usr/local/share/vcpkg/installed
|
||||
key: ${{ steps.key.outputs.image }}-vcpkg-${{ matrix.arch }}-0 # Increase the number whenever dependencies are modified
|
||||
restore-keys: |
|
||||
${{ steps.key.outputs.image }}-vcpkg-${{ matrix.arch }}
|
||||
|
||||
- name: Prepare vcpkg
|
||||
run: |
|
||||
vcpkg install --triplet=${{ matrix.arch }}-osx \
|
||||
curl \
|
||||
liblzma \
|
||||
libpng \
|
||||
lzo \
|
||||
zlib \
|
||||
# EOF
|
||||
|
||||
- name: Install OpenGFX
|
||||
run: |
|
||||
mkdir -p ~/Documents/OpenTTD/baseset
|
||||
cd ~/Documents//OpenTTD/baseset
|
||||
|
||||
echo "::group::Download OpenGFX"
|
||||
curl -L https://cdn.openttd.org/opengfx-releases/0.6.0/opengfx-0.6.0-all.zip -o opengfx-all.zip
|
||||
echo "::endgroup::"
|
||||
|
||||
echo "::group::Unpack OpenGFX"
|
||||
unzip opengfx-all.zip
|
||||
echo "::endgroup::"
|
||||
|
||||
rm -f opengfx-all.zip
|
||||
|
||||
- name: Install GCC problem matcher
|
||||
uses: ammaraskar/gcc-problem-matcher@master
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
mkdir build
|
||||
cd build
|
||||
|
||||
echo "::group::CMake"
|
||||
cmake ${GITHUB_WORKSPACE} \
|
||||
-DCMAKE_OSX_ARCHITECTURES=${{ matrix.full_arch }} \
|
||||
-DVCPKG_TARGET_TRIPLET=${{ matrix.arch }}-osx \
|
||||
-DCMAKE_TOOLCHAIN_FILE=/usr/local/share/vcpkg/scripts/buildsystems/vcpkg.cmake \
|
||||
# EOF
|
||||
echo "::endgroup::"
|
||||
|
||||
echo "::group::Build"
|
||||
echo "Running on $(sysctl -n hw.logicalcpu) cores"
|
||||
cmake --build . -j $(sysctl -n hw.logicalcpu)
|
||||
echo "::endgroup::"
|
||||
|
||||
- name: Test
|
||||
run: |
|
||||
cd build
|
||||
ctest -j $(sysctl -n hw.logicalcpu) --timeout 120
|
||||
with:
|
||||
arch: ${{ matrix.arch }}
|
||||
full_arch: ${{ matrix.full_arch }}
|
||||
extra-cmake-parameters: ${{ matrix.extra-cmake-parameters }}
|
||||
|
||||
windows:
|
||||
name: Windows
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os: [windows-latest, windows-2019]
|
||||
arch: [x86, x64]
|
||||
|
||||
runs-on: ${{ matrix.os }}
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Prepare cache key
|
||||
id: key
|
||||
shell: powershell
|
||||
run: |
|
||||
# Work around caching failure with GNU tar
|
||||
New-Item -Type Junction -Path vcpkg -Target c:\vcpkg
|
||||
|
||||
Write-Output "image=$env:ImageOS-$env:ImageVersion" >> $env:GITHUB_OUTPUT
|
||||
|
||||
- name: Enable vcpkg cache
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: vcpkg/installed
|
||||
key: ${{ steps.key.outputs.image }}-vcpkg-${{ matrix.arch }}-0 # Increase the number whenever dependencies are modified
|
||||
restore-keys: |
|
||||
${{ steps.key.outputs.image }}-vcpkg-${{ matrix.arch }}
|
||||
|
||||
- name: Prepare vcpkg
|
||||
shell: bash
|
||||
run: |
|
||||
vcpkg install --triplet=${{ matrix.arch }}-windows-static \
|
||||
liblzma \
|
||||
libpng \
|
||||
lzo \
|
||||
zlib \
|
||||
# EOF
|
||||
|
||||
- name: Install OpenGFX
|
||||
shell: bash
|
||||
run: |
|
||||
mkdir -p "C:/Users/Public/Documents/OpenTTD/baseset"
|
||||
cd "C:/Users/Public/Documents/OpenTTD/baseset"
|
||||
|
||||
echo "::group::Download OpenGFX"
|
||||
curl -L https://cdn.openttd.org/opengfx-releases/0.6.0/opengfx-0.6.0-all.zip -o opengfx-all.zip
|
||||
echo "::endgroup::"
|
||||
|
||||
echo "::group::Unpack OpenGFX"
|
||||
unzip opengfx-all.zip
|
||||
echo "::endgroup::"
|
||||
|
||||
rm -f opengfx-all.zip
|
||||
|
||||
- name: Install MSVC problem matcher
|
||||
uses: ammaraskar/msvc-problem-matcher@master
|
||||
|
||||
- name: Configure developer command prompt for ${{ matrix.arch }}
|
||||
uses: ilammy/msvc-dev-cmd@v1
|
||||
with:
|
||||
arch: ${{ matrix.arch }}
|
||||
|
||||
- name: Build
|
||||
shell: bash
|
||||
run: |
|
||||
mkdir build
|
||||
cd build
|
||||
|
||||
echo "::group::CMake"
|
||||
cmake .. \
|
||||
-GNinja \
|
||||
-DVCPKG_TARGET_TRIPLET=${{ matrix.arch }}-windows-static \
|
||||
-DCMAKE_TOOLCHAIN_FILE="c:\vcpkg\scripts\buildsystems\vcpkg.cmake" \
|
||||
# EOF
|
||||
echo "::endgroup::"
|
||||
|
||||
echo "::group::Build"
|
||||
cmake --build .
|
||||
echo "::endgroup::"
|
||||
|
||||
- name: Test
|
||||
shell: bash
|
||||
run: |
|
||||
cd ${GITHUB_WORKSPACE}/build
|
||||
ctest --timeout 120
|
||||
|
||||
|
||||
msys2:
|
||||
name: msys2
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- msystem: MINGW64
|
||||
arch: x86_64
|
||||
- msystem: MINGW32
|
||||
arch: i686
|
||||
- os: windows-latest
|
||||
arch: x86
|
||||
- os: windows-latest
|
||||
arch: x64
|
||||
|
||||
runs-on: windows-latest
|
||||
name: Windows (${{ matrix.arch }})
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
uses: ./.github/workflows/ci-windows.yml
|
||||
secrets: inherit
|
||||
|
||||
- name: Setup MSYS2
|
||||
uses: msys2/setup-msys2@v2
|
||||
with:
|
||||
msystem: ${{ matrix.msystem }}
|
||||
release: false
|
||||
install: >-
|
||||
git
|
||||
make
|
||||
mingw-w64-${{ matrix.arch }}-cmake
|
||||
mingw-w64-${{ matrix.arch }}-gcc
|
||||
mingw-w64-${{ matrix.arch }}-lzo2
|
||||
mingw-w64-${{ matrix.arch }}-libpng
|
||||
|
||||
- name: Install OpenGFX
|
||||
shell: bash
|
||||
run: |
|
||||
mkdir -p "C:/Users/Public/Documents/OpenTTD/baseset"
|
||||
cd "C:/Users/Public/Documents/OpenTTD/baseset"
|
||||
|
||||
echo "::group::Download OpenGFX"
|
||||
curl -L https://cdn.openttd.org/opengfx-releases/0.6.0/opengfx-0.6.0-all.zip -o opengfx-all.zip
|
||||
echo "::endgroup::"
|
||||
|
||||
echo "::group::Unpack OpenGFX"
|
||||
unzip opengfx-all.zip
|
||||
echo "::endgroup::"
|
||||
|
||||
rm -f opengfx-all.zip
|
||||
|
||||
- name: Install GCC problem matcher
|
||||
uses: ammaraskar/gcc-problem-matcher@master
|
||||
|
||||
- name: Build
|
||||
shell: msys2 {0}
|
||||
run: |
|
||||
mkdir build
|
||||
cd build
|
||||
|
||||
echo "::group::CMake"
|
||||
cmake .. -G"MSYS Makefiles"
|
||||
echo "::endgroup::"
|
||||
|
||||
echo "::group::Build"
|
||||
echo "Running on $(nproc) cores"
|
||||
cmake --build . -j $(nproc)
|
||||
echo "::endgroup::"
|
||||
|
||||
- name: Test
|
||||
shell: msys2 {0}
|
||||
run: |
|
||||
cd build
|
||||
ctest -j $(nproc) --timeout 120
|
||||
with:
|
||||
os: ${{ matrix.os }}
|
||||
arch: ${{ matrix.arch }}
|
||||
|
||||
check_annotations:
|
||||
name: Check Annotations
|
||||
|
@ -415,7 +101,6 @@ jobs:
|
|||
- linux
|
||||
- macos
|
||||
- windows
|
||||
- msys2
|
||||
|
||||
if: always() && github.event_name == 'pull_request'
|
||||
|
||||
|
@ -423,4 +108,4 @@ jobs:
|
|||
|
||||
steps:
|
||||
- name: Check annotations
|
||||
uses: OpenTTD/actions/annotation-check@v3
|
||||
uses: OpenTTD/actions/annotation-check@v5
|
||||
|
|
|
@ -0,0 +1,61 @@
|
|||
name: CI (Emscripten)
|
||||
|
||||
on:
|
||||
workflow_call:
|
||||
|
||||
env:
|
||||
CTEST_OUTPUT_ON_FAILURE: 1
|
||||
|
||||
jobs:
|
||||
emscripten:
|
||||
name: CI
|
||||
|
||||
runs-on: ubuntu-20.04
|
||||
container:
|
||||
# If you change this version, change the number in the cache step too.
|
||||
image: emscripten/emsdk:3.1.57
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup cache
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: /emsdk/upstream/emscripten/cache
|
||||
key: 3.1.57-${{ runner.os }}
|
||||
|
||||
- name: Add liblzma support
|
||||
run: |
|
||||
cp ${GITHUB_WORKSPACE}/os/emscripten/ports/liblzma.py /emsdk/upstream/emscripten/tools/ports/contrib/
|
||||
|
||||
- name: Build (host tools)
|
||||
run: |
|
||||
mkdir build-host
|
||||
cd build-host
|
||||
|
||||
echo "::group::CMake"
|
||||
cmake .. -DOPTION_TOOLS_ONLY=ON
|
||||
echo "::endgroup::"
|
||||
|
||||
echo "::group::Build"
|
||||
echo "Running on $(nproc) cores"
|
||||
cmake --build . -j $(nproc) --target tools
|
||||
echo "::endgroup::"
|
||||
|
||||
- name: Install GCC problem matcher
|
||||
uses: ammaraskar/gcc-problem-matcher@master
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
mkdir build
|
||||
cd build
|
||||
|
||||
echo "::group::CMake"
|
||||
emcmake cmake .. -DHOST_BINARY_DIR=../build-host
|
||||
echo "::endgroup::"
|
||||
|
||||
echo "::group::Build"
|
||||
echo "Running on $(nproc) cores"
|
||||
cmake --build . -j $(nproc) --target openttd
|
||||
echo "::endgroup::"
|
|
@ -0,0 +1,123 @@
|
|||
name: CI (Linux)
|
||||
|
||||
on:
|
||||
workflow_call:
|
||||
inputs:
|
||||
compiler:
|
||||
required: true
|
||||
type: string
|
||||
cxxcompiler:
|
||||
required: true
|
||||
type: string
|
||||
libraries:
|
||||
required: true
|
||||
type: string
|
||||
extra-cmake-parameters:
|
||||
required: true
|
||||
type: string
|
||||
|
||||
env:
|
||||
CTEST_OUTPUT_ON_FAILURE: 1
|
||||
|
||||
jobs:
|
||||
linux:
|
||||
name: CI
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
CC: ${{ inputs.compiler }}
|
||||
CXX: ${{ inputs.cxxcompiler }}
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup vcpkg caching
|
||||
uses: actions/github-script@v7
|
||||
with:
|
||||
script: |
|
||||
core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || '');
|
||||
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '');
|
||||
core.exportVariable('VCPKG_BINARY_SOURCES', 'clear;x-gha,readwrite')
|
||||
|
||||
- name: Install vcpkg
|
||||
run: |
|
||||
git clone https://github.com/microsoft/vcpkg ${{ runner.temp }}/vcpkg
|
||||
${{ runner.temp }}/vcpkg/bootstrap-vcpkg.sh -disableMetrics
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
echo "::group::Update apt"
|
||||
sudo apt-get update
|
||||
echo "::endgroup::"
|
||||
|
||||
echo "::group::Install dependencies"
|
||||
sudo apt-get install -y --no-install-recommends \
|
||||
liballegro4-dev \
|
||||
libcurl4-openssl-dev \
|
||||
libfontconfig-dev \
|
||||
libharfbuzz-dev \
|
||||
libicu-dev \
|
||||
liblzma-dev \
|
||||
liblzo2-dev \
|
||||
${{ inputs.libraries }} \
|
||||
zlib1g-dev \
|
||||
# EOF
|
||||
|
||||
echo "::group::Install vcpkg dependencies"
|
||||
|
||||
# Disable vcpkg integration, as we mostly use system libraries.
|
||||
mv vcpkg.json vcpkg-disabled.json
|
||||
|
||||
# We only use breakpad from vcpkg, as its CMake files
|
||||
# are a bit special. So the Ubuntu's variant doesn't work.
|
||||
${{ runner.temp }}/vcpkg/vcpkg install breakpad
|
||||
|
||||
echo "::endgroup::"
|
||||
env:
|
||||
DEBIAN_FRONTEND: noninteractive
|
||||
|
||||
- name: Get OpenGFX
|
||||
run: |
|
||||
mkdir -p ~/.local/share/openttd/baseset
|
||||
cd ~/.local/share/openttd/baseset
|
||||
|
||||
echo "::group::Download OpenGFX"
|
||||
curl -L https://cdn.openttd.org/opengfx-releases/0.6.0/opengfx-0.6.0-all.zip -o opengfx-all.zip
|
||||
echo "::endgroup::"
|
||||
|
||||
echo "::group::Unpack OpenGFX"
|
||||
unzip opengfx-all.zip
|
||||
echo "::endgroup::"
|
||||
|
||||
rm -f opengfx-all.zip
|
||||
|
||||
- name: Install GCC problem matcher
|
||||
uses: ammaraskar/gcc-problem-matcher@master
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
mkdir build
|
||||
cd build
|
||||
|
||||
echo "::group::CMake"
|
||||
cmake .. -DCMAKE_TOOLCHAIN_FILE=${{ runner.temp }}/vcpkg/scripts/buildsystems/vcpkg.cmake ${{ inputs.extra-cmake-parameters }}
|
||||
echo "::endgroup::"
|
||||
|
||||
echo "::group::Build"
|
||||
echo "Running on $(nproc) cores"
|
||||
cmake --build . -j $(nproc)
|
||||
echo "::endgroup::"
|
||||
|
||||
- name: Test
|
||||
run: |
|
||||
(
|
||||
cd build
|
||||
ctest -j $(nproc) --timeout 120
|
||||
)
|
||||
|
||||
# Re-enable vcpkg.
|
||||
mv vcpkg-disabled.json vcpkg.json
|
||||
|
||||
# Check no tracked files have been modified.
|
||||
git diff --exit-code
|
|
@ -0,0 +1,90 @@
|
|||
name: CI (MacOS)
|
||||
|
||||
on:
|
||||
workflow_call:
|
||||
inputs:
|
||||
arch:
|
||||
required: true
|
||||
type: string
|
||||
full_arch:
|
||||
required: true
|
||||
type: string
|
||||
extra-cmake-parameters:
|
||||
required: false
|
||||
type: string
|
||||
default: ""
|
||||
|
||||
env:
|
||||
CTEST_OUTPUT_ON_FAILURE: 1
|
||||
|
||||
jobs:
|
||||
macos:
|
||||
name: CI
|
||||
|
||||
runs-on: macos-14
|
||||
env:
|
||||
MACOSX_DEPLOYMENT_TARGET: 10.13
|
||||
|
||||
steps:
|
||||
- name: Setup Xcode version
|
||||
uses: maxim-lobanov/setup-xcode@v1
|
||||
with:
|
||||
xcode-version: latest-stable
|
||||
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup vcpkg caching
|
||||
uses: actions/github-script@v7
|
||||
with:
|
||||
script: |
|
||||
core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || '');
|
||||
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '');
|
||||
core.exportVariable('VCPKG_BINARY_SOURCES', 'clear;x-gha,readwrite')
|
||||
|
||||
- name: Install vcpkg
|
||||
run: |
|
||||
git clone https://github.com/microsoft/vcpkg ${{ runner.temp }}/vcpkg
|
||||
${{ runner.temp }}/vcpkg/bootstrap-vcpkg.sh -disableMetrics
|
||||
|
||||
- name: Install OpenGFX
|
||||
run: |
|
||||
mkdir -p ~/Documents/OpenTTD/baseset
|
||||
cd ~/Documents/OpenTTD/baseset
|
||||
|
||||
echo "::group::Download OpenGFX"
|
||||
curl -L https://cdn.openttd.org/opengfx-releases/0.6.0/opengfx-0.6.0-all.zip -o opengfx-all.zip
|
||||
echo "::endgroup::"
|
||||
|
||||
echo "::group::Unpack OpenGFX"
|
||||
unzip opengfx-all.zip
|
||||
echo "::endgroup::"
|
||||
|
||||
rm -f opengfx-all.zip
|
||||
|
||||
- name: Install GCC problem matcher
|
||||
uses: ammaraskar/gcc-problem-matcher@master
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
mkdir build
|
||||
cd build
|
||||
|
||||
echo "::group::CMake"
|
||||
cmake .. \
|
||||
-DCMAKE_OSX_ARCHITECTURES=${{ inputs.full_arch }} \
|
||||
-DVCPKG_TARGET_TRIPLET=${{ inputs.arch }}-osx \
|
||||
-DCMAKE_TOOLCHAIN_FILE=${{ runner.temp }}/vcpkg/scripts/buildsystems/vcpkg.cmake \
|
||||
${{ inputs.extra-cmake-parameters }} \
|
||||
# EOF
|
||||
echo "::endgroup::"
|
||||
|
||||
echo "::group::Build"
|
||||
echo "Running on $(sysctl -n hw.logicalcpu) cores"
|
||||
cmake --build . -j $(sysctl -n hw.logicalcpu)
|
||||
echo "::endgroup::"
|
||||
|
||||
- name: Test
|
||||
run: |
|
||||
cd build
|
||||
ctest -j $(sysctl -n hw.logicalcpu) --timeout 120
|
|
@ -0,0 +1,83 @@
|
|||
name: CI (MinGW)
|
||||
|
||||
on:
|
||||
workflow_call:
|
||||
inputs:
|
||||
arch:
|
||||
required: true
|
||||
type: string
|
||||
msystem:
|
||||
required: true
|
||||
type: string
|
||||
|
||||
env:
|
||||
CTEST_OUTPUT_ON_FAILURE: 1
|
||||
|
||||
jobs:
|
||||
mingw:
|
||||
name: CI
|
||||
|
||||
runs-on: windows-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup MSYS2
|
||||
uses: msys2/setup-msys2@v2
|
||||
with:
|
||||
msystem: ${{ inputs.msystem }}
|
||||
release: false
|
||||
install: >-
|
||||
git
|
||||
make
|
||||
mingw-w64-${{ inputs.arch }}-cmake
|
||||
mingw-w64-${{ inputs.arch }}-gcc
|
||||
mingw-w64-${{ inputs.arch }}-lzo2
|
||||
mingw-w64-${{ inputs.arch }}-libpng
|
||||
mingw-w64-${{ inputs.arch }}-lld
|
||||
mingw-w64-${{ inputs.arch }}-ninja
|
||||
|
||||
- name: Install OpenGFX
|
||||
shell: bash
|
||||
run: |
|
||||
mkdir -p "C:/Users/Public/Documents/OpenTTD/baseset"
|
||||
cd "C:/Users/Public/Documents/OpenTTD/baseset"
|
||||
|
||||
echo "::group::Download OpenGFX"
|
||||
curl -L https://cdn.openttd.org/opengfx-releases/0.6.0/opengfx-0.6.0-all.zip -o opengfx-all.zip
|
||||
echo "::endgroup::"
|
||||
|
||||
echo "::group::Unpack OpenGFX"
|
||||
unzip opengfx-all.zip
|
||||
echo "::endgroup::"
|
||||
|
||||
rm -f opengfx-all.zip
|
||||
|
||||
- name: Install GCC problem matcher
|
||||
uses: ammaraskar/gcc-problem-matcher@master
|
||||
|
||||
- name: Build
|
||||
shell: msys2 {0}
|
||||
env:
|
||||
NINJA_STATUS: "[%f/%t -- %e] " # [finished_edges/total_edges -- elapsed_time], default value is "[%f/%t] "
|
||||
run: |
|
||||
mkdir build
|
||||
cd build
|
||||
|
||||
echo "::group::CMake"
|
||||
cmake .. \
|
||||
-GNinja \
|
||||
-DCMAKE_CXX_FLAGS="-fuse-ld=lld" \
|
||||
# EOF
|
||||
echo "::endgroup::"
|
||||
|
||||
echo "::group::Build"
|
||||
cmake --build .
|
||||
echo "::endgroup::"
|
||||
|
||||
- name: Test
|
||||
shell: msys2 {0}
|
||||
run: |
|
||||
cd build
|
||||
ctest --timeout 120
|
|
@ -0,0 +1,82 @@
|
|||
name: CI - Nightly
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: '0 3 * * *'
|
||||
workflow_dispatch:
|
||||
|
||||
env:
|
||||
CTEST_OUTPUT_ON_FAILURE: 1
|
||||
|
||||
jobs:
|
||||
linux:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- name: GCC - SDL1.2
|
||||
compiler: gcc
|
||||
cxxcompiler: g++
|
||||
libraries: libsdl1.2-dev
|
||||
|
||||
name: Linux (${{ matrix.name }})
|
||||
|
||||
uses: ./.github/workflows/ci-linux.yml
|
||||
secrets: inherit
|
||||
|
||||
with:
|
||||
compiler: ${{ matrix.compiler }}
|
||||
cxxcompiler: ${{ matrix.cxxcompiler }}
|
||||
libraries: ${{ matrix.libraries }}
|
||||
extra-cmake-parameters:
|
||||
|
||||
macos:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- arch: x64
|
||||
full_arch: x86_64
|
||||
|
||||
name: Mac OS (${{ matrix.arch }})
|
||||
|
||||
uses: ./.github/workflows/ci-macos.yml
|
||||
secrets: inherit
|
||||
|
||||
with:
|
||||
arch: ${{ matrix.arch }}
|
||||
full_arch: ${{ matrix.full_arch }}
|
||||
|
||||
mingw:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- msystem: MINGW64
|
||||
arch: x86_64
|
||||
- msystem: MINGW32
|
||||
arch: i686
|
||||
|
||||
name: MinGW (${{ matrix.arch }})
|
||||
|
||||
uses: ./.github/workflows/ci-mingw.yml
|
||||
secrets: inherit
|
||||
|
||||
with:
|
||||
msystem: ${{ matrix.msystem }}
|
||||
arch: ${{ matrix.arch }}
|
||||
|
||||
check_annotations:
|
||||
name: Check Annotations
|
||||
needs:
|
||||
- linux
|
||||
- macos
|
||||
- mingw
|
||||
|
||||
if: always()
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Check annotations
|
||||
uses: OpenTTD/actions/annotation-check@v5
|
|
@ -0,0 +1,87 @@
|
|||
name: CI (Windows)
|
||||
|
||||
on:
|
||||
workflow_call:
|
||||
inputs:
|
||||
arch:
|
||||
required: true
|
||||
type: string
|
||||
os:
|
||||
required: true
|
||||
type: string
|
||||
|
||||
env:
|
||||
CTEST_OUTPUT_ON_FAILURE: 1
|
||||
|
||||
jobs:
|
||||
windows:
|
||||
name: CI
|
||||
|
||||
runs-on: ${{ inputs.os }}
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup vcpkg caching
|
||||
uses: actions/github-script@v7
|
||||
with:
|
||||
script: |
|
||||
core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || '');
|
||||
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '');
|
||||
core.exportVariable('VCPKG_BINARY_SOURCES', 'clear;x-gha,readwrite')
|
||||
|
||||
- name: Install vcpkg
|
||||
run: |
|
||||
git clone https://github.com/microsoft/vcpkg ${{ runner.temp }}\vcpkg
|
||||
${{ runner.temp }}\vcpkg\bootstrap-vcpkg.bat -disableMetrics
|
||||
|
||||
- name: Install OpenGFX
|
||||
shell: bash
|
||||
run: |
|
||||
mkdir -p "C:/Users/Public/Documents/OpenTTD/baseset"
|
||||
cd "C:/Users/Public/Documents/OpenTTD/baseset"
|
||||
|
||||
echo "::group::Download OpenGFX"
|
||||
curl -L https://cdn.openttd.org/opengfx-releases/0.6.0/opengfx-0.6.0-all.zip -o opengfx-all.zip
|
||||
echo "::endgroup::"
|
||||
|
||||
echo "::group::Unpack OpenGFX"
|
||||
unzip opengfx-all.zip
|
||||
echo "::endgroup::"
|
||||
|
||||
rm -f opengfx-all.zip
|
||||
|
||||
- name: Install MSVC problem matcher
|
||||
uses: ammaraskar/msvc-problem-matcher@master
|
||||
|
||||
- name: Configure developer command prompt for ${{ inputs.arch }}
|
||||
uses: ilammy/msvc-dev-cmd@v1
|
||||
with:
|
||||
arch: ${{ inputs.arch }}
|
||||
|
||||
- name: Build
|
||||
shell: bash
|
||||
env:
|
||||
NINJA_STATUS: "[%f/%t -- %e] " # [finished_edges/total_edges -- elapsed_time], default value is "[%f/%t] "
|
||||
run: |
|
||||
mkdir build
|
||||
cd build
|
||||
|
||||
echo "::group::CMake"
|
||||
cmake .. \
|
||||
-GNinja \
|
||||
-DVCPKG_TARGET_TRIPLET=${{ inputs.arch }}-windows-static \
|
||||
-DCMAKE_TOOLCHAIN_FILE="${{ runner.temp }}\vcpkg\scripts\buildsystems\vcpkg.cmake" \
|
||||
# EOF
|
||||
echo "::endgroup::"
|
||||
|
||||
echo "::group::Build"
|
||||
cmake --build .
|
||||
echo "::endgroup::"
|
||||
|
||||
- name: Test
|
||||
shell: bash
|
||||
run: |
|
||||
cd build
|
||||
ctest --timeout 120
|
|
@ -24,7 +24,20 @@ jobs:
|
|||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup vcpkg caching
|
||||
uses: actions/github-script@v7
|
||||
with:
|
||||
script: |
|
||||
core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || '');
|
||||
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '');
|
||||
core.exportVariable('VCPKG_BINARY_SOURCES', 'clear;x-gha,readwrite')
|
||||
|
||||
- name: Install vcpkg
|
||||
run: |
|
||||
git clone https://github.com/microsoft/vcpkg ${{ runner.temp }}/vcpkg
|
||||
${{ runner.temp }}/vcpkg/bootstrap-vcpkg.sh -disableMetrics
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
|
@ -37,31 +50,53 @@ jobs:
|
|||
liballegro4-dev \
|
||||
libcurl4-openssl-dev \
|
||||
libfontconfig-dev \
|
||||
libharfbuzz-dev \
|
||||
libicu-dev \
|
||||
liblzma-dev \
|
||||
liblzo2-dev \
|
||||
libsdl2-dev \
|
||||
zlib1g-dev \
|
||||
# EOF
|
||||
|
||||
echo "::group::Install vcpkg dependencies"
|
||||
|
||||
# Disable vcpkg integration, as we mostly use system libraries.
|
||||
mv vcpkg.json vcpkg-disabled.json
|
||||
|
||||
# We only use breakpad from vcpkg, as its CMake files
|
||||
# are a bit special. So the Ubuntu's variant doesn't work.
|
||||
${{ runner.temp }}/vcpkg/vcpkg install breakpad
|
||||
|
||||
echo "::endgroup::"
|
||||
env:
|
||||
DEBIAN_FRONTEND: noninteractive
|
||||
|
||||
- name: Set number of make jobs
|
||||
- name: Prepare build
|
||||
run: |
|
||||
echo "MAKEFLAGS=-j$(nproc)" >> $GITHUB_ENV
|
||||
mkdir build
|
||||
cd build
|
||||
|
||||
echo "::group::CMake"
|
||||
cmake .. -DCMAKE_TOOLCHAIN_FILE=${{ runner.temp }}/vcpkg/scripts/buildsystems/vcpkg.cmake
|
||||
echo "::endgroup::"
|
||||
|
||||
- name: Initialize CodeQL
|
||||
uses: github/codeql-action/init@v2
|
||||
uses: github/codeql-action/init@v3
|
||||
with:
|
||||
languages: cpp
|
||||
config-file: ./.github/codeql/codeql-config.yml
|
||||
|
||||
- name: Autobuild
|
||||
uses: github/codeql-action/autobuild@v2
|
||||
- name: Build
|
||||
run: |
|
||||
cd build
|
||||
|
||||
echo "::group::Build"
|
||||
echo "Running on $(nproc) cores"
|
||||
cmake --build . -j $(nproc)
|
||||
echo "::endgroup::"
|
||||
|
||||
- name: Perform CodeQL Analysis
|
||||
uses: github/codeql-action/analyze@v2
|
||||
uses: github/codeql-action/analyze@v3
|
||||
with:
|
||||
category: /language:cpp
|
||||
upload: False
|
||||
|
@ -74,10 +109,11 @@ jobs:
|
|||
+**/*.*
|
||||
-**/table/*.*
|
||||
-**/generated/**/*.*
|
||||
-**/tests/*.*
|
||||
input: sarif-results/cpp.sarif
|
||||
output: sarif-results/cpp.sarif
|
||||
|
||||
- name: Upload results
|
||||
uses: github/codeql-action/upload-sarif@v2
|
||||
uses: github/codeql-action/upload-sarif@v3
|
||||
with:
|
||||
sarif_file: sarif-results/cpp.sarif
|
||||
|
|
|
@ -14,12 +14,12 @@ jobs:
|
|||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 4
|
||||
|
||||
- name: Get pull-request commits
|
||||
uses: OpenTTD/actions/checkout-pull-request@v2
|
||||
uses: OpenTTD/actions/checkout-pull-request@v5
|
||||
|
||||
- name: Check commits
|
||||
uses: OpenTTD/OpenTTD-git-hooks@main
|
||||
|
|
|
@ -0,0 +1,102 @@
|
|||
name: Preview build
|
||||
|
||||
on:
|
||||
workflow_call:
|
||||
secrets:
|
||||
PREVIEW_CLOUDFLARE_API_TOKEN:
|
||||
description: API token to upload a preview to Cloudflare Pages
|
||||
required: true
|
||||
PREVIEW_CLOUDFLARE_ACCOUNT_ID:
|
||||
description: Account ID to upload a preview to Cloudflare Pages
|
||||
required: true
|
||||
|
||||
jobs:
|
||||
preview:
|
||||
name: Build preview
|
||||
|
||||
environment:
|
||||
name: preview
|
||||
url: https://preview.openttd.org/pr${{ github.event.pull_request.number }}/
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
# If you change this version, change the number in the cache step too.
|
||||
image: emscripten/emsdk:3.1.57
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
ref: ${{ github.event.pull_request.head.sha }}
|
||||
|
||||
- name: Name branch
|
||||
run: |
|
||||
git config --global --add safe.directory ${GITHUB_WORKSPACE}
|
||||
git checkout -b pr${{ github.event.pull_request.number }}
|
||||
|
||||
- name: Setup cache
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: /emsdk/upstream/emscripten/cache
|
||||
key: 3.1.57-${{ runner.os }}
|
||||
|
||||
- name: Add liblzma support
|
||||
run: |
|
||||
cp ${GITHUB_WORKSPACE}/os/emscripten/ports/liblzma.py /emsdk/upstream/emscripten/tools/ports/contrib/
|
||||
|
||||
- name: Build (host tools)
|
||||
run: |
|
||||
mkdir build-host
|
||||
cd build-host
|
||||
|
||||
echo "::group::CMake"
|
||||
cmake .. -DOPTION_TOOLS_ONLY=ON
|
||||
echo "::endgroup::"
|
||||
|
||||
echo "::group::Build"
|
||||
echo "Running on $(nproc) cores"
|
||||
make -j$(nproc) tools
|
||||
echo "::endgroup::"
|
||||
|
||||
- name: Install GCC problem matcher
|
||||
uses: ammaraskar/gcc-problem-matcher@master
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
mkdir build
|
||||
cd build
|
||||
|
||||
echo "::group::CMake"
|
||||
emcmake cmake .. \
|
||||
-DHOST_BINARY_DIR=../build-host \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
# EOF
|
||||
echo "::endgroup::"
|
||||
|
||||
echo "::group::Build"
|
||||
echo "Running on $(nproc) cores"
|
||||
cmake --build . -j $(nproc) --target openttd
|
||||
echo "::endgroup::"
|
||||
|
||||
- name: Prepare preview
|
||||
run: |
|
||||
mkdir public
|
||||
|
||||
cp build/openttd.data public/
|
||||
cp build/openttd.html public/
|
||||
cp build/openttd.js public/
|
||||
cp build/openttd.wasm public/
|
||||
|
||||
# Ensure we use the latest version of npm; the one we get with current
|
||||
# emscripten doesn't allow running "npx wrangler" as root.
|
||||
# Current emscripten can't install npm>=10.0.0 because node is too old.
|
||||
npm install -g npm@9
|
||||
|
||||
- name: Publish preview
|
||||
uses: cloudflare/pages-action@v1
|
||||
with:
|
||||
apiToken: ${{ secrets.PREVIEW_CLOUDFLARE_API_TOKEN }}
|
||||
accountId: ${{ secrets.PREVIEW_CLOUDFLARE_ACCOUNT_ID }}
|
||||
projectName: ${{ vars.PREVIEW_CLOUDFLARE_PROJECT_NAME }}
|
||||
directory: public
|
||||
branch: pr${{ github.event.pull_request.number }}
|
|
@ -0,0 +1,21 @@
|
|||
name: Preview
|
||||
|
||||
on:
|
||||
pull_request_target:
|
||||
types:
|
||||
- labeled
|
||||
- synchronize
|
||||
branches:
|
||||
- master
|
||||
- release/**
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.event.pull_request.number }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
preview:
|
||||
if: ${{ (github.event.action == 'labeled' && github.event.label.name == 'preview') || (github.event.action != 'labeled' && contains(github.event.pull_request.labels.*.name, 'preview')) }}
|
||||
name: Preview
|
||||
uses: ./.github/workflows/preview-build.yml
|
||||
secrets: inherit
|
|
@ -1,134 +0,0 @@
|
|||
name: Preview build
|
||||
|
||||
on:
|
||||
repository_dispatch:
|
||||
types:
|
||||
- Preview*
|
||||
|
||||
jobs:
|
||||
preview:
|
||||
name: Build preview
|
||||
|
||||
runs-on: ubuntu-20.04
|
||||
container:
|
||||
# If you change this version, change the number in the cache step too.
|
||||
image: emscripten/emsdk:3.1.28
|
||||
|
||||
steps:
|
||||
- name: Update deployment status to in progress
|
||||
uses: octokit/request-action@v2.x
|
||||
with:
|
||||
route: POST /repos/{owner}/{repo}/deployments/{deployment_id}/statuses
|
||||
mediaType: |
|
||||
previews:
|
||||
- ant-man
|
||||
- flash
|
||||
owner: ${{ github.event.repository.owner.login }}
|
||||
repo: ${{ github.event.repository.name }}
|
||||
deployment_id: ${{ github.event.client_payload.deployment_id }}
|
||||
state: in_progress
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.PREVIEW_GITHUB_TOKEN }}
|
||||
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
ref: ${{ github.event.client_payload.sha }}
|
||||
|
||||
- name: Name branch
|
||||
run: |
|
||||
git config --global --add safe.directory ${GITHUB_WORKSPACE}
|
||||
name=$(echo "${{ github.event.client_payload.folder }}")
|
||||
git checkout -b ${name}
|
||||
|
||||
- name: Setup cache
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: /emsdk/upstream/emscripten/cache
|
||||
key: 3.1.28-${{ runner.os }}
|
||||
|
||||
- name: Patch Emscripten to support LZMA
|
||||
run: |
|
||||
cd /emsdk/upstream/emscripten
|
||||
patch -p1 < ${GITHUB_WORKSPACE}/os/emscripten/emsdk-liblzma.patch
|
||||
|
||||
- name: Build (host tools)
|
||||
run: |
|
||||
mkdir build-host
|
||||
cd build-host
|
||||
|
||||
echo "::group::CMake"
|
||||
cmake .. -DOPTION_TOOLS_ONLY=ON
|
||||
echo "::endgroup::"
|
||||
|
||||
echo "::group::Build"
|
||||
echo "Running on $(nproc) cores"
|
||||
make -j$(nproc) tools
|
||||
echo "::endgroup::"
|
||||
|
||||
- name: Install GCC problem matcher
|
||||
uses: ammaraskar/gcc-problem-matcher@master
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
mkdir build
|
||||
cd build
|
||||
|
||||
echo "::group::CMake"
|
||||
emcmake cmake .. \
|
||||
-DHOST_BINARY_DIR=../build-host \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
# EOF
|
||||
echo "::endgroup::"
|
||||
|
||||
echo "::group::Build"
|
||||
echo "Running on $(nproc) cores"
|
||||
emmake make -j$(nproc)
|
||||
echo "::endgroup::"
|
||||
|
||||
- name: Publish preview
|
||||
run: |
|
||||
pip3 install awscli
|
||||
|
||||
aws s3 cp --only-show-errors build/openttd.data s3://${{ secrets.PREVIEW_S3_BUCKET }}/${{ github.event.client_payload.folder }}/
|
||||
aws s3 cp --only-show-errors build/openttd.html s3://${{ secrets.PREVIEW_S3_BUCKET }}/${{ github.event.client_payload.folder }}/
|
||||
aws s3 cp --only-show-errors build/openttd.js s3://${{ secrets.PREVIEW_S3_BUCKET }}/${{ github.event.client_payload.folder }}/
|
||||
aws s3 cp --only-show-errors build/openttd.wasm s3://${{ secrets.PREVIEW_S3_BUCKET }}/${{ github.event.client_payload.folder }}/
|
||||
|
||||
# Invalidate the cache of the CloudFront distribution
|
||||
aws cloudfront create-invalidation --distribution-id ${{ secrets.PREVIEW_CF_DISTRIBUTION_ID }} --paths "/${{ github.event.client_payload.folder }}/*"
|
||||
env:
|
||||
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
|
||||
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
|
||||
|
||||
- name: Update deployment status to success
|
||||
uses: octokit/request-action@v2.x
|
||||
with:
|
||||
route: POST /repos/{owner}/{repo}/deployments/{deployment_id}/statuses
|
||||
mediaType: |
|
||||
previews:
|
||||
- ant-man
|
||||
- flash
|
||||
owner: ${{ github.event.repository.owner.login }}
|
||||
repo: ${{ github.event.repository.name }}
|
||||
deployment_id: ${{ github.event.client_payload.deployment_id }}
|
||||
state: success
|
||||
environment_url: https://preview.openttd.org/${{ github.event.client_payload.folder }}/
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.PREVIEW_GITHUB_TOKEN }}
|
||||
|
||||
- if: failure()
|
||||
name: Update deployment status to failure
|
||||
uses: octokit/request-action@v2.x
|
||||
with:
|
||||
route: POST /repos/{owner}/{repo}/deployments/{deployment_id}/statuses
|
||||
mediaType: |
|
||||
previews:
|
||||
- ant-man
|
||||
- flash
|
||||
owner: ${{ github.event.repository.owner.login }}
|
||||
repo: ${{ github.event.repository.name }}
|
||||
deployment_id: ${{ github.event.client_payload.deployment_id }}
|
||||
state: failure
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.PREVIEW_GITHUB_TOKEN }}
|
|
@ -1,66 +0,0 @@
|
|||
name: Preview label
|
||||
|
||||
on:
|
||||
pull_request_target:
|
||||
types:
|
||||
- labeled
|
||||
|
||||
env:
|
||||
TEAM_CORE_DEVELOPER: core-developers
|
||||
|
||||
jobs:
|
||||
check_preview_label:
|
||||
name: Check for preview label
|
||||
if: github.event.action == 'labeled' && github.event.label.name == 'preview'
|
||||
|
||||
runs-on: ubuntu-20.04
|
||||
|
||||
steps:
|
||||
- name: Check if label was added by core developer
|
||||
id: core_developer
|
||||
continue-on-error: true
|
||||
uses: octokit/request-action@v2.x
|
||||
with:
|
||||
route: GET /orgs/OpenTTD/teams/${{ env.TEAM_CORE_DEVELOPER }}/memberships/${{ github.event.sender.login }}
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.PREVIEW_GITHUB_TOKEN }}
|
||||
|
||||
- if: steps.core_developer.outcome == 'failure'
|
||||
name: Remove preview label if not core developer
|
||||
uses: octokit/request-action@v2.x
|
||||
with:
|
||||
route: DELETE /repos/{owner}/{repo}/issues/{issue_number}/labels/preview
|
||||
owner: ${{ github.event.repository.owner.login }}
|
||||
repo: ${{ github.event.repository.name }}
|
||||
issue_number: ${{ github.event.number }}
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.PREVIEW_GITHUB_TOKEN }}
|
||||
|
||||
- if: steps.core_developer.outcome == 'success'
|
||||
name: Create deployment
|
||||
id: deployment
|
||||
uses: octokit/request-action@v2.x
|
||||
with:
|
||||
route: POST /repos/{owner}/{repo}/deployments
|
||||
mediaType: |
|
||||
previews:
|
||||
- ant-man
|
||||
- flash
|
||||
owner: ${{ github.event.repository.owner.login }}
|
||||
repo: ${{ github.event.repository.name }}
|
||||
ref: ${{ github.event.pull_request.head.sha }}
|
||||
task: deploy:preview
|
||||
auto_merge: false
|
||||
required_contexts: "[]"
|
||||
environment: preview-pr-${{ github.event.number }}
|
||||
description: "Preview for Pull Request #${{ github.event.number }}"
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.PREVIEW_GITHUB_TOKEN }}
|
||||
|
||||
- if: steps.core_developer.outcome == 'success'
|
||||
name: Trigger 'preview build'
|
||||
uses: peter-evans/repository-dispatch@v2
|
||||
with:
|
||||
token: ${{ secrets.PREVIEW_GITHUB_TOKEN }}
|
||||
event-type: "Preview build #${{ github.event.number }}"
|
||||
client-payload: '{"folder": "pr${{ github.event.number }}", "sha": "${{ github.event.pull_request.head.sha }}", "deployment_id": "${{ fromJson(steps.deployment.outputs.data).id }}"}'
|
|
@ -1,66 +0,0 @@
|
|||
name: Preview push
|
||||
|
||||
on:
|
||||
pull_request_target:
|
||||
types:
|
||||
- synchronize
|
||||
|
||||
jobs:
|
||||
check_new_preview:
|
||||
name: Check preview needs update
|
||||
|
||||
runs-on: ubuntu-20.04
|
||||
|
||||
steps:
|
||||
- name: Check if earlier preview exists
|
||||
id: earlier_preview
|
||||
uses: octokit/request-action@v2.x
|
||||
with:
|
||||
route: GET /repos/{owner}/{repo}/deployments
|
||||
owner: ${{ github.event.repository.owner.login }}
|
||||
repo: ${{ github.event.repository.name }}
|
||||
environment: preview-pr-${{ github.event.number }}
|
||||
per_page: 1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.PREVIEW_GITHUB_TOKEN }}
|
||||
|
||||
- if: toJson(fromJson(steps.earlier_preview.outputs.data)) != '[]'
|
||||
name: Check for preview label
|
||||
id: preview_label
|
||||
uses: octokit/request-action@v2.x
|
||||
with:
|
||||
route: GET /repos/{owner}/{repo}/issues/{issue_number}/labels
|
||||
owner: ${{ github.event.repository.owner.login }}
|
||||
repo: ${{ github.event.repository.name }}
|
||||
issue_number: ${{ github.event.number }}
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.PREVIEW_GITHUB_TOKEN }}
|
||||
|
||||
- if: toJson(fromJson(steps.earlier_preview.outputs.data)) != '[]' && contains(fromJson(steps.preview_label.outputs.data).*.name, 'preview')
|
||||
name: Create deployment
|
||||
id: deployment
|
||||
uses: octokit/request-action@v2.x
|
||||
with:
|
||||
route: POST /repos/{owner}/{repo}/deployments
|
||||
mediaType: |
|
||||
previews:
|
||||
- ant-man
|
||||
- flash
|
||||
owner: ${{ github.event.repository.owner.login }}
|
||||
repo: ${{ github.event.repository.name }}
|
||||
ref: ${{ github.event.pull_request.head.sha }}
|
||||
task: deploy:preview
|
||||
auto_merge: false
|
||||
required_contexts: "[]"
|
||||
environment: preview-pr-${{ github.event.number }}
|
||||
description: "Preview for Pull Request #${{ github.event.number }}"
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.PREVIEW_GITHUB_TOKEN }}
|
||||
|
||||
- if: toJson(fromJson(steps.earlier_preview.outputs.data)) != '[]' && contains(fromJson(steps.preview_label.outputs.data).*.name, 'preview')
|
||||
name: Trigger 'preview build'
|
||||
uses: peter-evans/repository-dispatch@v2
|
||||
with:
|
||||
token: ${{ secrets.PREVIEW_GITHUB_TOKEN }}
|
||||
event-type: "Preview build #${{ github.event.number }}"
|
||||
client-payload: '{"folder": "pr${{ github.event.number }}", "sha": "${{ github.event.pull_request.head.sha }}", "deployment_id": "${{ fromJson(steps.deployment.outputs.data).id }}"}'
|
|
@ -15,7 +15,7 @@ jobs:
|
|||
|
||||
steps:
|
||||
- name: Download source
|
||||
uses: actions/download-artifact@v3
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: internal-source
|
||||
|
||||
|
@ -78,7 +78,7 @@ jobs:
|
|||
echo "::endgroup::"
|
||||
|
||||
- name: Store bundles
|
||||
uses: actions/upload-artifact@v3
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: openttd-docs
|
||||
path: build/bundles/*.tar.xz
|
||||
|
|
|
@ -2,20 +2,26 @@ name: Release (Linux)
|
|||
|
||||
on:
|
||||
workflow_call:
|
||||
inputs:
|
||||
survey_key:
|
||||
required: false
|
||||
type: string
|
||||
default: ""
|
||||
|
||||
jobs:
|
||||
linux:
|
||||
name: Linux (Generic)
|
||||
|
||||
runs-on: ubuntu-20.04
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
# manylinux2014 is based on CentOS 7, but already has a lot of things
|
||||
# manylinux_2_28 is based on AlmaLinux 8, and already has a lot of things
|
||||
# installed and preconfigured. It makes it easier to build OpenTTD.
|
||||
image: quay.io/pypa/manylinux2014_x86_64
|
||||
# This distro is based on glibc 2.28, released in 2018.
|
||||
image: quay.io/pypa/manylinux_2_28_x86_64
|
||||
|
||||
steps:
|
||||
- name: Download source
|
||||
uses: actions/download-artifact@v3
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: internal-source
|
||||
|
||||
|
@ -23,59 +29,37 @@ jobs:
|
|||
run: |
|
||||
tar -xf source.tar.gz --strip-components=1
|
||||
|
||||
- name: Enable vcpkg cache
|
||||
uses: actions/cache@v3
|
||||
- name: Install Rust toolchain
|
||||
uses: dtolnay/rust-toolchain@stable
|
||||
|
||||
- name: Enable Rust cache
|
||||
uses: Swatinem/rust-cache@v2
|
||||
|
||||
- name: Setup vcpkg caching
|
||||
uses: actions/github-script@v7
|
||||
with:
|
||||
path: /vcpkg/installed
|
||||
key: ubuntu-20.04-vcpkg-release-0 # Increase the number whenever dependencies are modified
|
||||
restore-keys: |
|
||||
ubuntu-20.04-vcpkg-release
|
||||
script: |
|
||||
core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || '');
|
||||
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '');
|
||||
core.exportVariable('VCPKG_BINARY_SOURCES', 'clear;x-gha,readwrite')
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
echo "::group::Install system dependencies"
|
||||
# ICU is used as vcpkg fails to install ICU. Other dependencies
|
||||
# are needed either for vcpkg or for the packages installed with
|
||||
# vcpkg.
|
||||
# perl-IPC-Cmd, wget, and zip are needed to run vcpkg.
|
||||
# autoconf-archive is needed to build ICU.
|
||||
yum install -y \
|
||||
libicu-devel \
|
||||
autoconf-archive \
|
||||
perl-IPC-Cmd \
|
||||
wget \
|
||||
zip \
|
||||
# EOF
|
||||
echo "::endgroup::"
|
||||
|
||||
# We use vcpkg for our dependencies, to get more up-to-date version.
|
||||
echo "::group::Install vcpkg and dependencies"
|
||||
|
||||
# We do a little dance to make sure we copy the cached install folder
|
||||
# into our new clone.
|
||||
git clone --depth=1 https://github.com/microsoft/vcpkg /vcpkg-clone
|
||||
if [ -e /vcpkg/installed ]; then
|
||||
mv /vcpkg/installed /vcpkg-clone/
|
||||
rm -rf /vcpkg
|
||||
fi
|
||||
mv /vcpkg-clone /vcpkg
|
||||
|
||||
(
|
||||
cd /vcpkg
|
||||
./bootstrap-vcpkg.sh -disableMetrics
|
||||
|
||||
# Make Python3 available for other packages.
|
||||
./vcpkg install python3
|
||||
ln -sf $(pwd)/installed/x64-linux/tools/python3/python3.[0-9][0-9] /usr/bin/python3
|
||||
|
||||
./vcpkg install \
|
||||
curl[http2] \
|
||||
fontconfig \
|
||||
freetype \
|
||||
liblzma \
|
||||
libpng \
|
||||
lzo \
|
||||
sdl2 \
|
||||
zlib \
|
||||
# EOF
|
||||
)
|
||||
# aclocal looks first in /usr/local/share/aclocal, and if that doesn't
|
||||
# exist only looks in /usr/share/aclocal. We have files in both that
|
||||
# are important. So copy the latter to the first, and we are good to
|
||||
# go.
|
||||
cp /usr/share/aclocal/* /usr/local/share/aclocal/
|
||||
echo "::endgroup::"
|
||||
|
||||
# The yum variant of fluidsynth depends on all possible audio drivers,
|
||||
|
@ -84,19 +68,63 @@ jobs:
|
|||
# as such do not use these audio driver outputs at all.
|
||||
# The vcpkg variant of fluidsynth depends on ALSA. Similar issue here.
|
||||
# So instead, we compile fluidsynth ourselves, with as few
|
||||
# dependencies as possible. This currently means it picks up SDL2, but
|
||||
# this is fine, as we need SDL2 anyway.
|
||||
# dependencies as possible. We do it before anything else is installed,
|
||||
# to make sure it doesn't pick up on any of the drivers.
|
||||
echo "::group::Install fluidsynth"
|
||||
wget https://github.com/FluidSynth/fluidsynth/archive/v2.1.6.tar.gz
|
||||
tar xf v2.1.6.tar.gz
|
||||
wget https://github.com/FluidSynth/fluidsynth/archive/v2.3.3.tar.gz
|
||||
tar xf v2.3.3.tar.gz
|
||||
(
|
||||
cd fluidsynth-2.1.6
|
||||
cd fluidsynth-2.3.3
|
||||
mkdir build
|
||||
cd build
|
||||
cmake .. -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_INSTALL_PREFIX=/usr
|
||||
cmake --build . -j $(nproc)
|
||||
cmake --install .
|
||||
)
|
||||
|
||||
echo "::group::Install audio drivers"
|
||||
# These audio libs are to make sure the SDL version of vcpkg adds
|
||||
# sound-support; these libraries are not added to the resulting
|
||||
# binary, but the headers are used to enable them in SDL.
|
||||
yum install -y \
|
||||
alsa-lib-devel \
|
||||
pulseaudio-libs-devel \
|
||||
# EOF
|
||||
echo "::endgroup::"
|
||||
|
||||
echo "::group::Install video drivers"
|
||||
# These video libs are to make sure the SDL version of vcpkg adds
|
||||
# video-support; these libraries are not added to the resulting
|
||||
# binary, but the headers are used to enable them in SDL.
|
||||
yum install -y \
|
||||
libX11-devel \
|
||||
libXcursor-devel \
|
||||
libXext-devel \
|
||||
libXfixes-devel \
|
||||
libXi-devel \
|
||||
libxkbcommon-devel \
|
||||
libXrandr-devel \
|
||||
libXScrnSaver-devel \
|
||||
mesa-libEGL-devel \
|
||||
mesa-libGL-devel \
|
||||
mesa-libGLES-devel \
|
||||
wayland-devel \
|
||||
wayland-protocols-devel \
|
||||
# EOF
|
||||
echo "::endgroup::"
|
||||
|
||||
# We use vcpkg for our dependencies, to get more up-to-date version.
|
||||
echo "::group::Install vcpkg and dependencies"
|
||||
|
||||
git clone https://github.com/microsoft/vcpkg /vcpkg
|
||||
|
||||
(
|
||||
cd /vcpkg
|
||||
./bootstrap-vcpkg.sh -disableMetrics
|
||||
)
|
||||
|
||||
echo "::group::Install breakpad dependencies"
|
||||
cargo install --locked dump_syms
|
||||
echo "::endgroup::"
|
||||
|
||||
- name: Install GCC problem matcher
|
||||
|
@ -111,15 +139,21 @@ jobs:
|
|||
cmake ${GITHUB_WORKSPACE} \
|
||||
-DCMAKE_TOOLCHAIN_FILE=/vcpkg/scripts/buildsystems/vcpkg.cmake \
|
||||
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
|
||||
-DOPTION_SURVEY_KEY=${{ inputs.survey_key }} \
|
||||
-DOPTION_PACKAGE_DEPENDENCIES=ON \
|
||||
# EOF
|
||||
echo "::endgroup::"
|
||||
|
||||
echo "::group::Build"
|
||||
echo "Running on $(nproc) cores"
|
||||
cmake --build . -j $(nproc)
|
||||
cmake --build . -j $(nproc) --target openttd
|
||||
echo "::endgroup::"
|
||||
|
||||
- name: Create breakpad symbols
|
||||
run: |
|
||||
cd build
|
||||
dump_syms ./openttd --inlines --store symbols
|
||||
|
||||
- name: Create bundles
|
||||
run: |
|
||||
cd ${GITHUB_WORKSPACE}/build
|
||||
|
@ -134,8 +168,15 @@ jobs:
|
|||
echo "::endgroup::"
|
||||
|
||||
- name: Store bundles
|
||||
uses: actions/upload-artifact@v3
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: openttd-linux-generic
|
||||
path: build/bundles
|
||||
retention-days: 5
|
||||
|
||||
- name: Store symbols
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: symbols-linux-generic
|
||||
path: build/symbols
|
||||
retention-days: 5
|
||||
|
|
|
@ -2,18 +2,28 @@ name: Release (MacOS)
|
|||
|
||||
on:
|
||||
workflow_call:
|
||||
inputs:
|
||||
survey_key:
|
||||
required: false
|
||||
type: string
|
||||
default: ""
|
||||
|
||||
jobs:
|
||||
macos:
|
||||
name: MacOS
|
||||
|
||||
runs-on: macos-11
|
||||
runs-on: macos-14
|
||||
env:
|
||||
MACOSX_DEPLOYMENT_TARGET: 10.13
|
||||
|
||||
steps:
|
||||
- name: Setup Xcode version
|
||||
uses: maxim-lobanov/setup-xcode@v1
|
||||
with:
|
||||
xcode-version: latest-stable
|
||||
|
||||
- name: Download source
|
||||
uses: actions/download-artifact@v3
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: internal-source
|
||||
|
||||
|
@ -21,44 +31,39 @@ jobs:
|
|||
run: |
|
||||
tar -xf source.tar.gz --strip-components=1
|
||||
|
||||
- name: Install Rust toolchain
|
||||
uses: dtolnay/rust-toolchain@stable
|
||||
|
||||
- name: Enable Rust cache
|
||||
uses: Swatinem/rust-cache@v2
|
||||
|
||||
- name: Setup vcpkg caching
|
||||
uses: actions/github-script@v7
|
||||
with:
|
||||
script: |
|
||||
core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || '');
|
||||
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '');
|
||||
core.exportVariable('VCPKG_BINARY_SOURCES', 'clear;x-gha,readwrite')
|
||||
|
||||
- name: Install vcpkg
|
||||
run: |
|
||||
git clone https://github.com/microsoft/vcpkg ${{ runner.temp }}/vcpkg
|
||||
${{ runner.temp }}/vcpkg/bootstrap-vcpkg.sh -disableMetrics
|
||||
|
||||
- name: Install dependencies
|
||||
env:
|
||||
HOMEBREW_NO_AUTO_UPDATE: 1
|
||||
HOMEBREW_NO_INSTALL_CLEANUP: 1
|
||||
run: |
|
||||
echo "::group::Install brew dependencies"
|
||||
brew install \
|
||||
pandoc \
|
||||
pkg-config \
|
||||
# EOF
|
||||
echo "::endgroup::"
|
||||
|
||||
- name: Prepare cache key
|
||||
id: key
|
||||
run: |
|
||||
echo "image=$ImageOS-$ImageVersion" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Enable vcpkg cache
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: /usr/local/share/vcpkg/installed
|
||||
key: ${{ steps.key.outputs.image }}-vcpkg-release-0 # Increase the number whenever dependencies are modified
|
||||
restore-keys: |
|
||||
${{ steps.key.outputs.image }}-vcpkg-release
|
||||
${{ steps.key.outputs.image }}-vcpkg-x64
|
||||
|
||||
- name: Prepare vcpkg
|
||||
run: |
|
||||
vcpkg install \
|
||||
curl:x64-osx \
|
||||
curl:arm64-osx \
|
||||
liblzma:x64-osx \
|
||||
liblzma:arm64-osx \
|
||||
libpng:x64-osx \
|
||||
libpng:arm64-osx \
|
||||
lzo:x64-osx \
|
||||
lzo:arm64-osx \
|
||||
zlib:x64-osx \
|
||||
zlib:arm64-osx \
|
||||
# EOF
|
||||
echo "::group::Install breakpad dependencies"
|
||||
cargo install --locked dump_syms
|
||||
echo "::endgroup::"
|
||||
|
||||
- name: Install GCC problem matcher
|
||||
uses: ammaraskar/gcc-problem-matcher@master
|
||||
|
@ -81,7 +86,7 @@ jobs:
|
|||
echo "::endgroup::"
|
||||
|
||||
- name: Import code signing certificates
|
||||
uses: Apple-Actions/import-codesign-certs@v1
|
||||
uses: Apple-Actions/import-codesign-certs@v2
|
||||
with:
|
||||
# The certificates in a PKCS12 file encoded as a base64 string
|
||||
p12-file-base64: ${{ secrets.APPLE_DEVELOPER_CERTIFICATE_P12_BASE64 }}
|
||||
|
@ -99,15 +104,16 @@ jobs:
|
|||
cmake ${GITHUB_WORKSPACE} \
|
||||
-DCMAKE_OSX_ARCHITECTURES=arm64 \
|
||||
-DVCPKG_TARGET_TRIPLET=arm64-osx \
|
||||
-DCMAKE_TOOLCHAIN_FILE=/usr/local/share/vcpkg/scripts/buildsystems/vcpkg.cmake \
|
||||
-DCMAKE_TOOLCHAIN_FILE=${{ runner.temp }}/vcpkg/scripts/buildsystems/vcpkg.cmake \
|
||||
-DHOST_BINARY_DIR=${GITHUB_WORKSPACE}/build-host \
|
||||
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
|
||||
-DOPTION_SURVEY_KEY=${{ inputs.survey_key }} \
|
||||
# EOF
|
||||
echo "::endgroup::"
|
||||
|
||||
echo "::group::Build"
|
||||
echo "Running on $(sysctl -n hw.logicalcpu) cores"
|
||||
cmake --build . -j $(sysctl -n hw.logicalcpu)
|
||||
cmake --build . -j $(sysctl -n hw.logicalcpu) --target openttd
|
||||
echo "::endgroup::"
|
||||
|
||||
- name: Build x64
|
||||
|
@ -119,9 +125,10 @@ jobs:
|
|||
cmake ${GITHUB_WORKSPACE} \
|
||||
-DCMAKE_OSX_ARCHITECTURES=x86_64 \
|
||||
-DVCPKG_TARGET_TRIPLET=x64-osx \
|
||||
-DCMAKE_TOOLCHAIN_FILE=/usr/local/share/vcpkg/scripts/buildsystems/vcpkg.cmake \
|
||||
-DCMAKE_TOOLCHAIN_FILE=${{ runner.temp }}/vcpkg/scripts/buildsystems/vcpkg.cmake \
|
||||
-DHOST_BINARY_DIR=${GITHUB_WORKSPACE}/build-host \
|
||||
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
|
||||
-DOPTION_SURVEY_KEY=${{ inputs.survey_key }} \
|
||||
-DCPACK_BUNDLE_APPLE_CERT_APP=${{ secrets.APPLE_DEVELOPER_CERTIFICATE_ID }} \
|
||||
"-DCPACK_BUNDLE_APPLE_CODESIGN_PARAMETER=--deep -f --options runtime" \
|
||||
-DAPPLE_UNIVERSAL_PACKAGE=1 \
|
||||
|
@ -130,9 +137,21 @@ jobs:
|
|||
|
||||
echo "::group::Build"
|
||||
echo "Running on $(sysctl -n hw.logicalcpu) cores"
|
||||
cmake --build . -j $(sysctl -n hw.logicalcpu)
|
||||
cmake --build . -j $(sysctl -n hw.logicalcpu) --target openttd
|
||||
echo "::endgroup::"
|
||||
|
||||
- name: Create breakpad symbols
|
||||
run: |
|
||||
cd build-x64
|
||||
mkdir dSYM
|
||||
dsymutil ./openttd -o dSYM/openttd
|
||||
dump_syms ./dSYM/openttd --inlines --store symbols
|
||||
|
||||
cd ../build-arm64
|
||||
mkdir dSYM
|
||||
dsymutil ./openttd -o dSYM/openttd
|
||||
dump_syms ./dSYM/openttd --inlines --store ../build-x64/symbols
|
||||
|
||||
- name: Create bundles
|
||||
run: |
|
||||
cd build-x64
|
||||
|
@ -153,19 +172,19 @@ jobs:
|
|||
rm -f bundles/*.sha256
|
||||
echo "::endgroup::"
|
||||
|
||||
- name: Install gon
|
||||
env:
|
||||
HOMEBREW_NO_AUTO_UPDATE: 1
|
||||
HOMEBREW_NO_INSTALL_CLEANUP: 1
|
||||
run: |
|
||||
brew tap mitchellh/gon
|
||||
brew install mitchellh/gon/gon
|
||||
|
||||
- name: Notarize
|
||||
env:
|
||||
AC_USERNAME: ${{ secrets.APPLE_DEVELOPER_APP_USERNAME }}
|
||||
AC_PASSWORD: ${{ secrets.APPLE_DEVELOPER_APP_PASSWORD }}
|
||||
AC_TEAM_ID: ${{ secrets.APPLE_DEVELOPER_TEAM_ID }}
|
||||
run: |
|
||||
if [ -z "${AC_USERNAME}" ]; then
|
||||
# We may be running on a fork that doesn't have notarization secrets set up; skip this step
|
||||
echo No notarization secrets set up, skipping.
|
||||
exit 0
|
||||
fi
|
||||
|
||||
xcrun notarytool store-credentials --apple-id "${AC_USERNAME}" --password "${AC_PASSWORD}" --team-id "${AC_TEAM_ID}" openttd
|
||||
cd build-x64
|
||||
../os/macosx/notarize.sh
|
||||
|
||||
|
@ -193,8 +212,15 @@ jobs:
|
|||
mv _CPack_Packages/*/Bundle/openttd-*.zip bundles/
|
||||
|
||||
- name: Store bundles
|
||||
uses: actions/upload-artifact@v3
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: openttd-macos-universal
|
||||
path: build-x64/bundles
|
||||
retention-days: 5
|
||||
|
||||
- name: Store symbols
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: symbols-macos-universal
|
||||
path: build-x64/symbols
|
||||
retention-days: 5
|
||||
|
|
|
@ -11,6 +11,8 @@ on:
|
|||
value: ${{ jobs.source.outputs.trigger_type }}
|
||||
folder:
|
||||
value: ${{ jobs.source.outputs.folder }}
|
||||
survey_key:
|
||||
value: ${{ jobs.source.outputs.survey_key }}
|
||||
|
||||
jobs:
|
||||
source:
|
||||
|
@ -23,18 +25,19 @@ jobs:
|
|||
is_tag: ${{ steps.metadata.outputs.is_tag }}
|
||||
trigger_type: ${{ steps.metadata.outputs.trigger_type }}
|
||||
folder: ${{ steps.metadata.outputs.folder }}
|
||||
survey_key: ${{ steps.survey_key.outputs.survey_key }}
|
||||
|
||||
steps:
|
||||
- name: Checkout (Release)
|
||||
if: github.event_name == 'release'
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
# We generate a changelog; for this we need the full git log.
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Checkout (Manual)
|
||||
if: github.event_name == 'workflow_dispatch'
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
ref: ${{ github.event.inputs.ref }}
|
||||
# We generate a changelog; for this we need the full git log.
|
||||
|
@ -42,7 +45,7 @@ jobs:
|
|||
|
||||
- name: Checkout (Trigger)
|
||||
if: github.event_name == 'repository_dispatch'
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
ref: ${{ github.event.client_payload.ref }}
|
||||
# We generate a changelog; for this we need the full git log.
|
||||
|
@ -146,6 +149,24 @@ jobs:
|
|||
FOLDER_NIGHTLIES: openttd-nightlies
|
||||
FOLDER_BRANCHES: openttd-branches
|
||||
|
||||
- name: Generate survey key
|
||||
id: survey_key
|
||||
run: |
|
||||
if [ -z "${{ vars.SURVEY_TYPE }}" ]; then
|
||||
echo "SURVEY_TYPE variable not found; most likely running in a fork. Skipping step."
|
||||
SURVEY_KEY=""
|
||||
else
|
||||
PAYLOAD='{"version":"${{ steps.metadata.outputs.version }}","type":"${{ vars.SURVEY_TYPE }}"}'
|
||||
|
||||
echo "${{ secrets.SURVEY_SIGNING_KEY }}" > survey_signing_key.pem
|
||||
SIGNATURE=$(echo -n "${PAYLOAD}" | openssl dgst -sha256 -sign survey_signing_key.pem | base64 -w0)
|
||||
rm -f survey_signing_key.pem
|
||||
|
||||
SURVEY_KEY=$(curl -f -s -X POST -d "${PAYLOAD}" -H "Content-Type: application/json" -H "X-Signature: ${SIGNATURE}" https://survey-participate.openttd.org/create-survey-key/${{ vars.SURVEY_TYPE }})
|
||||
fi
|
||||
|
||||
echo "survey_key=${SURVEY_KEY}" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Remove VCS information
|
||||
run: |
|
||||
rm -rf .git
|
||||
|
@ -172,14 +193,14 @@ jobs:
|
|||
echo "::endgroup::"
|
||||
|
||||
- name: Store bundles
|
||||
uses: actions/upload-artifact@v3
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: openttd-source
|
||||
path: build/bundles/*
|
||||
retention-days: 5
|
||||
|
||||
- name: Store source (for other jobs)
|
||||
uses: actions/upload-artifact@v3
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: internal-source
|
||||
path: source.tar.gz
|
||||
|
|
|
@ -15,7 +15,7 @@ jobs:
|
|||
|
||||
steps:
|
||||
- name: Download source
|
||||
uses: actions/download-artifact@v3
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: internal-source
|
||||
|
||||
|
@ -25,17 +25,17 @@ jobs:
|
|||
tar -xf source.tar.gz --strip-components=1
|
||||
|
||||
- name: Download x86 build
|
||||
uses: actions/download-artifact@v3
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: openttd-windows-x86
|
||||
|
||||
- name: Download x64 build
|
||||
uses: actions/download-artifact@v3
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: openttd-windows-x64
|
||||
|
||||
- name: Download arm64 build
|
||||
uses: actions/download-artifact@v3
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: openttd-windows-arm64
|
||||
|
||||
|
@ -185,7 +185,7 @@ jobs:
|
|||
move output\OpenTTD.appxbundle bundles\internal\openttd-${{ inputs.version }}-windows-store.appxbundle
|
||||
|
||||
- name: Store bundles
|
||||
uses: actions/upload-artifact@v3
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: openttd-windows-store
|
||||
path: builds/bundles
|
||||
|
|
|
@ -3,14 +3,16 @@ name: Release (Windows)
|
|||
on:
|
||||
workflow_call:
|
||||
inputs:
|
||||
survey_key:
|
||||
required: false
|
||||
type: string
|
||||
default: ""
|
||||
is_tag:
|
||||
required: true
|
||||
type: string
|
||||
|
||||
jobs:
|
||||
windows:
|
||||
name: Windows
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
|
@ -22,11 +24,13 @@ jobs:
|
|||
- arch: arm64
|
||||
host: x64_arm64
|
||||
|
||||
name: Windows (${{ matrix.arch }})
|
||||
|
||||
runs-on: windows-latest
|
||||
|
||||
steps:
|
||||
- name: Download source
|
||||
uses: actions/download-artifact@v3
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: internal-source
|
||||
|
||||
|
@ -35,37 +39,35 @@ jobs:
|
|||
run: |
|
||||
tar -xf source.tar.gz --strip-components=1
|
||||
|
||||
- name: Install Rust toolchain
|
||||
uses: dtolnay/rust-toolchain@stable
|
||||
|
||||
- name: Enable Rust cache
|
||||
uses: Swatinem/rust-cache@v2
|
||||
|
||||
- name: Setup vcpkg caching
|
||||
uses: actions/github-script@v7
|
||||
with:
|
||||
script: |
|
||||
core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || '');
|
||||
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '');
|
||||
core.exportVariable('VCPKG_BINARY_SOURCES', 'clear;x-gha,readwrite')
|
||||
|
||||
- name: Install vcpkg
|
||||
run: |
|
||||
git clone https://github.com/microsoft/vcpkg ${{ runner.temp }}\vcpkg
|
||||
${{ runner.temp }}\vcpkg\bootstrap-vcpkg.bat -disableMetrics
|
||||
|
||||
- name: Install dependencies
|
||||
shell: bash
|
||||
run: |
|
||||
echo "::group::Install choco dependencies"
|
||||
choco install pandoc
|
||||
echo "::endgroup::"
|
||||
|
||||
- name: Prepare cache key
|
||||
id: key
|
||||
shell: powershell
|
||||
run: |
|
||||
# Work around caching failure with GNU tar
|
||||
New-Item -Type Junction -Path vcpkg -Target c:\vcpkg
|
||||
|
||||
Write-Output "image=$env:ImageOS-$env:ImageVersion" >> $env:GITHUB_OUTPUT
|
||||
|
||||
- name: Enable vcpkg cache
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: vcpkg/installed
|
||||
key: ${{ steps.key.outputs.image }}-vcpkg-${{ matrix.arch }}-0 # Increase the number whenever dependencies are modified
|
||||
restore-keys: |
|
||||
${{ steps.key.outputs.image }}-vcpkg-${{ matrix.arch }}
|
||||
|
||||
- name: Prepare vcpkg
|
||||
shell: bash
|
||||
run: |
|
||||
vcpkg install --triplet=${{ matrix.arch }}-windows-static \
|
||||
liblzma \
|
||||
libpng \
|
||||
lzo \
|
||||
zlib \
|
||||
# EOF
|
||||
echo "::group::Install breakpad dependencies"
|
||||
cargo install --locked dump_syms
|
||||
echo "::endgroup::"
|
||||
|
||||
- name: Install MSVC problem matcher
|
||||
uses: ammaraskar/msvc-problem-matcher@master
|
||||
|
@ -98,21 +100,6 @@ jobs:
|
|||
with:
|
||||
arch: ${{ matrix.host }}
|
||||
|
||||
- name: Import code signing certificate
|
||||
shell: powershell
|
||||
# If this is run on a fork, there may not be a certificate set up - continue in this case
|
||||
continue-on-error: true
|
||||
run: |
|
||||
$tempFile = [System.IO.Path]::GetTempFileName()
|
||||
$bytes = [System.Convert]::FromBase64String($env:WINDOWS_CERTIFICATE_P12)
|
||||
[IO.File]::WriteAllBytes($tempFile, $bytes)
|
||||
$pwd = ConvertTo-SecureString $env:WINDOWS_CERTIFICATE_PASSWORD -AsPlainText -Force
|
||||
Import-PfxCertificate -FilePath $tempFile -CertStoreLocation Cert:\CurrentUser\My -Password $pwd
|
||||
Remove-Item $tempFile
|
||||
env:
|
||||
WINDOWS_CERTIFICATE_P12: ${{ secrets.WINDOWS_CERTIFICATE_P12 }}
|
||||
WINDOWS_CERTIFICATE_PASSWORD: ${{ secrets.WINDOWS_CERTIFICATE_PASSWORD }}
|
||||
|
||||
- name: Build (with installer)
|
||||
if: inputs.is_tag == 'true'
|
||||
shell: bash
|
||||
|
@ -124,19 +111,24 @@ jobs:
|
|||
cmake ${GITHUB_WORKSPACE} \
|
||||
-GNinja \
|
||||
-DVCPKG_TARGET_TRIPLET=${{ matrix.arch }}-windows-static \
|
||||
-DCMAKE_TOOLCHAIN_FILE="c:\vcpkg\scripts\buildsystems\vcpkg.cmake" \
|
||||
-DCMAKE_TOOLCHAIN_FILE="${{ runner.temp }}\vcpkg\scripts\buildsystems\vcpkg.cmake" \
|
||||
-DOPTION_USE_NSIS=ON \
|
||||
-DHOST_BINARY_DIR=${GITHUB_WORKSPACE}/build-host \
|
||||
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
|
||||
-DWINDOWS_CERTIFICATE_COMMON_NAME="${WINDOWS_CERTIFICATE_COMMON_NAME}" \
|
||||
-DOPTION_SURVEY_KEY=${{ inputs.survey_key }} \
|
||||
# EOF
|
||||
echo "::endgroup::"
|
||||
|
||||
echo "::group::Build"
|
||||
cmake --build .
|
||||
cmake --build . --target openttd
|
||||
echo "::endgroup::"
|
||||
env:
|
||||
WINDOWS_CERTIFICATE_COMMON_NAME: ${{ secrets.WINDOWS_CERTIFICATE_COMMON_NAME }}
|
||||
AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }}
|
||||
AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }}
|
||||
AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }}
|
||||
AZURE_CODESIGN_ACCOUNT_NAME: ${{ secrets.AZURE_CODESIGN_ACCOUNT_NAME }}
|
||||
AZURE_CODESIGN_ENDPOINT: ${{ secrets.AZURE_CODESIGN_ENDPOINT }}
|
||||
AZURE_CODESIGN_PROFILE_NAME: ${{ secrets.AZURE_CODESIGN_PROFILE_NAME }}
|
||||
|
||||
- name: Build (without installer)
|
||||
if: inputs.is_tag != 'true'
|
||||
|
@ -149,18 +141,29 @@ jobs:
|
|||
cmake ${GITHUB_WORKSPACE} \
|
||||
-GNinja \
|
||||
-DVCPKG_TARGET_TRIPLET=${{ matrix.arch }}-windows-static \
|
||||
-DCMAKE_TOOLCHAIN_FILE="c:\vcpkg\scripts\buildsystems\vcpkg.cmake" \
|
||||
-DCMAKE_TOOLCHAIN_FILE="${{ runner.temp }}\vcpkg\scripts\buildsystems\vcpkg.cmake" \
|
||||
-DHOST_BINARY_DIR=${GITHUB_WORKSPACE}/build-host \
|
||||
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
|
||||
-DWINDOWS_CERTIFICATE_COMMON_NAME="${WINDOWS_CERTIFICATE_COMMON_NAME}" \
|
||||
-DOPTION_SURVEY_KEY=${{ inputs.survey_key }} \
|
||||
# EOF
|
||||
echo "::endgroup::"
|
||||
|
||||
echo "::group::Build"
|
||||
cmake --build .
|
||||
cmake --build . --target openttd
|
||||
echo "::endgroup::"
|
||||
env:
|
||||
WINDOWS_CERTIFICATE_COMMON_NAME: ${{ secrets.WINDOWS_CERTIFICATE_COMMON_NAME }}
|
||||
AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }}
|
||||
AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }}
|
||||
AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }}
|
||||
AZURE_CODESIGN_ACCOUNT_NAME: ${{ secrets.AZURE_CODESIGN_ACCOUNT_NAME }}
|
||||
AZURE_CODESIGN_ENDPOINT: ${{ secrets.AZURE_CODESIGN_ENDPOINT }}
|
||||
AZURE_CODESIGN_PROFILE_NAME: ${{ secrets.AZURE_CODESIGN_PROFILE_NAME }}
|
||||
|
||||
- name: Create breakpad symbols
|
||||
shell: bash
|
||||
run: |
|
||||
cd build
|
||||
dump_syms openttd.pdb --inlines --store symbols
|
||||
|
||||
- name: Create bundles
|
||||
shell: bash
|
||||
|
@ -170,10 +173,13 @@ jobs:
|
|||
cpack
|
||||
echo "::endgroup::"
|
||||
|
||||
echo "::group::Prepare PDB to be bundled"
|
||||
PDB=$(ls bundles/*.zip | cut -d/ -f2 | sed 's/.zip$/.pdb/')
|
||||
cp openttd.pdb bundles/${PDB}
|
||||
xz -9 bundles/${PDB}
|
||||
echo "::group::Move PDB and exe to symbols"
|
||||
PDB_FOLDER=$(find symbols -mindepth 2 -type d)
|
||||
cp openttd.pdb ${PDB_FOLDER}/
|
||||
|
||||
EXE_FOLDER=symbols/openttd.exe/$(grep "INFO CODE_ID" symbols/*/*/openttd.sym | cut -d\ -f3)
|
||||
mkdir -p ${EXE_FOLDER}
|
||||
cp openttd.exe ${EXE_FOLDER}/
|
||||
echo "::endgroup::"
|
||||
|
||||
echo "::group::Cleanup"
|
||||
|
@ -185,17 +191,26 @@ jobs:
|
|||
- name: Sign installer
|
||||
if: inputs.is_tag == 'true'
|
||||
shell: bash
|
||||
# If this is run on a fork, there may not be a certificate set up - continue in this case
|
||||
continue-on-error: true
|
||||
run: |
|
||||
cd ${GITHUB_WORKSPACE}/build/bundles
|
||||
../../os/windows/sign.bat *.exe "${WINDOWS_CERTIFICATE_COMMON_NAME}"
|
||||
${GITHUB_WORKSPACE}/os/windows/sign.bat "${GITHUB_WORKSPACE}/build/bundles"
|
||||
env:
|
||||
WINDOWS_CERTIFICATE_COMMON_NAME: ${{ secrets.WINDOWS_CERTIFICATE_COMMON_NAME }}
|
||||
AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }}
|
||||
AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }}
|
||||
AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }}
|
||||
AZURE_CODESIGN_ACCOUNT_NAME: ${{ secrets.AZURE_CODESIGN_ACCOUNT_NAME }}
|
||||
AZURE_CODESIGN_ENDPOINT: ${{ secrets.AZURE_CODESIGN_ENDPOINT }}
|
||||
AZURE_CODESIGN_PROFILE_NAME: ${{ secrets.AZURE_CODESIGN_PROFILE_NAME }}
|
||||
|
||||
- name: Store bundles
|
||||
uses: actions/upload-artifact@v3
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: openttd-windows-${{ matrix.arch }}
|
||||
path: build/bundles
|
||||
retention-days: 5
|
||||
|
||||
- name: Store symbols
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: symbols-windows-${{ matrix.arch }}
|
||||
path: build/symbols
|
||||
retention-days: 5
|
||||
|
|
|
@ -38,6 +38,9 @@ jobs:
|
|||
uses: ./.github/workflows/release-linux.yml
|
||||
secrets: inherit
|
||||
|
||||
with:
|
||||
survey_key: ${{ needs.source.outputs.survey_key }}
|
||||
|
||||
macos:
|
||||
name: MacOS
|
||||
needs: source
|
||||
|
@ -45,6 +48,9 @@ jobs:
|
|||
uses: ./.github/workflows/release-macos.yml
|
||||
secrets: inherit
|
||||
|
||||
with:
|
||||
survey_key: ${{ needs.source.outputs.survey_key }}
|
||||
|
||||
windows:
|
||||
name: Windows
|
||||
needs: source
|
||||
|
@ -54,6 +60,7 @@ jobs:
|
|||
|
||||
with:
|
||||
is_tag: ${{ needs.source.outputs.is_tag }}
|
||||
survey_key: ${{ needs.source.outputs.survey_key }}
|
||||
|
||||
windows-store:
|
||||
name: Windows Store
|
||||
|
@ -69,8 +76,8 @@ jobs:
|
|||
with:
|
||||
version: ${{ needs.source.outputs.version }}
|
||||
|
||||
upload-aws:
|
||||
name: Upload (AWS)
|
||||
upload:
|
||||
name: Upload
|
||||
needs:
|
||||
- source
|
||||
- docs
|
||||
|
@ -83,7 +90,26 @@ jobs:
|
|||
# The always() makes sure the rest is always evaluated.
|
||||
if: always() && needs.source.result == 'success' && needs.docs.result == 'success' && needs.linux.result == 'success' && needs.macos.result == 'success' && needs.windows.result == 'success' && (needs.windows-store.result == 'success' || needs.windows-store.result == 'skipped')
|
||||
|
||||
uses: ./.github/workflows/upload-aws.yml
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
# This job is empty, but ensures no upload job starts before all targets finished and are successful.
|
||||
steps:
|
||||
- name: Build completed
|
||||
run: |
|
||||
true
|
||||
|
||||
upload-cdn:
|
||||
name: Upload (CDN)
|
||||
needs:
|
||||
- source
|
||||
- upload
|
||||
|
||||
# As windows-store is condition, we need to check ourselves if we need to run.
|
||||
# The always() makes sure the rest is always evaluated.
|
||||
# Yes, you even need to do this if you yourself don't depend on the condition.
|
||||
if: always() && needs.source.result == 'success' && needs.upload.result == 'success'
|
||||
|
||||
uses: ./.github/workflows/upload-cdn.yml
|
||||
secrets: inherit
|
||||
|
||||
with:
|
||||
|
@ -95,11 +121,13 @@ jobs:
|
|||
name: Upload (Steam)
|
||||
needs:
|
||||
- source
|
||||
- linux
|
||||
- macos
|
||||
- windows
|
||||
- upload
|
||||
|
||||
if: needs.source.outputs.trigger_type == 'new-master' || needs.source.outputs.trigger_type == 'new-tag'
|
||||
# As windows-store is condition, we need to check ourselves if we need to run.
|
||||
# The always() makes sure the rest is always evaluated.
|
||||
# Yes, you even need to do this if you yourself don't depend on the condition.
|
||||
# Additionally, only nightlies and releases go to Steam; not PRs.
|
||||
if: always() && needs.source.result == 'success' && needs.upload.result == 'success' && (needs.source.outputs.trigger_type == 'new-master' || needs.source.outputs.trigger_type == 'new-tag')
|
||||
|
||||
uses: ./.github/workflows/upload-steam.yml
|
||||
secrets: inherit
|
||||
|
@ -112,11 +140,13 @@ jobs:
|
|||
name: Upload (GOG)
|
||||
needs:
|
||||
- source
|
||||
- linux
|
||||
- macos
|
||||
- windows
|
||||
- upload
|
||||
|
||||
if: needs.source.outputs.trigger_type == 'new-tag'
|
||||
# As windows-store is condition, we need to check ourselves if we need to run.
|
||||
# The always() makes sure the rest is always evaluated.
|
||||
# Yes, you even need to do this if you yourself don't depend on the condition.
|
||||
# Additionally, only releases go to GOG; not nightlies or PRs.
|
||||
if: always() && needs.source.result == 'success' && needs.upload.result == 'success' && needs.source.outputs.trigger_type == 'new-tag'
|
||||
|
||||
uses: ./.github/workflows/upload-gog.yml
|
||||
secrets: inherit
|
||||
|
|
|
@ -14,7 +14,7 @@ jobs:
|
|||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Check for finding script functions that require company/deity mode enforcement/checks
|
||||
run: |
|
||||
|
|
|
@ -14,7 +14,7 @@ jobs:
|
|||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Check for unused strings
|
||||
run: |
|
||||
|
|
|
@ -1,76 +0,0 @@
|
|||
name: Upload (AWS)
|
||||
|
||||
on:
|
||||
workflow_call:
|
||||
inputs:
|
||||
version:
|
||||
required: true
|
||||
type: string
|
||||
folder:
|
||||
required: true
|
||||
type: string
|
||||
trigger_type:
|
||||
required: true
|
||||
type: string
|
||||
|
||||
jobs:
|
||||
upload:
|
||||
name: Upload (AWS)
|
||||
|
||||
runs-on: ubuntu-20.04
|
||||
|
||||
steps:
|
||||
- name: Download all bundles
|
||||
uses: actions/download-artifact@v3
|
||||
|
||||
- name: Calculate checksums
|
||||
run: |
|
||||
echo "::group::Move bundles to a single folder"
|
||||
mkdir bundles
|
||||
mv openttd-*/* bundles/
|
||||
echo "::endgroup::"
|
||||
|
||||
cd bundles
|
||||
for i in $(ls openttd-*); do
|
||||
echo "::group::Calculating checksums for ${i}"
|
||||
openssl dgst -r -md5 -hex $i > $i.md5sum
|
||||
openssl dgst -r -sha1 -hex $i > $i.sha1sum
|
||||
openssl dgst -r -sha256 -hex $i > $i.sha256sum
|
||||
echo "::endgroup::"
|
||||
done
|
||||
|
||||
# Some targets generate files that are meant for our-eyes-only.
|
||||
# They are stored in the "internal" folder, and contains bundles
|
||||
# for targets like Windows Store. No user has a benefit of knowing
|
||||
# they exist, hence: internal.
|
||||
if [ -e internal ]; then
|
||||
cd internal
|
||||
for i in $(ls openttd-*); do
|
||||
echo "::group::Calculating checksums for ${i}"
|
||||
openssl dgst -r -md5 -hex $i > $i.md5sum
|
||||
openssl dgst -r -sha1 -hex $i > $i.sha1sum
|
||||
openssl dgst -r -sha256 -hex $i > $i.sha256sum
|
||||
echo "::endgroup::"
|
||||
done
|
||||
fi
|
||||
|
||||
- name: Upload bundles to AWS
|
||||
run: |
|
||||
aws s3 cp --recursive --only-show-errors bundles/ s3://${{ secrets.CDN_S3_BUCKET }}/${{ inputs.folder }}/${{ inputs.version }}/
|
||||
|
||||
# We do not invalidate the CloudFront distribution here. The trigger
|
||||
# for "New OpenTTD release" first updated the manifest files and
|
||||
# creates an index.html. We invalidate after that, so everything
|
||||
# becomes visible at once.
|
||||
env:
|
||||
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
|
||||
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
|
||||
AWS_DEFAULT_REGION: ${{ secrets.AWS_REGION }}
|
||||
|
||||
- name: Trigger 'New OpenTTD release'
|
||||
uses: peter-evans/repository-dispatch@v2
|
||||
with:
|
||||
token: ${{ secrets.DEPLOYMENT_TOKEN }}
|
||||
repository: OpenTTD/workflows
|
||||
event-type: ${{ inputs.trigger_type }}
|
||||
client-payload: '{"version": "${{ inputs.version }}", "folder": "${{ inputs.folder }}"}'
|
|
@ -0,0 +1,138 @@
|
|||
name: Upload (CDN)
|
||||
|
||||
on:
|
||||
workflow_call:
|
||||
inputs:
|
||||
version:
|
||||
required: true
|
||||
type: string
|
||||
folder:
|
||||
required: true
|
||||
type: string
|
||||
trigger_type:
|
||||
required: true
|
||||
type: string
|
||||
|
||||
jobs:
|
||||
prepare:
|
||||
name: Prepare
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Download all bundles
|
||||
uses: actions/download-artifact@v4
|
||||
|
||||
- name: Calculate checksums
|
||||
run: |
|
||||
echo "::group::Move bundles to a single folder"
|
||||
mkdir bundles
|
||||
mv openttd-*/* bundles/
|
||||
echo "::endgroup::"
|
||||
|
||||
cd bundles
|
||||
for i in $(ls openttd-*); do
|
||||
echo "::group::Calculating checksums for ${i}"
|
||||
openssl dgst -r -md5 -hex $i > $i.md5sum
|
||||
openssl dgst -r -sha1 -hex $i > $i.sha1sum
|
||||
openssl dgst -r -sha256 -hex $i > $i.sha256sum
|
||||
echo "::endgroup::"
|
||||
done
|
||||
|
||||
# Some targets generate files that are meant for our-eyes-only.
|
||||
# They are stored in the "internal" folder, and contains bundles
|
||||
# for targets like Windows Store. No user has a benefit of knowing
|
||||
# they exist, hence: internal.
|
||||
if [ -e internal ]; then
|
||||
cd internal
|
||||
for i in $(ls openttd-*); do
|
||||
echo "::group::Calculating checksums for ${i}"
|
||||
openssl dgst -r -md5 -hex $i > $i.md5sum
|
||||
openssl dgst -r -sha1 -hex $i > $i.sha1sum
|
||||
openssl dgst -r -sha256 -hex $i > $i.sha256sum
|
||||
echo "::endgroup::"
|
||||
done
|
||||
fi
|
||||
|
||||
- name: Merge symbols
|
||||
run: |
|
||||
mkdir symbols
|
||||
cp -R symbols-*/* symbols/
|
||||
|
||||
# Compress all files as gzip, to reduce cost of storage on the CDN.
|
||||
for i in $(find symbols -mindepth 2 -type f); do
|
||||
gzip ${i}
|
||||
done
|
||||
|
||||
# Leave a mark in each folder what version actually created the symbol file.
|
||||
for i in $(find symbols -mindepth 2 -type d); do
|
||||
touch ${i}/.${{ inputs.version }}.txt
|
||||
done
|
||||
|
||||
- name: Store bundles
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: cdn-bundles
|
||||
path: bundles/*
|
||||
retention-days: 5
|
||||
|
||||
- name: Store breakpad symbols
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: cdn-symbols
|
||||
path: symbols/*
|
||||
retention-days: 5
|
||||
|
||||
publish-bundles:
|
||||
needs:
|
||||
- prepare
|
||||
|
||||
name: Publish bundles
|
||||
uses: OpenTTD/actions/.github/workflows/rw-cdn-upload.yml@v5
|
||||
secrets:
|
||||
CDN_SIGNING_KEY: ${{ secrets.CDN_SIGNING_KEY }}
|
||||
DEPLOYMENT_APP_ID: ${{ secrets.DEPLOYMENT_APP_ID }}
|
||||
DEPLOYMENT_APP_PRIVATE_KEY: ${{ secrets.DEPLOYMENT_APP_PRIVATE_KEY }}
|
||||
with:
|
||||
artifact-name: cdn-bundles
|
||||
folder: ${{ inputs.folder }}
|
||||
version: ${{ inputs.version }}
|
||||
|
||||
publish-symbols:
|
||||
needs:
|
||||
- prepare
|
||||
|
||||
name: Publish symbols
|
||||
uses: OpenTTD/actions/.github/workflows/rw-symbols-upload.yml@v5
|
||||
secrets:
|
||||
SYMBOLS_SIGNING_KEY: ${{ secrets.SYMBOLS_SIGNING_KEY }}
|
||||
with:
|
||||
artifact-name: cdn-symbols
|
||||
repository: OpenTTD
|
||||
|
||||
docs:
|
||||
if: ${{ inputs.trigger_type == 'new-master' }}
|
||||
needs:
|
||||
- publish-bundles
|
||||
|
||||
name: Publish docs
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Generate access token
|
||||
id: generate_token
|
||||
uses: tibdex/github-app-token@v2
|
||||
with:
|
||||
app_id: ${{ secrets.DEPLOYMENT_APP_ID }}
|
||||
private_key: ${{ secrets.DEPLOYMENT_APP_PRIVATE_KEY }}
|
||||
installation_retrieval_mode: "repository"
|
||||
installation_retrieval_payload: "OpenTTD/workflows"
|
||||
|
||||
- name: Trigger 'Publish Docs'
|
||||
uses: peter-evans/repository-dispatch@v3
|
||||
with:
|
||||
token: ${{ steps.generate_token.outputs.token }}
|
||||
repository: OpenTTD/workflows
|
||||
event-type: publish-docs
|
||||
client-payload: '{"version": "${{ inputs.version }}", "folder": "${{ inputs.folder }}"}'
|
|
@ -14,8 +14,35 @@ jobs:
|
|||
runs-on: ubuntu-20.04
|
||||
|
||||
steps:
|
||||
- name: Download all bundles
|
||||
uses: actions/download-artifact@v3
|
||||
- name: Download source
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: internal-source
|
||||
path: internal-source
|
||||
|
||||
- name: Download bundle (Windows x86)
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: openttd-windows-x86
|
||||
path: openttd-windows-x86
|
||||
|
||||
- name: Download bundle (Windows x64)
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: openttd-windows-x64
|
||||
path: openttd-windows-x64
|
||||
|
||||
- name: Download bundle (MacOS)
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: openttd-macos-universal
|
||||
path: openttd-macos-universal
|
||||
|
||||
- name: Download bundle (Linux)
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: openttd-linux-generic
|
||||
path: openttd-linux-generic
|
||||
|
||||
- name: Install GOG Galaxy Build Creator
|
||||
run: |
|
||||
|
|
|
@ -17,8 +17,35 @@ jobs:
|
|||
runs-on: ubuntu-20.04
|
||||
|
||||
steps:
|
||||
- name: Download all bundles
|
||||
uses: actions/download-artifact@v3
|
||||
- name: Download source
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: internal-source
|
||||
path: internal-source
|
||||
|
||||
- name: Download bundle (Windows x86)
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: openttd-windows-x86
|
||||
path: openttd-windows-x86
|
||||
|
||||
- name: Download bundle (Windows x64)
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: openttd-windows-x64
|
||||
path: openttd-windows-x64
|
||||
|
||||
- name: Download bundle (MacOS)
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: openttd-macos-universal
|
||||
path: openttd-macos-universal
|
||||
|
||||
- name: Download bundle (Linux)
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: openttd-linux-generic
|
||||
path: openttd-linux-generic
|
||||
|
||||
- name: Setup steamcmd
|
||||
uses: CyberAndrii/setup-steamcmd@v1
|
||||
|
|
|
@ -5,3 +5,4 @@ docs/aidocs/*
|
|||
docs/gamedocs/*
|
||||
docs/source/*
|
||||
/out
|
||||
/vcpkg_installed
|
||||
|
|
105
CMakeLists.txt
105
CMakeLists.txt
|
@ -1,11 +1,12 @@
|
|||
cmake_minimum_required(VERSION 3.9)
|
||||
cmake_minimum_required(VERSION 3.16)
|
||||
|
||||
if(NOT BINARY_NAME)
|
||||
set(BINARY_NAME openttd)
|
||||
endif()
|
||||
|
||||
project(${BINARY_NAME}
|
||||
VERSION 14.0
|
||||
VERSION 15.0
|
||||
LANGUAGES CXX
|
||||
)
|
||||
|
||||
if(CMAKE_SOURCE_DIR STREQUAL CMAKE_BINARY_DIR)
|
||||
|
@ -22,7 +23,7 @@ if (EMSCRIPTEN)
|
|||
endif()
|
||||
|
||||
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake")
|
||||
set(CMAKE_OSX_DEPLOYMENT_TARGET 10.13)
|
||||
set(CMAKE_OSX_DEPLOYMENT_TARGET 10.15)
|
||||
|
||||
# Use GNUInstallDirs to allow customisation
|
||||
# but set our own default data and bin dir
|
||||
|
@ -41,7 +42,7 @@ set_directory_options()
|
|||
include(Static)
|
||||
set_static_if_needed()
|
||||
|
||||
set(CMAKE_CXX_STANDARD 17)
|
||||
set(CMAKE_CXX_STANDARD 20)
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED YES)
|
||||
set(CMAKE_CXX_EXTENSIONS NO)
|
||||
|
||||
|
@ -132,6 +133,11 @@ else()
|
|||
find_package(CURL)
|
||||
endif()
|
||||
|
||||
# Breakpad doesn't support emscripten.
|
||||
if(NOT EMSCRIPTEN)
|
||||
find_package(unofficial-breakpad)
|
||||
endif()
|
||||
|
||||
if(NOT OPTION_DEDICATED)
|
||||
if(NOT WIN32)
|
||||
find_package(Allegro)
|
||||
|
@ -142,12 +148,17 @@ if(NOT OPTION_DEDICATED)
|
|||
find_package(SDL)
|
||||
endif()
|
||||
find_package(Fluidsynth)
|
||||
find_package(Fontconfig)
|
||||
find_package(ICU OPTIONAL_COMPONENTS i18n lx)
|
||||
if(Freetype_FOUND)
|
||||
find_package(Fontconfig)
|
||||
endif()
|
||||
find_package(Harfbuzz)
|
||||
find_package(ICU OPTIONAL_COMPONENTS i18n)
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
if(APPLE)
|
||||
enable_language(OBJCXX)
|
||||
|
||||
find_package(Iconv)
|
||||
|
||||
find_library(AUDIOTOOLBOX_LIBRARY AudioToolbox)
|
||||
|
@ -178,6 +189,12 @@ if(UNIX AND NOT APPLE AND NOT OPTION_DEDICATED)
|
|||
if(NOT SDL_FOUND AND NOT SDL2_FOUND AND NOT ALLEGRO_FOUND)
|
||||
message(FATAL_ERROR "SDL, SDL2 or Allegro is required for this platform")
|
||||
endif()
|
||||
if(HARFBUZZ_FOUND AND NOT ICU_i18n_FOUND)
|
||||
message(WARNING "HarfBuzz depends on ICU i18n to function; HarfBuzz will be disabled")
|
||||
endif()
|
||||
if(NOT HARFBUZZ_FOUND)
|
||||
message(WARNING "Without HarfBuzz and ICU i18n the game will not be able to render right-to-left languages correctly")
|
||||
endif()
|
||||
endif()
|
||||
if(APPLE)
|
||||
if(NOT AUDIOTOOLBOX_LIBRARY)
|
||||
|
@ -215,6 +232,7 @@ if(OPTION_PACKAGE_DEPENDENCIES)
|
|||
set(CMAKE_BUILD_WITH_INSTALL_RPATH ON)
|
||||
endif()
|
||||
|
||||
include(CTest)
|
||||
include(SourceList)
|
||||
|
||||
# Needed by rev.cpp
|
||||
|
@ -224,15 +242,31 @@ include_directories(${CMAKE_SOURCE_DIR}/src/3rdparty/squirrel/include)
|
|||
|
||||
include(MSVCFilters)
|
||||
|
||||
add_executable(openttd WIN32 ${GENERATED_SOURCE_FILES})
|
||||
add_library(openttd_lib OBJECT ${GENERATED_SOURCE_FILES})
|
||||
add_executable(openttd WIN32)
|
||||
add_executable(openttd_test)
|
||||
set_target_properties(openttd PROPERTIES OUTPUT_NAME "${BINARY_NAME}")
|
||||
# All other files are added via target_sources()
|
||||
|
||||
if(MSVC)
|
||||
# Add DPI manifest to project; other WIN32 targets get this via ottdres.rc
|
||||
target_sources(openttd PRIVATE "${CMAKE_SOURCE_DIR}/os/windows/openttd.manifest")
|
||||
|
||||
# If target -static is used, switch our project to static (/MT) too.
|
||||
# If the target ends on -static-md, it will remain dynamic (/MD).
|
||||
if(VCPKG_TARGET_TRIPLET MATCHES "-static" AND NOT VCPKG_TARGET_TRIPLET MATCHES "-md")
|
||||
set_property(TARGET openttd_lib PROPERTY MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
|
||||
set_property(TARGET openttd PROPERTY MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
|
||||
set_property(TARGET openttd_test PROPERTY MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
target_precompile_headers(openttd_lib
|
||||
PRIVATE
|
||||
src/stdafx.h
|
||||
src/core/format.hpp
|
||||
)
|
||||
|
||||
add_subdirectory(${CMAKE_SOURCE_DIR}/bin)
|
||||
add_subdirectory(${CMAKE_SOURCE_DIR}/src)
|
||||
add_subdirectory(${CMAKE_SOURCE_DIR}/media)
|
||||
|
@ -240,17 +274,29 @@ add_subdirectory(${CMAKE_SOURCE_DIR}/media)
|
|||
add_dependencies(openttd
|
||||
find_version)
|
||||
|
||||
target_link_libraries(openttd
|
||||
target_link_libraries(openttd_lib
|
||||
openttd::languages
|
||||
openttd::settings
|
||||
openttd::media
|
||||
openttd::basesets
|
||||
openttd::script_api
|
||||
Threads::Threads
|
||||
)
|
||||
|
||||
target_link_libraries(openttd
|
||||
openttd_lib
|
||||
openttd::media
|
||||
openttd::basesets
|
||||
)
|
||||
|
||||
target_link_libraries(openttd_test PRIVATE openttd_lib)
|
||||
if(ANDROID)
|
||||
target_link_libraries(openttd_test PRIVATE log)
|
||||
endif()
|
||||
|
||||
include(Catch)
|
||||
catch_discover_tests(openttd_test)
|
||||
|
||||
if(HAIKU)
|
||||
target_link_libraries(openttd "be" "network" "midi")
|
||||
target_link_libraries(openttd_lib "be" "network" "midi")
|
||||
endif()
|
||||
|
||||
if(IPO_FOUND)
|
||||
|
@ -269,6 +315,11 @@ link_package(LZO)
|
|||
|
||||
if(NOT WIN32 AND NOT EMSCRIPTEN)
|
||||
link_package(CURL ENCOURAGED)
|
||||
target_link_libraries(openttd_lib ${CMAKE_DL_LIBS})
|
||||
endif()
|
||||
|
||||
if(NOT EMSCRIPTEN)
|
||||
link_package(unofficial-breakpad TARGET unofficial::breakpad::libbreakpad_client ENCOURAGED)
|
||||
endif()
|
||||
|
||||
if(NOT OPTION_DEDICATED)
|
||||
|
@ -278,7 +329,7 @@ if(NOT OPTION_DEDICATED)
|
|||
link_package(Allegro)
|
||||
link_package(FREETYPE TARGET Freetype::Freetype)
|
||||
link_package(Fontconfig TARGET Fontconfig::Fontconfig)
|
||||
link_package(ICU_lx)
|
||||
link_package(Harfbuzz TARGET harfbuzz::harfbuzz)
|
||||
link_package(ICU_i18n)
|
||||
|
||||
if(SDL2_FOUND AND OPENGL_FOUND AND UNIX)
|
||||
|
@ -292,12 +343,12 @@ if(NOT OPTION_DEDICATED)
|
|||
endif()
|
||||
endif()
|
||||
|
||||
include(CheckAtomic)
|
||||
include(3rdparty/llvm/CheckAtomic)
|
||||
|
||||
if(APPLE)
|
||||
link_package(Iconv TARGET Iconv::Iconv)
|
||||
|
||||
target_link_libraries(openttd
|
||||
target_link_libraries(openttd_lib
|
||||
${AUDIOTOOLBOX_LIBRARY}
|
||||
${AUDIOUNIT_LIBRARY}
|
||||
${COCOA_LIBRARY}
|
||||
|
@ -316,6 +367,7 @@ if(EMSCRIPTEN)
|
|||
target_link_libraries(WASM::WASM INTERFACE "-s ALLOW_MEMORY_GROWTH=1")
|
||||
target_link_libraries(WASM::WASM INTERFACE "-s INITIAL_MEMORY=33554432")
|
||||
target_link_libraries(WASM::WASM INTERFACE "-s DISABLE_EXCEPTION_CATCHING=0")
|
||||
target_link_libraries(WASM::WASM INTERFACE "-s WASM_BIGINT")
|
||||
add_definitions(-s DISABLE_EXCEPTION_CATCHING=0)
|
||||
|
||||
# Export functions to Javascript.
|
||||
|
@ -331,6 +383,23 @@ if(EMSCRIPTEN)
|
|||
target_link_libraries(WASM::WASM INTERFACE "--preload-file ${CMAKE_BINARY_DIR}/lang/english.lng@/lang/english.lng")
|
||||
target_link_libraries(WASM::WASM INTERFACE "--preload-file ${CMAKE_SOURCE_DIR}/bin/ai@/ai")
|
||||
target_link_libraries(WASM::WASM INTERFACE "--preload-file ${CMAKE_SOURCE_DIR}/bin/game@/game")
|
||||
# Documentation files for the in-game text file viewer
|
||||
target_link_libraries(WASM::WASM INTERFACE "--preload-file ${CMAKE_SOURCE_DIR}/README.md@/README.md")
|
||||
target_link_libraries(WASM::WASM INTERFACE "--preload-file ${CMAKE_SOURCE_DIR}/CREDITS.md@/CREDITS.md")
|
||||
target_link_libraries(WASM::WASM INTERFACE "--preload-file ${CMAKE_SOURCE_DIR}/CONTRIBUTING.md@/CONTRIBUTING.md")
|
||||
target_link_libraries(WASM::WASM INTERFACE "--preload-file ${CMAKE_SOURCE_DIR}/COPYING.md@/COPYING.md")
|
||||
target_link_libraries(WASM::WASM INTERFACE "--preload-file ${CMAKE_SOURCE_DIR}/known-bugs.txt@/known-bugs.txt")
|
||||
target_link_libraries(WASM::WASM INTERFACE "--preload-file ${CMAKE_SOURCE_DIR}/changelog.txt@/changelog.txt")
|
||||
target_link_libraries(WASM::WASM INTERFACE "--preload-file ${CMAKE_SOURCE_DIR}/docs/admin_network.md@/docs/admin_network.md")
|
||||
target_link_libraries(WASM::WASM INTERFACE "--preload-file ${CMAKE_SOURCE_DIR}/docs/debugging_desyncs.md@/docs/debugging_desyncs.md")
|
||||
target_link_libraries(WASM::WASM INTERFACE "--preload-file ${CMAKE_SOURCE_DIR}/docs/desync.md@/docs/desync.md")
|
||||
target_link_libraries(WASM::WASM INTERFACE "--preload-file ${CMAKE_SOURCE_DIR}/docs/directory_structure.md@/docs/directory_structure.md")
|
||||
target_link_libraries(WASM::WASM INTERFACE "--preload-file ${CMAKE_SOURCE_DIR}/docs/eints.md@/docs/eints.md")
|
||||
target_link_libraries(WASM::WASM INTERFACE "--preload-file ${CMAKE_SOURCE_DIR}/docs/linkgraph.md@/docs/linkgraph.md")
|
||||
target_link_libraries(WASM::WASM INTERFACE "--preload-file ${CMAKE_SOURCE_DIR}/docs/logging_and_performance_metrics.md@/docs/logging_and_performance_metrics.md")
|
||||
target_link_libraries(WASM::WASM INTERFACE "--preload-file ${CMAKE_SOURCE_DIR}/docs/multiplayer.md@/docs/multiplayer.md")
|
||||
target_link_libraries(WASM::WASM INTERFACE "--preload-file ${CMAKE_SOURCE_DIR}/docs/savegame_format.md@/docs/savegame_format.md")
|
||||
target_link_libraries(WASM::WASM INTERFACE "--preload-file ${CMAKE_SOURCE_DIR}/docs/symbol_server.md@/docs/symbol_server.md")
|
||||
|
||||
# We use IDBFS for persistent storage.
|
||||
target_link_libraries(WASM::WASM INTERFACE "-lidbfs.js")
|
||||
|
@ -376,13 +445,14 @@ if(WIN32)
|
|||
-DPSAPI_VERSION=1
|
||||
)
|
||||
|
||||
target_link_libraries(openttd
|
||||
target_link_libraries(openttd_lib
|
||||
ws2_32
|
||||
winmm
|
||||
imm32
|
||||
usp10
|
||||
psapi
|
||||
winhttp
|
||||
bcrypt
|
||||
)
|
||||
endif()
|
||||
|
||||
|
@ -390,8 +460,9 @@ if(CMAKE_SIZEOF_VOID_P EQUAL 8)
|
|||
add_definitions(-DPOINTER_IS_64BIT)
|
||||
endif()
|
||||
|
||||
include(CreateRegression)
|
||||
create_regression()
|
||||
enable_testing()
|
||||
|
||||
add_subdirectory(regression)
|
||||
|
||||
if(APPLE OR WIN32)
|
||||
find_package(Pandoc)
|
||||
|
|
|
@ -157,7 +157,7 @@ enum SomeEnumeration {
|
|||
* Use curly braces and put the contained statements on their own lines (e.g., don't put them directly after the **if**).
|
||||
* Opening curly bracket **{** stays on the first line, closing curly bracket **}** gets a line to itself (except for the **}** preceding an **else**, which should be on the same line as the **else**).
|
||||
* When only a single statement is contained, the brackets can be omitted. In this case, put the single statement on the same line as the preceding keyword (**if**, **while**, etc.). Note that this is only allowed for if statements without an **else** clause.
|
||||
* All fall throughs must be documented, using a **FALLTHROUGH** define/macro.
|
||||
* Non-trivial fall throughs must be documented, using a `[[fallthrough]]` attribute.
|
||||
* The NOT_REACHED() macro can be used in default constructs that should never be reached.
|
||||
* Unconditional loops are written with **`for (;;) {`**
|
||||
|
||||
|
@ -180,7 +180,7 @@ switch (a) {
|
|||
|
||||
case 1:
|
||||
DoSomething();
|
||||
/* FALL THROUGH */
|
||||
[[fallthrough]];
|
||||
|
||||
case 2:
|
||||
DoMore();
|
||||
|
@ -191,7 +191,7 @@ switch (a) {
|
|||
int r = 2;
|
||||
|
||||
DoEvenMore(a);
|
||||
/* FALL THROUGH */
|
||||
[[fallthrough]];
|
||||
}
|
||||
|
||||
case 4: {
|
||||
|
@ -248,7 +248,7 @@ Templates are a very powerful C++ tool, but they can easily confuse beginners. T
|
|||
* Templates are to be documented in a very clear and verbose manner. Never assume anything in the documentation.
|
||||
* the template keyword and the template layout get a separate line. typenames are either "T" or preceded by a "T", integers get a single capital letter or a descriptive name preceded by "T".
|
||||
```c++
|
||||
template <typename T, typename Tsomething, int N, byte Tnumber_of_something>
|
||||
template <typename T, typename Tsomething, int N, uint8_t Tnumber_of_something>
|
||||
int Func();
|
||||
```
|
||||
|
||||
|
@ -416,38 +416,57 @@ There is a check-script on the git server (also available for clients, see below
|
|||
|
||||
The first line of a message must match:
|
||||
```
|
||||
<pre>
|
||||
<keyword>( #<issue>| <commit>(, (<keyword> #<issue>|<commit>))*)?: ([<section])? <Details>
|
||||
</pre>
|
||||
<keyword>( #<issue>|<commit>(, (#<issue>|<commit>))*)?: ([<component>])? <details>
|
||||
```
|
||||
Keywords are:
|
||||
* Add, Feature: Adding new stuff. Difference between "Feature" and "Add" is somewhat subjective. "Feature" for user-point-of-view stuff, "Add" for other.
|
||||
* Change: Changing behaviour from user-point-of-view.
|
||||
* Remove: Removing something from user-point-of-view.
|
||||
* Codechange, Cleanup: Changes without intentional change of behaviour from user-point-of-view. Difference between "Codechange" and "Cleanup" is somewhat subjective.
|
||||
* Fix, Revert: Fixing stuff.
|
||||
* Doc, Update: Documentation changes, version increments, translator commits.
|
||||
* Prepare: Preparation for bigger changes. Rarely used.
|
||||
|
||||
If you commit a fix for an [issue](https://github.com/OpenTTD/OpenTTD/issues), add the corresponding issue number in the form of #NNNN. Do it as well if you implement a feature with a matching entry.
|
||||
Keywords can either be player-facing, NewGRF / Script author-facing, or developer-facing.
|
||||
|
||||
In the case of bugfixes, if you know what revision the bug was introduced (eg regression), please mention that revision as well just after the prefix. Finding the trouble-causing revision is highly encouraged as it makes backporting/branching/releases that much easier.
|
||||
For player-facing changes, we have these keywords:
|
||||
* Feature: Adding a significant new functionality to the game. This can be small in code-size, but is meant for the bigger things from a player perspective.
|
||||
* Add: Similar to Feature, but for small functionalities.
|
||||
* Change: Changing existing behaviour to an extent the player needs to know about it.
|
||||
* Fix: Fixing an issue with the game (as seen by the player).
|
||||
* Remove: Completely removing a functionality.
|
||||
* Revert: Reverting an earlier Feature / Add / Change / Fix / Remove.
|
||||
* Doc: Update to (player-facing) documentation, like in the `docs/` folder etc.
|
||||
* Update: Translator commits.
|
||||
|
||||
To further structure the changelog, you can add sections. Example are:
|
||||
* "Network" for network specific changes
|
||||
* "NewGRF" for NewGRF additions
|
||||
* "YAPP", "NPF", for changes in these features
|
||||
* "OSX", "Debian", "win32", for OS-specific packaging changes
|
||||
For NewGRF / Script author-facing changes, we use the same keywords as player-facing changes, followed by `[NewGRF]` / `[Script]` component.
|
||||
This also means the commit is aimed (and worded) towards the NewGRF / Script authors, rather than players.
|
||||
|
||||
Further explanations, general bitching, etc. don't go into the first line. Use a new line for those.
|
||||
For developer-facing changes, we have these keywords:
|
||||
* Codechange: Changes to the code the player is not going to notice. Refactors, modernization, etc.
|
||||
* Cleanup: Similar to Codechange, but when it is more about removing old code, rather than an actual change.
|
||||
* Codefix: Fixing problems in earlier commits that the player is not actually going to notice. Wrong comments, missing files, CI changes.
|
||||
|
||||
If you commit a `Fix` for an [issue](https://github.com/OpenTTD/OpenTTD/issues), add the corresponding issue number in the form of #NNNNN.
|
||||
|
||||
In the case of `Fix`es, if you know the hash of the commit in which the bug was introduced (eg regression), please mention that hash (the first 7 characters) as well just after the keyword (or, if present, after the issue number).
|
||||
Finding the trouble-causing commit is highly encouraged as it makes backporting / branching / releases that much easier.
|
||||
|
||||
Do not mention two keywords; if two apply, pick one that best represents the commit (for example, "Fix #123" is mostly always better than "Revert", even if both are true).
|
||||
|
||||
The `<details>` part starts with a capital and does not end with a dot.
|
||||
Try to be descriptive to what the player will notice, not to what is actually being changed in the code.
|
||||
See `changelog.txt` for inspiration.
|
||||
|
||||
To further structure the changelog, you can add components. Example are:
|
||||
* "Network" for network specific changes.
|
||||
* "NewGRF" for NewGRF additions.
|
||||
* "Script" for AI / GS additions.
|
||||
* "YAPF", "NPF", for changes in these features.
|
||||
* "MacOS", "Linux", "Windows", for OS-specific changes.
|
||||
* "CI", "CMake", for changes to the (build) infrastructure.
|
||||
|
||||
Further explanations, more details, etc. don't go into the first line. Use a new line for those.
|
||||
|
||||
Complete examples:
|
||||
* Fix: [YAPF] Infinite loop in pathfinder.
|
||||
* Fix #5926: [YAPF] Infinite loop in pathfinder.
|
||||
* Fix 80dffae130: Warning about unsigned unary minus.
|
||||
* Fix #6673, 99bb3a95b4: Store the map variety setting in the samegame.
|
||||
* Revert d9065fbfbe, Fix #5922: ClientSizeChanged is only called via WndProcGdi which already has the mutex.
|
||||
* Fix #1264, Fix #2037, Fix #2038, Fix #2110: Rewrite the autoreplace kernel.
|
||||
* `Fix: [YAPF] Infinite loop in pathfinder`
|
||||
* `Fix #5926: [YAPF] Infinite loop in pathfinder`
|
||||
* `Codefix 80dffae: Warning about unsigned unary minus`
|
||||
* `Fix #6673, 99bb3a9: Store the map variety setting in the savegame`
|
||||
* `Codefix #5922: ClientSizeChanged is only called via WndProcGdi which already has the mutex`
|
||||
* `Codechange #1264, #2037, #2038, #2110: Rewrite the autoreplace kernel`
|
||||
|
||||
|
||||
## Other tips
|
||||
|
|
24
COMPILING.md
24
COMPILING.md
|
@ -4,6 +4,7 @@
|
|||
|
||||
OpenTTD makes use of the following external libraries:
|
||||
|
||||
- (encouraged) breakpad: creates minidumps on crash
|
||||
- (encouraged) zlib: (de)compressing of old (0.3.0-1.0.5) savegames, content downloads,
|
||||
heightmaps
|
||||
- (encouraged) liblzma: (de)compressing of savegames (1.1.0 and later)
|
||||
|
@ -16,6 +17,7 @@ For Linux, the following additional libraries are used:
|
|||
- libSDL2: hardware access (video, sound, mouse)
|
||||
- libfreetype: loading generic fonts and rendering them
|
||||
- libfontconfig: searching for fonts, resolving font names to actual fonts
|
||||
- harfbuzz: handling of right-to-left scripts (e.g. Arabic and Persian) (required libicu)
|
||||
- libicu: handling of right-to-left scripts (e.g. Arabic and Persian) and
|
||||
natural sorting of strings
|
||||
|
||||
|
@ -27,7 +29,7 @@ open most older savegames or use the content downloading system.
|
|||
|
||||
## Windows
|
||||
|
||||
You need Microsoft Visual Studio 2017 or more recent.
|
||||
You need Microsoft Visual Studio 2022 or more recent.
|
||||
|
||||
You can download the free Visual Studio Community Edition from Microsoft at
|
||||
https://visualstudio.microsoft.com/vs/community/.
|
||||
|
@ -36,7 +38,7 @@ OpenTTD needs the Platform SDK, if it isn't installed already. This can be
|
|||
done during installing Visual Studio, by selecting
|
||||
`Visual C++ MFC for x86 and x64` (and possibly
|
||||
`Visual C++ ATL for x86 and x64` depending on your version). If not, you
|
||||
can get download it as [MS Windows Platform SDK](https://developer.microsoft.com/en-US/windows/downloads/windows-10-sdk).
|
||||
can get download it as [MS Windows Platform SDK](https://developer.microsoft.com/en-us/windows/downloads/windows-sdk).
|
||||
|
||||
Install the SDK by following the instructions as given.
|
||||
|
||||
|
@ -48,6 +50,7 @@ by following the `Quick Start` instructions of their
|
|||
After this, you can install the dependencies OpenTTD needs. We advise to use
|
||||
the `static` versions, and OpenTTD currently needs the following dependencies:
|
||||
|
||||
- breakpad
|
||||
- liblzma
|
||||
- libpng
|
||||
- lzo
|
||||
|
@ -56,13 +59,13 @@ the `static` versions, and OpenTTD currently needs the following dependencies:
|
|||
To install both the x64 (64bit) and x86 (32bit) variants (though only one is necessary), you can use:
|
||||
|
||||
```ps
|
||||
.\vcpkg install liblzma:x64-windows-static libpng:x64-windows-static lzo:x64-windows-static zlib:x64-windows-static
|
||||
.\vcpkg install liblzma:x86-windows-static libpng:x86-windows-static lzo:x86-windows-static zlib:x86-windows-static
|
||||
.\vcpkg install --triplet=x64-windows-static
|
||||
.\vcpkg install --triplet=x86-windows-static
|
||||
```
|
||||
|
||||
You can open the folder (as a CMake project). CMake will be detected, and you can compile from there.
|
||||
If libraries are installed but not found, you need to set VCPKG_TARGET_TRIPLET in CMake parameters.
|
||||
For Visual Studio 2017 you also need to set CMAKE_TOOLCHAIN_FILE.
|
||||
For Visual Studio 2022 you also need to set CMAKE_TOOLCHAIN_FILE.
|
||||
(Typical values are shown in the MSVC project file command line example)
|
||||
|
||||
Alternatively, you can create a MSVC project file via CMake. For this
|
||||
|
@ -72,7 +75,7 @@ that comes with vcpkg. After that, you can run something similar to this:
|
|||
```powershell
|
||||
mkdir build
|
||||
cd build
|
||||
cmake.exe .. -G"Visual Studio 16 2019" -DCMAKE_TOOLCHAIN_FILE="<location of vcpkg>\vcpkg\scripts\buildsystems\vcpkg.cmake" -DVCPKG_TARGET_TRIPLET="x64-windows-static"
|
||||
cmake.exe .. -G"Visual Studio 17 2022" -DCMAKE_TOOLCHAIN_FILE="<location of vcpkg>\vcpkg\scripts\buildsystems\vcpkg.cmake" -DVCPKG_TARGET_TRIPLET="x64-windows-static"
|
||||
```
|
||||
|
||||
Change `<location of vcpkg>` to where you have installed vcpkg. After this
|
||||
|
@ -80,7 +83,7 @@ in the build folder are MSVC project files. MSVC can rebuild the project
|
|||
files himself via the `ZERO_CHECK` project.
|
||||
|
||||
## All other platforms
|
||||
Minimum required version of CMake is 3.9.
|
||||
Minimum required version of CMake is 3.16.
|
||||
By default this produces a Debug build with assertations enabled.
|
||||
This is a far slower build than release builds.
|
||||
|
||||
|
@ -107,17 +110,14 @@ builds.
|
|||
- `-DOPTION_USE_ASSERTS=OFF`: disable asserts. Use with care, as assert
|
||||
statements capture early signs of trouble. Release builds have them
|
||||
disabled by default.
|
||||
- `-DOPTION_USE_THREADS=OFF`: disable the use of threads. This will block
|
||||
the interface in many places, and in general gives a worse experience of
|
||||
the game. Use with care.
|
||||
- `-DOPTION_TOOLS_ONLY=ON`: only build tools like `strgen`. Does not build
|
||||
the game itself. Useful for cross-compiling.
|
||||
|
||||
## Supported compilers
|
||||
|
||||
Every compiler that is supported by CMake and supports C++17, should be
|
||||
Every compiler that is supported by CMake and supports C++20, should be
|
||||
able to compile OpenTTD. As the exact list of compilers changes constantly,
|
||||
we refer to the compiler manual to see if it supports C++17, and to CMake
|
||||
we refer to the compiler manual to see if it supports C++20, and to CMake
|
||||
to see if it supports your compiler.
|
||||
|
||||
## Compilation of base sets
|
||||
|
|
|
@ -14,7 +14,7 @@ In return, they should reciprocate that respect in addressing your issue or asse
|
|||
The [issue tracker](https://github.com/OpenTTD/OpenTTD/issues) is the preferred channel for [bug reports](#bug-reports), but please respect the following restrictions:
|
||||
|
||||
* Please **do not** use the issue tracker for help playing or using OpenTTD.
|
||||
Please try [irc](https://wiki.openttd.org/en/Development/IRC%20channel), or the [forums](https://www.tt-forums.net/)
|
||||
Please try [irc](https://wiki.openttd.org/en/Development/IRC%20channel), [Discord](https://discord.gg/openttd), or the [forums](https://www.tt-forums.net/)
|
||||
|
||||
* Please **do not** derail or troll issues. Keep the discussion on topic and respect the opinions of others.
|
||||
|
||||
|
@ -23,7 +23,7 @@ Use [GitHub's "reactions" feature](https://github.com/blog/2119-add-reactions-to
|
|||
We reserve the right to delete comments which violate this rule.
|
||||
|
||||
* Please **do not** open issues or pull requests regarding add-on content in NewGRF, GameScripts, AIs, etc.
|
||||
These are created by third-parties. Please try [irc](https://wiki.openttd.org/en/Development/IRC%20channel) or the [forums](https://www.tt-forums.net/) to discuss these.
|
||||
These are created by third-parties. Please try [irc](https://wiki.openttd.org/en/Development/IRC%20channel), [Discord](https://discord.gg/openttd), or the [forums](https://www.tt-forums.net/) to discuss these.
|
||||
|
||||
* Please use [the web translator](https://translator.openttd.org/) to submit corrections and improvements to translations of the game.
|
||||
|
||||
|
@ -108,11 +108,11 @@ Pull requests should fit with the [goals of the project](./CONTRIBUTING.md#proje
|
|||
|
||||
Every pull request should have a clear scope, with no unrelated commits.
|
||||
|
||||
[Code style](https://wiki.openttd.org/en/Development/Coding%20style) must be complied with for pull requests to be accepted; this also includes [commit message format](https://wiki.openttd.org/en/Development/Coding%20style#commit-message).
|
||||
[Code style](./CODINGSTYLE.md) must be complied with for pull requests to be accepted; this also includes [commit message format](./CODINGSTYLE.md#commit-message).
|
||||
|
||||
Adhering to the following process is the best way to get your work included in the project:
|
||||
|
||||
1. [Fork](https://help.github.com/fork-a-repo/) the project, clone your fork, and configure the remotes:
|
||||
1. [Fork](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/fork-a-repo) the project, clone your fork, and configure the remotes:
|
||||
|
||||
```bash
|
||||
git clone https://github.com/<your-username>/OpenTTD.git openttd
|
||||
|
@ -136,7 +136,7 @@ contain your feature, change, or fix:
|
|||
git checkout upstream/master -b <topic-branch-name>
|
||||
```
|
||||
|
||||
4. Commit your changes in logical chunks. Please adhere to these [git commit message guidelines](https://wiki.openttd.org/en/Development/Coding%20style#commit-message) or your code is unlikely to be merged into the main project.
|
||||
4. Commit your changes in logical chunks. Please adhere to these [git commit message guidelines](./CODINGSTYLE.md#commit-message) or your code is unlikely to be merged into the main project.
|
||||
Use Git's [interactive rebase](https://docs.github.com/en/get-started/using-git/about-git-rebase) feature to tidy up your commits before making them public.
|
||||
|
||||
5. Locally rebase the upstream development branch into your topic branch:
|
||||
|
@ -172,7 +172,7 @@ The results of the CI tests will show on your pull request.
|
|||
By clicking on Details you can further zoom in; in case of a failure it will show you why it failed.
|
||||
In case of success it will report how awesome you were.
|
||||
|
||||
Tip: [commit message format](https://wiki.openttd.org/en/Development/Coding%20style#commit-message) is a common reason for pull requests to fail validation.
|
||||
Tip: [commit message format](./CODINGSTYLE.md#commit-message) is a common reason for pull requests to fail validation.
|
||||
|
||||
|
||||
### Are there any development docs?
|
||||
|
@ -182,6 +182,16 @@ There is no single source for OpenTTD development docs. It's a complex project w
|
|||
A good entry point is [Development](https://wiki.openttd.org/en/Development/) on the OpenTTD wiki; this provides links to wiki documentation and other sources.
|
||||
|
||||
The GitHub repo also includes some non-comprehensive documentation in [/docs](./docs).
|
||||
These include:
|
||||
- When to [change other languages and when not to](./docs/eints.md).
|
||||
- The [savegame format](./docs/savegame_format.md).
|
||||
- The [release process](./docs/releasing_openttd.md).
|
||||
- Some [notes on the link graph algorithm](./docs/linkgraph.md).
|
||||
- The [network game coordinator](./docs/game_coordinator.md).
|
||||
- How to use [the admin port for network games](./docs/admin_network.md), also useful for multiplayer server hosts.
|
||||
- The [performance metrics and logging features](./docs/logging_and_performance_metrics.md), also useful for add-on developers.
|
||||
- How [symbol server and analysis works](./docs/symbol_server.md).
|
||||
- And several miscellaneous files detailing internal data structures and graphics measurements and palettes.
|
||||
|
||||
You may also want the guide to [compiling OpenTTD](./COMPILING.md).
|
||||
|
||||
|
@ -256,7 +266,7 @@ This is inevitable, because it is a main feature of git.
|
|||
If you are concerned about your privacy, we strongly recommend to use "Anonymous <anonymous@openttd.org>" as the git commit author. We might refuse anonymous contributions if malicious intent is suspected.
|
||||
|
||||
Please note that the contributor identity, once given, is used for copyright verification and to provide proof should a malicious commit be made.
|
||||
As such, the [EU GDPR](https://www.eugdpr.org/key-changes.html) "right to be forgotten" does not apply, as this is an overriding legitimate interest.
|
||||
As such, the [EU GDPR](https://gdpr.eu) "right to be forgotten" does not apply, as this is an overriding legitimate interest.
|
||||
|
||||
Please also note that your commit is public and as such will potentially be processed by many third-parties.
|
||||
Git's distributed nature makes it impossible to track where exactly your commit, and thus your personal data, will be stored and be processed.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
This is the license which applies to OpenTTD with the exception of some
|
||||
3rd party modules. See [./README.md](./README.md) for details
|
||||
3rd party modules. See [our readme](./README.md) for details
|
||||
|
||||
GNU General Public License
|
||||
==========================
|
||||
|
|
|
@ -3,14 +3,15 @@
|
|||
- Matthijs Kooijman (blathijs) - Pathfinder-guru, Debian port (since 0.3)
|
||||
- Christoph Elsenhans (frosch) - General coding (since 0.6)
|
||||
- Loïc Guilloux (glx) - General / Windows Expert (since 0.4.5)
|
||||
- Koen Bussemaker (Kuhnovic) - General / Ship pathfinder (since 14)
|
||||
- Charles Pigott (LordAro) - General / Correctness police (since 1.9)
|
||||
- Michael Lutz (michi_cc) - General / Path based signals (since 0.7)
|
||||
- Niels Martin Hansen (nielsm) - Music system, general coding (since 1.9)
|
||||
- Owen Rudge (orudge) - Forum host, OS/2 port (since 0.1)
|
||||
- Peter Nelson (peter1138) - Spiritual descendant from newGRF gods (since 0.4.5)
|
||||
- Peter Nelson (peter1138) - Spiritual descendant from NewGRF gods (since 0.4.5)
|
||||
- Remko Bijker (Rubidium) - Coder and way more (since 0.4.5)
|
||||
- Patric Stout (TrueBrain) - NoProgrammer (since 0.3), sys op
|
||||
- Tyler Trahan (2TallTyler) - General coding (since 13)
|
||||
- Tyler Trahan (2TallTyler) - General / Time Lord (since 13)
|
||||
|
||||
### Inactive Developers:
|
||||
|
||||
|
@ -56,6 +57,7 @@
|
|||
- George - Canal/Lock graphics
|
||||
- Andrew Parkhouse (andythenorth) - River graphics
|
||||
- David Dallaston (Pikka) - Tram tracks
|
||||
- Richard Wheeler (zephyris) - OpenTTD TrueType font
|
||||
- All Translators - For their support to make OpenTTD a truly international game
|
||||
- Bug Reporters - Thanks for all bug reports
|
||||
- Chris Sawyer - For an amazing game!
|
||||
|
|
34
Doxyfile.in
34
Doxyfile.in
|
@ -3,6 +3,8 @@
|
|||
# OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
# See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
# Doxyfile 1.9.4
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# Project related configuration options
|
||||
#---------------------------------------------------------------------------
|
||||
|
@ -13,6 +15,7 @@ PROJECT_BRIEF =
|
|||
PROJECT_LOGO =
|
||||
OUTPUT_DIRECTORY = ${CPACK_BINARY_DIR}/docs/source/
|
||||
CREATE_SUBDIRS = YES
|
||||
CREATE_SUBDIRS_LEVEL = 8
|
||||
ALLOW_UNICODE_NAMES = NO
|
||||
OUTPUT_LANGUAGE = English
|
||||
BRIEF_MEMBER_DESC = YES
|
||||
|
@ -35,8 +38,10 @@ STRIP_FROM_PATH = ./
|
|||
STRIP_FROM_INC_PATH =
|
||||
SHORT_NAMES = NO
|
||||
JAVADOC_AUTOBRIEF = YES
|
||||
JAVADOC_BANNER = NO
|
||||
QT_AUTOBRIEF = NO
|
||||
MULTILINE_CPP_IS_BRIEF = NO
|
||||
PYTHON_DOCSTRING = YES
|
||||
INHERIT_DOCS = YES
|
||||
SEPARATE_MEMBER_PAGES = NO
|
||||
TAB_SIZE = 2
|
||||
|
@ -45,6 +50,7 @@ OPTIMIZE_OUTPUT_FOR_C = YES
|
|||
OPTIMIZE_OUTPUT_JAVA = NO
|
||||
OPTIMIZE_FOR_FORTRAN = NO
|
||||
OPTIMIZE_OUTPUT_VHDL = NO
|
||||
OPTIMIZE_OUTPUT_SLICE = NO
|
||||
EXTENSION_MAPPING =
|
||||
MARKDOWN_SUPPORT = YES
|
||||
TOC_INCLUDE_HEADINGS = 0
|
||||
|
@ -60,16 +66,19 @@ INLINE_GROUPED_CLASSES = NO
|
|||
INLINE_SIMPLE_STRUCTS = NO
|
||||
TYPEDEF_HIDES_STRUCT = NO
|
||||
LOOKUP_CACHE_SIZE = 0
|
||||
NUM_PROC_THREADS = 1
|
||||
#---------------------------------------------------------------------------
|
||||
# Build related configuration options
|
||||
#---------------------------------------------------------------------------
|
||||
EXTRACT_ALL = NO
|
||||
EXTRACT_PRIVATE = YES
|
||||
EXTRACT_PRIV_VIRTUAL = NO
|
||||
EXTRACT_PACKAGE = NO
|
||||
EXTRACT_STATIC = YES
|
||||
EXTRACT_LOCAL_CLASSES = YES
|
||||
EXTRACT_LOCAL_METHODS = YES
|
||||
EXTRACT_ANON_NSPACES = YES
|
||||
RESOLVE_UNNAMED_PARAMS = YES
|
||||
HIDE_UNDOC_MEMBERS = NO
|
||||
HIDE_UNDOC_CLASSES = NO
|
||||
HIDE_FRIEND_COMPOUNDS = NO
|
||||
|
@ -78,6 +87,7 @@ INTERNAL_DOCS = NO
|
|||
CASE_SENSE_NAMES = YES
|
||||
HIDE_SCOPE_NAMES = NO
|
||||
HIDE_COMPOUND_REFERENCE= NO
|
||||
SHOW_HEADERFILE = YES
|
||||
SHOW_INCLUDE_FILES = YES
|
||||
SHOW_GROUPED_MEMB_INC = NO
|
||||
FORCE_LOCAL_INCLUDES = NO
|
||||
|
@ -107,9 +117,11 @@ QUIET = NO
|
|||
WARNINGS = YES
|
||||
WARN_IF_UNDOCUMENTED = YES
|
||||
WARN_IF_DOC_ERROR = YES
|
||||
WARN_IF_INCOMPLETE_DOC = YES
|
||||
WARN_NO_PARAMDOC = NO
|
||||
WARN_AS_ERROR = NO
|
||||
WARN_FORMAT = "$file:$line: $text"
|
||||
WARN_LINE_FORMAT = "at line $line of file $file"
|
||||
WARN_LOGFILE =
|
||||
#---------------------------------------------------------------------------
|
||||
# Configuration options related to the input files
|
||||
|
@ -150,6 +162,10 @@ REFERENCES_LINK_SOURCE = YES
|
|||
SOURCE_TOOLTIPS = YES
|
||||
USE_HTAGS = NO
|
||||
VERBATIM_HEADERS = YES
|
||||
CLANG_ASSISTED_PARSING = NO
|
||||
CLANG_ADD_INC_PATHS = YES
|
||||
CLANG_OPTIONS =
|
||||
CLANG_DATABASE_PATH =
|
||||
#---------------------------------------------------------------------------
|
||||
# Configuration options related to the alphabetical class index
|
||||
#---------------------------------------------------------------------------
|
||||
|
@ -175,6 +191,7 @@ HTML_DYNAMIC_SECTIONS = NO
|
|||
HTML_INDEX_NUM_ENTRIES = 100
|
||||
GENERATE_DOCSET = NO
|
||||
DOCSET_FEEDNAME = "Doxygen generated docs"
|
||||
DOCSET_FEEDURL =
|
||||
DOCSET_BUNDLE_ID = org.doxygen.Project
|
||||
DOCSET_PUBLISHER_ID = org.doxygen.Publisher
|
||||
DOCSET_PUBLISHER_NAME = Publisher
|
||||
|
@ -197,12 +214,17 @@ GENERATE_ECLIPSEHELP = NO
|
|||
ECLIPSE_DOC_ID = org.doxygen.Project
|
||||
DISABLE_INDEX = NO
|
||||
GENERATE_TREEVIEW = YES
|
||||
FULL_SIDEBAR = NO
|
||||
ENUM_VALUES_PER_LINE = 4
|
||||
TREEVIEW_WIDTH = 250
|
||||
EXT_LINKS_IN_WINDOW = NO
|
||||
OBFUSCATE_EMAILS = YES
|
||||
HTML_FORMULA_FORMAT = png
|
||||
FORMULA_FONTSIZE = 10
|
||||
FORMULA_TRANSPARENT = YES
|
||||
FORMULA_MACROFILE =
|
||||
USE_MATHJAX = NO
|
||||
MATHJAX_VERSION = MathJax_2
|
||||
MATHJAX_FORMAT = HTML-CSS
|
||||
MATHJAX_RELPATH = https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.2/
|
||||
MATHJAX_EXTENSIONS =
|
||||
|
@ -221,6 +243,7 @@ GENERATE_LATEX = NO
|
|||
LATEX_OUTPUT = latex
|
||||
LATEX_CMD_NAME = latex
|
||||
MAKEINDEX_CMD_NAME = makeindex
|
||||
LATEX_MAKEINDEX_CMD = makeindex
|
||||
COMPACT_LATEX = NO
|
||||
PAPER_TYPE = a4
|
||||
EXTRA_PACKAGES =
|
||||
|
@ -232,9 +255,9 @@ PDF_HYPERLINKS = NO
|
|||
USE_PDFLATEX = NO
|
||||
LATEX_BATCHMODE = NO
|
||||
LATEX_HIDE_INDICES = NO
|
||||
LATEX_SOURCE_CODE = NO
|
||||
LATEX_BIB_STYLE = plain
|
||||
LATEX_TIMESTAMP = NO
|
||||
LATEX_EMOJI_DIRECTORY =
|
||||
#---------------------------------------------------------------------------
|
||||
# Configuration options related to the RTF output
|
||||
#---------------------------------------------------------------------------
|
||||
|
@ -244,7 +267,6 @@ COMPACT_RTF = NO
|
|||
RTF_HYPERLINKS = NO
|
||||
RTF_STYLESHEET_FILE =
|
||||
RTF_EXTENSIONS_FILE =
|
||||
RTF_SOURCE_CODE = NO
|
||||
#---------------------------------------------------------------------------
|
||||
# Configuration options related to the man page output
|
||||
#---------------------------------------------------------------------------
|
||||
|
@ -259,12 +281,12 @@ MAN_LINKS = NO
|
|||
GENERATE_XML = NO
|
||||
XML_OUTPUT = xml
|
||||
XML_PROGRAMLISTING = YES
|
||||
XML_NS_MEMB_FILE_SCOPE = NO
|
||||
#---------------------------------------------------------------------------
|
||||
# Configuration options related to the DOCBOOK output
|
||||
#---------------------------------------------------------------------------
|
||||
GENERATE_DOCBOOK = NO
|
||||
DOCBOOK_OUTPUT = docbook
|
||||
DOCBOOK_PROGRAMLISTING = NO
|
||||
#---------------------------------------------------------------------------
|
||||
# Configuration options for the AutoGen Definitions output
|
||||
#---------------------------------------------------------------------------
|
||||
|
@ -292,8 +314,8 @@ PREDEFINED = WITH_ZLIB \
|
|||
WITH_PNG \
|
||||
WITH_FONTCONFIG \
|
||||
WITH_FREETYPE \
|
||||
WITH_HARFBUZZ \
|
||||
WITH_ICU_I18N \
|
||||
WITH_ICU_LX \
|
||||
UNICODE \
|
||||
_UNICODE \
|
||||
_GNU_SOURCE \
|
||||
|
@ -311,7 +333,6 @@ EXTERNAL_PAGES = YES
|
|||
#---------------------------------------------------------------------------
|
||||
# Configuration options related to the dot tool
|
||||
#---------------------------------------------------------------------------
|
||||
CLASS_DIAGRAMS = YES
|
||||
DIA_PATH =
|
||||
HIDE_UNDOC_RELATIONS = YES
|
||||
HAVE_DOT = NO
|
||||
|
@ -324,6 +345,8 @@ COLLABORATION_GRAPH = YES
|
|||
GROUP_GRAPHS = YES
|
||||
UML_LOOK = NO
|
||||
UML_LIMIT_NUM_FIELDS = 10
|
||||
DOT_UML_DETAILS = NO
|
||||
DOT_WRAP_THRESHOLD = 17
|
||||
TEMPLATE_RELATIONS = NO
|
||||
INCLUDE_GRAPH = YES
|
||||
INCLUDED_BY_GRAPH = YES
|
||||
|
@ -331,6 +354,7 @@ CALL_GRAPH = NO
|
|||
CALLER_GRAPH = NO
|
||||
GRAPHICAL_HIERARCHY = YES
|
||||
DIRECTORY_GRAPH = YES
|
||||
DIR_GRAPH_MAX_DEPTH = 1
|
||||
DOT_IMAGE_FORMAT = png
|
||||
INTERACTIVE_SVG = NO
|
||||
DOT_PATH =
|
||||
|
|
58
README.md
58
README.md
|
@ -11,9 +11,10 @@
|
|||
- 1.6) [OpenTTD directories](#16-openttd-directories)
|
||||
- 1.7) [Compiling OpenTTD](#17-compiling-openttd)
|
||||
- 2.0) [Contact and community](#20-contact-and-community)
|
||||
- 2.1) [Contributing to OpenTTD](#21-contributing-to-openttd)
|
||||
- 2.2) [Reporting bugs](#22-reporting-bugs)
|
||||
- 2.3) [Translating](#23-translating)
|
||||
- 2.1) [Multiplayer games](#21-multiplayer-games)
|
||||
- 2.2) [Contributing to OpenTTD](#22-contributing-to-openttd)
|
||||
- 2.3) [Reporting bugs](#23-reporting-bugs)
|
||||
- 2.4) [Translating](#24-translating)
|
||||
- 3.0) [Licensing](#30-licensing)
|
||||
- 4.0) [Credits](#40-credits)
|
||||
|
||||
|
@ -77,9 +78,9 @@ For some platforms, you will need to refer to [the installation guide](https://w
|
|||
The free data files, split into OpenGFX for graphics, OpenSFX for sounds and
|
||||
OpenMSX for music can be found at:
|
||||
|
||||
- https://www.openttd.org/downloads/opengfx-releases/latest for OpenGFX
|
||||
- https://www.openttd.org/downloads/opensfx-releases/latest for OpenSFX
|
||||
- https://www.openttd.org/downloads/openmsx-releases/latest for OpenMSX
|
||||
- [OpenGFX](https://www.openttd.org/downloads/opengfx-releases/latest)
|
||||
- [OpenSFX](https://www.openttd.org/downloads/opensfx-releases/latest)
|
||||
- [OpenMSX](https://www.openttd.org/downloads/openmsx-releases/latest)
|
||||
|
||||
Please follow the readme of these packages about the installation procedure.
|
||||
The Windows installer can optionally download and install these packages.
|
||||
|
@ -117,6 +118,15 @@ Most types of add-on content can be downloaded within OpenTTD via the 'Check Onl
|
|||
Add-on content can also be installed manually, but that's more complicated; the [OpenTTD wiki](https://wiki.openttd.org/) may offer help with that, or the [OpenTTD directory structure guide](./docs/directory_structure.md).
|
||||
|
||||
|
||||
### 1.5.1) Social Integration
|
||||
|
||||
OpenTTD has the ability to load plugins to integrate with Social Platforms like Steam, Discord, etc.
|
||||
|
||||
To enable such integration, the plugin for the specific platform has to be downloaded and stored in the `social_integration` folder.
|
||||
|
||||
See [OpenTTD's website](https://www.openttd.org), under Downloads, for what plugins are available.
|
||||
|
||||
|
||||
### 1.6) OpenTTD directories
|
||||
|
||||
OpenTTD uses its own directory structure to store game data, add-on content etc.
|
||||
|
@ -144,12 +154,19 @@ If you want to compile OpenTTD from source, instructions can be found in [COMPIL
|
|||
- the OpenTTD wiki has a [page listing OpenTTD communities](https://wiki.openttd.org/en/Community/Community) including some in languages other than English
|
||||
|
||||
|
||||
### 2.1) Contributing to OpenTTD
|
||||
### 2.1) Multiplayer games
|
||||
|
||||
You can play OpenTTD with others, either cooperatively or competitively.
|
||||
|
||||
See the [multiplayer documentation](./docs/multiplayer.md) for more details.
|
||||
|
||||
|
||||
### 2.2) Contributing to OpenTTD
|
||||
|
||||
We welcome contributors to OpenTTD. More information for contributors can be found in [CONTRIBUTING.md](./CONTRIBUTING.md)
|
||||
|
||||
|
||||
### 2.2) Reporting bugs
|
||||
### 2.3) Reporting bugs
|
||||
|
||||
Good bug reports are very helpful. We have a [guide to reporting bugs](./CONTRIBUTING.md#bug-reports) to help with this.
|
||||
|
||||
|
@ -157,7 +174,7 @@ Desyncs in multiplayer are complex to debug and report (some software developmen
|
|||
Instructions can be found in [debugging and reporting desyncs](./docs/debugging_desyncs.md).
|
||||
|
||||
|
||||
### 2.3) Translating
|
||||
### 2.4) Translating
|
||||
|
||||
OpenTTD is translated into many languages. Translations are added and updated via the [online translation tool](https://translator.openttd.org).
|
||||
|
||||
|
@ -174,12 +191,29 @@ See `src/3rdparty/squirrel/COPYRIGHT` for the complete license text.
|
|||
The md5 implementation in `src/3rdparty/md5` is licensed under the Zlib license.
|
||||
See the comments in the source files in `src/3rdparty/md5` for the complete license text.
|
||||
|
||||
The implementations of Posix `getaddrinfo` and `getnameinfo` for OS/2 in `src/3rdparty/os2` are distributed partly under the GNU Lesser General Public License 2.1, and partly under the (3-clause) BSD license.
|
||||
The exact licensing terms can be found in `src/3rdparty/os2/getaddrinfo.c` resp. `src/3rdparty/os2/getnameinfo.c`.
|
||||
|
||||
The fmt implementation in `src/3rdparty/fmt` is licensed under the MIT license.
|
||||
See `src/3rdparty/fmt/LICENSE.rst` for the complete license text.
|
||||
|
||||
The nlohmann json implementation in `src/3rdparty/nlohmann` is licensed under the MIT license.
|
||||
See `src/3rdparty/nlohmann/LICENSE.MIT` for the complete license text.
|
||||
|
||||
The OpenGL API in `src/3rdparty/opengl` is licensed under the MIT license.
|
||||
See `src/3rdparty/opengl/khrplatform.h` for the complete license text.
|
||||
|
||||
The catch2 implementation in `src/3rdparty/catch2` is licensed under the Boost Software License, Version 1.0.
|
||||
See `src/3rdparty/catch2/LICENSE.txt` for the complete license text.
|
||||
|
||||
The icu scriptrun implementation in `src/3rdparty/icu` is licensed under the Unicode license.
|
||||
See `src/3rdparty/icu/LICENSE` for the complete license text.
|
||||
|
||||
The monocypher implementation in `src/3rdparty/monocypher` is licensed under the 2-clause BSD and CC-0 license.
|
||||
See `src/3rdparty/monocypher/LICENSE.md` for the complete license text.
|
||||
|
||||
The OpenTTD Social Integration API in `src/3rdparty/openttd_social_integration_api` is licensed under the MIT license.
|
||||
See `src/3rdparty/openttd_social_integration_api/LICENSE` for the complete license text.
|
||||
|
||||
The atomic datatype support detection in `cmake/3rdparty/llvm/CheckAtomic.cmake` is licensed under the Apache 2.0 license.
|
||||
See `cmake/3rdparty/llvm/LICENSE.txt` for the complete license text.
|
||||
|
||||
## 4.0 Credits
|
||||
|
||||
|
|
|
@ -15,6 +15,7 @@ set(AI_COMPAT_SOURCE_FILES
|
|||
${CMAKE_CURRENT_SOURCE_DIR}/compat_12.nut
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/compat_13.nut
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/compat_14.nut
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/compat_15.nut
|
||||
)
|
||||
|
||||
foreach(AI_COMPAT_SOURCE_FILE IN LISTS AI_COMPAT_SOURCE_FILES)
|
||||
|
|
|
@ -4,3 +4,5 @@
|
|||
* OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
* See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
AILog.Info("14 API compatibility in effect.");
|
||||
|
|
|
@ -0,0 +1,6 @@
|
|||
/*
|
||||
* This file is part of OpenTTD.
|
||||
* OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
|
||||
* OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
* See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
|
@ -12,6 +12,7 @@ set(GS_COMPAT_SOURCE_FILES
|
|||
${CMAKE_CURRENT_SOURCE_DIR}/compat_12.nut
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/compat_13.nut
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/compat_14.nut
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/compat_15.nut
|
||||
)
|
||||
|
||||
foreach(GS_COMPAT_SOURCE_FILE IN LISTS GS_COMPAT_SOURCE_FILES)
|
||||
|
|
|
@ -4,3 +4,5 @@
|
|||
* OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
* See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
GSLog.Info("14 API compatibility in effect.");
|
||||
|
|
|
@ -0,0 +1,6 @@
|
|||
/*
|
||||
* This file is part of OpenTTD.
|
||||
* OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
|
||||
* OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
* See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
464
changelog.txt
464
changelog.txt
|
@ -1,3 +1,467 @@
|
|||
14.0-beta3 (2024-02-06)
|
||||
------------------------------------------------------------------------
|
||||
Add: [Script] ScriptTileList_StationCoverage to get station coverage area (#12015)
|
||||
Change: Update OpenTTD TTF fonts to v0.5 (#11994)
|
||||
Fix #12012: Crash when opening orders of another company (#12013)
|
||||
Fix #12001: Use correct valid cargo check for old-style NewGRF town house 3rd cargo set up (#12006)
|
||||
Fix #11997: Adjust economy date by 1920 when loading TTD/TTO savegames (#12007)
|
||||
Fix: Focus hotkey in road/tram stop building window (#12008)
|
||||
Fix: Signals were incorrectly shifted by 1 pixel when selected (#12005)
|
||||
Fix: Missing default vehicles and industry acceptance/production (#12000)
|
||||
Fix: [Script] Avoid overflow in scripts when infinite money is enabled (#12016)
|
||||
Fix: [Script] Don't kill GS misusing GSText (#12009)
|
||||
|
||||
|
||||
14.0-beta2 (2024-02-04)
|
||||
------------------------------------------------------------------------
|
||||
Change: [NewGRF] Improved support for redefining default cargo types (#11719)
|
||||
Fix #11982: Crash when trying to place signals on things other than plain rails (#11977)
|
||||
Fix #11975: Inconsistent behaviour when changing first AI company settings (#11976)
|
||||
Fix #11972: Year cut off in graph windows (#11974)
|
||||
Fix #11968: Crash when opening orders window of new vehicles (#11973)
|
||||
Fix #11966: Monospace text in windows may not have been fully scrollable (#11981)
|
||||
Fix #11802: Made determining water region edge traversability more robust (#11986)
|
||||
Fix: Second colour vehicle-type default liveries were not being updated (#11971)
|
||||
|
||||
|
||||
14.0-beta1 (2024-02-03)
|
||||
------------------------------------------------------------------------
|
||||
Feature: Order option to unbunch vehicles at depot (#11945)
|
||||
Feature: Infinite money mode (#11902)
|
||||
Feature: Setting to disable the loading speed penalty for trains longer than the station (#11682)
|
||||
Feature: Plugin framework for Social Integration with Steam, Discord, GOG, etc (#11628)
|
||||
Feature: Scalable OpenTTD TrueType font made by Zephyris (#11593)
|
||||
Feature: Toyland-specific river graphics (#11523)
|
||||
Feature: Add zoom level buttons to sprite aligner (#11518)
|
||||
Feature: Add shading to river slopes (#11491)
|
||||
Feature: Place cargo icon on cargo filter dropdowns (#11487)
|
||||
Feature: Mode to display timetable in seconds (#11435)
|
||||
Feature: Setting to influence how many minutes a calendar year takes (#11428)
|
||||
Feature: Base graphics can offer parameters for additional settings (#11347)
|
||||
Feature: Sandbox option to lock station ratings at 100% (#11346)
|
||||
Feature: Setting to use real-time "wallclock" as timekeeping units (#11341)
|
||||
Feature: Setting to automatically restart server based on hours played (#11142)
|
||||
Feature: Add config option to set default company secondary colour for new games (#11068)
|
||||
Feature: Transparency option for cost and income indicators (#11001)
|
||||
Feature: Create group of vehicles from manage vehicle list button (#10890)
|
||||
Feature: Show coverage highlight the same as stations when adding waypoints (#10875)
|
||||
Feature: Show the number of industries already built in the Fund New Industry window (#10806)
|
||||
Feature: Add search filter and name text to build waypoint window (#10786)
|
||||
Feature: Setting to disallow level crossings with competitors (#10755)
|
||||
Feature: Opt-in survey when leaving a game (#10719)
|
||||
Feature: Replace buying/selling company shares with hostile takeovers of AI companies (#10709, #10914)
|
||||
Feature: Settings to scale cargo production of towns and industries (#10606)
|
||||
Feature: Separate rail/road and sea/air velocity units, and add knots (#10594)
|
||||
Feature: Region-based pathfinder for ships (#10543)
|
||||
Feature: Filter engine build menu by name and NewGRF extra text (#10519)
|
||||
Feature: Industry directory text filter (#10518)
|
||||
Feature: Ctrl+Click to reset late counter for the entire vehicle group (#10464)
|
||||
Feature: Orientation of rail and road depots can be changed (#9642)
|
||||
Feature: Display help and manuals in-game (#7786)
|
||||
Feature: [NewGRF] Town production effect and multiplier (#11947)
|
||||
Feature: [NewGRF] Randomize direction of rail vehicle on build based on probability callback (#11489)
|
||||
Feature: [NewGRF] Related Act2 objects for airports and airport tiles (#11282)
|
||||
Feature: [NewGRF] Allow higher max speeds for ships (#10734)
|
||||
Feature: [NewGRF] Increase limit of objects/stations/roadstops per NewGRF (#10672)
|
||||
Feature: [NewGRF] Road stops (#10144)
|
||||
Feature: [Script] Goal destination can be updated (#10817)
|
||||
Add: Argument for console command "restart" to use either current or newgame settings (#11962, #11963)
|
||||
Add: {CURRENCY_SHORT} only did k / m suffix. Add bn / tn and make translatable (#11921)
|
||||
Add: Show in multiplayer the amount of hours a game has been unpaused (#11886)
|
||||
Add: Allow loading heightmaps from command-line (#11870)
|
||||
Add: List_[scenario|heightmap] and load_[scenario|height] console commands (#11867)
|
||||
Add: Latvian Lats currency (#11691)
|
||||
Add: Horizontal scroll for script debug log (#11597)
|
||||
Add: GUI options to select sprite font and AA mode for all fonts (#11593)
|
||||
Add: Website button for basesets in Game Options window, the Game Script settings window and AI settings window (#11512)
|
||||
Add: [Emscripten] Support for bootstrapping (#11109)
|
||||
Add: Hotkey to focus town / industry directory filter box (#11030)
|
||||
Add: Maximum number of companies allowed to the client list (#10523)
|
||||
Add: Use specific error message when vehicle cannot go to station/waypoint (#10494)
|
||||
Add: Show NewGRF name in NewGRF-created errors (#10457)
|
||||
Add: Alternative setting for right-click close window option to exclude pinned windows (#10204)
|
||||
Add: Allow autoreplace with same model vehicle (#7729)
|
||||
Add: [NewGRF] Allow inspection of road tiles and airports (#11282, #11323)
|
||||
Add: [NewGRF] Station variable 6B to get extended station id of nearby tiles (#10953)
|
||||
Add: [NewGRF] String code "9A 21" to display force from textstack (#10782)
|
||||
Add: [NewGRF] Station property 1C/1D to set name/classname (#10672)
|
||||
Add: [Script] Optional filter parameter to ScriptXXXList constructors (#11698,#11663)
|
||||
Add: [Script] AI/GS Time Mode to choose between economy (default) and calendar time (#11603)
|
||||
Add: [Script] Allow to set max loan for each company separately (#11224)
|
||||
Add: [Script] GSIndustry.GetConstructionDate() method (#11145)
|
||||
Add: [Script] Game script control of industry production level and news messages (#11141)
|
||||
Add: [Script] GSAsyncMode to set async mode of gamescript commands (#10913)
|
||||
Add: [Script] GSCompanyMode::IsValid and IsDeity, and enforce valid company/deity mode where applicable (#10536, #10529)
|
||||
Add: [Script] Allow GS to found town with random road layout (#10442)
|
||||
Add: [Script] Create own Randomizer per instance (#10349)
|
||||
Change: Better handle different GUI sizes for most windows, and squash inconsistencies between windows
|
||||
Change: Allow configuring AI slots above the current maximum number of competitors (#11961)
|
||||
Change: Forcefully enable prefixing logs with date (#11930)
|
||||
Change: Position error window closer to cursor on large screens (#11923)
|
||||
Change: Only open story-book in center when a GS does it (#11916)
|
||||
Change: Rebrand Cheats as Sandbox Options (#11874)
|
||||
Change: Make smooth-scrolling based on actual time (#11865)
|
||||
Change: Set smooth-scrolling on by default (#11860)
|
||||
Change: Disable building rail infrastructure if train build limit is zero (#11847)
|
||||
Change: Invalidate music volume when restarting music playback on Windows (#11836)
|
||||
Change: Make street lights transparent with houses (#11828)
|
||||
Change: Redesign script debug window (#11782)
|
||||
Change: Reorganize Settings menu items (#11683)
|
||||
Change: Set amount of smoke/sparks to "realistic" by default (#11624)
|
||||
Change: Show a message in livery window if vehicle type has no groups (#11617)
|
||||
Change: Add distinct tooltips for vehicle group colour schemes (#11617)
|
||||
Change: Move colour selection dropdowns to bottom of window (#11617)
|
||||
Change: Support custom transparency remaps with 32bpp blitters (#11616)
|
||||
Change: Make "middle" the default stopping location for trains in platforms (#11605)
|
||||
Change: Scale sprites to requested highest resolution level (#11600)
|
||||
Change: Allow opening multiple script debug windows by holding Ctrl (#11592)
|
||||
Change: Don't show scoring year in high score table (#11546)
|
||||
Change: Revert pressed-button content shifting introduced in r2161 (#11542)
|
||||
Change: Show rating in station list even with no cargo waiting (#11540)
|
||||
Change: Hide unused cargos from vehicle cargo filter (#11533)
|
||||
Change: Don't restart playback when toggling playlist shuffle (#11504)
|
||||
Change: Increase finance window lines (and underlines) with interface scale (#11459)
|
||||
Change: Move baseset missing/corrupted files label to list item (#11455)
|
||||
Change: Add horizontal scrollbar to Industry Directory window (#11434)
|
||||
Change: Improve layout of airport, dock, object, road/tram stop, train station pickers (#11430)
|
||||
Change: Display cargo lists in sorted cargo order (#11383)
|
||||
Change: Link houses production on industry chain graph by TPE_PASSENGERS or TPE_MAIL cargo (#11378)
|
||||
Change: Passenger subsidies are generated for any TPE_PASSENGER cargo type (#11378)
|
||||
Change: Towns generate cargo based on town production effect (#11378)
|
||||
Change: Always allow expanding towns in Scenario Editor to build new roads (#11377)
|
||||
Change: Don't set vehicle on time if timetable not started (#11359)
|
||||
Change: Store station blocked/wires/pylons flags in map (#11337)
|
||||
Change: Recover when possible from crashes during a crash (#11238)
|
||||
Change: Store crash logs in JSON format (#11232)
|
||||
Change: Remove autosave from settings window; it is already in the Game Options (#11218)
|
||||
Change: Enable "Forbid 90 degree turns" setting by default (#11160)
|
||||
Change: Do not allow mixing road/tram types in powered road type list (#11148)
|
||||
Change: Only show platform stopping location in orders when other than default (#11102)
|
||||
Change: Autorail / autoroad tools can start dragging from invalid tiles (#11089)
|
||||
Change: Only allow buying Exclusive Transport Rights when no one has them (#11076)
|
||||
Change: Remove currency code/symbol suffix from language files (#11061)
|
||||
Change: Add separate setting for server sent commands per frame limit (#11023)
|
||||
Change: Cargo flow legend only shows defined cargo (#10872)
|
||||
Change: Use "Via-Destination-Source" as default station cargodist display (#10851)
|
||||
Change: Preserve orders and related settings where possible when moving engines around in a train (#10799)
|
||||
Change: Standardise unit conversions and allow decimal places (#10795)
|
||||
Change: Use separate names for default stations/roadstops (#10786)
|
||||
Change: [MacOS] Require at least 10.15 to run the game (#10745)
|
||||
Change: Hide all variants from UI when (display) parent is hidden (#10708)
|
||||
Change: Split Game options into General, Graphics and Sound tabs (#10674)
|
||||
Change: Extend entity override manager and station spec lists to support 16 bit IDs (#10672)
|
||||
Change: Base autosaves intervals on real time (instead of game time) (#10655)
|
||||
Change: Allow overbuilding station and waypoint tiles (#10618)
|
||||
Change: Use realtime for Linkgraph update settings (#10610)
|
||||
Change: Make tick length 27 milliseconds (#10607)
|
||||
Change: Increase max cargo age and let min cargo payment approach zero (#10596)
|
||||
Change: Show buy company dialog window even when playing in the AI company (#10459)
|
||||
Change: Use HTTPS for content-service connections (#10448)
|
||||
Change: Big UFO disaster targets current location of a random train (#10290)
|
||||
Change: Remove land generator setting from World Generation GUI (#10093)
|
||||
Change: Build signals to the next junction when dragging regardless of the Ctrl state (#9637)
|
||||
Change: Allow dedicated server to use threaded saves (#10787)
|
||||
Change: [NewGRF] Increase vehicle random data from 8 to 16 bits (#10701)
|
||||
Change: [NewGRF] Read Action 3 IDs as extended-bytes for all features (#10672)
|
||||
Change: [NewGRF] Make Action 3 debug messages more consistent (#10672)
|
||||
Change: [NewGRF] Extend callback 161 (engine name) with bit 0x22 for context 'Autoreplace - Vehicles in use' (#10666)
|
||||
Change: [Script] Replace easy/medium/hard values with default value (#11959)
|
||||
Change: [Script] Limit total script ops that can be consumed by a list valuate (#11670)
|
||||
Change: [Script] Allow GS access to ScriptGroup, ScriptGameSettings.IsDisabledVehicleType, more ScriptCompany and more ScriptOrder functions (#10642)
|
||||
Change: [Script] Improve ScriptText validation error messages (#10545)
|
||||
Change: [Script] Restore support of {RAW_STRING} in ScriptText (#10492)
|
||||
Change: [Script] Validate ScriptText parameters type and amount (#10492)
|
||||
Change: [Script] Automate the ScriptObject reference counting (#10492)
|
||||
Change: [Script] Extract params info from GS strings (#10492)
|
||||
Change: [Script] A ScriptText with too many parameters is now a fatal error (#10483)
|
||||
Change: [Script] Log AI/GS Squirrel crashes in white text for readability (#10375)
|
||||
Fix #11918: Houses should only build next to road stops, not any station type (#11919)
|
||||
Fix #11827: Make text layouter aware of ligatures (#11831)
|
||||
Fix #11752: Characters could be repeated when wrapping multi-line text (#11761)
|
||||
Fix #11748: Decreasing service interval value sufficiently would result in it wrapping around (#11749)
|
||||
Fix #11629: Crash when getting the nearest town for rotated airports (#11631)
|
||||
Fix #11516: Adjust window size by interface scale during ReInit (#11517)
|
||||
Fix #11515: Changing interface scale could have unintended effects on zoom level (#11615)
|
||||
Fix #11442: "Default" colour in group colour window is not updated when changing master colour (#11614)
|
||||
Fix #11437: Flipped shorter rail vehicles disappear in windows (#11446)
|
||||
Fix #11413: Incorrect sorting by industry production (#11414)
|
||||
Fix #11407: Don't steal focus from dropdown menus (#11484)
|
||||
Fix #11402: Make string filter locale-aware (#11426)
|
||||
Fix #11329: Don't assert vehicle list length is non-zero when only asked to set string parameter (#11330)
|
||||
Fix #11315: Sort industries and cargoes by name in industry chain window (#11317)
|
||||
Fix #11307: Incorrect GroupStatistics after selling leading wagon (#11311)
|
||||
Fix #11261: Airport menu selectability after closing window on a class with no available airports (#11344)
|
||||
Fix #11230: Sort by button in group list window could be misaligned (#11231)
|
||||
Fix #11215: Assert in NewGRF parameters window (manual parameter mode) (#11217)
|
||||
Fix #11203: [Linux] Crash when editing CJK characters in edit box (#11204)
|
||||
Fix #11180: Aircraft crashes could point to the wrong tile (#11184)
|
||||
Fix #11164: Don't create duplicate town names when using 'Many random towns' in the scenario editor (#11165)
|
||||
Fix #11162: Second company colour was not consistently applied to articulated vehicles (#11163)
|
||||
Fix #11115: Focus the abandon game/exit game windows (#11125)
|
||||
Fix #11096: Increase priority of error and confirmation windows (#11104)
|
||||
Fix #11087: Disable base graphics/sound dropdown outside main menu (#11091)
|
||||
Fix #11054: Prevent translation of currency codes (#11061)
|
||||
Fix #11026: Use real engine name instead of default name for filtering (#11033)
|
||||
Fix #10982: No help text for gamelog command (#10984)
|
||||
Fix #10880: Crash in object window due to incorrect parameter order (#10881)
|
||||
Fix #10868: Crash when Script tries to load large savegame data (#11029)
|
||||
Fix #10811: Allow dragging vehicle in depot to any free row (#11508)
|
||||
Fix #10660: Sprite Font scale affected by viewport zoom level limits (#10668)
|
||||
Fix #10619: Crash loading linkgraph for older savegames (#10620)
|
||||
Fix #10600: 'Replace Vehicles' didn't show numbers >999 (#10680)
|
||||
Fix #10578: Allow to select any version of AI/GS from GUI (#10604)
|
||||
Fix #10522: Link graph tooltip vertical lines were not handled correctly (#10524)
|
||||
Fix #10511: Don't search for depot every tick if one cannot be found (#11548)
|
||||
Fix #10478: Clarify airport noise control setting texts (#11169)
|
||||
Fix #10452: Prevent long stalls during river generation (#11544)
|
||||
Fix #10430: Display chain window causing assert (#10431)
|
||||
Fix #10343: Don't extend town-disallowed roadtypes (#10347)
|
||||
Fix #10251: [MacOS] Screen looks blue-ish when using newer SDKs (#11207)
|
||||
Fix #10222: Adjust line drawing algorithm (#10491)
|
||||
Fix #10131: Actually cancel downloads when pressing cancel (#10485)
|
||||
Fix #10118: Cycle through current signal group, not just path signals (#11798)
|
||||
Fix #10439: [Script] Validate story page button colour, flags, cursor and vehicle type (#11892)
|
||||
Fix #10438: [Script] Validate story page element type for ScriptStoryPage::NewElement (#11888)
|
||||
Fix #9865: Removing files with the console always failed
|
||||
Fix #9810: Rebuilding a through road stop costs money (#9852)
|
||||
Fix #9722: Crash when pressing hotkeys early in world generation (#11858)
|
||||
Fix #9697: Limit the default width of the Online Players window (#11936)
|
||||
Fix #9642: Keep infrastructure totals when overbuilding road depots (#11229)
|
||||
Fix #9545: Crash when all cargo types are disabled (#11432)
|
||||
Fix #8846: When upgrading NewGRF presets, copy NewGRF parameters only if the NewGRF are compatible (#11348)
|
||||
Fix #8253: Improve profit graph when having lots of money (#11915)
|
||||
Fix #6377: Two tarballs with the same folder in them were considered as one (#11855)
|
||||
Fix #5713: Ships could be sent to unreachable depots (#11768)
|
||||
Fix #4575: Use Latin 'l' in English translation of zloty (#11090)
|
||||
Fix #4415: Land info build date is also renovation date (#11759)
|
||||
Fix: Display rank correctly with more than 15 companies in a league table (#11940)
|
||||
Fix: Extra refit button when train/RV is in a depot (#11904)
|
||||
Fix: Update server listing as offline when unexpected disconnect during refresh (#11891)
|
||||
Fix: Horizontal scale of framerate window switched excessively (#11813)
|
||||
Fix: [Linux] Various issues with resolutions and fullscreen in multi-display setups (#11778, #11779)
|
||||
Fix: Build button text when train purchase window using "Engines" filter (#11755)
|
||||
Fix: One-way state remained after removing road from road and tram tile (#11745)
|
||||
Fix: Draw video driver info at the correct size and text wrap (#10716)
|
||||
Fix: Language genders could not be applied to SCC_INDUSTRY_NAME (#11697)
|
||||
Fix: Spurious cancellations of HTTP content downloads (#11668)
|
||||
Fix: Calculation of initial engine age was inaccurate (#11660)
|
||||
Fix: Prevent underflow if engine base life is less than 8 years (#11635)
|
||||
Fix: Changing default livery did not propagate to group liveries (#11633)
|
||||
Fix: Window width/height was doubly-scaled with automatic DPI switch (#11598)
|
||||
Fix: Don't crash when saving a crashlog save with no main window open (#11586)
|
||||
Fix: Prevent overflow when calculating max town noise (#11564)
|
||||
Fix: Deleting towns did not check for waypoints referencing the town (#11513)
|
||||
Fix: Invalidate playlist window when (un)shuffling playlist (#11504)
|
||||
Fix: Restore original cargo legend 'blob' dimensions (#11480)
|
||||
Fix: Extmidi did not move on to next song after playing ends (#11469)
|
||||
Fix: Server password length in the UI was unnecessarily limited (#11408)
|
||||
Fix: OpenTTD can fail to exit on an error due to mutex locks in threads (#11398)
|
||||
Fix: Scale minimum width for server name by interface scale (#11381)
|
||||
Fix: Server connection was not closed when relay window was closed (#11366)
|
||||
Fix: Upgrading NewGRF presets could result in incomplete display of NewGRF parameters until restart (#11348)
|
||||
Fix: Check for engine variant loops during NewGRF initialization (#11343)
|
||||
Fix: Don't allow industries to produce invalid cargo (#11314)
|
||||
Fix: Also apply cargo filters on shared groups in vehicle listing (#11294)
|
||||
Fix: Only count distance traveled in vehicles for cargo payment (#11283)
|
||||
Fix: Base cargo payment on load/unload tile, instead of station sign location (#11281)
|
||||
Fix: Crash when opening a damaged base-graphics (#11275)
|
||||
Fix: Trivial autoreplace of mixed cargo articulated engines (#11253)
|
||||
Fix: [Emscripten] Config not saved on exit (#11248)
|
||||
Fix: Inaccurate waiting cargo total in station window when using cargodist (#11213)
|
||||
Fix: No fast forward in network was ensured only from GUI side (#11206)
|
||||
Fix: Crash when not passing command-line parameter for -n (#11153)
|
||||
Fix: [Bootstrap] Don't crash when failing to connect to content server (#11122)
|
||||
Fix: Crash when failing to load a game into a dedicated server at startup (#11021)
|
||||
Fix: Don't allow changing settings over the network that are marked as local settings (#11009)
|
||||
Fix: Move no_http_content_downloads and use_relay_service to private settings (#10762)
|
||||
Fix: Extra viewport could not be scrolled with right-click-close (#10644)
|
||||
Fix: Specify units for value of share trading age setting (#10612)
|
||||
Fix: Road type is not available before its introduction date (#10585)
|
||||
Fix: Do not update a RV's Z-position when stationary while turning (#10570)
|
||||
Fix: Don't (briefly) switch from title-only playlist on menu screen (#10553)
|
||||
Fix: Reset content download progress to zero if falling back to TCP (#10485)
|
||||
Fix: Make script goals work with the whole range of ClientIDs (#10435)
|
||||
Fix: [NewGRF] Tile slope missing from road stops varact2 variable 0x42 (#11373)
|
||||
Fix: [NewGRF] House class mappings were not reset between games (#11279)
|
||||
Fix: [NewGRF] Profile didn't stop if there were no events yet (#10816)
|
||||
Fix: [NewGRF] Support more than 256 stations/waypoints/roadstops per class (#10793)
|
||||
Fix: [NewGRF] Var68 for station and roadstop was broken (#10784)
|
||||
Fix: [NewGRF] Object and road stop ignore property handlers (#10525)
|
||||
Fix: [Script] Apply random deviation to settings only at script start (#11944)
|
||||
Fix: [Script] Improve ScriptText validation (#11721)
|
||||
Fix: [Script] GSAdmin.Send() could generate invalid JSON (#11250)
|
||||
Fix: [Script] Crash if squirrel compatibility scripts cannot be parsed (#11589)
|
||||
Fix: [Script] Don't list unavailable road types for game scripts (#10585)
|
||||
Fix: [Script] Game scripts were able to build with non-existing road types (#10539)
|
||||
Fix: [Script] Inconsistent precondition failure return values (#10533)
|
||||
Fix: [Script] Crash when companies disappear (#10529)
|
||||
Fix: [Script] ScriptBase::Rand() return value could return negative values (#10443)
|
||||
Fix: [Script] Incorrect value for GOAL_INVALID (#10436)
|
||||
Fix: [Script] Extend Script::IsValidVehicle to check for primary vehicles (#10386)
|
||||
Remove: "generation_seed" from config, as it was a write-only value (#11927)
|
||||
Remove: Debug redirect over network (#11776)
|
||||
Remove: Officially mark Vista as no longer supported (#11531)
|
||||
Remove: OS/2 and SunOS ports (#11018, #11210)
|
||||
Remove: Obsolete NewGRF text unprinting (#10884)
|
||||
Remove: [Script] CONFIG_RANDOM from AddSetting flags (#11942)
|
||||
|
||||
|
||||
13.4 (2023-07-29)
|
||||
------------------------------------------------------------------------
|
||||
Fix: Setting tree lines drawn incorrectly for RTL languages (#11070)
|
||||
Fix #11043: Don't choose toolbar dropdown option if focus is lost (#11044)
|
||||
Fix #10917: Pay loan interest before generating statistics (#11040)
|
||||
Fix #11016: Use after free in network invalid packet error path (#11022)
|
||||
Fix #10987: Double-close of dropdown stopped land-info tool working as default (#11000)
|
||||
|
||||
|
||||
13.3 (2023-06-11)
|
||||
------------------------------------------------------------------------
|
||||
Fix: [Win32] use full monitor resolution for fullscreen (#10985)
|
||||
|
||||
|
||||
13.2 (2023-06-10)
|
||||
------------------------------------------------------------------------
|
||||
Change: [Win32] position window in center of workspace of primary display (#10942)
|
||||
Change: Automatically disable hardware acceleration when GPU driver crashed the game last attempt (#10928)
|
||||
Change: [Linux] Default scroll mode to non-mouse-lock (#10920)
|
||||
Change: Include font style in font name for Freetype (#10879)
|
||||
Fix: Don't restore backed up vehicle name if it's no longer unique (#10979)
|
||||
Fix #10975: Train name wrongly marked as unique when joining trains (#10976)
|
||||
Fix: Crash when not even a single row fits for dropdowns on low resolution screens (#10934)
|
||||
Fix: Crash with tooltip on low resolution screens (#10933)
|
||||
Fix: Crash when window can't be placed on low resolution screens (#10932)
|
||||
Fix #10502: Apply engine refit before attaching free wagons (#10926)
|
||||
Fix: Wayland crash on startup due to Pango also using FontConfig (#10916)
|
||||
Fix: When syncing width of GUI items, take padding into account (#10915)
|
||||
Fix: Make dropdowns self-close when losing focus (#10912)
|
||||
Fix: Land info window maximum width was not scaled (#10894)
|
||||
Fix: Check max member count in squirrel classes (#10883)
|
||||
Fix: Ask FontConfig for the face index when opening fonts (#10878)
|
||||
Fix #10831: Level crossing parts left barred after crossing tile removal (#10874)
|
||||
Fix: Rail waypoint selection window not closed when parent windows closed (#10873)
|
||||
Fix #10846: [Script] Crash on trying to allocate an excessively large array (#10848)
|
||||
Fix: [Win32] Text line breaking did not properly handle punctuation characters (#10775)
|
||||
Fix: [Emscripten] Crash when saving games (#10758)
|
||||
Fix: [Win32] Wrong multi-line text layout due to incorrect whitespace handling (#10752)
|
||||
Fix #10741: Rail platforms left partially reserved after train crash (#10751)
|
||||
Fix: Shaded engines in purchase list incorrectly shaded (#10736)
|
||||
Fix #10735: [NewGRF] {POP_COLOUR} fails if string is drawn with extra flags (#10736)
|
||||
Fix #8177: Ships with max speed overflow to near-zero speed (#10695)
|
||||
Fix #10289: Don't silently fail when setting timetable start dates (#10690)
|
||||
Fix #8302: Improve "Maintenance intervals are in percents" helptext (#10686)
|
||||
Fix #10665: "No vehicles are available yet" message did not appear correctly on non-temperate climates (#10673)
|
||||
Fix #10630: Don't allow shifting service date earlier than year 0 (#10643)
|
||||
Fix #10637, #10638: Incorrect water infrastructure totals when building certain object types (#10639, #10640)
|
||||
Fix: Abort loading savegame if road vehicle is on invalid road type (#10622)
|
||||
|
||||
|
||||
13.1 (2023-04-10)
|
||||
------------------------------------------------------------------------
|
||||
Add: [NewGRF] Engine name callback for nested variants. (#10399)
|
||||
Fix: Improve main toolbar tooltips (#10616)
|
||||
Fix: [NewGRF] Additional validation for Action3 (+others) (#10601)
|
||||
Fix: Clear button for editbox didn't take account of padding (#10583)
|
||||
Fix: [Script] Access to enum/consts defined outside of main.nut (#10573)
|
||||
Fix #10568: Bogus warning when loading a save with a NewGRFs on dedicated servers (#10572)
|
||||
Fix #10554: Crash when scrolling in the autoreplace window with collapsed variants (#10555)
|
||||
Fix: Network server highlight invisible with RTL languages. (#10551)
|
||||
Fix: Client name was not being used as company manager name (#10535)
|
||||
Fix: Prevent road vehicles on crossing from crashing into the side of a train (#10496)
|
||||
Fix #10477: [macOS] Calculation for window sizes when using custom fonts was being rounded incorrectly (#10489)
|
||||
Fix #10486: Crash in debug window when GS started before AIs (#10487)
|
||||
Fix #10469: [Script] Negative numbers in League Table window were sorted incorrectly (#10471)
|
||||
Fix #10465: Crash on timeout if user never enters a password for server (#10466)
|
||||
Fix #10280, #10461: Crash on opening town windows as a spectator (#10462)
|
||||
Fix #10059: Script config values stored in the config file could cause crashes (#10444)
|
||||
|
||||
|
||||
13.0 (2023-02-05)
|
||||
------------------------------------------------------------------------
|
||||
Change #10077: Make maximum loan a positive multiple of the loan interval (#10355)
|
||||
Fix #10361: [Script] Don't try to give saved data to a dead script (#10433)
|
||||
Fix #10419: Water infrastructure accounting when building ship depots and docks (#10432)
|
||||
|
||||
|
||||
13.0-RC2 (2023-01-28)
|
||||
------------------------------------------------------------------------
|
||||
Feature: Press Ctrl to build a diagonal area of trees (#10342)
|
||||
Feature: Set a custom number of industries in map generation window (#10340)
|
||||
Change: Display font status as aa/noaa instead of true/false (#10352)
|
||||
Fix: [Script] Improved API documentation for scripts (#10413, #10412)
|
||||
Fix #10255: Reduce basic thickness of linkgraph GUI lines (#10410)
|
||||
Fix #10220: Don't select unselectable engine as default (#10404)
|
||||
Fix #10395: When loading old saves, don't forcibly bar level crossings (#10400)
|
||||
Fix #10377: Bad sorting of rail vehicles when primary variant is missing (#10378)
|
||||
Fix #10368: Server restarting game caused clients to hit assertion (#10369)
|
||||
Fix #10362: NewGRF bridges without speed limits (#10365)
|
||||
Fix #10363: CargoDist setting helptext shouldn't suggest symmetric distribution for diamonds in subtropic (#10364)
|
||||
Fix: [Script] Switch to OWNER_TOWN prevented OWNER_DEITY test during industry prospecting (#10360)
|
||||
Fix #10009: Bad overflow protection when taking out loans (#10359)
|
||||
Fix #9865: Removing files with the console always failed (#10357)
|
||||
Fix #10057: FallbackParagraphLayout fails to properly wrap (#10356)
|
||||
Fix #10177: Company list password padlock showed after switching to single player (#10354)
|
||||
Fix: Various Wide River issues (#10348)
|
||||
Fix: Link variants to parents when finalising engines (#10346)
|
||||
Fix #10333: Only show industry prospecting errors to local company (#10338)
|
||||
Fix #10335: Set initial scrollbar count for object GUI (#10336)
|
||||
Fix #10331: Starting new company during load must happen after AI start (#10332)
|
||||
Fix #10309: [SDL] Uninitialized width and height when turning off full screen (#10328)
|
||||
Fix #10032: Capacities of articulated vehicles in build window (#10326)
|
||||
Fix: Improve handling of corrupt NewGRF or image files (#10321, #10316)
|
||||
Fix: [NewGRF] Don't assume engclass 2 should be elrail (#10315)
|
||||
Fix: [Script] AIGroup.GetProfitLastYear could get values different than those displayed in GUI (#10227)
|
||||
Fix #10304: [Scripts] Don't start GS in intro game (#10305)
|
||||
Fix: [Script] Copy compat files for version 13 (#10303)
|
||||
|
||||
|
||||
13.0-RC1 (2023-01-01)
|
||||
------------------------------------------------------------------------
|
||||
Feature: 'font' console command to configure fonts within game (#10278)
|
||||
Feature: Ctrl-click to bulk edit timetable speeds/waiting times (#10265)
|
||||
Feature: [NewGRF] Vehicle variants in expandable purchase list (#10220)
|
||||
Feature: Expand all towns in the scenario editor (#10215)
|
||||
Add: [NewGRF] Slope-aware and roadtype-specific one-way sprites (#10282)
|
||||
Change: Display text files in black (#10291)
|
||||
Change: Make vehicle list dropdown buttons resize to fit strings (#10286)
|
||||
Change: [NewGRF] Support flipping shorter engines without explicit support (#10262)
|
||||
Change: Separate ground sprite from foundation sprite offsets (#10256)
|
||||
Change: Vertically centre sprite font relative to TrueType font (#10254)
|
||||
Change: [macOS] Set minimum macOS version to 10.13 (#10253)
|
||||
Change: Use lowered not disabled widget for current vehicle details tab (#10252)
|
||||
Change: Various improvements to NewGRF sprite aligner (#10249)
|
||||
Change: reset_engines console command now rerandomises introduction dates and reliability (#10220)
|
||||
Change: Show error message on failed industry prospecting (#10202)
|
||||
Fix: Local authority window rating list height ignored icon sizes (#10285)
|
||||
Fix #10150: Town signs could be truncated when using custom fonts (#10283)
|
||||
Fix #8971: Resize QueryStrings with interface scale change (#10281)
|
||||
Fix #10274: Crash when rescanning scripts with GS selected (#10276)
|
||||
Fix #10151: Use smaller padding for signs (#10272)
|
||||
Fix #10263: [Script] Restore tile validation for commands (#10269)
|
||||
Fix: Missing scrollbar for rail/roadtype dropdowns (#10264)
|
||||
Fix #10260: Incorrect rect height drawing image in vehicle details (#10261)
|
||||
Fix #10257: Incorrect catenary position on sloped bridge heads (#10258)
|
||||
Fix: Vertically centre chat prompt (#10250)
|
||||
Fix #10214: League and graph buttons in toolbar did not have a default action (#10246)
|
||||
Fix #10242: Allow a space for text shadow when clipping text (#10243)
|
||||
Fix #10206: Fully disable scripts in intro game (#10241)
|
||||
Fix #10218: Don't try to create river tiles along incorrect slopes (#10235)
|
||||
Fix #10208: [NewGRF] Allow using a specific underlay for road/tram tunnels (#10233)
|
||||
Fix #10224: Don't change fast-forward mode while saving (#10230)
|
||||
Fix #10147: Sound effect volume slider no longer set volume (#10228)
|
||||
Fix #10223: Crash when vehicle cloning fails on order cloning (#10225)
|
||||
Fix: Maximum space for engine preview image was never scaled (#10219)
|
||||
Fix #10216: Crash when upgrading savegame with crashed vehicles (#10217)
|
||||
Fix #10212: [Script] Nested ScriptAccounting scopes not restored properly (#10213)
|
||||
Fix #10114: Incorrect drag-highlight position with non-power-of-2 scaling (#10211)
|
||||
Fix #10198: Rearrange Intro GUI to make button rows narrower (#10203)
|
||||
Fix: Missing extra padding when drawing tooltip text (#10201)
|
||||
Fix: Bad alignment of button icons when using the original baseset (#10200)
|
||||
Fix: Signal icons incorrectly positioned in UI (#10199)
|
||||
Fix #10021: Object GUI resized when switching between different objects (#10196)
|
||||
Fix #9720: Delay start of GS/AI to after loading of savegame (#9745)
|
||||
|
||||
|
||||
13.0-beta2 (2022-11-27)
|
||||
------------------------------------------------------------------------
|
||||
Feature: Allow AI/GS to be fully modified in scenario editor (#10152)
|
||||
|
|
|
@ -1,3 +1,11 @@
|
|||
#
|
||||
# This was originally part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
||||
# See (https://llvm.org/)LICENSE.txt for license information.
|
||||
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||
#
|
||||
# Modifications have been made to suit building OpenTTD.
|
||||
#
|
||||
|
||||
# atomic builtins are required for threading support.
|
||||
|
||||
INCLUDE(CheckCXXSourceCompiles)
|
||||
|
@ -48,6 +56,8 @@ else()
|
|||
check_working_cxx_atomics(HAVE_CXX_ATOMICS_WITHOUT_LIB)
|
||||
# If not, check if the library exists, and atomics work with it.
|
||||
if(NOT HAVE_CXX_ATOMICS_WITHOUT_LIB)
|
||||
# check_library_exists requires the C-compiler as the atomic functions are built-in declared.
|
||||
enable_language(C)
|
||||
check_library_exists(atomic __atomic_fetch_add_4 "" HAVE_LIBATOMIC)
|
||||
if(HAVE_LIBATOMIC)
|
||||
list(APPEND CMAKE_REQUIRED_LIBRARIES "atomic")
|
||||
|
@ -69,6 +79,8 @@ else()
|
|||
check_working_cxx_atomics64(HAVE_CXX_ATOMICS64_WITHOUT_LIB)
|
||||
# If not, check if the library exists, and atomics work with it.
|
||||
if(NOT HAVE_CXX_ATOMICS64_WITHOUT_LIB)
|
||||
# check_library_exists requires the C-compiler as the atomic functions are built-in declared.
|
||||
enable_language(C)
|
||||
check_library_exists(atomic __atomic_load_8 "" HAVE_CXX_LIBATOMICS64)
|
||||
if(HAVE_CXX_LIBATOMICS64)
|
||||
list(APPEND CMAKE_REQUIRED_LIBRARIES "atomic")
|
||||
|
@ -83,5 +95,5 @@ else()
|
|||
endif()
|
||||
|
||||
if(HAVE_CXX_ATOMICS_WITH_LIB OR HAVE_CXX_ATOMICS64_WITH_LIB)
|
||||
target_link_libraries(openttd atomic)
|
||||
target_link_libraries(openttd_lib atomic)
|
||||
endif()
|
|
@ -0,0 +1,279 @@
|
|||
==============================================================================
|
||||
The LLVM Project is under the Apache License v2.0 with LLVM Exceptions:
|
||||
==============================================================================
|
||||
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
APPENDIX: How to apply the Apache License to your work.
|
||||
|
||||
To apply the Apache License to your work, attach the following
|
||||
boilerplate notice, with the fields enclosed by brackets "[]"
|
||||
replaced with your own identifying information. (Don't include
|
||||
the brackets!) The text should be enclosed in the appropriate
|
||||
comment syntax for the file format. We also recommend that a
|
||||
file or class name and description of purpose be included on the
|
||||
same "printed page" as the copyright notice for easier
|
||||
identification within third-party archives.
|
||||
|
||||
Copyright [yyyy] [name of copyright owner]
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
|
||||
---- LLVM Exceptions to the Apache 2.0 License ----
|
||||
|
||||
As an exception, if, as a result of your compiling your source code, portions
|
||||
of this Software are embedded into an Object form of such source code, you
|
||||
may redistribute such embedded portions in such Object form without complying
|
||||
with the conditions of Sections 4(a), 4(b) and 4(d) of the License.
|
||||
|
||||
In addition, if you combine or link compiled forms of this Software with
|
||||
software that is licensed under the GPLv2 ("Combined Software") and if a
|
||||
court of competent jurisdiction determines that the patent provision (Section
|
||||
3), the indemnity provision (Section 9) or other Section of the License
|
||||
conflicts with the conditions of the GPLv2, you may retroactively and
|
||||
prospectively choose to deem waived or otherwise exclude such Section(s) of
|
||||
the License, but only in their entirety and only with respect to the Combined
|
||||
Software.
|
||||
|
||||
==============================================================================
|
||||
Software from third parties included in the LLVM Project:
|
||||
==============================================================================
|
||||
The LLVM Project contains third party software which is under different license
|
||||
terms. All such code will be identified clearly using at least one of two
|
||||
mechanisms:
|
||||
1) It will be in a separate directory tree with its own `LICENSE.txt` or
|
||||
`LICENSE` file at the top containing the specific license and restrictions
|
||||
which apply to that software, or
|
||||
2) It will contain specific license and restriction terms at the top of every
|
||||
file.
|
||||
|
||||
==============================================================================
|
||||
Legacy LLVM License (https://llvm.org/docs/DeveloperPolicy.html#legacy):
|
||||
==============================================================================
|
||||
University of Illinois/NCSA
|
||||
Open Source License
|
||||
|
||||
Copyright (c) 2003-2019 University of Illinois at Urbana-Champaign.
|
||||
All rights reserved.
|
||||
|
||||
Developed by:
|
||||
|
||||
LLVM Team
|
||||
|
||||
University of Illinois at Urbana-Champaign
|
||||
|
||||
http://llvm.org
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
this software and associated documentation files (the "Software"), to deal with
|
||||
the Software without restriction, including without limitation the rights to
|
||||
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
|
||||
of the Software, and to permit persons to whom the Software is furnished to do
|
||||
so, subject to the following conditions:
|
||||
|
||||
* Redistributions of source code must retain the above copyright notice,
|
||||
this list of conditions and the following disclaimers.
|
||||
|
||||
* Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimers in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
|
||||
* Neither the names of the LLVM Team, University of Illinois at
|
||||
Urbana-Champaign, nor the names of its contributors may be used to
|
||||
endorse or promote products derived from this Software without specific
|
||||
prior written permission.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
CONTRIBUTORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS WITH THE
|
||||
SOFTWARE.
|
||||
|
|
@ -0,0 +1,206 @@
|
|||
# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
|
||||
# file Copyright.txt or https://cmake.org/licensing for details.
|
||||
|
||||
#[=======================================================================[.rst:
|
||||
Catch
|
||||
-----
|
||||
|
||||
This module defines a function to help use the Catch test framework.
|
||||
|
||||
The :command:`catch_discover_tests` discovers tests by asking the compiled test
|
||||
executable to enumerate its tests. This does not require CMake to be re-run
|
||||
when tests change. However, it may not work in a cross-compiling environment,
|
||||
and setting test properties is less convenient.
|
||||
|
||||
This command is intended to replace use of :command:`add_test` to register
|
||||
tests, and will create a separate CTest test for each Catch test case. Note
|
||||
that this is in some cases less efficient, as common set-up and tear-down logic
|
||||
cannot be shared by multiple test cases executing in the same instance.
|
||||
However, it provides more fine-grained pass/fail information to CTest, which is
|
||||
usually considered as more beneficial. By default, the CTest test name is the
|
||||
same as the Catch name; see also ``TEST_PREFIX`` and ``TEST_SUFFIX``.
|
||||
|
||||
.. command:: catch_discover_tests
|
||||
|
||||
Automatically add tests with CTest by querying the compiled test executable
|
||||
for available tests::
|
||||
|
||||
catch_discover_tests(target
|
||||
[TEST_SPEC arg1...]
|
||||
[EXTRA_ARGS arg1...]
|
||||
[WORKING_DIRECTORY dir]
|
||||
[TEST_PREFIX prefix]
|
||||
[TEST_SUFFIX suffix]
|
||||
[PROPERTIES name1 value1...]
|
||||
[TEST_LIST var]
|
||||
[REPORTER reporter]
|
||||
[OUTPUT_DIR dir]
|
||||
[OUTPUT_PREFIX prefix}
|
||||
[OUTPUT_SUFFIX suffix]
|
||||
)
|
||||
|
||||
``catch_discover_tests`` sets up a post-build command on the test executable
|
||||
that generates the list of tests by parsing the output from running the test
|
||||
with the ``--list-test-names-only`` argument. This ensures that the full
|
||||
list of tests is obtained. Since test discovery occurs at build time, it is
|
||||
not necessary to re-run CMake when the list of tests changes.
|
||||
However, it requires that :prop_tgt:`CROSSCOMPILING_EMULATOR` is properly set
|
||||
in order to function in a cross-compiling environment.
|
||||
|
||||
Additionally, setting properties on tests is somewhat less convenient, since
|
||||
the tests are not available at CMake time. Additional test properties may be
|
||||
assigned to the set of tests as a whole using the ``PROPERTIES`` option. If
|
||||
more fine-grained test control is needed, custom content may be provided
|
||||
through an external CTest script using the :prop_dir:`TEST_INCLUDE_FILES`
|
||||
directory property. The set of discovered tests is made accessible to such a
|
||||
script via the ``<target>_TESTS`` variable.
|
||||
|
||||
The options are:
|
||||
|
||||
``target``
|
||||
Specifies the Catch executable, which must be a known CMake executable
|
||||
target. CMake will substitute the location of the built executable when
|
||||
running the test.
|
||||
|
||||
``TEST_SPEC arg1...``
|
||||
Specifies test cases, wildcarded test cases, tags and tag expressions to
|
||||
pass to the Catch executable with the ``--list-test-names-only`` argument.
|
||||
|
||||
``EXTRA_ARGS arg1...``
|
||||
Any extra arguments to pass on the command line to each test case.
|
||||
|
||||
``WORKING_DIRECTORY dir``
|
||||
Specifies the directory in which to run the discovered test cases. If this
|
||||
option is not provided, the current binary directory is used.
|
||||
|
||||
``TEST_PREFIX prefix``
|
||||
Specifies a ``prefix`` to be prepended to the name of each discovered test
|
||||
case. This can be useful when the same test executable is being used in
|
||||
multiple calls to ``catch_discover_tests()`` but with different
|
||||
``TEST_SPEC`` or ``EXTRA_ARGS``.
|
||||
|
||||
``TEST_SUFFIX suffix``
|
||||
Similar to ``TEST_PREFIX`` except the ``suffix`` is appended to the name of
|
||||
every discovered test case. Both ``TEST_PREFIX`` and ``TEST_SUFFIX`` may
|
||||
be specified.
|
||||
|
||||
``PROPERTIES name1 value1...``
|
||||
Specifies additional properties to be set on all tests discovered by this
|
||||
invocation of ``catch_discover_tests``.
|
||||
|
||||
``TEST_LIST var``
|
||||
Make the list of tests available in the variable ``var``, rather than the
|
||||
default ``<target>_TESTS``. This can be useful when the same test
|
||||
executable is being used in multiple calls to ``catch_discover_tests()``.
|
||||
Note that this variable is only available in CTest.
|
||||
|
||||
``REPORTER reporter``
|
||||
Use the specified reporter when running the test case. The reporter will
|
||||
be passed to the Catch executable as ``--reporter reporter``.
|
||||
|
||||
``OUTPUT_DIR dir``
|
||||
If specified, the parameter is passed along as
|
||||
``--out dir/<test_name>`` to Catch executable. The actual file name is the
|
||||
same as the test name. This should be used instead of
|
||||
``EXTRA_ARGS --out foo`` to avoid race conditions writing the result output
|
||||
when using parallel test execution.
|
||||
|
||||
``OUTPUT_PREFIX prefix``
|
||||
May be used in conjunction with ``OUTPUT_DIR``.
|
||||
If specified, ``prefix`` is added to each output file name, like so
|
||||
``--out dir/prefix<test_name>``.
|
||||
|
||||
``OUTPUT_SUFFIX suffix``
|
||||
May be used in conjunction with ``OUTPUT_DIR``.
|
||||
If specified, ``suffix`` is added to each output file name, like so
|
||||
``--out dir/<test_name>suffix``. This can be used to add a file extension to
|
||||
the output e.g. ".xml".
|
||||
|
||||
#]=======================================================================]
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
function(catch_discover_tests TARGET)
|
||||
cmake_parse_arguments(
|
||||
""
|
||||
""
|
||||
"TEST_PREFIX;TEST_SUFFIX;WORKING_DIRECTORY;TEST_LIST;REPORTER;OUTPUT_DIR;OUTPUT_PREFIX;OUTPUT_SUFFIX"
|
||||
"TEST_SPEC;EXTRA_ARGS;PROPERTIES"
|
||||
${ARGN}
|
||||
)
|
||||
|
||||
if(NOT _WORKING_DIRECTORY)
|
||||
set(_WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}")
|
||||
endif()
|
||||
if(NOT _TEST_LIST)
|
||||
set(_TEST_LIST ${TARGET}_TESTS)
|
||||
endif()
|
||||
|
||||
## Generate a unique name based on the extra arguments
|
||||
string(SHA1 args_hash "${_TEST_SPEC} ${_EXTRA_ARGS} ${_REPORTER} ${_OUTPUT_DIR} ${_OUTPUT_PREFIX} ${_OUTPUT_SUFFIX}")
|
||||
string(SUBSTRING ${args_hash} 0 7 args_hash)
|
||||
|
||||
# Define rule to generate test list for aforementioned test executable
|
||||
set(ctest_include_file "${CMAKE_CURRENT_BINARY_DIR}/${TARGET}_include-${args_hash}.cmake")
|
||||
set(ctest_tests_file "${CMAKE_CURRENT_BINARY_DIR}/${TARGET}_tests-${args_hash}.cmake")
|
||||
get_property(crosscompiling_emulator
|
||||
TARGET ${TARGET}
|
||||
PROPERTY CROSSCOMPILING_EMULATOR
|
||||
)
|
||||
add_custom_command(
|
||||
TARGET ${TARGET} POST_BUILD
|
||||
BYPRODUCTS "${ctest_tests_file}"
|
||||
COMMAND "${CMAKE_COMMAND}"
|
||||
-D "TEST_TARGET=${TARGET}"
|
||||
-D "TEST_EXECUTABLE=$<TARGET_FILE:${TARGET}>"
|
||||
-D "TEST_EXECUTOR=${crosscompiling_emulator}"
|
||||
-D "TEST_WORKING_DIR=${_WORKING_DIRECTORY}"
|
||||
-D "TEST_SPEC=${_TEST_SPEC}"
|
||||
-D "TEST_EXTRA_ARGS=${_EXTRA_ARGS}"
|
||||
-D "TEST_PROPERTIES=${_PROPERTIES}"
|
||||
-D "TEST_PREFIX=${_TEST_PREFIX}"
|
||||
-D "TEST_SUFFIX=${_TEST_SUFFIX}"
|
||||
-D "TEST_LIST=${_TEST_LIST}"
|
||||
-D "TEST_REPORTER=${_REPORTER}"
|
||||
-D "TEST_OUTPUT_DIR=${_OUTPUT_DIR}"
|
||||
-D "TEST_OUTPUT_PREFIX=${_OUTPUT_PREFIX}"
|
||||
-D "TEST_OUTPUT_SUFFIX=${_OUTPUT_SUFFIX}"
|
||||
-D "CTEST_FILE=${ctest_tests_file}"
|
||||
-P "${_CATCH_DISCOVER_TESTS_SCRIPT}"
|
||||
VERBATIM
|
||||
)
|
||||
|
||||
file(WRITE "${ctest_include_file}"
|
||||
"if(EXISTS \"${ctest_tests_file}\")\n"
|
||||
" include(\"${ctest_tests_file}\")\n"
|
||||
"else()\n"
|
||||
" add_test(${TARGET}_NOT_BUILT-${args_hash} ${TARGET}_NOT_BUILT-${args_hash})\n"
|
||||
"endif()\n"
|
||||
)
|
||||
|
||||
if(NOT ${CMAKE_VERSION} VERSION_LESS "3.10.0")
|
||||
# Add discovered tests to directory TEST_INCLUDE_FILES
|
||||
set_property(DIRECTORY
|
||||
APPEND PROPERTY TEST_INCLUDE_FILES "${ctest_include_file}"
|
||||
)
|
||||
else()
|
||||
# Add discovered tests as directory TEST_INCLUDE_FILE if possible
|
||||
get_property(test_include_file_set DIRECTORY PROPERTY TEST_INCLUDE_FILE SET)
|
||||
if (NOT ${test_include_file_set})
|
||||
set_property(DIRECTORY
|
||||
PROPERTY TEST_INCLUDE_FILE "${ctest_include_file}"
|
||||
)
|
||||
else()
|
||||
message(FATAL_ERROR
|
||||
"Cannot set more than one TEST_INCLUDE_FILE"
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
endfunction()
|
||||
|
||||
###############################################################################
|
||||
|
||||
set(_CATCH_DISCOVER_TESTS_SCRIPT
|
||||
${CMAKE_CURRENT_LIST_DIR}/CatchAddTests.cmake
|
||||
CACHE INTERNAL "Catch2 full path to CatchAddTests.cmake helper file"
|
||||
)
|
|
@ -0,0 +1,135 @@
|
|||
# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
|
||||
# file Copyright.txt or https://cmake.org/licensing for details.
|
||||
|
||||
set(prefix "${TEST_PREFIX}")
|
||||
set(suffix "${TEST_SUFFIX}")
|
||||
set(spec ${TEST_SPEC})
|
||||
set(extra_args ${TEST_EXTRA_ARGS})
|
||||
set(properties ${TEST_PROPERTIES})
|
||||
set(reporter ${TEST_REPORTER})
|
||||
set(output_dir ${TEST_OUTPUT_DIR})
|
||||
set(output_prefix ${TEST_OUTPUT_PREFIX})
|
||||
set(output_suffix ${TEST_OUTPUT_SUFFIX})
|
||||
set(script)
|
||||
set(suite)
|
||||
set(tests)
|
||||
|
||||
function(add_command NAME)
|
||||
set(_args "")
|
||||
# use ARGV* instead of ARGN, because ARGN splits arrays into multiple arguments
|
||||
math(EXPR _last_arg ${ARGC}-1)
|
||||
foreach(_n RANGE 1 ${_last_arg})
|
||||
set(_arg "${ARGV${_n}}")
|
||||
if(_arg MATCHES "[^-./:a-zA-Z0-9_]")
|
||||
set(_args "${_args} [==[${_arg}]==]") # form a bracket_argument
|
||||
else()
|
||||
set(_args "${_args} ${_arg}")
|
||||
endif()
|
||||
endforeach()
|
||||
set(script "${script}${NAME}(${_args})\n" PARENT_SCOPE)
|
||||
endfunction()
|
||||
|
||||
# Run test executable to get list of available tests
|
||||
if(NOT EXISTS "${TEST_EXECUTABLE}")
|
||||
message(FATAL_ERROR
|
||||
"Specified test executable '${TEST_EXECUTABLE}' does not exist"
|
||||
)
|
||||
endif()
|
||||
execute_process(
|
||||
COMMAND ${TEST_EXECUTOR} "${TEST_EXECUTABLE}" ${spec} --list-test-names-only
|
||||
OUTPUT_VARIABLE output
|
||||
RESULT_VARIABLE result
|
||||
WORKING_DIRECTORY "${TEST_WORKING_DIR}"
|
||||
)
|
||||
# Catch --list-test-names-only reports the number of tests, so 0 is... surprising
|
||||
if(${result} EQUAL 0)
|
||||
message(WARNING
|
||||
"Test executable '${TEST_EXECUTABLE}' contains no tests!\n"
|
||||
)
|
||||
elseif(${result} LESS 0)
|
||||
message(FATAL_ERROR
|
||||
"Error running test executable '${TEST_EXECUTABLE}':\n"
|
||||
" Result: ${result}\n"
|
||||
" Output: ${output}\n"
|
||||
)
|
||||
endif()
|
||||
|
||||
string(REPLACE "\n" ";" output "${output}")
|
||||
|
||||
# Run test executable to get list of available reporters
|
||||
execute_process(
|
||||
COMMAND ${TEST_EXECUTOR} "${TEST_EXECUTABLE}" ${spec} --list-reporters
|
||||
OUTPUT_VARIABLE reporters_output
|
||||
RESULT_VARIABLE reporters_result
|
||||
WORKING_DIRECTORY "${TEST_WORKING_DIR}"
|
||||
)
|
||||
if(${reporters_result} EQUAL 0)
|
||||
message(WARNING
|
||||
"Test executable '${TEST_EXECUTABLE}' contains no reporters!\n"
|
||||
)
|
||||
elseif(${reporters_result} LESS 0)
|
||||
message(FATAL_ERROR
|
||||
"Error running test executable '${TEST_EXECUTABLE}':\n"
|
||||
" Result: ${reporters_result}\n"
|
||||
" Output: ${reporters_output}\n"
|
||||
)
|
||||
endif()
|
||||
string(FIND "${reporters_output}" "${reporter}" reporter_is_valid)
|
||||
if(reporter AND ${reporter_is_valid} EQUAL -1)
|
||||
message(FATAL_ERROR
|
||||
"\"${reporter}\" is not a valid reporter!\n"
|
||||
)
|
||||
endif()
|
||||
|
||||
# Prepare reporter
|
||||
if(reporter)
|
||||
set(reporter_arg "--reporter ${reporter}")
|
||||
endif()
|
||||
|
||||
# Prepare output dir
|
||||
if(output_dir AND NOT IS_ABSOLUTE ${output_dir})
|
||||
set(output_dir "${TEST_WORKING_DIR}/${output_dir}")
|
||||
if(NOT EXISTS ${output_dir})
|
||||
file(MAKE_DIRECTORY ${output_dir})
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Parse output
|
||||
foreach(line ${output})
|
||||
set(test ${line})
|
||||
# Escape characters in test case names that would be parsed by Catch2
|
||||
set(test_name ${test})
|
||||
foreach(char , [ ])
|
||||
string(REPLACE ${char} "\\${char}" test_name ${test_name})
|
||||
endforeach(char)
|
||||
# ...add output dir
|
||||
if(output_dir)
|
||||
string(REGEX REPLACE "[^A-Za-z0-9_]" "_" test_name_clean ${test_name})
|
||||
set(output_dir_arg "--out ${output_dir}/${output_prefix}${test_name_clean}${output_suffix}")
|
||||
endif()
|
||||
|
||||
# ...and add to script
|
||||
add_command(add_test
|
||||
"${prefix}${test}${suffix}"
|
||||
${TEST_EXECUTOR}
|
||||
"${TEST_EXECUTABLE}"
|
||||
"${test_name}"
|
||||
${extra_args}
|
||||
"${reporter_arg}"
|
||||
"${output_dir_arg}"
|
||||
)
|
||||
add_command(set_tests_properties
|
||||
"${prefix}${test}${suffix}"
|
||||
PROPERTIES
|
||||
WORKING_DIRECTORY "${TEST_WORKING_DIR}"
|
||||
${properties}
|
||||
)
|
||||
list(APPEND tests "${prefix}${test}${suffix}")
|
||||
endforeach()
|
||||
|
||||
# Create a list of all discovered tests, which users may use to e.g. set
|
||||
# properties on the tests
|
||||
add_command(set ${TEST_LIST} ${tests})
|
||||
|
||||
# Write CTest script
|
||||
file(WRITE "${CTEST_FILE}" "${script}")
|
|
@ -4,23 +4,6 @@
|
|||
#
|
||||
macro(compile_flags)
|
||||
if(MSVC)
|
||||
if(VCPKG_TARGET_TRIPLET MATCHES "-static" AND NOT VCPKG_TARGET_TRIPLET MATCHES "-md")
|
||||
# Switch to MT (static) instead of MD (dynamic) binary
|
||||
|
||||
# For MSVC two generators are available
|
||||
# - a command line generator (Ninja) using CMAKE_BUILD_TYPE to specify the
|
||||
# configuration of the build tree
|
||||
# - an IDE generator (Visual Studio) using CMAKE_CONFIGURATION_TYPES to
|
||||
# specify all configurations that will be available in the generated solution
|
||||
list(APPEND MSVC_CONFIGS "${CMAKE_BUILD_TYPE}" "${CMAKE_CONFIGURATION_TYPES}")
|
||||
|
||||
# Set usage of static runtime for all configurations
|
||||
foreach(MSVC_CONFIG ${MSVC_CONFIGS})
|
||||
string(TOUPPER "CMAKE_CXX_FLAGS_${MSVC_CONFIG}" MSVC_FLAGS)
|
||||
string(REPLACE "/MD" "/MT" ${MSVC_FLAGS} "${${MSVC_FLAGS}}")
|
||||
endforeach()
|
||||
endif()
|
||||
|
||||
# "If /Zc:rvalueCast is specified, the compiler follows section 5.4 of the
|
||||
# C++11 standard". We need C++11 for the way we use threads.
|
||||
add_compile_options(/Zc:rvalueCast)
|
||||
|
@ -33,6 +16,13 @@ macro(compile_flags)
|
|||
endif()
|
||||
endif()
|
||||
|
||||
# Our strings are UTF-8.
|
||||
if(MSVC)
|
||||
add_compile_options(/utf-8)
|
||||
else()
|
||||
add_compile_options(-finput-charset=utf-8)
|
||||
endif()
|
||||
|
||||
# Add some -D flags for Debug builds. We cannot use add_definitions(), because
|
||||
# it does not appear to support the $<> tags.
|
||||
add_compile_options(
|
||||
|
@ -55,9 +45,13 @@ macro(compile_flags)
|
|||
set(IS_STABLE_RELEASE "$<AND:$<NOT:$<CONFIG:Debug>>,$<NOT:$<BOOL:${OPTION_USE_ASSERTS}>>>")
|
||||
|
||||
if(MSVC)
|
||||
add_compile_options(/W3)
|
||||
if(MSVC_VERSION GREATER 1929 AND CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
|
||||
# Starting with version 19.30, there is an optimisation bug, see #9966 for details
|
||||
add_compile_options(
|
||||
/W3
|
||||
/w34100 # 'identifier' : unreferenced formal parameter
|
||||
/w34189 # 'identifier' : local variable is initialized but not referenced
|
||||
)
|
||||
if(MSVC_VERSION GREATER 1929 AND MSVC_VERSION LESS 1937 AND CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
|
||||
# Starting with version 19.30 (fixed in version 19.37), there is an optimisation bug, see #9966 for details
|
||||
# This flag disables the broken optimisation to work around the bug
|
||||
add_compile_options(/d2ssa-rse-)
|
||||
endif()
|
||||
|
@ -76,35 +70,12 @@ macro(compile_flags)
|
|||
-Wformat=2
|
||||
-Winit-self
|
||||
-Wnon-virtual-dtor
|
||||
-Wsuggest-override
|
||||
|
||||
# Often parameters are unused, which is fine.
|
||||
-Wno-unused-parameter
|
||||
# We use 'ABCD' multichar for SaveLoad chunks identifiers
|
||||
-Wno-multichar
|
||||
|
||||
# Compilers complains about that we break strict-aliasing.
|
||||
# On most places we don't see how to fix it, and it doesn't
|
||||
# break anything. So disable strict-aliasing to make the
|
||||
# compiler all happy.
|
||||
-fno-strict-aliasing
|
||||
)
|
||||
|
||||
# When we are a stable release (Release build + USE_ASSERTS not set),
|
||||
# assertations are off, which trigger a lot of warnings. We disable
|
||||
# these warnings for these releases.
|
||||
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
|
||||
add_compile_options(
|
||||
"$<${IS_STABLE_RELEASE}:-Wno-unused-variable>"
|
||||
"$<${IS_STABLE_RELEASE}:-Wno-unused-but-set-parameter>"
|
||||
"$<${IS_STABLE_RELEASE}:-Wno-unused-but-set-variable>"
|
||||
)
|
||||
else()
|
||||
add_compile_options(
|
||||
"$<${IS_STABLE_RELEASE}:-Wno-unused-variable>"
|
||||
"$<${IS_STABLE_RELEASE}:-Wno-unused-parameter>"
|
||||
)
|
||||
endif()
|
||||
|
||||
# Ninja processes the output so the output from the compiler
|
||||
# isn't directly to a terminal; hence, the default is
|
||||
# non-coloured output. We can override this to get nicely
|
||||
|
@ -136,6 +107,10 @@ macro(compile_flags)
|
|||
# -flifetime-dse=2 (default since GCC 6) doesn't play
|
||||
# well with our custom pool item allocator
|
||||
"$<$<BOOL:${LIFETIME_DSE_FOUND}>:-flifetime-dse=1>"
|
||||
|
||||
# We have a fight between clang wanting std::move() and gcc not wanting it
|
||||
# and of course they both warn when the other compiler is happy
|
||||
"-Wno-redundant-move"
|
||||
)
|
||||
endif()
|
||||
|
||||
|
|
|
@ -1,16 +1,13 @@
|
|||
# Macro which contains all bits and pieces to create a single grf file based
|
||||
# on NFO and PNG files.
|
||||
#
|
||||
# create_grf_command()
|
||||
# create_grf_command(NFO_SOURCE_FILES nfo_file1 ... PNG_SOURCE_FILES png_file1 ...)
|
||||
#
|
||||
function(create_grf_command)
|
||||
set(EXTRA_PNG_SOURCE_FILES ${ARGV})
|
||||
cmake_parse_arguments(GRF "" "" "NFO_SOURCE_FILES;PNG_SOURCE_FILES" ${ARGN})
|
||||
|
||||
get_filename_component(GRF_SOURCE_FOLDER_NAME "${CMAKE_CURRENT_SOURCE_DIR}" NAME)
|
||||
get_filename_component(GRF_BINARY_FILE ${CMAKE_CURRENT_SOURCE_DIR}/../${GRF_SOURCE_FOLDER_NAME}.grf ABSOLUTE)
|
||||
file(GLOB_RECURSE GRF_PNG_SOURCE_FILES ${CMAKE_CURRENT_SOURCE_DIR}/*.png)
|
||||
file(GLOB_RECURSE GRF_NFO_SOURCE_FILES ${CMAKE_CURRENT_SOURCE_DIR}/*.nfo)
|
||||
set(GRF_PNG_SOURCE_FILES ${GRF_PNG_SOURCE_FILES} ${EXTRA_PNG_SOURCE_FILES})
|
||||
|
||||
# Copy over all the PNG files to the correct folder
|
||||
foreach(GRF_PNG_SOURCE_FILE IN LISTS GRF_PNG_SOURCE_FILES)
|
||||
|
@ -28,12 +25,13 @@ function(create_grf_command)
|
|||
list(APPEND GRF_PNG_BINARY_FILES ${GRF_PNG_BINARY_FILE})
|
||||
endforeach()
|
||||
|
||||
add_custom_command(OUTPUT ${GRF_BINARY_FILE}
|
||||
add_custom_command(OUTPUT ${GRF_BINARY_FILE} ${GRF_BINARY_FILE}.hash
|
||||
COMMAND ${CMAKE_COMMAND}
|
||||
-DGRF_SOURCE_FOLDER=${CMAKE_CURRENT_SOURCE_DIR}
|
||||
-DGRF_BINARY_FILE=${GRF_BINARY_FILE}
|
||||
-DNFORENUM_EXECUTABLE=${NFORENUM_EXECUTABLE}
|
||||
-DGRFCODEC_EXECUTABLE=${GRFCODEC_EXECUTABLE}
|
||||
-DGRFID_EXECUTABLE=${GRFID_EXECUTABLE}
|
||||
-P ${CMAKE_SOURCE_DIR}/cmake/scripts/CreateGRF.cmake
|
||||
MAIN_DEPENDENCY ${CMAKE_SOURCE_DIR}/cmake/scripts/CreateGRF.cmake
|
||||
DEPENDS ${GRF_PNG_BINARY_FILES}
|
||||
|
|
|
@ -3,20 +3,15 @@
|
|||
# 'ctest'. The first is prefered, as it is more verbose, and takes care of
|
||||
# dependencies correctly.
|
||||
#
|
||||
# create_regression()
|
||||
# create_regression(file1 ...)
|
||||
#
|
||||
macro(create_regression)
|
||||
# Find all the files in the regression folder; they need to be copied to the
|
||||
# build folder before we can run the regression
|
||||
file(GLOB_RECURSE REGRESSION_SOURCE_FILES ${CMAKE_SOURCE_DIR}/regression/*)
|
||||
set(REGRESSION_SOURCE_FILES ${ARGN})
|
||||
|
||||
foreach(REGRESSION_SOURCE_FILE IN LISTS REGRESSION_SOURCE_FILES)
|
||||
string(REPLACE "${CMAKE_SOURCE_DIR}/regression/" "" REGRESSION_SOURCE_FILE_NAME "${REGRESSION_SOURCE_FILE}")
|
||||
string(CONCAT REGRESSION_BINARY_FILE "${CMAKE_BINARY_DIR}/ai/" "${REGRESSION_SOURCE_FILE_NAME}")
|
||||
|
||||
if("${REGRESSION_SOURCE_FILE_NAME}" STREQUAL "regression.cfg")
|
||||
continue()
|
||||
endif()
|
||||
|
||||
add_custom_command(OUTPUT ${REGRESSION_BINARY_FILE}
|
||||
COMMAND ${CMAKE_COMMAND} -E copy
|
||||
${REGRESSION_SOURCE_FILE}
|
||||
|
@ -28,59 +23,36 @@ macro(create_regression)
|
|||
list(APPEND REGRESSION_BINARY_FILES ${REGRESSION_BINARY_FILE})
|
||||
endforeach()
|
||||
|
||||
# Copy the regression configuration in a special folder, so all autogenerated
|
||||
# folders end up in the same place after running regression.
|
||||
add_custom_command(OUTPUT ${CMAKE_BINARY_DIR}/regression/regression.cfg
|
||||
COMMAND ${CMAKE_COMMAND} -E copy
|
||||
${CMAKE_SOURCE_DIR}/regression/regression.cfg
|
||||
${CMAKE_BINARY_DIR}/regression/regression.cfg
|
||||
MAIN_DEPENDENCY ${CMAKE_SOURCE_DIR}/regression/regression.cfg
|
||||
COMMENT "Copying ${REGRESSION_SOURCE_FILE_NAME} regression file"
|
||||
)
|
||||
list(APPEND REGRESSION_BINARY_FILES ${CMAKE_BINARY_DIR}/regression/regression.cfg)
|
||||
get_filename_component(REGRESSION_TEST_NAME "${CMAKE_CURRENT_SOURCE_DIR}" NAME)
|
||||
|
||||
# Create a new target which copies all regression files
|
||||
add_custom_target(regression_files
|
||||
ALL # this is needed because 'make test' doesn't resolve dependencies, and otherwise this is never executed
|
||||
# Create a new target which copies regression files
|
||||
add_custom_target(regression_${REGRESSION_TEST_NAME}_files
|
||||
DEPENDS
|
||||
${REGRESSION_BINARY_FILES}
|
||||
)
|
||||
|
||||
enable_testing()
|
||||
add_dependencies(regression_files regression_${REGRESSION_TEST_NAME}_files)
|
||||
|
||||
# Find all the tests we have, and create a target for them
|
||||
file(GLOB REGRESSION_TESTS ${CMAKE_SOURCE_DIR}/regression/*)
|
||||
foreach(REGRESSION_TEST IN LISTS REGRESSION_TESTS)
|
||||
get_filename_component(REGRESSION_TEST_NAME "${REGRESSION_TEST}" NAME)
|
||||
add_custom_target(regression_${REGRESSION_TEST_NAME}
|
||||
COMMAND ${CMAKE_COMMAND}
|
||||
-DOPENTTD_EXECUTABLE=$<TARGET_FILE:openttd>
|
||||
-DEDITBIN_EXECUTABLE=${EDITBIN_EXECUTABLE}
|
||||
-DREGRESSION_TEST=${REGRESSION_TEST_NAME}
|
||||
-P "${CMAKE_SOURCE_DIR}/cmake/scripts/Regression.cmake"
|
||||
DEPENDS openttd regression_${REGRESSION_TEST_NAME}_files
|
||||
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
|
||||
COMMENT "Running regression test ${REGRESSION_TEST_NAME}"
|
||||
)
|
||||
|
||||
if("${REGRESSION_TEST_NAME}" STREQUAL "regression.cfg")
|
||||
continue()
|
||||
endif()
|
||||
# Also make sure that 'make test' runs the regression
|
||||
add_test(NAME regression_${REGRESSION_TEST_NAME}
|
||||
COMMAND ${CMAKE_COMMAND}
|
||||
-DOPENTTD_EXECUTABLE=$<TARGET_FILE:openttd>
|
||||
-DEDITBIN_EXECUTABLE=${EDITBIN_EXECUTABLE}
|
||||
-DREGRESSION_TEST=${REGRESSION_TEST_NAME}
|
||||
-P "${CMAKE_SOURCE_DIR}/cmake/scripts/Regression.cmake"
|
||||
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
|
||||
)
|
||||
|
||||
add_custom_target(regression_${REGRESSION_TEST_NAME}
|
||||
COMMAND ${CMAKE_COMMAND}
|
||||
-DOPENTTD_EXECUTABLE=$<TARGET_FILE:openttd>
|
||||
-DEDITBIN_EXECUTABLE=${EDITBIN_EXECUTABLE}
|
||||
-DREGRESSION_TEST=${REGRESSION_TEST_NAME}
|
||||
-P "${CMAKE_SOURCE_DIR}/cmake/scripts/Regression.cmake"
|
||||
DEPENDS openttd regression_files
|
||||
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
|
||||
COMMENT "Running regression test ${REGRESSION_TEST_NAME}"
|
||||
)
|
||||
|
||||
# Also make sure that 'make test' runs the regression
|
||||
add_test(NAME regression_${REGRESSION_TEST_NAME}
|
||||
COMMAND ${CMAKE_COMMAND}
|
||||
-DOPENTTD_EXECUTABLE=$<TARGET_FILE:openttd>
|
||||
-DEDITBIN_EXECUTABLE=${EDITBIN_EXECUTABLE}
|
||||
-DREGRESSION_TEST=${REGRESSION_TEST_NAME}
|
||||
-P "${CMAKE_SOURCE_DIR}/cmake/scripts/Regression.cmake"
|
||||
WORKING_DIRECTORY ${CMAKE_BINARY_DIR})
|
||||
|
||||
list(APPEND REGRESSION_TARGETS regression_${REGRESSION_TEST_NAME})
|
||||
endforeach()
|
||||
|
||||
# Create a new target which runs the regression
|
||||
add_custom_target(regression
|
||||
DEPENDS ${REGRESSION_TARGETS})
|
||||
add_dependencies(regression regression_${REGRESSION_TEST_NAME})
|
||||
endmacro()
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
#
|
||||
|
||||
find_program(GRFCODEC_EXECUTABLE grfcodec)
|
||||
find_program(GRFID_EXECUTABLE grfid)
|
||||
find_program(NFORENUM_EXECUTABLE nforenum)
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
|
@ -9,5 +10,6 @@ find_package_handle_standard_args(Grfcodec
|
|||
FOUND_VAR GRFCODEC_FOUND
|
||||
REQUIRED_VARS
|
||||
GRFCODEC_EXECUTABLE
|
||||
GRFID_EXECUTABLE
|
||||
NFORENUM_EXECUTABLE
|
||||
)
|
||||
|
|
|
@ -0,0 +1,65 @@
|
|||
#[=======================================================================[.rst:
|
||||
FindHarfBuzz
|
||||
-------
|
||||
|
||||
Finds the harfbuzz library.
|
||||
|
||||
Result Variables
|
||||
^^^^^^^^^^^^^^^^
|
||||
|
||||
This will define the following variables:
|
||||
|
||||
``Harfbuzz_FOUND``
|
||||
True if the system has the harfbuzz library.
|
||||
``Harfbuzz_INCLUDE_DIRS``
|
||||
Include directories needed to use harfbuzz.
|
||||
``Harfbuzz_LIBRARIES``
|
||||
Libraries needed to link to harfbuzz.
|
||||
``Harfbuzz_VERSION``
|
||||
The version of the harfbuzz library which was found.
|
||||
|
||||
Cache Variables
|
||||
^^^^^^^^^^^^^^^
|
||||
|
||||
The following cache variables may also be set:
|
||||
|
||||
``Harfbuzz_INCLUDE_DIR``
|
||||
The directory containing ``hb.h``.
|
||||
``Harfbuzz_LIBRARY``
|
||||
The path to the harfbuzz library.
|
||||
|
||||
#]=======================================================================]
|
||||
|
||||
find_package(PkgConfig QUIET)
|
||||
pkg_check_modules(PC_Harfbuzz QUIET harfbuzz)
|
||||
|
||||
find_path(Harfbuzz_INCLUDE_DIR
|
||||
NAMES hb.h
|
||||
PATHS ${PC_Harfbuzz_INCLUDE_DIRS}
|
||||
)
|
||||
|
||||
find_library(Harfbuzz_LIBRARY
|
||||
NAMES harfbuzz
|
||||
PATHS ${PC_Harfbuzz_LIBRARY_DIRS}
|
||||
)
|
||||
|
||||
set(Harfbuzz_VERSION ${PC_Harfbuzz_VERSION})
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(Harfbuzz
|
||||
FOUND_VAR Harfbuzz_FOUND
|
||||
REQUIRED_VARS
|
||||
Harfbuzz_LIBRARY
|
||||
Harfbuzz_INCLUDE_DIR
|
||||
VERSION_VAR Harfbuzz_VERSION
|
||||
)
|
||||
|
||||
if(Harfbuzz_FOUND)
|
||||
set(Harfbuzz_LIBRARIES ${Harfbuzz_LIBRARY})
|
||||
set(Harfbuzz_INCLUDE_DIRS ${Harfbuzz_INCLUDE_DIR})
|
||||
endif()
|
||||
|
||||
mark_as_advanced(
|
||||
Harfbuzz_INCLUDE_DIR
|
||||
Harfbuzz_LIBRARY
|
||||
)
|
|
@ -9,7 +9,7 @@ FindICU
|
|||
|
||||
Finds components of the ICU library.
|
||||
|
||||
Accepted components are: uc, i18n, le, lx, io
|
||||
Accepted components are: uc, i18n, le, lx, io, data
|
||||
|
||||
Result Variables
|
||||
^^^^^^^^^^^^^^^^
|
||||
|
@ -31,7 +31,7 @@ This will define the following variables:
|
|||
|
||||
find_package(PkgConfig QUIET)
|
||||
|
||||
set(ICU_KNOWN_COMPONENTS "uc" "i18n" "le" "lx" "io")
|
||||
set(ICU_KNOWN_COMPONENTS "uc" "i18n" "le" "lx" "io" "data")
|
||||
|
||||
foreach(MOD_NAME IN LISTS ICU_FIND_COMPONENTS)
|
||||
if(NOT MOD_NAME IN_LIST ICU_KNOWN_COMPONENTS)
|
||||
|
|
|
@ -55,7 +55,7 @@ find_library(LZO_LIBRARY
|
|||
# name as the optimized file. This is not always the case, but so far
|
||||
# experiences has shown that in those case vcpkg CMake files do the right
|
||||
# thing.
|
||||
if(VCPKG_TOOLCHAIN AND LZO_LIBRARY)
|
||||
if(VCPKG_TOOLCHAIN AND LZO_LIBRARY AND LZO_LIBRARY MATCHES "${VCPKG_INSTALLED_DIR}")
|
||||
if(LZO_LIBRARY MATCHES "/debug/")
|
||||
set(LZO_LIBRARY_DEBUG ${LZO_LIBRARY})
|
||||
string(REPLACE "/debug/lib/" "/lib/" LZO_LIBRARY_RELEASE ${LZO_LIBRARY})
|
||||
|
|
|
@ -23,26 +23,57 @@ install(TARGETS openttd
|
|||
COMPONENT Runtime
|
||||
)
|
||||
|
||||
install(DIRECTORY
|
||||
${CMAKE_BINARY_DIR}/lang
|
||||
${CMAKE_BINARY_DIR}/baseset
|
||||
${CMAKE_BINARY_DIR}/ai
|
||||
${CMAKE_BINARY_DIR}/game
|
||||
${CMAKE_SOURCE_DIR}/bin/scripts
|
||||
DESTINATION ${DATA_DESTINATION_DIR}
|
||||
COMPONENT language_files
|
||||
REGEX "ai/[^\.]+$" EXCLUDE # Ignore subdirs in ai dir
|
||||
)
|
||||
if (NOT EMSCRIPTEN)
|
||||
# Emscripten embeds these files in openttd.data.
|
||||
# See CMakeLists.txt in the root.
|
||||
install(DIRECTORY
|
||||
${CMAKE_BINARY_DIR}/lang
|
||||
${CMAKE_BINARY_DIR}/baseset
|
||||
${CMAKE_BINARY_DIR}/ai
|
||||
${CMAKE_BINARY_DIR}/game
|
||||
${CMAKE_SOURCE_DIR}/bin/scripts
|
||||
DESTINATION ${DATA_DESTINATION_DIR}
|
||||
COMPONENT language_files
|
||||
REGEX "ai/[^\.]+$" EXCLUDE # Ignore subdirs in ai dir
|
||||
)
|
||||
else()
|
||||
install(FILES
|
||||
${CMAKE_BINARY_DIR}/openttd.js
|
||||
${CMAKE_BINARY_DIR}/openttd.wasm
|
||||
${CMAKE_BINARY_DIR}/openttd.data
|
||||
DESTINATION ${BINARY_DESTINATION_DIR}
|
||||
COMPONENT Runtime
|
||||
)
|
||||
endif()
|
||||
|
||||
install(FILES
|
||||
${CMAKE_SOURCE_DIR}/COPYING.md
|
||||
${CMAKE_SOURCE_DIR}/README.md
|
||||
${CMAKE_SOURCE_DIR}/CREDITS.md
|
||||
${CMAKE_SOURCE_DIR}/CONTRIBUTING.md
|
||||
${CMAKE_SOURCE_DIR}/changelog.txt
|
||||
${CMAKE_SOURCE_DIR}/docs/multiplayer.md
|
||||
${CMAKE_SOURCE_DIR}/known-bugs.txt
|
||||
DESTINATION ${DOCS_DESTINATION_DIR}
|
||||
COMPONENT docs)
|
||||
|
||||
install(FILES
|
||||
${CMAKE_SOURCE_DIR}/docs/admin_network.md
|
||||
${CMAKE_SOURCE_DIR}/docs/debugging_desyncs.md
|
||||
${CMAKE_SOURCE_DIR}/docs/desync.md
|
||||
${CMAKE_SOURCE_DIR}/docs/directory_structure.md
|
||||
${CMAKE_SOURCE_DIR}/docs/eints.md
|
||||
${CMAKE_SOURCE_DIR}/docs/game_coordinator.md
|
||||
${CMAKE_SOURCE_DIR}/docs/linkgraph.md
|
||||
${CMAKE_SOURCE_DIR}/docs/logging_and_performance_metrics.md
|
||||
${CMAKE_SOURCE_DIR}/docs/multiplayer.md
|
||||
${CMAKE_SOURCE_DIR}/docs/savegame_format.md
|
||||
${CMAKE_SOURCE_DIR}/docs/symbol_server.md
|
||||
${CMAKE_SOURCE_DIR}/docs/obg_format.txt
|
||||
${CMAKE_SOURCE_DIR}/docs/obm_format.txt
|
||||
${CMAKE_SOURCE_DIR}/docs/obs_format.txt
|
||||
DESTINATION ${DOCS_DESTINATION_DIR}/docs
|
||||
COMPONENT docs)
|
||||
|
||||
# A Linux manual only makes sense when using FHS. Otherwise it is a very odd
|
||||
# file with little context to what it is.
|
||||
if(OPTION_INSTALL_FHS)
|
||||
|
@ -60,7 +91,7 @@ if(OPTION_INSTALL_FHS)
|
|||
COMPONENT manual)
|
||||
endif()
|
||||
|
||||
if(UNIX AND NOT APPLE)
|
||||
if(UNIX AND NOT APPLE AND NOT EMSCRIPTEN)
|
||||
install(DIRECTORY
|
||||
${CMAKE_BINARY_DIR}/media/icons
|
||||
${CMAKE_BINARY_DIR}/media/pixmaps
|
||||
|
@ -141,10 +172,10 @@ elseif(WIN32)
|
|||
|
||||
set(CPACK_PACKAGE_FILE_NAME "openttd-#CPACK_PACKAGE_VERSION#-windows-${CPACK_SYSTEM_NAME}")
|
||||
|
||||
if(WINDOWS_CERTIFICATE_COMMON_NAME)
|
||||
if(DEFINED ENV{AZURE_CODESIGN_PROFILE_NAME})
|
||||
add_custom_command(TARGET openttd
|
||||
POST_BUILD
|
||||
COMMAND "${CMAKE_SOURCE_DIR}/os/windows/sign.bat" "$<TARGET_FILE:openttd>" "${WINDOWS_CERTIFICATE_COMMON_NAME}"
|
||||
COMMAND "${CMAKE_SOURCE_DIR}/os/windows/sign.bat" "${BINARY_DESTINATION_DIR}"
|
||||
)
|
||||
endif()
|
||||
elseif(UNIX)
|
||||
|
@ -164,7 +195,7 @@ elseif(UNIX)
|
|||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
)
|
||||
if(LSB_RELEASE_ID)
|
||||
if(LSB_RELEASE_ID STREQUAL "Ubuntu" OR LSB_RELEASE_ID STREQUAL "Debian")
|
||||
if(LSB_RELEASE_ID STREQUAL "Ubuntu" OR LSB_RELEASE_ID STREQUAL "Debian" OR LSB_RELEASE_ID STREQUAL "Linuxmint")
|
||||
execute_process(COMMAND ${LSB_RELEASE_EXEC} -cs
|
||||
OUTPUT_VARIABLE LSB_RELEASE_CODENAME
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
|
|
|
@ -3,18 +3,21 @@ function(link_package NAME)
|
|||
|
||||
if(${NAME}_FOUND)
|
||||
string(TOUPPER "${NAME}" UCNAME)
|
||||
# Some libraries have a dash, which is not allowed in a preprocessor macro.
|
||||
string(REPLACE "-" "_" UCNAME "${UCNAME}")
|
||||
|
||||
add_definitions(-DWITH_${UCNAME})
|
||||
# Some libraries' cmake packages (looking at you, SDL2) leave trailing whitespace in the link commands,
|
||||
# which (later) cmake considers to be an error. Work around this with by stripping the incoming string.
|
||||
if(LP_TARGET AND TARGET ${LP_TARGET})
|
||||
string(STRIP "${LP_TARGET}" LP_TARGET)
|
||||
target_link_libraries(openttd ${LP_TARGET})
|
||||
target_link_libraries(openttd_lib ${LP_TARGET})
|
||||
message(STATUS "${NAME} found -- -DWITH_${UCNAME} -- ${LP_TARGET}")
|
||||
else()
|
||||
string(STRIP "${${NAME}_LIBRARY}" ${NAME}_LIBRARY)
|
||||
string(STRIP "${${NAME}_LIBRARIES}" ${NAME}_LIBRARIES)
|
||||
include_directories(${${NAME}_INCLUDE_DIRS} ${${NAME}_INCLUDE_DIR})
|
||||
target_link_libraries(openttd ${${NAME}_LIBRARIES} ${${NAME}_LIBRARY})
|
||||
target_link_libraries(openttd_lib ${${NAME}_LIBRARIES} ${${NAME}_LIBRARY})
|
||||
message(STATUS "${NAME} found -- -DWITH_${UCNAME} -- ${${NAME}_INCLUDE_DIRS} ${${NAME}_INCLUDE_DIR} -- ${${NAME}_LIBRARIES} ${${NAME}_LIBRARY}")
|
||||
endif()
|
||||
elseif(LP_ENCOURAGED)
|
||||
|
|
|
@ -57,20 +57,16 @@ function(set_options)
|
|||
option(OPTION_DEDICATED "Build dedicated server only (no GUI)" OFF)
|
||||
option(OPTION_INSTALL_FHS "Install with Filesystem Hierarchy Standard folders" ${DEFAULT_OPTION_INSTALL_FHS})
|
||||
option(OPTION_USE_ASSERTS "Use assertions; leave enabled for nightlies, betas, and RCs" ON)
|
||||
if(EMSCRIPTEN)
|
||||
# Although pthreads is supported, it is not in a way yet that is
|
||||
# useful for us.
|
||||
option(OPTION_USE_THREADS "Use threads" OFF)
|
||||
else()
|
||||
option(OPTION_USE_THREADS "Use threads" ON)
|
||||
endif()
|
||||
option(OPTION_USE_NSIS "Use NSIS to create windows installer; enable only for stable releases" OFF)
|
||||
option(OPTION_TOOLS_ONLY "Build only tools target" OFF)
|
||||
option(OPTION_DOCS_ONLY "Build only docs target" OFF)
|
||||
option(OPTION_ALLOW_INVALID_SIGNATURE "Allow loading of content with invalid signatures" OFF)
|
||||
|
||||
if (OPTION_DOCS_ONLY)
|
||||
set(OPTION_TOOLS_ONLY ON PARENT_SCOPE)
|
||||
endif()
|
||||
|
||||
option(OPTION_SURVEY_KEY "Survey-key to use for the opt-in survey (empty if you have none)" "")
|
||||
endfunction()
|
||||
|
||||
# Show the values of the generic options.
|
||||
|
@ -82,8 +78,18 @@ function(show_options)
|
|||
message(STATUS "Option Dedicated - ${OPTION_DEDICATED}")
|
||||
message(STATUS "Option Install FHS - ${OPTION_INSTALL_FHS}")
|
||||
message(STATUS "Option Use assert - ${OPTION_USE_ASSERTS}")
|
||||
message(STATUS "Option Use threads - ${OPTION_USE_THREADS}")
|
||||
message(STATUS "Option Use NSIS - ${OPTION_USE_NSIS}")
|
||||
|
||||
if(OPTION_SURVEY_KEY)
|
||||
message(STATUS "Option Survey Key - USED")
|
||||
else()
|
||||
message(STATUS "Option Survey Key - NOT USED")
|
||||
endif()
|
||||
|
||||
if(OPTION_ALLOW_INVALID_SIGNATURE)
|
||||
message(STATUS "Option Allow Invalid Signature - USED")
|
||||
message(WARNING "Ignoring invalid signatures is a security risk! Use with care!")
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
# Add the definitions for the options that are selected.
|
||||
|
@ -95,13 +101,17 @@ function(add_definitions_based_on_options)
|
|||
add_definitions(-DDEDICATED)
|
||||
endif()
|
||||
|
||||
if(NOT OPTION_USE_THREADS)
|
||||
add_definitions(-DNO_THREADS)
|
||||
endif()
|
||||
|
||||
if(OPTION_USE_ASSERTS)
|
||||
add_definitions(-DWITH_ASSERT)
|
||||
else()
|
||||
add_definitions(-DNDEBUG)
|
||||
endif()
|
||||
|
||||
if(OPTION_SURVEY_KEY)
|
||||
add_definitions(-DSURVEY_KEY="${OPTION_SURVEY_KEY}")
|
||||
endif()
|
||||
|
||||
if(OPTION_ALLOW_INVALID_SIGNATURE)
|
||||
add_definitions(-DALLOW_INVALID_SIGNATURE)
|
||||
endif()
|
||||
endfunction()
|
||||
|
|
|
@ -1,12 +1,4 @@
|
|||
# Add a file to be compiled.
|
||||
#
|
||||
# add_files([file1 ...] CONDITION condition [condition ...])
|
||||
#
|
||||
# CONDITION is a complete statement that can be evaluated with if().
|
||||
# If it evaluates true, the source files will be added; otherwise not.
|
||||
# For example: ADD_IF SDL_FOUND AND Allegro_FOUND
|
||||
#
|
||||
function(add_files)
|
||||
function(_add_files_tgt tgt)
|
||||
cmake_parse_arguments(PARAM "" "" "CONDITION" ${ARGN})
|
||||
set(PARAM_FILES "${PARAM_UNPARSED_ARGUMENTS}")
|
||||
|
||||
|
@ -17,10 +9,44 @@ function(add_files)
|
|||
endif()
|
||||
|
||||
foreach(FILE IN LISTS PARAM_FILES)
|
||||
target_sources(openttd PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/${FILE})
|
||||
# Some IDEs are not happy with duplicated filenames, so we detect that before adding the file.
|
||||
get_target_property(${tgt}_FILES ${tgt} SOURCES)
|
||||
if(${tgt}_FILES MATCHES "/${FILE}(;|$)")
|
||||
string(REGEX REPLACE "(^|.+;)([^;]+/${FILE})(;.+|$)" "\\2" RES "${${tgt}_FILES}")
|
||||
# Ignore header files duplicates in 3rdparty.
|
||||
if(NOT (${FILE} MATCHES "\.h" AND (${RES} MATCHES "3rdparty" OR ${CMAKE_CURRENT_SOURCE_DIR} MATCHES "3rdparty")))
|
||||
message(FATAL_ERROR "${tgt}: ${CMAKE_CURRENT_SOURCE_DIR}/${FILE} filename is a duplicate of ${RES}")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
target_sources(${tgt} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/${FILE})
|
||||
endforeach()
|
||||
endfunction()
|
||||
|
||||
# Add a file to be compiled.
|
||||
#
|
||||
# add_files([file1 ...] CONDITION condition [condition ...])
|
||||
#
|
||||
# CONDITION is a complete statement that can be evaluated with if().
|
||||
# If it evaluates true, the source files will be added; otherwise not.
|
||||
# For example: ADD_IF SDL_FOUND AND Allegro_FOUND
|
||||
#
|
||||
function(add_files)
|
||||
_add_files_tgt(openttd_lib ${ARGV})
|
||||
endfunction()
|
||||
|
||||
# Add a test file to be compiled.
|
||||
#
|
||||
# add_test_files([file1 ...] CONDITION condition [condition ...])
|
||||
#
|
||||
# CONDITION is a complete statement that can be evaluated with if().
|
||||
# If it evaluates true, the source files will be added; otherwise not.
|
||||
# For example: ADD_IF SDL_FOUND AND Allegro_FOUND
|
||||
#
|
||||
function(add_test_files)
|
||||
_add_files_tgt(openttd_test ${ARGV})
|
||||
endfunction()
|
||||
|
||||
# This function works around an 'issue' with CMake, where
|
||||
# set_source_files_properties() only works in the scope of the file. We want
|
||||
# to set properties for the source file on a more global level. To solve this,
|
||||
|
|
|
@ -58,6 +58,7 @@ list(SORT ${PLACE_HOLDER})
|
|||
string(REPLACE ";" "\n" ${PLACE_HOLDER} "${${PLACE_HOLDER}}")
|
||||
|
||||
# Get the grf md5
|
||||
file(MD5 ${BASESET_EXTRAGRF_FILE} ORIG_EXTRA_GRF_MD5)
|
||||
file(READ ${BASESET_EXTRAGRF_FILE}.hash ORIG_EXTRA_GRF_MD5)
|
||||
string(STRIP ${ORIG_EXTRA_GRF_MD5} ORIG_EXTRA_GRF_MD5)
|
||||
|
||||
configure_file(${BASESET_SOURCE_FILE} ${BASESET_BINARY_FILE})
|
||||
|
|
|
@ -11,6 +11,9 @@ endif()
|
|||
if(NOT GRFCODEC_EXECUTABLE)
|
||||
message(FATAL_ERROR "Script needs GRFCODEC_EXECUTABLE defined")
|
||||
endif()
|
||||
if(NOT GRFID_EXECUTABLE)
|
||||
message(FATAL_ERROR "Script needs GRFID_EXECUTABLE defined")
|
||||
endif()
|
||||
if(NOT GRF_SOURCE_FOLDER)
|
||||
message(FATAL_ERROR "Script needs GRF_SOURCE_FOLDER defined")
|
||||
endif()
|
||||
|
@ -18,6 +21,9 @@ if(NOT GRF_BINARY_FILE)
|
|||
message(FATAL_ERROR "Script needs GRF_BINARY_FILE defined")
|
||||
endif()
|
||||
|
||||
# Remove the existing output so failures never go unnoticed
|
||||
file(REMOVE ${GRF_BINARY_FILE} ${GRF_BINARY_FILE}.hash)
|
||||
|
||||
get_filename_component(GRF_SOURCE_FOLDER_NAME "${GRF_SOURCE_FOLDER}" NAME)
|
||||
|
||||
file(WRITE sprites/${GRF_SOURCE_FOLDER_NAME}.nfo "")
|
||||
|
@ -47,7 +53,7 @@ if(RESULT)
|
|||
message(FATAL_ERROR "NFORenum failed")
|
||||
endif()
|
||||
|
||||
execute_process(COMMAND ${GRFCODEC_EXECUTABLE} -n -s -e -p1 ${GRF_SOURCE_FOLDER_NAME}.grf RESULT_VARIABLE RESULT)
|
||||
execute_process(COMMAND ${GRFCODEC_EXECUTABLE} -n -s -e -g2 -p1 ${GRF_SOURCE_FOLDER_NAME}.grf RESULT_VARIABLE RESULT)
|
||||
if(RESULT)
|
||||
if(NOT RESULT MATCHES "^[0-9]*$")
|
||||
message(FATAL_ERROR "Failed to run GRFCodec (${RESULT}), please check GRFCODEC_EXECUTABLE variable")
|
||||
|
@ -55,4 +61,15 @@ if(RESULT)
|
|||
message(FATAL_ERROR "GRFCodec failed")
|
||||
endif()
|
||||
|
||||
execute_process(COMMAND ${GRFID_EXECUTABLE} -m ${GRF_SOURCE_FOLDER_NAME}.grf OUTPUT_VARIABLE GRFID_HASH RESULT_VARIABLE RESULT)
|
||||
if(RESULT)
|
||||
if(NOT RESULT MATCHES "^[0-9]*$")
|
||||
message(FATAL_ERROR "Failed to run GRFID (${RESULT}), please check GRFID_EXECUTABLE variable")
|
||||
endif()
|
||||
message(FATAL_ERROR "GRFID failed")
|
||||
endif()
|
||||
|
||||
file(WRITE ${GRF_BINARY_FILE}.hash ${GRFID_HASH})
|
||||
|
||||
# Copy build files back to the source directory.
|
||||
execute_process(COMMAND ${CMAKE_COMMAND} -E copy ${GRF_SOURCE_FOLDER_NAME}.grf ${GRF_BINARY_FILE})
|
||||
|
|
|
@ -49,7 +49,8 @@ if(GIT_FOUND AND EXISTS "${CMAKE_SOURCE_DIR}/.git")
|
|||
string(SUBSTRING "${FULLHASH}" 0 10 SHORTHASH)
|
||||
|
||||
# Get the last commit date
|
||||
execute_process(COMMAND ${GIT_EXECUTABLE} show -s --pretty=format:%ci HEAD
|
||||
set(ENV{TZ} "UTC0")
|
||||
execute_process(COMMAND ${GIT_EXECUTABLE} show -s --date=iso-local --pretty=format:%cd HEAD
|
||||
OUTPUT_VARIABLE COMMITDATE
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
|
||||
|
|
|
@ -56,11 +56,14 @@ foreach(ENUM IN LISTS ENUM_LINES)
|
|||
endif()
|
||||
|
||||
# Check for enum match
|
||||
if("${LINE}" MATCHES "^ *enum *${ENUM_PATTERN} *\{")
|
||||
if("${LINE}" MATCHES "^ *enum *${ENUM_PATTERN}( *: *[^ ]*)? *\{")
|
||||
# REGEX REPLACE does a REGEX MATCHALL and fails if an empty string is matched
|
||||
string(REGEX MATCH "[^ ]*" RESULT "${LINE}")
|
||||
string(REPLACE "${RESULT}" "" RM_INDENT "${LINE}")
|
||||
|
||||
string(REGEX MATCH " *: *[^ ]*" RESULT "${LINE}")
|
||||
string(REPLACE "${RESULT}" "" LINE "${LINE}")
|
||||
|
||||
set(ACTIVE 1)
|
||||
if(ACTIVE_COMMENT GREATER 0)
|
||||
string(APPEND ${PLACE_HOLDER} "\n${COMMENT}")
|
||||
|
|
|
@ -34,7 +34,6 @@ execute_process(COMMAND ${OPENTTD_EXECUTABLE}
|
|||
-mnull
|
||||
-vnull:ticks=30000
|
||||
-d script=2
|
||||
-d misc=9
|
||||
-Q
|
||||
OUTPUT_VARIABLE REGRESSION_OUTPUT
|
||||
ERROR_VARIABLE REGRESSION_RESULT
|
||||
|
@ -54,16 +53,27 @@ string(REPLACE "0x(nil)" "0x00000000" REGRESSION_RESULT "${REGRESSION_RESULT}")
|
|||
string(REPLACE "0x0000000000000000" "0x00000000" REGRESSION_RESULT "${REGRESSION_RESULT}")
|
||||
string(REPLACE "0x0x0" "0x00000000" REGRESSION_RESULT "${REGRESSION_RESULT}")
|
||||
|
||||
# Convert path separators
|
||||
string(REPLACE "\\" "/" REGRESSION_RESULT "${REGRESSION_RESULT}")
|
||||
|
||||
# Remove timestamps if any
|
||||
string(REGEX REPLACE "\[[0-9-]+ [0-9:]+\] " "" REGRESSION_RESULT "${REGRESSION_RESULT}")
|
||||
string(REGEX REPLACE "\\\[[0-9-]+ [0-9:]+\\\] " "" REGRESSION_RESULT "${REGRESSION_RESULT}")
|
||||
|
||||
# Remove log level
|
||||
string(REGEX REPLACE "\\\[script:[0-9]\\\]" "" REGRESSION_RESULT "${REGRESSION_RESULT}")
|
||||
|
||||
# Convert the output to a format that is expected (and more readable) by result.txt
|
||||
string(REPLACE "\ndbg: [script]" "\n" REGRESSION_RESULT "${REGRESSION_RESULT}")
|
||||
string(REPLACE "\n " "\nERROR: " REGRESSION_RESULT "${REGRESSION_RESULT}")
|
||||
string(REPLACE "\nERROR: [1] " "\n" REGRESSION_RESULT "${REGRESSION_RESULT}")
|
||||
string(REPLACE "\n[P] " "\n" REGRESSION_RESULT "${REGRESSION_RESULT}")
|
||||
string(REPLACE "dbg: " "ERROR: " REGRESSION_RESULT "${REGRESSION_RESULT}")
|
||||
string(REPLACE "ERROR: [1] " "" REGRESSION_RESULT "${REGRESSION_RESULT}")
|
||||
string(REPLACE "[P] " "" REGRESSION_RESULT "${REGRESSION_RESULT}")
|
||||
string(REPLACE "[S] " "" REGRESSION_RESULT "${REGRESSION_RESULT}")
|
||||
string(REGEX REPLACE "dbg: ([^\n]*)\n?" "" REGRESSION_RESULT "${REGRESSION_RESULT}")
|
||||
|
||||
# Remove duplicate script info
|
||||
string(REGEX REPLACE "ERROR: Registering([^\n]*)\n?" "" REGRESSION_RESULT "${REGRESSION_RESULT}")
|
||||
string(REGEX REPLACE "ERROR: [12]([^\n]*)\n?" "" REGRESSION_RESULT "${REGRESSION_RESULT}")
|
||||
string(REGEX REPLACE "ERROR: The first([^\n]*)\n?" "" REGRESSION_RESULT "${REGRESSION_RESULT}")
|
||||
|
||||
# Read the expected result
|
||||
file(READ ai/${REGRESSION_TEST}/result.txt REGRESSION_EXPECTED)
|
||||
|
||||
|
@ -87,7 +97,7 @@ foreach(RESULT IN LISTS REGRESSION_RESULT)
|
|||
|
||||
if(NOT RESULT STREQUAL EXPECTED)
|
||||
message("${ARGC}: - ${EXPECTED}")
|
||||
message("${ARGC}: + ${RESULT}'")
|
||||
message("${ARGC}: + ${RESULT}")
|
||||
set(ERROR YES)
|
||||
endif()
|
||||
endforeach()
|
||||
|
|
|
@ -28,21 +28,21 @@ endmacro()
|
|||
macro(dump_class_templates NAME)
|
||||
string(REGEX REPLACE "^Script" "" REALNAME ${NAME})
|
||||
|
||||
string(APPEND SQUIRREL_EXPORT "\n template <> struct Param<${NAME} *> { static inline ${NAME} *Get(HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, nullptr); return (${NAME} *)instance; } };")
|
||||
string(APPEND SQUIRREL_EXPORT "\n template <> struct Param<${NAME} &> { static inline ${NAME} &Get(HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, nullptr); return *(${NAME} *)instance; } };")
|
||||
string(APPEND SQUIRREL_EXPORT "\n template <> struct Param<const ${NAME} *> { static inline const ${NAME} *Get(HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, nullptr); return (${NAME} *)instance; } };")
|
||||
string(APPEND SQUIRREL_EXPORT "\n template <> struct Param<const ${NAME} &> { static inline const ${NAME} &Get(HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, nullptr); return *(${NAME} *)instance; } };")
|
||||
string(APPEND SQUIRREL_EXPORT "\n template <> struct Param<${NAME} *> { static inline ${NAME} *Get(HSQUIRRELVM vm, int index) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, nullptr); return (${NAME} *)instance; } };")
|
||||
string(APPEND SQUIRREL_EXPORT "\n template <> struct Param<${NAME} &> { static inline ${NAME} &Get(HSQUIRRELVM vm, int index) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, nullptr); return *(${NAME} *)instance; } };")
|
||||
string(APPEND SQUIRREL_EXPORT "\n template <> struct Param<const ${NAME} *> { static inline const ${NAME} *Get(HSQUIRRELVM vm, int index) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, nullptr); return (${NAME} *)instance; } };")
|
||||
string(APPEND SQUIRREL_EXPORT "\n template <> struct Param<const ${NAME} &> { static inline const ${NAME} &Get(HSQUIRRELVM vm, int index) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, nullptr); return *(${NAME} *)instance; } };")
|
||||
if("${NAME}" STREQUAL "ScriptEvent")
|
||||
string(APPEND SQUIRREL_EXPORT "\n template <> struct Return<${NAME} *> { static inline int Set(HSQUIRRELVM vm, ${NAME} *res) { if (res == nullptr) { sq_pushnull(vm); return 1; } Squirrel::CreateClassInstanceVM(vm, \"${REALNAME}\", res, nullptr, DefSQDestructorCallback<${NAME}>, true); return 1; } };")
|
||||
elseif("${NAME}" STREQUAL "ScriptText")
|
||||
string(APPEND SQUIRREL_EXPORT "\n")
|
||||
string(APPEND SQUIRREL_EXPORT "\n template <> struct Param<Text *> {")
|
||||
string(APPEND SQUIRREL_EXPORT "\n static inline Text *Get(HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) {")
|
||||
string(APPEND SQUIRREL_EXPORT "\n static inline Text *Get(HSQUIRRELVM vm, int index) {")
|
||||
string(APPEND SQUIRREL_EXPORT "\n if (sq_gettype(vm, index) == OT_INSTANCE) {")
|
||||
string(APPEND SQUIRREL_EXPORT "\n return Param<ScriptText *>::Get(vm, index, ptr);")
|
||||
string(APPEND SQUIRREL_EXPORT "\n return Param<ScriptText *>::Get(vm, index);")
|
||||
string(APPEND SQUIRREL_EXPORT "\n }")
|
||||
string(APPEND SQUIRREL_EXPORT "\n if (sq_gettype(vm, index) == OT_STRING) {")
|
||||
string(APPEND SQUIRREL_EXPORT "\n return new RawText(Param<const char *>::Get(vm, index, ptr));")
|
||||
string(APPEND SQUIRREL_EXPORT "\n return new RawText(Param<const std::string &>::Get(vm, index));")
|
||||
string(APPEND SQUIRREL_EXPORT "\n }")
|
||||
string(APPEND SQUIRREL_EXPORT "\n return nullptr;")
|
||||
string(APPEND SQUIRREL_EXPORT "\n }")
|
||||
|
@ -71,13 +71,23 @@ reset_reader()
|
|||
|
||||
file(STRINGS "${SCRIPT_API_FILE}" SOURCE_LINES)
|
||||
|
||||
set(NUM_LINE 0)
|
||||
macro(doxygen_check)
|
||||
if(NOT "${DOXYGEN_SKIP}" STREQUAL "")
|
||||
message(FATAL_ERROR "${SCRIPT_API_FILE}:${NUM_LINE}: a DOXYGEN_API block was not properly closed")
|
||||
endif()
|
||||
endmacro()
|
||||
|
||||
foreach(LINE IN LISTS SOURCE_LINES)
|
||||
math(EXPR NUM_LINE "${NUM_LINE} + 1")
|
||||
# Ignore special doxygen blocks
|
||||
if("${LINE}" MATCHES "^#ifndef DOXYGEN_API")
|
||||
doxygen_check()
|
||||
set(DOXYGEN_SKIP "next")
|
||||
continue()
|
||||
endif()
|
||||
if("${LINE}" MATCHES "^#ifdef DOXYGEN_API")
|
||||
doxygen_check()
|
||||
set(DOXYGEN_SKIP "true")
|
||||
continue()
|
||||
endif()
|
||||
|
@ -86,10 +96,10 @@ foreach(LINE IN LISTS SOURCE_LINES)
|
|||
continue()
|
||||
endif()
|
||||
if("${LINE}" MATCHES "^#else")
|
||||
if("${DOXYGEN_SKIP}" STREQUAL "next")
|
||||
if(DOXYGEN_SKIP STREQUAL "next")
|
||||
set(DOXYGEN_SKIP "true")
|
||||
else()
|
||||
unset(DOXYGEN_SKIP)
|
||||
elseif(DOXYGEN_SKIP STREQUAL "true")
|
||||
set(DOXYGEN_SKIP "false")
|
||||
endif()
|
||||
continue()
|
||||
endif()
|
||||
|
@ -299,7 +309,7 @@ foreach(LINE IN LISTS SOURCE_LINES)
|
|||
endif()
|
||||
string(APPEND SQUIRREL_EXPORT "\n /* Allow enums to be used as Squirrel parameters */")
|
||||
foreach(ENUM IN LISTS ENUMS)
|
||||
string(APPEND SQUIRREL_EXPORT "\n template <> struct Param<${ENUM}> { static inline ${ENUM} Get(HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (${ENUM})tmp; } };")
|
||||
string(APPEND SQUIRREL_EXPORT "\n template <> struct Param<${ENUM}> { static inline ${ENUM} Get(HSQUIRRELVM vm, int index) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (${ENUM})tmp; } };")
|
||||
string(APPEND SQUIRREL_EXPORT "\n template <> struct Return<${ENUM}> { static inline int Set(HSQUIRRELVM vm, ${ENUM} res) { sq_pushinteger(vm, res); return 1; } };")
|
||||
endforeach()
|
||||
endif()
|
||||
|
@ -332,13 +342,13 @@ foreach(LINE IN LISTS SOURCE_LINES)
|
|||
endif()
|
||||
|
||||
string(APPEND SQUIRREL_EXPORT "\n")
|
||||
string(APPEND SQUIRREL_EXPORT "\ntemplate <> const char *GetClassName<${CLS}, ST_${APIUC}>() { return \"${API_CLS}\"; }")
|
||||
string(APPEND SQUIRREL_EXPORT "\ntemplate <> const char *GetClassName<${CLS}, ScriptType::${APIUC}>() { return \"${API_CLS}\"; }")
|
||||
string(APPEND SQUIRREL_EXPORT "\n")
|
||||
|
||||
# Then do the registration functions of the class.
|
||||
string(APPEND SQUIRREL_EXPORT "\nvoid SQ${API_CLS}_Register(Squirrel *engine)")
|
||||
string(APPEND SQUIRREL_EXPORT "\n{")
|
||||
string(APPEND SQUIRREL_EXPORT "\n DefSQClass<${CLS}, ST_${APIUC}> SQ${API_CLS}(\"${API_CLS}\");")
|
||||
string(APPEND SQUIRREL_EXPORT "\n DefSQClass<${CLS}, ScriptType::${APIUC}> SQ${API_CLS}(\"${API_CLS}\");")
|
||||
if("${SUPER_CLS}" STREQUAL "Text" OR "${SUPER_CLS}" STREQUAL "ScriptObject" OR "${SUPER_CLS}" STREQUAL "AIAbstractiveList::Valuator")
|
||||
string(APPEND SQUIRREL_EXPORT "\n SQ${API_CLS}.PreRegister(engine);")
|
||||
else()
|
||||
|
@ -631,6 +641,8 @@ foreach(LINE IN LISTS SOURCE_LINES)
|
|||
string(APPEND TYPES "a")
|
||||
elseif("${PARAM}" MATCHES "^Text")
|
||||
string(APPEND TYPES ".")
|
||||
elseif("${PARAM}" MATCHES "^std::string")
|
||||
string(APPEND TYPES ".")
|
||||
else()
|
||||
string(APPEND TYPES "x")
|
||||
endif()
|
||||
|
@ -666,4 +678,6 @@ foreach(LINE IN LISTS SOURCE_LINES)
|
|||
endif()
|
||||
endforeach()
|
||||
|
||||
doxygen_check()
|
||||
|
||||
configure_file(${SCRIPT_API_SOURCE_FILE} ${SCRIPT_API_BINARY_FILE})
|
||||
|
|
|
@ -53,4 +53,7 @@ Do NOT remove the dmp_cmds savegames of a desync you have reported until the
|
|||
desync has been fixed; if you, by accident, send us the wrong savegames we
|
||||
will not be able to reproduce the desync and thus will be unable to fix it.
|
||||
|
||||
## More information
|
||||
|
||||
You can find more theory on the causes and debugging of desyncs in the
|
||||
[desync documentation](./desync.md).
|
||||
|
|
|
@ -195,10 +195,11 @@ Last updated: 2014-02-23
|
|||
'src/network/network_func.h'.
|
||||
(DEBUG_FAILED_DUMP_COMMANDS is explained later)
|
||||
- Put the 'commands-out.log' into the root save folder, and rename
|
||||
it to 'commands.log'.
|
||||
- Run 'openttd -D -d desync=3 -g startsavegame.sav'.
|
||||
This replays the server log and creates new 'commands-out.log'
|
||||
and 'dmp_cmds_*.sav' in your autosave folder.
|
||||
it to 'commands.log'. Strip everything and including the "newgame"
|
||||
entry from the log.
|
||||
- Run 'openttd -D -d desync=0 -g startsavegame.sav'.
|
||||
This replays the server log. Use "-d desync=3" to also create a
|
||||
new 'commands-out.log' and 'dmp_cmds_*.sav' in your autosave folder.
|
||||
|
||||
## 3.2) Evaluation of the replay
|
||||
|
||||
|
@ -226,7 +227,7 @@ Last updated: 2014-02-23
|
|||
savegames with your own ones from the replay. You can also comment/disable
|
||||
the 'NOT_REACHED' mentioned above, to get another 'dmp_cmds_*.sav' from
|
||||
the replay after the mismatch has already been detected.
|
||||
See Section 3.2 on how to compare savegames.
|
||||
See Section 3.3 on how to compare savegames.
|
||||
If the saves differ you have located the Desync between the last dmp_cmds
|
||||
that match and the first one that does not. The difference of the saves
|
||||
may point you in the direction of what causes it.
|
||||
|
@ -252,16 +253,14 @@ Last updated: 2014-02-23
|
|||
are replayed. Their internal state will thus not change in the
|
||||
replay and will differ.
|
||||
|
||||
To compare savegame more semantically, there exist some ugly hackish
|
||||
tools at:
|
||||
http://devs.openttd.org/~frosch/texts/zpipe.c
|
||||
http://devs.openttd.org/~frosch/texts/printhunk.c
|
||||
To compare savegame more semantically, easiest is to first export them
|
||||
to a JSON format with for example:
|
||||
|
||||
The first one decompresses OpenTTD savegames. The second one creates
|
||||
a textual representation of an uncompressed savegame, by parsing hunks
|
||||
and arrays and such. With both tools you need to be a bit careful
|
||||
since they work on stdin and stdout, which may not deal well with
|
||||
binary data.
|
||||
https://github.com/TrueBrain/OpenTTD-savegame-reader
|
||||
|
||||
If you have the textual representation of the savegames, you can
|
||||
compare them with regular diff tools.
|
||||
By running:
|
||||
|
||||
python -m savegame_reader --export-json dmp_cmds_NNN.sav | jq . > NNN.json
|
||||
|
||||
Now you can use any (JSON) diff tool to compare the two savegames in a
|
||||
somewhat human readable way.
|
||||
|
|
|
@ -19,14 +19,14 @@ your operating system:
|
|||
- Windows:
|
||||
- `C:\My Documents\OpenTTD` (95, 98, ME)
|
||||
- `C:\Documents and Settings\<username>\My Documents\OpenTTD` (2000, XP)
|
||||
- `C:\Users\<username>\Documents\OpenTTD` (Vista, 7, 8.1, 10)
|
||||
- `C:\Users\<username>\Documents\OpenTTD` (7, 8.1, 10, 11)
|
||||
- macOS: `~/Documents/OpenTTD`
|
||||
- Linux: `$XDG_DATA_HOME/openttd` which is usually `~/.local/share/openttd`
|
||||
when built with XDG base directory support, otherwise `~/.openttd`
|
||||
3. The shared directory
|
||||
- Windows:
|
||||
- `C:\Documents and Settings\All Users\Shared Documents\OpenTTD` (2000, XP)
|
||||
- `C:\Users\Public\Documents\OpenTTD` (Vista, 7, 8.1, 10)
|
||||
- `C:\Users\Public\Documents\OpenTTD` (7, 8.1, 10, 11)
|
||||
- macOS: `/Library/Application Support/OpenTTD`
|
||||
- Linux: not available
|
||||
4. The binary directory (where the OpenTTD executable is)
|
||||
|
|
|
@ -25,6 +25,10 @@ The translators will decide whether, where and how to apply your suggestion.
|
|||
|
||||
Sorry, we don't offer this option.
|
||||
|
||||
Only when there is a consistency problem that needs addressing, this can be done via a PR.
|
||||
We are very strict about this, and in general all PRs making translation changes will be closed.
|
||||
But if it is really needed, and the change is not a revert of any older change, a PR can be created to do mass changes to a translation.
|
||||
|
||||
### I want to change the language definition (plural form, genders, cases) of a translation.
|
||||
|
||||
Please [create an issue](https://github.com/OpenTTD/OpenTTD/issues/new/choose) for this.
|
||||
|
|
|
@ -989,8 +989,11 @@
|
|||
</tr>
|
||||
</table>
|
||||
</li>
|
||||
<li>m6 bit 7: rail station / waypoint may have catenary pylons</li>
|
||||
<li>m6 bit 6: rail station / waypoint may have catenary wires</li>
|
||||
<li>m6 bits 5..3: the station type (rail, airport, truck, bus, oilrig, dock, buoy, waypoint)</li>
|
||||
<li>m6 bit 2: pbs reservation state for railway stations/waypoints</li>
|
||||
<li>m6 bit 0: rail station / waypoint is blocked</li>
|
||||
|
||||
<li>m7 bits 4..0: <a href="#OwnershipInfo">owner</a> of road (road stops)</li>
|
||||
<li>m7: animation frame (railway stations/waypoints, airports)</li>
|
||||
|
|
|
@ -188,7 +188,7 @@ the array so you can quickly see what is used and what is not.
|
|||
<td class="bits" rowspan=2><span class="used" title="Random bits">XXXX</span> <span class="free">OOOO</span></td>
|
||||
<td class="bits" rowspan=2><span class="used" title="Custom station specifications ID">XXXX XXXX</span></td>
|
||||
<td class="bits"><span class="used" title="Graphics index">XXXX XXXX</span></td>
|
||||
<td class="bits" rowspan=2><span class="free">OO</span><span class="used" title="Station type">XXX</span> <span class="used" title="Reserved track">X</span><span class="free">OO</span></td>
|
||||
<td class="bits" rowspan=2><span class="used" title="May have pylons">X</span><span class="used" title="May have wires">X</span><span class="used" title="Station type">XXX</span> <span class="used" title="Reserved track">X</span><span class="free">O</span><span class="used" title="Tile is blocked">X</span></td>
|
||||
<td class="bits" rowspan=2><span class="used" title="Animation frame">XXXX XXXX</span></td>
|
||||
<td class="bits" rowspan=2><span class="free">OOOO OOOO OO</span><span class="used" title="Railway type">XX XXXX</span></td>
|
||||
</tr>
|
||||
|
|
|
@ -193,6 +193,9 @@ If it is, and your server still isn't showing up, start OpenTTD with
|
|||
`-d net=4` as extra argument. This will show debug message related to the
|
||||
network, including communication to/from the Game Coordinator.
|
||||
|
||||
See the [Game Coordinator documentation](./game_coordinator.md) for more
|
||||
technical information about the Game Coordinator service.
|
||||
|
||||
### My server warns a lot about getaddrinfo taking N seconds
|
||||
|
||||
This could be a transient issue with your (local) DNS server, but if the
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
.\" Hey, EMACS: -*- nroff -*-
|
||||
.\" Please adjust this date whenever revising the manpage.
|
||||
.Dd October 13, 2014
|
||||
.Dd August 12, 2023
|
||||
.Dt OPENTTD 6
|
||||
.Os
|
||||
.Sh NAME
|
||||
|
@ -8,20 +8,18 @@
|
|||
.Nd open source clone of the Microprose game \(lqTransport Tycoon Deluxe\(rq
|
||||
.Sh SYNOPSIS
|
||||
.Nm
|
||||
.Op Fl efhx
|
||||
.Op Fl efhQxX
|
||||
.Op Fl b Ar blitter
|
||||
.Op Fl c Ar config_file
|
||||
.Op Fl d Op Ar level | Ar cat Ns = Ns Ar lvl Ns Op , Ns Ar ...
|
||||
.Op Fl D Oo Ar host Oc Ns Op : Ns Ar port
|
||||
.Op Fl g Op Ar savegame
|
||||
.Op Fl g Op Ar file
|
||||
.Op Fl G Ar seed
|
||||
.Op Fl I Ar graphicsset
|
||||
.Op Fl l Ar host Ns Op : Ns Ar port
|
||||
.Op Fl m Ar driver
|
||||
.Op Fl M Ar musicset
|
||||
.Op Fl n Ar host Ns Oo : Ns Ar port Oc Ns Op # Ns Ar player
|
||||
.Op Fl n Ar host Ns Oo : Ns Ar port Oc Ns Op # Ns Ar company
|
||||
.Op Fl p Ar password
|
||||
.Op Fl P Ar password
|
||||
.Op Fl q Ar savegame
|
||||
.Op Fl r Ar width Ns x Ns Ar height
|
||||
.Op Fl s Ar driver
|
||||
|
@ -29,7 +27,7 @@
|
|||
.Op Fl t Ar year
|
||||
.Op Fl v Ar driver
|
||||
.Sh OPTIONS
|
||||
.Bl -tag -width "-n host[:port][#player]"
|
||||
.Bl -tag -width "-n host[:port][#company]"
|
||||
.It Fl b Ar blitter
|
||||
Select the blitter
|
||||
.Ar blitter ;
|
||||
|
@ -63,11 +61,11 @@ Start in world editor mode.
|
|||
.It Fl f
|
||||
Fork into background (dedicated server only, see
|
||||
.Fl D ) .
|
||||
.It Fl g Op Ar savegame
|
||||
.It Fl g Op Ar file
|
||||
Load
|
||||
.Ar savegame
|
||||
at start or start a new game if omitted.
|
||||
.Ar savegame
|
||||
.Ar file
|
||||
(can be either a savegame, scenario, or heightmap) at start or start a new game if omitted.
|
||||
.Ar file
|
||||
must be either an absolute path or one relative to the current path or one of
|
||||
the search paths.
|
||||
.It Fl G Ar seed
|
||||
|
@ -82,11 +80,6 @@ Select the graphics set
|
|||
see
|
||||
.Fl h
|
||||
for a full list.
|
||||
.It Fl l Ar host Ns Op : Ns Ar port
|
||||
Redirect
|
||||
.Fn DEBUG
|
||||
output; see
|
||||
.Fl D .
|
||||
.It Fl m Ar driver
|
||||
Select the music driver
|
||||
.Ar driver ;
|
||||
|
@ -99,19 +92,23 @@ Select the music set
|
|||
see
|
||||
.Fl h
|
||||
for a full list.
|
||||
.It Fl n Ar host Ns Oo : Ns Ar port Oc Ns Op # Ns Ar player
|
||||
Join a network game, optionally specifying a port to connect to and player to
|
||||
.It Fl n Ar host Ns Oo : Ns Ar port Oc Ns Op # Ns Ar company
|
||||
Join a network game, optionally specifying a port to connect to and company to
|
||||
play as.
|
||||
.It Fl p Ar password
|
||||
Password used to join server.
|
||||
Only useful with
|
||||
.Fl n .
|
||||
.It Fl P Ar password
|
||||
Password used to join company.
|
||||
Only useful with
|
||||
.Fl n .
|
||||
.It Fl q Ar savegame
|
||||
Write some information about the specified savegame and exit.
|
||||
.It Fl Q
|
||||
Don't scan for/load NewGRF files on startup.
|
||||
.Pp
|
||||
Passing
|
||||
.Fl Q
|
||||
twice (so,
|
||||
.Fl QQ
|
||||
) will disable NewGRF scanning/loading entirely.
|
||||
.It Fl r Ar width Ns x Ns Ar height
|
||||
Set the resolution to
|
||||
.Ar width
|
||||
|
@ -141,6 +138,8 @@ see
|
|||
for a full list.
|
||||
.It Fl x
|
||||
Do not automatically save to config file on exit.
|
||||
.It Fl X
|
||||
Do not use global folders to search for files.
|
||||
.El
|
||||
.Sh SEE ALSO
|
||||
.Lk https://wiki.openttd.org "Wiki"
|
||||
|
|
|
@ -7,15 +7,17 @@ This guide is for OpenTTD developers/maintainers, to release a new version of Op
|
|||
* If this is a beta version release, skip this step.
|
||||
|
||||
* If this is an RC1 (first Release Candidate) build, create a new branch `release/nn` where `nn` is the major version number, then apply changes similar to [PR#9573](https://github.com/OpenTTD/OpenTTD/pull/9573). You also need to forwardport the changelog, as in [PR#10113](https://github.com/OpenTTD/OpenTTD/pull/10113).
|
||||
* Update CMakeLists.txt
|
||||
* Add a new (empty) AI compatibility script in bin/ai/
|
||||
* Add the new version to CheckAPIVersion in src/ai/ai_info.cpp + src/game/game_info.cpp
|
||||
* Add the new version to src/script/api/ai_changelog.hpp + src/script/api/game_changelog.hpp
|
||||
* Update the version of regression in bin/ai/regression/regression_info.nut
|
||||
* Add a note to src/saveload/saveload.h about which savegame version is used in the branch.
|
||||
* Update the version in `CMakeLists.txt` in the master branch, heading for the next major release, e.g. from 14.0 to 15.0.
|
||||
* Add a new (empty) AI compatibility script in `bin/ai/`
|
||||
* Add the new version to CheckAPIVersion in `src/ai/ai_info.cpp` and `src/game/game_info.cpp`
|
||||
* Add the new version to `src/script/api/ai_changelog.hpp` and `src/script/api/game_changelog.hpp`
|
||||
* Update the version of regression in `bin/ai/regression/regression_info.nut`
|
||||
* Add a note to `src/saveload/saveload.h` about which savegame version is used in the branch.
|
||||
|
||||
* If this is a later RC or release build and the release branch already exists, you'll need to backport fixes and language from master to this branch, which were merged after the branch diverged from master. You can use these two helper scripts: https://github.com/OpenTTD/scripts/tree/main/backport
|
||||
|
||||
* If this is a maintenance release, update the version in `CMakeLists.txt` in the release branch, e.g. from 14.0 to 14.1.
|
||||
|
||||
## Step 1: Prepare changelog documentation
|
||||
|
||||
1. Update the [changelog](../changelog.txt) with new changes since the last release.
|
||||
|
@ -29,20 +31,26 @@ This guide is for OpenTTD developers/maintainers, to release a new version of Op
|
|||
|
||||
1. Go to https://github.com/OpenTTD/website/new/main/_posts and write a new announcement post. See a [previous example](https://github.com/OpenTTD/website/pull/238) for a template.
|
||||
2. Create a new branch for this post and open a PR for it.
|
||||
3. Write announcement text for socials like Forum/Discord/Twitter/Reddit and include it in the PR.
|
||||
3. Write announcement text for the store pages and socials like TT-Forums / Discord / Twitter / Reddit / Fosstodon / etc., and include it in the PR.
|
||||
4. Create a Steam news image for that post and include it in the PR.
|
||||
5. Check the website post (preview link via checks page) and make corrections. We usually just use the GitHub web interface for this and squash the result later.
|
||||
5. Check the website post ("View Deployment" link) and make corrections. We usually just use the GitHub web interface for this and squash the result later.
|
||||
6. Get this PR approved, but do not merge yet.
|
||||
|
||||
## Step 3: Make the actual OpenTTD release
|
||||
|
||||
1. Go to https://github.com/OpenTTD/OpenTTD/releases/new and create a new tag matching the release number. For the body of the release, see any older release. "Set as a pre-release" for a beta or RC, set as latest for a real release.
|
||||
2. Merge website PR.
|
||||
3. Wait for the OpenTTD release checks to be complete.
|
||||
4. Check that website links to the new release are working and correct, using the [staging website](https://www-staging.openttd.org/).
|
||||
5. If this is a full release, ask orudge to update the Microsoft Store and TrueBrain to move the release from the "testing" to "default" branch on Steam.
|
||||
1. Confirm that the version in `CMakeLists.txt` matches the intended release version.
|
||||
2. Go to https://github.com/OpenTTD/OpenTTD/releases/new and create a new tag matching the release number. For the body of the release, copy in the changelog. "Set as a pre-release" for a beta or RC.
|
||||
3. Wait for the OpenTTD release workflow to be complete.
|
||||
4. If this is a full release:
|
||||
* for `Steam`: under Steamworks -> SteamPipe -> Builds, set the "testing" branch live on the "default" branch. This will request 2FA validation.
|
||||
* for `GOG`: under Builds, "Publish" the freshly uploaded builds to `Master`, `GOG-use only` and `Testing`.
|
||||
* for `Microsoft Store`: ask orudge to publish the new release.
|
||||
|
||||
Access to `Steam`, `GOG` and/or `Microsoft Store` requires a developer account on that platform.
|
||||
You will need access to the shared keystore in order to create such an account.
|
||||
For help and/or access to either or both, please contact TrueBrain.
|
||||
|
||||
## Step 4: Tell the world
|
||||
|
||||
1. Tag and create a website release to trigger the actions that update the website.
|
||||
2. After the website is live, make announcements on social media. You may need to coordinate with other developers who can make posts on Twitter, Reddit, Steam, and GOG.
|
||||
1. Merge the website PR. This will publish the release post.
|
||||
2. Make announcements on social media and store pages. You may need to coordinate with other developers who can make posts on TT-Forums, Twitter, Reddit, Fosstodon, Discord, Steam, GOG, Microsoft Store, etc.
|
||||
|
|
|
@ -0,0 +1,34 @@
|
|||
# OpenTTD's Symbol Server
|
||||
|
||||
For all official releases, OpenTTD collects the Breakpad Symbols (SYM-files) and Microsoft's Symbols (PDB-files), and publishes them on our own Symbol Server (https://symbols.openttd.org).
|
||||
|
||||
These symbol files are needed to analyze `crash.dmp` files as attached to issues by users.
|
||||
A `crash.dmp` is created on Windows, Linux, and MacOS when a crash happens.
|
||||
This combined with the `crash.log` should give a pretty good indication what was going on at the moment the game crashed.
|
||||
|
||||
## Analyzing a crash.dmp
|
||||
|
||||
### MSVC
|
||||
|
||||
In MSVC you can add the above URL as Symbol Server (and please enable MSVC's for all other libraries), allowing you to analyze `crash.dmp`.
|
||||
|
||||
Now simply open up the `crash.dmp`, and start debugging.
|
||||
|
||||
### All other platforms
|
||||
|
||||
The best tool to use is `minidump-stackwalk` as published in the Rust's cargo index:
|
||||
|
||||
```bash
|
||||
cargo install --locked minidump-stackwalk
|
||||
```
|
||||
|
||||
For how to install Rust, please see [here](https://doc.rust-lang.org/cargo/getting-started/installation.html).
|
||||
|
||||
Now run the tool like:
|
||||
|
||||
```bash
|
||||
minidump-stackwalk <crash.dmp> --symbols-url https://symbols.openttd.org
|
||||
```
|
||||
|
||||
For convenience, the above Symbol Server also check with Mozilla's Symbol Server in case any other library but OpenTTD is requested.
|
||||
This means files like `libc`, `kernel32.dll`, etc are all available on the above mentioned Symbol Server.
|
|
@ -18,6 +18,10 @@ set(BASESET_OTHER_SOURCE_FILES
|
|||
${CMAKE_CURRENT_SOURCE_DIR}/opntitle.dat
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/orig_extra.grf
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../openttd.32.bmp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/OpenTTD-Sans.ttf
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/OpenTTD-Serif.ttf
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/OpenTTD-Small.ttf
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/OpenTTD-Mono.ttf
|
||||
)
|
||||
|
||||
# Done by the subdirectories, if nforenum / grfcodec is installed
|
||||
|
@ -49,6 +53,7 @@ foreach(BASESET_SOURCE_FILE IN LISTS BASESET_SOURCE_FILES)
|
|||
MAIN_DEPENDENCY ${BASESET_SOURCE_FILE}
|
||||
DEPENDS ${LANG_SOURCE_FILES}
|
||||
${BASESET_EXTRAGRF_FILE}
|
||||
${BASESET_EXTRAGRF_FILE}.hash
|
||||
${CMAKE_SOURCE_DIR}/cmake/scripts/Baseset.cmake
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
|
||||
COMMENT "Generating ${BASESET_SOURCE_FILE_NAME} baseset metadata file"
|
||||
|
@ -62,7 +67,7 @@ foreach(BASESET_OTHER_SOURCE_FILE IN LISTS BASESET_OTHER_SOURCE_FILES)
|
|||
get_filename_component(BASESET_OTHER_SOURCE_FILE_NAME "${BASESET_OTHER_SOURCE_FILE}" NAME)
|
||||
set(BASESET_OTHER_BINARY_FILE "${CMAKE_BINARY_DIR}/baseset/${BASESET_OTHER_SOURCE_FILE_NAME}")
|
||||
|
||||
add_custom_command(OUTPUT ${BASESET_OTHER_BINARY_FILE}
|
||||
add_custom_command_timestamp(OUTPUT ${BASESET_OTHER_BINARY_FILE}
|
||||
COMMAND ${CMAKE_COMMAND} -E copy
|
||||
${BASESET_OTHER_SOURCE_FILE}
|
||||
${BASESET_OTHER_BINARY_FILE}
|
||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -0,0 +1,6 @@
|
|||
# OpenTTD TrueType font
|
||||
|
||||
The OpenTTD TrueType font was created by Zephyris and is maintained on [Github](https://github.com/zephyris/openttd-ttf).
|
||||
It is licensed under GPL-2.0.
|
||||
|
||||
The currently included files correspond to release v0.6.
|
Binary file not shown.
|
@ -0,0 +1 @@
|
|||
4f03553f614a06d86dc06376db3353c7
|
|
@ -5,5 +5,47 @@
|
|||
# working on it / have the tools installed.
|
||||
if(GRFCODEC_FOUND)
|
||||
include(CreateGrfCommand)
|
||||
create_grf_command()
|
||||
create_grf_command(
|
||||
NFO_SOURCE_FILES ${CMAKE_CURRENT_SOURCE_DIR}/airports.nfo
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/airport_preview.nfo
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/aqueduct.nfo
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/autorail.nfo
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/canals.nfo
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/chars.nfo
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/elrails.nfo
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/foundations.nfo
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/mono.nfo
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/oneway.nfo
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/openttd.nfo
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/openttdgui.nfo
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/palette.nfo
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/roadstops.nfo
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/signals.nfo
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/sloped_tracks.nfo
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/tramtracks.nfo
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/tunnel_portals.nfo
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/2ccmap.nfo
|
||||
PNG_SOURCE_FILES ${CMAKE_CURRENT_SOURCE_DIR}/airports.png
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/airport_preview.png
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/aqueduct.png
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/autorail.png
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/canals.png
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/canal_locks.png
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/chars.png
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/elrails.png
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/foundations.png
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/mono.png
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/oneway.png
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/openttdgui.png
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/openttdgui_build_tram.png
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/openttdgui_convert_road.png
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/openttdgui_convert_tram.png
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/openttdgui_group_livery.png
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/roadstops.png
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/signals.png
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/sloped_tracks.png
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/tramtracks.png
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/tramtracks_bare_depot.png
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/tunnel_portals.png
|
||||
)
|
||||
endif()
|
||||
|
|
|
@ -5,233 +5,233 @@
|
|||
//
|
||||
-1 * 0 0C "Monospaced characters (Liberation Mono)"
|
||||
-1 * 0 12 01 03 60 20 00
|
||||
-1 sprites/mono.png 8bpp 10 30 7 13 0 0 normal
|
||||
-1 sprites/mono.png 8bpp 25 30 7 13 0 0 normal
|
||||
-1 sprites/mono.png 8bpp 40 30 7 13 0 0 normal
|
||||
-1 sprites/mono.png 8bpp 55 30 7 13 0 0 normal
|
||||
-1 sprites/mono.png 8bpp 70 30 7 13 0 0 normal
|
||||
-1 sprites/mono.png 8bpp 85 30 7 13 0 0 normal
|
||||
-1 sprites/mono.png 8bpp 100 30 7 13 0 0 normal
|
||||
-1 sprites/mono.png 8bpp 115 30 7 13 0 0 normal
|
||||
-1 sprites/mono.png 8bpp 130 30 7 13 0 0 normal
|
||||
-1 sprites/mono.png 8bpp 145 30 7 13 0 0 normal
|
||||
-1 sprites/mono.png 8bpp 160 30 7 13 0 0 normal
|
||||
-1 sprites/mono.png 8bpp 175 30 7 13 0 0 normal
|
||||
-1 sprites/mono.png 8bpp 190 30 7 13 0 0 normal
|
||||
-1 sprites/mono.png 8bpp 205 30 7 13 0 0 normal
|
||||
-1 sprites/mono.png 8bpp 220 30 7 13 0 0 normal
|
||||
-1 sprites/mono.png 8bpp 235 30 7 13 0 0 normal
|
||||
-1 sprites/mono.png 8bpp 250 30 7 13 0 0 normal
|
||||
-1 sprites/mono.png 8bpp 265 30 7 13 0 0 normal
|
||||
-1 sprites/mono.png 8bpp 280 30 7 13 0 0 normal
|
||||
-1 sprites/mono.png 8bpp 295 30 7 13 0 0 normal
|
||||
-1 sprites/mono.png 8bpp 310 30 7 13 0 0 normal
|
||||
-1 sprites/mono.png 8bpp 325 30 7 13 0 0 normal
|
||||
-1 sprites/mono.png 8bpp 340 30 7 13 0 0 normal
|
||||
-1 sprites/mono.png 8bpp 355 30 7 13 0 0 normal
|
||||
-1 sprites/mono.png 8bpp 370 30 7 13 0 0 normal
|
||||
-1 sprites/mono.png 8bpp 385 30 7 13 0 0 normal
|
||||
-1 sprites/mono.png 8bpp 400 30 7 13 0 0 normal
|
||||
-1 sprites/mono.png 8bpp 415 30 7 13 0 0 normal
|
||||
-1 sprites/mono.png 8bpp 430 30 7 13 0 0 normal
|
||||
-1 sprites/mono.png 8bpp 445 30 7 13 0 0 normal
|
||||
-1 sprites/mono.png 8bpp 460 30 7 13 0 0 normal
|
||||
-1 sprites/mono.png 8bpp 475 30 7 13 0 0 normal
|
||||
-1 sprites/mono.png 8bpp 10 50 7 13 0 0 normal
|
||||
-1 sprites/mono.png 8bpp 25 50 7 13 0 0 normal
|
||||
-1 sprites/mono.png 8bpp 40 50 7 13 0 0 normal
|
||||
-1 sprites/mono.png 8bpp 55 50 7 13 0 0 normal
|
||||
-1 sprites/mono.png 8bpp 70 50 7 13 0 0 normal
|
||||
-1 sprites/mono.png 8bpp 85 50 7 13 0 0 normal
|
||||
-1 sprites/mono.png 8bpp 100 50 7 13 0 0 normal
|
||||
-1 sprites/mono.png 8bpp 115 50 7 13 0 0 normal
|
||||
-1 sprites/mono.png 8bpp 130 50 7 13 0 0 normal
|
||||
-1 sprites/mono.png 8bpp 145 50 7 13 0 0 normal
|
||||
-1 sprites/mono.png 8bpp 160 50 7 13 0 0 normal
|
||||
-1 sprites/mono.png 8bpp 175 50 7 13 0 0 normal
|
||||
-1 sprites/mono.png 8bpp 190 50 7 13 0 0 normal
|
||||
-1 sprites/mono.png 8bpp 205 50 7 13 0 0 normal
|
||||
-1 sprites/mono.png 8bpp 220 50 7 13 0 0 normal
|
||||
-1 sprites/mono.png 8bpp 235 50 7 13 0 0 normal
|
||||
-1 sprites/mono.png 8bpp 250 50 7 13 0 0 normal
|
||||
-1 sprites/mono.png 8bpp 265 50 7 13 0 0 normal
|
||||
-1 sprites/mono.png 8bpp 280 50 7 13 0 0 normal
|
||||
-1 sprites/mono.png 8bpp 295 50 7 13 0 0 normal
|
||||
-1 sprites/mono.png 8bpp 310 50 7 13 0 0 normal
|
||||
-1 sprites/mono.png 8bpp 325 50 7 13 0 0 normal
|
||||
-1 sprites/mono.png 8bpp 340 50 7 13 0 0 normal
|
||||
-1 sprites/mono.png 8bpp 355 50 7 13 0 0 normal
|
||||
-1 sprites/mono.png 8bpp 370 50 7 13 0 0 normal
|
||||
-1 sprites/mono.png 8bpp 385 50 7 13 0 0 normal
|
||||
-1 sprites/mono.png 8bpp 400 50 7 13 0 0 normal
|
||||
-1 sprites/mono.png 8bpp 415 50 7 13 0 0 normal
|
||||
-1 sprites/mono.png 8bpp 430 50 7 13 0 0 normal
|
||||
-1 sprites/mono.png 8bpp 445 50 7 13 0 0 normal
|
||||
-1 sprites/mono.png 8bpp 460 50 7 13 0 0 normal
|
||||
-1 sprites/mono.png 8bpp 475 50 7 13 0 0 normal
|
||||
-1 sprites/mono.png 8bpp 10 70 7 13 0 0 normal
|
||||
-1 sprites/mono.png 8bpp 25 70 7 13 0 0 normal
|
||||
-1 sprites/mono.png 8bpp 40 70 7 13 0 0 normal
|
||||
-1 sprites/mono.png 8bpp 55 70 7 13 0 0 normal
|
||||
-1 sprites/mono.png 8bpp 70 70 7 13 0 0 normal
|
||||
-1 sprites/mono.png 8bpp 85 70 7 13 0 0 normal
|
||||
-1 sprites/mono.png 8bpp 100 70 7 13 0 0 normal
|
||||
-1 sprites/mono.png 8bpp 115 70 7 13 0 0 normal
|
||||
-1 sprites/mono.png 8bpp 130 70 7 13 0 0 normal
|
||||
-1 sprites/mono.png 8bpp 145 70 7 13 0 0 normal
|
||||
-1 sprites/mono.png 8bpp 160 70 7 13 0 0 normal
|
||||
-1 sprites/mono.png 8bpp 175 70 7 13 0 0 normal
|
||||
-1 sprites/mono.png 8bpp 190 70 7 13 0 0 normal
|
||||
-1 sprites/mono.png 8bpp 205 70 7 13 0 0 normal
|
||||
-1 sprites/mono.png 8bpp 220 70 7 13 0 0 normal
|
||||
-1 sprites/mono.png 8bpp 235 70 7 13 0 0 normal
|
||||
-1 sprites/mono.png 8bpp 250 70 7 13 0 0 normal
|
||||
-1 sprites/mono.png 8bpp 265 70 7 13 0 0 normal
|
||||
-1 sprites/mono.png 8bpp 280 70 7 13 0 0 normal
|
||||
-1 sprites/mono.png 8bpp 295 70 7 13 0 0 normal
|
||||
-1 sprites/mono.png 8bpp 310 70 7 13 0 0 normal
|
||||
-1 sprites/mono.png 8bpp 325 70 7 13 0 0 normal
|
||||
-1 sprites/mono.png 8bpp 340 70 7 13 0 0 normal
|
||||
-1 sprites/mono.png 8bpp 355 70 7 13 0 0 normal
|
||||
-1 sprites/mono.png 8bpp 370 70 7 13 0 0 normal
|
||||
-1 sprites/mono.png 8bpp 385 70 7 13 0 0 normal
|
||||
-1 sprites/mono.png 8bpp 400 70 7 13 0 0 normal
|
||||
-1 sprites/mono.png 8bpp 415 70 7 13 0 0 normal
|
||||
-1 sprites/mono.png 8bpp 430 70 7 13 0 0 normal
|
||||
-1 sprites/mono.png 8bpp 445 70 7 13 0 0 normal
|
||||
-1 sprites/mono.png 8bpp 460 70 7 13 0 0 normal
|
||||
-1 sprites/mono.png 8bpp 475 70 7 13 0 0 normal
|
||||
-1 sprites/mono.png 8bpp 10 30 7 13 0 -2 normal
|
||||
-1 sprites/mono.png 8bpp 25 30 7 13 0 -2 normal
|
||||
-1 sprites/mono.png 8bpp 40 30 7 13 0 -2 normal
|
||||
-1 sprites/mono.png 8bpp 55 30 7 13 0 -2 normal
|
||||
-1 sprites/mono.png 8bpp 70 30 7 13 0 -2 normal
|
||||
-1 sprites/mono.png 8bpp 85 30 7 13 0 -2 normal
|
||||
-1 sprites/mono.png 8bpp 100 30 7 13 0 -2 normal
|
||||
-1 sprites/mono.png 8bpp 115 30 7 13 0 -2 normal
|
||||
-1 sprites/mono.png 8bpp 130 30 7 13 0 -2 normal
|
||||
-1 sprites/mono.png 8bpp 145 30 7 13 0 -2 normal
|
||||
-1 sprites/mono.png 8bpp 160 30 7 13 0 -2 normal
|
||||
-1 sprites/mono.png 8bpp 175 30 7 13 0 -2 normal
|
||||
-1 sprites/mono.png 8bpp 190 30 7 13 0 -2 normal
|
||||
-1 sprites/mono.png 8bpp 205 30 7 13 0 -2 normal
|
||||
-1 sprites/mono.png 8bpp 220 30 7 13 0 -2 normal
|
||||
-1 sprites/mono.png 8bpp 235 30 7 13 0 -2 normal
|
||||
-1 sprites/mono.png 8bpp 250 30 7 13 0 -2 normal
|
||||
-1 sprites/mono.png 8bpp 265 30 7 13 0 -2 normal
|
||||
-1 sprites/mono.png 8bpp 280 30 7 13 0 -2 normal
|
||||
-1 sprites/mono.png 8bpp 295 30 7 13 0 -2 normal
|
||||
-1 sprites/mono.png 8bpp 310 30 7 13 0 -2 normal
|
||||
-1 sprites/mono.png 8bpp 325 30 7 13 0 -2 normal
|
||||
-1 sprites/mono.png 8bpp 340 30 7 13 0 -2 normal
|
||||
-1 sprites/mono.png 8bpp 355 30 7 13 0 -2 normal
|
||||
-1 sprites/mono.png 8bpp 370 30 7 13 0 -2 normal
|
||||
-1 sprites/mono.png 8bpp 385 30 7 13 0 -2 normal
|
||||
-1 sprites/mono.png 8bpp 400 30 7 13 0 -2 normal
|
||||
-1 sprites/mono.png 8bpp 415 30 7 13 0 -2 normal
|
||||
-1 sprites/mono.png 8bpp 430 30 7 13 0 -2 normal
|
||||
-1 sprites/mono.png 8bpp 445 30 7 13 0 -2 normal
|
||||
-1 sprites/mono.png 8bpp 460 30 7 13 0 -2 normal
|
||||
-1 sprites/mono.png 8bpp 475 30 7 13 0 -2 normal
|
||||
-1 sprites/mono.png 8bpp 10 50 7 13 0 -2 normal
|
||||
-1 sprites/mono.png 8bpp 25 50 7 13 0 -2 normal
|
||||
-1 sprites/mono.png 8bpp 40 50 7 13 0 -2 normal
|
||||
-1 sprites/mono.png 8bpp 55 50 7 13 0 -2 normal
|
||||
-1 sprites/mono.png 8bpp 70 50 7 13 0 -2 normal
|
||||
-1 sprites/mono.png 8bpp 85 50 7 13 0 -2 normal
|
||||
-1 sprites/mono.png 8bpp 100 50 7 13 0 -2 normal
|
||||
-1 sprites/mono.png 8bpp 115 50 7 13 0 -2 normal
|
||||
-1 sprites/mono.png 8bpp 130 50 7 13 0 -2 normal
|
||||
-1 sprites/mono.png 8bpp 145 50 7 13 0 -2 normal
|
||||
-1 sprites/mono.png 8bpp 160 50 7 13 0 -2 normal
|
||||
-1 sprites/mono.png 8bpp 175 50 7 13 0 -2 normal
|
||||
-1 sprites/mono.png 8bpp 190 50 7 13 0 -2 normal
|
||||
-1 sprites/mono.png 8bpp 205 50 7 13 0 -2 normal
|
||||
-1 sprites/mono.png 8bpp 220 50 7 13 0 -2 normal
|
||||
-1 sprites/mono.png 8bpp 235 50 7 13 0 -2 normal
|
||||
-1 sprites/mono.png 8bpp 250 50 7 13 0 -2 normal
|
||||
-1 sprites/mono.png 8bpp 265 50 7 13 0 -2 normal
|
||||
-1 sprites/mono.png 8bpp 280 50 7 13 0 -2 normal
|
||||
-1 sprites/mono.png 8bpp 295 50 7 13 0 -2 normal
|
||||
-1 sprites/mono.png 8bpp 310 50 7 13 0 -2 normal
|
||||
-1 sprites/mono.png 8bpp 325 50 7 13 0 -2 normal
|
||||
-1 sprites/mono.png 8bpp 340 50 7 13 0 -2 normal
|
||||
-1 sprites/mono.png 8bpp 355 50 7 13 0 -2 normal
|
||||
-1 sprites/mono.png 8bpp 370 50 7 13 0 -2 normal
|
||||
-1 sprites/mono.png 8bpp 385 50 7 13 0 -2 normal
|
||||
-1 sprites/mono.png 8bpp 400 50 7 13 0 -2 normal
|
||||
-1 sprites/mono.png 8bpp 415 50 7 13 0 -2 normal
|
||||
-1 sprites/mono.png 8bpp 430 50 7 13 0 -2 normal
|
||||
-1 sprites/mono.png 8bpp 445 50 7 13 0 -2 normal
|
||||
-1 sprites/mono.png 8bpp 460 50 7 13 0 -2 normal
|
||||
-1 sprites/mono.png 8bpp 475 50 7 13 0 -2 normal
|
||||
-1 sprites/mono.png 8bpp 10 70 7 13 0 -2 normal
|
||||
-1 sprites/mono.png 8bpp 25 70 7 13 0 -2 normal
|
||||
-1 sprites/mono.png 8bpp 40 70 7 13 0 -2 normal
|
||||
-1 sprites/mono.png 8bpp 55 70 7 13 0 -2 normal
|
||||
-1 sprites/mono.png 8bpp 70 70 7 13 0 -2 normal
|
||||
-1 sprites/mono.png 8bpp 85 70 7 13 0 -2 normal
|
||||
-1 sprites/mono.png 8bpp 100 70 7 13 0 -2 normal
|
||||
-1 sprites/mono.png 8bpp 115 70 7 13 0 -2 normal
|
||||
-1 sprites/mono.png 8bpp 130 70 7 13 0 -2 normal
|
||||
-1 sprites/mono.png 8bpp 145 70 7 13 0 -2 normal
|
||||
-1 sprites/mono.png 8bpp 160 70 7 13 0 -2 normal
|
||||
-1 sprites/mono.png 8bpp 175 70 7 13 0 -2 normal
|
||||
-1 sprites/mono.png 8bpp 190 70 7 13 0 -2 normal
|
||||
-1 sprites/mono.png 8bpp 205 70 7 13 0 -2 normal
|
||||
-1 sprites/mono.png 8bpp 220 70 7 13 0 -2 normal
|
||||
-1 sprites/mono.png 8bpp 235 70 7 13 0 -2 normal
|
||||
-1 sprites/mono.png 8bpp 250 70 7 13 0 -2 normal
|
||||
-1 sprites/mono.png 8bpp 265 70 7 13 0 -2 normal
|
||||
-1 sprites/mono.png 8bpp 280 70 7 13 0 -2 normal
|
||||
-1 sprites/mono.png 8bpp 295 70 7 13 0 -2 normal
|
||||
-1 sprites/mono.png 8bpp 310 70 7 13 0 -2 normal
|
||||
-1 sprites/mono.png 8bpp 325 70 7 13 0 -2 normal
|
||||
-1 sprites/mono.png 8bpp 340 70 7 13 0 -2 normal
|
||||
-1 sprites/mono.png 8bpp 355 70 7 13 0 -2 normal
|
||||
-1 sprites/mono.png 8bpp 370 70 7 13 0 -2 normal
|
||||
-1 sprites/mono.png 8bpp 385 70 7 13 0 -2 normal
|
||||
-1 sprites/mono.png 8bpp 400 70 7 13 0 -2 normal
|
||||
-1 sprites/mono.png 8bpp 415 70 7 13 0 -2 normal
|
||||
-1 sprites/mono.png 8bpp 430 70 7 13 0 -2 normal
|
||||
-1 sprites/mono.png 8bpp 445 70 7 13 0 -2 normal
|
||||
-1 sprites/mono.png 8bpp 460 70 7 13 0 -2 normal
|
||||
-1 sprites/mono.png 8bpp 475 70 7 13 0 -2 normal
|
||||
|
||||
-1 * 0 12 01 03 80 80 00
|
||||
-1 sprites/mono.png 8bpp 10 90 7 13 0 0 normal
|
||||
-1 sprites/mono.png 8bpp 25 90 7 13 0 0 normal
|
||||
-1 sprites/mono.png 8bpp 40 90 7 13 0 0 normal
|
||||
-1 sprites/mono.png 8bpp 55 90 7 13 0 0 normal
|
||||
-1 sprites/mono.png 8bpp 70 90 7 13 0 0 normal
|
||||
-1 sprites/mono.png 8bpp 85 90 7 13 0 0 normal
|
||||
-1 sprites/mono.png 8bpp 100 90 7 13 0 0 normal
|
||||
-1 sprites/mono.png 8bpp 115 90 7 13 0 0 normal
|
||||
-1 sprites/mono.png 8bpp 130 90 7 13 0 0 normal
|
||||
-1 sprites/mono.png 8bpp 145 90 7 13 0 0 normal
|
||||
-1 sprites/mono.png 8bpp 160 90 7 13 0 0 normal
|
||||
-1 sprites/mono.png 8bpp 175 90 7 13 0 0 normal
|
||||
-1 sprites/mono.png 8bpp 190 90 7 13 0 0 normal
|
||||
-1 sprites/mono.png 8bpp 205 90 7 13 0 0 normal
|
||||
-1 sprites/mono.png 8bpp 220 90 7 13 0 0 normal
|
||||
-1 sprites/mono.png 8bpp 235 90 7 13 0 0 normal
|
||||
-1 sprites/mono.png 8bpp 250 90 7 13 0 0 normal
|
||||
-1 sprites/mono.png 8bpp 265 90 7 13 0 0 normal
|
||||
-1 sprites/mono.png 8bpp 280 90 7 13 0 0 normal
|
||||
-1 sprites/mono.png 8bpp 295 90 7 13 0 0 normal
|
||||
-1 sprites/mono.png 8bpp 310 90 7 13 0 0 normal
|
||||
-1 sprites/mono.png 8bpp 325 90 7 13 0 0 normal
|
||||
-1 sprites/mono.png 8bpp 340 90 7 13 0 0 normal
|
||||
-1 sprites/mono.png 8bpp 355 90 7 13 0 0 normal
|
||||
-1 sprites/mono.png 8bpp 370 90 7 13 0 0 normal
|
||||
-1 sprites/mono.png 8bpp 385 90 7 13 0 0 normal
|
||||
-1 sprites/mono.png 8bpp 400 90 7 13 0 0 normal
|
||||
-1 sprites/mono.png 8bpp 415 90 7 13 0 0 normal
|
||||
-1 sprites/mono.png 8bpp 430 90 7 13 0 0 normal
|
||||
-1 sprites/mono.png 8bpp 445 90 7 13 0 0 normal
|
||||
-1 sprites/mono.png 8bpp 460 90 7 13 0 0 normal
|
||||
-1 sprites/mono.png 8bpp 475 90 7 13 0 0 normal
|
||||
-1 sprites/mono.png 8bpp 10 110 7 13 0 0 normal
|
||||
-1 sprites/mono.png 8bpp 25 110 7 13 0 0 normal
|
||||
-1 sprites/mono.png 8bpp 40 110 7 13 0 0 normal
|
||||
-1 sprites/mono.png 8bpp 55 110 7 13 0 0 normal
|
||||
-1 sprites/mono.png 8bpp 70 110 7 13 0 0 normal
|
||||
-1 sprites/mono.png 8bpp 85 110 7 13 0 0 normal
|
||||
-1 sprites/mono.png 8bpp 100 110 7 13 0 0 normal
|
||||
-1 sprites/mono.png 8bpp 115 110 7 13 0 0 normal
|
||||
-1 sprites/mono.png 8bpp 130 110 7 13 0 0 normal
|
||||
-1 sprites/mono.png 8bpp 145 110 7 13 0 0 normal
|
||||
-1 sprites/mono.png 8bpp 160 110 7 13 0 0 normal
|
||||
-1 sprites/mono.png 8bpp 175 110 7 13 0 0 normal
|
||||
-1 sprites/mono.png 8bpp 190 110 7 13 0 0 normal
|
||||
-1 sprites/mono.png 8bpp 205 110 7 13 0 0 normal
|
||||
-1 sprites/mono.png 8bpp 220 110 7 13 0 0 normal
|
||||
-1 sprites/mono.png 8bpp 235 110 7 13 0 0 normal
|
||||
-1 sprites/mono.png 8bpp 250 110 7 13 0 0 normal
|
||||
-1 sprites/mono.png 8bpp 265 110 7 13 0 0 normal
|
||||
-1 sprites/mono.png 8bpp 280 110 7 13 0 0 normal
|
||||
-1 sprites/mono.png 8bpp 295 110 7 13 0 0 normal
|
||||
-1 sprites/mono.png 8bpp 310 110 7 13 0 0 normal
|
||||
-1 sprites/mono.png 8bpp 325 110 7 13 0 0 normal
|
||||
-1 sprites/mono.png 8bpp 340 110 7 13 0 0 normal
|
||||
-1 sprites/mono.png 8bpp 355 110 7 13 0 0 normal
|
||||
-1 sprites/mono.png 8bpp 370 110 7 13 0 0 normal
|
||||
-1 sprites/mono.png 8bpp 385 110 7 13 0 0 normal
|
||||
-1 sprites/mono.png 8bpp 400 110 7 13 0 0 normal
|
||||
-1 sprites/mono.png 8bpp 415 110 7 13 0 0 normal
|
||||
-1 sprites/mono.png 8bpp 430 110 7 13 0 0 normal
|
||||
-1 sprites/mono.png 8bpp 445 110 7 13 0 0 normal
|
||||
-1 sprites/mono.png 8bpp 460 110 7 13 0 0 normal
|
||||
-1 sprites/mono.png 8bpp 475 110 7 13 0 0 normal
|
||||
-1 sprites/mono.png 8bpp 10 130 7 13 0 0 normal
|
||||
-1 sprites/mono.png 8bpp 25 130 7 13 0 0 normal
|
||||
-1 sprites/mono.png 8bpp 40 130 7 13 0 0 normal
|
||||
-1 sprites/mono.png 8bpp 55 130 7 13 0 0 normal
|
||||
-1 sprites/mono.png 8bpp 70 130 7 13 0 0 normal
|
||||
-1 sprites/mono.png 8bpp 85 130 7 13 0 0 normal
|
||||
-1 sprites/mono.png 8bpp 100 130 7 13 0 0 normal
|
||||
-1 sprites/mono.png 8bpp 115 130 7 13 0 0 normal
|
||||
-1 sprites/mono.png 8bpp 130 130 7 13 0 0 normal
|
||||
-1 sprites/mono.png 8bpp 145 130 7 13 0 0 normal
|
||||
-1 sprites/mono.png 8bpp 160 130 7 13 0 0 normal
|
||||
-1 sprites/mono.png 8bpp 175 130 7 13 0 0 normal
|
||||
-1 sprites/mono.png 8bpp 190 130 7 13 0 0 normal
|
||||
-1 sprites/mono.png 8bpp 205 130 7 13 0 0 normal
|
||||
-1 sprites/mono.png 8bpp 220 130 7 13 0 0 normal
|
||||
-1 sprites/mono.png 8bpp 235 130 7 13 0 0 normal
|
||||
-1 sprites/mono.png 8bpp 250 130 7 13 0 0 normal
|
||||
-1 sprites/mono.png 8bpp 265 130 7 13 0 0 normal
|
||||
-1 sprites/mono.png 8bpp 280 130 7 13 0 0 normal
|
||||
-1 sprites/mono.png 8bpp 295 130 7 13 0 0 normal
|
||||
-1 sprites/mono.png 8bpp 310 130 7 13 0 0 normal
|
||||
-1 sprites/mono.png 8bpp 325 130 7 13 0 0 normal
|
||||
-1 sprites/mono.png 8bpp 340 130 7 13 0 0 normal
|
||||
-1 sprites/mono.png 8bpp 355 130 7 13 0 0 normal
|
||||
-1 sprites/mono.png 8bpp 370 130 7 13 0 0 normal
|
||||
-1 sprites/mono.png 8bpp 385 130 7 13 0 0 normal
|
||||
-1 sprites/mono.png 8bpp 400 130 7 13 0 0 normal
|
||||
-1 sprites/mono.png 8bpp 415 130 7 13 0 0 normal
|
||||
-1 sprites/mono.png 8bpp 430 130 7 13 0 0 normal
|
||||
-1 sprites/mono.png 8bpp 445 130 7 13 0 0 normal
|
||||
-1 sprites/mono.png 8bpp 460 130 7 13 0 0 normal
|
||||
-1 sprites/mono.png 8bpp 475 130 7 13 0 0 normal
|
||||
-1 sprites/mono.png 8bpp 10 150 7 13 0 0 normal
|
||||
-1 sprites/mono.png 8bpp 25 150 7 13 0 0 normal
|
||||
-1 sprites/mono.png 8bpp 40 150 7 13 0 0 normal
|
||||
-1 sprites/mono.png 8bpp 55 150 7 13 0 0 normal
|
||||
-1 sprites/mono.png 8bpp 70 150 7 13 0 0 normal
|
||||
-1 sprites/mono.png 8bpp 85 150 7 13 0 0 normal
|
||||
-1 sprites/mono.png 8bpp 100 150 7 13 0 0 normal
|
||||
-1 sprites/mono.png 8bpp 115 150 7 13 0 0 normal
|
||||
-1 sprites/mono.png 8bpp 130 150 7 13 0 0 normal
|
||||
-1 sprites/mono.png 8bpp 145 150 7 13 0 0 normal
|
||||
-1 sprites/mono.png 8bpp 160 150 7 13 0 0 normal
|
||||
-1 sprites/mono.png 8bpp 175 150 7 13 0 0 normal
|
||||
-1 sprites/mono.png 8bpp 190 150 7 13 0 0 normal
|
||||
-1 sprites/mono.png 8bpp 205 150 7 13 0 0 normal
|
||||
-1 sprites/mono.png 8bpp 220 150 7 13 0 0 normal
|
||||
-1 sprites/mono.png 8bpp 235 150 7 13 0 0 normal
|
||||
-1 sprites/mono.png 8bpp 250 150 7 13 0 0 normal
|
||||
-1 sprites/mono.png 8bpp 265 150 7 13 0 0 normal
|
||||
-1 sprites/mono.png 8bpp 280 150 7 13 0 0 normal
|
||||
-1 sprites/mono.png 8bpp 295 150 7 13 0 0 normal
|
||||
-1 sprites/mono.png 8bpp 310 150 7 13 0 0 normal
|
||||
-1 sprites/mono.png 8bpp 325 150 7 13 0 0 normal
|
||||
-1 sprites/mono.png 8bpp 340 150 7 13 0 0 normal
|
||||
-1 sprites/mono.png 8bpp 355 150 7 13 0 0 normal
|
||||
-1 sprites/mono.png 8bpp 370 150 7 13 0 0 normal
|
||||
-1 sprites/mono.png 8bpp 385 150 7 13 0 0 normal
|
||||
-1 sprites/mono.png 8bpp 400 150 7 13 0 0 normal
|
||||
-1 sprites/mono.png 8bpp 415 150 7 13 0 0 normal
|
||||
-1 sprites/mono.png 8bpp 430 150 7 13 0 0 normal
|
||||
-1 sprites/mono.png 8bpp 445 150 7 13 0 0 normal
|
||||
-1 sprites/mono.png 8bpp 460 150 7 13 0 0 normal
|
||||
-1 sprites/mono.png 8bpp 475 150 7 13 0 0 normal
|
||||
-1 sprites/mono.png 8bpp 10 90 7 13 0 -2 normal
|
||||
-1 sprites/mono.png 8bpp 25 90 7 13 0 -2 normal
|
||||
-1 sprites/mono.png 8bpp 40 90 7 13 0 -2 normal
|
||||
-1 sprites/mono.png 8bpp 55 90 7 13 0 -2 normal
|
||||
-1 sprites/mono.png 8bpp 70 90 7 13 0 -2 normal
|
||||
-1 sprites/mono.png 8bpp 85 90 7 13 0 -2 normal
|
||||
-1 sprites/mono.png 8bpp 100 90 7 13 0 -2 normal
|
||||
-1 sprites/mono.png 8bpp 115 90 7 13 0 -2 normal
|
||||
-1 sprites/mono.png 8bpp 130 90 7 13 0 -2 normal
|
||||
-1 sprites/mono.png 8bpp 145 90 7 13 0 -2 normal
|
||||
-1 sprites/mono.png 8bpp 160 90 7 13 0 -2 normal
|
||||
-1 sprites/mono.png 8bpp 175 90 7 13 0 -2 normal
|
||||
-1 sprites/mono.png 8bpp 190 90 7 13 0 -2 normal
|
||||
-1 sprites/mono.png 8bpp 205 90 7 13 0 -2 normal
|
||||
-1 sprites/mono.png 8bpp 220 90 7 13 0 -2 normal
|
||||
-1 sprites/mono.png 8bpp 235 90 7 13 0 -2 normal
|
||||
-1 sprites/mono.png 8bpp 250 90 7 13 0 -2 normal
|
||||
-1 sprites/mono.png 8bpp 265 90 7 13 0 -2 normal
|
||||
-1 sprites/mono.png 8bpp 280 90 7 13 0 -2 normal
|
||||
-1 sprites/mono.png 8bpp 295 90 7 13 0 -2 normal
|
||||
-1 sprites/mono.png 8bpp 310 90 7 13 0 -2 normal
|
||||
-1 sprites/mono.png 8bpp 325 90 7 13 0 -2 normal
|
||||
-1 sprites/mono.png 8bpp 340 90 7 13 0 -2 normal
|
||||
-1 sprites/mono.png 8bpp 355 90 7 13 0 -2 normal
|
||||
-1 sprites/mono.png 8bpp 370 90 7 13 0 -2 normal
|
||||
-1 sprites/mono.png 8bpp 385 90 7 13 0 -2 normal
|
||||
-1 sprites/mono.png 8bpp 400 90 7 13 0 -2 normal
|
||||
-1 sprites/mono.png 8bpp 415 90 7 13 0 -2 normal
|
||||
-1 sprites/mono.png 8bpp 430 90 7 13 0 -2 normal
|
||||
-1 sprites/mono.png 8bpp 445 90 7 13 0 -2 normal
|
||||
-1 sprites/mono.png 8bpp 460 90 7 13 0 -2 normal
|
||||
-1 sprites/mono.png 8bpp 475 90 7 13 0 -2 normal
|
||||
-1 sprites/mono.png 8bpp 10 110 7 13 0 -2 normal
|
||||
-1 sprites/mono.png 8bpp 25 110 7 13 0 -2 normal
|
||||
-1 sprites/mono.png 8bpp 40 110 7 13 0 -2 normal
|
||||
-1 sprites/mono.png 8bpp 55 110 7 13 0 -2 normal
|
||||
-1 sprites/mono.png 8bpp 70 110 7 13 0 -2 normal
|
||||
-1 sprites/mono.png 8bpp 85 110 7 13 0 -2 normal
|
||||
-1 sprites/mono.png 8bpp 100 110 7 13 0 -2 normal
|
||||
-1 sprites/mono.png 8bpp 115 110 7 13 0 -2 normal
|
||||
-1 sprites/mono.png 8bpp 130 110 7 13 0 -2 normal
|
||||
-1 sprites/mono.png 8bpp 145 110 7 13 0 -2 normal
|
||||
-1 sprites/mono.png 8bpp 160 110 7 13 0 -2 normal
|
||||
-1 sprites/mono.png 8bpp 175 110 7 13 0 -2 normal
|
||||
-1 sprites/mono.png 8bpp 190 110 7 13 0 -2 normal
|
||||
-1 sprites/mono.png 8bpp 205 110 7 13 0 -2 normal
|
||||
-1 sprites/mono.png 8bpp 220 110 7 13 0 -2 normal
|
||||
-1 sprites/mono.png 8bpp 235 110 7 13 0 -2 normal
|
||||
-1 sprites/mono.png 8bpp 250 110 7 13 0 -2 normal
|
||||
-1 sprites/mono.png 8bpp 265 110 7 13 0 -2 normal
|
||||
-1 sprites/mono.png 8bpp 280 110 7 13 0 -2 normal
|
||||
-1 sprites/mono.png 8bpp 295 110 7 13 0 -2 normal
|
||||
-1 sprites/mono.png 8bpp 310 110 7 13 0 -2 normal
|
||||
-1 sprites/mono.png 8bpp 325 110 7 13 0 -2 normal
|
||||
-1 sprites/mono.png 8bpp 340 110 7 13 0 -2 normal
|
||||
-1 sprites/mono.png 8bpp 355 110 7 13 0 -2 normal
|
||||
-1 sprites/mono.png 8bpp 370 110 7 13 0 -2 normal
|
||||
-1 sprites/mono.png 8bpp 385 110 7 13 0 -2 normal
|
||||
-1 sprites/mono.png 8bpp 400 110 7 13 0 -2 normal
|
||||
-1 sprites/mono.png 8bpp 415 110 7 13 0 -2 normal
|
||||
-1 sprites/mono.png 8bpp 430 110 7 13 0 -2 normal
|
||||
-1 sprites/mono.png 8bpp 445 110 7 13 0 -2 normal
|
||||
-1 sprites/mono.png 8bpp 460 110 7 13 0 -2 normal
|
||||
-1 sprites/mono.png 8bpp 475 110 7 13 0 -2 normal
|
||||
-1 sprites/mono.png 8bpp 10 130 7 13 0 -2 normal
|
||||
-1 sprites/mono.png 8bpp 25 130 7 13 0 -2 normal
|
||||
-1 sprites/mono.png 8bpp 40 130 7 13 0 -2 normal
|
||||
-1 sprites/mono.png 8bpp 55 130 7 13 0 -2 normal
|
||||
-1 sprites/mono.png 8bpp 70 130 7 13 0 -2 normal
|
||||
-1 sprites/mono.png 8bpp 85 130 7 13 0 -2 normal
|
||||
-1 sprites/mono.png 8bpp 100 130 7 13 0 -2 normal
|
||||
-1 sprites/mono.png 8bpp 115 130 7 13 0 -2 normal
|
||||
-1 sprites/mono.png 8bpp 130 130 7 13 0 -2 normal
|
||||
-1 sprites/mono.png 8bpp 145 130 7 13 0 -2 normal
|
||||
-1 sprites/mono.png 8bpp 160 130 7 13 0 -2 normal
|
||||
-1 sprites/mono.png 8bpp 175 130 7 13 0 -2 normal
|
||||
-1 sprites/mono.png 8bpp 190 130 7 13 0 -2 normal
|
||||
-1 sprites/mono.png 8bpp 205 130 7 13 0 -2 normal
|
||||
-1 sprites/mono.png 8bpp 220 130 7 13 0 -2 normal
|
||||
-1 sprites/mono.png 8bpp 235 130 7 13 0 -2 normal
|
||||
-1 sprites/mono.png 8bpp 250 130 7 13 0 -2 normal
|
||||
-1 sprites/mono.png 8bpp 265 130 7 13 0 -2 normal
|
||||
-1 sprites/mono.png 8bpp 280 130 7 13 0 -2 normal
|
||||
-1 sprites/mono.png 8bpp 295 130 7 13 0 -2 normal
|
||||
-1 sprites/mono.png 8bpp 310 130 7 13 0 -2 normal
|
||||
-1 sprites/mono.png 8bpp 325 130 7 13 0 -2 normal
|
||||
-1 sprites/mono.png 8bpp 340 130 7 13 0 -2 normal
|
||||
-1 sprites/mono.png 8bpp 355 130 7 13 0 -2 normal
|
||||
-1 sprites/mono.png 8bpp 370 130 7 13 0 -2 normal
|
||||
-1 sprites/mono.png 8bpp 385 130 7 13 0 -2 normal
|
||||
-1 sprites/mono.png 8bpp 400 130 7 13 0 -2 normal
|
||||
-1 sprites/mono.png 8bpp 415 130 7 13 0 -2 normal
|
||||
-1 sprites/mono.png 8bpp 430 130 7 13 0 -2 normal
|
||||
-1 sprites/mono.png 8bpp 445 130 7 13 0 -2 normal
|
||||
-1 sprites/mono.png 8bpp 460 130 7 13 0 -2 normal
|
||||
-1 sprites/mono.png 8bpp 475 130 7 13 0 -2 normal
|
||||
-1 sprites/mono.png 8bpp 10 150 7 13 0 -2 normal
|
||||
-1 sprites/mono.png 8bpp 25 150 7 13 0 -2 normal
|
||||
-1 sprites/mono.png 8bpp 40 150 7 13 0 -2 normal
|
||||
-1 sprites/mono.png 8bpp 55 150 7 13 0 -2 normal
|
||||
-1 sprites/mono.png 8bpp 70 150 7 13 0 -2 normal
|
||||
-1 sprites/mono.png 8bpp 85 150 7 13 0 -2 normal
|
||||
-1 sprites/mono.png 8bpp 100 150 7 13 0 -2 normal
|
||||
-1 sprites/mono.png 8bpp 115 150 7 13 0 -2 normal
|
||||
-1 sprites/mono.png 8bpp 130 150 7 13 0 -2 normal
|
||||
-1 sprites/mono.png 8bpp 145 150 7 13 0 -2 normal
|
||||
-1 sprites/mono.png 8bpp 160 150 7 13 0 -2 normal
|
||||
-1 sprites/mono.png 8bpp 175 150 7 13 0 -2 normal
|
||||
-1 sprites/mono.png 8bpp 190 150 7 13 0 -2 normal
|
||||
-1 sprites/mono.png 8bpp 205 150 7 13 0 -2 normal
|
||||
-1 sprites/mono.png 8bpp 220 150 7 13 0 -2 normal
|
||||
-1 sprites/mono.png 8bpp 235 150 7 13 0 -2 normal
|
||||
-1 sprites/mono.png 8bpp 250 150 7 13 0 -2 normal
|
||||
-1 sprites/mono.png 8bpp 265 150 7 13 0 -2 normal
|
||||
-1 sprites/mono.png 8bpp 280 150 7 13 0 -2 normal
|
||||
-1 sprites/mono.png 8bpp 295 150 7 13 0 -2 normal
|
||||
-1 sprites/mono.png 8bpp 310 150 7 13 0 -2 normal
|
||||
-1 sprites/mono.png 8bpp 325 150 7 13 0 -2 normal
|
||||
-1 sprites/mono.png 8bpp 340 150 7 13 0 -2 normal
|
||||
-1 sprites/mono.png 8bpp 355 150 7 13 0 -2 normal
|
||||
-1 sprites/mono.png 8bpp 370 150 7 13 0 -2 normal
|
||||
-1 sprites/mono.png 8bpp 385 150 7 13 0 -2 normal
|
||||
-1 sprites/mono.png 8bpp 400 150 7 13 0 -2 normal
|
||||
-1 sprites/mono.png 8bpp 415 150 7 13 0 -2 normal
|
||||
-1 sprites/mono.png 8bpp 430 150 7 13 0 -2 normal
|
||||
-1 sprites/mono.png 8bpp 445 150 7 13 0 -2 normal
|
||||
-1 sprites/mono.png 8bpp 460 150 7 13 0 -2 normal
|
||||
-1 sprites/mono.png 8bpp 475 150 7 13 0 -2 normal
|
||||
|
||||
//U+0178 Latin Capital Letter Y With Diaeresis (only needed for mono as it is in the base set, but relocated by some code)
|
||||
-1 * 0 12 01 03 01 78 01
|
||||
-1 sprites/mono.png 8bpp 370 230 7 13 0 0 normal
|
||||
-1 sprites/mono.png 8bpp 370 230 7 13 0 -2 normal
|
||||
|
|
Binary file not shown.
|
@ -0,0 +1 @@
|
|||
5fdc049a7a0ada4c280239f15bc38174
|
|
@ -6,9 +6,35 @@
|
|||
if(GRFCODEC_FOUND)
|
||||
include(CreateGrfCommand)
|
||||
create_grf_command(
|
||||
# We share some files with 'openttd' grf
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../openttd/airports.png
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../openttd/canals.png
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../openttd/chars.png
|
||||
NFO_SOURCE_FILES ${CMAKE_CURRENT_SOURCE_DIR}/rivers/arctic.nfo
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/rivers/rapids.nfo
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/rivers/temperate.nfo
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/rivers/toyland.nfo
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/rivers/toyland_rapids.nfo
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/rivers/tropic.nfo
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/airports_orig_extra.nfo
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/canals_extra.nfo
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/chars_orig_extra.nfo
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/fix_graphics.nfo
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/fix_gui_icons.nfo
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/orig_extra.nfo
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/shore.nfo
|
||||
PNG_SOURCE_FILES ${CMAKE_CURRENT_SOURCE_DIR}/rivers/arctic_brown.png
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/rivers/arctic_snowy.png
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/rivers/rapids.png
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/rivers/rapids_shading.png
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/rivers/temperate.png
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/rivers/toyland.png
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/rivers/toyland_rapids.png
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/rivers/toyland_rapids_shading.png
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/rivers/tropic_desert.png
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/rivers/tropic_forest.png
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/fix_graphics.png
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/fix_gui_icons.png
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/shore.png
|
||||
# We share some files with 'openttd' grf
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../openttd/airports.png
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../openttd/canals.png
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../openttd/chars.png
|
||||
)
|
||||
endif()
|
||||
|
|
|
@ -79,6 +79,7 @@
|
|||
#include "airports_orig_extra.nfo"
|
||||
#include "canals_extra.nfo"
|
||||
#include "rivers/rapids.nfo"
|
||||
#include "rivers/toyland_rapids.nfo"
|
||||
#include "rivers/temperate.nfo"
|
||||
#include "rivers/arctic.nfo"
|
||||
#include "rivers/tropic.nfo"
|
||||
|
|
|
@ -5,115 +5,243 @@
|
|||
//
|
||||
-1 * 0 0C "Rapid graphics"
|
||||
-1 * 4 01 05 01 04
|
||||
-1 sprites/rapids.png 8bpp 10 10 64 23 -31 0 normal
|
||||
-1 sprites/rapids.png 8bpp 90 10 64 39 -31 -8 normal
|
||||
-1 sprites/rapids.png 8bpp 170 10 64 23 -31 0 normal
|
||||
-1 sprites/rapids.png 8bpp 250 10 64 39 -31 -8 normal
|
||||
-1 sprites/rapids.png 8bpp 10 10 64 23 -31 0 normal
|
||||
| sprites/rapids_shading.png 32bpp 10 10 64 23 -31 0 normal
|
||||
| sprites/rapids.png mask 10 10
|
||||
-1 sprites/rapids.png 8bpp 90 10 64 39 -31 -8 normal
|
||||
| sprites/rapids_shading.png 32bpp 90 10 64 39 -31 -8 normal
|
||||
| sprites/rapids.png mask 90 10
|
||||
-1 sprites/rapids.png 8bpp 170 10 64 23 -31 0 normal
|
||||
| sprites/rapids_shading.png 32bpp 170 10 64 23 -31 0 normal
|
||||
| sprites/rapids.png mask 170 10
|
||||
-1 sprites/rapids.png 8bpp 250 10 64 39 -31 -8 normal
|
||||
| sprites/rapids_shading.png 32bpp 250 10 64 39 -31 -8 normal
|
||||
| sprites/rapids.png mask 250 10
|
||||
-1 * 7 02 05 00 01 00 00 00
|
||||
|
||||
-1 * 4 01 05 01 04
|
||||
-1 sprites/rapids.png 8bpp 10 60 64 23 -31 0 normal
|
||||
-1 sprites/rapids.png 8bpp 90 60 64 39 -31 -8 normal
|
||||
-1 sprites/rapids.png 8bpp 170 60 64 23 -31 0 normal
|
||||
-1 sprites/rapids.png 8bpp 250 60 64 39 -31 -8 normal
|
||||
-1 sprites/rapids.png 8bpp 10 60 64 23 -31 0 normal
|
||||
| sprites/rapids_shading.png 32bpp 10 60 64 23 -31 0 normal
|
||||
| sprites/rapids.png mask 10 60
|
||||
-1 sprites/rapids.png 8bpp 90 60 64 39 -31 -8 normal
|
||||
| sprites/rapids_shading.png 32bpp 90 60 64 39 -31 -8 normal
|
||||
| sprites/rapids.png mask 90 60
|
||||
-1 sprites/rapids.png 8bpp 170 60 64 23 -31 0 normal
|
||||
| sprites/rapids_shading.png 32bpp 170 60 64 23 -31 0 normal
|
||||
| sprites/rapids.png mask 170 60
|
||||
-1 sprites/rapids.png 8bpp 250 60 64 39 -31 -8 normal
|
||||
| sprites/rapids_shading.png 32bpp 250 60 64 39 -31 -8 normal
|
||||
| sprites/rapids.png mask 250 60
|
||||
-1 * 7 02 05 01 01 00 00 00
|
||||
|
||||
-1 * 4 01 05 01 04
|
||||
-1 sprites/rapids.png 8bpp 10 110 64 23 -31 0 normal
|
||||
-1 sprites/rapids.png 8bpp 90 110 64 39 -31 -8 normal
|
||||
-1 sprites/rapids.png 8bpp 170 110 64 23 -31 0 normal
|
||||
-1 sprites/rapids.png 8bpp 250 110 64 39 -31 -8 normal
|
||||
-1 sprites/rapids.png 8bpp 10 110 64 23 -31 0 normal
|
||||
| sprites/rapids_shading.png 32bpp 10 110 64 23 -31 0 normal
|
||||
| sprites/rapids.png mask 10 110
|
||||
-1 sprites/rapids.png 8bpp 90 110 64 39 -31 -8 normal
|
||||
| sprites/rapids_shading.png 32bpp 90 110 64 39 -31 -8 normal
|
||||
| sprites/rapids.png mask 90 110
|
||||
-1 sprites/rapids.png 8bpp 170 110 64 23 -31 0 normal
|
||||
| sprites/rapids_shading.png 32bpp 170 110 64 23 -31 0 normal
|
||||
| sprites/rapids.png mask 170 110
|
||||
-1 sprites/rapids.png 8bpp 250 110 64 39 -31 -8 normal
|
||||
| sprites/rapids_shading.png 32bpp 250 110 64 39 -31 -8 normal
|
||||
| sprites/rapids.png mask 250 110
|
||||
-1 * 7 02 05 02 01 00 00 00
|
||||
|
||||
-1 * 4 01 05 01 04
|
||||
-1 sprites/rapids.png 8bpp 10 160 64 23 -31 0 normal
|
||||
-1 sprites/rapids.png 8bpp 90 160 64 39 -31 -8 normal
|
||||
-1 sprites/rapids.png 8bpp 170 160 64 23 -31 0 normal
|
||||
-1 sprites/rapids.png 8bpp 250 160 64 39 -31 -8 normal
|
||||
-1 sprites/rapids.png 8bpp 10 160 64 23 -31 0 normal
|
||||
| sprites/rapids_shading.png 32bpp 10 160 64 23 -31 0 normal
|
||||
| sprites/rapids.png mask 10 160
|
||||
-1 sprites/rapids.png 8bpp 90 160 64 39 -31 -8 normal
|
||||
| sprites/rapids_shading.png 32bpp 90 160 64 39 -31 -8 normal
|
||||
| sprites/rapids.png mask 90 160
|
||||
-1 sprites/rapids.png 8bpp 170 160 64 23 -31 0 normal
|
||||
| sprites/rapids_shading.png 32bpp 170 160 64 23 -31 0 normal
|
||||
| sprites/rapids.png mask 170 160
|
||||
-1 sprites/rapids.png 8bpp 250 160 64 39 -31 -8 normal
|
||||
| sprites/rapids_shading.png 32bpp 250 160 64 39 -31 -8 normal
|
||||
| sprites/rapids.png mask 250 160
|
||||
-1 * 7 02 05 03 01 00 00 00
|
||||
|
||||
-1 * 4 01 05 01 04
|
||||
-1 sprites/rapids.png 8bpp 10 210 64 23 -31 0 normal
|
||||
-1 sprites/rapids.png 8bpp 90 210 64 39 -31 -8 normal
|
||||
-1 sprites/rapids.png 8bpp 170 210 64 23 -31 0 normal
|
||||
-1 sprites/rapids.png 8bpp 250 210 64 39 -31 -8 normal
|
||||
-1 sprites/rapids.png 8bpp 10 210 64 23 -31 0 normal
|
||||
| sprites/rapids_shading.png 32bpp 10 210 64 23 -31 0 normal
|
||||
| sprites/rapids.png mask 10 210
|
||||
-1 sprites/rapids.png 8bpp 90 210 64 39 -31 -8 normal
|
||||
| sprites/rapids_shading.png 32bpp 90 210 64 39 -31 -8 normal
|
||||
| sprites/rapids.png mask 90 210
|
||||
-1 sprites/rapids.png 8bpp 170 210 64 23 -31 0 normal
|
||||
| sprites/rapids_shading.png 32bpp 170 210 64 23 -31 0 normal
|
||||
| sprites/rapids.png mask 170 210
|
||||
-1 sprites/rapids.png 8bpp 250 210 64 39 -31 -8 normal
|
||||
| sprites/rapids_shading.png 32bpp 250 210 64 39 -31 -8 normal
|
||||
| sprites/rapids.png mask 250 210
|
||||
-1 * 7 02 05 04 01 00 00 00
|
||||
|
||||
-1 * 4 01 05 01 04
|
||||
-1 sprites/rapids.png 8bpp 10 260 64 23 -31 0 normal
|
||||
-1 sprites/rapids.png 8bpp 90 260 64 39 -31 -8 normal
|
||||
-1 sprites/rapids.png 8bpp 170 260 64 23 -31 0 normal
|
||||
-1 sprites/rapids.png 8bpp 250 260 64 39 -31 -8 normal
|
||||
-1 sprites/rapids.png 8bpp 10 260 64 23 -31 0 normal
|
||||
| sprites/rapids_shading.png 32bpp 10 260 64 23 -31 0 normal
|
||||
| sprites/rapids.png mask 10 260
|
||||
-1 sprites/rapids.png 8bpp 90 260 64 39 -31 -8 normal
|
||||
| sprites/rapids_shading.png 32bpp 90 260 64 39 -31 -8 normal
|
||||
| sprites/rapids.png mask 90 260
|
||||
-1 sprites/rapids.png 8bpp 170 260 64 23 -31 0 normal
|
||||
| sprites/rapids_shading.png 32bpp 170 260 64 23 -31 0 normal
|
||||
| sprites/rapids.png mask 170 260
|
||||
-1 sprites/rapids.png 8bpp 250 260 64 39 -31 -8 normal
|
||||
| sprites/rapids_shading.png 32bpp 250 260 64 39 -31 -8 normal
|
||||
| sprites/rapids.png mask 250 260
|
||||
-1 * 7 02 05 05 01 00 00 00
|
||||
|
||||
-1 * 4 01 05 01 04
|
||||
-1 sprites/rapids.png 8bpp 10 310 64 23 -31 0 normal
|
||||
-1 sprites/rapids.png 8bpp 90 310 64 39 -31 -8 normal
|
||||
-1 sprites/rapids.png 8bpp 170 310 64 23 -31 0 normal
|
||||
-1 sprites/rapids.png 8bpp 250 310 64 39 -31 -8 normal
|
||||
-1 sprites/rapids.png 8bpp 10 310 64 23 -31 0 normal
|
||||
| sprites/rapids_shading.png 32bpp 10 310 64 23 -31 0 normal
|
||||
| sprites/rapids.png mask 10 310
|
||||
-1 sprites/rapids.png 8bpp 90 310 64 39 -31 -8 normal
|
||||
| sprites/rapids_shading.png 32bpp 90 310 64 39 -31 -8 normal
|
||||
| sprites/rapids.png mask 90 310
|
||||
-1 sprites/rapids.png 8bpp 170 310 64 23 -31 0 normal
|
||||
| sprites/rapids_shading.png 32bpp 170 310 64 23 -31 0 normal
|
||||
| sprites/rapids.png mask 170 310
|
||||
-1 sprites/rapids.png 8bpp 250 310 64 39 -31 -8 normal
|
||||
| sprites/rapids_shading.png 32bpp 250 310 64 39 -31 -8 normal
|
||||
| sprites/rapids.png mask 250 310
|
||||
-1 * 7 02 05 06 01 00 00 00
|
||||
|
||||
-1 * 4 01 05 01 04
|
||||
-1 sprites/rapids.png 8bpp 10 360 64 23 -31 0 normal
|
||||
-1 sprites/rapids.png 8bpp 90 360 64 39 -31 -8 normal
|
||||
-1 sprites/rapids.png 8bpp 170 360 64 23 -31 0 normal
|
||||
-1 sprites/rapids.png 8bpp 250 360 64 39 -31 -8 normal
|
||||
-1 sprites/rapids.png 8bpp 10 360 64 23 -31 0 normal
|
||||
| sprites/rapids_shading.png 32bpp 10 360 64 23 -31 0 normal
|
||||
| sprites/rapids.png mask 10 360
|
||||
-1 sprites/rapids.png 8bpp 90 360 64 39 -31 -8 normal
|
||||
| sprites/rapids_shading.png 32bpp 90 360 64 39 -31 -8 normal
|
||||
| sprites/rapids.png mask 90 360
|
||||
-1 sprites/rapids.png 8bpp 170 360 64 23 -31 0 normal
|
||||
| sprites/rapids_shading.png 32bpp 170 360 64 23 -31 0 normal
|
||||
| sprites/rapids.png mask 170 360
|
||||
-1 sprites/rapids.png 8bpp 250 360 64 39 -31 -8 normal
|
||||
| sprites/rapids_shading.png 32bpp 250 360 64 39 -31 -8 normal
|
||||
| sprites/rapids.png mask 250 360
|
||||
-1 * 7 02 05 07 01 00 00 00
|
||||
|
||||
-1 * 4 01 05 01 04
|
||||
-1 sprites/rapids.png 8bpp 10 410 64 23 -31 0 normal
|
||||
-1 sprites/rapids.png 8bpp 90 410 64 39 -31 -8 normal
|
||||
-1 sprites/rapids.png 8bpp 170 410 64 23 -31 0 normal
|
||||
-1 sprites/rapids.png 8bpp 250 410 64 39 -31 -8 normal
|
||||
-1 sprites/rapids.png 8bpp 10 410 64 23 -31 0 normal
|
||||
| sprites/rapids_shading.png 32bpp 10 410 64 23 -31 0 normal
|
||||
| sprites/rapids.png mask 10 410
|
||||
-1 sprites/rapids.png 8bpp 90 410 64 39 -31 -8 normal
|
||||
| sprites/rapids_shading.png 32bpp 90 410 64 39 -31 -8 normal
|
||||
| sprites/rapids.png mask 90 410
|
||||
-1 sprites/rapids.png 8bpp 170 410 64 23 -31 0 normal
|
||||
| sprites/rapids_shading.png 32bpp 170 410 64 23 -31 0 normal
|
||||
| sprites/rapids.png mask 170 410
|
||||
-1 sprites/rapids.png 8bpp 250 410 64 39 -31 -8 normal
|
||||
| sprites/rapids_shading.png 32bpp 250 410 64 39 -31 -8 normal
|
||||
| sprites/rapids.png mask 250 410
|
||||
-1 * 7 02 05 08 01 00 00 00
|
||||
|
||||
-1 * 4 01 05 01 04
|
||||
-1 sprites/rapids.png 8bpp 10 460 64 23 -31 0 normal
|
||||
-1 sprites/rapids.png 8bpp 90 460 64 39 -31 -8 normal
|
||||
-1 sprites/rapids.png 8bpp 170 460 64 23 -31 0 normal
|
||||
-1 sprites/rapids.png 8bpp 250 460 64 39 -31 -8 normal
|
||||
-1 sprites/rapids.png 8bpp 10 460 64 23 -31 0 normal
|
||||
| sprites/rapids_shading.png 32bpp 10 460 64 23 -31 0 normal
|
||||
| sprites/rapids.png mask 10 460
|
||||
-1 sprites/rapids.png 8bpp 90 460 64 39 -31 -8 normal
|
||||
| sprites/rapids_shading.png 32bpp 90 460 64 39 -31 -8 normal
|
||||
| sprites/rapids.png mask 90 460
|
||||
-1 sprites/rapids.png 8bpp 170 460 64 23 -31 0 normal
|
||||
| sprites/rapids_shading.png 32bpp 170 460 64 23 -31 0 normal
|
||||
| sprites/rapids.png mask 170 460
|
||||
-1 sprites/rapids.png 8bpp 250 460 64 39 -31 -8 normal
|
||||
| sprites/rapids_shading.png 32bpp 250 460 64 39 -31 -8 normal
|
||||
| sprites/rapids.png mask 250 460
|
||||
-1 * 7 02 05 09 01 00 00 00
|
||||
|
||||
-1 * 4 01 05 01 04
|
||||
-1 sprites/rapids.png 8bpp 10 510 64 23 -31 0 normal
|
||||
-1 sprites/rapids.png 8bpp 90 510 64 39 -31 -8 normal
|
||||
-1 sprites/rapids.png 8bpp 170 510 64 23 -31 0 normal
|
||||
-1 sprites/rapids.png 8bpp 250 510 64 39 -31 -8 normal
|
||||
-1 sprites/rapids.png 8bpp 10 510 64 23 -31 0 normal
|
||||
| sprites/rapids_shading.png 32bpp 10 510 64 23 -31 0 normal
|
||||
| sprites/rapids.png mask 10 510
|
||||
-1 sprites/rapids.png 8bpp 90 510 64 39 -31 -8 normal
|
||||
| sprites/rapids_shading.png 32bpp 90 510 64 39 -31 -8 normal
|
||||
| sprites/rapids.png mask 90 510
|
||||
-1 sprites/rapids.png 8bpp 170 510 64 23 -31 0 normal
|
||||
| sprites/rapids_shading.png 32bpp 170 510 64 23 -31 0 normal
|
||||
| sprites/rapids.png mask 170 510
|
||||
-1 sprites/rapids.png 8bpp 250 510 64 39 -31 -8 normal
|
||||
| sprites/rapids_shading.png 32bpp 250 510 64 39 -31 -8 normal
|
||||
| sprites/rapids.png mask 250 510
|
||||
-1 * 7 02 05 0A 01 00 00 00
|
||||
|
||||
-1 * 4 01 05 01 04
|
||||
-1 sprites/rapids.png 8bpp 10 560 64 23 -31 0 normal
|
||||
-1 sprites/rapids.png 8bpp 90 560 64 39 -31 -8 normal
|
||||
-1 sprites/rapids.png 8bpp 170 560 64 23 -31 0 normal
|
||||
-1 sprites/rapids.png 8bpp 250 560 64 39 -31 -8 normal
|
||||
-1 sprites/rapids.png 8bpp 10 560 64 23 -31 0 normal
|
||||
| sprites/rapids_shading.png 32bpp 10 560 64 23 -31 0 normal
|
||||
| sprites/rapids.png mask 10 560
|
||||
-1 sprites/rapids.png 8bpp 90 560 64 39 -31 -8 normal
|
||||
| sprites/rapids_shading.png 32bpp 90 560 64 39 -31 -8 normal
|
||||
| sprites/rapids.png mask 90 560
|
||||
-1 sprites/rapids.png 8bpp 170 560 64 23 -31 0 normal
|
||||
| sprites/rapids_shading.png 32bpp 170 560 64 23 -31 0 normal
|
||||
| sprites/rapids.png mask 170 560
|
||||
-1 sprites/rapids.png 8bpp 250 560 64 39 -31 -8 normal
|
||||
| sprites/rapids_shading.png 32bpp 250 560 64 39 -31 -8 normal
|
||||
| sprites/rapids.png mask 250 560
|
||||
-1 * 7 02 05 0B 01 00 00 00
|
||||
|
||||
-1 * 4 01 05 01 04
|
||||
-1 sprites/rapids.png 8bpp 10 610 64 23 -31 0 normal
|
||||
-1 sprites/rapids.png 8bpp 90 610 64 39 -31 -8 normal
|
||||
-1 sprites/rapids.png 8bpp 170 610 64 23 -31 0 normal
|
||||
-1 sprites/rapids.png 8bpp 250 610 64 39 -31 -8 normal
|
||||
-1 sprites/rapids.png 8bpp 10 610 64 23 -31 0 normal
|
||||
| sprites/rapids_shading.png 32bpp 10 610 64 23 -31 0 normal
|
||||
| sprites/rapids.png mask 10 610
|
||||
-1 sprites/rapids.png 8bpp 90 610 64 39 -31 -8 normal
|
||||
| sprites/rapids_shading.png 32bpp 90 610 64 39 -31 -8 normal
|
||||
| sprites/rapids.png mask 90 610
|
||||
-1 sprites/rapids.png 8bpp 170 610 64 23 -31 0 normal
|
||||
| sprites/rapids_shading.png 32bpp 170 610 64 23 -31 0 normal
|
||||
| sprites/rapids.png mask 170 610
|
||||
-1 sprites/rapids.png 8bpp 250 610 64 39 -31 -8 normal
|
||||
| sprites/rapids_shading.png 32bpp 250 610 64 39 -31 -8 normal
|
||||
| sprites/rapids.png mask 250 610
|
||||
-1 * 7 02 05 0C 01 00 00 00
|
||||
|
||||
-1 * 4 01 05 01 04
|
||||
-1 sprites/rapids.png 8bpp 10 660 64 23 -31 0 normal
|
||||
-1 sprites/rapids.png 8bpp 90 660 64 39 -31 -8 normal
|
||||
-1 sprites/rapids.png 8bpp 170 660 64 23 -31 0 normal
|
||||
-1 sprites/rapids.png 8bpp 250 660 64 39 -31 -8 normal
|
||||
-1 sprites/rapids.png 8bpp 10 660 64 23 -31 0 normal
|
||||
| sprites/rapids_shading.png 32bpp 10 660 64 23 -31 0 normal
|
||||
| sprites/rapids.png mask 10 660
|
||||
-1 sprites/rapids.png 8bpp 90 660 64 39 -31 -8 normal
|
||||
| sprites/rapids_shading.png 32bpp 90 660 64 39 -31 -8 normal
|
||||
| sprites/rapids.png mask 90 660
|
||||
-1 sprites/rapids.png 8bpp 170 660 64 23 -31 0 normal
|
||||
| sprites/rapids_shading.png 32bpp 170 660 64 23 -31 0 normal
|
||||
| sprites/rapids.png mask 170 660
|
||||
-1 sprites/rapids.png 8bpp 250 660 64 39 -31 -8 normal
|
||||
| sprites/rapids_shading.png 32bpp 250 660 64 39 -31 -8 normal
|
||||
| sprites/rapids.png mask 250 660
|
||||
-1 * 7 02 05 0D 01 00 00 00
|
||||
|
||||
-1 * 4 01 05 01 04
|
||||
-1 sprites/rapids.png 8bpp 10 710 64 23 -31 0 normal
|
||||
-1 sprites/rapids.png 8bpp 90 710 64 39 -31 -8 normal
|
||||
-1 sprites/rapids.png 8bpp 170 710 64 23 -31 0 normal
|
||||
-1 sprites/rapids.png 8bpp 250 710 64 39 -31 -8 normal
|
||||
-1 sprites/rapids.png 8bpp 10 710 64 23 -31 0 normal
|
||||
| sprites/rapids_shading.png 32bpp 10 710 64 23 -31 0 normal
|
||||
| sprites/rapids.png mask 10 710
|
||||
-1 sprites/rapids.png 8bpp 90 710 64 39 -31 -8 normal
|
||||
| sprites/rapids_shading.png 32bpp 90 710 64 39 -31 -8 normal
|
||||
| sprites/rapids.png mask 90 710
|
||||
-1 sprites/rapids.png 8bpp 170 710 64 23 -31 0 normal
|
||||
| sprites/rapids_shading.png 32bpp 170 710 64 23 -31 0 normal
|
||||
| sprites/rapids.png mask 170 710
|
||||
-1 sprites/rapids.png 8bpp 250 710 64 39 -31 -8 normal
|
||||
| sprites/rapids_shading.png 32bpp 250 710 64 39 -31 -8 normal
|
||||
| sprites/rapids.png mask 250 710
|
||||
-1 * 7 02 05 0E 01 00 00 00
|
||||
|
||||
-1 * 4 01 05 01 04
|
||||
-1 sprites/rapids.png 8bpp 10 760 64 23 -31 0 normal
|
||||
-1 sprites/rapids.png 8bpp 90 760 64 39 -31 -8 normal
|
||||
-1 sprites/rapids.png 8bpp 170 760 64 23 -31 0 normal
|
||||
-1 sprites/rapids.png 8bpp 250 760 64 39 -31 -8 normal
|
||||
-1 sprites/rapids.png 8bpp 10 760 64 23 -31 0 normal
|
||||
| sprites/rapids_shading.png 32bpp 10 760 64 23 -31 0 normal
|
||||
| sprites/rapids.png mask 10 760
|
||||
-1 sprites/rapids.png 8bpp 90 760 64 39 -31 -8 normal
|
||||
| sprites/rapids_shading.png 32bpp 90 760 64 39 -31 -8 normal
|
||||
| sprites/rapids.png mask 90 760
|
||||
-1 sprites/rapids.png 8bpp 170 760 64 23 -31 0 normal
|
||||
| sprites/rapids_shading.png 32bpp 170 760 64 23 -31 0 normal
|
||||
| sprites/rapids.png mask 170 760
|
||||
-1 sprites/rapids.png 8bpp 250 760 64 39 -31 -8 normal
|
||||
| sprites/rapids_shading.png 32bpp 250 760 64 39 -31 -8 normal
|
||||
| sprites/rapids.png mask 250 760
|
||||
-1 * 7 02 05 0F 01 00 00 00
|
||||
|
||||
-1 * 39 02 05 10 80 00 01 10
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 30 KiB |
|
@ -3,7 +3,7 @@
|
|||
// OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
// See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
|
||||
//
|
||||
-1 * 0 0C "Toyland river graphics by andythenorth (Andrew Parkhouse)"
|
||||
-1 * 0 0C "Toyland river graphics by zephyris (Richard Wheeler)"
|
||||
-1 * 4 01 05 01 3C
|
||||
-1 sprites/toyland.png 8bpp 10 10 38 19 -5 0 normal
|
||||
-1 sprites/toyland.png 8bpp 58 10 38 18 -5 13 normal
|
||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 34 KiB |
|
@ -0,0 +1,73 @@
|
|||
// This file is part of OpenTTD.
|
||||
// OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
|
||||
// OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
// See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
|
||||
//
|
||||
-1 * 0 0C "Toyland rapid graphics by zephyris (Richard Wheeler)"
|
||||
-1 * 4 01 05 01 04
|
||||
-1 sprites/toyland_rapids.png 8bpp 10 10 64 23 -31 0 normal
|
||||
| sprites/toyland_rapids_shading.png 32bpp 10 10 64 23 -31 0 normal
|
||||
| sprites/toyland_rapids.png mask 10 10
|
||||
-1 sprites/toyland_rapids.png 8bpp 90 10 64 39 -31 -8 normal
|
||||
| sprites/toyland_rapids_shading.png 32bpp 90 10 64 39 -31 -8 normal
|
||||
| sprites/toyland_rapids.png mask 90 10
|
||||
-1 sprites/toyland_rapids.png 8bpp 170 10 64 23 -31 0 normal
|
||||
| sprites/toyland_rapids_shading.png 32bpp 170 10 64 23 -31 0 normal
|
||||
| sprites/toyland_rapids.png mask 170 10
|
||||
-1 sprites/toyland_rapids.png 8bpp 250 10 64 39 -31 -8 normal
|
||||
| sprites/toyland_rapids_shading.png 32bpp 250 10 64 39 -31 -8 normal
|
||||
| sprites/toyland_rapids.png mask 250 10
|
||||
-1 * 7 02 05 00 01 00 00 00
|
||||
|
||||
-1 * 4 01 05 01 04
|
||||
-1 sprites/toyland_rapids.png 8bpp 10 60 64 23 -31 0 normal
|
||||
| sprites/toyland_rapids_shading.png 32bpp 10 60 64 23 -31 0 normal
|
||||
| sprites/toyland_rapids.png mask 10 60
|
||||
-1 sprites/toyland_rapids.png 8bpp 90 60 64 39 -31 -8 normal
|
||||
| sprites/toyland_rapids_shading.png 32bpp 90 60 64 39 -31 -8 normal
|
||||
| sprites/toyland_rapids.png mask 90 60
|
||||
-1 sprites/toyland_rapids.png 8bpp 170 60 64 23 -31 0 normal
|
||||
| sprites/toyland_rapids_shading.png 32bpp 170 60 64 23 -31 0 normal
|
||||
| sprites/toyland_rapids.png mask 170 60
|
||||
-1 sprites/toyland_rapids.png 8bpp 250 60 64 39 -31 -8 normal
|
||||
| sprites/toyland_rapids_shading.png 32bpp 250 60 64 39 -31 -8 normal
|
||||
| sprites/toyland_rapids.png mask 250 60
|
||||
-1 * 7 02 05 01 01 00 00 00
|
||||
|
||||
-1 * 4 01 05 01 04
|
||||
-1 sprites/toyland_rapids.png 8bpp 10 110 64 23 -31 0 normal
|
||||
| sprites/toyland_rapids_shading.png 32bpp 10 110 64 23 -31 0 normal
|
||||
| sprites/toyland_rapids.png mask 10 110
|
||||
-1 sprites/toyland_rapids.png 8bpp 90 110 64 39 -31 -8 normal
|
||||
| sprites/toyland_rapids_shading.png 32bpp 90 110 64 39 -31 -8 normal
|
||||
| sprites/toyland_rapids.png mask 90 110
|
||||
-1 sprites/toyland_rapids.png 8bpp 170 110 64 23 -31 0 normal
|
||||
| sprites/toyland_rapids_shading.png 32bpp 170 110 64 23 -31 0 normal
|
||||
| sprites/toyland_rapids.png mask 170 110
|
||||
-1 sprites/toyland_rapids.png 8bpp 250 110 64 39 -31 -8 normal
|
||||
| sprites/toyland_rapids_shading.png 32bpp 250 110 64 39 -31 -8 normal
|
||||
| sprites/toyland_rapids.png mask 250 110
|
||||
-1 * 7 02 05 02 01 00 00 00
|
||||
|
||||
-1 * 4 01 05 01 04
|
||||
-1 sprites/toyland_rapids.png 8bpp 10 160 64 23 -31 0 normal
|
||||
| sprites/toyland_rapids_shading.png 32bpp 10 160 64 23 -31 0 normal
|
||||
| sprites/toyland_rapids.png mask 10 160
|
||||
-1 sprites/toyland_rapids.png 8bpp 90 160 64 39 -31 -8 normal
|
||||
| sprites/toyland_rapids_shading.png 32bpp 90 160 64 39 -31 -8 normal
|
||||
| sprites/toyland_rapids.png mask 90 160
|
||||
-1 sprites/toyland_rapids.png 8bpp 170 160 64 23 -31 0 normal
|
||||
| sprites/toyland_rapids_shading.png 32bpp 170 160 64 23 -31 0 normal
|
||||
| sprites/toyland_rapids.png mask 170 160
|
||||
-1 sprites/toyland_rapids.png 8bpp 250 160 64 39 -31 -8 normal
|
||||
| sprites/toyland_rapids_shading.png 32bpp 250 160 64 39 -31 -8 normal
|
||||
| sprites/toyland_rapids.png mask 250 160
|
||||
-1 * 7 02 05 03 01 00 00 00
|
||||
|
||||
-1 * 39 02 05 10 80 00 01 04
|
||||
00 00
|
||||
01 00
|
||||
02 00
|
||||
03 00
|
||||
-1 * 6 07 83 01 \7! 03 01
|
||||
-1 * 7 03 05 01 05 00 10 00
|
Binary file not shown.
After Width: | Height: | Size: 22 KiB |
Binary file not shown.
After Width: | Height: | Size: 18 KiB |
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue