Total Pageviews

Friday, 9 July 2021

mu

 An open-source music manager.

http://kreogist.github.io/Mu

Overview

μ is a cross-platform application for media file managing.

  • Incredible user interface from Kreogist Dev Team.
  • Support manage all your music including the following formats: mp3, m4a, wav, flac, ape, ogg, tta, aiff, aifc, aif, mp4, mpa, mp2, mp1, midi, mid, mp3pro, mpc, aac, cda, wma, fla, tak, mp+, aa, ra, mac, rmi, dtswav, dts, snd, au, ac3, xm, and umx.
  • Support read and write ID3v1, ID3v2, APEv2 format tag. FLAC, M4A, WAV, WMA metadata for read-only.
  • Support import and export iTunes xml, xspf, m3u, ttpl, and wpl format playlists.
  • Support advanced multiple condition search.

Special Thanks

Translation

You're encouraged to translate µ into your native language or update the translation file. Please visit the Improving Projects Home page at the wiki.

Dependencies

  • Qt (>=5.2.1)
  • FFMpeg (>=2.5) / LibAV (>=6:9.20)
  • bass (Windows and Mac OS X, >=2.4)
  • libmpv (Linux, >=0.16)
  • Windows (32-bit >= XP SP3, 64-bit >= Vista SP2)
  • Mac OS X (>=10.10)
  • Modern Linux Distribution, Ubuntu (>=12.04, strongly recommend >=16.04)

Compile and Build

To compile and build μ from the source code, we suggest you visit the Compile and Build page at wiki.

from https://github.com/Kreogist/Mu

-----

Compile


To compile mu, it is quite different under different operating system. This documentation records the way to compile mu on WindowsMac OS X and Linux.

Windows

Install Qt 5

We suggest you to compile mu using the official MSVC version Qt 5 releases for 64-bit Windows, and MinGW version Qt 5 releases for 32-bit Windows. You can downloaded the latest open source Qt 5 versions from its official site.

Install FFMpeg library

With the default configuration, it needs FFMpeg library for media file analysis. To get FFMpeg source code (GPLv3 License version), you can get it from its homepage. To get the binary compiled version of FFMpeg, you can get it from Zeranoe.

In the official mu releases, we are using the binary compiled version from Zeranoe. You need the 'Shared' and 'Dev' version of FFMpeg for the correct version of your compiler. If you are using MinGW version Qt release, you need to choose 32-bit version. If you are using MSVC version Qt release, you will need the 64-bit version.

Notice: the version of compiler is different from the version of your operating system. You can use 32-bit compiler under 64-bit operating system. e.g. running 32-bit MinGW under 64-bit Windows 7. So, all the following 32-bit and 64-bit is talking about the version of compiler, but not the operating system.

After download those files, you need to ensure that Qt could find those library. Extract the 'Dev' and 'Shared' zipped files to a single folder. At that folder, it should contains directories like 'bin' and 'include'. One way to ensure that Qt could find the files is to copy all these folders to the Qt's directory.

Suppose the installation directory of Qt is at D:\Qt5.8.0, the directory should has the following sub-directories or files:

5.8 (Which is the version of the Qt)
dist
Docs
Examples
Licenses
Tools
vcredist
components.xml
installationLog.txt
MaintenanceTool.dat
MaintenanceTool.exe
MaintenanceTool.ini
network.xml

The content might be changed for different versions, but mainly it should has the same framework. Open the 5.8 (the version of the Qt) folder, it should have only one directory which is the name of the compiler. For example, mingw53_32. Open the directory, you can find the following sub-directories or files:

bin
doc
include
lib
mkspecs
phrasebooks
plugins
qml
translations
.tag

The same, for different versions it might be different, but it should have bininclude and lib. The path of this folder should be D:\Qt5.8.0\5.8\mingw53_32\. In the following of this tutorial, this path will be used as the example path. You have to replace the folder to the actual place you installed the Qt.

Copy all these directories ('bin', 'include', etc.) to D:\Qt5.8.0\5.8\mingw53_32\. After this operation, all the FFMpeg files should be found by Qt.

Install Bass library

For a simple notice, path D:\Qt5.8.0\5.8\mingw53_32\ will be used as the example path in this chapter. In the folder, it should have folder bininclude and lib. You have to replace the folder to the actual place you installed the Qt.

First, you have to download the Bass library for Windows from un4seen. It is a zip file named as bass24.zip. Then, decompress the file.

For 32-bit compiler, you can find bass.dll in the new directory. For 64-bit compiler, you can find bass.dll in the x64 directory in the new directory. This is the dynamic linked library version bass. Copy the correct version of bass.dll to D:\Qt5.8.0\5.8\mingw53_32\bin.

Open the c folder in the decompressed directory of bass.zip, you should find bass.h. Copy bass.h to D:\Qt5.8.0\5.8\mingw53_32\include. If you are using the 32-bit version compiler, copy the bass.lib in the same directory of bass.h to D:\Qt5.8.0\5.8\mingw53_32\lib. If you are using a 64-bit version compiler, copy the bass.lib in the x64 folder under the bass.h directory to D:\Qt5.8.0\5.8\mingw53_32\lib.

Compile Mu

Launch Qt Creator, open the mu.pro file at the root of the source code. Click 'Run qmake'. After it done, click 'Build All' or 'Rebuild All'.

We suggest you to use multi-process compiling for shorten the compiling time. To use multi-process compiling, please check the section in FAQ.

Mac OS X

With the default configuration, it needs FFMpeg library for media file analysis and bass for playing. You can compile FFMpeg from the source code. To get FFMpeg source code (GPLv3 License version), you can get it from its homepage. However, we suggest you to use home brew to manage all these libraries.

Install Qt 5

First, you need to install the Qt 5. It is quite the same as Windows version. First, you need to download the Qt 5 official release from its official site. This version is the GPL and LGPL open source version. You can download the other version for your own needs.

The official release is compiled by Qt for Mac OS X on 10.9.5.

Install XCode and Command Line Tools

Also, you need XCode for its command line tools. To install XCode, you have to install it from the Mac App Store. Or you can download it from Apple Developer.

To install Command Line Tools, we provide two ways here:

  1. Launch terminal, execute xcode-select --install. Click install, and follow the wizard, then it will help you install the right version of the Command Line Tools.

  2. Access Apple Developer. Click the Account tab at the banner. Use your Apple ID to log in. Click Download at the left bar, it will bring you to a new page with the latest beta version of XCode and the latest official release of XCode. At the bottom of the page, click the link called 'See More Downloads'. There you can find the history version of XCode and Command Line Tools. Install the correct version for your Mac OS X.

Install Homebrew

If you want to manage the libraries using Homebrew, you need to install it. If you want to manage all the libraries manually, you can skip this part.

Follow the instruction at the homepage of Homebrew, you can install the Homebrew easily. It could be quite slow in China for the public known reason.

If you already installed Homebrew, you may need to launch brew update and brew upgrade for updating all the packages to the latest version.

Install the FFMpeg library

You can compile and install the FFMpeg manually by download and following the instructions in the source code of FFMpeg from its official website.

Or you can use Homebrew to install the FFMpeg library. Launch the terminal and execute:

brew install ffmpeg

Homebrew will install FFMpeg or update FFMpeg if you installed it before. We suggest you to use the latest version of FFMpeg library.

You may got curl: (60) SSL certificate problem: Invalid certificate chain error when you executing the FFMpeg installation (Test on Dec 13th, 2016). You have to use Safari to access https://ffmpeg.org. Safari will pop up a dialog whose title is Safari can't verify the identity of the website "ffmpeg.org". Click Show Certificate, and tick Always trust, then 'Continue'. And this problem should be solved. For graphics tutorial, check the section in FAQ.

Install Bass

First, you have to download the Bass library for Mac OS X from un4seen. It is a zip file named as bass24-osx.zip. Decompress the file. In the new directory, you can find libbass.dylib and bass.h.

Copy libbass.dylib to /usr/local/lib. Copy bass.h to /usr/local/include. However, you don't actually need to copy bass.h, because µ's source code has already contained the bass.h.

Compile Mu

Launch Qt Creator, open the mu.pro file at the root of the source code. Click 'Run qmake'. After it done, click 'Build All' or 'Rebuild All'.

We suggest you to use multi-process compiling for shorten the compiling time. To use multi-process compiling, please check the section in FAQ.

Linux

We have translated compile tutorial on our website:

This document will take Linux distribution based on Debian for instance, Linux with other package management application could use this as an instruction.

The following steps needs administrator privileges to install the dependence (sudo), you may need to input your adminitrator password.

Install GCC

First, you have to install GCC 4.8 or later for compiling. You can install all the essential staffs by:

sudo apt-get install build-essential

Install Dependencies

μ is dependent on Qt 5.3 or later, partial FFMpeg 1.0 or later and GStreamer 1.0 or later under Linux. It's simple to install those three dependences with the following command:

sudo apt-get install qt5-default libmpv-dev libavformat-dev libavutil-dev

Now, all the essential dependences of μ is ready.

Install Qt Creator

We suggest you to compile μ with Qt Creator. It's convienient to change the source code of μ. If you don't want to install Qt Creator, you can compile Mu with pure commands and view section Compile via Terminal below. You can install Qt Creator by the following command:

sudo apt-get install qtcreator

Compile via Qt Creator

You can compile via Qt Creator or terminal. We suggest you to compile via Qt Creator.

First, open the mu.pro file under the source code directory in Qt Creator.

For the first time you open the mu.profile, you have to click Configure Project button to enter the edit page.

Click the Project button on the left, Choose Release in the Edit build configure combo box. Click the Details on the right of the step Make.

According to your CPU logical threads number, Fill the Make arguments with -jxx is your CPU logical threads number. e.g., if you are using a dual core, quad threads CPU, you have to fill -j4.

Click the Rebuild All item in the Build menu to start compile.

Compile via Terminal

First, you have to create a new folder(we will call it build folder) out side the source code folder. Launch the terminal and switch to the build folder. Then use qmaketo generate Makefile.

qmake (path to mu.pro)

The mu.profile is at the root of source code folder.

After the previous command finishs, you can use makecommand to compile. We suggest you to enable multithread compiling, i.e. argument -j. We suggest you to set the threads number to be the same as your logical threads number. e.g. if you are using a dual core quad threads CPU, you can execute:

make -j4

When makefinished, it will generate a binfolder, there's the compiled binary mu.


from https://github.com/Kreogist/Mu/wiki/Compile

-----


Build


This part records how to let µ launch after compiling.

Windows

(Under Construction)

Mac OS X

Download Bass plugins

For the default settings of Bass on Mac OS X, it could only play ALAC, AAC, WAV and MP3 codecs. It needs plugins to supports some other loss and lossless codecs like FLAC and OGG.

The plugin of Bass is provided on un4seen. Here, we will use its FLAC codec for example. Download the BASSFLAC for Mac OS X. The file name is bassflac24-osx.zip. Decompress the file, the libbassflac.dylib is the plugin.

Install the Bass plugins

µ could automatically load the Bass plugin, so put all the plugin under the executable binary file is okay. The path is Path_to_mu.app/mu.app/Contents/MacOS/. Copy all the dylib plugin files here.

Fonts

Some fonts are needed for UI, for example, the clock fonts for the time. µ could automatically load the fonts at Path_to_mu.app/mu.app/Contents/Resources/Fonts/. Copy all the font files here. You can download fonts from our official site (bottom of Chinese and English download page).

The following three fonts are needed:

  • WenQuanYi Micro Hei (4.4 MB) for user interface and lyrics fonts.
  • sao (15 KB) for SAO style dialog title
  • 096MKSD (23 KB) for the time display font.

Translations

(Under Construction)

Deployment

Launch terminal, suppose the Qt framework is installed under Application folder, the folder name is Qt5.7.1. There is a binary executable file named macdeployqt under:

/Applications/Qt5.7.1/5.7/clang_64/bin

Use cd command to switch the path to the folder above. Suppose your mu.app has been generated under your home directory. Use the following command to deploy the Qt framework data.

./macdeployqt ~/mu.app

After that, we need to change the library linked path of the bass.dylib. Switch the path to the path you store the mu.app (in the example above, it should be the home directory). Launch

otool -L mu.app/Contents/MacOS/mu

If it display the following content:

mu.app/Contents/MacOS/mu:
	/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation (compatibility version 150.0.0, current version 1151.16.0)
	@loader_path/libbass.dylib (compatibility version 1.0.0, current version 1.0.0)
	@executable_path/../Frameworks/libavformat.57.dylib (compatibility version 57.0.0, current version 57.56.100)
	@executable_path/../Frameworks/libavcodec.57.dylib (compatibility version 57.0.0, current version 57.64.101)
	@executable_path/../Frameworks/libavutil.55.dylib (compatibility version 55.0.0, current version 55.34.100)
	@executable_path/../Frameworks/libswresample.2.dylib (compatibility version 2.0.0, current version 2.3.100)
	@executable_path/../Frameworks/libswscale.4.dylib (compatibility version 4.0.0, current version 4.2.100)
	@rpath/QtWidgets.framework/Versions/5/QtWidgets (compatibility version 5.7.0, current version 5.7.1)
	@rpath/QtGui.framework/Versions/5/QtGui (compatibility version 5.7.0, current version 5.7.1)
	@rpath/QtCore.framework/Versions/5/QtCore (compatibility version 5.7.0, current version 5.7.1)
	/System/Library/Frameworks/DiskArbitration.framework/Versions/A/DiskArbitration (compatibility version 1.0.0, current version 1.0.0)
	/System/Library/Frameworks/IOKit.framework/Versions/A/IOKit (compatibility version 1.0.0, current version 275.0.0)
	@rpath/QtXml.framework/Versions/5/QtXml (compatibility version 5.7.0, current version 5.7.1)
	@rpath/QtNetwork.framework/Versions/5/QtNetwork (compatibility version 5.7.0, current version 5.7.1)
	/System/Library/Frameworks/OpenGL.framework/Versions/A/OpenGL (compatibility version 1.0.0, current version 1.0.0)
	/System/Library/Frameworks/AGL.framework/Versions/A/AGL (compatibility version 1.0.0, current version 1.0.0)
	/usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 120.0.0)
	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1213.0.0)

Noticed that the line with bass.dylib is displayed as @loader_path/libbass.dylib (compatibility version 1.0.0, current version 1.0.0), which links to the library on the system directory. We need to change it to the library inside the mu.app. Execute

install_name_tool -change @loader_path/libbass.dylib @executable_path/../MacOS/libbass.dylib mu.app/Contents/MacOS/mu

And then, launch the otool command again, it should display the following content:

mu.app/Contents/MacOS/mu:
	/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation (compatibility version 150.0.0, current version 1151.16.0)
	@executable_path/../MacOS/libbass.dylib (compatibility version 1.0.0, current version 1.0.0)
	@executable_path/../Frameworks/libavformat.57.dylib (compatibility version 57.0.0, current version 57.56.100)
	@executable_path/../Frameworks/libavcodec.57.dylib (compatibility version 57.0.0, current version 57.64.101)
	@executable_path/../Frameworks/libavutil.55.dylib (compatibility version 55.0.0, current version 55.34.100)
	@executable_path/../Frameworks/libswresample.2.dylib (compatibility version 2.0.0, current version 2.3.100)
	@executable_path/../Frameworks/libswscale.4.dylib (compatibility version 4.0.0, current version 4.2.100)
	@rpath/QtWidgets.framework/Versions/5/QtWidgets (compatibility version 5.7.0, current version 5.7.1)
	@rpath/QtGui.framework/Versions/5/QtGui (compatibility version 5.7.0, current version 5.7.1)
	@rpath/QtCore.framework/Versions/5/QtCore (compatibility version 5.7.0, current version 5.7.1)
	/System/Library/Frameworks/DiskArbitration.framework/Versions/A/DiskArbitration (compatibility version 1.0.0, current version 1.0.0)
	/System/Library/Frameworks/IOKit.framework/Versions/A/IOKit (compatibility version 1.0.0, current version 275.0.0)
	@rpath/QtXml.framework/Versions/5/QtXml (compatibility version 5.7.0, current version 5.7.1)
	@rpath/QtNetwork.framework/Versions/5/QtNetwork (compatibility version 5.7.0, current version 5.7.1)
	/System/Library/Frameworks/OpenGL.framework/Versions/A/OpenGL (compatibility version 1.0.0, current version 1.0.0)
	/System/Library/Frameworks/AGL.framework/Versions/A/AGL (compatibility version 1.0.0, current version 1.0.0)
	/usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 120.0.0)
	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1213.0.0)

The bass.dylib is already pointed to the file inside mu.app. The mu.app is now ready for deployment.

from https://github.com/Kreogist/Mu/wiki/Build


No comments:

Post a Comment