Building uGens on Windows

For those begging in this journey, these are the steps:

(When installing below make sure that you add CMake and GIT to your system PATH for your user)

Download and install CMake
Download and install GIT

Create a desktop folder called MyUgens

Open terminal and type

cd C:\Users\YourUserName\Desktop\MyUgens

Now you will download the folder with example plugins and the SuperCollider’s source code (which will provide an API and components for your homemade building process)

git clone --recursive https://github.com/supercollider/example-plugins.git
git clone --recursive https://github.com/supercollider/supercollider.git

Move to the directory of the plugin that you want to compile:

cd C:\Users\YourUserName\Desktop\MyUgens\example-plugins\01a-BoringMixer

Create a build folder and move to there:

mkdir build
cd build

Set the flags for cmake Modify the user name to access SC’s source code folder :

cmake -A x64 -DSC_PATH=C:\Users\YourUserName\Desktop\MyUgens\SuperCollider ..

More cmake options:
cmake -DCMAKE_BUILD_TYPE=DEBUG ..

Compile:
cmake --build . --config Release

This will output a .scx file at C:\Users\YourUserName\Desktop\MyUgens\example-plugins\01a-BoringMixer\build\Release

Now you need to copy 01a-BoringMixer.sc, 01a-BoringMixer.scx and 01a-BoringMixer.schelp into a folder
of your Platform.userExtesionDir, which is generally:

C:\Users\YourUserName\AppData\Local\SuperCollider\Extensions

Go to SuperCollider, recompile the class library, boot the server and test your UGen

2 Likes