Francesco Pedron
06/22/2022, 4:22 PMMichael Paus
06/22/2022, 5:26 PMThomas
06/22/2022, 6:27 PMMichael Paus
06/22/2022, 6:51 PMThomas
06/22/2022, 11:26 PMval resources = File(System.getProperty("compose.application.resources.dir"))
System.load(File(resources, "windowsNativeInterop.dll").absolutePath)
Francesco Pedron
06/23/2022, 9:37 AMrun
and runDistributable
gradle tasks, initially I thought it won't work with run
, but it does.
I've just added this line inside nativeDistributions
on build.gradle.kts file:
appResourcesRootDir.set(project.layout.projectDirectory.dir("src/main/resources"))
Then placed the dll file inside src/main/resources/windows
.
Thanks for your help.Michael Paus
06/24/2022, 11:06 AMFrancesco Pedron
06/24/2022, 12:25 PMmikehearn
06/24/2022, 1:29 PMThomas
06/24/2022, 1:44 PMmikehearn
06/24/2022, 1:44 PMThomas
06/24/2022, 1:45 PMCompose Gradle plugin can be configured to put additional resource files under an installation directory.
mikehearn
06/24/2022, 1:47 PMThomas
06/24/2022, 1:50 PMSure, I can check, could you please point me to where I might check this?@Francesco Pedron you can decompile the jar and you will see that the DLL is added in the jar, too, which is not what you want. You can fix this by using a different path for the resources. Instead of “src/main/resources” you can use “resources” (just like in the readme), and move your files to that directory.
Francesco Pedron
06/24/2022, 2:01 PMMichael Paus
06/24/2022, 5:05 PMmikehearn
06/24/2022, 5:41 PM