Installation
    • PDF

    Installation

    • PDF

    Article Summary

    The Glasswall distribution consists of all libraries, wrappers, tools, config and test files required to get started within a single archive. You will need to extract the archive and include the relevant artifacts in your project.

    The Glasswall libraries are split up according to the supported operating system and architecture:

    • /libs/debian/x86-64 - Linux x86-64 OS libraries
    • /libs/alpine/x86-64 - Alpine x86-64 OS libraries
    • /libs/windows/x86-64 - Windows x86-64 OS libraries

    Language specific wrappers can be found in /libs/OS/ARCHITECTURE/wrappers/LANGUAGE. These allow users to use programming languages such as Java or Python to create their own applications that use the Glasswall Engine.

    General Requirements

    • Install Glasswall license key
    • The Glasswall libraries: glasswall_core2.dll for Windows OS and libglasswall_core2.so for Linux and Alpine OS. These libraries contain the Glasswall engine.
    • The Glasswall camera libraries: *_camera.dll for Windows OS and *_camera.so for Linux and Alpine OS. These are libraries used by the Glasswall engine to process specific filetypes.
    • Content management policies that modify the processing behaviour. Examples can be found in /config files.
    • A way of executing the Glasswall engine. This can be the gwcli application, or an application written using one of the provided language wrappers, or an application that directly interacts with the Glasswall library.

    Installation

    Environment variables

    The following environment variable will need to be setup in order for Editor to find the Glasswall camera libraries:

    QT_PLUGIN_PATH=...: Where ... is the full path to the directory containing the Editor and Editor camera libraries.

    If you are having issues with no documents being processed even though they are supported then double check that this environment variable is setup correctly.

    Environment Variables in Linux/Alpine

    A temporary environment variable can be created by running export QT_PLUGIN_PATH=.... This will create the environment variable, but only for the current shell. Once the shell is closed then this variable will no longer be available.

    A permanent environment variable can be created by adding export QT_PLUGIN_PATH=... to the ~/.bashrc file. This enables the environment variable to be setup every time a shell instance is created. After adding this line you can call source ~/.bashrc to enable this variable to be present for the current shell.

    Environment Variables in Docker

    A permanent environment variable can be created by adding ENV QT_PLUGIN_PATH=... to your Docker file.

    Environment Variables in Windows

    A temporary environment variable can be created by running set QT_PLUGIN_PATH=.... This will create the environment variable, but only for the current shell. Once the shell is closed then this variable will no longer be available.

    A permanent environment variable can be created by running setx QT_PLUGIN_PATH=.... This will create the environment variable when a new shall instance is created. After adding this line you can run set QT_PLUGIN_PATH=... to enable this variable to be present for the current shell.

    WARNING: The above commands will truncate your environment variable if it exceeds 1024 characters. In this case you will need to use another method, such as using the graphical interface, to create the environment variable.

    Linux/Alpine

    On Linux and Alpine there are a few different ways of installing the Glasswall libraries. Here we demonstrate a temporary and some permanent solutions. For each example the release package has been extracted to /home/centos/Glasswall. These examples have been tested on CentOS 7, but they can be adapted to work on other systems without too much difficulty. For example, the path libs/debian would be replaced with libs/alpine when working on the Alpine OS.

    Example 1 - Temporary solution

    A temporary setup can be created by extracting the archive to a directory and then setting up the environment variable LD_LIBRARY_PATH=... to point to the directories where the Glasswall libraries are located.

    • Run export QT_PLUGIN_PATH=/home/centos/Glasswall/libs/debian/x86-64/bin/sdk_editor. This will setup the QT_PLUGIN_PATH to point to the directory containing the Glasswall camera libraries.
    • Run export LD_LIBRARY_PATH=/home/centos/Glasswall/libs/debian/x86-64/bin/sdk_editor:/home/centos/Glasswall/libs/debian/x86-64/bin/sdk_archive_manager:/home/centos/Glasswall/libs/debian/x86-64/bin/sdk_word_search:/home/centos/Glasswall/libs/debian/x86-64/wrappers/java/jr8/sdk_archive_manager_wrappers:/home/centos/Glasswall/libs/debian/x86-64/wrappers/java/jr8/sdk_word_search_wrappers:/home/centos/Glasswall/libs/debian/x86-64/wrappers/java/jr8/sdk_editor_wrappers. This will setup the LD_LIBRARY_PATH to point to the directories that contain the different libraries. In this example we are also setting up the libraries for the Java wrapper to be used with Java 8. The directories /home/centos/Glasswall/libs/debian/x86-64/wrappers/... are not necessary if you are not using Java.

    Example 2 - Installation in /usr/lib

    A permanent setup can be created by copying all the libraries to /usr/lib/ or another directory that is searched by the linker, and then running ldconfig to update the list of installed libraries.

    • Run with admin privileges find /home/centos/Glasswall/libs/debian/x86-64/bin -type f -name "*.so*" -exec install -m 755 "{}" /usr/lib \;. This will copy all the Glasswall libraries into /usr/lib directory and set the permissions to 755.
    • Run with admin privileges find /home/centos/Glasswall/libs/debian/x86-64/wrappers/java/jre\ 8 -type f -name "*.so*" -exec install -m 755 "{}" /usr/lib \;. This will copy all the Editor Java wrapper libraries into /usr/lib directory and set the permissions to 755. This can be omitted if you are not working with the Java wrapper. In this example we are using Java 8.
    • Run with admin privileges ldconfig. This will update the list of installed libraries so that the Glasswall libraries can be found.
    • Run echo 'QT_PLUGIN_PATH=/usr/lib/' > ~/.bashrc. This will permanently add the QT_PLUGIN_PATH environment variable to point to the location of the Glasswall libraries.
    • Run source ~/.bashrc. This will update the current shell to include the QT_PLUGIN_PATH environment variable.

    Example 3 - Installation in /opt/glasswall

    Another permanent setup can be created by copying the content of the extracted archive to a place such as /opt/glasswall, and creating a config file in /etc/ld.so.d/ that tells the system where to find the Glasswall libraries.

    • Run with admin privileges mkdir -p /opt/glasswall. This will create the directory where the content of the release package will be stored.
    • Run with admin privileges cp -r /home/centos/Glasswall/* /opt/glasswall/. This will copy the extracted contents of the release package into the /opt/glasswall/ directory.
    • Run with admin privileges find /opt/glasswall/ -name "*.so*" -exec chmod 755 "{}" \;. This will find all the Glasswall libraries and set their permissions to 755
    • Run with admin privileges echo -e "/opt/glasswall/libs/debian/x86-64/bin/sdk_archive_manager\n/opt/glasswall/libs/debian/x86-64/bin/sdk_editor\n/opt/glasswall/libs/debian/x86-64/bin/sdk_word_search" > /etc/ld.so.conf.d/glasswall.conf. This will create the configuration file /etc/ld.so.conf.d/glasswall.conf containing the paths to the locations of the Glasswall libraries.
    • Run with admin privileges echo -e "/opt/glasswall/libs/debian/x86-64/wrappers/java/jre 8/sdk_archive_manager_wrappers\n/opt/glasswall/libs/debian/x86-64/wrappers/java/jre 8/sdk_editor_wrappers/build\n/opt/glasswall/libs/debian/x86-64/wrappers/java/jre 8/sdk_word_search_wrappers" >> /etc/ld.so.conf.d/glasswall.conf. This will update the configuration file with the location of the Java wrapper libraries. This is not necessary if you are not using Java. In this example we are using Java 8.
    • Run with admin privileges ldconfig. This will update the list of installed libraries so that the Glasswall libraries can be found.
    • Run echo 'QT_PLUGIN_PATH=/opt/glasswall/libs/debian/x86-64/bin/sdk_editor' > ~/.bashrc. This will permanently add the QT_PLUGIN_PATH environment variable to point to the location of the Glasswall libraries.
    • Run source ~/.bashrc. This will update the current shell instance to include the QT_PLUGIN_PATH environment variable

    Signal Chaining when using Java

    The Glasswall library uses signal handling in order to prevent crashes from occurring, but this can interfere with the JVM when Glasswall is run from Java. For this to work correctly signal chaining will need to be setup in order to prevent errors in Glasswall from propagating into the JVM. Information on how to set this up can be found at Troubleshooting Guide for Java SE 6 with HotSpot VM.

    An example of the environment variable LD_PRELOAD might look something like this export LD_PRELOAD=/usr/lib/jvm/jre-1.8.0-openjdk/lib/amd64/libjsig.so or ENV LD_PRELOAD=/usr/lib/jvm/jre-1.8.0-openjdk/lib/amd64/libjsig.so in your Docker file. This will depend on the actual path to the libjsig.so library.

    Alternatively, signal chaining can also be setup by manually loading the libjsig library:

    if (System.getProperty("os.name").contains("nux"))
    {
        System.loadLibrary("jsig");
    }
    

    Windows

    The setup for Windows is very similar to the setup for Linux where you need to find a place for the Glasswall libraries to be stored, and then setup the environment variables so that the Glasswall libraries can be found. In our example we are storing the contents of the release archive in C:\Program Files\Glasswall.

    • Extract the contents of the Release archive into C:\Program Files\Glasswall
    • Add the following paths to the PATH environment variable:
      • C:\Program Files\Glasswall\libs\windows\x86-64\bin\sdk_archive_manager
      • C:\Program Files\Glasswall\libs\windows\x86-64\bin\sdk_editor
      • C:\Program Files\Glasswall\libs\windows\x86-64\bin\sdk_word_search
    • Add the appropriate paths containing the Java library to the PATH environment variable, if you are using Java. For example:
      • C:\Program Files\Glasswall\libs\windows\x86-64\wrappers\java\jre 8\sdk_archive_manager_wrappers
      • C:\Program Files\Glasswall\libs\windows\x86-64\wrappers\java\jre 8\sdk_editor_wrappers/build
      • C:\Program Files\Glasswall\libs\windows\x86-64\wrappers\java\jre 8\sdk_word_search_wrappers
    • Add the Editor cameras directory to the QT_PLUGIN_PATH environment variable. For example:
      • C:\Program Files\Glasswall\libs\windows\x86-64\bin\sdk_editor

    Was this article helpful?