next up previous contents index
Next: X.B Coordinate system transformations Up: X. Appendices Previous: X. Appendices   Contents   Index

Subsections


X.A Installing FeResPost library

FeResPost is open source. Both the C/C++ sources and binaries are distributed.


X.A.1 Binaries

The binaries are distributed in archive containing the ``OUTPUTS'' directory and its sub-directories. These binaries can also be re-generated from the sources as described in section X.A.1.

Depending on the OS and on the type of the binaries you are using, part of the distribution is to be used.

File ``OUTPUTS/COMPILER.TXT'' contains information about the compiler that has been used to produce the binaries.

Note that the C++ shared libraries are still distributed in ``OUTPUTS/lib'' directory to maintain compatibility with what was done with previous versions. The use of these binaries is however not recommended because:

If you intend to develop your own wrappers or use FeResPost classes in your own programs we recommend that you recompile FeResPost C++ library with you own compiler, and statically link your executables/libraries to FeResPost objects.

X.A.1.1 Linux binaries (32 bits)

In archive ``FeResPost_4.4.0_LINUX_32.7z'' the binaries contain ruby wrappers and C++ library:

The libraries must be used with appropriate 32 bits distribution of ruby (versions from 1.8.* to 2.3.*) or Python (versions from 2.6.* to 3.4.*).

X.A.1.2 Linux binaries (64 bits)

In archive ``FeResPost_4.4.0_LINUX_64.7z'' the binaries contain ruby wrappers and C++ library:

The libraries must be used with appropriate 64 bits distribution of ruby (versions from 1.8.* to 2.3.*) or Python (versions from 2.6.* to 3.6.*).

X.A.1.3 Windows binaries (32 bits)

In archive ``FeResPost_win32_4.4.0.7z'' the binaries contain ruby wrappers, COM component and C++ library:

The libraries must be used with the appropriate 32 bits distribution of ruby (versions from 1.8.* or 2.2.*).

Python binaries for Python versions between 2.6 and 3.6 are distributed in a different archive ``FeResPost_python_x86_4.4.0.7z''. (Different versions of MSVC compiler are used to produce the different outputs.)

X.A.1.4 Windows binaries (64 bits)

In archive ``FeResPost_win64_4.4.0.7z'' the binaries contain ruby wrappers, COM component and C++ library:

The libraries must be used with the appropriate 64 bits distribution of ruby (versions from 1.8.* or 2.2.*).

Python binaries for Python versions between 3.5 and 3.6 are distributed in a different archive ``FeResPost_python_x64_4.4.0.7z''. (Different versions of MSVC compiler are used to produce the different outputs.)

X.A.1.5 Windows .NET assemblies

In archive ``FeResPost_NET_4.4.0.7z'' the assemblies are distributed in directory ``OUTPUTS/NET''. Three versions of FeResPost .NET assembly are build:


X.A.2 Building from sources

All the sources are delivered in an archive containing an SRC directory and several levels of subdirectories. The sources of the program are delivered with different Makefiles and BASH or BAT scripts that can be used for the compilation of the different targets:

Examples of builds follow:
        build_linux32.bash ruby
        build_linux32.bash ruby_23
        build_linux32.bash outputs
        build_mingw64.bat com
        build_mingw64.bat ruby
        build_mingw64.bat vbaruby
        build_mingw64.bat outputs
        build_python_27.bat
        buildbuild_python_win32
        buildbuild_python_win64
        ...


Table X.A.1: Available compilation scripts, and associated ``main'' Makefiles and targets.
SCRIPT main Makefile targets
build_linux32.bash Makefile.LINUX_586 ruby_23, ruby_22, ruby_21, ruby_20, ruby_19, ruby_18, python_26, python_27, python_30, python_31, python_32, python_33, python_34, develop
build_linux64.bash Makefile.LINUX_I64 ruby_23, ruby_22, ruby_21, ruby_20, ruby_19, ruby_18, python_26, python_27, python_30, python_31, python_32, python_33, python_34, python_35, python_36, develop
build_mingw32.bat Makefile.WIN7 com, ruby_22, ruby_21, ruby_20, ruby_19, ruby_18, vbaruby, develop
build_mingw64.bat Makefile.WIN7.64 com, ruby_22, ruby_21, ruby_20, ruby_19, ruby_18, develop
build_net.bat Makefile.NET net
build_msvc_x86.bat Makefile.MSVC_X86 com, ruby_18, vbaruby, develop
build_msvc_x64.bat Makefile.MSVC_X64 com, ruby_19, develop
build_python_win32.bat Makefile.PYTHON python_26, python_27, python_30, python_31, python_32, python_33, python_34, develop
build_python_win64.bat Makefile.PYTHON python_26, python_27, python_30, python_31, python_32, python_33, python_34, python_35, python_36, develop


X.A.3 Installation and configuration of binaries

One makes below the distinction between the installation of the ruby extension, the COM server and the .NET assembly. Actually, depending on what you want to do, only some parts of the binaries must be installed/configured. Table X.A.2 summarizes what you need to do. Before configuring FeResPost, always make sure that you are selecting the right version of the binaries. In particular:


Table X.A.2: Summary of the configuration operations you need to perform to use FeResPost.
If you want to...
You must...
Use FeResPost in ruby scripts Install the corresponding FeResPost C++ ruby extension (section X.A.3.3)
Use FeResPost as COM component (Windows only) Install and register the COM component (section X.A.3.5)
Use the .NET assembly Install the assembly in GAC (global assembly cache) as explained in section X.A.3.6. An installation of the redistributable Microsoft Visual C++ libraries may also be necessary.
Develop you own wrapper around FeResPost C++ library, or write a program that directly uses the C++ library Install the C++ library and corresponding header files (section X.A.3.2)
Modify and/or recompile the sources Copy the sources and try to find inspiration in the information provided in section X.A.2


X.A.3.1 Redistributable libraries

GNU C++ compiler the C++ developer's library, the ruby extensions or the COM component. (See below.) With recent versions of the compiler, some of the C++ built-in libraries are not included in FeResPost ``dll'' or ``so'' library file. Then these libraries are provided in ``REDISTR'' directory. Then, the user must give access to these libraries to each script or application that uses FeResPost library. For example:

On Windows OS, your PATH environment variable can be modified in ``Control Panel'' -> ``System and Security'' -> ``System'' -> ``Advanced system settings'' -> ``Environment variables''.

On your computer, you may run FeResPost from different environments (excel with VBA, ruby, python...) that can require sometimes a 32 bits version, or a 64 bits version of the library and associated redistributables. Or you may compare results obtained with different versions of FeResPost. Then, it may be handy to define the environment associated to each separate script. This can be done by providing the execution environment in a script (BAT file on windows, and bash or csh file on UNIX for example).

For example, on Windows, assuming you are using a 64 bits version of excel, and that the 64 bits version of the COM component has been properly registered, excel could be run by the following batch file:

    setlocal
    set PATH=C:/NewProgs/MINGW64/bin;C:/NewProgs/RUBY/Ruby200_x64/bin;
        C:\Program Files (x86)\Microsoft Office\Office12
    excel LaminateAnalysis.xls
    endlocal
(This is just an example, you have to adapt the PATH variable to your installation.)


X.A.3.2 FeResPost C++ developer's library and headers

One distinguishes the UNIX/LINUX OS and Windows OS:

(Note that the use of these shared libraries is no longer recommended. Instead, it is a better idea to statically link your libraries/executables to FeResPost objects.)

for the headers, just copy the ``include'' directory in a location that suits you, and adapt your compiler options to access the headers (for example, by editing your makefiles).


X.A.3.3 Ruby extensions

The shared library (FeResPost.so or FeResPost.dll) is delivered with 2 ruby files:

The files should be copied into the ruby installation library directory. The files can also be installed in another directory, but then the access path must be specified to ruby. (For example, with ``-I'' option.) You can also install them in any directory that suits you and ensure that ``RUBYLIB'' environment variable points to that directory.


X.A.3.4 Python extensions

The shared library (FeResPost.so or FeResPost.pyd) contain everything you need to run the examples. The files should be copied into the Python installation library directory. The files can also be installed in another directory, but then the access path must be specified to Python. (For example, with ``-I'' option.) You can also install them in any directory that suits you and ensure that ``PYTHONPATH'' environment variable points to that directory.

Note that the Python examples are provided with with ``env*' batch files that help you to define the approrpiate environment on Windows.


X.A.3.5 COM component

The servers must be registered before use. For that purpose, a program called ``modifyRegistry.exe'' is distributed with FeResPost library. This program is used to add keys to the Windows register. Follows some information:

The examples presented in Part VI require only the registration of in-proc library and type library (recommended configuration).

Figure X.A.1: Registration of FeResPost COM component.
\includegraphics[bb=0 0 508 388]{COM/intro/IMAGES/registerFRP.eps}

You may register either 32 bits version of the component, or 64 bits version of the component, or both 32 bits and 64 bits versions of the component:


X.A.3.6 .NET assembly

FeResPost assembly should be installed in the global assembly cache. This can be done by copying the ``FeResPost.dll'' dynamic link library found in ``NET' directory to the Global Assembly Cache. On my computer, this can be done simply by a drag and drop of ``FeResPost.dll'' into ``C:/Windows/assembly'' directory. Note however that:

The advantage of installing FeResPost in the Global Assembly Cache is that this allows to use from a program anywhere without minding where to find it.


next up previous contents index
Next: X.B Coordinate system transformations Up: X. Appendices Previous: X. Appendices   Contents   Index
FeResPost User Manual Version 4.4.0 (2017/08/27)