fixed makefile to workaround obfuscation bug, changed gpu policy to fix wayland issue

This commit is contained in:
2026-03-06 09:53:46 -05:00
parent c6c5ece956
commit 32a8d07644
2 changed files with 10 additions and 4 deletions
+3 -3
View File
@@ -3,16 +3,16 @@ COMMIT ?= $(shell git rev-parse --short HEAD 2>/dev/null || echo "unknown")
LDFLAGS := -X 'main.version=$(VERSION)' -X 'main.commit=$(COMMIT)'
dev: setup generate clean
WEBKIT_DISABLE_DMABUF_RENDERER=1 go tool wails dev -tags webkit2_41 -loglevel Debug -v 2
go tool wails dev -tags webkit2_41 -loglevel Debug -v 2
dev-debug: setup generate clean
WEBKIT_DISABLE_DMABUF_RENDERER=1 YJ_LOG_LEVEL=debug go tool wails dev -tags webkit2_41 -loglevel Debug -v 2
YJ_LOG_LEVEL=debug go tool wails dev -tags webkit2_41 -loglevel Debug -v 2
build-dev: generate
go tool wails build -tags webkit2_41 -debug -clean -ldflags "$(LDFLAGS)"
build-prod: generate
go tool wails build -tags webkit2_41 -clean -obfuscated -upx -ldflags "-s -w $(LDFLAGS)"
go tool wails build -tags webkit2_41 -clean -upx -ldflags "-s -w $(LDFLAGS)"
build-frontend:
cd frontend && pnpm install && pnpm build
+7 -1
View File
@@ -29,6 +29,12 @@ var (
var frontendDistAssets embed.FS
func main() {
// Work around WebKitGTK DMABuf rendering crashes on certain
// Wayland compositor / GPU-driver combinations.
if os.Getenv("WEBKIT_DISABLE_DMABUF_RENDERER") == "" {
_ = os.Setenv("WEBKIT_DISABLE_DMABUF_RENDERER", "1")
}
isDev := dev.IsDev
// create sLogger
loglevel := resolveLogLevel(isDev)
@@ -83,7 +89,7 @@ func main() {
MaxWidth: 0,
MaxHeight: 0,
Linux: &linux.Options{
WebviewGpuPolicy: linux.WebviewGpuPolicyAlways,
WebviewGpuPolicy: linux.WebviewGpuPolicyOnDemand,
},
})