Local development of plugins

Hi everyone.

To make local plugin development easier, we added an environment setup file in mod-plugin-builder.
Also added a small section on the wiki to explain what’s going on: http://wiki.moddevices.com/wiki/How_To_Build_and_Deploy_LV2_Plugin_to_MOD_Duo#Local_development

Quoting here:

For local development of plugins using buildroot can be bothersome and confusing.
You can use the cross-compiler and toolchain directly instead of going through buildroot methods.
Note that this expects that your source code build system is cross-compile friendly (ie, no hardcoded compiler and paths and uses pkg-config to find extra libraries).
Also this only works on a real Linux system, without using docker.

The setup is as simple as: (adjust as needed)

$. ~/mod-plugin-builder/local.env
$ make

The local.env file will setup your Linux compiler environment variables (such as CC, CXX, CFLAGS, etc) to use mod-plugin-builder files.
If everything goes well, the resulting binaries will be ARMv7, MOD Duo compatible.

The magic happens on this file: https://github.com/moddevices/mod-plugin-builder/blob/master/local.env

For those used to Linux and development, this should look straight forward.
At least it does to me :stuck_out_tongue:

Let me know if it works for you, questions welcome.

3 Likes

This is . .
awesome. :smiley:

works great here. I must admit that I’m to lazy to do a fresh checkout of the mod-builder, so I’ve copied just the env file into my home folder and sourced it into my bash:
source '/home/brummer/local.env'
Then I run my usual build (make) command for my plug. E voila, I receive a
ELF 32-bit LSB shared object, ARM, EABI5 version 1 (SYSV), dynamically linked, not stripped
library which I could deploy on my MOD.
That really speed up development/testing circles for me.
Many thanks.

fantastic… can’t wait to test… :smiley:
but this week is too busy… :frowning:

Thanks for the confirmation!

And by the way, a quick example plugin is available inside mod-plugin-builder in plugins/package/eg-amp-lv2/source/, which works with this cross-compilation setup.
See https://github.com/moddevices/mod-plugin-builder/tree/master/plugins/package/eg-amp-lv2/source

Building this example plugin is as simple as:

. ~/mod-plugin-builder/local.env
make -C ~/mod-plugin-builder/plugins/package/eg-amp-lv2/source

That’s it! After this the eg-amp.lv2 bundle is ready to be deployed into a MOD unit.

That’s awesome, thanks for setting that up. It should make things a bit quicker.