Skip to content

Conversation

@alxvth
Copy link
Contributor

@alxvth alxvth commented Jun 3, 2025

Add a CMake helper function that handles plugin meta data from a ./PluginConfig.json file.

  • Appends the plugin version to the output file name
  • For Visual Studio, set up the target in the plugin type folder (optional)

Example ./PluginConfig.json, see ManiVaultStudio/Scatterplot#176:

{
    "name" : "Scatterplot View",
    "version" :  {
        "plugin" : "1.0.0",
        "core" : ["1.3"]
    },
    "type" : "Viewer",
    "dependencies" : ["Points"]
}

The fields name, version::plugin are required for the new mv_handle_plugin_config helper function. type is optional. dependencies is used in the core IIRC. version::core is so far unused but informative and might be used in the future.

@alxvth alxvth requested a review from ThomasKroes June 3, 2025 09:41
@alxvth alxvth marked this pull request as draft June 3, 2025 09:41
@alxvth
Copy link
Contributor Author

alxvth commented Jun 3, 2025

It works with both DevBundle and stand-alone (find_package)

@alxvth alxvth marked this pull request as ready for review June 3, 2025 10:17
@alxvth alxvth merged commit 8260368 into master Jun 4, 2025
10 checks passed
@alxvth alxvth deleted the feature/PluginConfigFile branch June 4, 2025 12:03
ThomasKroes added a commit that referenced this pull request Jul 1, 2025
* Update VERSION

* Set icon when the action changes (#839) (#840)

* Rebase from master (#858)

* Set icon when the action changes (#839)

* Selection group dialog in data hierarchy context menu (#841)

* Selection group dialog in Data hierarchy context menu

* Automatically enable selection grouping

* Change window icon

---------

Co-authored-by: Thomas Kroes <t.kroes@lumc.nl>

* Check if all actions is empty (#844)

* update quazip (#835)

* Fix rectangle connections (#846)

* fix signals on connected rectangles

* Add option to prefer initial floating for view plugins (#847)

* Add prefer floating option in view plugin factory

* Make tutorial plugin prefer floating initially

* Refactor

* Respect the start floating property during creation of view plugin

* Initialize with the correct color scheme (#849)

* Serialize EventManager, SelectionGroup and BiMap

* Fix broken tutorial plugin (#852)

* Tutorial plugin shows HTML content properly again

* Style improvement

* Do not show the installation tutorial

* Fixed refactor typo (#854)

* Fix icon warning

* Show only loadable tutorials (for which the reu) (#856)

* Check tutorial plugin requirements prior to adding a tutorial to the model

* Small style improvement

* Increment application version to 1.3 (#857)

---------

Co-authored-by: Alexander Vieth <a.vieth@tudelft.nl>
Co-authored-by: Julian Thijssen <julianthijssen@gmail.com>

* Revert point renderer changes

* Make BiMap::getKeysByValues error messages more informative and faster

* Don't try to paint until PixelSelectionTool pixmaps have been created

Prevents spam in the console about QPainter not being active

* Fix programmatic error in shader error logging, and make it more informative

* Update build.yml

* Update build.yml

[skip ci]

* Fix sentry CI build on Windows (#878)

* Test cmake types

* Move most sentry cmake bits to one if clause

* Remove workaroud for MSVC 2019 (we require 2022 now)

* We might need this earlier

* No need to specify this

* Use of Sentry on MacOS breaks the build so turn it off for now...

* Also fix Sentry on MacOS in other locations....

* Squashed commit of the following:

commit e78bfc9
Author: Alexander Vieth <a.vieth@tudelft.nl>
Date:   Wed Apr 16 15:17:55 2025 +0200

    Disable sentry on CI on Mac & Install additional dependency licences (#882)

    * Disable sentry in conanfile on mac

    * Fix ads target name

    * Conditionally add sentry libraries on mac

    * Install sentry and crashpad licences

    * Single dependency licences command

commit 42bf1fa
Author: Thomas Kroes <tkroes81@gmail.com>
Date:   Wed Apr 16 10:33:05 2025 +0200

    Also fix Sentry on MacOS in other locations....

commit d27f17b
Merge: 7d4dc1c ecf24d7
Author: Thomas Kroes <tkroes81@gmail.com>
Date:   Wed Apr 16 10:25:50 2025 +0200

    Merge branch 'master' of https://github.com/ManiVaultStudio/core

commit 7d4dc1c
Author: Thomas Kroes <tkroes81@gmail.com>
Date:   Wed Apr 16 10:25:38 2025 +0200

    Use of Sentry on MacOS breaks the build so turn it off for now...

commit ecf24d7
Author: Alexander Vieth <a.vieth@tudelft.nl>
Date:   Wed Apr 16 10:21:58 2025 +0200

    Fix sentry CI build on Windows (#878)

    * Test cmake types

    * Move most sentry cmake bits to one if clause

    * Remove workaroud for MSVC 2019 (we require 2022 now)

    * We might need this earlier

    * No need to specify this

* Rebase from master (#884)

* Fix sentry CI build on Windows (#878)

* Test cmake types

* Move most sentry cmake bits to one if clause

* Remove workaroud for MSVC 2019 (we require 2022 now)

* We might need this earlier

* No need to specify this

* Use of Sentry on MacOS breaks the build so turn it off for now...

* Also fix Sentry on MacOS in other locations....

* Disable sentry on CI on Mac & Install additional dependency licences (#882)

* Disable sentry in conanfile on mac

* Fix ads target name

* Conditionally add sentry libraries on mac

* Install sentry and crashpad licences

* Single dependency licences command

* Hide project database section

---------

Co-authored-by: Alexander Vieth <a.vieth@tudelft.nl>

* Add cmake function to handle plugin meta data (#911)

* Plugin config file handling: optionally disable folder placement (#912)

* Optionally disable folder placement

* Add documentation comment

* Handle both old single plugin version and nested versions (#914)

* Make nlohmann_json_VERSION available for nlohmann_json_schema_validator

* Remove non-existent option

* Remove global option

* Use targets directly

* Sort target in folder

* Fix debug build

* Use ALIAS target

* Defer resolving project database DSNs

* JSON_VALIDATOR_SHARED_LIBS

* Allow toggling the start page project database (#932)

* Revert nlohmann_json_schema_validator::validator suffix

* INTERFACE and PUBLIC

* Revert INTERFACE and PUBLIC

* Hide schema validation implementation

* Cache the dataset data type (#934)

* Turn compile acceleration options OFF for build releases (#928)

* Turn on build accelerations for build releases

* Fix debug crash

* Make tags filter higher

* Update tutorials.schema.json

* Use current core as parent for PluginFactory's base class  (#920)

* The vertex shader line vPosOrig = position; got lost in translation, added it back in and fixed a documentation typo (#923)

* Turn `MV_USE_ERROR_LOGGING` ON only on CI (#921)

* New cmake default: MV_USE_ERROR_LOGGING OFF

* CI: Turn MV_USE_ERROR_LOGGING ON

* Fix version display without suffix and on linuc with gcc (#919)

* Fix conversion with gcc

* Add version concatenation helper function

* Only append suffix if it exists

* Add getters for selection groups

* Add scripting manager and scripting UI (#915)

* Add scripting manager header file

* Added scripting manager implementation skeleton code

* Add script utility

* Added scripts models skeleton code

* Basic implementation of a script class

* Implemented basic abstract scripts model

* Finish draft version of scripting-related (filter) models

* Add script trigger action

* Add routines to get script trigger actions in the plugin and plugin factory base classes

* First working version

* Add Python-specific script

* Remove data prefix from script type enum and replace QUrl with QString in script location

* Also change QUrl in python script class

* Return QString for the location in stead of QUrl

* Fix abstract scripts model

* Remove debug defines

* Add missing headers

* Fix debug build

* No dependency on point data

* Script type name should be the same as Enum name

* Add datatypes member to script and overload constructors

* Add setter and complete getter

* Add doc string also to PluginFactory

* Remove out-commented include

* Remove PythonScript

---------

Co-authored-by: Alexander Vieth <vieth.alexander@gmx.net>
Co-authored-by: Alexander Vieth <a.vieth@tudelft.nl>

* Supports redirects in the file downloader (#927)

- Extract the file name from the HTTP response header

* Defer resolving project database DSNs

* Allow toggling the start page project database (#932)

* Cache the dataset data type (#934)

* Turn compile acceleration options OFF for build releases (#928)

* Turn on build accelerations for build releases

* Fix debug crash

* Make tags filter higher

* Fix includes

* Fix include

* Fix includes for release CI builds (#940)

* Batch 1

* Batch 2

* Batch 3

* Batch 4

* Batch 5

* Batch 6

* Fix includes for release CI builds (#940)

* Batch 1

* Batch 2

* Batch 3

* Batch 4

* Batch 5

* Batch 6

* Add zoom factor value change guards (#944)

* Update VERSION

* Adhere mean-shift to renderer upgrades

* Revert "Adhere mean-shift to renderer upgrades"

This reverts commit dfd9593.

* Restore previous mean-shift vertex shader and add resolution getter (#946)

* Addendum to #946

* Mark Markdown classes as export (#951)

* Changing to another JSON schema validator lib (part 1)

* Changing to another JSON schema validator lib (part 2)

* Change case in projects json schema

---------

Co-authored-by: Alexander Vieth <a.vieth@tudelft.nl>
Co-authored-by: Julian Thijssen <julianthijssen@gmail.com>
Co-authored-by: Alexander Vieth <vieth.alexander@gmx.net>
ThomasKroes added a commit that referenced this pull request Jul 1, 2025
* Add nlohmann with CPM

* Add nlohmann schema validator with CPM

* Remove 'v' prefix from validator tag

* Trying out the JSON schema validation

* Add JSON schemas for tutorials and project and added JSON utils

* Work on the tutorials schema validation

* Schema validation is working nicely with tutorials

- Added some helper functions for pretty printing to the console

* Less stringent tutorials JSON schema

* Work on JSON schema validation for downloadable projects

* Clean up printing formatting and add public schema location in error logging (for debugging purposes)

* Add videos schema file to reasources

* Videos JSON schema validation is working

* Attempt to solve CI issue (related to nlohmann install)

* Attempt to solve CI issue (related to nlohmann install), part 2

* Attempt to solve CI issue (related to nlohmann install), part 3

* Attempt to solve CI issue (related to nlohmann install), part 4

* Attempt to solve CI issue (related to nlohmann install), part 5

* Fix projects schema validation

* Attempt to solve nhlohmann export issue with shim approach (attempt 1)

* Validate downloaded JSON content test merge (#952)

* Update VERSION

* Set icon when the action changes (#839) (#840)

* Rebase from master (#858)

* Set icon when the action changes (#839)

* Selection group dialog in data hierarchy context menu (#841)

* Selection group dialog in Data hierarchy context menu

* Automatically enable selection grouping

* Change window icon

---------

Co-authored-by: Thomas Kroes <t.kroes@lumc.nl>

* Check if all actions is empty (#844)

* update quazip (#835)

* Fix rectangle connections (#846)

* fix signals on connected rectangles

* Add option to prefer initial floating for view plugins (#847)

* Add prefer floating option in view plugin factory

* Make tutorial plugin prefer floating initially

* Refactor

* Respect the start floating property during creation of view plugin

* Initialize with the correct color scheme (#849)

* Serialize EventManager, SelectionGroup and BiMap

* Fix broken tutorial plugin (#852)

* Tutorial plugin shows HTML content properly again

* Style improvement

* Do not show the installation tutorial

* Fixed refactor typo (#854)

* Fix icon warning

* Show only loadable tutorials (for which the reu) (#856)

* Check tutorial plugin requirements prior to adding a tutorial to the model

* Small style improvement

* Increment application version to 1.3 (#857)

---------

Co-authored-by: Alexander Vieth <a.vieth@tudelft.nl>
Co-authored-by: Julian Thijssen <julianthijssen@gmail.com>

* Revert point renderer changes

* Make BiMap::getKeysByValues error messages more informative and faster

* Don't try to paint until PixelSelectionTool pixmaps have been created

Prevents spam in the console about QPainter not being active

* Fix programmatic error in shader error logging, and make it more informative

* Update build.yml

* Update build.yml

[skip ci]

* Fix sentry CI build on Windows (#878)

* Test cmake types

* Move most sentry cmake bits to one if clause

* Remove workaroud for MSVC 2019 (we require 2022 now)

* We might need this earlier

* No need to specify this

* Use of Sentry on MacOS breaks the build so turn it off for now...

* Also fix Sentry on MacOS in other locations....

* Squashed commit of the following:

commit e78bfc9
Author: Alexander Vieth <a.vieth@tudelft.nl>
Date:   Wed Apr 16 15:17:55 2025 +0200

    Disable sentry on CI on Mac & Install additional dependency licences (#882)

    * Disable sentry in conanfile on mac

    * Fix ads target name

    * Conditionally add sentry libraries on mac

    * Install sentry and crashpad licences

    * Single dependency licences command

commit 42bf1fa
Author: Thomas Kroes <tkroes81@gmail.com>
Date:   Wed Apr 16 10:33:05 2025 +0200

    Also fix Sentry on MacOS in other locations....

commit d27f17b
Merge: 7d4dc1c ecf24d7
Author: Thomas Kroes <tkroes81@gmail.com>
Date:   Wed Apr 16 10:25:50 2025 +0200

    Merge branch 'master' of https://github.com/ManiVaultStudio/core

commit 7d4dc1c
Author: Thomas Kroes <tkroes81@gmail.com>
Date:   Wed Apr 16 10:25:38 2025 +0200

    Use of Sentry on MacOS breaks the build so turn it off for now...

commit ecf24d7
Author: Alexander Vieth <a.vieth@tudelft.nl>
Date:   Wed Apr 16 10:21:58 2025 +0200

    Fix sentry CI build on Windows (#878)

    * Test cmake types

    * Move most sentry cmake bits to one if clause

    * Remove workaroud for MSVC 2019 (we require 2022 now)

    * We might need this earlier

    * No need to specify this

* Rebase from master (#884)

* Fix sentry CI build on Windows (#878)

* Test cmake types

* Move most sentry cmake bits to one if clause

* Remove workaroud for MSVC 2019 (we require 2022 now)

* We might need this earlier

* No need to specify this

* Use of Sentry on MacOS breaks the build so turn it off for now...

* Also fix Sentry on MacOS in other locations....

* Disable sentry on CI on Mac & Install additional dependency licences (#882)

* Disable sentry in conanfile on mac

* Fix ads target name

* Conditionally add sentry libraries on mac

* Install sentry and crashpad licences

* Single dependency licences command

* Hide project database section

---------

Co-authored-by: Alexander Vieth <a.vieth@tudelft.nl>

* Add cmake function to handle plugin meta data (#911)

* Plugin config file handling: optionally disable folder placement (#912)

* Optionally disable folder placement

* Add documentation comment

* Handle both old single plugin version and nested versions (#914)

* Make nlohmann_json_VERSION available for nlohmann_json_schema_validator

* Remove non-existent option

* Remove global option

* Use targets directly

* Sort target in folder

* Fix debug build

* Use ALIAS target

* Defer resolving project database DSNs

* JSON_VALIDATOR_SHARED_LIBS

* Allow toggling the start page project database (#932)

* Revert nlohmann_json_schema_validator::validator suffix

* INTERFACE and PUBLIC

* Revert INTERFACE and PUBLIC

* Hide schema validation implementation

* Cache the dataset data type (#934)

* Turn compile acceleration options OFF for build releases (#928)

* Turn on build accelerations for build releases

* Fix debug crash

* Make tags filter higher

* Update tutorials.schema.json

* Use current core as parent for PluginFactory's base class  (#920)

* The vertex shader line vPosOrig = position; got lost in translation, added it back in and fixed a documentation typo (#923)

* Turn `MV_USE_ERROR_LOGGING` ON only on CI (#921)

* New cmake default: MV_USE_ERROR_LOGGING OFF

* CI: Turn MV_USE_ERROR_LOGGING ON

* Fix version display without suffix and on linuc with gcc (#919)

* Fix conversion with gcc

* Add version concatenation helper function

* Only append suffix if it exists

* Add getters for selection groups

* Add scripting manager and scripting UI (#915)

* Add scripting manager header file

* Added scripting manager implementation skeleton code

* Add script utility

* Added scripts models skeleton code

* Basic implementation of a script class

* Implemented basic abstract scripts model

* Finish draft version of scripting-related (filter) models

* Add script trigger action

* Add routines to get script trigger actions in the plugin and plugin factory base classes

* First working version

* Add Python-specific script

* Remove data prefix from script type enum and replace QUrl with QString in script location

* Also change QUrl in python script class

* Return QString for the location in stead of QUrl

* Fix abstract scripts model

* Remove debug defines

* Add missing headers

* Fix debug build

* No dependency on point data

* Script type name should be the same as Enum name

* Add datatypes member to script and overload constructors

* Add setter and complete getter

* Add doc string also to PluginFactory

* Remove out-commented include

* Remove PythonScript

---------

Co-authored-by: Alexander Vieth <vieth.alexander@gmx.net>
Co-authored-by: Alexander Vieth <a.vieth@tudelft.nl>

* Supports redirects in the file downloader (#927)

- Extract the file name from the HTTP response header

* Defer resolving project database DSNs

* Allow toggling the start page project database (#932)

* Cache the dataset data type (#934)

* Turn compile acceleration options OFF for build releases (#928)

* Turn on build accelerations for build releases

* Fix debug crash

* Make tags filter higher

* Fix includes

* Fix include

* Fix includes for release CI builds (#940)

* Batch 1

* Batch 2

* Batch 3

* Batch 4

* Batch 5

* Batch 6

* Fix includes for release CI builds (#940)

* Batch 1

* Batch 2

* Batch 3

* Batch 4

* Batch 5

* Batch 6

* Add zoom factor value change guards (#944)

* Update VERSION

* Adhere mean-shift to renderer upgrades

* Revert "Adhere mean-shift to renderer upgrades"

This reverts commit dfd9593.

* Restore previous mean-shift vertex shader and add resolution getter (#946)

* Addendum to #946

* Mark Markdown classes as export (#951)

* Changing to another JSON schema validator lib (part 1)

* Changing to another JSON schema validator lib (part 2)

* Change case in projects json schema

---------

Co-authored-by: Alexander Vieth <a.vieth@tudelft.nl>
Co-authored-by: Julian Thijssen <julianthijssen@gmail.com>
Co-authored-by: Alexander Vieth <vieth.alexander@gmx.net>

* Last fix

---------

Co-authored-by: Alexander Vieth <a.vieth@tudelft.nl>
Co-authored-by: Julian Thijssen <julianthijssen@gmail.com>
Co-authored-by: Alexander Vieth <vieth.alexander@gmx.net>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants