1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128
|
# Notes on building MilkyTracker
MilkyTracker now uses CMake to produce the build files. This replaces the
previously separately maintained Autotools, Visual Studio and Xcode project
files. Some historic platform-specific build files remain in the platforms
directory - these are untested.
The CMake configuration will auto-detect the platform it is building on, but can
be configured to force an SDL build if required by setting the `FORCESDL`
option.
**NOTE:** The use of `FORCESDL` is for developers only. No support is provided
for SDL builds on Windows/macOS.
# Dependencies
To build the **SDL port** of MilkyTracker (used for Linux) you will need the
following development libraries installed on your system:
- RtMidi/ALSA (optional, for Linux MIDI support)
- JACK (optional)
- SDL2
For all **non-Windows/macOS ports**, the decompression libs (optional):
- lhasa
- zlib
- zziplib
These are also provided as Git submodules, see below.
For example, on Ubuntu 18.04, you might run the following command to satisfy all
of the above dependencies:
```
$ sudo apt-get install libjack-dev liblhasa-dev \
librtmidi-dev libsdl2-dev libzzip-dev
```
Other distros might use different naming schemes for their packages. Please
search your distro's package manager for the above library names.
# Submodules (Windows/macOS only)
The following Git submodules are provided for linking into the Windows and macOS
binaries:
- RtAudio (Windows only)
- lhasa
- zlib (Windows only, macOS provides this)
- zziplib
To obtain these, `cd` to the MilkyTracker source directory and type:
```
$ git submodule update --init
```
# Building
As with most other CMake-based projects, building MilkyTracker requires two
steps:
1. Generating the build files for your desired build system using CMake
2. Invoking the generated build system
## Step 1
At the command line, step 1 is performed as follows:
```
$ mkdir build
$ cd build
$ cmake ..
```
On macOS, add `-GXcode` to the last command to generate an Xcode project instead
of using GNU make.
Note that you could also use the CMake GUI for this step instead of the command
line.
## Step 2
Step 2 varies depending on the target OS/build system.
On Linux and macOS (when using GNU make):
The above steps can be accomplished by running `build.sh`. This will also
attempt to generate a release package appropriate to the current system.
```
$ make
```
On Windows, you will probably have generated a Visual Studio project instead.
Simply open it with Visual Studio and compile the 'MilkyTracker' target.
On macOS, the same applies if you decided to generate an Xcode project using
`-GXcode`. Open the project up and build the 'MilkyTracker' target.
## macOS specific notes
In addition to CMake, you will need the following extra packages. The
recommended way of obtaining these is by using Homebrew or MacPorts.
- automake
- libtool
- xmlto
The correct way to build a release .DMG for macOS is to run the `build.sh`
script.
## Rebuilding internal documentation + default addons file
The following scripts (rarely) need to be run when one of these file changes:
* `doc/Milkytracker.html` needs `src/tool/generateHelp.sh` (to generate `src/tracker/DialogHelpText.h`)
* `src/tools/addons.txt` needs `src/tool/generateAddons.sh` (to generate `src/tracker/Addons.h`)
> NOTE: don't update `doc/Milkytracker.html`, instead update/mirror https://github.com/milkytracker/manual
## Environment flags
| env var | info |
|---------------|----------------------------------------------|
| NO_SCALE=1 | disabling resizing/scaling UI |
| SCALE_NEAREST | sharper pixels (default linear filtering is more blurry) for resizing window|
| MIDI_IN=2 | select MIDI port 2 (default=0) for midi input (requires portmidi compiled)|
| HOME | directory for home-button in filebrowser |
| NO_OPENGL | disable hardware acceleration (embedded devices e.g. |
| XDG_CONFIG_HOME | for linux: specifies where to store config |
|