https://kotlinlang.org logo
Title
s

spierce7

08/02/2021, 4:50 AM
@Nik I tried the approach you suggested of copying resources out of the jar into a folder so that they can be accessed outside of the jar. This works when the app is in the build folder, but when it’s in the
/Applications
folder, it has an issue when trying to copy to the
My <http://App.app/Contents/resources|App.app/Contents/resources>
dir.
java.nio.file.FileSystemException: /resources: Read-only file system
Does anyone have a recommendation of where I should be saving these resource files?
I’m using
"${System.getProperty("user.dir")}/Resources"
as the path.
o

olonho

08/02/2021, 6:02 AM
One could use
$HOME/Library/MyApp
or unpack file per request in
/tmp
. We’ll try to fix it in plugin. cc: @alexey.tsvetkov
a

alexey.tsvetkov

08/02/2021, 6:17 AM
Fix what exactly? I agree that we probably need a mechanism for packing resources outside of a jar.
o

olonho

08/02/2021, 7:34 AM
yep, I meant fix for adding arbitrary files into an application image, i.e. under Resources folder
s

spierce7

08/02/2021, 1:21 PM
I'm also interested in swapping out jar files to auto update an app. I had done research that indicated that an application on Mac had permission to modify its own app contents with signed files. Is that not actually the case?