-
Notifications
You must be signed in to change notification settings - Fork 10
/
NLogViewer.build
155 lines (133 loc) · 7.17 KB
/
NLogViewer.build
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
<?xml version="1.0" encoding="utf-8" ?>
<project default="build" xmlns="http://nant.sf.net/NAnt.xsd">
<tstamp />
<property name="nlog.debug" value="true" />
<property name="nlog.optimize" value="true" />
<property name="nlog.define" value="NANT" />
<property name="csc.warninglevel" value="4" />
<property name="scp.program" value="pscp" />
<property name="ssh.program" value="plink" />
<property name="ssh.server" value="jaak@sav.net" />
<property name="scp.args" value="-q -batch" />
<property name="ssh.args" value="-batch" />
<property name="webserver.deploy.dir" value="web/viewer.nlog-project.org/html" />
<property name="csc.warninglevel" value="4" />
<property name="clover.enabled" value="false" />
<property name="clover.home" value="C:\Apps\CloverNLog" />
<target name="configure">
<call target="configure-${framework::get-target-framework()}" />
<property name="buildsubdir" value="${framework::get-target-framework()}${if(clover.enabled,'-clover','')}${if(nlog.debug,'-debug','')}" />
<property name="nlogviewer.dir" value="${nant.project.basedir}/build/${buildsubdir}/bin" unless="${property::exists('nlogviewer.dir')}" />
<property name="web.dir" value="build/${buildsubdir}/web" unless="${property::exists('web.dir')}" />
<echo message="Building NLog for ${framework::get-target-framework()}" />
<echo message="Target dir: ${nlogviewer.dir}" />
<mkdir dir="${nlogviewer.dir}" />
</target>
<target name="build" depends="configure, NLogViewer" />
<target name="debug">
<property name="nlog.debug" value="true" />
<property name="nlog.optimize" value="false" />
</target>
<target name="release">
<property name="nlog.debug" value="false" />
<property name="nlog.optimize" value="true" />
</target>
<target name="NLogViewer" depends="configure, NLogViewer.Interfaces, NLogViewer.NDumbsterSmtpReceiver">
<csc target="winexe" output="${nlogviewer.dir}/NLogViewer.exe" define="${nlog.define}" debug="${nlog.debug}" optimize="${nlog.optimize}" warninglevel="${csc.warninglevel}">
<sources basedir="src/NLogViewer">
<include name="**/*.cs" />
</sources>
<references>
<include name="System.Windows.Forms.dll" />
<include name="${nlogviewer.dir}/NLogViewer.Interfaces.dll" />
</references>
<resources basedir="src/NLogViewer" prefix="NLogViewer" dynamicprefix="true">
<include name="**/*.resx" />
</resources>
</csc>
<copy file="src/NLogViewer/App.config" tofile="${nlogviewer.dir}/NLogViewer.exe.config" />
<copy file="src/NLogViewer/NLogViewer.exe.manifest" tofile="${nlogviewer.dir}/NLogViewer.exe.manifest" />
</target>
<target name="NLogViewer.Interfaces" depends="configure">
<csc target="library" output="${nlogviewer.dir}/NLogViewer.Interfaces.dll" doc="${nlogviewer.dir}/NLogViewer.Interfaces.xml" define="${nlog.define}" debug="${nlog.debug}" optimize="${nlog.optimize}" warninglevel="${csc.warninglevel}">
<sources basedir="src/NLogViewer.Interfaces">
<include name="**/*.cs" />
</sources>
</csc>
</target>
<target name="NLogViewer.NDumbsterSmtpReceiver" depends="configure">
<copy file="external/nDumbster.dll" tofile="${nlogviewer.dir}/nDumbster.dll" />
<csc target="library" output="${nlogviewer.dir}/NLogViewer.NDumbsterSmtpReceiver.dll" define="${nlog.define}" debug="${nlog.debug}" optimize="${nlog.optimize}" warninglevel="${csc.warninglevel}">
<sources basedir="src/NLogViewer.NDumbsterSmtpReceiver">
<include name="**/*.cs" />
</sources>
<references>
<include name="${nlogviewer.dir}/NLogViewer.Interfaces.dll" />
<include name="${nlogviewer.dir}/nDumbster.dll" />
</references>
</csc>
</target>
<target name="website" depends="configure">
<property name="webbuild.dir" value="${path::combine(nant.project.basedir,web.dir)}" />
<property name="web.buildmode" value="web" />
<property name="web.sourceforge" value="1" />
<call target="buildwebsite" />
<copy file="${web.dir}/introduction.html" tofile="${web.dir}/index.html" />
</target>
<target name="helpwebsite" depends="configure">
<property name="webbuild.dir" value="${path::combine(nant.project.basedir,helpweb.dir)}" />
<property name="web.buildmode" value="help" />
<property name="web.sourceforge" value="0" />
<call target="buildwebsite" />
</target>
<target name="buildwebsite" depends="configure">
<mkdir dir="${webbuild.dir}" />
<copy todir="${webbuild.dir}">
<fileset basedir="web">
<include name="*.css" />
<include name="*.png" />
<include name="*.jpg" />
<include name="*.gif" />
</fileset>
</copy>
<style destdir="${webbuild.dir}" style="web/style.xsl">
<infiles basedir="web">
<include name="*.xml" />
<exclude name="common.en.xml" />
</infiles>
<parameters>
<parameter name="external-base" value="${webbuild.dir}" />
<parameter name="file_extension" value="html" />
<parameter name="sourceforge" value="${web.sourceforge}" />
<parameter name="mode" value="${web.buildmode}" />
</parameters>
</style>
</target>
<target name="configure-mono-1.0">
<property name="nlog.define" value="${nlog.define};MONO;MONO_1_0" />
</target>
<target name="configure-net-1.0" />
<target name="configure-net-1.1" />
<target name="configure-net-2.0" />
<target name="configure-netcf-1.0">
<property name="nlog.define" value="${nlog.define};NETCF;NETCF_1_0" />
</target>
<target name="deploy-web" depends="website">
<delete file="web.zip" if="${file::exists('web.zip')}" />
<zip zipfile="web.zip" stampdatetime="${datetime::now()}" includeemptydirs="true">
<fileset basedir="${web.dir}">
<include name="**/*" />
<exclude name="**/.svn" />
<exclude name="**/.svn/**" />
<exclude name="**/_svn" />
<exclude name="**/_svn/**" />
<exclude name="**/*.swp" />
</fileset>
</zip>
<echo message="Uploading web.zip and tools/web_install.sh to ${ssh.server}..." />
<exec program="${scp.program}" commandline="${scp.args} web.zip tools/web_install.sh ${ssh.server}:." workingdir="." />
<echo message="Spawning web_install.sh..." />
<exec program="${ssh.program}" commandline="${ssh.args} ${ssh.server} dos2unix web_install.sh && /bin/bash web_install.sh ${webserver.deploy.dir}" workingdir="." />
<!-- <delete file="web.zip" /> -->
</target>
</project>