Protobuf generator and bindings for Qt framework

Viktor Kopp a400a94f56 Async reply emits either error (failure) or finished (success) signals 5 سال پیش
3rdparty d4b0e93ab9 Tune windows build procedure 5 سال پیش
cmake d4b0e93ab9 Tune windows build procedure 5 سال پیش
examples ec1f319ad7 Add convenience bash script to run examples 5 سال پیش
src a400a94f56 Async reply emits either error (failure) or finished (success) signals 5 سال پیش
tests a400a94f56 Async reply emits either error (failure) or finished (success) signals 5 سال پیش
.gitignore 7495ae7751 Initial version of generator 5 سال پیش
.gitmodules d4b0e93ab9 Tune windows build procedure 5 سال پیش
CMakeLists.txt 26a2bfb261 Introduce AbstractClient::error signal ( #108 #111 ) 5 سال پیش
Doxyfile.in 8e66d1727c Doxygen for header byte encoder/decoder 5 سال پیش
LICENSE 3beab4ea24 Implement move semantic for generated classes, update copyrights. 5 سال پیش
ProjectConfig.cmake.in b289fe37b4 Fix cmake dependencies for file generation 5 سال پیش
README.md 54e9901bba Fix build threads definition in README 5 سال پیش

README.md

QtProtobuf

Protobuf plugin to generate Qt classes

Linux Build

Prerequesties

Check installation of protobuf and grpc in your system. Minimum required versions are protobuf-3.6.0 and grpc-1.15.0.

Note: Older versions could be supported as well but not officially tested.

All-in-one build

If required versions of libraries are not found in your system, you may use all-in-one build procedure for prerequesties

Clone grpc project from official repository to 3rdparty folder:

git submodule update --init --recursive

Build

mkdir build
cd build
cmake ..
cmake --build . [--config <RELEASE|DEBUG>] -- -j<N>

Windows Build

Prerequesties

Download and install:

  • Qt 5.12.3 or higher 1
  • cmake-3.1 or higher 2
  • Strawberry perl 5.28 3
  • GoLang 1.10 or higher 4
  • Yasm 1.3 or higher 5
  • Actual Visual Studio Compiler with cmake support that required by Qt 6

Note: All applications should be in PATH

Clone grpc project from official repository to 3rdparty folder:

git submodule update --init --recursive

Build

Open Qt MSVC command line and follow steps:

"C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsall.bat" amd64
cd <directory with qtprotobuf project>
mkdir build
cd build
cmake ..
cmake --build . [--config <RELEASE|DEBUG>] -- /m:<N>

Usage

protoc --plugin=protoc-gen-qtprotobuf=<path/to/bin>/qtprotobuf --qtprotobuf_out=<output_dir> <protofile>.proto [--qtprotobuf_opt=out=<output_dir>]

Running tests

cd <build directory>
ctest