Commit graph

3499 commits

Author SHA1 Message Date
Vadim Zeitlin
b2050fcb6f Update to Catch v2
Use Catch2 public header instead of using internal Catch v1 headers: we
can do this now because Catch2 supports (albeit in a rather ugly way)
being used with PCH.
2022-10-18 18:39:13 +02:00
Vadim Zeitlin
4f4c5fcfdf Use nullptr instead of NULL in the code and documentation
This is a combination of running clang-tidy with modernize-use-nullptr
check for some ports (GTK, X11, OSX) and manual changes to the ports for
which it couldn't be used easily (MSW, DFB) and also manually updating
the docs.

Also replace NULL with null or nullptr in the comments as this is more
consistent with the use of nullptr in the code and makes it simpler to
grep for the remaining occurrences of NULL itself.

And also use null in the assert messages.

Only a few occurrences of "NULL" are still left in non-C files, mostly
corresponding to unclear comments or string output which it might not be
safe to change.
2022-10-18 01:25:25 +02:00
Vadim Zeitlin
fb4f0b590c Remove wxGTK1 port and GPE support
Remove the port files and references to it from the common headers and
elsewhere.

Also remove GPE (GNOME PDA Environment) support as libgpewidget is
unmaintained since 2006 or so and has never been really used.

Use __WXGTK__ to test for any version of wxGTK now. Still define
__WXGTK20__ for compatibility, but always define it now and don't test
for it in the library code.
2022-10-16 22:01:02 +02:00
Vadim Zeitlin
0ef1cdcc21 Remove support for wxMotif
This port hasn't been updated for ages and is not used by anybody any
longer, so remove its code to facilitate maintenance.

Also remove references to this port from the documentation and most of
the other places (VMS-specific descrip.vms files still check for it
because it's not clear how to update them all), including configure.

Regenerate the latter and rebake all makefiles.

Finally document that this port is not available any longer.
2022-10-16 16:39:56 +02:00
Vadim Zeitlin
7ae3cf206c Remove wxVector unit test
Testing this class doesn't make much sense any more as it's just a
typedef for std::vector and we can presumably rely on the standard class
working as expected.
2022-10-11 00:48:00 +02:00
Vadim Zeitlin
86348a9d28 Stop testing for pre-standard hash map/set classes
Always use std::unordered_{map,set} when we use them at all, don't
bother with checking for their availability and with tr1 or even older
alternatives.
2022-10-11 00:45:30 +02:00
Vadim Zeitlin
a0ae0cd316 Use <type_traits> unconditionally
Don't use or even mention tr1/type_traits any more.
2022-10-11 00:45:30 +02:00
Vadim Zeitlin
583a426a37 Use std::string::compare() unconditionally
Don't test for it in configure/CMake and just always use it.
2022-10-11 00:45:30 +02:00
Vadim Zeitlin
0a387693c6 Use std::wstring unconditionally
Don't test for its existence in configure and CMake and don't use
wxStdWideString in the code.
2022-10-11 00:45:30 +02:00
Vadim Zeitlin
182eebdbf3 Use MSVS 2015 solutions for AppVeyor CI builds
These solutions work for MSVS 2017, 2019 and 2022 as well.
2022-10-11 00:02:29 +02:00
Vadim Zeitlin
1cf49f9909 Remove MSVS 2005 and 2008 project files
These compilers are not supported any longer.

Also disable their regeneration in Bakefiles.bkgen.
2022-10-11 00:02:29 +02:00
Vadim Zeitlin
dd404fdd77 Remove HAVE_STRTOULL and HAVE_WCSTOULL
We can assume these functions are always available now as they are part
of C++11.
2022-10-11 00:02:29 +02:00
Vadim Zeitlin
924db833f4 Require MSVS 2015+ and remove checks for earlier versions
Simplify the code checking for _MSC_VER or __VISUALC__ or using
wxCHECK_VISUALC_VERSION() macro (which is not very useful any longer,
but keep it in case we need it again in the future).
2022-10-11 00:02:29 +02:00
Vadim Zeitlin
7ee8ea2d5b Update wxMSW-specific options in wxUniv setup.h
This section of the file wasn't updated when rerunning update-setup-h,
add the missing line to it and commit the results of rerunning it.
2022-10-11 00:02:29 +02:00
Vadim Zeitlin
1e26cbfcaf Always set wxUSE_GRAPHICS_CONTEXT to 1 by default
Don't bother with compiler and gcc version check, all compilers should
provide GDI+ headers/libraries by now.
2022-10-11 00:02:29 +02:00
Vadim Zeitlin
73869d37fd Always use variadic macros and remove wxNO_VARIADIC_MACROS
Variadic macros are always available in C++11, which will be required
very soon, so don't bother testing for them and just always use them.
2022-10-11 00:02:29 +02:00
Vadim Zeitlin
2c206e7b6e Always require C++11 for CMake builds 2022-10-07 02:34:45 +02:00
Vadim Zeitlin
097abf20b9 Stop disabling deprecation warnings when compiling wxGTK
Don't use blanket warning suppression, as this suppresses even warnings
about using our own deprecated API which is undesirable.
2022-09-25 01:11:55 +02:00
Vadim Zeitlin
359138321e Merge branch 'cmake-fix-output-dir'
Use output directory under wx directory in the build tree.

See #22814.
2022-09-22 18:27:10 +02:00
Vadim Zeitlin
3d80c2beee Fix for missing X11 libraries when linking wxGTK2 statically
We must always use them with wxGTK2, so don't check wxHAVE_GDK_X11 for
it, otherwise we're never going to include X11 libraries when using it,
but they are always required.

See #22813.
2022-09-22 18:26:07 +02:00
Vadim Zeitlin
6f615cbd09 Merge branch 'webview_improved_handlers' of https://github.com/TcT2k/wxWidgets
WebView handler improvements for advanced requests and Edge handler
implementation.

See #22797.
2022-09-22 18:21:39 +02:00
Vadim Zeitlin
85105681d3 Use wxSOURCE_DIR and wxBINARY_DIR in config.cmake for consistency
We prefer using these variables rather than CMake ones directly
elsewhere, so do it here too for consistency.

No real changes.
2022-09-22 16:59:07 +02:00
Vadim Zeitlin
1212247f3d Download WebView2 under current, and not top level, directory
This is done for consistency with the parent commit and to keep things a
bit tidier, even if it doesn't really change anything.
2022-09-22 16:32:03 +02:00
Maarten Bent
49b62441b5 CMake: Restore wx-config variables
This was erroneously removed in ad75a77bc6 (CMake: Cleanup the
wx_configure_script macro, 2021-10-27).

Fixes #22806.

See #22809.
2022-09-18 17:46:49 +02:00
Tobias Taschner
0adf31169d
Add advanced handler to webview sample
Demonstrate how to implement and use wxWebViewHandler::StartRequest()
2022-09-16 21:00:52 +02:00
Vadim Zeitlin
d6c9040c4a Allow specifying release date in the pre-release script
This is useful when preparing a release in advance.
2022-09-03 14:50:04 +02:00
Vadim Zeitlin
d9a78be16c Merge branch 'cmake-gtk-printing' of https://github.com/MaartenBent/wxWidgets
CMake: Add GTK Printing support.

And show the extra toolkit options in the CMake summary, fix using
libnotify and gnomevfs with gtk3 and fix some unused parameter warnings
when using gtk2 or gtk3 on Windows.

See #22762.
2022-09-02 19:12:46 +02:00
Maarten Bent
7f8cca9245
CMake: Add GTK Printing support
See #22745
2022-08-31 00:22:36 +02:00
Maarten Bent
43aae40a11
CMake: Enable libnotify and gnomevfs for gtk3
Unlike configure, WXGTK2 is not defined internally when WXGTK3 is used.
2022-08-30 23:10:14 +02:00
Maarten Bent
6cb97e2208
CMake: show extra toolkit options in summary
Just like configure does.
2022-08-30 23:07:05 +02:00
Maarten Bent
9b0f715f55 Use built-in NanoSVG in CMake build by default
Since we do not provide a FindNanoSVG module, we should use the built-in
version of the library by default. And prevent warnings about not being
able to find the package configuration file.

See #22748.
2022-08-29 00:44:28 +02:00
Scott Talbert
458dc814c2 CI: fix/simplify httpbin use by standardizing Python version
Now that we don't use Travis CI any longer (and don't use httpbin on the
other CI providers yet), we can make our life much simpler by just using
Python 3.10 on all platforms instead of trying to find version-specific
workarounds for various python/pip/httpbin incompatibilities.

Closes #22726.
2022-08-18 21:52:21 +02:00
PB
897673db64 Set default build compatibility in CMake builds to 3.2
Remove "2.8" and "3.1" from wxBUILD_COMPATIBILITY options.

Add "3.2" to wxBUILD_COMPATIBILITY options and set it as its default value.

Closes #22715.
2022-08-18 21:49:19 +02:00
Maarten Bent
ebcec1f8b7
CMake: Disable wxUSE_JOYSTICK by default on non-Linux UNIX systems 2022-08-06 00:54:26 +02:00
Maarten Bent
9861386fef
CMake: Don't enable CXX warnings for C files
Move the warning definitions inside the if-statements.
Don't use -Wno-ctor-dtor-privacy and -Woverloaded-virtual for C files, to fix
'is valid for C++/ObjC++ but not for C' warning.

See #22696
2022-08-05 18:54:36 +02:00
Maarten Bent
97a787a1ee
CMake: Check if joystick is supported
Disable wxUSE_JOYSTICK if linux/joystick.h is not found on Linux systems.

See #22646
2022-08-05 18:54:35 +02:00
Vadim Zeitlin
1391e83a9e Merge branch 'circleci-fedora'
Add Circle CI config file for building the libraries and running
(non-GUI only, so far) tests under Fedora.
2022-08-04 02:49:38 +02:00
Vadim Zeitlin
e63fe497ab Install more optional libraries under Fedora
Add lib{gspell,notify,secret} to the list of packages installed.
2022-08-04 02:48:23 +02:00
David Connet
f94676f0cb Support linking with static runtime when using MSBuild
Add wxRuntimeLibs property which is set to "dynamic" by default, but can
also be set to "static" (e.g. with "msbuild /p:wxRuntimeLibs=static") to
build the libraries using static CRT libraries.

Closes #22693.
2022-08-04 02:27:01 +02:00
Vadim Zeitlin
a527b2714d Allow installing extra packages in before_install.sh
This is useful now that it uses different commands for installing
packages under different systems, as it means that we don't have to
write these commands manually in the CI configuration files.
2022-08-04 01:09:06 +02:00
Vadim Zeitlin
382db6439b Install required packages on RedHat-like systems
Use dnf to get everything we need for building there.
2022-08-04 01:09:06 +02:00
Vadim Zeitlin
cb0c75fcc3 Remove the obsolete wxEffects files from master file list too
This should have been part of 8a64c8abdc (Remove v2.8 compatibility
flag, add v3.2 flag, 2022-08-01).
2022-08-03 17:29:54 +02:00
Artur Wieczorek
5e2da5a106 Get rid of v2.8 code 2022-08-02 08:26:29 +02:00
Artur Wieczorek
8a64c8abdc Remove v2.8 compatibility flag, add v3.2 flag 2022-08-02 08:26:04 +02:00
Maarten Bent
667c5c843b CMake: Improve linking with OpenGL libraries
Don't replace OPENGL_LIBRARIES, but prepend existing targets too it.
Also add OPENGL_EGL_INCLUDE_DIRS to OPENGL_INCLUDE_DIR.

See #22649.

Closes #22677.
2022-07-30 15:02:34 +02:00
Vadim Zeitlin
43d0eb48c1 Merge branch 'cmake-install'
Fix problems with CMake install target: handle DESDIR and spaces in the
installation path correctly.

See #22660.
2022-07-24 17:09:32 +02:00
Maarten Bent
600bf54a06 Use DESTDIR when creating symlinks in CMake install
Prepend $ENV{DESTDIR}, sufficiently escaped to delay its expansion until
the execution of "cmake -E create_symlink" command, to the command path
arguments.

Closes #22653.

See #22610.
2022-07-24 17:06:12 +02:00
Thomas Klausner
9efe21b55a Fix dlopen() detection in CMake under non-Linux systems.
Linux (until recently) defined dlopen() in libdl, but some other
operating systems (such as NetBSD) have it in libc.

Use CMake-provided variable for the name of the library to use for
dlopen() to fix NetBSD build.

See #22644.
2022-07-24 16:48:38 +02:00
Vadim Zeitlin
556868390f Merge branch 'statvfs'
Fix statvfs() detection in CMake under NetBSD and prefer statvfs() to
non-portable statfs() more generally.

See #22643.
2022-07-24 16:44:06 +02:00
Maarten Bent
e4f230a3e1
CMake: Support spaces in install path with symlinks
Add quotes around the paths so they are treated as one argument.
2022-07-22 00:22:28 +02:00