Title: install target

Hi all,

It would be nice to have an install target in
NAnt.build, so one could just type 'nant install'
or 'nant linux install' to install NAnt.

Here's my proposal:

1. Create a new install.config property set to win32 by default
   <property name="install.config" value="win32" /> <!-- win32|linux -->

2. Create a named configurations
   <target name="init-install"
     description="Initializes intallation properties">
     <call target="${install.config}"/>
   </target>

   <target name="win32"
     description="Configures a win32 install">
     <property name="install.config" value="win32"/>
     <property name="install.dir" value="${sys.env.ProgramFiles}"/>
   </target>

   <target name="linux"
     description="Configures a web install">
     <property name="install.config" value="linux"/>
     <property name="install.dir" value="/usr/local"/>
   </target>

3. Create the install and uninstall targets
   <target name="install" depends="init-install build sdk-doc"
     description="Installs the current configuration">
     <mkdir dir="${install.dir}" failonerror="false"/>
     <copy todir="${install.dir}" overwrite="true">
       <fileset basedir="${build.dir}">
         <includes name="**"/>
         <excludes name="**/*.xml"/>
       </fileset>
     </copy>
   </target>

   <target name="uninstall" depends="init-install"
     description="Uninstalls the current configuration">
     <delete dir="${install.dir}" failonerror="false"/>
   </target>


Furthermore I think it is time to use the framework 1.1
as a default...

What's your opinion?

Gius_.

Giuseppe Greco
T-Systems CS AG
Birkenstrasse 21
8306 Bruttisellen

Phone: +41 (0) 1 805 57 20
Fax:   +41 (0) 1 805 55 45
Email: [EMAIL PROTECTED]
Web:   www.t-systems.ch

Reply via email to