has anyone figured out a way to have their jetpack...
# compose-desktop
a
has anyone figured out a way to have their jetpack compose desktop app start at computer login?
c
there's a packaging tool that's been advertised about in this channel and maybe #multiplatform which can be used to create installers and perform tasks like this (configuring a system, agnostic of OS to start an app at startup) but I forget what it's called :S. If you just want to achieve for a development app you don't plan to release however, the easiest way would be to create a
package
of your application (on Linux for example by running
./gradlew packageDeb
), installing the resultant binary and then using the tools made available by the OS. Think you can use msconfig on windows, launchctl on Mac OS and maybe even just a .xinitrc on Linux (though most desktop managers have their own section in config for this kind of stuff)
a
it is for an app that i will distribute. also it is for mac os
what i am trying to achieve is have an option within the app to let people choose if they want to launch the app on login or not. it’s a standard thing in mac os apps
c
I'd say this isn't strictly a kotlin question, but a quick google uncovers this: https://stackoverflow.com/questions/3358410/programmatically-run-at-startup-on-mac-os-x
a
found that link. thanks 👍. I was hoping there was some sort of automatic way of doing it via java. ie in electron you have a nice api that you pass true/false if you want the app to be launched at startup.
c
it's definitely a convenient thing to have, but I wonder if a UI framework should be concerned about something that OS specific. There must be an off the shelf java library that does this, if not, it's begging to be made isn't it.
a
absolutely 💯
m
The tool is called Conveyor
It has an option to start at boot, however, it's for Windows. macOS isn't currently supported. It could be added fairly easily though.
These days you can manage which app start at login through the settings apps, so it's not so important to have it be toggleable through the app itself. On Ventura you can apparently deep-link to the relevant part of the settings pane.
c
Conveyor! That's the one! Cheers Mike