Lenochxd / WebDeck

The free stream deck alternative
https://elgato.christmas
GNU General Public License v3.0
321 stars 27 forks source link

Porting to Linux (and MacOS) Progress Tracker #35

Open OWL4C opened 3 weeks ago

OWL4C commented 3 weeks ago

I found this program today and started to port it to Linux (and by extension, MacOS should be relatively easy to add on afterwards, if libraries exist). Here i want to track my progress, mark issues and basically make it easier for others to follow.

After commenting out all windows specific apis and imports, as well as installing portaudio19-dev (Debian based Linux Systems, for others please consult your maintainers page for the portaudio package), it starts and works (i.e. the WebUI opens and buttons do things).

Current Issues: All Windows specific features are broken. This includes

MacOS: Pywinctl has support for MacOS, but it is more limited (high latency, not much functionality). There may be better options, but since right now there doesn't seem to be much use for Window Actions besides Explorer, it might be easier to just skip this. Audio is probably similar, since MacOS is already very locked down towards HW Access / Volume Mixing etc. Soundflower is an open source app that might be required for feature parity. I currently have no plan on actually implementing any MacOS Fixes, but i'll try to make any OS specific fix fail safely so you can still use the other parts.

VLC and OBS have linux compatible libraries, but there are multiple and i haven't tested functionality yet. This might of course be impacted by the many different Linux Packaging Formats, and Snaps/Flatpaks might prove especially difficult. OBS uses Websockets though so it should be possible to play nicely with flatpak.

Current Progress: Single Key Keyboard Input already works fine. Text needs root. Volume / Media / Soundboard / System is broken (based on win32). OBS / Spotify untested. Color Picker works but does not create a popup (possibly add a to clipboard function too). Stat Display works (even with GPU) but needs to be clicked in order to update. Storage Display recognizes linux disks, but cannot get information.

In the following gist is the pip requirements i used to get it running. For some reason, the provided requirements.txt eroored on install, (i removed pywin32, but another windows specific package, that doesn't seem to be in the txt, tries to install and fail). These might not be the only required packages, but at least the application starts now; conversely there might be multiple redundant packages (for example obs related ones), or packages unimportant. This is merely a pip list --format=freeze of my venv.

Lenochxd commented 3 weeks ago

Hey :)

Maybe you should have asked me before you started all this work, but it's awesome that you were able to pull this off so quickly, so whatever. I spent a few weeks restructuring the entire application precisely to make contributions easier, but more particularly the Linux port.

I’d like to suggest adding your work to the repository in a separate branch, such as feature/linux-port for example, to keep the Linux-specific work separate. We can maintain the primary Windows-compatible code on master. This should make it easier for both of us (and future contributors) to follow the changes and merge once it's stable.

Additionally, I think it would be beneficial for us to communicate more easily. I’d like to add you on Discord so we can discuss the porting process directly and collaborate more effectively. There’s also another developer who offered help with the Linux port yesterday, and it could be useful to have all of us connected.

Looking forward to collaborating!