First version of the SOurce SDK 2013
This commit is contained in:
29
sp/src/thirdparty/protobuf-2.3.0/vsprojects/config.h
vendored
Normal file
29
sp/src/thirdparty/protobuf-2.3.0/vsprojects/config.h
vendored
Normal file
@@ -0,0 +1,29 @@
|
||||
/* protobuf config.h for MSVC. On other platforms, this is generated
|
||||
* automatically by autoheader / autoconf / configure. */
|
||||
|
||||
/* the location of <hash_map> */
|
||||
#define HASH_MAP_H <hash_map>
|
||||
|
||||
/* the namespace of hash_map/hash_set */
|
||||
// Apparently Microsoft decided to move hash_map *back* to the std namespace
|
||||
// in MSVC 2010:
|
||||
// http://blogs.msdn.com/vcblog/archive/2009/05/25/stl-breaking-changes-in-visual-studio-2010-beta-1.aspx
|
||||
// TODO(kenton): Use unordered_map instead, which is available in MSVC 2010.
|
||||
#if _MSC_VER < 1310 || _MSC_VER >= 1600
|
||||
#define HASH_NAMESPACE std
|
||||
#else
|
||||
#define HASH_NAMESPACE stdext
|
||||
#endif
|
||||
|
||||
/* the location of <hash_set> */
|
||||
#define HASH_SET_H <hash_set>
|
||||
|
||||
/* define if the compiler has hash_map */
|
||||
#define HAVE_HASH_MAP 1
|
||||
|
||||
/* define if the compiler has hash_set */
|
||||
#define HAVE_HASH_SET 1
|
||||
|
||||
/* define if you want to use zlib. See readme.txt for additional
|
||||
* requirements. */
|
||||
// #define HAVE_ZLIB 1
|
||||
20
sp/src/thirdparty/protobuf-2.3.0/vsprojects/convert2008to2005.sh
vendored
Normal file
20
sp/src/thirdparty/protobuf-2.3.0/vsprojects/convert2008to2005.sh
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
#! /bin/sh -e
|
||||
|
||||
# This script downgrades MSVC 2008 projects to MSVC 2005 projects, allowing
|
||||
# people with MSVC 2005 to open them. Otherwise, MSVC 2005 simply refuses to
|
||||
# open projects created with 2008. We run this as part of our release process.
|
||||
# If you obtained the code direct from version control and you want to use
|
||||
# MSVC 2005, you may have to run this manually. (Hint: Use Cygwin or MSYS.)
|
||||
|
||||
for file in *.sln; do
|
||||
echo "downgrading $file..."
|
||||
sed -i -re 's/Format Version 10.00/Format Version 9.00/g;
|
||||
s/Visual Studio 2008/Visual Studio 2005/g;' $file
|
||||
done
|
||||
|
||||
for file in *.vcproj; do
|
||||
echo "downgrading $file..."
|
||||
sed -i -re 's/Version="9.00"/Version="8.00"/g;' $file
|
||||
done
|
||||
|
||||
# Yes, really, that's it.
|
||||
42
sp/src/thirdparty/protobuf-2.3.0/vsprojects/extract_includes.bat
vendored
Normal file
42
sp/src/thirdparty/protobuf-2.3.0/vsprojects/extract_includes.bat
vendored
Normal file
@@ -0,0 +1,42 @@
|
||||
md include
|
||||
md include\google
|
||||
md include\google\protobuf
|
||||
md include\google\protobuf\stubs
|
||||
md include\google\protobuf\io
|
||||
md include\google\protobuf\compiler
|
||||
md include\google\protobuf\compiler\cpp
|
||||
md include\google\protobuf\compiler\java
|
||||
md include\google\protobuf\compiler\python
|
||||
copy ..\src\google\protobuf\stubs\common.h include\google\protobuf\stubs\common.h
|
||||
copy ..\src\google\protobuf\stubs\once.h include\google\protobuf\stubs\once.h
|
||||
copy ..\src\google\protobuf\descriptor.h include\google\protobuf\descriptor.h
|
||||
copy ..\src\google\protobuf\descriptor.pb.h include\google\protobuf\descriptor.pb.h
|
||||
copy ..\src\google\protobuf\descriptor_database.h include\google\protobuf\descriptor_database.h
|
||||
copy ..\src\google\protobuf\dynamic_message.h include\google\protobuf\dynamic_message.h
|
||||
copy ..\src\google\protobuf\extension_set.h include\google\protobuf\extension_set.h
|
||||
copy ..\src\google\protobuf\generated_message_util.h include\google\protobuf\generated_message_util.h
|
||||
copy ..\src\google\protobuf\generated_message_reflection.h include\google\protobuf\generated_message_reflection.h
|
||||
copy ..\src\google\protobuf\message.h include\google\protobuf\message.h
|
||||
copy ..\src\google\protobuf\message_lite.h include\google\protobuf\message_lite.h
|
||||
copy ..\src\google\protobuf\reflection_ops.h include\google\protobuf\reflection_ops.h
|
||||
copy ..\src\google\protobuf\repeated_field.h include\google\protobuf\repeated_field.h
|
||||
copy ..\src\google\protobuf\service.h include\google\protobuf\service.h
|
||||
copy ..\src\google\protobuf\text_format.h include\google\protobuf\text_format.h
|
||||
copy ..\src\google\protobuf\unknown_field_set.h include\google\protobuf\unknown_field_set.h
|
||||
copy ..\src\google\protobuf\wire_format.h include\google\protobuf\wire_format.h
|
||||
copy ..\src\google\protobuf\wire_format_lite.h include\google\protobuf\wire_format_lite.h
|
||||
copy ..\src\google\protobuf\wire_format_lite_inl.h include\google\protobuf\wire_format_lite_inl.h
|
||||
copy ..\src\google\protobuf\io\coded_stream.h include\google\protobuf\io\coded_stream.h
|
||||
copy ..\src\google\protobuf\io\gzip_stream.h include\google\protobuf\io\gzip_stream.h
|
||||
copy ..\src\google\protobuf\io\printer.h include\google\protobuf\io\printer.h
|
||||
copy ..\src\google\protobuf\io\tokenizer.h include\google\protobuf\io\tokenizer.h
|
||||
copy ..\src\google\protobuf\io\zero_copy_stream.h include\google\protobuf\io\zero_copy_stream.h
|
||||
copy ..\src\google\protobuf\io\zero_copy_stream_impl.h include\google\protobuf\io\zero_copy_stream_impl.h
|
||||
copy ..\src\google\protobuf\io\zero_copy_stream_impl_lite.h include\google\protobuf\io\zero_copy_stream_impl_lite.h
|
||||
copy ..\src\google\protobuf\compiler\code_generator.h include\google\protobuf\compiler\code_generator.h
|
||||
copy ..\src\google\protobuf\compiler\command_line_interface.h include\google\protobuf\compiler\command_line_interface.h
|
||||
copy ..\src\google\protobuf\compiler\importer.h include\google\protobuf\compiler\importer.h
|
||||
copy ..\src\google\protobuf\compiler\parser.h include\google\protobuf\compiler\parser.h
|
||||
copy ..\src\google\protobuf\compiler\cpp\cpp_generator.h include\google\protobuf\compiler\cpp\cpp_generator.h
|
||||
copy ..\src\google\protobuf\compiler\java\java_generator.h include\google\protobuf\compiler\java\java_generator.h
|
||||
copy ..\src\google\protobuf\compiler\python\python_generator.h include\google\protobuf\compiler\python\python_generator.h
|
||||
27
sp/src/thirdparty/protobuf-2.3.0/vsprojects/make.bat
vendored
Normal file
27
sp/src/thirdparty/protobuf-2.3.0/vsprojects/make.bat
vendored
Normal file
@@ -0,0 +1,27 @@
|
||||
@echo off
|
||||
setlocal
|
||||
|
||||
@rem Move to the batch file directory so we can run it from anywhere
|
||||
cd %~dp0
|
||||
|
||||
call "%VS100COMNTOOLS%vsvars32.bat"
|
||||
|
||||
for /d %%d in (debug release "debug|x64" "release|x64") do (
|
||||
echo Building %%d
|
||||
devenv protobuf_2010.sln /clean %%d
|
||||
devenv protobuf_2010.sln /build %%d /project libprotobuf
|
||||
devenv protobuf_2010.sln /build %%d /project libprotobuf-lite
|
||||
devenv protobuf_2010.sln /build %%d /project libprotoc
|
||||
)
|
||||
|
||||
p4 edit ..\..\..\lib\win32\debug\VS2010\libproto*.lib
|
||||
p4 edit ..\..\..\lib\win32\release\VS2010\libproto*.lib
|
||||
p4 edit ..\..\..\lib\win64\debug\VS2010\libproto*.lib
|
||||
p4 edit ..\..\..\lib\win64\release\VS2010\libproto*.lib
|
||||
|
||||
copy /y Debug\libproto*.lib ..\..\..\lib\win32\debug\VS2010
|
||||
copy /y Release\libproto*.lib ..\..\..\lib\win32\Release\VS2010
|
||||
copy /y x64\Debug\libproto*.lib ..\..\..\lib\win64\debug\VS2010
|
||||
copy /y x64\Release\libproto*.lib ..\..\..\lib\win64\Release\VS2010
|
||||
|
||||
@echo Check in the changed libraries in src\lib if you are done.
|
||||
114
sp/src/thirdparty/protobuf-2.3.0/vsprojects/readme.txt
vendored
Normal file
114
sp/src/thirdparty/protobuf-2.3.0/vsprojects/readme.txt
vendored
Normal file
@@ -0,0 +1,114 @@
|
||||
This directory contains project files for compiling Protocol Buffers using
|
||||
MSVC. This is not the recommended way to do Protocol Buffer development --
|
||||
we prefer to develop under a Unix-like environment -- but it may be more
|
||||
accessible to those who primarily work with MSVC.
|
||||
|
||||
Compiling and Installing
|
||||
========================
|
||||
|
||||
1) Open protobuf.sln in Microsoft Visual Studio.
|
||||
2) Choose "Debug" or "Release" configuration as desired.*
|
||||
3) From the Build menu, choose "Build Solution". Wait for compiling to finish.
|
||||
4) From a command shell, run tests.exe and lite-test.exe and check that all
|
||||
tests pass.
|
||||
5) Run extract_includes.bat to copy all the public headers into a separate
|
||||
"include" directory (under the top-level package directory).
|
||||
6) Copy the contents of the include directory to wherever you want to put
|
||||
headers.
|
||||
7) Copy protoc.exe wherever you put build tools (probably somewhere in your
|
||||
PATH).
|
||||
8) Copy libprotobuf.lib, libprotobuf-lite.lib, and libprotoc.lib wherever you
|
||||
put libraries.
|
||||
|
||||
* To avoid conflicts between the MSVC debug and release runtime libraries, when
|
||||
compiling a debug build of your application, you may need to link against a
|
||||
debug build of libprotobuf.lib. Similarly, release builds should link against
|
||||
release libs.
|
||||
|
||||
DLLs vs. static linking
|
||||
=======================
|
||||
|
||||
Static linking is now the default for the Protocol Buffer libraries. Due to
|
||||
issues with Win32's use of a separate heap for each DLL, as well as binary
|
||||
compatibility issues between different versions of MSVC's STL library, it is
|
||||
recommended that you use static linkage only. However, it is possible to
|
||||
build libprotobuf and libprotoc as DLLs if you really want. To do this,
|
||||
do the following:
|
||||
|
||||
1) Open protobuf.sln in MSVC.
|
||||
2) For each of the projects libprotobuf, libprotobuf-lite, and libprotoc, do
|
||||
the following:
|
||||
2a) Right-click the project and choose "properties".
|
||||
2b) From the side bar, choose "General", under "Configuration Properties".
|
||||
2c) Change the "Configuration Type" to "Dynamic Library (.dll)".
|
||||
2d) From the side bar, choose "Preprocessor", under "C/C++".
|
||||
2e) Add PROTOBUF_USE_DLLS to the list of preprocessor defines.
|
||||
3) When compiling your project, make sure to #define PROTOBUF_USE_DLLS.
|
||||
|
||||
When distributing your software to end users, we strongly recommend that you
|
||||
do NOT install libprotobuf.dll or libprotoc.dll to any shared location.
|
||||
Instead, keep these libraries next to your binaries, in your application's
|
||||
own install directory. C++ makes it very difficult to maintain binary
|
||||
compatibility between releases, so it is likely that future versions of these
|
||||
libraries will *not* be usable as drop-in replacements.
|
||||
|
||||
If your project is itself a DLL intended for use by third-party software, we
|
||||
recommend that you do NOT expose protocol buffer objects in your library's
|
||||
public interface, and that you statically link protocol buffers into your
|
||||
library.
|
||||
|
||||
ZLib support
|
||||
============
|
||||
|
||||
If you want to include GzipInputStream and GzipOutputStream
|
||||
(google/protobuf/io/gzip_stream.h) in libprotoc, you will need to do a few
|
||||
additional steps:
|
||||
|
||||
1) Obtain a copy of the zlib library. The pre-compiled DLL at zlib.net works.
|
||||
2) Make sure zlib's two headers are in your include path and that the .lib file
|
||||
is in your library path. You could place all three files directly into the
|
||||
vsproject directory to compile libprotobuf, but they need to be visible to
|
||||
your own project as well, so you should probably just put them into the
|
||||
VC shared icnlude and library directories.
|
||||
3) Right-click on the "tests" project and choose "properties". Navigate the
|
||||
sidebar to "Configuration Properties" -> "Linker" -> "Input".
|
||||
4) Under "Additional Dependencies", add the name of the zlib .lib file (e.g.
|
||||
zdll.lib). Make sure to update both the Debug and Release configurations.
|
||||
5) If you are compiling libprotobuf and libprotoc as DLLs (see previous
|
||||
section), repeat steps 2 and 3 for the libprotobuf and libprotoc projects.
|
||||
If you are compiling them as static libraries, then you will need to link
|
||||
against the zlib library directly from your own app.
|
||||
6) Edit config.h (in the vsprojects directory) and un-comment the line that
|
||||
#defines HAVE_ZLIB. (Or, alternatively, define this macro via the project
|
||||
settings.)
|
||||
|
||||
Notes on Compiler Warnings
|
||||
==========================
|
||||
|
||||
The following warnings have been disabled while building the protobuf libraries
|
||||
and compiler. You may have to disable some of them in your own project as
|
||||
well, or live with them.
|
||||
|
||||
C4018 - 'expression' : signed/unsigned mismatch
|
||||
C4146 - unary minus operator applied to unsigned type, result still unsigned
|
||||
C4244 - Conversion from 'type1' to 'type2', possible loss of data.
|
||||
C4251 - 'identifier' : class 'type' needs to have dll-interface to be used by
|
||||
clients of class 'type2'
|
||||
C4267 - Conversion from 'size_t' to 'type', possible loss of data.
|
||||
C4305 - 'identifier' : truncation from 'type1' to 'type2'
|
||||
C4355 - 'this' : used in base member initializer list
|
||||
C4800 - 'type' : forcing value to bool 'true' or 'false' (performance warning)
|
||||
C4996 - 'function': was declared deprecated
|
||||
|
||||
C4251 is of particular note, if you are compiling the Protocol Buffer library
|
||||
as a DLL (see previous section). The protocol buffer library uses templates in
|
||||
its public interfaces. MSVC does not provide any reasonable way to export
|
||||
template classes from a DLL. However, in practice, it appears that exporting
|
||||
templates is not necessary anyway. Since the complete definition of any
|
||||
template is available in the header files, anyone importing the DLL will just
|
||||
end up compiling instances of the templates into their own binary. The
|
||||
Protocol Buffer implementation does not rely on static template members being
|
||||
unique, so there should be no problem with this, but MSVC prints warning
|
||||
nevertheless. So, we disable it. Unfortunately, this warning will also be
|
||||
produced when compiling code which merely uses protocol buffers, meaning you
|
||||
may have to disable it in your code too.
|
||||
Reference in New Issue
Block a user