Description
Since alpha.93, the default CGO build target on Linux is GTK4 / WebKitGTK 6 (the GTK3 path is retained behind -tags gtk3, per the alpha.93 changelog). But wails3 generate appimage still hard-codes the WebKit2GTK 4.x runtime filenames when packaging, so on a runner that only has the GTK4 toolchain installed, AppImage generation aborts:
Processing GTK files. [3/5] 60% | 1m13s
ERROR Unable to locate all required files: libwebkit2gtkinjectedbundle.so
task: Failed to run task "linux:create:appimage": exit status 1
The hardcoded list:
https://github.com/wailsapp/wails/blob/v3.0.0-alpha.93/v3/internal/commands/appimage.go#L142
filesNeeded := []string{"WebKitWebProcess", "WebKitNetworkProcess", "libwebkit2gtkinjectedbundle.so"}
No branching on build tag, so even when the binary it's packaging is linked against WebKitGTK 6, the bundler still goes looking for the GTK3 set.
To Reproduce
go.mod pinned to github.com/wailsapp/wails/v3 v3.0.0-alpha.93, no -tags gtk3.
- On Ubuntu 24.04:
sudo apt install libgtk-4-dev libwebkitgtk-6.0-dev (no GTK3 dev packages).
go install github.com/wailsapp/wails/v3/cmd/wails3@v3.0.0-alpha.93 — succeeds.
go build ./... — succeeds, links against GTK4 / WebKitGTK 6.
wails3 generate appimage -binary <APP> -icon <ICON> -desktopfile <FILE> -outputdir <DIR> -builddir <DIR> — fails as above.
Expected behaviour
When the binary is built against GTK4 / WebKitGTK 6, the AppImage bundler should pick the matching WebKitGTK 6 runtime files instead of the WebKit2GTK 4.x set — either by checking the build tag, ldd'ing the input binary, or taking a CLI flag.
Attempted Fixes
Workaround that works today: pin the app build to -tags gtk3 and put libgtk-3-dev libwebkit2gtk-4.1-dev back on the runner. The changelog calls this the "legacy" path, but pre-alpha.93 it was just "the path", so the takeaway from a downstream perspective is "GTK4 AppImage isn't wired up yet" rather than "GTK3 was deprecated and you missed it".
Additional context
Hit this when bumping a downstream project from alpha.90 → alpha.93. Same Taskfile.yml worked at alpha.90 with libgtk-3-dev libwebkit2gtk-4.1-dev installed; failed at alpha.93 with the GTK4 packages; recovered at alpha.93 with -tags gtk3 + GTK3 packages. Happy to attach wails doctor output from a matching Linux env if useful.
Description
Since alpha.93, the default CGO build target on Linux is GTK4 / WebKitGTK 6 (the GTK3 path is retained behind
-tags gtk3, per the alpha.93 changelog). Butwails3 generate appimagestill hard-codes the WebKit2GTK 4.x runtime filenames when packaging, so on a runner that only has the GTK4 toolchain installed, AppImage generation aborts:The hardcoded list:
https://github.com/wailsapp/wails/blob/v3.0.0-alpha.93/v3/internal/commands/appimage.go#L142
No branching on build tag, so even when the binary it's packaging is linked against WebKitGTK 6, the bundler still goes looking for the GTK3 set.
To Reproduce
go.modpinned togithub.com/wailsapp/wails/v3 v3.0.0-alpha.93, no-tags gtk3.sudo apt install libgtk-4-dev libwebkitgtk-6.0-dev(no GTK3 dev packages).go install github.com/wailsapp/wails/v3/cmd/wails3@v3.0.0-alpha.93— succeeds.go build ./...— succeeds, links against GTK4 / WebKitGTK 6.wails3 generate appimage -binary <APP> -icon <ICON> -desktopfile <FILE> -outputdir <DIR> -builddir <DIR>— fails as above.Expected behaviour
When the binary is built against GTK4 / WebKitGTK 6, the AppImage bundler should pick the matching WebKitGTK 6 runtime files instead of the WebKit2GTK 4.x set — either by checking the build tag, ldd'ing the input binary, or taking a CLI flag.
Attempted Fixes
Workaround that works today: pin the app build to
-tags gtk3and putlibgtk-3-dev libwebkit2gtk-4.1-devback on the runner. The changelog calls this the "legacy" path, but pre-alpha.93 it was just "the path", so the takeaway from a downstream perspective is "GTK4 AppImage isn't wired up yet" rather than "GTK3 was deprecated and you missed it".Additional context
Hit this when bumping a downstream project from alpha.90 → alpha.93. Same
Taskfile.ymlworked at alpha.90 withlibgtk-3-dev libwebkit2gtk-4.1-devinstalled; failed at alpha.93 with the GTK4 packages; recovered at alpha.93 with-tags gtk3+ GTK3 packages. Happy to attachwails doctoroutput from a matching Linux env if useful.