How to distribute sketches with libraries to Openframe?

Most libraries are only one jar – but toxiclibs is not one of them, it is something like 13 jars plus other resources. You need to copy the full contents of the toxiclibs/library folder into mysketch/code/ folder. Not the folder itself – the contents, like this:

Mac bash shell script:

#!/usr/bin/env bash
SRCLIB=~/Documents/Processing/libraries/toxiclibs
SRCSKETCH=${SRCLIB}/examples/core/math/AdditiveWaves
SKETCH=~/Desktop/AdditiveWaves

cp -r "${SRCSKETCH}" "${SKETCH}"
mkdir "${SKETCH}/code"
cp -r "${SRCLIB}/library/" "${SKETCH}/code/"

The results from source to destination should look like this:

When you are done, uninstall toxiclibs from PDE, then run the sketch – it works.

You don’t need the examples, reference, or src etc, but you may need anything in the library folder. Note that for most libraries this is just one jar – it is enough to drag-drop its single jar onto the sketch window or manually copy it into the sketch /code folder.