Skip to content

Commit

Permalink
Merge branch 'openttd'
Browse files Browse the repository at this point in the history
  • Loading branch information
ldpl committed May 5, 2024
2 parents 9da446f + 46dc456 commit 43e36b3
Show file tree
Hide file tree
Showing 112 changed files with 1,219 additions and 958 deletions.
433 changes: 14 additions & 419 deletions .changelog

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion .ottdrev
Original file line number Diff line number Diff line change
@@ -1 +1 @@
14.0 20240413 0 b3c704a6306027de4aad575c8e394a2d8a1878f9 1 1 2024
14.1 20240503 0 61342620bc4c0971b28b3578379b53d04d2f11f1 1 1 2024
2 changes: 1 addition & 1 deletion .release_date
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2024-04-13 12:55 UTC
2024-05-03 20:51 UTC
2 changes: 1 addition & 1 deletion .version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
14.0
14.1
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,7 @@ if(NOT OPTION_DEDICATED)
endif()
endif()

include(CheckAtomic)
include(3rdparty/llvm/CheckAtomic)

if(APPLE)
link_package(Iconv TARGET Iconv::Iconv)
Expand Down
12 changes: 6 additions & 6 deletions COMPILING.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,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/.
Expand Down Expand Up @@ -65,7 +65,7 @@ To install both the x64 (64bit) and x86 (32bit) variants (though only one is nec

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
Expand All @@ -75,15 +75,15 @@ 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
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.

Expand Down Expand Up @@ -115,9 +115,9 @@ builds.

## 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
Expand Down
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,9 @@ 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

See [CREDITS.md](./CREDITS.md)
17 changes: 17 additions & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
14.1 (2024-05-03)
------------------------------------------------------------------------
Add: Check that towns can build roads before generating map (#12503)
Fix #12228: Ships could get lost due to pathfinder not considering reversing in some cases (#12474)
Fix #12433: Width of unit number display was too narrow (#12534)
Fix #12502: Desync related to vehicle replacement (#12512)
Fix #12506: Desync after new oil rig is constructed (#12511)
Fix #12584: Crash on some tar files during tar scan (#12586)
Fix: [SDL2] Keypad numbers did not function (#12596)
Fix: Houses and industry tiles could accept incorrect cargo (#12547)
Fix: Map generation stage strings were incorrect (#12549)
Fix: [Script] Allow only 255 league tables, as 255 itself is the invalid id sentinel (#12545)
Fix: Mark vehicle status bars dirty when a vehicle leaves unbunching depot (#12516)
Fix: Do not show train waiting for unbunching as waiting for free path (#12515)
Fix: Smooth outliers in unbunching round trip calculations (#12513)


14.0 (2024-04-13)
------------------------------------------------------------------------
Update: New title game for 14.0
Expand Down
12 changes: 12 additions & 0 deletions cmake/CheckAtomic.cmake → cmake/3rdparty/llvm/CheckAtomic.cmake
Original file line number Diff line number Diff line change
@@ -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)
Expand Down Expand Up @@ -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")
Expand All @@ -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")
Expand Down
Loading

0 comments on commit 43e36b3

Please sign in to comment.