BuildForWindows_EN - CCSEPBVR/CS-IS-PBVR GitHub Wiki

Building in Windows environment

CS/IS-PBVR is implemented in C++, and can be built by switching between the sequential processing version, the OpenMP version for thread parallel processing, and the MPI + OpenMP version for massively parallel processing by setting it in the config file. The client program is implemented in C++, Qt and OpenGL.

Clone source code

Clone using git command as follows.

git clone https://github.com/CCSEPBVR/CS-IS-PBVR.git
cd CS-IS-PBVR
git checkout release/vX.X.X

Building the server, filter, and KVSML converter

Among the source code packages cloned to any directory, the CS-IS-PBVR/CS_Server/ directory is compiled by the following pbvr.conf and Makefile. Configure make with the pbvr.conf file, build the filter and server program. The structure of the CS-IS-PBVR/CS_server/ directory is as follows:

CS-IS-PBVR
└── CS_server
    β”œβ”€β”€ main.cpp
    β”œβ”€β”€ Makefile *2     - Compile the source code under the CS_server
    β”œβ”€β”€ pbvr.conf *2    - make configuration file
    β”œβ”€β”€ pbvr.sln
    β”œβ”€β”€ pbvr.v12.suo
    β”œβ”€β”€ Common          - Protocols, Communications, Common Libraries
    β”œβ”€β”€ Filter          - Filter program
    β”œβ”€β”€ FunctionParser  - Math Processing Library
    β”œβ”€β”€ arch            - Compiler configuration file for each environment
    β”œβ”€β”€ VisModule       - Integrated Visualization Library KVS*1 and Server program
    β”œβ”€β”€ KVSMLConverter  - KVSML Converter

*1. This KVS is not used in the client program, and this KVS is a proprietary version specialized for parallel visualization processing on the server.
*2. In the Windows environment, the solution file pbvr.sln for Visual Studio is used instead of Makefile and pbvr.conf.

Specify the function to be installed by changing the input value of the variable in pbvr.conf.
The list of variables in pbvr.conf is shown below.

Variables Input Values Description
PBVR_MACHINE String Compilation configuration files under arch/
PBVR_MAKE_FILTER 0 or 1 Is there support for filters?
PBVR_MAKE_SERVER 0 or 1 Server Support
PBVR_MAKE_KVSML_CONVERTER 0 or 1 Is there support for KVSML Converter?
PBVR_SUPPORT_VTK 0 or 1 VTK Support (Filter Only)

In the variable PBVR_MACHINE, specify the configuration file of MakeFile stored under the arch/ directory according to the compilation environment.

File Name Description
Makefile_machine_gcc Configuring Sequential Compilation with gcc
Makefile_machine_gcc_omp Configuring OpenMP version compilation with gcc
Makefile_machine_gcc_mpi_omp Configuring MPI+OpenMP Compilation with gcc
Makefile_machine_intel Configuring Intel Sequential Compilation
Makefile_machine_intel_omp Configuring OpenMP compilation by intel
Makefile_machine_intel_mpi_omp Configuring MPI+OpenMP Compilation by Intel
Makefile_machine_s86_mpi_omp Compile settings on JAEA large computer
Using Intel Compiler and mpt Library
Makefile_machine_fugaku_clang Configuring Compilation in ARM Clang Mode
Makefile_machine_fugaku_trad Configuring Compilation in Fugaku (ARM) trad Mode

Building the server and filter

Execute the pbvr.sln under the 1. CS-IS-PBVR/CS_server directory and start MSVC.

  1. If you want to generate a program parallelized by OpenMP, enable OpenMP support in the following project files.

    • Common
    • Filter
    • FunctionParser
    • KVSMLConverter
    • VisModule

    An example of enabling OpenMP support in the VisModule project file is shown below.

    1. Right-click on VisModule. Local Image

    2. Select a property. Local Image

    3. C/C++ - Enable OpenMP support from > languages to Yes (/openmp). Local Image

  2. Make sure your build configuration is Release x64. Local Image

  3. Build - Select Build > Solution to start the build. Local Image

  4. After the build is completed, make sure that the executable module of pbvr_filter.exe (filter) and pbvr_server.exe (server) is generated under CS-IS-PBVR\CS_server\x64\Release.

Building a server with an extended data format

The server program supports only volume data in the original KVSML format,
but data formats can be extended by using the KVS and VTK libraries.

KVS and VTK are assumed to be pre-installed.
For the installation method, refer to each library repository.

The following settings must be made in ccmake when installing VTK.

  1. Turn on the BUILD_SHARED_LIBS option.
  2. Set the CMAKE_BUILD_TYPE option to "Release".
  3. Set the CMAKE_INSTALL_PREFIX to the location where you want to install VTK.

1.The settings required for the VTK filter are shown below.

Variables Value
KVS_DIR d:\environments\KVS\install
VTK_VERSION n.n
VTK_LIB_PATH d:\environments\VTK\lib
VTK_INCLUDE_PATH d:\environments\VTK\include\vtk-n.n
PATH d:\environments\VTK\bin

Here, enter the version of VTK to be used in n.n, and rewrite the path according to the installation environment of the VTK library.

2.Execute the pbvr.sln under the 1. CS-IS-PBVR/CS_server directory and start MSVC.
3.Right-click on the project VisModule_vtk and select Build.
4.After the build is completed, make sure that the executable module of pbvr_server.exe is generated under CS-IS-PBVR\CS_server\x64\Release.

Filter build for VTK

VTK 6.0 or later is required to build a filter for VTK. For information on installing the VTK library, refer to the VTK website. Also, when installing, perform the following settings in CMake-gui.

  1. Turn on the BUILD_SHARED_LIBS option.
  2. Set the CMAKE_BUILD_TYPE option to "Release".
  3. Set the CMAKE_INSTALL_PREFIX to the location where you want to install VTK.

Set the following environment variables:

Variables Value
VTK_VERSION n.n
VTK_LIB_PATH d:\environments\VTK\lib
VTK_INCLUDE_PATH d:\environments\VTK\include\vtk-n.n

Here, enter the version of VTK to be used in n.n, and rewrite the path according to the installation environment of the VTK library.

Building KVSML Converter

KVS and VTK are assumed to be pre-installed.
For the installation method, refer to each library repository.

The following settings must be made in CMake-gui when installing VTK.

  • Turn on the BUILD_SHARED_LIBS option.
  • Set the CMAKE_BUILD_TYPE option to "Release".
  • Set the CMAKE_INSTALL_PREFIX to the location where you want to install VTK.

1.Set the following environment variables

Variables Value
KVS_DIR d:\environments\KVS\install
VTK_VERSION n.n
VTK_LIB_PATH d:\environments\VTK\lib
VTK_INCLUDE_PATH d:\environments\VTK\include\vtk-n.n
PATH d:\environments\VTK\bin

Here, enter the version of VTK to be used in n.n, and rewrite the path according to the installation environment of the VTK library.

2.Run 'nmake /A' on CS-IS-PBVR/CS_server/KVSMLConverter.
3.After the build is completed, make sure that the executable module of kvsml-converter.exe is generated under CS-IS-PBVR/CS_server/KVSMLConverter/Example/Release.

Building the Client

This client program is built using the improved proprietary version of KVS instead of the original KVS.

  • Installing GLUT
    Download 'freeglut-MSVC-3.0.0-2.mp.zip' from the freeglut Website and unzip it. After extraction, arrange it according to the following directory structure.

  • GLEW Placement
    Download 'glew-2.1.0-win32.zip' from the Website of GLEW and unzip it. After extraction, arrange it according to the following directory structure.

<BASE_DIR>
└── lib
    └── OpenGL
        β”œβ”€β”€
        β”‚ β”œβ”€β”€ freeglut.dll
        β”‚ └── glew32.dll
        β”œβ”€β”€ include
        β”‚   └── GL
        β”‚       β”œβ”€β”€ eglew.h
        β”‚       β”œβ”€β”€ freeglut.h
        β”‚       β”œβ”€β”€ freeglut_ext.h
        β”‚       β”œβ”€β”€ freeglut_std.h
        β”‚       β”œβ”€β”€ glew.h
        β”‚       β”œβ”€β”€ glut.h
        β”‚       β”œβ”€β”€ glxew.h
        β”‚       └── wglew.h
        └── lib
            β”œβ”€β”€ freeglut.lib
            β”œβ”€β”€ glew32.lib
            └── glew32s.lib

When deployment is complete, set the following user environment variables.

variable value
KVS_GLUT_DIR < BASE_DIR>\OpenGL
KVS_GLEW_DIR < BASE_DIR>\OpenGL
Path < BASE_DIR>Β₯OpenGLΒ₯bin
  • KVS library installation
    Launch "x64 Native Tools Command Prompt for VS 2022" and navigate to the installation destination of your choice. After that, clone the KVS library for QTPBVR.
git clone [email protected]:TO0603/KVS.git
cd KVS
git checkout main

Edit KVS/kvs.conf as follows:

#=============================================================================
#  KVS enable/support flags
#  $Id: kvs.conf 1525 2013-04-11 02:58:08Z [email protected] $
#=============================================================================
KVS_ENABLE_OPENGL                = 1
KVS_ENABLE_GLU                   = 1
KVS_ENABLE_GLEW                  = 1
KVS_ENABLE_OPENMP                = 0
KVS_ENABLE_DEPRECATED            = 0

KVS_SUPPORT_CUDA                 = 0
KVS_SUPPORT_GLUT                 = 1
KVS_SUPPORT_GLFW                 = 0
KVS_SUPPORT_FFMPEG               = 0
KVS_SUPPORT_OPENCV               = 0
KVS_SUPPORT_QT                   = 1
KVS_SUPPORT_OPENXR               = 0 # Set to 1 if ImGui and OpenXR-SDK are installed.
KVS_SUPPORT_PYTHON               = 0
KVS_SUPPORT_MPI                  = 0
KVS_SUPPORT_EGL                  = 0
KVS_SUPPORT_OSMESA               = 0
KVS_SUPPORT_EXTENDED_FILE_FORMAT = 0 

After editing, set the following user environment variables and restart the prompt.

variable value
KVS_DIR < BASE_DIR> Β₯KVSΒ₯install

After rebooting, < BASE_DIR> Go to \KVS and build and install.

c:Β₯>cd <BASE_DIR>Β₯libΒ₯KVS
<BASE_DIR>Β₯libΒ₯KVS>nmake
    ~~Wait until the build is complete~~
<BASE_DIR>Β₯libΒ₯KVS>nmake install
  • QTPBVR build
    Open the QTPBVR.pro under the 1. CS-IS-PBVR/QTPBVR/ directory with QtCreator.
    If "Valid settings not found" is displayed when it opens, click the "OK" button. On the project settings screen, check the "Desktop Qt 6.2.4 MSVC2019 64bit" kit and click the "Configure Project" button. Local Image
  1. Switch the build setting to Release. Local Image

  2. Scroll down and make sure the environment variable KVS_DIR is set. Local Image

  3. Check the settings in qtpbvr.conf from the edit menu. If you want to load .fbx or .3ds formats, set PBVR_SUPPORT_FBX and PBVR_SUPPORT_3DS to 1, and provide the full paths to the FBXSDK and Assimp library include and lib directories. If you want to display visualization results on an HMD using OpenXR, set DESKTOP_SCREEN_MODE = 0 and OPENXR_SCREEN_MODE = 1. Local Image

  4. Right-click on the project and click "Run qmake". Local Image

  5. After qmake is complete, right-click on the project and click "Build". Local Image

  6. After the build is completed, make sure that you can execute QTPBVR with the play mark at the bottom left of the screen or Ctrl+R. Local Image

⚠️ **GitHub.com Fallback** ⚠️