[Contents] [TitleIndex] [WordIndex

Different directory trees in Scilab under GNU-Linux Unix

Linux/Unix world is very different from the Windows one.

There is different ways to create/manage directory trees. There is a list of cases in Scilab 5.

Different types of tree

Source tree

It is the most used directory tree used by Scilab developers. However, it is probably the least used because a vast majority of users use the binary or the packaged version of Scilab.

Basically, Scilab is checkout in a specific directory. It is built with the commands ./configure && make and Scilab can be launched with the command ./bin/scilab

Information:

make install without prefix

A user download the source tree and is building Scilab with the commands ./configure && make install. Files will be dispatched into /usr/local/ matching the Linux/Unix policy.

Information:

make install with prefix

A user download the source tree and is building Scilab with the commands ./configure --prefix=/my/path/that/I/like/ && make install. Files will be dispatched into /my/path/that/I/like/ matching the Linux/Unix policy.

Note: It is the way we use to produce the binary available on the website.

Information:

The distribution packaged version of Scilab

Under GNU/Linux, the most used and best vector of diffusion of a free software is to be packaged into Linux distribution. This work is done by packager working for a specific distribution. More information is available on this wiki: Scilab Linux/Unix packages

Information:

How it is actually managed ?

  1. Most of Scilab paths management is done thanks to the SCI variable. This variable is set by the Scilab script: xxx/bin/scilab. For more information about this script, have a look to the comment in this file.

  2. In the dynamic link modules (ie ilib_for_link), we are detecting in which kind of installation we are in order to set the include dir path right. This is done in: modules/dynamic_link/macros/ilib_compile.sci

  3. In Scicos, for Modelica blocks, it is managed in modules/scicos/macros/scicos_scicos/scicos_block_link.sci and modules/scicos/macros/scicos_scicos/buildnewblock.sci. Please note this point will probably merged with the second point by doing a function hiding this complexity (like getIncludeScilabPath for example)

  4. For the dynamic load of libraries (scicos, metanet...) , we are using the LD_LIBRARY_PATH variable which is set in the script bin/scilab. This variable is one the location used by dlopen to load libraries (see man dlopen)


2022-09-08 09:27