Marco Gomiero
02/05/2024, 1:14 PMfromFiles
in such cases. I've tried to add it in the gradle configuration, but the lib seems not to be inside the folder build/compose/binaries/main-release/app/FeedFlow.app/Contents/app
. I got the dylib from the jar of the library (https://github.com/xerial/sqlite-jdbc/blob/master/src/main/resources/org/sqlite/native/Mac/aarch64/libsqlitejdbc.dylib)
What I'm doing wrong? Or what you suggest doing to have sqlite-jdbc working right on the app store?Michael Paus
02/05/2024, 5:48 PMrunReleaseDistributable
?Marco Gomiero
02/05/2024, 6:14 PMExecution failed for task ':desktopApp:runReleaseDistributable'.
> Process 'command '/Users/mg/Workspace/KMP/feed-flow/desktopApp/build/release/main-release/app/FeedFlow.app/Contents/MacOS/FeedFlow'' finished with non-zero exit value 137
Marco Gomiero
02/05/2024, 9:57 PMapp.cash.sqldelight:sqlite-driver
) it fails with Caused by: java.lang.ClassNotFoundException: org.sqlite.core.NativeDB
)Michael Paus
02/06/2024, 10:05 AMSystem.setProperty("org.sqlite.lib.path", PATHTOFILE);
Marco Gomiero
02/06/2024, 10:08 PMMichael Paus
02/07/2024, 8:48 AMMarco Gomiero
02/07/2024, 8:49 AMMarco Gomiero
06/08/2024, 1:29 PMMichael Paus
06/08/2024, 1:30 PMMichael Paus
06/08/2024, 2:10 PMMarco Gomiero
06/08/2024, 2:37 PMMichael Paus
06/08/2024, 2:41 PMMichael Paus
06/09/2024, 2:56 PMSystem.setProperty("org.sqlite.lib.path", resourcesPath)
System.setProperty("org.sqlite.lib.name", "libsqlitejdbc.dylib")
You are relying on the existence of library specific properties here which other libraries may not provide. I also did not set the org.sqlite.lib.name
because it is not necessary and because the naming conventions are different on each platform.
I found it to be better to only set this instead.
System.setProperty("java.library.path", "${System.getProperty("java.library.path")}${File.pathSeparator}${System.getProperty("compose.application.resources.dir")}")
I just added the compose.application.resources.dir
to the already existing java.library.path
. This is a general mechanism which most libraries support. This worked for me and I hope it will also work in the AppStore.Marco Gomiero
06/18/2024, 4:59 PMSystem.setProperty("jna.boot.library.path", resourcesPath)
maybe makes more sense to uniform it.