-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
fix(bundler): bundle additional webkit files. patch absolute paths in libwebkit*.so files. fixes #2805,#2689 #2940
Conversation
So i'm getting pretty confident so far, so here are test result i have so far. Testresultswhat i personally tested
what others tested
|
Looking good! |
Sooo, i'd like to prepare this PR to be ready for merging, because it looks like it's working pretty reliable and doesn't introduce any regressions and therefore shouldn't need any substantial changes anymore. There are 2 things to talk about first tho. 1) Moving the plugin fork to the tauri org: 2) Possible code changes:
So yeah either 1. or 2., I'm fine with both, but still leaning towards 1. cause it looks like the safest bet 🤔 |
I'm fine with a direct transfer of the plugin. |
@FabianLars absolute legend |
So I know this is not the same project but I would really like some help trying to figure it out. I'm using Orca slicer for my klipper printer and I cannot get the Device tab to display the mainsail interface anymore. I believe it's related to one of the issues in this thread, at this point, any and all help would be appreciated. Thank you for your time. |
What kind of change does this PR introduce? (check at least one)
Does this PR introduce a breaking change? (check one)
The PR fulfills these requirements:
fix: #xxx[,#xxx]
, where "xxx" is the issue number)This needs to be tested on different distros before being merged!✅Speaking of testing, fedora still won't work because of thosepermission denied
errors (unrelated to this PR).^Fixed this in the linuxdeploy plugin linked below.
I'm not sure if it actually fixes #2689, but it should because it looks like a version mismatch between the bundled webkit and the system's one.
This is a really ugly fix imo, but i don't really think much can be improved concept wise, but who knows 🤷
Anyway, here goes the explanation and stuff.
Basically we had 2 problems:
The first issue's fix is pretty easy but also somewhat risky as we have to search for those files as each distro stores them somewhere else. That's the main reason why we need more testing, who knows what absurd paths are out there in the wild...
WebKitNetworkProcess
,WebKitWebProcess
andinjected-bundle/libwebkit2gtkinjectedbundle.so
in/usr/lib/x86_64-linux-gnu/webkit2gtk-4.0/
WebKitNetworkProcess
andWebKitWebProcess
inusr/libexec/webkit2gtk-4.0/
andlibwebkit2gtkinjectedbundle.so
in/usr/lib64/webkit2gtk-4.0/injected-bundle/
The injectedbundle file doesn't seem to be needed as far as i can see, but it will log an error at launch (without crashing) so probably better to just include it.
The fork of linuxdeploy-plugin-gtk is needed because this plugin will overwrite the libwebkit*.so files and therefore we can't patch those files in
template/appimage.sh
. -> This one took me too long to notice...Link to the change: https://github.com/FabianLars/linuxdeploy-plugin-gtk/blob/master/linuxdeploy-plugin-gtk.sh#L330
And yes we have to glob pattern match the file and folder names again because they seem to differ between distros too 😒
We can also move the fork to the tauri org, i don't really care, but i don't expect such a change to make it into upstream at all.
Furthermore i won't even try to get something like this into webkit itself, that's no bueno for my mental health lol.
Update 1
find
command can throw "permission denied" errors on protected folders. Normally, this would be fine as it just continues after throwing them. In this case we need to add|| true
to not trigger theset -euxo pipefail
guard. Unfortunately this will skip the exit on other errors from these commands too, so we can still end up with broken AppImages after a "successful" script execution, but at least they will be logged when invoked with--verbose
.Update 2
Fixed the
os error 13
in the gtk plugin which crashed the appimage script on fedora (and probably on other distros too).This also fixes the appimage folder being undeletable on the following runs which also crashed the bundler but even earlier.
Update 3
Test results are coming in, check comment down below.
How to test
cargo install tauri-cli --force --git https://github.com/FabianLars/tauri --branch fix/appimage
-> remember to revert/remove this afterwards :)cargo tauri build
to build your project, the npm/yarn command won't work. (You may need to use tauri's next branch)