Skip to content

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 needWhat it is
Xcode command line toolsThe compiler, and the clang-format the gate runs.
HomebrewHow the rest arrive, from the Brewfile in the repository root.
cmake ≥ 3.25JUCE 9 needs 3.22; CMakePresets v6 needs 3.25.
ninjaThe generator every preset uses.
ccacheOptional. Caches compiled objects between builds.
lameOptional, and only for MP3 export.

Build it

$ brew bundle                    # cmake >= 3.25, ninja, ccache, lame$ cmake --preset release$ cmake --build --preset release

brew 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.app

Linux

x86_64, glibc 2.35 or newer. Built and tested on Ubuntu 22.04.

What you needWhat it is
gcc or clangC++20. build-essential is enough on Debian and Ubuntu.
cmake ≥ 3.25Ubuntu 22.04 ships 3.22, which is too old for CMakePresets v6 — take a newer one from cmake.org.
ninjaThe generator every preset uses.
ALSA, X11, freetype, fontconfig, mesaThe development packages JUCE links against, installed by the command below.
lameOptional, 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 release

The 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/dew

Windows

Windows 10 or 11, x64.

What you needWhat it is
Visual Studio 2022With the Desktop development with C++ workload. The generator finds this toolchain itself.
cmake ≥ 3.25The installer offers it; Visual Studio also ships one.
lame.exeOptional, and only for MP3 export. It has to be on PATH.

Build it

$ cmake --preset dist-windows$ cmake --build --preset dist-windows

The 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.exe

The 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.

PresetWhat it is
devDebug, with tests
releaseRelWithDebInfo. Build this for normal use
cirelease plus warnings-as-errors
asanci plus AddressSanitizer and UndefinedBehaviorSanitizer
tsanci plus ThreadSanitizer
distWhat a release is built from: no tests, universal on Apple
dist-windowsdist, built by the Visual Studio generator
offlinerelease from a warm dependency cache, no network

The gate

$ ./scripts/check.sh

One 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.

github.com/janschupke/dew