Changes between Version 11 and Version 12 of Building/libtorrent


Ignore:
Timestamp:
11/30/2014 06:53:09 PM (9 years ago)
Author:
Cas
Comment:

update windows build steps

Legend:

Unmodified
Added
Removed
Modified
  • Building/libtorrent

    v11 v12  
    1 This page is for edge cases where libtorrent is needing to be built from source. Always check the libtorrent docs for any updates to build procedures.  
    2  
     1This page is for those cases where libtorrent is needing to be built from source. Remember to check the libtorrent docs for any updates to build procedures.  
    32 
    43== Ubuntu == 
     
    65 1. Download libtorrent source tarball and extract it: 
    76 
    8  * [http://www.libtorrent.org/ libtorrent-rasterbar] 
     7  * [http://www.libtorrent.org/ libtorrent-rasterbar] 
    98 
    109 2. Get the dependencies for libtorrent 
     
    1918}}} 
    2019 
    21  Note: If the source code is from svn so you would need to create the configure script by runnning the autotool script: `./autotool.sh` 
     20 Note: For source code from svn, create the `configure` script by runnning: `./autotool.sh` 
    2221 
    2322 4. Install: 
     
    4039  * [http://www.microsoft.com/visualstudio/en-us/products/2010-editions/visual-cpp-express MS VC++ 2008/2010 Express][[br]] 
    4140  '''OR''' 
    42   * [http://www.microsoft.com/en-us/download/details.aspx?id=44266 Microsoft Visual C++ Compiler for Python 2.7] 
     41  * [http://www.microsoft.com/en-us/download/details.aspx?id=44266 MS VC++ Compiler for Python] 
    4342 
    44  2. Install these packages: 
     43 
     44 
     45 2. Download and install these packages: 
    4546  * [http://www.slproweb.com/products/Win32OpenSSL.html OpenSSL win32 (non-light)] 
    4647  * [http://www.python.org/ Python 2.7] 
    47   * [http://www.microsoft.com/en-us/download/details.aspx?id=5582 MSVC 2008 SP1 Redistributable Package (x86)] 
     48  * [http://www.microsoft.com/en-us/download/details.aspx?id=5582 MSVC 2008 SP1 Redist Package (x86)] 
    4849 
    4950 3. Download source tarballs and extract to path without space e.g. C:\ drive: 
     
    5152  * [http://www.libtorrent.org/ libtorrent-rasterbar] 
    5253 
    53  4. Boost build - Open a command prompt and execute the following commands: 
     54 4. Boost Build Steps: 
    5455 
    55  ''If using 'Compiler for Python' you need to run `vcvarsall.bat` to setup compiler paths.'' 
     56 Open a `Visual Studio 2008 Command Prompt`[[br]] 
     57 '''OR'''[[br]] 
     58 If using `VC++ Compiler for Python`, open Windows Command Prompt and execute `vcvarsall.bat`, e.g.: 
     59  {{{ 
     60  C:\Users\User\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\vcvarsall.bat 
     61  }}} 
     62 
     63 From Command Prompt, execute the following commands: 
    5664 {{{ 
    5765   bootstrap.bat 
     
    6068 ''Building Boost can take a long time and uses 2-3 gigabytes of disk space.'' 
    6169 
    62  5. Create a Boost `user-config.jam` file in `BOOST_ROOT` (i.e. `C:\boost`) with the following to force `msvc` version: 
     70 5. Create a Boost `user-config.jam` file in `BOOST_ROOT` (e.g. `C:\boost`) with the following to force `msvc` version: 
    6371 {{{ 
    6472    using msvc : 9.0 ; 
    6573 }}} 
    6674 
    67  6. libtorrent Build: 
     75 6. libtorrent Build Steps: 
    6876   a. Setup the Environmental Variables: 
    6977   {{{ 
     
    7482set PATH=%BOOST_ROOT%;%PATH% 
    7583}}} 
    76    b. Navigate to libtorrent python bindings folder: 
     84   b. Navigate to libtorrent Python bindings folder: 
    7785   {{{ 
    7886cd C:\libtorrent-rasterbar\bindings\python 
    7987}}} 
    80    c. Build libtorrent with python bindings: 
    81 {{{ 
     88   c. Build libtorrent with Python bindings: 
     89 
     90   {{{ 
    8291b2 boost=source link=static geoip=static boost-link=static release optimization=space encryption=openssl 
    8392}}} 
     
    102111 Upon a successful build the resulting library file is named `libtorrent.pyd` and is located under this directory: `libtorrent-rasterbar\bindings\python\bin\msvc-9.0\release\boost-source\geoip-static\link-static\optimization-space` 
    103112}}} 
    104 Upon a successful build the library file named `libtorrent.pyd` is created in the current directory. 
     113Upon a successful build the library file named `libtorrent.pyd` is created in the current bindings directory. 
    105114 
    106 Non-python build instructions for reference: [http://leechcraft.org/development-building-from-source-win32#Building_libtorrent Leechcraft] and [https://github.com/qbittorrent/qBittorrent/wiki/Compiling-with-MSVC-2008%28static-linkage%29 QBittorrent] 
     115 
    107116 
    108117 
    109118=== Debugging libtorrent on Windows ===  
    110119 
    111 References: 
    112  * [https://developer.mozilla.org/en/docs/How_to_get_a_stacktrace_with_WinDbg Mozilla WinDbg stacktrace] 
    113  * [http://gui-at.blogspot.co.uk/2010/01/windbg-for-beginners.html Windbg for Beginners] 
     120 * Download: 
     121  * [http://msdn.microsoft.com/en-us/windows/hardware/hh852365.aspx Standalone Debugging Tools for Windows (WinDbg)] 
    114122 
    115 Download: 
    116  * http://www.microsoft.com/en-us/download/details.aspx?id=8279 
     123 ''Note: Only need to install debug tools.'' 
    117124 
    118  Install only debug tools 
     125 * Build libtorrent with debug enabled by changing `release` to `debug` in `setup.py` or `b2` line in steps above. 
    119126 
    120 Build libtorrent with debug enabled (edit setup.py release to debug) 
     127 * In windbg `C:\Program Files\Debugging Tools for Windows (x86)\windbg.exe`: 
     128  * `File|Open Executable` and tick Debug child processes 
    121129 
    122  {{{C:\libtorrent-rasterbar-0.16.6\bindings\python\bin\msvc-9.0\debug\boost-source\geoip-static\link-static\optimization-space\threading-multi}}} 
     130  * Hit F5 or Go a few times to get the program running 
    123131 
    124  
    125  
    126 In windbg {{{C:\Program Files\Debugging Tools for Windows (x86)\windbg.exe}}}: 
    127     File|Open Executable and tick Debug child processes 
    128  
    129 Hit F5 or Go a few times to get the program running 
    130  
    131 The following command after a crash: 
    132  
    133     {{{!analyze -v -f}}} 
     132  * Execute the following command after a crash: 
     133    {{{ 
     134!analyze -v -f 
     135}}} 
    134136         
    135137         
    136 Symbols will be in: {{{C:\libtorrent-rasterbar-0.16.6\bindings\python\bin\msvc-9.0\debug\boost-source\geoip-static\link-static\optimization-space\threading-multi}}} 
     138 * Symbols for libtorrent will be in the following path:  
     139  {{{ 
     140C:\libtorrent-rasterbar\bindings\python\bin\msvc-9.0\debug\boost-source\geoip-static\link-static\optimization-space\threading-multi 
     141}}} 
     142  So the full symbols line should look something like this: 
     143  {{{ 
     144srv*;C:\libtorrent-rasterbar\bindings\python\bin\msvc-9.0\debug\boost-source\geoip-static\link-static\optimization-space\threading-multi;C:\Python27\symbols;srv*c:\Symbols*http://msdl.microsoft.com/download/symbols 
     145}}} 
    137146 
    138 {{{srv*;C:\libtorrent-rasterbar-0.16.6\bindings\python\bin\msvc-9.0\debug\boost-source\geoip-static\link-static\optimization-space\threading-multi;C:\Python27\symbols;srv*c:\Symbols*http://msdl.microsoft.com/download/symbols}}} 
     147Debug References: 
     148  * [https://developer.mozilla.org/en/docs/How_to_get_a_stacktrace_with_WinDbg Mozilla WinDbg stacktrace] 
     149  * [http://gui-at.blogspot.co.uk/2010/01/windbg-for-beginners.html Windbg for Beginners] 
    139150 
     151== Resources == 
     152 
     153 * [http://libtorrent.org/building.html libtorrent] 
     154 * [http://leechcraft.org/development-building-from-source-win32#Building_libtorrent Leechcraft] 
     155 * [https://github.com/qbittorrent/qBittorrent/wiki/Compiling-with-MSVC-2008%28static-linkage%29 QBittorrent]