wxUWP platform for Windows

228 views
Skip to first unread message

Trylz

unread,
Dec 31, 2021, 3:31:42 AM12/31/21
to wx-dev
Hello,

As discussed here the UWP platform would be a big plus to have.
I forked and created my own branch :
https://github.com/Cloyz2021/wxWidgets/tree/wxUWP

I am starting with the solution generation via Cmake.

Have happy holidays!

Vadim Zeitlin

unread,
Dec 31, 2021, 8:00:35 AM12/31/21
to wx-...@googlegroups.com
On Thu, 30 Dec 2021 16:47:16 -0800 (PST) Trylz wrote:

T> As discussed here <https://trac.wxwidgets.org/ticket/19352> the UWP
T> platform would be a big plus to have.

Absolutely, yes!

T> I forked and created my own branch :
T> https://github.com/Cloyz2021/wxWidgets/tree/wxUWP
T>
T> I am starting with the solution generation via Cmake.

Please don't hesitate to submit PRs for your changes as soon as possible,
i.e. as soon as they build, basically.

It would also be great if you could please add a GitHub Actions workflow
for building the new port from the very beginning, to ensure that it
doesn't get broken by the changes elsewhere. If you have any questions
about this (or anything else, of course), please ask here.

Thanks again and happy New Year to you too!
VZ

Trylz

unread,
Dec 31, 2021, 1:54:24 PM12/31/21
to wx-dev
Thank you :). As soon I have the minimal sample running I will submit a PR.
Happy new year!

Trylz

unread,
Dec 31, 2021, 3:26:08 PM12/31/21
to wx-...@googlegroups.com
I guess I already a have a question :D
I have seen that the samples sources are located under  <wx_widgets_root>/samples.
But only the minimal one has vcxprojs and a SLN. What is the reason? When I try to build using minimal_vc17.sln I have a
" wx/setup.h: No such file or directory" error.

However when i generate the samples using Cmake and build with the WxWidget.SLN solution, the samples build fine.


--
You received this message because you are subscribed to a topic in the Google Groups "wx-dev" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/wx-dev/bWq2ObaevzU/unsubscribe.
To unsubscribe from this group and all its topics, send an email to wx-dev+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/wx-dev/8fc7794f-281f-44a9-8353-503373ec7af1n%40googlegroups.com.

Igor Korot

unread,
Dec 31, 2021, 3:42:27 PM12/31/21
to wx-dev
Hi,



On Fri, Dec 31, 2021, 12:26 Trylz <trylz...@gmail.com> wrote:
I guess I already a have a question :D
I have seen that the samples sources are located under  <wx_widgets_root>/samples.
But only the minimal one has vcxprojs and a SLN. What is the reason? When I try to build using minimal_vc17.sln I have a
" wx/setup.h: No such file or directory" error.

However when i generate the samples using Cmake and build with the WxWidget.SLN solution, the samples build fine.

The minimal sample contain all solutions because it is used to build to make sure everything compiled correctly.
All other samples have vc7, vc8 and vc9 solutions. 
If you want to build them - just open vc9 one and let it convert to the current version.
Also, I believe you shouldn't store the converted ones? Its been decided a long time ago not to keep the solutions for samples and demos in the repository. 

Thank you.

You received this message because you are subscribed to the Google Groups "wx-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to wx-dev+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/wx-dev/CAEOVQAsnio-1vEsY8mHWxXLy2X%3DRPaYOBpZG5pG%3Dx%3Dfq7bWfgA%40mail.gmail.com.

Trylz

unread,
Dec 31, 2021, 4:50:36 PM12/31/21
to wx-...@googlegroups.com

Trylz

unread,
Jan 3, 2022, 2:42:26 PM1/3/22
to wx-...@googlegroups.com
[HELP] UWP port.

Hello,

I am now able to generate UWP projects from Cmake. Next is to make the minimal sample compile and run.
Unfortunately when I generate the wxUWP projects, wxUSE_GUI is somewhat defined to 0 instead of 1 like the wxMSW default.
Does somebody have an idea why?
Here the branch:
https://github.com/Cloyz2021/wxWidgets/tree/wxUWP

Installation steps and port status:
https://github.com/Cloyz2021/wxWidgets/blob/wxUWP/docs/uwp/install.md

Diff with master:
Comparing wxWidgets:master...Cloyz2021:wxUWP · wxWidgets/wxWidgets · GitHub

Thanks for your help. Starting from tomorrow I will have close to no time to work on the port, with the end of the vacations.
I will do the most I can today(I will manually set  wxUSE_GUI to continue). Should I submit a PR by the end of day?

Vadim Zeitlin

unread,
Jan 3, 2022, 3:01:22 PM1/3/22
to wx-...@googlegroups.com
On Mon, 3 Jan 2022 14:42:13 -0500 Trylz wrote:

T> I am now able to generate UWP projects from Cmake. Next is to make the
T> minimal sample compile and run.
T> Unfortunately when I generate the *wxUWP *projects, *wxUSE_GUI *is
T> somewhat defined to 0 instead of 1 like the *wxMSW *default.
T> Does somebody have an idea why?

Sorry, I don't really know much about CMake, so I don't know what happens
here.

T> Here the branch:
T> https://github.com/Cloyz2021/wxWidgets/tree/wxUWP
T>
T> Installation steps and port status:
T> https://github.com/Cloyz2021/wxWidgets/blob/wxUWP/docs/uwp/install.md
T>
T> Diff with master:
T> Comparing wxWidgets:master...Cloyz2021:wxUWP · wxWidgets/wxWidgets · GitHub
T> <https://github.com/wxWidgets/wxWidgets/compare/master...Cloyz2021:wxUWP?expand=1>

Sorry, but there are tons of changes here which don't seem to make much
sense, e.g. I'm almost sure that old (< 2015? or maybe even later?) MSVC
versions can't build UWP applications, so why are there all these changes
to .vcproj files used with them?

Also, what are the MSBuild projects in build/uwp? Are they created by
CMake or manually?

In fact, a related question I have is what is the relationship between
wxUWP and wxMSW? None at all? Or will wxUWP reuse some part of wxMSW? If
so, how will it work, at architectural level?

T> I will do the most I can today(I will manually set *wxUSE_GUI *to
T> continue). Should I submit a PR by the end of day?

It would be nice to have something at least minimally working, i.e. at
least showing a window (== wxFrame) would be great. Right now both of
src/uwp/{frame.cpp,window.cpp} are basically empty, so it doesn't look like
we're there quite yet...

But if you'd like to make a PR, why not, but please remove the unnecessary
changes to all of the build files in this case.

TIA!
VZ

Trylz

unread,
Jan 3, 2022, 3:19:56 PM1/3/22
to wx-...@googlegroups.com
Hello,

The changes are new files copy-pasted from wxMSW. I honestly don't know why they are there(See build\msw).
I removed them, Cmake generation still passes.

I hope I will have a window by end of day :)

Maarten Bent

unread,
Jan 3, 2022, 5:00:17 PM1/3/22
to wx-...@googlegroups.com
Hi,

I tried your branch using CMake.

I use cmake-gui, then select the source and destination directory, generate the msvc solution, change toolkit to uwp, and generate it again.

I have no wxUSE_GUI issues. It is defined for the wxcore project. Maybe you are building wxbase, it has (and should have) wxUSE_GUI=0.

I do encounter the following issues:

1) build/cmake/files.cmake does not contain all the files that you added to build/files. I think you have to manually add all the
set(UWP_*
)
sections and then the files are added when running build/upmake (or just add them manually to files.cmake for now).

2) I had to disable wxUSE_ACCESSIBILITY because it gives: error "wxUSE_ACCESSIBILITY is currently only supported under wxMSW"

3) I get: error "No Target! You should use supplied makefiles for compilation!"
in defs.h because the new UWP target is not yet added to the list of supported targets in the code above.
I added __WXUWP__ myself for now.

After this, the wxcore project is being built. But it still has errors related to the actual UWP implementation.

I hope this clarifies the CMake issues you have.

Regards,
Maarten
--
You received this message because you are subscribed to the Google Groups "wx-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to wx-dev+un...@googlegroups.com.

Trylz

unread,
Jan 3, 2022, 5:53:19 PM1/3/22
to wx-...@googlegroups.com
Hello Maarten,

I will try it out, thank you very much :)

As mentioned by Vadz here, the port is still very premature. Instead of merging to master, I agree we should create a wxUWP branch in the repo and merge the changes there.
In theory things are in place to start the port. WxWidgets controls would be mapped to the WinUI ones:
https://docs.microsoft.com/en-us/windows/winui/api/microsoft.ui.xaml.controls?view=winui-3.0 

On my side I should be able to get back at it on the weekends.

Happy New year!.



You received this message because you are subscribed to a topic in the Google Groups "wx-dev" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/wx-dev/bWq2ObaevzU/unsubscribe.
To unsubscribe from this group and all its topics, send an email to wx-dev+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/wx-dev/753b7a0d-50ec-9dea-825f-1b865d576996%40gmail.com.

Trylz

unread,
Jan 23, 2022, 8:16:06 PM1/23/22
to wx-dev
Hello,

I disabled wxUSE_ACCESSIBILITY and did some cleanup to remove MSW code. Unfortunately I wont have much time to give to the port until our next release (end 2022/ begin 2023).

Here what has be done:
1) Add base wxUWP files.
2) Windows store solution generation via Cmake.
Here is the PR:
https://github.com/wxWidgets/wxWidgets/pull/2635

Here what remaining:
3) Make wxUWP compile
4) Implement wxUWP controls
https://docs.microsoft.com/en-us/windows/winui/api/microsoft.ui.xaml.controls?view=winui-3.0


Thanks !!:)

Vadim Zeitlin

unread,
Jan 24, 2022, 9:28:10 AM1/24/22
to wx-...@googlegroups.com
On Sun, 23 Jan 2022 17:16:06 -0800 (PST) Trylz wrote:

T> I disabled wxUSE_ACCESSIBILITY and did some cleanup to remove MSW code.
T> Unfortunately I wont have much time to give to the port until our next
T> release (end 2022/ begin 2023).
T>
T> Here what has be done:
T> 1) Add base wxUWP files.
T> 2) Windows store solution generation via Cmake.
T> Here is the PR:
T> https://github.com/wxWidgets/wxWidgets/pull/2635
T>
T> Here what remaining:
T> 3) Make wxUWP compile
T> 4) Implement wxUWP controls
T> https://docs.microsoft.com/en-us/windows/winui/api/microsoft.ui.xaml.controls?view=winui-3.0

Hi,

I still plan/hope to have a deeper look at all this, but this won't happen
before at least 3.1.6 and maybe 3.2.0 release, so it will take some time.
Of course, I'd like to encourage anybody else interested in this work to
look at, and maybe continue working on, it.

Thanks,
VZ
Reply all
Reply to author
Forward
0 new messages