-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Unable to Run on Windows 7 x 64 #1063
Comments
According to here and here, Windows 7 doesn't support HiDPI like Windows 8.1+ does. Windows 7 does have extended support available until 2023 so we may decide to use add build tags to remove the shcore.dll requirement as it's still a vaild target to support. I don't have a windows 7 machine (only a VM of windows 10) so I wouldn't be able to reproduce. One potential option might be to fetch the .dll for yourself and experiment with dropping it into system32. I doubt it'll work though. Note, I'm not endorsing this link, a better place to get it would be from a system you trust's system32 folder and copying it over. If copying the dll works, you can bundle the .dll into your program using go embed and drop it into place before initializing the Wails app. Would require administrator privileges the first time though. Also, don't release the app anywhere with the dll. Only use this for internal projects (which I'm assuming is your intent if you're using Windows 7). |
If I can't develop app on Windows 7. Can I run Wails exe file on it? I tried the starter app followed Wails official documents, built the exe file. The app is running fine on Windows 10, but it is not running on Windows 7. When I click the app.exe, it doesn't do anything (not even pop up any error messages). My Windows 7 machine already has Webview2 runtime installed. |
@KiddoV no, wails currently requires a library (dll) that was introduced in Windows 8.1. Windows 7 is not currently supported (as of this PR). However, I've done some more research into this for you so I could get some better background ready before we rope in @leaanthony . Looking through your stacktrace, the reason Wails doesn't support Windows 7 is because the underlying GUI library makes use of shcore.dll. You can see this here: modshcore = syscall.NewLazyDLL("shcore.dll"). This is used later to get the Monitor's DPI (as I said earlier) and then size the windows properly. @leaanthony did not write winc, he forked it from tadvi/winc. However, I think we might be able to do something to fix it. Some documentation on the environment is available here. I mentioned earlier, I do not own a Windows 7 machine to test this out, but if you can work with me to test, I can throw a patch together for you. Can you message me on the Gophers Slack? My handle is the same there as on github. |
The trouble I'm having is some really confusing, conflicting documentation from the folks over at Microsoft. According to the Documentation for GetDpiForSystem(), the minimum supported client is Windows 10:
However, the documentation page titled High DPI Desktop Application Development on Windows claims the following:
Similarly, the documentation for SetProcessDPIAware shows the following:
So, we should be able to call this function, and the minimum requirement was likely updated in error. To further back this up, rw-designer has an article from 2007 (!) describing how to use the user32.dll library. So the documentation is almost definitely wrong. I've created a fork of winc and submitted a Pull Request to include the call to the function that gets the DPI. |
Am OK accepting PRs for Windows < 10 support but will not be supporting it. Any bugs raised against windows < 10 will have a won't fix label but I won't close so someone else can deal with it. That's the best I can do considering my bandwidth. |
@leaanthony that's totally reasonable in my opinion. |
@KiddoV Can you please try to compile for windows 7 with the following change in your go.mod:
If it is successful, I will note it in the PR I submitted and hopefully we can get it merged. |
@leaanthony this got auto-closed, can we reopen until it's confirmed fixed? Also, the go.mod file still needs to be updated |
It doesn't fix. Commented on the PR |
@KiddoV update: try the following in your go.mod:
|
Thank you for all the support, I will try it on Monday when I get back to work. |
The patch doesn't currently compile @KiddoV - we'll need to wait for it to be updated. Thanks |
I'm closing this as I'm not officially supporting it as previously mentioned but happy for the conversation and PRs to continue. |
@leaanthony I got this ERR: |
Yes. Read 2 comments above. We'll need to wait for a fix to continue. |
@KiddoV I know I said I can't guarantee I could patch it, but I felt bad giving you hope it might work. It is also somewhat embarrassing submitting broken patches. I've acquired a windows 7 and windows 10 machine. I will get this working this weekend. In the meantime, can you try wails v1? I think that will work and it's a good stopgap until I have a working patch. @leaanthony can you go ahead and assign the issue to me? I won't send another pr until I have screenshots of it working on both 7 and 10. |
@taigrr Thank you. Will be waiting! |
@KiddoV once leaanthony/winc#11 is merged, you should be good to go. |
Merged! |
Contains fixes for wailsapp#1049 and wailsapp#1063
Contains fixes for wailsapp#1049, wailsapp#1063 and wailsapp#1083
@taigrr @leaanthony thank you both, it works on Windows 7 now. Yayy! |
No problem, hopefully you don't run into future problems, please keep in mind it's unsupported. Might add a warning to the readme saying as much as well. |
Contains fixes for wailsapp#1049, wailsapp#1063 and wailsapp#1083
I found a project to solve the problem that Windows7 can run :https://github.com/fire988/FakeShcore |
Yeah I don't recommend running 3rd party dlls like this. |
Description
Hello, I am new to Wails. Pretty cool project!
I have a problem compiling the app on Windows 7 using
wails dev
command.Error Output
Expected behaviour
App should run normally.
System Details
I might have missed something, this is new to me. Please let me know!
Thank you!
The text was updated successfully, but these errors were encountered: