Update compilation authored by Rémy Mozul's avatar Rémy Mozul
# Compilation #
After downloading and uncompressing you must have the `lmgc90_user` directory somewhere. Inside, you should have the following
After downloading and uncompressing you must have the `lmgc90_user_xxx` directory somewhere. Inside, you should have the following
subdirectories:
* *src* : the sources of LMGC90 software
* *examples* : the user examples working with the sources
* *manuals* : a list of manuals/documentation for the software in pdf format
* *docs* : the html documentation generated from the sources
* *build* : (windows only) the precompiled binary of LMGC90 software
Then depending on your operating system follow the directions:
* [Unix/MacOs] (#compile)
* [Windows] (#precompiled)
* *build* : (empty) where to build the LMGC90 libraries
If an error arises during the compilation step please first check if there is not a solution
in the [FAQ](Faq#compile_error)
## <a name=compile> Unix and MacOs </a> ##
You must run a set of commands from the terminal to build LMGC90 software for your system.
Thus open a terminal and go to your `lmgc90_user` directory.
Thus open a terminal and go to your `lmgc90_user_xxx` directory.
Run the following commands:
```shell
mkdir build
cd build
cmake ..
make
......@@ -56,7 +49,7 @@ Our policy is to not mess with default system paths. So instead we advise to
use an environment variable to add to python the path to our build directory.
In general adding the following lines to your *.bashrc* (Linux) or *.profile* (MacOS)
file does the trick. Of course you have to replace *mysourcepath* by the path to
your own `lmgc90_user` directory (in the example above `~/Desktop/LMGC90/lmgc90_user/`).
your own `lmgc90_user_xxx` directory (something like `/users/name/LMGC90/lmgc90_user_xxx/` and replacing `xxx` by the version you downloaded).
```shell
if [ -z ${PYTHONPATH} ]; then
export PYTHONPATH=mysourcepath/build
......@@ -66,15 +59,6 @@ fi
export PATH=${PATH}:mysourcepath/src/addons
```
## <a name=precompiled> Windows </a> ##
Start the `Spyder` program. Then click on the upper line `tools` and `PYTHONPATH manager`.
Then click `Add a path` on lower left corner and select the path to the `build` directory
of the previously unzipped package ( *.../lmgc90_user/build*).
Finally, so that the previous step is taken into account in your current environment, simply restart `Spyder`
program.
****
| [back](./Download_and_install) | [home](./Home) | [next](./First_steps) |
......
......