mirror of
https://github.com/MariaDB/server.git
synced 2025-01-16 20:12:31 +01:00
1337c429fb
Additional changes for bug#29903 - Changed to do embedded build part as normal build, when WITH_EMBEDDED_SERVER is set. - Allow both normal and debug build with embedded. - Build static embedded library by pointing out all source and compile it all, i.e. not building libraries from libraries, not portable. - Let embedded use generated files from the "sql" directory, added dependencies to make sure built before embedded. - Mark library "dbug" in TARGET_LINK_LIBRARIES() with "debug", so only linked in when debug target is used. - Removed change of target name with "mysqld${MYSQLD_EXE_SUFFIX}", as others can't depend on it, not defined at configure time. Instead set the output file name. - Created work around for bug in CMake 2.4.6 and output names, to set the "mysqld<suffix>.pdb" name to the same base name. - Set the correct manifest "name" (patch by iggy) CMakeLists.txt: Changes for embedded and Windows libmysql/CMakeLists.txt: Changes for embedded and Windows libmysqld/CMakeLists.txt: Changes for embedded and Windows libmysqld/examples/CMakeLists.txt: Changes for embedded and Windows mysys/CMakeLists.txt: Changes for embedded and Windows regex/CMakeLists.txt: Changes for embedded and Windows server-tools/instance-manager/CMakeLists.txt: Changes for embedded and Windows sql/CMakeLists.txt: Changes for embedded and Windows storage/archive/CMakeLists.txt: Changes for embedded and Windows storage/blackhole/CMakeLists.txt: Changes for embedded and Windows storage/csv/CMakeLists.txt: Changes for embedded and Windows storage/example/CMakeLists.txt: Changes for embedded and Windows storage/federated/CMakeLists.txt: Changes for embedded and Windows storage/heap/CMakeLists.txt: Changes for embedded and Windows storage/innobase/CMakeLists.txt: Changes for embedded and Windows storage/myisam/CMakeLists.txt: Changes for embedded and Windows storage/myisammrg/CMakeLists.txt: Changes for embedded and Windows strings/CMakeLists.txt: Changes for embedded and Windows vio/CMakeLists.txt: Changes for embedded and Windows win/README: Changes for embedded and Windows win/configure.js: Changes for embedded and Windows win/mysql_manifest.cmake: Changes for embedded and Windows
101 lines
3.8 KiB
Text
101 lines
3.8 KiB
Text
Windows building readme
|
|
======================================
|
|
|
|
----------------IMPORTANT----------------------------
|
|
This readme outlines the instructions for building
|
|
MySQL for Windows staring from version 5.1.
|
|
This readme does not apply to MySQL versions 5.0
|
|
or ealier.
|
|
-----------------------------------------------------
|
|
|
|
The Windows build system uses a tool named CMake to generate build files for
|
|
a variety of project systems. This tool is combined with a set of jscript
|
|
files to enable building of MySQL for Windows directly out of a bk clone.
|
|
The steps required are below.
|
|
|
|
Step 1:
|
|
-------
|
|
|
|
Install a Windows C++ compiler. If you don't have one, you can use
|
|
the free compiler "Visual C++ 2005 express edition", which from Cmake
|
|
point of view is same as Visual studio 8:
|
|
http://msdn.microsoft.com/vstudio/express/
|
|
|
|
Step 2
|
|
------
|
|
Download and install CMake. It can be downloaded from http://www.cmake.org.
|
|
Once it is installed, modify your path to make sure you can execute
|
|
the cmake binary.
|
|
|
|
Step 3
|
|
------
|
|
Download and install bison for Windows. It can be downloaded from
|
|
http://gnuwin32.sourceforge.net/packages/bison.htm. Please download using
|
|
the link named "Complete package, excluding sources". This includes an
|
|
installer that will install bison. After the installer finishes, modify
|
|
your path so that you can execute bison.
|
|
|
|
(As an alternative you can take the sql_yacc.yy and sql_yacc.h files from a
|
|
matching mysql tar distribution and drop them into the sql directory just
|
|
before you start the build)
|
|
|
|
Step 4
|
|
------
|
|
Clone your bk tree to any location you like.
|
|
|
|
Step 5
|
|
------
|
|
From the root of your installation directory, execute the command:
|
|
|
|
win\configure <options>
|
|
|
|
The options right now are:
|
|
|
|
WITH_INNOBASE_STORAGE_ENGINE Enable particular storage engines
|
|
WITH_PARTITION_STORAGE_ENGINE
|
|
WITH_ARCHIVE_STORAGE_ENGINE
|
|
WITH_BLACKHOLE_STORAGE_ENGINE
|
|
WITH_EXAMPLE_STORAGE_ENGINE
|
|
WITH_FEDERATED_STORAGE_ENGINE
|
|
__NT__ Enable named pipe support
|
|
MYSQL_SERVER_SUFFIX=<suffix> Server suffix, default none
|
|
COMPILATION_COMMENT=<comment> Server comment, default "Source distribution"
|
|
MYSQL_TCP_PORT=<port> Server port, default 3306
|
|
CYBOZU Default character set is UTF8
|
|
EMBED_MANIFESTS Embed custom manifests into final exes, otherwise VS
|
|
default will be used. (Note - This option should only be
|
|
used by MySQL AB.)
|
|
WITH_EMBEDDED_SERVER Configure solution to produce libmysqld.dll
|
|
and the static mysqlserver.lib
|
|
|
|
So the command line could look like:
|
|
|
|
win\configure WITH_INNOBASE_STORAGE_ENGINE WITH_PARTITION_STORAGE_ENGINE MYSQL_SERVER_SUFFIX=-pro
|
|
|
|
Step 6
|
|
------
|
|
|
|
From the root of your installation directory/bk clone, execute one of
|
|
the batch files to generate the type of project files you desire.
|
|
|
|
For Visual Studio 8 (or Visual C++ 2005 express edition), do win\build-vs8.
|
|
For Visual Studio 7.1, do win\build-vs71.
|
|
|
|
We will support building with nmake in the near future.
|
|
|
|
Step 7
|
|
------
|
|
From the root of your bk clone, start your build.
|
|
|
|
For Visual Studio, execute mysql.sln. This will start the IDE
|
|
and you can click the build solution menu option.
|
|
|
|
Current issues
|
|
--------------
|
|
1. After changing configuration (eg. adding or removing a storage engine), it
|
|
may be necessary to clean the build tree to remove any stale objects.
|
|
|
|
2. To use Visual C++ Express Edition you also need to install the Platform SDK.
|
|
Please see this link: http://msdn.microsoft.com/vstudio/express/visualc/usingpsdk/
|
|
At step 5 you only need to add the libraries advapi32.lib and user32.lib to
|
|
the file "corewin_express.vsprops" in order to avoid link errors.
|