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

Subsections


IX.A Installing FeResPost library

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


IX.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 IX.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.

IX.A.1.1 Linux binaries (32 bits)

These binaries contain only the ruby wrappers and C++ library:

The libraries must be used with appropriate 32 bits distribution of ruby (versions from 1.8.* or 2.3.*). The binaries have been obtained with version 4.0.3 of GCC compiler.

IX.A.1.2 Linux binaries (64 bits)

The 64 bits libraries are distributed exactly the same way as the 32 bits version. In this case, they must be used with appropriate 64 bits ruby executables. The binaries have been obtained with version 4.0.3 of GCC compiler.

IX.A.1.3 Windows binaries (32 bits)

These 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.*). The Windows binaries have been obtained with version 3.4.5 of GCC compiler.

IX.A.1.4 Windows binaries (64 bits)

These 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.*). The Windows binaries have been obtained with version 3.4.5 of GCC compiler.

IX.A.1.5 Windows .NET assemblies

The assemblies are distributed in directory ``OUTPUTS/NET''. Three versions of FeResPost .NET assembly are build:


IX.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
        ...


Table IX.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, develop
build_linux64.bash Makefile.LINUX_I64 ruby_23, ruby_22, ruby_21, ruby_20, ruby_19, ruby_18, 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


IX.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 IX.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 IX.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 IX.A.3.3)
Use FeResPost as COM component (Windows only) Install and register the COM component (section IX.A.3.4)
Use the .NET assembly Install the assembly in GAC (global assembly cache) as explained in section IX.A.3.5. 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 IX.A.3.2)
Modify and/or recompile the sources Copy the sources and try to find inspiration in the information provided in section IX.A.2


IX.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.)


IX.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).


IX.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.


IX.A.3.4 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 IX.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:


IX.A.3.5 .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: IX.B Coordinate system transformations Up: IX. Appendices Previous: IX. Appendices   Contents   Index
FeResPost 2017-05-28