Skip to content

Windows Protobuf How To

Felix Maier edited this page Sep 5, 2016 · 6 revisions

WIP

This is installation for Windows 10 64bit

Requirement

Install All the apps required

Install files your download from Microsoft - Visual Studio Community and you will go to the setup pages and choose custom installation. Please check Programing Language > Visual C++ and Common Tools > GIT for Windows [3rd party].

Complete the installation which will takes some times.

Install the latest Phyton 2.7.x only do not install other version because Protobuf will require 2.7.x to complete its installation. Also be sure that phyton will be listed on the Windows PATH.

Install the CMAKE and complete its intallation and be sure just like python 2.7.x you have to be sure that CMAKE also listed on Windows PATH

If you already install Node.JS for POGO Server than you can skip this part. Install the latest node.js and complete its intallation and be sure just like python 2.7.x you have to be sure that node.JS also listed on Windows PATH

Begin compiling protobuf

I recommended that you restart the PC just to be safe after install all this packages.

Using Windows PowerShell (running as Administrator just to be safe) you will need to check all the requirement apps to be sure the version is correctly installed type [APPS] --version and it should show you the version of that apps. For example: python --version

Next you will need to set a Directory where you can install protobuf. For example: C:\Users[USERS]\Downloads Go to that directory using PowerShell type CD ~\Downloads and then begin with this command in batch:

  • mkdir protobuf
  • cd protobuf
  • mkdir install
  • git clone -b v3.0.0 https://github.com/google/protobuf.git
  • cd protobuf
  • git clone -b release-1.7.0 https://github.com/google/googlemock.git gmock
  • cd gmock
  • git clone -b release-1.7.0 https://github.com/google/googletest.git gtest
  • cd ../cmake
  • mkdir build\release

On Windows run Visual C++ 2015 x64 Native Build Tools Command Prompt on its command prompt type cd \Users\[USER]\Downloads\protobuf\protobuf\cmake\build\release\ Next you will need to copy paste and run this command:

  • cmake -G "NMake Makefiles" ^
  • -DCMAKE_BUILD_TYPE=Release ^
  • -DCMAKE_INSTALL_PREFIX=../../../../install ^
  • ../..

After this completed you will need to type nmake and then nmake check (do not worried if you have 5 error) and last but least nmake install

Your protobuf will be available on C:\Users[USERS]\Downloads\protobuf\install\

This will complete your protobuf How-To