Set up Perforce for FieldWorks

From LSDevLinux
Revision as of 13:26, 14 March 2011 by Mayhewn (talk | contribs) (Categorize)

Jump to: navigation, search

Instructions to install and configure Perforce to connect to the FieldWorks source code repository.

Install Perforce

Go to the Perforce download page, click on Linux under the Visual Client and choose either 32-bit or 64-bit, then save this file anywhere on your disk. In a terminal window:

$ sudo mkdir -p /opt/perforce
$ sudo tar -C /opt/perforce --no-same-owner --no-same-permissions -xf /path/to/p4v.tgz
$ sudo ln -s /opt/perforce/p4v-2010.1.276058/bin/p4v /usr/local/bin/p4v

In the tar command, instead of typing the path to the p4v.tgz file you can drag the file icon to the terminal window to paste its path.

In the ln command, substitute the number that is in your /opt/perforce directory. (You can press TAB to get filename auto-completion, to save typing errors.)

Add a p4v icon to your Gnome panel by following these instructions:

  • Right-click the Gnome panel and choose Add to Panel. Click Custom Application Launcher, click Add.
  • In the Name box, type p4v
  • In the Command box, type /usr/local/bin/p4v
  • Click the icon on the left in the Create Launcher dialog.
  • Choose an icon such as /opt/perforce/p4v-2010.1.276058/lib/p4v/P4VResources/icons/p4v_32_low.png
  • In the Create Launcher window, click OK.

Set up and check out from Perforce

Now run the Perforce client and get the data from Calgary/WW. You can run it by clicking the p4v icon in your Gnome panel or by typing:

$ p4v  # or /usr/local/bin/p4v

The first time you run the p4v Perforce client, it starts with a wizard. Setup perforce by following these instructions:

  • Click Yes to run the Connection Setup Wizard.
  • In the Host box, type src.sil.org (or hydra)
  • In the Port number box, type 1934 (or 1935) and click Next.
  • Click Log in to server .. with an existing user account.
  • In the User box, type your username (or anonymous if you do not have a username) and click Next.
  • Click Create a new workspace, and in the Workspace name box, type the name of your new workspace, such as lastname-fieldworks, and click Next.
  • Click No, I will copy files to my workspace later, and click Next. Click Finish.
  • In the main P4V window, choose Connection > Edit Current Workspace.
  • In the Root box, type /home/YOURUSERNAME/p4repo and click OK.
  • In the dialog box, click Change Root.
  • In the next dialog box, click Do Not Copy.
  • In the main P4V window, click the Depot tab.
  • In the Depot tree pane, navigate to //depot/Calgary/WW, right-click that WW and click Get Latest Revision. Doing this will download the repository branch to your workspace in ~/p4repo.

Updating Perforce

Your Perforce workspace can be updated to the latest code in the Perforce repository by clicking the Depot tab, navigating to //depot/Calgary/WW, right-clicking WW, and choosing Get Latest Revision.