-
Notifications
You must be signed in to change notification settings - Fork 197
Windows Protobuf How To
WIP
This is installation for Windows 10 64bit
- Microsoft visual Studio Community (2015 recommended but older will probably work): https://www.visualstudio.com/downloads/download-visual-studio-vs
- Python (tested with 2.7) ---select add to PATH during installation!!! https://www.python.org/ftp/python/2.7.12/python-2.7.12.msi
- Node.JS with npm (current and 4.4.7 should both work) https://nodejs.org/en/
- CMAKE (64-bit installer) https://cmake.org/download/
- Protobuf version 3+ https://github.com/google/protobuf/tree/master/cmake
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
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