mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2026-08-27 22:34:51 +00:00
multiplatform: init haskell in different thread
This commit is contained in:
+8
-1
@@ -68,5 +68,12 @@ fun initHaskell() {
|
||||
s.acquire()
|
||||
pipeStdOutToSocket(socketName)
|
||||
|
||||
initHS()
|
||||
var inited = false
|
||||
thread(name = "initHs", isDaemon = true) {
|
||||
initHS()
|
||||
inited = true
|
||||
}
|
||||
while (!inited) {
|
||||
Thread.sleep(2)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,10 +3,7 @@ package chat.simplex.desktop
|
||||
import chat.simplex.common.platform.*
|
||||
import chat.simplex.common.showApp
|
||||
import java.io.File
|
||||
import java.nio.file.*
|
||||
import java.nio.file.attribute.BasicFileAttributes
|
||||
import java.nio.file.attribute.FileTime
|
||||
import kotlin.io.path.setLastModifiedTime
|
||||
import kotlin.concurrent.thread
|
||||
|
||||
fun main() {
|
||||
initHaskell()
|
||||
@@ -30,7 +27,14 @@ private fun initHaskell() {
|
||||
//System.load(File(File(vlcDir, "vlc"), libXcb).absolutePath)
|
||||
System.setProperty("jna.library.path", vlcDir.absolutePath)
|
||||
//discoverVlcLibs(File(File(vlcDir, "vlc"), "plugins").absolutePath)
|
||||
initHS()
|
||||
var inited = false
|
||||
thread(name = "initHs", isDaemon = true) {
|
||||
initHS()
|
||||
inited = true
|
||||
}
|
||||
while (!inited) {
|
||||
Thread.sleep(2)
|
||||
}
|
||||
}
|
||||
|
||||
private fun windowsLoadRequiredLibs(libsTmpDir: File, vlcDir: File) {
|
||||
|
||||
Reference in New Issue
Block a user