This doesn't seem to be actually necessary, i.e. the (implicit)
dependency on the output file is enough and using it resulted in always
redoing the custom build step with MSVS 2019 which seems to always
consider directories as missing dependencies, at least according to its
msbuild (version 16.1.76+g14b0a930a7) diagnostic build log.
A number of object files in wxCore can end up being empty due to the
corresponding wxUSE_XXX options being set to 0. This is normal and
getting tons of warnings from MSVC during the build about it wasn't
helpful.
It turns out that these warnings can be suppressed by using the
undocumented, but described at
http://www.geoffchappell.com/studies/msvc/link/link/options/ignore.htm
"/ignore" option, so do this to finally get a clean build.
Unfortunately Visual Studio 2017 defaults to Windows SDK 8.1
which is not installed with it. This workaround automatically
targets the latest Windows 10 SDK when building.
Closes https://github.com/wxWidgets/wxWidgets/pull/959Closes#18078.
This is a preliminary ARM64 platform support for wxWidgets at "it
compiles" stage. This will allow building and testing wxWidgets based
apps for oncoming Windows 10 ARM64.
Requirements:
- Visual Studio 2017 Update 4 or later with Visual C++ compilers and
libraries for ARM64 component installed
Building:
1. Open command prompt.
2. Change directory to build\msw subfolder.
3. Run "C:\Program Files (x86)\Microsoft Visual
Studio\2017\Community\VC\Auxiliary\Build\vcvarsamd64_arm64.bat" once.
4. Use `nmake TARGET_CPU=ARM64 ...` to build required flavor of wxWidget
libraries.
Notes:
1. Building of *.sln/*.vcxproj files does not support ARM64 yet. This
requires to hardcode Windows SDK to 10.0.15063.0 or later in
*.vcxproj files, which would render them non-compilable in older
Visual Studio versions. Microsoft is aware of this issue and is
planning a fix in the next version of Visual Studio.
2. wxmsw31ud_gl.dll does not build yet. Awaiting Microsoft to deliver
missing opengl32.lib for ARM64. Please, specify USE_OPENGL=0.
Closes https://github.com/wxWidgets/wxWidgets/pull/923
This basically removes the "adv" library, even though it's still
preserved for compatibility with user make/project files referring to
it.
It is done because the distinction between "adv" and "core" was never
really clear (e.g. why wxTreeCtrl was in core but wxTreeListCtrl in
adv?) and it prevented some core classes from using adv ones.
After the recent dynamic array macros refactoring, there was no
implementation of wxBaseArray any more and only wxArrayString-related
code remained in this file, so just move the latter to arrstr.cpp, where
it should have been put from the beginning (except that this code
probably predates arrstr.cpp addition), and remove the old file
entirely.
This undocumented "private" class was used for various windows UxTheme
functions which are available since WinXP. As wxWidgets 3.1 is XP+ it
does not make sense anymore to load the theme functions dynamically.
This header ends up being included by wx/apptrait.h, which is in
BASE_CMN_HDR, so it needs itself to be there too in order for
compilation to work when using non-GUI library build.
Closes#18038.
There don't seem to be any really important changes affecting our use of
the library, but it seems better to use the 2016 version instead of the
1998 one and it also allows to get rid of many hacks that were needed
before as the things they worked around are now taken care of by the
library itself.
Drop the legacy CppUnit testing framework used for the unit tests.
Replacing it with Catch has the advantage of not requiring CppUnit
libraries to be installed on the system in order to be able to run
tests (Catch is header-only and a copy of it is now included in the
main repository itself) and, in the future, of being able to write
the tests in a much more natural way.
For now, however, avoid changing the existing tests code as much as
[reasonably] possible to avoid introducing bugs in them and provide
the CppUnit compatibility macros in the new wx/catch_cppunit.h header
which allow to preserve the 99% of the existing code unchanged. Some
of the required changes are:
- Decompose asserts using "a && b" conditions into multiple asserts
checking "a" and "b" independently. This would have been better
even with CppUnit (to know which part of condition exactly failed)
and is required with Catch.
- Use extra parentheses around such conditions when they can't be
easily decomposed in the arrays test, due to the use of macros.
This is not ideal from the point of view of messages given when
the tests fail but will do for now.
- Rewrite asserts using "a || b" as a combination of condition
checks and assert macros. Again, this is better anyhow, and is
required with Catch. Incidentally, this allowed to fix a bug in
the "exec" unit test which didn't leave enough time for the new
process to be launched before trying to kill it.
- Remove multiple CPPUNIT_TEST_SUITE_NAMED_REGISTRATION() macros,
our emulation of this macro can be used only once.
- Provide string conversions using Catch-specific StringMaker for
a couple of types.
- Replace custom wxImage comparison with a Catch-specific matcher
class.
- Remove most of test running logic from test.cpp, in particular don't
parse command line ourselves any longer but use Catch built-in
command line parser. This is a source of a minor regression:
previously, both "Foo" and "FooTestCase" could be used as the name of
the test to run, but now only the latter is accepted.
This is used by WebKit2 backend under Unix with configure, but is not needed
under the other platforms and prevented bakefile_gen from generating all
output files due to the of undefined USE_WEBVIEW_WEBKIT2 variable.
We could define it for formats other than autoconf, but this doesn't seem to
be useful currently, so just avoid referencing it instead.
Closes#17860.
IUnknown interface is used sometimes (e.g. in WinRT implementation of
wxNotificationMessage) alone, without other OLE routines, so it is
helpful to have its code in the separate file to avoid coupling with main
OLE code when only IUnknown implementation is required.
Use the same format as is used by MSVS itself to avoid spurious changes when
modifying the files. Notably:
- Use DOS end of line format (0D 0A).
- Add UTF-8 BOM (EF BB BF) to the beginning of the files.
- Do not put CR LF at the end of the last line in the file.
Closes https://github.com/wxWidgets/wxWidgets/pull/440
Since 572db9c0a1, files.bkl instructs to create in the pre-MSVS2010 wx_*_base.vcproj files references to the winver.h header file so we need to regenerate these project files in the repository.
MSVS2010+ project files also have to be updated to reflect this change.
This library is now required when wxUSE_ACCESSIBILITY==1, but was only linked,
using a compiler-specific pragma, when using MSVC resulting in link errors
with gcc.
Fix this by adding the library to the bakefile for non-MSVC compilers and
rebaking.
Disable thread-safe initialization for static local variables in Visual Studio
2015 when XP toolset is used as this results in crashes when using DLLs under
XP, see #13116.
Closes#17403.
This MSW-specific hack is actually needed by all windows containing more than
one control, even if they don't derive from wxPanel (which is just the most
commonly used class for such windows), otherwise the parts of the window not
covered by the child controls won't have the correct appearance when the
window itself is inside a wxNotebook.
So do this for all classes inheriting from wxNavigationEnabled<>, notably this
fixes the wrong background for all kinds of picker controls (wxDirPickerCtrl,
wxFilePickerCtrl, ...) when they're used inside a wxNotebook.
After moving this method out of wxPanel, src/msw/panel.cpp became empty, so
also delete it and remove it from {bake,make,project} files.
Add a new class allowing to store passwords and other sensitive information
using the OS-provided facilities.
Add implementations for all the main platforms, documentation and a new sample
(which contains an ad hoc unit test as the real unit test for this class would
probably be a bad idea as it wouldn't run in non-interactive contexts and
could show OS level dialog boxes if it did).
Add a helper wxMSWImpl::CustomDraw class which will be reused in the other
places too and, for now, use it just to implement support for custom colours
in wxHeaderCtrl.
Notice that the control took care of the custom font on its anyhow and that
background colour is ignored when themes are enabled, so the net effect of
this change is that now changing the header foreground colour works, while
it was ignored before.
The two existing structs were completely identical, just replace them with a
single wxItemAttr.
Notice that wxDataViewItemAttr is not quite the same, although pretty similar,
so it remains separate for now. It would be nice to combine it with this one
too in the future, e.g. to make it simpler to make items bold in a wxListCtrl.
Add XRC handler for wxAuiManager and include the existing wxAuiNotebook
handler into it (but notice that wxAuiToolBar handler added by a later #15686
in f269f868d7 remains separate).
Also update the AUI dialog in the sample and stop hardcoding its size in
pixels.
See #13520.