Embedded-AMS / EmbeddedProto

Embedded Proto is a C++ Protocol Buffers implementation specifically suitable for microcontrollers. It is small, reliable and easy to use.
https://embeddedproto.com
210 stars 38 forks source link

Trouble getting venv to work on Ubuntu 18.04 #2

Closed Michaelhobo closed 3 years ago

Michaelhobo commented 4 years ago

Setup steps: Installed python3, pip, venv, protobuf, git, cmake, etc. Ran setup.sh script

Problem: All paths in protoc-gen-eams are relative. When generating protos from a different directory, these paths all fail to resolve.

Solution: Add $(dirname $0) in front of both ./venv/bin/python and generator/protoc-gen-eams.py

sgerbino commented 3 years ago

It would be nice to leverage protoc-gen-eams from an external directory (e.g. when utilizing the CMake macro protobuf_generate).

BartHertog commented 3 years ago

@sgerbino It is likely we will pick this up with a next minor release.

BartHertog commented 3 years ago

@Michaelhobo Dirname has been implemented. Sorry for this long delay in this simple ticket.

BartHertog commented 3 years ago

@sgerbino Implemented the dirname solution. It is in develop, I have not tested it with protobuf_generate, will you let me know it it works for you?

BartHertog commented 3 years ago

@Michaelhobo @sgerbino It is now in version 2.3.2

sgerbino commented 3 years ago

I'm currently used a hacked up version of your fixes in 2.x and 3.0 release here: https://github.com/koinos/EmbeddedProto

I won't be able to test it out until the 3.0 release @BartHertog

Thanks for this update, I will let you know as soon as it's available in the 3.0 version

BartHertog commented 3 years ago

@sgerbino I will merge the current 2.x state in to the release candidate branch probably in the coming week.