-
Notifications
You must be signed in to change notification settings - Fork 138
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
#223 support webp binary in multiple os at once #225
#223 support webp binary in multiple os at once #225
Conversation
} | ||
|
||
return new String[] { | ||
"/webp_binaries/" + os + "/" + binaryName, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need to include the OS in the target path, since you're not going to have more than one installed at a time? And this way it would rename backwards compatible ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i misunderstood. it definitly does have backward compatilbity issue.
loading webp binary by environment variable looks better.
I think having the binaries in the dist/os/ folder is good.
But when we copy it, it can just go into /webp_binaries/binary
because you will never copy more than 1 per computer.
…On Sat, 24 Apr 2021 at 23:09, Dong Min Seol ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In scrimage-webp/src/main/java/com/sksamuel/scrimage/webp/WebpHandler.java
<#225 (comment)>:
> @@ -32,6 +32,21 @@ protected static void installBinary(Path output, String... sources) throws IOExc
throw new IOException("Could not locate webp binary at " + Arrays.toString(sources));
}
+ protected static String[] getBinaryPath(String binaryName) {
+ String os = "linux";
+
+ if(SystemUtils.IS_OS_WINDOWS) {
+ os = "window";
+ } else if(SystemUtils.IS_OS_MAC) {
+ os = "mac";
+ }
+
+ return new String[] {
+ "/webp_binaries/" + os + "/" + binaryName,
i think i misunderstood. it definitly does have backward compatilbity
issue.
loading webp binary as environment variable looks better.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#225 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAFVSGT7XBWJ4NB6SFAYLDDTKOIV5ANCNFSM43MWXSFA>
.
|
ok then i'll add Did I get it right? |
Looks good! |
oh sorry for my mistake i'll fix test codes |
Cool, will need to be a new PR since I merged this one :) |
thanks i just created new one. #227 |
#223
i added platform specific subdirectory for webp binary (default is linux) with default embedeed binaries for each os
since i can't find out the version of pre-exisisting linux webp binaries,
i chaged all binareis to latest version (1.20)
this is off topic, but converting animated gif to animated webp requires
gif2webp
which scrimage does not implemented
so i document it either.