The Ten-Minute Test Drive for Macintosh

This version is for Macintosh using the Perforce Visual Client (P4V).
There's also a version for Windows, for Linux/Unix, and for the command line.

Introduction

This page tells you how to get a simple Perforce installation up and running in ten minutes. You'll set up the Perforce Server and the Perforce Visual Client (P4V) on the same machine. You must be an experienced Macintosh user.

If you need more guidance setting up a demo, please visit the Technical Support page for contact options.

Installing Perforce

The commands in this section require the use of the Terminal application located in:

	<System>/Applications/Utilities/Terminal

Create a directory to hold the Perforce programs you will be downloading by opening a Terminal window and typing the following command:

	mkdir ~/perforce	

Go to our downloads page and download the server executable (p4d), P4V (p4v.dmg), and the Perforce Command-Line Client (P4) for your platform. Put the programs in your ~/perforce directory.

Make the server executable, then start it (root permission not required) by issuing the following commands from the Terminal window:

	cd ~/perforce
	chmod a+x p4d
	p4d -d

You need a client workspace to work with files in Perforce. For this demo, create a client workspace in your home directory by issuing the following commands in the Terminal window:

	mkdir ~/myws
	cd ~/myws
	p4 client myws

This puts you in the editor. Just quit—the defaults are fine.

Trying Perforce

You now have everything you need to use Perforce on your machine. The demo is limited to two users and five client workspaces, but all Perforce features are available to you. Here are some things you can try:

Getting Started

In the Finder, open p4v.dmg and launch P4V.

On the P4V Open Connection dialog, do the following:

  1. Enter localhost for Server.
  2. Enter 1666 for Port.
  3. Click the New button next to User.
  4. Enter User information and select Save.
  5. Click the New button next to Open Workspace.
  6. Enter myws for Workspace.
  7. Click the OK button.

Now you see P4V's main screen. Notice that there are no files in the depot or workspace yet—that's what the next step is all about.

Adding New Files to the Perforce Depot

Here's how to add files to the depot:

  1. Put some sample files into the workspace directory (~/myws).
  2. In P4V, click the Workspace tab (lower left) and press F5 to refresh the display.
  3. Right-click the workspace folder and choose Mark for Add.
  4. Click the toolbar button and see your pending changelist on the right.
  5. Right-click and choose Submit.
  6. Enter a description and click the Submit button.

The files you added are now in the depot.

Working Files

The files you added are now under Perforce's control. Now you can check them out, modify them, and submit them.

  1. In the left pane, right-click a file and choose Check Out.
  2. Double-click the file to edit it. (To pick an editor, right-click the file and choose Open With...).
  3. In P4V, right-click the file and choose Submit.
  4. Enter a description and click the Submit button.
  5. Right-click another file and choose Rename/Move... .
  6. Pick a new name and location and submit your change.

You've done the basics—feel free to explore more P4V features.

Cleaning Up

After you're done, uninstall your Perforce demo so that you don't confuse it with any working Perforce installation you install later:

  1. Quit P4V.
  2. Stop P4D by issuing p4 admin stop from the Terminal window.
  3. Delete the ~/perforce and ~/myws directories:
    rm -rf ~/perforce
    rm -rf ~/myws
    

For More Information

The Perforce commands shown in this demo are just to get you started. For more information, consult the following sources:

If you have questions about Perforce or comments on this demo, please email us at support@perforce.com.