Skip to content

Developer Guide

Elijah Lopez edited this page Dec 24, 2024 · 54 revisions

This document is not guaranteed to work.

Music Caster is written in Python 3.12 64-bit. If you want to build the Updater.exe that's found in Portable.zip, you'll need to install Golang. If you want to build the installer, you will need to install Inno Setup.

Building on Windows 32-bit version is not supported but it is possible; You will need to use Python 3.8.X 32-bit and checkout the v4-py3.8.9-32-bit branch. If you want the latest features, you will need to perform an interactive rebase and ignore whatever commit switched the Python versions and solve the ensuing merge conflict yourself. There's at least three commits that need to be resolved.

Python Installation

Windows

Ensure

  1. Python is added to the PATH environment variable (it'll be a checkbox in the installer)
  2. pip is installed

Ubuntu

I don't think you need to do this anymore.

# pyaudio
sudo apt-get install libasound-dev portaudio19-dev libportaudio2 libportaudiocpp0 -y
pip install -r requirements.txt
# if app indicator not working
sudo apt install gir1.2-appindicator3-0.1 -y

After installation, check if these two options were selected by opening a new terminal (cmd or wt on Windows) window and enter the command pip and then python --version. If you get any "is not recognized" errors, you did not add Python and pip to the PATH environment variable.

Setting up

  1. Clone this repository or download the master branch and extract.
  2. Go into the music-caster directory.
  3. Open up a command prompt within this directory. The way I do this on Windows is Ctrl + L -> wt -> <<Enter>>. Type cmd instead of wt if you don't have Windows Terminal installed.
  4. Install dependencies by running either build --dry or cd src && pip install -r requirements.txt --user
  5. To run the program with Python, you can use py music_caster.py. Supply -m or set DEBUG: true in settings.json if you don't want the GUI to open up on every run.

Building

  • Use ./build.cmd --skip-tests in the terminal to build Music Caster, a portable version, and an installer (setup.exe)

You will most likely see "WARNING: could not create an installer" when building. You can ignore this if you don't plan to create the setup installer yourself. If you want to create the setup installer, you will need to install and make sure that its installation folder is added to PATH before building again (will need to restart the terminal or IDE you were using).

Trouble Shooting

  • PyInstaller issues?
    1. pip freeze > uninstall.txt
    2. Run this command twice: pip uninstall -r uninstall.txt
    3. pip install requirements.txt --user
    4. Delete uninstall.txt
  • Use patchelf --set-rpath ./ libvlc.so for dynamic loading problems on Linux
  • Something to note is that Chromecasts do not support IPv6 links.
Clone this wiki locally