Phil for Humanity Phil for Humanity
A Guide for the Survival of Humankind and Helping the World, Society, and Yourself.



Perforce Client Setup


Here are the instructions for setting up a Perforce client on a Windows computer.
  1. Download and install the Perforce clients. I strongly recommend installing both the graphical user interface (GUI) and the command line interface (CLI) clients of Perforce. Install these applications on your primary partition (C:).
  2. After installing the GUI client, execute it. Upon startup for the first time, Perforce will ask you for the Perforce server information that your Perforce Administrator can/must provide.
  3. I recommend that you have a single partition, such as D:, for storing your Perforce workspace. No other application should use this partition. So, create your first workspace directory like this: D:\p4_d\.
  4. In this new directory, create a configuration/text file, called “P4CONFIG” without any file extension, with only these 2 lines in it. Change the "userid" to your actual user id.

    P4USER=userid

    P4CLIENT=userid_d

  5. Run “P4 set P4CONFIG=P4CONFIG” to specify to Perforce the filename of your P4CONFIG file that you just created. I recommend keeping the filename the same as the variable name.
  6. Next, create a workspace using the Perforce GUI (Connection -> New Workspace...). I recommend for the name of your first workspace to be "_d" as defined in the P4CONFIG file above. Set your root directory to the workspace directory that you create in step #3 above, such as D:\p4_d\. You will need to define your Client Spec "View" here too. Here is an example to bring in a Main Branch to your workspace directory:

    //depot/main/... //userid_d/main/...

  7. From the GUI, sync the entire Main Branch directory to your workspace. This will copy the entire Main Branch to your local workspace (hard drive).
When done syncing, you are ready to start using Perforce.

by Phil for Humanity
on 20110722

Related Articles
 » Perforce Client
 » Perforce Sync
 » Perforce Print