Commit Graph

3168 Commits

Author SHA1 Message Date
Rafael Kitover e9162a0d28
build: handle revisions for vcpkg binary packages
Read the revision from the vcpkg binary package zip file names and from
`vcpkg list` and use them in version comparisons.

Also fix up the indentation a bit.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2023-11-02 18:01:18 +00:00
Rafael Kitover 99923dd126
ci: add Visual Studio workflow
Add a Visual Studio build workflow to the CI, test building using ninja
(msbuild support needs to be fixed) for both 64 and 32 bit.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2023-10-28 14:44:02 +00:00
Rafael Kitover 3a1b577d0a
build: prototype binary packages for vcpkg
Now that there is a task on the Windows build VM to upgrade all vcpkg
ports and generate packages, update the cmake vcpkg code to install
them.

This is a working prototype implementation, all of this will require a
significant amount of further work.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2023-10-27 06:41:32 +00:00
Fabrice de Gans bf2452aab9 Resize GameArea after MainFrame initialization
The GameArea was setting incorrect minimum size during initialization
due to the MainFrame not being entirely loaded, this caused the
MainFrame to not be resized properly on initialization. Resetting the
MainFrame minimum size after everything has been loaded fixes the issue.

This also changes MainFrame to ignore events sent before initialization
is complete, which should speed up startup a bit.

Fixes #1186
2023-10-24 12:49:34 -07:00
Fabrice de Gans 71ca0fb270
Properly hide the status bar at startup
Previously, the status bar was always shown at startup, even if the
status bar had been previously disabled. This fixes the issue by hiding
the status bar when it is first set up, if needed.
2023-10-24 17:51:02 +00:00
Rafael Kitover e19e13fa0a
build: use std:: proxy for nonstd:: on non-macOS
The nonstd:: implementation of nonstd::variant was causing a link error
in the Debug configuration on MSYS2 CLANG64.

Set the macros for choosing the implementation of both nonstd::optional
and nonstd::variant to the std:: forwarding behavior on all platforms
other than macOS.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2023-10-24 17:22:47 +00:00
Zach Bacon 1c76e3b0f4 snapcraft.yml: Rebuilt the snapcraft yaml to utilize core22
Also added the joystick plug, however it doesn't autoconnect.
to autoconnect manually you'll need to use snapctl

Permission will be asked by the snapcraft forums to allow it to autoconnect

Signed-off-by: Zach Bacon <zachbacon@vba-m.com>
2023-10-23 14:14:35 -04:00
Rafael Kitover c36c3e0250 doc: simplify vscode instructions
Remove the suggested project config in favor of a suggested global
settings.json configuration change to use ninja and automatically run
cmake.

The other parts are all automatic now and don't need to be mentioned.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2023-10-23 15:16:34 +00:00
Rafael Kitover 6c38eaa2a5
build: rm gone ffmpeg deps in link flags for macOS
Followup on d8d3ee2b (build: remove unneeded ffmpeg/sfml deps for macOS,
2023-10-20). Also remove the link flags for these deps in the cmake
code, otherwise linking fails.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2023-10-20 23:25:14 +00:00
Rafael Kitover 7e1afcd37c
Fix reading joystick hat config values
Use the wxString-returning form of wxRegex.GetMatch() because the bool
form always returns true if the initial match succeeded, causing every
hat direction in the config to be interpreted as north, the first
condition in the if statement.

Fix #1192

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2023-10-20 17:45:54 +00:00
Rafael Kitover d8d3ee2b48
build: remove unneeded ffmpeg/sfml deps for macOS
Remove all extra dists for ffmpeg deps since we only use core ffmpeg,
adding those in the first place was a mistake.

Remove libogg and liborbis and stop building sfml-audio, since we only
use sfml-network.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2023-10-20 10:40:58 +00:00
Rafael Kitover df83b4ba80
build: macOS builder updates
Bump openssl, curl, glib, sdl2, sfml, wxWidgets and ffmpeg.

Add support for DIST_INSTALL_TARGETS in order to use `make install_sw`
instead of `make install` for openssl because installing the man pages
and symlinks to them is very painfully slow with my install code. It's
even more painfully slow with whatever whoever did to my macOS virtual
machine.

Add `brew unlink openssl@3` in the brew setup code because someone broke
my compiler and it's not giving precedence to the include directories
passed on the command line, breaking the build.

Remove `-stdlib=libc++` from compiler flags. This was only necessary
when using a 10.7 macOS target, which has both libstdc++ and libc++,
libc++ being the newer and current distribution of the C++ standard
library for clang and macOS. We are now using a 10.10 macOS target which
does not have the old libstdc++, and this compiler option no longer
exists, causing a build failure in glib due to -Werror and an unused
command line option warning.

Remove my patch to link gettext statically for glib, this has been fixed
in the newer versions.

Install meson using pip in the python3 POST_BUILD instead of using a
dist.

Add the variables MAKE and MESON to point to the respective invoking
commands.

Check for /usr/bin/perl before /usr/local/bin/perl, the brew perl no
longer works but the macOS perl does.

Fix overwriting meson with a symlink when meson has already been
installed.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2023-10-18 23:40:22 +00:00
nuive 32581966ae Link: Fix menu not refreshing correctly
Start Network Link is not allowed while Local mode is selected, but
state change of Local mode was ignored until an option which triggers
EnableNetworkMenu() was selected.

Removed EnableNetworkMenu() from the Configuration option because it
doesn't change anything related to Link menu state.
2023-10-15 03:36:38 +00:00
Rafael Kitover 67af67278e
ci: use nix instead of brew for macOS workflow
Since brew has been failing frequently lately, use the nix action
instead.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2023-10-04 20:26:15 +00:00
Rafael Kitover e17d2cbaf5
build: fixes for nix on macOS
Add references to frameworks being linked to `buildInputs` in
`default.nix`.  Remove `-framework System` from `wxWidgets_LIBRARIES` in
the cmake code as it's not necessary and nix does it have it in
`darwin.apple_sdk.frameworks`.

TODO:

Debug build currently builds and runs. Release build builds but does not
run because of a problem with the dylib bundling.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2023-10-04 13:19:44 -07:00
Rafael Kitover 7e46939826
build: add pcre2 and openal to default.nix
Add openal, which was missing, and pcre2 which is required by glib,
which is an indirect dependency.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2023-10-04 16:26:46 +00:00
Rafael Kitover 0501f985a3
translations: transifex pull
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2023-09-22 02:00:59 +00:00
Rafael Kitover cee1789259
release v2.1.7
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2023-09-11 05:05:56 +00:00
Rafael Kitover aca206a721 Launch on xwayland under Wayland if no EGL
On initialization, if wxWidgets was compiled without EGL support, check
in environment variables if running under Wayland and if so tell GDK to
prefer using an X11 backend, causing the program to launch under
xwayland.

Fix #1028

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2023-09-10 21:14:45 -07:00
Rafael Kitover 93a24bee3c Disable mirroring for ROMs > 32MB
In doMirroring() do nothing if the ROM size is greater than 32MB. This
fixes these ROMs automatically working without disabling mirroring in
settings.

Fix #1046

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2023-09-06 18:52:35 +00:00
Rafael Kitover ea5cbba016
build: update default.nix for macOS and new wx
Update the default.nix, which is used on nixOS and other nix
installations for loading the build dependencies into a shell for
building.

Update the wxWidgets package to wxGTK32, the current version.

Add an if statement to check for macOS and load the right package set
for it.

Building with nix on macOS does not currently work, but the build
dependencies do work now.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2023-09-05 16:49:21 +00:00
Rafael Kitover f6e3daf9d8
ci: use matrix, disable macos for now
Change CI actions to a matrix with cmake options, for both release and
debug builds, with ENABLE_LINK=OFF and ENABLE_SDL=ON configurations, for
all 3 runners.

Also add both g++ and clang++ to the matrix for the Ubuntu runner to
test on clang.

Disable the macOS workflow for now because brew is failing to install
dependencies.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2023-09-04 22:55:51 +00:00
Fabrice de Gans 0f4ec57557 [Build] Fix the NO_LINK build
The NO_LINK build had bitrot and was no longer building. This fixes the
issue by properly disabling Link-related code, including unreachable
functions when the project is built with ENABLE_LINK=FALSE
2023-09-04 13:46:29 -07:00
Rafael Kitover 7a7778c644
build: fix installdeps for new Debian wx packages
Update installdeps for Debian to find the new version wx packages, but
still use the -gtk3 variants on very old versions of Debian.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2023-09-04 20:41:17 +00:00
Fabrice de Gans 803ab35269 [GB] Save MBC7 EEPROM data to `gbRam`
Previously, MBC7 EEPROM was saved at address 0xa000 in memory, rather
than inside the `gbRam` data buffer. This was inconsistent with other
mappers, resulting in issues like the EEPROM data being cleared on
`gbReset`.

Fixes #1173
2023-08-27 17:08:09 -07:00
Fabrice de Gans 24b6ac5a28 [GBA] Implement missing Thumb instruction
The CMP Thumb instruction was missing one variant. This is used in the
Chinese fan translation of Mega Man Battle Network 2.

Fixes #889
2023-08-27 16:52:36 -07:00
Rafael Kitover 0e5d63cd9a
build: update to Mac third_party_libs_tool 1.3
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2023-08-27 17:19:08 +00:00
Rafael Kitover cd8d65bddd
build: set cmake C++ version to 17, fix Mac build
Fix Mac build regression caused by 2407923f (build: fix cmake version
warnings, 2023-08-26) due to vbamcore and vbam targets using C++11 but
no longer being compatible with it.

When cmake_minimum_required() was set to a much older version, the
CXX_STANDARD property for vbamcore and vbam were ignored.

With the change mentioned above setting a higher
cmake_minimum_required(), the -std=gnu++11 flag started being passed when
compiling these two targets, making them fail due to recent changes no
longer being C++11 compatible.

Set cmake_minimum_required() to 3.8.2, the first version of cmake
supporting C++17, remove the CXX_STANDARD and CXX_STANDARD_REQUIRED
properties from these two targets, and set CMAKE_CXX_STANDARD to 17 to
set this property to C++17 for all targets in the project.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2023-08-27 08:04:57 +00:00
Rafael Kitover 2407923fc0
build: fix cmake version warnings
To fix some cmake dev warnings in recent cmake versions, move
cmake_minimum_required() to before project() and set the minimum
required cmake version to 3.5.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2023-08-26 02:32:50 +00:00
Rafael Kitover 37f4affe55
Merge remote-tracking branch 'libretro/master' 2023-08-26 02:26:44 +00:00
saulfabreg Wii VC Project 76cb71464d Fix GameCube builds for VBA-M Libretro too
The GameCube, like the Wii and Wii U, is also big-endian, so let's fix VBA-M for GCN too.
2023-08-19 15:26:08 +00:00
saulfabreg Wii VC Project 0cd79a96f5 Add VBA-M to Wii/Wii U nightly buildbot. 2023-08-19 15:26:08 +00:00
saulfabreg Wii VC Project 3745eea419 Fix Wii & Wii U builds of VBA-M for Libretro (Ploggy)
Since Wii and Wii U are both big-endian systems, we need to call in the Makefile for Libretro cores that these must use big endian code for be able to work, otherwise the emulation will just give a white screen.
Fix by Ploggy, many thanks to him.
2023-08-19 15:26:08 +00:00
LibretroAdmin a2378f05f6
Merge pull request #116 from saulfabregwiivc/wii-wiiu-fix
Fix VBA-M Libretro builds on Wii/Wii U. (Ploggy)
2023-08-18 12:39:10 -07:00
saulfabreg Wii VC Project f7d4370789
Add VBA-M to Wii/Wii U nightly buildbot. 2023-08-18 14:17:16 -05:00
saulfabreg Wii VC Project 46de99a0da Fix Wii & Wii U builds (Ploggy)
Since Wii and Wii U are both big-endian systems, we need to call in the Makefile for Libretro cores that these must use big endian code for be able to work, otherwise the emulation will just give a white screen.
Fix by Ploggy, many thanks to him.
2023-08-18 14:12:25 -05:00
Rafael Kitover 5583175559
translations: transifex pull
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2023-08-15 02:00:58 +00:00
Fabrice de Gans 14a4b6f820 [dialogs] Move JoypadConfig to its own class. 2023-08-13 16:07:31 -07:00
Rafael Kitover 5f421b53c0
translations: transifex pull
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2023-08-08 02:00:57 +00:00
Rafael Kitover 32d273ad78
build: notarize mac release binary
Notarize the mac release binary from cmake as described here:

https://developer.apple.com/documentation/security/notarizing_macos_software_before_distribution/customizing_the_notarization_workflow?language=objc

. This involves adding `--options runtime` when codesigning to enable
the hardened build.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2023-07-22 20:51:48 +00:00
Rafael Kitover 774fbab7cc
build: write version to macOS plist
Separate writing the version into the Info.plist on macOS into a
separate action from the online updates Sparkle framework into a
separate POST_BUILD action because we are not using Sparkle for macOS
builds right now due to codesigning issues.

Also sort tags by reverse tag name in the cmake git version extractor
because a tag was rewritten.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2023-07-12 06:24:20 +00:00
Rafael Kitover 00645906a5
translations: transifex pull
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2023-07-11 02:01:00 +00:00
Rafael Kitover bde372bc72
build: fix codesigning arm64 release binaries
CMAKE_CROSSCOMPILING is true when building arm64 on an x64 host, so
ignore this on MSVC.

Eventually we want to run osslsigncode through wine when cross compiling
for win32 on other platforms, or use the native signtool.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2023-07-10 01:37:55 +00:00
Rafael Kitover d0194d9a75
release v2.1.6
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2023-07-09 15:44:48 +00:00
Squall-Leonhart 7561ca97c1
Fix Discord streaming for OpenGL
Check if the OpenGL context is valid on every operation, and if not
re-initialize it. Also rebind the textures every time the frame is
drawn.

Also rename the SetCurrent method to SetContext, which is clearer.

Fix #643
Fix #767
Fix #840
Fix #843

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2023-07-06 20:40:54 +00:00
Rafael Kitover 24b92462f9
translations: transifex pull
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2023-07-03 02:02:24 +00:00
Rafael Kitover ffec5aba5e
translations: transifex pull
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2023-06-30 02:01:01 +00:00
Rafael Kitover 882957a2d3
Override SetCurrent() in GLDrawingPanel
Make a bool SetCurrent() wrapper over checking the wxGL_IMPLICIT_CONTEXT
define and executing the appropriate behavior to set the OpenGL context.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2023-06-28 21:12:01 +00:00
Rafael Kitover 5b65066bf8
build: on mac install trans into debug builds too
Change the cmake code to install the translations gettext .mo files into
the .app bundle for non-release builds too.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2023-06-27 22:14:37 +00:00
Rafael Kitover 790618102d
builder: bump SDL2 2.24.0 -> 2.28.0
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2023-06-23 00:56:37 +00:00