WcaLog(LOGMSG_STANDARD,"INSTALLDIR is suspiciously short, better not do anything.");
return0;
}
if(check_only==0){
WcaLog(LOGMSG_STANDARD,"Determining number of matching services...");
intservicecount=remove_service(installdir,1);
if(servicecount<=0){
WcaLog(LOGMSG_STANDARD,"No services found, not removing anything.");
return0;
}elseif(servicecount==1){
TCHARbuf[256];
swprintf_s(buf,sizeof(buf),TEXT("There is a service called '%ls' set up to run from this installation. Do you wish me to stop and remove that service?"),last_service_name);
intrc=MessageBox(NULL,buf,TEXT("Removing MySQL Server"),MB_ICONQUESTION|MB_YESNOCANCEL|MB_SYSTEMMODAL);
if(rc==IDCANCEL)return-1;
if(rc!=IDYES)return0;
}elseif(servicecount>0){
TCHARbuf[256];
swprintf_s(buf,sizeof(buf),TEXT("There appear to be %d services set up to run from this installation. Do you wish me to stop and remove those services?"),servicecount);
intrc=MessageBox(NULL,buf,TEXT("Removing MySQL Server"),MB_ICONQUESTION|MB_YESNOCANCEL|MB_SYSTEMMODAL);
<Publish Event="SpawnDialog" Value="OutOfRbDiskDlg">OutOfDiskSpace = 1 AND OutOfNoRbDiskSpace = 0 AND (PROMPTROLLBACKCOST="P" OR NOT PROMPTROLLBACKCOST)</Publish>
<Publish Event="EndDialog" Value="Return">OutOfDiskSpace = 1 AND OutOfNoRbDiskSpace = 0 AND PROMPTROLLBACKCOST="D"</Publish>
<Publish Event="EnableRollback" Value="False">OutOfDiskSpace = 1 AND OutOfNoRbDiskSpace = 0 AND PROMPTROLLBACKCOST="D"</Publish>
<Publish Event="SpawnDialog" Value="OutOfDiskDlg">(OutOfDiskSpace = 1 AND OutOfNoRbDiskSpace = 1) OR (OutOfDiskSpace = 1 AND PROMPTROLLBACKCOST="F")</Publish>
<Custom Action="UnregisterProperty" After="InstallInitialize">Installed And Not UPGRADINGPRODUCTCODE And REMOVE="ALL"</Custom>
<Custom Action="UnregisterPropertySilent" After="InstallInitialize">Installed And Not UPGRADINGPRODUCTCODE And REMOVE="ALL"</Custom>
<Custom Action="UnregisterService" After="UnregisterProperty">Installed And Not UPGRADINGPRODUCTCODE And REMOVE="ALL" And UILevel>4</Custom>
<Custom Action="UnregisterServiceSilently" After="UnregisterPropertySilent">Installed And Not UPGRADINGPRODUCTCODE And REMOVE="ALL" And UILevel<=4</Custom>
</InstallExecuteSequence>
<!-- Installation root-->
<Directory Id='TARGETDIR' Name='SourceDir'>
<Directory Id='@PlatformProgramFilesFolder@'>
<Directory Id='directory.MySQL' Name='MySQL'>
<Directory Id='INSTALLDIR' Name='MySQL Server @MAJOR_VERSION@.@MINOR_VERSION@'>
Summary: A very fast and reliable SQL database server
Group: Applications/Databases
Version: @VERSION@
Release: 2%{?commercial:.1}%{?dist}
License: Copyright (c) 2000, @MYSQL_COPYRIGHT_YEAR@, %{mysql_vendor}. All rights reserved. Under %{?license_type} license as shown in the Description field.