On Windows, Rack by default sets the user dir to the special “Documents” folder – the path returned by SHGetFolderPathW(NULL, CSIDL_MYDOCUMENTS…)
.
When OneDrive is active on the user’s machine, the documents folder returned by that call is $(OneDrive)/Documents/Rack2
. The problem is that plugin.mk doesn’t follow the special folder path. It copies to $(USERPROFILE)/Documents/Rack
(the documents folder when OneDrive is not active).
This folder doesn’t work. When Rack is run, the “installed” plugin is not found, which and causes headaches for new plugin authors.
To fix this, I’ve changed Rack/plugin.mk as follows (in the if-win block stating at line 46), which works for me on Win11 with OneDrive:
ifdef ARCH_WIN
TARGET := $(TARGET).dll
LDFLAGS += -static-libstdc++
ifdef OneDrive
RACK_USER_DIR ?= $(OneDrive)/Documents/Rack2
else
RACK_USER_DIR ?= $(USERPROFILE)/Documents/Rack2
endif
endif
Now that I have a fixed plugin.mk, I reported the issue to VCV Rack support and provided my fix. Hopefully, they’ll fix this for new plugin authors in the next Rack/SDK release.
Meanwhile, if you’re developing on Windows with OneDrive active (and you haven’t already redirected the user folder using the RACK_USER_DIR environment variable), then making this change in Rack/plugin.mk
will be a convenience for you.