Download
protobuf-patch-0.1.0.gz
protobuf-patch-0.1.0.zip
The source patch for the Protocol Buffers project, which includes the following:
- Enhancements to the C++, Java, and Python Slice compilers, as well as the Ice for Python extension.
- Sample programs in C++, Java, and Python that demonstrate the use of Protocol Buffers in an Ice application.
Requirements
In order to use Protocol Buffers in Ice, your system must meet the following requirements:
- Ice 3.3.0 source distribution
- Protocol Buffers 2.0.0beta
- Patch utility
- Supported platform and C++ compiler
We have tested this project on Windows, Linux, and Mac OS X using compilers that Ice supports. The only notable issue we found is that Protocol Buffers requires Python 2.4 or later, which means a Red Hat Enterprise Linux 4.x user will need to upgrade from the older version of Python bundled with that system in order to use Protocol Buffers with Python.
Patching and Building Ice
Windows
You will need the patch utility in order to apply the source code patch. An executable is available at Sourceforge.
The instructions for applying the patch make several assumptions:
- You have extracted the Ice source distribution into C:\Ice-3.3.0
- The patch is located in C:\protobuf.patch
- The patch utility is in your PATH
- Change to the Ice source directory:
> cd \Ice-3.3.0
- Apply the patch:
> patch -p0 --binary < C:\protobuf.patch
- If everything worked successfully, you will see a series of messages showing the files that have been added or modified. Upon completion, proceed with building Ice for C++ using the instructions provided in the file C:\Ice-3.3.0\cpp\INSTALL.WINDOWS. If you are interested in using Protocol Buffers in Python, you must also build a new version of the Ice for Python extension using the instructions in C:\Ice-3.3.0\py\INSTALL.
Note that the new sample programs added by this patch must be compiled separately. Please refer to the README files in the directories cpp\demo\Ice\protobuf and java\demo\Ice\protobuf for more information. Also see Windows Notes for details about the installation requirements for Protocol Buffers on Windows.
Linux and Mac OS X
The instructions for applying the patch make the following assumptions:
- You have extracted the Ice source distribution into ~/Ice-3.3.0
- The patch is located in ~/protobuf-patch-0.1.0
- Change to the Ice source directory:
% cd ~/Ice-3.3.0
- Apply the patch:
% patch -p0 < ~/protobuf-patch-0.1.0
- If everything worked successfully, you will see a series of messages showing the files that have been added or modified. Upon completion, proceed with building Ice for C++ using the instructions provided in the INSTALL file for your platform, such as ~/Ice-3.3.0/cpp/INSTALL.LINUX. If you are interested in using Protocol Buffers in Python, you must also build a new version of the Ice for Python extension using the instructions in ~/Ice-3.3.0/py/INSTALL.
Note that the new sample programs added by this patch must be compiled separately. Please refer to the README files in the directories cpp/demo/Ice/protobuf and java/demo/Ice/protobuf for more information.
Windows Notes
The build system for the C++ sample program assumes that you have compiled the Protocol Buffers distribution and manually installed it using the following directory structure:
- %PROTOBUF_HOME%\bin
Contains protoc.exe and the DLLs (libprotoc.dll and libprotobuf.dll).
- %PROTOBUF_HOME%\lib
Contains the library and PDB files.
- %PROTOBUF_HOME%\include
Contains the output of the extract_includes.bat batch file that copies the include files contained in the Protocol Buffers distribution.