Skip to content

Commit

Permalink
Updated to use webp 1.4.0 (#297)
Browse files Browse the repository at this point in the history
  • Loading branch information
sksamuel authored Dec 1, 2024
1 parent f79474a commit 407af51
Show file tree
Hide file tree
Showing 24 changed files with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,17 +37,17 @@ protected static Path createPlaceholder(String name) throws IOException {
}

protected static void installBinary(Path output, String... sources) throws IOException {
logger.info("Installing binary at " + output);
logger.info("Installing binary at {}", output);
for (String source : sources) {
logger.debug("Trying source from " + source);
logger.debug("Trying source from {}", source);
InputStream in = WebpHandler.class.getResourceAsStream(source);
if (in != null) {
logger.debug("Source detected " + source);
logger.debug("Source detected {}", source);
Files.copy(in, output, StandardCopyOption.REPLACE_EXISTING);
in.close();

if (!SystemUtils.IS_OS_WINDOWS) {
logger.info("Setting executable " + output);
logger.info("Setting executable {}", output);
setExecutable(output);
}
return;
Expand Down Expand Up @@ -83,15 +83,15 @@ private static String[] macIntel(String binaryName) {
return new String[]{
"/webp_binaries/" + binaryName,
"/webp_binaries/mac/" + binaryName,
"/dist_webp_binaries/libwebp-1.3.2-mac-x86-64/bin/" + binaryName,
"/dist_webp_binaries/libwebp-1.4.0-mac-x86-64/bin/" + binaryName,
};
}

private static String[] macArm(String binaryName) {
return new String[]{
"/webp_binaries/" + binaryName,
"/webp_binaries/mac_arm64/" + binaryName,
"/dist_webp_binaries/libwebp-1.3.2-mac-arm64/bin/" + binaryName,
"/dist_webp_binaries/libwebp-1.4.0-mac-arm64/bin/" + binaryName,
};
}

Expand All @@ -104,24 +104,24 @@ private static String[] windows(String binaryName) {
"/webp_binaries/window/" + binaryName + ".exe",
"/webp_binaries/windows/" + binaryName,
"/webp_binaries/windows/" + binaryName + ".exe",
"/dist_webp_binaries/libwebp-1.3.2-windows-x64/bin/" + binaryName,
"/dist_webp_binaries/libwebp-1.3.2-windows-x64/bin/" + binaryName + ".exe",
"/dist_webp_binaries/libwebp-1.4.0-windows-x64/bin/" + binaryName,
"/dist_webp_binaries/libwebp-1.4.0-windows-x64/bin/" + binaryName + ".exe",
};
}

private static String[] linux(String binaryName) {
return new String[]{
"/webp_binaries/" + binaryName,
"/webp_binaries/linux/" + binaryName,
"/dist_webp_binaries/libwebp-1.3.2-linux-x86-64/bin/" + binaryName,
"/dist_webp_binaries/libwebp-1.4.0-linux-x86-64/bin/" + binaryName,
};
}

private static String[] linuxArm(String binaryName) {
return new String[]{
"/webp_binaries/" + binaryName,
"/webp_binaries/linux/" + binaryName,
"/dist_webp_binaries/libwebp-1.3.2-linux-aarch64/bin/" + binaryName,
"/dist_webp_binaries/libwebp-1.4.0-linux-aarch64/bin/" + binaryName,
};
}

Expand Down
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.
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.
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 comments on commit 407af51

Please sign in to comment.