System property to extract binaries to a different folder (#891)
Skiko extracts binaries to `~/.skiko` by default, but it is not always
possible. This PR adds a way to override the folder where to extract
binaries:
```
System.setProperty("skiko.data.path", File(System.getProperty("java.io.tmpdir")).resolve(".skiko").toString())
```
Fixes https://github.com/JetBrains/skiko/issues/885
The case seems rare - we only have a crash in tests reported. If we have
reports from real users, we have to change the default `~/.skiko` to
something else.
## Testing 1 (manual)
1. Run
```
import org.jetbrains.skia.Bitmap
import java.io.File
fun main() {
val path = File(System.getProperty("java.io.tmpdir")).resolve(".skiko").toString()
println(path)
System.setProperty("skiko.data.path", path)
Bitmap() // loads the library
}
```
2. See that `path` is created
## Testing 2 (manual)
The default way works:
```
import org.jetbrains.skia.Bitmap
fun main() {
Bitmap() // loads the library
}
```
Showing
Please register or sign in to comment