mariadb/win
Sergei Golubchik 630b0b8779 support for plugins on windows
CMakeLists.txt:
  1. add -DSAFEMALLOC -DSAFE_MUTEX in the top-level CMakeLists.txt
     don't force plugins to copy-paste these lines in their CMakeLists.txt
  2.1 search plugin/* for plugins (not only storage/*),
  2.2 recognize MYSQL_PLUGIN (not only MYSQL_STORAGE_ENGINE),
  2.3 extract library names from the plug.in (don't force library names to
      be ha_<engine>.dll and <engine>.lib)
include/mysql/plugin.h:
  define MYSQL_PLUGIN_EXPORT appropriately
  (backport from 5.5)
libmysqld/CMakeLists.txt:
  remove unnecessary workaround
plugin/fulltext/CMakeLists.txt:
  build fulltext example plugin on windows
storage/maria/CMakeLists.txt:
  The library is called libmaria_s.lib, not maria.lib
storage/maria/unittest/CMakeLists.txt:
  The library is called libmaria_s.lib, not maria.lib
storage/myisam/CMakeLists.txt:
  The library is called libmyisam_s.lib, not myisam.lib
storage/mysql_storage_engine.cmake:
  introduce MYSQL_PLUGIN macro.
  don't force library names to be ha_<engine>.dll and <engine>.lib
storage/xtradb/CMakeLists.txt:
  remove a condition from include
win/README:
  don't use deprecated syntax
win/configure-mariadb.sh:
  don't use deprecated syntax
win/configure.js:
  1. support MYSQL_PLUGIN in addition to MYSQL_STORAGE_ENGINE.
  2. support plugin/* in addition to storage/*
2011-10-04 15:41:52 +02:00
..
cmake Install MariaDB as a service with the installer 2010-06-30 14:10:40 +02:00
build-nmake-x64.bat Adding batch files for building with nmake make files 2007-09-05 16:30:38 -05:00
build-nmake.bat Adding batch files for building with nmake make files 2007-09-05 16:30:38 -05:00
build-vs8.bat chmod u+x win/build-vs*.bat 2007-03-20 15:42:34 +01:00
build-vs8_x64.bat my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
build-vs9.bat Bug #33907 : Errors compiling mysql with Microsoft Visual C++ Express 2008 2008-08-21 19:11:17 +02:00
build-vs9_x64.bat Bug #33907 : Errors compiling mysql with Microsoft Visual C++ Express 2008 2008-08-21 19:11:17 +02:00
build-vs10.bat Added support for VS10. 2011-03-28 13:43:30 +03:00
build-vs10_x64.bat Added support for VS10. 2011-03-28 13:43:30 +03:00
build-vs71.bat chmod u+x win/build-vs*.bat 2007-03-20 15:42:34 +01:00
configure-mariadb.bat support for plugins on windows 2011-10-04 15:41:52 +02:00
configure-mariadb.sh support for plugins on windows 2011-10-04 15:41:52 +02:00
configure.js support for plugins on windows 2011-10-04 15:41:52 +02:00
create_def_file.js Backport WL#3653 to 5.1 to enable bundled innodb plugin. 2009-06-10 10:59:49 +02:00
create_manifest.js - Added/updated copyright headers 2010-12-28 19:57:23 +01:00
make_mariadb_win_dist Add 64 bit packages to the pack script. 32 bit is still the default 2010-07-07 13:30:33 +02:00
Makefile.am Merge with MySQL 5.1.50 2010-08-27 17:12:44 +03:00
mysql_manifest.cmake Merge 2010-12-29 00:47:05 +01:00
README support for plugins on windows 2011-10-04 15:41:52 +02:00

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-plugin-XXX                    Enable particular plugin or plugins
    --with-plugins=XXX,YYY,...
    --with-plugins=GROUP                 GROUP can be, for example, "max" or "max-no-ndb"
    --without-plugin-XXX                 Disable particular plugin
    __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-plugin-innobase --with-plugin-partition 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.