-
Notifications
You must be signed in to change notification settings - Fork 228
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
build fail on Windows: missing ShellScalingAPI.h #9
Comments
Seems like it. Which version of VS Studio? ShellScalingAPI might need a minimum, I am not sure yet. |
I'm using GCC with MCF thread model (https://gcc-mcf.lhmouse.com/) |
Ah, OK, well I can't help you there. Sorry, I can only directly support standard Visual Studio installations. It would be cool if you can get it working though and contribute some how-to docs. |
That looks more like a GCC issue. Official GCC team does not care about Windows and people who release forks have a set of patches to make it build native Windows executables. I just need to figure out how to enable UWP in GCC if it is supported by any fork at all. |
Good luck! I'd appreciate it a lot if you can contribute some how-to docs if you get it working. I'd love to use GCC and CLion (my preferred IDE) if it is doable. |
Ok, another question: Do you actually use any of WinRT or UWP stuff (they have very specific includes like |
After some investigation, the build succeeded, and I have some information for you:
There is some minor issue with CMake recipe unless the empty starter was really meant to be that empty:
How I made it build:
changes:
What are your thoughts? It turns out it is possible to build Elements using pure GCC on Windows, just without DPI awarness support. |
Very cool! That is good news. I have mixed thoughts about supporting Windows 7 though. I like Win7. But... The UI is designed with multi-scale resolution in mind and Win7 is at the end-of-life already (January 14, 2020). We can probably conditionally support it by detecting the OS (definitely not hard-coded to scale 1.0!), but there's where my mixed thoughts start --the UI behaviour won't be the same. |
I'm more concerned about compiler support than Windows 7 support.
Lines 37 to 49 in 9e73461
|
Perhaps, I'm not yet convinced that supporting Windows 7 is a good idea.
Scale should not be a compile time constant. It should be user configurable. But how do you do that as a special case for non-DPI aware OSes? That is the question.
Sorry, I do not have answers to the last two questions. |
What's wrong with MSVC compiler support? It is free and even the std lib became open source recently. Is it an ideological issue coming form the evil software vendor :-) ? |
Party yes, but also:
I'm more concerned about GCC support. I might check if any new version has support for |
That might work, at the very least. The thing is, with OSes that support HiDPI, each display can have its own scale value. If the scale is fixed to say 1.0, when you drag a window to a different display with higher resolution, say 4K, it will be very small with very tiny fonts, etc. But if you choose, say 2.0, then it will be very big on low-res displays. I guess there's nothing you can do with such OSes like Win7. And I don't even know if Win8 supports HiDPI. It's a "new" thing and Windows (and Linux!) is playing catch up. I'm genuinely interested with gcc support. I actually started that path, but chose to move to VS as it is more straightforward. If you can get HiDPI support possible, that would be great! |
Ok, so I will wait few days with this issue (Latest MinGW-w64 release was 10.11., the distro I use builds every 2 weeks and the last one was 06.11 so I can expect next in 4-5 days) to see if Regarding |
Update: I may submit multiple CMake-related issues which also block GCC build on Windows for me and general modern CMake problems/improvements. Lines 5 to 6 in 9e73461
Since the library aims for modern C++, I would expect it also to support modern CMake (which had similar overhaul as old C++ vs modern C++), that is:
Some of these unnecessarily complicate the build or block GCC support on Windows and since the project already requires CMake 3.7.2 it is no problem to fix these. Refer to https://cliutils.gitlab.io/modern-cmake/ and it's own linked posts. |
Posted CMake PR (#13), unfortunately this issue can not be fixed for MinGW (yet). elements/lib/host/windows/app.cpp Lines 96 to 101 in 02c1ab0
the So as of now, I will just build the library with a patch that comments out scaling API, sets The incompletness of the Windows scaling API is a compiler support problem, but I think the used Folder ID is wrong. |
I'm trying to build elements on Windows using MCF GCC 9.1. I downloaded elements, infra and json as the documentation says but there is no information how to handle Cairo dependency other than Mac OS
brew
install.CMake does not complain about anything, yet there are missing includes:
After brief research, I find out this file is not from Cairo but a part of UWP. Do I miss some Windows SDK?
The text was updated successfully, but these errors were encountered: