ao-data / albiondata-client

Distributed client for the Albion Online Data project.
https://www.albion-online-data.com/
MIT License
101 stars 30 forks source link

feature: wait until albion process is found before invoking systray #100

Open Icaruk opened 4 months ago

Icaruk commented 4 months ago

Hi! This is my first contribution.

I modified systray\systray_win.go to wait until albion process is found. Here is the summary:

This could prevent https://github.com/ao-data/albiondata-client/issues/84#issuecomment-2088330768

I added 2 new info messages. I don't know if I should remove them.

image

I built the 3 binaries (windows, linux, darwin) without any errors.

I need help with:

phendryx commented 4 months ago

I'm not sure I agree with the idea of "Gets all processes periodically and stops when albion is found running". What happens when a user closes and reopens the game? I have not tested it, it does need to be tested on each OS and it might be fine if all this is for is adding the icon to the systray, which is windows only I believe, but that leads to the next issue.

There's also a lot of module changes. I'm not that familiar with golang despite running this project. I know what I need to change when I have to update certain things. I don't know a lot past that and that makes me uncomfortable doing big changes. But overall, I don't think the answer is swapping out a bunch of modules and putting a timer in place. I think the issue here is literally the application is trying to start too early after reboot and that we need to add a shortcut to the startup folder vs the task scheduler.

By no means am I rejecting this, I'm just stating my concerns/thoughts.

Icaruk commented 4 months ago

Thank you for your time @phendryx

I'm not sure I agree with the idea of "Gets all processes periodically and stops when albion is found running".

I've been researching and haven't found a way to get a process by name without iterating over all running ones. :(

What happens when a user closes and reopens the game?

Nothing, the systray is already executed. This will only wait the first time that the Albion Data Client is executed. If Albion is already running it will not even wait for 5 seconds.

In my opinion, the Albion Data Client should not start until Albion process is detected, why should it run meanwhile I'm playing other games or working? Maybe this is another subject.

There's also a lot of module changes.

With these changes, go.mod is untouched.

I think the issue here is literally the application is trying to start too early after reboot and that we need to add a shortcut to the startup folder vs the task scheduler.

I'm sorry, with the knowledge I have at the moment, this is the only thing I can do.


I need help with:

Icaruk commented 2 months ago

@phendryx Any news on this?