Using Perforce with LabVIEW

Perforce is a Configuration Management tool for software development. Although it can be used to manage large multi-developer projects, the context of this article is to use it as a Source Control system with LabVIEW as a single developer. The Perforce Server also has a web based version. This article describes only the windows server and client installed on the same machine. Please refer to the perforce website at for more information on other Perforce installation scenarios.

Licensing and Compatibility
The free version of Perforce provides a 2 user, 5 client workspace license. For additional users and/or workspaces, you must purchase Perforce. The alternatives to Perforce (for LabVIEW 8.2) are: Microsoft Visual SourceSafe, Rational ClearCase, PVCS (Serena) Version Manager, MKS Source Integrity, and CVS with the Push Ok Windows client software.

To get Perforce running on your Windows system, download and install both the "Perforce Server Windows Installer" and the "P4V Installer" (in that order). Install the server with the "Administrator - Typical" radio button checked.

P4V is essentially the client and developer user interface, and although the LabVIEW Project Explorer can virtualize this, it is often necessary to have Perforce open as well since LabVIEW doesn't have all of the features (i.e revert if unchanged). The server runs in the background, and as mentioned above, can be run web based with remote client connections.

Installation and Repository considerations

Although the download will guide you through an installation, Perforce (as of 04/06/07) does NOT provide a standard uninstaller via the Start->Control Panel->Add/Remove Programs panel. A subsequent download and reinstallation of the program will be necessary, and will provide an uninstall radio button option (reminiscent of an old LabVIEW Application Builder "feature" where the user had to re-run the installer to uninstall). My experiences with uninstalling various versions of Perforce is that it has been challenging, nicely put.

A "Repository" is where all checked-in source code modifications will reside. In Perforce parlance, the repository is referred to as the "Depot". In Microsoft Windows, the default location for this file is:

C:\Program Files\Perforce\depot.

*NOTE*: I do meticulous backups, some people do not. Even those who do may miss backing up the repository if they are only backing up their "My Documents" folder ( a common practice). Also, creating a shortcut to the depot in your "My Documents" folder (another common practice) will not achieve a good backup, and will only backup the shortcut file. If you are backup conscious, make SURE you add the entire installed Perorce path to your backups!{mospagebreak}

Configuring LabVIEW to use Perforce

  • Start Perforce, it will prompt you to open a connection
  • Type in your computer name for "Server"
  • Click the "New..." button next to workspace to create a new workspace
  • Click "No" when prompted to populate the workspace