Advertisement
Guest User

Untitled

a guest
Apr 30th, 2017
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 13.34 KB | None | 0 0
  1. ## Contents
  2. * [Dependencies](#dependencies)
  3. * [Dependencies Quickstart](#dependencies-quickstart)
  4. * [Advanced - The Build Toolchain](#build-toolchain)
  5. * [Advanced - The Compiler](#compiler)
  6. * [Advanced - The Libraries](#libraries)
  7. * [Clone Source Code](#clone-source-code)
  8. * [Build Environment](#build-environment)
  9. * [CMake Quickstart](#cmake-quickstart)
  10. * [Advanced - Build Options](#build-options)
  11. <!-- * [Using Qt5](#using-qt5) -->
  12. * [Compiling](#compiling)
  13. * [Debugging](#debugging)
  14. * [Packaging](#packaging)
  15. * [Windows Installer - nsis](#packaging-windows)
  16. * [MacOS Installer - appdmg](#packaging-macos)
  17. * [Linux Installer - makeself](#packaging-linux)
  18.  
  19. <br><!-- End Section --><br>
  20.  
  21. ## Dependencies
  22.  
  23. The following packages are required for building. Since most desktops offer these libraries through package repositories, we recommend using the [Dependency Quickstart](#dependencies-quickstart) for most purposes.
  24.  
  25. If a package is not available for your platform, you may need to [manually install](#dependencies-detailed).
  26.  
  27. ### Dependencies Quickstart
  28. Recommended. Each platform requires a [compiler](#compiler) and several [libraries](#libraries). We've selected the most common settings for you.
  29.  
  30. | Ubuntu | Debian | Fedora | openSUSE | Arch | macOS | Windows |
  31. |--------|--------|--------|----------|------|-------|---------|
  32. | [Qt5](dependencies-ubuntu#qt5), [Qt4](dependencies-ubuntu#qt4) | [Qt4](dependencies-debian#qt4) | [Missing](dependencies-fedora) | [Qt5](dependencies-opensuse#qt5), [Qt4](dependencies-opensuse#qt4) | [Qt5](dependencies-arch) | [Qt5](dependencies-macos#qt5), [Qt4](dependencies#qt4-macos) | [crosscompile](dependencies-windows#ubuntu-cross-compile), [msys2](dependencies-windows#windows-os) |
  33.  
  34. &nbsp;&nbsp;&nbsp; ... platform missing? Add it [here](Dependencies-FooBar).
  35.  
  36. ### Dependencies Detailed
  37. Alternately, you may download and compile each dependency manually. This is recommended for advanced users only.
  38.  
  39. #### Build Toolchain
  40. | Supported | Toolchain | Version | Notes |
  41. |-----------|-----------|---------|-------|
  42. | ✔️ | [`cmake`](https://cmake.org/) | `2.8.11` | Required for [Qt5](#using-qt5)|
  43. | ✔️ | [`cmake`](https://cmake.org/) | [`2.8.9`](../blob/master/CMakeLists.txt#L1) | [`lmms>=master`](../tree/master) |
  44. | ✔️ | [`cmake`](https://cmake.org/) | [`2.8.7`](../blob/stable-1.2/CMakeLists.txt#L1) | [`lmms<=stable-1.2`](../tree/stable-1.2) |
  45. | ✔️ | [`cmake`](https://cmake.org/) | [`2.4.5`](../blob/stable-1.1/CMakeLists.txt#L1) | [`lmms<=stable-1.1`](../tree/stable-1.1) |
  46.  
  47. #### Compiler
  48. | Supported | Compiler | Version |
  49. |-----------|----------|---------|
  50. | ✔️ | [`gcc/g++`](http://gcc.gnu.org/) | `c++11` |
  51. | ✔️ | [`clang`](http://gcc.gnu.org/) | |
  52. | ✔️ | [`mingw-w64`](https://sourceforge.net/projects/mingw-w64/) | |
  53. | ❌ | [`msvc++`](https://visualstudio.com/vs/cplusplus/) | Not yet supported |
  54.  
  55. #### Libraries
  56.  
  57. | Required | Library | Version | Description |
  58. |----------|---------|---------|-------------|
  59. | ✔️ | [`Qt5`](http://qt.io) | `>=5.0.0` | Recommended over Qt4, see [Using Qt5](#using-qt5) below. |
  60. | ✔️ | [`Qt4`](http://qt.io) | `>=4.3.0` | Optional instead of Qt5, `>=4.4.x` recommended |
  61. | ✔️ | [`libsndfile`](http://www.mega-nerd.com/libsndfile/) | | Reading and writing sound files |
  62. | ✔️ | [`fftw3`](http://www.fftw.org/) | | Fast fourier transform computing library |
  63. | | [`libvorbis`](http://xiph.org/vorbis/) | | Audio encoding library |
  64. | | [`libsamplerate`](http://www.mega-nerd.com/SRC/) | `>=0.1.7` | Audio sample rate converter |
  65. | | [`libogg`](http://xiph.org/ogg/) | | Multimedia container format |
  66. | | [`wine`](http://www.winehq.org/) | | Windows-on-Unix (needed for VST support) |
  67. | | [`libstk`](http://ccrma.stanford.edu/software/stk/) | | Signal processing and algorithmic synthesis library |
  68. | | [`libfluidsynth`](http://fluidsynth.sourceforge.net/) | | SoundFont synthesis library |
  69. | | [`fltk`](http://www.fltk.org/) | | Lightweight GUI library (needed by ZynAddSubFX) |
  70. | | [`jack`](http://jackaudio.org/)| | Software and hardware audio routing |
  71. | | [`sdl`](http://www.libsdl.org/)| | Audio interface library* |
  72. | | [`alsa`](http://www.alsa-project.org/) | | Audio interface library* |
  73. | | [`libportaudio`](http://www.portaudio.com/)| | Audio interface library* |
  74. | | [`libsoundio`](http://libsound.io/)| | Audio interface library* |
  75.  
  76. > \*One one or more required for audio playback
  77.  
  78. <br><!-- End Section --><br>
  79.  
  80.  
  81.  
  82. ## Clone Source Code
  83. Before preparing the build environment, you must have a [`branch`](../branches) copy of the source code*.
  84. ```bash
  85. # clone the "master" branch (e.g. "stable-1.2", etc)
  86. git clone -b master https://github.com/lmms/lmms
  87. ```
  88. > \* Advanced users may prefer to download a tarball instead: [zip](https://github.com/LMMS/lmms/archive/master.tar.gz) | [tarball](https://github.com/LMMS/lmms/archive/master.tar.gz)
  89.  
  90. For most users, this will create a folder `~/lmms` which can be used for building. If you're already using `~/lmms` for samples you'll see `path 'lmms' already exists`, use an alternate location e.g. `~/Desktop` and try again.
  91.  
  92. &nbsp;&nbsp;&nbsp; ... want to switch branches or fast-forward? See [[Accessing git repository]].
  93.  
  94. <br><!-- End Section --><br>
  95.  
  96.  
  97.  
  98. ## Build Environment
  99. The [`cmake` toolchain](#build-toolchain) offers several [built-in configuration options](https://cmake.org/cmake/help/v3.0/manual/cmake-variables.7.html). In addition, LMMS adds several options useful for building. Below are a list of the most standard options. We recommend using the [CMake Quickstart](#cmake-quickstart) for most purposes.
  100.  
  101. ### CMake Quickstart
  102. Assumes you've already [installed dependencies](#dependencies-quickstart) and [cloned the source code](#clone-source-code)
  103. 1. Prepare `build` and, optionally, the `target` directories
  104. ```bash
  105. cd lmms
  106. mkdir build target
  107. cd build
  108. ```
  109.  
  110. 2. And then choose one of the following...
  111.  
  112. #### Running CMake
  113. ```bash
  114. # from "lmms/build" directory
  115. cmake .. -DCMAKE_INSTALL_PREFIX=../target/
  116. ```
  117.  
  118. -- OR --
  119.  
  120. #### Running CMake for [Windows](dependencies-windows)*
  121. ```bash
  122. # from "lmms/build" directory
  123. ../cmake/build_mingw64.sh
  124. ```
  125. > \* For 32-bit, use `build_mingw32.sh` instead
  126.  
  127.  
  128. **Note:**
  129. In case you want to build lmms with Qt, see [Using Qt5](#using-qt5).
  130.  
  131. ### Build Options
  132. | Option* | Description | Common Values |
  133. |--------|-------------|-------|
  134. | [`CMAKE_INSTALL_PREFIX`](https://cmake.org/cmake/help/v3.0/variable/CMAKE_INSTALL_PREFIX.html) | Install to non-standard (non-root) location. This is generally preferred, especially for coding, testing and packaging. | `../install` |
  135. | [`CMAKE_PREFIX_PATH`](https://cmake.org/cmake/help/v3.0/variable/CMAKE_PREFIX_PATH.html?highlight=cmake_prefix_path) | Set your Qt5 (probably other library too) installation path if it does not reside in standard installation paths | `/path/to/qt5` |
  136. | [`CMAKE_BUILD_TYPE`](https://cmake.org/cmake/help/v3.0/variable/CMAKE_BUILD_TYPE.html) | Force build to include debugging or optimization symbols | `Release`, `Debug`, `RelWithDebInfo` |
  137. | [`FORCE_VERSION`](../blob/master/cmake/modules/VersionInfo.cmake) | Force version within software, useful for distributing one-off packages | `internal`, `1.2.3-myfix` |
  138. | [`PLUGIN_LIST`](../blob/master/plugins/CMakeLists.txt) | Limit build only to the specified [`/plugins/`](../blob/master/plugins/), used to reduce compile time, such as when [bisecting](https://git-scm.com/docs/git-bisect) | `"audio_file_processor kicker triple_oscillator"` |
  139. | [`WANT_QT5`, `WANT_SDL`, `WANT_SWH`, `WANT_VST`...](../blob/master/CMakeLists.txt) | Toggle on/off a library, dependency or feature | `ON`, `OFF` |
  140.  
  141.  
  142. > \* When provided on command line, all [options](#build-options) must be prefixed with `-D`, e.g<br>
  143. > `cmake -DCMAKE_BUILD_TYPE=Debug`
  144.  
  145. #### Using Qt5
  146. In order to build LMMS with Qt5, add the following flag when invoking cmake:
  147.  
  148. ```bash
  149. -DWANT_QT5=ON
  150. ```
  151. If your Qt5 installation does not reside in standard installation paths, additionally pass e.g.
  152.  
  153. ```bash
  154. -DCMAKE_PREFIX_PATH=/path/to/qt5
  155. ```
  156.  
  157. &nbsp;&nbsp;&nbsp; ... still need help? Ask on our [Discord chat server](https://discord.gg/5kSc32Z)
  158.  
  159.  
  160. <br><!-- End Section --><br>
  161.  
  162.  
  163.  
  164. ## Compiling
  165. Assumes you've already [installed dependencies](#dependencies-quickstart) and [cloned the source code](#clone-source-code) and [configured the build environment](#running-cmake).
  166.  
  167. ```bash
  168. # from "lmms/build" directory
  169. make -j4
  170. ```
  171.  
  172. Compilation errors are usually attributed to missing packages, misconfigured system or specific compatibility problems. Please jump to the appropriate troubleshooting guide:
  173.  
  174. **Troubleshooting:** [Ubuntu](dependencies-ubuntu#troubleshooting), [Debian](dependencies-debian#troubleshooting), [Fedora](dependencies-fedora#troubleshooting), [openSUSE](dependencies-openSUSE#troubleshooting), [Arch](dependencies-arch#troubleshooting), [macOS](dependencies-macOS#troubleshooting), [Windows](dependencies-windows#troubleshooting)
  175.  
  176.  
  177. <br><!-- End Section --><br>
  178.  
  179.  
  180.  
  181. ## Debugging
  182. Debugging LMMS requires a re-run of the `cmake` command, but with the debug symbols turned on.
  183. For a comprehensive tutorial, see also [[Debugging LMMS]]
  184.  
  185. ### Adding Debug Symbols
  186. ```bash
  187. # from "lmms/build" directory
  188. cmake .. -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=../target/
  189. # -- OR for better performance --
  190. cmake .. -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_INSTALL_PREFIX=../target/
  191. # re-run the build
  192. make -j4
  193. ```
  194. ### Debugging with `gdb`
  195. Assuming you have `gcc` (most common), you'll need `gdb` installed via `apt-get`, `dnf`, `pacman`, etc.
  196. ```bash
  197. gdb lmms
  198. # or alternately gdb ../target/bin/lmms
  199. (gdb) run
  200. # once you hit the crash, CTRL + C
  201. backtrace full
  202. ```
  203.  
  204. ### Debugging with `lldb`
  205. Assuming you have `clang` (macOS, FreeBSD), you'll need `lldb` installed via `brew`, `pkg_add`, etc.
  206. ```bash
  207. lldb lmms
  208. # or alternately lldb ../target/bin/lmms
  209. # macOS, use `make -j4 install` then `lldb LMMS.app/Contents/MacOS/lmms`
  210. (lldb) run
  211. # once you hit the crash, CTRL + C
  212. thread backtrace full
  213. ```
  214.  
  215. <br><!-- End Section --><br>
  216.  
  217.  
  218.  
  219. ## Packaging
  220.  
  221. | Supported | Format | Platform | Notes |
  222. |-----------|--------|----------|-------|
  223. | ✔️ | `.exe` | [Windows](#windows-packaging) | `lmms>=0.4.0` |
  224. | ✔️ | `.dmg` | [macOS](#macos-packaging) | `lmms>=1.0.0` |
  225. | ✖️ | `.run` | [Linux Universal](#linux-packaging) | Work in progress, see [#2932](../issues/2932)
  226. | ❌ | `.deb` | Debian, Ubuntu | See [#1620](../issues/1620). Please contact package maintainers. |
  227. | ❌ | `.rpm` | Fedora, openSUSE | Related to [#1620](../issues/1620). Please contact package maintainers. |
  228.  
  229. #### Windows Packaging
  230.  
  231. This is the most common type for getting features and fixes out to a large number of testers. Assumes you've already [installed dependencies](#dependencies-windows) and [cloned the source code](#clone-source-code) and [configured the build environment](#running-cmake). Once completed, the release should be [published](#publishing-a-release) for others to download.
  232. ```bash
  233. # from "lmms/build" directory
  234. make package # package using nsis
  235. ```
  236. > Try `explorer .` to see it in Explorer. Produces `lmms-1.2.0.123-win64.exe`, where `123` is the number of commits since stable release.
  237.  
  238. #### MacOS Packaging
  239.  
  240. Assumes you've already [installed dependencies](#dependencies-macos) and [cloned the source code](#clone-source-code) and [configured the build environment](#running-cmake). Once completed, the release should be [published](#publishing-a-release) for others to download.
  241. ```bash
  242. # from "lmms/build" directory
  243. make install # builds the app bundle
  244. make dmg # creates the disk image using appdmg
  245. open . # optional: view in Finder
  246.  
  247. ```
  248.  
  249. > Produces `lmms-1.2.0.123-mac10.11.dmg`, where `123` is the number of commits since stable release and `mac10.11` is the macOS version which the package was built on.
  250.  
  251. #### Linux Packaging
  252.  
  253. Experimental. Assumes you've already [installed dependencies](#dependencies-quickstart) and [cloned `jasp00:linux-inst`](../issues/2932) and [configured the build environment](#running-cmake). Once completed, the release should be [published](#publishing-a-release) for others to download.
  254. ```bash
  255. # from "lmms/build" directory
  256. make install # installs to target
  257. make makeself # create self-extracting package
  258. ```
  259. > Produces `lmms-1.2.0.123-x86_64-linux-gnu.run`, where `123` is the number of commits since stable release.
  260.  
  261. #### Publishing a Release
  262.  
  263. Using [GitHub releases](https://help.github.com/articles/creating-releases/), Project administrators may wish to package a release to their personal github account or to the entire project.
  264.  
  265. * **Personal Release**: Used for distributing early feature or test packages.
  266. * URL: `https://github.com/tresf/lmms/releases` (replace `tresf` with your `@github` id)
  267. * **Project Release**: Used for distributing official stable and release candidate packages.
  268. * URL: `https://github.com/lmms/lmms/releases`
  269.  
  270. > Download statistics are available [here](https://api.github.com/repos/lmms/lmms/releases)
  271.  
  272. &nbsp;&nbsp;&nbsp; ... example release notes available [here](../releases/tag/v1.1.0).
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement