Commit b6f7ec6a authored by Rasmus Johansson's avatar Rasmus Johansson

MDEV-19781 Create MariaDB named commands on Windows

Added CreateSymlinks and DeleteSymlinks functions to
CustomAction.cpp. Extra.wxs.in calls them.
parent f9ceb0a6
...@@ -21,8 +21,6 @@ IF(MSVC_VERSION LESS 1600) ...@@ -21,8 +21,6 @@ IF(MSVC_VERSION LESS 1600)
RETURN() RETURN()
ENDIF() ENDIF()
SET(MANUFACTURER "MariaDB Corporation Ab") SET(MANUFACTURER "MariaDB Corporation Ab")
SET(WIX_BIN_PATHS) SET(WIX_BIN_PATHS)
FOREACH(WIX_VER 3.9 3.10 3.11) FOREACH(WIX_VER 3.9 3.10 3.11)
......
This diff is collapsed.
...@@ -8,3 +8,5 @@ CheckDatabaseProperties ...@@ -8,3 +8,5 @@ CheckDatabaseProperties
CheckDataDirectoryEmpty CheckDataDirectoryEmpty
CheckDBInUse CheckDBInUse
CheckServiceUpgrades CheckServiceUpgrades
CreateSymlinks
DeleteSymlinks
# get the symlink lists
#INCLUDE(${CMAKE_SOURCE_DIR}/../../cmake/symlinks.cmake)
#INCLUDE(symlinks)
INCLUDE(${CMAKE_CURRENT_LIST_DIR}/../../cmake/symlinks.cmake)
MACRO(MAKE_WIX_IDENTIFIER str varname) MACRO(MAKE_WIX_IDENTIFIER str varname)
STRING(REPLACE "/" "." ${varname} "${str}") STRING(REPLACE "/" "." ${varname} "${str}")
STRING(REGEX REPLACE "[^a-zA-Z_0-9.]" "_" ${varname} "${${varname}}") STRING(REGEX REPLACE "[^a-zA-Z_0-9.]" "_" ${varname} "${${varname}}")
......
...@@ -63,6 +63,9 @@ ...@@ -63,6 +63,9 @@
<Property Id="BUFFERPOOLSIZE" Secure="yes"/> <Property Id="BUFFERPOOLSIZE" Secure="yes"/>
<!-- Innodb page size --> <!-- Innodb page size -->
<Property Id="PAGESIZE" Secure="yes" Value="16K"/> <Property Id="PAGESIZE" Secure="yes" Value="16K"/>
<!-- Symlinks -->
<Property Id="SYMLINK_TOS" Value="@MARIADB_SYMLINK_TOS@" />
<Property Id="SYMLINK_FROMS" Value="@MARIADB_SYMLINK_FROMS@" />
<CustomAction Id="LaunchUrl" BinaryKey="WixCA" DllEntry="WixShellExec" Execute="immediate" Return="check" Impersonate="yes" /> <CustomAction Id="LaunchUrl" BinaryKey="WixCA" DllEntry="WixShellExec" Execute="immediate" Return="check" Impersonate="yes" />
...@@ -660,11 +663,24 @@ ...@@ -660,11 +663,24 @@
<MergeRef Id="VCRedist"/> <MergeRef Id="VCRedist"/>
</Feature> </Feature>
<?endif?> <?endif?>
<!-- Custom action, create symlinks -->
<CustomAction Id="CreateSymlinks.SetProperty" Return="check" Property="CreateSymlinks" Value="[INSTALLDIR]|[SYMLINK_FROMS]|[SYMLINK_TOS]" />
<CustomAction Id="CreateSymlinks" BinaryKey="wixca.dll" DllEntry="CreateSymlinks" Execute="deferred" Impersonate="no" Return="ignore" />
<CustomAction Id="DeleteSymlinks.SetProperty" Return="check" Property="DeleteSymlinks" Value="[INSTALLDIR]|[SYMLINK_FROMS]|[SYMLINK_TOS]" />
<CustomAction Id='DeleteSymlinks' BinaryKey="wixca.dll" DllEntry="DeleteSymlinks" Execute="deferred" Impersonate="no" Return="ignore" />
<!-- Custom action, call mysql_install_db --> <InstallExecuteSequence>
<SetProperty Sequence='execute' Before='CreateDatabaseCommand' Id="SKIPNETWORKING" Value="--skip-networking" >SKIPNETWORKING</SetProperty> <Custom Action="CreateSymlinks.SetProperty" Before="CreateSymlinks">NOT Installed</Custom>
<SetProperty Sequence='execute' Before='CreateDatabaseCommand' Id="ALLOWREMOTEROOTACCESS" Value="--allow-remote-root-access">ALLOWREMOTEROOTACCESS</SetProperty> <Custom Action="CreateSymlinks" Before="InstallFinalize">NOT Installed</Custom>
<SetProperty Sequence='execute' Before='CreateDatabaseCommand' Id="DEFAULTUSER" Value="--default-user">DEFAULTUSER</SetProperty> <Custom Action="DeleteSymlinks.SetProperty" Before="DeleteSymlinks">Installed AND NOT REINSTALL</Custom>
<Custom Action="DeleteSymlinks" Before="RemoveFiles">Installed AND NOT REINSTALL</Custom>
</InstallExecuteSequence>
<!-- Custom action, call mysql_install_db -->
<SetProperty Sequence='execute' Before='CreateDatabaseCommand' Id="SKIPNETWORKING" Value="--skip-networking" >SKIPNETWORKING</SetProperty>
<SetProperty Sequence='execute' Before='CreateDatabaseCommand' Id="ALLOWREMOTEROOTACCESS" Value="--allow-remote-root-access">ALLOWREMOTEROOTACCESS</SetProperty>
<SetProperty Sequence='execute' Before='CreateDatabaseCommand' Id="DEFAULTUSER" Value="--default-user">DEFAULTUSER</SetProperty>
<CustomAction Id='CheckDatabaseProperties' BinaryKey='wixca.dll' DllEntry='CheckDatabaseProperties' /> <CustomAction Id='CheckDatabaseProperties' BinaryKey='wixca.dll' DllEntry='CheckDatabaseProperties' />
<CustomAction Id='PresetDatabaseProperties' BinaryKey='wixca.dll' DllEntry='PresetDatabaseProperties' /> <CustomAction Id='PresetDatabaseProperties' BinaryKey='wixca.dll' DllEntry='PresetDatabaseProperties' />
<CustomAction Id="CreateDatabaseCommand" Property="CreateDatabase" <CustomAction Id="CreateDatabaseCommand" Property="CreateDatabase"
...@@ -881,10 +897,10 @@ ...@@ -881,10 +897,10 @@
> >
<![CDATA[ NOT(NSISINSTALLKEY << "MariaDB @MAJOR_VERSION@.@MINOR_VERSION@.") OR Installed]]> <![CDATA[ NOT(NSISINSTALLKEY << "MariaDB @MAJOR_VERSION@.@MINOR_VERSION@.") OR Installed]]>
</Condition> </Condition>
<Condition Message= <!-- Condition Message=
'Setting the ALLUSERS property is not allowed because [ProductName] is a per-machine application. Setup will now exit.'> 'Setting the ALLUSERS property is not allowed because [ProductName] is a per-machine application. Setup will now exit.'>
<![CDATA[ALLUSERS = "1"]]> <![CDATA[ALLUSERS = "1"]]>
</Condition> </Condition -->
<Condition Message='This application is only supported on Windows Vista, Windows Server 2008, or higher.'> <Condition Message='This application is only supported on Windows Vista, Windows Server 2008, or higher.'>
<![CDATA[Installed OR (VersionNT >= 600)]]> <![CDATA[Installed OR (VersionNT >= 600)]]>
</Condition> </Condition>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment