File system and registry

This chapter is about the usage Coco makes of the file system to store permanent settings.

Location of the installed files

The location of the installed files varies according to the platform.

Microsoft Windows

The location of the programs can be chosen at installation time. The installer creates and environment variable SQUISHCOCO that contains the path to the installation directory. By default it is either C:\Program Files\squishcoco or C:\Program Files (x86)\squishcoco, depending on the platform. In this documentation we use the expression <Windows Coco> to refer to it.

This directory contains the following files and directories:

  • The standard Coco executables, like CoverageBrowser, cmcsexeimport, etc.
  • The documentation.
  • The prefix versions of the wrapper programs and their configuration files. The prefix version of a compiler wrapper is a file that begins with cs, like cscl.exe as wrapper for cl.exe. The configuration file for this program is then cl.cspro.
  • Directories with specific versions of the compiler wrappers.

    An example are the directories visualstudio and visualstudio_x64 which contain the wrappers for Microsoft® Visual Studio®. These directories often contain compiler wrappers without a cs prefix: There is e.g. a program cl.exe in the directory visualstudio that wraps the program cl.exe of Visual Studio.

  • Directories with tutorial and example programs, like parser, textedit and tutorial.


The location can be chosen at installation time. The default value is /opt/SquishCoco/. The directory has the following subdirectories:

  • bin/, lib/: The Coco binaries, including the prefix versions of the compiler wrappers and their profile files.
  • wrapper/bin/: The compiler wrappers as files without the cs prefix.
  • doc/: Documentation files.
  • samples/: Example programs and files for the tutorials.


The programs are installed at /Applications/SquishCoco.

This directory contains the Coco binaries, including the prefixed versions of the compiler wrappers and their profile files. It also contains the documentation. It has the following subdirectories:

  • wrapper/: The compiler wrappers as files without the cs prefix.
  • samples/: Example programs and files for the tutorials.

Location of the license

The professional and the non-commercial edition of Coco use different naming schemes to locate the files and registry keys that contain information about the license. In the following description, the professional edition is primarily described, with the values that change in the noncommercial edition following in parentheses.

Node-locked licenses

When searching for a license, Coco first tries to find a node-locked license.

  1. If the environment variable SQUISHCOCO_LICENSEKEY_DIR is set, Coco treats the content as a directory name and tries to find there the license file. The license file is named .squishcoco-3-license.
  2. It then searches for a license file in the home directory (described below).
  3. If Coco runs under Windows, it searches instead in the registry under HKEY_CURRENT_USER\Software\squishcoco\LicenseKey.

It is possible that a license is present but that it has been deactivated. If Coco finds such a license, it stops searching for another node-locked license and tries to find a license server instead.

Note: Setting SQUISHCOCO_LICENSEKEY_DIR globally for all users is not recommended. It would force all users to use the same license, but each license key is specific to user and host.

Address of the license server

If no node-locked license is found, Coco will try to find the location of a license server.

  1. First it tries to read the specification of a license server from the environment variable SQUISHCOCO_LICENSE_SERVER if such a variable is present and its value is not an empty string.
  2. If Coco runs under Windows, it searches in the registry under HKEY_CURRENT_USER\Software\squishcoco\LicenseServer for a specification.
  3. It then tries to read the specification from a file .squishcoco-3-licserver, which is located in the home directory (see below).
  4. It then tries to read the specification from the system file /etc/squishcoco-3-licserver on Unix or %windir%\system32\drivers\etc\squishcoco-3-licserver on Windows.

The specification of the license server consists of a host name or an IP address, possibly followed by a colon and a port number:

The home directory

When searching for the home directory, Coco evaluates the following environment variables and takes the first one which is set.

  1. The content of the variable HOMEPATH.
  2. Under Windows, if HOMEPATH is set, either:
    • If HOMEDRIVE is set, the value of HOMEDRIVE + HOMEPATH.
    • Otherwise the content of HOMEPATH.
  3. The content of HOME.
  4. Under Windows, the content of USERPROFILE.

Location of the temporary files

During compilation, the CoverageScanner creates some temporary files, which it usually deletes automatically after use.

By default, the temporary files are created in the system temporary files directory. This is /tmp on UNIX® systems, and the directory given by the environment variable %TEMP% on Windows. It is possible to change this location by setting the environment variable SQUISHCOCO_TEMP_DIR to the path of another directory. This directory must already exist when the files are written, it is not created automatically.

The automatic deletion of temporary files can be switched off with the command line option --cs-keep-instrumentation-files (see Debugging).

Location of the program settings

If a program has other permanent settings that must be stored in a file, that file is located in the following directory:

  • On Windows: %APPDATA%\ squishcoco
  • On Linux: $HOME/.config/squishcoco

Location of the installation log file

The Windows installer produces a log file at %TEMP%\SquishCoco_logfile\vsaddin.log. It can be consulted upon installation problems.

Coco v7.2.0 ©2024 The Qt Company Ltd.
Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.