Rack development - setting things up

Hi, I have decided to tip my toe on the plugin development pool and I’m trying to set up my build environment. So far I have managed to build the Fundamental modules and load them into VCV Rack and use them. So far so good!

I’m following the official rack development guide and and this guide from the Medium: https://medium.com/@tonetechnician/how-to-setup-your-windows-vs-code-environment-for-vcv-rack-plugin-development-and-debugging-6e76c5a5f115

I’m using VS Code as my IDE, and I’m trying to set up tasks so that when I build the module, they will be automatically copied into plugin folder. In the guide from the Medium, the author creates two tasks, one for the build/copy, and one for the cleanup. Both works just fine, only problem is that only the ‘.vcvplugin’ plugin file is copied into plugin folder - the actual dll is missing.

I investigated the makefile, that was created by the helper.py, and noticed these two files on tope of the file:

# If RACK_DIR is not defined when calling the Makefile, default to two directories above
RACK_DIR ?= ../..

To make life a bit harder, my plugin folder is located on a non standard location, so I need to somehow specify the location where the files should be copied.

Few questions: what are the directories mentioned in the makefile? And what kind of build tasks you use in VS Code to aid your plugin development?

More questions will be posted when I manage to set-up everything and start the actual development!

-k

It’s fine to just copy the .vcvplugin file that results from running make dist or make install. The plugin.dll is inside it and gets unpacked when Rack runs. These commands will work properly out-of-the-box for your custom user folder when you set the appropriate environment variables.

See Command-Line Usage in the rack manual. The last paragraph is:

You may also set the RACK_SYSTEM_DIR or RACK_USER_DIR environment variables to override these locations.

I used to build from VSCode, but I don’t anymore (only debug). Now I just build from a MINGW64 console (in Windows Terminal). I also have MINGW terminal inside VSCode and sometimes build from there.

I don’t use the SDK. I build/run from a clone of the Rack source, in this setup there’s no need for doing a make install or creating or copying the .vcvplugin to your retail Rack install – it is built in-place and ready to run.

Thank you!

VCV Rack’s plugin.mk supports RACK_USER_DIR, so if the environment variable is set, make install will build, package, and install your plugin in your specified location. RACK_DIR should point to the extracted Rack SDK folder.

Be wary of third-party instructions, as they may be incorrect, misleading, or out of date. If VCV’s instructions aren’t working for you, contact VCV Support so we can assist you or fix our documentation.

1 Like