wails: After Build Cannot Run in Win10 AMD64

Description

I create a HelloWorld project and build it. But the builded application cannot runing in my windows 10 amd64.(Nothing window ui being open) It can runing well in win 11.

To Reproduce

1, create a helloworld project and build it , with below wails commands: wails init -n helloworld wails build 2, Double click the compiled exe file : ${project folder}/build/bin/helloworld.exe

After clicked , nothing happen in my win10 amd64, but it work in win11 amd64.

Expected behaviour

Nothing.

Screenshots

No response

Attempted Fixes

No response

System Details

Wails CLI v2.0.0-beta.44.2

System
------
OS:             Windows 10 Pro
Version:        1903 (Build: 18362)
ID:
Go Version:     go1.19.1
Platform:       windows
Architecture:   amd64

Wails
------
Version:        v2.0.0-beta.44.2

Dependency      Package Name    Status          Version
----------      ------------    ------          -------
WebView2        N/A             Installed       105.0.1343.27
npm             N/A             Installed       8.19.1
*upx            N/A             Installed       upx 3.96
*nsis           N/A             Installed       v3.08

* - Optional Dependency

Diagnosis
---------
Your system is ready for Wails development!

If Wails is useful to you or your company, please consider sponsoring the project:
https://github.com/sponsors/leaanthony

Additional context

No response

About this issue

  • Original URL
  • State: open
  • Created 2 years ago
  • Comments: 24 (7 by maintainers)

Most upvoted comments

Actually, that issue seems to be a bit different than mine. My wailsjs/runtime and wailsjs/go folders do get deleted/recreated when starting up a dev instance and that often causes (what I believe to be) tsc errors saying that the module wasn’t found.

If you want I can create a separate issue that addresses it with more details.

Update: I just learned that by not including the -windowsconsole flag during builds, it doesn’t show any errors if you launch the .exe via CMD/Powershell (which I guess kinda makes sense), so it turned out that I had changed the code in a way that prevented it from properly functioning and it was producing an error, I just couldn’t see it due to the lack of the flag.

I have now fixed the code and it now works as expected. It still doesn’t explain why dev builds worked, but I digress.

Please disregard my previous comment.