Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
skiko
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
liuqiang
skiko
Commits
913a31a1
Commit
913a31a1
authored
Jun 28, 2021
by
Nikolay Igotti
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Load once.
parent
b55efc68
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
0 deletions
+4
-0
Library.kt
skiko/src/jvmMain/kotlin/org/jetbrains/skiko/Library.kt
+4
-0
No files found.
skiko/src/jvmMain/kotlin/org/jetbrains/skiko/Library.kt
View file @
913a31a1
...
...
@@ -5,6 +5,7 @@ import java.io.File
import
java.io.InputStreamReader
import
java.nio.file.Files
import
java.nio.file.StandardCopyOption
import
java.util.concurrent.atomic.AtomicBoolean
object
Library
{
private
val
skikoLibraryPath
=
System
.
getProperty
(
"skiko.library.path"
)
...
...
@@ -44,12 +45,15 @@ object Library {
return
file
}
private
var
loaded
=
AtomicBoolean
(
false
)
// This function does the following: on request to load given resource,
// it checks if resource with given name is found in content-derived directory
// in Skiko's home, and if not - unpacks it. Also, it could load additional
// localization resource on platforms wher it is needed.
@Synchronized
fun
load
()
{
if
(
loaded
.
compareAndExchange
(
false
,
true
))
return
val
name
=
"skiko-$hostId"
val
platformName
=
System
.
mapLibraryName
(
name
)
val
icu
=
if
(
hostOs
.
isWindows
)
"icudtl.dat"
else
null
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment