Deploying Squore CLI

Note that Oracle's Java Runtime Environment (minimum version 1.7.0_51) is required on the client machine for the CLI to run.

On Windows

After verifying that you meet the prerequisites detailed in the section called “Installation Prerequisites”, log on with an account that has administrator privileges and launch Squore CLI installer. Each of the wizard screens is documented below in the order that you will see them.

Warning

The data and temporary folders must be excluded from the scope of virus scanners, malware protectors and search indexers to avoid any errors during an analysis.

  1. Squore CLI installer Welcome screen

    Squore CLI installer Welcome screen

    On the Welcome screen, click the Next button to start the installation.

  2. Squore CLI licence agreement screen

    Squore CLI licence agreement screen

    Click the I Agree button after reviewing the terms of the licence to continue the installation.

  3. Squore CLI components screen

    Squore CLI components screen

    Select the components you want to install and click the Next button to proceed to the next step of the installation.

  4. Squore CLI destination folder screen

    Squore CLI destination folder screen

    Browse for the folder where you want to deploy Squore CLI and click the Next button to proceed to the next step of the installation.

  5. Squore CLI installation parameters screen

    Squore CLI installation parameters screen

    Specify the path of the JDK installation (a JRE is also supported) on your system. Specify the details of Squore Server that the client should connect to. if you check the Update and synchronise with server box, the installer will attempt to retrieve the up-to-date client binaries from the server as well as the configuration. Click the Next button to start copying the installation files onto your hard disk.

If an error happens during the installation process, a log file is available in the destination folder you selected during the installation.

On Linux

Before installing Squore CLI on a Linux platform, verify that all prerequisites are met, as described in the section called “Installation Prerequisites”

  1. Unzip the squore-cli-linux-16.3.4.<buildNumber>.tar.bz2 archive file and then extract the content of the tar file in <SQUORE_HOME> : i.e. the selected Squore installation directory.

    tar xjf squore-cli-linux-16.3.4.<buildNumber>.tar.bz2

    <SQUORE_HOME> now contains a new folder called squore-cli, for example: /home/user/squore-cli.

  2. Run the installation script in a command shell:

    <SQUORE_HOME>/bin/install -v -s http://localhost:8180/SQuORE_Server -u user -p password

    For more details on install options, refer to install(1).

Tip

When installing Squore CLI, a connection to Squore Server is automatically attempted to retrieve the most up-to-date client and configuration. You can disable this synchronisation attempt by passing -N to the installation script.

Third-Party Plugins and Applications

If you have deployed some third-party tools on Squore Server, they will automatically be downloaded to your client when you launch the client synchronisation script.

Tip

AntiC and Cppcheck on Linux also require special attention: Cppcheck must be installed and available in the path, and antiC must be compiled with the command:

# cd <SQUORE_HOME>/addons/Antic_auto/bin/ && gcc antic.c -o antic

For more information, refer to the Command Line Interface Manual, which contains the full details about special installation procedures for Data Providers and Repository Connectors.

Post Installation Actions

After the CLI installation is successful, you can familiarise yourself will the structure of the installation directory:

  • <SQUORE_HOME>/addons A folder containing the Data Providers of the product.

  • <SQUORE_HOME>/bin A folder containing sample projects creation scripts and utilities.

  • <SQUORE_HOME>/configuration A configuration of the product containing the tools, wizards and analysis models.

  • <SQUORE_HOME>/docs A folder containing the Command Line Interface manual.

  • <SQUORE_HOME>/lib A folder containing the main engine and its client libraries.

  • <SQUORE_HOME>/samples A folder containing sample source code to be used with the sample launchers supplied in <SQUORE_HOME>/bin.

  • <SQUORE_HOME>/share: A folder containing specific perl libraries used by the CLI to launch jobs.

  • <SQUORE_HOME>/tools A folder containing the perl and tclsh distributions on Windows. This folder does not exist in the Linux version, since the system installations of perl and tclsh are used.

  • <SQUORE_HOME>/config.xml An XML configuration file that the CLI uses to find its configuration.

Tip

After installing Squore CLI, the credentials for the user you specified during the installation have been saved, and the scripts in <SQUORE_HOME>/bin will use the username and password specified.

The file config.xml contains information about the Squore CLI installation.. Here is the default config.xml:

<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<squore type="client" version="1.1">
	<paths>
		<path name="perl.dir" path="path/to/perl"/>
		<path name="tclsh.dir" path="path/to/tclsh"/>
	</paths>
	<configuration>
		<path directory="<SQUORE_HOME>/configuration"/>
	</configuration>
	<addons>
		<path directory="<SQUORE_HOME>/addons"/>
	</addons>
</squore>

You can extend your config.xml by specifying where you want the temporary and data files to be stored on your system, as shown below:

  • Folder used to store temporary log files:<tmp directory="${java.io.tmpdir}/squore-${user.name}"/>

  • Folder used to run analyses and store project files before they are sent to the server:<projects directory="${user.home}/.squore/projects"/>

  • Folder used when extracting files from SCM systems:<sources directory="${java.io.tmpdir}/sources"/>

Using java system properties to specify the paths to the tmp, projects and sources folders is useful if you want the Squore CLI installation to work for multiple users. Note that all three elements are optional, and will use the values shown above by default if you do not specify them in config.xml.

Here is an example of a full config.xml:

<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<squore type="client" version="1.1>
	<paths>
		<path name="perl.dir" path="path/to/perl"/>
		<path name="tclsh.dir" path="path/to/tclsh"/>
	</paths>
	<configuration>
		<path directory="<INSTALLDIR>/configuration"/>
	</configuration>
	<addons>
		<path directory="<INSTALLDIR>/addons"/>
	</addons>
	<tmp directory="${java.io.tmpdir}/squore-${user.name}"/>
	<projects directory="${user.home}/.squore/projects"/>
	<sources directory="${java.io.tmpdir}/sources"/>
</squore>

Tip

Note that all three folders can be cleaned up regularly when no analysis is running.

${user.home} corresponds to $HOME on linux and %APPDATA% on Windows

${java.io.tmpdir} corresponds to /tmp on linux and %TEMP% on Windows