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.
Use CATCH macros directly, this is simpler and more clear.
Also use narrow strings instead of wide ones and get rid of wxT() too.
No real changes.
This commit is best viewed ignoring whitespace-only changes.
Under Monterrey (macOS 10.12) we can actually load the file using
wxDynamicLibrary even though it does _not_ exist on the disk, so don't
skip the test just because of this.
Restore the old behaviour of wxLocale, which is supposed to use the
default locale and not the preferred language, which may not be the same
(see #22281).
Also apply the following fixes and improvements to wxUILocale:
- Add new GetSystemLocale() method.
- Change the MSW implementation to use the default locale instead of the
preferred UI language for Windows versions below Windows 10.
- Change the Unix implementation to respect LANGUAGE environment
variable and use it for determining the preferred UI languages.
- Use wxUILocale in wxTranslations to determine the preferred UI
languages.
- Use wxUILocale during initialization of internat sample.
Closes#22281.
Closes#22318.
MSWDefWindowProc(WM_PAINT, ...) in OnPaint causes performance issues on
large screens so only use it when an actual custom background colour is
set.
Closes#22308.
Closes#22320.
Only run install_name_tool on our own libraries as part of "make
install" instead of doing it on all libraries in the installation
directory: this was at best useless and at worst harmful, as some
combinations of install_name_tool and macOS versions don't work well
together and result in corrupting the already installed libraries.
Don't just wxASSERT(err == 0), as this expands to nothing in the release
builds. Use wxCHECK() instead so that we at least return an error even
in the release builds too.
Avoid manual memory management.
This was already fixed once in 563f41c686 (Fix memory leak on error
return in wxOSX wxDisplay code., 2014-02-21) but incompletely and then
another instance of new/delete[] was reintroduced in d5180d3604 (add a
GetFromWindow implementation to wxDisplayFactory, 2020-08-07). Get rid
of all of them now and use wxScopedArray<> instead (we could also use
wxVector<> or even std::vector<> too).
No real changes.
Update ccache-action to a not yet released version including the fix for
failing the entire CI job if saving the cache failed -- this shouldn't
happen at all, but in practice it does happen from time to time, and
it's better to succeed, rather than fail in this case.
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.
This reverts parts of 533958be10 (recreating Xcode project files with
new script, 2022-04-16) that seem to have been committed accidentally
and are now preventing CI builds from passing.
This is at best useless and at worst harmful, as shown by the bug fixed
in the previous commit, so just don't do it if GetLongPathName() has
already determined that the path doesn't exist.
After the fixes to UNC paths handling, Normalize(wxPATH_NORM_LONG)
started adding an extra colon after the UNC paths.
Fix this by using wxGetVolumeString() instead of constructing this thing
manually and add a unit test checking for this.
Closes#22275.
This function returns wxBitmap by object, not by (const) reference since
wxBitmapBundle-related changes.
Also change signature of the other methods taking wxBitmapBundle instead
of wxBitmap now.
And some other minor improvements.
Closes#22306.
Fix declaration of 'o' hides previous local declaration warnings.
Change two wxCONSTRUCTOR_5 definitions using wxBitmapBundle instead of
wxBitmap (this does not give build errors).
wxGenericCalendarCtrl is missing all XTI implementations, so just use
RTTI. And fix building the xti sample.
Note the shared build still fails due to WXDLLIMPEXP related issues.
Closes#22300.
Closes#22301.
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.
Using LogEnabler in wxFileSystemWatcher test case still didn't show
anything even in case of unexpected failures because debug messages
didn't appear in the test output.
Fix this by using a custom log target which shows the debug (and trace)
messages on stderr, instead of using the debug output for them, even
under MSW.
Also make LogEnabler public, and rename it to a more unique name, as it
could be useful in the other tests too.
Don't test for __WXMAC__ after testing for __UNIX__ just above, as the
latter is now always defined when the latter is, we don't support
non-Unix Mac systems since an awfully long time.
No real changes.
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.
Use wxChar in wxUILocaleImplLCID to allow the code to compile and work
correctly even when GetLocaleInfo() is GetLocaleInfoA() and not the W
version as usual.
Closes#22299.
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.
This ctor was previously present only in wxMSW, make it available in all
ports to allow the same code to compile everywhere.
In most of them wxDC argument is simply ignored, but in wxGTK and wxOSX
it is used to assign the appropriate scale factor for the new bitmap.
Enable previously wxMSW-only unit test checking for this.