Taiga: Cross-platform (support for Linux, Mac OS X)

Created on 27 Mar 2015  Â·  18Comments  Â·  Source: erengy/taiga

So i have a friend which is using osx and that got me wondering how difficult it would be to get taiga working on other OSs.

I tried running in under linux using Wine, and it actually worked perfectly fine, that is it started, the display was fine, it connected to MAL etc.

The only issue was the detection of running media players, though it did work if i ran VLC under wine as well, and switched the detection to work using the window title in the media.xml file..

Since then i have been looking at the subject and it seems like under linux it should be possible at the worst case to use an app such as xwininfo and read its output to find running media players, but i saw some c++ APIs that should enable native access to that information as well.
moreover a lot of players come standard with an http server used for remote control, which also could be used as a crossplatform way to get such information..

But i suppose such effort depends mostly on how much needs are there to implement such support, so is there? my c++ ability is fairly limited so i doubt i will be able to deliver anything production ready, but i could probably cook up some POC which could be used by some of the more experienced devs..

time-consuming

Most helpful comment

Just hear to show support for the transition to v2.0 and multiple OS support as i am currently in the process of switching from windows 10 to linux

All 18 comments

The ui code is pretty well abstracted away, but it's still quite some code.

Well as I said with wine the ui seems to work flawlessly, so its probably going to be more efficient to focus on the detection.

As far as I know, detecting a media player running outside Wine and retrieving the currently playing filename from it is not possible. Not to mention that trying to figure out if the application is running under Wine is a Bad Ideaâ„¢, as per Wine's own documentation.

That said, I intend to make Taiga a multi-platform application in v2.0, where it's going to run natively under Linux. This requires a huge amount of effort on my part though, and I don't think it's going to happen anytime soon. For now, I'm just slowly trying to prepare the codebase for an easier transition.

@erengy besides using obvious ps ux and parsing CLI arguments, you can use lsof to show files opened by given process. For example,

lsof -n -c /bash\|apache/ -Fn

Shows all files and pipes opened by either bash or apache:

n/home/rr-
n/
n/bin/bash
n/lib/i386-linux-gnu/libnss_files-2.19.so
n/lib/i386-linux-gnu/libnss_nis-2.19.so
n/lib/i386-linux-gnu/libnsl-2.19.so
n/lib/i386-linux-gnu/libnss_compat-2.19.so
n/usr/lib/locale/locale-archive
n/lib/i386-linux-gnu/libc-2.19.so
n/lib/i386-linux-gnu/libdl-2.19.so
n/lib/i386-linux-gnu/libtinfo.so.5.9
n/usr/lib/i386-linux-gnu/gconv/gconv-modules.cache
n/lib/i386-linux-gnu/ld-2.19.so
n/dev/pts/0
n/dev/pts/0
n/dev/pts/0
n/dev/pts/0
p28717
n/home/rr-
n/
n/bin/bash
n/lib/i386-linux-gnu/libnss_files-2.19.so
n/lib/i386-linux-gnu/libnss_nis-2.19.so
n/lib/i386-linux-gnu/libnsl-2.19.so
n/lib/i386-linux-gnu/libnss_compat-2.19.so
n/usr/lib/locale/locale-archive
n/lib/i386-linux-gnu/libc-2.19.so
n/lib/i386-linux-gnu/libdl-2.19.so
n/lib/i386-linux-gnu/libtinfo.so.5.9
n/usr/lib/i386-linux-gnu/gconv/gconv-modules.cache
n/lib/i386-linux-gnu/ld-2.19.so
n/dev/pts/2
n/dev/pts/2
n/dev/pts/2
n/dev/pts/2

That's what trackma does and it works very well.
This of course will not enable stream detection, but it's a significant step forward.

In general, I don't think Linux has anything that allows the capture of the URL, page title or even the source, unlike Mac OS X with Applescript with some browsers which allows a program to gain access to all the URLs and page titles of all browser windows and tabs (it's a reason why MAL Updater OS X can support Netflix, which requires the DOM).

But yes, MAL Updater OS X and Hachidori basically uses lsof to find the open and playing video file since it's a standard command on *nix OSes.

Can I help you with this one?

@tomerghelber Do you have something in mind?

Regarding the discussion on media detection, I'm now moving relevant code to a separate library called Anisthesia and making improvements on it. It's going to be Windows-only for a while, but I intend to support Linux and Mac too later on. I'll certainly need some help on those platforms.

That being said, seeing Taiga run on other platforms is still a dream far away. If you haven't done so already, please read the second part of Guidelines, which was updated last week.

As long as you don't finish the movement, I don't want to clash in Anisthesia.
I read the Guidelines, and your desire to delete code by using other libraries, so using QT for ui looks good.

I am new with QT for c+, but wrote with PyQT and c++ cross platform.
I will start with the UI for now.
I will be happy to help with anything else too.

Hey there,
Almost a year, but I have something.
Sadly I couldn't make Taiga compile in my Visual Studio, so instead I wrote the UI (the zip file) and I hope I can get help to merge it in the project.
taiga.zip

I have all the menus in it, and I just need to connect the events with real functions.
I can write more and make some empty function for the meanwhile.

@tomerghelber Thank you for your effort. Please note that it's too early to merge anything. v1.3 will be released this month, and I've started working on v1.4 too, but that's likely to be finished in the second half of the year. Only then, Taiga might be ready for v2.0. In any case, before jumping onto development, we'll first discuss what v2.0 will be and how we'll go about doing specific things.

@erengy If the status is still the same I'd like to also contribute to 2.0

Just hear to show support for the transition to v2.0 and multiple OS support as i am currently in the process of switching from windows 10 to linux

I was wondering if there is any update on the QT progress? I completely moved over to Linux a couple months ago and have been using Taiga through Wine, though with some "issues" (mostly no automatic now playing discovery and instead of starting downloading torrents automatically I have to gasp right click, go to torrent page and magnet from there)
These are just minor inconveniences, but at least a heads up on how things are looking atm might be nice

I wouldn't expect any news about v2.0 this year or until after v1.4 is released. My current involvement with it is no more than evaluating the trade-offs of Qt and dreading the amount of work required.

It's been almost a year, has there been any progress or is there an ETA on when this will be available?

@theboyboy Here is the current information on the 2.0 milestone https://github.com/erengy/taiga/milestone/2

Would be pretty amazing to have cross-platform support. Perhaps people would even donate to see it happen.

i would

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Ghostpeach picture Ghostpeach  Â·  6Comments

Sivarius picture Sivarius  Â·  7Comments

hellflames21 picture hellflames21  Â·  5Comments

Kovoschiz picture Kovoschiz  Â·  4Comments

Tensai-Otaku picture Tensai-Otaku  Â·  6Comments