Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
ThomasKroes committed Oct 14, 2023
2 parents 5d6b103 + 21518b0 commit 57292c4
Showing 1 changed file with 25 additions and 12 deletions.
37 changes: 25 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# ManiVault Example Plugins
<sub>(ManiVault version 0.9)</sub>

[ManiVault](https://github.com/ManiVaultStudio/Core) can currently be extended by six types of plugins, each dedicated to a specific functionality. Here, you can find exemplary implementations for each plugins type that can be used as a starting point for new plugins:
- [Analysis](https://github.com/ManiVaultStudio/ExamplePlugins/tree/master/ExampleAnalysis): general analytics methods, e.g., dimensionality reduction
Expand All @@ -8,7 +9,7 @@
- [View](https://github.com/ManiVaultStudio/ExamplePlugins/tree/master/ExampleView): visualize data and provide interaction, e.g., using [OpenGL](https://github.com/ManiVaultStudio/ExamplePlugins/tree/master/ExampleViewOpenGL) or [JavaScript](https://github.com/ManiVaultStudio/ExamplePlugins/tree/master/ExampleViewJS) backends

## Requirements
* ManiVault (https://github.com/ManiVaultStudio/Core)
* ManiVault Studio (https://github.com/ManiVaultStudio/Core)
* CMake 3.17+ (https://cmake.org/)
* Qt 6.3.1+ (https://www.qt.io/download), additional libraries: Qt WebEngine, Qt WebChannel, Qt Positioning and the Qt5 Compatibility Module
* A C++17 compatible compiler
Expand All @@ -20,24 +21,36 @@ Be sure to first have ManiVault installed before continuing to download this rep
```
git clone https://github.com/ManiVaultStudio/ExamplePlugins.git
```
After unzipping the download file or navigating to the cloned folder, continue with the next step.
With SSH this would be:
```
git clone git@github.com:ManiVaultStudio/ExamplePlugins.git
```
After unzipping you should have an `ExamplePlugins-master`, after cloning you should have an `ExamplePlugins` folder, after navigating to this folder, continue with the next step.

## Project setup
You'll need to define a `MV_INSTALL_DIR` variable and provide it to CMake, as described in the ManiVault install guide. This variable is used to find your local ManiVault installation and defines an install location for the example plugins.

For Windows, using the CMake GUI:
1. Launch CMake (available here: https://cmake.org/)
2. In the source code field browse to the `ExamplePlugins-master` folder (which contains CMakeLists.txt).
3. In the build field browse to the `ExamplePlugins-master/build` folder. It will create it if it doesn't exist.
4. Press `Configure` and select the `Visual Studio 15 2019` (or 16 2022) generator with the optional platform of `x64`. If it is not available, be sure to install Visual Studio. Press Finish to configure the project.
5. A lot of red paths should now appear. Check that the ones pointing to Qt directories seem correct and then press `Generate` to generate the Visual Studio solution.
6. Press `Open Project` to launch Visual Studio and the example project.
2. In the source code field browse to the `ExamplePlugins-master` or `ExamplePlugins` folder (which contains CMakeLists.txt).
3. In the build field browse to the `ExamplePlugins-master/build` or `ExamplePlugins/build` folder. It will create it if it doesn't exist.

The source and build fields in your cmake should now roughly look like this:

`Source: C:/YourOwnFolder/ExamplePlugins-master`
`Build: C:/YourOwnFolder/ExamplePlugins-master/build`

4. Press `Configure` and select the `Visual Studio 15 2019` (or 17 2022) generator with the optional platform of `x64`. If it is not available, be sure to install Visual Studio. Press Finish to configure the project.
5. CMake should now ask you to provide an `MV_INSTALL_DIR` path that points to where ManiVault is installed. Double click the `MV_INSTALL_DIR` variable and press the small button on the right to browse to the folder where ManiVault Studio is installed. (The folder containing either or both the Debug and Release folder).
![image](https://github.com/ManiVaultStudio/ExamplePlugins/assets/2978176/8f082e77-d90d-45fb-bc0d-e0b8a5a634f3)

6. A lot of red paths should now appear. Check that the ones pointing to Qt directories seem correct and then press `Generate` to generate the Visual Studio solution. If it is asking you for a Qt6_DIR please refer to [CMake cannot find my Qt Installation](https://github.com/ManiVaultStudio/PublicWiki/wiki/FAQ#cmake-cannot-find-my-qt-installation).
7. Press `Open Project` to launch Visual Studio and the example project.

## Compiling
For Windows:
1. At the top of Visual Studio set the build mode (where it says `Debug`) to `Release`.
2. Right click the project `ExamplePlugins` in the Solution Explorer and select Set as StartUp Project.
3. Right click the project again and select Properties.
4. In the Configuration Properties -> Debugging set the `Command` by browsing to your `HDPS.exe` file. Set the `Working Directory` field by browsing to the folder containing the `HDPS.exe` file.
5. Press Apply and OK and right click the project in the Solution Explorer and press Build.
6. If all is well the build should succeed and if you run the project with Ctrl+F5 it will launch `HDPS.exe` and load the Example project as an available plug-in.
2. Right click the project `ALL_BUILD` in the Solution Explorer and select Properties.
3. In the Configuration Properties -> Debugging set the `Command` by browsing to your `ManiVault Studio.exe` file. Set the `Working Directory` field by browsing to the folder containing the `ManiVault Studio.exe` file.
4. Press Apply and OK and right click the project in the Solution Explorer and press Build.
5. If all is well the build should succeed and if you run the project with Ctrl+F5 it will launch `ManiVault Studio.exe` and load the Example project as an available plug-in.

0 comments on commit 57292c4

Please sign in to comment.