Skip to content
Tojo Saki edited this page Jan 6, 2017 · 3 revisions

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.

Linux

(Under Construction)

Clone this wiki locally