Skip to content

Use soname in WPEWebkit availability check#30

Open
shatyuka wants to merge 2 commits into
AvaloniaUI:mainfrom
shatyuka:fix/wpe-check
Open

Use soname in WPEWebkit availability check#30
shatyuka wants to merge 2 commits into
AvaloniaUI:mainfrom
shatyuka:fix/wpe-check

Conversation

@shatyuka
Copy link
Copy Markdown
Contributor

No description provided.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the Linux WPE WebKit availability probe to load the libraries by their soname (*.so.1), aligning the check with the runtime-linked library names used by the WPE interop layer.

Changes:

  • Switched the WPE library availability checks from unversioned .so names to soname .so.1 names.
  • Simplified the check logic by removing explicit handle management.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +104 to 109
if (!NativeLibrary.TryLoad("libWPEWebKit-2.0.so.1", out _))
return false;
if (!NativeLibrary.TryLoad("libWPEBackend-fdo-1.0.so", out var fdoHandle))
{
NativeLibrary.Free(webkitHandle);
if (!NativeLibrary.TryLoad("libWPEBackend-fdo-1.0.so.1", out _))
return false;
}
if (!NativeLibrary.TryLoad("libwpe-1.0.so", out var wpeHandle))
{
NativeLibrary.Free(fdoHandle);
NativeLibrary.Free(webkitHandle);
if (!NativeLibrary.TryLoad("libwpe-1.0.so.1", out _))
return false;
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unloading a module is always troublesome, and it's almost never the case that these three modules don't coexist.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants