Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

<executable> - mark file as executable and optionally execute it

...

Code Block
xml
xml
<pack name="core" required="yes">
...
	<file targetdir="$INSTALL_PATH" src="projectNotification.bat" />
	<executable targetfile="$INSTALL_PATH/projectNotification.bat" type="bin" stage="postinstall" failure ="warn" keep="true" >
		<os family="windows" />
		<args>
			<arg value="-version"/>
		</args>
	</executable>
...
</pack>

Executing Multiple Files

One or more <fileset> tags can be used to specify multiple files executable at once. The <fileset> which can be used here does not have all of the attributes and nested tags of a Pack FileSet. Only the attributes targetdir, includes and excludes and the children <include> and <exclude> are allowed. The children <include> and <exclude> only can have the attribute name.

...

Code Block
xml
xml
<pack name="core" required="yes">
...
	<file targetdir="$INSTALL_PATH" src="projectExtractor.bat" >
	<file targetdir="$INSTALL_PATH" src="projectInstaller.bat" >
	<executable type="bin" stage="postinstall" failure ="warn" keep="true" ">
		<os family="windows" />
		<fileset targetdir="$INSTALL_PATH" includes="fileCleaner.bat,projectNotification.bat" />
	</executable>
...
<pack>

Note that there is no guarantee that fileCleaner.bat will run before projectNotification.bat.