Commit Graph

400 Commits

Author SHA1 Message Date
PB
77d8926126 Simplify Windows application manifests
In section "dependency" use "*" in processorArchitecture instead of specifying
the concrete architecture such as "amd64" or "x86". This allows to have just one
manifest for all architectures instead of having them for all supported architectures
individually differing in just processorArchitecture.
2021-12-17 16:57:45 +01:00
Vadim Zeitlin
1e683c1401 Rename testdata.fc to testdata.conf
No real changes, just use a more clear and longer (which will be
important for the next commit) name for a test file.

Remove the non-existing samples/console/testdata.gc from make_dist.mk
(there are other non-existing files still referenced there).
2021-12-10 17:26:49 +01:00
Maarten Bent
248927a090 CMake: Never add static runtime flags on macOS
This option is disabled in the GUI, but users can still specify it on the
command-line. Never add the linker flags to prevent errors (unsupported option
'-static-libgcc') or warnings (argument unused during compilation:
'-static-libstdc++').

Closes https://github.com/wxWidgets/wxWidgets/pull/2612

Closes #19330.
2021-12-09 19:59:15 +01:00
Tobias Taschner
bbca67df67 Implement wxFSVolume for macOS
Implement with NSFileManager and NSURL to provide basic functionality
like on MSW. Icons are not implemented for macOS.
2021-12-01 23:35:19 +01:00
Vadim Zeitlin
2435ceb2bb Add a possibility to show SVG images to the image sample too
This is useful at least for demonstrating wx SVG support.
2021-11-29 12:55:22 +00:00
Vadim Zeitlin
8adfaa37f7 Add wxBitmapBundle::FromSVGFile() helper
This is just a trivial wrapper for wxBitmapBundle::FromSVG(), but it can
still be convenient to have.
2021-11-29 12:55:22 +00:00
Paul Cornett
b04c1ace47 Avoid integer overflow when computing image data size in wxImage::Create()
See #19326

Co-Authored-By: David Costanzo <david_costanzo@yahoo.com>
2021-11-27 17:14:28 -08:00
David Costanzo
0985996d01 Fix loading of RLE bitmaps in wxBMPHandler
- Fix handling of delta encoding that change vertical position
- Fix handling of end-of-line encodings that are given mid-line
- Removed unnecessary computation for linepos

Add regression tests for the bitmaps using RLE and loading which
previously didn't work correctly.

Closes https://github.com/wxWidgets/wxWidgets/pull/2590

Closes #19318.
2021-11-18 15:37:03 +01:00
Maarten Bent
c220ec1022 Add new image files used in the test to CMake too
This should have been done in 20208cc81f (Fix loading bitmaps with
malformed biClrUsed field, 2021-11-05), but was forgotten there.

See https://github.com/wxWidgets/wxWidgets/pull/2583
2021-11-12 17:12:10 +01:00
Maarten Bent
ad75a77bc6 CMake: Cleanup the wx_configure_script macro 2021-10-27 22:28:33 +02:00
Maarten Bent
f59bbcd3e1 CMake: Don't create symlinks with MinGW
On Windows, user might not have the correct permissions to create symlinks.

Closes #19304
2021-10-27 22:27:35 +02:00
Maarten Bent
4f0d9d3346 CMake: Fix library directory when using MinGW
This was broken in b102afc316 (CMake: Don't include generator expression in
wxPLATFORM_LIB_DIR, 2021-10-17).
And for clarity, always add a '/' after directories.

Closes #19305
2021-10-27 21:27:41 +02:00
PB
f8dda6db65 Do not use calendar.rc for calendar sample in CMake
The file was removed in  16f2c7bb89 (Remove unused samples resource
files, 2021-10-20) merged as part of 3d5664cabe (Merge branch
'samples-dpi-v2-aware', 2021-10-25).

Closes https://github.com/wxWidgets/wxWidgets/pull/2565
2021-10-26 19:40:18 +02:00
Vadim Zeitlin
271926fde0 Fix description of wxUSE_SPELLCHECK option in configure and CMake
Don't say that it's only for MSW and GTK 3, as it's also available under
Mac. Also don't use "spellchecking" non-word in the description of a
spell-checking option.

No real changes.
2021-10-17 19:36:56 +02:00
Maarten Bent
d2642b4c07 CMake: Enable wxUSE_SPELLCHECK
Find gspell-1 when using GTK3. Also need to find enchant.h.
2021-10-17 14:55:46 +02:00
Maarten Bent
b102afc316 CMake: Don't include generator expression in wxPLATFORM_LIB_DIR
So wxPLATFORM_LIB_DIR can be used in locations where generator expressions are not supported.
2021-10-17 11:52:30 +02:00
Maarten Bent
6d6567d41c CMake: remove duplicate install for builtin libraries 2021-10-17 11:50:34 +02:00
Scott Talbert
28f59e8900 cmake: also link with GLU when using EGL
Fixes #19282
2021-10-11 12:43:52 -04:00
Vadim Zeitlin
af1069374e Merge branch 'bitmap-bundle'
Add wxBitmapBundle and use it in wxToolBar.

See https://github.com/wxWidgets/wxWidgets/pull/2535
2021-10-05 18:58:18 +02:00
Vadim Zeitlin
ac02ae877f Add simple wxBitmapBundle::FromSVG() implementation using NanoSVG
Add nanosvg submodule and use it in the generic implementation of this
function.

This is incomplete yet and, notably, doesn't cache the rasterized
images, but already shows that using SVG images works (at least in the
toolbar sample).
2021-10-05 16:06:43 +01:00
Stefan Csomor
95aa8e40fd first part of OSX adaptations 2021-10-05 16:06:43 +01:00
Vadim Zeitlin
b33df7360a Implement loading resource bundle from Windows resources
This allows to use resources defined in the .rc files under MSW instead
of embedding them in the program text as arrays.
2021-10-05 15:49:43 +01:00
Vadim Zeitlin
97f6c85d9b Add first version of wxBitmapBundle and use it in wxToolBar
This first version provides only a generic implementation of
wxBitmapBundle using a collection of bitmaps and only supports using it
in wxToolBar in wxMSW and wxGTK.

More methods of creating wxBitmapBundle will be provided later and more
functions taking wxBitmap will be changed to take wxBitmapBundle later
too and, of course, all the other ports will be updated to use the new
API too.
2021-10-05 15:49:43 +01:00
Alexander Koshelev
e2aca9cbd5 Add wxStyledTextCtrl XRC handler
Closes https://github.com/wxWidgets/wxWidgets/pull/2530

Co-authored-by: VZ <vz-github@zeitlins.org>
2021-09-28 15:39:20 +02:00
Vadim Zeitlin
9f43ec03e6 Rename Mac uilocale.cpp to uilocale.mm
No real changes yet, just prepare for using Objective-C code in this
file.
2021-09-01 17:42:53 +02:00
Vadim Zeitlin
61340fcc82 Merge branch 'textctrl-spellcheck'
Add wxTextCtrl::EnableProofCheck() to use native spell checking support.

See https://github.com/wxWidgets/wxWidgets/pull/2473
2021-08-27 21:58:32 +02:00
Vadim Zeitlin
e307945170 Merge branch 'ui-locale'
Add wxUILocale class providing functionality which can be implemented
portably for all major platforms, including macOS, and doesn't force
the change of the global C locale, unlike wxLocale.

See https://github.com/wxWidgets/wxWidgets/pull/2464
2021-08-26 15:49:57 +02:00
Vadim Zeitlin
d9ea30cf84 Always set wxUSE_SPELLCHECK to 1 by default for simplicity
It does no real harm to set it to 1 and this avoids the need for the
platform checks in setup.h files, simplifying things (although it does
require checking for GTK 3 in the code compiled for both GTK 2 and 3, as
gtkspell library can only be used with GTK 3).
2021-08-23 14:16:16 +02:00
iwbnwif
472aec2d7e Add support for using native spell checking in wxTextCtrl
Add wxTextCtrl::EnableSpellCheck() and implement it for wxMSW and
wxGTK3.

Closes #17544.
2021-08-23 14:15:38 +02:00
Vadim Zeitlin
b9cbe6770f Add wxUILocale with minimal functionality
Use it in the sample to show what (little) it can do right now.
2021-08-20 22:02:46 +02:00
Maarten Bent
2e12779a21 CMake: update Info.plist variables
Use the same values as in build/bakefiles/mac_bundles.bkl.
Use the correct copyright year for in the Info.plist files.
2021-08-17 22:33:45 +02:00
Maarten Bent
4862cbd4c6 CMake: Allow to specify specific Info.plist.in file for samples 2021-08-17 21:50:48 +02:00
Vadim Zeitlin
d7e102f766 Reuse Info.plist used by configure for CMake too
The CMake-specific file is almost identical to the file used by
configure now, so don't keep both of them when just one could do.
2021-08-15 18:39:34 +02:00
Vadim Zeitlin
b7f2e4d423 Fix apparent typo in MACOSX_BUNDLE_BUNDLE_VERSION variable name
The documented name of the bundle version variable has BUNDLE twice, see

https://cmake.org/cmake/help/latest/prop_tgt/MACOSX_BUNDLE_INFO_PLIST.html

and samples/Info.plist.in uses this variable, but we set
MACOSX_BUNDLE_VERSION instead, which seems wrong, so use the apparently
correct variable name instead.
2021-08-15 16:56:24 +02:00
Vadim Zeitlin
b6d4eda4ad Extract wxLOCALE_XXX constants into their own header
No real changes, just make it possible to use these constants without
including the entire wx/intl.h.

Note that the existing headers including wx/intl.h need to keep
including it, unfortunately, as not doing it any longer would break
compilation of any code including them which relies on _() or
wxGetTranslation() being defined after including e.g. wx/dc.h. This was,
of course, never guaranteed, but in practice it worked for a very long
time, so don't break it now.

This commit is best viewed with --color-moved git option.
2021-08-14 19:21:55 +02:00
Arrigo Marchiori
30915c6163 Make wxrc independent from GUI support
The wxrc program does not depend on the GUI libraries, but only on
the base and XML libraries, so make it possible to build it in non-GUI
builds too.

Closes https://github.com/wxWidgets/wxWidgets/pull/2419
2021-08-06 21:51:11 +02:00
Vadim Zeitlin
32d9b0413d Don't bother checking for size_t, mode_t and off_t neither
The latter two are always defined in sys/types.h on all Unix systems and
we already define them for MSVC (which doesn't use configure anyhow).

The former type is always defined everywhere.
2021-07-28 21:09:32 +02:00
Vadim Zeitlin
e8975eec72 Stop testing for gid_t and uid_t that we never use in CMake
Also remove the corresponding parts of setup.h.in.
2021-07-28 21:01:17 +02:00
Vadim Zeitlin
244389699e Drop checks for pid_t from autoconf and CMake
This type should always be defined in sys/types.h on any non-ancient
Unix system, so don't bother checking for it, which is not only wasteful
but can even be harmful because it can conflict with pid_t definitions
in the other libraries under Windows, where we (wrongly) define it as
int (which is actually a bug in autoconf, which was recently fixed, see
https://savannah.gnu.org/support/index.php?110296) when using CMake.

So just don't define it at all: it should be already defined under Unix
and we don't use it under MSW anyhow.

See https://github.com/microsoft/vcpkg/issues/19110

See #18150.
2021-07-28 21:01:17 +02:00
Vadim Zeitlin
62c776c17c Merge branch 'regex-pcre'
Implement wxRegEx using PCRE2.

See https://github.com/wxWidgets/wxWidgets/pull/2438
2021-07-27 17:47:31 +02:00
Maarten Bent
d07377fdf7 CMake: Use PCRE2 system library when available
Similar to other system libraries, use the builtin version on Windows and macOS
and try to find the system library on Unix.

Find the correct PCRE2 library based on the code point width that will be used.
2021-07-25 12:23:07 +02:00
jolz
5a514afd34 Remove dependency on GTK from wxbase in CMake build
libwx_baseu_3.1.so should not include "-lgtk-3" during link.

See https://github.com/wxWidgets/wxWidgets/pull/2434

Closes #19224.
2021-07-24 19:19:03 +02:00
Vadim Zeitlin
dbe0950384 Drop WX_NO_REGEX_ADVANCED and always define wxHAS_REGEX_ADVANCED
Using non-PCRE system regex library, which was the only build variant
when wxHAS_REGEX_ADVANCED was not defined, is not supported any more, so
simplify the code by not testing for it.
2021-07-24 19:17:59 +02:00
Vadim Zeitlin
3d8438619d Use PCRE as built-in regex library
Replace the use of Henry Spencer's regex library with PCRE at the build
level and enable wxUSE_PCRE in wxRegEx code to switch to PCRE-based
implementation there.

Note that this has to be done unconditionally because there is no simple
way to select between the previously used regex library and PCRE at the
makefiles level.

We could still keep the possibility to use the system regex library
under Unix, but this doesn't seem to be worth doing, as we don't support
Unicode REs properly when using it (and never did), so drop support for
this too.
2021-07-24 19:17:59 +02:00
JackBoosY
2f6dd5e80c Cmake: fix the generator expression with CUDA using file(GENERATE)
Closes https://github.com/wxWidgets/wxWidgets/pull/2404
2021-07-15 21:40:38 +02:00
JackBoosY
c284c88db1 CMake: fix wx-config --libs output for generators and abs paths
Don't prepend "-l" if a dependency is not a library name.

Closes https://github.com/wxWidgets/wxWidgets/pull/2402
2021-07-15 19:46:30 +02:00
Maarten Bent
7828975bb3 CMake: Never use lib prefix for msvc
Fixes regression introduced in f830bde25b (CMake: Improve library names,
2021-05-24)

Closes https://github.com/wxWidgets/wxWidgets/pull/2411
2021-07-03 14:33:07 +01:00
CPUBug
67d9eb2541 Fix wxNet build problem when cross-compiling using CMake
Fix the case of "winhttp" library, this is important when using
case-sensitive file systems.

Closes https://github.com/wxWidgets/wxWidgets/pull/2409
2021-07-03 14:24:20 +01:00
Maarten Bent
cd9a35b997 CMake: generate build.cfg 2021-06-18 00:41:45 +02:00
Maarten Bent
980bba88aa CMake: Use .a suffix for import libraries
So it will have the same extension as the libraries created by makefile.gcc.
2021-06-17 23:16:03 +02:00