Update README.md
[novacoin.git] / build-msw.txt
1 Copyright (c) 2009-2010 Satoshi Nakamoto
2 Distributed under the MIT/X11 software license, see the accompanying
3 file license.txt or http://www.opensource.org/licenses/mit-license.php.
4 This product includes software developed by the OpenSSL Project for use in
5 the OpenSSL Toolkit (http://www.openssl.org/).  This product includes
6 cryptographic software written by Eric Young (eay@cryptsoft.com).
7
8
9 WINDOWS BUILD NOTES
10 ===================
11
12 Compilers Supported
13 -------------------
14 MinGW GCC (recommended)
15
16 MSVC 6.0 SP6: You'll need Boost version 1.34 because they dropped support
17 for MSVC 6.0 after that.  However, they didn't add Asio until 1.35.
18 You should still be able to build with MSVC 6.0 by adding Asio to 1.34 by
19 unpacking boost_asio_*.zip into the boost directory:
20 http://sourceforge.net/projects/asio/files/asio
21
22 MSVC 8.0 (2005) SP1 has been tested.  Note: MSVC 7.0 and up have a habit of
23 linking to runtime DLLs that are not installed on XP by default.
24
25
26 Dependencies
27 ------------
28 Libraries you need to download separately and build:
29
30              default path  download
31 wxWidgets-2.9  \wxwidgets   http://www.wxwidgets.org/downloads/
32 OpenSSL        \openssl     http://www.openssl.org/source/
33 Berkeley DB    \db          http://www.oracle.com/technology/software/products/berkeley-db/index.html
34 Boost          \boost       http://www.boost.org/users/download/
35
36 Their licenses:
37 wxWidgets      LGPL 2.1 with very liberal exceptions
38 OpenSSL        Old BSD license with the problematic advertising requirement
39 Berkeley DB    New BSD license with additional requirement that linked software must be free open source
40 Boost          MIT-like license
41
42 Versions used in this release:
43 MinGW GCC    3.4.5
44 wxWidgets    2.9.0
45 OpenSSL      0.9.8k
46 Berkeley DB  4.7.25.NC
47 Boost        1.42.1
48
49
50 Notes
51 -----
52 The UI layout is edited with wxFormBuilder.  The project file is
53 uiproject.fbp.  It generates uibase.cpp and uibase.h, which define base
54 classes that do the rote work of constructing all the UI elements.
55
56 The release is built with GCC and then "strip bitcoin.exe" to strip the debug
57 symbols, which reduces the executable size by about 90%.
58
59
60 wxWidgets
61 ---------
62 cd \wxwidgets\build\msw
63 make -f makefile.gcc
64  or
65 nmake -f makefile.vc
66
67
68 OpenSSL
69 -------
70 Bitcoin does not use any encryption.  If you want to do a no-everything
71 build of OpenSSL to exclude encryption routines, a few patches are required.
72 (instructions for OpenSSL v0.9.8k)
73
74 Edit engines\e_gmp.c and engines\e_capi.c and add this #ifndef around
75 the openssl/rsa.h include:
76   #ifndef OPENSSL_NO_RSA
77   #include <openssl/rsa.h>
78   #endif
79
80 Edit ms\mingw32.bat and replace the Configure line's parameters with this
81 no-everything list.  You have to put this in the batch file because batch
82 files can't take more than nine command line parameters.
83   perl Configure mingw threads no-rc2 no-rc4 no-rc5 no-idea no-des no-bf no-cast no-aes no-camellia no-seed no-rsa no-dh
84
85 Also REM out the following line in ms\mingw32.bat after the mingw32-make
86 line.  The build fails after it's already finished building libeay32, which
87 is all we care about, but the failure aborts the script before it runs
88 dllwrap to generate libeay32.dll.
89   REM  if errorlevel 1 goto end
90
91 Build
92   cd \openssl
93   ms\mingw32.bat
94
95 If you want to use it with MSVC, generate the .lib file
96   lib /machine:i386 /def:ms\libeay32.def /out:out\libeay32.lib
97
98
99 Berkeley DB
100 -----------
101 Using MinGW and MSYS:
102 cd \db\build_unix
103 sh ../dist/configure --enable-mingw --enable-cxx
104 make
105
106
107 Boost
108 -----
109 download bjam.exe from
110 http://sourceforge.net/project/showfiles.php?group_id=7586&package_id=72941
111 cd \boost
112 bjam toolset=gcc --build-type=complete stage
113  or
114 bjam toolset=msvc --build-type=complete stage