Skip to content

Commit eb0c969

Browse files
committed
Core: Update the natives.
Also add support for GNU vs MUSL.
1 parent 84bd9ec commit eb0c969

File tree

15 files changed

+12
-5
lines changed

15 files changed

+12
-5
lines changed

core/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,13 @@
2222
<dependency>
2323
<groupId>co.casterlabs.commons</groupId>
2424
<artifactId>platform</artifactId>
25-
<version>1.6.1</version>
25+
<version>1.7.0</version>
2626
<scope>compile</scope>
2727
</dependency>
2828
<dependency>
2929
<groupId>co.casterlabs.commons</groupId>
3030
<artifactId>io</artifactId>
31-
<version>1.6.1</version>
31+
<version>1.7.0</version>
3232
<scope>compile</scope>
3333
</dependency>
3434

core/src/main/java/dev/webview/webview_java/WebviewNative.java

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
import com.sun.jna.ptr.PointerByReference;
3737

3838
import co.casterlabs.commons.io.streams.StreamUtil;
39+
import co.casterlabs.commons.platform.LinuxLibC;
3940
import co.casterlabs.commons.platform.Platform;
4041
import lombok.NonNull;
4142
import lombok.SneakyThrows;
@@ -49,9 +50,15 @@ private static WebviewNative runSetup() {
4950

5051
switch (Platform.osDistribution) {
5152
case LINUX: {
52-
libraries = new String[] {
53-
"/dev/webview/webview_java/natives/" + Platform.archTarget + "/linux/libwebview.so"
54-
};
53+
if (LinuxLibC.isGNU()) {
54+
libraries = new String[] {
55+
"/dev/webview/webview_java/natives/" + Platform.archTarget + "/linux/gnu/libwebview.so"
56+
};
57+
} else {
58+
libraries = new String[] {
59+
"/dev/webview/webview_java/natives/" + Platform.archTarget + "/linux/musl/libwebview.so"
60+
};
61+
}
5562
break;
5663
}
5764

Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

0 commit comments

Comments
 (0)