{"id":1515,"date":"2016-09-20T13:22:24","date_gmt":"2016-09-20T18:22:24","guid":{"rendered":"http:\/\/www.jaimerios.com\/?p=1515"},"modified":"2016-09-20T13:22:24","modified_gmt":"2016-09-20T18:22:24","slug":"how-to-install-perforce-dvcs","status":"publish","type":"post","link":"https:\/\/jaimerios.com\/?p=1515","title":{"rendered":"How to install Perforce DVCS"},"content":{"rendered":"<p><strong>Introduction<\/strong><br \/>\nFor 9 years now, I\u2019ve used Perforce; before that, it was MKD, Subversion, VisualSourceSafe, CVS and a few others.<\/p>\n<p\/>\nIn the past year, I used Git. <\/p>\n<p\/>\nOne cool thing that Git has that Perforce didn&#8217;t have was being able to save your changes while not being connected to a central server.<\/p>\n<p\/>\nHowever, Perforce recently added native DVCS to their source control tools so, checkouts and submits are now possible while offline.<\/p>\n<p\/>\nHere are the steps you need to take if you want to use Perforce DVCS on your computer. Note, I\u2019m using macOS, so my instructions are for that platform only.<\/p>\n<p\/>\n<p\/>\n<strong>Installation steps<\/strong><br \/>\n<strong>Step 1<\/strong>: download Helix server at <a href=\"https:\/\/www.perforce.com\/downloads\/helix\" target=\"_blank\" rel=\"noopener\">https:\/\/www.perforce.com\/downloads\/helix<\/a><br \/>\nYou will need both p4d and p4 command line utilities, so head over to <a href=\"https:\/\/www.perforce.com\/downloads\/helix\" target=\"_blank\" rel=\"noopener\">https:\/\/www.perforce.com\/downloads\/helix<\/a> and download the \u201cHelix Server\u201d for your machine.<\/p>\n<p\/>\n<strong>Step 2<\/strong>: Double-click the tar file to extract it<br \/>\nI think this step speaks for itself; on my computer I was able to double-click the tar file and everything appeared in a new folder.<\/p>\n<p\/>\n<strong>Step 3<\/strong>: Make a folder for the binaries to live in<br \/>\nI created a bin folder in ~\/Perforce\/. I happen to have a dedicated Perforce folder in my home directory that I use for a lot of projects and the bin directory seemed to be a logical place to store the files.<\/p>\n<p\/>\nFrom the command line you can type the following to make the folder:<br \/>\n<code>mkdir -p ~\/Perforce\/bin<\/code><\/p>\n<p\/>\n<strong>Step 4<\/strong>: Copy the binaries to the bin folder<br \/>\nCopy the p4d and p4 command line utilities to the ~\/Perforce\/bin folder (or whatever folder you just created)<\/p>\n<p\/>\n<strong>Step 5<\/strong>: Add the path to the PATH environment variable<br \/>\nI edited my ~\/.bash_login file using emacs to add the following:<br \/>\n<code>export PATH=~\/Perforce\/bin:$PATH<\/code><\/p>\n<p\/>\n<strong>Step 6<\/strong>: Load the Perforce bin path<br \/>\nRelaunch Terminal.app or open a new Terminal Window or source your .bash_login via<br \/>\n<code>source ~\/.bash_login<\/code><\/p>\n<p\/>\n<strong>Step 7<\/strong>: Init your offline project<br \/>\nHere is how I got up and running:<br \/>\n<code>cd WATEVA\/PROJECT\/FOLDER\/<br \/>\np4 init -C1 -n<br \/>\n<\/code><\/p>\n<p\/>\nThe extra settings after init tell p4 what case-sensitivity is should use and whether or not to enable Unicode support. If I didn&#8217;t add those, p4 would try to find a server to copy those settings from and that won&#8217;t work for me.<\/p>\n<p\/>\n<strong>Step 8<\/strong>: Enjoy<br \/>\nFrom here, you use the Terminal.app and p4 to perform all of your Perforce commands and enjoy the goodness that is Perforce&#8230; like the super-large-file-support-without-choking feature \ud83d\ude09<\/p>\n<p\/>\n","protected":false},"excerpt":{"rendered":"<p>Introduction For 9 years now, I\u2019ve used Perforce; before that, it was MKD, Subversion, VisualSourceSafe, CVS and a few others. In the past year, I used Git. One cool thing that Git has that Perforce didn&#8217;t have was being able to save your changes while not being connected to a central server. However, Perforce recently &#8230; <a title=\"How to install Perforce DVCS\" class=\"read-more\" href=\"https:\/\/jaimerios.com\/?p=1515\" aria-label=\"Read more about How to install Perforce DVCS\">Read more<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3,32,34],"tags":[167,178,340,349,409],"class_list":["post-1515","post","type-post","status-publish","format-standard","hentry","category-coding","category-tools","category-utility","tag-distributed","tag-dvcs","tag-p4","tag-perforce","tag-source-control"],"_links":{"self":[{"href":"https:\/\/jaimerios.com\/index.php?rest_route=\/wp\/v2\/posts\/1515","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/jaimerios.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/jaimerios.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/jaimerios.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/jaimerios.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1515"}],"version-history":[{"count":0,"href":"https:\/\/jaimerios.com\/index.php?rest_route=\/wp\/v2\/posts\/1515\/revisions"}],"wp:attachment":[{"href":"https:\/\/jaimerios.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1515"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jaimerios.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1515"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jaimerios.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1515"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}