Changes between Version 22 and Version 23 of build/04x


Ignore:
Timestamp:
08/12/12 10:46:16 (9 months ago)
Author:
mickem
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • build/04x

    v22 v23  
    77 * CMake 2.6 
    88 * Python 2.7 
    9  * Perl 5.12 
    109 
    1110Optional Tooling: 
    1211 * Nasm 2.10 
     12 * Perl 5.12 (for openssl) 
    1313 
    1414Before you begin: 
     
    3131 * Google Break Pad 
    3232 
    33 Linux packages (kubuntu) 
    34  * libboost-all-dev 
    35  * libprotobuf-dev 
    36  * protobuf-compiler 
     33== Building all dependencies == 
    3734 
    38 Unpack and install/build/* the various dependencies. 
     35I think the simplest way to manage dependencies (since most tools does not cater well for multi architecture builds) is to have separate folders for W32 and x64. 
     36Hence I create a root folder for each architecture. If you are only interested in a single architecture you can thus ignore the other one and make your life simpler. 
     37In general most "tinkering" is required for x64 builds so if you want an easy out go for w32. 
    3938 
    40 == Setup variables == 
     39=== Setup folders and build environment === 
     40 
     41Since we will use separate folders for x64 and w32 we need to create them first. 
    4142{{{ 
    42 set TARGET_DIR=d:\source\ 
    43 set SOURCE_DIR=d:\source\lib\ 
    44 set TOOLS_DIR=d:\source\tools\ 
    45  
    46 set TARGET_LIB_DIR=%TARGET_DIR%\lib 
    47 set TARGET_LIB_x86_DIR=%TARGET_LIB_DIR%\x86 
    48 set TARGET_LIB_x64_DIR=%TARGET_LIB_DIR%\x64 
    49  
    50 set TARGET_INC_DIR=%TARGET_DIR%\include 
    51 set PATH=%PATH%;%TOOLS_DIR% 
    52  
    53 mkdir %TOOLS_DIR% 
    54 mkdir %TARGET_LIB_DIR% 
    55 mkdir %TARGET_LIB_x86_DIR% 
    56 mkdir %TARGET_LIB_x64_DIR% 
     43set TARGET=c:\MyDependencyFoloder 
     44set TARGET_w32=%TARGET%\w32 
     45set TARGET_x32=%TARGET%\x64 
     46mkdir %TARGET% 
     47mkdir %TARGET_w32% 
     48mkdir %TARGET_x64% 
    5749}}} 
    5850 
    59 == Boost == 
     51Hence fort all dependencies will be downloaded and uncompressed into BOTH these folders. Also note that you need to have different shells for each target architecture as well. 
     52Visual studio provides multiple "Command prompts" tagged with each architecture so make sure you are in the right one or these will fail. 
     53 
     54=== Boost === 
     55 
     56Since boost dropped support for "filesystem2" in faviour of filesystem3 (which I have not migrated to yet) last ok version of boost is 1.49. 
     57I will try to upgrade to boost filesystem3 in the near future to resolve this. 
     58 
     59'''Download URL:''' [[http://www.boost.org]] 
     60 
     61'''Win32:''' 
    6062{{{ 
    61 # Build w32 libs 
    62 .\bjam --toolset=msvc --prefix=%TARGET_DIR% --includedir=%TARGET_INC_DIR% --libdir=%TARGET_LIB_x86_DIR% runtime-link=static link=static clean 
    63 .\bjam --toolset=msvc --prefix=%TARGET_DIR% --includedir=%TARGET_INC_DIR% --libdir=%TARGET_LIB_x86_DIR% runtime-link=static link=static install 
     63# Download and decompress into the following folder: 
     64cd %TARGET_w32%\boost_1_49_0 
     65bootstrap.bat 
     66bjam --toolset=msvc-8.0 runtime-link=static 
     67}}} 
    6468 
    65  
    66 # Build x64 libs 
    67 .\bjam --toolset=msvc --prefix=%TARGET_DIR% --includedir=%TARGET_INC_DIR% --libdir=%TARGET_LIB_x64_DIR% address-model=64 runtime-link=static link=static clean 
    68 .\bjam --toolset=msvc --prefix=%TARGET_DIR% --includedir=%TARGET_INC_DIR% --libdir=%TARGET_LIB_x64_DIR% address-model=64 runtime-link=static link=static install 
     69'''x64:''' 
     70{{{ 
     71# Download and decompress into the following folder: 
     72cd %TARGET_x64%\boost_1_49_0 
     73bootstrap.bat 
     74bjam --toolset=msvc-8.0 runtime-link=static address-model=64 
    6975}}} 
    7076 
    7177 
    72 == Open SSL == 
     78=== OpenSSL === 
     79 
     80Openssl does not require anything special out of the box but there are a some tweaking in regards to masm and such which "can" be used. Also note that if you get "ml64 no such file..." errors you are in the wrong shell.  You also need to clean out all temp folders if you were in the wrong shell as it does not rebuild otherwise. 
     81 
     82'''Download URL:''' [[http://www.openssl.org]] 
     83 
     84'''Win32:''' 
     85{{{ 
     86# Download and decompress into the following folder: 
     87cd %TARGET_w32%\openssl-1.0.1c 
     88perl Configure VC-WIN32 
     89ms\do_masm 
     90nmake -f ms\ntdll.mak 
     91}}} 
     92 
     93'''x64:''' 
     94{{{ 
     95# Download and decompress into the following folder: 
     96cd %TARGET_x64%\openssl-1.0.1c 
     97perl Configure VC-WIN64A 
     98ms\do_win64a 
     99nmake -f ms\ntdll.mak 
     100}}} 
     101 
     102=== Google protocol buffers === 
     103 
     104Google protocol buffers is a pain as they do not provide any way to build x64 out of the box and also has visual studio file in the wrong format (for me).  
     105Hence it requires some tweaking. 
     106 
     107'''Download URL:''' TODO 
     108 
     109'''Win32:''' 
     110{{{ 
     111# Download and decompress into the following folder: 
     112cd %TARGET_w32%\protobuf-2.4.1 
     113# TODO Convert visual studio projects: python.exe cvt-msdev.py 
     114msbuild vsprojects\protobuf.sln /p:Configuration=Release 
     115msbuild vsprojects\protobuf.sln /p:Configuration=Debug 
     116}}} 
     117 
     118'''x64:''' 
     119{{{ 
     120# Download and decompress into the following folder: 
     121cd %TARGET_w32%\protobuf-2.4.1 
     122# TODO Convert visual studio projects: python.exe cvt-msdev.py 
     123# TODO: Apply x64 patch 
     124msbuild vsprojects\protobuf.sln /p:Configuration=Release 
     125msbuild vsprojects\protobuf.sln /p:Configuration=Debug 
     126}}} 
     127 
     128=== ZeroMQ === 
     129 
     130ZeroMQ is another one of these rather crappy projects with has no x64 version, no vs2005 projects and no support for debug builds.  
     131In short everything you can do wrong they have nailed it. Hence it requires some tweaking. 
     132 
     133'''Download URL:''' TODO 
     134 
     135'''Win32:''' 
     136{{{ 
     137# Download and decompress into the following folder: 
     138cd %TARGET_w32%\zeromq-2.2.0 
     139# TODO: Convert visual studio projects: python.exe cvt-msdev.py 
     140# TODO: Apply debug patch 
     141msbuild builds\msvc\msvc.sln /p:Configuration=Release 
     142msbuild builds\msvc\msvc.sln /p:Configuration=Debug 
     143}}} 
     144 
     145'''x64:''' 
     146{{{ 
     147# Download and decompress into the following folder: 
     148cd %TARGET_w32%\zeromq-2.2.0 
     149# TODO: Convert visual studio projects: python.exe cvt-msdev.py 
     150# TODO: Apply debug patch 
     151# TODO: Apply x64 patch 
     152msbuild builds\msvc\msvc.sln /p:Configuration=Release 
     153msbuild builds\msvc\msvc.sln /p:Configuration=Debug 
     154}}} 
     155 
     156=== Google break pad === 
     157 
     158TODO 
    73159 
    74160{{{ 
    75 # Setup W32 libraries 
     161# Download and build google break pad 
     162src\tools\gyp\gyp.bat src\client\windows\breakpad_client.gyp 
    76163 
    77 perl Configure VC-WIN32 
    78 ms\do_nasm 
    79 nmake -f ms\nt.mak clean 
    80 nmake -f ms\nt.mak install 
    81 xcopy /Y out32\*.lib %TARGET_LIB_x86_DIR% 
     164# Download and install psdk into:  src\third_party\platformsdk_win7\files 
     165# Apply patch for TokenStream (?) 
    82166 
    83 # Setup X64 libraries 
    84 perl Configure VC-WIN64A 
    85 ms\do_win64a 
    86 nmake -f ms\ntdll.mak clean 
    87 nmake -f ms\ntdll.mak install 
    88 copy /y out32\*.lib %TARGET_LIB_x64_DIR% 
    89  
    90 # copy header files 
    91 xcopy /s inc32\*.* %TARGET_INC_DIR% 
     167msbuild src\client\windows\breakpad_client.sln /p:Configuration=Release /p:Platform=Win32 
     168msbuild src\client\windows\breakpad_client.sln /p:Configuration=Debug /p:Platform=Win32 
    92169}}} 
    93170 
    94171 
    95 == Google Protocol Buffers == 
     172== Building NSClient++ == 
    96173 
    97 Download and open solution in visual studio. 
    98 '''NOTICE''' You need to switch from dynamic linking to static linking. 
    99 Then build w32 release and debug builds and run the following from the protocol buffer root folder: 
    100 {{{ 
    101 # Build debug w32 (from visual studio) then do the following: 
    102 copy /y vsprojects\Debug\libprotobuf.lib %TARGET_LIB_x86_DIR%\debug-libprotobuf.lib 
    103 copy /y vsprojects\Debug\libprotobuf-lite.lib %TARGET_LIB_x86_DIR%\debug-libprotobuf-lite.lib 
    104 copy /y vsprojects\Debug\libprotoc.lib %TARGET_LIB_x86_DIR%\debug-libprotoc.lib 
    105  
    106 # Build release  w32 (from visual studio) then do the following: 
    107 copy /y vsprojects\Release\libprotobuf.lib %TARGET_LIB_x86_DIR%\libprotobuf.lib 
    108 copy /y vsprojects\Release\libprotobuf-lite.lib %TARGET_LIB_x86_DIR%\libprotobuf-lite.lib 
    109 copy /y vsprojects\Release\libprotoc.lib %TARGET_LIB_x86_DIR%\libprotoc.lib 
    110  
    111 # Build debug x64 (from visual studio) then do the following: 
    112 copy /y vsprojects\x64\Debug\libprotobuf.lib %TARGET_LIB_x64_DIR%\debug-libprotobuf.lib 
    113 copy /y vsprojects\x64\Debug\libprotobuf-lite.lib %TARGET_LIB_x64_DIR%\debug-libprotobuf-lite.lib 
    114 copy /y vsprojects\x64\Debug\libprotoc.lib %TARGET_LIB_x64_DIR%\debug-libprotoc.lib 
    115  
    116 # Build release x64 (from visual studio) then do the following: 
    117 copy /y vsprojects\x64\Release\libprotobuf.lib %TARGET_LIB_x64_DIR%\libprotobuf.lib 
    118 copy /y vsprojects\x64\Release\libprotobuf-lite.lib %TARGET_LIB_x64_DIR%\libprotobuf-lite.lib 
    119 copy /y vsprojects\x64\Release\libprotoc.lib %TARGET_LIB_x64_DIR%\libprotoc.lib 
    120  
    121 # copy /y the compilter of your choice: 
    122 copy /y vsprojects\x64\Release\protoc.exe %TOOLS_DIR% 
    123 # copy /y vsprojects\Release\protoc.exe %TOOLS_DIR% 
    124 }}} 
    125  
    126 == Gooogle breakpad == 
    127 Go to the main source directory and create the visual studio project files: 
    128 {{{ 
    129 src\tools\gyp\gyp.bat src\client\windows\breakpad_client.gyp 
    130 }}} 
    131 Then open them and build all versions (x86). 
    132  
    133 Finally copy the following files: 
    134 {{{ 
    135 copy /y src\client\windows\Debug\lib\common.lib %TARGET_LIB_x86_DIR%\debug-google-breakpad-common.lib 
    136 copy /y src\client\windows\Debug\lib\crash_generation_client.lib %TARGET_LIB_x86_DIR%\debug-google-breakpad-crash_generation_client.lib 
    137 copy /y src\client\windows\Debug\lib\crash_generation_server.lib %TARGET_LIB_x86_DIR%\debug-google-breakpad-crash_generation_server.lib 
    138 copy /y src\client\windows\Debug\lib\crash_report_sender.lib %TARGET_LIB_x86_DIR%\debug-google-breakpad-crash_report_sender.lib 
    139 copy /y src\client\windows\Debug\lib\exception_handler.lib %TARGET_LIB_x86_DIR%\debug-google-breakpad-exception_handler.lib 
    140 copy /y src\client\windows\Debug\lib\gmock.lib %TARGET_LIB_x86_DIR%\debug-google-breakpad-gmock.lib 
    141 copy /y src\client\windows\Debug\lib\gtest.lib %TARGET_LIB_x86_DIR%\debug-google-breakpad-gtest.lib 
    142 copy /y src\client\windows\Debug\lib\processor_bits.lib %TARGET_LIB_x86_DIR%\debug-google-breakpad-processor_bits.lib 
    143  
    144 copy /y src\client\windows\Release\lib\common.lib %TARGET_LIB_x86_DIR%\google-breakpad-common.lib 
    145 copy /y src\client\windows\Release\lib\crash_generation_client.lib %TARGET_LIB_x86_DIR%\google-breakpad-crash_generation_client.lib 
    146 copy /y src\client\windows\Release\lib\crash_generation_server.lib %TARGET_LIB_x86_DIR%\google-breakpad-crash_generation_server.lib 
    147 copy /y src\client\windows\Release\lib\crash_report_sender.lib %TARGET_LIB_x86_DIR%\google-breakpad-crash_report_sender.lib 
    148 copy /y src\client\windows\Release\lib\exception_handler.lib %TARGET_LIB_x86_DIR%\google-breakpad-exception_handler.lib 
    149 copy /y src\client\windows\Release\lib\gmock.lib %TARGET_LIB_x86_DIR%\google-breakpad-gmock.lib 
    150 copy /y src\client\windows\Release\lib\gtest.lib %TARGET_LIB_x86_DIR%\google-breakpad-gtest.lib 
    151 copy /y src\client\windows\Release\lib\processor_bits.lib %TARGET_LIB_x86_DIR%\google-breakpad-processor_bits.lib 
    152 }}} 
    153  
    154  
    155 Then open them and build all versions (x64). 
    156  
    157 {{{ 
    158 copy /y src\client\windows\Debug\lib\common.lib %TARGET_LIB_x64_DIR%\debug-google-breakpad-common.lib 
    159 copy /y src\client\windows\Debug\lib\crash_generation_client.lib %TARGET_LIB_x64_DIR%\debug-google-breakpad-crash_generation_client.lib 
    160 copy /y src\client\windows\Debug\lib\crash_generation_server.lib %TARGET_LIB_x64_DIR%\debug-google-breakpad-crash_generation_server.lib 
    161 copy /y src\client\windows\Debug\lib\crash_report_sender.lib %TARGET_LIB_x64_DIR%\debug-google-breakpad-crash_report_sender.lib 
    162 copy /y src\client\windows\Debug\lib\exception_handler.lib %TARGET_LIB_x64_DIR%\debug-google-breakpad-exception_handler.lib 
    163 copy /y src\client\windows\Debug\lib\gmock.lib %TARGET_LIB_x64_DIR%\debug-google-breakpad-gmock.lib 
    164 copy /y src\client\windows\Debug\lib\gtest.lib %TARGET_LIB_x64_DIR%\debug-google-breakpad-gtest.lib 
    165 copy /y src\client\windows\Debug\lib\processor_bits.lib %TARGET_LIB_x64_DIR%\debug-google-breakpad-processor_bits.lib 
    166  
    167 copy /y src\client\windows\Release\lib\common.lib %TARGET_LIB_x64_DIR%\google-breakpad-common.lib 
    168 copy /y src\client\windows\Release\lib\crash_generation_client.lib %TARGET_LIB_x64_DIR%\google-breakpad-crash_generation_client.lib 
    169 copy /y src\client\windows\Release\lib\crash_generation_server.lib %TARGET_LIB_x64_DIR%\google-breakpad-crash_generation_server.lib 
    170 copy /y src\client\windows\Release\lib\crash_report_sender.lib %TARGET_LIB_x64_DIR%\google-breakpad-crash_report_sender.lib 
    171 copy /y src\client\windows\Release\lib\exception_handler.lib %TARGET_LIB_x64_DIR%\google-breakpad-exception_handler.lib 
    172 copy /y src\client\windows\Release\lib\gmock.lib %TARGET_LIB_x64_DIR%\google-breakpad-gmock.lib 
    173 copy /y src\client\windows\Release\lib\gtest.lib %TARGET_LIB_x64_DIR%\google-breakpad-gtest.lib 
    174 copy /y src\client\windows\Release\lib\processor_bits.lib %TARGET_LIB_x64_DIR%\google-breakpad-processor_bits.lib 
    175 }}} 
     174TODO