Skip to content
RodmgPublic

About

No description, website, or topics provided.

Resources

Stars

161 stars

Watchers

18 watching

Forks

Repository files navigation

Linamp player

Music player app for Linamp - Your favorite music player of the 90s, but in real life.

Requirements

  • Qt 6 with Qt Multimedia
  • taglib 1.11.1 or newer
  • libasound2-dev
  • libpipewire-0.3-dev
  • libcdio-dev
  • libcdio-paranoia-dev
  • libcdio-utils
  • libdiscid-dev
  • python3-pip
  • python3-full
  • python3-dev
  • python3-dbus-next

Development

Setup

The exact steps you need to take to setup your dev environment will depend on your OS. Currently I'm using Debian Trixie as my dev environment as it's very close to the target device environment (Raspberry Pi with DietPi, which is based on Debian Trixie).

The instructions here are for Debian Trixie:

# Install Qt, Qt Multimedia and Qt Creator
sudo apt-get install build-essential qt6-base-dev qt6-base-dev-tools qt6-multimedia-dev qtcreator cmake -y

# Install third party library dependencies
sudo apt-get install libtag1-dev libasound2-dev libpulse-dev libpipewire-0.3-dev libdbus-1-dev -y

# Install native CD player dependencies
sudo apt-get install libcdio-dev libcdio-paranoia-dev libcdio-utils libdiscid-dev -y

# Create Python venv and install Python dependencies (for BT and Spotify sources)
## IMPORTANT: Make sure you are on the folder where you cloned this repo before running the following commands:
python3 -m venv venv
source venv/bin/activate
pip install -r python/requirements.txt

Build and run

Using Qt Creator:

  1. Open this project with Qt Creator (open CMakeLists.txt in Qt Creator)
  2. Qt Creator should guide you setting up your paths and settings for building the proyect in your machine
  3. You should be able to click the green "Play" icon in Qt Creator to build and run the app

From the console:

# From inside this repository:
## Generate build configuration, you only need to run this once:
cmake CMakeLists.txt
## Setup python dependencies, you only need to run this once:
./setup.sh

## Compile the project
make

## Run the app
./start.sh

Tip: If you want to see the app in a window instead of full screen, comment out the following line in main.cpp: //window.setWindowState(Qt::WindowFullScreen);

Building a Debian package

On native Debian Trixie, you can build a package matching the CI trixie job without Docker:

./build-deb.sh

The script installs Debian packaging tools (debhelper, devscripts, dh-python, dh-cmake, and related packages), copies the tree to a local temp directory (so your git tree stays clean), runs apt-get build-dep for debian/control, builds with dpkg-buildpackage, and places the .deb in ~/linamp-debs/.

You can install the newly built packages with the following command (replace placeholders accordingly):

sudo apt install ./linamp_[version]_[arch].deb

Known issues

  • In order for the Python integration (BT and Spotify sources) to work and not crash, you need to run the app inside the Python venv. Use the "start.sh" script as a helper to set everything up for you and run it. However, because Qt Creator by default will directly run the player executable outside of the venv, those sources will crash. I'm yet to find a better way of running it inside Qt Creator, other than telling it to run the "start.sh" script instead of the executable.

Debugging memory leaks:

  • Install valgrind
  • In Qt Creator, in the menu bar, click Analyze -> Valgrind Memory Analizer
  • Wait for the app to start (it will be slow), use it and close it, you will get the results then.

Links that I've found useful and/or got inspiration from:

About

No description, website, or topics provided.

Resources

Stars

161 stars

Watchers

18 watching

Forks

Releases

Sponsor this project

Packages

Used by

Contributors

Languages