log4net.build
来自「SharpDevelop2.0.0 c#开发免费工具」· BUILD 代码 · 共 792 行 · 第 1/4 页
BUILD
792 行
<?xml version="1.0" ?>
<!--
Copyright 2004-2005 The Apache Software Foundation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<project name="log4net" default="compile-all" xmlnds="http://tempuri.org/nant-vs.xsd">
<!-- Global project settings -->
<!-- Global project settings -->
<property name="log4net.basedir" value="." />
<property name="project.build.config" value="debug" />
<property name="project.build.package" value="false" />
<!-- Include log4net helpers -->
<include buildfile="${log4net.basedir}/log4net.include" />
<!-- Targets that should always be executed -->
<call target="set-build-configuration" />
<call target="set-framework-configuration" />
<!-- Targets that check settings -->
<target name="check-package-version">
<fail
message="A package version has not been specified."
if="${not property::exists('package.version')}" />
</target>
<target name="check-package-dir">
<property name="package.dir" value="build/package" overwrite="false" />
<mkdir dir="${package.dir}" />
</target>
<target name="check-current-package-dir">
<fail
message="The current package directory has not been specified."
if="${not property::exists('current.package.dir')}" />
<mkdir dir="${current.package.dir}" />
</target>
<target name="check-current-package-zipfile">
<fail
message="The current package zipfile has not been specified."
if="${not property::exists('current.package.zipfile')}" />
</target>
<target name="check-htmlhelp-compiler">
<if test="${not property::exists('htmlhelp.compiler')}">
<readregistry
property="htmlhelp.workshop.installroot"
key="SOFTWARE\Microsoft\HTML Help Workshop\InstallDir"
hive="CurrentUser"
failonerror="false" />
<if test="${property::exists('htmlhelp.workshop.installroot')}">
<property
name="htmlhelp.compiler"
value="${htmlhelp.workshop.installroot}/hhc.exe" />
</if>
</if>
<if test="${not property::exists('htmlhelp.compiler')}">
<sysinfo />
<property
name="htmlhelp.compiler"
value="${sys.os.folder.programfiles}/HTML Help Worshop/hhc.exe" />
</if>
</target>
<!-- Target for cleaning up the current package directory -->
<target name="clean-current-package-dir" depends="check-current-package-dir" description="Cleans the current package directory">
<echo message="Cleaning the ${current.package.dir} package directory." />
<delete dir="${current.package.dir}" if="${directory::exists(current.package.dir)}" />
<mkdir dir="${current.package.dir}" />
</target>
<!-- Displays configuration info, usefull for working out why log4net doesn't build -->
<target name="display-setup" depends="check-htmlhelp-compiler">
<!-- .NET Framework 1.0 -->
<if test="${framework::exists('net-1.0')}">
<property name="nant.settings.currentframework" value="net-1.0" />
<call target="display-target-framework" />
</if>
<if test="${not framework::exists('net-1.0')}">
<echo message=".NET Framework 1.0 runtime is not available." />
</if>
<!-- .NET Framework 1.1 -->
<if test="${framework::exists('net-1.1')}">
<property name="nant.settings.currentframework" value="net-1.1" />
<call target="display-target-framework" />
</if>
<if test="${not framework::exists('net-1.1')}">
<echo message=".NET Framework 1.1 runtime is not available." />
</if>
<!-- .NET Framework 2.0 -->
<if test="${framework::exists('net-2.0')}">
<property name="nant.settings.currentframework" value="net-2.0" />
<call target="display-target-framework" />
</if>
<if test="${not framework::exists('net-2.0')}">
<echo message=".NET Framework 2.0 runtime is not available." />
</if>
<!-- .NET Compact Framework 1.0 -->
<if test="${framework::exists('netcf-1.0')}">
<property name="nant.settings.currentframework" value="netcf-1.0" />
<call target="display-target-framework" />
</if>
<if test="${not framework::exists('netcf-1.0')}">
<echo message=".NET Compact Framework 1.0 runtime is not available." />
</if>
<!-- Mono 1.0 -->
<if test="${framework::exists('mono-1.0')}">
<property name="nant.settings.currentframework" value="mono-1.0" />
<call target="display-target-framework" />
</if>
<if test="${not framework::exists('mono-1.0')}">
<echo message="Mono 1.0 runtime is not available." />
</if>
<!-- SSCLI 1.0 -->
<if test="${framework::exists('sscli-1.0')}">
<property name="nant.settings.currentframework" value="sscli-1.0" />
<call target="display-target-framework" />
</if>
<if test="${not framework::exists('sscli-1.0')}">
<echo message="SSCLI 1.0 runtime is not available." />
</if>
<!-- HTML Help Compiler -->
<echo message="htmlhelp.compiler: ${htmlhelp.compiler}" />
</target>
<target name="display-target-framework">
<echo message="" />
<echo message="----------------------------------------------------------" />
<echo message=" ${nant.settings.currentframework.description}" />
<echo message="----------------------------------------------------------" />
<echo message="" />
<echo message="framework : ${framework::get-target-framework()}" />
<echo message="description : ${framework::get-description(framework::get-target-framework())}" />
<if test="${framework::sdk-exists(framework::get-target-framework())}">
<echo message="sdk directory : ${framework::get-sdk-directory(framework::get-target-framework())}" />
</if>
<if test="${not framework::sdk-exists(framework::get-target-framework())}">
<echo message="sdk directory : <not configured/available>" />
</if>
<echo message="framework directory : ${framework::get-framework-directory(framework::get-target-framework())}" />
<echo message="assembly directory : ${framework::get-assembly-directory(framework::get-target-framework())}" />
<echo message="" />
</target>
<!-- Target for setting the package configuration -->
<target name="set-package-configuration" depends="check-package-dir, check-package-version">
<property name="current.package.dir" value="${package.dir}/${nant.project.name}-${package.version}" />
<property name="log4net.basedir" value="${current.package.dir}" />
<property name="current.package.zipfile" value="${project::get-name()}-${package.version}.zip" />
<property name="bin.dir" value="${current.package.dir}/bin" />
<property name="doc.dir" value="${current.package.dir}/doc" />
<property name="sdkdoc.dir" value="${doc.dir}/sdk" />
<delete dir="${current.package.dir}" if="${directory::exists(current.package.dir)}" />
<mkdir dir="${current.package.dir}" />
</target>
<!-- Target for compiling all build configurations for all runtime configurations -->
<target name="compile-all" description="Compile all build configurations for all runtime configurations">
<echo message="Compiling all build configurations for all runtime configurations." />
<call target="set-debug-build-configuration" />
<call target="compile-build" />
<call target="set-release-build-configuration" />
<call target="compile-build" />
</target>
<!-- Target for compiling all build configurations for the current runtime configurations -->
<target name="compile-runtime" description="Compile all build configurations for the current target framework">
<echo message="Compiling all build configurations for ${framework::get-description(framework::get-target-framework())}." />
<call target="set-debug-build-configuration" />
<!-- make sure that the runtime properties that rely on build configuration information are refreshed -->
<call target="set-runtime-configuration" />
<call target="compile-${framework::get-target-framework()}" />
<call target="set-release-build-configuration" />
<!-- make sure that the runtime properties that rely on build configuration information are refreshed -->
<call target="set-runtime-configuration" />
<call target="compile-${framework::get-target-framework()}" />
</target>
<!-- Target for compiling all runtime configurations in the current build configuration -->
<target name="compile-build" description="Compile current build configurations for all runtime configurations">
<echo message="Compiling all framework versions for the ${current.build.config} build configuration." />
<if test="${framework::exists('netcf-1.0')}">
<call target="compile-netcf-1.0" />
</if>
<if test="${not framework::exists('netcf-1.0')}">
<if test="${property::exists('project.build.package') and project.build.package}">
<fail message="The .NET Compact Framework 1.0 is not available." />
</if>
<if test="${not(property::exists('project.build.package') and project.build.package)}">
<echo
message="The .NET Compact Framework 1.0 is not available. Build skipped." />
</if>
</if>
<if test="${framework::exists('net-1.0')}">
<call target="compile-net-1.0" />
<call target="compile-cli-1.0" />
</if>
<if test="${not framework::exists('net-1.0')}">
<if test="${property::exists('project.build.package') and project.build.package}">
<fail message="The .NET Framework 1.0 is not available." />
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?