Install version 3.1.x and before

What is required to be able to generate source files based on .proto files:

  1. Python 3.8 and up
  2. Pip
  3. Protobuf 3.19.4 (Higher is not yet supported due to breaking changes in version 4.20 and up)
  4. Git

The following two paragraphs describe a generic installation of Embedded Proto for both Linux and Windows. If you are interested in a more specific example of how to integrate Embedded Proto into your toolchain, please visit the Examples page on the website.

Linux

Install the required software and continue checking out the repository. There is a slight difference between regular users of Embedded Proto and people intending to work on Embedded Proto itself.

For Embedded Proto users

You can clone Embedded Proto from the GitHub repo with your favorite git GUI or CLI:

git clone https://github.com/Embedded-AMS/EmbeddedProto.git

After pulling the repo, you only have to run the setup script. Running the script will create the virtual environment for the python scripts. In this environment, the required packages are installed by the setup script.

./setup.sh

After running the setup script, use the Embedded Proto protoc plugin in your projects. We have various examples of how to set up your project. You can find them in the Project Setup category on the examples page.

For Embedded Proto developers

Embedded Proto makes use of CMake 3.16.3 to build unit tests. You need to install CMake when intending to build the unit tests.

Further requirements for the unit tests are GTest and GMock. Both are included in a single git submodule. You can clone the submodule at the same time you clone Embedded Proto. Do this by using the recursive option:

git clone --recursive https://github.com/Embedded-AMS/EmbeddedProto.git

Next, you enter the Embedded Proto folder and run the setup script. This will create the virtual environment for the python scripts. In this environment, the required packages are installed by the setup script.

./setup.sh

After running the setup script, use the Embedded Proto protoc plugin in your projects. You are also ready to build the PC unit tests if you have installed CMake:

./build_test.sh

Running the unit tests is done by running the executable in the build/test folder:

./build/test/test_EmbeddedProto

Windows

Install the required software and continue checking out the repository. Unit tests have not been validated for Windows so pulling the submodule for GTest and GMock is unnecessary.

Version 3.0.0 and up

Next, enter the Embedded Proto folder and open a terminal. In this terminal, run the batch script to set up the required virtual environment for the generator and build the Embedded Proto options file. The options file is used when setting fixed repeated, string, and bytes field lengths. This options file requires a reference to google/protobuf/descriptor.proto. This file is located in your protobuf installation src folder. For example, when installing google protobuf directly on the C:\ drive, run the setup script like:

.\setup.bat C:\protobuf\src

You are now ready to use Embedded Proto in your project.

Before version 3.0.0

Next, you go to the Embedded Proto folder and run setup.bat either by clicking on it or from a command line terminal. This will create the required virtual environment for the generator to work. You can now use the Embedded Proto protoc plugin.