JavaScript is not currently enabled, but is required for full CodeSonar manual search and browse functionality.

If you are viewing this file in your hub's Web GUI, enable JavaScript in your browser: you will also need it for GUI functionality.

If you opened this file directly from disk, your browser may be directly suppressing JavaScript functionality: certain browsers perform this suppression on local files (but not files delivered by web servers) for security reasons.

CodeSonar® 9.2p0 CONFIDENTIAL CodeSecure Inc
C and C++

Windows Build Wizard Build/Analysis

The CodeSonar build wizard allows you to build and analyze a CodeSonar project in a straightforward way that is based on your existing software build. In essence, you instruct CodeSonar to "record" relevant operations, then generate a corresponding CodeSonar project, perform the analysis, and send the results to the specified hub.

For general information, see Building and Analyzing A CodeSonar Project.

For a full description of the wizard, see section Windows Build Wizard.

The Windows build wizard is only suitable for C, C++, Java, and C# projects. For other languages, use the command line build.



When To Use

Use this method when your normal software build is carried out from the GUI of a Windows-based IDE.

The Build Wizard

Since the build wizard works by recording the behavior of your build system, you need to have the relevant applications open before running the wizard.

The wizard can be invoked:

There are four screens:

Screen 1
  • Specify where CodeSonar should store local analysis files in the Save As field.
  • Specify the hub project with which to associate the analysis in the Project field.
  • Specify a hub location (as host:port) in the Hub field.
  • Specify hub authentication behavior in the Auth field.
  • Use the Analysis field to specify whether the analysis should be managed locally ("Local") or remotely ("SaaS" for CodeSonar SaaS analyses, "Custom" otherwise).
  • Select Install Services if you want to run the hub as a service, unselect it otherwise.
    We recommend using services unless services cause problems for the user. For more information, see section CodeSonar as a Windows Service.
  • Click Next.
The Recent Configurations pull-down menu provides a shortcut to specifying a build configuration for your project by allowing you to choose a recently-built project and duplicate its configuration.
Screen 2
  • If you are building a C or C++ software project with CodeWarrior, see the additional information in section Using CodeSonar With CodeWarrior.
  • The Presets field allows you to select a configuration preset for the build/analysis.
  • The Configuration File field contains "Custom" if there is already a configuration file for the project (in which case CodeSonar will use the settings in that file), and "Default" otherwise (in which case CodeSonar will create a configuration file for the project and populate it with default settings).
    • If the Configuration File field reads "Custom" and you want to go back to the standard default settings, delete the project configuration file.
    • Click Change to change the settings. The project configuration file will open in a text editor: edit the file as necessary, then save and close it.
  • The Watch field lists the processes that CodeSonar will watch in order to record any compilations.

    In most cases it is simplest to watch everything. The exception is when multiple software builds are taking place on your machine. In order to make sure that CodeSonar records only the compilations for the software project you are interested in, click Change and use the dialog box that opens to select the processes that you want to be recorded.

  • Click Record to start the CodeSonar build.

    One or more dialogs may be displayed. The set of dialogs depends on several factors, including your selections on screen 1, your local system configuration, and the configuration of the hub you are using. For details, see Windows Build Wizard: Screen 2: Record.

    Once you have worked through the these dialogs, screen 3 will open.

Screen 3 When screen 3 first opens, it displays a message telling you to build your project.
  • Build your software project.
    Important: Only compilations that take place while CodeSonar is "recording" will be recognized, so make sure that all source files in your application are compiled. For example, if you are using Microsoft Visual Studio, build with Rebuild All.

As the your software build progresses, this screen displays any output from the recognized commands.

  • When your software project has finished building, click Finalize.

    CodeSonar will then finish building the CodeSonar project according to the compilations it has recorded, then analyze it and send the results to the hub you specified on screen 1.

Screen 4 Displays the URL of the Analysis page containing the CodeSonar results for this analysis run (this will be a URL on the hub you specified on screen 1).
  • To start browsing the analysis results, click Browse Project.
 

To report problems with this documentation, please visit https://support.codesecure.com/.