fix bad links authored by Boman Romain's avatar Boman Romain
...@@ -3,16 +3,20 @@ This page explains how to build the code. You must have checked that [git](Git), ...@@ -3,16 +3,20 @@ This page explains how to build the code. You must have checked that [git](Git),
## Windows ## Windows
* Clone the repository somewhere on your PC using "git bash" * Clone the repository somewhere on your PC using "git bash"
``` ```
git clone git@gitlab.uliege.be:R.Boman/gmsh-api.git git clone git@gitlab.uliege.be:R.Boman/math0471.git
``` ```
* Open VS Code and load the `gmsh-api` folder. * Open VS Code and load the `math0471` folder.
* In the terminal of VS Code, install gmsh-sdk using the script `get_gmsh.cmd` (only once per working copy of the repository) * In the terminal of VS Code, go to the `lib` folder and install gmsh-sdk and Eigen using the scripts `get_gmsh.cmd` and `get_eigen.cmd`(only once per working copy of the repository)
``` ```
cd lib
get_gmsh.cmd get_gmsh.cmd
get_eigen.cmd
cd ..
``` ```
* Add MinGW and gmsh-sdk to your environment by running this script (it should be done each time you re-open VS Code or a new terminal):
* Add MinGW, gmsh-sdk and eigen to your environment by running this script (it should be done each time you re-open VS Code or a new terminal):
``` ```
envs\win-mingw64.cmd envs\windows.cmd
``` ```
* Then, in the same terminal, create a build folder: * Then, in the same terminal, create a build folder:
``` ```
...@@ -32,23 +36,27 @@ make -j 4 ...@@ -32,23 +36,27 @@ make -j 4
``` ```
* run a program * run a program
``` ```
gmsh -2 ..\sandbox\mymesh.geo gmsh -3 ..\srcs\mymesh.geo
bin\myedges.exe ..\sandbox\mymesh.msh bin\myview.exe ..\srcs\mymesh.msh
``` ```
If a window does not show up, it means that you forgot to run `envs\windows.cmd`.
## CECI clusters / linux ## CECI clusters / linux
* clone the repository * clone the repository
``` ```
git clone git@gitlab.uliege.be:R.Boman/gmsh-api.git git clone git@gitlab.uliege.be:R.Boman/math0471.git
``` ```
* go into the project folder * go into the project folder
``` ```
cd gmsh-api cd math0471
``` ```
* install gmsh-sdk using the script `get_gmsh.sh` * install gmsh-sdk and Eigen using the script `get_gmsh.sh` and `get_eigen.sh` in the `lib` folder
``` ```
cd lib
./get_gmsh.sh ./get_gmsh.sh
./get_eigen.sh
cd ..
``` ```
* set the environment variables for cmake * set the environment variables for cmake
``` ```
...@@ -69,13 +77,13 @@ make -j 4 ...@@ -69,13 +77,13 @@ make -j 4
``` ```
* run a program * run a program
``` ```
gmsh -2 ../sandbox/mymesh.geo gmsh -3 ../srcs/mymesh.geo
./bin/myedges.exe ../sandbox/mymesh.msh bin/myview.exe ../srcs/mymesh.msh
``` ```
# Note about the environment scripts # Note about the environment scripts
The scripts in the `gmsh-api/envs/` folder add several folders to 3 environment variables so that the system and cmake find the compiler and the libraries correctly: The scripts in the `math0471/envs/` folder add several folders to 3 environment variables so that the system and cmake find the compiler and the libraries correctly:
* `PATH`: this variable should contain the location of the folder of your `g++` compiler, of `gmsh.exe` and its shared library (`gmsh.dll/so/dylib`), * `PATH`: this variable should contain the location of the folder of your `g++` compiler, of `gmsh.exe` and its shared library (`gmsh.dll/so/dylib`),
* `LIB`: points to the path of the folder containing `gmsh.lib` (windows) or `gmsh.so` (linux) or `gmsh.dylib` (macOS), * `LIB`: points to the path of the folder containing `gmsh.lib` (windows) or `gmsh.so` (linux) or `gmsh.dylib` (macOS),
* `INCLUDE`: points to the path of the folder containing the header `gmsh.h`. * `INCLUDE`: points to the path of the folder containing the header `gmsh.h`.
...@@ -84,6 +92,6 @@ Instead of using these scripts which should be loaded each time you start a new ...@@ -84,6 +92,6 @@ Instead of using these scripts which should be loaded each time you start a new
This is done by going to "Settings" on Windows, and typing "env" in the search bar. Then choose the appropriate menu ("modify environment variables"). This is done by going to "Settings" on Windows, and typing "env" in the search bar. Then choose the appropriate menu ("modify environment variables").
On Linux/macOS, you can add/modify environment variables by editing `~/.bashrc` (just copy & paste the contents of `envs/linux-macOS.sh`). On Linux/macOS, you can add/modify environment variables by editing `~/.bashrc` (just copy & paste the contents of `envs/linux-macos.sh`).