wailsapp / go-webview2

The Wails fork of go-webview2
Other
34 stars 17 forks source link

Undefined: windows when building Wails 3 project on Windows ARM64 #10

Closed nangtrongvuon closed 2 months ago

nangtrongvuon commented 3 months ago

Go version: 1.22.4 Platform: Windows - ARM64

Reproduce:

wails3 init -n someapp
cd someapp
wails3 dev

Result:

$ wails3 dev
task: Task "install:frontend:deps" is up to date
task: Task "install:frontend:deps" is up to date
task: [dev:frontend] npm run dev -- --port 9245 --strictPort

> frontend@0.0.0 dev
> vite --port 9245 --strictPort

  VITE v5.3.1  ready in 1556 ms

  ➜  Local:   http://localhost:9245/
  ➜  Network: use --host to expose
task: Task "go:mod:tidy" is up to date
task: [generate:syso] wails3 generate syso -arch arm64 -icon icon.ico -manifest wails.exe.manifest -info info.json -out ../wails.syso
task: [generate:icons] wails3 generate icons -input appicon.png
task: Task "generate:bindings" is up to date
task: Task "install:frontend:deps" is up to date
task: Task "build:frontend" is up to date
task: [build:windows] go build -gcflags=all="-l" -o build/bin/someapp.exe
# github.com/wailsapp/go-webview2/pkg/edge
..\..\go\pkg\mod\github.com\wailsapp\go-webview2@v1.0.11\pkg\edge\chromium_arm64.go:23:12: undefined: windows

I suspect it might be because of this commit https://github.com/wailsapp/go-webview2/commit/d039be2685870668a5a7d29f6ba3feb201dbcdd6

And the fact that chromium_arm64.go doesn't import "golang.org/x/sys/windows" like chromium_amd64.go

atterpac commented 3 months ago

Could you try this PR? #11 I dont have an ARM windows machine to test on

nangtrongvuon commented 2 months ago

Could you try this PR? #11 I dont have an ARM windows machine to test on It seems to have been fixed by https://github.com/wailsapp/go-webview2/pull/9! I tested it on Windows ARM64 running in VMWare Fusion on a Mac M1.