"In the land of the blind, the one-eyed man is king"
Twonker
Facebook


Developer's Guide

Recommended Directory Structure

The following directory structure is recommended for building the plugins:

.
└── Twonker
    ├── twonker                        -- Twonker source code
    │   ├── ARTISTIC
    │   ├── JUCE
    │   ├── README-devs.md
    │   ├── README.md
    │   ├── Release_pub.asc
    │   └── VERSION
    └── twonker_libs
        ├── JUCE                      -- JUCE source code
        │   ├── BREAKING-CHANGES.txt
        │   ├── ChangeList.txt
        │   ├── cmake-build
        │   ├── CMakeLists.txt
        │   ├── docs
        │   ├── examples
        │   ├── extras
        │   ├── LICENSE.md
        │   ├── modules
        │   └── README.md
        └── vstsdk                    -- VST2 legacy library
            ├── base
            ├── pluginterfaces
            ├── public.sdk
            └── vstgui4

Under the Twonker folder:

Note: The VST2 build target is disabled by default, given that the VST2 specification is obsolete and not everyone can still obtain the VST2 SDK. It can be enabled from within the Projucer under Project Settings, then Plugin Formats.

JUCE

https://juce.com

JUCE is an open-source cross-platform C++ application framework, used for the development of desktop and mobile applications. JUCE is used in particular for its GUI and plug-ins libraries. The Twonker is a JUCE-based VST plug-in.

The Projucer

https://juce.com/discover/projucer

The Projucer is an IDE tool for creating and managing JUCE projects. When the files and settings for a JUCE project have been specified, the Projucer automatically generates a collection of 3rd-party project files to allow the project to be compiled natively on each target platform.

Some files in the repository are generated by The Projucer and should not be modified directly (otherwise changes will be overwritten).

All the files under the following directory are generated by The Projucer:

.
└── twonker
    └── JUCE
        └── JuceLibraryCode
The Twonker project is configured to "Make Local Copies" of the required JUCE modules. When JUCE is upgraded, JUCE will copy the updated modules into the following folder:
.
└── twonker
    └── JUCE
        └── JuceLibraryCode
            └── modules

This folder is committed to Git so that building The Twonker is made simpler.

When upgrading JUCE, first delete all the code under the modules directory so that any orphaned modules are removed before the updated modules are copied in their place.

The JUCE module path is an absolute reference and only true for my development machine. This is the main reason why the modules are copied into the source repository.

The Steinberg VST2 SDK however cannot be included with the repository due to licensing restrictions. Each developer needs their own license in order to use the VST2 SDK.

Minimal Configuration

In the Projucer application from the menubar, navigate to File, then Global Paths. From here you can configure:

These two configuration options correspond to the recommended layout as follows:

.
└── Twonker
    └── twonker_libs
        ├── JUCE        -- Path to JUCE
        └── vstsdk      -- VST (Legacy) SDK

Upgrading JUCE

The JUCE GitLab reposotory is located at the following URL:

https://github.com/juce-framework/JUCE.git

Fetch the new version of JUCE:

git checkout x.y.z

Where x.y.z is the tagged version in GitLab.

Prepare The Twonker source by deleting the contents of the modules directory:

.
└── twonker
    └── JUCE
        └── JuceLibraryCode
            └── modules

Rebuild the new version of Projucer and load The Twonker JUCE project. Once loaded, save the project. This will:

  1. Update the C++ files generated by JUCE.
  2. Update the JUCE modules.

Close the Projucer and open The Twonker Visual Studio solution file. Once loaded, rebuild the solution.

Commiting the upgraded JUCE modules to Git

When committing the code back to Git:

  1. Delete all the "missing" files.
  2. Add all the "unknown" files.

Platform-Specific Information

Linux

The following packages must be installed prior to compiling The Twonker on Linux:

The following apt command will install all the required libraries:

sudo apt update
sudo apt install g++ clang \
  libasound2-dev libjack-jackd2-dev \
  ladspa-sdk \
  libcurl4-openssl-dev  \
  libfreetype6-dev \
  libx11-dev libxcomposite-dev libxcursor-dev \
  libxcursor-dev libxext-dev libxinerama-dev \
  libxrandr-dev libxrender-dev \
  libwebkit2gtk-4.0-dev \
  libglu1-mesa-dev mesa-common-dev

To build on Linux, change to the following directory before running make:

cd ./JUCE/Builds/LinuxMakefile

The binary is placed under the following directory:

.
└── twonker
    └── JUCE
        └── Builds
            └── LinuxMakefile
                └── build

Release Procedure

Confirm VERSION file (and within JUCE) have same (new) version. Saving the project in JUCE will regenerate the files with the new version.

The following tree shows where the compiled binaries for each of the three platforms must be stored. The build directory will contain the final versions of all three packages along with the source tarball and digital signatures.

.
└── Twonker
    ├── twonker
    │   ├── bin
    │   │   ├── Linux
    │   │   │   └── Twonker.vst3
    │   │   │       └── ...
    │   │   ├── MacOS
    │   │   │   └── Twonker.vst3
    │   │   │       └── ...
    │   │   └── Windows
    │   │       └── Twonker.vst3
    │   └── build

On Windows

On MacOS:

On Linux:

Afterwards:

Keep on keepin' on.
Joe Dirt


Further Reading