This repository has been archived by the owner on Nov 20, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6
/
BUILD.win
executable file
·91 lines (56 loc) · 2.49 KB
/
BUILD.win
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
MySQL Connector/C - Build on Microsoft Windows
WHAT YOU NEED
---------------------------------------------------------------
Microsoft Windows - supported versions:
We don't support older versions of Microsoft windows.
Supported versions are Windows 2000, Windows XP, Windows Vista,
Windows Server 2003, or Windows Server 2008.
Compiler Tools
We regularly build using Microsoft Visual Studio 8 and 9.
Express edition of Visual Studio and other compilers may work,
but are untested.
You also need CMake 2.6 or newer, available at
http://www.cmake.org
Source Code
The source code is the main thing. You can get it from the
source repository if you want the 'bleeding edge' code but most
people will simply download the zip of the source.
You will find the source repository on lauchpad
http://launchpad.net/libmysql
BUILD
---------------------------------------------------------------
You need to have the environment variables set for the Visual Studio
toolchain. Visual Studio includes a batch file to set these for you,
and installs a shortcut into the Start menu to open a command prompt
with these variables set.
Build Connector/C using the "cmake" command-line tool by doing the
following from the source root directory (in a command prompt window);
cmake -G "Visual Studio 9 2008"
This produces a project file that you can open with Visual Studio or
build from the command line with either of:
devenv.com libmysql.sln /build Release
devenv.com libmysql.sln /build RelWithDebInfo
For other versions of Visual Studio or nmake based build call
cmake --help
to check the supported generators.
To compile the "Debug" build, you must run set the cmake build type so
the correct version of external libraries are used:
cmake -G "Visual Studio 8 2005" -DCMAKE_BUILD_TYPE=Debug
devenv.com libmysql.sln /build Debug
Installation
---------------------------------------------------------------
To create a install package you can choose between two variants:
- creating a zip package
- creating a msi install package
Zip package
To create a zip package, just run the cpack command from the root of
your Connector/C source directory.
MSI Install package
Required tools:
- Windows XML Installer toolset (WIX), available at
http://sourceforge.net/projects/wix/
To create the msi install package change to the subdirectory win
and generate the makefile
cmake -G "NMake Makefiles"
Create the msi install package by calling nmake
nmake