plugin `make install` copies to non-working folder with OneDrive on Windows [fix]

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 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/ 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
        RACK_USER_DIR ?= $(USERPROFILE)/Documents/Rack2

Now that I have a fixed, 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/ will be a convenience for you.


Isn’t OneDrive causing other problems, like Rack not working right if your Documents folder is on OneDrive.

I haven’t seen anything definitive that establishes that, only speculation.

My personal experience on Windows 11 with Rack running with the Rack user dir on OneDrive has been no issues at all, other than the one in this thread, which is a Rack bug.

1 Like