Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade wxWidgets to 3.2.1 #249

Merged
merged 6 commits into from
Mar 14, 2023
Merged

Upgrade wxWidgets to 3.2.1 #249

merged 6 commits into from
Mar 14, 2023

Conversation

eagleoflqj
Copy link
Contributor

Motivation: support building winsparkle on win arm64.
Rough steps I took:

@eagleoflqj
Copy link
Contributor Author

This may (or may not) fix #227 and #224

@vslavik
Copy link
Owner

vslavik commented Nov 29, 2022

This may (or may not) fix #227 and #224

This is a necessary, but not sufficient, step towards that.

I'm seeing some weird things in the diff here - the project files is clearly changed in much more significant ways than updating wx, and I'm pretty sure is broken as the result. I also don't understand some of the changes in setup.h - do you remember why you had to enabled some extra features? Generally the fewer are enabled, the better, as it results in smaller binaries.

@vslavik
Copy link
Owner

vslavik commented Nov 29, 2022

fix build for vs2017

Is this related to the other changes, i.e. was vs2017 support previously working?

@eagleoflqj
Copy link
Contributor Author

I'm pretty sure is broken as the result.

Why? CI passes for vs2017 and vs2019, and my local vs2022 also works. The diff of project files is largely due to using the latest version of bakefile (Why use the latest? Because it claims to support vs2022). If you regenerate project files on my branch, you will notice a even bigger diff, which really makes the build fail, and I reverted them.

I also don't understand some of the changes in setup.h

I understand the setup.h was a customized version of the setup.h in wxWidgets 3.1.1rc. So at first I compared the difference of them, copy the setup.h from wxWidgets 3.2.1, and apply the difference. It fails to compile, so I did the minimal edit to make it compile.

Is this related to the other changes, i.e. was vs2017 support previously working?

I'm pretty sure it's the latest bakefile that changes

<WindowsTargetPlatformVersion Condition="$(VisualStudioVersion)&gt;=16">10.0</WindowsTargetPlatformVersion>

to

<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>

which make CI of my first commit fail, so I have to revert it. I don't want to modify generated file but I have to.

@@ -44,7 +44,7 @@
// in the version after it completely.
//
// Recommended setting: 0 (please update your code)
#define WXWIN_COMPATIBILITY_3_0 0
#define WXWIN_COMPATIBILITY_3_0 1
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need this one because these 3 functions are deprecated

winsparkle/src/ui.cpp

Lines 116 to 118 in 7ca9b99

icon.SetHICON(static_cast<WXHICON>(hIcon));
icon.SetWidth(size);
icon.SetHeight(size);

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Turned out to be straightforward, fortunately: 81e5fe3

@eagleoflqj
Copy link
Contributor Author

Generally the fewer are enabled, the better, as it results in smaller binaries.

I agree. Some default options that are imported due to upgrading setup.h may not be necessary, and I'll check them.

@@ -271,7 +268,7 @@
// Default is 1
//
// Recommended setting: 1 as setting it to 0 disables many other things
#define wxUSE_STREAMS 0
#define wxUSE_STREAMS 1
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rquired by src\common\dobjcmn.cpp

@@ -456,7 +441,7 @@
// Recommended setting: 1 (wxFile is highly recommended as it is required by
// i18n code, wxFileConfig and others)
#define wxUSE_FILE 1
#define wxUSE_FFILE 0
#define wxUSE_FFILE 1
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Required by src\common\image.cpp

@@ -910,12 +961,20 @@
#define wxUSE_STATLINE 0 // wxStaticLine
#define wxUSE_STATTEXT 1 // wxStaticText
#define wxUSE_STATBMP 1 // wxStaticBitmap
#define wxUSE_TEXTCTRL 0 // wxTextCtrl
#define wxUSE_TEXTCTRL 1 // wxTextCtrl
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Required by src\common\event.cpp

@eagleoflqj
Copy link
Contributor Author

@vslavik Anything I should address here?

@vslavik
Copy link
Owner

vslavik commented Dec 21, 2022

@vslavik Anything I should address here?

Well, the extra noise in project files (yes, they need to be manually updated), but it's OK, I'll do it myself when merging.

@vslavik vslavik merged commit 54a95d9 into vslavik:master Mar 14, 2023
@vslavik
Copy link
Owner

vslavik commented Mar 14, 2023

Thanks a lot; this is now merged with an extra project cleanup commit (to keep manual changes to bakefile-generated projects) and a small fix to remove the need for WXWIN_COMPATIBILITY_3_0 mentioned above.

@eagleoflqj eagleoflqj deleted the wx-3.2.1 branch March 14, 2023 14:31
@lijy91
Copy link

lijy91 commented Mar 19, 2023

@vslavik Could you please release a new version?

@vslavik
Copy link
Owner

vslavik commented Mar 19, 2023

@vslavik Could you please release a new version?

Need to address #227 and #177 and possibly #224 (all enabled by this PR) first.

@vslavik
Copy link
Owner

vslavik commented Mar 29, 2023

This is now in 0.8.0: https://github.com/vslavik/winsparkle/releases/tag/v0.8.0

@vslavik vslavik mentioned this pull request Mar 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Not able to build Winsparkle code
3 participants