Commit Graph

3162 Commits

Author SHA1 Message Date
Vadim Zeitlin
26e35e0170 Use port free even under macOS 12 port for running httpbin
The default httpbin listening port 5000 is used by Monterrey (macOS 12)
Control Center for its own needs, so use another port to avoid conflicts
with it and the resulting failures when running wxWebRequest unit tests
under this macOS version.
2022-04-17 18:48:12 +02:00
kkocdko
02741a6c92 CMake: Fix build with wxBUILD_MONOLITHIC
Add wxUSE_WEBVIEW test before using wx_webview_copy_webview2_loader.

Closes #22315, #22316.
2022-04-16 15:38:44 +02:00
Maarten Bent
4fa3b8c276 CMake: Fix the minimum supported version
Change the minimum version to 3.0. Version 2.8.12 has never worked,
because it does not support the VERSION parameter in project().

Replace GREATER_EQUAL comparisons, these are only supported since 3.7.

Move PCH related code to a separate file, and include it after
options.cmake and init.cmake. Because only then the wxBUILD_PRECOMP
variable is fully initialized.

Closes #22312.
2022-04-16 15:35:49 +02:00
Stefan Csomor
88f5a14d34 Removing outdated AppleScript, updating docs 2022-04-16 14:48:58 +02:00
Stefan Csomor
533958be10 recreating Xcode project files with new script 2022-04-16 14:27:24 +02:00
Vadim Zeitlin
105e81a4b0 Merge branch 'cmake-gtk2' of github.com:MaartenBent/wxWidgets
Fix some CMake and build warnings with GTK2.

See #22305.
2022-04-14 23:19:54 +02:00
Maarten Bent
34afcb57a8 CMake: Improve Linux GTK2 build
Use version comparison instead of normal comparison for libnotify.
Fix warning if mismatched if statement in FindGNOMEVFS2.
Check for GREATER_EQUAL GTK versions, same as configure does.
Don't check for GTK 1 or define __WXGTK127__. CMake does not support GTK1 and it should not be defined when GTK 2/3/4 is used.
2022-04-14 22:59:08 +02:00
Vadim Zeitlin
7b0d77e0c0 Remove checks for [v]snprintf() and vsscanf() declarations
Consider that all still supported/existing platforms provide these
declarations, if they provide these functions at all (and they probably
all do, so we almost certainly could remove all the test for them, but
keep them for now).

Note that we still test for broken declarations as this might still be
useful on HP-UX 11 systems, where this problem was reported "only" 8
years ago.

By not using AC_CHECK_FUNCS() we avoid the problem when using it with
snprintf() when cross-compiling with the latest MinGW API headers, see
https://sourceforge.net/p/mingw-w64/bugs/935/ for more details.

This commit is best viewed ignoring whitespace-only changes.
2022-04-14 00:33:51 +02:00
Vadim Zeitlin
85daadd659 Merge branch 'cmake-improvements' of https://github.com/MaartenBent/wxWidgets
Use newer CMake PCH support instead of cotire and many other
improvements to CMake build system.

See #22295.
2022-04-13 15:56:09 +02:00
Maarten Bent
039f0a924a CMake: Create only one target file
Put the target file in lib/cmake/wxWidgets directory.
2022-04-12 22:08:46 +02:00
Maarten Bent
797df0530d CMake: Fix different identifier warning when building with XCode
Add plist file to the Resource group.
2022-04-12 22:08:46 +02:00
Maarten Bent
681e32f521 CMake: Add IS_MONO option to wx_add_library and wx_set_target_properties
Use this instead of checking for the target name.
2022-04-12 22:08:45 +02:00
Maarten Bent
323e6e8320 CMake: Fix using precompiled headers with Objective-C++ files
Compiling .mm files gives error 'Objective C file was disabled in PCH but is currently enabled'.

Enable the OBJCXX language so the Objective-C++ compiler will be detected and used for .mm files instead of the c++ compiler.
Detect if there are .mm files and enable PCH for them too.

Don't set COTIRE_UNITY_SOURCE_EXCLUDE_EXTENSIONS when cotire is not used.
2022-04-12 22:08:45 +02:00
Maarten Bent
05917b04ae CMake: Add source group for CMake files
Add all of the CMake related files together in one group/filter.
This includes the CMakeLists.txt of the project, cmake_pch.[hxx,cxx] when
using CMake's precompiled header feature, and a .rule file created by cotire.

Also include manifest files in the Resource group. Even though they are not
visible (in VS2022), they would create an empty MSW Headers group for samples.
2022-04-11 23:29:16 +02:00
Maarten Bent
d61c9ee4bf CMake: Apply source groups using a function
This will add source groups to all projects, not only libraries.
And there is no need anymore to include it in every project file.
2022-04-11 23:18:58 +02:00
Maarten Bent
7683219f90 CMake: Remove duplicate and unused defines
Remove unused CMake code to get number of mono source files.
wxUSE_BASE=1 is also defined in wx_set_target_properties.
There seems no reason to define _LIB and DLL_EXPORTS, wx does not use it. They
were probably added because the vcxproj files have them.
2022-04-10 23:44:59 +02:00
Maarten Bent
4999c1c84b CMake: Export WXUSINGDLL for shared builds
Always define WXUSINGDLL for plugins.
2022-04-10 23:41:49 +02:00
Maarten Bent
13a82b3d67 CMake: Fix building tests and sample after making target includes private 2022-04-10 23:41:44 +02:00
Maarten Bent
f00e7ced27 CMake: Fix monolithic build
Don't target net and webview libraries directly, but use the wx_ function that will add it to the mono library when applicable.
2022-04-10 21:00:39 +02:00
Maarten Bent
0125a52376 CMake: Improve handling plugin in wx_set_target_properties
Don't link with toolkit or wx libraries, and set the correct defines.
2022-04-10 21:00:39 +02:00
Maarten Bent
f4367b3fee CMake: Use target_precompile_headers when available
Keep using cotire for CMake versions older than 3.16, or when user specifies wxBUILD_PRECOMP=COTIRE.
The scintilla headers need to be specified for target_precompile_headers to work.
Enable it when the target has at least 2 source files (same as cotire does).
2022-04-10 20:46:56 +02:00
Maarten Bent
614d58bf38 CMake: Set precompiled headers when adding libraries
Combine the three pch related functions into one.
2022-04-10 20:46:56 +02:00
JackBoosY
e2a02d4206 CMake: Export target files 2022-04-10 20:46:56 +02:00
Maarten Bent
affbbce1a3 CMake: Make all target_compile_definitions private
It is only used to build scintilla, no need to expose these definitions to external projects.
2022-04-10 20:46:53 +02:00
Maarten Bent
de495c19a3 CMake: Make all target_include_directories private
There is no need to expose them to external projects.
2022-04-10 20:46:26 +02:00
Vadim Zeitlin
2d675acd6b Fix handling apt install errors in install script
Logging the error code reset it (as echo executed successfully), so save
it first.

Also check for the failure of the second attempt to run apt too.
2022-04-10 17:47:54 +02:00
Vadim Zeitlin
f84864dcca Merge branch 'master' of https://github.com/dghart/wxWidgets
Add a missing XPM to the xrc sample

The merge also rebakes the sample makefiles.

See #22270.
2022-04-07 17:42:05 +02:00
Vadim Zeitlin
19e3a47d98 Update version to 3.1.7 and rebake the makefiles
Make it possible to distinguish the latest master from 3.1.6 before
making any changes.

Closes #22282.
2022-04-07 17:40:13 +02:00
dghart
101602da63 Update CMakeLists.txt
Add an xpm missed by commit 49fd3a22
2022-04-04 20:39:14 +00:00
Xaviou
d923feee31 Readme Update 2022-04-03 10:56:18 +02:00
Xaviou
d686a44b4f Update MinGW build tools (MinGW-1030-TDM and MSYS2 MinGW-1120) 2022-04-03 10:45:07 +02:00
Vadim Zeitlin
1aab9e7ebb Try to fix problems with running httpbin in the CI builds
Fix the last known working Flask version, the latest one results in the
errors like the following

Traceback (most recent call last):
  File "/usr/lib/python3.8/runpy.py", line 185, in _run_module_as_main
    mod_name, mod_spec, code = _get_module_details(mod_name, _Error)
  File "/usr/lib/python3.8/runpy.py", line 111, in _get_module_details
    __import__(pkg_name)
  File "/home/runner/.local/lib/python3.8/site-packages/httpbin/__init__.py", line 3, in <module>
    from .core import *
  File "/home/runner/.local/lib/python3.8/site-packages/httpbin/core.py", line 22, in <module>
    from werkzeug.wrappers import BaseResponse
ImportError: cannot import name 'BaseResponse' from 'werkzeug.wrappers' (/home/runner/.local/lib/python3.8/site-packages/werkzeug/wrappers/__init__.py)
2022-03-29 21:00:57 +02:00
Vadim Zeitlin
762c80b809 Handle --with-cxx=20 configure option too
Although wxWidgets doesn't use any C++20 features yet, still allow
compiling it in C++ 20 mode if wanted.

Update the helper macro for detecting available C++ version support from
https://www.gnu.org/software/autoconf-archive/ax_cxx_compile_stdcxx.html
with just a minor change to de-TAB-ify it to pass our code style check
forbidding indenting with TABs.

Closes #22238.
2022-03-28 00:55:54 +02:00
Andriy Byelikov
3900ece2ee Renormalize .vcxproj.filters files
This fixes the problem with inconsistent file formats in the repository
apparently introduced in e3535d6481 (Mark MSVS *.vcxproj.filters files
as using CR LF as well, 2021-11-24), which resulted in the files changed
by this commit (sometimes) appearing modified in new clones.

Closes #22214.
2022-03-23 13:57:52 +01:00
PB
e5f195da33 Copy SVG files with samples
Add few recently added SVG files used for bitmap bundles in samples
also to bakefiles and CMakeLists.

Closes #22197.
2022-03-17 23:48:01 +01:00
Vadim Zeitlin
31adb7d55b Merge branch 'bookctrl-bmp-bundle'
Use wxBitmapBundle in XRC handlers of wxBookCtrl-related controls and
refactor these handlers to avoid code duplication.

See #22151.
2022-02-27 22:45:25 +00:00
Vadim Zeitlin
1549aafdc9 Factor out common code from most wxBookCtrl-related XRC handlers
Add new wxBookCtrlXmlHandlerBase and inherit the XRC handlers of all the
wxBookCtrlBase-derived classes except for wxTreebookXmlHandler, which
will require special handling, from it to avoid duplicating the same
code in all of them.

This commit is best viewed with --color-moved git option.
2022-02-27 22:42:00 +00:00
Vadim Zeitlin
e77d5f3094 Log the exit code of run_apt shell function
It seems like this function sometimes doesn't return non-zero exit code
even though it fails to fetch some packages (e.g. due to a network
error), so log its status code to check if this is really the case.
2022-02-25 00:16:10 +01:00
Vadim Zeitlin
ef22f4c3db Add wxSuffixDebug to MSVS properties file
This property expands to either (just) "d" (even in Unicode builds) or
nothing depending on whether we're building in debug or release and can
be used to construct the configuration-independent names for the third
party libraries, most of which use just this suffix and not wxSuffix,
which expands to "ud" in (Unicode) debug build.

This allows to use exactly the same link dependencies for both debug and
release configurations, as demonstrated by the updated minimal MSVS
project file, which is convenient when creating new projects not using
wxwidgets.props, as it allows to enter the dependencies just once and
use them for all build configurations instead of having to enter them
separately for the debug and the release ones.
2022-02-23 22:12:57 +00:00
Paul Cornett
b62a1f8f1a wxOverlay implementation for Wayland 2022-02-13 09:03:36 -08:00
Alexander Koshelev
685e3af613 Use wxBitmapBundle in combo sample
Replace PNG files with SVG ones.

Closes #22103.
2022-02-08 20:54:05 +01:00
Tobias Taschner
d2a17b37c8 Rebake for static web view edge 2022-02-07 22:49:33 +01:00
Tobias Taschner
57ebad4f7d Allow usage of static loader with wxWebViewEdge
Add a new build option wxUSE_WEBVIEW_EDGE_STATIC.
If it is set to 1 the WebView2 loader is static linked into the binary
and removes the runtime dependency on WebView2Loader.dll.
2022-02-07 22:49:33 +01:00
Scott Talbert
57b4a11f24 Install Python wheel module to fix Windows CI
This is needed since GitHub CI images update to windows-2022 base image,
which notably changes Python version from 3.7 to 3.9 and requires
building wheels for some of the packages not available on PyPI for this
version.

Closes #22091.
2022-02-04 02:06:11 +01:00
Tobias Taschner
73d37d460d Add tango art for refresh and stop
Use the added art IDs in webview sample
2022-02-01 09:50:32 +01:00
Scott Talbert
085d15015a Don't install old or non-existent packages during Linux CI
libwebkitgtk-3.0-dev is long deprecated and isn't used anyway.
gstreamer-0.10* no longer exists even on Ubuntu 18.04.
gstreamermm* is not used by wxWidgets.

Closes #22069.
2022-01-30 22:56:25 +01:00
Vadim Zeitlin
2208f53ba3 Add wxART_WX_LOGO and use it in the webview sample
Embed SVG data of the wx logo into the library itself to make it
available to all wx programs, including the samples. This is a bit
wasteful, but <12KiB is not really noticeable compared to the library
size.
2022-01-23 15:40:04 +01:00
PB
ccb6b10c1f Use SVG-based toolbar bitmaps in webview sample
In webview sample toolbar use wxBitmapBundles created from SVG files
instead of XPM bitmaps, as this results in much better appearance in
high DPI.

Closes #2642.
2022-01-17 01:07:57 +01:00
Vadim Zeitlin
2f0bce2979 Replace old Trac links with GitHub ones
Also update a couple of links to SF.
2022-01-13 16:52:58 +01:00
Vadim Zeitlin
3bc0f44163 Update copyright years to 2021
Just run misc/scripts/inc_year and commit the results.

Closes #18690.
2022-01-02 13:32:23 +01:00