This section covers building the binaries for various operation systems. You only need to build the binaries if you wish to contribute to the C++ source or if you need binaries for a OS that is not supported by default.
To prepare for cmake + Microsoft Visual C++ compiler build
- Install LabVIEW 2019
- Install Visual Studio 2019 (Visual C++ compiler will be used).
- Install Git.
- Install CMake.
Launch "x64 Native Tools Command Prompt for Visual Studio"
Download the repo and update submodules, this will pull the gRPC components and all dependencies
> git clone https://github.com/ni/grpc-labview.git grpc-labview
> cd grpc-labview
> git submodule update --init --recursive
Build Debug
> mkdir build
> cd build
> cmake ..
> cmake --build .
Build Release
> mkdir build
> cd build
> cmake ..
> cmake --build . --config Release
Launch "x86 Native Tools Command Prompt for Visual Studio"
Download the repo and update submodules, this will pull the gRPC components and all dependencies
> git clone https://github.com/ni/grpc-labview.git grpc-labview
> cd grpc-labview
> git submodule update --init --recursive
Build Debug
> mkdir build
> cd build
> cmake -A Win32 ..
> cmake --build .
Build Release
> mkdir build
> cd build
> cmake -A Win32 ..
> cmake --build . --config Release
Download the repo and update submodules, this will pull the gRPC components and all dependencies
> git clone https://github.com/ni/grpc-labview.git grpc-labview
> cd grpc-labview
> git submodule update --init --recursive
Build Debug
> mkdir -p cmake/build
> cd cmake/build
> cmake -DCMAKE_BUILD_TYPE=Debug ../..
> make
Build Release
> mkdir -p cmake/build
> cd cmake/build
> cmake -DCMAKE_BUILD_TYPE=Release ../..
> make
Install required packages not installed by default
> opkg update
> opkg install git
> opkg install git-perltools
> opkg install cmake
> opkg install g++
> opkg install g++-symlinks
Download the repo and update submodules, this will pull the gRPC components and all dependencies
> git clone https://github.com/ni/grpc-labview.git grpc-labview
> cd grpc-labview
> git submodule update --init --recursive
Build Debug
> mkdir -p cmake/build
> cd cmake/build
> cmake -DCMAKE_BUILD_TYPE=Debug ../..
> make
Build Release
> mkdir -p cmake/build
> cd cmake/build
> cmake -DCMAKE_BUILD_TYPE=Release ../..
> make
This section covers building the VIP files from the labview source so that you can install them for a supported version of LabVIEW (2019 or Higher).
You would need to build the VIP files if you make changes to the LabVIEW pieces of the grpc-labview repository.
** Building of VIP files using the instructions below is only supported on Windows **
- Install LabVIEW 2019 32 bit
- Install LabVIEW CLI
- Install JKI VI Package Manager. You would need Community or Pro edition to build VIP files.
- Install VI Package Manager API for LabVIEW. (Download location)
- Install Python 3.7 or Higher
** Apart from these you would need the Prerequisites for building the binaries as well if you use the --buildcpp option described below. **
Download the repo. Run the command below to build the VIP files.
> python build-it\build.py --target <BUILD_TARGET> [--pathToBinaries <PATH_TO_PREBUILT_BINARIES>] [--buildcpp]
The accepted vaues for BUILD_TARGET are:
- Win32
- Win64
- All
If you choose to build for Win32 or Win64 target you can specify the --buildcpp option to indicate that you want to build the C++ binaries first and then use them to build VIP files. If you don't specify this option it is assumed that the required binaries are already built accoriding to the steps described above.
If you choose to build "All" target then you need to specify a folder where we can find the pre built binaries for all the supported targets using the --pathToBinaries* option. The --buildcpp option would be ignored in this mode even if specified. We expect the folder specified to have the following structure.
- <TOP_LEVEL_FOLDER>
- LabVIEW gRPC Server
- Libraries
- Win32
- Win64
- Linux
- LinuxRT
- LabVIEW gRPC Generator
- Libraries
- Win32
- Win64
- Linux