From f0440a8f7d07ba2d119483b33bf587a44ee23fc0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rodrigo=20M=C3=A9ndez?= Date: Sun, 9 Jun 2024 22:18:39 -0600 Subject: [PATCH] Updated README to add build instructions --- README.md | 51 ++++++++++++++++++++++++++++++++++++++++++++------- 1 file changed, 44 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 9c9eaff..5cad7c2 100644 --- a/README.md +++ b/README.md @@ -1,26 +1,63 @@ -# Linamp +# Linamp player -Music player for embedded project. +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 +- vlc +- libiso9660-dev +- libcdio-dev +- libcdio-utils +- swig +- python3-pip +- python3-full +- python3-dev +- libdiscid0 -``` -sudo apt install libtag1-dev libasound2-dev libpulse-dev libpipewire-0.3-dev +## Development + +### Setup + +The exact steps you need to take to setup your dev environment will depend on your OS. Currently I'm using Debian Bookworm as my dev environment as it's very close to the target device environment (Raspberry Pi with DietPi, which is based on Debian Bookworm). + +The instructions here are for Debian Bookworm: + +```bash +# Install Qt, Qt Multimedia and Qt Creator +sudo apt-get install build-essential qt6-base-dev qt6-base-dev-tools qt6-multimedia-dev qtcreator -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 dependencies for Python (for CD player functionality) +sudo apt-get install vlc libiso9660-dev libcdio-dev libcdio-utils swig python3-pip python3-full python3-dev libdiscid0 -y + +# Create Python venv and install Python dependencies (for CD player functionality) +## 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 ``` -## Development +### Build and run + +1. Open this project with Qt Creator (open player.pro 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 + +**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);` -### Debugging memory: +### 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. -### Useful links: +### Links that I've found useful and/or got inspiration from: - https://taglib.org/ - https://github.com/Znurre/QtMixer/blob/b222c49c8f202981e5104bd65c8bf49e73b229c1/QAudioDecoderStream.cpp#L153