cses.build
上传用户:wdhx888
上传日期:2017-06-08
资源大小:112k
文件大小:7k
源码类别:

WEB邮件程序

开发平台:

C#

  1. <?xml version="1.0"?>
  2. <!--
  3.    | Build file for the C# Email Server project
  4.  -->
  5. <project name="cses" default="build" basedir=".">
  6.     <description>C# Email Server build file</description>
  7.     
  8.     <!--
  9.        | Properties/Setup Targets
  10.      -->
  11.     
  12.     <!-- 
  13.        | The Root for the build directory.  The release type
  14.        | (debug/release) will be appended to create a the build.dir
  15.        | property.
  16.      -->
  17.     <property name="build.root.dir" value="build" />
  18.     
  19.     <!-- Version -->
  20.     <property name="build.version" value="0.3" />
  21.     
  22.     <!-- 
  23.        | Initializes the properties.  Defaults to DEBUG
  24.        | unless the release target was already called
  25.      -->
  26.     <target name="init">
  27.         <property name="initialized" value="false" />
  28.         <if propertyexists="project.config">
  29.             <property name="initialized" value="true" />
  30.         </if>
  31.         <call target="init.debug" unless="${initialized}" />
  32.         
  33.         <echo message="Building a ${project.config} build." />
  34.         
  35.         <property name="build.dir" value="${build.root.dir}/${project.config}" />        
  36.     </target>
  37.     <!-- Configures a DEBUG build -->
  38.     <target name="init.debug" description="Forces a DEBUG build.">
  39.         <property name="project.config" value="debug" />
  40.         <property name="build.debug" value="true" />        
  41.         <property name="build.release" value="false" />
  42.     </target>
  43.     <!-- Configures a RELEASE build -->
  44.     <target name="init.release" description="Forces a RELEASE build.">
  45.         <property name="project.config" value="release" />
  46.         <property name="build.debug" value="false" />
  47.         <property name="build.release" value="true" />
  48.     </target>
  49.     <!--
  50.        | Build Targets
  51.      -->
  52.     <target name="build" depends="build.smtpserver" />
  53.     <!--
  54.        | Builds the SMTP Server DLL
  55.      -->
  56.     <target name="build.smtpserver" depends="init">
  57.         <mkdir dir="${build.dir}" />
  58.         <csc 
  59.             target="library"
  60.             output="${build.dir}/cses.smtp.server.dll" debug="${build.debug}"
  61.             doc="${build.dir}/cses.smtp.server.xml"
  62.             optimize="${build.release}">
  63.             <sources>
  64.                 <includes name="src/**/*.cs" />
  65.             </sources>
  66.             <references>
  67.                 <includes name="lib/log4net.dll" />
  68.             </references>
  69.         </csc>
  70.     </target>
  71.     
  72.     <target name="build.smtpserver.test" depends="init, build.smtpserver">
  73.         <mkdir dir="${build.dir}" />
  74.         <csc 
  75.             target="library"
  76.             output="${build.dir}/cses.smtp.server-test.dll" debug="${build.debug}">
  77.             <sources>
  78.                 <includes name="src-test/**/*.cs" />
  79.             </sources>
  80.             <references>
  81.                 <includes name="${build.dir}/cses.smtp.server.dll" />
  82.                 <includes name="lib/log4net.dll" />
  83.                 <includes name="lib/nunit.framework.dll" />
  84.             </references>
  85.         </csc>
  86.         <!-- Copy the references into the build directory -->
  87.         <copy todir="${build.dir}">
  88.             <fileset basedir="lib">
  89.                 <includes name="log4net.dll" />
  90.             </fileset>
  91.         </copy>
  92.     </target>
  93.     
  94.     <!--
  95.        | Documentation Targets
  96.      -->
  97.      
  98.      <target name="doc" depends="init">
  99.         <ndoc>
  100.             <assemblies basedir="${build.dir}">
  101.                 <includes name="cses.smtp.server.dll" />
  102.             </assemblies>
  103.             <summaries basedir="${build.dir}">
  104.                 <includes name="C:devmailservercsesNamespaceSummary.xml" />
  105.             </summaries>
  106.                 <documenters>
  107.                     <documenter name="MSDN">
  108.                         <property name="OutputDirectory" value="${build.dir}doc" />
  109.                         <property name="HtmlHelpName" value="CSES Documentation" />
  110.                         <property name="HtmlHelpCompilerFilename" value="hhc.exe" />
  111.                         <property name="IncludeFavorites" value="False" />
  112.                         <property name="Title" value="C# Email Server API Documentation" />
  113.                         <property name="SplitTOCs" value="False" />
  114.                         <property name="DefaulTOC" value="" />
  115.                         <property name="ShowVisualBasic" value="True" />
  116.                         <property name="ShowMissingSummaries" value="True" />
  117.                         <property name="ShowMissingRemarks" value="True" />
  118.                         <property name="ShowMissingParams" value="True" />
  119.                         <property name="ShowMissingReturns" value="True" />
  120.                         <property name="ShowMissingValues" value="True" />
  121.                         <property name="DocumentInternals" value="False" />
  122.                         <property name="DocumentProtected" value="True" />
  123.                         <property name="DocumentPrivates" value="False" />
  124.                         <property name="DocumentEmptyNamespaces" value="False" />
  125.                         <property name="IncludeAssemblyVersion" value="False" />
  126.                         <property name="CopyrightText" value="Eric Daugherty" />
  127.                         <property name="CopyrightHref" value="http://www.ericdaugherty.com/dev/cses" />
  128.                      </documenter>
  129.                 </documenters> 
  130.          </ndoc>
  131.     </target>
  132.            
  133.     
  134.     
  135.     <!-- 
  136.        | Release Targets
  137.      -->
  138.     
  139.     <target name="release" depends="clean, init.release, init, build.smtpserver, doc">
  140.         <copy todir="${build.dir}">
  141.             <fileset basedir="lib">
  142.                 <includes name="log4net.dll" />
  143.             </fileset>
  144.         </copy>
  145.         <copy todir="${build.dir}">
  146.             <fileset basedir="docs">
  147.                 <includes name="LICENSE.txt" />
  148.                 <includes name="ReleaseNotes.txt" />
  149.             </fileset>
  150.         </copy>
  151.         <copy todir="${build.dir}">
  152.             <fileset basedir="${build.dir}doc">
  153.                 <includes name="CSES Documentation.chm" />
  154.             </fileset>
  155.         </copy>       
  156.         <zip zipfile="${build.root.dir}/${nant.project.name}-${build.version}.zip">
  157.             <fileset basedir="${build.dir}">
  158.                 <includes name="*"/>                
  159.             </fileset>
  160.         </zip>
  161.         <zip zipfile="${build.root.dir}/${nant.project.name}-${build.version}-src.zip">
  162.             <fileset basedir="">
  163.                 <includes name="lib/**/*" />
  164.                 <includes name="docs/**/*" />
  165.                 <includes name="src/**/*" />
  166.                 <includes name="src-test/**/*" />
  167.                 <includes name="cses.build" />
  168.             </fileset>
  169.         </zip>
  170.     </target>
  171.         
  172.     <!--
  173.        | Clean Targets
  174.      -->
  175.      
  176.     <target name="clean">
  177.         <delete dir="${build.root.dir}" />
  178.     </target>
  179.     <!--
  180.        | Test Targets
  181.      -->
  182.     
  183.     <target name="test" depends="test.smtpserver" />
  184.     
  185.     <target name="test.smtpserver" depends="init, build.smtpserver.test">
  186.         <nunit2>
  187.             <formatter type="Plain" />
  188.             <test assemblyname="${build.dir}/cses.smtp.server-test.dll" />
  189.         </nunit2>
  190.     </target>
  191.   
  192. </project>