summaryrefslogtreecommitdiff
path: root/win
diff options
context:
space:
mode:
Diffstat (limited to 'win')
-rw-r--r--win/Makefile.am59
-rw-r--r--win/README101
-rw-r--r--win/build-nmake-x64.bat21
-rw-r--r--win/build-nmake.bat21
-rwxr-xr-xwin/build-vs71.bat22
-rwxr-xr-xwin/build-vs8.bat21
-rwxr-xr-xwin/build-vs8_x64.bat21
-rw-r--r--win/build-vs9.bat18
-rw-r--r--win/build-vs9_x64.bat18
-rw-r--r--win/cmake/NSIS.template.in995
-rw-r--r--win/cmake/cmake_parse_arguments.cmake47
-rw-r--r--win/cmake/cpack_source_ignore_files.cmake40
-rw-r--r--win/cmake/create_initial_db.cmake.in85
-rw-r--r--win/cmake/dummy.in0
-rw-r--r--win/cmake/install_layout.cmake223
-rw-r--r--win/cmake/install_macros.cmake327
-rw-r--r--win/cmake/mysql_add_executable.cmake56
-rw-r--r--win/cmake/mysql_version.cmake154
-rw-r--r--win/cmake/package_name.cmake134
-rw-r--r--win/cmake/versioninfo.rc.in23
-rw-r--r--win/configure.js342
-rw-r--r--win/create_def_file.js1
-rwxr-xr-xwin/create_manifest.js96
-rwxr-xr-xwin/mysql_manifest.cmake21
24 files changed, 1 insertions, 2845 deletions
diff --git a/win/Makefile.am b/win/Makefile.am
deleted file mode 100644
index 310c54bc117..00000000000
--- a/win/Makefile.am
+++ /dev/null
@@ -1,59 +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 build-nmake.bat \
- build-nmake-x64.bat configure-mariadb.sh make_mariadb_win_dist \
- build-vs10.bat build-vs10_x64.bat \
- cmake/cmake_parse_arguments.cmake \
- cmake/cpack_source_ignore_files.cmake \
- cmake/create_initial_db.cmake.in \
- cmake/install_layout.cmake \
- cmake/install_macros.cmake \
- cmake/mysql_add_executable.cmake \
- cmake/mysql_version.cmake \
- cmake/package_name.cmake \
- cmake/versioninfo.rc.in \
- cmake/dummy.in \
- packaging/CMakeLists.txt \
- packaging/CPackWixConfig.cmake \
- packaging/create_msi.cmake.in \
- packaging/custom_ui.wxs \
- packaging/extra.wxs.in \
- packaging/COPYING.rtf \
- packaging/mysql_server.wxs.in \
- packaging/ca/CMakeLists.txt \
- packaging/ca/CustomAction.cpp \
- packaging/ca/CustomAction.def \
- packaging/ca/CustomAction.rc \
- packaging/WixUIBannerBmp.jpg \
- packaging/WixUIDialogBmp.jpg \
- packaging/heidisql.cmake \
- packaging/heidisql.wxi.in \
- packaging/heidisql_feature.wxi.in\
- upgrade_wizard/resource.h \
- upgrade_wizard/stdafx.h \
- upgrade_wizard/targetver.h \
- upgrade_wizard/upgrade.cpp \
- upgrade_wizard/upgrade.h \
- upgrade_wizard/upgrade.rc \
- upgrade_wizard/upgradeDlg.cpp \
- upgrade_wizard/upgradeDlg.h \
- upgrade_wizard/upgrade_wizard.exe.manifest \
- upgrade_wizard/CMakeLists.txt \
- upgrade_wizard/res/upgrade.ico \
- upgrade_wizard/res/upgrade.rc2
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/cmake/NSIS.template.in b/win/cmake/NSIS.template.in
deleted file mode 100644
index 0c39ba630dc..00000000000
--- a/win/cmake/NSIS.template.in
+++ /dev/null
@@ -1,995 +0,0 @@
-; CPack install script designed for a nmake build
-
-;--------------------------------
-; You must define these values
-
- !define VERSION "@CPACK_PACKAGE_VERSION@"
- !define PATCH "@CPACK_PACKAGE_VERSION_PATCH@"
- !define INST_DIR "@CPACK_TEMPORARY_DIRECTORY@"
-
-;--------------------------------
-;Variables
-
- Var MUI_TEMP
- Var STARTMENU_FOLDER
- Var SV_ALLUSERS
- Var START_MENU
- Var DO_NOT_ADD_TO_PATH
- Var ADD_TO_PATH_ALL_USERS
- Var ADD_TO_PATH_CURRENT_USER
- Var INSTALL_DESKTOP
- Var IS_DEFAULT_INSTALLDIR
-
- Var INSTALL_AS_SERVICE
- Var INSTALL_AS_SERVICE_CHECKBOX
-
-;--------------------------------
-;Include Modern UI
-
- !include "MUI.nsh"
-
- ;Default installation folder
- InstallDir "$PROGRAMFILES\@CPACK_PACKAGE_INSTALL_DIRECTORY@"
-
-;Include the nsDialogs package
- !include nsDialogs.nsh
- !include LogicLib.nsh
-
-;--------------------------------
-;General
-
- ;Name and file
- Name "@CPACK_NSIS_PACKAGE_NAME@"
- OutFile "@CPACK_TOPLEVEL_DIRECTORY@/@CPACK_OUTPUT_FILE_NAME@"
-
- ;Set compression
- SetCompressor @CPACK_NSIS_COMPRESSOR@
-
-@CPACK_NSIS_DEFINES@
-
- !include Sections.nsh
-
-;--- Component support macros: ---
-; The code for the add/remove functionality is from:
-; http://nsis.sourceforge.net/Add/Remove_Functionality
-; It has been modified slightly and extended to provide
-; inter-component dependencies.
-Var AR_SecFlags
-Var AR_RegFlags
-@CPACK_NSIS_SECTION_SELECTED_VARS@
-
-; Loads the "selected" flag for the section named SecName into the
-; variable VarName.
-!macro LoadSectionSelectedIntoVar SecName VarName
- SectionGetFlags ${${SecName}} $${VarName}
- IntOp $${VarName} $${VarName} & ${SF_SELECTED} ;Turn off all other bits
-!macroend
-
-; Loads the value of a variable... can we get around this?
-!macro LoadVar VarName
- IntOp $R0 0 + $${VarName}
-!macroend
-
-; Sets the value of a variable
-!macro StoreVar VarName IntValue
- IntOp $${VarName} 0 + ${IntValue}
-!macroend
-
-!macro InitSection SecName
- ; This macro reads component installed flag from the registry and
- ;changes checked state of the section on the components page.
- ;Input: section index constant name specified in Section command.
-
- ClearErrors
- ;Reading component status from registry
- ReadRegDWORD $AR_RegFlags HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\@CPACK_PACKAGE_NAME@\Components\${SecName}" "Installed"
- IfErrors "default_${SecName}"
- ;Status will stay default if registry value not found
- ;(component was never installed)
- IntOp $AR_RegFlags $AR_RegFlags & ${SF_SELECTED} ;Turn off all other bits
- SectionGetFlags ${${SecName}} $AR_SecFlags ;Reading default section flags
- IntOp $AR_SecFlags $AR_SecFlags & 0xFFFE ;Turn lowest (enabled) bit off
- IntOp $AR_SecFlags $AR_RegFlags | $AR_SecFlags ;Change lowest bit
-
- ; Note whether this component was installed before
- !insertmacro StoreVar ${SecName}_was_installed $AR_RegFlags
- IntOp $R0 $AR_RegFlags & $AR_RegFlags
-
- ;Writing modified flags
- SectionSetFlags ${${SecName}} $AR_SecFlags
-
- "default_${SecName}:"
- !insertmacro LoadSectionSelectedIntoVar ${SecName} ${SecName}_selected
-!macroend
-
-!macro FinishSection SecName
- ; This macro reads section flag set by user and removes the section
- ;if it is not selected.
- ;Then it writes component installed flag to registry
- ;Input: section index constant name specified in Section command.
-
- SectionGetFlags ${${SecName}} $AR_SecFlags ;Reading section flags
- ;Checking lowest bit:
- IntOp $AR_SecFlags $AR_SecFlags & ${SF_SELECTED}
- IntCmp $AR_SecFlags 1 "leave_${SecName}"
- ;Section is not selected:
- ;Calling Section uninstall macro and writing zero installed flag
- !insertmacro "Remove_${${SecName}}"
- WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\@CPACK_PACKAGE_NAME@\Components\${SecName}" \
- "Installed" 0
- Goto "exit_${SecName}"
-
- "leave_${SecName}:"
- ;Section is selected:
- WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\@CPACK_PACKAGE_NAME@\Components\${SecName}" \
- "Installed" 1
-
- "exit_${SecName}:"
-!macroend
-
-!macro RemoveSection SecName
- ; This macro is used to call section's Remove_... macro
- ;from the uninstaller.
- ;Input: section index constant name specified in Section command.
-
- !insertmacro "Remove_${${SecName}}"
-!macroend
-
-; Determine whether the selection of SecName changed
-!macro MaybeSelectionChanged SecName
- !insertmacro LoadVar ${SecName}_selected
- SectionGetFlags ${${SecName}} $R1
- IntOp $R1 $R1 & ${SF_SELECTED} ;Turn off all other bits
-
- ; See if the status has changed:
- IntCmp $R0 $R1 "${SecName}_unchanged"
- !insertmacro LoadSectionSelectedIntoVar ${SecName} ${SecName}_selected
-
- IntCmp $R1 ${SF_SELECTED} "${SecName}_was_selected"
- !insertmacro "Deselect_required_by_${SecName}"
- goto "${SecName}_unchanged"
-
- "${SecName}_was_selected:"
- !insertmacro "Select_${SecName}_depends"
-
- "${SecName}_unchanged:"
-!macroend
-;--- End of Add/Remove macros ---
-
-;--------------------------------
-;Interface Settings
-
- !define MUI_HEADERIMAGE
- !define MUI_ABORTWARNING
-
-;--------------------------------
-; path functions
-
-!verbose 3
-!include "WinMessages.NSH"
-!verbose 4
-
-;----------------------------------------
-; based upon a script of "Written by KiCHiK 2003-01-18 05:57:02"
-;----------------------------------------
-!verbose 3
-!include "WinMessages.NSH"
-!verbose 4
-;====================================================
-; get_NT_environment
-; Returns: the selected environment
-; Output : head of the stack
-;====================================================
-!macro select_NT_profile UN
-Function ${UN}select_NT_profile
- StrCmp $ADD_TO_PATH_ALL_USERS "1" 0 environment_single
- DetailPrint "Selected environment for all users"
- Push "all"
- Return
- environment_single:
- DetailPrint "Selected environment for current user only."
- Push "current"
- Return
-FunctionEnd
-!macroend
-!insertmacro select_NT_profile ""
-!insertmacro select_NT_profile "un."
-;----------------------------------------------------
-!define NT_current_env 'HKCU "Environment"'
-!define NT_all_env 'HKLM "SYSTEM\CurrentControlSet\Control\Session Manager\Environment"'
-
-!ifndef WriteEnvStr_RegKey
- !ifdef ALL_USERS
- !define WriteEnvStr_RegKey \
- 'HKLM "SYSTEM\CurrentControlSet\Control\Session Manager\Environment"'
- !else
- !define WriteEnvStr_RegKey 'HKCU "Environment"'
- !endif
-!endif
-
-; AddToPath - Adds the given dir to the search path.
-; Input - head of the stack
-; Note - Win9x systems requires reboot
-
-Function AddToPath
- Exch $0
- Push $1
- Push $2
- Push $3
-
- # don't add if the path doesn't exist
- IfFileExists "$0\*.*" "" AddToPath_done
-
- ReadEnvStr $1 PATH
- ; if the path is too long for a NSIS variable NSIS will return a 0
- ; length string. If we find that, then warn and skip any path
- ; modification as it will trash the existing path.
- StrLen $2 $1
- IntCmp $2 0 CheckPathLength_ShowPathWarning CheckPathLength_Done CheckPathLength_Done
- CheckPathLength_ShowPathWarning:
- Messagebox MB_OK|MB_ICONEXCLAMATION "Warning! PATH too long installer unable to modify PATH!"
- Goto AddToPath_done
- CheckPathLength_Done:
- Push "$1;"
- Push "$0;"
- Call StrStr
- Pop $2
- StrCmp $2 "" "" AddToPath_done
- Push "$1;"
- Push "$0\;"
- Call StrStr
- Pop $2
- StrCmp $2 "" "" AddToPath_done
- GetFullPathName /SHORT $3 $0
- Push "$1;"
- Push "$3;"
- Call StrStr
- Pop $2
- StrCmp $2 "" "" AddToPath_done
- Push "$1;"
- Push "$3\;"
- Call StrStr
- Pop $2
- StrCmp $2 "" "" AddToPath_done
-
- Call IsNT
- Pop $1
- StrCmp $1 1 AddToPath_NT
- ; Not on NT
- StrCpy $1 $WINDIR 2
- FileOpen $1 "$1\autoexec.bat" a
- FileSeek $1 -1 END
- FileReadByte $1 $2
- IntCmp $2 26 0 +2 +2 # DOS EOF
- FileSeek $1 -1 END # write over EOF
- FileWrite $1 "$\r$\nSET PATH=%PATH%;$3$\r$\n"
- FileClose $1
- SetRebootFlag true
- Goto AddToPath_done
-
- AddToPath_NT:
- StrCmp $ADD_TO_PATH_ALL_USERS "1" ReadAllKey
- ReadRegStr $1 ${NT_current_env} "PATH"
- Goto DoTrim
- ReadAllKey:
- ReadRegStr $1 ${NT_all_env} "PATH"
- DoTrim:
- StrCmp $1 "" AddToPath_NTdoIt
- Push $1
- Call Trim
- Pop $1
- StrCpy $0 "$1;$0"
- AddToPath_NTdoIt:
- StrCmp $ADD_TO_PATH_ALL_USERS "1" WriteAllKey
- WriteRegExpandStr ${NT_current_env} "PATH" $0
- Goto DoSend
- WriteAllKey:
- WriteRegExpandStr ${NT_all_env} "PATH" $0
- DoSend:
- SendMessage ${HWND_BROADCAST} ${WM_WININICHANGE} 0 "STR:Environment" /TIMEOUT=5000
-
- AddToPath_done:
- Pop $3
- Pop $2
- Pop $1
- Pop $0
-FunctionEnd
-
-
-; RemoveFromPath - Remove a given dir from the path
-; Input: head of the stack
-
-Function un.RemoveFromPath
- Exch $0
- Push $1
- Push $2
- Push $3
- Push $4
- Push $5
- Push $6
-
- IntFmt $6 "%c" 26 # DOS EOF
-
- Call un.IsNT
- Pop $1
- StrCmp $1 1 unRemoveFromPath_NT
- ; Not on NT
- StrCpy $1 $WINDIR 2
- FileOpen $1 "$1\autoexec.bat" r
- GetTempFileName $4
- FileOpen $2 $4 w
- GetFullPathName /SHORT $0 $0
- StrCpy $0 "SET PATH=%PATH%;$0"
- Goto unRemoveFromPath_dosLoop
-
- unRemoveFromPath_dosLoop:
- FileRead $1 $3
- StrCpy $5 $3 1 -1 # read last char
- StrCmp $5 $6 0 +2 # if DOS EOF
- StrCpy $3 $3 -1 # remove DOS EOF so we can compare
- StrCmp $3 "$0$\r$\n" unRemoveFromPath_dosLoopRemoveLine
- StrCmp $3 "$0$\n" unRemoveFromPath_dosLoopRemoveLine
- StrCmp $3 "$0" unRemoveFromPath_dosLoopRemoveLine
- StrCmp $3 "" unRemoveFromPath_dosLoopEnd
- FileWrite $2 $3
- Goto unRemoveFromPath_dosLoop
- unRemoveFromPath_dosLoopRemoveLine:
- SetRebootFlag true
- Goto unRemoveFromPath_dosLoop
-
- unRemoveFromPath_dosLoopEnd:
- FileClose $2
- FileClose $1
- StrCpy $1 $WINDIR 2
- Delete "$1\autoexec.bat"
- CopyFiles /SILENT $4 "$1\autoexec.bat"
- Delete $4
- Goto unRemoveFromPath_done
-
- unRemoveFromPath_NT:
- StrCmp $ADD_TO_PATH_ALL_USERS "1" unReadAllKey
- ReadRegStr $1 ${NT_current_env} "PATH"
- Goto unDoTrim
- unReadAllKey:
- ReadRegStr $1 ${NT_all_env} "PATH"
- unDoTrim:
- StrCpy $5 $1 1 -1 # copy last char
- StrCmp $5 ";" +2 # if last char != ;
- StrCpy $1 "$1;" # append ;
- Push $1
- Push "$0;"
- Call un.StrStr ; Find `$0;` in $1
- Pop $2 ; pos of our dir
- StrCmp $2 "" unRemoveFromPath_done
- ; else, it is in path
- # $0 - path to add
- # $1 - path var
- StrLen $3 "$0;"
- StrLen $4 $2
- StrCpy $5 $1 -$4 # $5 is now the part before the path to remove
- StrCpy $6 $2 "" $3 # $6 is now the part after the path to remove
- StrCpy $3 $5$6
-
- StrCpy $5 $3 1 -1 # copy last char
- StrCmp $5 ";" 0 +2 # if last char == ;
- StrCpy $3 $3 -1 # remove last char
-
- StrCmp $ADD_TO_PATH_ALL_USERS "1" unWriteAllKey
- WriteRegExpandStr ${NT_current_env} "PATH" $3
- Goto unDoSend
- unWriteAllKey:
- WriteRegExpandStr ${NT_all_env} "PATH" $3
- unDoSend:
- SendMessage ${HWND_BROADCAST} ${WM_WININICHANGE} 0 "STR:Environment" /TIMEOUT=5000
-
- unRemoveFromPath_done:
- Pop $6
- Pop $5
- Pop $4
- Pop $3
- Pop $2
- Pop $1
- Pop $0
-FunctionEnd
-
-Function InstallServicePage
- !insertmacro MUI_HEADER_TEXT "Service Setup" "Run MariaDB automatically."
-
- nsDialogs::Create /NOUNLOAD 1018
- Pop $0
-
- ${If} $0 == error
- Abort
- ${EndIf}
-
- ${NSD_CreateLabel} 0u 0u 100% 9u "Should MariaDB be installed as a service?"
- Pop $0
-
- ${NSD_CreateCheckBox} 0u 14u 100% 16u "&Yes, please install the service."
- Pop $INSTALL_AS_SERVICE_CHECKBOX
- GetFunctionAddress $0 ServiceCheckBoxClicked
- nsDialogs::OnClick /NOUNLOAD $INSTALL_AS_SERVICE_CHECKBOX $0
-
- ${NSD_CreateLabel} 0u 30u 100% 35u "If this option is checked, this installer will add MariaDB to the list of services and start it."
- Pop $0
-
- nsDialogs::Show
-FunctionEnd
-
-Function ServiceCheckBoxClicked
- ${NSD_GetState} $INSTALL_AS_SERVICE_CHECKBOX $INSTALL_AS_SERVICE
-FunctionEnd
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-; Uninstall sutff
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-
-###########################################
-# Utility Functions #
-###########################################
-
-;====================================================
-; IsNT - Returns 1 if the current system is NT, 0
-; otherwise.
-; Output: head of the stack
-;====================================================
-; IsNT
-; no input
-; output, top of the stack = 1 if NT or 0 if not
-;
-; Usage:
-; Call IsNT
-; Pop $R0
-; ($R0 at this point is 1 or 0)
-
-!macro IsNT un
-Function ${un}IsNT
- Push $0
- ReadRegStr $0 HKLM "SOFTWARE\Microsoft\Windows NT\CurrentVersion" CurrentVersion
- StrCmp $0 "" 0 IsNT_yes
- ; we are not NT.
- Pop $0
- Push 0
- Return
-
- IsNT_yes:
- ; NT!!!
- Pop $0
- Push 1
-FunctionEnd
-!macroend
-!insertmacro IsNT ""
-!insertmacro IsNT "un."
-
-; StrStr
-; input, top of stack = string to search for
-; top of stack-1 = string to search in
-; output, top of stack (replaces with the portion of the string remaining)
-; modifies no other variables.
-;
-; Usage:
-; Push "this is a long ass string"
-; Push "ass"
-; Call StrStr
-; Pop $R0
-; ($R0 at this point is "ass string")
-
-!macro StrStr un
-Function ${un}StrStr
-Exch $R1 ; st=haystack,old$R1, $R1=needle
- Exch ; st=old$R1,haystack
- Exch $R2 ; st=old$R1,old$R2, $R2=haystack
- Push $R3
- Push $R4
- Push $R5
- StrLen $R3 $R1
- StrCpy $R4 0
- ; $R1=needle
- ; $R2=haystack
- ; $R3=len(needle)
- ; $R4=cnt
- ; $R5=tmp
- loop:
- StrCpy $R5 $R2 $R3 $R4
- StrCmp $R5 $R1 done
- StrCmp $R5 "" done
- IntOp $R4 $R4 + 1
- Goto loop
-done:
- StrCpy $R1 $R2 "" $R4
- Pop $R5
- Pop $R4
- Pop $R3
- Pop $R2
- Exch $R1
-FunctionEnd
-!macroend
-!insertmacro StrStr ""
-!insertmacro StrStr "un."
-
-Function Trim ; Added by Pelaca
- Exch $R1
- Push $R2
-Loop:
- StrCpy $R2 "$R1" 1 -1
- StrCmp "$R2" " " RTrim
- StrCmp "$R2" "$\n" RTrim
- StrCmp "$R2" "$\r" RTrim
- StrCmp "$R2" ";" RTrim
- GoTo Done
-RTrim:
- StrCpy $R1 "$R1" -1
- Goto Loop
-Done:
- Pop $R2
- Exch $R1
-FunctionEnd
-
-Function ConditionalAddToRegisty
- Pop $0
- Pop $1
- StrCmp "$0" "" ConditionalAddToRegisty_EmptyString
- WriteRegStr SHCTX "Software\Microsoft\Windows\CurrentVersion\Uninstall\@CPACK_PACKAGE_NAME@" \
- "$1" "$0"
- ;MessageBox MB_OK "Set Registry: '$1' to '$0'"
- DetailPrint "Set install registry entry: '$1' to '$0'"
- ConditionalAddToRegisty_EmptyString:
-FunctionEnd
-
-;--------------------------------
-
-!ifdef CPACK_USES_DOWNLOAD
-Function DownloadFile
- IfFileExists $INSTDIR\* +2
- CreateDirectory $INSTDIR
- Pop $0
-
- ; Skip if already downloaded
- IfFileExists $INSTDIR\$0 0 +2
- Return
-
- StrCpy $1 "@CPACK_DOWNLOAD_SITE@"
-
- try_again:
- NSISdl::download "$1/$0" "$INSTDIR\$0"
-
- Pop $1
- StrCmp $1 "success" success
- StrCmp $1 "Cancelled" cancel
- MessageBox MB_OK "Download failed: $1"
- cancel:
- Return
- success:
-FunctionEnd
-!endif
-
-;--------------------------------
-; Installation types
-@CPACK_NSIS_INSTALLATION_TYPES@
-
-;--------------------------------
-; Component sections
-@CPACK_NSIS_COMPONENT_SECTIONS@
-
-;--------------------------------
-; Define some macro setting for the gui
-@CPACK_NSIS_INSTALLER_MUI_ICON_CODE@
-@CPACK_NSIS_INSTALLER_ICON_CODE@
-@CPACK_NSIS_INSTALLER_MUI_COMPONENTS_DESC@
-
-;--------------------------------
-;Pages
- !insertmacro MUI_PAGE_WELCOME
-
- !insertmacro MUI_PAGE_LICENSE "@CPACK_RESOURCE_FILE_LICENSE@"
- Page custom InstallOptionsPage
- !insertmacro MUI_PAGE_DIRECTORY
-
- ;Start Menu Folder Page Configuration
- !define MUI_STARTMENUPAGE_REGISTRY_ROOT "SHCTX"
- !define MUI_STARTMENUPAGE_REGISTRY_KEY "Software\@CPACK_PACKAGE_VENDOR@\@CPACK_PACKAGE_INSTALL_REGISTRY_KEY@"
- !define MUI_STARTMENUPAGE_REGISTRY_VALUENAME "Start Menu Folder"
- !insertmacro MUI_PAGE_STARTMENU Application $STARTMENU_FOLDER
-
- @CPACK_NSIS_PAGE_COMPONENTS@
-
- Page custom InstallServicePage
-
- !insertmacro MUI_PAGE_INSTFILES
- !insertmacro MUI_PAGE_FINISH
-
- !insertmacro MUI_UNPAGE_CONFIRM
- !insertmacro MUI_UNPAGE_INSTFILES
-
-;--------------------------------
-;Languages
-
- !insertmacro MUI_LANGUAGE "English" ;first language is the default language
- !insertmacro MUI_LANGUAGE "Albanian"
- !insertmacro MUI_LANGUAGE "Arabic"
- !insertmacro MUI_LANGUAGE "Basque"
- !insertmacro MUI_LANGUAGE "Belarusian"
- !insertmacro MUI_LANGUAGE "Bosnian"
- !insertmacro MUI_LANGUAGE "Breton"
- !insertmacro MUI_LANGUAGE "Bulgarian"
- !insertmacro MUI_LANGUAGE "Croatian"
- !insertmacro MUI_LANGUAGE "Czech"
- !insertmacro MUI_LANGUAGE "Danish"
- !insertmacro MUI_LANGUAGE "Dutch"
- !insertmacro MUI_LANGUAGE "Estonian"
- !insertmacro MUI_LANGUAGE "Farsi"
- !insertmacro MUI_LANGUAGE "Finnish"
- !insertmacro MUI_LANGUAGE "French"
- !insertmacro MUI_LANGUAGE "German"
- !insertmacro MUI_LANGUAGE "Greek"
- !insertmacro MUI_LANGUAGE "Hebrew"
- !insertmacro MUI_LANGUAGE "Hungarian"
- !insertmacro MUI_LANGUAGE "Icelandic"
- !insertmacro MUI_LANGUAGE "Indonesian"
- !insertmacro MUI_LANGUAGE "Irish"
- !insertmacro MUI_LANGUAGE "Italian"
- !insertmacro MUI_LANGUAGE "Japanese"
- !insertmacro MUI_LANGUAGE "Korean"
- !insertmacro MUI_LANGUAGE "Kurdish"
- !insertmacro MUI_LANGUAGE "Latvian"
- !insertmacro MUI_LANGUAGE "Lithuanian"
- !insertmacro MUI_LANGUAGE "Luxembourgish"
- !insertmacro MUI_LANGUAGE "Macedonian"
- !insertmacro MUI_LANGUAGE "Malay"
- !insertmacro MUI_LANGUAGE "Mongolian"
- !insertmacro MUI_LANGUAGE "Norwegian"
- !insertmacro MUI_LANGUAGE "Polish"
- !insertmacro MUI_LANGUAGE "Portuguese"
- !insertmacro MUI_LANGUAGE "PortugueseBR"
- !insertmacro MUI_LANGUAGE "Romanian"
- !insertmacro MUI_LANGUAGE "Russian"
- !insertmacro MUI_LANGUAGE "Serbian"
- !insertmacro MUI_LANGUAGE "SerbianLatin"
- !insertmacro MUI_LANGUAGE "SimpChinese"
- !insertmacro MUI_LANGUAGE "Slovak"
- !insertmacro MUI_LANGUAGE "Slovenian"
- !insertmacro MUI_LANGUAGE "Spanish"
- !insertmacro MUI_LANGUAGE "Swedish"
- !insertmacro MUI_LANGUAGE "Thai"
- !insertmacro MUI_LANGUAGE "TradChinese"
- !insertmacro MUI_LANGUAGE "Turkish"
- !insertmacro MUI_LANGUAGE "Ukrainian"
- !insertmacro MUI_LANGUAGE "Welsh"
-
-
-;--------------------------------
-;Reserve Files
-
- ;These files should be inserted before other files in the data block
- ;Keep these lines before any File command
- ;Only for solid compression (by default, solid compression is enabled for BZIP2 and LZMA)
-
- ReserveFile "NSIS.InstallOptions.ini"
- !insertmacro MUI_RESERVEFILE_INSTALLOPTIONS
-
-;--------------------------------
-;Installer Sections
-
-Section "-Core installation"
- ;Use the entire tree produced by the INSTALL target. Keep the
- ;list of directories here in sync with the RMDir commands below.
- SetOutPath "$INSTDIR"
- @CPACK_NSIS_FULL_INSTALL@
-
- ;Store installation folder
- WriteRegStr SHCTX "Software\@CPACK_PACKAGE_VENDOR@\@CPACK_PACKAGE_INSTALL_REGISTRY_KEY@" "" $INSTDIR
-
- ;Create uninstaller
- WriteUninstaller "$INSTDIR\Uninstall.exe"
- Push "DisplayName"
- Push "@CPACK_NSIS_DISPLAY_NAME@"
- Call ConditionalAddToRegisty
- Push "DisplayVersion"
- Push "@CPACK_PACKAGE_VERSION@"
- Call ConditionalAddToRegisty
- Push "Publisher"
- Push "@CPACK_PACKAGE_VENDOR@"
- Call ConditionalAddToRegisty
- Push "UninstallString"
- Push "$INSTDIR\Uninstall.exe"
- Call ConditionalAddToRegisty
- Push "NoRepair"
- Push "1"
- Call ConditionalAddToRegisty
-
- !ifdef CPACK_NSIS_ADD_REMOVE
- ;Create add/remove functionality
- Push "ModifyPath"
- Push "$INSTDIR\AddRemove.exe"
- Call ConditionalAddToRegisty
- !else
- Push "NoModify"
- Push "1"
- Call ConditionalAddToRegisty
- !endif
-
- ; Optional registration
- Push "DisplayIcon"
- Push "$INSTDIR\@CPACK_NSIS_INSTALLED_ICON_NAME@"
- Call ConditionalAddToRegisty
- Push "HelpLink"
- Push "@CPACK_NSIS_HELP_LINK@"
- Call ConditionalAddToRegisty
- Push "URLInfoAbout"
- Push "@CPACK_NSIS_URL_INFO_ABOUT@"
- Call ConditionalAddToRegisty
- Push "Contact"
- Push "@CPACK_NSIS_CONTACT@"
- Call ConditionalAddToRegisty
- !insertmacro MUI_INSTALLOPTIONS_READ $INSTALL_DESKTOP "NSIS.InstallOptions.ini" "Field 5" "State"
- !insertmacro MUI_STARTMENU_WRITE_BEGIN Application
-
- ;Create shortcuts
- CreateDirectory "$SMPROGRAMS\$STARTMENU_FOLDER"
-@CPACK_NSIS_CREATE_ICONS@
-@CPACK_NSIS_CREATE_ICONS_EXTRA@
- CreateShortCut "$SMPROGRAMS\$STARTMENU_FOLDER\Uninstall.lnk" "$INSTDIR\Uninstall.exe"
-
- ;Read a value from an InstallOptions INI file
- !insertmacro MUI_INSTALLOPTIONS_READ $DO_NOT_ADD_TO_PATH "NSIS.InstallOptions.ini" "Field 2" "State"
- !insertmacro MUI_INSTALLOPTIONS_READ $ADD_TO_PATH_ALL_USERS "NSIS.InstallOptions.ini" "Field 3" "State"
- !insertmacro MUI_INSTALLOPTIONS_READ $ADD_TO_PATH_CURRENT_USER "NSIS.InstallOptions.ini" "Field 4" "State"
-
- ; Write special uninstall registry entries
- Push "StartMenu"
- Push "$STARTMENU_FOLDER"
- Call ConditionalAddToRegisty
- Push "DoNotAddToPath"
- Push "$DO_NOT_ADD_TO_PATH"
- Call ConditionalAddToRegisty
- Push "AddToPathAllUsers"
- Push "$ADD_TO_PATH_ALL_USERS"
- Call ConditionalAddToRegisty
- Push "AddToPathCurrentUser"
- Push "$ADD_TO_PATH_CURRENT_USER"
- Call ConditionalAddToRegisty
- Push "InstallToDesktop"
- Push "$INSTALL_DESKTOP"
- Call ConditionalAddToRegisty
-
- !insertmacro MUI_STARTMENU_WRITE_END
-
-@CPACK_NSIS_EXTRA_INSTALL_COMMANDS@
-
- ${If} $INSTALL_AS_SERVICE == ${BST_CHECKED}
- ;MessageBox MB_OK "Install the service"
- nsExec::Exec '"$INSTDIR\bin\mysqld.exe" --install "@CPACK_PACKAGE_NAME@-@CPACK_PACKAGE_VERSION@"'
- nsExec::Exec 'net start "@CPACK_PACKAGE_NAME@-@CPACK_PACKAGE_VERSION@"'
- ${EndIf}
-
-SectionEnd
-
-Section "-Add to path"
- Push $INSTDIR\bin
- StrCmp "@CPACK_NSIS_MODIFY_PATH@" "ON" 0 doNotAddToPath
- StrCmp $DO_NOT_ADD_TO_PATH "1" doNotAddToPath 0
- Call AddToPath
- doNotAddToPath:
-SectionEnd
-
-;--------------------------------
-; Create custom pages
-Function InstallOptionsPage
- !insertmacro MUI_HEADER_TEXT "Install Options" "Choose options for installing @CPACK_NSIS_PACKAGE_NAME@"
- !insertmacro MUI_INSTALLOPTIONS_DISPLAY "NSIS.InstallOptions.ini"
-
-FunctionEnd
-
-;--------------------------------
-; determine admin versus local install
-Function un.onInit
-
- ClearErrors
- UserInfo::GetName
- IfErrors noLM
- Pop $0
- UserInfo::GetAccountType
- Pop $1
- StrCmp $1 "Admin" 0 +3
- SetShellVarContext all
- ;MessageBox MB_OK 'User "$0" is in the Admin group'
- Goto done
- StrCmp $1 "Power" 0 +3
- SetShellVarContext all
- ;MessageBox MB_OK 'User "$0" is in the Power Users group'
- Goto done
-
- noLM:
- ;Get installation folder from registry if available
-
- done:
-
-FunctionEnd
-
-;--- Add/Remove callback functions: ---
-!macro SectionList MacroName
- ;This macro used to perform operation on multiple sections.
- ;List all of your components in following manner here.
-@CPACK_NSIS_COMPONENT_SECTION_LIST@
-!macroend
-
-Section -FinishComponents
- ;Removes unselected components and writes component status to registry
- !insertmacro SectionList "FinishSection"
-
-!ifdef CPACK_NSIS_ADD_REMOVE
- ; Get the name of the installer executable
- System::Call 'kernel32::GetModuleFileNameA(i 0, t .R0, i 1024) i r1'
- StrCpy $R3 $R0
-
- ; Strip off the last 13 characters, to see if we have AddRemove.exe
- StrLen $R1 $R0
- IntOp $R1 $R0 - 13
- StrCpy $R2 $R0 13 $R1
- StrCmp $R2 "AddRemove.exe" addremove_installed
-
- ; We're not running AddRemove.exe, so install it
- CopyFiles $R3 $INSTDIR\AddRemove.exe
-
- addremove_installed:
-!endif
-SectionEnd
-;--- End of Add/Remove callback functions ---
-
-;--------------------------------
-; Component dependencies
-Function .onSelChange
- !insertmacro SectionList MaybeSelectionChanged
-FunctionEnd
-
-;--------------------------------
-;Uninstaller Section
-
-Section "Uninstall"
- ReadRegStr $START_MENU SHCTX \
- "Software\Microsoft\Windows\CurrentVersion\Uninstall\@CPACK_PACKAGE_NAME@" "StartMenu"
- ;MessageBox MB_OK "Start menu is in: $START_MENU"
- ReadRegStr $DO_NOT_ADD_TO_PATH SHCTX \
- "Software\Microsoft\Windows\CurrentVersion\Uninstall\@CPACK_PACKAGE_NAME@" "DoNotAddToPath"
- ReadRegStr $ADD_TO_PATH_ALL_USERS SHCTX \
- "Software\Microsoft\Windows\CurrentVersion\Uninstall\@CPACK_PACKAGE_NAME@" "AddToPathAllUsers"
- ReadRegStr $ADD_TO_PATH_CURRENT_USER SHCTX \
- "Software\Microsoft\Windows\CurrentVersion\Uninstall\@CPACK_PACKAGE_NAME@" "AddToPathCurrentUser"
- ;MessageBox MB_OK "Add to path: $DO_NOT_ADD_TO_PATH all users: $ADD_TO_PATH_ALL_USERS"
- ReadRegStr $INSTALL_DESKTOP SHCTX \
- "Software\Microsoft\Windows\CurrentVersion\Uninstall\@CPACK_PACKAGE_NAME@" "InstallToDesktop"
- ;MessageBox MB_OK "Install to desktop: $INSTALL_DESKTOP "
-
-@CPACK_NSIS_EXTRA_UNINSTALL_COMMANDS@
-
- nsExec::Exec 'net stop "@CPACK_PACKAGE_NAME@-@CPACK_PACKAGE_VERSION@"'
- nsExec::Exec '"$INSTDIR\bin\mysqld.exe" --remove "@CPACK_PACKAGE_NAME@-@CPACK_PACKAGE_VERSION@"'
-
- ;Remove files we installed.
- ;Keep the list of directories here in sync with the File commands above.
-@CPACK_NSIS_DELETE_FILES@
-@CPACK_NSIS_DELETE_DIRECTORIES@
-
-!ifdef CPACK_NSIS_ADD_REMOVE
- ;Remove the add/remove program
- Delete "$INSTDIR\AddRemove.exe"
-!endif
-
- ;Remove the uninstaller itself.
- Delete "$INSTDIR\Uninstall.exe"
- DeleteRegKey SHCTX "Software\Microsoft\Windows\CurrentVersion\Uninstall\@CPACK_PACKAGE_NAME@"
-
- ;Remove the installation directory if it is empty.
- RMDir "$INSTDIR"
-
- ; Remove the registry entries.
- DeleteRegKey SHCTX "Software\@CPACK_PACKAGE_VENDOR@\@CPACK_PACKAGE_INSTALL_REGISTRY_KEY@"
-
- ; Removes all optional components
- !insertmacro SectionList "RemoveSection"
-
- !insertmacro MUI_STARTMENU_GETFOLDER Application $MUI_TEMP
-
- Delete "$SMPROGRAMS\$MUI_TEMP\Uninstall.lnk"
-@CPACK_NSIS_DELETE_ICONS@
-@CPACK_NSIS_DELETE_ICONS_EXTRA@
-
- ;Delete empty start menu parent diretories
- StrCpy $MUI_TEMP "$SMPROGRAMS\$MUI_TEMP"
-
- startMenuDeleteLoop:
- ClearErrors
- RMDir $MUI_TEMP
- GetFullPathName $MUI_TEMP "$MUI_TEMP\.."
-
- IfErrors startMenuDeleteLoopDone
-
- StrCmp "$MUI_TEMP" "$SMPROGRAMS" startMenuDeleteLoopDone startMenuDeleteLoop
- startMenuDeleteLoopDone:
-
- ; If the user changed the shortcut, then untinstall may not work. This should
- ; try to fix it.
- StrCpy $MUI_TEMP "$START_MENU"
- Delete "$SMPROGRAMS\$MUI_TEMP\Uninstall.lnk"
-@CPACK_NSIS_DELETE_ICONS_EXTRA@
-
- ;Delete empty start menu parent diretories
- StrCpy $MUI_TEMP "$SMPROGRAMS\$MUI_TEMP"
-
- secondStartMenuDeleteLoop:
- ClearErrors
- RMDir $MUI_TEMP
- GetFullPathName $MUI_TEMP "$MUI_TEMP\.."
-
- IfErrors secondStartMenuDeleteLoopDone
-
- StrCmp "$MUI_TEMP" "$SMPROGRAMS" secondStartMenuDeleteLoopDone secondStartMenuDeleteLoop
- secondStartMenuDeleteLoopDone:
-
- DeleteRegKey /ifempty SHCTX "Software\@CPACK_PACKAGE_VENDOR@\@CPACK_PACKAGE_INSTALL_REGISTRY_KEY@"
-
- Push $INSTDIR\bin
- StrCmp $DO_NOT_ADD_TO_PATH_ "1" doNotRemoveFromPath 0
- Call un.RemoveFromPath
- doNotRemoveFromPath:
-SectionEnd
-
-;--------------------------------
-; determine admin versus local install
-; Is install for "AllUsers" or "JustMe"?
-; Default to "JustMe" - set to "AllUsers" if admin or on Win9x
-; This function is used for the very first "custom page" of the installer.
-; This custom page does not show up visibly, but it executes prior to the
-; first visible page and sets up $INSTDIR properly...
-; Choose different default installation folder based on SV_ALLUSERS...
-; "Program Files" for AllUsers, "My Documents" for JustMe...
-
-Function .onInit
- ; Reads components status for registry
- !insertmacro SectionList "InitSection"
-
- ; check to see if /D has been used to change
- ; the install directory by comparing it to the
- ; install directory that is expected to be the
- ; default
- StrCpy $IS_DEFAULT_INSTALLDIR 0
- StrCmp "$INSTDIR" "$PROGRAMFILES\@CPACK_PACKAGE_INSTALL_DIRECTORY@" 0 +2
- StrCpy $IS_DEFAULT_INSTALLDIR 1
-
- StrCpy $SV_ALLUSERS "JustMe"
- ; if default install dir then change the default
- ; if it is installed for JustMe
- StrCmp "$IS_DEFAULT_INSTALLDIR" "1" 0 +2
- StrCpy $INSTDIR "$DOCUMENTS\@CPACK_PACKAGE_INSTALL_DIRECTORY@"
-
- ClearErrors
- UserInfo::GetName
- IfErrors noLM
- Pop $0
- UserInfo::GetAccountType
- Pop $1
- StrCmp $1 "Admin" 0 +3
- SetShellVarContext all
- ;MessageBox MB_OK 'User "$0" is in the Admin group'
- StrCpy $SV_ALLUSERS "AllUsers"
- Goto done
- StrCmp $1 "Power" 0 +3
- SetShellVarContext all
- ;MessageBox MB_OK 'User "$0" is in the Power Users group'
- StrCpy $SV_ALLUSERS "AllUsers"
- Goto done
-
- noLM:
- StrCpy $SV_ALLUSERS "AllUsers"
- ;Get installation folder from registry if available
-
- done:
- StrCmp $SV_ALLUSERS "AllUsers" 0 +3
- StrCmp "$IS_DEFAULT_INSTALLDIR" "1" 0 +2
- StrCpy $INSTDIR "$PROGRAMFILES\@CPACK_PACKAGE_INSTALL_DIRECTORY@"
-
- StrCmp "@CPACK_NSIS_MODIFY_PATH@" "ON" 0 noOptionsPage
- !insertmacro MUI_INSTALLOPTIONS_EXTRACT "NSIS.InstallOptions.ini"
-
- noOptionsPage:
-FunctionEnd
diff --git a/win/cmake/cmake_parse_arguments.cmake b/win/cmake/cmake_parse_arguments.cmake
deleted file mode 100644
index db540ae9020..00000000000
--- a/win/cmake/cmake_parse_arguments.cmake
+++ /dev/null
@@ -1,47 +0,0 @@
-
-# Copyright (C) 2007 MySQL AB, 2009 Sun Microsystems,Inc
-#
-# 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
-
-# Handy macro to parse macro arguments
-MACRO(MYSQL_PARSE_ARGUMENTS prefix arg_names option_names)
- SET(DEFAULT_ARGS)
- FOREACH(arg_name ${arg_names})
- SET(${prefix}_${arg_name})
- ENDFOREACH(arg_name)
- FOREACH(option ${option_names})
- SET(${prefix}_${option} FALSE)
- ENDFOREACH(option)
-
- SET(current_arg_name DEFAULT_ARGS)
- SET(current_arg_list)
- FOREACH(arg ${ARGN})
- SET(larg_names ${arg_names})
- LIST(FIND larg_names "${arg}" is_arg_name)
- IF (is_arg_name GREATER -1)
- SET(${prefix}_${current_arg_name} ${current_arg_list})
- SET(current_arg_name ${arg})
- SET(current_arg_list)
- ELSE (is_arg_name GREATER -1)
- SET(loption_names ${option_names})
- LIST(FIND loption_names "${arg}" is_option)
- IF (is_option GREATER -1)
- SET(${prefix}_${arg} TRUE)
- ELSE (is_option GREATER -1)
- SET(current_arg_list ${current_arg_list} ${arg})
- ENDIF (is_option GREATER -1)
- ENDIF (is_arg_name GREATER -1)
- ENDFOREACH(arg)
- SET(${prefix}_${current_arg_name} ${current_arg_list})
-ENDMACRO() \ No newline at end of file
diff --git a/win/cmake/cpack_source_ignore_files.cmake b/win/cmake/cpack_source_ignore_files.cmake
deleted file mode 100644
index 5eef20dccc6..00000000000
--- a/win/cmake/cpack_source_ignore_files.cmake
+++ /dev/null
@@ -1,40 +0,0 @@
-SET(CPACK_SOURCE_IGNORE_FILES
-\\\\.bzr/
-\\\\.bzr-mysql
-\\\\.bzrignore
-CMakeCache\\\\.txt
-cmake_dist\\\\.cmake
-CPackSourceConfig\\\\.cmake
-CPackConfig.cmake
-/cmake_install\\\\.cmake
-/CTestTestfile\\\\.cmake
-/CMakeFiles/
-/version_resources/
-/_CPack_Packages/
-$\\\\.gz
-$\\\\.zip
-/CMakeFiles/
-/version_resources/
-/_CPack_Packages/
-scripts/make_binary_distribution$
-scripts/msql2mysql$
-scripts/mysql_config$
-scripts/mysql_convert_table_format$
-scripts/mysql_find_rows$
-scripts/mysql_fix_extensions$
-scripts/mysql_install_db$
-scripts/mysql_secure_installation$
-scripts/mysql_setpermission$
-scripts/mysql_zap$
-scripts/mysqlaccess$
-scripts/mysqld_multi$
-scripts/mysqld_safe$
-scripts/mysqldumpslow$
-scripts/mysqlhotcopy$
-Makefile$
-include/config\\\\.h$
-include/my_config\\\\.h$
-/autom4te\\\\.cache/
-errmsg\\\\.sys$
-#
-)
diff --git a/win/cmake/create_initial_db.cmake.in b/win/cmake/create_initial_db.cmake.in
deleted file mode 100644
index d4721b7bac4..00000000000
--- a/win/cmake/create_initial_db.cmake.in
+++ /dev/null
@@ -1,85 +0,0 @@
-# Copyright (C) 2009 Sun Microsystems, Inc
-#
-# 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
-
-# This script creates initial database for packaging on Windows
-SET(CMAKE_SOURCE_DIR "@CMAKE_SOURCE_DIR@")
-SET(CMAKE_CURRENT_BINARY_DIR "@CMAKE_CURRENT_BINARY_DIR@")
-SET(MYSQLD_EXECUTABLE "@MYSQLD_EXECUTABLE@")
-SET(CMAKE_CFG_INTDIR "@CMAKE_CFG_INTDIR@")
-SET(WIN32 "@WIN32@")
-# Force Visual Studio to output to stdout
-IF(ENV{VS_UNICODE_OUTPUT})
- SET ($ENV{VS_UNICODE_OUTPUT})
-ENDIF()
-IF(CMAKE_CFG_INTDIR AND CONFIG)
- #Resolve build configuration variables
- STRING(REPLACE "${CMAKE_CFG_INTDIR}" ${CONFIG} MYSQLD_EXECUTABLE
- "${MYSQLD_EXECUTABLE}")
-ENDIF()
-
-# Create bootstrapper SQL script
-FILE(WRITE bootstrap.sql "use mysql;\n" )
-FOREACH(FILENAME mysql_system_tables.sql mysql_system_tables_data.sql)
- FILE(STRINGS ${CMAKE_SOURCE_DIR}/scripts/${FILENAME} CONTENTS)
- FOREACH(STR ${CONTENTS})
- IF(NOT STR MATCHES "@current_hostname")
- FILE(APPEND bootstrap.sql "${STR}\n")
- ENDIF()
- ENDFOREACH()
-ENDFOREACH()
-FILE(READ ${CMAKE_SOURCE_DIR}/scripts/fill_help_tables.sql CONTENTS)
-FILE(APPEND bootstrap.sql ${CONTENTS})
-
-
-FILE(REMOVE_RECURSE mysql)
-MAKE_DIRECTORY(mysql)
-IF(WIN32)
- SET(CONSOLE --console)
-ENDIF()
-
-SET(BOOTSTRAP_COMMAND
- ${MYSQLD_EXECUTABLE}
- --no-defaults
- ${CONSOLE}
- --bootstrap
- --language=${CMAKE_CURRENT_BINARY_DIR}/share/english
- --basedir=.
- --datadir=.
- --tmpdir=.
- --default-storage-engine=MyISAM
- --loose-skip-innodb
- --loose-skip-pbxt
- --loose-skip-ndbcluster
- --max_allowed_packet=8M
- --net_buffer_length=16K
-)
-
-GET_FILENAME_COMPONENT(CWD . ABSOLUTE)
-EXECUTE_PROCESS(
- COMMAND "@CMAKE_COMMAND@" -E echo Executing ${BOOTSTRAP_COMMAND}
-)
-EXECUTE_PROCESS (
- COMMAND "@CMAKE_COMMAND@" -E echo input file bootstrap.sql, current directory ${CWD}
-)
-EXECUTE_PROCESS (
- COMMAND ${BOOTSTRAP_COMMAND} INPUT_FILE bootstrap.sql OUTPUT_VARIABLE OUT
- ERROR_VARIABLE ERR
- RESULT_VARIABLE RESULT
- )
-
-IF(NOT RESULT EQUAL 0)
- MESSAGE(FATAL_ERROR "Could not create initial database \n ${OUT} \n ${ERR}")
-ENDIF()
-
diff --git a/win/cmake/dummy.in b/win/cmake/dummy.in
deleted file mode 100644
index e69de29bb2d..00000000000
--- a/win/cmake/dummy.in
+++ /dev/null
diff --git a/win/cmake/install_layout.cmake b/win/cmake/install_layout.cmake
deleted file mode 100644
index 601e208d96d..00000000000
--- a/win/cmake/install_layout.cmake
+++ /dev/null
@@ -1,223 +0,0 @@
-# Copyright (C) 2010 Sun Microsystems, Inc
-#
-# 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
-
-# The purpose of this file is to set the default installation layout.
-#
-# The current choices of installation layout are:
-#
-# STANDALONE
-# Build with prefix=/usr/local/mysql, create tarball with install prefix="."
-# and relative links. Windows zip uses the same tarball layout but without
-# the build prefix.
-#
-# RPM
-# Build as per default RPM layout, with prefix=/usr
-#
-# DEB
-# Build as per STANDALONE, prefix=/opt/mysql/server-$major.$minor
-#
-# SVR4
-# Solaris package layout suitable for pkg* tools, prefix=/opt/mysql/mysql
-#
-# To force a directory layout, use -DINSTALL_LAYOUT=<layout>.
-#
-# The default is STANDALONE.
-#
-# There is the possibility to further fine-tune installation directories.
-# Several variables can be overwritten:
-#
-# - INSTALL_BINDIR (directory with client executables and scripts)
-# - INSTALL_SBINDIR (directory with mysqld)
-# - INSTALL_SCRIPTDIR (several scripts, rarely used)
-#
-# - INSTALL_LIBDIR (directory with client end embedded libraries)
-# - INSTALL_PLUGINDIR (directory for plugins)
-#
-# - INSTALL_INCLUDEDIR (directory for MySQL headers)
-#
-# - INSTALL_DOCDIR (documentation)
-# - INSTALL_DOCREADMEDIR (readme and similar)
-# - INSTALL_MANDIR (man pages)
-# - INSTALL_INFODIR (info pages)
-#
-# - INSTALL_SHAREDIR (location of aclocal/mysql.m4)
-# - INSTALL_MYSQLSHAREDIR (MySQL character sets and localized error messages)
-# - INSTALL_MYSQLTESTDIR (mysql-test)
-# - INSTALL_SQLBENCHDIR (sql-bench)
-# - INSTALL_SUPPORTFILESDIR (various extra support files)
-#
-# - INSTALL_MYSQLDATADIR (data directory)
-#
-# When changing this page, _please_ do not forget to update public Wiki
-# http://forge.mysql.com/wiki/CMake#Fine-tuning_installation_paths
-
-IF(NOT INSTALL_LAYOUT)
- SET(DEFAULT_INSTALL_LAYOUT "STANDALONE")
-ENDIF()
-
-SET(INSTALL_LAYOUT "${DEFAULT_INSTALL_LAYOUT}"
-CACHE STRING "Installation directory layout. Options are: STANDALONE (as in zip or tar.gz installer), RPM, DEB, SVR4")
-
-IF(UNIX)
- IF(INSTALL_LAYOUT MATCHES "RPM")
- SET(default_prefix "/usr")
- ELSEIF(INSTALL_LAYOUT MATCHES "DEB")
- SET(default_prefix "/opt/mysql/server-${MYSQL_BASE_VERSION}")
- # This is required to avoid "cpack -GDEB" default of prefix=/usr
- SET(CPACK_SET_DESTDIR ON)
- ELSEIF(INSTALL_LAYOUT MATCHES "SVR4")
- SET(default_prefix "/opt/mysql/mysql")
- ELSE()
- SET(default_prefix "/usr/local/mysql")
- ENDIF()
- IF(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
- SET(CMAKE_INSTALL_PREFIX ${default_prefix}
- CACHE PATH "install prefix" FORCE)
- ENDIF()
- SET(VALID_INSTALL_LAYOUTS "RPM" "STANDALONE" "DEB" "SVR4")
- LIST(FIND VALID_INSTALL_LAYOUTS "${INSTALL_LAYOUT}" ind)
- IF(ind EQUAL -1)
- MESSAGE(FATAL_ERROR "Invalid INSTALL_LAYOUT parameter:${INSTALL_LAYOUT}."
- " Choose between ${VALID_INSTALL_LAYOUTS}" )
- ENDIF()
-
- SET(SYSCONFDIR "${CMAKE_INSTALL_PREFIX}/etc"
- CACHE PATH "config directory (for my.cnf)")
- MARK_AS_ADVANCED(SYSCONFDIR)
-ENDIF()
-
-#
-# STANDALONE layout
-#
-SET(INSTALL_BINDIR_STANDALONE "bin")
-SET(INSTALL_SBINDIR_STANDALONE "bin")
-SET(INSTALL_SCRIPTDIR_STANDALONE "scripts")
-#
-SET(INSTALL_LIBDIR_STANDALONE "lib")
-SET(INSTALL_PLUGINDIR_STANDALONE "lib/plugin")
-#
-SET(INSTALL_INCLUDEDIR_STANDALONE "include")
-#
-SET(INSTALL_DOCDIR_STANDALONE "docs")
-SET(INSTALL_DOCREADMEDIR_STANDALONE ".")
-SET(INSTALL_MANDIR_STANDALONE "man")
-SET(INSTALL_INFODIR_STANDALONE "docs")
-#
-SET(INSTALL_SHAREDIR_STANDALONE "share")
-SET(INSTALL_MYSQLSHAREDIR_STANDALONE "share")
-SET(INSTALL_MYSQLTESTDIR_STANDALONE "mysql-test")
-SET(INSTALL_SQLBENCHDIR_STANDALONE ".")
-SET(INSTALL_SUPPORTFILESDIR_STANDALONE "support-files")
-#
-SET(INSTALL_MYSQLDATADIR_STANDALONE "data")
-
-#
-# RPM layout
-#
-SET(INSTALL_BINDIR_RPM "bin")
-SET(INSTALL_SBINDIR_RPM "sbin")
-SET(INSTALL_SCRIPTDIR_RPM "bin")
-#
-IF(CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64")
- SET(INSTALL_LIBDIR_RPM "lib64")
- SET(INSTALL_PLUGINDIR_RPM "lib64/mysql/plugin")
-ELSE()
- SET(INSTALL_LIBDIR_RPM "lib")
- SET(INSTALL_PLUGINDIR_RPM "lib/mysql/plugin")
-ENDIF()
-#
-SET(INSTALL_INCLUDEDIR_RPM "include/mysql")
-#
-#SET(INSTALL_DOCDIR_RPM unset - installed directly by RPM)
-#SET(INSTALL_DOCREADMEDIR_RPM unset - installed directly by RPM)
-SET(INSTALL_INFODIR_RPM "share/info")
-SET(INSTALL_MANDIR_RPM "share/man")
-#
-SET(INSTALL_SHAREDIR_RPM "share")
-SET(INSTALL_MYSQLSHAREDIR_RPM "share/mysql")
-SET(INSTALL_MYSQLTESTDIR_RPM "share/mysql-test")
-SET(INSTALL_SQLBENCHDIR_RPM "")
-SET(INSTALL_SUPPORTFILESDIR_RPM "share/mysql")
-#
-SET(INSTALL_MYSQLDATADIR_RPM "/var/lib/mysql")
-
-#
-# DEB layout
-#
-SET(INSTALL_BINDIR_DEB "bin")
-SET(INSTALL_SBINDIR_DEB "bin")
-SET(INSTALL_SCRIPTDIR_DEB "scripts")
-#
-SET(INSTALL_LIBDIR_DEB "lib")
-SET(INSTALL_PLUGINDIR_DEB "lib/plugin")
-#
-SET(INSTALL_INCLUDEDIR_DEB "include")
-#
-SET(INSTALL_DOCDIR_DEB "docs")
-SET(INSTALL_DOCREADMEDIR_DEB ".")
-SET(INSTALL_MANDIR_DEB "man")
-SET(INSTALL_INFODIR_DEB "docs")
-#
-SET(INSTALL_SHAREDIR_DEB "share")
-SET(INSTALL_MYSQLSHAREDIR_DEB "share")
-SET(INSTALL_MYSQLTESTDIR_DEB "mysql-test")
-SET(INSTALL_SQLBENCHDIR_DEB ".")
-SET(INSTALL_SUPPORTFILESDIR_DEB "support-files")
-#
-SET(INSTALL_MYSQLDATADIR_DEB "data")
-
-#
-# SVR4 layout
-#
-SET(INSTALL_BINDIR_SVR4 "bin")
-SET(INSTALL_SBINDIR_SVR4 "bin")
-SET(INSTALL_SCRIPTDIR_SVR4 "scripts")
-#
-SET(INSTALL_LIBDIR_SVR4 "lib")
-SET(INSTALL_PLUGINDIR_SVR4 "lib/plugin")
-#
-SET(INSTALL_INCLUDEDIR_SVR4 "include")
-#
-SET(INSTALL_DOCDIR_SVR4 "docs")
-SET(INSTALL_DOCREADMEDIR_SVR4 ".")
-SET(INSTALL_MANDIR_SVR4 "man")
-SET(INSTALL_INFODIR_SVR4 "docs")
-#
-SET(INSTALL_SHAREDIR_SVR4 "share")
-SET(INSTALL_MYSQLSHAREDIR_SVR4 "share")
-SET(INSTALL_MYSQLTESTDIR_SVR4 "mysql-test")
-SET(INSTALL_SQLBENCHDIR_SVR4 ".")
-SET(INSTALL_SUPPORTFILESDIR_SVR4 "support-files")
-#
-SET(INSTALL_MYSQLDATADIR_SVR4 "/var/lib/mysql")
-
-
-# Clear cached variables if install layout was changed
-IF(OLD_INSTALL_LAYOUT)
- IF(NOT OLD_INSTALL_LAYOUT STREQUAL INSTALL_LAYOUT)
- SET(FORCE FORCE)
- ENDIF()
-ENDIF()
-SET(OLD_INSTALL_LAYOUT ${INSTALL_LAYOUT} CACHE INTERNAL "")
-
-# Set INSTALL_FOODIR variables for chosen layout (for example, INSTALL_BINDIR
-# will be defined as ${INSTALL_BINDIR_STANDALONE} by default if STANDALONE
-# layout is chosen)
-FOREACH(var BIN SBIN LIB MYSQLSHARE SHARE PLUGIN INCLUDE SCRIPT DOC MAN
- INFO MYSQLTEST SQLBENCH DOCREADME SUPPORTFILES MYSQLDATA)
- SET(INSTALL_${var}DIR ${INSTALL_${var}DIR_${INSTALL_LAYOUT}}
- CACHE STRING "${var} installation directory" ${FORCE})
- MARK_AS_ADVANCED(INSTALL_${var}DIR)
-ENDFOREACH()
diff --git a/win/cmake/install_macros.cmake b/win/cmake/install_macros.cmake
deleted file mode 100644
index e74d064b9a5..00000000000
--- a/win/cmake/install_macros.cmake
+++ /dev/null
@@ -1,327 +0,0 @@
-# Copyright (C) 2009 Sun Microsystems, Inc
-#
-# 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
-
-GET_FILENAME_COMPONENT(MYSQL_CMAKE_SCRIPT_DIR ${CMAKE_CURRENT_LIST_FILE} PATH)
-INCLUDE(${MYSQL_CMAKE_SCRIPT_DIR}/cmake_parse_arguments.cmake)
-MACRO (INSTALL_DEBUG_SYMBOLS targets)
- IF(MSVC)
- FOREACH(target ${targets})
- GET_TARGET_PROPERTY(location ${target} LOCATION)
- GET_TARGET_PROPERTY(type ${target} TYPE)
- IF(NOT INSTALL_LOCATION)
- IF(type MATCHES "STATIC_LIBRARY" OR type MATCHES "MODULE_LIBRARY" OR type MATCHES "SHARED_LIBRARY")
- SET(INSTALL_LOCATION "lib")
- ELSEIF(type MATCHES "EXECUTABLE")
- SET(INSTALL_LOCATION "bin")
- ELSE()
- MESSAGE(FATAL_ERROR "cannot determine type of ${target}. Don't now where to install")
- ENDIF()
- ENDIF()
- STRING(REPLACE ".exe" ".pdb" pdb_location ${location})
- STRING(REPLACE ".dll" ".pdb" pdb_location ${pdb_location})
- STRING(REPLACE ".lib" ".pdb" pdb_location ${pdb_location})
- IF(CMAKE_GENERATOR MATCHES "Visual Studio")
- STRING(REPLACE "${CMAKE_CFG_INTDIR}" "\${CMAKE_INSTALL_CONFIG_NAME}" pdb_location ${pdb_location})
- ENDIF()
- IF(target STREQUAL "mysqld")
- SET(comp Server)
- ELSEIF(pdb_location MATCHES "mysql-test")
- SET(comp Tests)
- ELSE()
- SET(comp Debuginfo)
- ENDIF()
- INSTALL(FILES ${pdb_location} DESTINATION ${INSTALL_LOCATION} COMPONENT ${comp})
- ENDFOREACH()
- ENDIF()
-ENDMACRO()
-
-# Installs manpage for given file (either script or executable)
-#
-FUNCTION(INSTALL_MANPAGE file)
- IF(NOT UNIX)
- RETURN()
- ENDIF()
- GET_FILENAME_COMPONENT(file_name "${file}" NAME)
- SET(GLOB_EXPR
- ${CMAKE_SOURCE_DIR}/man/*${file}man.1*
- ${CMAKE_SOURCE_DIR}/man/*${file}man.8*
- ${CMAKE_BINARY_DIR}/man/*${file}man.1*
- ${CMAKE_BINARY_DIR}/man/*${file}man.8*
- )
- IF(MYSQL_DOC_DIR)
- SET(GLOB_EXPR
- ${MYSQL_DOC_DIR}/man/*${file}man.1*
- ${MYSQL_DOC_DIR}/man/*${file}man.8*
- ${MYSQL_DOC_DIR}/man/*${file}.1*
- ${MYSQL_DOC_DIR}/man/*${file}.8*
- ${GLOB_EXPR}
- )
- ENDIF()
-
- FILE(GLOB_RECURSE MANPAGES ${GLOB_EXPR})
- IF(MANPAGES)
- LIST(GET MANPAGES 0 MANPAGE)
- STRING(REPLACE "${file}man.1" "${file}.1" MANPAGE "${MANPAGE}")
- STRING(REPLACE "${file}man.8" "${file}.8" MANPAGE "${MANPAGE}")
- IF(MANPAGE MATCHES "${file}.1")
- SET(SECTION man1)
- ELSE()
- SET(SECTION man8)
- ENDIF()
- INSTALL(FILES "${MANPAGE}" DESTINATION "${INSTALL_MANDIR}/${SECTION}"
- COMPONENT ManPages)
- ENDIF()
-ENDFUNCTION()
-
-FUNCTION(INSTALL_SCRIPT)
- MYSQL_PARSE_ARGUMENTS(ARG
- "DESTINATION;COMPONENT"
- ""
- ${ARGN}
- )
-
- SET(script ${ARG_DEFAULT_ARGS})
- IF(NOT ARG_DESTINATION)
- SET(ARG_DESTINATION ${INSTALL_BINDIR})
- ENDIF()
- IF(ARG_COMPONENT)
- SET(COMP COMPONENT ${ARG_COMPONENT})
- ELSE()
- SET(COMP)
- ENDIF()
-
- INSTALL(FILES
- ${script}
- DESTINATION ${ARG_DESTINATION}
- PERMISSIONS OWNER_READ OWNER_WRITE
- OWNER_EXECUTE GROUP_READ GROUP_EXECUTE
- WORLD_READ WORLD_EXECUTE ${COMP}
- )
- INSTALL_MANPAGE(${script})
-ENDFUNCTION()
-
-# Install symbolic link to CMake target.
-# the link is created in the same directory as target
-# and extension will be the same as for target file.
-MACRO(INSTALL_SYMLINK linkname target destination component)
-IF(UNIX)
- GET_TARGET_PROPERTY(location ${target} LOCATION)
- GET_FILENAME_COMPONENT(path ${location} PATH)
- GET_FILENAME_COMPONENT(name ${location} NAME)
- SET(output ${path}/${linkname})
- ADD_CUSTOM_COMMAND(
- OUTPUT ${output}
- COMMAND ${CMAKE_COMMAND} ARGS -E remove -f ${output}
- COMMAND ${CMAKE_COMMAND} ARGS -E create_symlink
- ${name}
- ${linkname}
- WORKING_DIRECTORY ${path}
- DEPENDS ${target}
- )
-
- ADD_CUSTOM_TARGET(symlink_${linkname}
- ALL
- DEPENDS ${output})
- SET_TARGET_PROPERTIES(symlink_${linkname} PROPERTIES CLEAN_DIRECT_OUTPUT 1)
- IF(CMAKE_GENERATOR MATCHES "Xcode")
- # For Xcode, replace project config with install config
- STRING(REPLACE "${CMAKE_CFG_INTDIR}"
- "\${CMAKE_INSTALL_CONFIG_NAME}" output ${output})
- ENDIF()
- INSTALL(FILES ${output} DESTINATION ${destination} COMPONENT ${component})
-ENDIF()
-ENDMACRO()
-
-IF(WIN32)
- OPTION(SIGNCODE "Sign executables and dlls with digital certificate" OFF)
- MARK_AS_ADVANCED(SIGNCODE)
- IF(SIGNCODE)
- SET(SIGNTOOL_PARAMETERS
- /a /t http://timestamp.verisign.com/scripts/timstamp.dll
- CACHE STRING "parameters for signtool (list)")
- FIND_PROGRAM(SIGNTOOL_EXECUTABLE signtool
- PATHS "$ENV{ProgramFiles}/Microsoft SDKs/Windows/v7.0A"
- )
- IF(NOT SIGNTOOL_EXECUTABLE)
- MESSAGE(FATAL_ERROR
- "signtool is not found. Signing executables not possible")
- ENDIF()
- MARK_AS_ADVANCED(SIGNTOOL_EXECUTABLE SIGNTOOL_PARAMETERS)
- ENDIF()
-ENDIF()
-
-MACRO(SIGN_TARGET)
- MYSQL_PARSE_ARGUMENTS(ARG "COMPONENT" "" ${ARGN})
- SET(target ${ARG_DEFAULT_ARGS})
- IF(ARG_COMPONENT)
- SET(comp COMPONENT ${ARG_COMPONENT})
- ELSE()
- SET(comp)
- ENDIF()
- GET_TARGET_PROPERTY(target_type ${target} TYPE)
- IF(target_type AND NOT target_type MATCHES "STATIC")
- GET_TARGET_PROPERTY(target_location ${target} LOCATION)
- IF(CMAKE_GENERATOR MATCHES "Visual Studio")
- STRING(REPLACE "${CMAKE_CFG_INTDIR}" "\${CMAKE_INSTALL_CONFIG_NAME}"
- target_location ${target_location})
- ENDIF()
- INSTALL(CODE
- "EXECUTE_PROCESS(COMMAND
- \"${SIGNTOOL_EXECUTABLE}\" verify /pa /q \"${target_location}\"
- RESULT_VARIABLE ERR)
- IF(NOT \${ERR} EQUAL 0)
- EXECUTE_PROCESS(COMMAND
- \"${SIGNTOOL_EXECUTABLE}\" sign ${SIGNTOOL_PARAMETERS} \"${target_location}\"
- RESULT_VARIABLE ERR)
- ENDIF()
- IF(NOT \${ERR} EQUAL 0)
- MESSAGE(FATAL_ERROR \"Error signing '${target_location}'\")
- ENDIF()
- " ${comp})
- ENDIF()
-ENDMACRO()
-
-
-# Installs targets, also installs pdbs on Windows.
-#
-#
-
-FUNCTION(MYSQL_INSTALL_TARGETS)
- MYSQL_PARSE_ARGUMENTS(ARG
- "DESTINATION;COMPONENT"
- ""
- ${ARGN}
- )
- IF(ARG_COMPONENT)
- SET(COMP COMPONENT ${ARG_COMPONENT})
- ENDIF()
-
- SET(TARGETS ${ARG_DEFAULT_ARGS})
- IF(NOT TARGETS)
- MESSAGE(FATAL_ERROR "Need target list for MYSQL_INSTALL_TARGETS")
- ENDIF()
- IF(NOT ARG_DESTINATION)
- MESSAGE(FATAL_ERROR "Need DESTINATION parameter for MYSQL_INSTALL_TARGETS")
- ENDIF()
-
- FOREACH(target ${TARGETS})
- # If signing is required, sign executables before installing
- IF(SIGNCODE)
- SIGN_TARGET(${target} ${COMP})
- ENDIF()
- # Install man pages on Unix
- IF(UNIX)
- GET_TARGET_PROPERTY(target_location ${target} LOCATION)
- INSTALL_MANPAGE(${target_location})
- ENDIF()
- ENDFOREACH()
-
- INSTALL(TARGETS ${TARGETS} DESTINATION ${ARG_DESTINATION} ${COMP})
- SET(INSTALL_LOCATION ${ARG_DESTINATION} )
- INSTALL_DEBUG_SYMBOLS("${TARGETS}")
- SET(INSTALL_LOCATION)
-ENDFUNCTION()
-
-# Optionally install mysqld/client/embedded from debug build run. outside of the current build dir
-# (unless multi-config generator is used like Visual Studio or Xcode).
-# For Makefile generators we default Debug build directory to ${buildroot}/../debug.
-GET_FILENAME_COMPONENT(BINARY_PARENTDIR ${CMAKE_BINARY_DIR} PATH)
-SET(DEBUGBUILDDIR "${BINARY_PARENTDIR}/debug" CACHE INTERNAL "Directory of debug build")
-
-
-FUNCTION(INSTALL_DEBUG_TARGET target)
- MYSQL_PARSE_ARGUMENTS(ARG
- "DESTINATION;RENAME;PDB_DESTINATION;COMPONENT"
- ""
- ${ARGN}
- )
- GET_TARGET_PROPERTY(target_type ${target} TYPE)
- IF(ARG_RENAME)
- SET(RENAME_PARAM RENAME ${ARG_RENAME}${CMAKE_${target_type}_SUFFIX})
- ELSE()
- SET(RENAME_PARAM)
- ENDIF()
- IF(NOT ARG_DESTINATION)
- MESSAGE(FATAL_ERROR "Need DESTINATION parameter for INSTALL_DEBUG_TARGET")
- ENDIF()
- GET_TARGET_PROPERTY(target_location ${target} LOCATION)
- IF(CMAKE_GENERATOR MATCHES "Makefiles")
- STRING(REPLACE "${CMAKE_BINARY_DIR}" "${DEBUGBUILDDIR}" debug_target_location "${target_location}")
- ELSE()
- STRING(REPLACE "${CMAKE_CFG_INTDIR}" "Debug" debug_target_location "${target_location}" )
- ENDIF()
- IF(NOT ARG_COMPONENT)
- SET(ARG_COMPONENT DebugBinaries)
- ENDIF()
-
- # Define permissions
- # For executable files
- SET(PERMISSIONS_EXECUTABLE
- PERMISSIONS
- OWNER_READ OWNER_WRITE OWNER_EXECUTE
- GROUP_READ GROUP_EXECUTE
- WORLD_READ WORLD_EXECUTE)
-
- # Permissions for shared library (honors CMAKE_INSTALL_NO_EXE which is
- # typically set on Debian)
- IF(CMAKE_INSTALL_SO_NO_EXE)
- SET(PERMISSIONS_SHARED_LIBRARY
- PERMISSIONS
- OWNER_READ OWNER_WRITE
- GROUP_READ
- WORLD_READ)
- ELSE()
- SET(PERMISSIONS_SHARED_LIBRARY ${PERMISSIONS_EXECUTABLE})
- ENDIF()
-
- # Shared modules get the same permissions as shared libraries
- SET(PERMISSIONS_MODULE_LIBRARY ${PERMISSIONS_SHARED_LIBRARY})
-
- # Define permissions for static library
- SET(PERMISSIONS_STATIC_LIBRARY
- PERMISSIONS
- OWNER_READ OWNER_WRITE
- GROUP_READ
- WORLD_READ)
-
- INSTALL(FILES ${debug_target_location}
- DESTINATION ${ARG_DESTINATION}
- ${RENAME_PARAM}
- ${PERMISSIONS_${target_type}}
- CONFIGURATIONS Release RelWithDebInfo
- COMPONENT ${ARG_COMPONENT}
- OPTIONAL)
-
- IF(MSVC)
- GET_FILENAME_COMPONENT(ext ${debug_target_location} EXT)
- STRING(REPLACE "${ext}" ".pdb" debug_pdb_target_location "${debug_target_location}" )
- IF (RENAME_PARAM)
- IF(NOT ARG_PDB_DESTINATION)
- STRING(REPLACE "${ext}" ".pdb" "${ARG_RENAME}" pdb_rename)
- SET(PDB_RENAME_PARAM RENAME "${pdb_rename}")
- ENDIF()
- ENDIF()
- IF(NOT ARG_PDB_DESTINATION)
- SET(ARG_PDB_DESTINATION "${ARG_DESTINATION}")
- ENDIF()
- INSTALL(FILES ${debug_pdb_target_location}
- DESTINATION ${ARG_PDB_DESTINATION}
- ${PDB_RENAME_PARAM}
- CONFIGURATIONS Release RelWithDebInfo
- COMPONENT ${ARG_COMPONENT}
- OPTIONAL)
- ENDIF()
-ENDFUNCTION()
-
diff --git a/win/cmake/mysql_add_executable.cmake b/win/cmake/mysql_add_executable.cmake
deleted file mode 100644
index ac812fbcdfd..00000000000
--- a/win/cmake/mysql_add_executable.cmake
+++ /dev/null
@@ -1,56 +0,0 @@
-# Copyright (C) 2009 Sun Microsystems, Inc
-#
-# 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
-
-# Add executable plus some additional MySQL specific stuff
-# Usage (same as for standard CMake's ADD_EXECUTABLE)
-#
-# MYSQL_ADD_EXECUTABLE(target source1...sourceN)
-#
-# MySQL specifics:
-# - instruct CPack to install executable under ${CMAKE_INSTALL_PREFIX}/bin directory
-# On Windows :
-# - add version resource
-# - instruct CPack to do autenticode signing if SIGNCODE is set
-
-INCLUDE(cmake_parse_arguments)
-
-FUNCTION (MYSQL_ADD_EXECUTABLE)
- # Pass-through arguments for ADD_EXECUTABLE
- MYSQL_PARSE_ARGUMENTS(ARG
- "WIN32;MACOSX_BUNDLE;EXCLUDE_FROM_ALL;DESTINATION;COMPONENT"
- ""
- ${ARGN}
- )
- LIST(GET ARG_DEFAULT_ARGS 0 target)
- LIST(REMOVE_AT ARG_DEFAULT_ARGS 0)
-
- SET(sources ${ARG_DEFAULT_ARGS})
- ADD_VERSION_INFO(${target} EXECUTABLE sources)
- ADD_EXECUTABLE(${target} ${ARG_WIN32} ${ARG_MACOSX_BUNDLE} ${ARG_EXCLUDE_FROM_ALL} ${sources})
- # tell CPack where to install
- IF(NOT ARG_EXCLUDE_FROM_ALL)
- IF(NOT ARG_DESTINATION)
- SET(ARG_DESTINATION ${INSTALL_BINDIR})
- ENDIF()
- IF(ARG_COMPONENT)
- SET(COMP COMPONENT ${ARG_COMPONENT})
- ELSEIF(MYSQL_INSTALL_COMPONENT)
- SET(COMP COMPONENT ${MYSQL_INSTALL_COMPONENT})
- ELSE()
- SET(COMP COMPONENT Client)
- ENDIF()
- MYSQL_INSTALL_TARGETS(${target} DESTINATION ${ARG_DESTINATION} ${COMP})
- ENDIF()
-ENDFUNCTION()
diff --git a/win/cmake/mysql_version.cmake b/win/cmake/mysql_version.cmake
deleted file mode 100644
index bf623a22462..00000000000
--- a/win/cmake/mysql_version.cmake
+++ /dev/null
@@ -1,154 +0,0 @@
-
-MACRO(MYSQL_GET_CONFIG_VALUE keyword var)
- IF(NOT ${var})
- IF (EXISTS ${CMAKE_SOURCE_DIR}/configure.in)
- FILE (STRINGS ${CMAKE_SOURCE_DIR}/configure.in str REGEX "^[ ]*${keyword}=")
- IF(str)
- STRING(REPLACE "${keyword}=" "" str ${str})
- STRING(REGEX REPLACE "[ ].*" "" str ${str})
- SET(${var} ${str} CACHE INTERNAL "Config variable")
- ENDIF()
- ENDIF()
- ENDIF()
-ENDMACRO()
-
-
-# Read mysql version for configure script
-
-MACRO(GET_MYSQL_VERSION)
-
- IF(NOT VERSION_STRING)
- IF(EXISTS ${CMAKE_SOURCE_DIR}/configure.in)
- FILE(STRINGS ${CMAKE_SOURCE_DIR}/configure.in str REGEX "AM_INIT_AUTOMAKE")
- STRING(REGEX MATCH "[0-9]+\\.[0-9]+\\.[0-9]+[-][^ \\)]+" VERSION_STRING "${str}")
- IF(NOT VERSION_STRING)
- STRING(REGEX MATCH "[0-9]+\\.[0-9]+\\.[0-9]+" VERSION_STRING "${str}")
- IF(NOT VERSION_STRING)
- FILE(STRINGS configure.in str REGEX "AC_INIT\\(")
- STRING(REGEX MATCH "[0-9]+\\.[0-9]+\\.[0-9]+[-][a-zA-Z0-9-]+" VERSION_STRING "${str}")
- IF(NOT VERSION_STRING)
- STRING(REGEX MATCH "[0-9]+\\.[0-9]+\\.[0-9]+" VERSION_STRING "${str}")
- ENDIF()
- ENDIF()
- ENDIF()
- ENDIF()
- ENDIF()
-
- SET(VERSION_EXTRA) #alpha beta gamma delta epsilon, etc
-
- FOREACH(suffix alpha beta gamma)
- IF(VERSION_STRING MATCHES "${suffix}")
- SET(VERSION_EXTRA "-${suffix}")
- ENDIF()
- ENDFOREACH()
-
- STRING(REGEX MATCH "[0-9]+\\.[0-9]+\\.[0-9]+[-][a-zA-Z0-9]+" VERSION_STRING "${str}")
-
- IF(NOT VERSION_STRING)
- MESSAGE(FATAL_ERROR
- "VERSION_STRING cannot be parsed, please specify -DVERSION_STRING=major.minor.patch-extra"
- "when calling cmake")
- ENDIF()
-
- SET(VERSION ${VERSION_STRING})
- STRING(REPLACE "-" "_" MYSQL_U_SCORE_VERSION "${VERSION_STRING}")
-
- # Remove trailing (non-numeric) part of the version string
- STRING(REGEX REPLACE "[^\\.0-9].*" "" VERSION_STRING ${VERSION_STRING})
-
- STRING(REGEX REPLACE "([0-9]+)\\.[0-9]+\\.[0-9]+" "\\1" MAJOR_VERSION "${VERSION_STRING}")
- STRING(REGEX REPLACE "[0-9]+\\.([0-9]+)\\.[0-9]+" "\\1" MINOR_VERSION "${VERSION_STRING}")
- STRING(REGEX REPLACE "[0-9]+\\.[0-9]+\\.([0-9]+)" "\\1" PATCH "${VERSION_STRING}")
- SET(MYSQL_BASE_VERSION "${MAJOR_VERSION}.${MINOR_VERSION}" CACHE INTERNAL "MySQL Base version")
- SET(MYSQL_NO_DASH_VERSION "${MAJOR_VERSION}.${MINOR_VERSION}.${PATCH}")
- MATH(EXPR MYSQL_VERSION_ID "10000*${MAJOR_VERSION} + 100*${MINOR_VERSION} + ${PATCH}")
- MARK_AS_ADVANCED(VERSION MYSQL_VERSION_ID MYSQL_BASE_VERSION)
- SET(CPACK_PACKAGE_VERSION_MAJOR ${MAJOR_VERSION})
- SET(CPACK_PACKAGE_VERSION_MINOR ${MINOR_VERSION})
- SET(CPACK_PACKAGE_VERSION_PATCH ${PATCH})
-ENDMACRO()
-
-# Get mysql version and other interesting variables
-GET_MYSQL_VERSION()
-
-MYSQL_GET_CONFIG_VALUE("PROTOCOL_VERSION" PROTOCOL_VERSION)
-MYSQL_GET_CONFIG_VALUE("DOT_FRM_VERSION" DOT_FRM_VERSION)
-MYSQL_GET_CONFIG_VALUE("MYSQL_TCP_PORT_DEFAULT" MYSQL_TCP_PORT_DEFAULT)
-MYSQL_GET_CONFIG_VALUE("MYSQL_UNIX_ADDR_DEFAULT" MYSQL_UNIX_ADDR_DEFAULT)
-MYSQL_GET_CONFIG_VALUE("SHARED_LIB_MAJOR_VERSION" SHARED_LIB_MAJOR_VERSION)
-IF(NOT MYSQL_TCP_PORT_DEFAULT)
- SET(MYSQL_TCP_PORT_DEFAULT "3306")
-ENDIF()
-IF(NOT MYSQL_TCP_PORT)
- SET(MYSQL_TCP_PORT ${MYSQL_TCP_PORT_DEFAULT})
- SET(MYSQL_TCP_PORT_DEFAULT "0")
-ELSEIF(MYSQL_TCP_PORT EQUAL MYSQL_TCP_PORT_DEFAULT)
- SET(MYSQL_TCP_PORT_DEFAULT "0")
-ENDIF()
-
-
-IF(NOT MYSQL_UNIX_ADDR)
- SET(MYSQL_UNIX_ADDR "/tmp/mysql.sock")
-ENDIF()
-IF(NOT COMPILATION_COMMENT)
- SET(COMPILATION_COMMENT "Source distribution")
-ENDIF()
-
-
-INCLUDE(package_name)
-IF(NOT CPACK_PACKAGE_FILE_NAME)
- GET_PACKAGE_FILE_NAME(CPACK_PACKAGE_FILE_NAME)
-ENDIF()
-
-IF(NOT CPACK_SOURCE_PACKAGE_FILE_NAME)
- SET(CPACK_SOURCE_PACKAGE_FILE_NAME "mariadb-${VERSION_STRING}${VERSION_EXTRA}")
-ENDIF()
-SET(CPACK_PACKAGE_CONTACT "MariaDB team <info@montyprogram.com>")
-SET(CPACK_PACKAGE_VENDOR "Monty Program AB")
-SET(CPACK_SOURCE_GENERATOR "TGZ")
-INCLUDE(cpack_source_ignore_files)
-
-# Defintions for windows version resources
-SET(PRODUCTNAME "MariaDB Server")
-SET(COMPANYNAME ${CPACK_PACKAGE_VENDOR})
-
-# Windows 'date' command has unpredictable output, so cannot rely on it to
-# set MYSQL_COPYRIGHT_YEAR - if someone finds a portable way to do so then
-# it might be useful
-#IF (WIN32)
-# EXECUTE_PROCESS(COMMAND "date" "/T" OUTPUT_VARIABLE TMP_DATE)
-# STRING(REGEX REPLACE "(..)/(..)/..(..).*" "\\3\\2\\1" MYSQL_COPYRIGHT_YEAR ${TMP_DATE})
-IF(UNIX)
- EXECUTE_PROCESS(COMMAND "date" "+%Y" OUTPUT_VARIABLE MYSQL_COPYRIGHT_YEAR OUTPUT_STRIP_TRAILING_WHITESPACE)
-ENDIF()
-
-# Add version information to the exe and dll files
-# Refer to http://msdn.microsoft.com/en-us/library/aa381058(VS.85).aspx
-# for more info.
-IF(MSVC)
- # Tiny version is used to identify the build, it can be set with cmake -DTINY_VERSION=<number>
- # to bzr revno for example (in the CI builds)
- SET(TINY_VERSION "0" CACHE INTERNAL "")
-
- GET_FILENAME_COMPONENT(MYSQL_CMAKE_SCRIPT_DIR ${CMAKE_CURRENT_LIST_FILE} PATH)
-
- SET(FILETYPE VFT_APP)
- CONFIGURE_FILE(${MYSQL_CMAKE_SCRIPT_DIR}/versioninfo.rc.in
- ${CMAKE_BINARY_DIR}/versioninfo_exe.rc)
-
- SET(FILETYPE VFT_DLL)
- CONFIGURE_FILE(${MYSQL_CMAKE_SCRIPT_DIR}/versioninfo.rc.in
- ${CMAKE_BINARY_DIR}/versioninfo_dll.rc)
-
- FUNCTION(ADD_VERSION_INFO target target_type sources_var)
- IF("${target_type}" MATCHES "SHARED" OR "${target_type}" MATCHES "MODULE")
- SET(rcfile ${CMAKE_BINARY_DIR}/versioninfo_dll.rc)
- ELSEIF("${target_type}" MATCHES "EXE")
- SET(rcfile ${CMAKE_BINARY_DIR}/versioninfo_exe.rc)
- ENDIF()
- SET(${sources_var} ${${sources_var}} ${rcfile} PARENT_SCOPE)
- ENDFUNCTION()
-ELSE()
- FUNCTION(ADD_VERSION_INFO)
- ENDFUNCTION()
-ENDIF()
diff --git a/win/cmake/package_name.cmake b/win/cmake/package_name.cmake
deleted file mode 100644
index ef6f9b31328..00000000000
--- a/win/cmake/package_name.cmake
+++ /dev/null
@@ -1,134 +0,0 @@
-# Copyright (C) 2010 Sun Microsystems, Inc
-#
-# 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
-
-# Produce meaningful package name for the binary package
-# The logic is rather involved with special cases for different OSes
-INCLUDE(CheckTypeSize)
-CHECK_TYPE_SIZE("void *" SIZEOF_VOIDP)
-MACRO(GET_PACKAGE_FILE_NAME Var)
-IF(NOT VERSION)
- MESSAGE(FATAL_ERROR
- "Variable VERSION needs to be set prior to calling GET_PACKAGE_FILE_NAME")
- ENDIF()
- IF(NOT SYSTEM_NAME_AND_PROCESSOR)
- SET(NEED_DASH_BETWEEN_PLATFORM_AND_MACHINE 1)
- SET(DEFAULT_PLATFORM ${CMAKE_SYSTEM_NAME})
- SET(DEFAULT_MACHINE ${CMAKE_SYSTEM_PROCESSOR})
- IF(SIZEOF_VOIDP EQUAL 8)
- SET(64BIT 1)
- ENDIF()
-
- IF(CMAKE_SYSTEM_NAME MATCHES "Windows")
- SET(NEED_DASH_BETWEEN_PLATFORM_AND_MACHINE 0)
- SET(DEFAULT_PLATFORM "win")
- IF(64BIT)
- SET(DEFAULT_MACHINE "x64")
- ELSE()
- SET(DEFAULT_MACHINE "32")
- ENDIF()
- ELSEIF(CMAKE_SYSTEM_NAME MATCHES "Linux")
- IF(NOT 64BIT AND CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64")
- SET(DEFAULT_MACHINE "i686")
- ENDIF()
- ELSEIF(CMAKE_SYSTEM_NAME MATCHES "SunOS")
- # SunOS 5.10=> solaris10
- STRING(REPLACE "5." "" VER "${CMAKE_SYSTEM_VERSION}")
- SET(DEFAULT_PLATFORM "solaris${VER}")
- IF(64BIT)
- IF(CMAKE_SYSTEM_PROCESSOR MATCHES "i386")
- SET(DEFAULT_MACHINE "x86_64")
- ELSE()
- SET(DEFAULT_MACHINE "${CMAKE_SYSTEM_PROCESSOR}-64bit")
- ENDIF()
- ENDIF()
- ELSEIF(CMAKE_SYSTEM_NAME MATCHES "HP-UX")
- STRING(REPLACE "B." "" VER "${CMAKE_SYSTEM_VERSION}")
- SET(DEFAULT_PLATFORM "hpux${VER}")
- IF(64BIT)
- SET(DEFAULT_MACHINE "${CMAKE_SYSTEM_PROCESSOR}-64bit")
- ENDIF()
- ELSEIF(CMAKE_SYSTEM_NAME MATCHES "AIX")
- SET(DEFAULT_PLATFORM "${CMAKE_SYSTEM_NAME}5.${CMAKE_SYSTEM_VERSION}")
- IF(64BIT)
- SET(DEFAULT_MACHINE "${CMAKE_SYSTEM_PROCESSOR}-64bit")
- ENDIF()
- ELSEIF(CMAKE_SYSTEM_NAME MATCHES "FreeBSD")
- STRING(REGEX MATCH "[0-9]+\\.[0-9]+" VER "${CMAKE_SYSTEM_VERSION}")
- SET(DEFAULT_PLATFORM "${CMAKE_SYSTEM_NAME}${VER}")
- IF(CMAKE_SYSTEM_PROCESSOR MATCHES "amd64")
- SET(DEFAULT_MACHINE "x86_64")
- IF(NOT 64BIT)
- SET(DEFAULT_MACHINE "i386")
- ENDIF()
- ENDIF()
- ELSEIF(CMAKE_SYSTEM_NAME MATCHES "Darwin")
- IF(CMAKE_OSX_DEPLOYMENT_TARGET)
- SET(DEFAULT_PLATFORM "osx${CMAKE_OSX_DEPLOYMENT_TARGET}")
- ELSE()
- SET(VER "${CMAKE_SYSTEM_VERSION}")
- STRING(REGEX REPLACE "([0-9]+)\\.[0-9]+\\.[0-9]+" "\\1" VER "${VER}")
- # Subtract 4 from Darwin version to get correct osx10.X
- MATH(EXPR VER "${VER} -4")
- SET(DEFAULT_PLATFORM "osx10.${VER}")
- ENDIF()
- LIST(LENGTH CMAKE_OSX_ARCHITECTURES LEN)
- IF(LEN GREATER 1)
- SET(DEFAULT_MACHINE "universal")
- ELSE()
- SET(DEFAULT_MACHINE "${CMAKE_OSX_ARCHITECTURES}")
- IF(NOT DEFAULT_MACHINE)
- IF(CMAKE_SIZEOF_VOIPD EQUAL 4)
- SET(DEFAULT_MACHINE "i386")
- ELSE()
- SET(DEFAULT_MACHINE "x86_64")
- ENDIF()
- ENDIF()
- ENDIF()
- IF(DEFAULT_MACHINE MATCHES "i386")
- SET(DEFAULT_MACHINE "x86")
- ENDIF()
- ENDIF()
-
- IF(NOT PLATFORM)
- SET(PLATFORM ${DEFAULT_PLATFORM})
- ENDIF()
- IF(NOT MACHINE)
- SET(MACHINE ${DEFAULT_MACHINE})
- ENDIF()
-
- IF(NEED_DASH_BETWEEN_PLATFORM_AND_MACHINE)
- SET(SYSTEM_NAME_AND_PROCESSOR "${PLATFORM}-${MACHINE}")
- ELSE()
- SET(SYSTEM_NAME_AND_PROCESSOR "${PLATFORM}${MACHINE}")
- ENDIF()
- ENDIF()
-
- IF(SHORT_PRODUCT_TAG)
- SET(PRODUCT_TAG "-${SHORT_PRODUCT_TAG}")
- ELSEIF(MYSQL_SERVER_SUFFIX)
- SET(PRODUCT_TAG "${MYSQL_SERVER_SUFFIX}") # Already has a leading dash
- ELSE()
- SET(PRODUCT_TAG)
- ENDIF()
-
- SET(package_name "mariadb${PRODUCT_TAG}-${MYSQL_NO_DASH_VERSION}${VERSION_EXTRA}-${SYSTEM_NAME_AND_PROCESSOR}")
-
- # Sometimes package suffix is added (something like "-icc-glibc23")
- IF(PACKAGE_SUFFIX)
- SET(package_name "${package_name}${PACKAGE_SUFFIX}")
- ENDIF()
- STRING(TOLOWER ${package_name} package_name)
- SET(${Var} ${package_name})
-ENDMACRO()
diff --git a/win/cmake/versioninfo.rc.in b/win/cmake/versioninfo.rc.in
deleted file mode 100644
index b570eb2f8e0..00000000000
--- a/win/cmake/versioninfo.rc.in
+++ /dev/null
@@ -1,23 +0,0 @@
-#include <windows.h>
-VS_VERSION_INFO VERSIONINFO
-FILEVERSION @MAJOR_VERSION@,@MINOR_VERSION@,@PATCH@,@TINY_VERSION@
-PRODUCTVERSION @MAJOR_VERSION@,@MINOR_VERSION@,@PATCH@,@TINY_VERSION@
-FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
-FILEFLAGS 0
-FILEOS VOS__WINDOWS32
-FILETYPE @FILETYPE@
-FILESUBTYPE VFT2_UNKNOWN
-BEGIN
- BLOCK "StringFileInfo"
- BEGIN
- BLOCK "040904E4"
- BEGIN
- VALUE "FileVersion", "@MAJOR_VERSION@.@MINOR_VERSION@.@PATCH@.@TINY_VERSION@\0"
- VALUE "ProductVersion", "@MAJOR_VERSION@.@MINOR_VERSION@.@PATCH@.@TINY_VERSION@\0"
- END
- END
- BLOCK "VarFileInfo"
- BEGIN
- VALUE "Translation", 0x409, 1252
- END
-END
diff --git a/win/configure.js b/win/configure.js
deleted file mode 100644
index da7e4c2cd43..00000000000
--- a/win/configure.js
+++ /dev/null
@@ -1,342 +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 with_maria_tmp_tables = -1;
-
- 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_ARIA_TEMP_TABLES":
- configfile.WriteLine("SET (" + args.Item(i) + " TRUE)");
- break;
- case "WITH_ARIA_STORAGE_ENGINE":
- configfile.WriteLine("SET (" + args.Item(i) + " TRUE)");
- if(with_maria_tmp_tables == -1)
- {
- with_maria_tmp_tables = 1;
- }
- break;
- case "WITH_ARIA_TMP_TABLES":
- with_maria_tmp_tables = ( parts.length == 1 ||
- parts[1] == "YES" || parts[1] == "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 (with_maria_tmp_tables == 1)
- {
- configfile.WriteLine("SET (WITH_ARIA_TMP_TABLES TRUE)");
- }
- 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([MariaDB Server], [";
- var key2 = "AM_INIT_AUTOMAKE(mariadb, ";
- var key_len = key.length;
- var pos = str.indexOf(key);
- if (pos == -1)
- {
- pos = str.indexOf(key2);
- key_len= key2.length;
- }
- if (pos == -1) return null;
- pos += key_len;
- 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)