Linux Users

cancel
Showing results for 
Search instead for 
Did you mean: 

How to Integrate Perforce or SCC with LabVIEW for Linux

Hi All,

It had been a while since I'd configured LabVIEW for Linux to use source code control, and I'd forgotten.  Since I just re-learned how to do this, I figured I would post it here for the benefit of anyone out there who's never done this or can't remember how.  It seems like this is like a lot of things in Linux: not at all complicated once you know how, but the information may not be particularly easy to find.

The problem you might encounter is that your SCC provider doesn't show up in the LabVIEW Options dialog under the "Source Control" section.

SourceControlDialog.png

On Windows, for instance, when you install the Perforce Visual Client, Perforce Command Line automatically shows up in this menu.  This, as might be expected, is not the case on Linux.  Since I'm a Perforce user, I'll use Perforce in my example.

From a relevant LabVIEW help document, you may note that "LabVIEW runs a query of environment variables to determine if Perforce is installed."

  1. If using Perforce as I am, ensure that you have the Perforce Command Line client installed (p4), even if you are using the Perforce Visual Client. (p4v)  On Linux, p4v does not include p4, and LabVIEW will not recognize p4v as an SCC provider.
  2. Once you have p4 (or the provider of your choice) installed, you'll have to add the directory within which it resides to the $PATH environment variable.  According to this tutorial, you can do this for all users except root by editing /etc/profile, or you can perform this operation for only your user by editing ~/.bash_profile or ~/.profile, depending on the distribution.  On OpenSUSE, which I am using, I edited /home/[username]/.profile.  Regardless, open the appropriate profile file in the editor of your choice.
  3. Add the following line to this file:
    export PATH=/usr/lib/p4v/bin:$PATH
    You could vary the syntax depending on your preference.
  4. Save your changes, log out and log in again.  Now LabVIEW should recognize the SCC provider.

I hope this is helpful to someone, somewhere in the future, for what it's worth.

Jim

labview_scc_ok.png

0 Kudos
Message 1 of 1
(4,252 Views)