Update build_win authored by Adrien Crovato's avatar Adrien Crovato
## Windows
The following instructions have been tested on windows 10 64bits, in Release and Debug configurations, and with the following packages versions: Visual Studio 2022, CMake 3.23, Python 3.8.7, SWIG 4.0.2, Eigen 3.3.9, Gmsh 4.8.4.
**Required libraries**
1. Git
Install git from https://git-scm.com/download/win.
2. Visual Studio
Download the Visual Studio installer from https://visualstudio.microsoft.com/downloads/ and follow the instructions. You can either download the full installer including the IDE (https://visualstudio.microsoft.com/thank-you-downloading-visual-studio/?sku=Community&rel=16), or only the build tools (https://visualstudio.microsoft.com/thank-you-downloading-visual-studio/?sku=BuildTools&rel=16). The following instructions assumes that VS has been installed in C:\Program Files\Microsoft Visual Studio.
3. CMake
Install CMake from https://cmake.org/, and add the executable to the Path environment variable (e.g. C:\Program Files\CMake\bin).
4. Python and packages
Install Python from https://www.python.org/, and add the executable to the Path environment variable (e.g. C:\Program Files\Python). Install python packages using pip
```bat
python -m pip install numpy
python -m pip install matplotlib
python -m pip install vtk
```
5. SWIG
Download SWIG from http://www.swig.org/, unzip it to the location of your choice, and add the executable to the Path environment variable (e.g. C:\Program Files\SWIG).
6. Eigen
Download Eigen from https://eigen.tuxfamily.org/index.php?title=Main_Page, unzip it to the location of your choice (e.g. C:\Program Files\eigen).
7. Gmsh
Download gmsh from https://gmsh.info/, unzip it to the location of your choice, and add the executable to the Path environment variable (e.g. C:\Program Files\gmsh).
**Build**
```bat
REM setup env
call "C:\Program Files\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvarsall.bat" amd64
set INCLUDE=%INCLUDE%;C:\Program Files\eigen
REM clone SDPM (e.g. in C:\Users\Me\dev\sdpm)
cd C:\Users\Me\dev
git clone git@gitlab.uliege.be:am-dept/sdpm.git
cd sdpm
REM configure, build and test
mkdir build && cd build
cmake -A x64 .. && cmake --build . [--target install] --config Release REM alternatively, cmake -G Ninja -DCMAKE_BUILD_TYPE=Release .. && cmake --build . [--target install]
ctest [-j6] -C Release
```
**Run an example**
From the SDPM root directory:
```bat
python run.py sdpm\tests\lann.py [-k4] [--nogui]
```
\ No newline at end of file