211 Commits

Author SHA1 Message Date
Rafael Kitover
6e20fdc2e3 build: check CMake variable ENABLE_SHARED
Check for the commonly used CMake variable `ENABLE_SHARED` and set
`VBAM_STATIC` accordingly if it is set.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2025-10-04 09:45:52 +00:00
Rafael Kitover
c34be3c738 build: link System framework on macOS
Add `-framework System` to SDL libs and wxWidgets targets.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2025-10-03 23:40:00 -07:00
Rafael Kitover
eb7c50017d Revert "SDL PixelArt test fix"
This reverts commit e0e639a02e.
2025-09-28 08:54:42 +00:00
Squall Leonhart
e0e639a02e SDL PixelArt test fix 2025-09-28 15:29:17 +10:00
Rafael Kitover
5bd8904746 build: fix check for SDL3 pixel art filter
Fix the CMake compile check for SDL_SCALEMODE_PIXELART to use
CheckSourceCompiles instead of CheckSymbolExists which does not work for
this purpose.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2025-09-21 19:33:29 +00:00
Rafael Kitover
ab01be3373 Add option to enable SDL pixel art texture filter
Add a checkbox in display config to enable SDL_SCALEMODE_PIXELART when
it is available.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2025-09-18 01:22:47 +00:00
Rafael Kitover
9fcc0ad7a8 build: fix finding static vcpkg x265 for FFmpeg
Fix finding static vcpkg x265 when it is named `x265-static.lib` as it
is right now.

Fix finding vcpkg host pkgconf on ARM64 Windows, which uses x64 host
binaries.

Remove build environment architecture check, which fails building x64 on
ARM64. That whole file needs to be rewritten to use the compiler target
architecture.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2025-09-13 20:59:08 -07:00
Rafael Kitover
3e355509e9 build: restore FindFFmpeg.cmake
Restore `FindFFmpeg.cmake`, because FFmpeg does not come with CMake
import modules.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2025-08-04 11:56:18 +00:00
Andy Vandijck
16f008b448 Fix macOS build
Fix macOS build
2025-08-02 09:38:42 +02:00
Rafael Kitover
bad10342bd build: use pkg-config on UNIX for SDL3
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2025-08-02 06:20:37 +00:00
Rafael Kitover
031ae2ebf6 build: fix CMake slowness
Optimize the `find_wx_util` function to try the major and minor version
parsed from the lib file first, avoiding a very slow exhaustive search
of possible version numbers.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2025-08-01 03:05:55 +00:00
Rafael Kitover
f1414000e6 doc: fix release commit instructions
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2025-07-30 11:49:27 +00:00
Rafael Kitover
adbaeacf20 build: use OpenSSL for FFmpeg for Mac builder
Link FFmpeg to OpenSSL for the Mac builder for the TLS functionality it
needs.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2025-07-25 11:53:22 -07:00
Rafael Kitover
0895c7a52e build: fix Intel zip name building on Mac ARM64
Try to set the architecture correctly when compiling for Intel on ARM64
Macs, this also sets the zip name correctly for our releases.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2025-07-23 09:21:53 -07:00
Rafael Kitover
1f3a1cb9dc build: fix re-downloading vcpkg binary packages
Fix re-installing binary packages on next cached run by clearing the
cache entries for `vcpkg list`. Also remove the binary packages
directory after installing.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2025-07-15 21:05:07 +00:00
Rafael Kitover
bbaf70c083 build: fix slow CMake vcpkg startup time
Set the CMake cache variables for `vcpkg list` in `CACHE` instead of
`PARENT_SCOPE`, because the parent scope is now a transient function and
nothing was being cached, causing very slow run speed.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2025-07-15 16:46:17 +00:00
Rafael Kitover
b96e0ad35c build: remove vcpkg update, it does nothing
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2025-07-15 15:25:39 +00:00
Rafael Kitover
f7a79bfe2e build: fix binpkg deps resolution yet again
Keep a list of already installed dependencies and use the count to
determine if any are not installed.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2025-07-13 18:12:37 +00:00
Rafael Kitover
f8c52377a3 build: fix binpkg hostdeps again
Followup on 357eccc6 (build: fix checking if bin pkg host deps
installed, 2025-07-13) keep a count of already installed host deps, and
when the host deps count is equal to it rather than zero, break out of
the loop. This fixes the infinite loop and hang caused by host deps
being required but already being installed.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2025-07-13 16:17:48 +00:00
Rafael Kitover
357eccc6eb build: fix checking if bin pkg host deps installed
Fix the check for host dependency packages being downloaded to not run
if the package is already installed.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2025-07-13 16:03:31 +00:00
Andy Vandijck
a782c1c5fe Fix CI
Fix CI
2025-07-13 11:12:57 +02:00
Andy Vandijck
15612c2bcc Add BZ2 and LZMA support options
Add BZ2 and LZMA support options
2025-07-12 17:32:28 +02:00
Andy Vandijck
08ffe49414 Find AVFormat first
Find AVFormat first
2025-07-07 10:41:50 +02:00
Andy Vandijck
c76edf74c6 Fix MinGW build
Fix MinGW build
2025-07-07 10:07:13 +02:00
Rafael Kitover
fac5d565aa build: use vcpkg host pkgconf when cross compiling
For vcpkg, set `PKG_CONFIG_EXECUTABLE` to the host `pkgconf.exe` when
the host is x64.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2025-07-06 21:05:56 +00:00
Rafael Kitover
5702bc5102 build: fix x64-mingw-static for MSYS2 CLANG64
Don't set the compilers to `gcc` for MinGW vcpkg triplets, because it
may be CLANG64 with MinGW.

Link FAudio using the `-static` target or the normal target only.

Use `ghc::filesystem::path::c_str()` to pass paths to `std::fstream` as
there is a conversion problem with this toolchain.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2025-07-06 19:11:41 +00:00
Rafael Kitover
cc2bda6991 build: inst host deps for bins only if not
Before installing calculated host dependencies for binary packages,
check if they are already installed.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2025-07-05 17:14:49 +00:00
Andy Vandijck
1de7b60e5b Find AVFormat first
Find AVFormat first
2025-07-05 14:35:06 +02:00
Andy Vandijck
d7c6eb81cd Fix MinGW FFMpeg
Fix MinGW FFMpeg
2025-07-05 10:16:56 +02:00
Andy Vandijck
43a6a90a8c Fix FFMPEG for macOS 2025-07-04 15:59:30 +02:00
Rafael Kitover
05d181849a build: rm FindFFmpeg for distro ver, fix x264/x265
Remove our copy of FindFFmpeg.cmake, as this module is included in
distributions now.

This also fixes the problem with finding x264 and x265 components and
libraries for FFmpeg.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2025-07-03 19:45:04 +00:00
Rafael Kitover
856abf8067 build: add option VCPKG_BINARY_PACKAGES
Add CMake option VCPKG_BINARY_PACKAGES, defaulting to TRUE to download
and use binary packages for vcpkg dependencies.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2025-07-02 20:27:43 +00:00
Rafael Kitover
e8d4adaf12 build: always use pwsh vcpkg-list
Use the `vcpkg-binpkg-prototype` `vcpkg-list` implementation and never
`vcpkg list`, because the letter sometimes shortens package names and
may be breaking the package installed check.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2025-07-02 17:16:42 +00:00
Rafael Kitover
f0a30d45a1 build: fix installing host build dep bin pkgs
Calculate and install only build dependencies for a binary package set
instead of everything from the host triplet. This way we can support
binary packages for dynamic builds as well.

Also check that the vcpkg Git clone is writable if it does not exist.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2025-06-27 23:10:33 +00:00
Andy Vandijck
41895eea36 Add option not to update vcpkg builds
Add option not to update vcpkg builds
2025-06-23 11:46:01 +02:00
Rafael Kitover
61be54d3d9 build: avoid using VS vcpkg with elevation
Always use a parallel vcpkg directory instead of the Visual Studio
default vcpkg, because installing there requires elevation and doesn't
always work.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2025-06-22 17:26:15 +00:00
Rafael Kitover
5972e73e37 build: patch wxWidgets on macOS for alert bug
Add a patch to our build of wxWidgets for macOS to fix the alert sound
bug, as described here:

https://github.com/wxWidgets/wxWidgets/issues/25262#issuecomment-2745905462

. Add a macro to disable our workaround for this bug when a CMake option
indicating that this patch was applied is `TRUE`.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2025-05-29 15:45:12 +00:00
Andy Vandijck
88302602ca Fix ffmpeg linkage
Fix ffmpeg linkage
2025-05-28 15:03:41 +02:00
Andy Vandijck
830c8ccd4d Add x264 and x265 to ffmpeg
Add x264 and x265 to ffmpeg
2025-05-28 13:17:49 +02:00
Andy Vandijck
c048f0c713 Fix find ffmpeg
Fix find ffmpeg
2025-05-28 13:08:57 +02:00
Andy Vandijck
7c1a6a44f7 Set avformat first to fix linking issue
Set avformat first to fix linking issue
2025-05-28 10:27:07 +02:00
Rafael Kitover
8ced18c22f build: make OpenAL-Soft optional again
Add the CMake option `ENABLE_OPENAL` which defaults to `ON` except for
32 bit Windows builds, because OpenAL-Soft uses `avrt.dll` which is not
available on Windows XP.

Update README.md.

Fix linking `libsamplerate` for the `x86-mingw-static` triplet which we
use for 32 bit Windows XP builds.

Make some minor fixes to SDL3 detection and SDL2 fallback.

Clean up the audio API selection code paths.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2025-05-22 23:42:36 +00:00
Rafael Kitover
3f436073be build: fix 32 bit build for Windows XP
Fix x86 32 bit build for Windows XP.

Set the `WINVER` and `_WIN32_WINNT` macros to the value for Windows XP.

Disable XAudio for these builds.

Add the missing `inet_pton()` and `inet_ntop()` functions for SFML.

Fix a FetchContent warning in the CMake as well.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2025-05-20 18:33:36 +00:00
Andy Vandijck
ac0dc48263 Fix SDL3 detection 2025-05-20 15:26:00 +02:00
Andy Vandijck
c065851616 Fix SDL3 detection 2025-05-20 15:24:49 +02:00
Rafael Kitover
5b9a26ba6c build: make some minor CMake improvements
Default `ENABLE_SDL3` to whether `find_package(SDL3)` can find it.

Only add libsamplerate for SDL2 with vcpkg.

Install gettext tools on Windows if they are not available, not just
under MSVC. This makes the `x86-mingw-static` triplet work as well.

Fix syntax error.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2025-05-20 01:36:14 +00:00
Andy Vandijck
0037d61ad1 Fix metal shader build for x86_64 2025-05-19 16:16:09 +02:00
Andy Vandijck
06f0537619 Use generic file dialogs for builder build 2025-05-19 12:18:17 +02:00
Andy Vandijck
db5c890e0d Add option for generic file dialogs 2025-05-10 09:35:41 +02:00
Rafael Kitover
1788b366af build: default ENABLE_SDL3=ON in CMake
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2025-05-04 20:14:50 +00:00