Hi all! I have to build really simple app for win...
# compose-desktop
v
Hi all! I have to build really simple app for windows and I choosed kotlin/compose. App is pretty much done but I cannot figure out what is the best way to handle environment variables here? I have to adjust them according to my environments (local / dev / production) , but I'm not really seeing how. Basically, something like src/resources/application.yml in java ?
m
Using environment variables to determine test/prod etc is not idiomatic for desktop apps, that may be common on the server but not there. You can use instead for example system properties, where the system property that means "prod" is set in your packaging. If you use Conveyor you can easily do this with one line in your package config file, if you use the built in jpackage-based tooling then I don't remember but it's probably possible also.
v
thank you!
Conveyor looks pretty neat. I'm not 100% sure if it works tho. I've tried to follow tutorial there for JVM Apps / Jetpack Compose I've managed to create the app, build it, serve the package and install it. But the next step that tells you to release an update does not work.
m
@Vedran as the message says, macOS does not allow apps to update themselves if they are still in the user's Downloads folder.
Users are expected to drag the app to /Applications or ~/Applications. This isn't a Conveyor thing, it's a macOS security thing (apps don't have access to the Downloads folder by default and are run "translocated" until the user moves it).