summaryrefslogtreecommitdiff
path: root/win
diff options
context:
space:
mode:
Diffstat (limited to 'win')
-rw-r--r--[-rwxr-xr-x]win/Makefile.am2
-rw-r--r--win/README59
-rw-r--r--[-rwxr-xr-x]win/configure.js38
-rwxr-xr-xwin/mysql_manifest.cmake2
4 files changed, 42 insertions, 59 deletions
diff --git a/win/Makefile.am b/win/Makefile.am
index 89f0d65b528..279183480d8 100755..100644
--- a/win/Makefile.am
+++ b/win/Makefile.am
@@ -11,7 +11,7 @@
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
## Process this file with automake to create Makefile.in
EXTRA_DIST = build-vs71.bat build-vs8.bat build-vs8_x64.bat configure.js README \
diff --git a/win/README b/win/README
index cfc3cc9ef6f..916f64913ac 100644
--- a/win/README
+++ b/win/README
@@ -3,8 +3,8 @@ Windows building readme
----------------IMPORTANT----------------------------
This readme outlines the instructions for building
-MySQL for Windows staring from version 5.0.
-This readme does not apply to MySQL versions 5.1
+MySQL for Windows staring from version 5.1.
+This readme does not apply to MySQL versions 5.0
or ealier.
-----------------------------------------------------
@@ -13,13 +13,21 @@ 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
+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 2
+Step 3
------
Download and install bison for Windows. It can be downloaded from
http://gnuwin32.sourceforge.net/packages/bison.htm. Please download using
@@ -27,53 +35,60 @@ 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.
-Step 3
+(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 4
+Step 5
------
-From the root of your bk clone, execute the command: win\configure <options>.
-The options right now are
+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_BERKELEY_STORAGE_ENGINE
WITH_BLACKHOLE_STORAGE_ENGINE
WITH_EXAMPLE_STORAGE_ENGINE
WITH_FEDERATED_STORAGE_ENGINE
- WITH_INNOBASE_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
- DISABLE_GRANT_OPTIONS Disables the use of --init-file and --skip-grant-tables
- options of mysqld.exe
+ 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_ARCHIVE_STORAGE_ENGINE MYSQL_SERVER_SUFFIX=-my-suffix
+win\configure WITH_INNOBASE_STORAGE_ENGINE WITH_PARTITION_STORAGE_ENGINE MYSQL_SERVER_SUFFIX=-pro
-Step 5
+Step 6
------
-From the root of your bk clone, execute one of the batch files to generate the type
-of project files you desire.
-For Visual Studio 8, do win\build-vs8.
+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 6
+Step 7
------
From the root of your bk clone, start your build.
-For Visual Studio, simply execute mysql.sln. This will start the IDE and you can
-click the build solution menu option.
+For Visual Studio, execute mysql.sln. This will start the IDE
+and you can click the build solution menu option.
Current issues
--------------
@@ -82,5 +97,5 @@ 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 4 you only need to add the libraries advapi32.lib and user32.lib to
+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.
diff --git a/win/configure.js b/win/configure.js
index 0de09fb318c..c86ec0cf47c 100755..100644
--- a/win/configure.js
+++ b/win/configure.js
@@ -40,14 +40,15 @@ try
switch (parts[0])
{
case "WITH_ARCHIVE_STORAGE_ENGINE":
- case "WITH_BERKELEY_STORAGE_ENGINE":
case "WITH_BLACKHOLE_STORAGE_ENGINE":
case "WITH_EXAMPLE_STORAGE_ENGINE":
case "WITH_FEDERATED_STORAGE_ENGINE":
case "WITH_INNOBASE_STORAGE_ENGINE":
+ case "WITH_PARTITION_STORAGE_ENGINE":
case "__NT__":
- case "DISABLE_GRANT_OPTIONS":
+ case "CYBOZU":
case "EMBED_MANIFESTS":
+ case "WITH_EMBEDDED_SERVER":
configfile.WriteLine("SET (" + args.Item(i) + " TRUE)");
break;
case "MYSQL_SERVER_SUFFIX":
@@ -115,8 +116,6 @@ try
configfile.Close();
- //ConfigureBDB();
-
fso = null;
WScript.Echo("done!");
@@ -134,8 +133,6 @@ function GetValue(str, key)
var end = str.indexOf("\n", pos);
if (str.charAt(pos) == "\"")
pos++;
- if (str.charAt(end-1) == "\r")
- end--;
if (str.charAt(end-1) == "\"")
end--;
return str.substring(pos, end);
@@ -186,32 +183,3 @@ function GetVersionId(version)
id += build;
return id;
}
-
-function ConfigureBDB()
-{
- // read in the Unix configure.in file
- var dbIncTS = fso.OpenTextFile("..\\bdb\\dbinc\\db.in", ForReading);
- var dbIn = dbIncTS.ReadAll();
- dbIncTS.Close();
-
- dbIn = dbIn.replace("@DB_VERSION_MAJOR@", "$DB_VERSION_MAJOR");
- dbIn = dbIn.replace("@DB_VERSION_MINOR@", "$DB_VERSION_MINOR");
- dbIn = dbIn.replace("@DB_VERSION_PATCH@", "$DB_VERSION_PATCH");
- dbIn = dbIn.replace("@DB_VERSION_STRING@", "$DB_VERSION_STRING");
-
- dbIn = dbIn.replace("@u_int8_decl@", "typedef unsigned char u_int8_t;");
- dbIn = dbIn.replace("@int16_decl@", "typedef short int16_t;");
- dbIn = dbIn.replace("@u_int16_decl@", "typedef unsigned short u_int16_t;");
- dbIn = dbIn.replace("@int32_decl@", "typedef int int32_t;");
- dbIn = dbIn.replace("@u_int32_decl@", "typedef unsigned int u_int32_t;");
-
- dbIn = dbIn.replace("@u_char_decl@", "{\r\n#if !defined(_WINSOCKAPI_)\r\n" +
- "typedef unsigned char u_char;");
- dbIn = dbIn.replace("@u_short_decl@", "typedef unsigned short u_short;");
- dbIn = dbIn.replace("@u_int_decl@", "typedef unsigned int u_int;");
- dbIn = dbIn.replace("@u_long_decl@", "typedef unsigned long u_long;");
-
- dbIn = dbIn.replace("@ssize_t_decl@", "#endif\r\n#if defined(_WIN64)\r\n" +
- "typedef __int64 ssize_t;\r\n#else\r\n" +
- "typedef int ssize_t;\r\n#endif");
-}
diff --git a/win/mysql_manifest.cmake b/win/mysql_manifest.cmake
index 0d429e438d6..611553d68ac 100755
--- a/win/mysql_manifest.cmake
+++ b/win/mysql_manifest.cmake
@@ -9,7 +9,7 @@ MACRO(MYSQL_EMBED_MANIFEST _target_name _required_privs)
TARGET ${_target_name}
PRE_LINK
COMMAND cscript.exe
- ARGS "${PROJECT_SOURCE_DIR}/win/create_manifest.js" name=$(ProjectName) version=${VERSION} arch=${PROCESSOR_ARCH} exe_level=${_required_privs} outfile=$(IntDir)\\$(TargetFileName).intermediate.manifest
+ ARGS "${PROJECT_SOURCE_DIR}/win/create_manifest.js" name=$(TargetName) version=${VERSION} arch=${PROCESSOR_ARCH} exe_level=${_required_privs} outfile=$(IntDir)\\$(TargetFileName).intermediate.manifest
COMMENT "Generates the contents of the manifest contents.")
ADD_CUSTOM_COMMAND(
TARGET ${_target_name}