Compilable custom plugin

Hello, I have implemented MATLAB code into a Brainstorm plugin (by adding it to the bst_plugin.m file) and adding some buttons to the ExtraMenus field. It works perfectly when running directly from MATLAB, but I am now trying to have it included when running the brainstorm compile command.

Compilation mention that there is a missing plugin.mat file, looking at other plugins provided by Brainstorm I seem to understand it is some version of the PlugDesc entry for the plugins, but I am not sure how to obtain it.

What would be the full steps to have a custom plugin included into a compiled version of Brainstorm?
Thank you!

Hello,

This plugin.mat file is automatically created for the installed plugins that are managed by Brainstorm (no custom installation).

Could it be that in the your plugin description (code added to bst_plugin) the field CompiledStatus is not set to 2?

Do you have any troubles compiling Brainstorm without plugins?

Which OS, Matlab version are you using?

Extra info:

Hello, thank you for the prompt response,

The CompiledStatus field is for my plugin set to 2 in the bst_plugin file, as I understood it was neded to have it included when compiling.

When running the brainstorm compile noplugs command, it does compile without problem, and I can execute the resulting brainstorm.jar when extracting the files in the zip output (C:\Users\my-user\.brainstorm\tmp\deploy_240425_090825\bst_bin_R2023b_240425.zip)

As you can deduce from the path above, I am using MATLAB R2023b on Windows 10.

Thank you for taking the time!

Hi @fhardy, I tested the compilation process with a custom plugin that we are developing and it seems to be working fine. The main difference with respect to your setup is that I used Windows10 and R2022b.

This is the modification that was made to Brainstorm to add the plugin:
Add bst-neuromaps plugin by rcassani · Pull Request #702 · brainstorm-tools/brainstorm3 · GitHub
This is the plugin, in case you want to take a look:
GitHub - thuy-n/bst-neuromaps: neuromaps as a Brainstorm plugin!

Could you give a try to that Matlab version?

To be sure that you have the latest brainstorm.jar file:

  1. Delete the file in: brainstorm3/java/brainstorm.jar, and
  2. Start Brainstorm. It will be downloaded automatically