Commit 4a6bbcd0 authored by Bart van der Velden's avatar Bart van der Velden

Renamed INSTALL to the more common README.md and made it to a proper markdown file

parent a506031a
How to build MusicCollection
============================
This file contains the steps that are needed to build MusicCollection from source.
These steps will certainly not cover every system that exists, so additional steps
may be necessary.
Prerequisites:
==============
- Have boost installed >= 1.55
- Have cmake >= 2.8.12 installed
- Have taglib installed >= 1.9.1
- Have Qt installed >= 5.0
Building on Linux:
=================
The following steps were obtained from getting MusicCollection to work on Kubuntu
13.10 (my home system, as well as one running within VirtualBox) and Linux Mint 16
Cinnamon. All these systems are Debian/Ubuntu based, so you need to adjust for other
systems.
Install CMake
-------------
- Install: sudo apt-get install cmake
Install Boost
-------------
- Install: sudo apt-get install libbz2-dev
- Install: sudo apt-get install python-dev
- wget http://sourceforge.net/projects/boost/files/boost/1.55.0/boost_1_55_0.tar.bz2/download
- mv download boost.tar.bz2
- tar xvfj boost_1_xx_x.tar.bz2
- check for patches and install these
- cd boost_1_xx
- ./bootstrap
- ./b2 -j4 link=shared threading=multi runtime-link=shared stage
- sudo ./b2 install
Install taglib
--------------
- wget http://taglib.github.io/releases/taglib-1.9.1.tar.gz
- tar xfvz taglib-1.9.1.tar.gz
- cd taglib-1.9.1/
- cmake -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_BUILD_TYPE=Debug .
- make
- sudo make install
Install Qt Creator
------------------
- Download the "Qt Online Installer for Linux 64-bit" from qt-project.org
- chmod +x the run file
- sudo ./qt...run to start installation but do not "Launch Qt Creator" at the end of
the installation process, otherwise we get permission problems as a normal user
- When running from VirtualBox Disable 3D acceleration in VirtualBox because the Qml
welcome screen misbehaves
- make the correct Qt libraries available, in my case I added the following line to
~/.profile
export CMAKE_PREFIX_PATH=/opt/Qt/5.2.1/gcc_64/lib/cmake/Qt5Widgets/
On my Jenkins server, without X, I needed to install qt5-default. This gives Qt 5.02
versions, which suffices for now.
Install git
-----------
- sudo apt-get install git
Clone the MusicCollection source
--------------------------------
To clone my MusicCollection repository go to:
https://gitlab.muckingabout.eu/musiccollection/musiccollection.git
and find out what to use.
For example:
git clone https://gitlab.muckingabout.eu/musiccollection/musiccollection.git
This will create a directory called musiccollection in the current directory.
However, you cannot push changes back to the repository, so you may want to fork my
repository, clone that and change it to your hearts content. If you then want to
inflict your changes on me, just create a pull request, and I will have a look.
Build MusicCollection and run unit tests
----------------------------------------
The software must be built in a different directory than where the source is
(assuming you are in the directory musiccollection):
- cd ..
- mkdir buildmusiccollection
- cd buildmusiccollection
- cmake -DCMAKE_BUILD_TYPE=Debug ../musiccollection
- make
- make test
To debug from the command line use: gdb musiccollection
For a release build use -DCMAKE_BUILD_TYPE=Release
If all went well, the software is now built and the unit tests were performed without
error.
As a more convenient alternative, you can also build from Qt Creator:
- Start Qt Creator
- Click Open Project and select the file MusicCollection/CMakeLists.txt
- Accept the suggested Build Location
- Enter -DCMAKE_BUILD_TYPE=Debug at Arguments and check that a Desktop Generator is
selected
- Click Run CMake
- Click Finish
- The project is now opened
- Ctrl-Shift-B to build all
Of course, you can also use KDevelop and any other IDE that supports CMake.
Linux trivia
------------
To enable debugging (when you get the error "ptrace: operation not permitted")
- sudo nano /etc/sysctl.d/10-ptrace.conf
- change the line to read: kernel.yama.ptrace_scope = 0
Building on Windows
===================
Install CMake
-------------
- Download a Windows installer from http://cmake.org/cmake/resources/software.html
- Run the installer
Install Boost
-------------
Install taglib
--------------
Install Qt Creator
------------------
For Qt: set CMAKE_PREFIX_PATH to the path where Qt is installed, i.e.
C:\Qt\5.2.1\msvc2010 on my
Windows machine.
On Windows:
- Run cmake-gui
- Enter the path to the source code, i.e. c:/prj/MusicCollection
- Enter the path to where to build the binaries, i.e.: c:/prj/msbuild
- Click 'Configure' and select Visual Studio 10 (I haven't tried any other version)
- Chances are that you see "Could NOT find Boost"
- One way to avoid this is to add BOOST_ROOT to the environment variables. The other is to execute
the following steps:
- In that case click "Add entry" and enter name = Boost_DEBUG, type = BOOL, Value = checked
- "Add entry" name = BOOST_ROOT, type = path, Value = C:\lib\boost_1_54_0 (substitue your own path)
- For taglib either add the bin directory to the path or add a TAGLIB_ROOT environment
- Try 'Configure'again
- If Boost is now found, click Generate
- Now you can open MusicCollection.sln in the msbuild directory and build the software
## How to build MusicCollection ##
This file contains the steps that are needed to build MusicCollection from source.
These steps will certainly not cover every system that exists, so additional steps
may be necessary.
## Prerequisites ##
- Have boost installed >= 1.55
- Have cmake >= 2.8.12 installed
- Have taglib installed >= 1.9.1
- Have Qt installed >= 5.0
## Building on Linux ##
The following steps were obtained from getting MusicCollection to work on Kubuntu 14.10 (my home system, as well as one running within VirtualBox) and Linux Mint 17 Cinnamon. All these systems are Debian/Ubuntu based, so you need to adjust for other systems.
### Install CMake ###
sudo apt-get install cmake
### Install Boost ###
sudo apt-get install libbz2-dev
sudo apt-get install python-dev
wget http://sourceforge.net/projects/boost/files/boost/1.55.0/boost_1_55_0.tar.bz2/download
mv download boost.tar.bz2
tar xvfj boost_1_xx_x.tar.bz2
Check for patches and install them.
cd boost_1_xx
./bootstrap
./b2 -j4 link=shared threading=multi runtime-link=shared stage
sudo ./b2 install
### Install taglib ###
wget http://taglib.github.io/releases/taglib-1.9.1.tar.gz
tar xfvz taglib-1.9.1.tar.gz
cd taglib-1.9.1/
cmake -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_BUILD_TYPE=Debug .
make
sudo make install
### Install Qt Creator ###
- Download the "Qt Online Installer for Linux 64-bit" from qt-project.org
- Make the .run file executable by: `chmod +x <file.run>`
sudo ./qt...run
- When running from VirtualBox Disable 3D acceleration in VirtualBox because the Qml welcome screen misbehaves
- make the correct Qt libraries available, in my case I added the following line to `~/.profile`
export CMAKE_PREFIX_PATH=/opt/Qt/5.4.1/gcc_64/lib/cmake/Qt5Widgets/
On my Jenkins server, without X, I needed to install qt5-default. This gives Qt 5.02 versions, which suffices for now.
### Install git ###
sudo apt-get install git
### Clone the MusicCollection source ###
To clone my MusicCollection repository go to [https://gitlab.muckingabout.eu/musiccollection/musiccollection](https://gitlab.muckingabout.eu/musiccollection/musiccollection) and find out what to use.
For example:
git clone https://gitlab.muckingabout.eu/musiccollection/musiccollection.git
This will create a directory called musiccollection in the current directory.
However, you cannot push changes back to the repository, so you may want to fork my repository, clone that and change it to your hearts content. If you then want to inflict your changes on me, just create a pull request, and I will have a look.
### Build MusicCollection and run unit tests ###
The software must be built in a different directory than where the source is (assuming you are in the directory musiccollection):
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Debug ..
make -j4
make test
To debug from the command line use: `gdb musiccollection`
For a release build use `-DCMAKE_BUILD_TYPE=Release`
If all went well, the software is now built and the unit tests were performed without error.
As a more convenient alternative, you can also build from Qt Creator:
- Start Qt Creator
- Click Open Project and select the file MusicCollection/CMakeLists.txt
- Accept the suggested Build Location
- Enter -DCMAKE_BUILD_TYPE=Debug at Arguments and check that a Desktop Generator is selected
- Click Run CMake
- Click Finish
- The project is now opened
- Ctrl-Shift-B to build all
Of course, you can also use KDevelop and any other IDE that supports CMake.
### Linux trivia ###
To enable debugging (when you get the error "ptrace: operation not permitted")
sudo nano /etc/sysctl.d/10-ptrace.conf
change the line to read: kernel.yama.ptrace_scope = 0
## Building on Windows ##
### Install CMake ###
- Download a Windows installer from http://cmake.org/cmake/resources/software.html
- Run the installer
### Install Boost ###
To be filled in.
### Install taglib ###
To be filled in.
### Install Qt Creator ###
For Qt: set CMAKE_PREFIX_PATH to the path where Qt is installed, i.e. C:\Qt\5.4.1\msvc2010 on my Windows machine.
### Build musiccollection ###
- Run cmake-gui
- Enter the path to the source code, i.e. c:/prj/MusicCollection
- Enter the path to where to build the binaries, i.e.: c:/prj/msbuild
- Click 'Configure' and select Visual Studio 10 (I haven't tried any other version)
- Chances are that you see "Could NOT find Boost"
- One way to avoid this is to add BOOST_ROOT to the environment variables. The other is to execute
the following steps:
- In that case click "Add entry" and enter name = Boost_DEBUG, type = BOOL, Value = checked
- "Add entry" name = BOOST_ROOT, type = path, Value = C:\lib\boost_1_54_0 (substitue your own path)
- For taglib either add the bin directory to the path or add a TAGLIB_ROOT environment
- Try 'Configure'again
- If Boost is now found, click Generate
- Now you can open MusicCollection.sln in the msbuild directory and build the software
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment