Commit Graph

3130 Commits

Author SHA1 Message Date
Rafael Kitover 491f104b89
build: better binpkg support for default VS vcpkg
Check for cl.exe in the PATH to also automatically enable vcpkg support.

Ignore git errors for default VS vcpkg, as it is not in git.

Get host triplet packages (build depends currently) for static triplets,
e.g. get x64-windows packages also when getting x64-windows-static
packages. This helps with the default VS vcpkg too, as it cannot run
regular install commands for build deps.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2023-11-30 17:53:24 +00:00
Rafael Kitover 244ee8ebfa
translations: transifex pull
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2023-11-30 02:00:59 +00:00
Rafael Kitover 3683938ec7
translations: transifex pull
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2023-11-22 02:01:02 +00:00
Rafael Kitover 64d8cfffc2
translations: transifex pull
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2023-11-17 02:01:00 +00:00
Rafael Kitover 18f3449c31
translations: transifex pull
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2023-11-16 02:01:01 +00:00
Rafael Kitover 8db618625d
translations: transifex pull
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2023-11-15 02:01:01 +00:00
Rafael Kitover a262a2facf
build: make inferred vcpkg triplet default static
Make the vcpkg triplet inferring code only run on WIN32 explicitly, and
make all inferred triplets -static, not only when BUILD_SHARED_LIBS is
FALSE.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2023-11-14 08:40:10 +00:00
Fabrice de Gans beab088139 Store the PC register at the appropriate offset
In ARM mode, the GBA CPU stores the PC (r15) register with an offset of
4. This was not handled correctly by the core emulator.

Fixes #1200
2023-11-10 15:55:41 -08:00
Rafael Kitover 215e9b1ac2
build: fix vcpkg support for Linux
Fix the Linux-specific date command in the cmake code, and skip the ABI
check for vcpkg, because it is failing for some reason on Linux+vcpkg.

The resulting executable works perfectly.

This should also help on mac, I will test this later.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2023-11-10 09:50:50 +00:00
Rafael Kitover 0e68a2340c
build: compare vcpkg bin pkg revisions explicitly
Compare port revisions explicitly instead of appending to version
string.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2023-11-10 06:48:33 +00:00
Rafael Kitover 0eb65a0eb3
build: fix finding vcpkg binary packages on server
Fix the regex against the file listing module on the server for the
vcpkg binary package list.

Also replace all the dashes in versions with periods for comparison
purposes.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2023-11-07 18:32:02 +00:00
Rafael Kitover 1af7aa2333
build: install vcpkg binary packages in dep order
Use the new code in the powershell module for vcpkg binary packages to
install the downloaded binary packages in dependency order with build
dependencies so that the database is not corrupted at any point in the
installation process or after.

Also remove the build binary package directory after installation, so
that all the previous packages are not reinstalled if a package is
updated on a subsequent run.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2023-11-07 15:36:40 +00:00
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