almindor / etherwall

Ethereum QT5 Wallet
GNU General Public License v3.0
142 stars 59 forks source link

Include a script to regenerate the protobuf messages #33

Closed hegjon closed 7 years ago

hegjon commented 7 years ago

Could you include a script for regenerate the protobuf messages, then it is possible to build on a different version that you generated with.

Here is how python-trezor does it: https://github.com/trezor/python-trezor/blob/master/build_pb.sh

jonny@jonny-thinkpad ~/projects/etherwall ((HEAD detached at v2.0.1)) {1.8}{6.9.4} $ qmake-qt5 -config release
jonny@jonny-thinkpad ~/projects/etherwall ((HEAD detached at v2.0.1)) {1.8}{6.9.4} $ make
g++ -c -pipe -O2 -Wall -W -D_REENTRANT -fPIC -DQT_NO_DEBUG -DQT_QUICK_LIB -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_QML_LIB -DQT_WEBSOCKETS_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -I. -Isrc -isystem /usr/include/hidapi -isystem /usr/include/qt5 -isystem /usr/include/qt5/QtQuick -isystem /usr/include/qt5/QtWidgets -isystem /usr/include/qt5/QtGui -isystem /usr/include/qt5/QtQml -isystem /usr/include/qt5/QtWebSockets -isystem /usr/include/qt5/QtNetwork -isystem /usr/include/qt5/QtCore -I. -I/usr/lib64/qt5/mkspecs/linux-g++ -o main.o src/main.cpp
In file included from src/trezor/trezor.h:10:0,
                 from src/accountmodel.h:34,
                 from src/main.cpp:34:
src/trezor/proto/messages.pb.h:12:2: error: #error This file was generated by a newer version of protoc which is
 #error This file was generated by a newer version of protoc which is
  ^~~~~
src/trezor/proto/messages.pb.h:13:2: error: #error incompatible with your Protocol Buffer headers. Please update
 #error incompatible with your Protocol Buffer headers.  Please update
  ^~~~~
src/trezor/proto/messages.pb.h:14:2: error: #error your headers.
 #error your headers.
  ^~~~~
In file included from src/trezor/trezor.h:10:0,
                 from src/accountmodel.h:34,
                 from src/main.cpp:34:
src/trezor/proto/messages.pb.h:25:10: fatal error: google/protobuf/generated_message_table_driven.h: No such file or directory
 #include <google/protobuf/generated_message_table_driven.h>
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make: *** [Makefile:949: main.o] Error 1
jonny@jonny-thinkpad ~/projects/etherwall ((HEAD detached at v2.0.1)) {1.8}{6.9.4} $ protoc --version
libprotoc 3.2.0
almindor commented 7 years ago

Hey,

good point, I had something like this in mind too. I'll try and push this in before the 2.0.2

NOTE: misclicked close :)

hegjon commented 7 years ago

Great

hegjon commented 7 years ago

I got it to work :)

Do you feel that etherwall is stable enough to include in the standard Fedora repository? I maintain some Bitcoins packages already https://fedoraproject.org/w/index.php?title=User:Jonny

almindor commented 7 years ago

Well I'm pretty happy with it since v2.0.0 :)

Ultimately it's your decision. If you mean "stable" as in no big changes planned, then definitely, I don't plan any major overhauls. If you mean "doesn't crash" well I'm not aware of any major bugs, but that doesn't mean there aren't any.

If it's added can you send me a ping? :) I'll add the info to downloads page.

hegjon commented 7 years ago

Nice, I mean stable as in a mix, that you are not planning to change major dependencies and that you are happy about the program. It would be great if you maintain a stable branch for some months if you make major changes.

I have started on the geth dependency[1], but I need to make packages for missing vendor dependencies before I can include go-ethereum into the official repository, since Fedora discourage bundled libraries [2].

[1] https://jonny.fedorapeople.org/go-ethereum.spec [2] https://fedoraproject.org/wiki/Bundled_Libraries?rd=Packaging:Bundled_Libraries

almindor commented 7 years ago

One thing to keep in mind is that geth is a very moving target and etherwall as well due to it (I have to package them together for windows/mac so it's release per release usually). Newer etherwall might reject older versions of geth on the system if they're known to have a security or compatibility issue.