Skip to content

Building from Source

Allen Robberson edited this page Nov 24, 2026 · 6 revisions

Building from Source

git clone https://github.com/allenrobberson/dropocalypse.git
cd dropocalypse
swift run -c release            # quick run
./scripts/build-app.sh          # builds dist/Dropocalypse.app, .zip and .dmg

You need Xcode 15 or later (or the Command Line Tools) on macOS 13 or later. There are no third-party dependencies.

Windows (Visual Studio 2022 with the "Desktop development with C++" workload, plus CMake):

cmake -S windows -B build -A x64
cmake --build build --config Release
build\Release\Dropocalypse.exe

The Windows build downloads Dear ImGui (MIT) for the toolbar and links the C runtime statically, so the .exe runs without installing anything.

Linux (GCC or Clang, CMake, and the development packages for OpenGL, PulseAudio, libcurl, X11 and Wayland):

sudo apt install build-essential cmake pkg-config libgl-dev libpulse-dev libcurl4-openssl-dev \
  libx11-dev libxrandr-dev libxinerama-dev libxcursor-dev libxi-dev libwayland-dev libxkbcommon-dev wayland-protocols
cmake -S linux -B build-linux -DCMAKE_BUILD_TYPE=Release
cmake --build build-linux
./build-linux/dropocalypse

The Linux build downloads Dear ImGui, GLFW (zlib) and stb (public domain). It shares the styles, the update rules and the toolbar with the Windows version: after changing the Windows toolbar code, run python3 linux/port/generate.py to bring the Linux toolbar up to date.

Releases are automatic. GitHub Actions builds every push to main. To publish a new downloadable version, do either of these:

  • On GitHub, go to Actions → Build → Run workflow, type a version such as 0.2.0, and click Run workflow.
  • Or push a tag: git tag v0.2.0 && git push origin v0.2.0

Either way, the Mac, Windows and Linux versions are built side by side and published together in one GitHub Release.

Before releasing, add the new version to the top of docs/wiki/Changelog.md and run python3 scripts/make-guide.py (needs reportlab). The printable User Guide shows the version on its cover and on every page, taken from the newest changelog entry, and the build warns if the guide's version doesn't match the release.

Project layout

Sources/Dropocalypse/
  Audio/AudioCapture.swift    mic / line-in capture, device list, small hardware buffers
  Audio/ProcessTap.swift      Core Audio process tap: listen to one app or all Mac audio (14.2+)
  Audio/AudioAnalysis.swift   real-time filters, envelopes, auto-gain, beat detection
  Recorder.swift              MP4 recording (AVAssetWriter, H.264 + AAC)
  UpdateChecker.swift         update check, download, verify and one-click install
  Render/Renderer.swift       Metal pipeline: feedback warp → shapes → composite + logo
  Render/ShaderSource.swift   all Metal shaders
  Render/Scenes.swift         the 31 built-in styles (add your own here!)
  Render/StyleFX.swift        particles, stars, lightning, ridges, rain for styles 11-20
  Render/WaveDrawer.swift     waveform / spectrum / dots geometry
  Render/LogoMotion.swift     spring physics for pulse, squash, bounce, slide, wobble
  Views/                      SwiftUI window, auto-hiding toolbar, detached controls

windows/
  src/audio.cpp               WASAPI capture (mic, line-in, system-audio loopback) + the same DSP
  src/renderer.cpp            Direct3D 11 pipeline, styles, logo physics
  src/scenes.h                the 31 styles (Windows copy)
  src/shaders.h               HLSL port of the Metal shaders
  src/logo.cpp                logo loading (PNG, JPG, …)
  src/recorder.cpp            MP4 recording (Media Foundation, H.264 + AAC)
  src/main.cpp                windows, swap chains, toolbar, detached controls, updater, settings
  app.manifest                "asInvoker": runs without admin rights

linux/
  src/audio.cpp               PulseAudio / PipeWire capture (outputs and inputs) + the same DSP
  src/renderer.cpp            OpenGL 3.3 pipeline (shared style code from windows/src/renderer.cpp)
  src/shaders.h               GLSL port of the shaders
  src/recorder.cpp            MP4 recording through ffmpeg
  src/main.cpp                generated by port/generate.py from the Windows toolbar + port/*.inc
  port/*.inc                  Linux parts: GLFW windows, file dialogs, AppImage updater, main loop

See also How It Works and Adding a Style.

Clone this wiki locally