Pages: 1
  Print  
Author Topic: New Dependency on Google Protocol Buffers  (Read 13126 times)
Offline (Male) Goombert
Posted on: February 02, 2019, 09:54:42 pm

Developer
Location: Cappuccino, CA
Joined: Jan 2013
Posts: 2993

View Profile
I wanted to make sure to cover this with an announcement to keep everyone in the loop. We have now rearranged the backend to the compiler so that it now uses Protocol Buffers directly. EnigmaStruct is now deprecated and should not be used for building new command line or frontend tools that integrate with ENIGMA.
https://github.com/enigma-dev/enigma-dev/commit/a1aa34d57d91e438bf937a39d902a6556932eaec

We also had to come back and address a few regressions from this change in several games. With this, there have been no other new regressions discovered.
https://github.com/enigma-dev/enigma-dev/commit/090d1a92fa377e0f9a851ebdaa3daa325b76a497
https://github.com/enigma-dev/enigma-dev/commit/36de74c8d44871ea260506a8f8e27d684aee4253

EnigmaStruct is deprecated rather than obsolete because it is still used by LateralGM. It will likely remain that way as my development attention is staying focused at RadialGM now which uses the new Protocol Buffers directly for its data model. One advantage to the new Protocol Buffers interface is that binary compatibility can be maintained when changing the protos. This is not true of the old EnigmaStruct, and thus, tools that use it will be subject to frequent breakage as a result of the lack of binary compatibility.

Long story short, you will now need to install Google Protocol Buffers when setting up ENIGMA or the next time you update an existing installation.
Code: (bash) [Select]
# MSYS2 64-bit
pacboy -S protobuf:x
# MSYS2 32-bit
pacboy -S protobuf:i

I have also updated the Ubuntu/Linux installation instructions as well as the easy method script with the help of TKG. You will need a newer protobuf version which is why we recommend installing the dependency from Maarten Fonville's PPA which is where our Travis CI build obtains it.
https://enigma-dev.org/docs/Wiki/Install:Linux
https://github.com/enigma-dev/enigma-dev/issues/1527
Code: (bash) [Select]
sudo add-apt-repository ppa:maarten-fonville/protobuf
sudo apt-get update
sudo apt-get install libprotobuf-dev protobuf-compiler

You will also need to do a clean build of the compiler.
Code: (bash) [Select]
make clean
make -j4
« Last Edit: February 02, 2019, 11:10:33 pm by Goombert » Logged
I think it was Leonardo da Vinci who once said something along the lines of "If you build the robots, they will make games." or something to that effect.

Offline (Male) Goombert
Reply #1 Posted on: February 12, 2019, 10:34:23 pm

Developer
Location: Cappuccino, CA
Joined: Jan 2013
Posts: 2993

View Profile
Alright, a small update to this, we've finally completed the transition to Protocol Buffers over some additional pull requests and Proto2ES is no longer part of the codebase. This means the compiler uses protocol buffers directly which is handed to it by emake and RadialGM. Tools like LateralGM that use the old interface still pass an EnigmaStruct, but it is first converted into a protocol buffer before the compiler builds it.
https://github.com/enigma-dev/enigma-dev/commit/ff783971ec92ca908533fdf1c9c6d9820e60c055
https://github.com/enigma-dev/enigma-dev/commit/ce15a467134abda6a08a77328f802f7d143dbb47
https://github.com/enigma-dev/enigma-dev/commit/a8868e200f9a9242bfd5480abe81391d039991b3
https://github.com/enigma-dev/enigma-dev/commit/52f2c6a5d0862c0f0f657fb8985756a04a9635be
https://github.com/enigma-dev/enigma-dev/commit/2281c1db8f29201a834a7e2ecc97ff90424c6922
https://github.com/enigma-dev/enigma-dev/commit/62a11b04153a7029bc64ba1e696fcb8f47970a55

I have not benchmarked, but theoretically, the protocol buffers and any frontend tools that use them, including emake, should now be reaching maximum build time performance. For the time being, tools like LateralGM will continue using the deprecated EnigmaStruct interface, subject to binary-compatibility breaking changes. My next step is to finally switch us to libpng and remove lodepng from our codebase before moving on to the next big things. This should bring even quicker build times!
https://github.com/enigma-dev/enigma-dev/issues/1391
« Last Edit: February 12, 2019, 11:07:35 pm by Goombert » Logged
I think it was Leonardo da Vinci who once said something along the lines of "If you build the robots, they will make games." or something to that effect.

Pages: 1
  Print