-
Notifications
You must be signed in to change notification settings - Fork 123
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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 #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 } ```
- Loading branch information
Showing
4 changed files
with
34 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters