~akopytov/percona-xtrabackup/bug996483-2.1

244.4.1 by Alexey Kopytov
Added initial support for Windows builds:
1
How to build XtraBackup on Windows
2
==================================
3
4
Prerequisites:
5
--------------
6
7
To build XtraBackup on Windows you need the following:
8
9
- a Windows installation. These instructions have been tested on 
10
  Windows XP.
11
12
- CMake, an open source build system available from
13
  http://www.cmake.org/
14
15
- Visual Studio. Both commercial and Express editions should work. These
16
  instructions have been tested on Visual Studio 2005 Express.
17
18
- the patch utility. The Windows version can be downloaded from
19
  http://gnuwin32.sourceforge.net/packages/patch.htm
20
21
*** Important note for Windows Vista and Windows 7 users ***
22
23
These Windows versions demand running any executable with the word
24
'patch' in the name only with administrative privileges. So if want to
25
use the patch utility under an unprivileged user account, you should
26
rename "patch.exe" to something else, e.g. "patsh.exe".
27
28
Building instructions:
29
----------------------
30
31
1. Download the source code for the appropriate version of the
32
server. You can check the currently supported version by looking up the
33
value of the MYSQL_55_VERSION variable in utils/build.sh.
34
35
The currently supported version is usually older than the latest
36
released one. Older versions are available from
37
http://downloads.mysql.com/archives.php
38
39
2. Unpack and patch the server source.
40
41
- unpack the server source archive downloaded at step 1.
42
43
- start Visual Studio Command Prompt and run the following commands:
44
45
cd "folder with the server source tree"
46
patch --binary -p1 -i "path to the xtrabackup source tree"\patches\innodb55.patch
47
48
Make sure the patch utility is in the PATH environment variable or
49
specify the full path to it. Replace "patch" with the new name if you
50
had to rename it on Vista/7 (see the notes above ). 
51
52
The --binary switch is required to make patch work with the Unix
53
end-of-line format.
54
55
3. Build the patched server source:
56
57
Run the following commands from the server source folder:
58
59
cmake . -G "Visual Studio 8 2005" -DENABLED_LOCAL_INFILE=ON -DWITH_INNOBASE_STORAGE_ENGINE=ON -DWITH_PARTITION_STORAGE_ENGINE=ON -DWITH_ZLIB=bundled -DWITH_EXTRA_CHARSETS=all
60
61
devenv mysql.sln /build relwithdebinfo
62
63
The -G argument should be the Visual Studio version that will be used to
64
build. The complete list of available generators can be found in the
65
CMake documentation. Make sure to add the "Win64" suffix when creating
66
an x64 build.
67
68
You may also need to replace "devenv" with "vcexpress" for Express editions
69
of Visual Studio.
70
71
4. Build XtraBackup:
72
73
From the XtraBackup source folder:
74
75
cmake . -G "Visual Studio 8 2005" 
76
        -DMYSQL_ROOT_DIR="path to the server source folder built at step #3"
77
78
devenv xtrabackup.sln /build relwithdebinfo
79
80
The same comments about the -G argument and devenv from #3 apply here as well.
81
82
Once the build completes xtrabackup.exe can be found in the
83
relwithdebinfo subfolder of the XtraBackup source folder.