Working with Multiple Clients

Perforce requires a client specification to access files on the server. LabVIEW uses the command line interface to send requests to Perforce. By default, Perforce's environmental variables are used to specify the user and client. If you would like to use multiple clients for your projects, Perforce provides a mechanism by which you can automatically select a different client depending on the directory from which you are working.

You can set Perforce's environmental variable, P4CONFIG, to the name of a text file, such as p4config.txt, which is saved in the root directory of each client. The text file contains the environmental variables that Perforce requires (P4CLIENT, P4PORT, P4USER, P4PASSWD). When you set the P4CONFIG variable, Perforce searches for the file in the directory from which the command is executed. If it finds the file, it uses the variables inside to access the server. If not found, Perforce uses the default variables.

Complete the following steps to create a P4CONFIG file.

  1. Select Tools»Source Code Control»Configure SCC Options to open the Configure SCC Options dialog box.
  2. Click the Configure button to open the Select your Perforce configuration options dialog box.
  3. Click the Create P4CONFIG File button to display the P4CONFIG dialog box.
  4. Select the User Name and Password. By default, the user name is your LabVIEW user name.
  5. Select the Port. If the desired port is not listed, add one by clicking the Add Port button. Be sure to add the colon and the appropriate port.
  6. Select the Client. Click the Get Clients button to login to the selected port and request all the clients. You can use the filter to search the client list for the specified string.
  7. Click Save to save the P4CONFIG file. The Save dialog box defaults to the root directory of the client that you selected. Windows and Macintosh The P4CONFIG environmental variable is set to the filename you selected. Users on other platforms must set P4CONFIG in their login script.