chrisknepper / android-messages-desktop

Android Messages as a Cross-platform Desktop App
MIT License
1.01k stars 116 forks source link

"Open At Login" functionality. #117

Closed ghost closed 4 years ago

ghost commented 5 years ago

I wanted to be able to have the application open on startup, so I went ahead and added that functionality.

screenshot_windows

screenshot_macos

I tested it on both Windows 10 and macOS Mojave, and it seems to be working without any errors.

Edit: Addresses issues #115, #65, and #4

chrisknepper commented 5 years ago

Hey @frankmoskal , thanks for this! This has definitely been on the to-do list for a while, and it's especially awesome that you've done it without introducing a third-party dependency.

Just a couple of things:

  1. Do you know if this can work with Linux?
  2. Can you elaborate more on what you mean by it breaking with the "startup apps" panel open on Windows?
ghost commented 5 years ago

1) According to the electron docs, it currently only supports Windows & macOS. For Linux, there's auto-launch which could be something to look into for Linux support.

2) Whenever I have the startup apps panel open, any changes I make aren't registered with Windows. It could just be my system, so it would be nice to have some further testing. It works perfectly when the panel isn't open though.

example panel

chrisknepper commented 5 years ago

@frankmoskal ok cool, we may be able to add this to Linux later as the auto-launch docs make it sound pretty simple on that platform.

One thing though, the Electron docs say that since we use auto update, the Windows argument should make the updater exe be pass as well as the regular exe. Could you update the code to do that? Let me know if I'm not making sense here.

ghost commented 5 years ago

That should fix it - I'm away from my desktop currently, but I'll test and make sure that works later today!

EDIT: So, I'm not sure you do have autoupdate, because I wasn't able to find the update.exe anywhere in either of the locations in appdata/local or appdata/roaming. Could you point me to the location of the update.exe file?

Lainemac commented 5 years ago

I so want this feature.

ajivoin commented 5 years ago

Hey @chrisknepper, is there still interest in getting this feature in? I think all we're missing is launching the autoupdater in Windows.

@frankmoskal this is a very late answer, but the location of the updater is in C:/Users/USER_NAME/AppData/Local/android-messages-desktop-updater if that helps with implementing this.

ghost commented 5 years ago

@ajivoin Thank you! I'll fix this and the conflicts once my exams finish later this week. Would love to get this merged, but I think @chrisknepper was waiting to see if Electron adds native auto-launch support to Linux?

Edit: I fixed the merge conflict, but the preferences aren't exactly bug-free. If someone else could take this one over, that would be super helpful as I'm a bit out of my depth here.