File tree Expand file tree Collapse file tree 2 files changed +11
-3
lines changed
composeApp/src/jvmMain/kotlin/org/onion/diffusion/utils Expand file tree Collapse file tree 2 files changed +11
-3
lines changed Original file line number Diff line number Diff line change 44
55本项目遵循 [ 语义化版本] ( https://semver.org/spec/v2.0.0.html ) 。
66
7+ ## v1.3.1
8+
9+ - fix dylib copy in MacOS
10+
11+
712## v1.3.0
813
914- jvmArgs change
Original file line number Diff line number Diff line change @@ -51,8 +51,11 @@ object NativeLibraryLoader {
5151 val tempLibFile: File
5252 val tempLibLibraryFile: File
5353 try {
54- // Create a temporary file with a more descriptive name if possible
55- tempLibFile = File (libFileName)
54+ // Create a temporary directory to hold the library files
55+ val tempDir = java.nio.file.Files .createTempDirectory(" native_libs_${baseName} _" ).toFile()
56+ tempDir.deleteOnExit() // Clean up directory on exit
57+
58+ tempLibFile = File (tempDir, libFileName)
5659 tempLibFile.deleteOnExit() // Important for cleanup
5760 println (" tempFile Name ${tempLibFile.absolutePath} " )
5861 FileOutputStream (tempLibFile).use { outputStream ->
@@ -61,7 +64,7 @@ object NativeLibraryLoader {
6164 }
6265 }
6366 if (libFileLibraryStream != null ){
64- tempLibLibraryFile = File (" $libFileName .a" )
67+ tempLibLibraryFile = File (tempDir, " $libFileName .a" )
6568 tempLibLibraryFile.deleteOnExit()
6669 FileOutputStream (tempLibLibraryFile).use { outputStream ->
6770 libFileLibraryStream.use { input ->
You can’t perform that action at this time.
0 commit comments