Main Content

Install Polyspace as You Code Using Installer

Polyspace® as You Code checks your code for bugs and coding standard violations while you work in a code editor or in these supported IDEs:

  • Visual Studio® 2019 (versions 16.11.* and later) and 2022 (versions 17.2.* and later)

  • Visual Studio Code (versions 1.62 to 1.79)1, 2

  • Eclipse™ (versions 2019-09 to 2022-12)3 and Eclipse based IDEs such as Code Composer Studio, HighTech, or Windriver Workbench.

Note

Before you install the Polyspace as You Code extension in Visual Studio, uninstall any previous version of the extension.

Polyspace as You Code uses the Polyspace Access™ Network Named Users (NNU) license and requires a license manager to manage license checkouts.

Prepare Polyspace as You Code Installation

The Polyspace as You Code installer is available in the Polyspace Access installation image.

In a typical installation:

  1. An administrator downloads Polyspace Access, installs the license manager on a server machine, and configures the Polyspace Access license.

    1. To download the Polyspace Access installation image, go to the MathWorks® download page, expand the Get Polyspace Access section and click Download.

      You might have to log into your MathWorks Account to complete this step.

    2. The license manager is available with your Polyspace Access installation. You can also download the license manager from License Manager Download.

      To configure the Polyspace Access license, see Configure Polyspace Access License.

      Provide end users with the path to the client license file that you configure in Step 3: Configure Client License. The license is typically named network.lic and contains these lines:

      SERVER lmHostname HostID 27000
      USE_SERVER
      where lmHostname is the hostname of the machine where you install the license manager. HostID is the MAC address that you provided to activate the Polyspace Access license.

  2. An administrator or an end user installs Polyspace as You Code on client machines that are on the same network as the license manager server machine.

    Tip

    Polyspace as You Code uses a local server for communications between the analysis engine and the IDE extensions. If you use a proxy server, configure your system to exclude the localhost from using the proxy. For instance, on Linux, set environment variable export no_proxy=localhost.

    This table describes additional required steps before you begin your installation, depending on your role and the type of installation.

    Type of InstallationRoleSteps
    Download installer from Polyspace Access interface and install interactivelyAdministrator
    1. Install and start Polyspace Access. See Install Polyspace Access for Web Reviews.

    2. Provide end users with the Polyspace Access URL and path to license file.

    End User
    1. Obtain the path to the license file and Polyspace Access URL from your administrator.

    2. Download and unzip the Polyspace as You Code installation folder. Log into the Polyspace Access interface and click help button > Download Polyspace as You Code.

    3. For installation, see Install Polyspace as You Code Interactively. If you install Visual Studio Code or Eclipse IDE extensions, you must provide the installation path of the IDEs.

    Start installer from shared location and install interactivelyAdministrator
    1. Install and start Polyspace Access. See Install Polyspace Access for Web Reviews.

    2. Download and unzip the Polyspace as You Code installation folder. Log into the Polyspace Access interface and click help button > Download Polyspace as You Code.

    3. Provide end users with the path to the installation folder that you unzipped in step a, and the path to the license file.

    End User
    1. Obtain the path to the license file and location of the installer from your administrator.

    2. For installation, see Install Polyspace as You Code Interactively. If you install Visual Studio Code or Eclipse IDE extensions, you must provide the installation path of the IDEs.

    Install noninteractivelyAdministrator or End User
    1. Obtain the path to the license file and location of the installer.

    2. Modify the installer properties file:

      • Provide the path for the Polyspace as You Code installation folder.

      • Determine whether you want to install IDE extensions. For Visual Studio Code and Eclipse IDEs, you must provide the installation path of the IDEs.

        See Install Polyspace as You Code Noninteractively.

    Note

    To obtain a Polyspace as You Code installer without installing and starting Polyspace Access, contact your MathWorks sales representative.

The Polyspace as You Code plugin for Eclipse-based IDEs is not compatible with the Polyspace desktop plugin for Eclipse. If you use the installer to install the Polyspace as You Code Eclipse plugin, Polyspace uninstalls the desktop plugin.

Install Polyspace as You Code Interactively

Prerequisites: See Prepare Polyspace as You Code Installation.

To install Polyspace as You Code interactively, at the command line, navigate to the folder that contains the Polyspace as You Code installer and enter the commands listed in this table, depending on your operating system.

Windows®

setup.exe

You can also start the installer by double-clicking the setup.exe binary.

Linux®./install.sh

Note

If you install the Polyspace as You Code Eclipse plugin on Linux, see Configure Eclipse for Supported Java Version on Linux.

Polyspace as You Code installer interface

In the Polyspace as You Code installation wizard, click Next and follow the prompts to complete the installation.

  • If you do not have a license file available, you may skip the License selection step and provide a license at a later time.

    To complete the installation, after you obtain the network.lic license file from your Polyspace administrator, copy that file to the licenses folder located in the Polyspace as You Code installation folder. For instance /usr/local/PolyspaceAsYouCode/R2024a/licenses.

  • If you install the IDE extensions:

    • The installer might take some time before you can proceed to the next installation step.

    • Before you start using Polyspace as You Code, you must complete the configuration of the extensions. See Polyspace as You Code IDE Extension Settings.

Uninstall Polyspace as You Code Interactively

  1. Go to the Uninstall folder located in your Polyspace as You Code installation folder, for instance C:\Program Files\Polyspace as You Code\R2024a\Uninstall.

  2. Start the Uninstall.exe binary (Windows) or the Uninstall script (Linux).

The operation uninstalls Polyspace as You Code and the IDE extensions.

Install Polyspace as You Code Noninteractively

Prerequisites

— See Prepare Polyspace as You Code Installation.

When installing noninteractively, you can either:

  • Start the installer by using a properties file where you specify your installation configuration.

  • Start the installer by using the -silent option to install only the Polyspace as You Code analysis engine.

Install Polyspace as You Code by Using Installer Properties File

To specify your installation configuration in a properties file and install Polyspace as You Code noninteractively:

  1. Edit the installer properties file. A template installer properties file is located in installerRoot/Docs/installer.properties, where installerRoot is the folder that contains the Polyspace as You Code installer.

  2. At the command line, navigate to the folder that contains the Polyspace as You Code installer. Depending on your operating system, enter one of the commands listed in this table.

    Windows

    setup.exe -f installerPropertiesFile

    Linux./install.sh -f installerPropertiesFile

    installerPropertiesFile is the full file path to the installer properties file.

For example, to install Polyspace as You Code in folder C:\Program Files\Polyspace as You Code\R2024a with license file C:\Polyspace\licenses\network.lic, specify the following installer properties file. The line INSTALL_VS_PLUGIN=true enables the installation of the Visual Studio extension.

# Installer properties file
# Uncomment the line below to launch the installer in silent mode.
INSTALLER_UI=silent

# Uncomment the line below and specify an installation folder path or
# leave line commented to install in default installation folder.
# Enter '\' characters in the folder path as '\\', for instance:
# C:\\Program Files\\Polyspace as You Code\\R2024a
USER_INSTALL_DIR=C:\\Program Files\\Polyspace as You Code\\R2024a

##### Begin - Windows only options #####
# Set to true to install the Visual Studio extension.
INSTALL_VS_PLUGIN=true
##### End   - Windows only options #####

# Set to true to install the Visual Studio Code extension.
INSTALL_VSCODE_PLUGIN=false
# If INSTALL_VSCODE_PLUGIN is set to "true", provide the path to the 
# Visual Studio Code installation folder, for instance /usr/share/code
VSCODE_INSTALL_FOLDER=

# Set to true to install the Eclipse extension.
INSTALL_ECLIPSE_PLUGIN=false
# If INSTALL_ECLIPSE_PLUGIN is set to "true", provide the path to the 
# Eclipse executable
ECLIPSE_EXECUTABLE_PATH=

# Provide the path to the license file. The file will be copied to <install_root>/licenses.
LICENSE_FILE=C:\\Polyspace\\licenses\\network.lic

# Keep true to improve Polyspace by sending user experience information to MathWorks.
# Set to false to not send information to MathWorks.
# See details here: https://www.mathworks.com/support/faq/user_experience_information_faq.html
SEND_UX_INFO_TO_MW=true

Note

If you install the Polyspace as You Code Eclipse plugin on Linux, see Configure Eclipse for Supported Java Version on Linux.

Install Only Polyspace as You Code Analysis Engine

To install only the Polyspace as You Code analysis engine without opening the graphical interface, start the installer binary by using the -silent flag. The installer installs Polyspace as You Code to these default locations, based on your operating system:

Windows C:\Program Files\Polyspace as You Code\R2024a
Linux/usr/local/PolyspaceAsYouCode/R2024a
macOS/Applications/PolyspaceAsYouCodeR2024a

To specify a different installation path, use the -install-dir flag, for instance ./install.sh -silent -install-dir /local/myFolder.

To complete the installation, copy your Polyspace Access network.lic license file to the licenses folder located in the Polyspace as You Code installation folder. For instance /usr/local/PolyspaceAsYouCode/R2024a/licenses.

Uninstall Polyspace as You Code Noninteractively

To uninstall Polyspace as You Code without opening the graphical interface:

  1. Go to the Uninstall folder located in your Polyspace as You Code installation folder, for instance C:\Program Files\Polyspace as You Code\R2024a\Uninstall.

  2. Start the Uninstall.exe binary (Windows) or the Uninstall script (Linux or macOS) by using the -i silent flag.

The uninstall operation removes Polyspace as You Code and the IDE extensions.

Related Topics


1 It is likely that Polyspace as You Code will run successfully with a later version, however, there might be certain issues.

2 If your version of Visual Studio Code uses the Workspace Trust feature, the Polyspace as You Code extension is disabled when you open a folder in Restricted Mode. To enable the extension, mark the folder as trusted. See Workspace Trust.

3 If you install the Polyspace as You Code Eclipse plugin on Linux, see Configure Eclipse for Supported Java Version on Linux.