Commit graph

149 commits

Author SHA1 Message Date
John Törnblom
4a34544678
Port to Playstation 4 (#3988) 2022-02-03 14:50:26 +01:00
Gleb Mazovetskiy
6bcac742ed CMake: Link gperftools directly to the binary
Not sure why this is necessary but it fixes the gperf build
2022-01-30 14:56:04 +01:00
staphen
3546b41be0 Introduce NOEXIT build option to disable Quit Game options in menus 2022-01-23 05:25:48 +01:00
Felipe Wannmacher
8efbcf2058
Xbox One/Series support (#3946) 2022-01-17 12:37:29 +01:00
Gleb Mazovetskiy
8789c96264 OpenDingux lepus: Enable ZeroTier 2022-01-06 13:31:00 +01:00
staphen
9b32c8d541 Update libzt to the latest version 2022-01-05 14:13:51 +01:00
ephphatha
6a1091ce09 Rename Korean/Romanian translation files so they are used in fallback resolution 2022-01-04 23:20:53 +01:00
Anders Jenbo
6b2481a76c Touch support on all SDL2 platforms 2022-01-02 11:37:38 +01:00
Gleb Mazovetskiy
a38e25b6c6 CMake: Fix GoogleTest on older Debian + CMake 2021-12-26 08:11:23 +01:00
Gleb Mazovetskiy
45cf1366b9 Assets.cmake: Fix lang dependencies on Apple 2021-12-23 14:34:50 +00:00
Gleb Mazovetskiy
cacf55bb34 CMake: Split out platform libraries 2021-12-21 21:01:47 +00:00
Gleb Mazovetskiy
0a0baf0c64 CMake: Move more platform config to platforms/
Moves platform libraries, compile definitions, and compile options to
the platform CMake files.
2021-12-21 19:54:54 +00:00
Gleb Mazovetskiy
3e0a295dd3 CMake: Simpler Threads workaround for the 3DS 2021-12-21 12:29:48 +00:00
Gleb Mazovetskiy
6dd4c08d4b CMake: Make -static-libstdc++ configurable 2021-12-21 10:04:21 +00:00
Gleb Mazovetskiy
0d21df3b81 CMake: Fix googletest from source 2021-12-21 07:56:36 +01:00
Gleb Mazovetskiy
a496b9d72b Emscripten: Fix assets/ loading 2021-12-20 04:07:34 +00:00
Gleb Mazovetskiy
2d3ee0f5fd Emscripten: Add a basic index.html based on emrun
Based on stripped down emrun output
2021-12-20 04:07:34 +00:00
Gleb Mazovetskiy
fe7e38695d Emscripten SDK support
Adds support for the Emscripten SDK via CMake.
2021-12-20 04:07:34 +00:00
Gleb Mazovetskiy
3e595d02a1 Fix asset bundling on Apple systems
The `target_sources` command was changed in the test overhaul PR but
that was incorrect.
2021-12-17 20:14:04 +01:00
Gleb Mazovetskiy
076b0c0c05 Overhaul tests
1. Adds a `libdevilution_so` target when tests are enabled.
2. Each test file is now a separate binary target linked against `libdevilutionx_so` (can now run tests in parallel).
3. Tests are now defined in a separate `test/CMakeLists.txt` file.
4. Building the tests is now controlled by the standard `BUILD_TESTING` option (defined by CTest).
5. Tests are now built by default.
6. On CI, test errors are now reported.

Also:

* `.clang-format`: Enable SortIncludes in tests
* `path_test.cpp`: Fix -Wsign-compare
2021-12-16 20:26:51 +00:00
staphen
c386b04c10 [3DS] Adjust video flags to force hardware surface 2021-12-16 03:24:26 +01:00
Adam Heinermann
1484b4d8cf
Implement Discord rich presence (#3711) 2021-12-15 17:14:17 +01:00
Gleb Mazovetskiy
afc0017cef CMake: Move assets to Assets.cmake 2021-12-15 11:13:30 +00:00
Gleb Mazovetskiy
b71814b07b CMake: Remove upgrade code
Follow-up to 75222ccef8
2021-12-11 23:02:49 +00:00
Gleb Mazovetskiy
c93b9e6b05 Platforms.cmake: Minor cleanup of the BSD check
1. No need to interpolate `CMAKE_SYSTEM_NAME` in the `if`.
2. Set definitions with `add_definitions` instad of `CMAKE_CXX_FLAGS`.
2021-12-11 05:27:47 +00:00
staphen
66beceba59 Remove NIGHTLY_BUILD and BINARY_RELEASE options 2021-12-10 10:10:39 +01:00
Gleb Mazovetskiy
5986a081c3 Amiga: Cleanup build process
1. Run Docker as the current user instead of root,
   removing the need to chown directories.
2. Copy `devilutionx.info` via CMake, removing the need to do it
   manually.
3. Cleanup `prep.sh` somewhat.
2021-12-08 17:59:23 +01:00
Gleb Mazovetskiy
d0ed505765 Move platforms asio includes to Source 2021-12-07 18:32:25 +01:00
Gleb Mazovetskiy
4848632db2 CMake: Organize files
1. Platform and toolchain files are now all under `platforms/`, with a
   single `CMake/platforms/${platform}.cmake` per platform.

2. Custom functions/macros are under `functions/`.

3. Finder modules are in `/finders`.
2021-12-07 18:32:25 +01:00
Gleb Mazovetskiy
cabfa3a333 Platforms.cmake: Remove vita workaround
The fix was merged upstream on Apr 26
2021-12-07 18:32:25 +01:00
Gleb Mazovetskiy
75222ccef8 Overhaul dependency options
Changes how dependency options are handled and moves them out of
`CMakeLists.txt`.

Major changes:

1. The static default now takes `TARGET_SUPPORTS_SHARED_LIBS` into account
2. The `DIST` setting no longer affects the static default.
3. The static option is now visible for system dependencies as well.
   (it was previously hidden by `cmake_dependent_option`).
4. The auto-detection mechanism for `libfmt` and `SDL_image` only
   applies if the setting has not been set.
5. SDL2 on Android is now also linked statically,
   resulting in a 1.1 MiB smaller APK.

When using non-system dependencies, the default should always be static,
as there are 2 main use cases for these:

1. Dependencies that we must currently vendor because our forks have
   significant changes that are not yet merged/released upstream.
2. Platforms that have no system packages, such as Android and iOS.

In both cases, static linking is the most appropriate default.
2021-12-07 18:32:25 +01:00
Anders Jenbo
8192434bea [ios] Set up build process 2021-12-06 22:01:02 +01:00
Gleb Mazovetskiy
99fe83b0eb android_defs.cmake: Cleanup
1. Organize and comment on various options that we set.
2. Disable all system dependencies explicitly instead of relying on
   auto-detection for some of them.
2021-12-04 15:43:12 +01:00
Gleb Mazovetskiy
ac152589f9 Android: Fix assets copying
Previously, only the translations were copied for Android at build time.
The other assets were copied only at configure time.

Replaces Android-specific handling with a general mechanism to override
the build-time assets directory.
2021-11-30 11:15:04 +01:00
Anders Jenbo
2c700c0c3d [android] Move CMake define to common folder 2021-11-29 06:09:11 +01:00
Gleb Mazovetskiy
7f891b7134 mingw(64).cmake: Remove cmake_minimum_required
Our cmake_minimum_required is already at 3.13
2021-11-27 14:30:54 +01:00
staphen
8dbcd32a50 Adjust libmpq file I/O buffer size for 3DS 2021-11-22 23:57:37 +00:00
Stephen C. Wills
53df211881
Add support fro 3DS C-stick 2021-11-14 18:37:49 +01:00
Gleb Mazovetskiy
15a79d3f06 OpenDingux: Use assets directly
Saves ~750 KiB.

retrofw: 4.9 MiB -> 4.1 MiB
rg350: 5.4 MiB -> 4.7 MiB
2021-11-08 22:12:36 +00:00
Gleb Mazovetskiy
3d308983a8 Migrate to libmpq
libmpq is a much simpler alternative to StormLib for reading MPQ archives.

We use our own fork of libmpq: https://github.com/diasurgical/libmpq

Impact:

* DevilutionX is now a lot more portable. Unlike StormLib, libmpq only
  needs platform-specific code for Windows.
* Locks around file access **removed** (instead we duplicate the file descriptor for streamed audio only).
* RAM usage is **300 KiB** lower than StormLib.
* Stripped release linux_x86_64 binary is **32 KiB** smaller.
* Amiga build now hangs instead of crashing.
2021-11-06 23:51:42 +00:00
Gleb Mazovetskiy
2551e3d0a0 CMake: Only link against libpng when needed
When using the system `SDL(2)_image`, we do not need to link against
libpng.
2021-11-04 13:44:11 +01:00
Gleb Mazovetskiy
3b14bbad00 CMake/ctr/modules: Fix line endings 2021-11-04 13:44:11 +01:00
staphen
41ff03e94c Add CMake option to use system SDL_image 2021-11-04 10:10:42 +00:00
Gleb Mazovetskiy
4e8c2e3644 Fix line endings in a few files 2021-11-03 10:56:32 +01:00
Gleb Mazovetskiy
0d7072dae4 OpenDingux: Add "lepus" platform
The "lepus" platform is the OpenDingux Beta for the same devices that
run RetroFW (e.g. RG300).
2021-10-23 02:45:16 +02:00
Gleb Mazovetskiy
6e6a15fe33 GKD350h: Disable ZeroTier
Build currently fails with:

    build-gkd350h/_deps/libzt-src/src/Controls.cpp:144:60: error: ‘pthread_setname_np’ was not declared in this scope
      pthread_setname_np(service_thread, ZTS_SERVICE_THREAD_NAME);
                                                            ^
2021-10-23 02:45:16 +02:00
Gleb Mazovetskiy
98142bbdfd RetroFW: Disable network
Does not build with the current buildroot:

    build-retrofw/_deps/asio-src/asio/include/asio/detail/memory.hpp:87:20: error: ‘aligned_alloc’ is not a member of ‘std’
       void* ptr = std::aligned_alloc(align, size);
2021-10-23 02:45:16 +02:00
Ivan Epifanov
8e6f511d6c Add vita tcp network support 2021-10-20 19:02:47 +02:00
Gleb Mazovetskiy
b362562b63 OpenDingux: Enable network support
For now, without ZeroTier because it fails to link, possibly due to ZeroTier using the `-fstack-protector` flag.
2021-10-12 01:11:57 +02:00
Bernd Stellwag
0e8ca7121f change http links to https where possible 2021-10-09 12:54:29 +02:00