-
Notifications
You must be signed in to change notification settings - Fork 46
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
Eval not working for users without libwebkit2gtk-4.0-dev installed #53
Comments
Are the users who experience issues with (only) The core webview library has recently added support for WebKitGTK API 6.0 but at the same time 4.0 and 4.1 have to be compiled separately to avoid the work involved with supporting them all in a single compiled library. Maybe the latest core library will resolve the issue, but at the same time there's a problem with Go/CGo and how GTK and WebKitGTK versions are hardcoded in the Go bindings. It's a problem because newer Linux distros dropped support for WebKitGTK API 4.0, and old distros may not have anything more recent than 4.0. I'm not personally a Go developer and I've been having a hard time figuring out how to solve this seamlessly, and I'm not 100% sure how to go forward with the Go bindings. |
Hello @SteffenL , thank you for your response. Yesterday, I spent quite some time testing to identify what the dev version was installing that made it work. I discovered that it was the symbolic link from This version of Ubuntu 22 didn't have version I don't know much about C, but I made a change, and it started working:
Am I on the right track? |
I'm trying something else in the Go binding. Here's what I have so far. mkdir webview_go_experiment
cd webview_go_experiment
git clone --branch update-core https://github.com/SteffenL/webview_go.git
git clone --branch experiment https://github.com/SteffenL/webview-go-example.git
cd webview-go-example
go build -tags webview.backend.gtk4_webkitgtk600 -o bind_gtk4_webkitgtk600 ./bind/main.go
go build -tags webview.backend.gtk3_webkitgtk401 -o bind_gtk3_webkitgtk401 ./bind/main.go
go build -tags webview.backend.gtk3_webkitgtk400 -o bind_gtk3_webkitgtk400 ./bind/main.go This uses build tags and constraints in the Go binding to selectively compile the backend. So here you can build 3 different programs using:
It's some sort of progress but I don't want to specify a build tag every time on the command line. |
@SteffenL I was actually planning on doing something similar with the build tags - do you plan on continuing that work? You can create a "default" binding file that just excludes all the build tags for the case that you don't want to specify it, but I will admit it's a little messy:
|
Good afternoon,
In my development environment, where I have the dev packages installed, I can successfully compile, and the application works as expected. However, when I distribute it in production, I noticed that for users who only have libwebkit2gtk-4.0.37 installed, the JavaScript Eval function is not working. If I install libwebkit2gtk-4.0-dev, it starts working, but I would prefer not to have to install the dev version.
Could someone help me with this issue? Thanks.
The text was updated successfully, but these errors were encountered: