Skip to content
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

allow builds for webkit2gtk-4.1 #3465

Merged
merged 2 commits into from
May 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
go-version: ['1.20']
go-version: ['1.22']

steps:
- name: Checkout code
Expand Down
4 changes: 3 additions & 1 deletion v2/internal/frontend/desktop/linux/clipboard.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@
package linux

/*
#cgo linux pkg-config: gtk+-3.0 webkit2gtk-4.0
#cgo linux pkg-config: gtk+-3.0
#cgo !webkit2_41 pkg-config: webkit2gtk-4.0
#cgo webkit2_41 pkg-config: webkit2gtk-4.1

#include "gtk/gtk.h"
#include "webkit2/webkit2.h"
Expand Down
4 changes: 3 additions & 1 deletion v2/internal/frontend/desktop/linux/frontend.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@
package linux

/*
#cgo linux pkg-config: gtk+-3.0 webkit2gtk-4.0
#cgo linux pkg-config: gtk+-3.0
#cgo !webkit2_41 pkg-config: webkit2gtk-4.0
#cgo webkit2_41 pkg-config: webkit2gtk-4.1

#include "gtk/gtk.h"
#include "webkit2/webkit2.h"
Expand Down
4 changes: 3 additions & 1 deletion v2/internal/frontend/desktop/linux/gtk.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@
package linux

/*
#cgo linux pkg-config: gtk+-3.0 webkit2gtk-4.0
#cgo linux pkg-config: gtk+-3.0
#cgo !webkit2_41 pkg-config: webkit2gtk-4.0
#cgo webkit2_41 pkg-config: webkit2gtk-4.1

#include "gtk/gtk.h"

Expand Down
5 changes: 4 additions & 1 deletion v2/internal/frontend/desktop/linux/keys.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@
package linux

/*
#cgo linux pkg-config: gtk+-3.0 webkit2gtk-4.0
#cgo linux pkg-config: gtk+-3.0
#cgo !webkit2_41 pkg-config: webkit2gtk-4.0
#cgo webkit2_41 pkg-config: webkit2gtk-4.1
#include "gtk/gtk.h"
Expand Down
4 changes: 3 additions & 1 deletion v2/internal/frontend/desktop/linux/menu.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@
package linux

/*
#cgo linux pkg-config: gtk+-3.0 webkit2gtk-4.0
#cgo linux pkg-config: gtk+-3.0
#cgo !webkit2_41 pkg-config: webkit2gtk-4.0
#cgo webkit2_41 pkg-config: webkit2gtk-4.1

#include "gtk/gtk.h"

Expand Down
5 changes: 4 additions & 1 deletion v2/internal/frontend/desktop/linux/screen.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@
package linux

/*
#cgo linux pkg-config: gtk+-3.0 webkit2gtk-4.0
#cgo linux pkg-config: gtk+-3.0
#cgo !webkit2_41 pkg-config: webkit2gtk-4.0
#cgo webkit2_41 pkg-config: webkit2gtk-4.1

#cgo CFLAGS: -w
#include <stdio.h>
#include "webkit2/webkit2.h"
Expand Down
3 changes: 2 additions & 1 deletion v2/internal/frontend/desktop/linux/webkit2.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
package linux

/*
#cgo linux pkg-config: webkit2gtk-4.0
#cgo !webkit2_41 pkg-config: webkit2gtk-4.0
#cgo webkit2_41 pkg-config: webkit2gtk-4.1
#include "webkit2/webkit2.h"
*/
import "C"
Expand Down
4 changes: 3 additions & 1 deletion v2/internal/frontend/desktop/linux/window.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@
package linux

/*
#cgo linux pkg-config: gtk+-3.0 webkit2gtk-4.0
#cgo linux pkg-config: gtk+-3.0
#cgo !webkit2_41 pkg-config: webkit2gtk-4.0
#cgo webkit2_41 pkg-config: webkit2gtk-4.1

#include <JavaScriptCore/JavaScript.h>
#include <gtk/gtk.h>
Expand Down
4 changes: 3 additions & 1 deletion v2/pkg/assetserver/webview/request_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@
package webview

/*
#cgo linux pkg-config: gtk+-3.0 webkit2gtk-4.0 gio-unix-2.0
#cgo linux pkg-config: gtk+-3.0 gio-unix-2.0
#cgo !webkit2_41 pkg-config: webkit2gtk-4.0
#cgo webkit2_41 pkg-config: webkit2gtk-4.1

#include "gtk/gtk.h"
#include "webkit2/webkit2.h"
Expand Down
4 changes: 3 additions & 1 deletion v2/pkg/assetserver/webview/responsewriter_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@
package webview

/*
#cgo linux pkg-config: gtk+-3.0 webkit2gtk-4.0 gio-unix-2.0
#cgo linux pkg-config: gtk+-3.0 gio-unix-2.0
#cgo !webkit2_41 pkg-config: webkit2gtk-4.0
#cgo webkit2_41 pkg-config: webkit2gtk-4.1

#include "gtk/gtk.h"
#include "webkit2/webkit2.h"
Expand Down
6 changes: 4 additions & 2 deletions v2/pkg/assetserver/webview/webkit2_36+.go
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
//go:build linux && (webkit2_36 || webkit2_40)
//go:build linux && (webkit2_36 || webkit2_40 || webkit2_41 )

package webview

/*
#cgo linux pkg-config: gtk+-3.0 webkit2gtk-4.0 libsoup-2.4
#cgo linux pkg-config: gtk+-3.0
#cgo !webkit2_41 pkg-config: webkit2gtk-4.0 libsoup-2.4
#cgo webkit2_41 pkg-config: webkit2gtk-4.1 libsoup-3.0

#include "gtk/gtk.h"
#include "webkit2/webkit2.h"
Expand Down
6 changes: 4 additions & 2 deletions v2/pkg/assetserver/webview/webkit2_40+.go
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
//go:build linux && webkit2_40
//go:build linux && (webkit2_40 || webkit2_41)

package webview

/*
#cgo linux pkg-config: gtk+-3.0 webkit2gtk-4.0 gio-unix-2.0
#cgo linux pkg-config: gtk+-3.0 gio-unix-2.0
#cgo !webkit2_41 pkg-config: webkit2gtk-4.0
#cgo webkit2_41 pkg-config: webkit2gtk-4.1

#include "gtk/gtk.h"
#include "webkit2/webkit2.h"
Expand Down
5 changes: 5 additions & 0 deletions v2/pkg/assetserver/webview/webkit2_41.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
//go:build linux && webkit2_41

package webview

const Webkit2MinMinorVersion = 41
2 changes: 1 addition & 1 deletion v2/pkg/assetserver/webview/webkit2_legacy.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//go:build linux && !(webkit2_36 || webkit2_40)
//go:build linux && !(webkit2_36 || webkit2_40 || webkit2_41)

package webview

Expand Down
3 changes: 3 additions & 0 deletions website/src/pages/changelog.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Added
- Support for compiling with `libwebkit2gtk-4.1` instead of `4.0` to support latest Ubuntu release by [atterpac](https://github.com/atterpac) in [#3465](https://github.com/wailsapp/wails/pull/3465)

## v2.8.2 - 2024-05-08

### Breaking Change
Expand Down
Loading