Setup
dew builds from source on macOS, Windows and Linux. Two CMake commands on all three, once the toolchain is there.
macOS
macOS 11 or newer, Apple Silicon or Intel.
| What you need | What it is |
|---|---|
| Xcode command line tools | The compiler, and the clang-format the gate runs. |
| Homebrew | How the rest arrive, from the Brewfile in the repository root. |
| cmake ≥ 3.25 | JUCE 9 needs 3.22; CMakePresets v6 needs 3.25. |
| ninja | The generator every preset uses. |
| ccache | Optional. Caches compiled objects between builds. |
| lame | Optional, and only for MP3 export. |
Build it
$ brew bundle # cmake >= 3.25, ninja, ccache, lame$ cmake --preset release$ cmake --build --preset releasebrew bundle reads the Brewfile in the repository root and installs the four tools below the first two.
Run it
$ open build/release/src/dew_artefacts/RelWithDebInfo/dew.appLinux
x86_64, glibc 2.35 or newer. Built and tested on Ubuntu 22.04.
| What you need | What it is |
|---|---|
| gcc or clang | C++20. build-essential is enough on Debian and Ubuntu. |
| cmake ≥ 3.25 | Ubuntu 22.04 ships 3.22, which is too old for CMakePresets v6 — take a newer one from cmake.org. |
| ninja | The generator every preset uses. |
| ALSA, X11, freetype, fontconfig, mesa | The development packages JUCE links against, installed by the command below. |
| lame | Optional, and only for MP3 export. |
Build it
$ sudo apt install build-essential ninja-build git pkg-config \
libasound2-dev libfreetype-dev libfontconfig1-dev \
libx11-dev libxext-dev libxinerama-dev libxrandr-dev libxcursor-dev \
libxcomposite-dev libxrender-dev libxi-dev \
libgl1-mesa-dev libglu1-mesa-dev mesa-common-dev$ cmake --preset release$ cmake --build --preset releaseThe package list is the one CI installs. webkit2gtk and libcurl are absent because dew builds with JUCE_WEB_BROWSER=0 and JUCE_USE_CURL=0.
Run it
$ ./build/release/src/dew_artefacts/RelWithDebInfo/dewWindows
Windows 10 or 11, x64.
| What you need | What it is |
|---|---|
| Visual Studio 2022 | With the Desktop development with C++ workload. The generator finds this toolchain itself. |
| cmake ≥ 3.25 | The installer offers it; Visual Studio also ships one. |
| lame.exe | Optional, and only for MP3 export. It has to be on PATH. |
Build it
$ cmake --preset dist-windows$ cmake --build --preset dist-windowsThe Visual Studio generator rather than Ninja, which would need a developer command prompt to find cl.exe.
Run it
$ build\dist-windows\src\dew_artefacts\RelWithDebInfo\dew.exeThe presets
release is the one to build for normal use. The first configure fetches JUCE and Catch2 from source, cached per machine under ~/.cache/CPM, so one build is slow and the rest are not.
| Preset | What it is |
|---|---|
| dev | Debug, with tests |
| release | RelWithDebInfo. Build this for normal use |
| ci | release plus warnings-as-errors |
| asan | ci plus AddressSanitizer and UndefinedBehaviorSanitizer |
| tsan | ci plus ThreadSanitizer |
| dist | What a release is built from: no tests, universal on Apple |
| dist-windows | dist, built by the Visual Studio generator |
| offline | release from a warm dependency cache, no network |
The gate
$ ./scripts/check.shOne command, running everything CI runs.
The repository
MP3 export needs lame installed separately, in any build: the option stays greyed out until lame is on your PATH. WAV, FLAC and MIDI need nothing.