diff options
Diffstat (limited to 'win')
-rw-r--r-- | win/Makefile.am | 22 | ||||
-rw-r--r-- | win/README | 101 | ||||
-rw-r--r-- | win/build-nmake-x64.bat | 21 | ||||
-rw-r--r-- | win/build-nmake.bat | 21 | ||||
-rwxr-xr-x | win/build-vs71.bat | 22 | ||||
-rwxr-xr-x | win/build-vs8.bat | 21 | ||||
-rwxr-xr-x | win/build-vs8_x64.bat | 21 | ||||
-rw-r--r-- | win/build-vs9.bat | 18 | ||||
-rw-r--r-- | win/build-vs9_x64.bat | 18 | ||||
-rw-r--r-- | win/configure.js | 320 | ||||
-rw-r--r-- | win/create_def_file.js | 1 | ||||
-rwxr-xr-x | win/create_manifest.js | 96 | ||||
-rwxr-xr-x | win/mysql_manifest.cmake | 21 |
13 files changed, 1 insertions, 702 deletions
diff --git a/win/Makefile.am b/win/Makefile.am deleted file mode 100644 index e5813010740..00000000000 --- a/win/Makefile.am +++ /dev/null @@ -1,22 +0,0 @@ -# Copyright (C) 2006 MySQL AB -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 2 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# 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., 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 build-vs9.bat \ - build-vs9_x64.bat configure.js README mysql_manifest.cmake \ - create_manifest.js create_def_file.js - -# Don't update the files from bitkeeper -%::SCCS/s.% diff --git a/win/README b/win/README deleted file mode 100644 index 916f64913ac..00000000000 --- a/win/README +++ /dev/null @@ -1,101 +0,0 @@ -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. diff --git a/win/build-nmake-x64.bat b/win/build-nmake-x64.bat deleted file mode 100644 index f73574ac8de..00000000000 --- a/win/build-nmake-x64.bat +++ /dev/null @@ -1,21 +0,0 @@ -@echo off - -REM Copyright (C) 2006 MySQL AB -REM -REM This program is free software; you can redistribute it and/or modify -REM it under the terms of the GNU General Public License as published by -REM the Free Software Foundation; version 2 of the License. -REM -REM This program is distributed in the hope that it will be useful, -REM but WITHOUT ANY WARRANTY; without even the implied warranty of -REM MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -REM GNU General Public License for more details. -REM -REM You should have received a copy of the GNU General Public License -REM along with this program; if not, write to the Free Software -REM Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - -if exist cmakecache.txt del cmakecache.txt -copy win\nmake_x64_cache.txt cmakecache.txt -cmake -G "NMake Makefiles" -copy cmakecache.txt win\nmake_x64_cache.txt diff --git a/win/build-nmake.bat b/win/build-nmake.bat deleted file mode 100644 index 89505c08313..00000000000 --- a/win/build-nmake.bat +++ /dev/null @@ -1,21 +0,0 @@ -@echo off - -REM Copyright (C) 2006 MySQL AB -REM -REM This program is free software; you can redistribute it and/or modify -REM it under the terms of the GNU General Public License as published by -REM the Free Software Foundation; version 2 of the License. -REM -REM This program is distributed in the hope that it will be useful, -REM but WITHOUT ANY WARRANTY; without even the implied warranty of -REM MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -REM GNU General Public License for more details. -REM -REM You should have received a copy of the GNU General Public License -REM along with this program; if not, write to the Free Software -REM Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - -if exist cmakecache.txt del cmakecache.txt -copy win\nmake_cache.txt cmakecache.txt -cmake -G "NMake Makefiles" -copy cmakecache.txt win\nmake_cache.txt diff --git a/win/build-vs71.bat b/win/build-vs71.bat deleted file mode 100755 index 159b1ec97d1..00000000000 --- a/win/build-vs71.bat +++ /dev/null @@ -1,22 +0,0 @@ -@echo off - -REM Copyright (C) 2006 MySQL AB -REM -REM This program is free software; you can redistribute it and/or modify -REM it under the terms of the GNU General Public License as published by -REM the Free Software Foundation; version 2 of the License. -REM -REM This program is distributed in the hope that it will be useful, -REM but WITHOUT ANY WARRANTY; without even the implied warranty of -REM MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -REM GNU General Public License for more details. -REM -REM You should have received a copy of the GNU General Public License -REM along with this program; if not, write to the Free Software -REM Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - -if exist cmakecache.txt del cmakecache.txt -copy win\vs71cache.txt cmakecache.txt -cmake -G "Visual Studio 7 .NET 2003" -copy cmakecache.txt win\vs71cache.txt - diff --git a/win/build-vs8.bat b/win/build-vs8.bat deleted file mode 100755 index ff0eeb0a8cb..00000000000 --- a/win/build-vs8.bat +++ /dev/null @@ -1,21 +0,0 @@ -@echo off - -REM Copyright (C) 2006 MySQL AB -REM -REM This program is free software; you can redistribute it and/or modify -REM it under the terms of the GNU General Public License as published by -REM the Free Software Foundation; version 2 of the License. -REM -REM This program is distributed in the hope that it will be useful, -REM but WITHOUT ANY WARRANTY; without even the implied warranty of -REM MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -REM GNU General Public License for more details. -REM -REM You should have received a copy of the GNU General Public License -REM along with this program; if not, write to the Free Software -REM Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - -if exist cmakecache.txt del cmakecache.txt -copy win\vs8cache.txt cmakecache.txt -cmake -G "Visual Studio 8 2005" -copy cmakecache.txt win\vs8cache.txt diff --git a/win/build-vs8_x64.bat b/win/build-vs8_x64.bat deleted file mode 100755 index bc13e01d742..00000000000 --- a/win/build-vs8_x64.bat +++ /dev/null @@ -1,21 +0,0 @@ -@echo off - -REM Copyright (C) 2006 MySQL AB -REM -REM This program is free software; you can redistribute it and/or modify -REM it under the terms of the GNU General Public License as published by -REM the Free Software Foundation; version 2 of the License. -REM -REM This program is distributed in the hope that it will be useful, -REM but WITHOUT ANY WARRANTY; without even the implied warranty of -REM MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -REM GNU General Public License for more details. -REM -REM You should have received a copy of the GNU General Public License -REM along with this program; if not, write to the Free Software -REM Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - -if exist cmakecache.txt del cmakecache.txt -copy win\vs8cache.txt cmakecache.txt -cmake -G "Visual Studio 8 2005 Win64" -copy cmakecache.txt win\vs8cache.txt diff --git a/win/build-vs9.bat b/win/build-vs9.bat deleted file mode 100644 index 09f1e343013..00000000000 --- a/win/build-vs9.bat +++ /dev/null @@ -1,18 +0,0 @@ -@echo off - -REM Copyright (C) 2006 MySQL AB -REM -REM This program is free software; you can redistribute it and/or modify -REM it under the terms of the GNU General Public License as published by -REM the Free Software Foundation; version 2 of the License. -REM -REM This program is distributed in the hope that it will be useful, -REM but WITHOUT ANY WARRANTY; without even the implied warranty of -REM MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -REM GNU General Public License for more details. -REM -REM You should have received a copy of the GNU General Public License -REM along with this program; if not, write to the Free Software -REM Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -cmake -G "Visual Studio 9 2008" - diff --git a/win/build-vs9_x64.bat b/win/build-vs9_x64.bat deleted file mode 100644 index 61c7253132d..00000000000 --- a/win/build-vs9_x64.bat +++ /dev/null @@ -1,18 +0,0 @@ -@echo off - -REM Copyright (C) 2006 MySQL AB -REM -REM This program is free software; you can redistribute it and/or modify -REM it under the terms of the GNU General Public License as published by -REM the Free Software Foundation; version 2 of the License. -REM -REM This program is distributed in the hope that it will be useful, -REM but WITHOUT ANY WARRANTY; without even the implied warranty of -REM MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -REM GNU General Public License for more details. -REM -REM You should have received a copy of the GNU General Public License -REM along with this program; if not, write to the Free Software -REM Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -cmake -G "Visual Studio 9 2008 Win64" - diff --git a/win/configure.js b/win/configure.js deleted file mode 100644 index ebed98e2391..00000000000 --- a/win/configure.js +++ /dev/null @@ -1,320 +0,0 @@ -// Configure.js -// -// Copyright (C) 2006 MySQL AB -// -// This program is free software; you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation; version 2 of the License. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - -ForReading = 1; -ForWriting = 2; -ForAppending = 8; - -try -{ - var fso = new ActiveXObject("Scripting.FileSystemObject"); - - var args = WScript.Arguments - - // read in the Unix configure.in file - var configureInTS = fso.OpenTextFile("configure.in", ForReading); - var configureIn = configureInTS.ReadAll(); - configureInTS.Close(); - var default_comment = "Source distribution"; - var default_port = GetValue(configureIn, "MYSQL_TCP_PORT_DEFAULT"); - var actual_port = 0; - - var configfile = fso.CreateTextFile("win\\configure.data", true); - for (i=0; i < args.Count(); i++) - { - var parts = args.Item(i).split('='); - switch (parts[0]) - { - case "CYBOZU": - case "EMBED_MANIFESTS": - case "EXTRA_DEBUG": - case "WITH_EMBEDDED_SERVER": - case "WITHOUT_MARIA_TEMP_TABLES": - configfile.WriteLine("SET (" + args.Item(i) + " TRUE)"); - break; - case "MYSQL_SERVER_SUFFIX": - case "MYSQLD_EXE_SUFFIX": - configfile.WriteLine("SET (" + parts[0] + " \"" - + parts[1] + "\")"); - break; - case "COMPILATION_COMMENT": - default_comment = parts[1]; - break; - case "MYSQL_TCP_PORT": - actual_port = parts[1]; - break; - } - } - - if (actual_port == 0) - { - // if we actually defaulted (as opposed to the pathological case of - // --with-tcp-port=<MYSQL_TCP_PORT_DEFAULT> which might in theory - // happen if whole batch of servers was built from a script), set - // the default to zero to indicate that; we don't lose information - // that way, because 0 obviously indicates that we can get the - // default value from MYSQL_TCP_PORT. this seems really evil, but - // testing for MYSQL_TCP_PORT==MYSQL_TCP_PORT_DEFAULT would make a - // a port of MYSQL_TCP_PORT_DEFAULT magic even if the builder did not - // intend it to mean "use the default, in fact, look up a good default - // from /etc/services if you can", but really, really meant 3306 when - // they passed in 3306. When they pass in a specific value, let them - // have it; don't second guess user and think we know better, this will - // just make people cross. this makes the the logic work like this - // (which is complicated enough): - // - // - if a port was set during build, use that as a default. - // - // - otherwise, try to look up a port in /etc/services; if that fails, - // use MYSQL_TCP_PORT_DEFAULT (at the time of this writing 3306) - // - // - allow the MYSQL_TCP_PORT environment variable to override that. - // - // - allow command-line parameters to override all of the above. - // - // the top-most MYSQL_TCP_PORT_DEFAULT is read from win/configure.js, - // so don't mess with that. - actual_port = default_port; - default_port = 0; - } - - configfile.WriteLine("SET (COMPILATION_COMMENT \"" + - default_comment + "\")"); - - configfile.WriteLine("SET (PROTOCOL_VERSION \"" + - GetValue(configureIn, "PROTOCOL_VERSION") + "\")"); - configfile.WriteLine("SET (DOT_FRM_VERSION \"" + - GetValue(configureIn, "DOT_FRM_VERSION") + "\")"); - configfile.WriteLine("SET (MYSQL_TCP_PORT_DEFAULT \"" + default_port + "\")"); - configfile.WriteLine("SET (MYSQL_TCP_PORT \"" + actual_port + "\")"); - configfile.WriteLine("SET (MYSQL_UNIX_ADDR \"MySQL\")"); - var version = GetVersion(configureIn); - configfile.WriteLine("SET (VERSION \"" + version + "\")"); - configfile.WriteLine("SET (MYSQL_BASE_VERSION \"" + - GetBaseVersion(version) + "\")"); - configfile.WriteLine("SET (MYSQL_VERSION_ID \"" + - GetVersionId(version) + "\")"); - var engineOptions = ParsePlugins(); - for (option in engineOptions) - { - configfile.WriteLine("SET(" + engineOptions[option] + " TRUE)"); - } - configfile.Close(); - - fso = null; - - WScript.Echo("done!"); -} -catch (e) -{ - WScript.Echo("Error: " + e.description); -} - -function GetValue(str, key) -{ - var pos = str.indexOf(key+'='); - if (pos == -1) return null; - pos += key.length + 1; - var end = str.indexOf("\n", pos); - if (str.charAt(pos) == "\"") - pos++; - if (str.charAt(end-1) == "\"") - end--; - return str.substring(pos, end); -} - -function GetVersion(str) -{ - var key = "AC_INIT([MySQL Server], ["; - var pos = str.indexOf(key); - if (pos == -1) return null; - pos += key.length; - var end = str.indexOf("]", pos); - if (end == -1) return null; - return str.substring(pos, end); -} - -function GetBaseVersion(version) -{ - var dot = version.indexOf("."); - if (dot == -1) return null; - dot = version.indexOf(".", dot+1); - if (dot == -1) dot = version.length; - return version.substring(0, dot); -} - -function GetVersionId(version) -{ - var dot = version.indexOf("."); - if (dot == -1) return null; - var major = parseInt(version.substring(0, dot), 10); - - dot++; - var nextdot = version.indexOf(".", dot); - if (nextdot == -1) return null; - var minor = parseInt(version.substring(dot, nextdot), 10); - dot = nextdot+1; - - var stop = version.indexOf("-", dot); - if (stop == -1) stop = version.length; - var build = parseInt(version.substring(dot, stop), 10); - - var id = major; - if (minor < 10) - id += '0'; - id += minor; - if (build < 10) - id += '0'; - id += build; - return id; -} - -function PluginConfig(isGroup, include) -{ - this.isGroup = isGroup; - this.include = include; -} - - -// Parse command line arguments specific to plugins (aka storage engines). -// -// --with-plugin-PLUGIN, --with-plugins=group, --with-plugins=PLUGIN[,PLUGIN...] -// --without-plugin-PLUGIN is supported. -// -// Legacy option WITH_<PLUGIN>_STORAGE_ENGINE is supported as well. -// The function returns string array with elements like WITH_SOME_STORAGE_ENGINE -// or WITHOUT_SOME_STORAGE_ENGINE. -// -// This function handles groups, for example effect of specifying --with-plugins=max -// is the same as --with-plugins==archive,federated,falcon,innobase... - -function ParsePlugins() -{ - - var config = new Array(); - - config["DEFAULT"] = new PluginConfig(true,true); - - // Parse command line parameters - for (i=0; i< WScript.Arguments.length;i++) - { - var option = WScript.Arguments.Item(i); - var match = /WITH_(\w+)_STORAGE_ENGINE/.exec(option); - if (match == null) - match = /--with-plugin-(\w+)/.exec(option); - if (match != null) - { - config[match[1].toUpperCase()] = new PluginConfig(false,true); - continue; - } - - match = /WITHOUT_(\w+)_STORAGE_ENGINE/.exec(option); - if (match == null) - match = /--without-plugin-(\w+)/.exec(option); - - if (match != null) - { - config[match[1].toUpperCase()] = - new PluginConfig(false,false); - continue; - } - - match = /--with-plugins=([\w,\-_]+)/.exec(option); - if(match != null) - { - - var plugins = match[1].split(","); - for(var key in plugins) - { - config[plugins[key].toUpperCase()] = - new PluginConfig(null,true); - } - continue; - } - match = /--without-plugins=([\w,\-_]+)/.exec(option); - if(match != null) - { - var plugins = match[1].split(","); - for(var key in plugins) - config[plugins[key].toUpperCase()] = - new PluginConfig(null, false); - continue; - } - } - - // Read plugin definitions, find out groups plugins belong to. - var fc = new Enumerator(fso.GetFolder("storage").SubFolders); - for (;!fc.atEnd(); fc.moveNext()) - { - var subfolder = fc.item(); - var name = subfolder.name.toUpperCase(); - - // Handle case where storage engine was already specified by name in - // --with-plugins or --without-plugins. - if (config[name] != undefined) - { - config[name].isGroup = false; - continue; - } - config[name] = new PluginConfig(false,null); - - // Handle groups. For each plugin, find out which group it belongs to - // If this group was specified on command line for inclusion/exclusion, - // then include/exclude the plugin. - filename = subfolder +"\\plug.in"; - if (fso.FileExists(filename)) - { - var content = fso.OpenTextFile(filename, ForReading).ReadAll(); - var match = - /MYSQL_STORAGE_ENGINE([ ]*)[\(]([^\)]+)[\)]/.exec(content); - if (match== null) - continue; - match = /\[[\w,\-_]+\][\s]?\)/.exec(match[0]); - if (match == null) - continue; - groups = match[0].split(/[\,\(\)\[\] ]/); - for (var key in groups) - { - var group = groups[key].toUpperCase(); - if (config[group] != undefined) - { - config[group].isGroup = true; - if (config[group].include != null) - { - config[name].include = config[group].include; - break; - } - } - } - } - } - - var arr = new Array(); - for(key in config) - { - var eng = config[key]; - if(eng.isGroup != undefined && !eng.isGroup && eng.include != undefined) - { - if (fso.FolderExists("storage\\"+key) || key=="PARTITION") - { - arr[arr.length] = eng.include? - "WITH_"+key+"_STORAGE_ENGINE":"WITHOUT_"+key+"_STORAGE_ENGINE"; - } - } - } - return arr; -} diff --git a/win/create_def_file.js b/win/create_def_file.js index aaaf4659736..21f884417e3 100644 --- a/win/create_def_file.js +++ b/win/create_def_file.js @@ -173,6 +173,7 @@ function IsCompilerDefinedSymbol(symbol) (symbol.indexOf("??_R") != -1) || (symbol.indexOf("??_7") != -1) || (symbol.indexOf("?_G") != -1) || // scalar deleting destructor + (symbol.indexOf("_VInfreq_?") != -1) || // special label (exception handler?) for Intel compiler (symbol.indexOf("?_E") != -1)); // vector deleting destructor } diff --git a/win/create_manifest.js b/win/create_manifest.js deleted file mode 100755 index dbdd83588c5..00000000000 --- a/win/create_manifest.js +++ /dev/null @@ -1,96 +0,0 @@ -/* - manifest.js - Writes a custom XML manifest for each executable/library - 5 command line options must be supplied: - name - Name of the executable/library into which the mainfest will be - embedded. - version - Version of the executable - arch - Architecture intended. - exe_level - Application execution level. - [asInvoker|highestAvailable|requireAdministrator] - outfile - Final destination where mainfest will be written. - - Example: - cscript manifest.js name=mysql version=5.0.32 arch=X86 type=win32 - exe_level=asInvoker outfile=out.xml -*/ - -try -{ - var args = WScript.Arguments - for (i=0; i < args.Count(); i++) - { - var parts = args.Item(i).split('='); - switch (parts[0]) - { - case "name": - var app_name= parts[1]; - break; - case "version": - var supp_version= parts[1]; - // Clean up the supplied version string. - var end= supp_version.indexOf("-"); - if (end == -1) end= supp_version.length; - var app_version= supp_version.substring(0, end); - var fourth_element= 0; - if(app_version.match(/[a-z]$/)) { - fourth_element+= (1 + app_version.charCodeAt(end-1) - "a".charCodeAt(0)); - app_version= app_version.substring(0,--end); - } - if(app_version.match(/sp[1-9]$/)) { - fourth_element+= 100*(app_version.charCodeAt(end-1) - "0".charCodeAt(0)); - app_version= app_version.substring(0, end-3); - end-= 3; - } - app_version+= "." + fourth_element; - break; - case "arch": - var app_arch= parts[1]; - break; - case "exe_level": - var app_exe_level= parts[1]; - break; - case "outfile": - var manifest_file= parts[1]; - break; - default: - WScript.echo("Invalid argument supplied."); - } - } - if (i != 5) - throw new Error(1, "Incorrect number of arguments."); - - var manifest_xml= "<?xml version=\'1.0\' encoding=\'UTF-8\' standalone=\'yes\'?>\r\n"; - manifest_xml+= "<assembly xmlns=\'urn:schemas-microsoft-com:asm.v1\'"; - manifest_xml+= " manifestVersion=\'1.0\'>\r\n"; - // Application Information - manifest_xml+= "\t<assemblyIdentity name=\'" + app_name + "\'"; - manifest_xml+= " version=\'" + app_version + "\'"; - manifest_xml+= " processorArchitecture=\'" + app_arch + "\'"; - manifest_xml+= " publicKeyToken=\'02ad33b422233ae3\'"; - manifest_xml+= " type=\'win32\' />\r\n"; - // Identify the application security requirements. - manifest_xml+= "\t<trustInfo xmlns=\'urn:schemas-microsoft-com:asm.v2\'>\r\n"; - manifest_xml+= "\t\t<security>\r\n\t\t\t<requestedPrivileges>\r\n\t\t\t\t"; - manifest_xml+= "<requestedExecutionLevel level=\'" + app_exe_level + "\'"; - manifest_xml+= " uiAccess=\'false\'/>\r\n"; - manifest_xml+= "\t\t\t</requestedPrivileges>\r\n\t\t</security>\r\n"; - manifest_xml+= "\t</trustInfo>\r\n</assembly>\r\n"; - - // Write the valid XML to it's final destination. - var outfileXML = WScript.CreateObject("Msxml2.DOMDocument.3.0"); - outfileXML.async = false; - if (!outfileXML.loadXML(manifest_xml)) - { - WScript.Echo(manifest_xml); - throw new Error(2, "Invalid XML"); - } - outfileXML.save(manifest_file); - - WScript.Echo("Success, created custom manifest!"); - WScript.Quit(0); -} -catch (e) -{ - WScript.Echo("Error: " + e.description); - WScript.Quit(1); -} diff --git a/win/mysql_manifest.cmake b/win/mysql_manifest.cmake deleted file mode 100755 index 611553d68ac..00000000000 --- a/win/mysql_manifest.cmake +++ /dev/null @@ -1,21 +0,0 @@ - -# - MYSQL_EMBED_MANIFEST(target_name required_privs) -# Create a manifest for target_name. Set the execution level to require_privs -# -# NOTE. PROCESSOR_ARCH must be defined before this MACRO is called. - -MACRO(MYSQL_EMBED_MANIFEST _target_name _required_privs) - ADD_CUSTOM_COMMAND( - TARGET ${_target_name} - PRE_LINK - COMMAND cscript.exe - 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} - POST_BUILD - COMMAND mt.exe ARGS -nologo -hashupdate -makecdfs -manifest $(IntDir)\\$(TargetFileName).intermediate.manifest -outputresource:$(TargetPath) - COMMAND makecat.exe ARGS $(IntDir)\\$(TargetFileName).intermediate.manifest.cdf - COMMAND signtool.exe ARGS sign /a /t http://timestamp.verisign.com/scripts/timstamp.dll $(TargetPath) - COMMENT "Embeds the manifest contents, creates a cryptographic catalog, signs the target with Authenticode certificate.") -ENDMACRO(MYSQL_EMBED_MANIFEST) |