Commit Graph

200 Commits

Author SHA1 Message Date
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
Andy Vandijck f975809e3c Update to SDL3 APIs, fix bpps, add SDL audio/video, add Metal video, fix Quartz drawing
Implement SDL3 for the SDL port if the CMake definition ENABLE_SDL3 is
set.
Implement setting the color depth for both wxWidgets and the SDL port.
Fix the coloring issues in the SDL port for OpenGL.
Implement 8 bit color support.
Update and fix the wx port SDL sound driver.
Implement SDL video in the wx port.
Silence GL deprecations on macOS.
Add SDL renderer selection.
Fix filter for bit depths other than 32 bit.
Fix GDK backend for Linux.
Add Metal renderer for macOS.
Fix Quartz drawing.
2025-05-04 13:57:49 +00:00
Andy Vandijck 18c3c3bd51
build: fix link error on MSVC for SFML port
Change two `constexpr` declarations to `inline` to fix a link error on
MSVC.

Also remove the C++14 override that was used for testing on MSVC, the
project being defined as C++17 in CMake.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2025-05-03 23:51:32 +00:00
Rafael Kitover dae4397dff
build: lower bundled SFML C++17 to C++14
Convert the C++17 code in the bundled SFML code to C++14 to hopefully
allow for targeting macOS 10.10 (Yosemite) instead of 10.15 (Catalina.)

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2025-05-02 21:41:39 +00:00
Rafael Kitover 4cf6cccbaf build: bundle SFML 3.x sys/network in third_party
Remove the SFML external dependency, include the SFML 3.0.1 system and
network libraries in third_party and adjust the build code, tools and
documentation accordingly.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2025-04-24 16:34:42 +00:00
Rafael Kitover 9e724ea4b8 build: support building ARM64 binary for Mac
Make some adjustments to the Mac build scripts to support building an
ARM64 binary for Apple Silicon.

Also support cross-compiling for Intel on Apple Silicon.

Also prefer using Ninja for CMake ports.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2025-04-22 05:55:19 +00:00
Rafael Kitover 3fa850c15d
build: capitalize ARCH_NAME in CMake
Use capitalized `ARM` instead of `arm` for ARCH_NAME in
Architecture.cmake so that the Mac Apple Silicon zip releases are
suffixed `ARM64` not `arm64`.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2025-04-07 01:43:00 -07:00
Rafael Kitover 364776b833
build: s/-Ofast/-O3 -ffast-math/
Use `-O3 -ffast-math` instead of `-Ofast`, which is deprecated by the
latest clang. In both our options and for libretro.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2025-04-07 01:28:45 -07:00
Rafael Kitover 11a6068a03
build: update vcpkg install command to new form
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2025-04-06 12:21:47 -07:00
Rafael Kitover 29e85e5d87 build: update Link SFML usage to SFML 3.x APIs
Make some changes for the SFML Network library for the 3.x APIs.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2025-04-01 23:34:58 +00:00
Rafael Kitover d5ac2a853b
Revert "Update Link SFML usage to SFML 3.x APIs"
This reverts commit e82ae7bb13.

Sorry, somehow I pushed to the wrong branch.
2025-03-29 19:40:59 +00:00
Rafael Kitover e82ae7bb13
Update Link SFML usage to SFML 3.x APIs
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2025-03-29 18:54:53 +00:00