Update of /cvsroot/mocklib/netmocklib/bldfiles
In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv32564/bldfiles
Added Files:
directory.properties project.build project.properties
Log Message:
add netbuildtemplate.
--- NEW FILE: project.build ---
<?xml version="1.0" encoding="utf-8"?>
<project name="Build Project" default="all" basedir="..">
<!-- Targets that gets called for the Build -->
<include buildfile="bldfiles/project.properties"/>
<include buildfile="bldfiles/directory.properties"/>
<property name="type" value="library" overwrite="false"/>
<property name="ext" value=".dll" if="${type == 'library'}" />
<property name="ext" value=".exe" if="${type == 'exe'}" />
<property name="comp.name" value="${assembly.name}${ext}"/>
<loadtasks assembly="${tools}/nant-contrib/NAnt.Contrib.Tasks.dll" />
<target name="gensrc" description="Generates source code from an xsd to use for xml processing">
<mkdir dir="${gensrc}"/>
<foreach item="File" property="filename">
<in>
<items>
<include name="${schemas}/*.xsd" />
</items>
</in>
<do>
<xsd outputdir="${gensrc}" namespace="${namespace}" schema="${filename}"/>
</do>
</foreach>
</target>
<target name="compile" depends="gensrc" description="compiles the source file for this project">
<echo message="Generating ${comp.name} type=${type}"/>
<mkdir dir="${assemblies}"/>
<csc target="${type}" debug="true" output="${assemblies}/${comp.name}" warnaserror="true">
<sources basedir=".">
<include name="${csfiles}/**/*.cs"/>
<include name="${gensrc}/**/*.cs"/>
</sources>
<references basedir=".">
<include name="${lib}/**/*.dll"/>
<include name="${tools}/NUnit/*.dll"/>
</references>
<resources basedir="${csfiles}">
<include name="**/*.resx"/>
</resources>
</csc>
<copy todir="${assemblies}">
<fileset basedir="${lib}">
<include name="**/*.dll" />
</fileset>
</copy>
</target>
<target name="winsvc.staging" depends="compile" description="Packages the webservice all up together to resemble deployment">
<mkdir dir="${winsvc.staging.bin}"/>
<mkdir dir="${winsvc.staging}/log"/>
<copy todir="${winsvc.staging.bin}">
<fileset basedir="${assemblies}">
<include name="**/*" />
</fileset>
</copy>
<copy todir="${winsvc.staging}">
<fileset basedir="${config}">
<include name="**/*" />
</fileset>
</copy>
</target>
<target name="deployWinSvc" depends="winsvc.staging" description="deploys the windows service" >
<echo message="Installing the Framework Windows Service...."/>
<readregistry property="installutil.dir" key="SOFTWARE\Microsoft\ASP.NET\1.1.4322.0\path" hive="LocalMachine" failonerror="false"/>
<exec basedir="${installutil.dir}" program="installutil" commandline="HSEM.Framework.exe" workingdir="${winsvc.staging.bin}" failonerror="true"/>
</target>
<target name="undeployWinSvc" description="undeploys the windows service" >
<echo message="Uninstalling the Framework Windows Service...."/>
<readregistry property="installutil.dir" key="SOFTWARE\Microsoft\ASP.NET\1.1.4322.0\path" hive="LocalMachine" failonerror="false"/>
<exec basedir="${installutil.dir}" program="installutil" commandline="/u HSEM.Framework.exe" workingdir="${winsvc.staging.bin}" failonerror="false"/>
</target>
<target name="codecoverage" depends="compile">
<mkdir dir="${codecov}"/>
<delete dir="${assemblies}\log" failonerror="false"/>
<copy todir="${assemblies}">
<fileset basedir="${config}">
<include name="**/*" />
</fileset>
</copy>
<exec program="${tools}/NCover/NCover.Console.exe"
commandline="/o ${codecov}/${comp.name}.xml /c "${tools}/NUnit/nunit-console.exe" ${assemblies}/${comp.name} /a ${assembly.name} /l ${codecov}/NCover.log"/>
</target>
<target name="testall" depends="compile">
<nunit2>
<formatter type="Plain" />
<test assemblyname="${assemblies}/${comp.name}"/>
</nunit2>
</target>
<target name="all" depends="winsvc.staging, testall" description="Builds everything, puts in web.staging and runs testall"/>
<target name="clean" depends="undeployWinSvc" description="Cleans out files generated from this build file">
<delete dir="${output}" failonerror="false"/>
</target>
</project>
--- NEW FILE: project.properties ---
<?xml version="1.0" encoding="utf-8"?>
<project name="project.properties">
<!--property name="type" value="exe"-->
<property name="assembly.name" value="NMockLib"/>
<property name="namespace" value="NMockLib"/>
</project>
--- NEW FILE: directory.properties ---
<?xml version="1.0" encoding="utf-8"?>
<project name="directory.properties">
<!-- input directories -->
<property name="input" value="input"/>
<property name="csfiles" value="${input}/csharp"/>
<property name="lib" value="${input}/lib"/>
<property name="config" value="${input}/config"/>
<property name="schemas" value="${input}/schemas"/>
<property name="tools" value="tools"/>
<!-- output directories -->
<property name="output" value="output"/>
<property name="gensrc" value="${output}/gensrc"/>
<property name="assemblies" value="${output}/outassemblies"/>
<property name="web.staging" value="${output}/staging-web"/>
<property name="web.staging.bin" value="${web.staging}/bin"/>
<property name="winsvc.staging" value="${output}/staging-winsvc"/>
<property name="winsvc.staging.bin" value="${winsvc.staging}/bin"/>
<property name="dist" value="${output}/dist"/>
<property name="codecov" value="${output}/codecov"/>
</project>
|