Skip to content

Building the SWS Extension

nofish edited this page Mar 21, 2019 · 17 revisions

Quickstart (TL;DR)

On all systems, pick a dev root and run:

git clone (alternatively: git clone
git clone

On Windows: set REAPER_DIR and/or REAPER64_DIR environment variables to point to your REAPER installation paths. Also generate reaper_plugin_functions.h from REAPER action "[developer] Write C++ API function header", and save to <development root>\sws\reaper\reaper_plugin_functions.h.


The project files are in Visual Studio 2017 format.

The build environment is set up to be portable. All you need to do is set a Windows environment variable REAPER_DIR to the folder where your REAPER 32-bit executable is located. Also set REAPER64_DIR to REAPER x64 if you plan to build/debug in x64.

Make sure to generate the API header file reaper_plugin_functions.h from REAPER too (run the action "[developer] Write C++ API functions header").
When generating header, browse to the SWS code directory and save to the reaper folder.


The project is built using XCode v3.x.6. Pretty standard XCode project. Use Debug mode for debug, release for universal binary build. There's a post-build script setup to copy the dylib from the sws_osx directory to the /Library/Application Support/REAPER/UserPlugins directory by default. There's a command line script to build and create installers in Install/osx_build.command.

Generate the API header file reaper_plugin_functions.h from REAPER (run the action "[developer] Write C++ API functions header") and save to /Applications/reaper_plugin_functions.h.


Now in "beta" (next branch), SWS extension compiles under Linux. You'll need lib-gtk3.0-dev and php.

git clone
git clone
cd sws
git checkout next

Generate the API header file reaper_plugin_functions.h from REAPER (run the action "[developer] Write C++ API functions header") and save to your sws directory.

ln -s `pwd`/ .../REAPER/Plugins


WDL from Cockos needs to be installed on your system.

File structure notes

  • /<development root>/ - A directory of your choosing

  • /<development root>/WDL/ - NEEDED See WDL section above

  • /<development root>/sws/ - Put the content of the source tree here. You can use a different name if you do not plan to build/release the extension ("sws" is required to generate LangPack files).

  • /<development root>/sws/reaper/ - REAPER SDK interface / files. You do not need anything from the SDK since the few files you need are included in the SWS source tree with permission.

  • /<development root>/sws/reaper/reaper_plugin.h - This file is copyright Cockos and is only included here for convenience. The original location of this file is I'll keep this file up to date in the source tree.

  • /<development root>/sws/reaper/sws_rpf_wrapper.h - This file wraps the API functions header (reaper_plugin_functions.h).

  • /<development root>/sws/SnM/ - Code written by Jeffos, actions with S&M in the title.

  • /<development root>/sws/Fingers/ - Code contributed by Fingers, actions with FNG in the title.

  • /<development root>/sws/Breeder/ - Code contributed by Breeder, actions with BR in the title.

  • etc

  • /<development root>/sws/AutoRender/ - Autorending utility, ported from AHK by Shane.

  • /<development root>/sws/Misc/ - General actions written by Tim.

  • /<development root>/sws/ + Color, Console, Freeze, MarkerActions, MarkerList, Snapshots, TrackList - These contain code for the functionality with the same name, written by Tim.

  • /<development root>/sws/Utility/ - General utility classes

Generating Python function wrappers (

To generate the file which contains the SWS Python function wrappers, Perl must be installed. The file is generated automatically during building SWS using the Perl script. This script requires the Perl script (should be detected automatically).

You can’t perform that action at this time.