Merge remote branch 'refs/remotes/svn/trunk' into svn
[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 http://tdm-gcc.tdragon.net/ has an easy installer.  Go back a few versions
16 for a little older gcc like gcc 4.4.?.
17
18 MSVC 8.0 (2005) SP1 has been tested.  Note: MSVC 7.0 and up have a habit of
19 linking to runtime DLLs that are not installed on XP by default.
20
21
22 Dependencies
23 ------------
24 Libraries you need to download separately and build:
25
26              default path  download
27 wxWidgets-2.9  \wxwidgets   http://www.wxwidgets.org/downloads/
28 OpenSSL        \openssl     http://www.openssl.org/source/
29 Berkeley DB    \db          http://www.oracle.com/technology/software/products/berkeley-db/index.html
30 Boost          \boost       http://www.boost.org/users/download/
31
32 Their licenses:
33 wxWidgets      LGPL 2.1 with very liberal exceptions
34 OpenSSL        Old BSD license with the problematic advertising requirement
35 Berkeley DB    New BSD license with additional requirement that linked software must be free open source
36 Boost          MIT-like license
37
38 Versions used in this release:
39 MinGW GCC    3.4.5
40 wxWidgets    2.9.0
41 OpenSSL      0.9.8k
42 Berkeley DB  4.7.25.NC
43 Boost        1.42.1
44
45
46 Notes
47 -----
48 The UI layout is edited with wxFormBuilder.  The project file is
49 uiproject.fbp.  It generates uibase.cpp and uibase.h, which define base
50 classes that do the rote work of constructing all the UI elements.
51
52 The release is built with GCC and then "strip bitcoin.exe" to strip the debug
53 symbols, which reduces the executable size by about 90%.
54
55
56 wxWidgets
57 ---------
58 cd \wxwidgets\build\msw
59 make -f makefile.gcc
60  or
61 nmake -f makefile.vc
62
63
64 OpenSSL
65 -------
66 Bitcoin does not use any encryption.  If you want to do a no-everything
67 build of OpenSSL to exclude encryption routines, a few patches are required.
68 (instructions for OpenSSL v0.9.8k)
69
70 Edit engines\e_gmp.c and engines\e_capi.c and add this #ifndef around
71 the openssl/rsa.h include:
72   #ifndef OPENSSL_NO_RSA
73   #include <openssl/rsa.h>
74   #endif
75
76 Edit ms\mingw32.bat and replace the Configure line's parameters with this
77 no-everything list.  You have to put this in the batch file because batch
78 files can't take more than nine command line parameters.
79   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
80
81 Also REM out the following line in ms\mingw32.bat after the mingw32-make
82 line.  The build fails after it's already finished building libeay32, which
83 is all we care about, but the failure aborts the script before it runs
84 dllwrap to generate libeay32.dll.
85   REM  if errorlevel 1 goto end
86
87 Build
88   cd \openssl
89   ms\mingw32.bat
90
91 If you want to use it with MSVC, generate the .lib file
92   lib /machine:i386 /def:ms\libeay32.def /out:out\libeay32.lib
93
94
95 Berkeley DB
96 -----------
97 Using MinGW and MSYS:
98 cd \db\build_unix
99 sh ../dist/configure --enable-mingw --enable-cxx
100 make
101
102
103 Boost
104 -----
105 download bjam.exe from
106 http://sourceforge.net/project/showfiles.php?group_id=7586&package_id=72941
107 cd \boost
108 bjam toolset=gcc --build-type=complete stage
109  or
110 bjam toolset=msvc --build-type=complete stage