Check for musl libc in Patch.cpp and use fseeko()/ftello() in that case
instead of fseeko64()/ftello64() as well, as the 64 variants are glibc
extensions.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
Useful for app stores like KDE's discover and gnome software
Also updated to current specifications of appstream
Signed-off-by: Zach Bacon <zachbacon@vba-m.com>
Fix the logic in the vcpkg automatic support to return on non-WIN32 if
VCPKG_TARGET_TRIPLET is not defined.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
Fix if(EXISTS var) statements to be written as if(EXISTS ${var}) because
the EXISTS operator does not accept variable references.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
Since the new default VS vcpkg does not implement list, use list from
the powershell module to check for packages that are already installed.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
Fix checking for already installed vcpkg ports in user vcpkg clones,
broken in 491f104b (build: better binpkg support for default VS vcpkg,
2023-11-30).
Checking for installed ports in the VS default vcpkg is still broken,
because it does not implement the list command.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
If the vcpkg clone exists in our preferred location, and VCPKG_ROOT has
not been passed to the build system, use it over the Visual Studio
default one, which is much more problematic.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
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>
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>
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>
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>
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>
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>
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>
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>
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
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.
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>
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>
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>
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>
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>
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>
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>
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.
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>
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>
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>
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>
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>
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>
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