This reverts commit 1ac7ac999b.
The %% sequence turned out to not be dealt with specially by gettext
tools.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
Check for the condition where the windowing system has wayland support
but not wayland EGL support for wxGLCanvas in wx, in which case the
Simple renderer must be forced.
This is currently how the wx packages are built on Fedora.
Refer #1028
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
Disable the EGL subsurface move backport for Wayland GLCanvas if the wx
config sets wxUSE_GLCANVAS_EGL=0 (off.)
This fixes the build failure on Fedora. To fix the functionality,
however, they need to enable the EGL GLCanvas in their wx builds.
Also use a different hack to access the private wxGLCanvasEGL member
using template instantiation instead of redefining a keyword as a macro.
Refer #1028
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
For Fedora ./installdeps support, install either wxGTK-devel or
wxGTK3-devel, depending on which has a higher version.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
Disable the Sparkle online updater for the mac build because it requires
10.13 and we currently only build for 10.7.
Once I add a newer macOS build, I will reenable it for that build.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
Add a few translation markers for strings that are translated in the
wxWidgets catalogs, which we do not pull yet.
Also change the string "% of normal:" to "percent of normal:" because
the percent sign was causing an error in poedit.
Fix#1029.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
On Windows, StrawberryPerl tools and libraries exposed in the PATH
environment variable can pollute and break the build, remove any such
entries for WIN32 as a startup cmake action.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
The MSVC linker can now apparently link MinGW .a static libs too, and
StrawberryPerl pollutes the build with its own.
Set CMAKE_FIND_LIBRARY_SUFFIXES to .lib only when MSVC is true for
static builds.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
Sometimes vcpkg calls the SDL2 library SDL2-static for static toolchains
and sometimes it doesn't, change FindSDL2.cmake to search some possible
library names in order of priority.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
cmake:
Add cmake option `DISABLE_MACOS_PACKAGE_MANAGERS` to disable
automatically using macOS Homebrew, MacPorts or Fink.
Use `-Ofast` instead of `-O2` for default compiler optimization flags,
which enables `-ffast-math` among a few other tweaks. There is a lot of
controversy about this, but in our testing on MSVC with `/fp:fast` the
performance increase for this specific app is dramatic.
Update version regexps on the SFML headers in `FindSFML.cmake` to allow
for a variable number of spaces between the macro and its definition.
Update the version of the Sparkle update checker framework for macOS
from 1.23.0 to 2.3.0-beta.2, and add a command to the cmake commands for
copying the framework to the `.app` to delete it first if already
copied.
Builder dist changes:
Updates:
dist old v new v
==============================================================
xz 5.2.4 5.2.6
openssl 1.1.1f 1.1.1g
curl 7.65.3 7.85.0
ccache 3.4.3 4.6.3
cmake 3.19.4 3.24.1
autoconf 2.69 2.71
autoconf-archive 2017.09.28 2022.09.03
libtool 2.4.6 2.4.7
help2man 1.47.5 1.49.2
libiconv 1.16 1.17
gsed 4.4 4.8
bison 3.0.5 3.8.2
texinfo 6.5 6.8
flex e7d45afc ea6493d9
libicu 65_1 71_1
nasm 2.14.02 2.15.05
pcre 8.41 8.45
libffi 3.2.1 3.4.2
libxml2 2.9.12 2.10.2
libxslt 1.1.33-rc2 1.1.37
XML-SAX 0.99 1.02
expat 2.2.4 2.4.8
libjpeg-turbo 2.0.4 2.1.4
libtiff 4.1.0 4.4.0
freetype 2.10.0 2.12.1
libgd 2.2.5 2.3.3
liberation 2.0.1 2.1.5
urw 91edd6ec 20200910
graphviz 4bf0ec9b 5.0.1
python2 2.7.15 2.7.18
python3 3.9.1 3.10.6
swig 3.0.12 4.0.2
doxygen 1.8.14 1.9.5
bakefile 33c270a5 7a218d89
XML-Parser 2.44 2.46
ninja 1.9.0 1.11.1
meson 0.51.2 0.63.2
glib 2.62.2 51251940
libgpg-error 1.41 1.45
libgcrypt 1.8.5 1.10.1
libsecret 0.19.1 0.20.5
sdl2 2.0.10 2.24.0
flac 1.3.3 1.3.4
libogg 1.3.4 1.3.5
libvorbis 1.3.6 1.3.7
harfbuzz 1.7.5 5.1.0
sfml 03375688 2.5.1
shared-mime-info 1.9 2.2
wxwidgets 9cc0c9a0 31720e1e
graphite2 ce0e793f 425da3d0
xvidcore 1.3.5 1.3.7
fribidi 1.0.1 1.0.12
libgsm 1.0.18 1.0.22
libmodplug 5a39f591 d1b97ed0
libopencore-amrnb 0.1.5 0.1.6
snappy 1.1.7 af720f9a
speex 1.2.0 1.2.1
vidstab 1.1.0 90c76aca
libvo-amrwbenc 0.1.3 3b3fcd0d
libass 0.14.0 0.16.0
libbluray 1.1.2 1.3.2
libvpx 1.8.1 1.12.0
libx264 20190913-2245 f7074e12
libxavs distrotech-xavs-git 8300fbf4
libzmq 4.2.2 4.3.4
ffmpeg 4.3.1 5.1.1
Removed dists:
dist ver
=========================
zlib 1.2.11
pkgconfig 0.29.2
docbook5.0 5.0
libwavpack 5.1.0
Added dists:
dist ver
========================
zlib-ng ce01b1e4
zstd 1.5.2
hiredis 1.0.2
pkgconf 1.9.3
pcre2 10.40
docbook5.0.1 5.0.1
docbook5.1 5.1
Changes:
Update all non-working dist URLs.
Replace zlib 1.2.11 with a recent zlib-ng built with `--zlib-compat`.
Add zstd and hiredis, new deps of ccache.
Replace pkgconfig with pkgconf.
Use both pcre1 and pcre2.
Remove the libxml2-python dist alias and rebuild libxml2 `--with-python`
and `--with-python3` after python 2 and 3 have built.
Remove libwavpack as ffmpeg 5 no longer uses it as a dependency.
Builder core:
Rename some of the directories and files to be a bit nicer.
Add `-Ofast -march=core2 -mtune=generic -pipe` to the global
`{C,CXX,OBJC,LD}FLAGS`. These are the optimization settings used by
default in the project as well, while `-pipe` significantly reduces
build time by making the compiler use pipes internally.
Add `-DFLOAT_APPROX` to the global `{CPP,C,CXX,OBJC}FLAGS` because we
are now using `-Ofast` and consequently, `-ffast-math`.
Set the `LIBRARY_PATH` variable in the global environment.
Make some adjustments for the new dist versions and make some other
improvements.
macOS builder fixes (tested on High Sierra 10.13 and Catalina 10.15):
Add support for predefined BUILD_ROOT and append BUILD_ROOT_SUFFIX.
Allow pre-defined CHECKOUT directory for building the project sources.
Sanitize `PATH` before build to remove `/usr/local` etc., use
/usr/local/bin/brew explicitly for deps instead.
If llvm and clang is installed from nix or brew, prepend the path of the
highest version found to `PATH`.
Remove `-lm` from build environment as macOS has never had an `m` math
library and this causes problems in some config checks.
Add LLVM `libunwind` from the LLVM archive.
Add a patch for `glib`'s `meson.build` to statically link
`gettext`/`libintl`, adds `-liconv -framework CoreFoundation`.
Add an extra location to check for `stdint.h` in XCode.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
* Add convenience direct accessors to individual Options.
* Move BasicOptionObserver to a separate header and allow it to
observer multiple options. This also removes the include for
"config/option.h" for using this observer, reducing build time.
* Never skip the "Plugin" option when changing filters. This is
already handled properly in the GameArea class. If the plugin is
unusable, GameArea resets the filter to the default value.
* Make the OptionID names slightly less long and fix the inconsistent
naming in the enum.
Fix regression in ea2a929f, which broke x11 support by not checking for
Wayland when making the Wayland EGL subsurface move call.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
Backport 800d6ed69b from wxWidgets git to fix resizing the
`GLDrawingPanel` in Wayland using the EGL `wxGLCanvas`.
Also rename `IsItWayland()` to `IsWayland()`.
Fix#1028
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
When processing the `OnSize` event in the `GameArea` and calling the
embedded `DrawingPanel` `OnSize` event, call `Layout()` afterwards.
This seems to improve the resizing behavior of the EGL `wxGLCanvas`
`DrawingPanel` on Wayland.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
This adds a generic Observer interface to config::Option. To
demonstrate its intended usage, the Display Configuration dialog and
the options it controls have been updated to be entirely handled via
the config::Option class.
Implementations for wxValidator are used to validate the flow between
the UI and the underlying Option. In turn, modifying the Option value
triggers all of its observers that should then do what they need to
do.
Rather than explicitly calling all of the needed methods after
modifying a global option value, the UI elements that need to be
notified when an Option value is modified will be notified via their
observers. Runtime assert checks are put in place to prevent infinite
recursion if an observer attempts to modify an Option while handling
the observer callback.
Once all uses of Options have been updated, we should get into a state
where the following will be true:
* cmdevents.cpp will no longer rely on the application state.
* All dialogs will have been moved to specific implementations,
reducing the size of guiinit.cpp
* update_opts() will no longer need to be called and will be removed.
This will then make it easier to update accelerator handling to be
done with config::UserInput.
Bug: #745
Destroy the DrawingPanel on vsync checkbox toggle so that it is
re-created with the vsync option in effect.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
Add support for `eglSwapInterval()` to enable or disable VSync on
Wayland.
Also add status messages for enabling or disabling VSync, for both EGL
and GLX.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
wxWidgets 3.2+ has experimental `wxGLCanvas` support for Wayland EGL,
enable it for those versions.
The `glXQueryExtensionsString()` method for enabling or disabling vsync
does not work on Wayland currently, so it's disabled.
TODO: Enable/disable vsync on Wayland EGL.
Fix#1028.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>