Version 20 (modified by mickem, 22 months ago) (diff)

--

Building the 0.4.x branch

Since I just got a new machine I figured I'd write this quick summary if anyone else is interested in setting this up.

Required Tooling:

  • CMake 2.6
  • Python 2.7
  • Perl 5.12

Optional Tooling:

  • Nasm 2.10

Before you begin:

  • Make sure all paths are ok.
    cmake --version
    python -V
    perl -v
    nasm -v
    

Library Requirements:

  • boost 1.45.0
  • Google Protocol Buffers

Library Optional Requirements:

  • crypto++ 5.6.1
  • lua 5.1.4
  • openssl 1.0.0c
  • Google Break Pad

Linux packages (kubuntu)

  • libboost-all-dev
  • libprotobuf-dev

Unpack and install/build/* the various dependencies.

Setup variables

set TARGET_DIR=d:\source\
set SOURCE_DIR=d:\source\lib\
set TOOLS_DIR=d:\source\tools\

set TARGET_LIB_DIR=%TARGET_DIR%\lib
set TARGET_LIB_x86_DIR=%TARGET_LIB_DIR%\x86
set TARGET_LIB_x64_DIR=%TARGET_LIB_DIR%\x64

set TARGET_INC_DIR=%TARGET_DIR%\include
set PATH=%PATH%;%TOOLS_DIR%

mkdir %TOOLS_DIR%
mkdir %TARGET_LIB_DIR%
mkdir %TARGET_LIB_x86_DIR%
mkdir %TARGET_LIB_x64_DIR%

Boost

# Build w32 libs
.\bjam --toolset=msvc --prefix=%TARGET_DIR% --includedir=%TARGET_INC_DIR% --libdir=%TARGET_LIB_x86_DIR% runtime-link=static link=static clean
.\bjam --toolset=msvc --prefix=%TARGET_DIR% --includedir=%TARGET_INC_DIR% --libdir=%TARGET_LIB_x86_DIR% runtime-link=static link=static install


# Build x64 libs
.\bjam --toolset=msvc --prefix=%TARGET_DIR% --includedir=%TARGET_INC_DIR% --libdir=%TARGET_LIB_x64_DIR% address-model=64 runtime-link=static link=static clean
.\bjam --toolset=msvc --prefix=%TARGET_DIR% --includedir=%TARGET_INC_DIR% --libdir=%TARGET_LIB_x64_DIR% address-model=64 runtime-link=static link=static install

Open SSL

# Setup W32 libraries

perl Configure VC-WIN32
ms\do_nasm
nmake -f ms\nt.mak clean
nmake -f ms\nt.mak install
xcopy /Y out32\*.lib %TARGET_LIB_x86_DIR%

# Setup X64 libraries
perl Configure VC-WIN64A
ms\do_win64a
nmake -f ms\ntdll.mak clean
nmake -f ms\ntdll.mak install
copy /y out32\*.lib %TARGET_LIB_x64_DIR%

# copy header files
xcopy /s inc32\*.* %TARGET_INC_DIR%

Google Protocol Buffers

Download and open solution in visual studio. NOTICE You need to switch from dynamic linking to static linking. Then build w32 release and debug builds and run the following from the protocol buffer root folder:

# Build debug w32 (from visual studio) then do the following:
copy /y vsprojects\Debug\libprotobuf.lib %TARGET_LIB_x86_DIR%\debug-libprotobuf.lib
copy /y vsprojects\Debug\libprotobuf-lite.lib %TARGET_LIB_x86_DIR%\debug-libprotobuf-lite.lib
copy /y vsprojects\Debug\libprotoc.lib %TARGET_LIB_x86_DIR%\debug-libprotoc.lib

# Build release  w32 (from visual studio) then do the following:
copy /y vsprojects\Release\libprotobuf.lib %TARGET_LIB_x86_DIR%\libprotobuf.lib
copy /y vsprojects\Release\libprotobuf-lite.lib %TARGET_LIB_x86_DIR%\libprotobuf-lite.lib
copy /y vsprojects\Release\libprotoc.lib %TARGET_LIB_x86_DIR%\libprotoc.lib

# Build debug x64 (from visual studio) then do the following:
copy /y vsprojects\x64\Debug\libprotobuf.lib %TARGET_LIB_x64_DIR%\debug-libprotobuf.lib
copy /y vsprojects\x64\Debug\libprotobuf-lite.lib %TARGET_LIB_x64_DIR%\debug-libprotobuf-lite.lib
copy /y vsprojects\x64\Debug\libprotoc.lib %TARGET_LIB_x64_DIR%\debug-libprotoc.lib

# Build release x64 (from visual studio) then do the following:
copy /y vsprojects\x64\Release\libprotobuf.lib %TARGET_LIB_x64_DIR%\libprotobuf.lib
copy /y vsprojects\x64\Release\libprotobuf-lite.lib %TARGET_LIB_x64_DIR%\libprotobuf-lite.lib
copy /y vsprojects\x64\Release\libprotoc.lib %TARGET_LIB_x64_DIR%\libprotoc.lib

# copy /y the compilter of your choice:
copy /y vsprojects\x64\Release\protoc.exe %TOOLS_DIR%
# copy /y vsprojects\Release\protoc.exe %TOOLS_DIR%

Gooogle breakpad

Go to the main source directory and create the visual studio project files:

src\tools\gyp\gyp.bat src\client\windows\breakpad_client.gyp

Then open them and build all versions (x86).

Finally copy the following files:

copy /y src\client\windows\Debug\lib\common.lib %TARGET_LIB_x86_DIR%\debug-google-breakpad-common.lib
copy /y src\client\windows\Debug\lib\crash_generation_client.lib %TARGET_LIB_x86_DIR%\debug-google-breakpad-crash_generation_client.lib
copy /y src\client\windows\Debug\lib\crash_generation_server.lib %TARGET_LIB_x86_DIR%\debug-google-breakpad-crash_generation_server.lib
copy /y src\client\windows\Debug\lib\crash_report_sender.lib %TARGET_LIB_x86_DIR%\debug-google-breakpad-crash_report_sender.lib
copy /y src\client\windows\Debug\lib\exception_handler.lib %TARGET_LIB_x86_DIR%\debug-google-breakpad-exception_handler.lib
copy /y src\client\windows\Debug\lib\gmock.lib %TARGET_LIB_x86_DIR%\debug-google-breakpad-gmock.lib
copy /y src\client\windows\Debug\lib\gtest.lib %TARGET_LIB_x86_DIR%\debug-google-breakpad-gtest.lib
copy /y src\client\windows\Debug\lib\processor_bits.lib %TARGET_LIB_x86_DIR%\debug-google-breakpad-processor_bits.lib

copy /y src\client\windows\Release\lib\common.lib %TARGET_LIB_x86_DIR%\google-breakpad-common.lib
copy /y src\client\windows\Release\lib\crash_generation_client.lib %TARGET_LIB_x86_DIR%\google-breakpad-crash_generation_client.lib
copy /y src\client\windows\Release\lib\crash_generation_server.lib %TARGET_LIB_x86_DIR%\google-breakpad-crash_generation_server.lib
copy /y src\client\windows\Release\lib\crash_report_sender.lib %TARGET_LIB_x86_DIR%\google-breakpad-crash_report_sender.lib
copy /y src\client\windows\Release\lib\exception_handler.lib %TARGET_LIB_x86_DIR%\google-breakpad-exception_handler.lib
copy /y src\client\windows\Release\lib\gmock.lib %TARGET_LIB_x86_DIR%\google-breakpad-gmock.lib
copy /y src\client\windows\Release\lib\gtest.lib %TARGET_LIB_x86_DIR%\google-breakpad-gtest.lib
copy /y src\client\windows\Release\lib\processor_bits.lib %TARGET_LIB_x86_DIR%\google-breakpad-processor_bits.lib

Then open them and build all versions (x64).

copy /y src\client\windows\Debug\lib\common.lib %TARGET_LIB_x64_DIR%\debug-google-breakpad-common.lib
copy /y src\client\windows\Debug\lib\crash_generation_client.lib %TARGET_LIB_x64_DIR%\debug-google-breakpad-crash_generation_client.lib
copy /y src\client\windows\Debug\lib\crash_generation_server.lib %TARGET_LIB_x64_DIR%\debug-google-breakpad-crash_generation_server.lib
copy /y src\client\windows\Debug\lib\crash_report_sender.lib %TARGET_LIB_x64_DIR%\debug-google-breakpad-crash_report_sender.lib
copy /y src\client\windows\Debug\lib\exception_handler.lib %TARGET_LIB_x64_DIR%\debug-google-breakpad-exception_handler.lib
copy /y src\client\windows\Debug\lib\gmock.lib %TARGET_LIB_x64_DIR%\debug-google-breakpad-gmock.lib
copy /y src\client\windows\Debug\lib\gtest.lib %TARGET_LIB_x64_DIR%\debug-google-breakpad-gtest.lib
copy /y src\client\windows\Debug\lib\processor_bits.lib %TARGET_LIB_x64_DIR%\debug-google-breakpad-processor_bits.lib

copy /y src\client\windows\Release\lib\common.lib %TARGET_LIB_x64_DIR%\google-breakpad-common.lib
copy /y src\client\windows\Release\lib\crash_generation_client.lib %TARGET_LIB_x64_DIR%\google-breakpad-crash_generation_client.lib
copy /y src\client\windows\Release\lib\crash_generation_server.lib %TARGET_LIB_x64_DIR%\google-breakpad-crash_generation_server.lib
copy /y src\client\windows\Release\lib\crash_report_sender.lib %TARGET_LIB_x64_DIR%\google-breakpad-crash_report_sender.lib
copy /y src\client\windows\Release\lib\exception_handler.lib %TARGET_LIB_x64_DIR%\google-breakpad-exception_handler.lib
copy /y src\client\windows\Release\lib\gmock.lib %TARGET_LIB_x64_DIR%\google-breakpad-gmock.lib
copy /y src\client\windows\Release\lib\gtest.lib %TARGET_LIB_x64_DIR%\google-breakpad-gtest.lib
copy /y src\client\windows\Release\lib\processor_bits.lib %TARGET_LIB_x64_DIR%\google-breakpad-processor_bits.lib