###############################################################################
#
# Open iT Patch definition
#
# Create a sequence (top down) of instructions for how to install the patch
# Please refer to the following wiki page for more information:
#
#    https://wiki.openit.com/bin/view/Development/NewOpeniTPatchSystem
#


# The following is an example. Be sure to clear (or completely replace it) when
# you make a new patch!


# Stop Recorder
stop
{
	error=warning
	module=recorder
}

# Stop service
stop
{
	error=warning
	module=service
}

# Wait for all previously signalled programs to stop
waitstop
{
	error=fatal
	timeout=60
	kill=no
}

# Back up configuration file before modifying it
backup
{
	error=fatal
	source=%confdir%/Components/LogMessages/licpoll.mess
}

backup
{
	error=fatal
	source=%confdir%/Components/licpoll.xml
}

# Install binaries
install
{
	error=fatal
	source=bin/LicPoll.exe
	target=%installdir%/bin/LicPoll.exe
}

install
{
	error=warning
	source=Configuration/LogMessages/licpoll.mess
	target=%installdir%/Configuration/LogMessages/licpoll.mess
}

confremove
{
	error=warning
	target=%confdir%/Components/licpoll.xml
	path=DCML.licpoll.license-types.mathlm
}

confremove
{
	error=warning
	target=%confdir%/Components/licpoll.xml
	path=DCML.licpoll.license-types.lm-x
}

confremove
{
	error=warning
	target=%confdir%/Components/licpoll.xml
	path=DCML.licpoll.default-product-names
}

confcopy
{
	error=fatal
	source=Configuration/licpoll.xml
	target=%confdir%/Components/licpoll.xml
	source-path=DCML.licpoll.license-types.mathlm
	target-path=DCML.licpoll.license-types
	replace=yes
}

confcopy
{
	error=fatal
	source=Configuration/licpoll.xml
	target=%confdir%/Components/licpoll.xml
	source-path=DCML.licpoll.license-types.lm-x
	target-path=DCML.licpoll.license-types
	replace=yes
}

confcopy
{
	error=fatal
	source=Configuration/licpoll.xml
	target=%confdir%/Components/licpoll.xml
	source-path=DCML.licpoll.default-product-names
	target-path=DCML.licpoll
	replace=yes
}

# Start recorder again
start
{
	error=warning
	module=recorder
}

# Start service
start
{
	error=warning
	module=service
}
