Table of contents
1. Environment preparation
Download the basic requirements:
paraview officially gave the compilation document: https://github.com/Kitware/ParaView/blob/master/Documentation/dev/build.md
The required basics are:
as shown in the figure: (enter the official paraview above The document can be downloaded directly by clicking on the back)
In fact, the first git bash is not needed. Because git is used to pull the paraview source code from github, and we must download the source code from the ParaView official website this time, because there is no VTK module in the source code on GitHub, which will cause Cmake to fail to generate.
For the second cmake, in the Qt download below, you can directly choose to install the Cmake tool in Qt, so there is no need to install it separately.
Then I downloaded Visual Studio (paraview officially recommends downloading the 2019 version, but I have already downloaded the 2022 version before, thinking that the software is backward compatible, so I used the 2022 version, and there were no problems during compilation) , ninja (placed in the C:\Windows\ directory), python (to add environment variables)
msmpisetup.exe and msmpisdk.msi installation process:
enter the website
After the download is complete, double-click to install.
Then there is the download of Qt,Note that MSVC must be selected in the Qt download.
The source code must be downloaded from the ParaView official website. There is no VTK module in the source code on GitHub, which will cause CMAKE to fail to generate.
Source code download: https://www.paraview.org/download/
Then unzip the compressed package into your own folder
Two. Compile
1. CMake
The first line selects the folder where the paraview source code is placed, and the second line selects the location where you want to generate the code (a custom folder)
Then wait for the prompt [Configuring done] below, there will be a big hit
【PARAVIEW_BUILD_ALL_MODULES】Compile all modules, check
MPI, Python and Qt modules, check (QT must be checked, the official explanation is that this function can build PARAVIEW GUI applications)
Then other basic functions will be set by default, click the [Configure] button below again, and wait for completion.
Then if there is still redness, continue to click the [Configure] button until there is no redness at all. (I clicked the Configure button 4 times in total). Wait until there are no viral hits, then click Generate
the button, and wait for it to complete.
Then you will be prompted to complete.
2. Visual Studio
Then you can see [Paraview.sln] in your own directory
Double-click to start Visual Studio.
Find [ALL_BUILD], right click, and click [Build]
Then there is the long wait. I waited about fifty minutes.
Then look at the tips below, I have a failure, not a complete success
I copied the output of the console to the .txt file, and then searched for the error globally, and saw that the longintrepr.h file was not found when the mpi4py.MPI.c file was running. Then I searched, and this file is indeed not included in the paraview source code.
I searched the longintrepr.h file globally on the computer again, as shown in the figure below, and found that this file exists in other different projects, and then compared the contents of the file, and found that the codes are the same. So I copied a copy of longintrepr.h to the same directory as mpi4py.MPI.c.
as shown in the picture
Then right-click [ALL_BUILD] of Visual Studio, click [Regenerate]
and wait for another hour. . .
Then in the directory you built, as shown in the path. Double-click to open the successfully compiled paraview. You're
done!