Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

It won't install on Ubuntu #2

Closed
trappedinspacetime opened this issue Jun 15, 2021 · 3 comments
Closed

It won't install on Ubuntu #2

trappedinspacetime opened this issue Jun 15, 2021 · 3 comments

Comments

@trappedinspacetime
Copy link

First of all, thank you for making this project. I am on Ubuntu 20.04 platform. I tried to install it but it fails to install pyobj library since it's platform specific ronaldoussoren/pyobjc#291
Is there a way to install it on Ubuntu?

@trappedinspacetime trappedinspacetime added the bug Something isn't working label Jun 15, 2021
@xfangfang
Copy link
Owner

xfangfang commented Jun 15, 2021

@trappedinspacetime
This project is only for MacOS, I don't have enough time to add the support of other systems currently. However, you can change the code to make this run in a terminal temporarily.

  1. Change SETTING_DIR in utils.py line 21
    SETTING_DIR is used to store configuration files. Change this to a directory available on Ubuntu
  2. Change MPV parameters in mpv.py line 512 to 527
    • Modify the path of MPV to the path of MPV in your system. You can try mpv = 'mpv'
    • Modify the startup parameters of MPV (the startup parameters in the code contain many MacOS only contents now)
  3. Remove rumps from Macast.py and requirements.txt
    • Remove rumps from requirements.txt
    • Remove import rumps from Macast.py line 6
    • Remove Macast class from Macast.py line 121
    • Modify the startup code in Macast.py line 189
    if __name__ == '__main__':
        startCherrypy()

After these modifications, the code should be able to run on Linux. And if you can wait, I will adapt this application to gnome's menubar later.(maybe a week)

@xfangfang xfangfang added feature-request and removed bug Something isn't working labels Jun 15, 2021
@xfangfang
Copy link
Owner

xfangfang commented Jun 22, 2021

@trappedinspacetime
I just ran it successfully on the menubar of Ubuntu 20.04. If you have time, can you test it on your computer?

you need:

  1. pip install pystray
  2. make sure you can use mpv in terminal
  3. make sure you can use gi:
$ python3
Python 3.7.10 (default, Jun  3 2021, 17:51:26)
Type "help", "copyright", "credits" or "license" for more information.
>>> import gi
>>>

if there is something wrong, try: sudo apt-get install python3-gi
if you use conda, check this https://stackoverflow.com/a/40303128

  1. python3 Macast.py

Hope everything goes well. I'm not sure how to package a deb application. If you know anything, feel free to commit code.

@xfangfang
Copy link
Owner

Because many Linux users have reported that they can run normally, close this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants