How does ParaView get the macros and filters in the source code

I am trying to make a custom application with Qt that is similar to ParaView but removing many things and adding others.
I’ve been playing with https://gitlab.kitware.com/paraview/paraview/tree/master/Examples/CustomApplications/Clone1

And I would like this custom application to come with some macros and a couple of custom filters that I made since installation.

Where does ParaView get the macros and filters and where is it in the code?

Thank you!
Any help on where is a good place to start is welcome!

Macros are added in custom applications the same way as in ParaView, through the Macros menu.
Filters are added in custom application the same way as they are added ParaView, through Plugins, but you can load them statically, see here : https://kitware.github.io/paraview-docs/latest/cxx/PluginHowto.html : Plugins in Static Applications

Okay, it looks like I can do it with the filters but I also hoped my clients didn’t have to load 10 macros when they installed the program for the first time.

It’s not possible with the macros?

You can automatically install the macros in the right directory so they are loaded automatically, but it is already the case with ParaView.

I’m sorry I don’t understand.

I would to avoid going to the Macros menu > Add new macro and search the macro for every macro that I have.

Are you saying that there is a directory that I can put my macros and avoid the “Add new macro” part?

Any idea what this directory is or where can I get the information?

Thanks!

Yes, there is directories :

%CONFIG%/ParaView/Macros
%PARAVIEW_EXECUTABLE_DIR%/Macros
%PARAVIEW_EXECUTABLE_DIR%/../Macros

I have discovered that if I put the macros in /Users/user/.config/ParaView/Macros and open the ParaView installation, I see them in the toolbar.

But if I open the build of Clone1, they are not there. Therefore, I suppose the Clone1 build takes macros from another place.

Any idea where?

I also tried to find the other paths

%PARAVIEW_EXECUTABLE_DIR%/Macros
%PARAVIEW_EXECUTABLE_DIR%/ .. /Macros

But I did not find them anywhere.

Remplace ApplicationName by your application name defined in your CMakeLists.txt

That worked! Thanks!