Open Simon-Laux opened 2 years ago
There is probably also a way to do this via the windows registry.
For current user:
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run]
"DeltaChat"="%USERPROFILE%\AppData\Local\Programs\DeltaChat\DeltaChat.exe"
For all users:
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run]
"DeltaChat"="C:\Program Files (x86)\DeltaChat\DeltaChat.exe"
Although I am not absolutely sure about the program path for the all-user installation...
Linux (normally installed)
?
copy deltachat.desktop
file to ~/.config/autostart
for a particular user (as per XDG Autostart).
There is a related forum topic on https://support.delta.chat/t/start-minimized-as-an-option/2057
Option to set up auto start for Deltachat on system start. If we cannot support a certain system/os we can link to a tutorial/guide how the user can do it manually.
This should become an option in the Settings. (activate autostart and disable autostart), in all cases it should be started with the
--minimized
cli argument.lets collect the approaches how we could do it on the different OS/platforms/distribution-formats:
Windows (normally installed)
For windows (non store/non-appx) we could create a link/shortcut file in the StartMenu/Autostart folder, that is set to start Deltachat with the minimised argument. There is probably also a way to do this via the windows registry.
Windows (portable)
Either don't offer option at all (and display a manual guide), or do the same method as for the installed version but put a warning before it
"Does not work with portable versions on a path that changes"
At beginning check how it was installed (user, globally or portable) (check executable path). If path is not known then warn user as written above.
For current user:
For all users (only this additional option show option if dc was installed for all users, probably requires some prompt to add it with admin rights?):
Windows (apps, Store version)
there is an npm package for this: https://github.com/felixrieseberg/electron-winstore-auto-launch
MacOS
?, probably not the biggest deal to not have it, because macOS normally restarts all previous applications after a reboot.
Linux (normally installed & AppImage)
copy deltachat.desktop file to ~/.config/autostart for a particular user (as per XDG Autostart).
Linux (flatpak)
use bus to communicate with flatpack:
https://github.com/rafatosta/zapzap/blob/f645c2a3f26cc80af45d11299432e9d1ced81bd8/zapzap/services/portal_desktop.py#L18-L29
PS: we might need to modify electron builder for this so that it allows us to write what distributable format it is before packing the app into that format.