Skip to content

<find module="SQLServer" version="100" required="true" />

Notifications You must be signed in to change notification settings

xinhuang/NAntFind

Repository files navigation

NAntFind

<property name="find.module.path" value="find;dependency/more/find" />

<find package="SQLServer" required="true" version="100" />
<echo message="${SQLServer.found}" />
<echo message="${SQLServer}" />

<find file="SQLCmd.exe" package="SQLServer" version="100" recursive="true"/>
<echo message="${SQLCmd.exe.found}" />
<echo message="${SQLCmd.exe}" />

NAntFind is a CMake find style dependency discovery extension for NAnt.

The FindSQLServer.include

<package name="VisualStudio" default="11.0">
    <version value="11.0">
    	<hints>
			<hint key="HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\11.0" name="InstallDir" />
		</hints>
		<names>
			<name value="devenv.exe" />
			<name value="tf.exe" />
		</names>
	</version>
	<version value="10.0">
		<hints>
			<hint value="C:\Program Files\Microsoft Visual Studio 10.0\Common7\IDE" />
			<hint value="C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE" />
			<hint key="HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\10.0" name="InstallDir" />
			<hint key="HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\10.0" name="InstallDir" />
		</hints>
		<names>
			<name value="devenv.exe" />
			<name value="tf.exe" />
		</names>
	</version>
</package>

The file name must be Find + + .xml, so NAntFind can locate your find module automatically.


Feature

  • Find packages
  • Find one file in a given package
  • Search for find modules in ${find.module.path}
  • Search for a specific version
  • Default package version can be specified
  • Query value from registry
  • Use environment variables in find module

Result can be queried in NAnt variables:

  • ${package.found}: True/False
  • ${package}: Package path
  • ${package.version}: Package version
  • ${file.name.found}: True/False
  • ${file.name}: File path
  • ${file.name.version}: Package version which the file belongs to

TODO

  • Support version specification: use gems syntax
  • Allow substution in find module
  • A more flexible and easy to use DSL

License

GNU Lesser General Public License

About

<find module="SQLServer" version="100" required="true" />

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages